]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: fix "up to main" in gdb.base/corefile-exec-context.exp
authorLancelot SIX <lancelot.six@amd.com>
Fri, 7 Feb 2025 11:09:09 +0000 (11:09 +0000)
committerLancelot SIX <lancelot.six@amd.com>
Fri, 7 Feb 2025 20:05:33 +0000 (20:05 +0000)
On ubuntu systems with libc debug info available (libc6-dbg), I see the
following failures for the gdb.base/corefile-exec-context.exp testcase:

    show args
    Argument list to give program being debugged when it is started is "aaaaa bbbbb ccccc ddddd e\ e\ e\ e\ e".
    (gdb) PASS: gdb.base/corefile-exec-context.exp: show args
    up
    #1  __pthread_kill_internal (signo=6, threadid=133859295332160) at ./nptl/pthread_kill.c:78
    78 in ./nptl/pthread_kill.c
    (gdb) FAIL: gdb.base/corefile-exec-context.exp: move up to main

This failures is because the pattern used to parse the output of `up`
is not expecting what is seen when debugging information is present for
those frames.

This patch adjusts the pattern to allow both possible outputs.

Tested on ubuntu-22.04 and ubuntu24.04 with libc6-dbg installed for gdb
build with --with-separate-debug-dir=/usr/lib/debug.

Change-Id: I217d4b20006d0ecdb4b7a71eeb8d01597ec5ac63
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/corefile-exec-context.exp

index d6d4c0de4bea350868548d9f920499cceb44fd63..6bd2b04e2a0d2f261bcc306c669a05e86acea904 100644 (file)
@@ -108,7 +108,7 @@ gdb_test_multiple "up" "move up to main" {
        pass $gdb_test_name
     }
 
-    -re -wrap "#$decimal\\s+\[^\r\n\]+ in .*" {
+    -re -wrap "#$decimal\\s+\[^\r\n\]+ (in|at) .*" {
        send_gdb "up\n"
        exp_continue
     }