Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Mark Kettenis <kettenis@chello.nl>,
	msnyder@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [Fwd: Re: [Fwd: Re: gdb/725: Crash using debug target and regcaches (in 5.3 branch?)]]
Date: Tue, 03 Dec 2002 13:41:00 -0000	[thread overview]
Message-ID: <3DED24E1.70403@redhat.com> (raw)
In-Reply-To: <20021203193322.GA19891@nevyn.them.org>

> 
> It's not an assumption at this point.  proc-service.c:230 to
> thread_db_fetch_registers is the only path into lin_lwp_fetch_registers.
> And that does:
>   inferior_ptid = BUILD_LWP (lwpid, ph->pid);
> 
> So at this point we _know_ that the thread we're querying has its
> registers in the LWP.  That's the whole point.

To just to clarify something, I'm being critical of the overall design 
here, not your patch.  The comment is for sparc-nat.c (which also gets 
used on sun-4 and free bsd systems).

The target/*-nat interface shouldn't be be making assumptions such as 
this (global state, only ever one LWP / thread active, ...).  Doing so 
is poor design, it leads to bugs just like the one being discussed here.

If, instead, the code had been correctly implemented (what 5 years ago?) 
this bug, and these on-going problems, wouldn't have occured.

Andrew



  reply	other threads:[~2002-12-03 21:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-26 14:10 Andrew Cagney
2002-11-27 12:55 ` Andrew Cagney
2002-11-30  8:13   ` Mark Kettenis
2002-11-30  8:42     ` Andrew Cagney
2002-12-03  9:10       ` Andrew Cagney
2002-12-03  9:19         ` Daniel Jacobowitz
2002-12-03 11:20           ` Andrew Cagney
2002-12-03 11:33             ` Daniel Jacobowitz
2002-12-03 13:41               ` Andrew Cagney [this message]
2002-12-03 13:46                 ` Daniel Jacobowitz
2002-12-03 14:10                   ` Andrew Cagney
2002-12-03 19:22                     ` Andrew Cagney
2002-12-03  9:27 Michael Elizabeth Chastain

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=3DED24E1.70403@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    --cc=msnyder@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