From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LZtnISNxAWH6IAAAWB0awg (envelope-from ) for ; Wed, 28 Jul 2021 11:00:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 787751EDFB; Wed, 28 Jul 2021 11:00:51 -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.6 required=5.0 tests=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 AC1791E79C for ; Wed, 28 Jul 2021 11:00:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A720399B44B for ; Wed, 28 Jul 2021 15:00:49 +0000 (GMT) Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id 9A3A8384A015 for ; Wed, 28 Jul 2021 15:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A3A8384A015 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 55F6B7F3C5; Wed, 28 Jul 2021 15:00:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GZcKW0jczz3K8R; Wed, 28 Jul 2021 15:00:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6CCC131AA; Wed, 28 Jul 2021 15:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: [RFC PATCH] Add a new 'info proc time' subcommand of 'info proc'. To: Rustam Kovhaev , gdb-patches@sourceware.org References: From: John Baldwin Message-ID: Date: Wed, 28 Jul 2021 08:00:28 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 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 Sender: "Gdb-patches" On 7/27/21 3:08 PM, Rustam Kovhaev via Gdb-patches wrote: > Sometimes (unfortunately) I have to review windows user-space cores in > windbg, and there is one feature that I really want to implement in gdb, > but I don't know whether it is a good idea or not, and why it has not > yet been implemented in gdb. > > In wdbg there is a .time command that gives me time when core was taken. > I could not find the same functionality in gdb and in elf core. > I know about kernel core_pattern and timestamp, and there are user-space > daemons that write the timestamp, and sometimes if I am lucky I can get > timestamp from modified/created file attributes and this solves the > problem most of the time, but quite often I get only core.PID file + > some app log and there is no way for me to figure out when exactly the > core was taken. > > Current patch does not take into account lots of things like endianness, > cpu archs other than x86, other code paths, etc, and there is also > kernel side to modify and coordinate, but it does work in my lab, and I > was pretty happy to learn a little bit about the project. Does the Linux kernel write out NT_TIME notes when creating core dumps or would this command only work on cores generated by a patched gdb's 'gcore' command? -- John Baldwin