[RFA] Make sym_read routines handle separate debug files

Tom Tromey tromey@redhat.com
Tue Dec 8 16:54:00 GMT 2009


>>>>> "Tristan" == Tristan Gingold <gingold@adacore.com> writes:

Tristan> latest version of the patch.  I have inserted a gdb_assert in
Tristan> symbol_file_add_separate and fixed the comment in
Tristan> reread_symbols.

Thanks.

I found one more little problem, nothing major.

Tristan> @@ -947,8 +943,6 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd,
[...]
Tristan>    discard_cleanups (my_cleanups);
 
Tristan> -  if (addrs)
Tristan> -    {
Tristan> -      orig_addrs = copy_section_addr_info (addrs);
Tristan> -      make_cleanup_free_section_addr_info (orig_addrs);
Tristan> -    }

I think this function has a latent bug.  It calls
discard_cleanups(my_cleanups), then makes a new cleanup which isn't
assigned anywhere.  Then later it calls do_cleanups(my_cleanups).

Could you remove the do_cleanups?

This patch is ok with that change.  Thanks again.

Tom



More information about the Gdb-patches mailing list