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: [rfc] Eliminate current_regcache global variable
Date: Tue, 12 Jun 2007 14:27:00 -0000	[thread overview]
Message-ID: <20070612142740.GA16047@caradoc.them.org> (raw)
In-Reply-To: <200706121420.l5CEKUKG031296@d12av02.megacenter.de.ibm.com>

On Tue, Jun 12, 2007 at 04:20:30PM +0200, Ulrich Weigand wrote:
> Daniel Jacobowitz wrote:
> 
> > > +  saved_ptid = inferior_ptid;
> > > +  inferior_ptid = ptid;
> > > +  target_fetch_registers (regcache, -1);
> > > +  inferior_ptid = saved_ptid;
> > 
> > Shouldn't we use a cleanup for this?
> 
> I thought target_fetch_register would never throw an exception ...
> But using the cleanup is probably cleaner anyway; I'll change this.

It will if ptrace fails, or remote communication (the stub crashes),
et cetera.  Of course if either of those happens it will not much
matter what inferior_ptid is.

> > Why'd the return value go?
> 
> That's already dead code, note the other "return" statement immediately
> before it ... 

Whoops.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-06-12 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 21:19 Ulrich Weigand
2007-06-12 14:10 ` Daniel Jacobowitz
2007-06-12 14:20   ` Ulrich Weigand
2007-06-12 14:27     ` Daniel Jacobowitz [this message]
2007-06-16 17:19 ` 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=20070612142740.GA16047@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