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: [PATCH, v2] Share ptrace options discovery/linux native code between GDB and gdbserver


On 08/20/2013 05:48 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
>>> +void
>>> +linux_enable_event_reporting (ptid_t ptid)
> 
> Pedro> Could you preserve gdbserver's prototype here, please?  That
> Pedro> is, take a single integer pid rather than a ptid.
> 
> Just a nit -- but why int and not pid_t?

Hysterical raisins, I guess.

Eheh, I purposedly said integer to avoid implying "int".  :-)
The current gdbserver prototype does use int, but I don't
care whether it's int or pid_t as long as it's a single
integer.
On the core side, ptid_t holds an int for pid, so code that
faces the core would tend to use int, and we extract pids from ptids
in the target code all the time, so int tends to Just Be Used.
In this particular case, given this is native code, there's
nothing stopping it from using pid_t.

> (Not a typo for ptid_t, that one I understand :)

-- 
Pedro Alves


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