Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Thread handles
@ 2003-01-14 22:21 Daniel Jacobowitz
  2003-01-14 22:39 ` Roland McGrath
  2003-01-14 22:40 ` Roland McGrath
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-01-14 22:21 UTC (permalink / raw)
  To: gdb; +Cc: Roland McGrath

Roland,

My question is about the precise lifetime of a td_thrhandle_t, in both
LinuxThreads' and NPTL's thread_db implementations.  Right now, GDB
re-queries for the thread handles every time the target stops.  This hurts a
lot... from the implementation, I believe they'll remain valid over time,
until the thread exits.  Is this right/reasonable?

I'm not worried if one thread handle could be eventually re-used for another
thread after the first exits; we'll notice the thread exit, discard the
thread handle, and go on with our lives.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Thread handles
  2003-01-14 22:21 Thread handles Daniel Jacobowitz
@ 2003-01-14 22:39 ` Roland McGrath
  2003-01-14 22:40 ` Roland McGrath
  1 sibling, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2003-01-14 22:39 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

I don't know what a "thread handle" is.  Please refer to the API types directly.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Thread handles
  2003-01-14 22:21 Thread handles Daniel Jacobowitz
  2003-01-14 22:39 ` Roland McGrath
@ 2003-01-14 22:40 ` Roland McGrath
  1 sibling, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2003-01-14 22:40 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Which is to say, if you are really talking about `td_thrhandle_t', then
that is a momentary object that exists only on gdb's stack during some
thread_db calls.  The th_unique value inside it does indeed have a reliable
valid lifetime matching that of the inferior thread.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-14 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 22:21 Thread handles Daniel Jacobowitz
2003-01-14 22:39 ` Roland McGrath
2003-01-14 22:40 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox