Add target_ops argument to to_insn_history_range

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_insn_history_range>: Add
	argument.
	* target.c (target_insn_history_range): Add argument.
	* record-btrace.c (record_btrace_insn_history_range): Add 'self'
	argument.
	(record_btrace_insn_history_from): Update.
This commit is contained in:
Tom Tromey
2013-12-17 21:48:29 -07:00
parent 9abc3ff39e
commit 4e99c6b708
4 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insn_history_range>: Add
argument.
* target.c (target_insn_history_range): Add argument.
* record-btrace.c (record_btrace_insn_history_range): Add 'self'
argument.
(record_btrace_insn_history_from): Update.
2014-02-19 Tom Tromey <tromey@redhat.com> 2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insn_history_from>: Add * target.h (struct target_ops) <to_insn_history_from>: Add

View File

@ -398,7 +398,8 @@ record_btrace_insn_history (struct target_ops *self, int size, int flags)
/* The to_insn_history_range method of target record-btrace. */ /* The to_insn_history_range method of target record-btrace. */
static void static void
record_btrace_insn_history_range (ULONGEST from, ULONGEST to, int flags) record_btrace_insn_history_range (struct target_ops *self,
ULONGEST from, ULONGEST to, int flags)
{ {
struct btrace_thread_info *btinfo; struct btrace_thread_info *btinfo;
struct btrace_insn_history *history; struct btrace_insn_history *history;
@ -478,7 +479,7 @@ record_btrace_insn_history_from (struct target_ops *self,
end = ULONGEST_MAX; end = ULONGEST_MAX;
} }
record_btrace_insn_history_range (begin, end, flags); record_btrace_insn_history_range (self, begin, end, flags);
} }
/* Print the instruction number range for a function call history line. */ /* Print the instruction number range for a function call history line. */

View File

@ -4447,7 +4447,7 @@ target_insn_history_range (ULONGEST begin, ULONGEST end, int flags)
for (t = current_target.beneath; t != NULL; t = t->beneath) for (t = current_target.beneath; t != NULL; t = t->beneath)
if (t->to_insn_history_range != NULL) if (t->to_insn_history_range != NULL)
{ {
t->to_insn_history_range (begin, end, flags); t->to_insn_history_range (t, begin, end, flags);
return; return;
} }

View File

@ -965,7 +965,8 @@ struct target_ops
/* Disassemble a section of the recorded execution trace from instruction /* Disassemble a section of the recorded execution trace from instruction
BEGIN (inclusive) to instruction END (inclusive). */ BEGIN (inclusive) to instruction END (inclusive). */
void (*to_insn_history_range) (ULONGEST begin, ULONGEST end, int flags); void (*to_insn_history_range) (struct target_ops *,
ULONGEST begin, ULONGEST end, int flags);
/* Print a function trace of the recorded execution trace. /* Print a function trace of the recorded execution trace.
If SIZE < 0, print abs (SIZE) preceding functions; otherwise, print SIZE If SIZE < 0, print abs (SIZE) preceding functions; otherwise, print SIZE