From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id 14B053858CDA; Fri, 7 Oct 2022 19:17:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14B053858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665170229; bh=lrxwWBUw/SXvrQ0higBcSGHWiRW5eaFrk8kO5epX14o=; h=From:To:Subject:Date:From; b=R5kvTdgDwN8mDmlFCD4mXizKuJcl+EGfP3PUo28246LTTIQ3t8WAECusBMrjRdl4c 4NsOPWLgLdmQooodHhSidHCrERnVF94muNS1bDjYtiNUguuiXucnBIP2efJ7prKbGx xtwVLvwT6TC7gxWfwEbUHxY6Gbv7Er5IHVzaBpVU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: fix gdb.threads/linux-dp.exp regex X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: 7808a1f7f68cb38f66cf44bb91faae29b0dbfedd X-Git-Newrev: ae17d05a4a58baf42f297dfd40ed29256f4bc44d Message-Id: <20221007191709.14B053858CDA@sourceware.org> Date: Fri, 7 Oct 2022 19:17:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dae17d05a4a58= baf42f297dfd40ed29256f4bc44d commit ae17d05a4a58baf42f297dfd40ed29256f4bc44d Author: Lancelot SIX Date: Fri Oct 7 14:44:40 2022 +0100 gdb/testsuite: fix gdb.threads/linux-dp.exp regex =20 On ubuntu 22.04 with the libc6-dbg package installed, I have the following failure: =20 where #0 print_philosopher (n=3D3, left=3D33 '!', right=3D33 '!') at ...= /gdb/testsuite/gdb.threads/linux-dp.c:105 #1 0x000055555555576a in philosopher (data=3D0x55555555937c) at ..= ./gdb/testsuite/gdb.threads/linux-dp.c:148 #2 0x00007ffff7e11b43 in start_thread (arg=3D) at .= /nptl/pthread_create.c:442 #3 0x00007ffff7ea3a00 in clone3 () at ../sysdeps/unix/sysv/linux/x= 86_64/clone3.S:81 (gdb) FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpo= int hit =20 The regex for this test accounts for different situations (with / without debug symbol) but assumes that if debug info is present the backtrace shows execution under pthread_create. However, for the implementation under test, we are under start_thread. =20 Update the regex to accept start_thread. =20 Tested on Ubuntu-22.04 x86_64 with and without libc6-dbg debug symbols available. =20 Change-Id: I1e1536279890bca2cd07f038e026b41e46af44e0 Diff: --- gdb/testsuite/gdb.threads/linux-dp.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.thr= eads/linux-dp.exp index 0805aa06664..953e6a9756b 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -226,7 +226,7 @@ gdb_continue_to_breakpoint "thread 5's print" # If you do have debug info, the output obviously depends more on the # exact library in use; under NPTL, you get: # #2 0x0012b7fc in start_thread (arg=3D0x21) at pthread_create.c:264 -gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at= pthread_create\|in pthread_create|from .*libc\\.\).*" \ +gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at= pthread_create\|in pthread_create\|in start_thread\|from .*libc\\.\).*" \ "first thread-specific breakpoint hit" =20 # Make sure it's catching the right thread. Try hitting the