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:
Markus Metzger
2013-03-11 08:50:05 +00:00
parent 67c86d0683
commit 15984c13c7
5 changed files with 248 additions and 0 deletions

View File

@@ -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)
{