From 9f50eba524a6cba592ba4b746bf537d5c1bf7389 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Sun, 21 Jun 2020 16:49:34 +0200 Subject: [PATCH] Set section to -1 if we don't have it in our objfile --- gdb/pdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/pdb.c b/gdb/pdb.c index de59dae..1b665ec 100644 --- a/gdb/pdb.c +++ b/gdb/pdb.c @@ -241,11 +241,12 @@ read_pdb (struct objfile *objfile, minimal_symbol_reader &reader) { asection *sect = section_by_name(sctn_header->name, objfile); + auto section = sect ? sect->index : -1; auto section_address = sect ? bfd_section_vma(sect) : 0; auto address = section_address + gdata->offset; if (address == 0) continue; //we don't want to record unresolved symbols or something? auto type = mst_unknown; //FIXME - reader.record_with_info(gdata->name.name, address, type, sect->index); + reader.record_with_info(gdata->name.name, address, type, section); } } }