From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11359 invoked by alias); 2 Oct 2008 21:13:50 -0000 Received: (qmail 11351 invoked by uid 22791); 2 Oct 2008 21:13:50 -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; Thu, 02 Oct 2008 21:13:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B2E0A2A96C5; Thu, 2 Oct 2008 17:12:58 -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 YxtGEhlA7wgk; Thu, 2 Oct 2008 17:12:58 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7C5E02A96BE; Thu, 2 Oct 2008 17:12:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4873BE7ACD; Thu, 2 Oct 2008 14:12:56 -0700 (PDT) Date: Thu, 02 Oct 2008 21:13:00 -0000 From: Joel Brobecker To: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part Message-ID: <20081002211256.GO3665@adacore.com> References: <1222798409.30389.23.camel@miki> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1222798409.30389.23.camel@miki> 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/msg00064.txt.bz2 > * breakpoint.h (enum bptype): Add syscall catchpoint and entry > breakpoint types. > (struct breakpoint): Add field 'syscall_number' (used to know > which syscall triggered the catchpoint) and > 'syscall_to_be_caught' (used to know which syscall we are trying > to catch). I would really like to try to avoid creating a different enum for each catchpoint type, if we can. See for instance how I implemented Ada exception catchpoints: http://www.sourceware.org/ml/gdb-patches/2007-01/msg00102.html Do you think we could leverage on the "breakpoint_ops" structure to implement this feature? Daniel, you know this part of the code really well, what do you think? Obviously, his feature is a different kind of beast than Ada exception catchpoints (which behind the scene is just an elaborated breakpoint). So he won't be able to use the bp_breakpoint kind I used. Actually, I don't see any bptype kind that could be used, so we'll have to create one, but if the name could be generic enough to be used in other circumstances. Similarly, the breakpoint_ops structure might need to be extended a bit, to provide methods that would insert/remove the catchpoint. -- Joel