Subject: Debugging a device driver (How to?)
To: None <tech-kern@netbsd.org>
From: Riaz Randeree <RiazR@cat.co.za>
List: tech-kern
Date: 04/15/1999 10:23:59
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------ =_NextPart_001_01BE8719.50501DD0
Content-Type: text/plain
Hello
I have tried serial debugging:
On the target machine:
options DEBUG="-g"
options KGDB
options KGDBRATE=9600
options KGDBADDR=0x3f8 # yes I
am using the 1st serial port
#options DDB # needed
to be left out?
I build the kernel and netbsd & netbsd.dbg are created
I start debugging by booting the kernel with
boot netbsd.dbg -d
Then on the other machine, using 2nd serial port
(gdb) set remotebaud 9600
(gdb) target remote /dev/tty01
Nothing happens. What am I missing?
Is there another way to debug a device driver?
Please help..
Thanks in Advance
Riaz
------ =_NextPart_001_01BE8719.50501DD0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.0.1460.9">
<TITLE>Debugging a device driver (How to?)</TITLE>
</HEAD>
<BODY>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hello</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I have tried serial debugging:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">On the target machine:</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> =
options =
DEBUG=3D"-g"</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> =
options KGDB</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> =
options =
KGDBRATE=3D9600</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> =
options =
KGDBADDR=3D0x3f8 &n=
bsp; # yes I am using the 1st serial port</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
#options =
DDB &nb=
sp; &nb=
sp; # needed to be left out?</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I build the kernel and netbsd & =
netbsd.dbg are created</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I start debugging by booting the =
kernel with </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; &nb=
sp; &nb=
sp; &nb=
sp; &nb=
sp; </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> boot =
netbsd.dbg -d</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Then on the other machine, using 2nd =
serial port </FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> (gdb) set =
remotebaud 9600</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> (gdb) target =
remote /dev/tty01</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Nothing happens. What am I =
missing?</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Is there another way to debug a device =
driver?</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Please help..</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks in Advance</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Riaz</FONT>
</P>
</BODY>
</HTML>
------ =_NextPart_001_01BE8719.50501DD0--