This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFC] process/thread/lwp id patch - phase 1
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFC] process/thread/lwp id patch - phase 1
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 3 May 2001 10:20:58 +0300 (IDT)
- cc: gdb-patches at sources dot redhat dot com
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.