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

Re: [RFA] gdbserver warnings


On Wed, Apr 24, 2002 at 02:03:49PM +0200, Michal Ludvig wrote:
> Hi,
> Now only two simple issues things in gdbserver to compile cleanly. First 
> patch prevents:
> linux-low.c: In function `regsets_store_inferior_registers':
> linux-low.c:424: warning: cast from pointer to integer of different size
> on x86-64 where sizeof(void*) != sizeof(int). Why did you cast the last 
> argument from pointer to integer? Manpage says it should be a void*... 
> But I didn't test it on other archs...

Interesting.  I got that from i386-linux-nat.c, IIRC:
  if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)

Might want to fix that one too.

> The second one prevents:
> regcache.h:26: warning: `struct inferior_info' declared inside parameter 
> list
> 
> 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
> 
>         * gdbserver/linux-low.c (regsets_fetch_inferior_registers),
>         (regsets_store_inferior_registers): Removed cast to int from
>         ptrace() calls.

This bit is OK.

>         * gdbserver/regcache.h: Include server.h.

Sorry, I thought this warning had been introduced in my local copy, so
the fix was tied up with all my other patches... Please add
"struct inferior_info;" instead of "#include "server.h"".  Approved
with that change.


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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