Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rustam Kovhaev via Gdb-patches <gdb-patches@sourceware.org>
To: John Baldwin <jhb@freebsd.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC PATCH] Add a new 'info proc time' subcommand of 'info proc'.
Date: Wed, 28 Jul 2021 12:26:05 -0700	[thread overview]
Message-ID: <YQGvTb6R8SbtjsA5@nuc10> (raw)
In-Reply-To: <2bb73de7-8690-7ee5-99d3-f3ed737b979e@FreeBSD.org>

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@


      reply	other threads:[~2021-07-28 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 22:08 Rustam Kovhaev via Gdb-patches
2021-07-28 15:00 ` John Baldwin
2021-07-28 15:06   ` Rustam Kovhaev via Gdb-patches
2021-07-28 18:35     ` John Baldwin
2021-07-28 19:26       ` Rustam Kovhaev via Gdb-patches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQGvTb6R8SbtjsA5@nuc10 \
    --to=gdb-patches@sourceware.org \
    --cc=jhb@freebsd.org \
    --cc=rkovhaev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox