gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

Debugging ARM code shows instructions incorrectly

Open sherrellbc opened this issue 5 years ago • 3 comments

Describe the bug I was just giving it a shot on ARM (remote debugging) and noticed a few things. The height of the rows for in the register view make it so that you can only see about 15 registers at once. Could that be scaled back/down? Also, the instructions shown in the debug window are a bit munged together.

The first instruction shown in the screenshot is msr x0, ttbr0_el3. But what is shown in the gdbgui window is mrstx0, ttbr0_el3. It's thrown together the mrs and the x0 while also putting a random t in the mix.

To Reproduce Debug baremetal/kernel ARM code. The instruction display issue might be present on any ARM code, but certainly the use of MSRs (as shown) is not.

Screenshots https://imgur.com/a/wU9I4PZ

Please complete the following information:

  • OS: OSX
  • gdbgui version (gdbgui -v): 0.13.1.1
  • gdb version (gdb -v): 8.2.1
  • browser [e.g. chrome, safari]: Chrome
  • python packages (pip freeze):

sherrellbc avatar Mar 09 '19 11:03 sherrellbc

I'd like to draw a little more attention to this, as I'm running into it as well. When debugging some code on the Nintendo 3DS (using a patched arm-none-eabi-gdb provided by devkitARM, version 8.0) the code that appears in the browser window looks a little something like this: https://imgur.com/TD9Jhjz Could this perhaps have something to do with a failure to properly interpret \t? If pointed in the right direction, I might be able to poke around for the bug a bit. Also note that this issue occurs on 32-bit ARM as well (OP is debugging Aarch64).

Swiftloke avatar Apr 20 '19 22:04 Swiftloke

I also can reproduce this issue on version 0.15.1.0 for ARM AArch64 I think this caused by the failure to parsing \t.

listentodella avatar Sep 18 '22 09:09 listentodella

Looks like this bug has been fixed in a more recent commit/release. If I run gdbgui using the latest pip release, the formatting error appears to still be present. Serving gdbgui from source via master appears to fix this issue however.

CTXz avatar Oct 19 '23 17:10 CTXz