From: "Mark Kettenis" <mark.kettenis@xs4all.nl>
To: "Jan Kratochvil" <jan.kratochvil@redhat.com>
Cc: ligang@sunnorth.com.cn, gdb@sourceware.org
Subject: Re: register type as signed or unsigned?
Date: Wed, 11 Oct 2006 07:00:00 -0000 [thread overview]
Message-ID: <14119.82.92.89.47.1160549992.squirrel@webmail.xs4all.nl> (raw)
In-Reply-To: <20061011004812.GA4987@host0.dyn.jankratochvil.net>
> On Wed, 11 Oct 2006 02:37:57 +0200, ligang@sunnorth.com.cn wrote:
> > Daniel Jacobowitz <drow@false.org> 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
prev parent reply other threads:[~2006-10-11 7:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 8:37 ligang
2006-10-10 12:50 ` Daniel Jacobowitz
2006-10-11 0:35 ` ligang
2006-10-11 0:48 ` Jan Kratochvil
2006-10-11 1:11 ` Paul Koning
2006-10-11 2:06 ` Daniel Jacobowitz
2006-10-11 7:00 ` Mark Kettenis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14119.82.92.89.47.1160549992.squirrel@webmail.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=ligang@sunnorth.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox