pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gdb-netbsd: Remove local patch for m68k-bsd-nat.c



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Mar 14 17:17:29 2020 +0100
Changeset:	fb9f2d6f3eaba114828020019e970f92874d6718

Modified Files:
	gdb-netbsd/distinfo
Removed Files:
	gdb-netbsd/patches/patch-gdb_m68k-bsd-nat.c

Log Message:
gdb-netbsd: Remove local patch for m68k-bsd-nat.c

All issues addressed upstream.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=01a801176ea15ddfc988cade2e3d84c3b0abfec3

commit 01a801176ea15ddfc988cade2e3d84c3b0abfec3
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date:   Sat Mar 14 16:54:42 2020 +0100

    Inherit m68k_bsd_nat_target from nbsd_nat_target

    gdb/ChangeLog:

            * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
            nbsd_nat_target instead of inf_ptrace_target.
            * m68k-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=f90280caf5b34ebd564809a7f66685efc79bbf6d

commit f90280caf5b34ebd564809a7f66685efc79bbf6d
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date:   Sat Mar 14 16:49:41 2020 +0100

    Define _KERNTYPES in m68k-bsd-nat.c

    Fixes build on NetBSD. types.h does not define register_t by default.

    gdb/ChangeLog:

            * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
            register_t.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bc10778499a971ab9ccecb074cc406d49e1ee608

commit bc10778499a971ab9ccecb074cc406d49e1ee608
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date:   Sat Mar 14 17:07:18 2020 +0100

    m68k: bsd: Change type from char * to gdb_byte *

            * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
            gdb_byte *.
            * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
            * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
            * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=154151a6e303fa4b17e3597e3434a1c5999df8e1

commit 154151a6e303fa4b17e3597e3434a1c5999df8e1
Author: Kamil Rytarowski <n54%gmx.com@localhost>
Date:   Sat Mar 14 17:13:38 2020 +0100

    Add support for NetBSD threads in m68k-bsd-nat.c

    NetBSD ptrace(2) accepts thread id (LWP) as the 4th argument for threads.

    gdb/ChangeLog:

            * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
            it to the ptrace call.
            * m68k-bsd-nat.c (store_registers): Likewise.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fb9f2d6f3eaba114828020019e970f92874d6718

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_m68k-bsd-nat.c | 110 ----------------------------
 2 files changed, 111 deletions(-)

diffs:
diff --git a/gdb-netbsd/distinfo b/gdb-netbsd/distinfo
index 8a3f39b9e0..9c3ad8115a 100644
--- a/gdb-netbsd/distinfo
+++ b/gdb-netbsd/distinfo
@@ -48,7 +48,6 @@ SHA1 (patch-gdb_i386-nbsd-nat.c) = 12583799f643f31849063acf10cb0dc36c68101f
 SHA1 (patch-gdb_i386-nbsd-tdep.c) = 002ece7989025a4bed1ce1eece9d225faf02c538
 SHA1 (patch-gdb_ia64-nbsd-tdep.c) = 4d1795b806b1b957f7959d57cdab7090c9510fe5
 SHA1 (patch-gdb_inf-ptrace.c) = caef41fb10c585b7b403a3dc6e82a924cc90becb
-SHA1 (patch-gdb_m68k-bsd-nat.c) = 5740879c53ea6db0ac9c54dd2426014493e03014
 SHA1 (patch-gdb_mips-nbsd-nat.c) = 1f71cb0d0c8792bfc80a456d294dad6d75b526b5
 SHA1 (patch-gdb_mips-tdep.h) = 24b3cf83513716492297645b2d5c4281ab12b493
 SHA1 (patch-gdb_nat_fork-inferior.c) = c15d3964c448e010958d8977825d6d46f8708e09
