From: Kamil Rytarowski <n54@gmx.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid get_ptrace_pid() usage on NetBSD in x86-bsd-nat.c
Date: Thu, 19 Mar 2020 14:36:35 +0100 [thread overview]
Message-ID: <a508f3c6-a577-14ae-5588-17ff7b5b0236@gmx.com> (raw)
In-Reply-To: <5b1b7e0a-3683-5e2b-a07f-9bf89817b4a2@simark.ca>
[-- Attachment #1.1: Type: text/plain, Size: 1050 bytes --]
On 19.03.2020 14:22, Simon Marchi wrote:
> 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.
>
Done in v4.
> Simon
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-03-19 13:37 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
2020-03-19 13:36 ` Kamil Rytarowski [this message]
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=a508f3c6-a577-14ae-5588-17ff7b5b0236@gmx.com \
--to=n54@gmx.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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