gdb/ChangeLog:
authorJim Blandy <jimb@codesourcery.com>
Tue, 17 Jan 2006 22:30:29 +0000 (22:30 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 17 Jan 2006 22:30:29 +0000 (22:30 +0000)
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.

gdb/ChangeLog
gdb/dwarf2read.c
gdb/findvar.c
gdb/stabsread.c
gdb/symtab.h

index 6c55b9e9ba058e1921b1bbab200e69060f7b13bc..5c7dc28bcc72588e31d622c05383f4e9dca85bc5 100644 (file)
@@ -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.
 
index a2a066a1bbf909430fd8f0a1648e2aa2c39d5f92..943f30477f8c2e16f4b8873b936c76fba53844c8 100644 (file)
@@ -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;
index 7d06085b6b942806d86aeb56b908bc53b1439635..0cda35e75ad982fd8e3983c3c2d8ece5b519339c 100644 (file)
@@ -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;
       }
index e346ad285fde7cefeb022c8d2d9f1afcca50e90c..428cbc2e8bfb0516a43fa00529e9bd66a2cc67a1 100644 (file)
@@ -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);
index 6c17037c4167b2d70265eb614885de1ccade1a30..840478ad5dbe431939929af94cbb4652deac19fc 100644 (file)
@@ -110,7 +110,7 @@ struct general_symbol_info
 
     struct block *block;
 
-    char *bytes;
+    gdb_byte *bytes;
 
     CORE_ADDR address;