From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4F2013857C4D for ; Wed, 16 Sep 2020 19:17:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F2013857C4D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C00451E96F; Wed, 16 Sep 2020 15:17:41 -0400 (EDT) Subject: Re: [PATCH] Match demangled name in "skip" To: Tom Tromey , gdb-patches@sourceware.org References: <20200916181057.268427-1-tromey@adacore.com> From: Simon Marchi Message-ID: <79a2552b-1231-77ee-ac77-ffae8f49899b@simark.ca> Date: Wed, 16 Sep 2020 15:17:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200916181057.268427-1-tromey@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2020 19:17:43 -0000 On 2020-09-16 2:10 p.m., Tom Tromey wrote: > PR gdb/26598 notes that, before commit bcfe6157ca28 ("Use the linkage > name if it exists"), the "skip" command would match the demangled name > of a symbol, but now only matches the linkage name. > > This patch fixes this regression. I looked at all calls to > function_name_is_marked_for_skip, and only one used the linkage name. > > gdb/ChangeLog > 2020-09-16 Tom Tromey > > PR gdb/26598: > * infrun.c (fill_in_stop_func): Use find_pc_partial_function_sym. > > gdb/testsuite/ChangeLog > 2020-09-16 Tom Tromey > > PR gdb/26598: > * gdb.base/skipcxx.exp: New file. > * gdb.base/skipcxx.cc: New file. Thanks, that LGTM. Since this changes stop_func_name from the mangled name to the demangled name (like it was before your change?), I checked what else stop_func_name was used for. It is passed to gdbarch_in_solib_return_trampoline. Implementations use that name to compare against hard-coded symbol names. However, I would guess that these symbol names are not prone to being mangled. Otherwise, we'd need to save both the demangled and linkage name. Simon