diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1993-07-27 19:40:57 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1993-07-27 19:40:57 +0000 |
commit | 0eb22669dc339b3d59eba3324a8c77592e0395c3 (patch) | |
tree | f145b3f7025ae5c96e46bf41fd5e859750fe5eb9 /gdb/dbxread.c | |
parent | 62cd4a20676cc2df7aafe16aeca3d66c8d57c0f7 (diff) | |
download | gdb-0eb22669dc339b3d59eba3324a8c77592e0395c3.zip gdb-0eb22669dc339b3d59eba3324a8c77592e0395c3.tar.gz 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/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index cc66a15..012fac2 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -497,6 +497,7 @@ dbx_symfile_read (objfile, section_offsets, mainline) { bfd *sym_bfd; int val; + struct cleanup *back_to; sym_bfd = objfile->obfd; val = bfd_seek (objfile->obfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET); @@ -511,7 +512,7 @@ dbx_symfile_read (objfile, section_offsets, mainline) symbol_table_offset = DBX_SYMTAB_OFFSET (objfile); pending_blocks = 0; - make_cleanup (really_free_pendings, 0); + back_to = make_cleanup (really_free_pendings, 0); init_minimal_symbol_collection (); make_cleanup (discard_minimal_symbols, 0); @@ -533,6 +534,8 @@ dbx_symfile_read (objfile, section_offsets, mainline) printf_filtered ("(no debugging symbols found)..."); wrap_here (""); } + + do_cleanups (back_to); } /* Initialize anything that needs initializing when a completely new @@ -856,7 +859,7 @@ read_dbx_symtab (section_offsets, objfile, text_addr, text_size) int nsl; int past_first_source_file = 0; CORE_ADDR last_o_file_start = 0; - struct cleanup *old_chain; + struct cleanup *back_to; bfd *abfd; /* End of the text segment of the executable file. */ @@ -894,11 +897,9 @@ read_dbx_symtab (section_offsets, objfile, text_addr, text_size) (struct partial_symtab **) alloca (dependencies_allocated * sizeof (struct partial_symtab *)); - old_chain = make_cleanup (free_objfile, objfile); - /* Init bincl list */ init_bincl_list (20, objfile); - make_cleanup (free_bincl_list, objfile); + back_to = make_cleanup (free_bincl_list, objfile); last_source_file = NULL; @@ -984,8 +985,7 @@ read_dbx_symtab (section_offsets, objfile, text_addr, text_size) dependency_list, dependencies_used); } - free_bincl_list (objfile); - discard_cleanups (old_chain); + do_cleanups (back_to); } /* Allocate and partially fill a partial symtab. It will be |