CVS commit: src/gnu/dist/gdb6/gdb

2012-03-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Mar  2 16:38:21 UTC 2012

Modified Files:
src/gnu/dist/gdb6/gdb: mips-tdep.h mipsnbsd-nat.c
src/gnu/dist/gdb6/gdb/config/mips: nbsd.mh

Log Message:
target kvm support for mips


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/mips-tdep.h
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/config/mips/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/gnu/dist/gdb6/gdb/mips-tdep.h
diff -u src/gnu/dist/gdb6/gdb/mips-tdep.h:1.1.1.2 src/gnu/dist/gdb6/gdb/mips-tdep.h:1.2
--- src/gnu/dist/gdb6/gdb/mips-tdep.h:1.1.1.2	Sun Jul  2 20:14:39 2006
+++ src/gnu/dist/gdb6/gdb/mips-tdep.h	Fri Mar  2 16:38:20 2012
@@ -74,8 +74,19 @@ enum
   MIPS_AT_REGNUM = 1,
   MIPS_V0_REGNUM = 2,		/* Function integer return value.  */
   MIPS_A0_REGNUM = 4,		/* Loc of first arg during a subr call */
+  MIPS_S0_REGNUM = 16,
+  MIPS_S1_REGNUM = 17,
+  MIPS_S2_REGNUM = 18,
+  MIPS_S3_REGNUM = 19,
+  MIPS_S4_REGNUM = 20,
+  MIPS_S5_REGNUM = 21,
+  MIPS_S6_REGNUM = 22,
+  MIPS_S7_REGNUM = 23,
+  MIPS_T8_REGNUM = 24,
   MIPS_T9_REGNUM = 25,		/* Contains address of callee in PIC.  */
+  MIPS_GP_REGNUM = 28,
   MIPS_SP_REGNUM = 29,
+  MIPS_S8_REGNUM = 30,
   MIPS_RA_REGNUM = 31,
   MIPS_PS_REGNUM = 32,		/* Contains processor status.  */
   MIPS_EMBED_LO_REGNUM = 33,

Index: src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c
diff -u src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c:1.2 src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c:1.3
--- src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c:1.2	Wed Dec  6 18:25:29 2006
+++ src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c	Fri Mar  2 16:38:20 2012
@@ -32,6 +32,9 @@
 #include mips-tdep.h
 #include mipsnbsd-tdep.h
 #include inf-ptrace.h
+#include bsd-kvm.h
+
+#include machine/pcb.h
 
 /* Determine if PT_GETREGS fetches this register.  */
 static int
@@ -104,6 +107,43 @@ mipsnbsd_store_inferior_registers (int r
 	perror_with_name (_(Couldn't write floating point status));
 }
 }
+
+static int mipsnbsd_supply_pcb (struct regcache *, struct pcb *);
+
+static int
+mipsnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct label_t sf;
+
+  sf = pcb-pcb_context;
+
+  /* really should test for n{32,64} abi for this register
+ unless this is purely the n ABI */
+
+  regcache_raw_supply (regcache, MIPS_S0_REGNUM, sf.val[_L_S0]);
+  regcache_raw_supply (regcache, MIPS_S1_REGNUM, sf.val[_L_S1]);
+  regcache_raw_supply (regcache, MIPS_S2_REGNUM, sf.val[_L_S2]);
+  regcache_raw_supply (regcache, MIPS_S3_REGNUM, sf.val[_L_S3]);
+  regcache_raw_supply (regcache, MIPS_S4_REGNUM, sf.val[_L_S4]);
+  regcache_raw_supply (regcache, MIPS_S5_REGNUM, sf.val[_L_S5]);
+  regcache_raw_supply (regcache, MIPS_S6_REGNUM, sf.val[_L_S6]);
+  regcache_raw_supply (regcache, MIPS_S7_REGNUM, sf.val[_L_S7]);
+
+  regcache_raw_supply (regcache, MIPS_S8_REGNUM, sf.val[_L_S8]);
+
+  regcache_raw_supply (regcache, MIPS_T8_REGNUM, sf.val[_L_T8]);
+
+  regcache_raw_supply (regcache, MIPS_GP_REGNUM, sf.val[_L_GP]);
+
+  regcache_raw_supply (regcache, MIPS_SP_REGNUM, sf.val[_L_SP]);
+  regcache_raw_supply (regcache, MIPS_RA_REGNUM, sf.val[_L_RA]);
+  regcache_raw_supply (regcache, MIPS_PS_REGNUM, sf.val[_L_SR]);
+
+  /* provide the return address of the savectx as the current pc */
+  regcache_raw_supply (regcache, MIPS_EMBED_PC_REGNUM, sf.val[_L_RA]);
+
+  return 0;
+}
 
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
@@ -120,4 +160,7 @@ _initialize_mipsnbsd_nat (void)
   t-to_pid_to_exec_file = nbsd_pid_to_exec_file;
 
   add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (mipsnbsd_supply_pcb);
 }

