From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5408 invoked by alias); 1 Oct 2013 09:14:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5397 invoked by uid 89); 1 Oct 2013 09:14:46 -0000 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 01 Oct 2013 09:14:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KAM_STOCKGEN autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 22C75116141 for ; Tue, 1 Oct 2013 05:15:02 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Eg0VM2fiSGdA for ; Tue, 1 Oct 2013 05:15:02 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E652B1160F9 for ; Tue, 1 Oct 2013 05:15:01 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B7C43E0499; Tue, 1 Oct 2013 11:14:42 +0200 (CEST) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit/Ada] wrong "catch exception" error message when finding trampoline msym. Date: Tue, 01 Oct 2013 09:14:00 -0000 Message-Id: <1380618880-28301-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-10/txt/msg00017.txt.bz2 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. Tested on x86_64-linux. Will check it in momentarily. --- gdb/ada-lang.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index d2b0ed2..62ca50c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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.")); -- 1.8.1.2