public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Lancelot SIX <lsix@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: Fix rtld-step-nodebugsym.exp Date: Thu, 10 Nov 2022 09:43:31 +0000 (GMT) [thread overview] Message-ID: <20221110094331.59A4F3858D28@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f735116b3fb6dc30912e969d6e8c1b15bbaef510 commit f735116b3fb6dc30912e969d6e8c1b15bbaef510 Author: Lancelot SIX <lancelot.six@amd.com> Date: Wed Nov 9 23:02:44 2022 +0000 gdb/testsuite: Fix rtld-step-nodebugsym.exp The test case introduced in bafcc335266 (Fix stepping in rtld without debug symbol) fails on some systems as reported by PR/29768. This can be seen if the system does not have debug info for the libc: (gdb) step^M Single stepping until exit from function main,^M which has no line number information.^M hello world[Inferior 1 (process 48203) exited normally]^M (gdb) PASS: gdb.base/rtld-step-nodebugsym.exp: step continue^M The program is not being run.^M (gdb) FAIL: gdb.base/rtld-step-nodebugsym.exp: continue until exit (the program is no longer running) Without glibc debug info, GDB steps until the program finishes, and then "gdb_continue_to_end" fails. As this test was designed to check that GDB does not crash in the "step" command, the continue does not carry real meaning to the test. Replace it by "print 0" so we still check that after the step command GDB is still alive, which is what we care about. Tested on Ubuntu-22.04 x86_64, with and without libc6-dbg. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29768 Approved-By: Simon Marchi <simon.marchi@efficios.com> Diff: --- gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp index 1c8fa478cb8..80ff1572c1a 100644 --- a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp +++ b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp @@ -29,4 +29,6 @@ if { ![runto_main] } { gdb_test "step" "Single stepping until exit from function.*" -gdb_continue_to_end "" continue 1 +# GDB used to crash while doing the step command. Check that this bug is +# fixed and that GDB is still alive at this point. +gdb_test "print 0" "= 0"
reply other threads:[~2022-11-10 9:43 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221110094331.59A4F3858D28@sourceware.org \ --to=lsix@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).