KGDB not working with recent GDB versions

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

gselabs
Posts: 11
Joined: Sun Feb 17, 2019 7:04 pm

KGDB not working with recent GDB versions

Wed Jun 05, 2019 10:54 am

I tried many ways to bring KGDB to live, but nothing works for me. Also I found that my gdb-multiarch was configured for different target. I don't understand why in such case possible to

Code: Select all

set architecture arm
But building GDB with right configuration

Code: Select all

./configure  --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=arm-linux-gnueabi && make -j15 && sudo make install
didn't solve the problem.
The second problem which I found is that the KDBG in linux4sam repository (and may be in mainline one also) is possibly can't work with latest GDB release. There is not easy to understand which GDB release was tested with current version of ARM KDBG module. May be somebody can shed a lid to the problem?
There is my GDB output:

Code: Select all

$ /usr/local/bin/arm-linux-gnueabi-gdb vmlinux 
GNU gdb (GDB) 8.1
Copyright (C) 2018 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-pc-linux-gnu --target=arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vmlinux...(no debugging symbols found)...done.
(gdb) set architecture arm
The target architecture is assumed to be arm
(gdb) set serial baud 115200
(gdb) tar rem localhost:5551
Remote debugging using localhost:5551
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
(gdb) tar rem localhost:5551
Remote debugging using localhost:5551
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb) tar rem localhost:5551
Remote debugging using localhost:5551
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
(gdb) set architecture armv
armv2    armv2a   armv3    armv3m   armv4    armv4t   armv5    armv5t   armv5te  
(gdb) set architecture armv
armv2    armv2a   armv3    armv3m   armv4    armv4t   armv5    armv5t   armv5te  
(gdb) set architecture armv2
The target architecture is assumed to be armv2
(gdb) set serial baud 115200
(gdb) target remote /dev/ttyACM0
/dev/ttyACM0: No such file or directory.
(gdb) target remote /dev/ttyACM1
/dev/ttyACM1: Device or resource busy.
(gdb) target remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
(gdb) target remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
(gdb) set debug remote 1
(gdb) target remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Nak
Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Nak
Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Nak
Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Packet qSupported (supported-packets) is supported
warning: unrecognized item "timeout" in "qSupported" response
Sending packet: $vMustReplyEmpty#3a...Ack
Packet received: 
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $qTStatus#49...Sending packet: $qTStatus#49...Nak
Sending packet: $qTStatus#49...Nak
Sending packet: $qTStatus#49...Ack
Packet received: 
Packet qTStatus (trace-status) is NOT supported
Sending packet: $?#3f...Sending packet: $?#3f...Sending packet: $?#3f...Nak
Sending packet: $?#3f...Ack
Packet received: S05
Sending packet: $qfThreadInfo#bb...Sending packet: $qfThreadInfo#bb...Nak
Sending packet: $qfThreadInfo#bb...Nak
Sending packet: $qfThreadInfo#bb...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Nak
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Sending packet: $qC#b4...Nak
Sending packet: $qC#b4...Sending packet: $qC#b4...Nak
Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qAttached#8f...Sending packet: $qAttached#8f...Nak
Sending packet: $qAttached#8f...Nak
Sending packet: $qAttached#8f...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Packet qAttached (query-attached) is supported
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Nak
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb) 

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests