This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 05/18] new struct bp_target_info target_private_data field


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]