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] compilation error in remote.c on sparc-solaris


On Fri, Mar 07, 2008 at 10:55:01AM -0800, Michael Snyder wrote:
> > Variable pid is defined as follow:
> > 
> >   pid_t pid;
> > 
> > I think it's good enough to change its type to "int". I've never seen
> > a PID that's larger than 7 digits, so an int should always be big enough.
> > In any case, that's what the pid_t structure uses for the pid.
> 
> Why not just cast it?

Because it's not a pid_t, it's an int.  pid_t is the type of a process
on the host system and we're not talking to any host system processes
here.

> > 2008-03-07  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         * remote.c (extended_remote_attach_1): Make local variable pid an int
> >         instead of a pid_t.

This is OK - thanks, Joel, I'd been meaning to fix this since we
noticed it :-(  I can't find the number, but I'm pretty sure there's
a PR in gnats too.

-- 
Daniel Jacobowitz
CodeSourcery


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