From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30511 invoked by alias); 6 Feb 2020 22:25:35 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 30300 invoked by uid 89); 6 Feb 2020 22:25:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=smith, Smith, H*i:sk:2a0eff2, H*f:sk:2a0eff2 X-HELO: pb-smtp21.pobox.com Received: from pb-smtp21.pobox.com (HELO pb-smtp21.pobox.com) (173.228.157.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Feb 2020 22:25:31 +0000 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 652EABFC5A for ; Thu, 6 Feb 2020 17:25:29 -0500 (EST) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=sasl; bh=t1CHdrHPlG80uXyRn82FVS1rxas=; b=Ea0oWY +nLeg47ts3IK2W69P7gZE1IztEKbt+LRnsQu2/5Sb8/qPscJzHaEOgj0nFZObrrV 3DmNXCugd/SM0ew0bSpOzJFvu4Jm49Nh9KkHWUdeeZ6T4Gy34pawJ5iX/Q9Ee1ko RePXULQYJtOikiJiD7VpFX0Wn8ASYEjs7j4Ak= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5E55EBFC59 for ; Thu, 6 Feb 2020 17:25:29 -0500 (EST) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kichwacoders.com; h=mime-version:references:in-reply-to:from:date:message-id:subject:to:cc:content-type; s=mesmtp; bh=IrSu3Vf0hWOSWDN66+51NKDF5R/tigftM+U0LP0BRXE=; b=dnodMPe61iwW5ueyy9/eK8b8pweET5xop21Lpn4xy0z5kUUkqzDwRxQZvXZJQ52N2pwUuzzh9fRRFw4wVg851/ayXoajfHy2I4ZcIxkTMbgRUP3gFKANu0hiPAoJAJ8/SFmB7H82jpntZ2OKm/3P7C1wPGrBbdcETTNMz2QfMuA= Received: from mail-qk1-f171.google.com (unknown [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 13D39BFC56 for ; Thu, 6 Feb 2020 17:25:26 -0500 (EST) (envelope-from jonah@kichwacoders.com) Received: by mail-qk1-f171.google.com with SMTP id v195so264096qkb.11 for ; Thu, 06 Feb 2020 14:25:26 -0800 (PST) MIME-Version: 1.0 References: <2a0eff24d5b58db30efc9d8a16b256f4748d0071.camel@gnu.org> In-Reply-To: <2a0eff24d5b58db30efc9d8a16b256f4748d0071.camel@gnu.org> From: Jonah Graham Date: Thu, 06 Feb 2020 22:25:00 -0000 Message-ID: Subject: Re: Debugging in multithreaded systems To: psmith@gnu.org Cc: GDB Development X-Pobox-Relay-ID: 92A789F0-492F-11EA-817A-8D86F504CC47-18936988!pb-smtp21.pobox.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00023.txt.bz2 On Thu, 6 Feb 2020 at 17:06, Paul Smith wrote: > Can someone provide some insight on multithreaded debugging? > I'll try - but I can't answer your underlying question about changing next behaviour in this case. 1. Consider using non-stop mode instead of all-stop mode if supported: https://sourceware.org/gdb/current/onlinedocs/gdb/Non_002dStop-Mode.html#Non_002dStop-Mode - the key line is this: "In non-stop mode, all execution commands apply only to the current thread by default. That is, continue only continues one thread. To continue all threads, issue continue -a or c -a." - so you can interrupt all threads, and then just debug the one problematic thread. If course you need a system that supports non-stop and I don't know which ones do and don't. 2. Try passing numeric argument to step to step multiple times at once. HTH Jonah