This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot execute this command without a live selected thread.


Pedro Alves writes:
 > > Not all targets use ptid.lwp.
 > 
 > All process_stratum targets do.

windows-nat.c doesn't
(at least I remember seeing all calls to ptid_build there
passing 0 for lwp).
Could be missing something of course.

 >     I believe that on the GDB side too, it's best that we standardize on
 >     process_stratum targets using the ptid.lwp field to store thread ids
 >     anyway.  The idea being leave the ptid.tid field free for any
 >     thread_stratum target that might want to sit on top.

The language in the comment in ptid.h waffles a bit:

   process_stratum targets that handle threading themselves should
   prefer using the ptid.lwp field, leaving the ptid.tid field for any
   thread_stratum target that might want to sit on top.

Can we make this more of a rule than just a "should prefer"?
[and fix targets to follow]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]