From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8EDDKYKKnWUH7jYAWB0awg (envelope-from ) for ; Tue, 09 Jan 2024 13:03:46 -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=Yvs1k644; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A6B0E1E0C3; Tue, 9 Jan 2024 13:03:46 -0500 (EST) 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 996351E0B9 for ; Tue, 9 Jan 2024 13:03:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3F7B93858C74 for ; Tue, 9 Jan 2024 18:03:44 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8D0E03858C74 for ; Tue, 9 Jan 2024 18:03:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D0E03858C74 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 8D0E03858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704823406; cv=none; b=rQy0/Ru9p3JrnvREUhnj4TrnexBHYtp1AVWPT/zDzs3jKpVu2y3x+LG/sZlRST5ehv2Cdve4OYEgyRMMHgI4JBWu/yjEUeJbQ3EPLkD17wYVETibd2hhTOeV4sMnamVVFHi6Vao0jvk4rC15Ekyaf3LAkVwXz2VfqoZ3ClcJL7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704823406; c=relaxed/simple; bh=gI4em0ejo6Ce4Ycfku7QDHL5dBbsedEKSubX0wPXHvQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=DLFo+sJA5xc/FY08nF6vjKgafPeDZX9ZUZRQHtCm9r0ieIW+18IkvvBIH9/tiDQIinvbCBbMXt7bwZwlylAoCRGoLMvwPfMhGebsuc3oSzLC2bPt+gHRun7eywW+7pPYtBh8Hbf3/T9g2lAWx4+T0Zgf8qrjeXEd1CNVtdzdCRY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704823404; 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=N2GV5REOQv6WoA4s+9oN0SbVG0AOlxLOi7ljTV5ZUGg=; b=Yvs1k644mUftnDLYnn8/EJT6eAc0dFr/+22i70JD+5BVt/xDFoqACKZCAQWOLVmFLVIlPF HmSKFKNifP6gGDKKCM3X0aYLj6VMDMLLyMAzy1MKwaMB5uw4vpxcMexPnplLAEEzHWnKZI EWkGTdR+8LDO+4RGN/okbMwjGLCq+bk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-d--4ILeROGyPAp4yLJ0qAA-1; Tue, 09 Jan 2024 13:03:22 -0500 X-MC-Unique: d--4ILeROGyPAp4yLJ0qAA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id A1D81106D006; Tue, 9 Jan 2024 18:03:18 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.32.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D4572166B32; Tue, 9 Jan 2024 18:03:18 +0000 (UTC) Date: Tue, 9 Jan 2024 11:03:16 -0700 From: Kevin Buettner To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] [gdb] Fix info checkpoints Message-ID: <20240109110316.4f27f87b@f39-zbm-amd> In-Reply-To: <20240108152553.4578-3-tdevries@suse.de> References: <20240108152553.4578-1-tdevries@suse.de> <20240108152553.4578-3-tdevries@suse.de> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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.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 Mon, 8 Jan 2024 16:25:52 +0100 Tom de Vries wrote: > Consider test-case gdb.base/checkpoint.exp. At some point, it issues an info > checkpoints command: > ... > (gdb) info checkpoints^M > * 0 process 30570 (main process) at 0x0^M > 1 process 30573 at 0x4008bb, file checkpoint.c, line 49^M > 2 process 30574 at 0x4008bb, file checkpoint.c, line 49^M > 3 process 30575 at 0x4008bb, file checkpoint.c, line 49^M > 4 process 30576 at 0x4008bb, file checkpoint.c, line 49^M > 5 process 30577 at 0x4008bb, file checkpoint.c, line 49^M > 6 process 30578 at 0x4008bb, file checkpoint.c, line 49^M > 7 process 30579 at 0x4008bb, file checkpoint.c, line 49^M > 8 process 30580 at 0x4008bb, file checkpoint.c, line 49^M > 9 process 30582 at 0x4008bb, file checkpoint.c, line 49^M > 10 process 30583 at 0x4008bb, file checkpoint.c, line 49^M > ... > > According to the docs, each of these (0-10) is a checkpoint. > > But the pc address (as well as the file name and line number) is missing for > checkpoint 0. > > Fix this by sampling the pc value for the current process in > info_checkpoints_command, such that we have instead: > ... > * 0 process 30570 (main process) at 0x4008bb, file checkpoint.c, line 49^M > ... > > Tested on x86_64-linux. > > PR gdb/31211 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31211 Approved-By: Kevin Buettner