Fix parsing DW_AT_const_value using DW_FORM_string.
	* dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.

gdb/testsuite/
	* gdb.dwarf2/dw2-strp.exp (p a_string2, ptype a_string2): New.
	* gdb.dwarf2/dw2-strp.S (a_string2): New.
This commit is contained in:
Jan Kratochvil
2009-05-21 07:15:47 +00:00
parent 32e9651ca5
commit 4ac3663827
5 changed files with 39 additions and 5 deletions

View File

@@ -7957,6 +7957,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym,
DW_ADDR (attr));
SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
break;
case DW_FORM_string:
case DW_FORM_strp:
/* DW_STRING is already allocated on the obstack, point directly
to it. */