Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@science.uva.nl>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: private_thread_info thread-db.c and lin-lwp.c
Date: Wed, 25 Jul 2001 14:04:00 -0000	[thread overview]
Message-ID: <s3i7kwwbu1f.fsf@soliton.wins.uva.nl> (raw)
In-Reply-To: <3B5E736C.9040702@cygnus.com>

Andrew Cagney <ac131313@cygnus.com> writes:

> Hello,
> 
> I was looking to make ``struct thread_info'' opaque again but, noticed this:
> 
> thread-db.c contains:
> 	struct private_thread_info
> 	{
> 	  /* Cached LWP id.  Must come first, see lin-lwp.c.  */
> 	  lwpid_t lwpid;
> 	};
> 	....
> 	  tp = add_thread (ptid);
> 	  tp->private = xmalloc (sizeof (struct private_thread_info));
> 	  tp->private->lwpid = ti_p->ti_lid;
> but no obvious reference to ->private.
> 
> Meanwhile, lin-lwp.c contains:
> 	struct private_thread_info
> 	{
> 	  int lwpid;
> 	};
> 	....
> 	  if (tp->private->lwpid == GET_LWP (lp->ptid))
> but no obvious initialization of ->private when adding threads.

Those bits were supposed to interact closely.  Under normal
circumstances the code in lin-lwp.c shouldn't be adding threads to
GDB's list.

> It turns out that the main thing keeping this working is that the 
> lin-lwp.c code is in an unreachable function (find_lwp_callback()).

Well, that bit of code was used until recently.  I put it in to work
around bug in some of the GDB core code.  Michael Snyder believes he's
fixed that bug, and disabled the bit of code.  Things seem to work
right now, so I think we can rip this bit of code out.

Mark


  reply	other threads:[~2001-07-25 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-25  0:22 Andrew Cagney
2001-07-25 14:04 ` Mark Kettenis [this message]
     [not found]   ` <kettenis@science.uva.nl>
2001-07-25 14:25     ` Kevin Buettner
2001-07-25 15:56       ` Andrew Cagney

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=s3i7kwwbu1f.fsf@soliton.wins.uva.nl \
    --to=kettenis@science.uva.nl \
    --cc=ac131313@cygnus.com \
    --cc=gdb@sources.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