From: John Baldwin <jhb@FreeBSD.org>
To: Kamil Rytarowski <n54@gmx.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Implement native dumpcore function
Date: Mon, 27 Jul 2020 08:47:42 -0700 [thread overview]
Message-ID: <d51d3dd4-b0fa-3775-a2e8-ef03caf8ec77@FreeBSD.org> (raw)
In-Reply-To: <20200727144338.7033-1-n54@gmx.com>
On 7/27/20 7:43 AM, Kamil Rytarowski wrote:
> Add new API for systems with native kernel support for dumping
> a process on demand. Wire it into the gdb's gcore functionality.
>
> Define supports_native_dumpcore and native_dumpcore for NetBSD,
> that wraps the ptrace(2) call with the PT_DUMPCORE operation.
>
> gdb/ChangeLog:
>
> * target.h (supports_native_dumpcore, native_dumpcore): New
> function declarations.
> * target.c (supports_native_dumpcore, native_dumpcore): New
> functions.
> * target-delegates.c: Rebuild.
> * nbsd-nat.h (nbsd_nat_target::supports_native_dumpcore)
> (nbsd_nat_target::native_dumpcore): New declarations.
> * nbsd-nat.c (nbsd_nat_target::supports_native_dumpcore)
> (nbsd_nat_target::native_dumpcore): New functions.
> * gcore.c (gcore_command): Use target_supports_native_dumpcore ()
> and target_native_dumpcore ().
One suggestion I would have is to do this as a 2-patch series with the
first patch introducing the new target hook and using it in gcore and
the second patch adding the implementation for the NetBSD native target.
I also wonder if the new target hook requires "native" in the name, it
could perhaps just be "target_supports_dumpcore" and "target_dumpcore"?
--
John Baldwin
next prev parent reply other threads:[~2020-07-27 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 14:43 Kamil Rytarowski
2020-07-27 15:47 ` John Baldwin [this message]
2020-07-27 21:09 ` Tom Tromey
2020-07-28 15:46 ` [PATCH v2 1/2] " Kamil Rytarowski
2020-07-28 15:46 ` [PATCH v2 2/2] gdb: Implement native dumpcore function for NetBSD Kamil Rytarowski
2020-08-05 16:24 ` Tom Tromey
2020-08-13 17:16 ` Kamil Rytarowski
2020-07-28 18:56 ` [PATCH v2 1/2] gdb: Implement native dumpcore function Christian Biesinger
2020-07-28 20:39 ` Kamil Rytarowski
2020-07-29 15:45 ` Tom Tromey
2020-08-05 16:23 ` Tom Tromey
2020-08-13 17:15 ` Kamil Rytarowski
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=d51d3dd4-b0fa-3775-a2e8-ef03caf8ec77@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
--cc=n54@gmx.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).