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 add a netbsd-specific alpha targe...



details:   https://anonhg.NetBSD.org/src/rev/5b0784a80b1e
branches:  trunk
changeset: 358563:5b0784a80b1e
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 08 03:07:16 2018 +0000

description:
add a netbsd-specific alpha target to handle thread initialization.

diffstat:

 external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c      |  23 +++++++++---
 external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h     |   2 +
 external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c     |  44 +++++++++++++++++++++++++
 external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh |   3 +-
 external/gpl3/gdb/dist/gdb/configure.tgt        |   3 +-
 5 files changed, 67 insertions(+), 8 deletions(-)

diffs (120 lines):

diff -r d50a2027f22e -r 5b0784a80b1e external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c        Mon Jan 08 01:41:34 2018 +0000
+++ b/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c        Mon Jan 08 03:07:16 2018 +0000
@@ -186,6 +186,22 @@
   return 1;
 }
 
+struct target_ops *
+alphabsd_target (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = alphabsd_fetch_inferior_registers;
+  t->to_store_registers = alphabsd_store_inferior_registers;
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (alphabsd_supply_pcb);
+
+  return t;
+}
+
+
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_alphabsd_nat (void);
@@ -195,11 +211,6 @@
 {
   struct target_ops *t;
 
-  t = inf_ptrace_target ();
-  t->to_fetch_registers = alphabsd_fetch_inferior_registers;
-  t->to_store_registers = alphabsd_store_inferior_registers;
+  t = alphabsd_target ();
   add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (alphabsd_supply_pcb);
 }
diff -r d50a2027f22e -r 5b0784a80b1e external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h
--- a/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h       Mon Jan 08 01:41:34 2018 +0000
+++ b/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h       Mon Jan 08 03:07:16 2018 +0000
@@ -37,4 +37,6 @@
                                             void *cb_data,
                                             const struct regcache *regcache);
 
+struct target_ops *alphabsd_target (void);
+
 #endif /* alpha-bsd-tdep.h */
diff -r d50a2027f22e -r 5b0784a80b1e external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c       Mon Jan 08 03:07:16 2018 +0000
@@ -0,0 +1,44 @@
+/* Native-dependent code for NetBSD/alpha.
+
+   Copyright (C) 2018 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "inferior.h"
+#include "regcache.h"
+
+#include "alpha-tdep.h"
+#include "alpha-bsd-tdep.h"
+#include "inf-ptrace.h"
+
+#include "nbsd-nat.h"
+
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <machine/reg.h>
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphanbsd_nat (void);
+
+void
+_initialize_alphanbsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = alphabsd_target ();
+  nbsd_nat_add_target (t);
+}
diff -r d50a2027f22e -r 5b0784a80b1e external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh
--- a/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh   Mon Jan 08 01:41:34 2018 +0000
+++ b/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh   Mon Jan 08 03:07:16 2018 +0000
@@ -1,4 +1,5 @@
 # Host: NetBSD/alpha
-NATDEPFILES= fork-child.o inf-ptrace.o alpha-bsd-nat.o bsd-kvm.o nbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o alpha-bsd-nat.o bsd-kvm.o nbsd-nat.o \
+    alpha-nbsd-tdep.o alpha-nbsd-nat.o
 
 LOADLIBES= -lkvm
diff -r d50a2027f22e -r 5b0784a80b1e external/gpl3/gdb/dist/gdb/configure.tgt
--- a/external/gpl3/gdb/dist/gdb/configure.tgt  Mon Jan 08 01:41:34 2018 +0000
+++ b/external/gpl3/gdb/dist/gdb/configure.tgt  Mon Jan 08 03:07:16 2018 +0000
@@ -72,7 +72,8 @@
 alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
        # Target: NetBSD/alpha
        gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \
-                       alpha-nbsd-tdep.o nbsd-tdep.o solib-svr4.o"
+                       alpha-nbsd-tdep.o alpha-nbsd-nat.o nbsd-tdep.o \
+                       solib-svr4.o"
        ;;
 alpha*-*-openbsd*)
        # Target: OpenBSD/alpha



Home | Main Index | Thread Index | Old Index