public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.exp
@ 2023-01-25 12:44 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-01-25 12:44 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=621271c7819c3337e3eb5e48b7a7ee66573543da

commit 621271c7819c3337e3eb5e48b7a7ee66573543da
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Jan 25 13:44:17 2023 +0100

    [gdb/testsuite] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.exp
    
    Test-case gdb.base/unwind-on-each-insn.exp compiles $srcfile with debug info, and
    $srcfile2 without.
    
    Occasionally, I try both files with debug info:
    ...
    -             $srcfile $debug_flags $srcfile2 $nodebug_flags]]} {
    +             $srcfile $debug_flags $srcfile2 $debug_flags]]} {
    ...
    and both files without:
    ...
    -             $srcfile $debug_flags $srcfile2 $nodebug_flags]]} {
    +             $srcfile $nodebug_flags $srcfile2 $nodebug_flags]]} {
    ...
    
    In the latter case, I run into:
    ...
    FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: bt 2
    FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: up
    ...
    due to a mismatch between the regexp and the different output due to using
    nodebug.
    
    Fix this by making the regexp less strict.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
index a5e43c6228b..d6f90dde8c1 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
@@ -111,11 +111,11 @@ proc do_test { function step_cmd } {
 		"check frame-id matches"
 
 	    # Check that the previous frame is 'main'.
-	    gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*"
+	    gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?"
 
 	    # Move up the stack (to main).
 	    gdb_test "up" \
-		"\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*"
+		"\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?"
 
 	    # Check we can unwind the stack-pointer and the frame base
 	    # address correctly.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-25 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 12:44 [binutils-gdb] [gdb/testsuite] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).