This is the mail archive of the gdb@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: inferior_pid's magic value of zero.


>>> 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

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