public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Jon Beniston" <jon@beniston.com>
To: <Paul_Koning@Dell.com>
Cc: <yao@codesourcery.com>,	<gdb@sourceware.org>
Subject: RE: Memory-mapped peripheral registers, remote protocol and memory maps
Date: Thu, 29 Nov 2012 17:57:00 -0000	[thread overview]
Message-ID: <009601cdce5a$e6659d50$b330d7f0$@beniston.com> (raw)
In-Reply-To: <C75A84166056C94F84D238A44AF9F6AD2BAC5B@AUSX10MPC103.AMER.DELL.COM>

Hi Paul,

> > Yes, this is fine from the command line, but ideally I would like
something
> that works when GDB is being driven by a GUI such as Eclipse, which may
not
> necessarily know the correct size to use. It does work in some cases, but
not
> all (i.e. when dumping memory).
> 
> If so, that would be the GUI's issue.  If GDB can be told what to do --
which
> appears to be the case -- then it's up to whoever does the telling to tell
> correctly.  If GDB can do it but you ask it the wrong thing, it will obey
and do
> the wrong thing.  So don't do that.

It doesn't seem like the right approach to me to require each GDB GUI (or
user) to have detailed knowledge of the target h/w. Wouldn't it be better if
this info came from the target, in the same way the memory map or target
description does?  GDB already has the hooks to deal with this (via the mem
command), it's just a case of how to best get that info and then actually
make use of it. 

I don't think it would make sense to propagate this target information to
the GUI to require it to only generate correct commands, otherwise you are
requiring the problem to be solved in each GUI, rather than just in one
place in GDB.

> What's not clear to me is whether there is a *guarantee* that 
> certain UI requests will produce certain "m" packets.  Clearly 
> there are a bunch of things that fall out of the current implementation,
>  but if somehow the implementation were to change and,
>  say, that "p" command above is split into two m packets, what then?  

Well, I would expect that any command should respect the attributes set via
the 'mem' command, if it doesn't, it's a bug, if it can't, it should
generate an error message?

Cheers,
Jon


      reply	other threads:[~2012-11-29 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 19:24 Jon Beniston
2012-11-29  9:16 ` Yao Qi
2012-11-29 11:23   ` Jon Beniston
2012-11-29 15:51     ` Yao Qi
2012-11-29 16:32   ` Jon Beniston
2012-11-29 17:23     ` Paul_Koning
2012-11-29 17:57       ` Jon Beniston [this message]

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='009601cdce5a$e6659d50$b330d7f0$@beniston.com' \
    --to=jon@beniston.com \
    --cc=Paul_Koning@Dell.com \
    --cc=gdb@sourceware.org \
    --cc=yao@codesourcery.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).