From patchwork Sat Dec 31 08:48:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 63379 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A74173858430 for ; Thu, 19 Jan 2023 03:00:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A74173858430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674097220; bh=6ZX71yIs7AvCRXhSEd+i3wKEcEBQ4MFH9n0zMkORkoU=; h=Resent-From:Resent-Date:Resent-To:In-Reply-To:References:Date: Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=S38PuhauGF/y3CgibVIUc4fgmCGStWTW3X9Hc4Amr6+6+FXq+8yVtYl611pLV4iq1 CJYe/IjSsRd45Kf49lON+Tnhz6CKnY+303HwHyvbxy0+1P5YCEabwoxZ9D8egHQNY4 XeFL5exqlXMy5Jbqf58nMqj3thT2ams3QTbCZM5I= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by sourceware.org (Postfix) with ESMTPS id 057A73858C52 for ; Thu, 19 Jan 2023 02:59:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 057A73858C52 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iqnGA8ACyy6FA3eqIrW7r6TIF2+qUBzfJ+XBp0hg43GQxHOV+IUZKUmAA12vFD6zygvfINwEt1tFO1rQSnfR+a/fwxlOPWYtlR3dm/oq9cnXNDnB1t7C2YBkPbDbi66mVutTZXLPj1UHtV+ON4v8qWDOfF8Ywlq8TIKcHvmCale+Fzba0+I1ms+/f58OJWoSePeq2UppXrYqZE4RL3XdS1zAmg8xaZZfZ0je/7AGQVKn1D4fJPMPnRwdAS72+O0s252bh58zE5JA3+ER6owgk79vrTn+B7Gt/YdQs5zxHdQSgOFputHvYxHvv8Gu5nxmHlVgG1c+Tpqi4UW4k7Pugg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6ZX71yIs7AvCRXhSEd+i3wKEcEBQ4MFH9n0zMkORkoU=; b=SpELG7O64CeMj+RZAOtSd2fvMm1kJydySdWxkTv8KwzoqcVxByR0omuCx94rGDKBQ4kpvDoWr9zCN08MmCEf8omqYG12smH9vXgukoc69Rrda87Q+Q/wcV6w/NVF8iEsunGcm+ReQtnC/TuRsVx5fXPmB3gPTVs+DQcIOH+06qf3Xma78FF6EftAiL4t+3xadYz4St79W3+BX5rm55yMgpk9yWmBLQ3Ammqk40W9mOJB/t+/2SI0Jo/c4CdEwJG+mLZZfM40rQVN7rupNCJNwbwfSaieoyM8D41SvDUPVkMh5xWVve3JXnYv87sRnflbVjxF87VJhvQM3zkWy/7DkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=azul.com; dmarc=pass action=none header.from=azul.com; dkim=pass header.d=azul.com; arc=none Received: from BN6PR11MB4066.namprd11.prod.outlook.com (2603:10b6:405:82::34) by DS0PR11MB7215.namprd11.prod.outlook.com (2603:10b6:8:13a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Thu, 19 Jan 2023 02:59:48 +0000 Received: from BN6PR11MB4066.namprd11.prod.outlook.com ([fe80::f636:3022:a4a1:27e7]) by BN6PR11MB4066.namprd11.prod.outlook.com ([fe80::f636:3022:a4a1:27e7%7]) with mapi id 15.20.6002.013; Thu, 19 Jan 2023 02:59:47 +0000 Resent-From: Jan Kratochvil Resent-Date: Thu, 19 Jan 2023 10:59:40 +0800 Resent-Message-ID: Resent-To: gdb-patches@sourceware.org, luis.machado@arm.com In-Reply-To: <90ba687c-952f-9fa8-b6d4-90d9735621a8@arm.com> References: <90ba687c-952f-9fa8-b6d4-90d9735621a8@arm.com> Date: Sat, 31 Dec 2022 16:48:09 +0800 Subject: [PATCH v2] gdb/arm: Fix backtrace for pthread_cond_timedwait To: gdb-patches@sourceware.org Cc: Luis Machado X-ClientProxiedBy: VI1PR0101CA0052.eurprd01.prod.exchangelabs.com (2603:10a6:800:1f::20) To BN6PR11MB4066.namprd11.prod.outlook.com (2603:10b6:405:82::34) Message-ID: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR11MB4066:EE_|DS0PR11MB7215:EE_ X-MS-Office365-Filtering-Correlation-Id: 58778266-b16d-4250-3c06-08daf9c93985 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wclhNub9aRlq4z5BX1kx6MIR6hi/44x5hkOIHAbA1pijg0V6NRz1kmhrNbnxUncoSDXCGwhnCa3e4ZljaKDUQTPg5ljfM8vBkBafrfa2uE2uniQIjrxMdMU8JNkBQS2m0v7W/YJtBE4pcTY9ECh5l2/HWSxm/Dy6GVgPjMPFPiOzwZ8oc58FBwvtpyVQB3/rSNLdzwPA4CWCl9pNJIqB4ha47kvL0JJgt0Y1SEnsLI39EYw0iphb8wiVnleCzSuWIxZjx8nO6WpJkgqTHI9vCo6t2Hw6pliHDrbPq55qgshDRZb8PbXHLJlQ357DPURi0uk8LUfBeku+U7lgFfrSpXD4y6wicUkAJZlEennqJmLCzwAZMgRJqpA2uG+v7ngXIWJvk25FYKOz3WOYqLfqPApESJ4MqFo0TSskqsNH6o2rXEsAOQ4O1vifq5MctVeWIvccceGMLxDiZyZRtZ5Ttkr+lIYU8GgcZcHrjjh4DPxnWt+Svl4kCoB1U1XyxVGK5A8UN9nLT37RRAX65MUTIdTkHM561y0GgT1UY0YNkQRzITAwgFZ963X4/Aq2MEn/P3rMyioyzKaHgSoNCeI3ynNwRMtQqSTph+QXYXq/ZeqrFwn+M2H8XSkvT4QDDwru/rmLt97NYYxYxiYc+lFhMyCWVBX/chLgFBTTMzZ+2YB85pn+VOhjjg4p5uhkq+CcRs7u4XZT9i/HdNg1Z9PXDA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4066.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(346002)(376002)(136003)(396003)(39850400004)(451199015)(2906002)(9686003)(66946007)(66476007)(33656002)(8676002)(4326008)(8936002)(41300700001)(186003)(52536014)(5660300002)(66556008)(7696005)(86362001)(6916009)(316002)(83380400001)(38100700002)(6506007)(55016003)(6666004)(478600001)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: b+Mw0qAp++I87jAY/48vCoAkbG+L3BvYJGCyVjfzgQc4299ndw/rfm0eq6cBa9N04bLG2K88606agR83reGVYdFingVay2RO45gH3V0FA/iaPqRQJUuaLXiU7R9bVR9DDROTnMdUGzcsEqeiNud4IQlWN5rlNt1O9ONFHfYvLv7sPNymI1WdaTflPxCpEIdjii7775ZPgg/cclvsIhWprM5sw2xeHiuRNGtLfkg+NTbQhmd/v3Bka0Tq4uuvsKPzs4pC0WWj8b0cASBqlwSnCgjMEZ9aONRLqZBrNhmxQSyOrb7OHyFcV4RQIka+fIIvYQBtwXZI5qZS0UC8ZXVAsidyfOntG0u3MQovAlTiG1fX5owK2V6awwlX+g1MpGoqLUw7sAwr6GmImx4/0G3b8R2X42PAnRyuVhdmcVrYP5QUYo54zWZdvXk//Eqfhy+QP9OJj+WAyUlUIiDYkVHp3CVEm5L8OddCMmoSBLfH1nPHFxlqK8nZWxA5j97gaEIQmr58h+4a8PbtmyM8O3K3FHz3qIJmcUnPUApr7N4hQEYxdzbFRoc+6TgkvaBGhfcCMz+ny+qdHSBBcj9QTcnjtPOFdFJgY4yHiJGq41boLmiyDL79G5moc3nCIM6l73czUBgS1o+4XW9pGngyWefBm1FreBcJCdPxHSoi8URPNj7EdtebsyZLiWWehr9+XixzBjD/3d1+Qyl4bcNK/uWC/OyDREqRRYM0THWiQjt98IXVYY+EKpAvBcLb5x1c7Ni7/f+NfXZBK/FM7U+Rxcv+TV+xI9kRyOUH/RPNIIiVU8bH+QasfRxudJ/OzU7MGX3oPv+669UAei22QyR7SQjmiEgSwXBft1GmJcrvJmitg4f5GoZ0yIUrnxanhz+OcYNf4agqfhYnbMU45EaymbJYWo2EJczMiX0UA2jZShdqGZuXA58Oi91e/D+vf1r4sP42DcR8uVdQJGm2TnfIGJKuUNJdw4q3CSyp1PVMoPBaq5i49FJZ6t+LExP/HL+5cQVs3HTgZP5h6KkcKkg4B/0ZqsjqCxFJHZKijeX8ge6BKusJEdJcf8CI2cJieoDROu9swpHI3vTgYcD1Jq6v9tyRXtQL8kE5hG4SPE1BNMtjinDnU24HBH0dofkS+EH9CrZlCn06JBixd73y7kL2TCSWa0rXy3te746zmBzDDVKAc3l7zgElSP53Bjc3ijEpBV/XA4SmXyIEX0PURMmkHj8l7HWmGls4slArHBVnO2Uyt/3NbFNS3qRSL1CHXET3c5emuKlYt0sCEus7E5unBZj7Gu96/teBn9l6z15wNgbjQqPBvfMyDnsMHOMwS4/D/OhbUA1xepbXoUHbXoitQybPupQve04JhwznZPmPqGCLYG3Q2S8sh1VSX3vwztxIXT7OCTMuDFn63rjqudUemyPTRFJJo3B7ogNNEEyfCI+MzRtwgn3BBP/6eAc8i2F9TvWreUFITg3F9HPofkdRqHvjzP0j5K15glfREoyFYyASeOGYGyBRzPztLBwa6mZ1lqN1zST++mKIFtjGxgdA2HRydbgXKwzq6uQX2pzG6W64FySAXVnSJZud05J6m8JO1jzsWtUTc9lJ9orz63aQpJsdEA== X-OriginatorOrg: azul.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58778266-b16d-4250-3c06-08daf9c93985 X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB4066.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 02:59:47.7934 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c480eb31-2b17-43d7-b4c7-9bcb20cc4bf2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bRqejxkVXG9j7ajIvsWYG9/txRNamQPnm3Yn2qFvRKa4y0gUm7whl4cnLk0zibfMz2bP+YEZ6fvZ76CDI5WXcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7215 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jan Kratochvil via Gdb-patches From: Jan Kratochvil Reply-To: Jan Kratochvil Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" GDB expected PC should point right after the SVC instruction when the syscall is active. But some active syscalls keep PC pointing to the SVC instruction itself. This leads to a broken backtrace like: Backtrace stopped: previous frame identical to this frame (corrupt stack?) #0 0xb6f8681c in pthread_cond_timedwait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0 #1 0xb6e21f80 in ?? () The reason is that .ARM.exidx unwinder gives up if PC does not point right after the SVC (syscall) instruction. I did not investigate why but some syscalls will point PC to the SVC instruction itself. This happens for the "futex" syscall used by pthread_cond_timedwait. That normally does not matter as ARM prologue unwinder gets called instead of the .ARM.exidx one. Unfortunately some glibc calls have more complicated prologue where the GDB unwinder fails to properly determine the return address (that is in fact an orthogonal GDB bug). I expect it is due to the "vpush" there in this case but I did not investigate it more: Dump of assembler code for function pthread_cond_timedwait@@GLIBC_2.4: 0xb6f8757c <+0>: push {r4, r5, r6, r7, r8, r9, r10, r11, lr} 0xb6f87580 <+4>: mov r10, r2 0xb6f87584 <+8>: vpush {d8} Regression tested on armv7l kernel 5.15.32-v7l+ (Raspbian 11). --- gdb/arm-tdep.c | 42 ++++--- .../gdb.arch/arm-pthread_cond_timedwait-bt.c | 62 ++++++++++ .../arm-pthread_cond_timedwait-bt.exp | 108 ++++++++++++++++++ 3 files changed, 195 insertions(+), 17 deletions(-) create mode 100644 gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c create mode 100644 gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 78a2fe2ade5..328eb17f419 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3116,26 +3116,34 @@ arm_exidx_unwind_sniffer (const struct frame_unwind *self, && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME) exc_valid = 1; - /* We also assume exception information is valid if we're currently - blocked in a system call. The system library is supposed to - ensure this, so that e.g. pthread cancellation works. */ - if (arm_frame_is_thumb (this_frame)) + /* Some syscalls keep PC pointing to the SVC instruction itself. */ + for (int shift = 0; shift <= 1 && !exc_valid; ++shift) { - ULONGEST insn; + /* We also assume exception information is valid if we're currently + blocked in a system call. The system library is supposed to + ensure this, so that e.g. pthread cancellation works. */ + if (arm_frame_is_thumb (this_frame)) + { + ULONGEST insn; - if (safe_read_memory_unsigned_integer (get_frame_pc (this_frame) - 2, - 2, byte_order_for_code, &insn) - && (insn & 0xff00) == 0xdf00 /* svc */) - exc_valid = 1; - } - else - { - ULONGEST insn; + if (safe_read_memory_unsigned_integer ((get_frame_pc (this_frame) + - (shift ? 2 : 0)), + 2, byte_order_for_code, + &insn) + && (insn & 0xff00) == 0xdf00 /* svc */) + exc_valid = 1; + } + else + { + ULONGEST insn; - if (safe_read_memory_unsigned_integer (get_frame_pc (this_frame) - 4, - 4, byte_order_for_code, &insn) - && (insn & 0x0f000000) == 0x0f000000 /* svc */) - exc_valid = 1; + if (safe_read_memory_unsigned_integer ((get_frame_pc (this_frame) + - (shift ? 4 : 0)), + 4, byte_order_for_code, + &insn) + && (insn & 0x0f000000) == 0x0f000000 /* svc */) + exc_valid = 1; + } } /* Bail out if we don't know that exception information is valid. */ diff --git a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c new file mode 100644 index 00000000000..c382a100afd --- /dev/null +++ b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c @@ -0,0 +1,62 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2022 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include + +static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + +static void *fun(void *arg) +{ + struct timeval now; + struct timespec until; + int err; + + err = gettimeofday(&now, NULL); + assert(!err); + + until.tv_sec = now.tv_sec + 60; + until.tv_nsec = now.tv_usec * 1000UL; + + pthread_cond_timedwait(&cond, &mutex, &until); + assert(0); + err = pthread_mutex_unlock(&mutex); + assert(!err); + + return arg; +} + +int main() +{ + pthread_t thread; + void *ret; + int err; + + err = pthread_mutex_lock(&mutex); + assert(!err); + err = pthread_create(&thread, NULL, fun, NULL); + assert(!err); + err = pthread_mutex_lock(&mutex); + assert(!err); + err = pthread_join(thread, &ret); // break-line + assert(0); + + return 0; +} diff --git a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp new file mode 100644 index 00000000000..fd34eab1fb6 --- /dev/null +++ b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp @@ -0,0 +1,108 @@ +# Copyright 2022 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This serves as a template for writing new test cases. Replace this with +# a description of what this test case tests. + +standard_testfile + +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ + {debug pthreads}] } { + return +} + +# This test would get UNTESTED if system debuginfo is installed. +gdb_test_no_output "set debug-file-directory" "" + +if { ![runto_main] } { + return +} + +gdb_test "advance [gdb_get_line_number "break-line"]" "break-line.*" \ + "advance to break-line" + +gdb_test "thread 2" "Switching to thread 2 .*" "thread 2 for svc check" + +# GDB expected PC should point right after the SVC instruction when the syscall is active. +# But some active syscalls keep PC pointing to the SVC instruction itself. +set test "pc points to svc" +gdb_test_multiple {x/i $pc} $test { + -re ":\tsvc\t0x00000000\r\n$gdb_prompt $" { + pass $test + } + -re "\r\n$gdb_prompt $" { + untested $test + return + } +} + +gdb_test "thread 1" "Switching to thread 1 .*" +gdb_test_no_output "set debug frame 1" + +# PASS: +# [frame] frame_unwind_try_unwinder: trying unwinder "arm exidx" +# [frame] frame_unwind_register_value: enter +#... +# [frame] frame_unwind_register_value: exit +# [frame] frame_unwind_try_unwinder: yes +#... +# [frame] get_prev_frame_always_1: -> {level=0,type=NORMAL_FRAME,unwinder="arm exidx",pc=0xb6f8681c,id=,func=} // cached + +# FAIL: +# [frame] frame_unwind_try_unwinder: trying unwinder "arm exidx" +# [frame] frame_unwind_register_value: enter +#... +# [frame] frame_unwind_register_value: exit +# [frame] frame_unwind_try_unwinder: no +# [frame] frame_unwind_try_unwinder: trying unwinder "arm epilogue" +# [frame] frame_unwind_register_value: enter +#... +# [frame] frame_unwind_register_value: exit +# [frame] frame_unwind_try_unwinder: no +# [frame] frame_unwind_try_unwinder: trying unwinder "arm prologue" +# [frame] frame_unwind_try_unwinder: yes +#... +# [frame] get_prev_frame_always_1: -> {level=0,type=NORMAL_FRAME,unwinder="arm prologue",pc=0xb6f8681c,id=,func=} // cached + +set test "unwinder is arm exidx" +# Switch the threads to reset frame cache. +gdb_test_multiple {thread 2} $test { + -re "\{level=0,type=NORMAL_FRAME,unwinder=\"arm exidx\",pc=.*\r\n$gdb_prompt $" { + pass $test + } + -re "\{level=0,type=NORMAL_FRAME,unwinder=\"arm prologue\",pc=.*\r\n$gdb_prompt $" { + fail $test + } + -re "\r\n$gdb_prompt $" { + untested $test + return + } +} + +gdb_test "thread 2" "Switching to thread 2 .*" "thread 2 for debug frame check" + +gdb_test_no_output "set debug frame 0" + +# PASS: +# #0 0xb6f8681c in pthread_cond_timedwait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0 +# #1 0x00010648 in fun (arg=0x0) at .../gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c:38 +# ... + +# FAIL: +# #0 0xb6f8681c in pthread_cond_timedwait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0 +# #1 0xb6e21f80 in ?? () +# Backtrace stopped: previous frame identical to this frame (corrupt stack?) + +gdb_test "bt" { in fun \(arg=.*} "unwind of pthread_cond_timedwait"