From: Simon Ser <contact@emersion.fr>
To: John Baldwin <jhb@FreeBSD.org>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Generate NT_PROCSTAT_{AUXV,VMMAP} in FreeBSD coredumps
Date: Wed, 11 Jul 2018 16:40:00 -0000 [thread overview]
Message-ID: <P7HwAVsKpoyVpLiyFnowL20pJKfY_9kx6kshzUHGWQ1_ayE0MUpx_DLYUkoR7cuNTYf94yeS8oL3GYRFkzCp83MXixjOH-CIspZnVTQ7ogI=@emersion.fr> (raw)
In-Reply-To: <95fcaebb-d260-bff6-ac4b-5e052c3787bb@FreeBSD.org>
On July 11, 2018 5:16 PM, John Baldwin <jhb@FreeBSD.org> wrote:
> You can't use a sysctl like this in a tdep.c file. fbsd-tdep.c runs on
> any OS, (so for example you could be running gdb with a FreeBSD binary
> on Linux or OS X against a debug server (gdbserver or lldb-server or some
> such) running on a remote FreeBSD host (or VM) and use 'gcore' on the
> debugging host to generate a local core file.
Ah, that's what I feared when choosing this approach.
> Native code that would only run on a FreeBSD host would live in fbsd-nat.c,
> and when I have thought about handling other procstat notes in FreeBSD cores
> I've mostly thought about adding some kind of hook that fbsd-tdep.c would
> invoke to write extra core notes and setting that hook only for native
> targets in fbsd-nat.c for the native gdbarchs.
>
> Your previous patch for AUXV still works because the target_foo function
> you called previously will talk to either the debug server or the
> native target to fetch the AUXV data, so I think your previous patch
> for NT_PROCSTAT_AUXV is a better approach for that note.
Hmm, I need those other notes too. Would it be possible to add some
FreeBSD-specific TARGET_OBJECT_* constants? If not, could you explain
how one would add this hook?
Thanks,
Simon
next prev parent reply other threads:[~2018-07-11 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 12:35 Simon Ser
2018-07-11 16:16 ` John Baldwin
2018-07-11 16:40 ` Simon Ser [this message]
2018-07-16 13:39 ` [PATCH v2] Generate NT_PROCSTAT_{AUXV,VMMAP,PS_STRINGS} " Simon Ser
2018-07-24 7:53 ` Simon Ser
2018-08-01 16:33 ` Simon Ser
2018-08-01 18:16 ` John Baldwin
2018-08-21 14:45 ` [PATCH v3] " Simon Ser
2018-08-23 10:40 ` John Baldwin
2018-08-23 14:02 ` [PATCH v4] " Simon Ser
2018-08-23 16:16 ` John Baldwin
2018-08-23 17:11 ` [PATCH v5] " Simon Ser
2018-09-02 20:02 ` Simon Ser
2018-09-06 22:12 ` 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='P7HwAVsKpoyVpLiyFnowL20pJKfY_9kx6kshzUHGWQ1_ayE0MUpx_DLYUkoR7cuNTYf94yeS8oL3GYRFkzCp83MXixjOH-CIspZnVTQ7ogI=@emersion.fr' \
--to=contact@emersion.fr \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.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