From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6789 invoked by alias); 11 Oct 2006 00:48:21 -0000 Received: (qmail 6781 invoked by uid 22791); 11 Oct 2006 00:48:21 -0000 X-Spam-Check-By: sourceware.org Received: from 195.22.55.53.adsl.nextra.cz (HELO host0.dyn.jankratochvil.net) (195.22.55.53) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Oct 2006 00:48:18 +0000 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.13.8/8.13.8) with ESMTP id k9B0mEKp005015; Wed, 11 Oct 2006 02:48:14 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.13.8/8.13.8/Submit) id k9B0mCDK005014; Wed, 11 Oct 2006 02:48:12 +0200 Date: Wed, 11 Oct 2006 00:48:00 -0000 From: Jan Kratochvil To: ligang@sunnorth.com.cn Cc: gdb@sourceware.org Subject: Re: register type as signed or unsigned? Message-ID: <20061011004812.GA4987@host0.dyn.jankratochvil.net> References: <20061010125001.GA17340@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-IsSubscribed: yes 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/msg00055.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 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'. > Would you please give me some more hints? You may check the recent thread being affected by such register typing: http://sourceware.org/ml/gdb-patches/2006-09/msg00191.html Failed now to simulate it on 32-bit only gdbhost/inferior. Regards, Jan