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 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
1. Boot normally
2. Boot single user
3. Disable ACPI
4. Disable ACPI and SMP
5. Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
booting hd0a:netbsd (howto 0x40)
/
Nak
Sending packet: :xmlRegisters=i386;qRelocInsn+#25...putpkt: Junk:/
Nak
Sending packet: :xmlRegisters=i386;qRelocInsn+#25...putpkt: Junk:9820128/
Nak
Timeout in mid-packet, retrying
Timed out.
Timed out.
Ignoring packet error, continuing...
Packet qSupported (supported-packets) is supported
warning: unrecognized item "ebp
db{0}> e" in "qSupported" response
Sending packet: #df...Nak
Sending packet: #df...Ack
Packet received: Hg0
Sending packet: 0#3f...Packet instead of Ack, ignoring it
Ack
Packet received: ?
Sending packet: -1#09...Ack
Packet received: Hc-1
Sending packet: #b4...Ack
Packet received: qC
Sending packet: #8f...Ack
Packet received: qAttached
Packet qAttached (query-attached) is supported
Sending packet: #4b...Ack
Packet received: qOffsets
.gdbinit:5: Error in sourced command file:
Malformed response to offset query, qOffsets
(gdb)
> paul
>
Home |
Main Index |
Thread Index |
Old Index