From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14617 invoked by alias); 11 Oct 2006 07:00:00 -0000 Received: (qmail 14609 invoked by uid 22791); 11 Oct 2006 07:00:00 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-vbr17.xs4all.nl (HELO smtp-vbr17.xs4all.nl) (194.109.24.37) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Oct 2006 06:59:57 +0000 Received: from webmail.xs4all.nl (dovemail3.xs4all.nl [194.109.26.5]) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id k9B6xoYA032230; Wed, 11 Oct 2006 08:59:50 +0200 (CEST) (envelope-from mark.kettenis@xs4all.nl) Received: from 82.92.89.47 (SquirrelMail authenticated user sibelius) by webmail.xs4all.nl with HTTP; Wed, 11 Oct 2006 08:59:52 +0200 (CEST) Message-ID: <14119.82.92.89.47.1160549992.squirrel@webmail.xs4all.nl> In-Reply-To: <20061011004812.GA4987@host0.dyn.jankratochvil.net> References: <20061010125001.GA17340@nevyn.them.org> <20061011004812.GA4987@host0.dyn.jankratochvil.net> Date: Wed, 11 Oct 2006 07:00:00 -0000 Subject: Re: register type as signed or unsigned? From: "Mark Kettenis" To: "Jan Kratochvil" Cc: ligang@sunnorth.com.cn, gdb@sourceware.org User-Agent: SquirrelMail/1.4.8 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00059.txt.bz2 > On Wed, 11 Oct 2006 02:37:57 +0200, ligang@sunnorth.com.cn wrote: > > Daniel Jacobowitz wrote on 2006-10-10 20:50:02: > ... > > > 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. > > If the register is used as address, use "uint32". If the register is typically used as an address, builtin_type_void_data_ptr is probably more appropriate. For the instruction pointer you should use builtin_type_void_func_ptr though. > If it is used for general computation incl. offsets in memory, use > "int32". > "uint32" should be IMO a safer bet but sometimes you may need > `(int)$regname'. int32 is IMHO more useful since actually large unsigned numbers are rare. But if your CPU only supports unsigned integer math, uint32 is the right choice. Mark