From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23373 invoked by alias); 20 Aug 2014 19:14:51 -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 23326 invoked by uid 89); 20 Aug 2014 19:14:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Aug 2014 19:14:50 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7KJEe7i013120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Aug 2014 15:14:40 -0400 Received: from blade.nx (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7KJEbfO029112; Wed, 20 Aug 2014 15:14:38 -0400 Received: by blade.nx (Postfix, from userid 1000) id 41C222640D2; Wed, 20 Aug 2014 20:14:37 +0100 (BST) Date: Wed, 20 Aug 2014 19:14:00 -0000 From: Gary Benson To: Mike Frysinger Cc: Steve Ellcey , Doug Evans , gdb-patches , Pedro Alves , "Frank Ch. Eigler" Subject: Re: [PATCH 4/5 v7] Introduce common-debug.h Message-ID: <20140820191437.GB23764@blade.nx> References: <20140819091220.GB6493@blade.nx> <15329331.NicJ8HFAzI@vapier> <20140820120934.GA26854@blade.nx> <2738453.Usiax8h3c8@vapier> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2738453.Usiax8h3c8@vapier> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00426.txt.bz2 Mike Frysinger wrote: > On Wed 20 Aug 2014 13:09:34 Gary Benson wrote: > > Mike Frysinger wrote: > > > On Wed 20 Aug 2014 09:52:43 Gary Benson wrote: > > > > Steve, you can probably work around this for now by adding: > > > > #define debug_printf gdb_debug_printf > > > > > > > > at the top of GDB's common/common-debug.h. If SIM's debug_printf > > > > cannot be removed then maybe we will have to add some hack like > > > > this to GDB permanently. > > > > > > i'm fine with updating sim/common/sim-trace.h with that idea: > > > #define debug_printf sim_debug_printf > > > > > > all the symbols coming out of the sim really should be namespaced > > > > Great. I can put together a patch if you like (or I can make the > > change, or you can... whatever's easiest!) I don't know much about > > SIM... is there a list to mail patches to? And, is its upstream > > repo the same as binutils+GDB or is it imported from somewhere else > > like libiberty? > > it would be great if you could put together the patch :). sim > patches go to the same place as gdb (same repo), and i can approve > them when i see them. Inlined below. I'm away til Tuesday now, but I'll try and check my email before I go so if I see you and Frank are happy with this then I'll commit it. If I don't, feel free to commit it yourself or wait (I'm happy with either). Thanks, Gary -- 2014-08-20 Gary Benson * sim-trace.h (debug_printf): New define. diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h index 5fb58e1..69fffb4 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -583,6 +583,9 @@ 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 *, ...) __attribute__((format (printf, 2, 3)));