This is the mail archive of the gdb@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: register type as signed or unsigned?


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

 Jan> On Wed, 11 Oct 2006 02:37:57 +0200, ligang@sunnorth.com.cn
 Jan> wrote:
 >> Daniel Jacobowitz <drow@false.org> wrote on 2006-10-10 20:50:02:
 Jan> ...
 >> > No; in fact, it doesn't make much difference.  You should use
 >> whichever > is "more natural" for your target instruction set; it
 >> will affect > "print $reg" and "info reg".
 >> 
 >> That is to say, whether builtin_type_int32 or builtin_type_uint32
 >> is correct for GDB.

 Jan> If the register is used as address, use "uint32".  

Only if addresses are unsigned.  That's the usual case, but MIPS has
the odd convention that addresses are viewed as signed.

    paul


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