aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2006-01-17 22:30:29 +0000
committerJim Blandy <jimb@codesourcery.com>2006-01-17 22:30:29 +0000
commit4e38b3864ce96e88108671bd271c71ee461e9404 (patch)
treee67a318d3dcc422bb30eeffc3137a04a32922a1b /gdb/dwarf2read.c
parent1193688db202f828c9e3331ed42e2362004cacb8 (diff)
downloadgdb-4e38b3864ce96e88108671bd271c71ee461e9404.zip
gdb-4e38b3864ce96e88108671bd271c71ee461e9404.tar.gz
gdb-4e38b3864ce96e88108671bd271c71ee461e9404.tar.bz2
gdb/ChangeLog:
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 2 insertions, 2 deletions
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;