aboutsummaryrefslogtreecommitdiff
path: root/gdb/record-btrace.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-btrace.c
parent8305403a1ffa8e551fd1c7bd88af1a65c0ba747c (diff)
downloadbinutils-0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1.zip
binutils-0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1.tar.gz
binutils-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-btrace.c')
-rw-r--r--gdb/record-btrace.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 2464672..d9a1dc5 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -1074,14 +1074,14 @@ btrace_call_history (struct ui_out *uiout,
/* The to_call_history method of target record-btrace. */
static void
-record_btrace_call_history (struct target_ops *self, int size, int int_flags)
+record_btrace_call_history (struct target_ops *self, int size,
+ record_print_flags flags)
{
struct btrace_thread_info *btinfo;
struct btrace_call_history *history;
struct btrace_call_iterator begin, end;
struct ui_out *uiout;
unsigned int context, covered;
- record_print_flags flags = (enum record_print_flag) int_flags;
uiout = current_uiout;
ui_out_emit_tuple tuple_emitter (uiout, "insn history");
@@ -1095,7 +1095,7 @@ record_btrace_call_history (struct target_ops *self, int size, int int_flags)
{
struct btrace_insn_iterator *replay;
- DEBUG ("call-history (0x%x): %d", int_flags, size);
+ DEBUG ("call-history (0x%x): %d", (int) flags, size);
/* If we're replaying, we start at the replay position. Otherwise, we
start at the tail of the trace. */
@@ -1130,7 +1130,7 @@ record_btrace_call_history (struct target_ops *self, int size, int int_flags)
begin = history->begin;
end = history->end;
- DEBUG ("call-history (0x%x): %d, prev: [%u; %u)", int_flags, size,
+ DEBUG ("call-history (0x%x): %d, prev: [%u; %u)", (int) flags, size,
btrace_call_number (&begin), btrace_call_number (&end));
if (size < 0)
@@ -1163,21 +1163,20 @@ record_btrace_call_history (struct target_ops *self, int size, int int_flags)
static void
record_btrace_call_history_range (struct target_ops *self,
ULONGEST from, ULONGEST to,
- int int_flags)
+ record_print_flags flags)
{
struct btrace_thread_info *btinfo;
struct btrace_call_iterator begin, end;
struct ui_out *uiout;
unsigned int low, high;
int found;
- record_print_flags flags = (enum record_print_flag) int_flags;
uiout = current_uiout;
ui_out_emit_tuple tuple_emitter (uiout, "func history");
low = from;
high = to;
- DEBUG ("call-history (0x%x): [%u; %u)", int_flags, low, high);
+ DEBUG ("call-history (0x%x): [%u; %u)", (int) flags, low, high);
/* Check for wrap-arounds. */
if (low != from || high != to)
@@ -1213,10 +1212,9 @@ record_btrace_call_history_range (struct target_ops *self,
static void
record_btrace_call_history_from (struct target_ops *self,
ULONGEST from, int size,
- int int_flags)
+ record_print_flags flags)
{
ULONGEST begin, end, context;
- record_print_flags flags = (enum record_print_flag) int_flags;
context = abs (size);
if (context == 0)