From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16196 invoked by alias); 24 Jun 2010 18:42:56 -0000 Received: (qmail 16184 invoked by uid 22791); 24 Jun 2010 18:42:55 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jun 2010 18:42:48 +0000 Received: (qmail 5966 invoked from network); 24 Jun 2010 18:42:45 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Jun 2010 18:42:45 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA/commit/Win64] Remove new extra leading underscore in symbol name Date: Thu, 24 Jun 2010 18:42:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-22-generic; KDE/4.4.2; x86_64; ; ) Cc: Joel Brobecker , Tom Tromey , ktietz70@googlemail.com References: <1276813536-31761-1-git-send-email-brobecker@adacore.com> <20100624182317.GI2595@adacore.com> In-Reply-To: <20100624182317.GI2595@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006241942.32722.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2010-06/txt/msg00549.txt.bz2 On Thursday 24 June 2010 19:23:17, Joel Brobecker wrote: > > Joel> 2010-06-17 Joel Brobecker > > Joel> gdb/ > > Joel> * coffread.c (getsymname): Skip the leading underscore on pe64. > > > > I don't know anything about this target, but the binutils patch includes > > a --enable-leading-mingw64-underscores option... > > > > Joel> + const char *target = bfd_get_target (symfile_bfd); > > Joel> + const int is_pe64 = (strcmp (target, "pe-x86-64") == 0 > > Joel> + || strcmp (target, "pei-x86-64") == 0); > > > > ...so maybe instead of looking at the target name, it would be better to > > use bfd_get_target_info here? > > I'm a little nervous at changing the check to a non target-specific > one without multi-platform testing. Unfortunately, I haven't had > a chance to work on this yet, and I'd really like to have that for 7.2. > > Would it be OK for me to commit this change as is while I instrument > what you suggest on all other platforms we have that use COFF? (I'm > expecting to be able to make that change today) I'm confused on your change. It sounds like you're using a debugger that postdates the change to default to not output underscores on win64, with a compiler that still outputs the underscores. What happens when you update your compiler? I expect your patch to break binaries produced by a compiler that also doesn't output underscores anymore on c symbols, as mingw64's. Isn't that so? I don't think either a bfd_get_target or bfd_get_target_info check will always get you a right answer, since those essentially are returning hardcoded answers in bfd, not how the binaries were built. Am I wrong? -- Pedro Alves