mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
Add a command to provide a disassembly of the execution trace log.
gdb/ * target.h (target_ops) <to_insn_history, to_insn_history_from, to_insn_history_range>: New fields. (target_insn_history): New. (target_insn_history_from): New. (target_insn_history_range): New. * target.c (target_insn_history): New. (target_insn_history_from): New. (target_insn_history_range): New. * record.c: Include cli/cli-utils.h, disasm.h, ctype.h. (record_insn_history_size): New. (get_insn_number): New. (get_context_size): New. (no_chunk): New. (get_insn_history_modifiers): New. (cmd_record_insn_history): New. (_initialize_record): Add "set/show record instruction-history-size" command. Add "record instruction-history" command.
This commit is contained in:
51
gdb/target.c
51
gdb/target.c
@ -4388,6 +4388,57 @@ target_goto_record (ULONGEST insn)
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_insn_history (int size, int flags)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
if (t->to_insn_history != NULL)
|
||||
{
|
||||
t->to_insn_history (size, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_insn_history_from (ULONGEST from, int size, int flags)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
if (t->to_insn_history_from != NULL)
|
||||
{
|
||||
t->to_insn_history_from (from, size, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_insn_history_range (ULONGEST begin, ULONGEST end, int flags)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
if (t->to_insn_history_range != NULL)
|
||||
{
|
||||
t->to_insn_history_range (begin, end, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
static void
|
||||
debug_to_prepare_to_store (struct regcache *regcache)
|
||||
{
|
||||
|
Reference in New Issue
Block a user