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 2:08 PM, <Paul_Koning%dell.com@localhost> wrote:
>
> On Jun 8, 2012, at 4:53 PM, Israel Jacquez wrote:
>
>> On Fri, Jun 8, 2012 at 1:46 PM, <Paul_Koning%dell.com@localhost> wrote:
>>>
>>> On Jun 8, 2012, at 4:35 PM, 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>.
>>>> ...
>>>> Immediately, I get dropped into DDB. I can only see this through the
>>>> serial console as the target machine is running headless. After, I
>>>> invoke i486--netbsd-gdb that (should) read .gdbinit:
>>>> file sys/arch/i386/compile/obj/GENERIC-DEBUG/netbsd.gdb
>>>> set remote interrupt-sequence Ctrl-C
>>>> set remotebaud 115200
>>>> target remote /dev/ttyUSB0
>>>>
>>>> After in GDB, all I see is:
>>>> warning: unrecognized item "qSupported:xm" in "qSupported" response
>>>> Ignoring packet error, continuing...
>>>> Ignoring packet error, continuing...
>>>> ...
>>>>
>>>> Any help? Tips?
>>>
>>> To see exactly what's going on, use the gdb command "set debug remote 1"
>>> before the "target remote" command. That will show the dialog between gdb
>>> and the system being debugged.
>>>
>>> It looks like the system is sendng something that your gdb doesn't
>>> understand. Perhaps it's too old; what version are you using?
>>
>> The version that was built (i486--netbsd-gdb) is GNU gdb (GDB) 7.3.1.
>>
>> I'll try again. Here is the output. (/boot.cfg is set to automatically
>> "boot netbsd -d"):
>>
>> GNU gdb (GDB) 7.3.1
>> Copyright (C) 2011 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "--host=x86_64-unknown-linux-gnu
>> --target=i486--netbsdelf".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>.
>> Sending packet: :xmlRegisters=i386;qRelocInsn+#25...Sending packet:
>> :xmlRegisters=i386;qRelocInsn+#25...putpkt: Junk:
>>>> NetBSD/x86 BIOS Boot, Revision 5.2 (from NetBSD 5.1.2)
>>>> Memory: 638/1037184 k ...
>
> It looks like you connected while the boot output was still coming out. Gdb
> doesn't seem to like that very much at all. I have a modified gdb that
> treats anything unrecognized as "console output" but without that change,
> you're going to have problems if your target mixes program output with gdb
> protocol data.
Maybe I don't understand the "work flow". Should I then wait until I
get to the login prompt in order to fire up GDB? What if it crashes
halfway through? The problem is that it's headless so I don't know
what's going on. I guess I could use the serial console until it
crashes and then fire up GDB.
Many thanks for your help.
> paul
>
>
>
Home |
Main Index |
Thread Index |
Old Index