From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31664 invoked by alias); 24 Jun 2010 20:12:55 -0000 Received: (qmail 31625 invoked by uid 22791); 24 Jun 2010 20:12:42 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jun 2010 20:12:38 +0000 Received: by bwz4 with SMTP id 4so2925415bwz.0 for ; Thu, 24 Jun 2010 13:12:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.74.12 with SMTP id s12mr6568464bkj.126.1277410354367; Thu, 24 Jun 2010 13:12:34 -0700 (PDT) Received: by 10.204.151.91 with HTTP; Thu, 24 Jun 2010 13:12:34 -0700 (PDT) In-Reply-To: <201006242025.25966.pedro@codesourcery.com> References: <1276813536-31761-1-git-send-email-brobecker@adacore.com> <201006241942.32722.pedro@codesourcery.com> <20100624190021.GJ2595@adacore.com> <201006242025.25966.pedro@codesourcery.com> Date: Thu, 24 Jun 2010 20:12:00 -0000 Message-ID: Subject: Re: [RFA/commit/Win64] Remove new extra leading underscore in symbol name From: Kai Tietz To: Pedro Alves Cc: Joel Brobecker , gdb-patches@sourceware.org, Tom Tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00557.txt.bz2 2010/6/24 Pedro Alves : > On Thursday 24 June 2010 20:00:21, Joel Brobecker wrote: >> No, you're probably right. I was slowly realizing this while I was >> updating the comment I wrote in the previous patch. The problem is: >> what's the right way to detect how the binary was built? > > I don't think there's a "right way". =A0At least, I can't think of > one. =A0Maybe there's some heuristic way, like looking for some well > known symbol in the implementation namespace for two or > three underscores, say. =A0Always likely to fail, for several reasons, > one of them that you still misfix asm defined underscored symbols. > And you'd probably want to consider handling the reverse -- missing > underscores, in gdb/bfd's perspective. =A0Very fragile, if you ask me. Right, to ask bfd for toolchain's target default underscoring is for sure not bad, but doesn't address the issue complete. Probing of symbols could be a way, but it is indeed fragile. >> Right now, >> the bfd change is a major incompatibility nightmare since minimal >> symbols and symbols no longer have the same name. > > It was an ABI change. =A0Incompatibilities are sort of expected by > design, when all the tools don't agree on the ABI. =A0:-) :) >> GDB needs to be able to support both (IMO). > > Does the --enable-leading-mingw64-underscores switch affect > bfd as well, and fix this? =A0While supporting both sounds ideal, > in practice, I'd think it to be enough for vendors to support > gdb builds that match the ABI of their compiler. =A0Or two builds, > if they care, until the old ABI is phased out. Yes, by --enable-leading-mingw64-underscores just the default in bfd is changed. So it could be a work-a-round for supporting binaries having non-ABI name-decoration. > -- > Pedro Alves > Kai --=20 | (\_/) This is Bunny. Copy and paste | (=3D'.'=3D) Bunny into your signature to help | (")_(") him gain world domination