From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 28 Jul 2021 15:00:39 -0000 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