aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile-debug.c
diff options
context:
space:
mode:
authorRichard Bunt <richard.bunt@linaro.org>2023-03-31 15:31:40 +0100
committerMaciej W. Rozycki <macro@embecosm.com>2023-03-31 15:31:40 +0100
commit571eb2644c7a52a78250ce9906d9c5127006e164 (patch)
tree707e57fbf03d7930e96e711a86ec3503e124b5dd /gdb/symfile-debug.c
parent85413975d80cdb69efd09211d01fc96e00a84dd0 (diff)
downloadbinutils-571eb2644c7a52a78250ce9906d9c5127006e164.zip
binutils-571eb2644c7a52a78250ce9906d9c5127006e164.tar.gz
binutils-571eb2644c7a52a78250ce9906d9c5127006e164.tar.bz2
GDB: Favor full symbol main name for backtrace stop
In the case where a Fortran program has a program name of "main" and there is also a minimal symbol called main, such as with programs built with GCC version 4.4.7 or below, the backtrace will erroneously stop at the minimal symbol rather than the user specified main, e.g.: (gdb) bt #0 bar () at .../gdb/testsuite/gdb.fortran/backtrace.f90:17 #1 0x0000000000402556 in foo () at .../gdb/testsuite/gdb.fortran/backtrace.f90:21 #2 0x0000000000402575 in main () at .../gdb/testsuite/gdb.fortran/backtrace.f90:31 #3 0x00000000004025aa in main () (gdb) This patch fixes this issue by increasing the precedence of the full symbol when the language of the current frame is Fortran. Newer versions of GCC transform the program name to "MAIN__" in this case, avoiding the problem. Co-Authored-By: Maciej W. Rozycki <macro@embecosm.com>
Diffstat (limited to 'gdb/symfile-debug.c')
0 files changed, 0 insertions, 0 deletions