Index: src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh
diff -u src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh:1.2 src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh:1.3
--- src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh:1.2	Wed Dec  6 18:25:29 2006
+++ src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh	Fri Mar  2 16:38:21 2012
@@ -1,2 +1,3 @@
 # Host: NetBSD/mips
-NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o mipsnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o mipsnbsd-nat.o bsd-kvm.o
+LOADLIBS= -lkvm



CVS commit: src/gnu/dist/gdb6/gdb

2012-03-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Mar  2 16:38:21 UTC 2012

Modified Files:
src/gnu/dist/gdb6/gdb: mips-tdep.h mipsnbsd-nat.c
src/gnu/dist/gdb6/gdb/config/mips: nbsd.mh

Log Message:
target kvm support for mips


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/mips-tdep.h
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/mipsnbsd-nat.c
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/config/mips/nbsd.mh

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 11 18:47:01 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: breakpoint.c

Log Message:
replace (CORE_ADDR) (uintptr_t) NULL by a simple 0 - avoids the dance
with HAVE_STDINT_H and fixes the tool build for me.
Idea from dsl, OK: mrg.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/breakpoint.c

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

Modified files:

Index: src/gnu/dist/gdb6/gdb/breakpoint.c
diff -u src/gnu/dist/gdb6/gdb/breakpoint.c:1.2 src/gnu/dist/gdb6/gdb/breakpoint.c:1.3
--- src/gnu/dist/gdb6/gdb/breakpoint.c:1.2	Sun Jul  3 15:26:06 2011
+++ src/gnu/dist/gdb6/gdb/breakpoint.c	Mon Jul 11 18:47:01 2011
@@ -1327,7 +1327,7 @@
 	(b-type == bp_catch_vfork) ||
 	(b-type == bp_catch_fork))
   {
-	b-loc-address = (CORE_ADDR) (uintptr_t) NULL;
+	b-loc-address = 0;
 	continue;
   }
 
@@ -1380,7 +1380,7 @@
unnecessary.  A call to breakpoint_re_set_one always recomputes
the breakpoint's address from scratch, or deletes it if it can't.
So I think this assignment could be deleted without effect.  */
-b-loc-address = (CORE_ADDR) (uintptr_t) NULL;
+b-loc-address = 0;
   }
   /* FIXME what about longjmp breakpoints?  Re-create them here?  */
   create_overlay_event_breakpoint (_ovly_debug_event);



CVS commit: src/gnu/dist/gdb6/gdb

2011-07-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul  3 15:26:06 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: breakpoint.c

Log Message:
apply some (uintptr_t) between pointers, ints and other casts.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/breakpoint.c

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

Modified files:

Index: src/gnu/dist/gdb6/gdb/breakpoint.c
diff -u src/gnu/dist/gdb6/gdb/breakpoint.c:1.1.1.2 src/gnu/dist/gdb6/gdb/breakpoint.c:1.2
--- src/gnu/dist/gdb6/gdb/breakpoint.c:1.1.1.2	Sun Jul  2 20:13:24 2006
+++ src/gnu/dist/gdb6/gdb/breakpoint.c	Sun Jul  3 15:26:06 2011
@@ -1327,7 +1327,7 @@
 	(b-type == bp_catch_vfork) ||
 	(b-type == bp_catch_fork))
   {
-	b-loc-address = (CORE_ADDR) NULL;
+	b-loc-address = (CORE_ADDR) (uintptr_t) NULL;
 	continue;
   }
 
