Re: Refresh TUI source panel after "monitor reset"

"R. Diez via Gdb" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> Completely untested, but I wonder if 'list *$pc' does what you want?

Thanks for the hint.

The "list *$pc" command seems to have no effect at all, at least when using TUI.

I tried this sequence:

monitor reset halt
flushregs
list *$pc

And neither the source nor the disassembly pane changed.

But then I experimented a little further. Command "list" seems to work if you supply a known function name. If the function does not exist, you get an error message like 'Function "test" not defined.'.

However, if you specify an address which does not fall in the known code area, GDB just ignores the "list" command. For example, I tried these commands:

list * 0x1000000
list * 0x8000000

And there were just silently ignored.

The reset address does not fall into the current firmware, but in the bootloader area, and the currently-loaded ELF does not have debug symbols for the bootloader area. That is perhaps the reason why the "list *$pc" has no effect.

But then your suggestion gave me the idea of trying "disassemble $pc,+10". That did the trick.

Interestingly enough, the current instruction indicator (the '>' on the left) is not showing the current address, even though the PC register is correct. I am trying this on an ARM Cortex-M4F microcontroller. But then running "stepi" does work, and the indicator is then right.

Regards,
   rdiez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.