Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro@codesourcery.com (Pedro Alves)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC,v2] Yank out target_ops->to_sections
Date: Wed, 03 Jun 2009 19:36:00 -0000	[thread overview]
Message-ID: <200906031936.n53JaT4Z015856@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200906031726.38327.pedro@codesourcery.com> from "Pedro Alves" at Jun 03, 2009 05:26:38 PM

Pedro Alves wrote:

> I don't think anyone disagrees with that.  With my proposal, there will
> be ways to get from a frame/thread/inferior/whatever to the corresponding
> address/symbol space, and where possible we'll use those.  However,
> consider the case where you have more than one program
> loaded (say, /bin/cat and /bin/echo), and haven't started execution in
> either of those yet.  There is no "inferior" or "thread" object yet
> for any of them, and you can't distinguish with inferior_ptid=20
> either (it's null_ptid in both cases).  Currently, all this state
> is spread around in globals all over (e.g., even exec_bfd can be
> accessed in the most twisted code paths).  But, it's the "prepare to
> start a new inferior" part that ends up requiring the global.

Ah, I see.

> I'm proposing to aggregate them somewhere, but we still need to have a
> global storing a pointer to the "current context" somewhere.  I agree
> that ideally then this global should only be accessed at high
> layers, close to the UI, and that we should only need to pass to each
> major component what it really needs and handles, as arguments.
> But, that really *has* to be a long term goal.  Just getting rid
> of a single one of those globals (by passing them in arguments) is
> a *lot* of hair for practically 0 gain at this point.  Since we do
> have to aggregate and store these globals somewhere, I think that
> I'm taking a good first step.  IMO, it's much better to just switch
> a pointer than to come up with the old "infrun.c|thread.c:context_switch"
> mess.  We can then *incrementally* clean up interfaces, as we'll
> then have a clearly visible goal to achieve.  Anyway, things
> will surely get clearer a bit further down the line when I post
> the main juicy bits for discussion.

OK, thanks for the explanation ...  Looking forward to your patches :-)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


      reply	other threads:[~2009-06-03 19:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24  1:35 Pedro Alves
2009-05-26 23:30 ` Pedro Alves
2009-05-27  1:30   ` Doug Evans
2009-05-27 18:24   ` Ulrich Weigand
2009-05-29 14:13     ` Pedro Alves
2009-05-30 16:39       ` [RFC,v3] " Pedro Alves
2009-06-02 11:10         ` Ulrich Weigand
2009-06-03 18:57           ` Pedro Alves
2009-06-02 11:06       ` [RFC,v2] " Ulrich Weigand
2009-06-03 16:26         ` Pedro Alves
2009-06-03 19:36           ` Ulrich Weigand [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=200906031936.n53JaT4Z015856@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@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