aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-10-13 09:36:47 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-10-13 09:36:47 +0000
commite103e98648ab7db6fbfe62faf3533ac4ffda743b (patch)
tree2a97d0504e48ed3c6bcfa9eb79f6cc8e0fee97bc /gdb/dwarf2read.c
parentba5cdace0d1f5ae5bbaffbcce98de8d0cee133fc (diff)
downloadgdb-e103e98648ab7db6fbfe62faf3533ac4ffda743b.zip
gdb-e103e98648ab7db6fbfe62faf3533ac4ffda743b.tar.gz
gdb-e103e98648ab7db6fbfe62faf3533ac4ffda743b.tar.bz2
gdb/
* dwarf2read.c (dwarf2_fetch_die_location_block): Initialize .data even if .size is 0.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 5fa6c5b..99f67d9 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -14217,8 +14217,10 @@ dwarf2_fetch_die_location_block (unsigned int offset,
attr = dwarf2_attr (die, DW_AT_location, cu);
if (!attr)
{
- /* DWARF: "If there is no such attribute, then there is no effect.". */
+ /* DWARF: "If there is no such attribute, then there is no effect.".
+ DATA is ignored if SIZE is 0. */
+ retval.data = NULL;
retval.size = 0;
}
else if (attr_form_is_section_offset (attr))