This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: inferior_pid's magic value of zero.
- To: kevinb at cygnus dot com (Kevin Buettner)
- Subject: Re: inferior_pid's magic value of zero.
- From: Todd Whitesel <toddpw at windriver dot com>
- Date: Tue, 27 Mar 2001 14:58:09 -0800 (PST)
- Cc: fnasser at redhat dot com (Fernando Nasser), toddpw at windriver dot com (Todd Whitesel), gdb at sourceware dot cygnus dot com (GDB Developers)
>>> Would anyone object to patches that used a macro (say, NO_INFERIOR) instead
>>> of the magic 0 that is currently used ?
>> What about a multi-arch NO_INFERIOR that can be defined as a function in
>> you *-tdep code?
>> The default would be (iferior_pid == 0)
>
> FYI, my yet to be applied ptid patches have a null_ptid object.
If this means we switch to testing a pointer versus NULL, then that sounds
best. PID's really should be opaque objects, as most of GDB just needs to
pass them around and test them for validity -- only the tdep code should
be allowed to create/destroy/interpret one.
--
Todd Whitesel
toddpw @ windriver.com