Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: target_find_description question
Date: Thu, 04 Sep 2008 21:52:00 -0000	[thread overview]
Message-ID: <20080904215132.GA30416@caradoc.them.org> (raw)
In-Reply-To: <200809041916.m84JGXcr025369@d12av02.megacenter.de.ibm.com>

On Thu, Sep 04, 2008 at 09:16:33PM +0200, Ulrich Weigand wrote:
> Daniel Jacobowitz wrote:
> 
> > I suppose the easiest thing to do would be to call
> > target_find_description right before handle_inferior_event, and rely
> > on target_desc_fetched to prevent duplicate work.
> 
> Unfortunately, it turns out this doesn't work.  Or rather, it works
> too well: target_find_description is called after the first stop,
> and determines target properties -- while the inferior process is
> still executing the shell we're using to start up the real inferior!

Whoops.  I didn't think of that.

> So it'll detect e.g. a 32-bit inferior because the shell is 32-bit,
> even though the real inferior is a 64-bit application ...
> 
> I guess we do need to defer target_find_description until after the
> real inferior is started.  However, we then have the problem of how
> to handle those register/memory accessed in the mean time.

Shouldn't accessing the shell's registers always be a bug, admitted
one that we already have?  We don't have symbols for it, we don't
support breakpoints in it, et cetera.  We used to have some global
information about the number of expected traps, but now it's local.

> Maybe we can change handle_inferior_event to not do any PC processing
> if stop_soon is set?

I don't think that will work, e.g. solib-irix.c and various other
solib modules run expecting to hit a breakpoint.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-09-04 21:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 23:49 Ulrich Weigand
2008-09-04 12:12 ` Daniel Jacobowitz
2008-09-04 19:17   ` Ulrich Weigand
2008-09-04 21:52     ` Daniel Jacobowitz [this message]
2008-09-04 22:12       ` Pedro Alves
2008-09-04 22:27         ` Pedro Alves
2008-09-05  0:00           ` [patch, rfc] " Ulrich Weigand
2008-09-05  2:40             ` Daniel Jacobowitz
2008-09-05 13:11             ` Pedro Alves
2008-09-06  1:55             ` Joel Brobecker
2008-09-11 16:13             ` Ulrich Weigand

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=20080904215132.GA30416@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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