This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC-v2] Remove i386 low level debug register function from nm- header file.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: muller at ics dot u-strasbg dot fr, muller at ics dot u-strasbg dot fr, gdb-patches at sourceware dot org, pedro at codesourcery dot com
- Date: Wed, 13 May 2009 21:09:41 +0300
- Subject: Re: [RFC-v2] Remove i386 low level debug register function from nm- header file.
- References: <200905131533.n4DFXcvm019686@d12av02.megacenter.de.ibm.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.