Module Name:    src
Committed By:   christos
Date:           Mon Jan  8 03:07:16 UTC 2018

Modified Files:
        src/external/gpl3/gdb/dist/gdb: alpha-bsd-nat.c alpha-bsd-tdep.h
            configure.tgt
        src/external/gpl3/gdb/dist/gdb/config/alpha: nbsd.mh
Added Files:
        src/external/gpl3/gdb/dist/gdb: alpha-nbsd-nat.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/dist/gdb/configure.tgt
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.2	Mon Jan  1 11:28:14 2018
+++ src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c	Sun Jan  7 22:07:16 2018
@@ -186,6 +186,22 @@ alphabsd_supply_pcb (struct regcache *re
   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 @@ _initialize_alphabsd_nat (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;
+  t = alphabsd_target ();
   add_target (t);
-
-  /* Support debugging kernel virtual memory images.  */
-  bsd_kvm_add_target (alphabsd_supply_pcb);
 }

Index: src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h:1.1.1.1 src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h:1.2
--- src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h:1.1.1.1	Tue Nov 28 13:18:05 2017
+++ src/external/gpl3/gdb/dist/gdb/alpha-bsd-tdep.h	Sun Jan  7 22:07:16 2018
@@ -37,4 +37,6 @@ void alphanbsd_iterate_over_regset_secti
 					     void *cb_data,
 					     const struct regcache *regcache);
 
+struct target_ops *alphabsd_target (void);
+
 #endif /* alpha-bsd-tdep.h */

Index: src/external/gpl3/gdb/dist/gdb/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.16 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.17
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.16	Wed Nov 29 17:40:18 2017
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Sun Jan  7 22:07:16 2018
@@ -72,7 +72,8 @@ alpha*-*-linux*)
 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

Index: src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.5 src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.6
--- src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.5	Thu Nov 30 10:26:54 2017
+++ src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh	Sun Jan  7 22:07:16 2018
@@ -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

Added files:

Index: src/external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c
diff -u /dev/null src/external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c:1.1
--- /dev/null	Sun Jan  7 22:07:16 2018
+++ src/external/gpl3/gdb/dist/gdb/alpha-nbsd-nat.c	Sun Jan  7 22:07:16 2018
@@ -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);
+}

Reply via email to