From 0cb7c7b0bb79be910e261f3d30c58ace6b0d06d1 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 1 Mar 2018 10:51:21 -0500 Subject: 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) : Likewise. (target_call_history_from): Likewise. (target_call_history_range): Likewise. --- gdb/target-delegates.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'gdb/target-delegates.c') diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index c7ebdbf..2c5787f 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -3961,20 +3961,20 @@ debug_insn_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, } static void -delegate_call_history (struct target_ops *self, int arg1, int arg2) +delegate_call_history (struct target_ops *self, int arg1, record_print_flags arg2) { self = self->beneath; self->to_call_history (self, arg1, arg2); } static void -tdefault_call_history (struct target_ops *self, int arg1, int arg2) +tdefault_call_history (struct target_ops *self, int arg1, record_print_flags arg2) { tcomplain (); } static void -debug_call_history (struct target_ops *self, int arg1, int arg2) +debug_call_history (struct target_ops *self, int arg1, record_print_flags arg2) { fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history (...)\n", debug_target.to_shortname); debug_target.to_call_history (&debug_target, arg1, arg2); @@ -3983,25 +3983,25 @@ debug_call_history (struct target_ops *self, int arg1, int arg2) fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg1); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg2); + target_debug_print_record_print_flags (arg2); fputs_unfiltered (")\n", gdb_stdlog); } static void -delegate_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3) +delegate_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, record_print_flags arg3) { self = self->beneath; self->to_call_history_from (self, arg1, arg2, arg3); } static void -tdefault_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3) +tdefault_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, record_print_flags arg3) { tcomplain (); } static void -debug_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3) +debug_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, record_print_flags arg3) { fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history_from (...)\n", debug_target.to_shortname); debug_target.to_call_history_from (&debug_target, arg1, arg2, arg3); @@ -4012,25 +4012,25 @@ debug_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int a fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg2); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg3); + target_debug_print_record_print_flags (arg3); fputs_unfiltered (")\n", gdb_stdlog); } static void -delegate_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3) +delegate_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, record_print_flags arg3) { self = self->beneath; self->to_call_history_range (self, arg1, arg2, arg3); } static void -tdefault_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3) +tdefault_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, record_print_flags arg3) { tcomplain (); } static void -debug_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3) +debug_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, record_print_flags arg3) { fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history_range (...)\n", debug_target.to_shortname); debug_target.to_call_history_range (&debug_target, arg1, arg2, arg3); @@ -4041,7 +4041,7 @@ debug_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, fputs_unfiltered (", ", gdb_stdlog); target_debug_print_ULONGEST (arg2); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg3); + target_debug_print_record_print_flags (arg3); fputs_unfiltered (")\n", gdb_stdlog); } -- cgit v1.1