@@ -1380,7 +1380,7 @@
unnecessary.  A call to breakpoint_re_set_one always recomputes
the breakpoint's address from scratch, or deletes it if it can't.
So I think this assignment could be deleted without effect.  */
-b-loc-address = (CORE_ADDR) NULL;
+b-loc-address = (CORE_ADDR) (uintptr_t) NULL;
   }
   /* FIXME what about longjmp breakpoints?  Re-create them here?  */
   create_overlay_event_breakpoint (_ovly_debug_event);



CVS commit: src/gnu/dist/gdb6/gdb

2011-07-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul  3 15:26:06 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: breakpoint.c

Log Message:
apply some (uintptr_t) between pointers, ints and other casts.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/breakpoint.c

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



CVS commit: src/gnu/dist/gdb6/gdb/tui

2011-05-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May 23 22:30:14 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb/tui: tui-stack.c

Log Message:
Fix cast


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/tui/tui-stack.c

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-05-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May 15 16:16:08 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: amd64nbsd-nat.c amd64nbsd-tdep.c

Log Message:
include headers to get proper prototypes visible.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c \
src/gnu/dist/gdb6/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/gnu/dist/gdb6/gdb/amd64nbsd-nat.c
diff -u src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c:1.5 src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c:1.6
--- src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c:1.5	Fri May 25 11:14:21 2007
+++ src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c	Sun May 15 12:16:08 2011
@@ -27,6 +27,9 @@
 #include nbsd-nat.h
 #include amd64-tdep.h
 #include amd64-nat.h
+#include regcache.h
+#include gdbcore.h
+#include bsd-kvm.h
 
 #include machine/frame.h
 #include machine/pcb.h
Index: src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c
diff -u src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c:1.5 src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c:1.6
--- src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c:1.5	Mon Feb 22 03:19:38 2010
+++ src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c	Sun May 15 12:16:08 2011
@@ -27,6 +27,7 @@
 #include symtab.h
 
 #include gdb_assert.h
+#include gdb_string.h
 
 #include amd64-tdep.h
 #include nbsd-tdep.h



CVS commit: src/gnu/dist/gdb6/gdb

2011-05-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May 15 16:16:08 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: amd64nbsd-nat.c amd64nbsd-tdep.c

Log Message:
include headers to get proper prototypes visible.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gdb6/gdb/amd64nbsd-nat.c \
src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 10 10:06:33 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: hppa-tdep.c

Log Message:
Rename some registers to reflect reality.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/hppa-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/gnu/dist/gdb6/gdb/hppa-tdep.c
diff -u src/gnu/dist/gdb6/gdb/hppa-tdep.c:1.1.1.2 src/gnu/dist/gdb6/gdb/hppa-tdep.c:1.2
--- src/gnu/dist/gdb6/gdb/hppa-tdep.c:1.1.1.2	Sun Jul  2 20:14:10 2006
+++ src/gnu/dist/gdb6/gdb/hppa-tdep.c	Thu Mar 10 10:06:33 2011
@@ -603,7 +603,7 @@
 sr5,sr6, sr7,cr0,
 cr8,cr9, ccr,cr12,
 cr13,   cr24,cr25,   cr26,
-mpsfu_high,mpsfu_low,mpsfu_ovflo,pad,
+cr27,   cr28,cr29,   cr30,
 fpsr,fpe1,   fpe2,   fpe3,
 fpe4,   fpe5,fpe6,   fpe7,
 fr4, fr4R,   fr5,fr5R,



CVS commit: src/gnu/dist/gdb6/gdb

2011-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 10 10:06:33 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: hppa-tdep.c

Log Message:
Rename some registers to reflect reality.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/hppa-tdep.c

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar  3 09:43:27 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: hppanbsd-tdep.c

Log Message:
Provide more regsiters including CR27.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/gnu/dist/gdb6/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/gnu/dist/gdb6/gdb/hppanbsd-tdep.c
diff -u src/gnu/dist/gdb6/gdb/hppanbsd-tdep.c:1.1 src/gnu/dist/gdb6/gdb/hppanbsd-tdep.c:1.2
--- src/gnu/dist/gdb6/gdb/hppanbsd-tdep.c:1.1	Thu Jan 10 21:43:57 2008
+++ src/gnu/dist/gdb6/gdb/hppanbsd-tdep.c	Thu Mar  3 09:43:27 2011
@@ -68,6 +68,19 @@
   38 * 4,	/* sr1 */
   39 * 4,	/* sr2 */
   40 * 4,	/* sr3 */
