Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Eliminate current_regcache global variable
Date: Tue, 12 Jun 2007 14:20:00 -0000	[thread overview]
Message-ID: <200706121420.l5CEKUKG031296@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070612141035.GF7815@caradoc.them.org> from "Daniel Jacobowitz" at Jun 12, 2007 10:10:35 AM

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.

> > @@ -2672,15 +2670,11 @@ static char *
> >  linux_nat_do_registers (bfd *obfd, ptid_t ptid,
> >  			char *note_data, int *note_size)
> >  {
> > -  registers_changed ();
> > -  /* FIXME should not be necessary; fill_gregset should do it automatically. */
> > -  target_fetch_registers (current_regcache, -1);
> >    return linux_nat_do_thread_registers (obfd,
> >  					ptid_build (ptid_get_pid (inferior_ptid),
> >  						    ptid_get_pid (inferior_ptid),
> >  						    0),
> >  					note_data, note_size);
> > -  return note_data;
> >  }
> 
> Why'd the return value go?

That's already dead code, note the other "return" statement immediately
before it ... 

Bye,
Ulrich

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


  reply	other threads:[~2007-06-12 14:20 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 [this message]
2007-06-12 14:27     ` Daniel Jacobowitz
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=200706121420.l5CEKUKG031296@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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