From: Simon Marchi <simark@simark.ca>
To: Kamil Rytarowski <n54@gmx.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid get_ptrace_pid() usage on NetBSD in x86-bsd-nat.c
Date: Thu, 19 Mar 2020 09:22:00 -0400 [thread overview]
Message-ID: <5b1b7e0a-3683-5e2b-a07f-9bf89817b4a2@simark.ca> (raw)
In-Reply-To: <3048d145-21f9-161c-f6fd-7214c7b13a48@gmx.com>
On 2020-03-19 8:47 a.m., Kamil Rytarowski wrote:
> This is a good idea.. however it is intrusive now and requires patching
> code shared with windows, linux, darwin, ...
>
> I prefer to leave it for refactoring in future. I don't have environment
> to test other Operating Systems than NetBSD.
Hmm no, the callers of x86bsd_dr_set are only in this file (x86bsd_dr_set_control and
x86bsd_dr_set_addr). They would now look like this:
static void
x86bsd_dr_set_control (unsigned long control)
{
x86bsd_dr_set (inferior_ptid, 7, control);
}
static void
x86bsd_dr_set_addr (int regnum, CORE_ADDR addr)
{
gdb_assert (regnum >= 0 && regnum <= 4);
x86bsd_dr_set (inferior_ptid, regnum, addr);
}
Adding a ptid parameter to x86bsd_dr_set_control and x86bsd_dr_set_addr would be the
next logical step, but that indeed would be a more intrusive change, so I don't suggest
doing that right now.
Simon
next prev parent reply other threads:[~2020-03-19 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 16:13 Kamil Rytarowski
2020-03-19 1:35 ` Simon Marchi
2020-03-19 12:47 ` Kamil Rytarowski
2020-03-19 13:22 ` Simon Marchi [this message]
2020-03-19 13:36 ` Kamil Rytarowski
2020-03-19 13:18 ` [PATCH v3] " Kamil Rytarowski
2020-03-19 13:36 ` [PATCH v4] " Kamil Rytarowski
2020-03-19 13:40 ` Simon Marchi
2020-03-19 13:08 ` [PATCH v2] " 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=5b1b7e0a-3683-5e2b-a07f-9bf89817b4a2@simark.ca \
--to=simark@simark.ca \
--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