From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28458 invoked by alias); 20 Aug 2014 09:42:24 -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 28447 invoked by uid 89); 20 Aug 2014 09:42:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 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, 20 Aug 2014 09:42:23 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 50B39340179; Wed, 20 Aug 2014 09:42:21 +0000 (UTC) From: Mike Frysinger To: Gary Benson Cc: Steve Ellcey , Doug Evans , gdb-patches , Pedro Alves , "Frank Ch. Eigler" Subject: Re: [PATCH 4/5 v7] Introduce common-debug.h Date: Wed, 20 Aug 2014 09:42:00 -0000 Message-ID: <15329331.NicJ8HFAzI@vapier> User-Agent: KMail/4.13.3 (Linux/3.14.2; KDE/4.13.3; x86_64; ; ) In-Reply-To: <20140820085243.GA2694@blade.nx> References: <20140819091220.GB6493@blade.nx> <1408490530.31355.15.camel@ubuntu-sellcey> <20140820085243.GA2694@blade.nx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2972135.ogjViXmKxV"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00388.txt.bz2 --nextPart2972135.ogjViXmKxV Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Content-length: 2307 On Wed 20 Aug 2014 09:52:43 Gary Benson wrote: > [Cc'ing Mike and Frank (SIM global maintainer and SIM common > maintainer)] >=20 > Steve Ellcey wrote: > > On Tue, 2014-08-19 at 10:12 +0100, Gary Benson wrote: > > > > > 2014-08-13 Tom Tromey > > > > >=20 > > > > > Gary Benson > > > > >=20=20=20=20=20=20=20=20=20 > > > > > * 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. > >=20 > > I just built gdb for mips (mips-linux-gnu and mips-mti-linux-gnu) > > and it died with: > >=20 > > /local/home/sellcey/gcc/non_mti_linux/src/binutils-gdb/sim/mips/../comm= on/ > > sim-trace.c:1326: multiple definition of `debug_printf' > > common-debug.o:/local/home/sellcey/gcc/non_mti_linux/src/binutils-gdb/g= db > > /common/common-debug.c:31: first defined here collect2: ld returned 1 e= xit > > status > > make[1]: *** [gdb] Error 1 > >=20 > > I am assuming it has something to do with this patch. >=20 > Yeah. This patch adds a "debug_printf" function to GDB, but it looks > like SIM already had one. >=20 > 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? it is not currently being used, but it really really should be in some targ= ets > Steve, you can probably work around this for now by adding: >=20 > #define debug_printf gdb_debug_printf >=20 > 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 -mike= --nextPart2972135.ogjViXmKxV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJT9G19AAoJEEFjO5/oN/WBcLEQAK5nr6I2cp64SfTvdCEskHXb v7EEURpY+eMNa/EsQhUB9ynQGOLGlNZuAUTi4VJHXqZN/bA9F2rHyE1sVOKEI8rg GLOTB6FeVZ/QtMldoa1wBCEcANZEnLDPt02Ds1UJJFHTWF/sdtvhkbpYs+6j3XxO e8W5i7SWifXODhrbyeNPsqytU46km+6aYTmQOn1kEMXFi7TKBV67AnFqvph9FLy7 26bdXEmsi3GrZsGn2V8QFgo3YKP2TX0OvDV5p2hk4lx48r4LvMqnsavhU7ydEc0c QVRQ0tjCavXIxDrOd9WffcV9M/qeZ6q/8FKPLH63OCLOvfNYL9nlnIOOmbJ+Uprc zuZyu61P94HOv+0tEiiVubTBzhDTmozt+MKTtWc8bLayRd3x7pg03ccrcZLTO/gr oQhIHh51r4kfPSeHknX7Dqel/p24xUSXXQWRmpV8SzXvWxyBQ7TRRx+ZaLyfDTSa R4jfiVBE6a9SYc47o+twnZaeT1EB+SCc0g77OSI/Y3DSbG0o61X64qT1Wru6b/PA rmovefuaPq+J9mYk+vvAUzmu8TIC0evLLGgOZUh79pbkHLg07sFJz2fFJTcx7NpX 4H2Yj1tyAnfDYOJgKMxNCmBx5BM+Gt7ghL/rBarqTqC9NpzOsd8x9Tb0FROG3nF9 xnMX5oxVmLiWnPpV+b97 =XvO8 -----END PGP SIGNATURE----- --nextPart2972135.ogjViXmKxV--