h4tr3d / gdbproxy

GDB TCP protocol proxy to inject/hooks GDB client requests to the target.
10 stars 1 forks source link

Unable to debug #2

Open conkerkh opened 4 years ago

conkerkh commented 4 years ago

I'm getting following error when trying to start debugging, right after load command. Seems like there is an issue with stack unwiding.

/proj/sdk/gnu/microblaze/builds/HEAD/nightly/2017_11_15/rdi_scripts/../build/lin/ctng_bld/target_build/src/gdb-custom/gdb/inline-frame.c:239: internal-error: int inline_frame_sniffer(const frame_unwind, frame_info, void**): Assertion `depth > 0' failed.

conkerkh commented 4 years ago

Actually that's is a problem with GDB not with the tool itslef. However I'm having trouble in general using the plugin, usually it will just hang gdb, I can see communication going on but I can't do anything really after hitting c to start the program on uBlaze.

h4tr3d commented 4 years ago

Oh, unfortunately I have no MB setup now. Could you please also attach information about XSDK/Vitis version that is used?

conkerkh commented 4 years ago

I have pretty uncommon setup, so I use mb 2017.4 toolchain. I debug and write code in VScode, the way it works is that there is hwserver running on a host and I simply use GDB with a plugin to connect threre and debug code using vscode. The plugin is pretty much universal and works fine with other embedded platforms like stm32/esp32 so I assume it's not the source of problems here, my first bet is on mb toolchain, which is buggy for sure, but it might be something with the plugin itself as well. If you know about any compatibility issues with older toolchains it would help.

conkerkh commented 4 years ago

Ok I think I'm getting somewhere, so turns out 2017.4 GDB doesn't support freertos aware debugging. Using newer toolchain works, but I belive there is a problem with stack unwinding, as only one thread callstack is shown correctly (currently running), if you don't have any idea what's going on I'll dive into plugin source, since I've done something simmilar for Ozone (Segger debugger)