This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] change gdbserver's pids to int


On Thu, Dec 04, 2008 at 03:02:05PM -0800, Doug Evans wrote:
> > 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.
> 
> Ya, I specifically stuck to pids.

A lot of these places used to be thread IDs.  At some point we
stopped reporting those to GDB, to avoid the same sort of problem.

> > Also, do Windows PIDs fit in an int?  Win32 pids must, but I expect
> > we'll get a Win64 port at some point.
> 
> Good question.  I was in part going for consistency with what gdb uses.
> Maybe it would be useful to have gdb_pid_t, gdb_tid_t types that both
> gdb and gdbserver use.

I don't personally think consistency between gdb and gdbserver is all
that big of a goal.  There's lots of similar code between gdb and
gdbserver, but even if we fixed up common interfaces I think we'd have
to add a lot of gunk to gdbserver to be able to entirely share
anything; we already have some such gunk for signals.c.

Switching them to some typedef to int sounds OK to me.  I admit I
don't see the point, but I wouldn't reject the patch.  Dumping them
all back to int just makes them less opaque than they are now though.

-- 
Daniel Jacobowitz
CodeSourcery


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