aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-08-16 11:43:33 -0600
committerTom Tromey <tromey@adacore.com>2024-08-20 08:31:35 -0600
commitbe14b683af735071f5b35b643620973e0588ad98 (patch)
tree158accb30701e62cd5532464cd95044a679e2c01
parenta55790e99235b39582a1c3e85199f8139612f24a (diff)
downloadgdb-be14b683af735071f5b35b643620973e0588ad98.zip
gdb-be14b683af735071f5b35b643620973e0588ad98.tar.gz
gdb-be14b683af735071f5b35b643620973e0588ad98.tar.bz2
Fix Windows regression
commit cb9f919f ("gdb: add program_space parameter to lookup_minimal_symbol_text") caused a crash on Windows. In this function, section can be nullptr, but it is unconditionally dereferenced by the change introduced by the patch. I tested this using the AdaCore internal test suite. v2: always use current_program_space, reverting to be behavior before cb9f919f. Approved-By: Simon Marchi <simon.marchi@efficios.com>
-rw-r--r--gdb/symtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 9b3562e..ce5e252 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3174,7 +3174,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
if (msymbol.minsym->type () == mst_solib_trampoline)
{
bound_minimal_symbol mfunsym
- = lookup_minimal_symbol_text (section->objfile->pspace (),
+ = lookup_minimal_symbol_text (current_program_space,
msymbol.minsym->linkage_name (),
nullptr);