Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tomas Martinec <fyzmat@gmail.com>
To: "Petr Hluzín" <petr.hluzin@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Addition of a special memory reading command
Date: Wed, 01 Jun 2011 16:35:00 -0000	[thread overview]
Message-ID: <BANLkTinXFt_Q+nJtnGu8=+REe6w5pUMagA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimO18hnvOGpbtEHUTUo0Nbpq0yxXg@mail.gmail.com>

Hello,

thanks for guide.

> Also there are "info proc mappings" not "info target", unfortunately
> neither these are  exactly what you want.

> I guess it would be useful to enhance these commands than implementing new ones.

The information about memory mapping would definitely help to solve my
issue. I was wondering whether the size of transfered information
between gdb and eclipse would be too large with comparison to my
proposed command. Eclipse would use the mapping command just when
normal memory read command fails. That probably will not happen very
often, so the size of transfered data should not matter. So I think
that sending the whole memory map to the eclipse is not a bad idea.

The "info proc mappings" command seems to be currently implemented in
procfs.c and linux-nat.c modules. The both implementations show: start
address, end address, size and offset. Additionally the procfs.c
implementation shows flags and the linux-nat.c implementation object
filename. The shown offset and object columns does not have any
meaning for my VM scenario. So the "info proc mappings" would show
always "start address", "end address/size" and optionally some other
columns.

Currently the "info proc mappings" seems to be available only when gdb
is compiled for proper platform. I would make it available always,
because it could be used for remote targets. Calling the command would
choose which implementation (remote/linux/procfs) would be done.

> GDB remote protocol already allows specifying some memory regions,
> though you cannot specify a unreadable&unwritable "hole". The remote/Memory-Map-Format.html
> command seems to be accesible as "info mem" command. See
> http://sourceware.org/gdb/onlinedocs/gdb/Memory-Map-Format.html

The command "qXfer:memory-map:read" looks suitable for getting the
memory map from a remote target, thanks for pointing it out.

The cli form of the "info proc mappings" command is not very suitable
for the frontend. Maybe creating an MI equivalent to the "info proc
mappings" would be nice. The MI form also enables me to specify the
thread. That is needed in my VM scenario, because I represent
processors as threads and each processor can be in different
addressing mode.

Would you accept this improvement?

Tomas


  reply	other threads:[~2011-06-01 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 16:05 Tomas Martinec
2011-05-30 19:44 ` Petr Hluzín
2011-06-01 16:35   ` Tomas Martinec [this message]
2011-06-01 19:05     ` Petr Hluzín
2011-06-01 19:23       ` Tomas Martinec
2011-06-10 18:25       ` Tomas Martinec

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='BANLkTinXFt_Q+nJtnGu8=+REe6w5pUMagA@mail.gmail.com' \
    --to=fyzmat@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=petr.hluzin@gmail.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