public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: joe jo <jiu@myself.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Some question about gdb unknown memory
Date: Fri, 17 Jun 2022 11:40:40 +0100	[thread overview]
Message-ID: <377d7fb9-445b-12d0-62f6-8c43c254bec8@arm.com> (raw)
In-Reply-To: <tencent_98EA26F6337C692F0FDB6F523161F884D909@qq.com>

[switching to gdb@]

On 5/20/22 07:51, joe jo wrote:
> Hi
> 
> 
> I met some questions when I used GDB to debugging my project. I'm writing this mail for some help.
> At first&nbsp;I set up my one gdb-server and use GDB to connect it.
> The problem happened when I use 'x' command to observe some unknown memory.
> In my design, when gdb ask for some unknown memorys or registers, my server will return '?' or some other signal. For instance, when my gdbserver receive command 'm90000000,4' and memory after 90000002 is unknown, the server will return XXXX????. Otherwise, the server will return unknown register like 1234???000?0000 when receive 'g' command
> However, when recieve ?, GDB will report errors like "Invalid hex digit 63".
> I have read the source code of binutils-gdb/gdb/remote.c to find the reason of error, but I still don't know how can I notice GDB about those unknown memory.
> In addition, I wonder how to use MI to sent the information about unknow memory to a eclipse-based front-end
> 
> 
> I look forward to hearing from you soon.
> Joe Jo

Only registers can have unknown/unavailable values, marked as lowercase 'x' in the register packet reply. Memory reads don't have such support, so '?' is essentially not recognized as something valid.

       reply	other threads:[~2022-06-17 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_98EA26F6337C692F0FDB6F523161F884D909@qq.com>
2022-06-17 10:40 ` Luis Machado [this message]
2022-06-17 13:03   ` Pedro Alves

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=377d7fb9-445b-12d0-62f6-8c43c254bec8@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb@sourceware.org \
    --cc=jiu@myself.com \
    /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).