From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6V5pH2WvAWGtJgAAWB0awg (envelope-from ) for ; Wed, 28 Jul 2021 15:26:29 -0400 Received: by simark.ca (Postfix, from userid 112) id 6F8B31EDFB; Wed, 28 Jul 2021 15:26:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BC7041E813 for ; Wed, 28 Jul 2021 15:26:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 291F8383A81F for ; Wed, 28 Jul 2021 19:26:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 291F8383A81F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627500388; bh=3YktCJMtVXqdiRJgUBgFZn7nhg+LJ/PlBErnLKC1BN0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fjrgCYLrYAkKFWwRLcOZNEjfghR4Z/fFW7ntXLIKljva9klVlCI+3t4xwlu1y456f K/LR5oGPk2Rj1Hnf46dFAKyeCJYMUwl9Y/y/a5H5Uk/Qn1A9U17CcGxt8iicoO2fiT LJRaBGIRJkAKvt3HHFKpJ6M3IvV7LWAJgOoWyWUg= Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by sourceware.org (Postfix) with ESMTPS id 3FDD2385041E for ; Wed, 28 Jul 2021 19:26:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3FDD2385041E Received: by mail-qk1-x72f.google.com with SMTP id 184so3402258qkh.1 for ; Wed, 28 Jul 2021 12:26:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3YktCJMtVXqdiRJgUBgFZn7nhg+LJ/PlBErnLKC1BN0=; b=gY7H+6vUgjuxX5aTewcna2Wgi56Z1HDlVxeFPL+PXg0kCilJwVxes5BcVLgJro3NX5 y5WnPzwVXrZPOio2BMl92OMkT9hrlphK5KUg6gXusJJm7csUjfDATXagcMb+ItIXIFSP 5GJL73Oq5AQnSpylcSm/DE1VkiYzmfZosrCFvaQCfriyMx5MVjfIFvst/LmdWtv518ME uHXkC/JJQRsDqdaqX19wQCrULyCSnD1l6EtDD9laZFEYpHDTr26I1U3gKYBx/Yq0Jsbo D7sNmoLrPNK4+gECFyNkeDBhNRPApslDztgfFnduHlsFFfa7kVYQtF58AMopPPY7CC2I hO4A== X-Gm-Message-State: AOAM533WzQfqtlEC7H5HKl+RqQ599DTWQsBJ6yPgpqhiosVkmLn1BdR4 cId2IIXXdVjf82UjFHoscGE= X-Google-Smtp-Source: ABdhPJwtZvz4XpR8N7EbVrKjELcRjcBVOB6cNvFJdgAPAw8r7hCyTr9LbD6fWyoJ40Xuw2UmOXCwOw== X-Received: by 2002:a37:a7c9:: with SMTP id q192mr1282125qke.477.1627500368856; Wed, 28 Jul 2021 12:26:08 -0700 (PDT) Received: from nuc10 (ec2-35-183-244-153.ca-central-1.compute.amazonaws.com. [35.183.244.153]) by smtp.gmail.com with ESMTPSA id e2sm499057qkn.69.2021.07.28.12.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 12:26:08 -0700 (PDT) Date: Wed, 28 Jul 2021 12:26:05 -0700 To: John Baldwin Subject: Re: [RFC PATCH] Add a new 'info proc time' subcommand of 'info proc'. Message-ID: References: <2bb73de7-8690-7ee5-99d3-f3ed737b979e@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2bb73de7-8690-7ee5-99d3-f3ed737b979e@FreeBSD.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: , From: Rustam Kovhaev via Gdb-patches Reply-To: Rustam Kovhaev Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Wed, Jul 28, 2021 at 11:35:05AM -0700, John Baldwin wrote: > On 7/28/21 8:06 AM, Rustam Kovhaev wrote: > > Hi John, > > > > On Wed, Jul 28, 2021 at 08:00:28AM -0700, John Baldwin wrote: > > > 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? > > > > It does not. Linux kernel will need to be patched too, but before > > sending a kernel RFC patch I wanted to run this proposal by gdb > > mainteners. > > I suspect that in general it's probably best to coordinate so that the > kernel agrees to the value of NT_TIME, etc. I work on FreeBSD myself > rather than Linux, but I wouldn't want to commit something to gdb to > support a new note unless the specific ABI (e.g. note layout, NT_ value) > was confirmed with the kernel folks as well. Even if the Linux kernel > doesn't adopt the note, it needs to agree to reserving the value for > NT_TIME so it doesn't get reused in the future for something else. > > Also, changes to binutils and bfd need to be sent to binutils@ for their > review. Thanks, makes perfect sense. I will send a kernel RFC patch to lkml and I will cc gdb-patches@ and binutils@