[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remote kernel debugging w/ gdb

Apologies to folks who also monitor misc, but after some further introspection I realized that maybe tech was the better list for this one...

I'm getting ready to do some kernel debugging to see why the new Atheros driver isn't working for me, but I'm having some trouble getting remote gdb to work. I've followed the instrucions from kgdb(7), options(4), boot(8), etc as well as the NetBSD docs on remote debugging. I've also spent a good deal of time using gdb remotely w/ FreeBSD, so I'm guessing I'm missing some small OpenBSD nuance. I have the following set-up:

- Host1 (build/debugging host)
  Dual Celeron 500
  256MB RAM
  3.6-current (11/07/04 CVS)

- Host2 (target host)
  Via M10000 Nehemiah
  512MB RAM
  512MB Lexar 80x CF card in IDE->Flash adapter
  2x Aries 5354MP AR5212 miniPCI cards
  2x Microtik Routerboard 11 IDE->miniPCI adapters

I'm building a 3.6-current kernel w/ the ath device, and appropriate KGDB options enabled in my kernel config (see attached kernel config info) and have tty00 on Host1 attached via null modem to tty00 (console) on Host2. I also have tty01 on Host1 attached via null mode to tty01 (kgdb port) on Host2. After boot, firing up gdb on Host1 and issuing a 'target remote /dev/tty01' seemingly does nothing. I also attempted to send a break to tty01 on Host2 which yeilded the message "kgdb waiting..." on it's console. Following this with a 'target remote' from gdb also seemed to do nothing (and that's where I stopped as I had hung Host2 remotely...it has remote powercycling ability now...)

I'm familliar with the procedures for all of this in FreeBSD, but the OpenBSD setup seems just a bit different. Is there some simple detail I'm missing? Any suggestions from folks who have done this previously, or any further info I can provide to detail my situation?

Any help is appreciated,


Attached config info:

kernel config (as diff from GENERIC for brevity. Also, commented out 'options DDB' from /usr/src/sys/conf/GENERIC.):

> makeoptions DEBUG="-g"
< #option KGDB # Remote debugger support; exclusive of DDB
< #option "KGDB_DEVNAME=\"pccom\"",KGDBADDR=0x2f8,KGDBRATE=9600
> option KGDB # Remote debugger support; exclusive of DDB
> option "KGDB_DEVNAME=\"pccom\"",KGDBADDR=0x2f8,KGDBRATE=9600
< #ath* at pci? # Atheros AR5k (802.11a/b/g)
< #ath* at cardbus? # Atheros AR5k (802.11a/b/g)
> ath* at pci? # Atheros AR5k (802.11a/b/g)
> ath* at cardbus? # Atheros AR5k (802.11a/b/g)

dmesg output (from /var/run/dmesg.boot):

OpenBSD 3.6-current (OPENBUILD) #2: Tue Nov 9 08:04:49 EST 2004
cpu0: VIA Nehemiah ("CentaurHauls" 686-class) 1 GHz
cpu0: RNG
real mem = 519614464 (507436K)
avail mem = 467161088 (456212K)
using 4278 buffers containing 26083328 bytes (25472K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(68) BIOS, date 12/11/03, BIOS32 rev. 0 @ 0xfb210
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xdf44
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfded0/112 (5 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11 12
pcibios0: no compatible PCI ICU found
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xfa00
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8623 PCI" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8633 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "VIA CLE266" rev 0x03: aperture at 0xd8000000, siz
e 0x10000000
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"VIA VT6306 FireWire" rev 0x80 at pci0 dev 13 function 0 not configured
uhci0 at pci0 dev 16 function 0 "VIA VT83C572 USB" rev 0x80: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 16 function 1 "VIA VT83C572 USB" rev 0x80: irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 16 function 2 "VIA VT83C572 USB" rev 0x80: irq 12
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 16 function 3 "VIA VT6202 USB 2.0" rev 0x82: irq 5
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
pcib0 at pci0 dev 17 function 0 "VIA VT8235 ISA" rev 0x00
pciide0 at pci0 dev 17 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <LEXAR ATA FLASH>
wd0: 16-sector PIO, LBA, 489MB, 1001952 sectors
wd0(pciide0:0:0): using PIO mode 4
pciide0: channel 1 disabled (no drives)
auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97" rev 0x50: irq 12
ac97: codec id 0x49434552 (ICEnsemble VIA VT1616i)
ac97: codec features headphone, 18 bit DAC, 18 bit ADC, KS Waves 3D
audio0 at auvia0
vr0 at pci0 dev 18 function 0 "VIA RhineII-2" rev 0x74: irq 11 address 00:40:63:
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x004063, model 0x0032, rev. 8
"Atheros AR5212" rev 0x01 at pci0 dev 19 function 0 not configured
"Atheros AR5212" rev 0x01 at pci0 dev 20 function 0 not configured
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pccom1: kgdb
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
biomask ff65 netmask ff65 ttymask ffe7
pctr: user-level cycle counter enabled
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302

Visit your host, monkey.org