aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-01-13 11:52:43 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-01-13 11:52:43 +0000
commit9918cab95eb6340daa271757ef1ee5557cd3ea4e (patch)
tree1d1874dc5ca7a0d6e56120395fd52a790dae9c55
parent74bcbdf3cea56564d1f9f597c8458b86ed71f621 (diff)
downloadbinutils-9918cab95eb6340daa271757ef1ee5557cd3ea4e.zip
binutils-9918cab95eb6340daa271757ef1ee5557cd3ea4e.tar.gz
binutils-9918cab95eb6340daa271757ef1ee5557cd3ea4e.tar.bz2
* mdebugread.c (parse_symbol): Save the symbol private data
using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE. (psymtab_to_symtab_1): Likewise. (parse_procedure): Declare variable "e" only in the scope where it is used. Extract the symbol private data using SYMBOL_VALUE_BYTES.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/mdebugread.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4fcbeda..0254424 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-13 Joel Brobecker <brobecker@adacore.com>
+
+ * mdebugread.c (parse_symbol): Save the symbol private data
+ using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
+ (psymtab_to_symtab_1): Likewise.
+ (parse_procedure): Declare variable "e" only in the scope
+ where it is used. Extract the symbol private data using
+ SYMBOL_VALUE_BYTES.
+
2009-01-13 Jim Blandy <jimb@codesourcery.com>
Abstract out common code for copying value locations.
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 693f01b..7cbcc59 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1161,7 +1161,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
obstack_alloc (&current_objfile->objfile_obstack,
sizeof (struct mdebug_extra_func_info)));
memset (e, 0, sizeof (struct mdebug_extra_func_info));
- SYMBOL_VALUE (s) = (long) e;
+ SYMBOL_VALUE_BYTES (s) = (gdb_byte *) e;
e->numargs = top_stack->numargs;
e->pdr.framereg = -1;
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
@@ -1817,7 +1817,6 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
struct gdbarch *gdbarch = get_objfile_arch (pst->objfile);
struct symbol *s, *i;
struct block *b;
- struct mdebug_extra_func_info *e;
char *sh_name;
/* Simple rule to find files linked "-x" */
@@ -1917,9 +1916,10 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
if (i)
{
- e = (struct mdebug_extra_func_info *) SYMBOL_VALUE (i);
+ struct mdebug_extra_func_info *e;
+
+ e = (struct mdebug_extra_func_info *) SYMBOL_VALUE_BYTES (i);
e->pdr = *pr;
- e->pdr.isym = (long) s;
/* GDB expects the absolute function start address for the
procedure descriptor in e->pdr.adr.
@@ -3938,7 +3938,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
SYMBOL_CLASS (s) = LOC_CONST;
SYMBOL_TYPE (s) = mdebug_type_void;
- SYMBOL_VALUE (s) = (long) e;
+ SYMBOL_VALUE_BYTES (s) = (gdb_byte *) e;
e->pdr.framereg = -1;
add_symbol_to_list (s, &local_symbols);
}