diff options
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 4 | ||||
-rw-r--r-- | gdb/findvar.c | 4 | ||||
-rw-r--r-- | gdb/stabsread.c | 4 | ||||
-rw-r--r-- | gdb/symtab.h | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c55b9e..5c7dc28 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2006-01-17 Jim Blandy <jimb@redhat.com> + * symtab.h (struct general_symbol_info): Use gdb_byte for + value.bytes. + * stabsread.c (define_symbol): Use gdb_byte for the buffer holding + a floating-point constant's value. + * dwarf2read.c (dwarf2_const_value): Remove casts of value buffer + to char *. + * findvar.c (read_var_value): Eliminate needless temporary. + * dwarf2-frame.c (dwarf2_read_section): Update forward declaration to match prior change to dwarf2_read_section's type. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a2a066a..943f304 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7053,7 +7053,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym, cu_header->addr_size, TYPE_LENGTH (SYMBOL_TYPE (sym))); - SYMBOL_VALUE_BYTES (sym) = (char *) + SYMBOL_VALUE_BYTES (sym) = obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); /* NOTE: cagney/2003-05-09: In-lined store_address call with it's body - store_unsigned_integer. */ @@ -7071,7 +7071,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym, blk->size, TYPE_LENGTH (SYMBOL_TYPE (sym))); - SYMBOL_VALUE_BYTES (sym) = (char *) + SYMBOL_VALUE_BYTES (sym) = obstack_alloc (&objfile->objfile_obstack, blk->size); memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); SYMBOL_CLASS (sym) = LOC_CONST_BYTES; diff --git a/gdb/findvar.c b/gdb/findvar.c index 7d06085..0cda35e 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -433,9 +433,7 @@ read_var_value (struct symbol *var, struct frame_info *frame) case LOC_CONST_BYTES: { - char *bytes_addr; - bytes_addr = SYMBOL_VALUE_BYTES (var); - memcpy (value_contents_raw (v), bytes_addr, len); + memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len); VALUE_LVAL (v) = not_lval; return v; } diff --git a/gdb/stabsread.c b/gdb/stabsread.c index e346ad2..428cbc2 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -722,7 +722,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, case 'r': { double d = atof (p); - char *dbl_valu; + gdb_byte *dbl_valu; /* FIXME-if-picky-about-floating-accuracy: Should be using target arithmetic to get the value. real.c in GCC @@ -737,7 +737,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = lookup_fundamental_type (objfile, FT_DBL_PREC_FLOAT); - dbl_valu = (char *) + dbl_valu = obstack_alloc (&objfile->objfile_obstack, TYPE_LENGTH (SYMBOL_TYPE (sym))); store_typed_floating (dbl_valu, SYMBOL_TYPE (sym), d); diff --git a/gdb/symtab.h b/gdb/symtab.h index 6c17037..840478a 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -110,7 +110,7 @@ struct general_symbol_info struct block *block; - char *bytes; + gdb_byte *bytes; CORE_ADDR address; |