Use scoped_free_pendings in coff_symtab_read
authorTom Tromey <tom@tromey.com>
Fri, 29 Jun 2018 21:10:04 +0000 (15:10 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 17 Jul 2018 15:37:57 +0000 (09:37 -0600)
commit79b38778d788e01e66e82f16bf3d4957439c77d5
tree13446882ac1d04815bb7646d671db9dd00867322
parent9b81ef22783b06d2098092e51375dde909b752c4
Use scoped_free_pendings in coff_symtab_read

PR gdb/18624 concerns an assertion failure that occurs when setting a
breakpoint in a Go program on Windows.

What happens here is that coff_symtab_read uses buildsym but does not
instantiate scoped_free_pendings.  So, the struct pending objects are
never released.  Later, dwarf2read.c calls buildsym_init, which
asserts.

This patch fixes the problem by instantiating scoped_free_pendings in
coff_symtab_read.

Tested using the test executable from the PR.  I don't know how to
test this more fully.

2018-07-17  Tom Tromey  <tom@tromey.com>

PR gdb/18624:
* coffread.c (coff_symtab_read): Use scoped_free_pendings.
gdb/ChangeLog
gdb/coffread.c