This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[delayed-symfile] [commit] Fix a crash on missing `.debug_aranges'section.


commit 170e8fd8d1b89fe0ceb001b854701d04c5a18513

Regressed on gdb.base/type-opaque.exp.

	* dwarf2read.c (dwarf2_create_quick_addrmap): Do nothing if
	DWARF_ARANGES_SECTION is NULL.
---
 gdb/dwarf2read.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 29ff4d5..e8bde0c 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1296,6 +1296,9 @@ dwarf2_create_quick_addrmap (struct objfile *objfile)
   struct obstack temp_obstack;
   struct addrmap *mutable_map;
 
+  if (!dwarf_aranges_section)
+    return;
+
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
   aranges_buffer = dwarf2_read_section_1 (objfile, NULL, dwarf_aranges_section);
-- 
1.6.0.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]