Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: assert that target_fetch_registers did its job
Date: Sat, 24 Jul 2004 00:45:00 -0000	[thread overview]
Message-ID: <20040724004433.GA15591@nevyn.them.org> (raw)
In-Reply-To: <vt2oem6tjnk.fsf@zenia.home>

On Fri, Jul 23, 2004 at 05:59:11PM -0500, Jim Blandy wrote:
> 
> Does anyone see anything wrong with this?  Should it be an error, or a
> warning, instead of an internal error?  It seems to me that the error
> should be furnished by the target-specific code; if
> target_fetch_registers returns silently, it should have done its job.

It shouldn't be an error.  internal-error makes the most sense to me;
if we need to relax it while some broken target is worked on, then
it should be a warning or silent.

> But thread_db_fetch_registers doesn't follow that assumption.  In the
> threaded case, given any register number, it fetches the gprs, and the
> fprs, supplies them, and assumes its job is done.  It seems to me it
> sholud be calling register_valid_p (current_regcache, regno) to check
> that the register's value has really been supplied, and complaining if
> it hasn't.

I suggest we slay thread_db_fetch_registers.

Once upon a time, it served a purpose.  Now it is nothing but a source
of problems.  We could pass opaque cookies rather than register data
through the gregset structure - the interface doesn't really support
this but at least two of the five thread-db implementations I'm aware
of would.  Or we could just give up, use thread-db for nothing besides
finding new threads, and ask the LWP for its registers directly without
six or eight call frames of indirection.

-- 
Daniel Jacobowitz


  reply	other threads:[~2004-07-24  0:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23 23:00 Jim Blandy
2004-07-24  0:45 ` Daniel Jacobowitz [this message]
2004-08-03 14:23   ` Andrew Cagney
2004-08-07 18:42     ` Daniel Jacobowitz
2004-08-07 18:54       ` Andrew Cagney
2004-08-04 17:51   ` Jim Blandy
2004-08-06 20:50 ` Nathan J. Williams
2004-08-06 23:43   ` Jim Blandy
2004-08-07  1:47     ` Ian Lance Taylor
2004-08-07 16:13       ` Andrew Cagney
2004-08-07 18:31         ` Jim Blandy

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=20040724004433.GA15591@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@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