This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Replace reread_symbols by load+free calls
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Mon, 17 Aug 2009 09:28:48 -0600
- Subject: Re: [patch] Replace reread_symbols by load+free calls
- References: <8ac60eac0906101839t4d3978fyc1c6d3b3e2eccb6e@mail.gmail.com> <20090625192120.GA29930@host0.dyn.jankratochvil.net> <m3tz0agh3c.fsf@fleche.redhat.com> <200908150010.00090.pedro@codesourcery.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> There were also some FIXME comments related to bfd_get_mtime
Pedro> in the patch that looked like misunderstandings, and that threw
Pedro> me off. Maybe I just didn't understand them. :-/
I was wondering about those too.
Pedro> There's also this comment in the current code that makes that
Pedro> suggested change scare me:
Pedro> /* There are various functions like symbol_file_add,
Pedro> symfile_bfd_open, syms_from_objfile, etc., which might
Pedro> appear to do what we want. But they have various other
Pedro> effects which we *don't* want. So we just do stuff
Pedro> ourselves. (...) */
Pedro> ... as we'd be going in the opposite direction (the patch uses
Pedro> symbol_file_add).
That comment looks stale. It mentions mapped files, as well, which IIUC
gdb hasn't had for years.
Pedro> I wonder how much would we simplify reread_symbols by moving the
Pedro> each-objfile rereading code to objfile.c, and refactor it to share code
Pedro> with allocate_objfile, free_objfile, etc., and thus also making it easier
Pedro> to make hooks and observers be consistent.
Yeah, that would work for me.
Tom