+  -1,		/* 48 */
+  -1,		/* 49 */
+  -1,		/* 50 */
+  -1,		/* 51 */
+  -1,		/* 52 */
+  -1,		/* 53 */
+  -1,		/* 54 */
+  -1,		/* 55 */
+  -1,		/* 56 */
+  -1,		/* 57 CR24 */
+  -1,		/* 58 CR25 */
+  -1,		/* 59 CR26 */
+  43 * 4,	/* HPPA_CR27_REGNUM */
 
   /* more tbd */
 };
@@ -141,7 +154,7 @@
 /* Core file support.  */
 
 /* Sizeof `struct reg' in machine/reg.h.  */
-#define HPPANBSD_SIZEOF_GREGS	(44 * 4)
+#define HPPANBSD_SIZEOF_GREGS	(46 * 4)
 
 static int hppanbsd_reg_offset[] =
 {
@@ -165,6 +178,25 @@
   -1,		/* HPPA_ISR_REGNUM */
   -1,		/* HPPA_IOR_REGNUM */
   0 * 4,	/* HPPA_IPSW_REGNUM */
+  -1,		/* spare? */
+  41 * 4,	/* HPPA_SR4_REGNUM */
+  37 * 4,	/* sr0 */
+  38 * 4,	/* sr1 */
+  39 * 4,	/* sr2 */
+  40 * 4,	/* sr3 */
+  -1,		/* 48 */
+  -1,		/* 49 */
+  -1,		/* 50 */
+  -1,		/* 51 */
+  -1,		/* 52 */
+  -1,		/* 53 */
+  -1,		/* 54 */
+  -1,		/* 55 */
+  -1,		/* 56 */
+  -1,		/* 57 */
+  -1,		/* 58 */
+  -1,		/* 59 */
+  46 * 4,	/* HPPA_CR27_REGNUM */
 };
 
 /* Supply register REGNUM from the buffer specified by GREGS and LEN



CVS commit: src/gnu/dist/gdb6/gdb

2011-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar  3 09:43:27 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: hppanbsd-tdep.c

Log Message:
Provide more regsiters including CR27.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/gnu/dist/gdb6/gdb/hppanbsd-tdep.c

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-02-03 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Feb  4 00:05:29 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: shnbsd-tdep.c

Log Message:
Branch with delay slot executes delay slot even if branch is not
taken, so adjust next_pc logic accordingly.  Fixes SIGILL
(breakpoint's trapa causes an illegal slot instruction exception)
when stepping through such branches.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gdb6/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/gnu/dist/gdb6/gdb/shnbsd-tdep.c
diff -u src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.6
--- src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5	Mon Oct 27 00:33:19 2008
+++ src/gnu/dist/gdb6/gdb/shnbsd-tdep.c	Fri Feb  4 00:05:29 2011
@@ -286,14 +286,14 @@
 {
   sr = read_register (SR_REGNUM);
 
+  delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
   if (!CONDITIONAL_BRANCH_TAKEN_P(insn, sr))
-	next_pc = pc + 2;
+	next_pc = pc + (delay_slot ? 4 : 2);
   else
 	{
 	  displacement = shnbsd_displacement_8 (insn);
 
 	  next_pc = pc + 4 + (displacement  1);
-	  delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
 	}
 }
 



CVS commit: src/gnu/dist/gdb6/gdb

2011-02-03 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Feb  4 00:05:29 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: shnbsd-tdep.c

Log Message:
Branch with delay slot executes delay slot even if branch is not
taken, so adjust next_pc logic accordingly.  Fixes SIGILL
(breakpoint's trapa causes an illegal slot instruction exception)
when stepping through such branches.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c

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



CVS commit: src/gnu/dist/gdb6/gdb

2011-01-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 18 01:28:19 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: ppcnbsd-nat.c

Log Message:
Change to reflect switchframe/callframe changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/ppcnbsd-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/gnu/dist/gdb6/gdb/ppcnbsd-nat.c
diff -u src/gnu/dist/gdb6/gdb/ppcnbsd-nat.c:1.2 src/gnu/dist/gdb6/gdb/ppcnbsd-nat.c:1.3
--- src/gnu/dist/gdb6/gdb/ppcnbsd-nat.c:1.2	Wed Dec  6 18:25:29 2006
+++ src/gnu/dist/gdb6/gdb/ppcnbsd-nat.c	Tue Jan 18 01:28:19 2011
@@ -157,20 +157,20 @@
 return 0;
 
   read_memory (pcb-pcb_sp, (gdb_byte *)sf, sizeof sf);
-  regcache_raw_supply (regcache, tdep-ppc_cr_regnum, sf.cr);
-  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 2, sf.fixreg2);
+  regcache_raw_supply (regcache, tdep-ppc_cr_regnum, sf.sf_cr);
+  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 2, sf.sf_fixreg2);
   for (i = 0 ; i  19 ; i++)
 regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 13 + i,
-			 sf.fixreg[i]);
+			 sf.sf_fixreg[i]);
 
-  read_memory(sf.sp, (gdb_byte *)cf, sizeof(cf));
-  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 30, cf.r30);
-  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 31, cf.r31);
-  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 1, cf.sp);
-
-  read_memory(cf.sp, (gdb_byte *)cf, sizeof(cf));
-  regcache_raw_supply (regcache, tdep-ppc_lr_regnum, cf.lr);
-  regcache_raw_supply (regcache, PC_REGNUM, cf.lr);
+  read_memory(sf.sf_sp, (gdb_byte *)cf, sizeof(cf));
+  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 30, cf.cf_r30);
+  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 31, cf.cf_r31);
+  regcache_raw_supply (regcache, tdep-ppc_gp0_regnum + 1, cf.cf_sp);
+
+  read_memory(cf.cf_sp, (gdb_byte *)cf, sizeof(cf));
+  regcache_raw_supply (regcache, tdep-ppc_lr_regnum, cf.cf_lr);
+  regcache_raw_supply (regcache, PC_REGNUM, cf.cf_lr);
 
   return 1;
 }



CVS commit: src/gnu/dist/gdb6/gdb

2011-01-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 18 01:28:19 UTC 2011

Modified Files:
src/gnu/dist/gdb6/gdb: ppcnbsd-nat.c

Log Message:
Change to reflect switchframe/callframe changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/ppcnbsd-nat.c

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



CVS commit: src/gnu/dist/gdb6/gdb/config/i386

2010-12-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Dec 24 14:46:03 UTC 2010

Modified Files:
src/gnu/dist/gdb6/gdb/config/i386: nbsd64.mt

Log Message:
Add support for 32bit (i386) binaries on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt

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

Modified files:

Index: src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt
diff -u src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt:1.1.1.1 src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt:1.2
--- src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt:1.1.1.1	Mon May 15 14:12:03 2006
+++ src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt	Fri Dec 24 14:46:02 2010
@@ -1,3 +1,4 @@
 # Target: NetBSD/amd64
-TDEPFILES= amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o nbsd-tdep.o \
+TDEPFILES= amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
+	i386bsd-tdep.o i386nbsd-tdep.o nbsd-tdep.o \
 	corelow.o solib.o solib-svr4.o



CVS commit: src/gnu/dist/gdb6/gdb/config/i386

2010-12-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Dec 24 14:46:03 UTC 2010

Modified Files:
src/gnu/dist/gdb6/gdb/config/i386: nbsd64.mt

Log Message:
Add support for 32bit (i386) binaries on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gdb6/gdb/config/i386/nbsd64.mt

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



CVS commit: src/gnu/dist/gdb6/gdb

2010-08-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Aug 20 15:34:14 UTC 2010

Modified Files:
src/gnu/dist/gdb6/gdb: inf-ptrace.c

Log Message:
PT_STEP historically ignores the argument. Indepent of whether this
behavior will be restored, pass down 0 for now to unbreak single
stepping after the thread changes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/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/gnu/dist/gdb6/gdb/inf-ptrace.c
diff -u src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.1.1.2 src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.2
--- src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.1.1.2	Sun Jul  2 20:14:18 2006
+++ src/gnu/dist/gdb6/gdb/inf-ptrace.c	Fri Aug 20 15:34:13 2010
@@ -317,7 +317,7 @@
 inf_ptrace_resume (ptid_t ptid, int step, enum target_signal signal)
 {
   pid_t pid = ptid_get_pid (ptid);
-  int request = PT_CONTINUE;
+  int request = PT_CONTINUE, sig = target_signal_to_host (signal);
 
   if (pid == -1)
 /* Resume all threads.  Traditionally ptrace() only supports
@@ -332,13 +332,14 @@
  all possible successor instructions), so we don't have to
  worry about that here.  */
   request = PT_STEP;
