From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3126 invoked by alias); 24 Feb 2011 17:50:59 -0000 Received: (qmail 2992 invoked by uid 22791); 24 Feb 2011 17:50:59 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Thu, 24 Feb 2011 17:50:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8D76E2BADEA; Thu, 24 Feb 2011 12:50:52 -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 mGk1-gc7skWs; Thu, 24 Feb 2011 12:50:52 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 7B8D12BADDE; Thu, 24 Feb 2011 12:50:52 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4233) id 7B09194677; Thu, 24 Feb 2011 12:50:52 -0500 (EST) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [PATCH 05/18] new struct bp_target_info target_private_data field Date: Thu, 24 Feb 2011 17:51:00 -0000 Message-Id: <1298569763-18784-6-git-send-email-brobecker@adacore.com> In-Reply-To: <1298569763-18784-1-git-send-email-brobecker@adacore.com> References: <1298569763-18784-1-git-send-email-brobecker@adacore.com> 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-02/txt/msg00701.txt.bz2 On VxWorks, we let the target do the breakpoint handling: To insert a breakpoint at a given location, we emit a WTX request to the target, and we get an "eventpoint ID". To remove that breakpoint, we need to use that same eventpoint ID as a parameter for the WTX request that removes breakpoints. So, for every breakpoint that we actually inserted on the target, we need to remember the associated eventpoint ID. This new field allows the target to store some target-specific data associated to each breakpoint location. Normally, I would attach this patch to the patch that is going to use this change. But because the patch in question is part of a rather large series of large-ish patches, I felt that it was best to avoid drowning this change with the rest, and give this change more visibility. gdb/ChangeLog: * breakpoint.h (struct bp_target_info): New "target_private_data" component. --- gdb/breakpoint.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index a0fea21..6bd58f1 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -233,6 +233,12 @@ struct bp_target_info (e.g. if a remote stub handled the details). We may still need the size to remove the breakpoint safely. */ int placed_size; + + /* Some private data maintained by the target, if needed. + The target is expected to allocate the data when the breakpoint + is inserted, and deallocate it when the breakpoint is removed + (please also set the pointer to NULL after deallocation). */ + void *target_private_data; }; /* GDB maintains two types of information about each breakpoint (or -- 1.7.0.4