public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kamil Rytarowski <n54@gmx.com>
To: John Baldwin <jhb@FreeBSD.org>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement "info proc mappings" for NetBSD
Date: Fri, 27 Mar 2020 00:24:03 +0100	[thread overview]
Message-ID: <c52016ea-15ac-9e3d-efc4-76d1b22c398c@gmx.com> (raw)
In-Reply-To: <a82244e9-058a-10ff-5136-19e1e64a3299@FreeBSD.org>

On 25.03.2020 17:36, John Baldwin wrote:
> 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.
>

OK, I can rename obfd to data.

>>>> 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.
>

Yes.

> 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?)
>

My code is not different to prior art.

So, is this patch fine for merging after the obfd->data rename?

  reply	other threads:[~2020-03-26 23:25 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
2020-03-26 23:24         ` Kamil Rytarowski [this message]
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=c52016ea-15ac-9e3d-efc4-76d1b22c398c@gmx.com \
    --to=n54@gmx.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).