[commit/Ada] Attach ada_executable_changed_observer

Joel Brobecker brobecker@adacore.com
Sat Dec 29 11:18:00 GMT 2007


In a change I made a few months ago, I defined a function that was
meant to be attached as an observer of the executable-changed
notification, but never actually attached it. Not sure if I forgot,
or that piece was missing from the patch.  The part that I don't
understand is why I didn't get a warning from the compiler, since
the function is static but unused.

The symptoms would only appear if a user debugged a program using
the old runtime (in terms of exception support), and then debugged
a program with the new one (or vice versa) without restarting the
debugger. Exception catchpoints would not work properly in the second
case. That's pretty minor, but easily fixeable.

2007-12-29  Joel Brobecker  <brobecker@adacore.com>

        * ada-lang.c (_initialize_ada_language): Attach executable_changed

Tested on x86-linux. No regression.

-------------- next part --------------
Index: ada-lang.c
--- ada-lang.c	(revision 16)
+++ ada-lang.c	(revision 17)
@@ -10888,4 +10888,6 @@ _initialize_ada_language (void)
   decoded_names_store = htab_create_alloc
     (256, htab_hash_string, (int (*)(const void *, const void *)) streq,
      NULL, xcalloc, xfree);
+  observer_attach_executable_changed (ada_executable_changed_observer);

More information about the Gdb-patches mailing list