]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix use of "main" in gdb_index with C++
authorTom Tromey <tom@tromey.com>
Sun, 19 Oct 2025 19:06:40 +0000 (13:06 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 6 Nov 2025 23:39:47 +0000 (16:39 -0700)
commit7d8b016af12cf5d7964b0c9c23e5dc735ea68682
tree0f2019ccee80c01e23c0019e98c9487cc22ca637
parent84402f09dd22dad78b8ab7b2aa162a2374576747
Fix use of "main" in gdb_index with C++

In commit f283e80f (Fix use of "main" marker in gdb index), I changed
the DWARF reader to understand that the C language's "main" might
appear in the .gdb_index, and should not be ignored.

This week I realized that this same problem can affect C++ as well.
I'm not sure why I didn't consider this at the time.

This patch fixes the bug.  It's somewhat of a hack, I guess, but also
at least understandable.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33441
gdb/dwarf2/cooked-index.c
gdb/testsuite/gdb.base/fission-macro.exp