From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31628 invoked by alias); 27 Jun 2013 08:44:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31613 invoked by uid 89); 27 Jun 2013 08:44:36 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 08:44:35 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 27 Jun 2013 01:45:46 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 27 Jun 2013 01:44:32 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r5R8iVuu009480; Thu, 27 Jun 2013 09:44:31 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r5R8iVpq003442; Thu, 27 Jun 2013 10:44:31 +0200 Received: (from mgherza1@localhost) by ulslx001.iul.intel.com with id r5R8iVRp003438; Thu, 27 Jun 2013 10:44:31 +0200 From: Mircea Gherzan To: tromey@redhat.com, palves@redhat.com, jan.kratochvil@redhat.com Cc: gdb-patches@sourceware.org, Mircea Gherzan Subject: [PATCH 2/7] gdbserver, common: convert some variadic macros to C99 Date: Thu, 27 Jun 2013 08:44:00 -0000 Message-Id: <1372322622-3216-3-git-send-email-mircea.gherzan@intel.com> In-Reply-To: <1372322622-3216-1-git-send-email-mircea.gherzan@intel.com> References: <1372322622-3216-1-git-send-email-mircea.gherzan@intel.com> X-SW-Source: 2013-06/txt/msg00809.txt.bz2 2013-06-25 Mircea Gherzan * common/agent.c (DEBUG_AGENT): convert to __VA_ARGS__. gdbserver/ * ax.c (ax_debug): Convert to __VA_ARGS__. (ax_debug_1): Convert to __VA_ARGS__. * tracepoint.c (trace_debug): Convert to __VA_ARGS__. (trace_debug_1): Convert to __VA_ARGS__. Signed-off-by: Mircea Gherzan --- gdb/common/agent.c | 8 ++++---- gdb/gdbserver/ax.c | 12 ++++++------ gdb/gdbserver/tracepoint.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gdb/common/agent.c b/gdb/common/agent.c index bbf5c4c..f0759b5 100644 --- a/gdb/common/agent.c +++ b/gdb/common/agent.c @@ -35,13 +35,13 @@ int debug_agent = 0; #ifdef GDBSERVER -#define DEBUG_AGENT(fmt, args...) \ +#define DEBUG_AGENT(...) \ if (debug_agent) \ - fprintf (stderr, fmt, ##args); + fprintf (stderr, __VA_ARGS__); #else -#define DEBUG_AGENT(fmt, args...) \ +#define DEBUG_AGENT(...) \ if (debug_agent) \ - fprintf_unfiltered (gdb_stdlog, fmt, ##args); + fprintf_unfiltered (gdb_stdlog, __VA_ARGS__); #endif /* Global flag to determine using agent or not. */ diff --git a/gdb/gdbserver/ax.c b/gdb/gdbserver/ax.c index b6824a2..71145c1 100644 --- a/gdb/gdbserver/ax.c +++ b/gdb/gdbserver/ax.c @@ -38,14 +38,14 @@ ax_vdebug (const char *fmt, ...) va_end (ap); } -#define ax_debug_1(level, fmt, args...) \ - do { \ - if (level <= debug_threads) \ - ax_vdebug ((fmt), ##args); \ +#define ax_debug_1(level, ...) \ + do { \ + if (level <= debug_threads) \ + ax_vdebug (__VA_ARGS__); \ } while (0) -#define ax_debug(FMT, args...) \ - ax_debug_1 (1, FMT, ##args) +#define ax_debug(...) \ + ax_debug_1 (1, __VA_ARGS__) /* This enum must exactly match what is documented in gdb/doc/agentexpr.texi, including all the numerical values. */ diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index c0dea5b..392f84b 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -76,14 +76,14 @@ trace_vdebug (const char *fmt, ...) va_end (ap); } -#define trace_debug_1(level, fmt, args...) \ - do { \ +#define trace_debug_1(level, ...) \ + do { \ if (level <= debug_threads) \ - trace_vdebug ((fmt), ##args); \ + trace_vdebug (__VA_ARGS__); \ } while (0) -#define trace_debug(FMT, args...) \ - trace_debug_1 (1, FMT, ##args) +#define trace_debug(...) \ + trace_debug_1 (1, __VA_ARGS__) #if defined(__GNUC__) # define ATTR_USED __attribute__((used)) -- 1.7.12.4