From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make inf_ptrace_trad Linux-only, move to separate file
Date: Wed, 02 May 2018 23:59:00 -0000 [thread overview]
Message-ID: <558a9451-c3fd-b892-11aa-61aaefd2b0e8@redhat.com> (raw)
In-Reply-To: <20180412174722.32321-1-palves@redhat.com>
On 04/12/2018 06:47 PM, Pedro Alves wrote:
> There are only two inf_ptrace_trad_target users, MIPS GNU/Linux and
> Alpha GNU/Linux. They both call it via linux_trad_target.
>
> Move this code out of inf-ptrace.c to a GNU/Linux-specific new file.
>
> Making this code be GNU/Linux-specific simplifies C++ification of
> target_ops, because we can make the trad target inherit linux_nat
> instead of inheriting inf_ptrace. That'll be visible in a later patch.
>
> Note this makes linux_target_install_ops an extern function, but that
> is temporary -- the function will disappear once target_ops is made a
> C++ class with virtual methods, later in the series. Also, I did not
> rename the functions in the new file for a similar reason. They'll be
> renamed again anyway in a couple of patches.
>
> gdb/ChangeLog:
> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>
> * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
> "linux-nat.h".
> * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
> * inf-ptrace.c (inf_ptrace_register_u_offset)
> (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
> (inf_ptrace_store_register, inf_ptrace_store_registers)
> (inf_ptrace_trad_target): Move to ...
> * linux-nat-trad.c: ... this new file.
> * linux-nat-trad.h: New file.
> * linux-nat.c (linux_target_install_ops): Make extern.
> (linux_trad_target): Delete.
> * linux-nat.h (linux_trad_target): Delete declaration.
> (linux_target_install_ops): Declare.
> * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
> "linux-nat.h".
Pushed.
Thanks,
Pedro Alves
prev parent reply other threads:[~2018-05-02 23:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 17:47 Pedro Alves
2018-05-02 23:59 ` Pedro Alves [this message]
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=558a9451-c3fd-b892-11aa-61aaefd2b0e8@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).