pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gdb-netbsd: Drop no longer needed patch-gdb_alpha-bsd-nat.c
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat Mar 14 16:39:23 2020 +0100
Changeset: cc87b8170f12d11f6d518b8c18e448d4b2aabf9f
Modified Files:
gdb-netbsd/distinfo
Removed Files:
gdb-netbsd/patches/patch-gdb_alpha-bsd-nat.c
Log Message:
gdb-netbsd: Drop no longer needed patch-gdb_alpha-bsd-nat.c
All the relevant code is in the GDB mainline.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6def66f1404e58b376655f6fb622aeb9dfc0f587
commit 6def66f1404e58b376655f6fb622aeb9dfc0f587
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date: Sat Mar 14 16:36:16 2020 +0100
Add support for NetBSD threads in alpha-bsd-nat.c
NetBSD ptrace(2) accepts thread id (LWP) as the 4th argument for threads.
gdb/ChangeLog:
* alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
it to the ptrace call.
* alpha-bsd-nat.c (store_registers): Likewise.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66eaca97ebd0f1b456ffe158fce73bafcce561bb
commit 66eaca97ebd0f1b456ffe158fce73bafcce561bb
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date: Sat Mar 14 16:23:11 2020 +0100
Remove unused code from alpha-bsd-nat.c
gdb/ChangeLog:
* alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
includes.
* alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
* alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
fill_fpregset): Likewise.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4fed520be264b60893aa674071947890f8172915
commit 4fed520be264b60893aa674071947890f8172915
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date: Sat Mar 14 16:05:24 2020 +0100
Inherit alpha_netbsd_nat_target from nbsd_nat_target
gdb/ChangeLog:
* alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
nbsd_nat_target instead of inf_ptrace_target.
* alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
nbsd_nat_target.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2190cf067b87e804c59c0a0c14c8ae48deabfbf4
commit 2190cf067b87e804c59c0a0c14c8ae48deabfbf4
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date: Sat Mar 14 15:53:47 2020 +0100
Define _KERNTYPES in alpha-bsd-nat.c
Fixes build on NetBSD. types.h does not define register_t by default.
gdb/ChangeLog:
* alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
register_t.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cc87b8170f12d11f6d518b8c18e448d4b2aabf9f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gdb-netbsd/distinfo | 1 -
gdb-netbsd/patches/patch-gdb_alpha-bsd-nat.c | 132 ---------------------------
2 files changed, 133 deletions(-)
diffs:
diff --git a/gdb-netbsd/distinfo b/gdb-netbsd/distinfo
index 4d26a2258c..8a3f39b9e0 100644
--- a/gdb-netbsd/distinfo
+++ b/gdb-netbsd/distinfo
@@ -10,7 +10,6 @@ SHA1 (patch-gdb_Makefile.in) = dc465eda202863a23ce660ae5f8065a74e5c8fb4
SHA1 (patch-gdb_aarch64-nbsd-nat.c) = 04ffc8ed696cb2349a67d302c2f8fa596484a9e6
SHA1 (patch-gdb_aarch64-nbsd-tdep.c) = 7720b954f12031b60e1fa0a48ce668b104e09d41
SHA1 (patch-gdb_aarch64-nbsd-tdep.h) = 814627b2b2ce5dc0dc095451183fbe03789f1513
-SHA1 (patch-gdb_alpha-bsd-nat.c) = 4d74177d2255c81fb91c293daaebfc29c4cb8398
SHA1 (patch-gdb_alpha-nbsd-tdep.c) = 8fe9d1f08baa252b61b49c2672391c3349768444
SHA1 (patch-gdb_alpha-tdep.c) = 9030c31dcef6660f58fc27e7979f0dae26e4f970
SHA1 (patch-gdb_amd64-bsd-nat.c) = dea0bd38155f2a39f89f4f62dcbaf3e54ccd654f
diff --git a/gdb-netbsd/patches/patch-gdb_alpha-bsd-nat.c b/gdb-netbsd/patches/patch-gdb_alpha-bsd-nat.c
deleted file mode 100644
index b97a757c85..0000000000
--- a/gdb-netbsd/patches/patch-gdb_alpha-bsd-nat.c
+++ /dev/null
@@ -1,132 +0,0 @@
-$NetBSD$
-
---- gdb/alpha-bsd-nat.c.orig 2019-07-16 00:00:27.000000000 +0000
-+++ gdb/alpha-bsd-nat.c
-@@ -33,17 +33,12 @@
- #include <sys/procfs.h>
- #endif
-
--#ifndef HAVE_GREGSET_T
--typedef struct reg gregset_t;
--#endif
--
--#ifndef HAVE_FPREGSET_T
--typedef struct fpreg fpregset_t;
--#endif
--
--#include "gregset.h"
--
-+#ifdef __NetBSD__
-+#include "nbsd-nat.h"
-+struct alpha_bsd_nat_target final : public nbsd_nat_target
-+#else
- struct alpha_bsd_nat_target final : public inf_ptrace_target
-+#endif
- {
- void fetch_registers (struct regcache *, int) override;
- void store_registers (struct regcache *, int) override;
-@@ -51,33 +46,6 @@ struct alpha_bsd_nat_target final : publ
-
- static alpha_bsd_nat_target the_alpha_bsd_nat_target;
-
--/* Provide *regset() wrappers around the generic Alpha BSD register
-- supply/fill routines. */
--
--void
--supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
--{
-- alphabsd_supply_reg (regcache, (const char *) gregsetp, -1);
--}
--
--void
--fill_gregset (const struct regcache *regcache, gregset_t *gregsetp, int regno)
--{
-- alphabsd_fill_reg (regcache, (char *) gregsetp, regno);
--}
--
--void
--supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
--{
-- alphabsd_supply_fpreg (regcache, (const char *) fpregsetp, -1);
--}
--
--void
--fill_fpregset (const struct regcache *regcache,
-- fpregset_t *fpregsetp, int regno)
--{
-- alphabsd_fill_fpreg (regcache, (char *) fpregsetp, regno);
--}
-
- /* Determine if PT_GETREGS fetches this register. */
-
-@@ -94,12 +62,15 @@ getregs_supplies (int regno)
- void
- alpha_bsd_nat_target::fetch_registers (struct regcache *regcache, int regno)
- {
-+ ptid_t ptid = regcache->ptid ();
-+ pid_t pid = ptid.pid ();
-+ int lwp = ptid.lwp ();
-+
- if (regno == -1 || getregs_supplies (regno))
- {
- struct reg gregs;
-
-- if (ptrace (PT_GETREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-+ if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &gregs, lwp) == -1)
- perror_with_name (_("Couldn't get registers"));
-
- alphabsd_supply_reg (regcache, (char *) &gregs, regno);
-@@ -112,8 +83,7 @@ alpha_bsd_nat_target::fetch_registers (s
- {
- struct fpreg fpregs;
-
-- if (ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+ if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1)
- perror_with_name (_("Couldn't get floating point status"));
-
- alphabsd_supply_fpreg (regcache, (char *) &fpregs, regno);
-@@ -126,17 +96,20 @@ alpha_bsd_nat_target::fetch_registers (s
- void
- alpha_bsd_nat_target::store_registers (struct regcache *regcache, int regno)
- {
-+ ptid_t ptid = regcache->ptid ();
-+ pid_t pid = ptid.pid ();
-+ int lwp = ptid.lwp ();
-+
- if (regno == -1 || getregs_supplies (regno))
- {
- struct reg gregs;
-- if (ptrace (PT_GETREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-+ if (ptrace (PT_GETREGS, pid,
-+ (PTRACE_TYPE_ARG3) &gregs, lwp) == -1)
- perror_with_name (_("Couldn't get registers"));
-
- alphabsd_fill_reg (regcache, (char *) &gregs, regno);
-
-- if (ptrace (PT_SETREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &gregs, 0) == -1)
-+ if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &gregs, lwp) == -1)
- perror_with_name (_("Couldn't write registers"));
-
- if (regno != -1)
-@@ -148,14 +121,13 @@ alpha_bsd_nat_target::store_registers (s
- {
- struct fpreg fpregs;
-
-- if (ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+ if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1)
- perror_with_name (_("Couldn't get floating point status"));
-
- alphabsd_fill_fpreg (regcache, (char *) &fpregs, regno);
-
-- if (ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
-- (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+ if (ptrace (PT_SETFPREGS, pid,
-+ (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1)
- perror_with_name (_("Couldn't write floating point status"));
- }
- }
Home |
Main Index |
Thread Index |
Old Index