From: Kevin Buettner <kevinb@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFC] process/thread/lwp id patch - phase 1
Date: Tue, 01 May 2001 07:47:00 -0000 [thread overview]
Message-ID: <1010501144655.ZM545@ocotillo.lan> (raw)
In-Reply-To: <Pine.SUN.3.91.1010501114841.29799D@is>
On May 1, 11:49am, Eli Zaretskii wrote:
[regarding addition of ptid_t]
> 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.
Okay. I'll let the dust settle first with regards to the name of the
type and its representation. After that, I'll submit a patch for
gdbint.texinfo.
> > +#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
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
There are also some .c files which define PIDGET (if not already
defined), but *don't* define MERGEPID. In each case, however, the
relevant bit of code always occurs after the defs.h include. This
means that MERGEPID will either have been defined in defs.h or in one
of the other header files included by defs.h.
The following .c files superfluously define PIDGET and TIDGET:
arm-linux-nat.c
i386-linux-nat.c
infptrace.c
lin-thread.c
procfs.c
lin-lwp.c
thread-db.c
The last four of these also (superfluously) define MERGEPID.
The phase 3 patch that I have planned will remove the superfluous
PIDGET, TIDGET, and MERGEPID defines.
Thanks for looking over my patch.
Kevin
next prev parent reply other threads:[~2001-05-01 7:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-30 10:45 Kevin Buettner
2001-05-01 1:48 ` Eli Zaretskii
2001-05-01 7:47 ` Kevin Buettner [this message]
2001-05-03 0:19 ` Eli Zaretskii
2001-05-03 1:24 ` Kevin Buettner
2001-05-03 1:28 ` Eli Zaretskii
2001-05-03 15:57 ` Andrew Cagney
2001-05-03 21:31 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1010501144655.ZM545@ocotillo.lan \
--to=kevinb@cygnus.com \
--cc=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox