When is a tid a lwp and vice versa?

John Hughes john@Calva.COM
Fri Jun 29 03:33:00 GMT 2001


So, say I have a process with one lwp, i.e. no threads: 
what should I have in procinfo_list?  One entry for the
process, with tid=0, or two entries, one with tid=0 and
the other with tid=1?

What if I have two lwp's, how many procinfo entries?
Two or three?

Any clues?

I can hack things so I get no warnings and things work
by doing this:

--- procfs.c.orig       Thu Jun 28 15:35:28 2001
+++ procfs.c    Fri Jun 29 12:27:55 2001
@@ -4907,6 +4907,9 @@
      the actual process ID plus the lwp ID. */
   inferior_ptid = MERGEPID (pi->pid, proc_get_current_thread (pi));
 
+  /* Is this too horrid?  open all the lwp's of the new kiddy */
+  procfs_find_new_threads ();
+
 #ifdef START_INFERIOR_TRAPS_EXPECTED
   startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
 #else




More information about the Gdb mailing list