Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gdb/dist/gdb Start adjusting to the c++ world.



details:   https://anonhg.NetBSD.org/src/rev/dd9de76c24c8
branches:  trunk
changeset: 999313:dd9de76c24c8
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 28 15:30:39 2019 +0000

description:
Start adjusting to the c++ world.

diffstat:

 external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c   |   12 +-
 external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c   |   18 +-
 external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c |    7 +-
 external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c    |   20 +-
 external/gpl3/gdb/dist/gdb/event-loop.h      |    3 +-
 external/gpl3/gdb/dist/gdb/hppa-nbsd-nat.c   |   12 +-
 external/gpl3/gdb/dist/gdb/i386-bsd-nat.c    |   24 +-
 external/gpl3/gdb/dist/gdb/inf-ptrace.c      |    2 +-
 external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c    |   12 +-
 external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c   |   12 +-
 external/gpl3/gdb/dist/gdb/nbsd-nat.c        |  248 ++++++--------------------
 external/gpl3/gdb/dist/gdb/nbsd-nat.h        |   28 +++
 external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c    |   20 +-
 external/gpl3/gdb/dist/gdb/sh-nbsd-nat.c     |    6 +-
 external/gpl3/gdb/dist/gdb/sparc-nat.c       |   12 +-
 external/gpl3/gdb/dist/gdb/vax-bsd-nat.c     |   10 +-
 external/gpl3/gdb/dist/gdb/x86-bsd-nat.c     |    6 +-
 17 files changed, 171 insertions(+), 281 deletions(-)

diffs (truncated from 1254 to 300 lines):

diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c        Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c        Tue May 28 15:30:39 2019 +0000
@@ -103,7 +103,7 @@
       struct reg gregs;
 
       if (ptrace (PT_GETREGS, regcache->ptid ().pid (),
-                 (PTRACE_TYPE_ARG3) &gregs, ptid_get_lwp (inferior_ptid)) == -1) 
+                 (PTRACE_TYPE_ARG3) &gregs, inferior_ptid.lwp ()) == -1) 
        perror_with_name (_("Couldn't get registers"));
 
       alphabsd_supply_reg (regcache, (char *) &gregs, regno);
@@ -117,7 +117,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-                 (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       alphabsd_supply_fpreg (regcache, (char *) &fpregs, regno);
@@ -134,13 +134,13 @@
     {
       struct reg gregs;
       if (ptrace (PT_GETREGS, regcache->ptid ().pid (),
-                  (PTRACE_TYPE_ARG3) &gregs, ptid_get_lwp (inferior_ptid)) == -1)
+                  (PTRACE_TYPE_ARG3) &gregs, inferior_ptid.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, ptid_get_lwp (inferior_ptid)) == -1) 
+                  (PTRACE_TYPE_ARG3) &gregs, inferior_ptid.lwp ()) == -1) 
         perror_with_name (_("Couldn't write registers"));
 
       if (regno != -1)
@@ -153,13 +153,13 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-                 (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, inferior_ptid.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, ptid_get_lwp (inferior_ptid)) == -1) 
+                 (PTRACE_TYPE_ARG3) &fpregs, inferior_ptid.lwp ()) == -1) 
        perror_with_name (_("Couldn't write floating point status"));
     }
 }
diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c        Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c        Tue May 28 15:30:39 2019 +0000
@@ -48,7 +48,7 @@
     {
       struct reg regs;
 
-      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       amd64_supply_native_gregset (regcache, &regs, -1);
@@ -92,7 +92,7 @@
       if (x86bsd_xsave_len != 0)
        {
          xstateregs = alloca (x86bsd_xsave_len);
-         if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  ptid_get_lwp (inferior_ptid))
+         if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  inferior_ptid.lwp ())
              == -1)
            perror_with_name (_("Couldn't get extended state status"));
 
@@ -101,7 +101,7 @@
        }
 #endif
 
-      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       amd64_supply_fxsave (regcache, -1, &fpregs);
@@ -121,12 +121,12 @@
     {
       struct reg regs;
 
-      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
         perror_with_name (_("Couldn't get registers"));
 
       amd64_collect_native_gregset (regcache, &regs, regnum);
 
-      if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs,  inferior_ptid.lwp ()) == -1)
         perror_with_name (_("Couldn't write registers"));
 
       if (regnum != -1)
@@ -169,11 +169,11 @@
       if (x86bsd_xsave_len != 0)
        {
          xstateregs = alloca (x86bsd_xsave_len);
-         if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  ptid_get_lwp (inferior_ptid))
+         if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  inferior_ptid.lwp ())
              == -1)
            perror_with_name (_("Couldn't get extended state status"));
 
-         amd64_collect_xsave (regcache, regnum, xstateregs,  ptid_get_lwp (inferior_ptid));
+         amd64_collect_xsave (regcache, regnum, xstateregs,  inferior_ptid.lwp ());
 
          if (ptrace (PT_SETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,
                      x86bsd_xsave_len) == -1)
@@ -182,12 +182,12 @@
        }
 #endif
 
-      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       amd64_collect_fxsave (regcache, regnum, &fpregs);
 
