This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH RFC] process/thread/lwp id patch - phase 1



On Mon, 30 Apr 2001, Kevin Buettner wrote:

> This patch introduces a new type called ptid_t which is intended to
> represent a combined process id and thread id (and in some cases, lwp
> id).  This patch is conservative in that it defines it exactly as it
> is defined now in GDB, namely as an "int".  It is not terribly useful
> as such, but phase 3 will introduce a new representation.  (See the
> "FYI" patch referenced above to see what the new representation
> might look like.)

Wearing my Docs Cop hat, I'd say that something about this should
probably be added to gdbint.texinfo.  Please consider that at some
point.

> +#define pid_to_ptid(PID) ((ptid_t) MERGEPID ((PID),0))

This definition is global, for all ports and targets.  However,
MERGEPID is only defined for some of them, so it looks like the other
targets will instantly become broken by this change (since pid_to_ptid
is called in much more targets than those which define MERGEPID).  So
I think some header (target.h?) should have a fallback definition for
MERGEPID, something like this:

  #ifndef MERGEPID
  #define MERGEPID(PID,DUMMY)  (PID)
  #endif

Or did I miss something?


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