Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Martin M. Hunt" <hunt@redhat.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: Mark Kettenis <kettenis@gnu.org>, gdb@sources.redhat.com
Subject: Re: dwarf2-frame.c question for maintainers
Date: Thu, 15 Jul 2004 18:54:00 -0000	[thread overview]
Message-ID: <1089917359.3028.26.camel@dragon> (raw)
In-Reply-To: <40F6CE82.5040106@gnu.org>

On Thu, 2004-07-15 at 11:35, Andrew Cagney wrote:
> >>> Consider o32.  Both the ABI and ISA are 32-bits, but GDB's CORE_ADDR may 
> >>> be 64-bits.  Even if it doesn't appear to make a difference, the MIPS 
> >>> needs to always sign extend addresses/registers - that's the dogma :-)
> > 
> > 
> > Right.  And so back to the original question.  What is the best way to
> > have read_reg detect if it should sign-extend?  We agreed that passing a
> > pointer to the CU was out, as was using a global.  Do I need to add
> > something to gdbarch?  
> 
> Hmm, the architecture vector already has POINTER_TO_ADDRESS and 
> register_type that can be used to extract [signed] pointers and 
> registers.  Can either of those be used here?

You mean something like

if (current_gdbarch->pointer_to_address == unsigned_pointer_to_address)
  return extract_unsigned_integer (buf, register_size (current_gdbarch, regnum));
else
  return extract_signed_integer (buf, register_size (current_gdbarch, regnum));

-- 
Martin M. Hunt <hunt@redhat.com>
Red Hat Inc.


  reply	other threads:[~2004-07-15 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-13 22:01 Martin M. Hunt
2004-07-14 17:29 ` Andrew Cagney
2004-07-14 17:56   ` Martin M. Hunt
2004-07-14 19:38     ` Andrew Cagney
2004-07-15 17:32       ` Mark Kettenis
2004-07-15 17:40       ` Martin M. Hunt
2004-07-15 18:15         ` Andrew Cagney
2004-07-15 18:35           ` Martin M. Hunt
2004-07-15 18:45             ` Andrew Cagney
2004-07-15 18:54               ` Martin M. Hunt [this message]
2004-07-16 21:16                 ` Jim Blandy

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=1089917359.3028.26.camel@dragon \
    --to=hunt@redhat.com \
    --cc=cagney@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=kettenis@gnu.org \
    /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