Avoid internal errors when stepping outside 'main' on MinGW
When one steps with "next" past the 'main's 'return' statement
in MinGW programs built by mingw.org's tools, PC lands in a
function whose symbol is not in any symtab. GDB then looks
up the nearest symbol, and should find none, because all those
with addresses below PC are not real functions. Having
unresolved symbols, whose address is zero, in minsyms tricked
GDB into using these bogus symbols, which then caused
assertion violation and internal_error. See the discussion at
https://sourceware.org/ml/gdb-patches/2018-12/msg00176.html
for more details.
gdb/ChangeLog
2018-12-28 Eli Zaretskii <eliz@gnu.org>
* coffread.c (coff_symtab_read): Don't record in minsyms symbols
that are unresolved. This avoids triggering an internal error
when stepping outside of 'main' in MinGW programs.