From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18115 invoked by alias); 20 Aug 2014 08:53:03 -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 18106 invoked by uid 89); 20 Aug 2014 08:53:02 -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,SPF_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 08:53:01 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7K8qlTJ031808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Aug 2014 04:52:48 -0400 Received: from blade.nx (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7K8qirg010924; Wed, 20 Aug 2014 04:52:45 -0400 Received: by blade.nx (Postfix, from userid 1000) id 8B16E2640D5; Wed, 20 Aug 2014 09:52:43 +0100 (BST) Date: Wed, 20 Aug 2014 08:53:00 -0000 From: Gary Benson To: Steve Ellcey Cc: Doug Evans , gdb-patches , Pedro Alves , Mike Frysinger , "Frank Ch. Eigler" Subject: Re: [PATCH 4/5 v7] Introduce common-debug.h Message-ID: <20140820085243.GA2694@blade.nx> References: <20140819091220.GB6493@blade.nx> <1408490530.31355.15.camel@ubuntu-sellcey> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1408490530.31355.15.camel@ubuntu-sellcey> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00385.txt.bz2 [Cc'ing Mike and Frank (SIM global maintainer and SIM common maintainer)] Steve Ellcey wrote: > On Tue, 2014-08-19 at 10:12 +0100, Gary Benson wrote: > > > > 2014-08-13 Tom Tromey > > > > Gary Benson > > > > > > > > * common/common-debug.h: New file. > > > > * common/common-debug.c: Likewise. > > > > * debug.c: Likewise. > > > > * Makefile.in (SFILES): Add common/common-debug.c. > > > > (HFILES_NO_SRCDIR): Add common/common-debug.h. > > > > (COMMON_OBS): Add common-debug.o and debug.o. > > > > (common-debug.o): New rule. > > > > * common/common-defs.h: Include common-debug.h. > > > > * common/agent.c (debug_agent_printf): New function. > > > > (DEBUG_AGENT): Redefine. > > > > * nat/i386-dregs.c (debug_printf): Undefine. > > I just built gdb for mips (mips-linux-gnu and mips-mti-linux-gnu) > and it died with: > > /local/home/sellcey/gcc/non_mti_linux/src/binutils-gdb/sim/mips/../common/sim-trace.c:1326: multiple definition of `debug_printf' > common-debug.o:/local/home/sellcey/gcc/non_mti_linux/src/binutils-gdb/gdb/common/common-debug.c:31: first defined here > collect2: ld returned 1 exit status > make[1]: *** [gdb] Error 1 > > I am assuming it has something to do with this patch. Yeah. This patch adds a "debug_printf" function to GDB, but it looks like SIM already had one. I don't see any callers for SIM's debug_printf. Is this dead code that can be removed, or is it provided as a convenience/library function? 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. Thanks, Gary -- http://gbenson.net/