summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-04-25 18:45:24 +0000
committerPedro Alves <pedro@codesourcery.com>2008-04-25 18:45:24 +0000
commit7692ace29408d3dde880d71eff578a60c8a98287 (patch)
tree152cb826dbceb51c1a5f29f80c1a6c916917839a /gdb/dwarf2read.c
parent7a46ab253a5789674d4b28ed28307384003aaed2 (diff)
downloadgdb-7692ace29408d3dde880d71eff578a60c8a98287.tar.gz
gdb/
* dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp. gdb/testsuite/ * gdb.dwarf2/dw2-strp.S, gdb.dwarf2/dw2-strp.exp: New files.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index dab42904912..40eb412e29d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7706,6 +7706,12 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym,
DW_ADDR (attr));
SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
break;
+ case DW_FORM_strp:
+ /* DW_STRING is already allocated on the obstack, point directly
+ to it. */
+ SYMBOL_VALUE_BYTES (sym) = (gdb_byte *) DW_STRING (attr);
+ SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
+ break;
case DW_FORM_block1:
case DW_FORM_block2:
case DW_FORM_block4: