From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26933 invoked by alias); 4 Mar 2011 06:23:14 -0000 Received: (qmail 26925 invoked by uid 22791); 4 Mar 2011 06:23:13 -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; Fri, 04 Mar 2011 06:23:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0E8402BAF4C; Fri, 4 Mar 2011 01:23:05 -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 jsZPvoD6JuH4; Fri, 4 Mar 2011 01:23:04 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id F17972BAEB7; Fri, 4 Mar 2011 01:23:04 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4233) id EB24492A53; Fri, 4 Mar 2011 01:23:04 -0500 (EST) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [VxWorks 07/20] new struct bp_target_info target_private_data field Date: Fri, 04 Mar 2011 06:23:00 -0000 Message-Id: <1299219720-13398-8-git-send-email-brobecker@adacore.com> In-Reply-To: <1299219720-13398-1-git-send-email-brobecker@adacore.com> References: <1299219720-13398-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-03/txt/msg00258.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