Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Tom Tromey <tom@tromey.com>, Kamil Rytarowski <n54@gmx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement "info proc mappings" for NetBSD
Date: Wed, 25 Mar 2020 09:36:27 -0700	[thread overview]
Message-ID: <a82244e9-058a-10ff-5136-19e1e64a3299@FreeBSD.org> (raw)
In-Reply-To: <87eetmlv2y.fsf@tromey.com>

On 3/20/20 11:50 AM, Tom Tromey wrote:
>>>>>> "Kamil" == Kamil Rytarowski <n54@gmx.com> writes:
> 
> Kamil> I see. I prefer to keep this called obfd, as it matches the FreeBSD code
> Kamil> more closely. If we want to rename it, we shall do it also in FreeBSD.
> 
> Well, that FreeBSD code is wrong too...

I looked, and I think that name was just inherited.  The callback argument commonly
passed to this function is in fact the bfd for a core file being generated (e.g.
from gcore_memory_sections) and other functions like objfile_find_memory_regions()
still use 'obfd' here.  I think it's perfectly reasonable to rename the
variable.  The exec target uses 'data' which it gained when it became a C++ class
instead of setting to_find_memory_regions to objfile_find_memory_regions directly.

>>> What if they stop matching?
> 
> Kamil> Not a concern.
> 
> Kamil> If that will ever change, it will be patched, same as the other
> Kamil> existing NetBSD support.
> 
> How will cross debugging to different versions work in this situation?

From FreeBSD's perspective, we probably won't ever change these bitfields as our
struct kinfo_vmentry is a public structure that we make ABI promises about that
is supposed to be the "public" version of internal kernel structures.  I suspect
NetBSD is following a similar model.

FWIW, I did the code in the tdep file to support core file debugging and cross
debugging (which works).  I think the Linux tdep code also does info proc
in the tdep file for similar reasons.  In the case of Linux, linux-tdep.c
handles core dumps, while procfs.c appears to handle native processes.

The formatting of using manual tables, etc. for info proc is also something the
Linux and procfs backends do.  It might indeed be much cleaner to use ui-out
(and probably more friendly to mi if we did so?)

-- 
John Baldwin


  parent reply	other threads:[~2020-03-25 16:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 17:34 Kamil Rytarowski
2020-03-19 13:07 ` Kamil Rytarowski
2020-03-20 15:36 ` Tom Tromey
2020-03-20 16:58   ` Kamil Rytarowski
2020-03-20 18:50     ` Tom Tromey
2020-03-20 19:13       ` Kamil Rytarowski
2020-03-25 16:36       ` John Baldwin [this message]
2020-03-26 23:24         ` Kamil Rytarowski
2020-03-20 16:58 ` [PATCH v2] " Kamil Rytarowski
2020-04-02 20:09 ` Kamil Rytarowski
2020-04-03  1:12   ` Kamil Rytarowski
2020-04-06  9:37   ` [PATCH v3] " Kamil Rytarowski
2020-04-10 10:20     ` Kamil Rytarowski
2020-04-11 21:05     ` Simon Marchi
2020-04-11 21:28       ` Kamil Rytarowski
2020-04-11 21:53         ` Simon Marchi
2020-04-11 23:45     ` [PATCH v4] " Kamil Rytarowski
2020-04-11 23:49       ` Simon Marchi
2020-04-12  0:09         ` Kamil Rytarowski
2020-04-12  0:09       ` [PATCH v5] " Kamil Rytarowski
2020-04-12  0:56         ` Simon Marchi
2020-04-12 10:17           ` 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=a82244e9-058a-10ff-5136-19e1e64a3299@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=n54@gmx.com \
    --cc=tom@tromey.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