From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Mg8uLU3x02koiwoAWB0awg (envelope-from ) for ; Mon, 06 Apr 2026 13:45:49 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=oHQ75Jj3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A81971E04F; Mon, 06 Apr 2026 13:45:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BEB3D1E04F for ; Mon, 06 Apr 2026 13:45:48 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 05CC04BA2E24 for ; Mon, 6 Apr 2026 17:45:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05CC04BA2E24 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=oHQ75Jj3 Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 346C94BA2E14 for ; Mon, 6 Apr 2026 17:45:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 346C94BA2E14 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 346C94BA2E14 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775497522; cv=none; b=O2nMDpKJqD6wzDhFjIkhnPHIoKTcH7H+tqCSs/yZm49VR4bprhRgaVO6mL8TXXUVrh8D1JOtXLgooQiQUcZPIjeIvhihyQTrNQTpxGrs7nlMdbYMEkUoQDRCQtKjYLkU7ysGaqFvZZ4I+Dc1rQkco27zJ7huI2XylxrSvMZNocs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775497522; c=relaxed/simple; bh=MqiPNE1dW0dXiXAfYmGtIusG8o9B5JZnEMRWc1OIjQM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=n+f8ypmkD3tbpz7HEGKL3FvkMoSH8CQu7838dbBhYdDY8VyIC9ZdkRAckSN+G8FPuJGCMFwxoKs0VmGqUclN0T8mdwFGUvpvUCQTE3IGnTtCO/EVsucI8QrMqoYkzOxz2neSrWnMvFjQLB1Uc2rCmaQBhwHcMU//dxiyNUEognw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 346C94BA2E14 Received: from eig-obgw-5001b.ext.cloudfilter.net ([10.0.29.181]) by cmsmtp with ESMTPS id 9khRw3At74Rkp9o0nwArVG; Mon, 06 Apr 2026 17:45:21 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 9o0iw3VJOeVHC9o0iwulg2; Mon, 06 Apr 2026 17:45:16 +0000 X-Authority-Analysis: v=2.4 cv=TfSWtQQh c=1 sm=1 tr=0 ts=69d3f131 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=A5OVakUREuEA:10 a=ItBw4LHWJt0A:10 a=_ZhYKdCeAAAA:8 a=zstS-IiYAAAA:8 a=RItQpjMv1PiOJoq9zYoA:9 a=uqOk3ZSnBfCTOznnrPA1:22 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2troUkfdYsbHl/g366f7Lsly+W5y/YzvqWyQPHFDwsM=; b=oHQ75Jj3mSqPWkEk9WYdaO2v1W QyXHb03vmVGBZ9yNTEkcW6j0lt3J7ZgTVnpOLqdUJ7JnN+rpbK+woTb0WGf7d9T96rJmkMoMpbXYc SXIjXN0V2vzedlh/1aoiXrgT1; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:52844 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9o0h-00000000eFr-3XBv; Mon, 06 Apr 2026 11:45:15 -0600 From: Tom Tromey To: simon.marchi@polymtl.ca Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2 1/2] gdb/testsuite: add .debug_frame support in DWARF assembler In-Reply-To: <20260318202801.2030268-1-simon.marchi@polymtl.ca> (simon marchi's message of "Wed, 18 Mar 2026 16:27:22 -0400") References: <20260316172239.349677-2-simon.marchi@efficios.com> <20260318202801.2030268-1-simon.marchi@polymtl.ca> X-Attribution: Tom Date: Mon, 06 Apr 2026 11:45:14 -0600 Message-ID: <87tstox9sl.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1w9o0h-00000000eFr-3XBv X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:52844 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfK05DsHx52Er6UMmiNQpI0mELsTPSVQlGfMFRgg/7oktyvWc7naTc88RZ/fTPgzoM5I+k8JlZ/gfG+zQRYMIK+HcRjDIAnrj6hSEuwdZbS4K2Xcqw6db qD343/pVut2f/NaPZke8jo58c8Mfjdg+NipycJw9PEi4h2ZK/jGqjlNHYZoh3U5d20Wsvys4rF8cKeM/iMnj3TnOhrbUwUjcLbA= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Simon" == simon marchi writes: Simon> Add support to the DWARF assembler for generating .debug_frame sections. Simon> My initial use case is to reproduce a crash happening when encountering Simon> an empty FDE, but I suppose that other use cases will pop up in the Simon> future. Thanks for doing this. I have one little note. Simon> + # Create procs for DW_CFA_* instructions, used in Simon> + # .debug_frame CIE/FDE bodies. Simon> + Simon> + # DW_CFA_advance_loc, DW_CFA_offset and Simon> + # DW_CFA_restore encode the operand in the low 6 Simon> + # bits of the opcode byte. They need special Simon> + # handling. Simon> + switch -exact -- $name { Simon> + DW_CFA_advance_loc { Simon> + proc DW_CFA_advance_loc {delta} { Simon> + _op .byte \ Simon> + "$Dwarf::_constants(DW_CFA_advance_loc) + $delta" \ Simon> + DW_CFA_advance_loc Simon> + } Simon> + } Simon> + Simon> + DW_CFA_offset { Simon> + proc DW_CFA_offset {register offset} { Simon> + _op .byte \ Simon> + "$Dwarf::_constants(DW_CFA_offset) + $register" \ Simon> + DW_CFA_offset Simon> + _op .uleb128 $offset "offset" Simon> + } Simon> + } Simon> + Simon> + DW_CFA_restore { Simon> + proc DW_CFA_restore {register} { Simon> + _op .byte \ Simon> + "$Dwarf::_constants(DW_CFA_restore) + $register" \ Simon> + DW_CFA_restore Simon> + } Simon> + } These procs could just be defined at the namespace level and then these constants just skipped here, like DW_CFA_advance_loc - DW_CFA_offset - DW_CFA_restore { # These need special handling and are predefined below. } I think this would be a bit clearer. Approved-By: Tom Tromey thanks, Tom