public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "R. Diez" <rdiezmail-temp2@yahoo.de>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Refresh TUI source panel after "monitor reset"
Date: Fri, 24 Jun 2022 16:57:32 +0200	[thread overview]
Message-ID: <7699942f-4c45-4cf4-0f54-dc1948262c9f@yahoo.de> (raw)
In-Reply-To: <87h74ab1ia.fsf@redhat.com>


> 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

  reply	other threads:[~2022-06-24 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48b5be62-64c1-c7bb-a560-e454ffe2f0ba.ref@yahoo.de>
2022-06-21 11:30 ` R. Diez
2022-06-24 14:05   ` Andrew Burgess
2022-06-24 14:57     ` R. Diez [this message]
2022-06-28 13:43       ` Pedro Alves
2022-09-02 12:34         ` R. Diez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7699942f-4c45-4cf4-0f54-dc1948262c9f@yahoo.de \
    --to=rdiezmail-temp2@yahoo.de \
    --cc=aburgess@redhat.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).