CVS commit: src/external/gpl3/gdb/dist/gdb

2021-06-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Jun  4 01:42:14 UTC 2021

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.c

Log Message:
Add missing nbsd_init_abi() call to aarch64_nbsd_init_abi().

Fix tests/usr.bin/gdb/t_regress:pie on aarch64eb (types of auxv was
misinterpreted), and hopefully other strange behaviors on aarch64{,eb}.

This is a regression introduced in GDB11. Neither gdb.old nor release
branches are affected.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c

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/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.7 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.8
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.7	Fri Dec 11 18:23:25 2020
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Fri Jun  4 01:42:14 2021
@@ -182,6 +182,8 @@ aarch64_nbsd_init_abi (struct gdbarch_in
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
+  nbsd_init_abi (info, gdbarch);
+
   set_solib_svr4_fetch_link_map_offsets (gdbarch,
 	 svr4_lp64_fetch_link_map_offsets);
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec 14 12:34:07 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: c-exp.y

Log Message:
Initialize namelen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/c-exp.y

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/c-exp.y
diff -u src/external/gpl3/gdb/dist/gdb/c-exp.y:1.3 src/external/gpl3/gdb/dist/gdb/c-exp.y:1.4
--- src/external/gpl3/gdb/dist/gdb/c-exp.y:1.3	Sun Dec 13 16:50:47 2020
+++ src/external/gpl3/gdb/dist/gdb/c-exp.y	Mon Dec 14 12:34:07 2020
@@ -2614,7 +2614,7 @@ get_namelen (const char *tokstart, bool 
   int c;
   int namelen;
 
-  for (c = tokstart[namelen];
+  for (namelen = 0, c = tokstart[namelen];
(c == '_' || c == '$' || (dot && c == '.') || c_ident_is_alnum (c) || c == '<');)
 {
   /* Template parameter lists are part of the name.



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Dec 14 02:05:08 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Add some precautions for platforms without PT_STEP support.

"nat/gdb_ptrace.h" defines PT_STEP as 9, if it is not defined. nat-ptrace.c
depends on this; inf_ptrace_target::resume() uses PT_STEP unconditionally
when its ``step'' argument is non-zero. Therefore,

- Add comment that nbsd-nat.c should include  directly,
  instead of "nat/gdb_ptrace.h".

- Add gdb_assert(step == 0) in nbsd_nat_target::resume() ifndef PT_STEP,
  before calling inf_ptrace_target::resume().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.21 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.22
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.21	Mon Dec 14 02:01:03 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Mon Dec 14 02:05:07 2020
@@ -27,6 +27,9 @@
 #include "gdbarch.h"
 
 #include 
+/* Use  directly, instead of "nat/gdb_ptrace.h".  Otherwise,
+   PT_STEP will be defined unintentionally, which breaks platforms without
+   PT_STEP support.  */
 #include 
 #include 
 #include 
@@ -539,6 +542,7 @@ nbsd_nat_target::resume (ptid_t ptid, in
 	nbsd_resume (this, ptid_t (inf->pid, 0, 0), step, signal);
 }
 #else
+gdb_assert(step == 0);
 if (ptid.pid () == -1)
   ptid = inferior_ptid;
 inf_ptrace_target::resume (ptid, step, signal); 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Dec 14 02:01:03 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Revert previous as per request from kamil; now, arm/ptrace.h does not
expose unimplemented PT_STEP.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.20 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.21
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.20	Thu Dec 10 07:14:58 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Mon Dec 14 02:01:03 2020
@@ -458,7 +458,7 @@ nbsd_nat_target::info_proc (const char *
   return true;
 }
 
-#if defined(PT_STEP) && !defined(__arm__)
+#ifdef PT_STEP
 /* Resume execution of a specified PTID, that points to a process or a thread
within a process.  If one thread is specified, all other threads are
suspended.  If STEP is nonzero, single-step it.  If SIGNAL is nonzero,
@@ -530,7 +530,7 @@ nbsd_resume(nbsd_nat_target *target, pti
 void
 nbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
 {
-#if defined(PT_STEP) && !defined(__arm__)
+#ifdef PT_STEP
   if (minus_one_ptid != ptid)
 nbsd_resume (this, ptid, step, signal);
   else



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 16:50:47 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: c-exp.y

Log Message:
Improve previous: generated names end with .[[:digits:]] so look for that
instead.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/c-exp.y

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/c-exp.y
diff -u src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2 src/external/gpl3/gdb/dist/gdb/c-exp.y:1.3
--- src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2	Fri Dec 11 13:25:45 2020
+++ src/external/gpl3/gdb/dist/gdb/c-exp.y	Sun Dec 13 11:50:47 2020
@@ -2608,7 +2608,63 @@ static bool last_was_structop;
 /* Depth of parentheses.  */
 static int paren_depth;
 
-static const char PART[] = ".part.";
+static int
+get_namelen (const char *tokstart, bool dot)
+{
+  int c;
+  int namelen;
+
+  for (c = tokstart[namelen];
+   (c == '_' || c == '$' || (dot && c == '.') || c_ident_is_alnum (c) || c == '<');)
+{
+  /* Template parameter lists are part of the name.
+	 FIXME: This mishandles `print $a<4&&$a>3'.  */
+
+  if (c == '<')
+	{
+	  if (! is_cast_operator (tokstart, namelen))
+	{
+	  /* Scan ahead to get rest of the template specification.  Note
+		 that we look ahead only when the '<' adjoins non-whitespace
+		 characters; for comparison expressions, e.g. "a < b > c",
+		 there must be spaces before the '<', etc. */
+	  const char *p = find_template_name_end (tokstart + namelen);
+
+	  if (p)
+		namelen = p - tokstart;
+	}
+	  break;
+	}
+  c = tokstart[++namelen];
+}
+  return namelen;
+}
+
+static bool is_generated_symbol (const char *symbol)
+{
+  /* generated symbol are of the form:
+
+ .
+ .isra.
+ .part.
+
+So we see if the symbol ends with .
+   */
+
+  int len = get_namelen (symbol, true);
+  int ndigits;
+
+  if (len-- == 0)
+return false;
+
+  for (ndigits = 0; ndigits <= len && ISDIGIT(symbol[len - ndigits]); ndigits++)
+continue;
+
+  if (ndigits == 0)
+return false;
+
+  return symbol[len - ndigits] == '.';
+}
 
 /* Read one token, getting characters through lexptr.  */
 
@@ -2725,13 +2781,6 @@ lex_one_token (struct parser_state *par_
   return c;
 
 case '.':
-  /* Gross! recognize .part.N */
-  if (strncmp(pstate->lexptr, PART, sizeof(PART) - 1) == 0 &&
-	ISDIGIT(pstate->lexptr[sizeof(PART) - 1]) &&
-	pstate->lexptr[sizeof(PART)] == '\0')
-	{
-	  break;
-	}
   /* Might be a floating point number.  */
   if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
 	{
@@ -2895,30 +2944,7 @@ lex_one_token (struct parser_state *par_
 error (_("Invalid character '%c' in expression."), c);
 
   /* It's a name.  See how long it is.  */
-  namelen = 0;
-  for (c = tokstart[namelen];
-   (c == '_' || c == '$' || c == '.' || c_ident_is_alnum (c) || c == '<');)
-{
-  /* Template parameter lists are part of the name.
-	 FIXME: This mishandles `print $a<4&&$a>3'.  */
-
-  if (c == '<')
-	{
-	  if (! is_cast_operator (tokstart, namelen))
-	{
-	  /* Scan ahead to get rest of the template specification.  Note
-		 that we look ahead only when the '<' adjoins non-whitespace
-		 characters; for comparison expressions, e.g. "a < b > c",
-		 there must be spaces before the '<', etc. */
-	  const char *p = find_template_name_end (tokstart + namelen);
-
-	  if (p)
-		namelen = p - tokstart;
-	}
-	  break;
-	}
-  c = tokstart[++namelen];
-}
+  namelen = get_namelen (tokstart, is_generated_symbol (tokstart));
 
   /* The token "if" terminates the expression and is NOT removed from
  the input stream.  It doesn't count if it appears in the



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 18:25:45 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: c-exp.y

Log Message:
PR/55851: Martin Husemann: recognize .part. names
This is gross; perhaps we should hide them completely (not print them
in stack traces etc.)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gdb/dist/gdb/c-exp.y

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/c-exp.y
diff -u src/external/gpl3/gdb/dist/gdb/c-exp.y:1.1.1.9 src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2
--- src/external/gpl3/gdb/dist/gdb/c-exp.y:1.1.1.9	Mon Sep 14 21:43:28 2020
+++ src/external/gpl3/gdb/dist/gdb/c-exp.y	Fri Dec 11 13:25:45 2020
@@ -2608,6 +2608,8 @@ static bool last_was_structop;
 /* Depth of parentheses.  */
 static int paren_depth;
 
+static const char PART[] = ".part.";
+
 /* Read one token, getting characters through lexptr.  */
 
 static int
@@ -2723,6 +2725,13 @@ lex_one_token (struct parser_state *par_
   return c;
 
 case '.':
+  /* Gross! recognize .part.N */
+  if (strncmp(pstate->lexptr, PART, sizeof(PART) - 1) == 0 &&
+	ISDIGIT(pstate->lexptr[sizeof(PART) - 1]) &&
+	pstate->lexptr[sizeof(PART)] == '\0')
+	{
+	  break;
+	}
   /* Might be a floating point number.  */
   if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
 	{
@@ -2888,7 +2897,7 @@ lex_one_token (struct parser_state *par_
   /* It's a name.  See how long it is.  */
   namelen = 0;
   for (c = tokstart[namelen];
-   (c == '_' || c == '$' || c_ident_is_alnum (c) || c == '<');)
+   (c == '_' || c == '$' || c == '.' || c_ident_is_alnum (c) || c == '<');)
 {
   /* Template parameter lists are part of the name.
 	 FIXME: This mishandles `print $a<4&&$a>3'.  */



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 18:23:25 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: Makefile.in aarch64-nbsd-tdep.c

Log Message:
fix aarch64 crossgdb


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/Makefile.in
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c

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/Makefile.in
diff -u src/external/gpl3/gdb/dist/gdb/Makefile.in:1.4 src/external/gpl3/gdb/dist/gdb/Makefile.in:1.5
--- src/external/gpl3/gdb/dist/gdb/Makefile.in:1.4	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/Makefile.in	Fri Dec 11 13:23:25 2020
@@ -667,6 +667,7 @@ TARGET_OBS = @TARGET_OBS@
 ALL_64_TARGET_OBS = \
 	aarch64-fbsd-tdep.o \
 	aarch64-linux-tdep.o \
+	aarch64-nbsd-tdep.o \
 	aarch64-newlib-tdep.o \
 	aarch64-ravenscar-thread.o \
 	aarch64-tdep.o \

Index: src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.6	Sat Jul 13 17:55:52 2019
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Fri Dec 11 13:23:25 2020
@@ -194,6 +194,7 @@ aarch64_nbsd_init_abi (struct gdbarch_in
 (gdbarch, aarch64_nbsd_iterate_over_regset_sections);
 }
 
+void _initialize_aarch64_nbsd_tdep (void);
 void
 _initialize_aarch64_nbsd_tdep (void)
 {



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Dec 10 16:07:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sh-nbsd-tdep.c

Log Message:
Avoid an unused variable (breaking the build)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c

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/sh-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.10 src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.11
--- src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.10	Sun Dec  6 04:08:51 2020
+++ src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c	Thu Dec 10 16:07:26 2020
@@ -170,7 +170,7 @@ shnbsd_sigtramp_cache_init (const struct
 			CORE_ADDR func)
 {
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  // struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int sp_regnum = gdbarch_sp_regnum (gdbarch);
   CORE_ADDR sp = get_frame_register_unsigned (next_frame, sp_regnum);
   CORE_ADDR base;



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 10 07:27:37 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-tdep.c

Log Message:
Fix armeb; CORE_ADDR is uint64_t but 2nd argument of raw_supply() is
expected to be the same size as PC. Therefore, PC was always read as
zero for big-endian.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c

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/arm-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.7 src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.8
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.7	Sat Dec  5 22:14:44 2020
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c	Thu Dec 10 07:27:37 2020
@@ -72,7 +72,7 @@ arm_nbsd_supply_gregset (const struct re
 
   if (regnum == -1 || regnum == ARM_PC_REGNUM)
 {
-  CORE_ADDR r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->pc);
+  uint32_t r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->pc);
   regcache->raw_supply (ARM_PC_REGNUM, (char *) _pc);
 }
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 10 07:14:58 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Fix arm, for which PT_STEP is defined but unimplemented.

XXX
Stop exposing PT_STEP to userland for arm?


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.19 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.20
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.19	Sat Dec  5 22:14:44 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Thu Dec 10 07:14:58 2020
@@ -458,7 +458,7 @@ nbsd_nat_target::info_proc (const char *
   return true;
 }
 
-#ifdef PT_STEP
+#if defined(PT_STEP) && !defined(__arm__)
 /* Resume execution of a specified PTID, that points to a process or a thread
within a process.  If one thread is specified, all other threads are
suspended.  If STEP is nonzero, single-step it.  If SIGNAL is nonzero,
@@ -530,7 +530,7 @@ nbsd_resume(nbsd_nat_target *target, pti
 void
 nbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
 {
-#ifdef PT_STEP
+#if defined(PT_STEP) && !defined(__arm__)
   if (minus_one_ptid != ptid)
 nbsd_resume (this, ptid, step, signal);
   else



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec  8 13:56:38 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64-nbsd-nat.c

Log Message:
include gdbarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c

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/sparc64-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c	Tue Dec  8 08:56:38 2020
@@ -18,6 +18,7 @@
along with this program.  If not, see .  */
 
 #include "defs.h"
+#include "gdbarch.h"
 #include "gdbcore.h"
 #include "regcache.h"
 #include "inferior.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  7 20:28:53 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc-nbsd-tdep.c

Log Message:
make function static (fixes crossgdb build, reported by martin@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c

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/sparc-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.6	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c	Mon Dec  7 15:28:53 2020
@@ -315,7 +315,7 @@ sparc32nbsd_init_abi (struct gdbarch_inf
   frame_unwind_append_unwinder (gdbarch, _sigcontext_frame_unwind);
 }
 
-void
+static void
 sparc32nbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   sparc32nbsd_init_abi (info, gdbarch);



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:29:03 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: m68k-bsd-nat.c ppc-nbsd-nat.c
sparc-tdep.h vax-bsd-nat.c

Log Message:
fix m68k, ppc, sparc, vax


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/sparc-tdep.h

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/m68k-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.8	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
Index: src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.8	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"
@@ -59,7 +58,7 @@ static void
 vaxbsd_collect_gregset (const struct regcache *regcache,
 			void *gregs, int regnum)
 {
-  gdb_byte *regs = (void *)gregs;
+  gdb_byte *regs = (gdb_byte *)gregs;
   int i;
 
   for (i = 0; i <= VAX_NUM_REGS; i++)

Index: src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.10	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -20,7 +20,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 
 #include 
@@ -33,8 +32,6 @@
 #include "inferior.h"
 #include "regcache.h"
 
-#include "common/gdb_assert.h"
-
 #include "nbsd-nat.h"
 #include "ppc-tdep.h"
 #include "ppc-nbsd-tdep.h"

Index: src/external/gpl3/gdb/dist/gdb/sparc-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.4 src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.5
--- src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.4	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc-tdep.h	Sat Dec  5 22:29:03 2020
@@ -255,9 +255,6 @@ extern const struct sparc_gregmap sparc3
 extern CORE_ADDR sparcnbsd_step_trap (struct frame_info *frame,
   unsigned long insn);
 
-extern void sparc32nbsd_init_abi (struct gdbarch_info info,
-  struct gdbarch *gdbarch);
-
 extern struct trad_frame_saved_reg *
   sparc32nbsd_sigcontext_saved_regs (struct frame_info *next_frame);
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 22:24:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c

Log Message:
fix arm build


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c

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/arm-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.14 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.15
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.14	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c	Sat Dec  5 17:24:26 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
@@ -52,7 +51,7 @@ public:
   const struct target_desc *read_description () override;
 };
 
-static arm_nbsd_nat_target the_arm_nbsd_nat_target;
+static arm_netbsd_nat_target the_arm_netbsd_nat_target;
 
 /* Determine if PT_GETREGS fetches REGNUM.  */
 
@@ -72,8 +71,6 @@ getfpregs_supplies (int regnum)
 	  || regnum == ARM_FPSCR_REGNUM);
 }
 
-extern int arm_apcs_32;
-
 static int
 armnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {
@@ -142,18 +139,16 @@ fetch_register (struct regcache *regcach
   pid_t pid = ptid.pid ();
   int lwp = ptid.lwp ();
   int ret;
-  int lwp = regcache->ptid ().lwp ();
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) _registers, lwp);
+		(PTRACE_TYPE_ARG3) , lwp);
 
   if (ret < 0)
 {
   warning (_("unable to fetch general register"));
   return;
 }
-  arm_nbsd_supply_gregset (nullptr, regcache, regno, _registers,
-			   sizeof (inferior_registers));
+  arm_nbsd_supply_gregset (nullptr, regcache, regno, , sizeof (regs));
 }
 
 static void
@@ -229,15 +224,14 @@ static void
 store_register (const struct regcache *regcache, int regno)
 {
   struct gdbarch *gdbarch = regcache->arch ();
-  struct reg inferior_registers;
-  int lwp = regcache->ptid ().lwp ();
+  struct reg regs;
   int ret;
   ptid_t ptid = regcache->ptid ();
   pid_t pid = ptid.pid ();
   int lwp = ptid.lwp ();
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) _registers, lwp);
+		(PTRACE_TYPE_ARG3) , lwp);
 
   if (ret < 0)
 {
@@ -291,7 +285,7 @@ store_register (const struct regcache *r
 }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) _registers, lwp);
+		(PTRACE_TYPE_ARG3) , lwp);
 
   if (ret < 0)
 warning (_("unable to write register %d to inferior"), regno);
@@ -301,7 +295,7 @@ static void
 store_regs (const struct regcache *regcache)
 {
   struct gdbarch *gdbarch = regcache->arch ();
-  struct reg inferior_registers;
+  struct reg regs;
   int lwp = regcache->ptid ().lwp ();
   int ret;
   int regno;
@@ -333,7 +327,7 @@ store_regs (const struct regcache *regca
 }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) _registers, lwp);
+		(PTRACE_TYPE_ARG3) , lwp);
 
   if (ret < 0)
 warning (_("unable to store general registers"));
@@ -438,5 +432,6 @@ _initialize_arm_netbsd_nat ()
   /* Support debugging kernel virtual memory images.  */
   bsd_kvm_add_target (armnbsd_supply_pcb);
 
+/*###436 [cc] note: suggested alternative: 'the_arm_nbsd_nat_target'%%%*/
   add_inf_child_target (_arm_netbsd_nat_target);
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 24 23:06:15 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: bsd-kvm.c

Log Message:
Now that we are adding the thread in the bsd_kvm_ops target namespace,
make sure that the inferior's top namespace is that too.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c

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/bsd-kvm.c
diff -u src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.18 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.19
--- src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.18	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/bsd-kvm.c	Sat Oct 24 19:06:15 2020
@@ -140,6 +140,7 @@ bsd_kvm_target_open (const char *arg, in
   push_target (_kvm_ops);
 
   inf = add_inferior_silent (bsd_kvm_ptid.pid ());
+  inf->push_target (_kvm_ops);
   inf->aspace = maybe_new_address_space ();
   inf->pspace = new program_space (inf->aspace);
 



CVS commit: src/external/gpl3/gdb/dist/gdb/nat

2020-10-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Oct 14 14:02:43 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb/nat: fork-inferior.c

Log Message:
Limit the switch_to_thread() calls in startup_inferior()

Do not jump over the threads during the startup unless we encounter
TARGET_WAITKIND_STOPPED with SIGTRAP or TARGET_WAITKIND_EXECD.

Otherwise whenever a startup-with-shell processes signals on the
startup stage, it might indicate to switch to a non-existing
thread or a special-thread number (target lwp=0 on NetBSD means
that a signal was directed to all threads within a process).

This caused a crash with tcsh on NetBSD, where the tcsh shell
runs startup detection of the hostname. This action involves
spwaning a new process through fork.

GDB crashes this way:
$ SHELL=tcsh /usr/bin/gdb echo
(gdb) r
Starting program: /bin/echo
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/thread.c:1309:
internal-error: void switch_to_thread(thread_info*):
Assertion `thr != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

This patch has been submitted upstream for review:

https://sourceware.org/pipermail/gdb-patches/2020-October/172558.html


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c

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/nat/fork-inferior.c
diff -u src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.1.1.2 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.2
--- src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.1.1.2	Tue Sep 15 01:43:40 2020
+++ src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c	Wed Oct 14 14:02:43 2020
@@ -503,7 +503,6 @@ startup_inferior (process_stratum_target
 	  case TARGET_WAITKIND_SYSCALL_ENTRY:
 	  case TARGET_WAITKIND_SYSCALL_RETURN:
 	/* Ignore gracefully during startup of the inferior.  */
-	switch_to_thread (proc_target, event_ptid);
 	break;
 
 	  case TARGET_WAITKIND_SIGNALLED:
@@ -536,7 +535,9 @@ startup_inferior (process_stratum_target
 
 	  case TARGET_WAITKIND_STOPPED:
 	resume_signal = ws.value.sig;
-	switch_to_thread (proc_target, event_ptid);
+	/* Ignore gracefully the !TRAP signals intercepted from the shell.  */
+	if (resume_signal == GDB_SIGNAL_TRAP)
+	  switch_to_thread (proc_target, event_ptid);
 	break;
 	}
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-06 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Oct  6 23:14:47 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c

Log Message:
Undo local patches

They are no longer needed (and are wrong).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.22
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.21	Tue Sep 15 02:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Tue Oct  6 23:14:47 2020
@@ -263,12 +263,10 @@ get_ptrace_pid (ptid_t ptid)
 {
   pid_t pid;
 
-#ifndef __NetBSD__
   /* If we have an LWPID to work with, use it.  Otherwise, we're
  dealing with a non-threaded program/target.  */
   pid = ptid.lwp ();
   if (pid == 0)
-#endif
 pid = ptid.pid ();
   return pid;
 }
@@ -293,7 +291,6 @@ inf_ptrace_target::resume (ptid_t ptid, 
   else
 request = PT_CONTINUE;
 
-  int sig;
   if (step)
 {
   /* If this system does not support PT_STEP, a higher level
@@ -302,23 +299,13 @@ inf_ptrace_target::resume (ptid_t ptid, 
 	 all possible successor instructions), so we don't have to
 	 worry about that here.  */
   request = PT_STEP;
-#if __NetBSD__
-  /*
-   * On NetBSD the data field of PT_STEP contains the thread
-   * to be stepped; all other threads are continued if this value is > 0
-   */
-  sig = ptid.lwp ();
-#else
-  sig = 0;
-#endif
-} else
-  sig = gdb_signal_to_host (signal);
+}
 
   /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from
  where it was.  If GDB wanted it to start some other way, we have
  already written a new program counter value to the child.  */
   errno = 0;
-  gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, sig);
+  gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
   if (errno != 0)
 perror_with_name (("ptrace"));
 }
@@ -476,15 +463,6 @@ inf_ptrace_target::xfer_partial (enum ta
 	/* If the PT_IO request is somehow not supported, fallback on
 	   using PT_WRITE_D/PT_READ_D.  Otherwise we will return zero
 	   to indicate failure.  */
-	if (errno == EACCES)
-	  {
-	fprintf_unfiltered (gdb_stderr, "Cannot %s process at %p (%s). "
-"Is PaX MPROTECT active? See security(7), "
-"sysctl(7), paxctl(8)\n", writebuf ? "write to" :
-"read from", piod.piod_offs,
-strerror(errno));
-	return TARGET_XFER_E_IO;	/* Some other error perhaps? */
-	  }
 	if (errno != EINVAL)
 	  return TARGET_XFER_EOF;
   }

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.18
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17	Sat Sep 19 21:45:45 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Tue Oct  6 23:14:47 2020
@@ -587,9 +587,6 @@ nbsd_nat_target::wait (ptid_t ptid, stru
   siginfo_t *si = _siginfo;
 
   int lwp = psi.psi_lwpid;
-  // XXX: should the kernel return this?
-  if (lwp == 0)
-lwp = pid;
 
   int signo = si->si_signo;
   const int code = si->si_code;



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-06 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Oct  6 22:17:42 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-tdep.c

Log Message:
Remove NFC local delta


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c

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/nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.6
--- src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.5	Tue Sep 15 02:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c	Tue Oct  6 22:17:42 2020
@@ -3,9 +3,9 @@
Copyright (C) 2002-2020 Free Software Foundation, Inc.
 
Contributed by Wasabi Systems, 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



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-10-06 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Oct  6 22:14:41 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: ppc-nbsd-tdep.c

Log Message:
Fix typo

Remove delta with upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c

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/ppc-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.6
--- src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.5	Tue Sep 15 02:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c	Tue Oct  6 22:14:41 2020
@@ -199,7 +199,7 @@ _initialize_ppcnbsd_tdep ()
 			  ppcnbsd_init_abi);
 
   /* Avoid initializing the register offsets again if they were
- already initailized by ppcnbsd-nat.c.  */
+ already initialized by ppcnbsd-nat.c.  */
   if (ppcnbsd_reg_offsets.pc_offset == 0)
 {
   /* General-purpose registers.  */



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-09-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 20 14:39:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: corelow.c

Log Message:
Don't read data from sections without contents on NetBSD. We end up reading
0's and svr4_exec_displacement read phdrs_target successfully, and we
end up in the rabbit-hole of 0 displacement for pie binaries and then we
can't load our shared libaries from the core file.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gdb/dist/gdb/corelow.c

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/corelow.c
diff -u src/external/gpl3/gdb/dist/gdb/corelow.c:1.1.1.9 src/external/gpl3/gdb/dist/gdb/corelow.c:1.2
--- src/external/gpl3/gdb/dist/gdb/corelow.c:1.1.1.9	Mon Sep 14 21:43:29 2020
+++ src/external/gpl3/gdb/dist/gdb/corelow.c	Sun Sep 20 10:39:26 2020
@@ -841,6 +841,7 @@ core_target::xfer_partial (enum target_o
 	if (xfer_status == TARGET_XFER_OK)
 	  return TARGET_XFER_OK;
 
+#ifndef __NetBSD__
 	/* Finally, attempt to access data in core file sections with
 	   no contents.  These will typically read as all zero.  */
 	auto no_contents_cb = [&] (const struct target_section *s)
@@ -853,7 +854,7 @@ core_target::xfer_partial (enum target_o
 			 m_core_section_table.sections,
 			 m_core_section_table.sections_end,
 			 no_contents_cb);
-
+#endif
 	return xfer_status;
   }
 case TARGET_OBJECT_AUXV:



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 19 21:45:45 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
The lid of the main thread == pid now. Should we fix the kernel to return
this? Now debugging live programs work.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.16 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.17
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.16	Wed Sep 16 22:12:31 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Sat Sep 19 17:45:45 2020
@@ -587,6 +587,9 @@ nbsd_nat_target::wait (ptid_t ptid, stru
   siginfo_t *si = _siginfo;
 
   int lwp = psi.psi_lwpid;
+  // XXX: should the kernel return this?
+  if (lwp == 0)
+lwp = pid;
 
   int signo = si->si_signo;
   const int code = si->si_code;



CVS commit: src/external/gpl3/gdb/dist/gdb/doc

2020-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 20:13:20 UTC 2020

Added Files:
src/external/gpl3/gdb/dist/gdb/doc: gcore.1 gdb-add-index.1 gdb.1
gdbinit.5 gdbserver.1

Log Message:
commit generated man pages


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/gpl3/gdb/dist/gdb/doc/gcore.1 \
src/external/gpl3/gdb/dist/gdb/doc/gdb-add-index.1 \
src/external/gpl3/gdb/dist/gdb/doc/gdb.1 \
src/external/gpl3/gdb/dist/gdb/doc/gdbinit.5 \
src/external/gpl3/gdb/dist/gdb/doc/gdbserver.1

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

Added files:

Index: src/external/gpl3/gdb/dist/gdb/doc/gcore.1
diff -u /dev/null src/external/gpl3/gdb/dist/gdb/doc/gcore.1:1.3
--- /dev/null	Thu Sep 17 16:13:20 2020
+++ src/external/gpl3/gdb/dist/gdb/doc/gcore.1	Thu Sep 17 16:13:20 2020
@@ -0,0 +1,196 @@
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\"
+.\" Standard preamble:
+.\" 
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.ds C` ""
+.ds C' ""
+'br\}
+.el\{\
+.ds -- \|\(em\|
+.ds PI \(*p
+.ds L" ``
+.ds R" ''
+.ds C`
+.ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el   .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+.if \nF \{\
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.if !\nF==2 \{\
+.nr % 0
+.nr F 2
+.\}
+.\}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.\" fudge factors for nroff and troff
+.if n \{\
+.ds #H 0
+.ds #V .8m
+.ds #F .3m
+.ds #[ \f1
+.ds #] \fP
+.\}
+.if t \{\
+.ds #H ((1u-(n(.fu%2u))*.13m)
+.ds #V .6m
+.ds #F 0
+.ds #[ \&
+.ds #] \&
+.\}
+.\" simple accents for nroff and troff
+.if n \{\
+.ds ' \&
+.ds ` \&
+.ds ^ \&
+.ds , \&
+.ds ~ ~
+.ds /
+.\}
+.if t \{\
+.ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.ds : e
+.ds 8 ss
+.ds o a
+.ds d- d\h'-1'\(ga
+.ds D- D\h'-1'\(hy
+.ds th \o'bp'
+.ds Th \o'LP'
+.ds ae ae
+.ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" 
+.\"
+.IX Title "GCORE 1"
+.TH GCORE 1 "2020-09-17" "gdb-11.0.50.20200914-git" "GNU Development Tools"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes

CVS commit: src/external/gpl3/gdb/dist/gdb

2020-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 02:12:31 UTC 2020

Added Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Add back accidentally missed file


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.16 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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

Added files:

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u /dev/null src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.16
--- /dev/null	Wed Sep 16 22:12:31 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Wed Sep 16 22:12:31 2020
@@ -0,0 +1,791 @@
+/* Native-dependent code for NetBSD.
+
+   Copyright (C) 2006-2020 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 .  */
+
+#include "defs.h"
+
+#include "nbsd-nat.h"
+#include "nat/netbsd-nat.h"
+#include "gdbthread.h"
+#include "nbsd-tdep.h"
+#include "inferior.h"
+#include "gdbarch.h"
+
+#include 
+#include 
+#include 
+#include 
+
+/* Return the name of a file that can be opened to get the symbols for
+   the child process identified by PID.  */
+
+char *
+nbsd_nat_target::pid_to_exec_file (int pid)
+{
+  return const_cast (netbsd_nat::pid_to_exec_file (pid));
+}
+
+/* Return the current directory for the process identified by PID.  */
+
+static std::string
+nbsd_pid_to_cwd (int pid)
+{
+  char buf[PATH_MAX];
+  size_t buflen;
+  int mib[4] = {CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_CWD};
+  buflen = sizeof (buf);
+  if (sysctl (mib, ARRAY_SIZE (mib), buf, , NULL, 0))
+return "";
+  return buf;
+}
+
+/* Return the kinfo_proc2 structure for the process identified by PID.  */
+
+static bool
+nbsd_pid_to_kinfo_proc2 (pid_t pid, struct kinfo_proc2 *kp)
+{
+  gdb_assert (kp != nullptr);
+
+  size_t size = sizeof (*kp);
+  int mib[6] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, pid,
+		static_cast (size), 1};
+  return !sysctl (mib, ARRAY_SIZE (mib), kp, , NULL, 0);
+}
+
+/* Return the command line for the process identified by PID.  */
+
+static gdb::unique_xmalloc_ptr
+nbsd_pid_to_cmdline (int pid)
+{
+  int mib[4] = {CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_ARGV};
+
+  size_t size = 0;
+  if (::sysctl (mib, ARRAY_SIZE (mib), NULL, , NULL, 0) == -1 || size == 0)
+return nullptr;
+
+  gdb::unique_xmalloc_ptr args (XNEWVAR (char, size));
+
+  if (::sysctl (mib, ARRAY_SIZE (mib), args.get (), , NULL, 0) == -1
+  || size == 0)
+return nullptr;
+
+  /* Arguments are returned as a flattened string with NUL separators.
+ Join the arguments with spaces to form a single string.  */
+  for (size_t i = 0; i < size - 1; i++)
+if (args[i] == '\0')
+  args[i] = ' ';
+  args[size - 1] = '\0';
+
+  return args;
+}
+
+/* Return true if PTID is still active in the inferior.  */
+
+bool
+nbsd_nat_target::thread_alive (ptid_t ptid)
+{
+  return netbsd_nat::thread_alive (ptid);
+}
+
+/* Return the name assigned to a thread by an application.  Returns
+   the string in a static buffer.  */
+
+const char *
+nbsd_nat_target::thread_name (struct thread_info *thr)
+{
+  ptid_t ptid = thr->ptid;
+  return netbsd_nat::thread_name (ptid);
+}
+
+/* Implement the "post_attach" target_ops method.  */
+
+static void
+nbsd_add_threads (nbsd_nat_target *target, pid_t pid)
+{
+  auto fn
+= [] (ptid_t ptid)
+  {
+	if (!in_thread_list (target, ptid))
+	  {
+	if (inferior_ptid.lwp () == 0)
+	  thread_change_ptid (target, inferior_ptid, ptid);
+	else
+	  add_thread (target, ptid);
+	  }
+  };
+
+  netbsd_nat::for_each_thread (pid, fn);
+}
+
+/* Implement the "post_startup_inferior" target_ops method.  */
+
+void
+nbsd_nat_target::post_startup_inferior (ptid_t ptid)
+{
+  netbsd_nat::enable_proc_events (ptid.pid ());
+}
+
+/* Implement the "post_attach" target_ops method.  */
+
+void
+nbsd_nat_target::post_attach (int pid)
+{
+  netbsd_nat::enable_proc_events (pid);
+  nbsd_add_threads (this, pid);
+}
+
+/* Implement the "update_thread_list" target_ops method.  */
+
+void
+nbsd_nat_target::update_thread_list ()
+{
+  delete_exited_threads ();
+}
+
+/* Convert PTID to a string.  */
+
+std::string
+nbsd_nat_target::pid_to_str (ptid_t ptid)
+{
+  int lwp = ptid.lwp ();
+
+  if (lwp != 0)
+{
+  pid_t pid = ptid.pid ();
+
+  return string_printf ("LWP %d of process 

CVS commit: src/external/gpl3/gdb/dist/gdb

2020-05-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May 23 00:30:40 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-tdep.c

Log Message:
Revive entrypoint heuristics, accidentally removed in the previous.

Now, e.g., "b main" works again for "gdb /bin/echo" as expected.

See more details:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gdb/dist/gdb/alpha-tdep.c#rev1.2

XXX
Single-stepping into shared libraries still fails sometimes;
tracee does not stop at a function in shared library.
We need further analysis...


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c

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-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.4 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.5
--- src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.4	Sun May 26 21:40:01 2019
+++ src/external/gpl3/gdb/dist/gdb/alpha-tdep.c	Sat May 23 00:30:40 2020
@@ -1825,6 +1825,9 @@ alpha_gdbarch_init (struct gdbarch_info 
   /* Prologue heuristics.  */
   set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
 
+  /* Entrypoint heuristics.  */
+  set_gdbarch_skip_entrypoint (gdbarch, alpha_skip_entrypoint);
+
   /* Call info.  */
 
   set_gdbarch_return_value (gdbarch, alpha_return_value);



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-05-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  2 12:56:55 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: bsd-kvm.c

Log Message:
Switch to the current thread, and reload the symbol file.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c

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/bsd-kvm.c
diff -u src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.16 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.17
--- src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.16	Thu May 30 17:43:23 2019
+++ src/external/gpl3/gdb/dist/gdb/bsd-kvm.c	Sat May  2 08:56:55 2020
@@ -28,6 +28,7 @@
 #include "value.h"
 #include "gdbcore.h"
 #include "inferior.h"  /* for get_exec_file */
+#include "symfile.h"
 #include "gdbthread.h"
 #include "arch-utils.h"
 
@@ -144,9 +145,12 @@ bsd_kvm_target_open (const char *arg, in
 
   inf->gdbarch = get_current_arch ();
 
-  add_thread_silent (bsd_kvm_ptid);
+  thread_info *tp = add_thread_silent (bsd_kvm_ptid);
+  switch_to_thread(tp);
   inferior_ptid = bsd_kvm_ptid;
 
+  symbol_file_add_main(execfile, 0);
+
   target_fetch_registers (get_current_regcache (), -1);
 
   reinit_frame_cache ();



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-02-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Feb 23 02:06:01 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64-tdep.c

Log Message:
Use C++ syntax for defining types, not C one.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/gpl3/gdb/dist/gdb/sparc64-tdep.c

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/sparc64-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64-tdep.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/sparc64-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/sparc64-tdep.c:1.1.1.8	Sun May 26 20:59:21 2019
+++ src/external/gpl3/gdb/dist/gdb/sparc64-tdep.c	Sun Feb 23 02:06:01 2020
@@ -86,7 +86,7 @@
 static struct cmd_list_element *sparc64adilist = NULL;
 
 /* ADI stat settings.  */
-typedef struct
+struct adi_stat_t
 {
   /* The ADI block size.  */
   unsigned long blksize;
@@ -108,7 +108,7 @@ typedef struct
   /* ADI is available.  */
   bool is_avail = false;
 
-} adi_stat_t;
+};
 
 /* Per-process ADI stat info.  */
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-01-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Jan 30 20:38:12 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
Don't implicitly cast away const char * when using correct C++ string.h
implementations. Those have overloaded string operations that preserve
constness.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/solib.c

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/solib.c
diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.8 src/external/gpl3/gdb/dist/gdb/solib.c:1.9
--- src/external/gpl3/gdb/dist/gdb/solib.c:1.8	Fri Nov 22 01:48:50 2019
+++ src/external/gpl3/gdb/dist/gdb/solib.c	Thu Jan 30 20:38:12 2020
@@ -509,7 +509,7 @@ solib_bfd_open (const char *pathname)
   if (!b->compatible (b, bfd_get_arch_info (abfd.get (
 {
   char buf[SO_NAME_MAX_PATH_SIZE];
-  char *slash = strrchr(pathname, '/');
+  const char *slash = strrchr(pathname, '/');
   if (slash)
 {
   struct stat st;



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-05-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May  3 19:06:50 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Improve comment in the GDB NetBSD code


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.8	Fri May  3 19:03:57 2019
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri May  3 19:06:50 2019
@@ -364,8 +364,7 @@ nbsd_wait (struct target_ops *ops,
* Always perform polling on exact PID, overwrite the default polling on
* WAIT_ANY.
*
-   * This avoids events reported in random order reported for FORK / VFORK
-   * when child and parent events are otherwise reported in random order.
+   * This avoids events reported in random order reported for FORK / VFORK.
*
* Polling on traced parent always simplifies the code.
*/



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-05-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May  3 19:03:57 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: infrun.c nbsd-nat.c

Log Message:
Overwrite waiton_ptid in nbsd-nat, rather than generic core

This avoids compatibility issues with remote access to !NetBSD platform.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/infrun.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/infrun.c
diff -u src/external/gpl3/gdb/dist/gdb/infrun.c:1.2 src/external/gpl3/gdb/dist/gdb/infrun.c:1.3
--- src/external/gpl3/gdb/dist/gdb/infrun.c:1.2	Fri May  3 07:05:28 2019
+++ src/external/gpl3/gdb/dist/gdb/infrun.c	Fri May  3 19:03:57 2019
@@ -3874,11 +3874,7 @@ fetch_inferior_event (void *client_data)
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   struct cleanup *ts_old_chain;
   int cmd_done = 0;
-#if defined(__NetBSD__)
-  ptid_t waiton_ptid = inferior_ptid;
-#else
   ptid_t waiton_ptid = minus_one_ptid;
-#endif
 
   memset (ecs, 0, sizeof (*ecs));
 

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.7 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.8
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.7	Fri May  3 07:05:28 2019
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri May  3 19:03:57 2019
@@ -360,6 +360,17 @@ nbsd_wait (struct target_ops *ops,
 {
   ptid_t wptid;
 
+  /*
+   * Always perform polling on exact PID, overwrite the default polling on
+   * WAIT_ANY.
+   *
+   * This avoids events reported in random order reported for FORK / VFORK
+   * when child and parent events are otherwise reported in random order.
+   *
+   * Polling on traced parent always simplifies the code.
+   */
+  ptid = inferior_ptid;
+
   if (debug_nbsd_lwp)
 fprintf_unfiltered (gdb_stdlog, "NLWP: calling super_wait (%d, %ld, %ld) target_options=%#x\n",
 ptid_get_pid (ptid), ptid_get_lwp (ptid),



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-05-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May  3 07:05:28 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: infrun.c nbsd-nat.c

Log Message:
Quick clean up the NetBSD support in GDB

Changes:

 - always perform polling on inferior_ptid, never -1
   -1 can cause catching fork/vfork events in random order
   polling on pid will guarantee to report events in expected order

 - assume availability of KERN_PROC_PATHNAME

 - drop dead code for KERN_PROC_AUXV (FreeBSD-specific sysctl)
   AUXV on NetBSD is handled with PIOD_READ_AUXV

 - drop unused nbsd_fetch_kinfo_proc

 - drop unneeded hacks for fork/vfork code

 - drop support for FreeBSD specific flags returned for PT_LWPINFO
   NetBSD uses PT_GET_SIGINFO / PT_GET_PROCESS_STATE for most pieces of
   information

 - port nbsd_thread_name to NetBSD

 - enable LWP and FORK events in nbsd_enable_proc_events

 - use NetBSD new batteries for distinguishing event type in to_wait
   map most events into GDB types
   breakpoint, single step, hw breakpoint/watchpoint ones are still not
   used with the full power here

 - add support for EXEC events

 - clean up

This change makes GDB functional with threaded code and it is good enough
to pass t_regress / threads test.

It's possible to execute and step processes with multiple threads, use
scheduler-lock, follow-fork etc features.

What does not work:

 - the LWP EXIT event and wait() are not synchronized and can deadlock
   this has been observed with exiting go applications

 - GDB VFORK code is still disabled and awaits kernel fixing

Short term goal is to correct LWP EXIT and follow up with VFORK fixes.

Long term goal is to rewrite NetBSD GDB support and write new support in
the remote process plugin (gdb-server) framework.

PR kern/53120
PR port-arm/51677
PR bin/54060
PR bin/49662
PR kern/52548


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/infrun.c
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/infrun.c
diff -u src/external/gpl3/gdb/dist/gdb/infrun.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/infrun.c:1.2
--- src/external/gpl3/gdb/dist/gdb/infrun.c:1.1.1.7	Tue Nov 28 18:18:23 2017
+++ src/external/gpl3/gdb/dist/gdb/infrun.c	Fri May  3 07:05:28 2019
@@ -3874,7 +3874,11 @@ fetch_inferior_event (void *client_data)
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   struct cleanup *ts_old_chain;
   int cmd_done = 0;
+#if defined(__NetBSD__)
+  ptid_t waiton_ptid = inferior_ptid;
+#else
   ptid_t waiton_ptid = minus_one_ptid;
+#endif
 
   memset (ecs, 0, sizeof (*ecs));
 

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.6 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.7
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.6	Sat Jun 23 03:15:55 2018
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri May  3 07:05:28 2019
@@ -45,7 +45,6 @@ nbsd_pid_to_exec_file (struct target_ops
   static char buf[PATH_MAX];
   char name[PATH_MAX];
 
-#ifdef KERN_PROC_PATHNAME
   size_t buflen;
   int mib[4];
 
@@ -56,7 +55,6 @@ nbsd_pid_to_exec_file (struct target_ops
   buflen = sizeof buf;
   if (sysctl (mib, 4, buf, , NULL, 0) == 0)
 return buf;
-#endif
 
   xsnprintf (name, PATH_MAX, "/proc/%d/exe", pid);
   len = readlink (name, buf, PATH_MAX - 1);
@@ -131,79 +129,6 @@ nbsd_find_memory_regions (struct target_
   return 0;
 }
 
-#ifdef KERN_PROC_AUXV
-static enum target_xfer_status (*super_xfer_partial) (struct target_ops *ops,
-		  enum target_object object,
-		  const char *annex,
-		  gdb_byte *readbuf,
-		  const gdb_byte *writebuf,
-		  ULONGEST offset,
-		  ULONGEST len,
-		  ULONGEST *xfered_len);
-
-/* Implement the "to_xfer_partial target_ops" method.  */
-
-static enum target_xfer_status
-nbsd_xfer_partial (struct target_ops *ops, enum target_object object,
-		   const char *annex, gdb_byte *readbuf,
-		   const gdb_byte *writebuf,
-		   ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
-{
-  pid_t pid = ptid_get_pid (inferior_ptid);
-
-  switch (object)
-{
-case TARGET_OBJECT_AUXV:
-  {
-	struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
-	unsigned char *buf;
-	size_t buflen;
-	int mib[4];
-
-	if (writebuf != NULL)
-	  return TARGET_XFER_E_IO;
-	mib[0] = CTL_KERN;
-	mib[1] = KERN_PROC;
-	mib[2] = KERN_PROC_AUXV;
-	mib[3] = pid;
-	if (offset == 0)
-	  {
-	buf = readbuf;
-	buflen = len;
-	  }
-	else
-	  {
-	buflen = offset + len;
-	buf = XCNEWVEC (unsigned char, buflen);
-	cleanup = make_cleanup (xfree, buf);
-	  }
-	if (sysctl (mib, 4, buf, , NULL, 0) == 0)
-	  {
-	if (offset != 0)
-	  {
-		if (buflen > offset)
-		  {
-		buflen -= offset;
-		memcpy (readbuf, buf + offset, 

CVS commit: src/external/gpl3/gdb/dist/gdb/config/arm

2019-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 18:04:23 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/arm: nbsdelf.mh

Log Message:
add missing files


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.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/config/arm/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.7 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.8
--- src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.7	Thu Nov 30 10:26:55 2017
+++ src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh	Sat Apr 13 14:04:23 2019
@@ -1,4 +1,5 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o arm-nbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o arm-nbsd-nat.o bsd-kvm.o \
+arm-bsd-tdep.o arm-nbsd-tdep.o
 
 LOADLIBES= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 18:02:37 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c

Log Message:
fix typo, unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c

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/arm-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.5 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.6
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.5	Wed Jan 24 04:04:42 2018
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c	Sat Apr 13 14:02:37 2019
@@ -303,7 +303,6 @@ fetch_fp_regs (struct regcache *regcache
 {
   struct fpreg inferior_fp_registers;
   int ret;
-  int regno;
 
   ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
 		(PTRACE_TYPE_ARG3) _fp_registers, ptid_get_lwp(inferior_ptid));
@@ -599,7 +598,7 @@ fetch_elfcore_registers (struct regcache
 
 static struct core_fns arm_netbsd_core_fns =
 {
-  bfd_target_unknown_flavour,		/* core_flovour.  */
+  bfd_target_unknown_flavour,		/* core_flavour.  */
   default_check_format,			/* check_format.  */
   default_core_sniffer,			/* core_sniffer.  */
   fetch_core_registers,			/* core_read_registers.  */
@@ -608,7 +607,7 @@ static struct core_fns arm_netbsd_core_f
 
 static struct core_fns arm_netbsd_elfcore_fns =
 {
-  bfd_target_elf_flavour,		/* core_flovour.  */
+  bfd_target_elf_flavour,		/* core_flavour.  */
   default_check_format,			/* check_format.  */
   default_core_sniffer,			/* core_sniffer.  */
   fetch_elfcore_registers,		/* core_read_registers.  */



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 18:02:06 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-bsd-tdep.c

Log Message:
fix core stack traces (missing register 25)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/arm-bsd-tdep.c

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/arm-bsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-bsd-tdep.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/arm-bsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/arm-bsd-tdep.c:1.1.1.1	Tue Nov 28 13:18:09 2017
+++ src/external/gpl3/gdb/dist/gdb/arm-bsd-tdep.c	Sat Apr 13 14:02:05 2019
@@ -83,7 +83,7 @@ armbsd_supply_gregset (const struct regs
 }
 
   if (regnum == ARM_PS_REGNUM || regnum == -1)
-regcache_raw_supply (regcache, i, regs + 16 * 4);
+regcache_raw_supply (regcache, ARM_PS_REGNUM, regs + 16 * 4);
 
   if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS)
 {



CVS commit: src/external/gpl3/gdb/dist/gdb/config/vax

2019-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  2 14:17:36 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/vax: nbsdelf.mh

Log Message:
add a missing file


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.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/config/vax/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.mh:1.5 src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.mh:1.6
--- src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.mh:1.5	Thu Nov 30 10:26:55 2017
+++ src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.mh	Tue Apr  2 10:17:36 2019
@@ -1,4 +1,5 @@
 # Host: NetBSD/vax ELF
-NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o vax-bsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o vax-bsd-nat.o bsd-kvm.o \
+	vax-nbsd-tdep.o
 
 LOADLIBES= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-12-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec 21 11:11:40 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.c aarch64-nbsd-tdep.h
src/external/gpl3/gdb/dist/gdb/config/aarch64: nbsd.mh

Log Message:
s/Free/Net/; s/amd64/aarch64/.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/dist/gdb/config/aarch64/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/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.3 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.4
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.3	Wed Jul 11 13:52:35 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Fri Dec 21 11:11:40 2018
@@ -1,4 +1,4 @@
-/* Target-dependent code for FreeBSD/aarch64.
+/* Target-dependent code for NetBSD/aarch64.
 
Copyright (C) 2017-2018 Free Software Foundation, Inc.
 

Index: src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.2 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.3
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.2	Fri Jun 22 19:41:40 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h	Fri Dec 21 11:11:40 2018
@@ -1,4 +1,4 @@
-/* FreeBSD/aarch64 target support, prototypes.
+/* NetBSD/aarch64 target support, prototypes.
 
Copyright (C) 2017-2018 Free Software Foundation, Inc.
 

Index: src/external/gpl3/gdb/dist/gdb/config/aarch64/nbsd.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/aarch64/nbsd.mh:1.1 src/external/gpl3/gdb/dist/gdb/config/aarch64/nbsd.mh:1.2
--- src/external/gpl3/gdb/dist/gdb/config/aarch64/nbsd.mh:1.1	Mon May 21 02:10:47 2018
+++ src/external/gpl3/gdb/dist/gdb/config/aarch64/nbsd.mh	Fri Dec 21 11:11:40 2018
@@ -1,4 +1,4 @@
-# Host: NetBSD/amd64
+# Host: NetBSD/arm64
 NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o aarch64-nbsd-nat.o \
 	bsd-kvm.o
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 13:52:35 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.c aarch64-tdep.c

Log Message:
fix signness issues.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
cvs rdiff -u -r1.1.1.6 -r1.2 src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c

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/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.2 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.3
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.2	Fri Jun 22 15:41:16 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Wed Jul 11 09:52:35 2018
@@ -118,11 +118,11 @@ static const struct tramp_frame aarch64_
   SIGTRAMP_FRAME,
   4,
   {
-{0x910003e0, -1},		/* mov  x0, sp  */
-{0x91014000, -1},		/* add  x0, x0, #SF_UC  */
-{0xd2803428, -1},		/* mov  x8, #SYS_sigreturn  */
-{0xd401, -1},		/* svc  0x0  */
-{TRAMP_SENTINEL_INSN, -1}
+{0x910003e0, (ULONGEST)-1},		/* mov  x0, sp  */
+{0x91014000, (ULONGEST)-1},		/* add  x0, x0, #SF_UC  */
+{0xd2803428, (ULONGEST)-1},		/* mov  x8, #SYS_sigreturn  */
+{0xd401, (ULONGEST)-1},		/* svc  0x0  */
+{(ULONGEST)TRAMP_SENTINEL_INSN, (ULONGEST)-1}
   },
   aarch64_nbsd_sigframe_init
 };

Index: src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.1.1.6 src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.1.1.6	Tue Nov 28 13:18:03 2017
+++ src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c	Wed Jul 11 09:52:35 2018
@@ -2425,7 +2425,7 @@ aarch64_software_single_step (struct reg
   const int insn_size = 4;
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
   CORE_ADDR pc = regcache_read_pc (regcache);
-  CORE_ADDR breaks[2] = { -1, -1 };
+  CORE_ADDR breaks[2] = { (ULONGEST)-1, (ULONGEST)-1 };
   CORE_ADDR loc = pc;
   CORE_ADDR closing_insn = 0;
   uint32_t insn = read_memory_unsigned_integer (loc, insn_size,



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun 23 03:15:55 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c nbsd-nat.c

Log Message:
Fix thread debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.17 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.18
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.17	Fri Dec  1 17:19:59 2017
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Fri Jun 22 23:15:55 2018
@@ -353,7 +353,7 @@ inf_ptrace_resume (struct target_ops *op
  all possible successor instructions), so we don't have to
  worry about that here.  */
   request = PT_STEP;
-#if 0
+#if __NetBSD__
   /*
* On NetBSD the data field of PT_STEP contains the thread
* to be stepped; all other threads are continued if this value is > 0

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.5 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.6
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.5	Sun Dec 10 00:36:25 2017
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri Jun 22 23:15:55 2018
@@ -371,7 +371,7 @@ nbsd_add_threads (pid_t pid)
   int val;
   struct ptrace_lwpinfo pl;
 
-  gdb_assert (!in_thread_list (pid_to_ptid (pid)));
+//  gdb_assert (!in_thread_list (pid_to_ptid (pid)));
   pl.pl_lwpid = 0;
   while ((val = ptrace (PT_LWPINFO, pid, (void *), sizeof(pl))) != -1
 && pl.pl_lwpid != 0)
@@ -537,68 +537,13 @@ static void
 nbsd_resume (struct target_ops *ops,
 	 ptid_t ptid, int step, enum gdb_signal signo)
 {
-#if defined(TDP_RFPPWAIT) && !defined(PTRACE_VFORK)
-  pid_t pid;
-
-  /* Don't PT_CONTINUE a process which has a pending vfork done event.  */
-  if (ptid_equal (minus_one_ptid, ptid))
-pid = ptid_get_pid (inferior_ptid);
-  else
-pid = ptid_get_pid (ptid);
-  if (nbsd_is_vfork_done_pending (pid))
-return;
-#endif
-
   if (debug_nbsd_lwp)
 fprintf_unfiltered (gdb_stdlog,
 			"NLWP: nbsd_resume for ptid (%d, %ld, %ld)\n",
 			ptid_get_pid (ptid), ptid_get_lwp (ptid),
 			ptid_get_tid (ptid));
-  if (ptid_lwp_p (ptid))
-{
-  /* FreeBSD: If ptid is a specific LWP, suspend all other LWPs in the
-   * process.
-   */
-  /* NetBSD, this function is about resuming so we only deal with
-   * the thread we've been asked to work with
-   */
-  struct thread_info *tp;
-  int request;
-
-  ALL_NON_EXITED_THREADS (tp)
-{
-	  if (ptid_get_pid (tp->ptid) != ptid_get_pid (ptid))
-	continue;
-
-	  if (ptid_get_lwp (tp->ptid) == ptid_get_lwp (ptid))
-	request = PT_RESUME;
-#ifndef __NetBSD__
-	  else
-	request = PT_SUSPEND;
-#endif
-
-	  if (ptrace (request, ptid_get_pid (tp->ptid), NULL,
-	  ptid_get_lwp (tp->ptid)) == -1)
-	perror_with_name (("ptrace"));
-	}
-}
-  else
-{
-  /* If ptid is a wildcard, resume all matching threads (they won't run
-	 until the process is continued however).  */
-  struct thread_info *tp;
-
-  ALL_NON_EXITED_THREADS (tp)
-{
-	  if (!ptid_match (tp->ptid, ptid))
-	continue;
-
-	  if (ptrace (PT_RESUME, ptid_get_pid (tp->ptid), NULL,
-	  ptid_get_lwp (tp->ptid)) == -1)
-	perror_with_name (("ptrace"));
-	}
-  ptid = inferior_ptid;
-}
+  if (ptid_get_pid(ptid) == -1)
+ptid = inferior_ptid;
   super_resume (ops, ptid, step, signo);
 }
 
@@ -613,203 +558,35 @@ nbsd_wait (struct target_ops *ops,
 {
   ptid_t wptid;
 
-  while (1)
+  wptid = super_wait (ops, ptid, ourstatus, target_options);
+  if (ourstatus->kind == TARGET_WAITKIND_STOPPED)
 {
-#ifndef PTRACE_VFORK
-  wptid = nbsd_next_vfork_done ();
-  if (!ptid_equal (wptid, null_ptid))
-	{
-	  ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
-	  return wptid;
-	}
-#endif
-  wptid = super_wait (ops, ptid, ourstatus, target_options);
-  if (ourstatus->kind == TARGET_WAITKIND_STOPPED)
-	{
-	  struct ptrace_lwpinfo pl;
-	  pid_t pid;
-	  int status;
-
-	  pid = ptid_get_pid (wptid);
-	  pl.pl_lwpid = 0;
-	  if (ptrace (PT_LWPINFO, pid, (caddr_t) , sizeof pl) == -1)
-	perror_with_name (("ptrace"));
-
-	  wptid = ptid_build (pid, pl.pl_lwpid, 0);
-
-#ifdef PT_LWP_EVENTS
-	  if (pl.pl_flags & PL_FLAG_EXITED)
-	{
-	  /* If GDB attaches to a multi-threaded process, exiting
-		 threads might be skipped during nbsd_post_attach that
-		 have not yet reported their PL_FLAG_EXITED event.
-		 Ignore EXITED events for an unknown LWP.  */
-	  if (in_thread_list (wptid))
-		{
-		  if (debug_nbsd_lwp)
-		fprintf_unfiltered (gdb_stdlog,
-	"NLWP: deleting thread for LWP %u\n",
-	pl.pl_lwpid);
-		

CVS commit: src/external/gpl3/gdb/dist/gdb

2018-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun 22 19:41:40 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.h

Log Message:
match our number of registers.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h

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/aarch64-nbsd-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.1 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.2
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h:1.1	Sun May 20 22:10:47 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.h	Fri Jun 22 15:41:40 2018
@@ -19,10 +19,10 @@
 
 #include "regset.h"
 
-/* The general-purpose regset consists of 30 X registers, plus LR, SP,
-   ELR, and SPSR registers.  SPSR is 32 bits but the structure is
+/* The general-purpose regset consists of 31 registers (30 X , plus LR), SP,
+   ELR (PC), SPSR register, and TPIDR.  SPSR is 32 bits but the structure is
passed to 64 bit alignment.  */
-#define AARCH64_NBSD_SIZEOF_GREGSET  (34 * X_REGISTER_SIZE)
+#define AARCH64_NBSD_SIZEOF_GREGSET  (35 * X_REGISTER_SIZE)
 
 /* The fp regset consists of 32 V registers, plus FPSR and FPCR which
are 4 bytes wide each, and the whole structure is padded to 128 bit



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun 22 19:41:16 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.c

Log Message:
use the right emulation


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c

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/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.1 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.1	Sun May 20 22:10:47 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Fri Jun 22 15:41:16 2018
@@ -197,6 +197,6 @@ aarch64_nbsd_init_abi (struct gdbarch_in
 void
 _initialize_aarch64_nbsd_tdep (void)
 {
-  gdbarch_register_osabi (bfd_arch_aarch64, 0, GDB_OSABI_FREEBSD,
+  gdbarch_register_osabi (bfd_arch_aarch64, 0, GDB_OSABI_NETBSD,
 			  aarch64_nbsd_init_abi);
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-05-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May 16 13:54:48 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: dwarf2read.c

Log Message:
Annotate mixing of enums from different types with an explicit cast.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/dwarf2read.c

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/dwarf2read.c
diff -u src/external/gpl3/gdb/dist/gdb/dwarf2read.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/dwarf2read.c:1.2
--- src/external/gpl3/gdb/dist/gdb/dwarf2read.c:1.1.1.7	Tue Nov 28 18:18:12 2017
+++ src/external/gpl3/gdb/dist/gdb/dwarf2read.c	Wed May 16 13:54:48 2018
@@ -22159,7 +22159,7 @@ dwarf_decode_macro_bytes (bfd *abfd,
 	  }
 	  break;
 
-case DW_MACINFO_vendor_ext:
+case (int)DW_MACINFO_vendor_ext:
 	  if (!section_is_gnu)
 	{
 	  unsigned int bytes_read;
@@ -22336,7 +22336,7 @@ dwarf_decode_macros (struct dwarf2_cu *c
 	  mac_ptr += offset_size;
 	  break;
 
-	case DW_MACINFO_vendor_ext:
+	case (int)DW_MACINFO_vendor_ext:
 	  /* Only skip the data by MAC_PTR.  */
 	  if (!section_is_gnu)
 	{



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May  9 13:52:55 UTC 2018

Removed Files:
src/external/gpl3/gdb/dist/gdb: rust-exp.c

Log Message:
remove generated file


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/external/gpl3/gdb/dist/gdb/rust-exp.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 23 14:53:07 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64-nbsd-tdep.c i386-nbsd-tdep.c

Log Message:
Add "Xhandle*" interrupt handling.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c

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/amd64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c:1.3 src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c:1.4
--- src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c:1.3	Wed Nov 29 13:15:29 2017
+++ src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c	Mon Apr 23 10:53:07 2018
@@ -148,10 +148,21 @@ amd64nbsd_trapframe_cache(struct frame_i
 
   /* There is an extra 'call' in the interrupt sequence - ignore the extra
* return address */
-  if (name && strncmp (name, "Xintr", 5) == 0)
-addr = sp + 8;		/* It's an interrupt frame.  */
-  else
-addr = sp;
+
+  addr = sp;
+  if (name) {
+	if (strncmp (name, "Xintr", 5) == 0
+	 || strncmp (name, "Xhandle", 7) == 0) {
+		addr += 8;		/* It's an interrupt frame.  */
+	}
+  }
+
+#ifdef DEBUG_TRAPFRAME
+  for (i = 0; i < 50; i++) {
+cs = read_memory_unsigned_integer (addr + i * 8, 8, byte_order);
+printf("%s i=%d r=%#jx\n", name, i, (intmax_t)cs);
+  }
+#endif
 
   for (i = 0; i < ARRAY_SIZE (amd64nbsd_tf_reg_offset); i++)
 if (amd64nbsd_tf_reg_offset[i] != -1)
@@ -163,6 +174,10 @@ amd64nbsd_trapframe_cache(struct frame_i
   rip = read_memory_unsigned_integer (addr
 + amd64nbsd_tf_reg_offset[AMD64_RIP_REGNUM], 8, byte_order);
 
+#ifdef DEBUG_TRAPFRAME
+  printf("%s cs=%#jx rip=%#jx\n", name, (intmax_t)cs, (intmax_t)rip);
+#endif
+
   /* The trap frame layout was changed lf the %rip value is less than 2^16 it
* is almost certainly the %ss of the old format. */
   if (rip < (1 << 16))
@@ -243,16 +258,20 @@ amd64nbsd_trapframe_sniffer (const struc
 
   find_pc_partial_function (get_frame_pc (this_frame), , NULL, NULL);
   return (name && ((strcmp (name, "alltraps") == 0)
-		   || (strcmp (name, "calltrap") == 0)
-		   || (strncmp (name, "Xtrap", 5) == 0)
-		   || (strcmp (name, "osyscall1") == 0)
-		   || (strcmp (name, "Xsyscall") == 0)
-		   || (strncmp (name, "Xintr", 5) == 0)
-		   || (strncmp (name, "Xresume", 7) == 0)
-		   || (strncmp (name, "Xstray", 6) == 0)
-		   || (strncmp (name, "Xrecurse", 8) == 0)
-		   || (strncmp (name, "Xsoft", 5) == 0)
-		   || (strcmp (name, "Xdoreti") == 0)));
+	|| (strcmp (name, "calltrap") == 0)
+	|| (strcmp (name, "handle_syscall") == 0)
+		|| (strcmp (name, "Xdoreti") == 0)
+		|| (strcmp (name, "Xspllower") == 0)
+		|| (strncmp (name, "Xhandle", 7) == 0)
+		|| (strncmp (name, "Xintr", 5) == 0)
+		|| (strncmp (name, "Xpreempt", 8) == 0)
+		|| (strncmp (name, "Xrecurse", 8) == 0)
+		|| (strncmp (name, "Xresume", 7) == 0)
+		|| (strncmp (name, "Xsoft", 5) == 0)
+		|| (strncmp (name, "Xstray", 6) == 0)
+		|| (strncmp (name, "Xsyscall", 8) == 0)
+		|| (strncmp (name, "Xtrap", 5) == 0)
+	));
 }
 
 static const struct frame_unwind amd64nbsd_trapframe_unwind = {
Index: src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c:1.3 src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c:1.4
--- src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c:1.3	Wed Nov 29 13:15:29 2017
+++ src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c	Mon Apr 23 10:53:07 2018
@@ -312,7 +312,8 @@ i386nbsd_trapframe_cache(struct frame_in
   sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
 
   find_pc_partial_function (func, , NULL, NULL);
-  if (name && strncmp (name, "Xintr", 5) == 0)
+  if (name && (strncmp (name, "Xintr", 5) == 0 ||
+   strncmp (name, "Xhandle", 7) == 0))
 {
   /* It's an interrupt frame. */
   tmp = read_memory_unsigned_integer (sp + 4, 4, byte_order);
@@ -391,16 +392,19 @@ i386nbsd_trapframe_sniffer (const struct
 
   find_pc_partial_function (get_frame_pc (this_frame), , NULL, NULL);
   return (name && ((strcmp (name, "alltraps") == 0)
-		   || (strcmp (name, "calltrap") == 0)
-		   || (strncmp (name, "Xtrap", 5) == 0)
-		   || (strcmp (name, "syscall1") == 0)
-		   || (strcmp (name, "Xsyscall") == 0)
-		   || (strncmp (name, "Xintr", 5) == 0)
-		   || (strncmp (name, "Xresume", 7) == 0)
-		   || (strncmp (name, "Xstray", 6) == 0)
-		   || (strncmp (name, "Xrecurse", 8) == 0)
-		   || (strncmp (name, "Xsoft", 5) == 0)
-		   || (strncmp (name, "Xdoreti", 5) == 0)));
+	|| (strcmp (name, "calltrap") == 0)
+		|| (strcmp (name, "syscall1") == 0)
+		|| (strcmp (name, "Xdoreti") == 0)
+		|| (strncmp (name, "Xintr", 5) == 0)
+		|| (strncmp (name, "Xhandle", 7) == 0)
+		|| (strncmp (name, "Xpreempt", 8) == 0)
+		|| (strncmp (name, "Xrecurse", 8) == 0)
+		

CVS commit: src/external/gpl3/gdb/dist/gdb

2018-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  8 04:00:00 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-bsd-nat.c

Log Message:
don't do anything for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c

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.3 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.4
--- src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.3	Sun Jan  7 22:07:16 2018
+++ src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c	Sun Jan  7 23:00:00 2018
@@ -209,8 +209,10 @@ void _initialize_alphabsd_nat (void);
 void
 _initialize_alphabsd_nat (void)
 {
+#ifndef __NetBSD__
   struct target_ops *t;
 
   t = alphabsd_target ();
   add_target (t);
+#endif
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-01-07 Thread Christos Zoulas
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
+   

CVS commit: src/external/gpl3/gdb/dist/gdb

2018-01-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan  1 16:28:14 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-bsd-nat.c

Log Message:
pass the lwp for the register calls.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c

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.1.1.1 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.2
--- src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.1.1.1	Tue Nov 28 13:18:23 2017
+++ src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c	Mon Jan  1 11:28:14 2018
@@ -92,7 +92,7 @@ alphabsd_fetch_inferior_registers (struc
   struct reg gregs;
 
   if (ptrace (PT_GETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-		  (PTRACE_TYPE_ARG3) , 0) == -1)
+		  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get registers"));
 
   alphabsd_supply_reg (regcache, (char *) , regno);
@@ -106,7 +106,7 @@ alphabsd_fetch_inferior_registers (struc
   struct fpreg fpregs;
 
   if (ptrace (PT_GETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-		  (PTRACE_TYPE_ARG3) , 0) == -1)
+		  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get floating point status"));
 
   alphabsd_supply_fpreg (regcache, (char *) , regno);
@@ -124,13 +124,13 @@ alphabsd_store_inferior_registers (struc
 {
   struct reg gregs;
   if (ptrace (PT_GETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-  (PTRACE_TYPE_ARG3) , 0) == -1)
+  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't get registers"));
 
   alphabsd_fill_reg (regcache, (char *) , regno);
 
   if (ptrace (PT_SETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-  (PTRACE_TYPE_ARG3) , 0) == -1)
+  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't write registers"));
 
   if (regno != -1)
@@ -143,13 +143,13 @@ alphabsd_store_inferior_registers (struc
   struct fpreg fpregs;
 
   if (ptrace (PT_GETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-		  (PTRACE_TYPE_ARG3) , 0) == -1)
+		  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get floating point status"));
 
   alphabsd_fill_fpreg (regcache, (char *) , regno);
 
   if (ptrace (PT_SETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
-		  (PTRACE_TYPE_ARG3) , 0) == -1)
+		  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't write floating point status"));
 }
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 27 19:20:41 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64-nbsd-nat.c

Log Message:
remove unused code
XXX: we should remove this from all archs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c

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/amd64-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c:1.4	Thu Nov 30 10:26:54 2017
+++ src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c	Wed Dec 27 14:20:41 2017
@@ -122,45 +122,6 @@ amd64nbsd_supply_pcb (struct regcache *r
   return 1;
 }
 
-void
-supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
-{
-  amd64_supply_native_gregset (regcache, gregsetp, -1);
-}
-
-/* Fill register REGNUM (if it is a general-purpose register) in
-   *GREGSETP with the value in GDB's register cache.  If REGNUM is -1,
-   do this for all registers.  */
-
-void
-fill_gregset (const struct regcache *regcache,
-	  gregset_t *gregsetp, int regnum)
-{
-  amd64_collect_native_gregset (regcache, gregsetp, regnum);
-}
-
-/* Transfering floating-point registers between GDB, inferiors and cores.  */
-
-/* Fill GDB's register cache with the floating-point and SSE register
-   values in *FPREGSETP.  */
-
-void
-supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
-{
-  amd64_supply_fxsave (regcache, -1, fpregsetp);
-}
-
-/* Fill register REGNUM (if it is a floating-point or SSE register) in
-   *FPREGSETP with the value in GDB's register cache.  If REGNUM is
-   -1, do this for all registers.  */
-
-void
-fill_fpregset (const struct regcache *regcache,
-	   fpregset_t *fpregsetp, int regnum)
-{
-  amd64_collect_fxsave (regcache, regnum, fpregsetp);
-}
-
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_amd64nbsd_nat (void);
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 27 19:20:04 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: x86-bsd-nat.c

Log Message:
one more place to pass the thread id


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c

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/x86-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.3 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.4
--- src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.3	Fri Dec  1 17:15:17 2017
+++ src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c	Wed Dec 27 14:20:04 2017
@@ -69,7 +69,7 @@ x86bsd_dr_get (ptid_t ptid, int regnum)
   struct dbreg dbregs;
 
   if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
-	  (PTRACE_TYPE_ARG3) , 0) == -1)
+	  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't read debug registers"));
 
   return DBREG_DRX ((), regnum);



CVS commit: src/external/gpl3/gdb/dist/gdb/tui

2017-12-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 17 17:49:04 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb/tui: tui-data.c tui-wingeneral.c
tui-winsource.c

Log Message:
Don't core dump when the window is too small
XXX: feed upstream


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/tui/tui-data.c \
src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c \
src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c

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/tui/tui-data.c
diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.2
--- src/external/gpl3/gdb/dist/gdb/tui/tui-data.c:1.1.1.7	Tue Nov 28 13:18:30 2017
+++ src/external/gpl3/gdb/dist/gdb/tui/tui-data.c	Sun Dec 17 12:49:04 2017
@@ -576,6 +576,9 @@ tui_alloc_content (int num_elements, enu
   struct tui_win_element *element_block_ptr;
   int i;
 
+  if (num_elements <= 0)
+return NULL;
+
   content = XNEWVEC (struct tui_win_element *, num_elements);
 
   /*
Index: src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c
diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.2
--- src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c:1.1.1.7	Tue Nov 28 13:18:30 2017
+++ src/external/gpl3/gdb/dist/gdb/tui/tui-wingeneral.c	Sun Dec 17 12:49:04 2017
@@ -247,32 +247,35 @@ tui_make_all_invisible (void)
   make_all_visible (0);
 }
 
+static void
+tui_refresh_wi(struct tui_gen_win_info *wi)
+{
+  if (wi == NULL || wi->handle == NULL || !wi->is_visible)
+return;
+
+  touchwin (wi->handle);
+  tui_refresh_win (wi);
+}
+
 /* Function to refresh all the windows currently displayed.  */
 
 void
 tui_refresh_all (struct tui_win_info **list)
 {
   int type;
-  struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
 
   for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
 {
-  if (list[type] && list[type]->generic.is_visible)
+  if (!list[type] || !list[type]->generic.is_visible)
+	continue;
+  if (type == SRC_WIN || type == DISASSEM_WIN)
 	{
-	  if (type == SRC_WIN || type == DISASSEM_WIN)
-	{
-	  touchwin (list[type]->detail.source_info.execution_info->handle);
-	  tui_refresh_win (list[type]->detail.source_info.execution_info);
-	}
-	  touchwin (list[type]->generic.handle);
-	  tui_refresh_win ([type]->generic);
+	  tui_refresh_wi (list[type]->detail.source_info.execution_info);
 	}
+  tui_refresh_wi ([type]->generic);
 }
-  if (locator->is_visible)
-{
-  touchwin (locator->handle);
-  tui_refresh_win (locator);
-}
+
+  tui_refresh_wi (tui_locator_win_info_ptr ());
 }
 
 
Index: src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c
diff -u src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.2
--- src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c:1.1.1.7	Tue Nov 28 13:18:30 2017
+++ src/external/gpl3/gdb/dist/gdb/tui/tui-winsource.c	Sun Dec 17 12:49:04 2017
@@ -559,6 +559,9 @@ tui_show_exec_info_content (struct tui_w
 = win_info->detail.source_info.execution_info;
   int cur_line;
 
+  if (exec_info->handle == NULL)
+return;
+
   werase (exec_info->handle);
   tui_refresh_win (exec_info);
   for (cur_line = 1; (cur_line <= exec_info->content_size); cur_line++)
@@ -578,6 +581,9 @@ tui_erase_exec_info_content (struct tui_
   struct tui_gen_win_info *exec_info
 = win_info->detail.source_info.execution_info;
 
+  if (exec_info->handle == NULL)
+return;
+
   werase (exec_info->handle);
   tui_refresh_win (exec_info);
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 10 05:36:25 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
PR/52799: Martin Husemann: Correct sysctl args to find executable.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.4	Fri Dec  1 17:22:40 2017
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Sun Dec 10 00:36:25 2017
@@ -50,9 +50,9 @@ nbsd_pid_to_exec_file (struct target_ops
   int mib[4];
 
   mib[0] = CTL_KERN;
-  mib[1] = KERN_PROC;
-  mib[2] = KERN_PROC_PATHNAME;
-  mib[3] = pid;
+  mib[1] = KERN_PROC_ARGS;
+  mib[2] = pid;
+  mib[3] = KERN_PROC_PATHNAME;
   buflen = sizeof buf;
   if (sysctl (mib, 4, buf, , NULL, 0) == 0)
 return buf;



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  2 18:39:52 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: mips-nbsd-nat.c

Log Message:
include nbsd-nat.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c

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/mips-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.4	Thu Nov 30 10:26:54 2017
+++ src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c	Sat Dec  2 13:39:52 2017
@@ -39,6 +39,7 @@ typedef struct fpreg fpregset_t;
 #include "gregset.h"
 
 #include "mips-tdep.h"
+#include "nbsd-nat.h"
 #include "mips-nbsd-tdep.h"
 #include "inf-ptrace.h"
 #include "bsd-kvm.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  1 22:22:40 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
don't suspend other threads if we are resuming.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.3 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.4
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.3	Fri Dec  1 17:20:44 2017
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri Dec  1 17:22:40 2017
@@ -556,7 +556,12 @@ nbsd_resume (struct target_ops *ops,
 			ptid_get_tid (ptid));
   if (ptid_lwp_p (ptid))
 {
-  /* If ptid is a specific LWP, suspend all other LWPs in the process.  */
+  /* FreeBSD: If ptid is a specific LWP, suspend all other LWPs in the
+   * process.
+   */
+  /* NetBSD, this function is about resuming so we only deal with
+   * the thread we've been asked to work with
+   */
   struct thread_info *tp;
   int request;
 
@@ -567,8 +572,10 @@ nbsd_resume (struct target_ops *ops,
 
 	  if (ptid_get_lwp (tp->ptid) == ptid_get_lwp (ptid))
 	request = PT_RESUME;
+#ifndef __NetBSD__
 	  else
 	request = PT_SUSPEND;
+#endif
 
 	  if (ptrace (request, ptid_get_pid (tp->ptid), NULL,
 	  ptid_get_lwp (tp->ptid)) == -1)



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  1 22:20:44 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Remove more FreeBSD code that we don't need and change some FreeBSD -> NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.2	Thu Nov 30 10:26:54 2017
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Fri Dec  1 17:20:44 2017
@@ -368,48 +368,6 @@ nbsd_enable_proc_events (pid_t pid)
 static void
 nbsd_add_threads (pid_t pid)
 {
-#ifdef PT_GETNUMLWPS
-  struct cleanup *cleanup;
-  lwpid_t *lwps;
-  int i, nlwps;
-
-  gdb_assert (!in_thread_list (pid_to_ptid (pid)));
-  nlwps = ptrace (PT_GETNUMLWPS, pid, NULL, 0);
-  if (nlwps == -1)
-perror_with_name (("ptrace"));
-
-  lwps = XCNEWVEC (lwpid_t, nlwps);
-  cleanup = make_cleanup (xfree, lwps);
-
-  nlwps = ptrace (PT_GETLWPLIST, pid, (caddr_t) lwps, nlwps);
-  if (nlwps == -1)
-perror_with_name (("ptrace"));
-
-  for (i = 0; i < nlwps; i++)
-{
-  ptid_t ptid = ptid_build (pid, lwps[i], 0);
-
-  if (!in_thread_list (ptid))
-	{
-#ifdef PT_LWP_EVENTS
-	  struct ptrace_lwpinfo pl;
-
-	  /* Don't add exited threads.  Note that this is only called
-	 when attaching to a multi-threaded process.  */
-	  if (ptrace (PT_LWPINFO, lwps[i], (caddr_t) , sizeof pl) == -1)
-	perror_with_name (("ptrace"));
-	  if (pl.pl_flags & PL_FLAG_EXITED)
-	continue;
-#endif
-	  if (debug_nbsd_lwp)
-	fprintf_unfiltered (gdb_stdlog,
-"FLWP: adding thread for LWP %u\n",
-lwps[i]);
-	  add_thread (ptid);
-	}
-}
-  do_cleanups (cleanup);
-#else
   int val;
   struct ptrace_lwpinfo pl;
 
@@ -422,7 +380,6 @@ nbsd_add_threads (pid_t pid)
   if (!in_thread_list (ptid))
 	add_thread (ptid);
 }
-#endif
 }
 
 /* Implement the "to_update_thread_list" target_ops method.  */
@@ -594,7 +551,7 @@ nbsd_resume (struct target_ops *ops,
 
   if (debug_nbsd_lwp)
 fprintf_unfiltered (gdb_stdlog,
-			"FLWP: nbsd_resume for ptid (%d, %ld, %ld)\n",
+			"NLWP: nbsd_resume for ptid (%d, %ld, %ld)\n",
 			ptid_get_pid (ptid), ptid_get_lwp (ptid),
 			ptid_get_tid (ptid));
   if (ptid_lwp_p (ptid))
@@ -684,7 +641,7 @@ nbsd_wait (struct target_ops *ops,
 		{
 		  if (debug_nbsd_lwp)
 		fprintf_unfiltered (gdb_stdlog,
-	"FLWP: deleting thread for LWP %u\n",
+	"NLWP: deleting thread for LWP %u\n",
 	pl.pl_lwpid);
 		  if (print_thread_events)
 		printf_unfiltered (_("[%s exited]\n"), target_pid_to_str
@@ -707,7 +664,7 @@ nbsd_wait (struct target_ops *ops,
 	{
 	  if (debug_nbsd_lwp)
 		fprintf_unfiltered (gdb_stdlog,
-"FLWP: using LWP %u for first thread\n",
+"NLWP: using LWP %u for first thread\n",
 pl.pl_lwpid);
 	  thread_change_ptid (pid_to_ptid (pid), wptid);
 	}
@@ -723,7 +680,7 @@ nbsd_wait (struct target_ops *ops,
 		{
 		  if (debug_nbsd_lwp)
 		fprintf_unfiltered (gdb_stdlog,
-	"FLWP: adding thread for LWP %u\n",
+	"NLWP: adding thread for LWP %u\n",
 	pl.pl_lwpid);
 		  add_thread (wptid);
 		}
@@ -1023,8 +980,8 @@ _initialize_nbsd_nat (void)
 #ifdef PT_LWPINFO
   add_setshow_boolean_cmd ("nbsd-lwp", class_maintenance,
 			   _nbsd_lwp, _("\
-Set debugging of FreeBSD lwp module."), _("\
-Show debugging of FreeBSD lwp module."), _("\
+Set debugging of NetBSD lwp module."), _("\
+Show debugging of NetBSD lwp module."), _("\
 Enables printf debugging output."),
 			   NULL,
 			   _nbsd_lwp_debug,



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  1 22:19:59 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

Log Message:
Back to stepping everyone.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c

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/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.16 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.17
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.16	Tue Nov 28 17:04:52 2017
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Fri Dec  1 17:19:59 2017
@@ -353,7 +353,7 @@ inf_ptrace_resume (struct target_ops *op
  all possible successor instructions), so we don't have to
  worry about that here.  */
   request = PT_STEP;
-#ifdef __NetBSD__
+#if 0
   /*
* On NetBSD the data field of PT_STEP contains the thread
* to be stepped; all other threads are continued if this value is > 0



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  1 22:15:17 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: x86-bsd-nat.c

Log Message:
get the debugging registers for the specific thread.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c

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/x86-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c:1.2	Tue Nov 28 17:04:53 2017
+++ src/external/gpl3/gdb/dist/gdb/x86-bsd-nat.c	Fri Dec  1 17:15:17 2017
@@ -82,7 +82,7 @@ x86bsd_dr_set (int regnum, unsigned long
   struct dbreg dbregs;
 
   if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
-  (PTRACE_TYPE_ARG3) , 0) == -1)
+  (PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't get debug registers"));
 
   /* For some mysterious reason, some of the reserved bits in the
@@ -96,7 +96,7 @@ x86bsd_dr_set (int regnum, unsigned long
 if (thread->inf == current_inferior ())
   {
 	if (ptrace (PT_SETDBREGS, get_ptrace_pid (thread->ptid),
-		(PTRACE_TYPE_ARG3) , 0) == -1)
+		(PTRACE_TYPE_ARG3) , ptid_get_lwp (inferior_ptid)) == -1)
 	  perror_with_name (_("Couldn't write debug registers"));
   }
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 30 00:13:29 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64-bsd-nat.c i386-bsd-nat.c
m68k-bsd-nat.c m88k-bsd-nat.c vax-bsd-nat.c

Log Message:
Fix 'last argument of ptrace is the thread id' on NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/m88k-bsd-nat.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c

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/amd64-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c:1.2
--- src/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c:1.1.1.1	Tue Nov 28 13:18:06 2017
+++ src/external/gpl3/gdb/dist/gdb/amd64-bsd-nat.c	Wed Nov 29 19:13:29 2017
@@ -49,7 +49,7 @@ amd64bsd_fetch_inferior_registers (struc
 {
   struct reg regs;
 
-  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get registers"));
 
   amd64_supply_native_gregset (regcache, , -1);
@@ -66,7 +66,7 @@ amd64bsd_fetch_inferior_registers (struc
   if (x86bsd_xsave_len != 0)
 	{
 	  xstateregs = alloca (x86bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs, 0)
+	  if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  ptid_get_lwp (inferior_ptid))
 	  == -1)
 	perror_with_name (_("Couldn't get extended state status"));
 
@@ -75,7 +75,7 @@ amd64bsd_fetch_inferior_registers (struc
 	}
 #endif
 
-  if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get floating point status"));
 
   amd64_supply_fxsave (regcache, -1, );
@@ -96,12 +96,12 @@ amd64bsd_store_inferior_registers (struc
 {
   struct reg regs;
 
-  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't get registers"));
 
   amd64_collect_native_gregset (regcache, , regnum);
 
-  if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_("Couldn't write registers"));
 
   if (regnum != -1)
@@ -117,11 +117,11 @@ amd64bsd_store_inferior_registers (struc
   if (x86bsd_xsave_len != 0)
 	{
 	  xstateregs = alloca (x86bsd_xsave_len);
-	  if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs, 0)
+	  if (ptrace (PT_GETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,  ptid_get_lwp (inferior_ptid))
 	  == -1)
 	perror_with_name (_("Couldn't get extended state status"));
 
-	  amd64_collect_xsave (regcache, regnum, xstateregs, 0);
+	  amd64_collect_xsave (regcache, regnum, xstateregs,  ptid_get_lwp (inferior_ptid));
 
 	  if (ptrace (PT_SETXSTATE, pid, (PTRACE_TYPE_ARG3) xstateregs,
 		  x86bsd_xsave_len) == -1)
@@ -130,12 +130,12 @@ amd64bsd_store_inferior_registers (struc
 	}
 #endif
 
-  if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get floating point status"));
 
   amd64_collect_fxsave (regcache, regnum, );
 
-  if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't write floating point status"));
 }
 }
Index: src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c:1.2
--- src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c:1.1.1.1	Tue Nov 28 13:18:07 2017
+++ src/external/gpl3/gdb/dist/gdb/i386-bsd-nat.c	Wed Nov 29 19:13:29 2017
@@ -137,7 +137,7 @@ i386bsd_fetch_inferior_registers (struct
 {
   struct reg regs;
 
-  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) , 0) == -1)
+  if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ,  ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_("Couldn't get registers"));
 
   i386bsd_supply_gregset (regcache, );
@@ -159,7 +159,7 @@ i386bsd_fetch_inferior_registers (struct
 
 	  xstateregs = alloca (x86bsd_xsave_len);
 	  if (ptrace (PT_GETXSTATE, pid,
-		  (PTRACE_TYPE_ARG3) xstateregs, 0) == -1)
+		  (PTRACE_TYPE_ARG3) xstateregs,  

CVS commit: src/external/gpl3/gdb/dist/gdb

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 22:40:18 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure.tgt

Log Message:
missed one rename


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gdb/dist/gdb/configure.tgt

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/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.15 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.16
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.15	Tue Nov 28 17:04:52 2017
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Wed Nov 29 17:40:18 2017
@@ -116,7 +116,7 @@ arm*-*-linux*)
 	;;
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
 	# Target: NetBSD/arm
-	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o armbsd-tdep.o \
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o arm-bsd-tdep.o \
 			arm-nbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 arm*-*-openbsd*)



CVS commit: src/external/gpl3/gdb/dist/gdb/config/i386

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 21:42:46 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/i386: nbsd64.mh

Log Message:
more files


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.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/config/i386/nbsd64.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.6 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.7
--- src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.6	Wed Nov 29 16:35:16 2017
+++ src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh	Wed Nov 29 16:42:45 2017
@@ -1,6 +1,6 @@
 # Host: NetBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o \
 	nbsd-nat.o amd64-nat.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o \
-	bsd-kvm.o nbsd-thread.o x86-nat.o
+	bsd-kvm.o nbsd-thread.o x86-nat.o x86-dregs.o
 
 LOADLIBES= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 21:35:26 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: vax-bsd-nat.c

Log Message:
avoid re-definition


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c

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/vax-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.2	Wed Nov 29 13:15:29 2017
+++ src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c	Wed Nov 29 16:35:26 2017
@@ -17,7 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#ifndef _KERNTYPES
 #define _KERNTYPES
+#endif
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"



CVS commit: src/external/gpl3/gdb/dist/gdb/config/i386

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 21:35:16 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/i386: nbsd64.mh

Log Message:
need more files


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.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/config/i386/nbsd64.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.5 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.6
--- src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.5	Tue Nov 28 22:35:16 2017
+++ src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh	Wed Nov 29 16:35:16 2017
@@ -1,6 +1,6 @@
 # Host: NetBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o \
 	nbsd-nat.o amd64-nat.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o \
-	bsd-kvm.o nbsd-thread.o
+	bsd-kvm.o nbsd-thread.o x86-nat.o
 
 LOADLIBES= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb

2017-11-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 03:35:16 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-nbsd-tdep.c amd64-nbsd-nat.c
amd64-nbsd-tdep.c arm-nbsd-nat.c arm-nbsd-tdep.c hppa-nbsd-nat.c
hppa-nbsd-tdep.c i386-nbsd-nat.c i386-nbsd-tdep.c mips-nbsd-nat.c
mips-nbsd-tdep.c mips-nbsd-tdep.h ppc-nbsd-nat.c ppc-nbsd-tdep.c
ppc-nbsd-tdep.h sh-nbsd-nat.c sh-nbsd-tdep.c sparc-nbsd-nat.c
sparc-nbsd-tdep.c sparc64-nbsd-nat.c sparc64-nbsd-tdep.c
vax-nbsd-tdep.c
src/external/gpl3/gdb/dist/gdb/config/alpha: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/arm: nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/i386: nbsd64.mh nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/m68k: nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/pa: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/powerpc: nbsd.mh ppc64-nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/sh: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/sparc: nbsd64.mh nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/vax: nbsdelf.mh

Log Message:
bring back all our foonbsd-{nat,tdep} files as foo-nbsd-{nat,tdep}. Account
for that in the config glue.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/amd64-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/amd64-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/hppa-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/hppa-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/i386-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/i386-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/mips-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/mips-nbsd-tdep.h \
src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.h \
src/external/gpl3/gdb/dist/gdb/sh-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/sparc-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-tdep.c \
src/external/gpl3/gdb/dist/gdb/vax-nbsd-tdep.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mh
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gdb/config/powerpc/nbsd.mh
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/dist/gdb/config/powerpc/ppc64-nbsd.mh
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/sh/nbsd.mh
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/dist/gdb/config/sparc/nbsd64.mh \
src/external/gpl3/gdb/dist/gdb/config/sparc/nbsdelf.mh
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.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-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.1.1.1	Tue Nov 28 13:18:04 2017
+++ src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c	Tue Nov 28 22:35:15 2017
@@ -1,6 +1,6 @@
 /* Target-dependent code for NetBSD/alpha.
 
-   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
Contributed by Wasabi Systems, Inc.
 
@@ -28,13 +28,19 @@
 #include "value.h"
 
 #include "alpha-tdep.h"
-#include "alpha-bsd-tdep.h"
+#include "alphabsd-tdep.h"
 #include "nbsd-tdep.h"
 #include "solib-svr4.h"
+#include "trad-frame.h"
+#include "frame-unwind.h"
+#include "tramp-frame.h"
 #include "target.h"
 
 /* Core file support.  */
 
+/* Even though NetBSD/alpha used ELF since day one, it used the
+   traditional a.out-style core dump format before NetBSD 1.6.  */
+
 /* Sizeof `struct reg' in .  */
 #define ALPHANBSD_SIZEOF_GREGS	(32 * 8)
 
@@ -168,31 +174,95 @@ alphanbsd_iterate_over_regset_sections (
 
 /* Signal trampolines.  */
 
+static void
+alphanbsd_sigtramp_cache_init (const struct tramp_frame *,
+			  

CVS commit: src/external/gpl3/gdb/dist/gdb

2017-06-15 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 15 23:46:30 UTC 2017

Modified Files:
src/external/gpl3/gdb/dist/gdb: bsd-kvm.c

Log Message:
Don't include  on NetBSD in GDB

This header in this context is freebsdism.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c

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/bsd-kvm.c
diff -u src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.9 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.10
--- src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.9	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/bsd-kvm.c	Thu Jun 15 23:46:30 2017
@@ -37,7 +37,9 @@
 #include "readline/readline.h"
 #include 
 #include 
+#if defined(__FreeBSD__)
 #include 
+#endif
 
 #include "bsd-kvm.h"
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-12-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 15 10:01:16 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-tdep.c

Log Message:
Skip the initial GP load in function prologue when inserting a breakpoint.

GNU ld for alpha is so clever that the redundant GP load in function
entrypoint is skipped. we must therefore skip initial GP loads; otherwise
breakpoints in function entrypoints can also be skipped.

Reported to upstream (Bug 20969):
  https://sourceware.org/bugzilla/show_bug.cgi?id=20969

ok martin


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c

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-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.1.1.5 src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/alpha-tdep.c:1.1.1.5	Wed Oct 12 16:47:13 2016
+++ src/external/gpl3/gdb/dist/gdb/alpha-tdep.c	Thu Dec 15 10:01:16 2016
@@ -757,6 +757,31 @@ alpha_skip_prologue (struct gdbarch *gdb
   return pc + offset;
 }
 
+/* GNU ld for alpha is so clever that the redundant GP load in function
+   entrypoint is skipped.  We must therefore skip initial GP loads; otherwise
+   breakpoints in function entrypoints can also be skipped.  */
+
+static CORE_ADDR
+alpha_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  unsigned long inst;
+  gdb_byte buf[ALPHA_INSN_SIZE];
+
+  /* Refer to the comment in alpha_skip_prologue above.  */
+  if (target_read_memory (pc, buf, sizeof (buf)))
+return pc;
+
+  /* Skip a GP load in the first two words in the function entrypoint.  */
+  inst = alpha_read_insn (gdbarch, pc);
+  if ((inst & 0x) != 0x27bb)	/* ldah $gp,n($t12) */
+return pc;
+  inst = alpha_read_insn (gdbarch, pc + ALPHA_INSN_SIZE);
+  if ((inst & 0x) != 0x23bd)	/* lda $gp,n($gp) */
+return pc;
+
+  return pc + 2 * ALPHA_INSN_SIZE;
+}
+
 
 static const int ldl_l_opcode = 0x2a;
 static const int ldq_l_opcode = 0x2b;
@@ -1802,6 +1827,9 @@ alpha_gdbarch_init (struct gdbarch_info 
   /* Prologue heuristics.  */
   set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
 
+  /* Entrypoint heuristics.  */
+  set_gdbarch_skip_entrypoint (gdbarch, alpha_skip_entrypoint);
+
   /* Disassembler.  */
   set_gdbarch_print_insn (gdbarch, print_insn_alpha);
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Nov 18 09:52:33 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c armnbsd-tdep.c
configure.tgt nbsd-tdep.c nbsd-tdep.h

Log Message:
Provide a generic nbsd_skip_solib_resolver and use it in alpha and arm.
Others should follow suit.

I even tested it.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/configure.tgt
cvs rdiff -u -r1.1.1.6 -r1.2 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.h

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/alphanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.12 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.13
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.12	Sat Oct 29 17:02:06 2016
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c	Fri Nov 18 09:52:33 2016
@@ -22,7 +22,6 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdbcore.h"
-#include "objfiles.h"
 #include "osabi.h"
 #include "regcache.h"
 #include "regset.h"
@@ -37,19 +36,6 @@
 #include "tramp-frame.h"
 #include "target.h"
 
-/* from obsd-tdep.c with symbol name adjusted to ours */
-static CORE_ADDR
-alphanbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol("_rtld_bind_start", NULL, NULL);
-  if (msym.minsym && BMSYMBOL_VALUE_ADDRESS (msym) == pc)
-return frame_unwind_caller_pc (get_current_frame ());
-  else
-return find_solib_trampoline_target (get_current_frame (), pc);
-}
-
 /* Core file support.  */
 
 /* Even though NetBSD/alpha used ELF since day one, it used the
@@ -347,7 +333,7 @@ alphanbsd_init_abi (struct gdbarch_info 
   /* NetBSD/alpha has SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, svr4_lp64_fetch_link_map_offsets);
-  set_gdbarch_skip_solib_resolver (gdbarch, alphanbsd_skip_solib_resolver);
+  set_gdbarch_skip_solib_resolver (gdbarch, nbsd_skip_solib_resolver);
 
 #ifdef notyet
   tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;

Index: src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.7 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.8
--- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.7	Sun Oct 23 07:40:08 2016
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c	Fri Nov 18 09:52:33 2016
@@ -19,10 +19,10 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "objfiles.h"
 
 #include "arch/arm.h"
 #include "arm-tdep.h"
+#include "nbsd-tdep.h"
 #include "solib-svr4.h"
 
 /* Description of the longjmp buffer.  */
@@ -36,19 +36,6 @@ static const gdb_byte arm_nbsd_arm_be_br
 static const gdb_byte arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
 static const gdb_byte arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
 
-/* from obsd-tdep.c with symbol name adjusted to ours */
-static CORE_ADDR
-armnbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
-{
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol("_rtld_bind", NULL, NULL);
-  if (msym.minsym && BMSYMBOL_VALUE_ADDRESS (msym) == pc)
-return frame_unwind_caller_pc (get_current_frame ());
-  else
-return find_solib_trampoline_target (get_current_frame (), pc);
-}
-
 static void
 arm_netbsd_init_abi_common (struct gdbarch_info info,
 			struct gdbarch *gdbarch)
@@ -114,7 +101,7 @@ arm_netbsd_elf_init_abi (struct gdbarch_
 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 
   /* for single stepping; see PR/50773 */
-  set_gdbarch_skip_solib_resolver (gdbarch, armnbsd_skip_solib_resolver);
+  set_gdbarch_skip_solib_resolver (gdbarch, nbsd_skip_solib_resolver);
 }
 
 static enum gdb_osabi

Index: src/external/gpl3/gdb/dist/gdb/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.13 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.14
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.13	Sun Oct 23 07:33:15 2016
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Fri Nov 18 09:52:33 2016
@@ -109,7 +109,7 @@ arm*-*-linux*)
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
 	# Target: NetBSD/arm
 	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o armbsd-tdep.o \
-			armnbsd-tdep.o solib-svr4.o"
+			armnbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 arm*-*-openbsd*)
 	# Target: OpenBSD/arm

Index: src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.1.1.6 src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c:1.1.1.6	Wed Oct 12 16:47:14 2016
+++ src/external/gpl3/gdb/dist/gdb/nbsd-tdep.c	Fri Nov 18 09:52:33 2016
@@ -3,9 +3,9 @@

CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 29 17:02:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c

Log Message:
Add a skip_solib_resolver, from Rin Okuyama, fixes single stepping for
shared binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c

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/alphanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.11 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.12
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.11	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c	Sat Oct 29 17:02:06 2016
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdbcore.h"
+#include "objfiles.h"
 #include "osabi.h"
 #include "regcache.h"
 #include "regset.h"
@@ -36,6 +37,19 @@
 #include "tramp-frame.h"
 #include "target.h"
 
+/* from obsd-tdep.c with symbol name adjusted to ours */
+static CORE_ADDR
+alphanbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  struct bound_minimal_symbol msym;
+
+  msym = lookup_minimal_symbol("_rtld_bind_start", NULL, NULL);
+  if (msym.minsym && BMSYMBOL_VALUE_ADDRESS (msym) == pc)
+return frame_unwind_caller_pc (get_current_frame ());
+  else
+return find_solib_trampoline_target (get_current_frame (), pc);
+}
+
 /* Core file support.  */
 
 /* Even though NetBSD/alpha used ELF since day one, it used the
@@ -333,6 +347,7 @@ alphanbsd_init_abi (struct gdbarch_info 
   /* NetBSD/alpha has SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, svr4_lp64_fetch_link_map_offsets);
+  set_gdbarch_skip_solib_resolver (gdbarch, alphanbsd_skip_solib_resolver);
 
 #ifdef notyet
   tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 27 14:30:55 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

Log Message:
it might not be a breakpoint, so make the message what it actually is.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c

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/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.14 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.15
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.14	Mon Oct 24 17:22:33 2016
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Thu Oct 27 10:30:55 2016
@@ -500,9 +500,10 @@ inf_ptrace_xfer_partial (struct target_o
 	   to indicate failure.  */
 	if (errno == EACCES)
 	  {
-	fprintf_unfiltered (gdb_stderr, "Cannot set breakpoint at %p (%s). "
+	fprintf_unfiltered (gdb_stderr, "Cannot %s process at %p (%s). "
 "Is PaX MPROTECT active? See security(7), "
-"sysctl(7), paxctl(8)\n", piod.piod_offs,
+"sysctl(7), paxctl(8)\n", writebuf ? "write to" :
+"read from", piod.piod_offs,
 strerror(errno));
 	return TARGET_XFER_E_IO;	/* Some other error perhaps? */
 	  }



CVS commit: src/external/gpl3/gdb/dist/gdb/config/pa

2016-10-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 27 11:48:24 UTC 2016

Removed Files:
src/external/gpl3/gdb/dist/gdb/config/pa: nbsd.mt

Log Message:
.mt files are dead


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 24 21:22:33 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

Log Message:
Don't fail silently if we can't set a breakpoint


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c

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/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.13 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.14
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.13	Wed Oct 12 16:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Mon Oct 24 17:22:33 2016
@@ -498,6 +498,14 @@ inf_ptrace_xfer_partial (struct target_o
 	/* If the PT_IO request is somehow not supported, fallback on
 	   using PT_WRITE_D/PT_READ_D.  Otherwise we will return zero
 	   to indicate failure.  */
+	if (errno == EACCES)
+	  {
+	fprintf_unfiltered (gdb_stderr, "Cannot set breakpoint at %p (%s). "
+"Is PaX MPROTECT active? See security(7), "
+"sysctl(7), paxctl(8)\n", piod.piod_offs,
+strerror(errno));
+	return TARGET_XFER_E_IO;	/* Some other error perhaps? */
+	  }
 	if (errno != EINVAL)
 	  return TARGET_XFER_EOF;
   }



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 23 07:40:09 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-tdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c

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/armnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.6	Sun Oct 23 07:33:15 2016
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c	Sun Oct 23 07:40:08 2016
@@ -87,9 +87,9 @@ arm_netbsd_init_abi_common (struct gdbar
 (gdbarch, armbsd_iterate_over_regset_sections);
 
 }
-  
+
 static void
-arm_netbsd_aout_init_abi (struct gdbarch_info info, 
+arm_netbsd_aout_init_abi (struct gdbarch_info info,
 			  struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 23 07:33:15 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-tdep.c configure.tgt

Log Message:
PR toolchain/51557: gdb can't read core files

Register an iterate_over_regset_sections methods for armnbsd


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/configure.tgt

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/armnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.5 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.6
--- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.5	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c	Sun Oct 23 07:33:15 2016
@@ -82,6 +82,10 @@ arm_netbsd_init_abi_common (struct gdbar
 
   /* Single stepping.  */
   set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+  /* Core support */
+  set_gdbarch_iterate_over_regset_sections
+(gdbarch, armbsd_iterate_over_regset_sections);
+
 }
   
 static void

Index: src/external/gpl3/gdb/dist/gdb/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.12 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.13
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.12	Fri Oct 14 14:41:32 2016
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Sun Oct 23 07:33:15 2016
@@ -108,8 +108,8 @@ arm*-*-linux*)
 	;;
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
 	# Target: NetBSD/arm
-	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o armnbsd-tdep.o \
-			solib-svr4.o"
+	gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o armbsd-tdep.o \
+			armnbsd-tdep.o solib-svr4.o"
 	;;
 arm*-*-openbsd*)
 	# Target: OpenBSD/arm



CVS commit: src/external/gpl3/gdb/dist/gdb/config/arm

2016-10-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 22 14:57:50 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/arm: nbsdelf.mh

Log Message:
Add -lkvm for bsd-kvm.o


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.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/config/arm/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.4 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.5
--- src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.4	Sat Oct 22 14:38:07 2016
+++ src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh	Sat Oct 22 14:57:50 2016
@@ -1,3 +1,5 @@
 # Host: NetBSD/arm
 NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o armnbsd-nat.o \
 	bsd-kvm.o nbsd-thread.o
+
+LOADLIBES= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb/config

2016-10-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 22 14:38:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/arm: nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/pa: nbsd.mt

Log Message:
No need for corelow.o here now as it is in COMMON_OBS


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt

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/config/arm/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.3 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.4
--- src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.3	Mon Feb  6 10:46:35 2012
+++ src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh	Sat Oct 22 14:38:07 2016
@@ -1,3 +1,3 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o nbsd-nat.o armnbsd-nat.o \
+NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o armnbsd-nat.o \
 	bsd-kvm.o nbsd-thread.o

Index: src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt
diff -u src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt:1.1 src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt:1.2
--- src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt:1.1	Sun Sep 25 16:30:26 2011
+++ src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mt	Sat Oct 22 14:38:07 2016
@@ -1,2 +1,2 @@
 # Target: NetBSD/hppa
-TDEPFILES= hppa-tdep.o hppabsd-tdep.o hppanbsd-tdep.o corelow.o solib.o solib-svr4.o
+TDEPFILES= hppa-tdep.o hppabsd-tdep.o hppanbsd-tdep.o solib.o solib-svr4.o



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 22 11:04:16 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: hppanbsd-tdep.c

Log Message:
Fix HPPANBSD_SIZEOF_GREGS to match sizeof(struct reg)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/hppanbsd-tdep.c

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/hppanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/hppanbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/hppanbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/hppanbsd-tdep.c:1.6	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/hppanbsd-tdep.c	Sat Oct 22 11:04:16 2016
@@ -141,7 +141,7 @@ hppanbsd_sigtramp_cache_init (const stru
 /* Core file support.  */
 
 /* Sizeof `struct reg' in .  */
-#define HPPANBSD_SIZEOF_GREGS	(46 * 4)
+#define HPPANBSD_SIZEOF_GREGS	(47 * 4)
 
 static int hppanbsd_reg_offset[] =
 {



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Oct 17 17:37:44 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: m68kbsd-nat.c vaxbsd-nat.c

Log Message:
add some missing casts and make these build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c

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/m68kbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.10	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c	Mon Oct 17 17:37:44 2016
@@ -57,7 +57,7 @@ m68kbsd_fpregset_supplies_p (int regnum)
 static void
 m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
 {
-  const char *regs = gregs;
+  const char *regs = (const char *)gregs;
   int regnum;
 
   for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
@@ -70,7 +70,7 @@ static void
 m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  const char *regs = fpregs;
+  const char *regs = (const char *)fpregs;
   int regnum;
 
   for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
@@ -85,7 +85,7 @@ static void
 m68kbsd_collect_gregset (const struct regcache *regcache,
 			 void *gregs, int regnum)
 {
-  char *regs = gregs;
+  char *regs = (char *)gregs;
   int i;
 
   for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
@@ -103,7 +103,7 @@ m68kbsd_collect_fpregset (const struct r
 			  void *fpregs, int regnum)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  char *regs = fpregs;
+  char *regs = (char *)fpregs;
   int i;
 
   for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
@@ -253,7 +253,7 @@ m68kbsd_supply_pcb (struct regcache *reg
   tmp = pcb->pcb_ps & 0x;
   regcache_raw_supply (regcache, M68K_PS_REGNUM, );
 
-  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) , sizeof tmp);
+  read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (unsigned char *) , sizeof tmp);
   regcache_raw_supply (regcache, M68K_PC_REGNUM, );
 
   return 1;

Index: src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.11 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.12
--- src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.11	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c	Mon Oct 17 17:37:44 2016
@@ -47,7 +47,7 @@ typedef struct fpreg fpregset_t;
 static void
 vaxbsd_supply_gregset (struct regcache *regcache, const void *gregs)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *)gregs;
   int regnum;
 
   for (regnum = 0; regnum < VAX_NUM_REGS; regnum++)
@@ -61,7 +61,7 @@ static void
 vaxbsd_collect_gregset (const struct regcache *regcache,
 			void *gregs, int regnum)
 {
-  gdb_byte *regs = gregs;
+  gdb_byte *regs = (gdb_byte *)gregs;
   int i;
 
   for (i = 0; i <= VAX_NUM_REGS; i++)



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Oct 17 06:26:20 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: i386bsd-nat.h

Log Message:
add missing i386bsd_supply_gregset() and i386bsd_collect_gregset() protos


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h

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/i386bsd-nat.h
diff -u src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.8 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.9
--- src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.8	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h	Mon Oct 17 06:26:20 2016
@@ -25,4 +25,8 @@
 
 extern struct target_ops *i386bsd_target (void);
 
+extern void i386bsd_supply_gregset (struct regcache *, const void *);
+
+extern void i386bsd_collect_gregset (const struct regcache *, void *, int);
+
 #endif /* i386bsd-nat.h */



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 14 23:49:23 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: event-loop.h

Log Message:
multiple include protection


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 src/external/gpl3/gdb/dist/gdb/event-loop.h

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/event-loop.h
diff -u src/external/gpl3/gdb/dist/gdb/event-loop.h:1.1.1.6 src/external/gpl3/gdb/dist/gdb/event-loop.h:1.2
--- src/external/gpl3/gdb/dist/gdb/event-loop.h:1.1.1.6	Wed Oct 12 12:47:12 2016
+++ src/external/gpl3/gdb/dist/gdb/event-loop.h	Fri Oct 14 19:49:23 2016
@@ -66,7 +66,8 @@
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;
@@ -127,3 +128,4 @@ extern void mark_async_event_handler (st
 extern void clear_async_event_handler (struct async_event_handler *handler);
 
 extern void initialize_async_signal_handlers (void);
+#endif



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 14 14:12:48 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: hppanbsd-nat.c

Log Message:
Make this compile


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c

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/hppanbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.8	Wed Oct 12 20:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c	Fri Oct 14 14:12:48 2016
@@ -60,8 +60,7 @@ hppanbsd_fpregset_supplies_p (int regnum
 static void
 hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs)
 {
-  const char *regs = gregs;
-  const int *r = gregs;
+  const char *regs = (const char *) gregs;
   int regnum;
 
   for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
@@ -85,7 +84,7 @@ hppanbsd_supply_gregset (struct regcache
 static void
 hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
 {
-  const char *regs = fpregs;
+  const char *regs = (const char *) fpregs;
   int regnum;
 
   for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
@@ -103,8 +102,7 @@ static void
 hppanbsd_collect_gregset (const struct regcache *regcache,
 			  void *gregs, int regnum)
 {
-  char *regs = gregs;
-  int *r = gregs;
+  char *regs = (char *) gregs;
   int i;
 
   for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
@@ -151,7 +149,7 @@ static void
 hppanbsd_collect_fpregset (const struct regcache *regcache,
 			  void *fpregs, int regnum)
 {
-  char *regs = fpregs;
+  char *regs = (char *) fpregs;
   int i;
 
   for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-03-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 24 03:49:06 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: vaxbsd-nat.c

Log Message:
adapt to new api


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c

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/vaxbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.9 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.10
--- src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c:1.9	Wed Mar 23 20:38:40 2016
+++ src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c	Wed Mar 23 23:49:06 2016
@@ -17,7 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#ifndef _KERNTYPES
 #define _KERNTYPES
+#endif
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"
@@ -34,6 +36,11 @@
 #ifndef HAVE_GREGSET_T
 typedef struct reg gregset_t;
 #endif
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+
+#include "gregset.h"
 
 /* Supply the general-purpose registers stored in GREGS to REGCACHE.  */
 
@@ -64,7 +71,7 @@ vaxbsd_collect_gregset (const struct reg
 }
 }
 
-static void
+void
 supply_gregset (struct regcache *regcache, const gregset_t *gregs)
 {
   if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
@@ -72,7 +79,7 @@ supply_gregset (struct regcache *regcach
 perror_with_name (_("Couldn't write registers"));
 }
 
-static void
+void
 fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
 {
   if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-03-09 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Mar  9 20:55:22 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: shnbsd-tdep.c

Log Message:
gdb now checks the size of the core register section, so pacify the
warning in corelow.c by providing the expected size.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c

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/shnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.12 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.13
--- src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.12	Sun Aug 16 09:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c	Wed Mar  9 20:55:22 2016
@@ -203,11 +203,10 @@ shnbsd_init_abi (struct gdbarch_info inf
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   tdep->core_gregmap = (struct sh_corefile_regmap *)gregs_table;
+  tdep->sizeof_gregset = 88;
+
   tdep->core_fpregmap = (struct sh_corefile_regmap *)fpregs_table;
-#if 0
-  tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
-  tdep->sizeof_gregset = 84;
-#endif
+  tdep->sizeof_fpregset = 0;	/* XXX */
 
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets);



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 23 22:32:07 UTC 2016

Removed Files:
src/external/gpl3/gdb/dist/gdb: d-exp.c

Log Message:
Remove d-exp.c (generated file)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/external/gpl3/gdb/dist/gdb/d-exp.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 17:05:40 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: mipsnbsd-nat.c

Log Message:
avoid re-def


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c

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/mipsnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.10	Wed Feb  3 14:03:50 2016
+++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c	Fri Feb 19 12:05:40 2016
@@ -16,8 +16,9 @@
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
-
+#ifndef _KERNTYPES
 #define _KERNTYPES
+#endif
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  7 21:03:49 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-nat.c

Log Message:
don't re-define _KERNTYPES


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c

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/armnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.13 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.14
--- src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.13	Wed Feb  3 14:03:50 2016
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c	Sun Feb  7 16:03:49 2016
@@ -17,7 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#ifndef _KERNTYPES
 #define _KERNTYPES
+#endif
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb  6 18:23:26 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: dtrace-probe.c

Log Message:
Avoid empty loop.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/dtrace-probe.c

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/dtrace-probe.c
diff -u src/external/gpl3/gdb/dist/gdb/dtrace-probe.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/dtrace-probe.c:1.2
--- src/external/gpl3/gdb/dist/gdb/dtrace-probe.c:1.1.1.1	Wed Feb  3 02:59:11 2016
+++ src/external/gpl3/gdb/dist/gdb/dtrace-probe.c	Sat Feb  6 18:23:26 2016
@@ -421,7 +421,8 @@ dtrace_process_dof_probe (struct objfile
 	  arg.type_str = xstrdup (p);
 
 	  /* Use strtab_size as a sentinel.  */
-	  while (*p++ != '\0' && p - strtab < strtab_size);
+	  while (*p != '\0' && p - strtab < strtab_size)
+	++p;
 
 	  /* Try to parse a type expression from the type string.  If
 	 this does not work then we set the type to `long



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  3 19:03:50 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-nat.c mipsnbsd-nat.c

Log Message:
define _KERNTYPES


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c

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/armnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.12 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.13
--- src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.12	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c	Wed Feb  3 14:03:50 2016
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#define _KERNTYPES
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"

Index: src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.9 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.10
--- src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.9	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c	Wed Feb  3 14:03:50 2016
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#define _KERNTYPES
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-02-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  3 19:03:40 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure configure.ac

Log Message:
define _KMEMUSER earlier for mips


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/configure \
src/external/gpl3/gdb/dist/gdb/configure.ac

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/configure
diff -u src/external/gpl3/gdb/dist/gdb/configure:1.6 src/external/gpl3/gdb/dist/gdb/configure:1.7
--- src/external/gpl3/gdb/dist/gdb/configure:1.6	Tue Feb  2 22:23:28 2016
+++ src/external/gpl3/gdb/dist/gdb/configure	Wed Feb  3 14:03:40 2016
@@ -12264,8 +12264,8 @@ if test "${gdb_cv_struct_lwp+set}" = set
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include 
 #define _KMEMUSER
+#include 
 #include 
 int
 main ()
Index: src/external/gpl3/gdb/dist/gdb/configure.ac
diff -u src/external/gpl3/gdb/dist/gdb/configure.ac:1.6 src/external/gpl3/gdb/dist/gdb/configure.ac:1.7
--- src/external/gpl3/gdb/dist/gdb/configure.ac:1.6	Tue Feb  2 22:23:28 2016
+++ src/external/gpl3/gdb/dist/gdb/configure.ac	Wed Feb  3 14:03:40 2016
@@ -1481,8 +1481,8 @@ AC_CHECK_MEMBERS([struct thread.td_pcb],
 
 # See if  defines `struct lwp`.
 AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
-[AC_TRY_COMPILE([#include 
-#define _KMEMUSER
+[AC_TRY_COMPILE([#define _KMEMUSER
+#include 
 #include ], [struct lwp l;],
 gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
 if test $gdb_cv_struct_lwp = yes; then



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 23 20:28:24 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: bsd-kvm.c

Log Message:
define sooner _KMEMUSER


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c

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/bsd-kvm.c
diff -u src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.7 src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.8
--- src/external/gpl3/gdb/dist/gdb/bsd-kvm.c:1.7	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/bsd-kvm.c	Sat Jan 23 15:28:24 2016
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program.  If not, see .  */
 
+#define _KMEMUSER
 #include "defs.h"
 #include "cli/cli-cmds.h"
 #include "command.h"
@@ -35,7 +36,6 @@
 #include 
 #include "readline/readline.h"
 #include 
-#define _KMEMUSER
 #include 
 #include 
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2015-09-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Sep 12 19:04:21 UTC 2015

Modified Files:
src/external/gpl3/gdb/dist/gdb: ada-lang.c

Log Message:
Don't shift negative values.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gdb/dist/gdb/ada-lang.c

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/ada-lang.c
diff -u src/external/gpl3/gdb/dist/gdb/ada-lang.c:1.1.1.4 src/external/gpl3/gdb/dist/gdb/ada-lang.c:1.2
--- src/external/gpl3/gdb/dist/gdb/ada-lang.c:1.1.1.4	Sat Aug 15 09:52:05 2015
+++ src/external/gpl3/gdb/dist/gdb/ada-lang.c	Sat Sep 12 19:04:21 2015
@@ -2518,7 +2518,7 @@ ada_value_primitive_packed_val (struct v
   accumSize += HOST_CHAR_BIT - unusedLS;
   if (accumSize >= HOST_CHAR_BIT)
 {
-  unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
+  unpacked[targ] = accum & ~(~0UL << HOST_CHAR_BIT);
   accumSize -= HOST_CHAR_BIT;
   accum >>= HOST_CHAR_BIT;
   ntarg -= 1;
@@ -2532,7 +2532,7 @@ ada_value_primitive_packed_val (struct v
   while (ntarg > 0)
 {
   accum |= sign << accumSize;
-  unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
+  unpacked[targ] = accum & ~(~0UL << HOST_CHAR_BIT);
   accumSize -= HOST_CHAR_BIT;
   accum >>= HOST_CHAR_BIT;
   ntarg -= 1;



CVS commit: src/external/gpl3/gdb/dist/gdb

2015-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 17 08:53:33 UTC 2015

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparcnbsd-nat.c

Log Message:
fix sparc


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/sparcnbsd-nat.c

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/sparcnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparcnbsd-nat.c:1.7 src/external/gpl3/gdb/dist/gdb/sparcnbsd-nat.c:1.8
--- src/external/gpl3/gdb/dist/gdb/sparcnbsd-nat.c:1.7	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/sparcnbsd-nat.c	Mon Aug 17 04:53:33 2015
@@ -45,25 +45,25 @@ typedef struct fpreg fpregset_t;
 void
 supply_gregset (struct regcache *regcache, const gregset_t *gregs)
 {
-  sparc_supply_gregset (sparc_gregset, regcache, -1, gregs);
+  sparc_supply_gregset (sparc_gregmap, regcache, -1, gregs);
 }
 
 void
 supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs)
 {
-  sparc_supply_fpregset (sparc_fpregset, regcache, -1, fpregs);
+  sparc_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs);
 }
 
 void
 fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
 {
-  sparc_collect_gregset (sparc_gregset, regcache, regnum, gregs);
+  sparc_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
 }
 
 void
 fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum)
 {
-  sparc_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs);
+  sparc_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs);
 }
 
 static int
@@ -98,12 +98,8 @@ void
 _initialize_sparcnbsd_nat (void)
 {
   struct target_ops *t;
-  sparc_gregset = sparc32nbsd_gregset;
-  sparc_fpregset = sparc32_bsd_fpregset;
-#if 0
   sparc_gregmap = sparc32nbsd_gregmap;
   sparc_fpregmap = sparc32_bsd_fpregmap;
-#endif
 
   /* Add some extra features to the generic SPARC target.  */
   t = sparc_target ();



CVS commit: src/external/gpl3/gdb/dist/gdb

2015-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 17 09:57:32 UTC 2015

Modified Files:
src/external/gpl3/gdb/dist/gdb: alphanbsd-tdep.c

Log Message:
fix alpha


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c

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/alphanbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.8 src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.9
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c:1.8	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c	Mon Aug 17 05:57:31 2015
@@ -341,16 +341,12 @@ alphanbsd_init_abi (struct gdbarch_info 
   tdep-jb_pc = 2;
   tdep-jb_elt_size = 8;
 
-  set_gdbarch_regset_from_core_section
-(gdbarch, alphanbsd_regset_from_core_section);
-
   tramp_frame_prepend_unwinder (gdbarch, alphanbsd_sigtramp_sc1);
   tramp_frame_prepend_unwinder (gdbarch, alphanbsd_sigtramp_si2);
   tramp_frame_prepend_unwinder (gdbarch, alphanbsd_sigtramp_si4);
-#if 0
+
   set_gdbarch_iterate_over_regset_sections
 (gdbarch, alphanbsd_iterate_over_regset_sections);
-#endif
 }
 
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2015-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 17 10:06:50 UTC 2015

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64nbsd-nat.c

Log Message:
fix sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c

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/sparc64nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.8	Sun Aug 16 05:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c	Mon Aug 17 06:06:50 2015
@@ -141,25 +141,25 @@ sparc64nbsd_fpregset_supplies_p (struct 
 void
 supply_gregset (struct regcache *regcache, const gregset_t *gregs)
 {
-  sparc64nbsd_supply_gregset (sparc_gregset, regcache, -1, gregs);
+  sparc64nbsd_supply_gregset (sparc_gregmap, regcache, -1, gregs);
 }
 
 void
 supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs)
 {
-  sparc64nbsd_supply_fpregset (sparc_fpregset, regcache, -1, fpregs);
+  sparc64nbsd_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs);
 }
 
 void
 fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
 {
-  sparc64nbsd_collect_gregset (sparc_gregset, regcache, regnum, gregs);
+  sparc64nbsd_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
 }
 
 void
 fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum)
 {
-  sparc64nbsd_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs);
+  sparc64nbsd_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs);
 }
 /* Support for debugging kernel virtual memory images.  */
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2015-07-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul  2 14:54:42 UTC 2015

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
td_close() needs to be able to write to the process image, so call sooner,
before we detach from it.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.21 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.22
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.21	Wed Jul 16 07:48:37 2014
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Thu Jul  2 10:54:42 2015
@@ -146,8 +146,6 @@ nbsd_thread_activate (void)
 static void
 nbsd_thread_deactivate (void)
 {
-  td_close (main_ta);
-
   inferior_ptid = main_ptid;
   main_ptid = minus_one_ptid;
   cached_thread = main_ptid;
@@ -197,6 +195,7 @@ nbsd_thread_detach (struct target_ops *o
 {
   struct target_ops *beneath = find_target_beneath (ops);
   unpush_target (ops);
+  td_close (main_ta);
   /* Ordinarily, gdb caches solib information, but this means that it
  won't call the new_obfile hook on a reattach. Clear the symbol file
  cache so that attach - detach - attach works. */



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-12-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec 15 13:43:24 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure.tgt

Log Message:
Allow i386 binary debugging on amd64 hosts.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/configure.tgt

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/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.7 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.8
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.7	Sun Aug 10 05:57:30 2014
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Mon Dec 15 13:43:24 2014
@@ -686,8 +686,9 @@ x86_64-*-mingw* | x86_64-*-cygwin*)
 ;;
 x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
 	# Target: NetBSD/amd64
-	gdb_target_obs=amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
-			nbsd-tdep.o solib-svr4.o
+	gdb_target_obs=amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o \
+			i386bsd-tdep.o i386nbsd-tdep.o \
+			i387-tdep.o nbsd-tdep.o solib-svr4.o
 	;;
 x86_64-*-openbsd*)
 	# Target: OpenBSD/amd64



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 14 19:58:06 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
When debugging 32 bit binaries on a 64 bit arch in NetBSD the dynamic
linker magically converts the dynamic linker name to ld.elf_so-32bitarch
like ld.elf_so-i386. We do the same magic here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/gpl3/gdb/dist/gdb/solib.c

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/solib.c
diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.1.1.3 src/external/gpl3/gdb/dist/gdb/solib.c:1.2
--- src/external/gpl3/gdb/dist/gdb/solib.c:1.1.1.3	Sun Jun 22 19:41:01 2014
+++ src/external/gpl3/gdb/dist/gdb/solib.c	Sun Dec 14 14:58:06 2014
@@ -413,13 +413,12 @@ solib_bfd_fopen (char *pathname, int fd)
 
 /* Find shared library PATHNAME and open a BFD for it.  */
 
-bfd *
-solib_bfd_open (char *pathname)
+static bfd *
+solib_bfd_open1 (char *pathname)
 {
   char *found_pathname;
   int found_file;
   bfd *abfd;
-  const struct bfd_arch_info *b;
 
   /* Search for shared library file.  */
   found_pathname = solib_find (pathname, found_file);
@@ -443,13 +442,41 @@ solib_bfd_open (char *pathname)
   error (_(`%s': not in executable format: %s),
 	 bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
 }
+  return abfd;
+}
+
+bfd *
+solib_bfd_open (char *pathname)
+{
+  bfd *abfd, *bbfd;
+  const struct bfd_arch_info *b;
+  char pname[PATH_MAX];
+
+  abfd = solib_bfd_open1 (pathname);
+  if (abfd == NULL)
+return NULL;
 
   /* Check bfd arch.  */
   b = gdbarch_bfd_arch_info (target_gdbarch ());
-  if (!b-compatible (b, bfd_get_arch_info (abfd)))
-warning (_(`%s': Shared library architecture %s is not compatible 
-   with target architecture %s.), bfd_get_filename (abfd),
- bfd_get_arch_info (abfd)-printable_name, b-printable_name);
+  if (b-compatible (b, bfd_get_arch_info (abfd)))
+ return abfd;
+
+  snprintf (pname, sizeof(pname), %s-%s, pathname, b-printable_name);
+  bbfd = solib_bfd_open1 (pname);
+  if (bbfd == NULL)
+goto out;
+
+  gdb_bfd_unref (abfd);
+  abfd = bbfd;
+
+  /* Check bfd arch.  */
+  if (b-compatible (b, bfd_get_arch_info (abfd)))
+return abfd;
+
+out:
+  warning (_(`%s': Shared library architecture %s is not compatible 
+ with target architecture %s.), bfd_get_filename (abfd),
+   bfd_get_arch_info (abfd)-printable_name, b-printable_name);
 
   return abfd;
 }



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-12-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 12 20:25:35 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-tdep.c

Log Message:
Fix byte order selection for breakpoints: on arm the byte order for code
might differ from the generic BFD endianess.
Fixes PR toolchain/49445.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c

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/armnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3	Sun Jun 22 23:40:55 2014
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c	Fri Dec 12 20:25:35 2014
@@ -43,7 +43,7 @@ arm_netbsd_init_abi_common (struct gdbar
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   tdep-lowest_pc = 0x8000;
-  switch (info.byte_order)
+  switch (info.byte_order_for_code)
 {
 case BFD_ENDIAN_LITTLE:
   tdep-arm_breakpoint = arm_nbsd_arm_le_breakpoint;



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-12-02 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Dec  2 10:34:27 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64nbsd-tdep.c

Log Message:
. do not abort() if we read a zero cs or rip, or if we can't read them
. end the backtrace when encountering a soft interrupt, since they live in
  their own lwp


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c

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/amd64nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.10 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.11
--- src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.10	Sun Jun 22 23:52:57 2014
+++ src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c	Tue Dec  2 10:34:27 2014
@@ -164,8 +164,6 @@ amd64nbsd_trapframe_cache(struct frame_i
 + amd64nbsd_tf_reg_offset[AMD64_CS_REGNUM], 8, byte_order);
   rip = read_memory_unsigned_integer (addr
 + amd64nbsd_tf_reg_offset[AMD64_RIP_REGNUM], 8, byte_order);
-  if (cs == 0 || rip == 0)
- abort();
 
   /* The trap frame layout was changed lf the %rip value is less than 2^16 it
* is almost certainly the %ss of the old format. */
@@ -187,9 +185,10 @@ amd64nbsd_trapframe_cache(struct frame_i
 }
 }
 
-  if ((cs  I386_SEL_RPL) == I386_SEL_UPL)
+  if ((cs  I386_SEL_RPL) == I386_SEL_UPL ||
+	(name  strncmp(name, Xsoft, 5) == 0))
 {
-  /* Trap from user space; terminate backtrace.  */
+  /* Trap from user space or soft interrupt; terminate backtrace.  */
   trad_frame_set_id (cache, outer_frame_id);
 }
   else



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-08-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 30 07:55:44 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc-nat.c

Log Message:
Cleanup the confusion with getting the pid of a sparc debugged process.
If the comments were correct, then this should be factored out to the
OS-specific native code, and the general code should remain sane.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/sparc-nat.c

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/sparc-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.6 src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.7
--- src/external/gpl3/gdb/dist/gdb/sparc-nat.c:1.6	Tue Jul 15 13:35:54 2014
+++ src/external/gpl3/gdb/dist/gdb/sparc-nat.c	Sat Aug 30 03:55:44 2014
@@ -142,22 +142,7 @@ sparc_fetch_inferior_registers (struct t
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int pid;
 
-  /* NOTE: cagney/2002-12-03: This code assumes that the currently
- selected light weight processes' registers can be written
- directly into the selected thread's register cache.  This works
- fine when given an 1:1 LWP:thread model (such as found on
- GNU/Linux) but will, likely, have problems when used on an N:1
- (userland threads) or N:M (userland multiple LWP) model.  In the
- case of the latter two, the LWP's registers do not necessarily
- belong to the selected thread (the LWP could be in the middle of
- executing the thread switch code).
-
- These functions should instead be paramaterized with an explicit
- object (struct regcache, struct thread_info?) into which the LWPs
- registers can be written.  */
-  pid = ptid_get_lwp (inferior_ptid);
-  if (pid == 0)
-pid = ptid_get_pid (inferior_ptid);
+  pid = ptid_get_pid (inferior_ptid);
 
   if (regnum == SPARC_G0_REGNUM)
 {
@@ -197,11 +182,7 @@ sparc_store_inferior_registers (struct t
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int pid;
 
-  /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers
- about threaded assumptions.  */
-  pid = ptid_get_lwp (inferior_ptid);
-  if (pid == 0)
-pid = ptid_get_pid (inferior_ptid);
+  pid = ptid_get_pid (inferior_ptid);
 
   if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum))
 {
@@ -282,9 +263,7 @@ sparc_xfer_wcookie (struct target_ops *o
   {
 int pid;
 
-pid = ptid_get_lwp (inferior_ptid);
-if (pid == 0)
-  pid = ptid_get_pid (inferior_ptid);
+pid = ptid_get_pid (inferior_ptid);
 
 /* Sanity check.  The proper type for a cookie is register_t, but
we can't assume that this type exists on all systems supported



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 16 11:48:37 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
PR/30756: Thomas Klausner: Deactivate threads after detaching the main thread.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.20 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.21
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.20	Tue Jul 15 13:35:39 2014
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Wed Jul 16 07:48:37 2014
@@ -196,7 +196,6 @@ static void
 nbsd_thread_detach (struct target_ops *ops, const char *args, int from_tty)
 {
   struct target_ops *beneath = find_target_beneath (ops);
-  nbsd_thread_deactivate ();
   unpush_target (ops);
   /* Ordinarily, gdb caches solib information, but this means that it
  won't call the new_obfile hook on a reattach. Clear the symbol file
@@ -204,6 +203,7 @@ nbsd_thread_detach (struct target_ops *o
   clear_solib();
   symbol_file_clear(0);
   beneath-to_detach (beneath, args, from_tty);
+  nbsd_thread_deactivate ();
 }
 
 static int nsusp;



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-07-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 15 17:35:39 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
replace the old macros with the function names like the rest of the code did.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.19 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.20
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.19	Sun Jun 22 19:52:58 2014
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Tue Jul 15 13:35:39 2014
@@ -83,12 +83,6 @@ struct td_proc_callbacks_t nbsd_thread_c
 static ptid_t find_active_thread (void);
 static void nbsd_find_new_threads (struct target_ops *);
 
-#define GET_PID(ptid)		ptid_get_pid (ptid)
-#define GET_LWP(ptid)		ptid_get_lwp (ptid)
-
-#define IS_LWP(ptid)		(GET_LWP (ptid) != 0)
-
-#define BUILD_LWP(lwp, ptid)	ptid_build (GET_PID(ptid), (lwp), 0)
 
 static td_proc_t *main_ta;
 
@@ -143,7 +137,8 @@ nbsd_thread_activate (void)
   nbsd_thread_active = 1;
   main_ptid = inferior_ptid;
   cached_thread = minus_one_ptid;
-  thread_change_ptid(inferior_ptid, BUILD_LWP(1, inferior_ptid));
+  thread_change_ptid(inferior_ptid,
+  ptid_build (ptid_get_pid (inferior_ptid), 1, 0));
   nbsd_find_new_threads (NULL);
   inferior_ptid = find_active_thread ();
 }
@@ -280,10 +275,11 @@ find_active_thread (void)
   if (target_has_execution)
 {
   pl.pl_lwpid = 0;
-  val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl));
+  val = ptrace (PT_LWPINFO, ptid_get_pid(inferior_ptid), (void *)pl, sizeof(pl));
   while ((val != -1)  (pl.pl_lwpid != 0) 
-	 (pl.pl_event != PL_EVENT_SIGNAL))
-	val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl));
+	 (pl.pl_event != PL_EVENT_SIGNAL)) {
+	val = ptrace (PT_LWPINFO, ptid_get_pid(inferior_ptid), (void *)pl, sizeof(pl));
+}
   if (pl.pl_lwpid == 0)
 	/* found no active thread, stay with current */
 	pl.pl_lwpid = inferior_ptid.lwp;
@@ -293,7 +289,7 @@ find_active_thread (void)
   return inferior_ptid;
 }
 
-  cached_thread = BUILD_LWP (pl.pl_lwpid, main_ptid);
+  cached_thread = ptid_build (ptid_get_pid (main_ptid), pl.pl_lwpid, 0);
   return cached_thread;
 }
 
@@ -341,8 +337,8 @@ nbsd_thread_fetch_registers (struct targ
 
   if (!target_has_execution)
 {
-  inferior_ptid = pid_to_ptid ((GET_LWP (inferior_ptid)  16) | 
-GET_PID (inferior_ptid));
+  inferior_ptid = pid_to_ptid ((ptid_get_lwp (inferior_ptid)  16) | 
+ptid_get_pid (inferior_ptid));
 }
 beneath-to_fetch_registers (beneath, cache, regno);
   
@@ -418,11 +414,11 @@ nbsd_pid_to_str (struct target_ops *ops,
   td_thread_t *th;
   char name[32];
 
-  if ((GET_LWP(ptid) == 0)  
+  if ((ptid_get_lwp(ptid) == 0)  
   (nbsd_thread_active == 0))
-sprintf (buf, process %d, GET_PID (ptid));
+sprintf (buf, process %d, ptid_get_pid (ptid));
   else
-sprintf (buf, LWP %ld, GET_LWP (ptid));
+sprintf (buf, LWP %ld, ptid_get_lwp (ptid));
 
   return buf;
 }
@@ -440,7 +436,7 @@ nbsd_add_to_thread_list (bfd *abfd, asec
 
   regval = atoi (bfd_section_name (abfd, asect) + 5);
 
-  add_thread (BUILD_LWP(regval, main_ptid));
+  add_thread (ptid_build (ptid_get_pid (main_ptid), regval, 0));
 }
 #endif
 
@@ -505,11 +501,11 @@ nbsd_thread_alive (struct target_ops *op
 
   if (nbsd_thread_active)
 {
-  if (IS_LWP (ptid))
+  if (ptid_lwp_p (ptid))
 	{
 	  struct ptrace_lwpinfo pl;
-	  pl.pl_lwpid = GET_LWP (ptid);
-	  val = ptrace (PT_LWPINFO, GET_PID (ptid), (void *)pl, sizeof(pl));
+	  pl.pl_lwpid = ptid_get_lwp (ptid);
+	  val = ptrace (PT_LWPINFO, ptid_get_pid (ptid), (void *)pl, sizeof(pl));
 	  if (val == -1)
 	val = 0;
 	  else
@@ -553,13 +549,13 @@ nbsd_find_new_threads (struct target_ops
 {
   struct ptrace_lwpinfo pl;
   pl.pl_lwpid = 0;
-  retval = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl));
+  retval = ptrace (PT_LWPINFO, ptid_get_pid(inferior_ptid), (void *)pl, sizeof(pl));
   while ((retval != -1)  pl.pl_lwpid != 0)
 	{
-	  ptid = BUILD_LWP (pl.pl_lwpid, main_ptid);
+	  ptid = ptid_build (ptid_get_pid (main_ptid), pl.pl_lwpid, 0);
 	  if (!in_thread_list (ptid))
 	add_thread (ptid);
-	  retval = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)pl, sizeof(pl));
+	  retval = ptrace (PT_LWPINFO, ptid_get_pid(inferior_ptid), (void *)pl, sizeof(pl));
 	}
 }
 }
@@ -668,7 +664,7 @@ nbsd_thread_proc_getregs (void *arg, int
 {
   /* Fetching registers from a live process requires that
 	 inferior_ptid is a LWP value rather than a thread value. */
-  inferior_ptid = BUILD_LWP (lwp, main_ptid);
+  inferior_ptid = 

CVS commit: src/external/gpl3/gdb/dist/gdb

2014-07-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 15 17:35:54 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64bsd-nat.c armnbsd-nat.c
hppanbsd-nat.c i386bsd-nat.c m68kbsd-nat.c mipsnbsd-nat.c
ppcnbsd-nat.c shnbsd-nat.c sparc-nat.c vaxbsd-nat.c

Log Message:
PR/47430: Fix debugging threads again, GETTID == ptid_get_lwp for us, not
ptid_get_tid :-)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/sparc-nat.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c

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/amd64bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c:1.5 src/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c:1.6
--- src/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c:1.5	Sun Jun 22 19:52:57 2014
+++ src/external/gpl3/gdb/dist/gdb/amd64bsd-nat.c	Tue Jul 15 13:35:54 2014
@@ -47,7 +47,7 @@ amd64bsd_fetch_inferior_registers (struc
   struct reg regs;
 
   if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) regs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) regs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't get registers));
 
   amd64_supply_native_gregset (regcache, regs, -1);
@@ -60,7 +60,7 @@ amd64bsd_fetch_inferior_registers (struc
   struct fpreg fpregs;
 
   if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't get floating point status));
 
   amd64_supply_fxsave (regcache, -1, fpregs);
@@ -81,13 +81,13 @@ amd64bsd_store_inferior_registers (struc
   struct reg regs;
 
   if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-  (PTRACE_TYPE_ARG3) regs, ptid_get_tid (inferior_ptid)) == -1)
+  (PTRACE_TYPE_ARG3) regs, ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_(Couldn't get registers));
 
   amd64_collect_native_gregset (regcache, regs, regnum);
 
   if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
-	  (PTRACE_TYPE_ARG3) regs, ptid_get_tid (inferior_ptid)) == -1)
+	  (PTRACE_TYPE_ARG3) regs, ptid_get_lwp (inferior_ptid)) == -1)
 perror_with_name (_(Couldn't write registers));
 
   if (regnum != -1)
@@ -99,13 +99,13 @@ amd64bsd_store_inferior_registers (struc
   struct fpreg fpregs;
 
   if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't get floating point status));
 
   amd64_collect_fxsave (regcache, regnum, fpregs);
 
   if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't write floating point status));
 }
 }
Index: src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.5 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.6
--- src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.5	Sun Jun 22 19:52:58 2014
+++ src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c	Tue Jul 15 13:35:54 2014
@@ -178,7 +178,7 @@ hppanbsd_fetch_registers (struct target_
   struct reg regs;
 
   if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) regs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) regs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't get registers));
 
   hppanbsd_supply_gregset (regcache, regs);
@@ -189,7 +189,7 @@ hppanbsd_fetch_registers (struct target_
   struct fpreg fpregs;
 
   if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
-		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_tid (inferior_ptid)) == -1)
+		  (PTRACE_TYPE_ARG3) fpregs, ptid_get_lwp (inferior_ptid)) == -1)
 	perror_with_name (_(Couldn't get floating point status));
 
   hppanbsd_supply_fpregset (regcache, fpregs);
@@ -208,13 +208,13 @@ hppanbsd_store_registers (struct target_
   struct reg regs;
 
   if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
-  (PTRACE_TYPE_ARG3) regs, ptid_get_tid 

CVS commit: src/external/gpl3/gdb/dist/gdb

2014-03-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Mar 18 08:40:05 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: armnbsd-nat.c

Log Message:
In fill_fpregset correct the address to grab the register from


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c

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/armnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.8	Thu Oct  3 18:30:44 2013
+++ src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c	Tue Mar 18 08:40:05 2014
@@ -177,7 +177,7 @@ fill_fpregset (const struct regcache *re
 }
   else if (regno = ARM_D0_REGNUM  regno = ARM_D0_REGNUM + 15)
 regcache_raw_collect(regcache, regno,
-			 (char *) vfpregsetp-fpr_vfp.vfp_regs + 8*regno);
+			 (char *) vfpregsetp-fpr_vfp.vfp_regs + 8 * (regno - ARM_D0_REGNUM));
 
   if (ARM_FPSCR_REGNUM == regno || -1 == regno)
 regcache_raw_collect (regcache, ARM_FPSCR_REGNUM,
@@ -308,7 +308,7 @@ fetch_fp_regs (struct regcache *regcache
 
   if (ret  0)
 {
-  warning (_(unable to fetch general registers));
+  warning (_(unable to fetch floating-point registers));
   return;
 }
 



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-03-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 23:08:58 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure.tgt

Log Message:
Don't include corelow.o and solib.o the {powerpc,sh3}*-netbsd cases since
those are provided by Makefile.in.  This allows MKCROSSGDB to build again
for powerpc.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/configure.tgt

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/configure.tgt
diff -u src/external/gpl3/gdb/dist/gdb/configure.tgt:1.4 src/external/gpl3/gdb/dist/gdb/configure.tgt:1.5
--- src/external/gpl3/gdb/dist/gdb/configure.tgt:1.4	Thu Oct  3 18:30:44 2013
+++ src/external/gpl3/gdb/dist/gdb/configure.tgt	Wed Mar  5 23:08:58 2014
@@ -405,8 +405,8 @@ powerpc*-*-freebsd*)
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu | powerpc64-*-netbsd*)
 	# Target: NetBSD/powerpc
 	gdb_target_obs=rs6000-tdep.o ppcnbsd-tdep.o ppc-sysv-tdep.o \
-			solib.o solib-svr4.o solib-spu.o spu-multiarch.o \
-			corelow.o symfile-mem.o nbsd-tdep.o
+			solib-svr4.o solib-spu.o spu-multiarch.o \
+			symfile-mem.o nbsd-tdep.o
 			ravenscar-thread.o ppc-ravenscar-thread.o
 	gdb_sim=../sim/ppc/libsim.a
 	;;
@@ -486,7 +486,7 @@ sh*-*-linux*)
 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
 	# Target: NetBSD/sh
 	gdb_target_obs=sh-tdep.o sh64-tdep.o shnbsd-tdep.o \
-			nbsd-tdep.o corelow.o solib.o solib-svr4.o
+			nbsd-tdep.o solib-svr4.o
 	gdb_sim=../sim/sh/libsim.a
 	;;
 sh*-*-openbsd*)



  1   2   >