|
From: | Taylor Simpson |
Subject: | RE: Re:RE: GDB get wrong debug infos on TI DSP architecture extension |
Date: | Fri, 29 May 2020 15:19:22 +0000 |
To figure out which register gdb is complaining about, you could step through the code in gdb or selectively remove parts of the xml file until the error goes away. The unaligned start address sounds like a problem with the executable you are trying to debug, not qemu or gdb. Taylor From: casmac <1482995675@qq.com> Hi, Thanks for the hints!! I put "-d trace:gdbstub_io_command,trace:gdbstub_io_reply" to command line, get the following from QEMU at the beginning when gdb starts, is there anything went wrong? 6792@1590734139.390330:gdbstub_io_command Received: qSupported:xmlRegisters=tivc33;QNonStop;qRelocInsn+ 6792@1590734139.391330:gdbstub_io_reply Sent: PacketSize=1000;qXfer:features:read+;multiprocess+ 6792@1590734139.391330:gdbstub_io_command Received: Hg0 6792@1590734139.392331:gdbstub_io_command Received: qXfer:features:read:target.xml:0,ffb 6792@1590734139.393331:gdbstub_io_command Received: qXfer:features:read:dsp-vc33-core.xml:0,ffb 6792@1590734139.399331:gdbstub_io_command Received: ? 6792@1590734139.399331:gdbstub_io_reply Sent: T05thread:01; 6792@1590734139.401331:gdbstub_io_command Received: Hc-1 6792@1590734139.402331:gdbstub_io_command Received: qC 6792@1590734139.402331:gdbstub_io_reply Sent: QC01 6792@1590734139.402331:gdbstub_io_command Received: qAttached 6792@1590734139.403331:gdbstub_io_command Received: qOffsets .... It looks like the .xml file is working , the "info reg" command returns the registers defined for TI DSP processor: (szdb) info reg r0 0xc000000000 -274877906944 r1 0x0 0 r2 0x2200000000 146028888064 r3 0x0 0 r4 0x0 0 r5 0x4100000000 279172874240 r6 0x0 0 r7 0x6800000000 446676598784 ar0 0x0 0 ar1 0x0 0 ar2 0x0 0 ar3 0x0 0 ar4 0x0 0 ar5 0x0 0 ar6 0x0 0 ar7 0x0 0 dp 0x0 0 ir0 0x0 0 ir1 0x0 0 bk 0x0 0 sp 0x0 0 st 0x54 84 ie 0x0 0 if 0x0 0 iof 0x0 0 rs 0x0 0 re 0x0 0 rc 0x0 0 pc 0xf 15 clk 0x0 0 But GDB still complains "warning: Target-supplied registers are not supported by the current architecture" and an unkown symbol: atexit ( fun=<error reading variable: Unknown argument list address for `fun'.>) at exit.c:44 44 exit.c: No such file or directory. Another problem is that DSP processor addresses memory by word(4 bytes), the starting entry address from the executable is 0xF, which will fail the 4-byte alignment assertion, so the instruction retrieved does not look right. We are
going to fix it. thanks . xiaolei ------------------ Origina,l ------------------ From: "Taylor Simpson"<tsimpson@quicinc.com>; Date: Thu, May 28, 2020 05:41 AM To: "Philippe Mathieu-Daud "<f4bug@amsat.org>;"casmac"<1482995675@qq.com>;"qemu-devel"<qemu-devel@nongnu.org>; Cc: "Alex Benn e"<alex.bennee@linaro.org>;"Luc Michel"<luc.michel@greensocs.com>; Subject: RE: GDB get wrong debug infos on TI DSP architecture extension For Hexagon, we have LLDB, not GDB. I tinkered with getting LLDB to talk to qemu but never got if fully functional. I'm planning to get back to it at some point. |
[Prev in Thread] | Current Thread | [Next in Thread] |