From: Markus Metzger <markus.t.metzger@intel.com>
To: jan.kratochvil@redhat.com, palves@redhat.com
Cc: gdb-patches@sourceware.org
Subject: [PATCH v10 19/28] target, breakpoint: allow insert/remove breakpoint to be forwarded
Date: Tue, 14 Jan 2014 08:05:00 -0000 [thread overview]
Message-ID: <1389686678-9039-20-git-send-email-markus.t.metzger@intel.com> (raw)
In-Reply-To: <1389686678-9039-1-git-send-email-markus.t.metzger@intel.com>
2014-01-14 Markus Metzger <markus.t.metzger@intel.com>
* target.h (target_ops) <to_insert_breakpoint>
<to_remove_breakpoint>: Add target_ops parameter.
(forward_target_insert_breakpoint): New.
(forward_target_remove_breakpoint): New.
(memory_remove_breakpoint, memory_insert_breakpoint):
Add target_ops parameter.
* target.c (target_insert_breakpoint): Split into this and ...
(forward_target_insert_breakpoint): ... this.
(target_remove_breakpoint): Split into this and ...
(forward_target_remove_breakpoint): ... this.
(debug_to_insert_breakpoint): Add target_ops parameter.
Call forward_target_insert_breakpoint.
(debug_to_remove_breakpoint): Add target_ops parameter.
Call forward_target_remove_breakpoint.
(update_current_target): Do not inherit or default to_insert_breakpoint
and to_remove_breakpoint.
* corelow.c (ignore): Add target_ops parameter.
* exec.c (ignore): Add target_ops parameter.
* mem-break.c (memory_insert_breakpoint, memory_remove_breakpoint):
Add target_ops parameter.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Add target_ops parameter.
* nto-procfs.c (procfs_insert_breakpoint, procfs_remove_breakpoint):
Add target_ops parameter.
* record-full.c (record_full_beneath_to_insert_breakpoint)
(record_full_beneath_to_remove_breakpoint, tmp_to_insert_breakpoint)
(tmp_to_remove_breakpoint, record_full_insert_breakpoint)
(record_full_remove_breakpoint, record_full_core_insert_breakpoint)
(record_full_core_remove_breakpoint): Add target_ops parameter.
Update users.
(record_full_beneath_to_insert_breakpoint_ops)
(record_full_beneath_to_remove_breakpoint_ops)
(tmp_to_insert_breakpoint_ops, tmp_to_remove_breakpoint_ops): New.
(record_full_open): Initialize tmp_to_insert_breakpoint_ops,
tmp_to_remove_breakpoint_ops,
record_full_beneath_to_insert_breakpoint_ops, and
record_full_beneath_to_remove_breakpoint_ops.
* m32r-sdi.c (m32r_insert_breakpoint, m32r_remove_breakpoint):
Add target_ops parameter.
* remote-mips.c (mips_insert_breakpoint, mips_remove_breakpoint):
Add target_ops parameter.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Add target_ops parameter.
---
gdb/corelow.c | 3 ++-
gdb/exec.c | 3 ++-
gdb/mem-break.c | 4 ++--
gdb/monitor.c | 4 ++--
gdb/nto-procfs.c | 4 ++--
gdb/record-full.c | 48 ++++++++++++++++++++++++++++++-----------
gdb/remote-m32r-sdi.c | 6 ++++--
gdb/remote-mips.c | 8 +++----
gdb/remote.c | 10 +++++----
gdb/target.c | 60 +++++++++++++++++++++++++++++++++++++--------------
gdb/target.h | 27 +++++++++++++++++++----
11 files changed, 127 insertions(+), 50 deletions(-)
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 8b20d3f..57a3b42 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -842,7 +842,8 @@ core_xfer_partial (struct target_ops *ops, enum target_object object,
breakpoint_init_inferior). */
static int
-ignore (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
+ignore (struct target_ops *ops, struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
return 0;
}
diff --git a/gdb/exec.c b/gdb/exec.c
index 2d2949f..1fe6031 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -801,7 +801,8 @@ exec_set_section_address (const char *filename, int index, CORE_ADDR address)
breakpoint_init_inferior). */
static int
-ignore (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
+ignore (struct target_ops *ops, struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
return 0;
}
diff --git a/gdb/mem-break.c b/gdb/mem-break.c
index c206687..1a057df 100644
--- a/gdb/mem-break.c
+++ b/gdb/mem-break.c
@@ -77,14 +77,14 @@ default_memory_remove_breakpoint (struct gdbarch *gdbarch,
int
-memory_insert_breakpoint (struct gdbarch *gdbarch,
+memory_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return gdbarch_memory_insert_breakpoint (gdbarch, bp_tgt);
}
int
-memory_remove_breakpoint (struct gdbarch *gdbarch,
+memory_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return gdbarch_memory_remove_breakpoint (gdbarch, bp_tgt);
diff --git a/gdb/monitor.c b/gdb/monitor.c
index bbb06c6..ad1fd3e 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -2095,7 +2095,7 @@ monitor_mourn_inferior (struct target_ops *ops)
/* Tell the monitor to add a breakpoint. */
static int
-monitor_insert_breakpoint (struct gdbarch *gdbarch,
+monitor_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
@@ -2132,7 +2132,7 @@ monitor_insert_breakpoint (struct gdbarch *gdbarch,
/* Tell the monitor to remove a breakpoint. */
static int
-monitor_remove_breakpoint (struct gdbarch *gdbarch,
+monitor_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index c2d0d30..4669345 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -922,14 +922,14 @@ procfs_breakpoint (CORE_ADDR addr, int type, int size)
}
static int
-procfs_insert_breakpoint (struct gdbarch *gdbarch,
+procfs_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return procfs_breakpoint (bp_tgt->placed_address, _DEBUG_BREAK_EXEC, 0);
}
static int
-procfs_remove_breakpoint (struct gdbarch *gdbarch,
+procfs_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return procfs_breakpoint (bp_tgt->placed_address, _DEBUG_BREAK_EXEC, -1);
diff --git a/gdb/record-full.c b/gdb/record-full.c
index ce0504e..aef7665 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -230,11 +230,15 @@ static void (*record_full_beneath_to_store_registers) (struct target_ops *,
static struct target_ops *record_full_beneath_to_xfer_partial_ops;
static target_xfer_partial_ftype *record_full_beneath_to_xfer_partial;
static int
- (*record_full_beneath_to_insert_breakpoint) (struct gdbarch *,
+ (*record_full_beneath_to_insert_breakpoint) (struct target_ops *,
+ struct gdbarch *,
struct bp_target_info *);
+static struct target_ops *record_full_beneath_to_insert_breakpoint_ops;
static int
- (*record_full_beneath_to_remove_breakpoint) (struct gdbarch *,
+ (*record_full_beneath_to_remove_breakpoint) (struct target_ops *,
+ struct gdbarch *,
struct bp_target_info *);
+static struct target_ops *record_full_beneath_to_remove_breakpoint_ops;
static int (*record_full_beneath_to_stopped_by_watchpoint) (void);
static int (*record_full_beneath_to_stopped_data_address) (struct target_ops *,
CORE_ADDR *);
@@ -801,10 +805,12 @@ static void (*tmp_to_store_registers) (struct target_ops *,
int regno);
static struct target_ops *tmp_to_xfer_partial_ops;
static target_xfer_partial_ftype *tmp_to_xfer_partial;
-static int (*tmp_to_insert_breakpoint) (struct gdbarch *,
+static int (*tmp_to_insert_breakpoint) (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
-static int (*tmp_to_remove_breakpoint) (struct gdbarch *,
+static struct target_ops *tmp_to_insert_breakpoint_ops;
+static int (*tmp_to_remove_breakpoint) (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
+static struct target_ops *tmp_to_remove_breakpoint_ops;
static int (*tmp_to_stopped_by_watchpoint) (void);
static int (*tmp_to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
static int (*tmp_to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
@@ -926,6 +932,8 @@ record_full_open (char *name, int from_tty)
tmp_to_stopped_by_watchpoint = NULL;
tmp_to_stopped_data_address = NULL;
tmp_to_async = NULL;
+ tmp_to_insert_breakpoint_ops = NULL;
+ tmp_to_remove_breakpoint_ops = NULL;
/* Set the beneath function pointers. */
for (t = current_target.beneath; t != NULL; t = t->beneath)
@@ -951,9 +959,15 @@ record_full_open (char *name, int from_tty)
tmp_to_xfer_partial_ops = t;
}
if (!tmp_to_insert_breakpoint)
- tmp_to_insert_breakpoint = t->to_insert_breakpoint;
+ {
+ tmp_to_insert_breakpoint = t->to_insert_breakpoint;
+ tmp_to_insert_breakpoint_ops = t;
+ }
if (!tmp_to_remove_breakpoint)
- tmp_to_remove_breakpoint = t->to_remove_breakpoint;
+ {
+ tmp_to_remove_breakpoint = t->to_remove_breakpoint;
+ tmp_to_remove_breakpoint_ops = t;
+ }
if (!tmp_to_stopped_by_watchpoint)
tmp_to_stopped_by_watchpoint = t->to_stopped_by_watchpoint;
if (!tmp_to_stopped_data_address)
@@ -980,7 +994,9 @@ record_full_open (char *name, int from_tty)
record_full_beneath_to_xfer_partial_ops = tmp_to_xfer_partial_ops;
record_full_beneath_to_xfer_partial = tmp_to_xfer_partial;
record_full_beneath_to_insert_breakpoint = tmp_to_insert_breakpoint;
+ record_full_beneath_to_insert_breakpoint_ops = tmp_to_insert_breakpoint_ops;
record_full_beneath_to_remove_breakpoint = tmp_to_remove_breakpoint;
+ record_full_beneath_to_remove_breakpoint_ops = tmp_to_remove_breakpoint_ops;
record_full_beneath_to_stopped_by_watchpoint = tmp_to_stopped_by_watchpoint;
record_full_beneath_to_stopped_data_address = tmp_to_stopped_data_address;
record_full_beneath_to_async = tmp_to_async;
@@ -1745,7 +1761,8 @@ record_full_init_record_breakpoints (void)
when recording. */
static int
-record_full_insert_breakpoint (struct gdbarch *gdbarch,
+record_full_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
struct record_full_breakpoint *bp;
@@ -1762,7 +1779,9 @@ record_full_insert_breakpoint (struct gdbarch *gdbarch,
int ret;
old_cleanups = record_full_gdb_operation_disable_set ();
- ret = record_full_beneath_to_insert_breakpoint (gdbarch, bp_tgt);
+ ops = record_full_beneath_to_insert_breakpoint_ops;
+ ret = record_full_beneath_to_insert_breakpoint (ops, gdbarch,
+ bp_tgt);
do_cleanups (old_cleanups);
if (ret != 0)
@@ -1782,7 +1801,8 @@ record_full_insert_breakpoint (struct gdbarch *gdbarch,
/* "to_remove_breakpoint" method for process record target. */
static int
-record_full_remove_breakpoint (struct gdbarch *gdbarch,
+record_full_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
struct record_full_breakpoint *bp;
@@ -1802,7 +1822,9 @@ record_full_remove_breakpoint (struct gdbarch *gdbarch,
int ret;
old_cleanups = record_full_gdb_operation_disable_set ();
- ret = record_full_beneath_to_remove_breakpoint (gdbarch, bp_tgt);
+ ops = record_full_beneath_to_remove_breakpoint_ops;
+ ret = record_full_beneath_to_remove_breakpoint (ops, gdbarch,
+ bp_tgt);
do_cleanups (old_cleanups);
if (ret != 0)
@@ -2252,7 +2274,8 @@ record_full_core_xfer_partial (struct target_ops *ops,
/* "to_insert_breakpoint" method for prec over corefile. */
static int
-record_full_core_insert_breakpoint (struct gdbarch *gdbarch,
+record_full_core_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return 0;
@@ -2261,7 +2284,8 @@ record_full_core_insert_breakpoint (struct gdbarch *gdbarch,
/* "to_remove_breakpoint" method for prec over corefile. */
static int
-record_full_core_remove_breakpoint (struct gdbarch *gdbarch,
+record_full_core_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return 0;
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 9364b5f..d722876 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -1144,7 +1144,8 @@ m32r_mourn_inferior (struct target_ops *ops)
}
static int
-m32r_insert_breakpoint (struct gdbarch *gdbarch,
+m32r_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
@@ -1188,7 +1189,8 @@ m32r_insert_breakpoint (struct gdbarch *gdbarch,
}
static int
-m32r_remove_breakpoint (struct gdbarch *gdbarch,
+m32r_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index adf2643..6e7d956 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -2363,27 +2363,27 @@ mips_mourn_inferior (struct target_ops *ops)
target contents. */
static int
-mips_insert_breakpoint (struct gdbarch *gdbarch,
+mips_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
if (monitor_supports_breakpoints)
return mips_set_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
BREAK_FETCH);
else
- return memory_insert_breakpoint (gdbarch, bp_tgt);
+ return memory_insert_breakpoint (ops, gdbarch, bp_tgt);
}
/* Remove a breakpoint. */
static int
-mips_remove_breakpoint (struct gdbarch *gdbarch,
+mips_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
if (monitor_supports_breakpoints)
return mips_clear_breakpoint (bp_tgt->placed_address, MIPS_INSN32_SIZE,
BREAK_FETCH);
else
- return memory_remove_breakpoint (gdbarch, bp_tgt);
+ return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
}
/* Tell whether this target can support a hardware breakpoint. CNT
diff --git a/gdb/remote.c b/gdb/remote.c
index 4370f6d..0eda325 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8258,7 +8258,8 @@ remote_add_target_side_commands (struct gdbarch *gdbarch,
which don't, we insert a traditional memory breakpoint. */
static int
-remote_insert_breakpoint (struct gdbarch *gdbarch,
+remote_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
/* Try the "Z" s/w breakpoint packet if it is not already disabled.
@@ -8320,11 +8321,12 @@ remote_insert_breakpoint (struct gdbarch *gdbarch,
throw_error (NOT_SUPPORTED_ERROR, _("\
Target doesn't support breakpoints that have target side commands."));
- return memory_insert_breakpoint (gdbarch, bp_tgt);
+ return memory_insert_breakpoint (ops, gdbarch, bp_tgt);
}
static int
-remote_remove_breakpoint (struct gdbarch *gdbarch,
+remote_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
@@ -8354,7 +8356,7 @@ remote_remove_breakpoint (struct gdbarch *gdbarch,
return (rs->buf[0] == 'E');
}
- return memory_remove_breakpoint (gdbarch, bp_tgt);
+ return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
}
static int
diff --git a/gdb/target.c b/gdb/target.c
index 1a4b156..36e23aa 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -90,10 +90,10 @@ static void debug_to_prepare_to_store (struct target_ops *self,
static void debug_to_files_info (struct target_ops *);
-static int debug_to_insert_breakpoint (struct gdbarch *,
+static int debug_to_insert_breakpoint (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
-static int debug_to_remove_breakpoint (struct gdbarch *,
+static int debug_to_remove_breakpoint (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
static int debug_to_can_use_hw_breakpoint (int, int, int);
@@ -585,8 +585,8 @@ update_current_target (void)
INHERIT (to_prepare_to_store, t);
INHERIT (deprecated_xfer_memory, t);
INHERIT (to_files_info, t);
- INHERIT (to_insert_breakpoint, t);
- INHERIT (to_remove_breakpoint, t);
+ /* Do not inherit to_insert_breakpoint. */
+ /* Do not inherit to_remove_breakpoint. */
INHERIT (to_can_use_hw_breakpoint, t);
INHERIT (to_insert_hw_breakpoint, t);
INHERIT (to_remove_hw_breakpoint, t);
@@ -726,10 +726,6 @@ update_current_target (void)
de_fault (to_files_info,
(void (*) (struct target_ops *))
target_ignore);
- de_fault (to_insert_breakpoint,
- memory_insert_breakpoint);
- de_fault (to_remove_breakpoint,
- memory_remove_breakpoint);
de_fault (to_can_use_hw_breakpoint,
(int (*) (int, int, int))
return_zero);
@@ -2457,6 +2453,22 @@ get_target_memory_unsigned (struct target_ops *ops, CORE_ADDR addr,
return extract_unsigned_integer (buf, len, byte_order);
}
+/* See target.h. */
+
+int
+forward_target_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
+{
+ for (; ops != NULL; ops = ops->beneath)
+ if (ops->to_insert_breakpoint != NULL)
+ return ops->to_insert_breakpoint (ops, gdbarch, bp_tgt);
+
+ return memory_insert_breakpoint (ops, gdbarch, bp_tgt);
+}
+
+/* See target.h. */
+
int
target_insert_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
@@ -2467,12 +2479,15 @@ target_insert_breakpoint (struct gdbarch *gdbarch,
return 1;
}
- return (*current_target.to_insert_breakpoint) (gdbarch, bp_tgt);
+ return forward_target_insert_breakpoint (¤t_target, gdbarch, bp_tgt);
}
+/* See target.h. */
+
int
-target_remove_breakpoint (struct gdbarch *gdbarch,
- struct bp_target_info *bp_tgt)
+forward_target_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
/* This is kind of a weird case to handle, but the permission might
have been changed after breakpoints were inserted - in which case
@@ -2484,7 +2499,20 @@ target_remove_breakpoint (struct gdbarch *gdbarch,
return 1;
}
- return (*current_target.to_remove_breakpoint) (gdbarch, bp_tgt);
+ for (; ops != NULL; ops = ops->beneath)
+ if (ops->to_remove_breakpoint != NULL)
+ return ops->to_remove_breakpoint (ops, gdbarch, bp_tgt);
+
+ return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
+}
+
+/* See target.h. */
+
+int
+target_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
+{
+ return forward_target_remove_breakpoint (¤t_target, gdbarch, bp_tgt);
}
static void
@@ -4549,12 +4577,12 @@ debug_to_files_info (struct target_ops *target)
}
static int
-debug_to_insert_breakpoint (struct gdbarch *gdbarch,
+debug_to_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
int retval;
- retval = debug_target.to_insert_breakpoint (gdbarch, bp_tgt);
+ retval = forward_target_insert_breakpoint (&debug_target, gdbarch, bp_tgt);
fprintf_unfiltered (gdb_stdlog,
"target_insert_breakpoint (%s, xxx) = %ld\n",
@@ -4564,12 +4592,12 @@ debug_to_insert_breakpoint (struct gdbarch *gdbarch,
}
static int
-debug_to_remove_breakpoint (struct gdbarch *gdbarch,
+debug_to_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
int retval;
- retval = debug_target.to_remove_breakpoint (gdbarch, bp_tgt);
+ retval = forward_target_remove_breakpoint (&debug_target, gdbarch, bp_tgt);
fprintf_unfiltered (gdb_stdlog,
"target_remove_breakpoint (%s, xxx) = %ld\n",
diff --git a/gdb/target.h b/gdb/target.h
index 47eedeb..224a575 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -403,8 +403,10 @@ struct target_ops
struct target_ops *target);
void (*to_files_info) (struct target_ops *);
- int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
- int (*to_remove_breakpoint) (struct gdbarch *, struct bp_target_info *);
+ int (*to_insert_breakpoint) (struct target_ops *, struct gdbarch *,
+ struct bp_target_info *);
+ int (*to_remove_breakpoint) (struct target_ops *, struct gdbarch *,
+ struct bp_target_info *);
int (*to_can_use_hw_breakpoint) (int, int, int);
int (*to_ranged_break_num_registers) (struct target_ops *);
int (*to_insert_hw_breakpoint) (struct gdbarch *, struct bp_target_info *);
@@ -1135,12 +1137,29 @@ int target_write_memory_blocks (VEC(memory_write_request_s) *requests,
/* Insert a hardware breakpoint at address BP_TGT->placed_address in
the target machine. Returns 0 for success, and returns non-zero or
throws an error (with a detailed failure reason error code and
+ message) otherwise.
+ Start the target search at OPS. */
+
+extern int forward_target_insert_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt);
+
+/* Insert a hardware breakpoint at address BP_TGT->placed_address in
+ the target machine. Returns 0 for success, and returns non-zero or
+ throws an error (with a detailed failure reason error code and
message) otherwise. */
extern int target_insert_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt);
/* Remove a breakpoint at address BP_TGT->placed_address in the target
+ machine. Result is 0 for success, non-zero for error.
+ Start the target search at OPS. */
+
+extern int forward_target_remove_breakpoint (struct target_ops *ops,
+ struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt);
+/* Remove a breakpoint at address BP_TGT->placed_address in the target
machine. Result is 0 for success, non-zero for error. */
extern int target_remove_breakpoint (struct gdbarch *gdbarch,
@@ -1892,10 +1911,10 @@ extern struct target_section_table *target_get_section_table
/* From mem-break.c */
-extern int memory_remove_breakpoint (struct gdbarch *,
+extern int memory_remove_breakpoint (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
-extern int memory_insert_breakpoint (struct gdbarch *,
+extern int memory_insert_breakpoint (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
extern int default_memory_remove_breakpoint (struct gdbarch *,
--
1.8.3.1
next prev parent reply other threads:[~2014-01-14 8:05 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 8:05 [PATCH v10 00/28] record-btrace: reverse Markus Metzger
2014-01-14 8:04 ` [PATCH v10 14/28] record-btrace: supply register target methods Markus Metzger
2014-01-14 8:04 ` [PATCH v10 01/28] btrace, test: fix multi-line btrace tests Markus Metzger
2014-01-14 8:04 ` [PATCH v10 18/28] record-btrace, frame: supply target-specific unwinder Markus Metzger
2014-01-14 8:04 ` [PATCH v10 20/28] record-btrace: provide xfer_partial target method Markus Metzger
2014-01-15 15:51 ` Pedro Alves
2014-01-14 8:04 ` [PATCH v10 26/28] record-btrace: show trace from enable location Markus Metzger
2014-01-14 8:04 ` [PATCH v10 05/28] frame: add frame_id_build_unavailable_stack_special Markus Metzger
2014-01-14 8:04 ` [PATCH v10 10/28] record-btrace: optionally indent function call history Markus Metzger
2014-01-14 16:07 ` Eli Zaretskii
2014-01-14 8:04 ` [PATCH v10 03/28] btrace: uppercase btrace_read_type Markus Metzger
2014-01-14 8:05 ` [PATCH v10 25/28] btrace, gdbserver: read branch trace incrementally Markus Metzger
2014-01-16 17:57 ` Tom Tromey
2014-01-17 8:28 ` Metzger, Markus T
2014-01-20 5:44 ` Tom Tromey
2014-01-14 8:05 ` [PATCH v10 16/28] frame, cfa: check unwind stop reason first Markus Metzger
2014-01-14 8:05 ` [PATCH v10 08/28] record-btrace: start counting at one Markus Metzger
2014-01-14 8:05 ` Markus Metzger [this message]
2014-01-15 15:52 ` [PATCH v10 19/28] target, breakpoint: allow insert/remove breakpoint to be forwarded Pedro Alves
2014-01-14 8:05 ` [PATCH v10 02/28] btrace, linux: fix memory leak when reading branch trace Markus Metzger
2014-01-14 8:05 ` [PATCH v10 17/28] frame: do not assume unwinding will succeed Markus Metzger
2014-01-14 8:05 ` [PATCH v10 11/28] record-btrace: make ranges include begin and end Markus Metzger
2014-01-14 8:05 ` [PATCH v10 04/28] gdbarch: add instruction predicate methods Markus Metzger
2014-01-14 8:05 ` [PATCH v10 23/28] record-btrace: add record goto target methods Markus Metzger
2014-01-14 8:05 ` [PATCH v10 12/28] btrace: add replay position to btrace thread info Markus Metzger
2014-01-14 8:05 ` [PATCH v10 09/28] btrace: increase buffer size Markus Metzger
2014-01-14 8:05 ` [PATCH v10 21/28] record-btrace: add to_wait and to_resume target methods Markus Metzger
2014-01-14 8:05 ` [PATCH v10 24/28] record-btrace: extend unwinder Markus Metzger
2014-01-14 8:05 ` [PATCH v10 06/28] btrace: change branch trace data structure Markus Metzger
2015-01-08 20:49 ` x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure] Jan Kratochvil
2015-01-20 15:19 ` Metzger, Markus T
2015-01-22 12:30 ` Metzger, Markus T
2015-01-22 13:36 ` Pedro Alves
2015-01-22 17:37 ` Linux: make target_is_async_p return false when async is off Pedro Alves
2015-01-23 10:39 ` Metzger, Markus T
2015-01-23 12:34 ` Pedro Alves
2015-01-22 16:37 ` x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure] Jan Kratochvil
2015-01-23 7:56 ` Metzger, Markus T
2015-01-23 16:01 ` Metzger, Markus T
2015-01-23 16:33 ` Metzger, Markus T
2015-01-27 18:05 ` Pedro Alves
2015-01-29 16:28 ` Metzger, Markus T
2015-01-25 19:56 ` record btrace experience [Re: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]] Jan Kratochvil
2015-01-26 12:41 ` Metzger, Markus T
2015-01-27 8:07 ` Jan Kratochvil
2015-01-27 15:52 ` Pedro Alves
2015-01-29 19:28 ` Metzger, Markus T
2015-01-23 12:55 ` x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure] Patrick Palka
2014-01-14 8:05 ` [PATCH v10 13/28] Add target_ops argument to to_prepare_to_store Markus Metzger
2014-01-14 8:05 ` [PATCH v10 27/28] target: allow decr_pc_after_break to be defined by the target Markus Metzger
2014-01-14 8:05 ` [PATCH v10 22/28] record-btrace: provide target_find_new_threads method Markus Metzger
2014-01-14 8:05 ` [PATCH v10 28/28] record-btrace: add (reverse-)stepping support Markus Metzger
2014-01-14 8:05 ` [PATCH v10 15/28] frame, backtrace: allow targets to supply a frame unwinder Markus Metzger
2014-01-14 8:05 ` [PATCH v10 07/28] record-btrace: fix insn range in function call history Markus Metzger
2014-01-15 15:54 ` [PATCH v10 00/28] record-btrace: reverse Pedro Alves
2014-01-16 12:01 ` Metzger, Markus T
2014-01-16 12:37 ` Pedro Alves
2014-01-16 14:35 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389686678-9039-20-git-send-email-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).