This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Improve "start" command for Ada


> > +@deftypefun void executable_changed (void *@var{unused_args})
> > +The executable being debugged by GDB has changed.
> > +@end deftypefun
> 
> This is not clear enough: what does it mean ``the executable has
> changed''?  Did its file name change? what if its the same program,
> but it was recompiled and its debugging session restarted?

That's a very good point, which pointed at something I didn't consider
when I first wrote the patch: The signal needs to be sent when the
program has been recompiled, or course. Is this version better?

2004-10-20  Joel Brobecker  <brobecker@gnat.com>

        * doc/observer.texi (executable_changed): New observer.
        * symtab.c: Include "observer.h".
        (find_main_name): New function.
        (main_name): If name_of_main is unset, then compute it
        using find_main_name.
        (symtab_observer_executable_changed): New function.
        (_initialize_symtab): Attach executable_changed observer.
        * exec.c: Include "observer.h".
        (exec_file_attach): Emit executable_changed notification.
        * symfile.c: Include "observer.h".
        (reread_symbols): Send an executable_changed if appropriate.
        * Makefile.in (exec.o): Add dependency on observer.h.
        (symfile.o): Likewise.
        (symtab.o): Likewise.

Tested on x86-linux. Still fixes 1 FAIL in gdb.ada/null_record.exp.

-- 
Joel

Attachment: find_main_name.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]