aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffexec.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1993-07-27 19:40:57 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1993-07-27 19:40:57 +0000
commit0eb22669dc339b3d59eba3324a8c77592e0395c3 (patch)
treef145b3f7025ae5c96e46bf41fd5e859750fe5eb9 /gdb/xcoffexec.c
parent62cd4a20676cc2df7aafe16aeca3d66c8d57c0f7 (diff)
downloadfsf-binutils-gdb-0eb22669dc339b3d59eba3324a8c77592e0395c3.zip
fsf-binutils-gdb-0eb22669dc339b3d59eba3324a8c77592e0395c3.tar.gz
fsf-binutils-gdb-0eb22669dc339b3d59eba3324a8c77592e0395c3.tar.bz2
* breakpoint.c (breakpoint_1): Walk the breakpoint chain to decide if
we have breakpoints or watchpoints as we might have to ignore internal breakpoints. Fix gdb core dumps after `file newfile' commands. * symtab.h, symfile.c (clear_symtab_users): New routine which unconditionally clears symtab users. clear_symtab_users_once commented out as it was a noop anyway. * objfiles.c (free_objfile): Don't call clear_symtab_users_once. * objfiles.c (free_all_objfiles), symfile.c (new_symfile_objfile), xcoffexec.c (exec_close): Call clear_symtab_users if necessary. * symfile.c (syms_from_objfile): Install cleanups for errors during symbol reading. * coffread.c, dbxread.c, mipsread.c, xcoffread.c (*_symfile_read): Lint cleanup code, call do_cleanups explicitly. * symfile.c (symbol_file_add): Call new_symfile_objfile and reinit_frame_cache _after_ the new symbols are read in.
Diffstat (limited to 'gdb/xcoffexec.c')
-rw-r--r--gdb/xcoffexec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c
index 0e997b1..65a57b5 100644
--- a/gdb/xcoffexec.c
+++ b/gdb/xcoffexec.c
@@ -81,6 +81,7 @@ exec_close(quitting)
{
register struct vmap *vp, *nxt;
struct objfile *obj;
+ int need_symtab_cleanup = 0;
for (nxt = vmap; vp = nxt; )
{
@@ -90,7 +91,10 @@ exec_close(quitting)
free_objfile() will do proper cleanup of objfile *and* bfd. */
if (vp->objfile)
- free_objfile (vp->objfile);
+ {
+ free_objfile (vp->objfile);
+ need_symtab_cleanup = 1;
+ }
else
bfd_close(vp->bfd);
@@ -111,6 +115,9 @@ exec_close(quitting)
exec_ops.to_sections = NULL;
exec_ops.to_sections_end = NULL;
}
+
+ if (need_symtab_cleanup)
+ clear_symtab_users ();
}
/*