forked from Imagelibrary/binutils-gdb
Add command to print the function names from recorded instructions.
This command provides a quick high-level overview over the recorded execution log at function granularity without having to reverse-step. gdb/ * target.c (target_call_history, target_call_history_from, target_call_history_range): New. * target.h (target_ops) <to_call_history, to_call_history_from, to_call_history_range>: New fields. (target_call_history, target_call_history_from, target_call_history_range): New declaration. * record.c (get_call_history_modifiers, cmd_record_call_history, record_call_history_size): New. (_initialize_record): Add the "record function-call-history" command. Add "set/show record function-call-history-size" commands. * record.h (record_print_flag): New.
This commit is contained in:
51
gdb/target.c
51
gdb/target.c
@@ -4439,6 +4439,57 @@ target_insn_history_range (ULONGEST begin, ULONGEST end, int flags)
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_call_history (int size, int flags)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
if (t->to_call_history != NULL)
|
||||
{
|
||||
t->to_call_history (size, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_call_history_from (ULONGEST begin, int size, int flags)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
if (t->to_call_history_from != NULL)
|
||||
{
|
||||
t->to_call_history_from (begin, size, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
void
|
||||
target_call_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_call_history_range != NULL)
|
||||
{
|
||||
t->to_call_history_range (begin, end, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
tcomplain ();
|
||||
}
|
||||
|
||||
static void
|
||||
debug_to_prepare_to_store (struct regcache *regcache)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user