Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb@sources.redhat.com
Subject: The problem with stabs and sign extension
Date: Wed, 08 Aug 2001 14:11:00 -0000	[thread overview]
Message-ID: <20010808141207.A31287@nevyn.them.org> (raw)

The problem seems, to my inexperienced eye, to be in stabsread.c:

#define INTERNALIZE_SYMBOL(intern, extern, abfd)                        \
  {                                                                     \
    (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type);             \
    (intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx);            \
    (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc);            \
    (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value);          \
  }

n_value is a CORE_ADDR.  bfd_h_get_32 returns a bfd_vma, without doing sign
extension.  For MIPS, we want sign extension to have happened here.  Right? 
It does if we're reading mdebug in (because ECOFF_SIGNED_32 is defined in
BFD).

On the other hand, I'm sure other targets don't want sign extension here. 
How should we handle this?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


             reply	other threads:[~2001-08-08 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-08 14:11 Daniel Jacobowitz [this message]
2001-08-08 16:14 ` H . J . Lu
2001-08-08 16:54   ` H . J . Lu
2001-08-08 17:03     ` H . J . Lu
2001-08-08 17:15       ` [rfa] " Daniel Jacobowitz
2001-08-08 21:06         ` H . J . Lu
2001-08-10 15:31         ` H . J . Lu
2001-08-14 21:58         ` Elena Zannoni
2001-08-14 22:04           ` H . J . Lu
     [not found]             ` <15226.51428.874589.613358@krustylu.cygnus.com>
2001-08-15 12:04               ` H . J . Lu
2001-08-16 15:13                 ` Daniel Jacobowitz

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=20010808141207.A31287@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    /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