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.
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. */
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;
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;
}
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
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);
struct block *block;
- char *bytes;
+ gdb_byte *bytes;
CORE_ADDR address;