Author Topic: avr-gdb debugging and disassembly window  (Read 736 times)

Offline radi

  • Single posting newcomer
  • *
  • Posts: 3
avr-gdb debugging and disassembly window
« on: April 08, 2017, 09:07:07 pm »
Hello to everyone.

I have a small, but a bit annoying issue with the avr-gdb debugging.

Debugging works as well as it should: I can step the code, see register values, etc. However, when code stops at a breakpoint disassembly window remains empty. If I'll use disassemble command then assembler code appears in the debugger log, but the disassembly window is still empty. Probably it will be simpler to understand the symptoms from the attached screenshot.

Is there a simple workaround to put disassemble code in the disassembly window automatically when the step is done?

I use Code::Blocks 16.01 (wx2.8.12) on Linux 64 bit with avr-gcc, avr-gdb and simulavr

Thank you in advance for help

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10186
Re: avr-gdb debugging and disassembly window
« Reply #1 on: April 09, 2017, 12:51:29 am »
I doubt it. My guess is that the code understands only x86 assembly and it cannot parse the avr assembly.
I have no jtag cable, so I cannot reproduce this problem. :(
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline radi

  • Single posting newcomer
  • *
  • Posts: 3
Re: avr-gdb debugging and disassembly window
« Reply #2 on: April 09, 2017, 08:44:39 am »
Hi,

thanks for your reply. Do I understand right, that code::blocks debugger code understands only x86 assembly?

I didn't use jtag, I used emulated controller with simulavr. Settings as in this post
http://forums.codeblocks.org/index.php/topic,6819.msg53408.html#msg53408

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10186
Re: avr-gdb debugging and disassembly window
« Reply #3 on: April 09, 2017, 11:30:32 am »
I don't think understand is the correct word. The debugger is gdb we're only a viewer and we use regular expressions to extract information we need. My guess is that some of the regexes fails because it get unexpected output.

Let me see if I can setup simulavr and try to debug this.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline radi

  • Single posting newcomer
  • *
  • Posts: 3
Re: avr-gdb debugging and disassembly window
« Reply #4 on: April 09, 2017, 12:12:51 pm »
OK, thanks for assistance.

I've browsed a bit the code of debugger plugin and now understand a bit better, what you told me about misunderstanding regexp. It feels that the problem comes (or initiates) from GdbCmd_DisassemblyInit::ParseOutput, because the debugger can not match expression "Stack level "  coming from "info frame" gdb command.

I checked manually this command in avr-gdb, and the output has "Stack level " expression in the beginning. So, the problem is either in parser itself or in getting the avr-gdb output to the parser input.

I don't have enough understanding of the code::blocks debugger plugin code to continue, so it will be great if you'll have some time to check it. Otherwise manual commands will do their work