From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFC] New targets remote-rx and extended-remote-rx
Date: Tue, 04 May 2010 00:32:00 -0000 [thread overview]
Message-ID: <201005040131.53858.pedro@codesourcery.com> (raw)
In-Reply-To: <20100503153029.34287dfe@redhat.com>
On Monday 03 May 2010 23:30:29, Kevin Buettner wrote:
> On Fri, 30 Apr 2010 23:35:44 +0100
> Pedro Alves <pedro@codesourcery.com> wrote:
> > I'm not sure I grasped it enough to understand
> > if this could benefit from a TARGET_OBJECT_MEMORY_CODE vs
> > TARGET_OBJECT_MEMORY_DATA request distinction, instead of just
> > calling everything TARGET_OBJECT_MEMORY? That is switch
> > the swapping decision to the transfer intent, not to where
> > the code is in memory.
>
> I'll have to think about this. Doesn't sound unreasonable though.
>
> > For example, what should happen
> > if I build a buffer of executable code in memory at runtime,
> > and I want to disassemble it with GDB? I'll build the memory
> > buffer, with a layout as the compiler puts things in .text,
> > but the code will not be in .text, yet, don't I want for
> > GDB to read it in execute order, not memory order?
>
> E.g, a just-in-time (JIT) compiler? Yes, you'd want GDB to convert
> dynamically compiled code from memory order to execute order.
Yes, that's one example, although there are many more use cases
beyond a full fledged compiler. Just staying in gdb land, think of
things like debugging the displaced stepping scratch pad (when you
add support for non-stop mode you'll want to debug this, probably).
Another example, debugging fast tracepoints support for RX. In the latter,
we patch the code stream with a jump into small trampoline routine built
at runtime in the inferior's memory. Just copying a piece of .text
code into a data buffer, and trying to disassemble it is another example.
The more I think of this, the more it seems that it's the thought/intent
that counts.
--
Pedro Alves
next prev parent reply other threads:[~2010-05-04 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 21:42 Kevin Buettner
2010-04-30 22:35 ` Pedro Alves
2010-05-03 22:30 ` Kevin Buettner
2010-05-04 0:32 ` Pedro Alves [this message]
2010-04-30 23:23 ` Joseph S. Myers
2010-05-03 23:18 ` Kevin Buettner
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=201005040131.53858.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.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