From: Lancelot SIX Date: Fri, 7 Feb 2025 11:09:09 +0000 (+0000) Subject: gdb/testsuite: fix "up to main" in gdb.base/corefile-exec-context.exp X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae84e36caf44936ee94d9dcbfe427ff0bd9434df;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite: fix "up to main" in gdb.base/corefile-exec-context.exp 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 --- diff --git a/gdb/testsuite/gdb.base/corefile-exec-context.exp b/gdb/testsuite/gdb.base/corefile-exec-context.exp index d6d4c0de4be..6bd2b04e2a0 100644 --- a/gdb/testsuite/gdb.base/corefile-exec-context.exp +++ b/gdb/testsuite/gdb.base/corefile-exec-context.exp @@ -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 }