[RFA] change gdbserver's pids to int

Daniel Jacobowitz drow@false.org
Thu Dec 4 13:16:00 GMT 2008


On Wed, Dec 03, 2008 at 05:24:16PM -0800, Doug Evans wrote:
> gdb uses an int for a pid (see ptid.pid in defs.h),
> and, for example, gdbserver's target_ops.create_inferior returns an int.
> For consistency I made pid an int elsewhere in gdbserver,
> except for "id" in struct inferior_list - it's used for more than just pids
> although I suspect int could be used here too, left for another day.
> 
> Plus this cleans things up by removing local decls of signal_pid.
> 
> Ok to check in?

Are you sure that every place you touched gets a system PID, not a
thread ID?  They used to be ints, but were changed to unsigned long
because NPTL's TIDs do not fit in an int.

Also, do Windows PIDs fit in an int?  Win32 pids must, but I expect
we'll get a Win64 port at some point.

I'd like to know the advantage before moving all the deck chairs round
again.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list