wrong "catch exception" error message when finding trampoline msym.
authorJoel Brobecker <brobecker@gnat.com>
Tue, 1 Oct 2013 09:21:41 +0000 (09:21 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 1 Oct 2013 09:21:41 +0000 (09:21 +0000)
When building the program with the shared GNAT runtime, the debugger
is unable to insert Ada exception catchpoints until that runtime
has been mapped to memory. In other words, we expect the user to start
the program first, before attempting to insert that catchpoint.

The detection mechanism that tries to provide some useful tips to
the user fails when the program itself contains a trampoline symbol
matching the symbol that the catchpoint is trying to use. This
results in the following error message:

    (gdb) catch exception
    Your Ada runtime appears to be missing some debugging information.
    Cannot insert Ada exception catchpoint in this configuration.

Instead, we expected the following error message:

    (gdb) catch exception
    Unable to insert catchpoint. Try to start the program first.

gdb/ChangeLog:

        * ada-lang.c (ada_has_this_exception_support): Ignore
        mst_solib_trampoline minimal symbols.

gdb/ChangeLog
gdb/ada-lang.c

index bcf01692decb40408eaad849220177685cde4c18..15ca4f24cf50601667d58ce145d4dcf91059f477 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-01  Joel Brobecker  <brobecker@adacore.com>
+
+       * ada-lang.c (ada_has_this_exception_support): Ignore
+       mst_solib_trampoline minimal symbols.
+
 2013-09-30  Tristan Gingold  <gingold@adacore.com>
 
        * i386-darwin-nat.c (darwin_complete_target): Install methods for
index d2b0ed2eff61f1719f47efb62ed2a44df3c070d4..62ca50c2bebdc906c5c03ad9d0cef179ee4eca17 100644 (file)
@@ -11039,7 +11039,10 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
         the name of the exception being raised (this name is printed in
         the catchpoint message, and is also used when trying to catch
         a specific exception).  We do not handle this case for now.  */
-      if (lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL))
+      struct minimal_symbol *msym
+       = lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL);
+
+      if (msym && MSYMBOL_TYPE (msym) != mst_solib_trampoline)
        error (_("Your Ada runtime appears to be missing some debugging "
                 "information.\nCannot insert Ada exception catchpoint "
                 "in this configuration."));
This page took 0.033203 seconds and 4 git commands to generate.