Re: [patch] Replace reread_symbols by load+free calls

Pedro Alves
2009-06-25T19:57:14Z

On Thursday 25 June 2009 20:21:20, Jan Kratochvil wrote:
> +      for (so = master_so_list (); so != NULL; so = so->next)
> +       if (so->objfile == objfile)
> +         break;
> +      if (so != NULL)
> +       continue;
>

Would this work instead?

if ((objfile->flags & (OBJF_SHARED | OBJF_USERLOADED) == OBJF_SHARED))
continue;

The OBJF_USERLOADED check is to take care of the windows-nat.c
"dll-symbols" command...

Referencing to master_so_list outside of the solib files doesn't sound
right.

On Thursday 25 June 2009 20:21:20, Jan Kratochvil wrote:
> + /* FIXME: EXEC_BFD should be always referenced only through
> + SYMFILE_OBJFILE. Currently exec_bfd exists on its own and it does not
> + have to be listed among OBJECT_FILES. exec_bfd_mtime should either be
> + used or rather dropped. */

Can you elaborate on this FIXME note? exec_bfd may or not have symbols in it.
It may or not be the same bfd as symfile_objfile. Note that there are
"exec-file" and "symbol-file" separate commands. In fact, I believe,
historicaly, the "file" command that does both things at once was only
added later. Do you plan on somehow eliminating exec_bfd?

> if (reread_one)
> {
> + /* breakpoint_re_set gets called to comply with SYMFILE_DEFER_BP_RESET
> + above. */
> clear_symtab_users ();

I can't quite parse what this comment is really saying. Who calls
breakpoint_re_set? Who is complying?

--
Pedro Alves