From patchwork Wed Jun 24 15:05:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 7327 Received: (qmail 76420 invoked by alias); 24 Jun 2015 15:05:10 -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 76405 invoked by uid 89); 24 Jun 2015 15:05:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 24 Jun 2015 15:05:08 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E2FA23407E2 for ; Wed, 24 Jun 2015 15:05:06 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: trace: rename debug_printf fully Date: Wed, 24 Jun 2015 11:05:05 -0400 Message-Id: <1435158305-1108-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Rather than redirect using a define, just rename the symbol fully. Committed. --- sim/common/ChangeLog | 8 ++++++++ sim/common/sim-trace.c | 2 +- sim/common/sim-trace.h | 5 +---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 7a224bc..37f97dc 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,13 @@ 2015-06-24 Mike Frysinger + * sim-trace.c (debug_printf): Rename to ... + (sim_debug_printf): ... this. + * sim-trace.h (debug_printf): Delete define. + (debug_printf): Rename to ... + (sim_debug_printf): ... this. + +2015-06-24 Mike Frysinger + * sim-trace.c (OPTION_TRACE_REGISTER): New enum. (trace_options): Add trace-register option. (trace_option_handler): Handle OPTION_TRACE_REGISTER case. diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index 6e11cce..40286e1 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -1316,7 +1316,7 @@ trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...) } void -debug_printf (sim_cpu *cpu, const char *fmt, ...) +sim_debug_printf (sim_cpu *cpu, const char *fmt, ...) { va_list ap; diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h index 54a2824..580cd4e 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -648,10 +648,7 @@ extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list); /* Non-zero if "--debug-insn" specified. */ #define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX) -/* GDB also has a debug_printf, so we shadow ours. */ -#define debug_printf sim_debug_printf - -extern void debug_printf (sim_cpu *, const char *, ...) +extern void sim_debug_printf (sim_cpu *, const char *, ...) __attribute__((format (printf, 2, 3))); #endif /* SIM_TRACE_H */