From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iKnIA3WU6mFNQQAAWB0awg (envelope-from ) for ; Fri, 21 Jan 2022 06:09:41 -0500 Received: by simark.ca (Postfix, from userid 112) id E8CFF1F3B6; Fri, 21 Jan 2022 06:09:40 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 319A81F0BB for ; Fri, 21 Jan 2022 06:09:40 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77AC03857829 for ; Fri, 21 Jan 2022 11:09:39 +0000 (GMT) Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) by sourceware.org (Postfix) with ESMTPS id 408923858C60 for ; Fri, 21 Jan 2022 11:09:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 408923858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de Received: from fwd76.dcpf.telekom.de (fwd76.aul.t-online.de [10.223.144.102]) by mailout12.t-online.de (Postfix) with SMTP id CE0342990 for ; Fri, 21 Jan 2022 12:09:23 +0100 (CET) Received: from [192.168.178.21] ([84.173.66.226]) by fwd76.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1nArnG-30Y25p0; Fri, 21 Jan 2022 12:09:22 +0100 Message-ID: <7643924b-22fa-6c97-13b7-dfeb5495ca30@t-online.de> Date: Fri, 21 Jan 2022 12:08:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: gdb@sourceware.org From: Nicholas Ford Subject: GDB Debugging multiple instances of the same application and continue simultaneous X-TOI-EXPURGATEID: 150726::1642763362-0001619A-037A1C06/0/0 CLEAN NORMAL X-TOI-MSGID: 3ed364f4-f02d-4961-9647-7131202b367d Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hello, I try to debug two instances of the same application and try to make them continue simultaneous. I used the following sequence of commands: (gdb) set target-async on (gdb) set non-stop on (gdb) attach (gdb) set scheduler-locking off (gdb) add-inferior (gdb) inferior 2 (gdb) attach (gdb) set scheduler-locking off (gdb) b hello-world.cpp:8 Breakpoint 1 at 0x557a557761fd: ../hello-world.cpp:8. (2 locations) (gdb) continue But only the process of the current inferior is continuing. I tried it with the following configurations: * Setting 1 o OS: Windows 10 Version 2004 o GDB: GNU gdb (GDB) 12.0.50.20220115-git o Behavior: not even possible to switch back to inferior 1: Is it a known issue that this is not working on Windows? * Setting 2 o OS: Windows 10 Version 2004 using WSL (Ubuntu) o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2 o Behavior: Only the currently selected inferior is continuing * Setting 3 o OS: Ubuntu 20.04.3 LTS o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 o Behavior: Only the currently selected inferior is continuing Can you please guide me if I got it wrong (regarding the feature of running multiple processes simultaneous in GDB) or this specific feature is not available for the given OS versions (if yes which version should work)? Best regards, Nicholas Ford