From: Carl Love <cel@linux.ibm.com>
To: gdb-patches@sourceware.org, Tom de Vries <tdevries@suse.de>,
Carl Love <cel@linux.ibm.com>
Subject: Re: [PATCH v2 3/4] [gdb/testsuite] Fix end_sequence addresses
Date: Wed, 24 Apr 2024 11:28:54 -0700 [thread overview]
Message-ID: <8032f800-235f-4181-a84e-2f2fb2a086b7@linux.ibm.com> (raw)
In-Reply-To: <7d515dd6-f327-4587-89c6-ed7e93b7efdd@linux.ibm.com>
Tom:
The following patch fixes the issue for me on PowerPC. Please let me know if it looks ok and if the patch works on your systems as well. Thanks.
Carl
----------------------------------------------------------------------
Fix end_sequence addresses for dw2-lines.exp
The patch:
From f0d556d14b1d1c3f8e2f9c13b08adca22e1b8c9c Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 17 Apr 2024 12:55:00 +0200
Subject: [PATCH] [gdb/testsuite] Fix end_sequence addresses
I noticed in test-case gdb.reverse/map-to-same-line.exp, that the end of main:
...
00000000004102c4 <end_of_sequence>:
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(-)
The issue in file dw2-lines.exp is the change
- DW_LNE_set_address bar_label_5
+ DW_LNE_set_address "$main_start + $main_len"
The label bar_label_5 is in function bar, not function main. The new
set address should have been $bar_start + $bar_len.
---
gdb/testsuite/gdb.dwarf2/dw2-lines.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
index 85d5e9c8afb..af5b6b71768 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 "$main_start + $main_len"
+ DW_LNE_set_address "$bar_start + $bar_len"
DW_LNE_end_sequence
}
}
--
2.44.0
next prev parent reply other threads:[~2024-04-24 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 12:04 [PATCH v2 1/4] [gdb/testsuite] Require address update for DW_LNE_end_sequence Tom de Vries
2024-04-08 12:04 ` [PATCH v2 2/4] [gdb/testsuite] Require address update for DW_LNS_copy Tom de Vries
2024-04-08 12:04 ` [PATCH v2 3/4] [gdb/testsuite] Fix end_sequence addresses Tom de Vries
2024-04-24 17:45 ` Carl Love
2024-04-24 18:07 ` Carl Love
2024-04-24 18:28 ` Carl Love [this message]
2024-04-24 21:07 ` Tom de Vries
2024-04-25 17:05 ` Carl Love
2024-04-25 20:46 ` Tom de Vries
2024-04-08 12:04 ` [PATCH v2 4/4] [gdb/testsuite] Require DW_LNE_end_sequence Tom de Vries
2024-04-17 10:58 ` [PATCH v2 1/4] [gdb/testsuite] Require address update for DW_LNE_end_sequence Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8032f800-235f-4181-a84e-2f2fb2a086b7@linux.ibm.com \
--to=cel@linux.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox