aboutsummaryrefslogtreecommitdiff
path: root/gdb/record.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-03-01 10:51:21 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-03-01 10:51:21 -0500
commit0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1 (patch)
tree34cf43f08a90d41090e6571ff58413706fed25d3 /gdb/record.c
parent8305403a1ffa8e551fd1c7bd88af1a65c0ba747c (diff)
downloadgdb-0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1.zip
gdb-0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1.tar.gz
gdb-0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1.tar.bz2
Propagate record_print_flags
These flags are returned as an int by get_call_history_modifiers, and get cast back to record_print_flags in the btrace code. Instead, we can make the arguments of that type from start to end. gdb/ChangeLog: * record.c (get_call_history_modifiers): Return a record_print_flags. (cmd_record_call_history): Adjust. * record-btrace.c (record_btrace_call_history): Adjust. (record_btrace_call_history_range): Adjust. (record_btrace_call_history_from): Adjust. * target-debug.h (target_debug_print_record_print_flags): New. * target-delegates.c: Re-generate. * target.c (target_call_history): Change flags type. (target_call_history_from): Likewise. (target_call_history_range): Likewise. * target.h (struct target_ops) <target_call_history>: Likewise. (target_call_history_from): Likewise. (target_call_history_range): Likewise.
Diffstat (limited to 'gdb/record.c')
-rw-r--r--gdb/record.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/record.c b/gdb/record.c
index 9a47614..cd83b99 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -615,14 +615,11 @@ cmd_record_insn_history (const char *arg, int from_tty)
/* Read function-call-history modifiers from an argument string. */
-static int
+static record_print_flags
get_call_history_modifiers (const char **arg)
{
- int modifiers;
- const char *args;
-
- modifiers = 0;
- args = *arg;
+ record_print_flags modifiers = 0;
+ const char *args = *arg;
if (args == NULL)
return modifiers;
@@ -672,13 +669,11 @@ get_call_history_modifiers (const char **arg)
static void
cmd_record_call_history (const char *arg, int from_tty)
{
- int flags, size;
-
require_record_target ();
- flags = get_call_history_modifiers (&arg);
+ record_print_flags flags = get_call_history_modifiers (&arg);
- size = command_size_to_target_size (record_call_history_size);
+ int size = command_size_to_target_size (record_call_history_size);
if (arg == NULL || *arg == 0 || strcmp (arg, "+") == 0)
target_call_history (size, flags);