From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WI2hIP7dE2ZU/ycAWB0awg (envelope-from ) for ; Mon, 08 Apr 2024 08:07:26 -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=FOXK6QJd; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NJWl9rdf; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=1zE5kax9; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=a+hpQK/Q; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7116B1E0C0; Mon, 8 Apr 2024 08:07:26 -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 53DE61E030 for ; Mon, 8 Apr 2024 08:07:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6E2C3858C32 for ; Mon, 8 Apr 2024 12:07:23 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 437EA3858D20 for ; Mon, 8 Apr 2024 12:06:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 437EA3858D20 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 437EA3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712578022; cv=none; b=dwfAGAZ5bQzuM6N6F5x3LQSrT/RPHjU2wMeMnM+zbTy2l31R8Gw/kb5dx0gSpk2DUGrZ+z047M151Y0cTD4vlkVReNBfQaWy7iq7lm/ocMEcOwS9G1PfVRj3MGotmjTp6GIcPduqQGVuf8CU8kFl1/jjUvaWJhCGA02kDRaE7Fk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712578022; c=relaxed/simple; bh=yugChddxe6/dDhStjo9S0kkJlOPRgWGHKuAIjW//fbk=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:From:To; b=P2WBeM21bk9Et1v6Hp8XVyhLGwlfn7HgGThKoskSfnmKy864lC1pVxJOID7f5rNmVGEecnzi9X4uZai2WxG4Q8MngynGh2kh3JCIuLyzvHwShooqiq0bmqWF2cuRYKvSPbsDp19wvE+VtKMK1qqZc2f3jsEFRfjz5nneQkyL5zE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 143102286B for ; Mon, 8 Apr 2024 12:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712578018; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NzC7CCrbJUaaYtJMMQSOds6Cx5yUUlhSdOsxfO/J+jw=; b=FOXK6QJd+ZeZEgQ/MDcBAQ6XfPAWeW6cH8lGHOqFlBl0ocEZtZ4BQFdsPUgrJXQgWWY46D 2EnGfE2H0Ocwi5kXPyA1FbGij9piun2hXut1/i8875CSk4v6stYzyECTC9lPcBTIiGvlGj 3Q1gFabAPudnTpkV/3XrzIyNERI1T5A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712578018; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NzC7CCrbJUaaYtJMMQSOds6Cx5yUUlhSdOsxfO/J+jw=; b=NJWl9rdfbIE9AQSKaPs9ZkBw78EKaTmh2VzjcTIwYwxZB0YkLkS1IYAYcmkzO1MmLWNChX ZGPyKcGixj5BxGBw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=1zE5kax9; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="a+hpQK/Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712578017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NzC7CCrbJUaaYtJMMQSOds6Cx5yUUlhSdOsxfO/J+jw=; b=1zE5kax9pVybbBiXPR9lW4xFEMu6JRk3epAt0qpRsH/3Rz7GMl2Hl/qWyI22WCcF5jd1+e 5ITdUOxKp+QVL3041HGxnFTuykz9JjxYfPVX/H3MNX1uJ1Zfqe/8Kf3ATTci6adyIOjsXO +T0fBfxcC59LiBhiyh4n276xcHWvBQM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712578017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NzC7CCrbJUaaYtJMMQSOds6Cx5yUUlhSdOsxfO/J+jw=; b=a+hpQK/QHwmhQlZGtLO3NMrZR27brMghZSL8U5Efxl/B8Y8N4QrJ2uaQctczjOcbPMii+y MTAdr9w+jeTJEqAg== 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 01609137D4 for ; Mon, 8 Apr 2024 12:06:56 +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 eeZqOuDdE2ZSIgAAD6G6ig (envelope-from ) for ; Mon, 08 Apr 2024 12:06:56 +0000 Message-ID: <9b940e4b-3c54-4285-9f6e-c93552c667f7@suse.de> Date: Mon, 8 Apr 2024 14:07:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] [gdb/testsuite] Require address update for DW_LNE_end_sequence Content-Language: en-US From: Tom de Vries To: gdb-patches@sourceware.org References: <20240404151827.18126-1-tdevries@suse.de> In-Reply-To: <20240404151827.18126-1-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.50 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 143102286B X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.50 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; XM_UA_NO_VERSION(0.01)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sourceware.org:url,suse.de:dkim,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_TLS_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Spam-Status: No, score=-12.3 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 On 4/4/24 17:18, Tom de Vries wrote: > With test-case gdb.dwarf2/dw2-epilogue-begin.exp, we have an end_sequence > entry with the same address as the line entry before it: > ... > File name Line number Starting address View Stmt > > dw2-epilogue-begin.c 44 0x4101e8 x > dw2-epilogue-begin.c 47 0x4101ec x > dw2-epilogue-begin.c - 0x4101ec > ... > and consequently the line entry is removed by gdb: > ... > INDEX LINE REL-ADDRESS UNREL-ADDRESS IS-STMT PRO EPI > 0 20 0x00000000004101a8 0x00000000004101a8 Y Y Y > 1 27 0x00000000004101b0 0x00000000004101b0 Y > 2 32 0x00000000004101b8 0x00000000004101b8 Y Y > 3 34 0x00000000004101c0 0x00000000004101c0 Y Y > 4 35 0x00000000004101c8 0x00000000004101c8 Y > 5 40 0x00000000004101d4 0x00000000004101d4 Y Y > 6 44 0x00000000004101e8 0x00000000004101e8 Y > 7 END 0x00000000004101ec 0x00000000004101ec Y > ... > > This is a common mistake in dwarf assembly test-cases. > > Fix this by: > - requiring an address update for each DW_LNE_end_sequence, and > - fixing the test-cases where that triggers an error. > > I also encountered the error in test-case gdb.dwarf2/dw2-bad-elf.exp, and in > this case I worked around it using "DW_LNS_advance_pc 0". > > Tested on aarch64-linux. > I've submitted a v2 that adds a patch that also fixes missing end_sequence ( https://sourceware.org/bugzilla/show_bug.cgi?id=31618 ). The other patches are unchanged. Thanks, - Tom > PR testsuite/31592 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31592 > --- > gdb/testsuite/gdb.base/until-trailing-insns.exp | 3 +-- > gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp | 6 ++++++ > .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 1 - > gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp | 1 + > .../gdb.dwarf2/dw2-inline-small-func.exp | 2 ++ > gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp | 1 + > gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 6 ------ > gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 15 +++++---------- > gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp | 4 ---- > .../gdb.dwarf2/locexpr-data-member-location.exp | 7 +++---- > gdb/testsuite/lib/dwarf.exp | 13 +++++++++++++ > 11 files changed, 32 insertions(+), 27 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/until-trailing-insns.exp b/gdb/testsuite/gdb.base/until-trailing-insns.exp > index aed36814809..baa5f1fa32c 100644 > --- a/gdb/testsuite/gdb.base/until-trailing-insns.exp > +++ b/gdb/testsuite/gdb.base/until-trailing-insns.exp > @@ -147,9 +147,8 @@ Dwarf::assemble $asm_file { > line [gdb_get_line_number "TAG: main return"] > DW_LNS_negate_stmt > DW_LNS_copy > + > DW_LNE_set_address $main_end > - line [expr [gdb_get_line_number "TAG: main return"] + 1] > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp > index 71c5bf9014d..63d83fb9416 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp > @@ -128,9 +128,12 @@ Dwarf::assemble $asm_file { > DW_LNE_set_address [lindex $main_result 0] > DW_LNS_advance_line 10 > DW_LNS_copy > + > DW_LNS_advance_pc [lindex $main_result 1] > DW_LNS_advance_line 19 > DW_LNS_copy > + > + DW_LNS_advance_pc 0 > DW_LNE_end_sequence > } > } > @@ -144,9 +147,12 @@ Dwarf::assemble $asm_file { > DW_LNE_set_address some_func > DW_LNS_advance_line 5 > DW_LNS_copy > + > DW_LNS_advance_pc 64 > DW_LNS_advance_line 8 > DW_LNS_copy > + > + DW_LNS_advance_pc 0 > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp > index 425dd971333..aa84a20b09c 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp > @@ -87,7 +87,6 @@ Dwarf::assemble $asm_file { > DW_LNS_copy > > DW_LNE_set_address $main_end > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp > index f646e23da62..7ae14fa9b5a 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp > @@ -134,6 +134,7 @@ Dwarf::assemble $asm_file { > DW_LNS_set_epilogue_begin > DW_LNS_copy > > + DW_LNE_set_address "$main_start + $main_len" > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp > index 1ba346b9758..b117c8910f0 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp > @@ -108,6 +108,8 @@ Dwarf::assemble $asm_file { > > DW_LNE_set_address line_label_3 > DW_LNS_copy > + > + DW_LNE_set_address "$main_start + $main_len" > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp > index 8d85464a826..caa40861f87 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp > @@ -72,6 +72,7 @@ Dwarf::assemble $asm_file { > line [gdb_get_line_number "main end"] > DW_LNS_copy > > + DW_LNE_set_address "$main_start + $main_len" > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > index 13e7c98dcf1..1a3d53c2116 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > @@ -79,24 +79,18 @@ Dwarf::assemble $asm_file { > DW_LNS_advance_line 10 > DW_LNS_copy > DW_LNS_advance_pc [lindex $main_func 1] > - DW_LNS_advance_line 19 > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address [lindex $frame2_func 0] > DW_LNS_advance_line 20 > DW_LNS_copy > DW_LNS_advance_pc [lindex $frame2_func 1] > - DW_LNS_advance_line 29 > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address [lindex $frame3_func 0] > DW_LNS_advance_line 30 > DW_LNS_copy > DW_LNS_advance_pc [lindex $frame3_func 1] > - DW_LNS_advance_line 39 > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp > index ea69af44601..c952e82b335 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp > @@ -133,9 +133,8 @@ proc do_test {suffix} { > DW_LNE_set_address main_label2 > line [gdb_get_line_number "main return"] > DW_LNS_copy > + > DW_LNE_set_address $main_end > - line [expr [gdb_get_line_number "main end"] + 1] > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address $foo_start > @@ -150,25 +149,22 @@ proc do_test {suffix} { > DW_LNE_set_address foo_label3 > line [gdb_get_line_number "foo end"] > DW_LNS_copy > + > DW_LNE_set_address $foo_end > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address $bar_start > line [gdb_get_line_number "bar end"] > DW_LNS_copy > + > DW_LNS_advance_pc $bar_len > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address $baz_start > line [gdb_get_line_number "baz end"] > DW_LNS_copy > + > DW_LNS_advance_pc $baz_len > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > > DW_LNE_set_address $foo_cold_start > @@ -180,9 +176,8 @@ proc do_test {suffix} { > DW_LNE_set_address foo_cold_label2 > line [gdb_get_line_number "foo_cold end"] > DW_LNS_copy > + > DW_LNE_set_address $foo_cold_end > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp > index d2ea91e2d3d..567049adc87 100644 > --- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp > +++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp > @@ -93,8 +93,6 @@ Dwarf::assemble $asm_file_1 { > DW_LNS_copy > > DW_LNE_set_address $func_end > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > } > } > @@ -177,8 +175,6 @@ Dwarf::assemble $asm_file_2 { > DW_LNS_copy > > DW_LNE_set_address $main_end > - DW_LNS_advance_line 2 > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp > index ca597aaaa3e..a1c0e7705b3 100644 > --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp > +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp > @@ -283,11 +283,11 @@ Dwarf::assemble ${asm_file} { > DW_LNS_copy > line [gdb_get_line_number "foo end" $libsrc] > DW_LNS_copy > + > DW_LNE_set_address $foo_end > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > > + > DW_LNE_set_address $bar_start > line [gdb_get_line_number "bar prologue" $libsrc] > DW_LNS_copy > @@ -296,9 +296,8 @@ Dwarf::assemble ${asm_file} { > DW_LNS_copy > line [gdb_get_line_number "bar end" $libsrc] > DW_LNS_copy > + > DW_LNE_set_address $bar_end > - DW_LNS_advance_line 1 > - DW_LNS_copy > DW_LNE_end_sequence > } > } > diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp > index d085f835f07..816440f975f 100644 > --- a/gdb/testsuite/lib/dwarf.exp > +++ b/gdb/testsuite/lib/dwarf.exp > @@ -2545,13 +2545,17 @@ namespace eval Dwarf { > proc program { body } { > variable _line_header_end_label > variable _line > + variable _line_address_update > > > set _line 1 > + set _line_address_update 0 > > _line_finalize_header > > proc DW_LNE_set_address {addr} { > + variable _line_address_update > + set _line_address_update 1 > _op .byte 0 > set start [new_label "set_address_start"] > set end [new_label "set_address_end"] > @@ -2567,6 +2571,11 @@ namespace eval Dwarf { > } > > proc DW_LNE_end_sequence {} { > + variable _line_address_update > + if { $_line_address_update == 0 } { > + error "Missing address update for end_sequence" > + } > + set _line_address_update 0 > variable _line > _op .byte 0 > _op .uleb128 1 > @@ -2591,6 +2600,8 @@ namespace eval Dwarf { > } > > proc DW_LNS_copy {} { > + variable _line_address_update > + set _line_address_update 0 > _op .byte 1 > } > > @@ -2607,6 +2618,8 @@ namespace eval Dwarf { > } > > proc DW_LNS_advance_pc {offset} { > + variable _line_address_update > + set _line_address_update 1 > _op .byte 2 > _op .uleb128 ${offset} > } > > base-commit: f9c9ef44f00238c79d586b385daa14d46a76733a