diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-08-15 05:02:28 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-08-15 05:02:28 +0000 |
commit | 40b3352ba7d2717b5cf0ec7b1756c189c2fd6076 (patch) | |
tree | 63a1804849b45416f214078517297c24fe6cd1a2 /gdb/dbxread.c | |
parent | 75ba07bf4c3227f36217020fed559aef3dbcc2a4 (diff) | |
download | gdb-40b3352ba7d2717b5cf0ec7b1756c189c2fd6076.zip gdb-40b3352ba7d2717b5cf0ec7b1756c189c2fd6076.tar.gz gdb-40b3352ba7d2717b5cf0ec7b1756c189c2fd6076.tar.bz2 |
2001-08-14 Daniel Jacobowitz <drow@mvista.com>
H.J. Lu (hjl@gnu.org)
* partial-stab.h: valu should be a CORE_ADDR.
2001-08-14 H.J. Lu (hjl@gnu.org)
* dbxread.c (SWAP_SYMBOL): Removed.
(INTERNALIZE_SYMBOL): Check sign extended vma.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 5d7ed74..f1382e7 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -946,22 +946,15 @@ fill_symbuf (bfd *sym_bfd) symbuf_read += nbytes; } -#define SWAP_SYMBOL(symp, abfd) \ - { \ - (symp)->n_strx = bfd_h_get_32(abfd, \ - (unsigned char *)&(symp)->n_strx); \ - (symp)->n_desc = bfd_h_get_16 (abfd, \ - (unsigned char *)&(symp)->n_desc); \ - (symp)->n_value = bfd_h_get_32 (abfd, \ - (unsigned char *)&(symp)->n_value); \ - } - #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); \ + if (bfd_get_sign_extend_vma (abfd)) \ + (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \ + else \ + (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \ } /* Invariant: The symbol pointed to by symbuf_idx is the first one |