Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kamil Rytarowski <n54@gmx.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement IP_STAT on NetBSD
Date: Mon, 13 Apr 2020 22:26:08 +0200	[thread overview]
Message-ID: <ea8d4798-1b58-00d4-1425-9c32303b03b1@gmx.com> (raw)
In-Reply-To: <52edb779-5a48-ccd0-4873-67551aa89eac@simark.ca>

On 13.04.2020 22:11, Simon Marchi wrote:
>> This compat shim is only to emulate Linux... it's possible to follow the
>> FreeBSD case and just print local kinfo_proc2 as-is (that is fully
>> OS-specific).
>>
>> What do you think?
>>
>> The same question applies to IP_STATUS.
> When you put it like this... it just seems useless to read the info from /proc.
>
> If sysctl is guaranteed to always be there and is the blessed way of getting the
> information, then let's just use that.

As the kernel emulates Linux in /proc, the stat file is more complete in
the kernel as there are missing fields (sys/rusage.h ones, eip, esp,
stack position etc)

>  The goal is not to emulate Linux, but to
> use each OS's interface to get the required information.

Is it fine to print NetBSD specific internals from kinfo_proc2 in
NetBSD-specific format? Making up Linux-like output will be always
imperfect, but on the other hand end-users can be confused.


  reply	other threads:[~2020-04-13 20:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 18:19 Kamil Rytarowski
2020-04-13 19:16 ` Simon Marchi
2020-04-13 19:43   ` Kamil Rytarowski
2020-04-13 20:11     ` Simon Marchi
2020-04-13 20:26       ` Kamil Rytarowski [this message]
2020-04-13 20:43         ` Simon Marchi

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=ea8d4798-1b58-00d4-1425-9c32303b03b1@gmx.com \
    --to=n54@gmx.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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