pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/gdb



Module Name:    pkgsrc
Committed By:   he
Date:           Tue Dec  6 09:45:51 UTC 2022

Modified Files:
        pkgsrc/devel/gdb: Makefile distinfo
Added Files:
        pkgsrc/devel/gdb/patches: patch-gdb_ppc-nbsd-nat.c
            patch-gdb_ppc-nbsd-tdep.c patch-sim_ppc_emul__netbsd.c

Log Message:
devel/gdb: make this build on NetBSD/macppc.

* Follow up struct member renames in callframe and stackframe.
* Import fixes to ppc-nbsd-tdep.c from our in-tree gdb.
* Fix up sim/ppc/emul_netbsd.c to use the versioned syscall names
  for gettimeofday and getrusage.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 pkgsrc/devel/gdb/Makefile
cvs rdiff -u -r1.39 -r1.40 pkgsrc/devel/gdb/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-nat.c \
    pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-tdep.c \
    pkgsrc/devel/gdb/patches/patch-sim_ppc_emul__netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/gdb/Makefile
diff -u pkgsrc/devel/gdb/Makefile:1.78 pkgsrc/devel/gdb/Makefile:1.79
--- pkgsrc/devel/gdb/Makefile:1.78      Tue Jun 28 11:31:43 2022
+++ pkgsrc/devel/gdb/Makefile   Tue Dec  6 09:45:51 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.78 2022/06/28 11:31:43 wiz Exp $
+# $NetBSD: Makefile,v 1.79 2022/12/06 09:45:51 he Exp $
 
 DISTNAME=      gdb-10.1
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GNU:=gdb/}
 

Index: pkgsrc/devel/gdb/distinfo
diff -u pkgsrc/devel/gdb/distinfo:1.39 pkgsrc/devel/gdb/distinfo:1.40
--- pkgsrc/devel/gdb/distinfo:1.39      Tue Oct 26 10:14:40 2021
+++ pkgsrc/devel/gdb/distinfo   Tue Dec  6 09:45:51 2022
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.39 2021/10/26 10:14:40 nia Exp $
+$NetBSD: distinfo,v 1.40 2022/12/06 09:45:51 he Exp $
 
 BLAKE2s (gdb-10.1.tar.gz) = 441e0dde405c688ecea3c63f9f3ce4284d1f261b40b4f680f8ed868e6df49dad
 SHA512 (gdb-10.1.tar.gz) = 41b50955f82780a1935294669a14eca40e58574ad4aa6d476903b729605f09930e5bb651b4de0c49b948d65fdf521a4b7f22c5d3b1f83dd6c9a15957c9d52370
 Size (gdb-10.1.tar.gz) = 40245323 bytes
+SHA1 (patch-gdb_configure.nat) = 11b1ba9a482bca9d7dc6b543e1ea820eb7ebf193
 SHA1 (patch-gdb_doc_Makefile.in) = f7205fe715779e8aed05d230d43320286f74fdd0
+SHA1 (patch-gdb_ppc-nbsd-nat.c) = e5ffda09347140242e8c2f98da26bf6efe74ec4a
+SHA1 (patch-gdb_ppc-nbsd-tdep.c) = 65c35fdf6c7aecb1de4b4ae7d329fb4a5e51829c
+SHA1 (patch-sim_ppc_emul__netbsd.c) = e002283a52142fef74efd54e9a8b920b79838d1c

Added files:

Index: pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-nat.c
diff -u /dev/null pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-nat.c:1.1
--- /dev/null   Tue Dec  6 09:45:51 2022
+++ pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-nat.c   Tue Dec  6 09:45:51 2022
@@ -0,0 +1,37 @@
+$NetBSD: patch-gdb_ppc-nbsd-nat.c,v 1.1 2022/12/06 09:45:51 he Exp $
+
+Use the updated / correct struct member names.
+
+--- gdb/ppc-nbsd-nat.c.orig    2020-10-24 04:23:02.000000000 +0000
++++ gdb/ppc-nbsd-nat.c
+@@ -167,19 +167,19 @@ ppcnbsd_supply_pcb (struct regcache *reg
+     return 0;
+ 
+   read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
+-  regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr);
+-  regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
++  regcache->raw_supply (tdep->ppc_cr_regnum, &sf.sf_cr);
++  regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.sf_fixreg2);
+   for (i = 0 ; i < 19 ; i++)
+-    regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.fixreg[i]);
++    regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.sf_fixreg[i]);
+ 
+-  read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf));
+-  regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30);
+-  regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31);
+-  regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.sp);
+-
+-  read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
+-  regcache->raw_supply (tdep->ppc_lr_regnum, &cf.lr);
+-  regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr);
++  read_memory(sf.sf_sp, (gdb_byte *)&cf, sizeof(cf));
++  regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.cf_r30);
++  regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.cf_r31);
++  regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.cf_sp);
++
++  read_memory(cf.cf_sp, (gdb_byte *)&cf, sizeof(cf));
++  regcache->raw_supply (tdep->ppc_lr_regnum, &cf.cf_lr);
++  regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.cf_lr);
+ 
+   return 1;
+ }
Index: pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-tdep.c
diff -u /dev/null pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-tdep.c:1.1
--- /dev/null   Tue Dec  6 09:45:51 2022
+++ pkgsrc/devel/gdb/patches/patch-gdb_ppc-nbsd-tdep.c  Tue Dec  6 09:45:51 2022
@@ -0,0 +1,49 @@
+$NetBSD: patch-gdb_ppc-nbsd-tdep.c,v 1.1 2022/12/06 09:45:51 he Exp $
+
+Incorporate changes from r1.7 to r1.9 of in-tree gdb:
+
+1.9:
+PR port-powerpc/56899
+
+Disable 128-bit long double for NetBSD/powerpc.
+
+1.8:
+PR port-powerpc/56899
+
+In addition to ``powerpc'', register NetBSD OS ABI also for ``rs6000'',
+which is default target for powerpc.
+
+1.7:
+fix powerpc (by including ppc-nbsd-tdep.h)
+
+
+--- work/gdb-10.1/gdb/ppc-nbsd-tdep.c.orig     2020-10-24 04:23:02.000000000 +0000
++++ work/gdb-10.1/gdb/ppc-nbsd-tdep.c
+@@ -29,6 +29,7 @@
+ 
+ #include "ppc-tdep.h"
+ #include "nbsd-tdep.h"
++#include "ppc-nbsd-tdep.h"
+ #include "ppc-tdep.h"
+ #include "solib-svr4.h"
+ 
+@@ -176,6 +177,10 @@ ppcnbsd_init_abi (struct gdbarch_info in
+ {
+   nbsd_init_abi (info, gdbarch);
+ 
++  /* NetBSD doesn't support the 128-bit `long double' from the psABI.  */
++  set_gdbarch_long_double_bit (gdbarch, 64);
++  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
++
+   /* For NetBSD, this is an on again, off again thing.  Some systems
+      do use the broken struct convention, and some don't.  */
+   set_gdbarch_return_value (gdbarch, ppcnbsd_return_value);
+@@ -197,6 +202,8 @@ _initialize_ppcnbsd_tdep ()
+ {
+   gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD,
+                         ppcnbsd_init_abi);
++  gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_NETBSD,
++                        ppcnbsd_init_abi);
+ 
+   /* Avoid initializing the register offsets again if they were
+      already initialized by ppcnbsd-nat.c.  */
Index: pkgsrc/devel/gdb/patches/patch-sim_ppc_emul__netbsd.c
diff -u /dev/null pkgsrc/devel/gdb/patches/patch-sim_ppc_emul__netbsd.c:1.1
--- /dev/null   Tue Dec  6 09:45:51 2022
+++ pkgsrc/devel/gdb/patches/patch-sim_ppc_emul__netbsd.c       Tue Dec  6 09:45:51 2022
@@ -0,0 +1,24 @@
+$NetBSD: patch-sim_ppc_emul__netbsd.c,v 1.1 2022/12/06 09:45:51 he Exp $
+
+Use the correctly named versioned syscalls.
+
+--- sim/ppc/emul_netbsd.c.orig 2020-10-24 04:23:02.000000000 +0000
++++ sim/ppc/emul_netbsd.c
+@@ -783,7 +783,7 @@ do_gettimeofday(os_emul_data *emul,
+   if (WITH_TRACE && ppc_trace[trace_os_emul])
+     printf_filtered ("0x%lx, 0x%lx", (long)t_addr, (long)tz_addr);
+ 
+-  SYS(gettimeofday);
++  SYS(__gettimeofday50);
+   emul_write_status(processor, status, err);
+   if (status == 0) {
+     if (t_addr != 0)
+@@ -813,7 +813,7 @@ do_getrusage(os_emul_data *emul,
+   if (WITH_TRACE && ppc_trace[trace_os_emul])
+     printf_filtered ("%d, 0x%lx", who, (long)rusage_addr);
+ 
+-  SYS(getrusage);
++  SYS(__getrusage50);
+   emul_write_status(processor, status, err);
+   if (status == 0) {
+     if (rusage_addr != 0)



Home | Main Index | Thread Index | Old Index