+  sig = 0;
 }
 
   /* 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;
-  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, target_signal_to_host (signal));
+  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, sig);
   if (errno != 0)
 perror_with_name ((ptrace));
 }



CVS commit: src/gnu/dist/gdb6/gdb

2010-02-22 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Mon Feb 22 08:19:38 UTC 2010

Modified Files:
src/gnu/dist/gdb6/gdb: amd64nbsd-tdep.c

Log Message:
Fix check for old trap frame layout.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c

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



Re: CVS commit: src/gnu/dist/gdb6/gdb

2009-11-28 Thread David Laight
On Sat, Nov 28, 2009 at 08:29:43AM +0900, enami tsugutomo wrote:
   i wonder if we can re-add proc0paddr, defined to be = lwp0.l_addr
   at some point in main, to help this work with older gdb?
   
   this seems like a worth-while change since it's part of bsd-kvm.c.
  
  would need to be in md code since L_ADDR needs to come from assym.h.
  
  .globl  _C_LABEL(proc0paddr)
  _C_LABEL(proc0paddr) = _C_LABEL(lwp0) + L_ADDR
 
 Is initializing it in main() too late?  I mean putting proc0paddr =
 lwp_getpcb(lwp0) at the beginning of main().

The above is defining a global symbol that referes to the middle of
a struct, not setting a memory location to the address of the it.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/gnu/dist/gdb6/gdb

2009-11-28 Thread enami tsugutomo
 The above is defining a global symbol that referes to the middle of
 a struct, not setting a memory location to the address of the it.

Do you mean lwp0.l_addr may vary during execution?

enami.


Re: CVS commit: src/gnu/dist/gdb6/gdb

2009-11-27 Thread David Laight
On Fri, Nov 27, 2009 at 12:45:18AM -0800, Matt Thomas wrote:
 
  i wonder if we can re-add proc0paddr, defined to be = lwp0.l_addr
  at some point in main, to help this work with older gdb?
  
  this seems like a worth-while change since it's part of bsd-kvm.c.
 
 would need to be in md code since L_ADDR needs to come from assym.h.
 
   .globl  _C_LABEL(proc0paddr)
 _C_LABEL(proc0paddr) = _C_LABEL(lwp0) + L_ADDR

Actually I think it might be possibly to do it in a MI .c file!

Some __asm pattern being passed offsetof(struct lwp, l_addr) generating
a global symbol.
One of the forms for defining a symbol is MI.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/gnu/dist/gdb6/gdb

2009-11-26 Thread enami tsugutomo
 Module Name:  src
 Committed By: enami
 Date: Fri Nov 27 02:51:15 UTC 2009
 
 Modified Files:
   src/gnu/dist/gdb6/gdb: bsd-kvm.c
 
 Log Message:
 Lookup lwp0.l_addr instead of proc0paddr to locate PCB.

I wonder if it is better to keep proc0paddr in kernel as a pointer to
PCB rather than embedding struct offset in gdb binary.

enami.


re: CVS commit: src/gnu/dist/gdb6/gdb

2009-11-26 Thread matthew green

   Module Name: src
   Committed By:enami
   Date:Fri Nov 27 02:51:15 UTC 2009
   
   Modified Files:
src/gnu/dist/gdb6/gdb: bsd-kvm.c
   
   Log Message:
   Lookup lwp0.l_addr instead of proc0paddr to locate PCB.

hmmm..

i wonder if we can re-add proc0paddr, defined to be = lwp0.l_addr
at some point in main, to help this work with older gdb?

this seems like a worth-while change since it's part of bsd-kvm.c.


.mrg.


CVS commit: src/gnu/dist/gdb6/gdb

2009-11-26 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Fri Nov 27 02:51:15 UTC 2009

Modified Files:
src/gnu/dist/gdb6/gdb: bsd-kvm.c

Log Message:
Lookup lwp0.l_addr instead of proc0paddr to locate PCB.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gdb6/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/gnu/dist/gdb6/gdb/bsd-kvm.c
diff -u src/gnu/dist/gdb6/gdb/bsd-kvm.c:1.3 src/gnu/dist/gdb6/gdb/bsd-kvm.c:1.4
--- src/gnu/dist/gdb6/gdb/bsd-kvm.c:1.3	Sun Jul  2 21:04:40 2006
+++ src/gnu/dist/gdb6/gdb/bsd-kvm.c	Fri Nov 27 02:51:15 2009
@@ -211,6 +211,27 @@
   return;
 }
 
+#if 1 /* TODO: HAVE_STRUCT_LWP_L_ADDR */
+  memset (nl, 0, sizeof nl);
+  nl[0].n_name = _lwp0;
+
+  if (kvm_nlist (core_kd, nl) == -1)
+error ((%s), kvm_geterr (core_kd));
+
+  if (nl[0].n_value != 0)
+{
+  struct pcb *paddr;
+
+  /* Found lwp0.  */
+  nl[0].n_value += offsetof (struct lwp, l_addr);
+  if (kvm_read (core_kd, nl[0].n_value, paddr, sizeof paddr) == -1)
+	error ((%s), kvm_geterr (core_kd));
+
+  bsd_kvm_fetch_pcb (paddr);
+  return;
+}
+#endif
+
 #ifdef HAVE_STRUCT_THREAD_TD_PCB
   /* In FreeBSD kernels for 5.0-RELEASE and later, the PCB no longer
  lives in `struct proc' but in `struct thread'.  The `struct



CVS commit: src/gnu/dist/gdb6/gdb

2009-11-25 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Nov 26 06:34:22 UTC 2009

Modified Files:
src/gnu/dist/gdb6/gdb: sh-tdep.c

Log Message:
Don't build sh64 code even if BFD64 as suggested by uwe@ (privately).  We
don't need sh64 at all.  This fixes sh3 MKCROSSGDB=yes build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gdb6/gdb/sh-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/gnu/dist/gdb6/gdb/sh-tdep.c
diff -u src/gnu/dist/gdb6/gdb/sh-tdep.c:1.2 src/gnu/dist/gdb6/gdb/sh-tdep.c:1.3
--- src/gnu/dist/gdb6/gdb/sh-tdep.c:1.2	Sat Dec  2 01:13:53 2006
+++ src/gnu/dist/gdb6/gdb/sh-tdep.c	Thu Nov 26 06:34:22 2009
@@ -2486,11 +2486,13 @@
   break;
 
 #ifdef BFD64
+#if 0
 case bfd_mach_sh5:
   sh_show_regs = sh64_show_regs;
   /* SH5 is handled entirely in sh64-tdep.c */
   return sh64_gdbarch_init (info, arches);
 #endif
+#endif
 }
 
   /* If there is already a candidate, use it.  */



CVS commit: src/gnu/dist/gdb6/gdb

2009-07-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 13 08:35:24 UTC 2009

Modified Files:
src/gnu/dist/gdb6/gdb: i386-tdep.c

Log Message:
Remove incorrect semicolon at the end of an if-statement.

From OpenBSD via Henning Petersen in PR 41708.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/i386-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/gnu/dist/gdb6/gdb/i386-tdep.c
diff -u src/gnu/dist/gdb6/gdb/i386-tdep.c:1.1.1.2 src/gnu/dist/gdb6/gdb/i386-tdep.c:1.2
--- src/gnu/dist/gdb6/gdb/i386-tdep.c:1.1.1.2	Sun Jul  2 20:14:15 2006
+++ src/gnu/dist/gdb6/gdb/i386-tdep.c	Mon Jul 13 08:35:24 2009
@@ -874,7 +874,7 @@
 
   /* addl y,%ebx */
   if (delta  0  op == 0x81
-	   read_memory_unsigned_integer (pc + delta + 1, 1) == 0xc3);
+	   read_memory_unsigned_integer (pc + delta + 1, 1) == 0xc3)
 	{
 	  pc += delta + 6;
 	}