From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14101 invoked by alias); 1 Oct 2008 16:51:37 -0000 Received: (qmail 14093 invoked by uid 22791); 1 Oct 2008 16:51:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Oct 2008 16:51:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 01B242A963D; Wed, 1 Oct 2008 12:51:00 -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 2FYp3XElL7zF; Wed, 1 Oct 2008 12:50:59 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BD53B2A9638; Wed, 1 Oct 2008 12:50:59 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BFDFEE7ACD; Wed, 1 Oct 2008 09:50:57 -0700 (PDT) Date: Wed, 01 Oct 2008 16:51:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] Special handling for predefined exceptions... Message-ID: <20081001165057.GK3665@adacore.com> References: <20080930205233.GA3560@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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: 2008-10/txt/msg00021.txt.bz2 > > For Ada, we provide a command "catch exception [EXCEPTION_NAME]" > > that stops the execution when an exception is raised. If an exception > > name is specified in the command, then the debugger only stops when > > a specific exception is raised. The matching of the exception is > > performed through an internal condition that looks like this: > > > > long_integer (e) = long_integer (&EXCEPTION_NAME)" > > > > (where "e" is a parameter of the function where we inserted the > > catchpoint that contains a pointer to the exception data). The way > > it works is: For every EXCEPTION_NAME, the compiler defines an entity > > whose name is EXCEPTION_NAME (fully qualified). So when we want to > > verify whether we have raised a given exception, we just verify that > > its address is the address of the symbol whose name is EXCEPTION_NAME. > > I'd love to have all this info somewhere in gdbint.texinfo. I will oblige, if that's what you would like, but I would much, much, rather put that in the code where it is easy to keep it synchronized with the actual implementation. I looked at the current gdbint.texinfo, and I think it would really benefit from a section that explains how breakpoint_ops can be used to implement specialized kinds of breakpoints like the Ada exception catchpoints. But this tiny extremely specific piece, IMO, belongs with the code. I guess we go back to the discussion of how much detail we want to put in gdbint.texinfo. I don't want to restart this dicussion, as I think most people have their own opinion and all of them are fair. Your call. -- Joel