From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14434 invoked by alias); 26 Nov 2014 09:00:20 -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 14318 invoked by uid 89); 26 Nov 2014 09:00:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Nov 2014 09:00:16 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1XtYSL-0000zu-2L from Yao_Qi@mentor.com ; Wed, 26 Nov 2014 01:00:13 -0800 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.181.6; Wed, 26 Nov 2014 01:00:12 -0800 From: Yao Qi To: Doug Evans CC: Subject: Re: [PATCH 2/2] [PR symtab/17602] Fix arguments to symbol_name_cmp References: Date: Wed, 26 Nov 2014 09:00:00 -0000 In-Reply-To: (Doug Evans's message of "Tue, 25 Nov 2014 20:20:07 -0800") Message-ID: <87zjbecp5i.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00659.txt.bz2 Doug Evans writes: > - if (data->symbol_name_cmp (name, data->lookup_name) =3D=3D 0) > + /* The order of arguments we pass to symbol_name_cmp is important as > + strcmp_iw, a typical value for symbol_name_cmp, only performs speci= al > + processing of '(' to remove overload info on the first argument and= not > + the second. The first argument is what the user provided, the seco= nd > + argument is what came from partial syms / .gdb_index. */ > + if (data->symbol_name_cmp (data->lookup_name, name) =3D=3D 0) > return 1; /* Expand this symbol's symbol table. */ > return 0; /* Skip this symbol. */ Such odd feature is documented in the comments to strcmp_iw: As an extra hack, string1=3D=3D"FOO(ARGS)" matches string2=3D=3D"FOO". This "feature" is useful when searching for matching C++ function names (such as if the user types 'break FOO', where FOO is a mangled C++ function). A question not related to this patch too much, do you consider to move such c++ specific hack into c++ specific routine la_get_symbol_name_cmp? --=20 Yao (=E9=BD=90=E5=B0=A7)