From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OIjbDQd3HWElcAAAWB0awg (envelope-from ) for ; Wed, 18 Aug 2021 17:09:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 27B071EDFB; Wed, 18 Aug 2021 17:09:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED 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 861771E4A3 for ; Wed, 18 Aug 2021 17:09:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33BEA398B8A0 for ; Wed, 18 Aug 2021 21:09:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33BEA398B8A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629320966; bh=b7GPvQtwdWzNUbUM+LjicItp70KSQPdBNIl4iiiMJL0=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FcGPvtLRFo7Pydc3fZbL3APNM9aDJeZztHRY7wmZFtzcZ2vwlqPMcsWUgD8SwNFwd zo1sub1zZa81Vn6ECx09PMVLhuQZOKmGFIW0YLp6ZOOCvRTppVwPOnLt59G47bfnOs onfr5bPmUs/8iCmRDsDtacHqRfJSRPiuEF/VwDNU= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 3F4DF38515FB for ; Wed, 18 Aug 2021 21:09:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3F4DF38515FB Received: from fencepost.gnu.org ([2001:470:142:3::e]:39398) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGSo1-0007BA-BS for gdb@sourceware.org; Wed, 18 Aug 2021 17:09:01 -0400 Received: from [160.231.0.90] (port=11649 helo=pdslaptop) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGSo1-0003PL-7L for gdb@sourceware.org; Wed, 18 Aug 2021 17:09:01 -0400 Message-ID: Subject: Re: Tools to debug multiple cores/processes at the same time? To: gdb@sourceware.org Date: Wed, 18 Aug 2021 17:09:00 -0400 In-Reply-To: <97D56F18-F336-45CD-9258-CB884C7F76E5@comcast.net> References: <3ba28620390947de2a84cabbd1958852aad97d5e.camel@gnu.org> <97D56F18-F336-45CD-9258-CB884C7F76E5@comcast.net> Organization: GNU's Not UNIX! Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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: , From: Paul Smith via Gdb Reply-To: psmith@gnu.org Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Wed, 2021-08-18 at 16:53 -0400, Paul Koning wrote: > There is multiple target support, which I haven't had a chance to try > yet but from what I remember reading is a recently added GDB > feature. It should handle your case plus even stranger ones, such as > multiple processes running different code, or even running on > different instruction sets. It's just what you need for debugging > distributed applications. Yeah, I saw that, and it might be the kernel of something that could support what I'm talking about, except I don't think it manages different "convenience variable namespaces" per inferior. But the main thing is it doesn't seem like it supports running the same command in all inferiors, other than by manually setting each one and running the command. Maybe some kind of embedded Python facility could be created to do this, such as John mentions... I'm not sure what the python support is currently for multiple inferiors. Let me give an example of a debugging session: * start a session with 3 core files * run a command that shows info about each core (assume a python "showinfo" command that show all threads with some details about each one). Maybe a command like: (gdb) all: showinfo i1: i2: i3: * For each core, go to a certain thread (of course the thread numbers will be different in each core): (gdb) i1: thr 7 (gdb) i2: thr 9 (gdb) i3: thr 23 * Run a command that returns some value and stores it in a convenience variable, on all cores: (gdb) all: set $v = $findstuff() * Run a command that shows some value, on all cores: (gdb) all: p $v->someDetail i1: $1 = 7 i2: $1 = 44 i3: $1 = 165 I dunno, something like that. Alternatively maybe it would be simpler for output for each inferior to go to a separate terminal or whatever.