Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org,	binutils@sourceware.org
Subject: [PATCH 0/4] Support for 'info proc' on FreeBSD cores and native
Date: Fri, 22 Dec 2017 22:05:00 -0000	[thread overview]
Message-ID: <20171222220513.54983-1-jhb@FreeBSD.org> (raw)

This series adds initial support for the 'info proc' command on
FreeBSD native processes and process cores.  FreeBSD generally does
not use the /proc filesystem, but instead exports data structures
containing process information either via kernel system control nodes
(for live processes), or in core dump notes.

My assumption is that the format of 'info proc' is expected to be
somewhat OS-specific though probably not gratuitously so.

For 'info proc mappings' I choose to include both mapping attributes
(such as permissions) along with the object file name.

I did choose to implement versions of 'info proc stat' and 'info proc
status' that are similar to the output on Linux for now.  However,
given that the output on FreeBSD is not tied to the output of files in
/proc and that having both 'stat' and 'status' with overlapping
content seems ambiguous, I do wonder if it wouldn't be better to just
have a single command that includes one copy of the information (and
perhaps treat 'stat' as an alias of 'status' on FreeBSD)?  I also
noticed in the document that there are older commands such as 'info
proc id' and 'info proc time' that if implemented would contain a
subset of the info in the 'stat' commands.  I would possibly prefer to
resurrect these commands on FreeBSD as subsets of 'stat/status'?  What
do you all think?

I do eventually plan on adding a 'info proc files' that outputs a
table of open file descriptors.

For the documentation I made minimal changes to the existing
documentation for 'info proc' to not state that it requires /proc, but
the wording could probably use improvement.  I have also not yet
documented that FreeBSD supports 'proc stat' and 'proc status' due to
the question above.

John Baldwin (4):
  Create psuedo sections for FreeBSD NT_PROCSTAT_(PROC|FILES|VMMAP)
    notes.
  Support 'info proc' for FreeBSD process core dumps.
  Support 'info proc' for native FreeBSD processes.
  Document support for 'info proc' on FreeBSD.

 bfd/ChangeLog       |   6 +
 bfd/elf.c           |  12 +
 gdb/ChangeLog       |  33 +++
 gdb/config.in       |   3 +
 gdb/configure       |  60 +++++
 gdb/configure.ac    |   5 +
 gdb/doc/ChangeLog   |   7 +
 gdb/doc/gdb.texinfo |  19 +-
 gdb/fbsd-nat.c      | 404 ++++++++++++++++++++++++++++--
 gdb/fbsd-tdep.c     | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 gdb/fbsd-tdep.h     |   1 +
 11 files changed, 1217 insertions(+), 31 deletions(-)

-- 
2.15.1


             reply	other threads:[~2017-12-22 22:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 22:05 John Baldwin [this message]
2017-12-22 22:05 ` [PATCH 3/4] Support 'info proc' for native FreeBSD processes John Baldwin
2017-12-27  2:23   ` Simon Marchi
2018-01-03 19:05     ` John Baldwin
2018-01-03 19:13       ` Simon Marchi
2018-01-03 21:56         ` John Baldwin
2017-12-22 22:05 ` [PATCH 1/4] Create psuedo sections for FreeBSD NT_PROCSTAT_(PROC|FILES|VMMAP) notes John Baldwin
2017-12-27  1:18   ` Simon Marchi
2018-01-02 11:49   ` Nick Clifton
2017-12-22 22:05 ` [PATCH 2/4] Support 'info proc' for FreeBSD process core dumps John Baldwin
2017-12-27  1:56   ` Simon Marchi
2018-01-03 19:05     ` John Baldwin
2017-12-22 22:13 ` [PATCH 4/4] Document support for 'info proc' on FreeBSD John Baldwin
2017-12-23  8:46   ` Eli Zaretskii
2017-12-27  1:53 ` [PATCH 0/4] Support for 'info proc' on FreeBSD cores and native Simon Marchi
2018-01-03 19:05   ` John Baldwin
2018-01-03 19:15     ` Simon Marchi
2018-01-03 23:39       ` John Baldwin

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=20171222220513.54983-1-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /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