[RFC-v2] Remove i386 low level debug register function from nm- header file.

Eli Zaretskii eliz@gnu.org
Wed May 13 18:09:00 GMT 2009


> Date: Wed, 13 May 2009 17:33:38 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> Cc: muller@ics.u-strasbg.fr ('Pierre Muller'), gdb-patches@sourceware.org,
>         pedro@codesourcery.com ('Pedro Alves'), eliz@gnu.org ('Eli Zaretskii')
> 
> Hmm ... it seems there's a disconnect between using "unsigned"
> and "unsigned long" as type for the DR6/7 contents.  This affects
> not only amd64-linux-nat.c, but apparently some other files as well:
> 
> i386bsd-nat.c:i386bsd_dr_set_control (unsigned long control)
> i386-linux-nat.c:i386_linux_dr_set_control (unsigned long control)
> amd64-linux-nat.c:amd64_linux_dr_set_control (unsigned long control)
> 
> ... but ...
> 
> win32-nat.c:cygwin_set_dr7 (unsigned val)
> go32-nat.c:go32_set_dr7 (unsigned val)

I'm okay with changing the declarations in go32-nat.c to unsigned
long, if that is what's decided.

> When you build on a 32-bit system, this probably won't result in
> an error, even though it's strictly speaking still invalid C ...

What is invalid C?

> I think these need to be fixed so they all agree.

Yes, it would be good.

> As far as I know, those values are in fact 32-bit, so I guess
> "unsigned" (or preferably, "unsigned int") should be OK to use.

I see no need to add "int" to "unsigned", FWIW.



More information about the Gdb-patches mailing list