From dae58e04442670270fe116ff1f2e38a2b184b4a1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Jan 2023 09:27:54 -0700 Subject: Remove most calls to fixup_symbol_section Nearly every call to fixup_symbol_section in gdb is incorrect, and if any such call has an effect, it's purely by happenstance. fixup_section has a long comment explaining that the call should only be made before runtime section offsets are applied. And, the loop in this code (the fallback loop -- the minsym lookup code is "ok") is careful to remove these offsets before comparing addresses. However, aside from a single call in dwarf2/read.c, every call in gdb is actually done after section offsets have been applied. So, these calls are incorrect. Now, these calls could be made when the symbol is created. I considered this approach, but I reasoned that the code has been this way for many years, seemingly without ill effect. So, instead I chose to simply remove the offending calls. --- gdb/infcmd.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index fd88b8c..77206fc 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1106,7 +1106,6 @@ jump_command (const char *arg, int from_tty) { struct obj_section *section; - fixup_symbol_section (sfn, 0); section = sfn->obj_section (sfn->objfile ()); if (section_is_overlay (section) && !section_is_mapped (section)) -- cgit v1.1