From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28656 invoked by alias); 11 Dec 2011 18:04:47 -0000 Received: (qmail 28648 invoked by uid 22791); 11 Dec 2011 18:04:46 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_BG X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Dec 2011 18:04:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E79152BB13E; Sun, 11 Dec 2011 13:04:32 -0500 (EST) 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 5-721iFpFb3B; Sun, 11 Dec 2011 13:04:32 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B8C6D2BB123; Sun, 11 Dec 2011 13:04:32 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6AD22145615; Sun, 11 Dec 2011 10:04:32 -0800 (PST) Date: Sun, 11 Dec 2011 20:33:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp and unsupported catchpoints Message-ID: <20111211180432.GP21915@adacore.com> References: <201112061718.50031.pedro@codesourcery.com> <201112091800.02236.pedro@codesourcery.com> <201112101926.40691.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112101926.40691.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2011-12/txt/msg00335.txt.bz2 > Here's a start. I didn't really try to confirm if I was extracting the > arguments correctly for any other function bug the Ada runtime's > function in question, but at least it works in the case we're > interested in. :-) Not bad :). On the other hand, I'm wondering if this is really worth the effort. With a stripped libgnat, this is not the worse problem you are ever going to face. I think a much worse problem is the fact that you are not going to be able to print the value of what we call tagged types (aka classes in C++). For GDB to decode a tagged variable, it needs to find know how ada__tags__type_specific_data is defined. Tagged variables unfortunately do not reference this type directly, which means that a unit using tagged variables/types will NOT contain a description of that type. So, the only unit that contains that data is usually Ada.Tags (a-tags.ad[sb]). This is why stripping lignat also breaks that feature. I think that the long term plan would be for the compiler to describe our tagged variables using an adequate DWARF description, yet to be determined. Back to the problem with exceptions, I just checked in a series of patches that cleanup a bit the support for exceptions. One of the improvements brings a check for stripped runtimes, and a better error message when we detect this situation: (gdb) catch exception Your Ada runtime appears to be missing some debugging information. Cannot insert Ada exception catchpoint in this configuration. That should help a user understand better what's going on. Perhaps one last step to help him figure out what to do next is to expand the documentation about the catch exception command a bit. > Unfortunately, libgnat is fully stripped (at least on ubuntu), symbol > table and all, That reaffirms my belief that it's a battle not worth fighting. Better to help the users figure out what's going on and how to fix it rather than trying to support this setup. -- Joel