tech-kern archive

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

Re: Issues using KGDB on a Linux machine to debug NetBSD



On Fri, Jun 8, 2012 at 3:03 PM, Eduardo Horvath <eeh%netbsd.org@localhost> 
wrote:
> On Fri, 8 Jun 2012, Israel Jacquez wrote:
>
>> Hello,
>>
>> I'll make this short. I can't seem to get debugging support working
>> even when following the guide:
>> <http://www.netbsd.org/docs/kernel/kgdb.html>.
>>
>> Target: NetBSD 5.1.2 on the i386 port
>> Remote: Debian GNU/Linux
>> Kernel on target: NetBSD-CURRENT
>>
>> I have enabled the following options in the kernel config file:
>>
>> options DDB
>> options DDB_HISTORY_SIZE=512
>> options KGDB
>> options "KGDB_DEVNAME=\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=115200
>> makeoptions DEBUG="-g"
>>
>> After compiling the kernel on the remote machine (Debian GNU/Linux), I
>> copy the new kernel to / on the target machine and I see:
>>
>> When I invoke dmesg(8): dmesg | grep -E '^com', I get the following:
>> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
>> com0: console
>> com0: kgdb
>>
>> I then reboot and at the boot loader, I invoke:
>> boot -d
>>
>> Immediately, I get dropped into DDB. I can only see this through the
>> serial console as the target machine is running headless. After, I
>
> If you have both DDB and KGDB enabled you need to give DDB a specific
> command to drop into KGDB.  Only then can you connect the remote gdb.

Hi Eduardo,

Would that command simply happen to be "kgdb"?

> Eduardo


Home | Main Index | Thread Index | Old Index