diff --git a/gdb-netbsd/patches/patch-gdb_m68k-bsd-nat.c b/gdb-netbsd/patches/patch-gdb_m68k-bsd-nat.c
deleted file mode 100644
index ea7fb7e605..0000000000
--- a/gdb-netbsd/patches/patch-gdb_m68k-bsd-nat.c
+++ /dev/null
@@ -1,110 +0,0 @@
-$NetBSD$
-
---- gdb/m68k-bsd-nat.c.orig	2019-07-16 00:00:27.000000000 +0000
-+++ gdb/m68k-bsd-nat.c
-@@ -29,7 +29,12 @@
- #include "m68k-tdep.h"
- #include "inf-ptrace.h"
- 
-+#ifdef __NetBSD__
-+#include "nbsd-nat.h"
-+struct m68k_bsd_nat_target final : public nbsd_nat_target
-+#else
- struct m68k_bsd_nat_target final : public inf_ptrace_target
-+#endif
- {
-   void fetch_registers (struct regcache *, int) override;
-   void store_registers (struct regcache *, int) override;
-@@ -54,7 +59,7 @@ m68kbsd_fpregset_supplies_p (int regnum)
- static void
- m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
- {
--  const char *regs = gregs;
-+  const gdb_byte *regs = (const gdb_byte *)gregs;
-   int regnum;
- 
-   for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
-@@ -67,7 +72,7 @@ static void
- m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
- {
-   struct gdbarch *gdbarch = regcache->arch ();
--  const char *regs = fpregs;
-+  const gdb_byte *regs = (const gdb_byte *)fpregs;
-   int regnum;
- 
-   for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
-@@ -82,7 +87,7 @@ static void
- m68kbsd_collect_gregset (const struct regcache *regcache,
- 			 void *gregs, int regnum)
- {
--  char *regs = gregs;
-+  gdb_byte *regs = (gdb_byte *)gregs;
-   int i;
- 
-   for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
-@@ -100,7 +105,7 @@ m68kbsd_collect_fpregset (struct regcach
- 			  void *fpregs, int regnum)
- {
-   struct gdbarch *gdbarch = regcache->arch ();
--  char *regs = fpregs;
-+  gdb_byte *regs = (gdb_byte *)fpregs;
-   int i;
- 
-   for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
-@@ -123,7 +128,7 @@ m68k_bsd_nat_target::fetch_registers (st
-     {
-       struct reg regs;
- 
--      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-+      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
- 	perror_with_name (_("Couldn't get registers"));
- 
-       m68kbsd_supply_gregset (regcache, &regs);
-@@ -133,7 +138,7 @@ m68k_bsd_nat_target::fetch_registers (st
-     {
-       struct fpreg fpregs;
- 
--      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
- 	perror_with_name (_("Couldn't get floating point status"));
- 
-       m68kbsd_supply_fpregset (regcache, &fpregs);
-@@ -152,12 +157,12 @@ m68k_bsd_nat_target::store_registers (st
-     {
-       struct reg regs;
- 
--      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-+      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
-         perror_with_name (_("Couldn't get registers"));
- 
-       m68kbsd_collect_gregset (regcache, &regs, regnum);
- 
--      if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-+      if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
-         perror_with_name (_("Couldn't write registers"));
-     }
- 
-@@ -165,12 +170,12 @@ m68k_bsd_nat_target::store_registers (st
-     {
-       struct fpreg fpregs;
- 
--      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
- 	perror_with_name (_("Couldn't get floating point status"));
- 
-       m68kbsd_collect_fpregset (regcache, &fpregs, regnum);
- 
--      if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
-+      if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
- 	perror_with_name (_("Couldn't write floating point status"));
-     }
- }
-@@ -215,7 +220,7 @@ m68kbsd_supply_pcb (struct regcache *reg
-   tmp = pcb->pcb_ps & 0xffff;
-   regcache->raw_supply (M68K_PS_REGNUM, &tmp);
- 
--  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp);
-+  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (gdb_byte *) &tmp, sizeof tmp);
-   regcache->raw_supply (M68K_PC_REGNUM, &tmp);
- 
-   return 1;


Home | Main Index | Thread Index | Old Index