From patchwork Thu Mar 1 13:47:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 26139 Received: (qmail 10270 invoked by alias); 1 Mar 2018 13:48:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 627 invoked by uid 89); 1 Mar 2018 13:48:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, TIME_LIMIT_EXCEEDED, UNWANTED_LANGUAGE_BODY autolearn=unavailable version=3.3.2 spammy= X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Mar 2018 13:48:18 +0000 Received: from ESESSHC018.ericsson.se (Unknown_Domain [153.88.183.72]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id A3.39.18296.594089A5; Thu, 1 Mar 2018 14:48:05 +0100 (CET) Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESSHC018.ericsson.se (153.88.183.72) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 1 Mar 2018 14:47:52 +0100 Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Thu, 1 Mar 2018 14:47:53 +0100 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26 via Frontend Transport; Thu, 1 Mar 2018 14:47:52 +0100 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxacz23q12.ericsson.se (192.176.1.82) by DM5PR1501MB2007.namprd15.prod.outlook.com (2603:10b6:4:a1::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Thu, 1 Mar 2018 13:47:49 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] Propagate record_print_flags Date: Thu, 1 Mar 2018 08:47:33 -0500 Message-ID: <1519912053-26118-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 X-ClientProxiedBy: HE1PR05CA0163.eurprd05.prod.outlook.com (2603:10a6:3:f8::11) To DM5PR1501MB2007.namprd15.prod.outlook.com (2603:10b6:4:a1::37) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e792156-f247-4405-ba31-08d57f7b0624 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:DM5PR1501MB2007; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2007; 3:SQtuK8T0e5Ezf4PAFILVM4BZSVFIos6Q2qdzyIvduH6s1bV2r5y9RQ34yjcT3pvtqLMEhVpFkYITmpmhcD4k7NYSF2qY5Svjtb4IHIgY06FMMoU9AGDswxtEdut61++u4BrMrfwFwK6qnLs1huLLQelptiU9EdpOpBKP5b8vN8onE11Yq4D9VOW2YMmmXceMxZYyaeYgMeJR+1YkjIY4kHiKHnq32usaIoOKe3n6Qh7yQswWRocPdVgzafSvR4R3; 25:fooUhFmC167MrnsfcQIZ5/iLoCortx2vAdNM6kHehnmR5wNdfE943zJxtxPItxAhy0Gn/XjR0SjrDjgZVl6QUQZKWDL4E1xLucefy7VJjEw4vjc4mbiPKD62G44MXglFfu5IKATMg7wWm0wDDtN3goR9B9SzhCgiZX1gbvqjXsI57EgHOBlEC1nZcjxBf1Qn7S3FzG8g7vXgkGHoT6uiPcrLH6XmwMIRcFWKyErM+gF4FtuDkGRmlxZ7ClwgLB8ueCGCmCy3CqNaToGeb3IJqgZX5wayc3t8WPUqXi0IL1B0AVjoL2qVa5ZaGPY7q5yZIaSbTSQV76237EWKLXneEA==; 31:f08iJ3qnvD4Nyr9vS59PdFrqLmMUIcDDJvevX6j/OM/BcPXAE0yXd6xljdreINijfuKDK/pm7QmTzHdnhgJhTltlp1NeyzHD9gmpF3ECs7Mhe5/+cAiR8UvlVc33KwL9i1ceZ2RA1ODfQkMgl5Ws5NMdRQcbX+cl4LC8oQFstY59xrR8n9t6ldP/AqnS88Y2dB6jBOzhjE8YnNfsGpdNFSmj8XAzsdG64NkWYdhxDfM= X-MS-TrafficTypeDiagnostic: DM5PR1501MB2007: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2007; 20:3UA6TYvTYTW2p9+Ga6X2TQCvtwJXXYwT4giMOAc7MD6/u6kVJVFV2v5C4gggkSwZ7G+YHHDiuvgrmf30JkIpZpGygfOGc4NBIJWWxWa11yusAVA+sGwyiKOWyGK7Q3gU9JIdhJkfBqmmtOgi3CV1qo00anO2AdYiseCxcj0j7r00b6Ox+F5D+mamiGcS9TIIyEESNjeBuNse7e201pgsmfFo8QNmijrKv48wFRCs+r+EhOgikRamQyX0DZ/Mn3x4mr/+O4BetZ2Zuwr20nUrApuwvQr22b2O/K3tBX9XHa7y3gEOcpnTKS/k4BJkUjuEmRH+6+GkPhoRSEqontNrCf6Pmilf6DWYC6Fv5HmoKkZQ7G/KKFmlvUsZpxZznaBqZoNMS67mAdD2Xgwk8ILLdJ0mrKcjQJt8rIXgcP3z331BT34xwbM7dDH8rgJ0ymBJOQKzewMvLxZxN3mbDD4o8tFv33UQEyNoN7bIcbIUBhikZ0vG+5W4N5+2CepaLXPf; 4:+hkELBRU/3qsV3ilw1ahN2eOIqwdUHh/qV39cc0EFhSvhFrzR/suLZGb+OB3pPwFRjjzU0pk4oPntLKh+u4yqC6LwjB8lMSHu0XoUNSsN3LfcX/ivVZw+oIdSCDpO++JPqkmrmheH7J0YhRKYGIdxW89anx9is8v3rPnh5dbv0LHf7ep+He9GpFl4xUy4JJgcpk+pr5T9AfqFJ84dpqnyqkSRFw7EI5ij8/iBQmA0iJTFHdEr6WOXMHNo99fcVqyl8mA5uhQMeYym9nKDtuvNQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(3231220)(944501161)(52105095)(93006095)(93001095)(10201501046)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR1501MB2007; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1501MB2007; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(39860400002)(376002)(346002)(396003)(199004)(54534003)(189003)(316002)(53416004)(2351001)(6506007)(105586002)(386003)(2361001)(2906002)(4326008)(8936002)(86362001)(1857600001)(81156014)(186003)(16526019)(6512007)(26005)(53936002)(50226002)(81166006)(51416003)(36756003)(8676002)(25786009)(16586007)(6916009)(305945005)(5660300001)(6486002)(50466002)(107886003)(478600001)(97736004)(69596002)(68736007)(52116002)(7736002)(48376002)(6116002)(47776003)(3846002)(6666003)(66066001)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1501MB2007; H:elxacz23q12.ericsson.se; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1501MB2007; 23:DxdD3jXkUF4BelNVb/It32qqNaFN/vuBpnNdCJm?= =?us-ascii?Q?dGpKC+LcxzPETqPSPWM6RiZZB1CFmENllCodvMzyvwdM3FLyxN0IWzoCkDG7?= =?us-ascii?Q?LFMNjaciAN18NPFs7GhcdKERwby4XYWmjIhGEWnQ29nMkckbCTk0Vl4gNV/u?= =?us-ascii?Q?CQ1Ng46ES629G9x5vtEqk5jTevtbns+ZRnUMQU/eA2c4QeeGkOza1XcYQT3q?= =?us-ascii?Q?f7aumncGul9TMYRTTG7YzseWonMP7a1H5370CUGROdhXcX8iwqZSGeJaHn5j?= =?us-ascii?Q?9TQsoxCbGFrN7JsbTjoimERi/oj42mg6Z696m8Roku3h0iZDSJHr0u+8i5IK?= =?us-ascii?Q?QjWGwYgAclg5tgfboG9wmY7agabDOngQm0W/9Cs1VkQR2R7zwrE4cLroNc8U?= =?us-ascii?Q?oFcSwiBnU30M3OzkdGjtPoYhqi5VLudZeLfMV5hSWAlwR3rwJradn2BtIvY4?= =?us-ascii?Q?tK/1DVUlk4cuNMwNttmLotC+SQVacBelKU4YhRHTaTyXDtay0dOjftv4vGvm?= =?us-ascii?Q?gV0ut+NzOorU3jhW0PgfpXiyWK8wEdchTHaEaL3ICfsS05xDgpFxWU+8X/eA?= =?us-ascii?Q?SEsc/CxnR+GqjQzo0tv6REQm782YQ2pMD0K4QxFWNOV2cALKQ4gFncMIfzq+?= =?us-ascii?Q?rkhtW6gq9ywmDhr+7PrJIGH7zTwKVKu85i1I8Y4Dv4S3gZ835xELEEPJTaxk?= =?us-ascii?Q?lXQty/EAWGsfCDpLdG1eyG18GbtqX6EHcLtYr6I4GABUKbIWacPTJnkx3WPL?= =?us-ascii?Q?uURnPGCAk5YFSo4kuFledXEN1XleBis/YLDvzBz3kK3YkMw4JdhCLI0KmCm8?= =?us-ascii?Q?NQZIjwMqU026/G0LwQvCOijQPrXDASYNmg5MuNgo16cJEJRk/+fLleDmHFJt?= =?us-ascii?Q?7A86bCbUmtxgsRfN+l2KzRPLl2BzblFdiz7fYlr+7CMw4ft9495PeCrOT+9R?= =?us-ascii?Q?fHpNFExO4UUiiZ7VWHZh58uyr4HCw4CHS91q2gKkw6cMAdQWe8/O/rDMNUOh?= =?us-ascii?Q?fuDPcpjelQa/F3j6ou8QRasV82SGVBadHzNOJelDJL6J+4cIL4/7217cn63o?= =?us-ascii?Q?8HHxSX6+y3go4/LQpKJwx97IgN0Z4CnvXB9Uh38UzorC967idJibXjG2+jOH?= =?us-ascii?Q?nUOh4dStZ//Elhd2zA4K3avrz4ZKk8cCvUz+pzHrShH5I/UmfgJq14z865ai?= =?us-ascii?Q?Yup5kgsmx8eiHQ+vzOzmIwJEI2CirzNQb1Z8C?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2007; 6:5eg0/ndSEuWAZXz3HABwL/blZZgd+Ka4d6k4c6FYKn2zaO6MKKAaNszl9FGXhgThe1KKMf4hvD/Bae3G6IkbIQ+tIGfFJyA6mwwUUjLOtRu5wpMRvVx/Gb6TCWtd3auIrcK1jgNw5XynSwMqk6jOQMXbPIdJKhCpS3HyOAAjo0RQANRLsShoEG0m9fVO/aONlzxlW+BPthzQVx+hv/KTzHEhXYle7Di/m/63iySdcsolj3FC9d35NrWoKHDeqlPpyY88uf1UOQKKQD4lAdcEZb7nTdAf3MhdKeT3IC6LJBkgjdtL/zb2AAItMGQAaete+viXbZ4vx9rC8Uv3zm35utw/+t3h7Vfu8cWHcO7ebHE=; 5:OBB4oRNOiS0nOWikofqsDKprlUAWttO5tIAsgegvJfofnDBXIDVtOM9BDwJ3fjgF8gp9I0lRFEkcNoAxC+R/gELhizfL9nK1rWWvwI+NTb8D398WeC911KeK/iWr0wixOxpNcKpeodr+9bxTZrX8KAtD5CCKS4znuqAWLBUqx90=; 24:ZDDWiwumWWrJboWbna450Zu+KoagvXJXfwpyh4MhxSF0kTQ6/5/Z3RJ8EWTNBLq1UbLdb0ty858zQt4v5ILRx4XwwVtrGQtWX320BppLzxU=; 7:IkBw0nSOblVmvAIuxEzv1uLTVMh8uSJOYufdqyJ5E2FG4MstCsunEfNAUGmB67Hf1ZuEOfLO6h5zwtMpW5UdoeD41ND07njJtXh9PJF+RGMNL/S0/0TXujnpXIPEdQZ+WhxKq0g3+axV5R2+GyNSKIAWvAzVtVfVyxqfqYd30lsnnaPQfaQb5i5xmtn+8+K6xMcf+TMs/zhC95XDhrZQDOMBi/PbN3RHWM2TPkwG8eImK3Yx951fB4FrWgwspr0j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 13:47:49.0287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e792156-f247-4405-ba31-08d57f7b0624 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1501MB2007 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes 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/record-btrace.c | 16 +++++++--------- gdb/record.c | 15 +++++---------- gdb/target-debug.h | 2 ++ gdb/target-delegates.c | 24 ++++++++++++------------ gdb/target.c | 6 +++--- gdb/target.h | 14 ++++++++------ 6 files changed, 37 insertions(+), 40 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) 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); diff --git a/gdb/target-debug.h b/gdb/target-debug.h index d7fc001..71d1a3f 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -172,6 +172,8 @@ target_debug_do_print (host_address_to_string (X.data ())) #define target_debug_print_inferior_p(inf) \ target_debug_do_print (host_address_to_string (inf)) +#define target_debug_print_record_print_flags(X) \ + target_debug_do_print (plongest (X)) static void target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status) 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); } diff --git a/gdb/target.c b/gdb/target.c index db7c09b..197e7ff 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3809,7 +3809,7 @@ target_insn_history_range (ULONGEST begin, ULONGEST end, /* See target.h. */ void -target_call_history (int size, int flags) +target_call_history (int size, record_print_flags flags) { current_target.to_call_history (¤t_target, size, flags); } @@ -3817,7 +3817,7 @@ target_call_history (int size, int flags) /* See target.h. */ void -target_call_history_from (ULONGEST begin, int size, int flags) +target_call_history_from (ULONGEST begin, int size, record_print_flags flags) { current_target.to_call_history_from (¤t_target, begin, size, flags); } @@ -3825,7 +3825,7 @@ target_call_history_from (ULONGEST begin, int size, int flags) /* See target.h. */ void -target_call_history_range (ULONGEST begin, ULONGEST end, int flags) +target_call_history_range (ULONGEST begin, ULONGEST end, record_print_flags flags) { current_target.to_call_history_range (¤t_target, begin, end, flags); } diff --git a/gdb/target.h b/gdb/target.h index e8972ca..de56213 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1217,7 +1217,7 @@ struct target_ops /* Print a function trace of the recorded execution trace. If SIZE < 0, print abs (SIZE) preceding functions; otherwise, print SIZE succeeding functions. */ - void (*to_call_history) (struct target_ops *, int size, int flags) + void (*to_call_history) (struct target_ops *, int size, record_print_flags flags) TARGET_DEFAULT_NORETURN (tcomplain ()); /* Print a function trace of the recorded execution trace starting @@ -1225,13 +1225,13 @@ struct target_ops If SIZE < 0, print abs (SIZE) functions before FROM; otherwise, print SIZE functions after FROM. */ void (*to_call_history_from) (struct target_ops *, - ULONGEST begin, int size, int flags) + ULONGEST begin, int size, record_print_flags flags) TARGET_DEFAULT_NORETURN (tcomplain ()); /* Print a function trace of an execution trace section from function BEGIN (inclusive) to function END (inclusive). */ void (*to_call_history_range) (struct target_ops *, - ULONGEST begin, ULONGEST end, int flags) + ULONGEST begin, ULONGEST end, record_print_flags flags) TARGET_DEFAULT_NORETURN (tcomplain ()); /* Nonzero if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a @@ -2492,13 +2492,15 @@ extern void target_insn_history_range (ULONGEST begin, ULONGEST end, gdb_disassembly_flags flags); /* See to_call_history. */ -extern void target_call_history (int size, int flags); +extern void target_call_history (int size, record_print_flags flags); /* See to_call_history_from. */ -extern void target_call_history_from (ULONGEST begin, int size, int flags); +extern void target_call_history_from (ULONGEST begin, int size, + record_print_flags flags); /* See to_call_history_range. */ -extern void target_call_history_range (ULONGEST begin, ULONGEST end, int flags); +extern void target_call_history_range (ULONGEST begin, ULONGEST end, + record_print_flags flags); /* See to_prepare_to_generate_core. */ extern void target_prepare_to_generate_core (void);