From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: eliz@is.elta.co.il Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Use `unsigned long' for Linux/x86 debug registers Date: Sun, 01 Apr 2001 08:04:00 -0000 Message-id: <200104011410.f31EAZ110855@delius.kettenis.local> References: X-SW-Source: 2001-04/msg00006.html Date: Sun, 1 Apr 2001 13:04:44 +0200 (IST) From: Eli Zaretskii On Sun, 1 Apr 2001, Mark Kettenis wrote: > It just occurred to me that Linux/x86 should really be using `unsigned > long' instead of `long' as the type for debug register values. They should indeed be unsigned, but why `unsigned long' instead of `unsigned int'? i386-nat.c uses the latter, and ia32 debug registers are 32-bit wide. Well an `unsigned int' *might* be 16-bits, wheras ISO C guarantees that `unsigned long' is at least 32-bits. All that matters, is that the variables that we use to store ia32 debug registers are at least 32-bit wide. I was planning on changing i386-nat.c to use `unsigned long' in the relevant places. This all doesn't really matter for native stuff, but if we ever move this code to i386-tdep.c it might matter. Better fix it now than be sorry later :-). Mark