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

Eli Zaretskii eliz@is.elta.co.il
Thu May 3 00:19:00 GMT 2001


On Tue, 1 May 2001, Kevin Buettner wrote:

> > > +#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?
> 
> MERGEPID will be defined for all ports and all targets since it is
> defined later on in defs.h...
> 
> #ifndef PIDGET
> #define PIDGET(PID) (PID)
> #define TIDGET(PID) 0
> #define MERGEPID(PID, TID) (PID)
> #endif

Hmm, I don't see this snippet in defs.h in the patch you posted.

> Also, MERGEPID is defined along with PIDGET in each each header file
> where PIDGET is defined.  These are:
> 
>     config/nm-linux.h
>     config/sparc/tm-sun4sol2.h
>     config/i386/tm-i386sol2.h
>     config/i386/tm-i386v42mp.h

These I do see, but they are specific to these targets.  MERGEPID
seems to be required on all targets.



More information about the Gdb-patches mailing list