aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-04-25 18:45:24 +0000
committerPedro Alves <palves@redhat.com>2008-04-25 18:45:24 +0000
commit93b5768bfdc8cb884d54258a3935144214608cac (patch)
treed05766f2ddf16a5dada1dce15c7344b20ca596aa /gdb/dwarf2read.c
parentfc2db3b82bf0731973ceb21b63921644ae537412 (diff)
downloadgdb-93b5768bfdc8cb884d54258a3935144214608cac.zip
gdb-93b5768bfdc8cb884d54258a3935144214608cac.tar.gz
gdb-93b5768bfdc8cb884d54258a3935144214608cac.tar.bz2
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 dab4290..40eb412 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: