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 523F43858C66 for ; Wed, 10 Jan 2024 16:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 523F43858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 523F43858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704905848; cv=none; b=ds/NL+Np6y31+9Gk2bR1P9IrQwHEeZGcmrA7JZY1VbhEdoVdMOjTe3vQU9dcFg0WKjEt5x+xewc9kCkTo76rUGv34pPCfs6QXERiaTlbEq0faIdng/RhzbDgBzONdiRx3Egqpa2+jqMPl8CyHeKK+RIpMRmaoTI7j+AIH5V4S14= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704905848; c=relaxed/simple; bh=ypv+1l/3tl+/H1y8RLk4ZT1rLlnWZOgzOwQ4s8X3YdQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=qBXAWQbr5SsprF8SJOIK9/pY5ty+NnoQDQ/FkzMyYAcbBylIawtHaRZd78qUdBNvHJPzHYgr6IfukO94XuQoCwB0E4v1M3gQDRe6hVZ6cskdDSgSNNNbKKxK0F4ow3leWizmuzF6cUVPF8n2QmY+s0EBCSNZB1AhXCkCsNl3dsE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1704905847; bh=ypv+1l/3tl+/H1y8RLk4ZT1rLlnWZOgzOwQ4s8X3YdQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=VHsSaeTI5BgGGXnKnXmGHV6/1tDI+Pi9sDyXSFa/2XPz5khhwcoI8NXD0WTtHWsvc F8+aclYZMjZTHTbxNdxC91oEyObgSJbeZ6LUbuGIGdSCozJRIPkkfn6V/fLKRvRQ5/ kYiuGofPAzpa7RtyeZ1uStnjkQ2FKKrtR3tljfgU= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C4B7F1E098; Wed, 10 Jan 2024 11:57:26 -0500 (EST) Message-ID: <3cf538c1-c8a9-404f-a2d2-86fd3d39fb5b@simark.ca> Date: Wed, 10 Jan 2024 11:57:26 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/dwarf2: Add support for DW_LNS_set_epilogue_begin in line-table To: Guinevere Larsen , gdb-patches@sourceware.org References: <20231221102925.377720-1-blarsen@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20231221102925.377720-1-blarsen@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/21/23 05:29, Guinevere Larsen wrote: > This commit adds a mechanism for GDB to detect the linetable opcode > DW_LNS_set_epilogue_begin. This opcode is set by compilers to indicate > that a certain instruction marks the point where the frame is destroyed. > > While the standard allows for multiple points marked with epilogue_begin > in the same function, for performance reasons, the function that > searches for the epilogue address will only find the last address that > sets this flag for a given block. > > This commit also changes amd64_stack_frame_destroyed_p_1 to attempt to > use the epilogue begin directly, and only if an epilogue can't be found > will it attempt heuristics based on the current instruction. > > Finally, this commit also changes the dwarf assembler to be able to emit > epilogue-begin instructions, to make it easier to test this patch Starting with this commit, I see: FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value == $fn_fba FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: check frame-id matches FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: bt 2 FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: up FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $sp_value == $::main_sp FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value == $::main_fba FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: [string equal $fid $::main_fid] Do you see it? Simon