-      if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  ptid_get_lwp (inferior_ptid)) == -1)
+      if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs,  inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't write floating point status"));
     }
 }
diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c
--- a/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c      Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c      Tue May 28 15:30:39 2019 +0000
@@ -242,16 +242,15 @@
 {
   ULONGEST cs = 0;
   const char *name;
-  volatile struct gdb_exception ex;
 
   TRY
     {
       cs = get_frame_register_unsigned (this_frame, AMD64_CS_REGNUM);
     }
-  CATCH (ex, RETURN_MASK_ERROR)
+  CATCH (except, RETURN_MASK_ERROR)
     {
-      if (ex.reason < 0 && ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+      if (except.reason < 0 && except.error != NOT_AVAILABLE_ERROR)
+       throw_exception (except);
     }
   END_CATCH
   if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c Tue May 28 15:30:39 2019 +0000
@@ -149,7 +149,7 @@
   int ret;
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
+               (PTRACE_TYPE_ARG3) &inferior_registers, inferior_ptid.lwp ());
 
   if (ret < 0)
     {
@@ -198,7 +198,7 @@
   int regno;
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
+               (PTRACE_TYPE_ARG3) &inferior_registers, inferior_ptid.lwp ());
 
   if (ret < 0)
     {
@@ -216,7 +216,7 @@
   int ret;
 
   ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid)); 
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, inferior_ptid.lwp ()); 
 
   if (ret < 0)
     {
@@ -245,7 +245,7 @@
   int ret;
 
   ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, inferior_ptid.lwp ());
 
   if (ret < 0)
     {
@@ -282,7 +282,7 @@
   int ret;
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid)); 
+               (PTRACE_TYPE_ARG3) &inferior_registers, inferior_ptid.lwp ()); 
 
   if (ret < 0)
     {
@@ -340,7 +340,7 @@
     }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid));
+               (PTRACE_TYPE_ARG3) &inferior_registers, inferior_ptid.lwp ());
 
   if (ret < 0)
     warning (_("unable to write register %d to inferior"), regno);
@@ -382,7 +382,7 @@
     }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_registers, ptid_get_lwp(inferior_ptid)); 
+               (PTRACE_TYPE_ARG3) &inferior_registers, inferior_ptid.lwp ()); 
 
   if (ret < 0)
     warning (_("unable to store general registers"));
@@ -395,7 +395,7 @@
   int ret;
 
   ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid)); 
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, inferior_ptid.lwp ()); 
 
   if (ret < 0)
     {
@@ -417,7 +417,7 @@
     }
 
   ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid)); 
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, inferior_ptid.lwp ()); 
 
   if (ret < 0)
     warning (_("unable to write register %d to inferior"), regno);
@@ -439,7 +439,7 @@
                         (char *) &inferior_fp_registers.fpr_fpsr);
 
   ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
-               (PTRACE_TYPE_ARG3) &inferior_fp_registers, ptid_get_lwp(inferior_ptid));
+               (PTRACE_TYPE_ARG3) &inferior_fp_registers, inferior_ptid.lwp ());
 
   if (ret < 0)
     warning (_("unable to store floating-point registers"));
diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/event-loop.h
--- a/external/gpl3/gdb/dist/gdb/event-loop.h   Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/event-loop.h   Tue May 28 15:30:39 2019 +0000
@@ -69,8 +69,7 @@
    infinite loop.
 
    Corollary tasks are the creation and deletion of event sources.  */
-#ifndef _EVENT_LOOP_H_
-#define _EVENT_LOOP_H_
+
 typedef void *gdb_client_data;
 struct async_signal_handler;
 struct async_event_handler;
diff -r 4747a977695f -r dd9de76c24c8 external/gpl3/gdb/dist/gdb/hppa-nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/hppa-nbsd-nat.c        Tue May 28 14:20:09 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/hppa-nbsd-nat.c        Tue May 28 15:30:39 2019 +0000
@@ -175,7 +175,7 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get registers"));
 
       hppanbsd_supply_gregset (regcache, &regs);
@@ -186,7 +186,7 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get floating point status"));
 
       hppanbsd_supply_fpregset (regcache, &fpregs);
@@ -206,13 +206,13 @@
       struct reg regs;
 
       if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-                  (PTRACE_TYPE_ARG3) &regs, ptid_get_lwp (inferior_ptid)) == -1)
+                  (PTRACE_TYPE_ARG3) &regs, inferior_ptid.lwp ()) == -1)
         perror_with_name (_("Couldn't get registers"));
 
       hppanbsd_collect_gregset (regcache, &regs, regnum);
 
       if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &regs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &regs, inferior_ptid.lwp ()) == -1)
         perror_with_name (_("Couldn't write registers"));
     }
 
@@ -221,13 +221,13 @@
       struct fpreg fpregs;
 
       if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-                 (PTRACE_TYPE_ARG3) &fpregs, ptid_get_lwp (inferior_ptid)) == -1)
+                 (PTRACE_TYPE_ARG3) &fpregs, inferior_ptid.lwp ()) == -1)
        perror_with_name (_("Couldn't get floating point status"));



Home | Main Index | Thread Index | Old Index