From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uCXkKePEDmbMRiMAWB0awg (envelope-from ) for ; Thu, 04 Apr 2024 11:18:59 -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=erktPtKL; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=gmDdmMSD; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=erktPtKL; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=gmDdmMSD; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 923581E0C1; Thu, 4 Apr 2024 11:18:59 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 412CA1E030 for ; Thu, 4 Apr 2024 11:18:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D49F338449C2 for ; Thu, 4 Apr 2024 15:18:56 +0000 (GMT) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id C66E8385841D for ; Thu, 4 Apr 2024 15:18:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C66E8385841D 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 C66E8385841D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712243907; cv=none; b=yAmHiWgP73WX9YMAfZtvqbMl0FZUW6g+FF4iR+KDroZJEJ5HSIhESZFEUbK5x/qjj5iHLPLZr7ITTJv2WhjMU0GdxCBWa2EqejhDpuWdrz83U9lldKyLGSn2VVEsU1lE0mTe/bgkn0gOBtKelmnuOQZybfczG/4/ihsRCHmMsFo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712243907; c=relaxed/simple; bh=+LbFIuS4czbgCNLa1r6rL7hs3Hgp6razgq/+rQ/4ou0=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=cBb+flV1Ir6p2Kcw84U5sNCx1UTg7Q69VJbpeg+3c6FG3s+qWq2yExEev8rD7G9ybtVwauOXE3cWsxSmLQxiTkECOFVhQTCZ7hSjZiPzsghTEk47vXAh3LkzuDQ1u3kbLnlBMfRAXUm7QjwSh2owLJI1JI3owPpa6n5wUNiYAuk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (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-out2.suse.de (Postfix) with ESMTPS id E1E525F85B for ; Thu, 4 Apr 2024 15:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712243903; 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=ovw8Zwrr7KsI8r2UH0daK3mtsPOoR40t3zuy7bxP0vY=; b=erktPtKLlPumoU3amm179TMaX6ItC1ej8sPSE99F638yQ2wJfWopRCUYolQUA9x7K0hnhR I+u7S/9VCfvOGKNTlLJE5MEzs5c1UoiY+pXXdzcktBlJ9OKpWleAGWA6vTXKPUS6nnCkvt ILHXzmu1P6H60Bs/XAvUO/Vf6o5kgi8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712243903; 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=ovw8Zwrr7KsI8r2UH0daK3mtsPOoR40t3zuy7bxP0vY=; b=gmDdmMSD1poX0Lhy3Z3h8wXdEMNZoOT3f3eim7R229IyCUB/M7s03PcLmRFMmi4i/KTnDx kauufVfLmBEEdcCg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=erktPtKL; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=gmDdmMSD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712243903; 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=ovw8Zwrr7KsI8r2UH0daK3mtsPOoR40t3zuy7bxP0vY=; b=erktPtKLlPumoU3amm179TMaX6ItC1ej8sPSE99F638yQ2wJfWopRCUYolQUA9x7K0hnhR I+u7S/9VCfvOGKNTlLJE5MEzs5c1UoiY+pXXdzcktBlJ9OKpWleAGWA6vTXKPUS6nnCkvt ILHXzmu1P6H60Bs/XAvUO/Vf6o5kgi8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712243903; 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=ovw8Zwrr7KsI8r2UH0daK3mtsPOoR40t3zuy7bxP0vY=; b=gmDdmMSD1poX0Lhy3Z3h8wXdEMNZoOT3f3eim7R229IyCUB/M7s03PcLmRFMmi4i/KTnDx kauufVfLmBEEdcCg== Received: from imap2.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 imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id CB49C13AA3 for ; Thu, 4 Apr 2024 15:18:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id CEttML/EDma1GQAAn2gu4w (envelope-from ) for ; Thu, 04 Apr 2024 15:18:23 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 3/3] [gdb/testsuite] Fix end_sequence addresses Date: Thu, 4 Apr 2024 17:18:27 +0200 Message-Id: <20240404151827.18126-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240404151827.18126-1-tdevries@suse.de> References: <20240404151827.18126-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-4.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[suse.de:dkim]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap2.dmz-prg2.suse.org:helo,imap2.dmz-prg2.suse.org:rdns,suse.de:dkim]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Action: no action X-Rspamd-Queue-Id: E1E525F85B X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Score: -4.01 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 I noticed in test-case gdb.reverse/map-to-same-line.exp, that the end of main: ... 00000000004102c4 : 4102c4: 52800000 mov w0, #0x0 // #0 4102c8: 9100c3ff add sp, sp, #0x30 4102cc: d65f03c0 ret ... is not described by the line table: ... File name Line number Starting address View Stmt ... map-to-same-line.c 54 0x4102ac x map-to-same-line.c - 0x4102c4 ... Fix this by ending the line table at $main_end. Likewise in a few other test-cases, found using: ... $ find gdb/testsuite/ -type f \ | xargs grep -B1 DW_LNE_end_sequence \ | grep set_address \ | egrep -v "_end|_len" ... Tested on aarch64-linux. --- gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp | 7 +++++-- gdb/testsuite/gdb.dwarf2/dw2-lines.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp | 4 +++- gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl | 2 +- gdb/testsuite/gdb.reverse/map-to-same-line.c | 1 - gdb/testsuite/gdb.reverse/map-to-same-line.exp | 3 ++- 10 files changed, 16 insertions(+), 11 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp index 1880f4cb7fb..5d6e13a9ae0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp @@ -70,7 +70,7 @@ Dwarf::assemble $asm_file { line [line_for bar_label] DW_LNS_copy - DW_LNE_set_address bar_label_2 + DW_LNE_set_address $bar_end DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp index 6d12e968f41..1f30c5c3316 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp @@ -146,7 +146,7 @@ proc do_test { start_label func_name tag } { DW_LNS_advance_line 1 DW_LNS_copy - DW_LNE_set_address line_label_7 + DW_LNE_set_address "$main_start + $main_len" DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp index 6a5f7d6dd76..68f1fc83859 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp @@ -134,7 +134,7 @@ Dwarf::assemble $asm_file { DW_LNS_advance_line 1 DW_LNS_copy - DW_LNE_set_address line_label_7 + DW_LNE_set_address "$main_start + $main_len" DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp index b3db154db25..1b8d136e70e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp @@ -123,7 +123,7 @@ Dwarf::assemble $asm_file { DW_LNS_negate_stmt DW_LNS_copy - DW_LNE_set_address line_label_7 + DW_LNE_set_address "$main_start + $main_len" DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp index 603a616930a..c510de42037 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp @@ -27,6 +27,9 @@ Dwarf::assemble $asm_file { declare_labels Llines global srcdir subdir srcfile + get_func_info bar1 + get_func_info bar2 + cu {} { compile_unit { {language @DW_LANG_C} @@ -69,7 +72,7 @@ Dwarf::assemble $asm_file { line 33 DW_LNS_copy - DW_LNE_set_address bar1_label_5 + DW_LNE_set_address $bar1_end DW_LNE_end_sequence @@ -91,7 +94,7 @@ Dwarf::assemble $asm_file { line 47 DW_LNS_copy - DW_LNE_set_address bar2_label_5 + DW_LNE_set_address $bar2_end DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp index 5fd6ae04d38..85d5e9c8afb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp @@ -104,7 +104,7 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} { line [line_for bar_label_4] DW_LNS_copy - DW_LNE_set_address bar_label_5 + DW_LNE_set_address "$main_start + $main_len" DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp index 671e3e634ac..5a0705fc613 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp @@ -30,6 +30,8 @@ Dwarf::assemble $asm_file { set DW_LNE_lo_usr 0x80 set DW_LNE_hi_usr 0xff + get_func_info main + cu {} { compile_unit { {language @DW_LANG_C} @@ -54,7 +56,7 @@ Dwarf::assemble $asm_file { DW_LNE_user 2 $DW_LNE_hi_usr DW_LNS_copy - DW_LNE_set_address main_label_2 + DW_LNE_set_address $main_end DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl index 968378620a0..5817b2b0f53 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl +++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl @@ -110,7 +110,7 @@ Dwarf::assemble $asm_file { DW_LNS_negate_stmt DW_LNS_copy - DW_LNE_set_address line_label_7 + DW_LNE_set_address "$func_start + $func_len" DW_LNE_end_sequence } } diff --git a/gdb/testsuite/gdb.reverse/map-to-same-line.c b/gdb/testsuite/gdb.reverse/map-to-same-line.c index 45e7ffb0f06..7185955f40a 100644 --- a/gdb/testsuite/gdb.reverse/map-to-same-line.c +++ b/gdb/testsuite/gdb.reverse/map-to-same-line.c @@ -53,6 +53,5 @@ main (void) asm ("main_return: .globl main_return"); k = j; f3 = f2; str_3 = str_2; /* TAG: main return */ - asm ("end_of_sequence: .globl end_of_sequence"); return 0; /* TAG: main return */ } diff --git a/gdb/testsuite/gdb.reverse/map-to-same-line.exp b/gdb/testsuite/gdb.reverse/map-to-same-line.exp index b556e7cb676..067fe012702 100644 --- a/gdb/testsuite/gdb.reverse/map-to-same-line.exp +++ b/gdb/testsuite/gdb.reverse/map-to-same-line.exp @@ -100,7 +100,8 @@ Dwarf::assemble $asm_file { DW_LNE_set_address main_return line [gdb_get_line_number "TAG: main return"] DW_LNS_copy - DW_LNE_set_address end_of_sequence + + DW_LNE_set_address $main_end DW_LNE_end_sequence } } -- 2.35.3