From: John Baldwin <jhb@FreeBSD.org>
To: Kamil Rytarowski <n54@gmx.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Implement xfer_partial TARGET_OBJECT_SIGNAL_INFO for NetBSD
Date: Mon, 27 Jul 2020 08:42:35 -0700 [thread overview]
Message-ID: <bb79df01-5cd9-319b-2d93-4d353db2d8e3@FreeBSD.org> (raw)
In-Reply-To: <20200727074118.4030-1-n54@gmx.com>
On 7/27/20 12:41 AM, Kamil Rytarowski wrote:
> NetBSD implementes reading and overwriting siginfo_t received by the
> tracee. With TARGET_OBJECT_SIGNAL_INFO signal information can be
> examined and modified through the special variable $_siginfo.
>
> Implement the "get_siginfo_type" gdbarch method for NetBSD architectures.
>
> As with Linux architectures, cache the created type in the gdbarch when it
> is first created. Currently NetBSD uses an identical siginfo type on
> all architectures, so there is no support for architecture-specific fields.
Generally looks ok to me.
> + /* struct _ksiginfo */
> + ksiginfo_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
> + ksiginfo_type->set_name (xstrdup ("_ksiginfo"));
> + append_composite_type_field (ksiginfo_type, "_signo", int_type);
> + append_composite_type_field (ksiginfo_type, "_code", int_type);
> + append_composite_type_field (ksiginfo_type, "_errno", int_type);
> + if (lp64)
> + append_composite_type_field (ksiginfo_type, "_pad", int_type);
> + append_composite_type_field (ksiginfo_type, "_reason", reason_type);
I was going to suggest using append_composite_type_field_aligned for
the "_reason" member, but I see in the source that _pad is explicitly
declared under #ifdef _LP64, so I think your approach here is correct
in that I think this function should strive to match the source code
declaration for siginfo_t.
--
John Baldwin
next prev parent reply other threads:[~2020-07-27 15:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 7:41 Kamil Rytarowski
2020-07-27 15:42 ` John Baldwin [this message]
2020-07-28 13:26 ` Simon Marchi
2020-07-28 15:07 ` Kamil Rytarowski
2020-07-28 15:15 ` Simon Marchi
2020-07-28 15:17 ` Kamil Rytarowski
2020-07-28 15:21 ` Simon Marchi
2020-07-28 15:04 ` [PATCH v2] " Kamil Rytarowski
2020-07-28 15:17 ` Simon Marchi
2020-07-28 15:58 ` [PATCH v3] " Kamil Rytarowski
2020-07-28 16:21 ` 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=bb79df01-5cd9-319b-2d93-4d353db2d8e3@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
--cc=n54@gmx.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