From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id o3p1CCvho2czoCUAWB0awg (envelope-from ) for ; Wed, 05 Feb 2025 17:07:39 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e2739jbX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 157B41E105; Wed, 5 Feb 2025 17:07:39 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1F1DB1E08E for ; Wed, 5 Feb 2025 17:07:38 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 856F23858C51 for ; Wed, 5 Feb 2025 22:07:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 856F23858C51 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e2739jbX Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 5D3263858C51 for ; Wed, 5 Feb 2025 22:07:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D3263858C51 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5D3263858C51 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738793226; cv=none; b=eb4Ljjl/tei4giRr72QLSTZVy0iG4oD+iGWbkHlIAVjPWGWnAls5c2bLrL774a8YiMhSyodewDTNuzVgNBeIpI4uKsIN8SN611Ur5SsiAs+wkqOmGLX4dXABeQSs12rV+fBnLeSNvxSYX7+UxY149S+nEMTf/5oMsi/RgLGPsOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738793226; c=relaxed/simple; bh=+DA1olsRFid3fEJ1RxPcB3NZK0zHMuYdUiqxOaKG1NE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=C8lXE5dl3xPPWg8zIWAVjth8M/NiXIxRsy75QYjLJkkajETzR6SdPfZelu+bpAVn9VBMX7/y5ygfoxVZfyE1dJFnxT22KO9R8Qkzr4bitd7wbfn1wVRw79IPZr2tz3yD05qLlcybG5qsUHi11Z5G/dLxHUoJh9uLFbFbpKmYPvU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D3263858C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738793226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eCTQStaMrWs+Tmswv6QORXeO+Ikf8R6kml/hVj2R5Rs=; b=e2739jbXDsMmiOaF9kOMyXhk6npkWMXsHzYZXQW9RLQwifIWCgOakBugYihBusoLVZGDEx Ta2TnCShipUs6vsvamzcmMese+mq9CmcKq59ArHIqRg1mTlS7fzRoQCqzmjOq5BBrLgTby pdszalfW9aDuvkA2JgXBMal7EVIuTcM= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325--SEreNLqNPKHKXaSW6Bj0A-1; Wed, 05 Feb 2025 17:07:05 -0500 X-MC-Unique: -SEreNLqNPKHKXaSW6Bj0A-1 X-Mimecast-MFC-AGG-ID: -SEreNLqNPKHKXaSW6Bj0A Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 341D81800874; Wed, 5 Feb 2025 22:07:04 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.64.223]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 033551800352; Wed, 5 Feb 2025 22:07:02 +0000 (UTC) Date: Wed, 5 Feb 2025 15:06:57 -0700 From: Kevin Buettner To: Andrew Burgess Cc: gdb-patches@sourceware.org, pedro@palves.net Subject: Re: [PATCH v5 1/4] Make linux checkpoints work with multiple inferiors Message-ID: <20250205150657.5b0b14ab@f41-zbm-amd> In-Reply-To: <87v7tw6vre.fsf@redhat.com> References: <20241210020313.584564-1-kevinb@redhat.com> <20241210020313.584564-2-kevinb@redhat.com> <87v7tw6vre.fsf@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UFtf-M04i0gbn4OEzY-geU6XFXiSrkAWCD4VRzIbBF8_1738793224 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Thu, 30 Jan 2025 17:45:25 +0000 Andrew Burgess wrote: > Additionally, there are a couple of places in this patch where you have > spaces instead of tabs, and trailing whitespace. I have this in my > ~/.gitconfig file: > > [alias] > check=show --check --format="%C(auto)%h\\ %s\\ %C(blue)[%an\\ (%cr)]%C(reset)" > > Then you can do `git check` to check the last commit, or `git check SHA` > to check some other commit. The output will highlight any whitespace > issues with the patch. Thanks! I've added those lines to my own ~/.gitconfig file and will use "git check" going forward. [...] > > Before: > > > > (gdb) info checkpoints > > * 0 Thread 0x7ffff7cd3740 (LWP 84201) (main process) at 0x40114a, file hello.c, line 28 > > 1 process 84205 at 0x401199, file hello.c, line 51 > > 2 process 84206 at 0x4011a3, file hello.c, line 53 > > > > After: > > > > (gdb) info checkpoints > > Id Active Target Id Frame > > * 0 y process 551311 at 0x40114a, file hello.c, line 28 > > 1 n process 551314 at 0x401199, file hello.c, line 51 > > 2 n process 551315 at 0x4011a3, file hello.c, line 53 > > I'd like to suggest using GDB's structured table generation mechanism > here. There's two great examples; 'print_inferior' in inferior.c (which > does the 'info inferiors' command) and 'print_thread_info_1' in thread.c > (which is the 'info threads' command). > > I'd also like to suggest, that for the 'Frame' column, you make use of > print_stack_frame(). This is the function that 'info threads' uses to > print its stack frame, I think having consistent output would be a win > here. > > That all said, if you wanted to merge this now, and then we could > possibly come back and tweak the output formatting and content > afterwards, I'd be fine with that too. > > Either way: > > Approved-By: Andrew Burgess Thanks for the review! I've pushed this series. (Though I did first fix the whitespace problems, made sure that things still built and checked that the affected tests still ran as expected.) I'll work on a separate patch to use GDB's mechanism for structured table generation. (I'll also incorporate your print_stack_frame() suggestion.) Thanks for the pointers! Kevin