From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +RknNWNqEGr3Ug8AWB0awg (envelope-from ) for ; Fri, 22 May 2026 10:38:27 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D09231E091; Fri, 22 May 2026 10:38:27 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 CE2C01E024 for ; Fri, 22 May 2026 10:38:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5599B48F5265 for ; Fri, 22 May 2026 14:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5599B48F5265 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id AF65F48F5270 for ; Fri, 22 May 2026 14:37:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF65F48F5270 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AF65F48F5270 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779460665; cv=none; b=pHHlMkE2877WfXG/fnXohDctF+G+p455Brzgja9me8sxJsnWvOiS9S1JbcBWi8XZn8cG0yG5B2eVCy+Zrz9hGGcnfu6Q+dveqH+eJ8q70g407pmLq/Qi6cRG2Ftr401pUBind2ZfkEbPTukycdC3xuPTmFMlQr0Bb8NENPEjhhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779460665; c=relaxed/simple; bh=AooheyrE8zjxW8+YHeZPaAaxzJlHtSZPSeZwv3u2tzE=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=WUpZHFQWa7OixRk+XuL7ksVPgQBlGQ3RB7Meg4/OgujyYnO896Uy3IMiz+5h9B89TsruKiP/6Pxz9XbK6GOFCebu111RC5aRX4q+Qf3FtxJugmmeR10B3be6TtgsPTJAlqtZ3PFQvjIvHPDe81AnpcBgwdN0zvy9XsddpDUWoSc= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=iAufXjQC; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1Tbx4ZHt DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF65F48F5270 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AB0306B044 for ; Fri, 22 May 2026 14:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1779460658; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlpXoqfeWUrcoFKQ0P6PgQYzoHcuEuuINJhxeRVtwBU=; b=iAufXjQCFWcton03HSThusiugLtNE7MJYRm1Z6sTMuT5VcMuEU1Vpunvdg9JBozQEHL0K2 dJVcJ9pA/iTrXM2i4dXnWO3+clbotsy3DwUMSfR2Jjh0xnO0aVt/SBmToZxx7HmrverOwR egQl3n+t4BE7QUdBPTkUOb+k6yXx7WU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1779460658; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlpXoqfeWUrcoFKQ0P6PgQYzoHcuEuuINJhxeRVtwBU=; b=1Tbx4ZHtZpIHZQvt7vupQ0hipuO0+ltZZRpewkryZUTqTj+h9fGbfV3s+XQit3+t3bjl0J 6zOZOyFPGfZcKWCQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1779460658; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlpXoqfeWUrcoFKQ0P6PgQYzoHcuEuuINJhxeRVtwBU=; b=iAufXjQCFWcton03HSThusiugLtNE7MJYRm1Z6sTMuT5VcMuEU1Vpunvdg9JBozQEHL0K2 dJVcJ9pA/iTrXM2i4dXnWO3+clbotsy3DwUMSfR2Jjh0xnO0aVt/SBmToZxx7HmrverOwR egQl3n+t4BE7QUdBPTkUOb+k6yXx7WU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1779460658; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlpXoqfeWUrcoFKQ0P6PgQYzoHcuEuuINJhxeRVtwBU=; b=1Tbx4ZHtZpIHZQvt7vupQ0hipuO0+ltZZRpewkryZUTqTj+h9fGbfV3s+XQit3+t3bjl0J 6zOZOyFPGfZcKWCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 92E88593AE for ; Fri, 22 May 2026 14:37:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yFpRIjJqEGqTdAAAD6G6ig (envelope-from ) for ; Fri, 22 May 2026 14:37:38 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/4] [gdb/testsuite] Complete 64-bit port of gdb.dwarf2/dw2-skip-prologue.exp Date: Fri, 22 May 2026 16:37:35 +0200 Message-ID: <20260522143737.3373000-3-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260522143737.3373000-1-tdevries@suse.de> References: <20260522143737.3373000-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,sourceware.org:url,gnu.org:url]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] 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 Test-source gdb.dwarf2/dw2-skip-prologue.S was generated using 32-bit, and subsequently ported to 64-bit using macro PTRBYTE. When using 64-bit, there are some readelf -w warnings because the port to 64-bit is not complete. Fix these warnings. Likewise in gdb.dwarf/dw2-const.exp. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34157 --- gdb/testsuite/gdb.dwarf2/dw2-const.S | 18 ++++++++++--- gdb/testsuite/gdb.dwarf2/dw2-const.exp | 12 ++++++++- gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 28 +++++++++++--------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.S b/gdb/testsuite/gdb.dwarf2/dw2-const.S index 94cf1acbed6..1161633f181 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-const.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-const.S @@ -15,6 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#if PTRBITS == 64 +# define PTRBYTE .8byte +# define PTRBYTES 8 +#elif PTRBITS == 32 +# define PTRBYTE .4byte +# define PTRBYTES 4 +#else +# error "Unsupported pointer size" +#endif + /* Dummy function to provide debug information for. */ .text @@ -228,9 +238,9 @@ func_cu1: .Lline1_lines: .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 - .4byte .Lbegin_func_cu1 + PTRBYTE .Lbegin_func_cu1 .byte 3 /* DW_LNS_advance_line */ .sleb128 3 /* ... to 4 */ @@ -240,9 +250,9 @@ func_cu1: .byte 1 /* DW_LNS_copy (second time as an end-of-prologue marker) */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 - .4byte .Lend_func_cu1 + PTRBYTE .Lend_func_cu1 .byte 0 /* DW_LNE_end_of_sequence */ .uleb128 1 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp index 93ddfaa0f2f..f855659f8bd 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp @@ -19,8 +19,18 @@ require dwarf2_support standard_testfile .S +if {[is_ilp32_target]} { + set ptrbits 32 +} else { + set ptrbits 64 +} + +set srcfile_opts {} +lappend srcfile_opts nodebug +lappend srcfile_opts additional_flags=-DPTRBITS=$ptrbits + if {[prepare_for_testing_full "failed to prepare" \ - [list $testfile debug main.c debug $srcfile nodebug]]} { + [list $testfile debug main.c debug $srcfile $srcfile_opts]]} { return } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S index 19165a513a4..11d794bc412 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S @@ -17,8 +17,10 @@ #if PTRBITS == 64 # define PTRBYTE .8byte +# define PTRBYTES 8 #elif PTRBITS == 32 # define PTRBYTE .4byte +# define PTRBYTES 4 #else # error "Unsupported pointer size" #endif @@ -130,7 +132,7 @@ loclist: 1: .byte 0x50 /* DW_OP_reg0 */ 2: /* Location list end. */ - .4byte 0, 0 + PTRBYTE 0, 0 /* Abbrev table */ .section .debug_abbrev @@ -283,7 +285,7 @@ loclist: .Lline1_lines: .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func_start .byte 3 /* DW_LNS_advance_line */ @@ -291,7 +293,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func0 .byte 4 /* DW_LNS_set_file */ @@ -301,7 +303,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func1 .byte 4 /* DW_LNS_set_file */ @@ -311,7 +313,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func2 .byte 4 /* DW_LNS_set_file */ @@ -321,7 +323,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func3 .byte 4 /* DW_LNS_set_file */ @@ -331,14 +333,14 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE func_end /* Equivalent copy but renamed s/func/fund/. */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund_start .byte 3 /* DW_LNS_advance_line */ @@ -346,7 +348,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund0 .byte 4 /* DW_LNS_set_file */ @@ -356,7 +358,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund1 .byte 4 /* DW_LNS_set_file */ @@ -366,7 +368,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund2 .byte 4 /* DW_LNS_set_file */ @@ -376,7 +378,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund3 .byte 4 /* DW_LNS_set_file */ @@ -386,7 +388,7 @@ loclist: .byte 1 /* DW_LNS_copy */ .byte 0 /* DW_LNE_set_address */ - .uleb128 5 + .uleb128 1 + PTRBYTES .byte 2 PTRBYTE fund_end -- 2.51.0