* [pushed] [gdb/tui] Fix gdb.tui/tui-layout-asm-short-prog.exp
@ 2026-09-19 21:37 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-09-19 21:37 UTC (permalink / raw)
To: gdb-patches
Recent commit ("[gdb/tui] Improve section handling in
tui_find_backward_disassembly_start_address") breaks test-case
gdb.tui/tui-layout-asm-short-prog.exp on aarch64-linux, because it expects not
being able to disassemble instructions before .text.
It's easy enough to fix that using:
...
-Term::command "- 15"
+Term::command "- 4"
...
but AFAIU, that breaks the purpose of the test-case.
So instead, used objcopy --remove-section=.note.* to strip the sections
before .text.
---
gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp b/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp
index b3dd72ce1ce..6a668ad16d0 100644
--- a/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp
+++ b/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp
@@ -30,6 +30,18 @@ if { [build_executable "failed to prepare" $testfile $srcfile $opts] == -1 } {
return
}
+# This test-case relies on not being able to scroll to before _start. Strip
+# the notes to make sure there are no sections before start.
+
+set objcopy_program [gdb_find_objcopy]
+set res \
+ [remote_exec host \
+ "$objcopy_program --remove-section=.note.* $binfile"]
+if {[lindex $res 0] != 0} {
+ unsupported "Couldn't strip notes"
+ return
+}
+
Term::clean_restart 24 80 $testfile
if {![Term::prepare_for_tui]} {
unsupported "TUI not supported"
base-commit: e26e14a40e9be83fa37a2c42be93404415facf80
--
2.51.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-19 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 21:37 [pushed] [gdb/tui] Fix gdb.tui/tui-layout-asm-short-prog.exp Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox