aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-03-17 19:16:02 +0000
committerTom Tromey <tromey@redhat.com>2010-03-17 19:16:02 +0000
commita3b2a86bb7263eafa4f11a3b7cc0fb3adcfe1d39 (patch)
tree37ece58873536760eda71ba09d3c78797967c218 /gdb/dwarf2read.c
parent38963c97b7990d8a4f9cbe8b58ec0519e451e571 (diff)
downloadgdb-a3b2a86bb7263eafa4f11a3b7cc0fb3adcfe1d39.zip
gdb-a3b2a86bb7263eafa4f11a3b7cc0fb3adcfe1d39.tar.gz
gdb-a3b2a86bb7263eafa4f11a3b7cc0fb3adcfe1d39.tar.bz2
* dwarf2read.c (dwarf2_get_section_info): Handle case where no
DWARF data is available.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index cbb7424..3789d09 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1397,6 +1397,16 @@ dwarf2_get_section_info (struct objfile *objfile, const char *section_name,
struct dwarf2_per_objfile *data
= objfile_data (objfile, dwarf2_objfile_data_key);
struct dwarf2_section_info *info;
+
+ /* We may see an objfile without any DWARF, in which case we just
+ return nothing. */
+ if (data == NULL)
+ {
+ *sectp = NULL;
+ *bufp = NULL;
+ *sizep = 0;
+ return;
+ }
if (section_is_p (section_name, EH_FRAME_SECTION))
info = &data->eh_frame;
else if (section_is_p (section_name, FRAME_SECTION))