From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5795 invoked by alias); 27 Mar 2002 23:49:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5787 invoked from network); 27 Mar 2002 23:49:05 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 27 Mar 2002 23:49:05 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16qNA8-0005nX-00; Wed, 27 Mar 2002 18:49:04 -0500 Date: Wed, 27 Mar 2002 15:49:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Chris Faylor , gdb-patches@sources.redhat.com Subject: Re: RFA: strip stdcall suffixes under Cygwin Message-ID: <20020327184904.A22189@nevyn.them.org> Mail-Followup-To: Jim Blandy , Chris Faylor , gdb-patches@sources.redhat.com References: <20020327233525.1164E5EA11@zwingli.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020327233525.1164E5EA11@zwingli.cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-03/txt/msg00560.txt.bz2 On Wed, Mar 27, 2002 at 06:35:25PM -0500, Jim Blandy wrote: > > Chris, I think I need your approval for this. > > 2002-03-27 Jim Blandy > > * config/i386/tm-cygwin.h: #define > LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES. > * symtab.c (LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES): Provide > default #definition here, if tm-*.h file doesn't have one. > (symbol_init_mangled_name): If the above is #defined, strip off > the stdcall arg size, if present, from linker symbol names before > trying to demangle them. > + if (LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES) > + { > + char *arg_byte_suffix = strchr (mangled, '@'); > + if (arg_byte_suffix) > + { > + int prefix_len = arg_byte_suffix - mangled; > + char *mangled_sans_suffix = alloca (prefix_len + 1); > + memcpy (mangled_sans_suffix, mangled, prefix_len); > + mangled_sans_suffix[prefix_len] = '\0'; > + > + mangled = mangled_sans_suffix; > + } > + } > + Perhaps verify that you are stripping off a number? (ELF uses @ for representing symbol versions also.) -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer