public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-12-04 17:45 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-12-04 17:45 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  74bf0b4382a473049c1e6807d58bf26435d6076d (commit)
       via  6329629fa73d626c5fffaab800f7fbb4a893f31c (commit)
      from  3ae096b75d439f4393d54301b710e59db13c0670 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 74bf0b4382a473049c1e6807d58bf26435d6076d
Merge: 6329629fa73d626c5fffaab800f7fbb4a893f31c 3ae096b75d439f4393d54301b710e59db13c0670
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Tue Dec 4 15:44:41 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 6329629fa73d626c5fffaab800f7fbb4a893f31c
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Tue Dec 4 13:19:34 2007 -0200

    Adding PowerPC support for tests.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/pkglibdir/ChangeLog    |    4 +
 frysk-core/frysk/pkglibdir/funit-regs.S |   77 ++++++++++++
 frysk-core/frysk/testbed/ChangeLog      |    6 +
 frysk-core/frysk/testbed/FryskAsm.java  |   21 ++++
 frysk-core/frysk/testbed/RegsCase.java  |  199 ++++++++++++++++++++++++++++++-
 5 files changed, 303 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index 856de0f..bef2604 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-04  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* funit-regs.S: add support to PowerPC32/64 to this test.
+ 
 2007-12-03  Stan Cox  <scox@redhat.com>
 
 	* gen-type-expect-tests.py (main): Emit one test per variable.
diff --git a/frysk-core/frysk/pkglibdir/funit-regs.S b/frysk-core/frysk/pkglibdir/funit-regs.S
index 50749f6..6bc5edb 100644
--- a/frysk-core/frysk/pkglibdir/funit-regs.S
+++ b/frysk-core/frysk/pkglibdir/funit-regs.S
@@ -1,6 +1,7 @@
 // This file is part of the program FRYSK.
 //
 // Copyright 2007 Red Hat Inc.
+// Copyright 2007 (C) IBM
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -86,6 +87,78 @@
         mov $0x3f22bc816a35f02d, %r14
         mov $0x46bf65d4d966290, %r15
 
+#elif defined __powerpc64__
+
+        LOAD_IMMED_WORD( 0, 0x0000000000000000) //This Reg is always Zero
+        LOAD_IMMED_WORD( 1, 0x514c159c25c27735)
+        LOAD_IMMED_WORD( 2, 0x674b6064cdf97685)
+        LOAD_IMMED_WORD( 3, 0x808ac01e8911f56c)
+        LOAD_IMMED_WORD( 4, 0xcf4362db3356a25a)
+        LOAD_IMMED_WORD( 5, 0xe356818815d30ae3)
+        LOAD_IMMED_WORD( 6, 0x34a847d84ac039eb)
+        LOAD_IMMED_WORD( 7, 0xa6c244ccfc672fd1)
+        LOAD_IMMED_WORD( 8, 0x4e857fa76fae4610)
+        LOAD_IMMED_WORD( 9, 0xfa6ecb942e56bdb1)
+        LOAD_IMMED_WORD(10, 0xce40dcae99e51340)
+        LOAD_IMMED_WORD(11, 0xd5e20897737372fa)
+        LOAD_IMMED_WORD(12, 0x44da7341c8169fcb)
+        LOAD_IMMED_WORD(13, 0xef908c0f5ceb230f)
+        LOAD_IMMED_WORD(14, 0xd6f64efaf644ba20)
+        LOAD_IMMED_WORD(15, 0xd5b5dd6910287bb3)
+        LOAD_IMMED_WORD(16, 0xce9381ebf6d51d50)
+        LOAD_IMMED_WORD(17, 0xb3d21c30af96757c)
+        LOAD_IMMED_WORD(18, 0x48ce58b2c1242f3)
+        LOAD_IMMED_WORD(19, 0x5031020316f4a712)
+        LOAD_IMMED_WORD(20, 0xe5a6446b480c1bcb)
+        LOAD_IMMED_WORD(21, 0x39d366cce0933e0c)
+        LOAD_IMMED_WORD(22, 0xf86103d6cd223af7)
+        LOAD_IMMED_WORD(23, 0xcab98ee45bb9a68f)
+        LOAD_IMMED_WORD(24, 0x34195aae274630f9)
+        LOAD_IMMED_WORD(25, 0xd1df3bfceb05da1a)
+        LOAD_IMMED_WORD(26, 0xe408d863626b040a)
+        LOAD_IMMED_WORD(27, 0xb847f6c562a62676)
+        LOAD_IMMED_WORD(28, 0x44508793aa174c36)
+        LOAD_IMMED_WORD(29, 0x3c21d5f786149c80)
+        LOAD_IMMED_WORD(30, 0x9871b47e31368590)
+        LOAD_IMMED_WORD(31, 0xd5a767e17d453bef)
+
+#elif defined __powerpc__
+
+	LOAD_IMMED_WORD( 0, 0x00000000)
+	LOAD_IMMED_WORD( 1, 0x25c27735)
+	LOAD_IMMED_WORD( 2, 0xcdf97685)
+        LOAD_IMMED_WORD( 3, 0x8911f56c)
+        LOAD_IMMED_WORD( 4, 0x3356a25a)
+        LOAD_IMMED_WORD( 5, 0x15d30ae3)
+        LOAD_IMMED_WORD( 6, 0x4ac039eb)
+        LOAD_IMMED_WORD( 7, 0xfc672fd1)
+        LOAD_IMMED_WORD( 8, 0x6fae4610)
+        LOAD_IMMED_WORD( 9, 0x2e56bdb1)
+        LOAD_IMMED_WORD(10, 0x99e51340)
+        LOAD_IMMED_WORD(11, 0x737372fa)
+        LOAD_IMMED_WORD(12, 0xc8169fcb)
+        LOAD_IMMED_WORD(13, 0x5ceb230f)
+        LOAD_IMMED_WORD(14, 0xf644ba20)
+        LOAD_IMMED_WORD(15, 0x10287bb3)
+        LOAD_IMMED_WORD(16, 0xf6d51d50)
+        LOAD_IMMED_WORD(17, 0xaf96757c)
+        LOAD_IMMED_WORD(18, 0x2c1242f3)
+        LOAD_IMMED_WORD(19, 0x16f4a712)
+        LOAD_IMMED_WORD(20, 0x480c1bcb)
+        LOAD_IMMED_WORD(21, 0xe0933e0c)
+        LOAD_IMMED_WORD(22, 0xcd223af7)
+        LOAD_IMMED_WORD(23, 0x5bb9a68f)
+        LOAD_IMMED_WORD(24, 0x274630f9)
+        LOAD_IMMED_WORD(25, 0xeb05da1a)
+        LOAD_IMMED_WORD(26, 0x626b040a)
+        LOAD_IMMED_WORD(27, 0x62a62676)
+        LOAD_IMMED_WORD(28, 0xaa174c36)
+        LOAD_IMMED_WORD(29, 0x86149c80)
+        LOAD_IMMED_WORD(30, 0x31368590)
+        LOAD_IMMED_WORD(31, 0x7d453bef)
+
+#else
+#error Need to set values for the Register of this Arch
 #endif
 
 	// Jumping to crash sets the instruction-pointer
@@ -103,6 +176,10 @@ crash:
 	mov 0, %eax
 #elif defined __x86_64__
 	mov 0, %rax
+#elif defined __powerpc64__
+        lis 0, 0@highest
+#elif defined __powerpc__
+        lis 0, 0@ha
 #else
 	LOAD_IMMED_WORD(REG0, 0)
 	STORE(REG0, REG0)
diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog
index 8d5b4fb..95bc308 100644
--- a/frysk-core/frysk/testbed/ChangeLog
+++ b/frysk-core/frysk/testbed/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-04  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* FryskAsm.java: Add PowerPC32/64.
+	
+	* RegsCase.java: Put values to PowerPC64 registers. 
+
 2007-12-03  Andrew Cagney  <cagney@redhat.com>
 
 	* RegsCase.java (IA32, X8664): Update X87's FSW, FOP, EIP, CS, DS,
diff --git a/frysk-core/frysk/testbed/FryskAsm.java b/frysk-core/frysk/testbed/FryskAsm.java
index c3e546c..8d7a8ba 100644
--- a/frysk-core/frysk/testbed/FryskAsm.java
+++ b/frysk-core/frysk/testbed/FryskAsm.java
@@ -1,6 +1,7 @@
 // This file is part of the program FRYSK.
 //
 // Copyright 2007, Red Hat Inc.
+// Copyright 2007, (C) IBM
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -41,6 +42,8 @@ package frysk.testbed;
 
 import frysk.isa.Register;
 import frysk.isa.IA32Registers;
+import frysk.isa.PPC32Registers;
+import frysk.isa.PPC64Registers;
 import frysk.isa.X8664Registers;
 import frysk.isa.ISA;
 import frysk.isa.ISAMap;
@@ -79,16 +82,34 @@ public class FryskAsm {
 						     IA32Registers.EBX,
 						     IA32Registers.ECX,
 						     IA32Registers.EDX);
+
     public static final FryskAsm X8664 = new FryskAsm(X8664Registers.RIP,
 						      X8664Registers.RSP,
 						      X8664Registers.RAX,
 						      X8664Registers.RDI,
 						      X8664Registers.RSI,
 						      X8664Registers.RDX);
+
+    public static final FryskAsm PPC32 = new FryskAsm(PPC32Registers.LR,
+    						      PPC32Registers.GPR1,
+						      PPC32Registers.GPR0,
+						      PPC32Registers.GPR3,
+						      PPC32Registers.GPR4,
+						      PPC32Registers.GPR5);
+
+    public static final FryskAsm PPC64 = new FryskAsm(PPC64Registers.NIP,
+                                                      PPC64Registers.GPR1,
+                                                      PPC64Registers.GPR0,
+                                                      PPC64Registers.GPR3,
+                                                      PPC64Registers.GPR4,
+                                                      PPC64Registers.GPR5);
+
     private static final ISAMap isaToFryskAsm
 	= new ISAMap("FryskAsm")
 	.put(ISA.IA32, IA32)
 	.put(ISA.X8664, X8664)
+	.put(ISA.PPC32BE, PPC32)
+	.put(ISA.PPC64BE, PPC64) 
 	;
     public static FryskAsm createFryskAsm(ISA isa) {
 	return (FryskAsm) isaToFryskAsm.get(isa);
diff --git a/frysk-core/frysk/testbed/RegsCase.java b/frysk-core/frysk/testbed/RegsCase.java
index ad034a3..af5fbac 100644
--- a/frysk-core/frysk/testbed/RegsCase.java
+++ b/frysk-core/frysk/testbed/RegsCase.java
@@ -1,6 +1,7 @@
 // This file is part of the program FRYSK.
 //
 // Copyright 2007, Red Hat Inc.
+// Copyright 2007, (C) IBM
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -72,6 +73,7 @@ public abstract class RegsCase extends TestLib {
     private ByteOrder order;
     private ISA isa;
     private Registers registers;
+
     /**
      * Set things up for testing against the specified task.
      *
@@ -674,11 +676,200 @@ public abstract class RegsCase extends TestLib {
 	;
 
     private Values PPC64 = new Values()
-        .put(PPC64Registers.GPR0, // 0x837bb4e2d8209ca3
-             new byte[] { (byte)0xa3,(byte)0x9c,0x20,(byte)0xd8,
-                          (byte)0xe2,(byte)0xb4,0x7b,(byte)0x83 })
+        //in PowerPC the GPR0 is always Zero
+        .put(PPC64Registers.GPR0, // 0x0000000000000000
+             new byte[] { (byte)0x00, (byte)0x00,0x00, (byte)0x00,
+                          (byte)0x00, 0x00,(byte)0x00,(byte)0x00 })
+        .put(PPC64Registers.GPR1, // 0x514c159c25c27735
+             new byte[] { 0x51,0x4c,0x15,(byte)0x9c,
+                          0x25,(byte)0xc2,0x77,0x35 })
+        .put(PPC64Registers.GPR2, // 0x674b6064cdf97685
+             new byte[] { 0x67,0x4b,0x60,0x64,
+                          (byte)0xcd,(byte)0xf9,0x76,(byte)0x85 })
+        .put(PPC64Registers.GPR3, // 0x808ac01e8911f56c
+             new byte[] { (byte)0x80,(byte)0x8a,(byte)0xc0,0x1e,
+                          (byte)0x89,0x11,(byte)0xf5,0x6c })
+        .put(PPC64Registers.GPR4, // 0xcf4362db3356a25a
+             new byte[] { (byte)0xcf,0x43,0x62,(byte)0xdb,
+                          0x33,0x56,(byte)0xa2,0x5a })
+        .put(PPC64Registers.GPR5, // 0xe356818815d30ae3
+             new byte[] { (byte)0xe3,0x56,(byte)0x81,(byte)0x88,
+                          0x15,(byte)0xd3,0xa,(byte)0xe3 })
+        .put(PPC64Registers.GPR6, // 0x34a847d84ac039eb
+             new byte[] { 0x34,(byte)0xa8,0x47,(byte)0xd8,
+                          0x4a,(byte)0xc0,0x39,(byte)0xeb })
+        .put(PPC64Registers.GPR7, // 0xa6c244ccfc672fd1
+             new byte[] { (byte)0xa6,(byte)0xc2,0x44,(byte)0xcc,
+                          (byte)0xfc,0x67,0x2f,(byte)0xd1 })
+        .put(PPC64Registers.GPR8, // 0x4e857fa76fae4610
+             new byte[] { 0x4e,(byte)0x85,0x7f,(byte)0xa7,
+                          0x6f,(byte)0xae,0x46,0x10 })
+        .put(PPC64Registers.GPR9, // 0xfa6ecb942e56bdb1
+             new byte[] { (byte)0xfa,0x6e,(byte)0xcb,(byte)0x94,
+                          0x2e,0x56,(byte)0xbd,(byte)0xb1 })
+        .put(PPC64Registers.GPR10, // 0xce40dcae99e51340
+             new byte[] { (byte)0xce,0x40,(byte)0xdc,(byte)0xae,
+                          (byte)0x99,(byte)0xe5,0x13,0x40 })
+        .put(PPC64Registers.GPR11, // 0xd5e20897737372fa
+             new byte[] { (byte)0xd5,(byte)0xe2,0x8,(byte)0x97,
+                          0x73,0x73,0x72,(byte)0xfa })
+	.put(PPC64Registers.GPR12, // 0x44da7341c8169fcb
+             new byte[] { 0x44,(byte)0xda,0x73,0x41,
+                          (byte)0xc8,0x16,(byte)0x9f,(byte)0xcb })
+        .put(PPC64Registers.GPR13, // 0xef908c0f5ceb230f
+             new byte[] { (byte)0xef,(byte)0x90,(byte)0x8c,0xf,
+                          0x5c,(byte)0xeb,0x23,0xf })
+        .put(PPC64Registers.GPR14, // 0xd6f64efaf644ba20
+             new byte[] { (byte)0xd6,(byte)0xf6,0x4e,(byte)0xfa,
+                          (byte)0xf6,0x44,(byte)0xba,0x20 })
+        .put(PPC64Registers.GPR15, // 0xd5b5dd6910287bb3
+             new byte[] { (byte)0xd5,(byte)0xb5,(byte)0xdd,0x69,
+                          0x10,0x28,0x7b,(byte)0xb3 })
+        .put(PPC64Registers.GPR16, // 0xce9381ebf6d51d50
+             new byte[] { (byte)0xce,(byte)0x93,(byte)0x81,(byte)0xeb,
+                          (byte)0xf6,(byte)0xd5,0x1d,0x50 })
+        .put(PPC64Registers.GPR17, // 0xb3d21c30af96757c
+             new byte[] { (byte)0xb3,(byte)0xd2,0x1c,0x30,
+                          (byte)0xaf,(byte)0x96,0x75,0x7c })
+        .put(PPC64Registers.GPR18, // 0x48ce58b2c1242f3
+             new byte[] { 0x4,(byte)0x8c,(byte)0xe5,(byte)0x8b,
+                          0x2c,0x12,0x42,(byte)0xf3 })
+        .put(PPC64Registers.GPR19, // 0x5031020316f4a712
+             new byte[] { 0x50,0x31,0x2,0x3,
+                          0x16,(byte)0xf4,(byte)0xa7,0x12 })
+        .put(PPC64Registers.GPR20, // 0xe5a6446b480c1bcb
+             new byte[] { (byte)0xe5,(byte)0xa6,0x44,0x6b,
+                          0x48,0xc,0x1b,(byte)0xcb })
+        .put(PPC64Registers.GPR21, // 0x39d366cce0933e0c
+             new byte[] { 0x39,(byte)0xd3,0x66,(byte)0xcc,
+                          (byte)0xe0,(byte)0x93,0x3e,0xc })
+        .put(PPC64Registers.GPR22, // 0xf86103d6cd223af7
+             new byte[] { (byte)0xf8,0x61,0x3,(byte)0xd6,
+                          (byte)0xcd,0x22,0x3a,(byte)0xf7 })
+        .put(PPC64Registers.GPR23, // 0xcab98ee45bb9a68f
+             new byte[] { (byte)0xca,(byte)0xb9,(byte)0x8e,(byte)0xe4,
+                          0x5b,(byte)0xb9,(byte)0xa6,(byte)0x8f })
+        .put(PPC64Registers.GPR24, // 0x34195aae274630f9
+             new byte[] { 0x34,0x19,0x5a,(byte)0xae,
+                          0x27,0x46,0x30,(byte)0xf9 })
+	.put(PPC64Registers.GPR25, // 0xd1df3bfceb05da1a
+             new byte[] { (byte)0xd1,(byte)0xdf,0x3b,(byte)0xfc,
+                          (byte)0xeb,0x5,(byte)0xda,0x1a })
+        .put(PPC64Registers.GPR26, // 0xe408d863626b040a
+             new byte[] { (byte)0xe4,0x8,(byte)0xd8,0x63,
+                          0x62,0x6b,0x4,0xa })
+        .put(PPC64Registers.GPR27, // 0xb847f6c562a62676
+             new byte[] { (byte)0xb8,0x47,(byte)0xf6,(byte)0xc5,
+                          0x62,(byte)0xa6,0x26,0x76 })
+        .put(PPC64Registers.GPR28, // 0x44508793aa174c36
+             new byte[] { 0x44,0x50,(byte)0x87,(byte)0x93,
+                          (byte)0xaa,0x17,0x4c,0x36 })
+        .put(PPC64Registers.GPR29, // 0x3c21d5f786149c80
+             new byte[] { 0x3c,0x21,(byte)0xd5,(byte)0xf7,
+                          (byte)0x86,0x14,(byte)0x9c,(byte)0x80 })
+        .put(PPC64Registers.GPR30, // 0x9871b47e31368590
+             new byte[] { (byte)0x98,0x71,(byte)0xb4,0x7e,
+                          0x31,0x36,(byte)0x85,(byte)0x90 })
+        .put(PPC64Registers.GPR31, // 0xd5a767e17d453bef
+             new byte[] { (byte)0xd5,(byte)0xa7,0x67,(byte)0xe1,
+                          0x7d,0x45,0x3b,(byte)0xef })
+        .put(PPC64Registers.FPR0, // 0x75f98ca5ea9d4622
+             new byte[] { 0x75,(byte)0xf9,(byte)0x8c,(byte)0xa5,
+                          (byte)0xea,(byte)0x9d,0x46,0x22 })
+        .put(PPC64Registers.FPR1, // 0x2053c189e7aa9ade
+             new byte[] { 0x20,0x53,(byte)0xc1,(byte)0x89,
+                          (byte)0xe7,(byte)0xaa,(byte)0x9a,(byte)0xde })
+        .put(PPC64Registers.FPR2, // 0x3df09c8307b6fc56
+             new byte[] { 0x3d,(byte)0xf0,(byte)0x9c,(byte)0x83,
+                          0x7,(byte)0xb6,(byte)0xfc,0x56 })
+        .put(PPC64Registers.FPR3, // 0xb3b95a2e6fbe9bf0
+             new byte[] { (byte)0xb3,(byte)0xb9,0x5a,0x2e,
+                          0x6f,(byte)0xbe,(byte)0x9b,(byte)0xf0 })
+        .put(PPC64Registers.FPR4, // 0x29c916902e8c7c07
+             new byte[] { 0x29,(byte)0xc9,0x16,(byte)0x90,
+                          0x2e,(byte)0x8c,0x7c,0x7 })
+	.put(PPC64Registers.FPR5, // 0xe74ecdc530dc7b77
+             new byte[] { (byte)0xe7,0x4e,(byte)0xcd,(byte)0xc5,
+                          0x30,(byte)0xdc,0x7b,0x77 })
+        .put(PPC64Registers.FPR6, // 0x90505e84187b206b
+             new byte[] { (byte)0x90,0x50,0x5e,(byte)0x84,
+                          0x18,0x7b,0x20,0x6b })
+        .put(PPC64Registers.FPR7, // 0x6e5ac9b69dad5852
+             new byte[] { 0x6e,0x5a,(byte)0xc9,(byte)0xb6,
+                          (byte)0x9d,(byte)0xad,0x58,0x52 })
+        .put(PPC64Registers.FPR8, // 0x20ed2a356201d3d1
+             new byte[] { 0x20,(byte)0xed,0x2a,0x35,
+                          0x62,0x1,(byte)0xd3,(byte)0xd1 })
+        .put(PPC64Registers.FPR9, // 0xec7ba6b6d82d2859
+             new byte[] { (byte)0xec,0x7b,(byte)0xa6,(byte)0xb6,
+                          (byte)0xd8,0x2d,0x28,0x59 })
+        .put(PPC64Registers.FPR10, // 0x1908e830b54da771
+             new byte[] { 0x19,0x8,(byte)0xe8,0x30,
+                          (byte)0xb5,0x4d,(byte)0xa7,0x71 })
+        .put(PPC64Registers.FPR11, // 0xba399d517cee2bb3
+             new byte[] { (byte)0xba,0x39,(byte)0x9d,0x51,
+                          0x7c,(byte)0xee,0x2b,(byte)0xb3 })
+        .put(PPC64Registers.FPR12, // 0x601c9bf3dac1541
+             new byte[] { 0x6,0x1,(byte)0xc9,(byte)0xbf,
+                          0x3d,(byte)0xac,0x15,0x41 })
+        .put(PPC64Registers.FPR13, // 0x42ef875526d26ac7
+             new byte[] { 0x42,(byte)0xef,(byte)0x87,0x55,
+                          0x26,(byte)0xd2,0x6a,(byte)0xc7 })
+        .put(PPC64Registers.FPR14, // 0x1dd06c1c9132b4cb
+             new byte[] { 0x1d,(byte)0xd0,0x6c,0x1c,
+                          (byte)0x91,0x32,(byte)0xb4,(byte)0xcb })
+        .put(PPC64Registers.FPR15, // 0xc9b957b3ef59adf5
+             new byte[] { (byte)0xc9,(byte)0xb9,0x57,(byte)0xb3,
+                          (byte)0xef,0x59,(byte)0xad,(byte)0xf5 })
+        .put(PPC64Registers.FPR16, // 0xf3c555504f10ef96
+             new byte[] { (byte)0xf3,(byte)0xc5,0x55,0x50,
+                          0x4f,0x10,(byte)0xef,(byte)0x96 })
+        .put(PPC64Registers.FPR17, // 0x48480daa25666424
+             new byte[] { 0x48,0x48,0xd,(byte)0xaa,
+                          0x25,0x66,0x64,0x24 })
+	.put(PPC64Registers.FPR18, // 0x6008875d4a373061
+             new byte[] { 0x60,0x8,(byte)0x87,0x5d,
+                          0x4a,0x37,0x30,0x61 })
+        .put(PPC64Registers.FPR19, // 0xd11d698728ceab86
+             new byte[] { (byte)0xd1,0x1d,0x69,(byte)0x87,
+                          0x28,(byte)0xce,(byte)0xab,(byte)0x86 })
+        .put(PPC64Registers.FPR20, // 0x84d123c349f2468e
+             new byte[] { (byte)0x84,(byte)0xd1,0x23,(byte)0xc3,
+                          0x49,(byte)0xf2,0x46,(byte)0x8e })
+        .put(PPC64Registers.FPR21, // 0xa45fc9517343163
+             new byte[] { 0xa,0x45,(byte)0xfc,(byte)0x95,
+                          0x17,0x34,0x31,0x63 })
+        .put(PPC64Registers.FPR22, // 0x19a621d6f7d8e7b9
+             new byte[] { 0x19,(byte)0xa6,0x21,(byte)0xd6,
+                          (byte)0xf7,(byte)0xd8,(byte)0xe7,(byte)0xb9 })
+        .put(PPC64Registers.FPR23, // 0xd45b91ceda65de9e
+             new byte[] { (byte)0xd4,0x5b,(byte)0x91,(byte)0xce,
+                          (byte)0xda,0x65,(byte)0xde,(byte)0x9e })
+        .put(PPC64Registers.FPR24, // 0xb02e4044d6802506
+             new byte[] { (byte)0xb0,0x2e,0x40,0x44,
+                          (byte)0xd6,(byte)0x80,0x25,0x6 })
+        .put(PPC64Registers.FPR25, // 0x427411aff7c4766
+             new byte[] { 0x4,0x27,0x41,0x1a,
+                          (byte)0xff,0x7c,0x47,0x66 })
+        .put(PPC64Registers.FPR26, // 0x4f5b955b70217bf5
+             new byte[] { 0x4f,0x5b,(byte)0x95,0x5b,
+                          0x70,0x21,0x7b,(byte)0xf5 })
+        .put(PPC64Registers.FPR27, // 0xeddc0c73bb1e8699
+             new byte[] { (byte)0xed,(byte)0xdc,0xc,0x73,
+                          (byte)0xbb,0x1e,(byte)0x86,(byte)0x99 })
+        .put(PPC64Registers.FPR28, // 0x472c0c5969c0af0a
+             new byte[] { 0x47,0x2c,0xc,0x59,
+                          0x69,(byte)0xc0,(byte)0xaf,0xa })
+        .put(PPC64Registers.FPR29, // 0x19c66012a715212
+             new byte[] { 0x1,(byte)0x9c,0x66,0x1,
+                          0x2a,0x71,0x52,0x12 })
+        .put(PPC64Registers.FPR30, // 0xfaf368738bd3cec4
+             new byte[] { (byte)0xfa,(byte)0xf3,0x68,0x73,
+                          (byte)0x8b,(byte)0xd3,(byte)0xce,(byte)0xc4 })
+	.put(PPC64Registers.FPR31, // 0x5ee6e7418fe61e98
+             new byte[] { 0x5e,(byte)0xe6,(byte)0xe7,0x41,
+                          (byte)0x8f,(byte)0xe6,0x1e,(byte)0x98 })
 	;
-
     private final ISAMap isaValues = new ISAMap("RegsCase")
 	.put(ISA.IA32, IA32)
 	.put(ISA.X8664, X8664)


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-06-05 15:33 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-06-05 15:33 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  ad36974015d8a9f2404e3deb5c537a8e8f89dea0 (commit)
       via  36be80f0873e0dd9255e99c3b995aecc0fdd0863 (commit)
      from  0ef023547a5ee68baa4f7c6fc375dac6f886ddfb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit ad36974015d8a9f2404e3deb5c537a8e8f89dea0
Merge: 36be80f0873e0dd9255e99c3b995aecc0fdd0863 0ef023547a5ee68baa4f7c6fc375dac6f886ddfb
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Thu Jun 5 10:33:12 2008 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 36be80f0873e0dd9255e99c3b995aecc0fdd0863
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Thu Jun 5 10:27:07 2008 -0500

    Fix UnloadCommand errors.
    
    * UnloadCommand.java: Fix errors for unloading processes.
    * TestUnloadCommand.java: Add tests for above fix.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog              |    5 ++
 frysk-core/frysk/hpd/TestUnloadCommand.java |   22 +++++++
 frysk-core/frysk/hpd/UnloadCommand.java     |   81 +++++++--------------------
 3 files changed, 47 insertions(+), 61 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 0b67fba..33e1546 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-05  Rick Moseley  <rmoseley@redhat.com>
+
+	* UnloadCommand.java: Fix errors for unloading processes.
+	* TestUnloadCommand.java: Add tests for above fix.
+
 2008-06-01  Rick Moseley  <rmoseley@redhat.com>
 
 	* TestUnloadCommand.java: New.
diff --git a/frysk-core/frysk/hpd/TestUnloadCommand.java b/frysk-core/frysk/hpd/TestUnloadCommand.java
index e8cf5b4..39a76a4 100644
--- a/frysk-core/frysk/hpd/TestUnloadCommand.java
+++ b/frysk-core/frysk/hpd/TestUnloadCommand.java
@@ -58,4 +58,26 @@ public class TestUnloadCommand extends TestLib {
 	e.expect("Quitting\\.\\.\\.");
 	e.close();
     }
+    
+    public void testUnloadSingle() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("load " + Prefix.pkgLibFile("funit-parameters").getPath() +
+		" abc def ghi", "\\[0\\.0\\] Loaded executable file.*");
+	e.sendCommandExpectPrompt("unload -t 0", "Removed Target set \\[0\\].*");
+	e.sendCommandExpectPrompt("load", "No loaded procs currently.*");
+	e.send("quit\n");
+	e.expect("Quitting\\.\\.\\.");
+	e.close();
+    }
+    
+    public void testUnloadError() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("unload -t 0", "Error: Trying to remove a proc that has not been loaded.*");
+	e.sendCommandExpectPrompt("unload", "No loaded procs currently.*");
+	e.send("quit\n");
+	e.expect("Quitting\\.\\.\\.");
+	e.close();
+    }
+    
+    
 }
\ No newline at end of file
diff --git a/frysk-core/frysk/hpd/UnloadCommand.java b/frysk-core/frysk/hpd/UnloadCommand.java
index 0e4c056..1ca36f8 100644
--- a/frysk-core/frysk/hpd/UnloadCommand.java
+++ b/frysk-core/frysk/hpd/UnloadCommand.java
@@ -39,13 +39,7 @@
 
 package frysk.hpd;
 
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import frysk.proc.Proc;
-//import frysk.proc.Task;
 
 /**
  * UnloadCommand handles the unloading of processes that have been loaded
@@ -71,13 +65,12 @@ public class UnloadCommand extends ParameterizedCommand {
 	
 	if (cmd.size() > 3) {
 	    throw new InvalidCommandException("Too many parameters");
-	} else if (cmd.size() < 1 && !cli.loadedProcs.isEmpty()) {
+	} else if (cmd.size() < 1) {
+	    if (!cli.loadedProcs.isEmpty())
 	    // List the loaded procs if no parameters entered
-	    LoadCommand.printLoop(cli, "Loaded Procs", cli.loadedProcs);
-	    return;
-	} else if (cmd.size() < 1 && cli.loadedProcs.isEmpty()) {
-	    cli.addMessage("No loaded procs currently, must load a proc before unloading", 
-		    Message.TYPE_NORMAL);
+		LoadCommand.printLoop(cli, "Loaded Procs", cli.loadedProcs);
+	    else
+		cli.addMessage("No loaded procs currently", Message.TYPE_NORMAL);
 	    return;
 	}
 	
@@ -85,63 +78,29 @@ public class UnloadCommand extends ParameterizedCommand {
 	    if (cmd.size() != 2)
 		throw new InvalidCommandException("Not enough parameters");
 	    int id = Integer.parseInt(cmd.parameter(1));
-	    Proc proc = cli.idManager.getProc(id);
-	    if (proc == null) {
-		cli.addMessage("Trying to remove a proc that has not been loaded", Message.TYPE_ERROR);
-		return;
-	    }
-	    if (removeFromHashMap(proc, cli.loadedProcs, cli)) {
-		cli.targetset.removeProc(id);
-		cli.addMessage("Removed Target set [" + id + "]" , Message.TYPE_NORMAL);
-	    } else {
-		cli.addMessage("Target id " + id + " could not be found", Message.TYPE_ERROR);
+	    synchronized (cli) {
+		if (cli.loadedProcs.remove(new Integer(id)) == null) {
+		    cli.addMessage(
+			    "Trying to remove a proc that has not been loaded",
+			    Message.TYPE_ERROR);
+		    return;
+		} else {
+		    cli.targetset.removeProc(id);
+		    cli.addMessage("Removed Target set [" + id + "]" , Message.TYPE_NORMAL);
+		    return;
+		}
 	    }
-	    return;
 	}
 	if (cmd.parameter(0).equals("-all")) {
-	    removeAllProcs(cli.loadedProcs, cli);
+	    System.out.println("UnloadCommand.interpret: looking at -all");
+	    synchronized (cli) {
+		cli.loadedProcs.clear();
+	    }
 	    cli.addMessage("All loaded procs removed", Message.TYPE_NORMAL);
 	    return;
 	}
     }
     
-    /**
-     * removeFromHashMap removes the designated process from the designated HashMap.
-     * 
-     * @param proc is the proc object to be removed
-     * @param procMap is the HashMap of the procs to search for removal
-     * @param cli is the current command line interface object
-     */
-    private boolean removeFromHashMap(Proc proc, HashMap procMap, CLI cli) {
-	Set procSet = procMap.entrySet();
-	Iterator foo = procSet.iterator();
-	while (foo.hasNext()) {
-	    Map.Entry me = (Map.Entry) foo.next();
-	    Proc newProc = (Proc) me.getKey();
-	    if (proc.getExeFile().getSysRootedPath().equals(newProc.getExeFile().getSysRootedPath())) {
-		synchronized (cli) {
-		    foo.remove();
-		}
-		return true;
-	    }
-	}
-	return false;
-    }
-
-    /**
-     * removeAllProcs removes all of the procs loaded via the load command
-     * 
-     * @param procMap is a HashMap of the set of procs to remove
-     * @param cli is the current command line interface object
-     * 
-     */
-    private void removeAllProcs(HashMap procMap, CLI cli) {
-	synchronized (cli) {
-	    procMap.clear();
-	}
-	
-    }
-    
     int completer(CLI cli, Input input, int cursor, List completions) {
 	return CompletionFactory.completeFileName(cli, input, cursor,
 		completions);


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-05-12 16:30 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-05-12 16:30 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f53b6954ed9a4ef84305a5413c35f8f85cd7682d (commit)
       via  953dc34beaa2fa41d6dc789e8ea728aed8259adf (commit)
      from  c6ba841bf12cffc9556c92eb1b635d399b477a5b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f53b6954ed9a4ef84305a5413c35f8f85cd7682d
Merge: 953dc34beaa2fa41d6dc789e8ea728aed8259adf c6ba841bf12cffc9556c92eb1b635d399b477a5b
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Mon May 12 11:30:27 2008 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 953dc34beaa2fa41d6dc789e8ea728aed8259adf
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Mon May 12 11:29:43 2008 -0500

    Update version.in to 0.3.50

-----------------------------------------------------------------------

Summary of changes:
 frysk-common/version.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

First 500 lines of diff:
diff --git a/frysk-common/version.in b/frysk-common/version.in
index be58634..cd3dcaa 100644
--- a/frysk-common/version.in
+++ b/frysk-common/version.in
@@ -1 +1 @@
-0.3
+0.3.50


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-05-12 16:07 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-05-12 16:07 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  c6ba841bf12cffc9556c92eb1b635d399b477a5b (commit)
       via  6b98aedb4d4f15d496aa90bf8b77fd907c93568a (commit)
      from  198341c5690eeb5f8a9e49ed1be1119f7690878b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit c6ba841bf12cffc9556c92eb1b635d399b477a5b
Merge: 6b98aedb4d4f15d496aa90bf8b77fd907c93568a 198341c5690eeb5f8a9e49ed1be1119f7690878b
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon May 12 17:06:33 2008 +0100

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 6b98aedb4d4f15d496aa90bf8b77fd907c93568a
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon May 12 17:04:41 2008 +0100

    Call addFailed passing the Exception, rather than raising an exception when a watchpoint observer fails to be added to the task.
    
    2008-05-12  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* TestTaskObserverWatchpoint.java (testAddFailed): New.
    	(AddFailWatchObserver): New.
    
    2008-05-12  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* LinuxPtraceProc.java (requestAddWatchObserver): Call addFailed
    	on any exceptions raised in add().

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/ChangeLog                    |    5 ++
 .../frysk/proc/TestTaskObserverWatchpoint.java     |   71 ++++++++++++++++++++
 frysk-core/frysk/proc/live/ChangeLog               |    6 ++
 frysk-core/frysk/proc/live/LinuxPtraceProc.java    |   15 +++-
 4 files changed, 94 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index ecf2830..ab70cc1 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* TestTaskObserverWatchpoint.java (testAddFailed): New.	
+	(AddFailWatchObserver): New.
+
 2008-04-28  Mark Wielaard  <mwielaard@redhat.com>
 
 	* TestTaskForkedObserver.java (testTaskVforkObserver):
diff --git a/frysk-core/frysk/proc/TestTaskObserverWatchpoint.java b/frysk-core/frysk/proc/TestTaskObserverWatchpoint.java
index 3fc8d23..a100008 100644
--- a/frysk-core/frysk/proc/TestTaskObserverWatchpoint.java
+++ b/frysk-core/frysk/proc/TestTaskObserverWatchpoint.java
@@ -177,6 +177,54 @@ extends TestLib
 
     }
 
+    // This test case tests whether watchpoints are caught when a task is in a straight
+    // "running" condition. This really tests the basic and advertised functionality of watchpoints:
+    // to be caught by hardware, not software. In this  test:  set up the watchpoint, set up
+    // a terminated observer to guard the watchpoint was caught, and simply set the task to run.
+    // If the watchpoint observer is called, and the test is blocked then the test passes. If the
+    // process terminates and the watchpoint is not caught, then this signified an error condition.
+    public void testAddFailed () {
+	if (unresolvedOnPPC(5991)) 
+	    return;
+	
+	DaemonBlockedAtEntry ackProc = new DaemonBlockedAtEntry(
+		Prefix.pkgLibFile("funit-watchpoint"));
+	assertNotNull(ackProc);
+
+	// Get Proc/Task.
+	Proc proc = ackProc.getMainTask().getProc();
+	Task task = proc.getMainTask();
+
+	// Watch for any unexpected terminations of the child process.
+	TerminatedObserver to = new TerminatedObserver();
+	task.requestAddTerminatedObserver(to);
+
+	// Break at main
+	long mainAddress = getGlobalSymbolAddress(task, "main");
+	CodeObserver co = new CodeObserver();
+	task.requestAddCodeObserver(co, mainAddress);
+	ackProc.requestUnblock();
+	assertRunUntilStop("Run to main");
+
+	// Find Variable source for watch
+	long address = getGlobalSymbolAddress(task,"source");
+
+	// Add watch observer
+	AddFailWatchObserver watch = new AddFailWatchObserver();
+	task.requestAddWatchObserver(watch, address, 72, true);
+	task.requestUnblock(co);
+
+	assertRunUntilStop("Run and test watchpoint ");
+
+	// Make sure it triggered.
+	assertTrue("addedFailed", watch.addFailed);
+
+	// Delete both observers.
+	task.requestDeleteCodeObserver(co, mainAddress);
+	runPending();
+
+
+    }
 
     // This test case tests whether 'read or write' watchpoints are caught when a task is in a straight
     // "running" condition.  In this  test:  set up the 'read or write' watchpoint, set up
@@ -376,6 +424,29 @@ extends TestLib
 	}
     }
 
+    static class AddFailWatchObserver implements TaskObserver.Watch {
+
+	boolean addFailed = false;
+
+	public Action updateHit(Task task, long address, int length) {
+	    fail("Failing watchpoint generated a updateHit when observer should not have been added");
+	    return null;
+	}
+
+	public void addFailed(Object observable, Throwable w) {
+	    Manager.eventLoop.requestStop();
+	    addFailed = true;	    
+	}
+
+	public void addedTo(Object observable) {
+	    fail("Failing watchpoint generated a addedTo when observer should not have been added");	
+	}
+
+	public void deletedFrom(Object observable) {
+	    fail("Failing watchpoint generated a deletedFrom when observer should not have been added");	    
+	}
+	
+    }
     // Code observer. Run to a point in the program (normally main)
     // then block
     static class CodeObserver extends TestObserver
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 8231f51..fe2cff5 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-12  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* LinuxPtraceProc.java (requestAddWatchObserver): Call addFailed
+	on any exceptions raised in add().
+	
+
 2008-04-22  Mark Wielaard  <mwielaard@redhat.com>
 
 	* Breakpoint.java (reset): Make package private.
diff --git a/frysk-core/frysk/proc/live/LinuxPtraceProc.java b/frysk-core/frysk/proc/live/LinuxPtraceProc.java
index 08db321..f789d84 100644
--- a/frysk-core/frysk/proc/live/LinuxPtraceProc.java
+++ b/frysk-core/frysk/proc/live/LinuxPtraceProc.java
@@ -651,8 +651,8 @@ public class LinuxPtraceProc extends LiveProc {
 	}
 
 	public void run() {
-	    if (addition) {
-		boolean mustInstall = watchpoints.addWatchpoint(watch, task, address, length, writeOnly);
+	    if (addition) {		
+		boolean mustInstall = watchpoints.addWatchpoint(watch, task, address, length, writeOnly);		
 		if (mustInstall) {
 		    Watchpoint watchpoint;
 		    watchpoint = Watchpoint.create(address, length, writeOnly, task);
@@ -686,12 +686,21 @@ public class LinuxPtraceProc extends LiveProc {
 	fine.log(this, "requestAddWatchObserver");
 	WatchpointAction wpa = new WatchpointAction(observer, task, address, length, writeOnly, true);
 	TaskObservation to;
-	to = new TaskObservation((LinuxPtraceTask) task, observable, observer, wpa, true) {
+	to = new TaskObservation((LinuxPtraceTask) task, observable, observer, wpa, true) {	    	    
 	    public void execute() {
 		handleAddObservation(this);
 	    }
 	    public boolean needsSuspendedAction() {
 		return watchpoints.getWatchObservers(task, address, length, writeOnly) == null;
+	    }	    
+	    public void add() {
+		try {
+		    super.add();
+		} catch (Exception e) {
+		    // On any exceptions being raised in add(), call
+		    getTaskObserver().addFailed(this,e);
+		}
+		
 	    }
 	};
 	Manager.eventLoop.add(to);


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-05-09 17:29 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-05-09 17:29 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  eb784e7bbfbf822114e854b82e4c68ca470ed4f1 (commit)
       via  c8cc35c8853e874189873ee720d4b59bf9018b6f (commit)
      from  2b5829eff767d036a36ba23e8a8b46ea62528017 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit eb784e7bbfbf822114e854b82e4c68ca470ed4f1
Merge: c8cc35c8853e874189873ee720d4b59bf9018b6f 2b5829eff767d036a36ba23e8a8b46ea62528017
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Fri May 9 12:28:45 2008 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit c8cc35c8853e874189873ee720d4b59bf9018b6f
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Fri May 9 12:27:34 2008 -0500

    Slight mod to the release instructions.

-----------------------------------------------------------------------

Summary of changes:
 htdocs/releases/index.html |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

First 500 lines of diff:
diff --git a/htdocs/releases/index.html b/htdocs/releases/index.html
index 5cec032..ad0132e 100755
--- a/htdocs/releases/index.html
+++ b/htdocs/releases/index.html
@@ -100,6 +100,7 @@ variables; you'll want to set version to something more
 meaningful:
 
 <pre>
+cd frysk  (change to the directory where a fresh checkout of frysk is)
 version=0.2 ! ! ! change this
 echo $version
 date=`date -u +"%Y.%m.%d"`


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-04-02 22:41 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-04-02 22:41 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  21953327b97883d2adb9423c3dad56fc319f2f12 (commit)
       via  c64ee523562cd444fc03bfd3e63e5f365f947c4b (commit)
      from  3a267df6b1a76f01ac0b8c796794a41ddf111cb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 21953327b97883d2adb9423c3dad56fc319f2f12
Merge: c64ee523562cd444fc03bfd3e63e5f365f947c4b 3a267df6b1a76f01ac0b8c796794a41ddf111cb9
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Apr 2 23:40:22 2008 +0100

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit c64ee523562cd444fc03bfd3e63e5f365f947c4b
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Apr 2 23:37:20 2008 +0100

    Add writeOnly flag to interface. Remove watchpoint management code from task and subclasses.
    
    2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
            * Task.java (requestAddWatchObserver): Add writeOnly flag.
            (requestDeleteWatchObserver): Ditto.
            * TaskObserver.java (Watch.updateHit): Add length parameter.
    
    2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
    
            * DeadTask.java (requestAddWatchObserver): Add
            writeOnly flag.
            (requestDeleteWatchObserver): Ditto.
    
    2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
    
            * DummyTask.java (requestAddWatchObserver): Add writeOnly flag.
            (requestDeleteWatchObserver): Ditto.
    
    2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
    
            * LinuxPtraceProc.java (requestAddWatchObserver): Add writeOnly flag.
            (requestDeleteWatchObserver): Ditto.
            * LinuxPtraceTask.java (requestAddWatchObserver): Call LinuxPtraceProc
            implementation.
            (requestDeleteWatchObserver): Ditto.
            (notifyWatchpoint): New.
            (WatchpointAction): Delete.
            (requestAddWatchObserver): Delete private function.
            (requestDeleteWatchObserver): Delete private function.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/ChangeLog                 |    5 +
 frysk-core/frysk/proc/Task.java                 |    6 +-
 frysk-core/frysk/proc/TaskObserver.java         |    2 +-
 frysk-core/frysk/proc/dead/ChangeLog            |    6 +
 frysk-core/frysk/proc/dead/DeadTask.java        |    8 +-
 frysk-core/frysk/proc/dummy/ChangeLog           |    5 +
 frysk-core/frysk/proc/dummy/DummyTask.java      |    9 +-
 frysk-core/frysk/proc/live/ChangeLog            |   14 ++
 frysk-core/frysk/proc/live/LinuxPtraceProc.java |    6 +-
 frysk-core/frysk/proc/live/LinuxPtraceTask.java |  163 ++++++-----------------
 10 files changed, 91 insertions(+), 133 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 6a11424..f7e059d 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
+	* Task.java (requestAddWatchObserver): Add writeOnly flag.
+	(requestDeleteWatchObserver): Ditto.
+	* TaskObserver.java (Watch.updateHit): Add length parameter.
+
 2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* Task.java (requestAddWatchObserver): Publish. 
diff --git a/frysk-core/frysk/proc/Task.java b/frysk-core/frysk/proc/Task.java
index dfebb7f..7dccaf6 100644
--- a/frysk-core/frysk/proc/Task.java
+++ b/frysk-core/frysk/proc/Task.java
@@ -263,12 +263,14 @@ public abstract class Task {
     /**
      * Add TaskObserver.Watch to the TaskObserver pool.
      */
-    public abstract void requestAddWatchObserver(TaskObserver.Watch o, long address, int length);
+    public abstract void requestAddWatchObserver(TaskObserver.Watch o, long address, 
+	    					int length, boolean writeOnly);
 
     /**
      * Delete TaskObserver.Watchfor the TaskObserver pool.
      */
-    public abstract void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length);
+    public abstract void requestDeleteWatchObserver(TaskObserver.Watch o, long address, 
+	    					int length, boolean writeOnly);
 
     
     
diff --git a/frysk-core/frysk/proc/TaskObserver.java b/frysk-core/frysk/proc/TaskObserver.java
index 7ee7189..ecc005e 100644
--- a/frysk-core/frysk/proc/TaskObserver.java
+++ b/frysk-core/frysk/proc/TaskObserver.java
@@ -221,6 +221,6 @@ public interface TaskObserver
 	 * a Proc share their breakpoints, so this method needs to
 	 * check the actual Task that got hit.
 	 */ 
-      Action updateHit (Task task, long address);
+      Action updateHit (Task task, long address, int length);
     }
 }
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index c1be2fe..0699be9 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* DeadTask.java (requestAddWatchObserver): Add
+	writeOnly flag.
+	(requestDeleteWatchObserver): Ditto.
+
 2008-04-01  Andrew Cagney  <cagney@redhat.com>
 
 	* TestLinuxCore.java: Update to match PrintStackOptions.
diff --git a/frysk-core/frysk/proc/dead/DeadTask.java b/frysk-core/frysk/proc/dead/DeadTask.java
index 346b1bc..595e430 100644
--- a/frysk-core/frysk/proc/dead/DeadTask.java
+++ b/frysk-core/frysk/proc/dead/DeadTask.java
@@ -202,15 +202,17 @@ abstract class DeadTask extends Task {
     /**
      * Add TaskObserver.Watch to the TaskObserver pool.
      */
-    public void requestAddWatchObserver(TaskObserver.Watch o, long address, int length) {
+    public void requestAddWatchObserver(TaskObserver.Watch o, long address, 
+	    				int length, boolean writeOnly) {
 	throw new RuntimeException("requestAddWatchObserver");
     }
 
     /**
      * Delete TaskObserver.Watch from the TaskObserver pool.
      */
-    public  void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length) {
-	throw new RuntimeException("requestDeleteCodeObserver");
+    public  void requestDeleteWatchObserver(TaskObserver.Watch o, long address, 
+	    				int length, boolean writeOnly) {
+	throw new RuntimeException("requestDeleteWatchObserver");
     }
 
     
diff --git a/frysk-core/frysk/proc/dummy/ChangeLog b/frysk-core/frysk/proc/dummy/ChangeLog
index e487c75..89c6d46 100644
--- a/frysk-core/frysk/proc/dummy/ChangeLog
+++ b/frysk-core/frysk/proc/dummy/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* DummyTask.java (requestAddWatchObserver): Add writeOnly flag.
+	(requestDeleteWatchObserver): Ditto.
+
 2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* DummyTask.java (requestAddWatchObserver): Implement. 
diff --git a/frysk-core/frysk/proc/dummy/DummyTask.java b/frysk-core/frysk/proc/dummy/DummyTask.java
index 025343b..c3fb350 100644
--- a/frysk-core/frysk/proc/dummy/DummyTask.java
+++ b/frysk-core/frysk/proc/dummy/DummyTask.java
@@ -130,12 +130,15 @@ public class DummyTask extends Task {
 	throw new RuntimeException("oops!");
     }
     
-    public void requestAddWatchObserver(TaskObserver.Watch o, long address, int length) {
+    public void requestAddWatchObserver(TaskObserver.Watch o, long address, 
+	    				int length, boolean writeOnly) {
 	throw new RuntimeException("requestAddWatchObserver");
     }
 
-    public  void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length) {
-	throw new RuntimeException("requestDeleteCodeObserver");
+    public  void requestDeleteWatchObserver(TaskObserver.Watch o, long address,
+	    				int length, boolean writeOnly) {
+
+	throw new RuntimeException("requestDeleteWatchObserver");
     }
 
     public void requestAddInstructionObserver(TaskObserver.Instruction o) {
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 916c297..fc1f503 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -1,3 +1,17 @@
+2008-04-02  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* LinuxPtraceProc.java (requestAddWatchObserver): Add writeOnly flag.
+	(requestDeleteWatchObserver): Ditto.
+	* LinuxPtraceTask.java (requestAddWatchObserver): Call LinuxPtraceProc
+	implementation.
+	(requestDeleteWatchObserver): Ditto.
+	(notifyWatchpoint): New.
+	(WatchpointAction): Delete.
+	(requestAddWatchObserver): Delete private function.
+	(requestDeleteWatchObserver): Delete private function.
+	
+
+
 2008-03-31  Stan Cox  <scox@redhat.com>
 
 	* LinuxPtraceProc.java (getExe): Replace with getExeFile.
diff --git a/frysk-core/frysk/proc/live/LinuxPtraceProc.java b/frysk-core/frysk/proc/live/LinuxPtraceProc.java
index 659a22b..9f10c22 100644
--- a/frysk-core/frysk/proc/live/LinuxPtraceProc.java
+++ b/frysk-core/frysk/proc/live/LinuxPtraceProc.java
@@ -625,7 +625,8 @@ public class LinuxPtraceProc extends LiveProc {
     void requestAddWatchObserver(Task task, TaskObservable observable,
 				TaskObserver.Watch observer,
 				final long address,
-				final int length) {
+				final int length,
+				boolean writeOnly) {
     }
 
     /**
@@ -635,7 +636,8 @@ public class LinuxPtraceProc extends LiveProc {
     void requestDeleteWatchObserver(Task task, TaskObservable observable,
 				   TaskObserver.Watch observer,
 				   final long address,
-				   final int length)    {
+				   final int length,
+				   boolean writeOnly)    {
     }
 
     /**
diff --git a/frysk-core/frysk/proc/live/LinuxPtraceTask.java b/frysk-core/frysk/proc/live/LinuxPtraceTask.java
index 7df22be..f1a559b 100644
--- a/frysk-core/frysk/proc/live/LinuxPtraceTask.java
+++ b/frysk-core/frysk/proc/live/LinuxPtraceTask.java
@@ -86,7 +86,6 @@ public class LinuxPtraceTask extends LiveTask {
 	((LinuxPtraceHost)proc.getHost()).putTask(tid, this);
 	((LinuxPtraceProc)proc).addTask(this);
 	newState = LinuxPtraceTaskState.detachedState();
-	this.watchpoints = new WatchpointAddresses(this);
     }
     /**
      * Create a new attached clone of Task.
@@ -99,7 +98,6 @@ public class LinuxPtraceTask extends LiveTask {
 	((LinuxPtraceProc)cloningTask.getProc()).addTask(this);
 	// XXX: shouldn't need to grub around in the old task's state.
 	newState = LinuxPtraceTaskState.clonedState(cloningTask.getState());
-	this.watchpoints = new WatchpointAddresses(this);
     }
     /**
      * Create a new attached main Task of Proc.
@@ -121,8 +119,6 @@ public class LinuxPtraceTask extends LiveTask {
 		};
 	    proc.handleAddObservation(ob);
 	}
-	this.watchpoints = new WatchpointAddresses(this);
-
     }
 
     /**
@@ -544,6 +540,46 @@ public class LinuxPtraceTask extends LiveTask {
 	return blockers;
     }
 
+
+    /**
+     * Set of Code observers.
+     *
+     * FIXME: Should be private only LinuxPtraceTaskState grubs around
+     * with this variable.
+     */
+    final TaskObservable watchObservers = new TaskObservable(this);
+    /**
+     * Notify all Code observers of the breakpoint. Return the number
+     * of blocking observers or -1 if no Code observer were installed
+     * on this address.
+     */
+    int notifyWatchpoint(long address, int length) {
+	for (Iterator i = watchObservers.iterator(); i.hasNext();) {
+	    TaskObserver.Watch observer = (TaskObserver.Watch) i.next();
+	    if (observer.updateHit(this, address, length) == Action.BLOCK) {
+		blockers.add(observer);
+	    }
+	}
+	return blockers.size();
+    }
+
+    /**
+     * Add a TaskObserver.Watch observer
+     * (hardware only)
+     */
+    public void requestAddWatchObserver(TaskObserver.Watch o, long address, int length, boolean writeOnly) {
+	fine.log(this,"requestAddWatchObserver");
+	((LinuxPtraceProc)getProc()).requestAddWatchObserver(this, watchObservers, o, address, length, writeOnly);
+    }
+
+    /**
+     * Delete TaskObserver.Code for the TaskObserver pool.
+     */
+    public void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length, boolean writeOnly) {
+	fine.log(this, "requestDeleteWatcheObserver");
+	((LinuxPtraceProc)getProc()).requestDeleteWatchObserver(this, watchObservers, o, address, length, writeOnly);
+    }
+
     /**
      * Set of Cloned observers.
      */
@@ -576,23 +612,7 @@ public class LinuxPtraceTask extends LiveTask {
 	}
 	return blockers.size();
     }
-    /**
-     * Add a TaskObserver.Watch observer
-     * (hardware only)
-     */
-    public void requestAddWatchObserver(TaskObserver.Watch o, long address, int length) {
-	fine.log(this,"requestAddWatchObserver");
-	requestAddWatchObserver(this, codeObservers, o, address, length);
-    }
-
-    /**
-     * Delete TaskObserver.Code for the TaskObserver pool.
-     */
-    public void requestDeleteWatchObserver(TaskObserver.Watch o, long address, int length) {
-	fine.log(this, "requestDeleteWatcheObserver");
-	requestDeleteWatchObserver(this, codeObservers, o, address, length);
-    }
-
+    
     /**
      * Add a TaskObserver.Cloned observer.
      */
@@ -933,107 +953,6 @@ public class LinuxPtraceTask extends LiveTask {
     }
     
     /**
-     * Class describing the action to take on the suspended Task
-     * before adding or deleting a Watchpoint observer.
-     */
-    final class WatchpointAction implements Runnable {
-	private final TaskObserver.Watch watch;
-
-	private final Task task;
-
-	private final long watchAddress;
-	
-	private final int watchLength;
-
-	private final boolean addition;
-
-	WatchpointAction(TaskObserver.Watch watch, Task task, long address, int length,
-			 boolean addition) {
-	    this.watch = watch;
-	    this.task = task;
-	    this.watchAddress = address;
-	    this.watchLength = length;
-	    this.addition = addition;
-	}
-
-	public void run() {
-	    if (addition) {
-		boolean shouldInstall = watchpoints.addWatchpoint(watch, watchAddress, watchLength);
-		if (shouldInstall) {
-		    Watchpoint watchpoint;
-		    watchpoint = Watchpoint.create(watchAddress, watchLength, LinuxPtraceTask.this);
-		    watchpoint.install(task);
-		}
-	    } else {
-		boolean mustRemove = watchpoints.removeWatchpoint(watch, watchAddress, watchLength);
-		if (mustRemove) {
-		    Watchpoint watchpoint;
-		    watchpoint = Watchpoint.create(watchAddress, watchLength, LinuxPtraceTask.this);
-		    watchpoint.remove(task);
-		}
-	    }
-	}
-    }
-
-    public final WatchpointAddresses watchpoints;
-
-    /**
-     * (Internal) Tell the task to add the specified Watchpoint
-     * observation, attaching to the task if necessary. Adds a
-     * TaskCodeObservation to the eventloop which instructs the task
-     * to install the breakpoint if necessary.
-     */
-    void requestAddWatchObserver(Task task, TaskObservable observable,
-				TaskObserver.Watch observer,
-				final long address,
-				final int length) {
-
-	WatchpointAction watchAction = new WatchpointAction(observer, task, address, length, true);
-	TaskObservation to;
-
-	to = new TaskObservation((LinuxPtraceTask) task, observable, observer,
-				 watchAction, true) {
-		public void execute() {
-		    handleAddObservation(this);
-		}
-		public boolean needsSuspendedAction() {
-		    return watchpoints.getWatchObservers(address, length) == null;
-		}
-	    };
-	Manager.eventLoop.add(to);
-    }
-
-    /**
-     * (Internal) Tell the process to delete the specified Watchpoint
-     * observation, detaching if  necessary.
-     */
-    void requestDeleteWatchObserver(Task task, TaskObservable observable,
-				   TaskObserver.Watch observer,
-				   final long address,
-				   final int length)    {
-	WatchpointAction watchAction = new WatchpointAction(observer, task, address, length, false);
-	TaskObservation observation;
-
-	observation = new TaskObservation((LinuxPtraceTask)task, observable, observer, 
-					  watchAction, false) {
-		public void execute() {
-		    try {
-			newState = oldState().handleDeleteObservation(LinuxPtraceTask.this, this);
-		    } catch (Errno.Esrch e) {
-			newState = handleDisappearedEvent(e);
-		    }
-		}
-		
-		public boolean needsSuspendedAction() {
-		    return watchpoints.getWatchObservers(address, length).size() == 1;
-		}
-	    };
-
-	Manager.eventLoop.add(observation);
-    }
-
-    
-    /**
      * Add TaskObserver.Code to the TaskObserver pool.
      */
     public void requestAddCodeObserver(TaskObserver.Code o, long a) {


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-04-01 12:28 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-04-01 12:28 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  22a5428f36763f5bf81885fcc19f03104541c18c (commit)
       via  0b3aa7428253d10407c79d4be51e02afcdf92952 (commit)
      from  e1ebce24e45ed9778fa430444318ec8f92de1f5e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 22a5428f36763f5bf81885fcc19f03104541c18c
Merge: 0b3aa7428253d10407c79d4be51e02afcdf92952 e1ebce24e45ed9778fa430444318ec8f92de1f5e
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Tue Apr 1 13:28:34 2008 +0100

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 0b3aa7428253d10407c79d4be51e02afcdf92952
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Tue Apr 1 13:27:36 2008 +0100

    Add new assembler progream funit-watchpoint.S
    
    2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
    
            * funit-watchpoint.S: New.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/pkglibdir/ChangeLog               |    4 ++
 .../{funit-libcall.c => funit-watchpoint.S}        |   40 ++++++++++++--------
 2 files changed, 28 insertions(+), 16 deletions(-)
 copy frysk-core/frysk/pkglibdir/{funit-libcall.c => funit-watchpoint.S} (87%)

First 500 lines of diff:
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index 7ec6e15..504e7f5 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* funit-watchpoint.S: New.
+
 2008-03-18  Stan Cox  <scox@redhat.com>
 
 	* funit-quicksort.c (main): Make sortlist extern.
diff --git a/frysk-core/frysk/pkglibdir/funit-libcall.c b/frysk-core/frysk/pkglibdir/funit-watchpoint.S
similarity index 87%
copy from frysk-core/frysk/pkglibdir/funit-libcall.c
copy to frysk-core/frysk/pkglibdir/funit-watchpoint.S
index 578b0a2..eb0863f 100644
--- a/frysk-core/frysk/pkglibdir/funit-libcall.c
+++ b/frysk-core/frysk/pkglibdir/funit-watchpoint.S
@@ -37,22 +37,30 @@
 // version and license this file solely under the GPL without
 // exception.
 
-#include <stdlib.h>
-#include <sys/time.h>
+#include "frysk-asm.h"
 
-static volatile long tmp = 0;
+FUNCTION_BEGIN(main,0)
+MAIN_PROLOGUE(0)
+NOP
+	
+LOAD_IMMED_BYTE (REG1, source)
+LOAD_IMMED_BYTE (REG3, 0x77)
+NOP
+NOP
+NOP
+STORE(REG3, REG1)
+NOP
+NOP
+NOP
+
+
+MAIN_EPILOGUE(0)
+FUNCTION_RETURN(main,0)
+FUNCTION_END(main,0)
+
+.data
+.globl source
+source:						// Set up memory locations
+	.byte 0x99
 
-void
-foo ()
-{
-  struct timeval t;
-  gettimeofday (&t, NULL); // _testIStepThrough_
-  tmp += t.tv_usec;
-}
 
-int
-main (int argc, char **argv)
-{
-  foo ();
-  exit (0);
-}


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-03-20 20:20 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-03-20 20:20 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  dec89fbcd4c87a499c7801dfad629a998e3623e5 (commit)
       via  746955053a99b36631e131e355de80d4c601a75e (commit)
      from  9fc075eb7a30f68abba9de2a201b56a6a3451481 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit dec89fbcd4c87a499c7801dfad629a998e3623e5
Merge: 746955053a99b36631e131e355de80d4c601a75e 9fc075eb7a30f68abba9de2a201b56a6a3451481
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Mar 20 15:20:02 2008 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 746955053a99b36631e131e355de80d4c601a75e
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Mar 20 15:18:12 2008 -0500

    Oooops, screw-up for "start ignores focus" checkin(already checked in ChangeLog)

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/LoadCommand.java      |   38 +++++++-
 frysk-core/frysk/hpd/StartRun.java         |  139 ++++++++++++----------------
 frysk-core/frysk/hpd/TestLoadCommand.java  |    2 +-
 frysk-core/frysk/hpd/TestRunCommand.java   |   20 ++++
 frysk-core/frysk/hpd/TestStartCommand.java |   26 +++++-
 5 files changed, 139 insertions(+), 86 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/LoadCommand.java b/frysk-core/frysk/hpd/LoadCommand.java
index f3b2217..936611f 100644
--- a/frysk-core/frysk/hpd/LoadCommand.java
+++ b/frysk-core/frysk/hpd/LoadCommand.java
@@ -40,7 +40,12 @@
 package frysk.hpd;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import frysk.proc.dead.LinuxExeFactory;
 import frysk.debuginfo.DebugInfo;
 import frysk.debuginfo.DebugInfoFrame;
@@ -48,7 +53,6 @@ import frysk.debuginfo.DebugInfoStackFactory;
 import frysk.sysroot.SysRootCache;
 import frysk.proc.Proc;
 import frysk.proc.Task;
-import java.util.List;
 
 /**
  * LoadCommand handles the "load path-to-executable" command on the fhpd
@@ -100,8 +104,7 @@ public class LoadCommand extends ParameterizedCommand {
 		return;
 	    } else {
 		// List the loaded procs if no parameters entered
-		ViewsetCommand.printLoop(cli.targetset, cli, "Target set",
-					 true);
+		printLoop(cli, "Loaded procs", cli.loadedProcs);
 		return;
 	    }
 	}
@@ -149,6 +152,35 @@ public class LoadCommand extends ParameterizedCommand {
 		exeProc.getExe(), Message.TYPE_NORMAL);
     }
     
+    /**
+     * printLoop goes through the specified set of procs/tasks and prints them out
+     * 
+     * @param cli is the current command line interface object
+     * @param displayedName is the String used for the title of the set
+     * @param hashProcs is a HashMap containing the procs to list 
+     */
+    
+    static void printLoop(CLI cli, String displayedName, HashMap hashProcs) {
+	Set procSet = hashProcs.entrySet();
+	cli.outWriter.print(displayedName);
+	cli.outWriter.println("\tpath-to-executable");
+	ArrayList listing = new ArrayList();
+	// Run through procs and put into ArrayList so we can print them out in 
+	// numerical order after sorting them
+	for (Iterator foo = procSet.iterator(); foo.hasNext();) {
+	    Map.Entry me = (Map.Entry) foo.next();
+	    Proc proc = (Proc) me.getKey();
+	    Integer taskid = (Integer) me.getValue();
+	    listing.add("[" + taskid.intValue() + ".0]\t\t" + proc.getExe());
+	}
+	String alphaListing[] = (String[]) listing.toArray(new String[listing.size()]);
+	java.util.Arrays.sort(alphaListing);
+	for (int foo = 0; foo < alphaListing.length; foo++) {
+	    cli.outWriter.println(alphaListing[foo]);
+	}
+	cli.outWriter.flush();
+    }
+    
     int completer(CLI cli, Input input, int cursor, List completions) {
 	return CompletionFactory.completeFileName(cli, input, cursor,
 		completions);
diff --git a/frysk-core/frysk/hpd/StartRun.java b/frysk-core/frysk/hpd/StartRun.java
index 625c0fa..f648ad1 100644
--- a/frysk-core/frysk/hpd/StartRun.java
+++ b/frysk-core/frysk/hpd/StartRun.java
@@ -42,16 +42,16 @@ package frysk.hpd;
 import frysk.proc.Action;
 import frysk.proc.Manager;
 import frysk.proc.Proc;
+import frysk.proc.ProcObserver.ProcTasks;
 import frysk.proc.ProcTasksObserver;
-import frysk.proc.ProcTasksAction;
 import frysk.proc.Task;
+import frysk.proc.TaskAttachedObserverXXX;
+import frysk.proc.ProcTasksAction;
 import frysk.util.CountDownLatch;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import frysk.proc.TaskAttachedObserverXXX;
+
 
 /**
  * Due to a lot of similar code in StartCommand/RunCommand this class was
@@ -124,69 +124,71 @@ abstract class StartRun extends ParameterizedCommand {
     
     public void interpretCmd(CLI cli, Input cmd, Object options,
 			     boolean runToBreak) {
-	// See if there are any running tasks, if so, process them
-	// if there are not any procs loaded with the load/core commands
+	// See if there are any tasks in the current target set
 	Iterator foo = cli.targetset.getTaskData();
+	int oldPid = -1;
 	if (foo.hasNext()) {
-	    if (cli.coreProcs.isEmpty() && cli.loadedProcs.isEmpty()) {
-		// Clear the parameters for this process
-		int oldPid = -1;
-		TaskData taskData = null;
-		while (foo.hasNext()) {
-		    taskData = (TaskData) foo.next();
-		    Task task = taskData.getTask();
-		    // Need only one kill per PID(proc)
-		    if (task.getProc().getPid() == oldPid) {
-			continue;
+	    // Clear the parameters for this process
+	    TaskData taskData = null;
+	    while (foo.hasNext()) {
+		taskData = (TaskData) foo.next();
+		Task task = taskData.getTask();
+		// Need only one kill per PID(proc) if proc is running already
+		if (task.getProc().getPid() != oldPid &&
+		  task.getProc().getPid() > 0) {
+		    cli.execCommand("kill " + task.getProc().getPid() + "\n");
+		    int taskid = taskData.getParentID();
+		    run(cli, cmd, task.getProc(), runToBreak, taskid);
+		    oldPid = task.getProc().getPid();
 		    } else {
-			cli.execCommand("kill\n");
 			int taskid = taskData.getParentID();
-			synchronized (cli) {
-				cli.taskID = taskid;
+			// Take care of loaded procs
+			if (!cli.loadedProcs.isEmpty() && 
+			    cli.loadedProcs.containsKey(task.getProc())) {
+			    run(cli, cmd, task.getProc(), runToBreak, taskid);
+			    synchronized (cli) {
+				cli.loadedProcs.remove(task.getProc());
+			    }
 			}
-		    	run(cli, cmd, task.getProc(), runToBreak);
-		    	synchronized (cli) {
-				cli.taskID = -1;
-				cli.loadedProcs.clear();
+			// Take care of core procs
+			else if (!cli.coreProcs.isEmpty() &&
+				cli.coreProcs.containsKey(task.getProc())) {
+			    run(cli, cmd, task.getProc(), runToBreak, taskid);
+			    synchronized (cli) {
+				cli.coreProcs.remove(new Integer(taskid));
+			    }
 			}
-		    	oldPid = task.getProc().getPid();
 		    }
 		}
 		return;
-	    }
+	   // }
 	} else {
 	    cli.addMessage("No procs in targetset to run", Message.TYPE_NORMAL);
 	    return;
 	}
-
-	/*
-	 * If we made it here, a run command was issued and there are no running
-	 * procs, so, see if there were loaded procs or core procs
-	 */
-
-	/* This is the case where there are loaded procs */
-	if (!cli.loadedProcs.isEmpty()) {
-	    Set procSet = cli.loadedProcs.entrySet();
-	    runProcs(cli, procSet, cmd, runToBreak);
-	    synchronized (cli) {
-		cli.loadedProcs.clear();
-	    }
-	}
-
-	/* Check to see if there were procs loaded from a core command */
-	if (!cli.coreProcs.isEmpty()) {
-	    Set coreSet = cli.coreProcs.entrySet();
-	    runProcs(cli, coreSet, cmd, runToBreak);
-	    synchronized (cli) {
-		cli.coreProcs.clear();
-	    }
-	}
     }
 
-    private void run(CLI cli, Input cmd, Proc template, boolean runToBreak) {
+    /**
+     * run takes a passed proc from the target set and runs it
+     * 
+     * @param cli is the commandline object
+     * @param cmd is the command object with all the parameters
+     * @param template is the proc to run
+     * @param runToBreak true if the process is to run to the first break point
+     * 		or until it blows up("run" command), false if it should stop
+     * 		at the first executable statement("start" command)
+     * @param taskid the internal target set id that should be used for this process
+     */
+    private void run(CLI cli, Input cmd, Proc template, boolean runToBreak,
+	    int taskid) {
 	Runner runner = new Runner(cli);
+	String startrun = "";
+	    if (runToBreak)
+		startrun = "running";
+	    else
+		startrun = "starting";
 	if (cmd.size() == 0) {
-	    cli.addMessage("starting/running with this command: " + 
+	    cli.addMessage(startrun + " with this command: " + 
 			   asString(template.getCmdLine()),
 			   Message.TYPE_NORMAL);
 	    Manager.host.requestCreateAttachedProc(template, runner);
@@ -195,7 +197,7 @@ abstract class StartRun extends ParameterizedCommand {
 	    args[0] = template.getCmdLine()[0];
 	    for (int i = 1; i < args.length; i++)
 		args[i] = cmd.parameter(i - 1);
-	    cli.addMessage("starting/running with this command: " + 
+	    cli.addMessage(startrun + " with this command: " + 
 			   asString(args), Message.TYPE_NORMAL);
 	    Manager.host.requestCreateAttachedProc(args, runner);
 	}
@@ -208,8 +210,15 @@ abstract class StartRun extends ParameterizedCommand {
 	    }
 	}
 	// register with SteppingEngine et.al.
+	// Make sure we use the old task id for the new one
+	synchronized (cli) {
+		cli.taskID = taskid;
+	}
 	cli.doAttach(runner.launchedTask.getProc(), runToBreak);
 	runner.launchedTask.requestUnblock(runner);
+	synchronized (cli) {
+		cli.taskID = -1;
+	}
     }
 
     private String asString(String[] args) {
@@ -220,34 +229,6 @@ abstract class StartRun extends ParameterizedCommand {
 	}
 	return b.toString();
     }
-
-    /**
-     * runProcs does as the name implies, it runs procs found to be loaded by a
-     * load or a core command.
-     * 
-     * @param cli is the current commandline interface object
-     * @param procs is the set of procs to be run
-     * @param cmd is the command object to use to start the proc(s)
-     */
-    private void runProcs(CLI cli, Set procs, Input cmd, boolean runToBreak) {
-	Iterator foo = procs.iterator();
-	int ctr = 0;
-	while (foo.hasNext()) {
-	    ctr++;
-	    Map.Entry me = (Map.Entry) foo.next();
-	    Proc proc = (Proc) me.getKey();
-	    Integer taskid = (Integer) me.getValue();
-	    // Set the TaskID to be used to what was used when the
-	    // proc was loaded with the core or load commands
-	    synchronized (cli) {
-		cli.taskID = taskid.intValue();
-	    }
-	    run(cli, cmd, proc, runToBreak);
-	    synchronized (cli) {
-		cli.taskID = -1;
-	    }
-	}
-    }
     
     int completer(CLI cli, Input input, int cursor, List completions) {
 	return CompletionFactory.completeFileName(cli, input, cursor,
diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java
index 81fab20..ccc3dbd 100644
--- a/frysk-core/frysk/hpd/TestLoadCommand.java
+++ b/frysk-core/frysk/hpd/TestLoadCommand.java
@@ -106,7 +106,7 @@ public class TestLoadCommand extends TestLib {
 		"\\[0\\.0\\] Loaded executable file.*");
 	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
 		"\\[1\\.0\\] Loaded executable file.*");
-	e.sendCommandExpectPrompt("load", "Target set.*\\[0\\.0\\].*\\[1\\.0\\].*");
+	e.sendCommandExpectPrompt("load", "Loaded procs.*\\[0\\.0\\].*\\[1\\.0\\].*");
 	e.send("quit\n");
 	e.expect("Quitting\\.\\.\\.");
 	e.close();
diff --git a/frysk-core/frysk/hpd/TestRunCommand.java b/frysk-core/frysk/hpd/TestRunCommand.java
index a8ab9c8..f144ebd 100644
--- a/frysk-core/frysk/hpd/TestRunCommand.java
+++ b/frysk-core/frysk/hpd/TestRunCommand.java
@@ -178,4 +178,24 @@ public class TestRunCommand extends TestLib {
 	e.expect("Quitting\\.\\.\\.");
 	e.close();
     }
+    
+    /**
+     * This test case tests to make sure the run command pays attention to the "focus"
+     * command.
+     */
+    
+    public void testRunFocus() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+	"\\[0\\.0\\] Loaded executable file.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(),
+	"\\[1\\.0\\] Loaded executable file.*");
+	e.sendCommandExpectPrompt("focus [1.0]", "Creating new HPD notation set.*");
+	e.sendCommandExpectPrompt("run", "Attached to process ([0-9]+).*" +
+		"running.*" + "Running process ([0-9]+).*");
+	e.sendCommandExpectPrompt("load", "\\[0\\.0\\].*funit-hello.*");
+	e.send("quit\n");
+	e.expect("Quitting\\.\\.\\.");
+	e.close();
+    }
 }
\ No newline at end of file
diff --git a/frysk-core/frysk/hpd/TestStartCommand.java b/frysk-core/frysk/hpd/TestStartCommand.java
index c81650f..87aa2b9 100644
--- a/frysk-core/frysk/hpd/TestStartCommand.java
+++ b/frysk-core/frysk/hpd/TestStartCommand.java
@@ -53,11 +53,11 @@ public class TestStartCommand extends TestLib {
     public void testStartCommand() {
 	e = new HpdTestbed();
 	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(),
-		"\\[0\\.0] Loaded executable file.*");
+		"\\[0\\.0\\] Loaded executable file.*");
 	e.sendCommandExpectPrompt("start", "Attached to process.*");
-	e.sendCommandExpectPrompt("where", "[0.0].*");
+	e.sendCommandExpectPrompt("focus", "\\[0\\.0\\].*");
 	e.send("quit\n");
-	e.expect("Quitting...");
+	e.expect("Quitting\\.\\.\\.");
 	e.close();
     }
     
@@ -111,4 +111,24 @@ public class TestStartCommand extends TestLib {
 	e.expect("Quitting\\.\\.\\.");
 	e.close();
     }
+    
+    /**
+     * This test case tests to make sure the start command pays attention to the "focus"
+     * command.
+     */
+    
+    public void testStartFocus() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-hello").getPath(),
+	"\\[0\\.0\\] Loaded executable file.*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(),
+	"\\[1\\.0\\] Loaded executable file.*");
+	e.sendCommandExpectPrompt("focus [1.0]", "Creating new HPD notation set.*");
+	e.sendCommandExpectPrompt("start", "Attached to process ([0-9]+).*" +
+		"starting.*");
+	e.sendCommandExpectPrompt("load", "\\[0\\.0\\].*funit-hello.*");
+	e.send("quit\n");
+	e.expect("Quitting\\.\\.\\.");
+	e.close();
+    }
 }
\ No newline at end of file


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-03-18 16:22 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-03-18 16:22 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f46fb354811d6cf1262c4e0a9f8c807e18b4314e (commit)
       via  35fceeeae30b2f795c0281659988f815224e42d2 (commit)
      from  caa2ca584dc1e2953dc28c277841be18c5ad99ab (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f46fb354811d6cf1262c4e0a9f8c807e18b4314e
Merge: 35fceeeae30b2f795c0281659988f815224e42d2 caa2ca584dc1e2953dc28c277841be18c5ad99ab
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Tue Mar 18 16:22:31 2008 +0000

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 35fceeeae30b2f795c0281659988f815224e42d2
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Tue Mar 18 16:21:44 2008 +0000

    Trim Sys Root help output.
    
    2008-03-18  Phil Muldoon  <pmuldoon@redhat.com>
    
            * CommandlineParser.java (CommandlineParser): Trim
            Sys Root help output.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/util/ChangeLog              |    5 +++++
 frysk-core/frysk/util/CommandlineParser.java |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/util/ChangeLog b/frysk-core/frysk/util/ChangeLog
index 6117e12..1ddb337 100644
--- a/frysk-core/frysk/util/ChangeLog
+++ b/frysk-core/frysk/util/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-18  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* CommandlineParser.java (CommandlineParser): Trim
+	Sys Root help output.
+
 2008-03-17  Andrew Cagney  <cagney@redhat.com>
 
 	* StacktraceAction.java: Implement ProcBlockObserver.
diff --git a/frysk-core/frysk/util/CommandlineParser.java b/frysk-core/frysk/util/CommandlineParser.java
index 5992092..949c061 100644
--- a/frysk-core/frysk/util/CommandlineParser.java
+++ b/frysk-core/frysk/util/CommandlineParser.java
@@ -84,7 +84,7 @@ public class CommandlineParser {
 		    explicitExe = exeValue;
 		}
 	    });
-	add(new Option("sysroot", "special root directory", "Path of special root directory") {
+	add(new Option("sysroot", "Special root directory", "<path to sysroot>") {
 		public void parsed(String arg) throws OptionException {
 		    parseSysRoot(arg);
 		}


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-02-26 15:32 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-02-26 15:32 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  1f00d0320e752d60da44436f1a0612a64123702a (commit)
       via  829dda048d5c206a84e4ce1e73de1efb14f2ea67 (commit)
      from  7174ba407d72d790645f20a5db9682dd142bd772 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1f00d0320e752d60da44436f1a0612a64123702a
Merge: 829dda048d5c206a84e4ce1e73de1efb14f2ea67 7174ba407d72d790645f20a5db9682dd142bd772
Author: Phil Muldoon <pmuldoon@ups.hsv.redhat.com>
Date:   Tue Feb 26 09:32:17 2008 -0600

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 829dda048d5c206a84e4ce1e73de1efb14f2ea67
Author: Phil Muldoon <pmuldoon@ups.hsv.redhat.com>
Date:   Tue Feb 26 09:31:37 2008 -0600

    2008-02-26  Phil Muldoon  <pmuldoon@redhat.com>
    
            * CorefileBytebuffer.java (peek): Account for segments
            that are neither in the corefile, or backing solib/exe.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/dead/ChangeLog               |    5 ++++
 frysk-core/frysk/proc/dead/CorefileByteBuffer.java |   21 +++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index f09f868..ac109e9 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-26  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* CorefileBytebuffer.java (peek): Account for segments
+	that are neither in the corefile, or backing solib/exe.
+
 2008-02-25  Andrew Cagney  <cagney@redhat.com>
 
 	* LinuxExeFactory.java: New.  Merge in LinuxExeHost, LinuxExeProc,
diff --git a/frysk-core/frysk/proc/dead/CorefileByteBuffer.java b/frysk-core/frysk/proc/dead/CorefileByteBuffer.java
index f4cb123..63dd0c2 100644
--- a/frysk-core/frysk/proc/dead/CorefileByteBuffer.java
+++ b/frysk-core/frysk/proc/dead/CorefileByteBuffer.java
@@ -100,22 +100,29 @@ public class CorefileByteBuffer extends ByteBuffer {
   {
 
 
+    finest.log(this,"peek() at 0x",address);
     byte[] buffer = new byte[1];
     MapAddressHeader metaLine = findMetaData(address);
 
     if (metaLine != null)
-      if (checkCorefileAddress(metaLine))
-	{
+      if (checkCorefileAddress(metaLine)) {
 	  long offset = convertAddressToOffset(address);
 	  this.coreFileRaw.pread(offset, buffer,0,1);
 	}
       else
 	{
-	  if (!metaLine.name.equals(""))
-	    {
-	      StatelessFile temp = new StatelessFile(new File(metaLine.name));
-	      long offset = metaLine.solibOffset  + (address - metaLine.vaddr);
-	      temp.pread(offset, buffer,0,1);
+	  if (!metaLine.name.equals("")) {
+	        finest.log(this,"Attempting to read from non-corefile: ", metaLine.name);
+		File fileCheck = new File(metaLine.name);
+		if (((fileCheck.exists()) && fileCheck.canRead())) {
+		    StatelessFile temp = new StatelessFile(new File(metaLine.name));	      
+		    long offset = metaLine.solibOffset  + (address - metaLine.vaddr);
+		    temp.pread(offset, buffer,0,1);
+		} else {
+		    throw new RuntimeException("CorefileByteBuffer: Cannot peek() at address 0x"+
+					       Long.toHexString(address)+". Offset exists in file: " +
+					       metaLine.name+" but that file cannot be accessed.");
+		}
 	    }
 	}
 	


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-01-24 19:23 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-01-24 19:23 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f9eb110e2b34a5a881aec96c6b886fe571cb29d0 (commit)
       via  21463c80295c6960786f6415c29820bcd0a4790b (commit)
      from  6a3ed1921c83fce6bac4eadda31dfa9c014f2952 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f9eb110e2b34a5a881aec96c6b886fe571cb29d0
Merge: 21463c80295c6960786f6415c29820bcd0a4790b 6a3ed1921c83fce6bac4eadda31dfa9c014f2952
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Jan 24 13:22:43 2008 -0600

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 21463c80295c6960786f6415c29820bcd0a4790b
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Jan 24 13:21:29 2008 -0600

    Print command line for start/run.
    
    * StartRun.java: Print command line for start/run.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog     |    4 ++++
 frysk-core/frysk/hpd/StartRun.java |   16 ++--------------
 2 files changed, 6 insertions(+), 14 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 8d67eb9..5344c42 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-24  Rick Moseley  <rmoseley@redhat.com>
+
+	* StartRun.java: Print command line for start/run.
+
 2008-01-24  Andrew Cagney  <cagney@redhat.com>
 
 	* RegsCommand.java: Update; Register moved to frysk.isa.registers.
diff --git a/frysk-core/frysk/hpd/StartRun.java b/frysk-core/frysk/hpd/StartRun.java
index 1d803d8..e25f9e3 100644
--- a/frysk-core/frysk/hpd/StartRun.java
+++ b/frysk-core/frysk/hpd/StartRun.java
@@ -143,23 +143,15 @@ class StartRun extends ParameterizedCommand {
 	// if there are not any procs loaded with the load/core commands
 	Iterator foo = cli.targetset.getTasks();
 	if (foo.hasNext()) {
-	    //System.out.println("StartRun.interpretCmd: foo.hasNext()");
 	    if (cli.coreProcs.isEmpty() && cli.loadedProcs.isEmpty()) {
-		//System.out.println("StartRun.interpretCmd: coreProcs.isEmpty && loadedProcs.isEmpty");
 		// Clear the parameters for this process
 		while (foo.hasNext()) {
-		    //System.out.println("StartRun.interpretCmd: inside while");
 		    Task task = (Task) foo.next();
 		    String paramList = getParameters(cmd, task);
-		    //System.out.println("StartRun.interpretCmd: fixing to kill");
 		    cli.execCommand("kill\n");
-		    //cli.execCommand("focus\n");
-		    //System.out.println("StartRun.interpretCmd: fixing to start");
 		    cli.execCommand("start " + paramList + "\n");
-		    //cli.execCommand("focus\n");
 		    if (runToBreak)
 			cli.execCommand("go\n");
-		    //cli.execCommand("focus\n");
 		}
 		return;
 	    }
@@ -175,7 +167,6 @@ class StartRun extends ParameterizedCommand {
 
 	/* This is the case where there are loaded procs */
 	if (!cli.loadedProcs.isEmpty()) {
-	    //System.out.println("StartRun.interpretCmd: if !cli.loadedProcs.isEmpty");
 	    Set procSet = cli.loadedProcs.entrySet();
 	    runProcs(cli, procSet, cmd);
 	    synchronized (cli) {
@@ -194,7 +185,6 @@ class StartRun extends ParameterizedCommand {
     }
 
     private void run(CLI cli, Input cmd) {
-	//System.out.println("StartRun.run: beginning of run");
 	Runner runner = new Runner(cli);
 	Manager.host.requestCreateAttachedProc(cmd.stringArrayValue(), runner);
 	while (true) {
@@ -219,7 +209,6 @@ class StartRun extends ParameterizedCommand {
 	int ctr = 0;
 	while (foo.hasNext()) {
 	    ctr++;
-	    //System.out.println("StartRun.runProcs: ctr = " + ctr);
 	    Map.Entry me = (Map.Entry) foo.next();
 	    Proc proc = (Proc) me.getKey();
 	    Integer taskid = (Integer) me.getValue();
@@ -228,11 +217,11 @@ class StartRun extends ParameterizedCommand {
 	    synchronized (cli) {
 		cli.taskID = taskid.intValue();
 	    }
-	    //System.out.println("StartRun.runProcs: proc.getExe = " + proc.getExe());
 	    Input newcmd = new Input(proc.getExe() + " " +
 		    getParameters(cmd, proc.getMainTask()));
+	    cli.addMessage("starting/running with this command: " + 
+		    newcmd, Message.TYPE_NORMAL);
 	    run(cli, newcmd);
-	    //System.out.println("StartRun.runProcs: runToBreak = " + runToBreak);
 	    if (runToBreak)
 		cli.execCommand("go\n");
 	    synchronized (cli) {
@@ -281,7 +270,6 @@ class StartRun extends ParameterizedCommand {
 	String paramList = "";
 	for (int j = i; j < parameters.length; j++) 
 	    paramList = paramList + parameters[j] + " ";
-	    System.out.println("StartRun.parseParameters");
 	    return paramList;
     }
     


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-01-23 21:10 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2008-01-23 21:10 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  676f01bb93ede4110acaab1912da55e382d33120 (commit)
       via  e45b4a3e21041a9463184ec410fcfbe7e954ab54 (commit)
      from  117422ccf61c585a3f3abe6ac091ffa59f372d9b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 676f01bb93ede4110acaab1912da55e382d33120
Merge: e45b4a3e21041a9463184ec410fcfbe7e954ab54 117422ccf61c585a3f3abe6ac091ffa59f372d9b
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Wed Jan 23 15:09:51 2008 -0600

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit e45b4a3e21041a9463184ec410fcfbe7e954ab54
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Wed Jan 23 15:03:14 2008 -0600

    Fix bug where wrong parameter list was generated when running multiple times.
    
    * StartRun.java: Fix bug when multiple runs the correct
      parameter list is generated.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog     |    2 +
 frysk-core/frysk/hpd/StartRun.java |   48 ++++++++++++++++++++++++++---------
 2 files changed, 37 insertions(+), 13 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index d984f64..d35a0e6 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -2,6 +2,8 @@
 
 	* TestRunCommand.java (testRunCommandParamter): New.
 	* TestStartCommand.java (testStartCommandParameter): New.
+	* StartRun.java: Fix bug when multiple runs the correct
+	parameter list is generated.
 
 2008-01-21  Andrew Cagney  <cagney@redhat.com>
 
diff --git a/frysk-core/frysk/hpd/StartRun.java b/frysk-core/frysk/hpd/StartRun.java
index c8f340c..1d803d8 100644
--- a/frysk-core/frysk/hpd/StartRun.java
+++ b/frysk-core/frysk/hpd/StartRun.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008 Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -125,14 +125,11 @@ class StartRun extends ParameterizedCommand {
     }
     
     public void interpretRun(CLI cli, Input cmd, Object options) {
-	//System.out.println("StartRun.interpretRun");
 	runToBreak = true;
 	interpretCmd(cli, cmd, options);
     }
     
     public void interpretStart(CLI cli, Input cmd, Object options)  {
-	//System.out.println("StartRun.interpretStart");
-	//cli.execCommand("focus\n");
 	runToBreak = false;
 	interpretCmd(cli, cmd, options);
     }
@@ -243,23 +240,48 @@ class StartRun extends ParameterizedCommand {
 	    }
 	}
     }
+    
+    /**
+     * getParameters figures out what parameters to send back to start/run the process with;
+     * 	if no parameters are entered, use the previous ones if any were entered; if
+     *  parameters were entered, use those.
+     *  
+     * @param cmd is the Input object containing the command and any paramaters
+     * @param task is the Task object of the process that was previously run
+     * @return a String containing the parameters to be used in starting/running
+     *         the process
+     */
 
     private String getParameters(Input cmd, Task task) {
 	if (cmd.size() < 1) {
-	    // No params entered, use this proc's previous params
+	    // No params entered, use this proc's previous params(if any)
 	    Proc proc = task.getProc();
-	    return parseParameters(proc.getCmdLine());
-	    //Proc had no previous params, send back empty param list
-	} else
-	    return parseParameters(cmd.stringArrayValue());
+	    return parseParameters(proc.getCmdLine(), true);
+	} else//Proc had no previous params, send back empty param list
+	    // There were parameters entered, use those
+	    return parseParameters(cmd.stringArrayValue(), false);
     }
     
-    private String parseParameters(String[] parameters) {
+    /**
+     * parseParameters takes a String array and returns a space-delimited String
+     * @param parameters is the String array to convert
+     * @param which indicates whether or not to skip the first parameter
+     * @return a String of the parameters separated by spaces
+     */
+    private String parseParameters(String[] parameters, boolean which) {
 	if (parameters == null || parameters.length <= 0)
 		return "";
-	    String paramList = "";
-	    for (int i = 0; i < parameters.length; i++) 
-		paramList = paramList + parameters[i] + " ";
+	int i;
+	if (which)
+	    // In this case skip the first parameter which is the path to the process
+	    i = 1;
+	else
+	    // In this case, get all of the parameters which does not include the process
+	    i = 0;
+	String paramList = "";
+	for (int j = i; j < parameters.length; j++) 
+	    paramList = paramList + parameters[j] + " ";
+	    System.out.println("StartRun.parseParameters");
 	    return paramList;
     }
     


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2008-01-03 16:55 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2008-01-03 16:55 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  716f3e0e9bc0a9c6225e630b5848f7e01336da31 (commit)
       via  eda9aa443a4ff3ef9fe890978d2213295ffaf943 (commit)
      from  168572cc6fd3eb7cefd56f110bdafe8348c253e2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 716f3e0e9bc0a9c6225e630b5848f7e01336da31
Merge: eda9aa443a4ff3ef9fe890978d2213295ffaf943 168572cc6fd3eb7cefd56f110bdafe8348c253e2
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Thu Jan 3 16:55:21 2008 +0000

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit eda9aa443a4ff3ef9fe890978d2213295ffaf943
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Thu Jan 3 16:54:36 2008 +0000

    Tweak BankRegisters in preperation for corefile FP usage
    
    2008-01-03  Phil Muldoon  <pmuldoon@redhat.com>
    
            * LinuxIA32RegisterBanks.java (FPREGS): Made X87Register.DP offset
            14 instead of 18.
            * BankRegister.java (access): Add write condition logic.
            Made public.
            (getRegister): Made public.
            * RegisterMap.java(entryIterator): Made public.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bank/BankRegister.java           |   13 ++++++++-----
 frysk-core/frysk/bank/ChangeLog                   |    9 +++++++++
 frysk-core/frysk/bank/LinuxIA32RegisterBanks.java |    2 +-
 frysk-core/frysk/bank/RegisterMap.java            |    2 +-
 4 files changed, 19 insertions(+), 7 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bank/BankRegister.java b/frysk-core/frysk/bank/BankRegister.java
index 471fc82..8dd87db 100644
--- a/frysk-core/frysk/bank/BankRegister.java
+++ b/frysk-core/frysk/bank/BankRegister.java
@@ -58,7 +58,7 @@ public class BankRegister {
 	this.register = register;
     }
 
-    Register getRegister() {
+    public Register getRegister() {
 	return register;
     }
 
@@ -92,11 +92,14 @@ public class BankRegister {
 	return offset;
     }
 
-    void access(ByteBuffer byteBuffer, long offset, long size,
+    public void access(ByteBuffer byteBuffer, long offset, long size,
 		       byte[] bytes, int start, boolean write) {
-	if (write)
-	    // XXX: Should be directly supported by ByteBuffer.
-	    throw new RuntimeException("write not implemented");
+	if (write){
+		long position = byteBuffer.position();
+		byteBuffer.position(getOffset() + offset);
+		byteBuffer.put(bytes, (int)start, getLength());
+		byteBuffer.position(position);
+	}
 	else
 	    byteBuffer.get(this.offset + offset, bytes, start, (int) size);
     }
diff --git a/frysk-core/frysk/bank/ChangeLog b/frysk-core/frysk/bank/ChangeLog
index f3e43c9..d23ff81 100644
--- a/frysk-core/frysk/bank/ChangeLog
+++ b/frysk-core/frysk/bank/ChangeLog
@@ -1,3 +1,12 @@
+2008-01-03  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* LinuxIA32RegisterBanks.java (FPREGS): Made X87Register.DP offset
+	14 instead of 18.
+	* BankRegister.java (access): Add write condition logic.
+	Made public.
+	(getRegister): Made public.
+	* RegisterMap.java(entryIterator): Made public. 
+
 2007-12-21  Andrew Cagney  <cagney@redhat.com>
 
 	* BankRegister.java (BankRegister(int,int,String)): Delete.
diff --git a/frysk-core/frysk/bank/LinuxIA32RegisterBanks.java b/frysk-core/frysk/bank/LinuxIA32RegisterBanks.java
index b6ff6bb..7481cb5 100644
--- a/frysk-core/frysk/bank/LinuxIA32RegisterBanks.java
+++ b/frysk-core/frysk/bank/LinuxIA32RegisterBanks.java
@@ -73,7 +73,7 @@ public class LinuxIA32RegisterBanks {
 	.add(new BankRegister(0x0c, 4, X87Registers.EIP))
 	.add(new BankRegister(0x10, 2, X87Registers.CS))
 	.add(new BankRegister(0x12, 2, X87Registers.FOP))
-	.add(new BankRegister(0x18, 4, X87Registers.DP))
+	.add(new BankRegister(0x14, 4, X87Registers.DP))
 	.add(new BankRegister(0x18, 2, X87Registers.DS))
 	.add(new BankRegister(0x1c, 10, X87Registers.ST0))
 	.add(new BankRegister(0x26, 10, X87Registers.ST1))
diff --git a/frysk-core/frysk/bank/RegisterMap.java b/frysk-core/frysk/bank/RegisterMap.java
index 0e5dbe1..6246903 100644
--- a/frysk-core/frysk/bank/RegisterMap.java
+++ b/frysk-core/frysk/bank/RegisterMap.java
@@ -55,7 +55,7 @@ class RegisterMap {
     /**
      * Return an iterator over all BankRegisters in the map.
      */
-    Iterator entryIterator() {
+    public Iterator entryIterator() {
 	// XXX: Uses nameToEntry as that contains more registers than
 	// registerToEntry.
 	return nameToEntry.values().iterator();


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-12-13 20:18 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2007-12-13 20:18 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  b75c309191bc0edf60db7b51ddf9c056f720fc86 (commit)
       via  aca79501ae7e79668cf06fdc3eeab7482d2cf60e (commit)
      from  4efeffcfb597768d5805de8a5b7093451c2fc392 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit b75c309191bc0edf60db7b51ddf9c056f720fc86
Merge: aca79501ae7e79668cf06fdc3eeab7482d2cf60e 4efeffcfb597768d5805de8a5b7093451c2fc392
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Dec 13 14:18:30 2007 -0600

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit aca79501ae7e79668cf06fdc3eeab7482d2cf60e
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Dec 13 14:17:56 2007 -0600

    Remove part of TestLoadCommand that is no longer valid.
    
    * TestLoadCommand.java:  Remove part of TestLoadCommand that is no longer valid.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    4 ++++
 frysk-core/frysk/hpd/TestLoadCommand.java |    2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index eca9cb0..2e671e9 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-13  Rick Moseley  <rmoseley@redhat.com>
+
+	* TestLoadCommand.java: Remove part of test no longer valid.
+
 2007-12-13  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* AuxvCommand.java (interpret): Check for null auxv data.
diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java
index cc709b6..8830150 100644
--- a/frysk-core/frysk/hpd/TestLoadCommand.java
+++ b/frysk-core/frysk/hpd/TestLoadCommand.java
@@ -99,8 +99,6 @@ public class TestLoadCommand extends TestLib {
 	e.send("run\n");
 	e.expect(5, "Attached to process*");
 	e.expect(5, "Attached to process*");
-	e.send("run\n");
-	e.expect(5, "Error: missing program");
 	e.close();
     }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-30  4:24 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-30  4:24 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  c59164dcf19440dca54e74fb4ab6297c8a58e617 (commit)
       via  23d640f3b3dd5433285ae2446f5770a57e5d4783 (commit)
      from  bc17c29140bb51887ead83de19154ff381a04dac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit c59164dcf19440dca54e74fb4ab6297c8a58e617
Merge: 23d640f3b3dd5433285ae2446f5770a57e5d4783 bc17c29140bb51887ead83de19154ff381a04dac
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Fri Nov 30 02:23:25 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 23d640f3b3dd5433285ae2446f5770a57e5d4783
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Fri Nov 30 01:44:14 2007 -0200

    Fixed frameless function and load immediate for PowerPC32

-----------------------------------------------------------------------

Summary of changes:
 frysk-imports/include/ChangeLog   |    5 ++++
 frysk-imports/include/frysk-asm.h |   45 ++++++++++++++++++++++++++++++------
 2 files changed, 42 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/frysk-imports/include/ChangeLog b/frysk-imports/include/ChangeLog
index 74121b4..284cd00 100644
--- a/frysk-imports/include/ChangeLog
+++ b/frysk-imports/include/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-30  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* frysk-asm.h: Fixed load immediate for PowerPC32 and corrected
+	frameless function for PPC32.
+
 2007-11-29  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
 
 	* frysk-asm.h: Fixed loading immediate 64 bit word for Power64,
diff --git a/frysk-imports/include/frysk-asm.h b/frysk-imports/include/frysk-asm.h
index 06f930b..3953987 100644
--- a/frysk-imports/include/frysk-asm.h
+++ b/frysk-imports/include/frysk-asm.h
@@ -249,7 +249,7 @@
 #elif defined __powerpc64__
 //  PowerPC instructions have a fixed length
 //  So in Power64
-//  64-bit immediate must be loaded in 16-bit pieces
+//  64-bit immediate must be loaded in four 16-bit pieces
 #  define LOAD_IMMED_WORD(DEST_REG,CONST) \
         lis    DEST_REG, CONST@highest          ; \
         ori    DEST_REG, DEST_REG, CONST@higher ; \
@@ -257,7 +257,11 @@
         oris   DEST_REG, DEST_REG, CONST@h      ; \
         ori    DEST_REG, DEST_REG, CONST@l ;
 #elif defined __powerpc__
-#  define LOAD_IMMED_WORD(DEST_REG,CONST) li DEST_REG, CONST
+// In Power32
+// 32-bit immediate must be loaded in two 16-bit pieces
+#  define LOAD_IMMED_WORD(DEST_REG,CONST) \
+	lis   DEST_REG, CONST@ha        ; \
+	addi  DEST_REG, DEST_REG, CONST@l
 #else
 #  warning "No load immediate instruction sequence defined"
 #endif
@@ -526,6 +530,17 @@
 	.cfi_offset lr, 16         ; \
 	stdu    1, -128(1)         ; \
 	.cfi_adjust_cfa_offset 128 ; 
+#elif defined __powerpc__
+#  define FUNCTION_PROLOGUE(FUNC,SLOTS) \
+	stwu    1,  -48(1)         ; \
+	.cfi_adjust_cfa_offset 48  ; \
+	mflr    0                  ; \
+	.cfi_register lr, 0        ; \
+	stw    30,   8(1)          ; \
+	.cfi_offset 30, 8          ; \
+	stw    31,  12(1)          ; \
+	.cfi_offset 31, 12         ;
+#elif
 #else
 #  warning "No function-prologue compound instruction defined"
 #endif
@@ -542,10 +557,20 @@
 	.cfi_adjust_cfa_offset -8
 #elif defined __powerpc64__
 #  define FUNCTION_EPILOGUE(FUNC,SLOTS) \
-	ld 1, 0(1)    ; \
-	ld 0, 16(1)   ; \
-	mtlr 0        ; \
-	ld 31,  -8(1) ;
+	ld 1, 0(1)         ; \
+	ld 0, 16(1)        ; \
+	mtlr 0             ; \
+	.cfi_same_value lr ; \
+	ld 31,  -8(1)
+#elif defined __powerpc__
+#  define FUNCTION_EPILOGUE(FUNC,SLOTS) \
+	lwz  11,0(1)       ; \
+	lwz   0,4(11)      ; \
+	mtlr  0            ; \
+	.cfi_same_value lr ; \
+	lwz  31,-4(11)     ; \
+	mr   1,11          ; \
+	blr
 #else
 #  warning "No function-epilogue instruction sequence defined"
 #endif
@@ -720,7 +745,8 @@
 #define FRAMELESS_ADJ_RETURN(REG) \
 	.cfi_register rax, REG
 #elif defined __powerpc__
-#define FRAMELESS_ADJ_RETURN(REG)
+#define FRAMELESS_ADJ_RETURN(REG) \
+	.cfi_register 0, REG
 #else
 #  warning "No frameless function return adjustment defined"
 #endif
@@ -733,7 +759,10 @@
 	.cfi_endproc
 #elif defined __powerpc64__
 #define FRAMELESS_FUNCTION_END(FUNC) \
-	.cfi_endproc;
+	.cfi_endproc
+#elif defined __powerpc__
+#define FRAMELESS_FUNCTION_END(FUNC) \
+	.cfi_endproc
 #else
 #  warning "No frameless function ending instructions defined"
 #endif


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-28 21:40 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-28 21:40 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  1e71dcb17fdefb823eeef9a67f0e27f616e86882 (commit)
       via  38af65fc3da29c49822aeb2ef885f6ceb80aa2ae (commit)
      from  83b71d8dbfed32527d4bace5f13fb7827fcff409 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1e71dcb17fdefb823eeef9a67f0e27f616e86882
Merge: 38af65fc3da29c49822aeb2ef885f6ceb80aa2ae 83b71d8dbfed32527d4bace5f13fb7827fcff409
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Wed Nov 28 19:40:22 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 38af65fc3da29c49822aeb2ef885f6ceb80aa2ae
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Wed Nov 28 19:39:40 2007 -0200

    Adding test values Registers and added Power32/64 to factory.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/isa/ChangeLog                     |    4 +
 frysk-core/frysk/isa/RegistersFactory.java         |    2 +
 .../proc/live/PtraceRegisterBanksFactory.java      |    3 +-
 frysk-core/frysk/testbed/ChangeLog                 |    4 +
 frysk-core/frysk/testbed/RegsCase.java             |   84 +++++++++++++++++++-
 5 files changed, 94 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/isa/ChangeLog b/frysk-core/frysk/isa/ChangeLog
index f467b7c..09245ef 100644
--- a/frysk-core/frysk/isa/ChangeLog
+++ b/frysk-core/frysk/isa/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-28  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* RegistersFactory.java: Adding Power32/64 registers to factory.
+
 2007-11-26  Andrew Cagney  <cagney@redhat.com>
 
 	* X8664Registers.java (XMM0, ..., XMM15): Delete.
diff --git a/frysk-core/frysk/isa/RegistersFactory.java b/frysk-core/frysk/isa/RegistersFactory.java
index 4ced9a8..31cf74f 100644
--- a/frysk-core/frysk/isa/RegistersFactory.java
+++ b/frysk-core/frysk/isa/RegistersFactory.java
@@ -48,6 +48,8 @@ public class RegistersFactory {
 	= new ISAMap("RegistersFactory")
 	.put(ISA.IA32, new IA32Registers())
 	.put(ISA.X8664, new X8664Registers())
+	.put(ISA.PPC32BE, new PPC32Registers())
+	.put(ISA.PPC64BE, new PPC64Registers())
 	;
     static public Registers getRegisters(ISA isa) {
 	return (Registers)isaToRegisters.get(isa);
diff --git a/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java b/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
index 74232f0..75aeed9 100644
--- a/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
+++ b/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
@@ -84,14 +84,13 @@ class PtraceRegisterBanksFactory {
 
     private static ByteBuffer[] ppcBanksBE(int pid) {
 	ByteBuffer[] bankBuffers = new ByteBuffer[] {
-            new RegisterSetByteBuffer(pid, RegisterSet.REGS),
             new AddressSpaceByteBuffer(pid, AddressSpace.USR)
         };
 
 	for (int i = 0; i < bankBuffers.length; i++) {
             bankBuffers[i].order(ByteOrder.BIG_ENDIAN);
         }	
-
+	System.out.println("Usr Addr Space Size: " + bankBuffers[0].capacity());
 	return bankBuffers;
     }
 
diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog
index 01c6bb7..56ba41e 100644
--- a/frysk-core/frysk/testbed/ChangeLog
+++ b/frysk-core/frysk/testbed/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-28  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* RegsCase.java: Add the PowerPC32 general purpose register values. 
+
 2007-11-12  Andrew Cagney  <cagney@redhat.com>
 
 	* DaemonBlockedAtSignal.java (DaemonBlockedAtSignal(File)): New.
diff --git a/frysk-core/frysk/testbed/RegsCase.java b/frysk-core/frysk/testbed/RegsCase.java
index 2078cff..6521e2b 100644
--- a/frysk-core/frysk/testbed/RegsCase.java
+++ b/frysk-core/frysk/testbed/RegsCase.java
@@ -43,6 +43,8 @@ import java.util.Map.Entry;
 import frysk.isa.Register;
 import frysk.isa.IA32Registers;
 import frysk.isa.X8664Registers;
+import frysk.isa.PPC32Registers;
+import frysk.isa.PPC64Registers;
 import frysk.isa.ISA;
 import frysk.isa.ISAMap;
 import frysk.proc.Task;
@@ -347,7 +349,87 @@ public abstract class RegsCase extends TestLib {
         .put(X8664Registers.RIP, "crash")
 	;
 
+    private Values PPC32 = new Values()
+        .put(PPC32Registers.GPR0, 
+             new byte[] { (byte)0xa3,(byte)0x9c,0x20,(byte)0x08 })
+	.put(PPC32Registers.GPR1, 
+             new byte[] { (byte)0x3a,(byte)0x82,0x27,(byte)0xf1 })
+	.put(PPC32Registers.GPR2,
+             new byte[] { (byte)0x1b,(byte)0x12,(byte)0xa0,(byte)0xa2 })
+	.put(PPC32Registers.GPR3,
+             new byte[] { (byte)0xe2,(byte)0xab,(byte)0xff,(byte)0xcc })
+        .put(PPC32Registers.GPR4,
+             new byte[] { (byte)0xc4,(byte)0x46,(byte)0xeb,(byte)0xf1 })
+        .put(PPC32Registers.GPR5,
+             new byte[] { (byte)0xa9,(byte)0x94,0x2a,(byte)0x4e })
+        .put(PPC32Registers.GPR6,
+             new byte[] { (byte)0x55,(byte)0xa2,(byte)0x92,(byte)0x51 })
+        .put(PPC32Registers.GPR7,
+             new byte[] { (byte)0x4f,(byte)0x61,0x6e,(byte)0xf2 })
+        .put(PPC32Registers.GPR8,
+             new byte[] { (byte)0xf1,(byte)0x76,(byte)0xef,(byte)0x4d })
+        .put(PPC32Registers.GPR9,
+             new byte[] { (byte)0xdf,(byte)0xac,0x22,(byte)0x56 })
+	.put(PPC32Registers.GPR10,
+             new byte[] { (byte)0xad,(byte)0x1a,(byte)0x8a,(byte)0x99 })
+        .put(PPC32Registers.GPR11,
+             new byte[] { (byte)0x11,(byte)0x2e,(byte)0x88,(byte)0xab })
+        .put(PPC32Registers.GPR12,
+             new byte[] { (byte)0xf7,(byte)0xfc,(byte)0xd1,(byte)0xf2 })
+        .put(PPC32Registers.GPR13,
+             new byte[] { (byte)0x88,(byte)0x3e,(byte)0xf1,(byte)0x01 })
+        .put(PPC32Registers.GPR14,
+             new byte[] { (byte)0xef,(byte)0x2e,0x26,(byte)0x91 })
+        .put(PPC32Registers.GPR15,
+             new byte[] { (byte)0x9c,(byte)0x1a,(byte)0x6e,(byte)0xe1 })
+        .put(PPC32Registers.GPR16,
+             new byte[] { (byte)0x20,(byte)0x0d,0x11,(byte)0x34 })
+        .put(PPC32Registers.GPR17,
+             new byte[] { (byte)0x63,(byte)0x4b,(byte)0x99,(byte)0x11 })
+        .put(PPC32Registers.GPR18,
+             new byte[] { (byte)0xd8,(byte)0x9b,(byte)0xde,(byte)0x81 })
+        .put(PPC32Registers.GPR19,
+             new byte[] { (byte)0x6e,(byte)0x6e,(byte)0xf9,(byte)0xba })
+	.put(PPC32Registers.GPR20,
+             new byte[] { (byte)0x55,(byte)0x51,(byte)0xaa,(byte)0xc3 })
+        .put(PPC32Registers.GPR21,
+             new byte[] { (byte)0x12,(byte)0x9c,(byte)0x72,(byte)0x3e })
+        .put(PPC32Registers.GPR22,
+             new byte[] { (byte)0x29,(byte)0x9c,(byte)0x77,(byte)0x33 })
+        .put(PPC32Registers.GPR23,
+             new byte[] { (byte)0x31,(byte)0x9c,0x20,(byte)0x44 })
+        .put(PPC32Registers.GPR24,
+             new byte[] { (byte)0xf3,(byte)0x9c,0x45,(byte)0xbb })
+        .put(PPC32Registers.GPR25,
+             new byte[] { (byte)0x10,(byte)0x9c,(byte)0x92,(byte)0xfa })
+        .put(PPC32Registers.GPR26,
+             new byte[] { (byte)0xe4,(byte)0x9c,(byte)0xbc,(byte)0xd8 })
+        .put(PPC32Registers.GPR27,
+             new byte[] { (byte)0x39,(byte)0x9c,(byte)0xe5,(byte)0xc6 })
+        .put(PPC32Registers.GPR28,
+             new byte[] { (byte)0x43,(byte)0x9c,(byte)0x4a,(byte)0x99 })
+        .put(PPC32Registers.GPR29,
+             new byte[] { (byte)0xd7,(byte)0x9c,0x44,(byte)0x01 })
+	.put(PPC32Registers.GPR30,
+             new byte[] { (byte)0x62,(byte)0x9c,0x09,(byte)0xeb })
+        .put(PPC32Registers.GPR31,
+             new byte[] { (byte)0x42,(byte)0x9c,0x78,(byte)0xa1 })
+
+        .put(PPC32Registers.FPR0,
+             new byte[] { (byte)0xa3,(byte)0x9c,0x20,(byte)0xd8,
+                          (byte)0xe2,(byte)0xb4,0x7b,(byte)0x83 })
+	;
+
+    private Values PPC64 = new Values()
+        .put(PPC64Registers.GPR0, // 0x837bb4e2d8209ca3
+             new byte[] { (byte)0xa3,(byte)0x9c,0x20,(byte)0xd8,
+                          (byte)0xe2,(byte)0xb4,0x7b,(byte)0x83 })
+	;
+
     private final ISAMap isaValues = new ISAMap("RegsCase")
-	.put(ISA.IA32, IA32).put(ISA.X8664, X8664)
+	.put(ISA.IA32, IA32)
+	.put(ISA.X8664, X8664)
+	.put(ISA.PPC32BE, PPC32)
+	.put(ISA.PPC64BE, PPC64)
 	;
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-28 16:20 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-28 16:20 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  0d030927ffff2842d7175af81a37b725c7842fc4 (commit)
       via  14da5f49f8bcd34a91f22062329966a6ca541d09 (commit)
      from  73d248bf48736b4e48a0ea9cc006704c287df727 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 0d030927ffff2842d7175af81a37b725c7842fc4
Merge: 14da5f49f8bcd34a91f22062329966a6ca541d09 73d248bf48736b4e48a0ea9cc006704c287df727
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Wed Nov 28 14:19:50 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 14da5f49f8bcd34a91f22062329966a6ca541d09
Author: Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
Date:   Wed Nov 28 14:19:23 2007 -0200

    Fixing PowerPC access to regs and corefile fp notes section.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/live/ChangeLog               |   12 ++---
 .../proc/live/PtraceRegisterBanksFactory.java      |   14 ++++--
 frysk-core/frysk/util/ChangeLog                    |    9 +++
 frysk-core/frysk/util/PPC64LinuxElfCorefile.java   |   53 +++++++++++++++----
 frysk-core/frysk/util/TestFCore.java               |    8 +++-
 frysk-sys/frysk/sys/ChangeLog                      |    5 ++
 frysk-sys/frysk/sys/cni/Ptrace.cxx                 |   10 +++-
 7 files changed, 86 insertions(+), 25 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 05f1824..ee712f6 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -1,12 +1,8 @@
-2007-11-28  Zhao Shujing  <pearly.zhao@oracle.com>
+2007-11-27  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
 
-	* TestByteBuffer.java (testMemoryBufferCapacity()): Update; Add PPC
-	support and make it simpler.
-
-2007-11-22  Zhao shujing  <pearly.zhao@oracle.com>
-
-	* TestByteBuffer.java (testMemoryBufferCapacity()): Fix bug 5394.
-	Renabled test.
+	* PtraceRegisterBanksFactory.java: Putting single PowerPC ptrace
+	register bank (holds all registers with different sizes, even
+	floating pointer ones and vector register.
 
 2007-11-22  Andrew Cagney  <cagney@redhat.com>
 
diff --git a/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java b/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
index 0621b3c..74232f0 100644
--- a/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
+++ b/frysk-core/frysk/proc/live/PtraceRegisterBanksFactory.java
@@ -83,10 +83,16 @@ class PtraceRegisterBanksFactory {
     }
 
     private static ByteBuffer[] ppcBanksBE(int pid) {
-	ByteBuffer registers
-	    = new AddressSpaceByteBuffer(pid, AddressSpace.USR);
-	registers.order(ByteOrder.BIG_ENDIAN); // set explicitly
-	return new ByteBuffer[] { registers };
+	ByteBuffer[] bankBuffers = new ByteBuffer[] {
+            new RegisterSetByteBuffer(pid, RegisterSet.REGS),
+            new AddressSpaceByteBuffer(pid, AddressSpace.USR)
+        };
+
+	for (int i = 0; i < bankBuffers.length; i++) {
+            bankBuffers[i].order(ByteOrder.BIG_ENDIAN);
+        }	
+
+	return bankBuffers;
     }
 
     static RegisterBanks create(ISA isa, int pid) {
diff --git a/frysk-core/frysk/util/ChangeLog b/frysk-core/frysk/util/ChangeLog
index 2452a84..24e3eb0 100644
--- a/frysk-core/frysk/util/ChangeLog
+++ b/frysk-core/frysk/util/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-28  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+	
+	* PPC64LinuxElfCorefile.java: Fixed the floating pointer
+	notes writer.
+
+	* TestFCore.java: Marked testFloatingPointRegisters as an Unresolved
+	test since doesnt make sense to test for fp regs in the second bank,
+	they are together with all other regs in the first bank.
+
 2007-11-28  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* PPC64LinuxElfCorefile.java (writeNotePrstatus): Add GPR
diff --git a/frysk-core/frysk/util/PPC64LinuxElfCorefile.java b/frysk-core/frysk/util/PPC64LinuxElfCorefile.java
index ffcc899..58553c7 100644
--- a/frysk-core/frysk/util/PPC64LinuxElfCorefile.java
+++ b/frysk-core/frysk/util/PPC64LinuxElfCorefile.java
@@ -47,7 +47,6 @@ import java.math.BigInteger;
 
 import frysk.proc.Proc;
 import frysk.proc.Task;
-import inua.eio.ByteBuffer;
 import inua.eio.ByteOrder;
 
 import lib.dwfl.ElfNhdr;
@@ -241,20 +240,52 @@ public class PPC64LinuxElfCorefile extends LinuxElfCorefile {
          *      frysk.proc.Task)
          */
     protected void writeNoteFPRegset(ElfNhdr nhdrEntry, Task task) {
-	ElfPrFPRegSet fpRegSet = new ElfPrFPRegSet();
 
-	// Write FP Register info over wholesae. Do not interpret.
-	ByteBuffer registerMaps[] = task.getRegisterBuffersFIXME();
-	byte[] regBuffer = new byte[(int) registerMaps[1].capacity()];
-	registerMaps[1].get(regBuffer);
+        ElfPrFPRegSet fpRegSet = new ElfPrFPRegSet();
+
+        Register[] ppc64FloatingPointerRegMap = {
+                PPC64Registers.FPR0, PPC64Registers.FPR1, PPC64Registers.FPR2,
+                PPC64Registers.FPR3, PPC64Registers.FPR4, PPC64Registers.FPR5,
+		PPC64Registers.FPR6, PPC64Registers.FPR7, PPC64Registers.FPR8,
+		PPC64Registers.FPR9, PPC64Registers.FPR10, PPC64Registers.FPR11,
+		PPC64Registers.FPR12, PPC64Registers.FPR13, PPC64Registers.FPR14,
+		PPC64Registers.FPR15, PPC64Registers.FPR16, PPC64Registers.FPR17,
+		PPC64Registers.FPR18, PPC64Registers.FPR19, PPC64Registers.FPR20,
+		PPC64Registers.FPR21, PPC64Registers.FPR22, PPC64Registers.FPR23,
+		PPC64Registers.FPR24, PPC64Registers.FPR25, PPC64Registers.FPR26,
+		PPC64Registers.FPR27, PPC64Registers.FPR28, PPC64Registers.FPR29,
+		PPC64Registers.FPR30, PPC64Registers.FPR31 };
+
+        int totalBufferSize = 0;
+        for (int i = 0; i < ppc64FloatingPointerRegMap.length; i++) {
+            int registerSize = ppc64FloatingPointerRegMap[i].getType().getSize();
+            totalBufferSize += registerSize;
+        }
 
-	fpRegSet.setFPRegisterBuffer(regBuffer);
+	// Creating a raw byte buffer to fill with fp regs value
+        byte[] regBuffer = new byte[totalBufferSize];
+
+        // Filling the buffer
+        int regBufferIndex = 0;
+        for (int i = 0; i < ppc64FloatingPointerRegMap.length; i++) {
+            int registerSize = ppc64FloatingPointerRegMap[i].getType().getSize();
+            byte[] currentRegBuffer = new byte[registerSize];
+            task.access(ppc64FloatingPointerRegMap[i], 0,
+                        registerSize, currentRegBuffer, 0, false);
+            for(int j=0; j < registerSize; j++) {
+                regBuffer[regBufferIndex] = currentRegBuffer[j];
+                regBufferIndex++;
+            }
+        }
 
-	// Write it
-	nhdrEntry.setNhdrDesc(ElfNhdrType.NT_FPREGSET, fpRegSet);
-    }
+        // Write FP Register info over wholesae. Do not interpret.
+        fpRegSet.setFPRegisterBuffer(regBuffer);
 
-    /* (non-Javadoc)
+        // Write it
+        nhdrEntry.setNhdrDesc(ElfNhdrType.NT_FPREGSET, fpRegSet);
+   }
+
+    /*F(non-Javadoc)
      * @see frysk.util.LinuxElfCorefile#writeNotePRXFPRegset(lib.dwfl.ElfNhdr, frysk.proc.Task)
      */
     protected boolean writeNotePRXFPRegset(ElfNhdr nhdrEntry, Task task) {
diff --git a/frysk-core/frysk/util/TestFCore.java b/frysk-core/frysk/util/TestFCore.java
index 1cc29d7..9b32905 100644
--- a/frysk-core/frysk/util/TestFCore.java
+++ b/frysk-core/frysk/util/TestFCore.java
@@ -236,7 +236,8 @@ public class TestFCore
       
       // Get the live process register banks and store them
       ByteBuffer liveRegisterMaps[] = mainLiveTask.getRegisterBuffersFIXME();
-      byte[] liveRegBuffer = new byte[(int) liveRegisterMaps[0].capacity()];
+      long bankSize = liveRegisterMaps[0].capacity();
+      byte[] liveRegBuffer = new byte[(int)bankSize];
       liveRegisterMaps[0].get(0,liveRegBuffer,0,(int) liveRegisterMaps[0].capacity());
       
       // Create a corefile from process
@@ -274,6 +275,11 @@ public class TestFCore
   public void testFloatingPointRegisters ()
   {
       
+      // PowerPc doesnt have a bank for Floating Point registers
+      // this registers are with all others in the main bank
+      if (unresolvedOnPPC(4890))
+         return;	
+
       // Construct a process
       Proc ackProc = giveMeABlockedProc();
       assertNotNull("Found Process",ackProc);
diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog
index fcea6d1..d194c16 100644
--- a/frysk-sys/frysk/sys/ChangeLog
+++ b/frysk-sys/frysk/sys/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-28  Jose Flavio Aguilar Paulino <joseflavio@gmail.com>
+
+	* cni/Ptrace.cxx: Add PowerPC single register bank access
+	(its size and parammeter to access register).
+
 2007-11-15  Andrew Cagney  <cagney@redhat.com>
 
 	* Errno.java (Errno()): Delete.
diff --git a/frysk-sys/frysk/sys/cni/Ptrace.cxx b/frysk-sys/frysk/sys/cni/Ptrace.cxx
index fc08d63..5959eb3 100644
--- a/frysk-sys/frysk/sys/cni/Ptrace.cxx
+++ b/frysk-sys/frysk/sys/cni/Ptrace.cxx
@@ -76,7 +76,7 @@ op_as_string (int op)
       OP(PTRACE_SINGLESTEP);
       OP(PTRACE_CONT);
       OP(PTRACE_SYSCALL);
-#if defined(__i386__)|| defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__)
       OP(PTRACE_GETREGS);
       OP(PTRACE_SETREGS);
       OP(PTRACE_GETFPREGS);
@@ -207,6 +207,10 @@ frysk::sys::Ptrace$RegisterSet::regs ()
 #if defined(__i386__)|| defined(__x86_64__)
   return new frysk::sys::Ptrace$RegisterSet (sizeof (user_regs_struct),
 					     PTRACE_GETREGS, PTRACE_SETREGS);
+#elif defined(__powerpc64__)
+  /* PowerPc single register bank which holds ALL registers (of all kinds) */
+  return new frysk::sys::Ptrace$RegisterSet (sizeof(mcontext_t),
+                                             PTRACE_PEEKUSR , PTRACE_POKEUSR);
 #else
   return NULL;
 #endif
@@ -219,6 +223,10 @@ frysk::sys::Ptrace$RegisterSet::fpregs ()
   return new frysk::sys::Ptrace$RegisterSet (sizeof(user_fpregs_struct),
 					     PTRACE_GETFPREGS,
 					     PTRACE_SETFPREGS);
+#elif defined(__powerpc64__)
+  /* PowerPC has a single register bank (by ptrace) and it hold all
+     registers, even the floating pointer ones, special and vector regs */
+  return NULL;
 #else
   return NULL;
 #endif


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-28 13:08 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2007-11-28 13:08 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  73c6fe8aca72acc92166db968b80e906a8af83a3 (commit)
       via  4072471e58e9fcf5149975ba6fb5c10b6cb15865 (commit)
      from  f409de5e8b941428f396bde156995f2e7acc4465 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 73c6fe8aca72acc92166db968b80e906a8af83a3
Merge: 4072471e58e9fcf5149975ba6fb5c10b6cb15865 f409de5e8b941428f396bde156995f2e7acc4465
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Nov 28 13:08:21 2007 +0000

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 4072471e58e9fcf5149975ba6fb5c10b6cb15865
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Nov 28 13:07:57 2007 +0000

    Moved Corefile x8864 Register usage to Bank Register.
    
    2007-11-28  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* X8664LinuxElfCorefile.java (writeNotePrstatus): Do not use
    	getRegisterByName(). Use static X8864 register constants, and
    	task.access()
    	(bytesToBigInteger): New temporary function, pending all arch
    	refactor.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/util/ChangeLog                  |    8 +++
 frysk-core/frysk/util/X8664LinuxElfCorefile.java |   66 +++++++++++++++++++---
 2 files changed, 66 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/util/ChangeLog b/frysk-core/frysk/util/ChangeLog
index c5d7cc7..d1cda2f 100644
--- a/frysk-core/frysk/util/ChangeLog
+++ b/frysk-core/frysk/util/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-28  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* X8664LinuxElfCorefile.java (writeNotePrstatus): Do not use
+	getRegisterByName(). Use static X8864 register constants, and
+	task.access()
+	(bytesToBigInteger): New temporary function, pending all arch
+	refactor.
+
 2007-11-27  Tim Moore  <timoore@redhat.com>
 
 	* TestCountDownLatch.java (testCounters): Wrap await in while loop.
diff --git a/frysk-core/frysk/util/X8664LinuxElfCorefile.java b/frysk-core/frysk/util/X8664LinuxElfCorefile.java
index 02b474a..c2dab9d 100644
--- a/frysk-core/frysk/util/X8664LinuxElfCorefile.java
+++ b/frysk-core/frysk/util/X8664LinuxElfCorefile.java
@@ -39,9 +39,14 @@
 
 package frysk.util;
 
+import java.math.BigInteger;
+
+import frysk.isa.Register;
+import frysk.isa.X8664Registers;
 import frysk.proc.Proc;
 import frysk.proc.Task;
 import inua.eio.ByteBuffer;
+import inua.eio.ByteOrder;
 
 import lib.dwfl.ElfNhdr;
 import lib.dwfl.ElfNhdrType;
@@ -175,16 +180,43 @@ public class X8664LinuxElfCorefile extends LinuxElfCorefile {
 	// Order for these registers is found in /usr/include/asm/user.h
 	// This is not the same order that frysk iterators print out, nor
 	// are the names are the same. Create a string[] map to bridge
-	// gap between frysk and core file register order.
-	String regMap[] = { "r15", "r14", "r13", "r12", "rbp", "rbx", "r11",
-		"r10", "r9", "r8", "rax", "rcx", "rdx", "rsi",
-		"rdi", "orig_rax", "rip", "cs", "rflags", "rsp",
-		"ss", "fs_base", "gs_base", "ds", "es", "fs", "gs" };
-
+	// gap between frysk and core file register order.        
+	
+	Register[] ptraceRegisterMap = {
+	  X8664Registers.R15,
+	  X8664Registers.R14,
+	  X8664Registers.R13,
+	  X8664Registers.R12,
+	  X8664Registers.RBP,
+	  X8664Registers.RBX,
+	  X8664Registers.R11,
+	  X8664Registers.R10,
+	  X8664Registers.R9,
+	  X8664Registers.R8,
+	  X8664Registers.RAX,
+	  X8664Registers.RCX,
+	  X8664Registers.RDX,				      
+	  X8664Registers.RSI,
+	  X8664Registers.RDI,
+	  X8664Registers.ORIG_RAX,
+	  X8664Registers.RIP,
+	  X8664Registers.CS,
+	  X8664Registers.RFLAGS,
+	  X8664Registers.RSP,
+	  X8664Registers.SS,
+	  X8664Registers.FS_BASE,
+	  X8664Registers.GS_BASE,
+	  X8664Registers.DS,
+	  X8664Registers.ES,
+	  X8664Registers.FS,
+	  X8664Registers.GS};
 
 	// Set GP register info
-	for (int i = 0; i < regMap.length; i++) {
-	    prStatus.setPrGPReg(i, task.getBigIntegerRegisterFIXME(regMap[i]));
+	for (int i = 0; i < ptraceRegisterMap.length; i++) {
+	  int registerSize = ptraceRegisterMap[i].getType().getSize();
+	  byte[] byteOrderedRegister = new byte[registerSize];
+	  task.access(ptraceRegisterMap[i], 0, registerSize,	byteOrderedRegister, 0, false);
+	  prStatus.setPrGPReg(i,bytesToBigInteger(byteOrderedRegister));
 	}
 
 	// Write it
@@ -252,4 +284,22 @@ public class X8664LinuxElfCorefile extends LinuxElfCorefile {
     protected byte getElfMachineClass() {
 	return ElfEHeader.PHEADER_ELFCLASS64;
     }
+    
+    // XXX: Function to convert bytes[] to BigInteger. 
+    // Will disappear when all BankRegisters are present on all
+    // all architectures, and  we can call task.access() on all 
+    // registers, and not convert to BigInteger.
+    private BigInteger bytesToBigInteger(byte[] bytes)
+    {
+    	if (this.process.getMainTask().getISA().order() == ByteOrder.LITTLE_ENDIAN) {
+	    for (int left = 0; left < bytes.length / 2; left++) {
+		int right = bytes.length - 1 - left;
+		byte temp = bytes[left];
+		bytes[left] = bytes[right];
+		bytes[right] = temp;
+	    }
+	}
+	return new BigInteger(bytes);
+    }
+
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-28 12:04 mark
  0 siblings, 0 replies; 30+ messages in thread
From: mark @ 2007-11-28 12:04 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  86a2f5ab52c3dd06d6271f92acfef0f29b6a223a (commit)
       via  2446008a5d43d27efa95341672071fc481838d04 (commit)
      from  5faccbd2210692c1128d3c6e9ba5e604861e5933 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 86a2f5ab52c3dd06d6271f92acfef0f29b6a223a
Merge: 2446008a5d43d27efa95341672071fc481838d04 5faccbd2210692c1128d3c6e9ba5e604861e5933
Author: Mark Wielaard <mwielaard@redhat.com>
Date:   Wed Nov 28 13:03:48 2007 +0100

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 2446008a5d43d27efa95341672071fc481838d04
Author: Mark Wielaard <mwielaard@redhat.com>
Date:   Wed Nov 28 13:02:20 2007 +0100

    Remove stale .cvsignore file from libunwind.
    
    frysk-imports/libunwind/ChangeLog
    2007-11-28  Mark Wielaard  <mwielaard@redhat.com>
    
            * .cvsignore, config/.cvsignore, doc/.cvsignore,
            include/.cvsignore, src/.cvsignore, tests/.cvsignore: Removed.

-----------------------------------------------------------------------

Summary of changes:
 frysk-imports/libunwind/.cvsignore         |    5 -----
 frysk-imports/libunwind/ChangeLog          |    5 +++++
 frysk-imports/libunwind/config/.cvsignore  |    3 ---
 frysk-imports/libunwind/doc/.cvsignore     |    1 -
 frysk-imports/libunwind/include/.cvsignore |    1 -
 frysk-imports/libunwind/src/.cvsignore     |    1 -
 frysk-imports/libunwind/tests/.cvsignore   |    1 -
 7 files changed, 5 insertions(+), 12 deletions(-)
 delete mode 100644 frysk-imports/libunwind/.cvsignore
 delete mode 100644 frysk-imports/libunwind/config/.cvsignore
 delete mode 100644 frysk-imports/libunwind/doc/.cvsignore
 delete mode 100644 frysk-imports/libunwind/include/.cvsignore
 delete mode 100644 frysk-imports/libunwind/src/.cvsignore
 delete mode 100644 frysk-imports/libunwind/tests/.cvsignore

First 500 lines of diff:
diff --git a/frysk-imports/libunwind/.cvsignore b/frysk-imports/libunwind/.cvsignore
deleted file mode 100644
index f0f3aa0..0000000
--- a/frysk-imports/libunwind/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-autom4te.cache
-configure
-aclocal.m4
-Makefile.in
-config
diff --git a/frysk-imports/libunwind/ChangeLog b/frysk-imports/libunwind/ChangeLog
index fd48784..073fa37 100644
--- a/frysk-imports/libunwind/ChangeLog
+++ b/frysk-imports/libunwind/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-28  Mark Wielaard  <mwielaard@redhat.com>
+
+	* .cvsignore, config/.cvsignore, doc/.cvsignore,
+	include/.cvsignore, src/.cvsignore, tests/.cvsignore: Removed.
+
 2007-11-23  Mark Wielaard  <mwielaard@redhat.com>
 
 	Revert:
diff --git a/frysk-imports/libunwind/config/.cvsignore b/frysk-imports/libunwind/config/.cvsignore
deleted file mode 100644
index 7cff00c..0000000
--- a/frysk-imports/libunwind/config/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-config.guess
-config.sub
-ltmain.sh
diff --git a/frysk-imports/libunwind/doc/.cvsignore b/frysk-imports/libunwind/doc/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/frysk-imports/libunwind/doc/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/frysk-imports/libunwind/include/.cvsignore b/frysk-imports/libunwind/include/.cvsignore
deleted file mode 100644
index 2a9005d..0000000
--- a/frysk-imports/libunwind/include/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-config.h.in
diff --git a/frysk-imports/libunwind/src/.cvsignore b/frysk-imports/libunwind/src/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/frysk-imports/libunwind/src/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/frysk-imports/libunwind/tests/.cvsignore b/frysk-imports/libunwind/tests/.cvsignore
deleted file mode 100644
index 70845e0..0000000
--- a/frysk-imports/libunwind/tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-20 22:47 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-20 22:47 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  25d68f5c3c6ad80284c5542dd5e31101265e40ae (commit)
       via  efe9edfdc7bf60a52b68a456ca2b73594cb9244f (commit)
      from  6f7c27b1111dfb66c7fcc05999f8b491a411daad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 25d68f5c3c6ad80284c5542dd5e31101265e40ae
Merge: efe9edfdc7bf60a52b68a456ca2b73594cb9244f 6f7c27b1111dfb66c7fcc05999f8b491a411daad
Author: Stan Cox <scox@redhat.com>
Date:   Tue Nov 20 17:44:17 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit efe9edfdc7bf60a52b68a456ca2b73594cb9244f
Author: Stan Cox <scox@redhat.com>
Date:   Tue Nov 20 17:43:44 2007 -0500

    Remove unneeded reference to now removed BaseTypes.
    
    * CExprEvaluator.g:  Remove lib.dwfl.BaseTypes;

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/expr/CExprEvaluator.g |    1 -
 frysk-core/frysk/expr/ChangeLog        |    4 ++++
 2 files changed, 4 insertions(+), 1 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/expr/CExprEvaluator.g b/frysk-core/frysk/expr/CExprEvaluator.g
index 976e8a4..1cb0c25 100644
--- a/frysk-core/frysk/expr/CExprEvaluator.g
+++ b/frysk-core/frysk/expr/CExprEvaluator.g
@@ -88,7 +88,6 @@ header
     import frysk.value.Value;
     import frysk.expr.ExprSymTab;
     import inua.eio.ByteOrder;
-    import lib.dwfl.BaseTypes;
 }
 
 class CExprEvaluator extends TreeParser;
diff --git a/frysk-core/frysk/expr/ChangeLog b/frysk-core/frysk/expr/ChangeLog
index eb3fbc5..655400e 100644
--- a/frysk-core/frysk/expr/ChangeLog
+++ b/frysk-core/frysk/expr/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-20  Stan Cox  <scox@redhat.com>
+
+	* CExprEvaluator.g:  Remove lib.dwfl.BaseTypes;
+
 2007-11-20  Teresa Thomas  <tthomas@redhat.com>
 	
 	* CExprEvaluator.g: Use word size of machine to


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-19 17:58 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-19 17:58 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  fd5a20b87a3d6c171fe8888b6d006b9241f1928c (commit)
       via  1213a237d4c989ed9f1310f0c823571d78cbb8f5 (commit)
      from  1a09ef28c7da47ad245f2a502780e5e592308035 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit fd5a20b87a3d6c171fe8888b6d006b9241f1928c
Merge: 1213a237d4c989ed9f1310f0c823571d78cbb8f5 1a09ef28c7da47ad245f2a502780e5e592308035
Author: Stan Cox <scox@redhat.com>
Date:   Mon Nov 19 12:52:05 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 1213a237d4c989ed9f1310f0c823571d78cbb8f5
Author: Stan Cox <scox@redhat.com>
Date:   Mon Nov 19 12:51:38 2007 -0500

    Add indentation to toPrint. (5310)
    
    * Type.java (toPrint(PrintWriter, Location, ByteBuffer, Format, int)):
    Add indent parameter.  Change all implementers.
    (toPrint(PrintWriter writer, int indent)): Likewise.
    * Value.java (toPrint(PrintWriter, ByteBuffer, Format, int): Likewise.
    * CompositeType.java (toPrint (PrintWriter, Location, ByteBuffer,
    * gen-type-funit-tests.py (main): Allow for improved formatting of
    array of struct and ptr to struct.
    Format, int)): Remove CompositeType special case.
    (toPrint (PrintWriter, int)): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 .../frysk/debuginfo/gen-type-expect-tests.py       |    4 +-
 frysk-core/frysk/hpd/EvalCommands.java             |    6 +-
 frysk-core/frysk/pkglibdir/ChangeLog               |    5 +
 frysk-core/frysk/pkglibdir/gen-type-funit-tests.py |   80 ++++++++++----------
 frysk-core/frysk/value/ArithmeticType.java         |    2 +-
 frysk-core/frysk/value/ArrayType.java              |   18 ++--
 frysk-core/frysk/value/BooleanType.java            |    2 +-
 frysk-core/frysk/value/ChangeLog                   |   10 +++
 frysk-core/frysk/value/CharType.java               |    2 +-
 frysk-core/frysk/value/CompositeType.java          |   38 ++++------
 frysk-core/frysk/value/EnumType.java               |    4 +-
 frysk-core/frysk/value/FloatingPointType.java      |    2 +-
 frysk-core/frysk/value/FunctionType.java           |    8 +-
 frysk-core/frysk/value/IntegerType.java            |    2 +-
 frysk-core/frysk/value/PointerType.java            |   13 ++--
 frysk-core/frysk/value/Type.java                   |   12 ++--
 frysk-core/frysk/value/TypeDecorator.java          |   10 +-
 frysk-core/frysk/value/TypeDef.java                |    2 +-
 frysk-core/frysk/value/UnknownType.java            |    6 +-
 frysk-core/frysk/value/Value.java                  |   11 ++-
 frysk-core/frysk/value/Variable.java               |    4 +-
 frysk-core/frysk/value/VoidType.java               |    4 +-
 22 files changed, 128 insertions(+), 117 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
index caf26d5..c8197e2 100644
--- a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
+++ b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
@@ -115,6 +115,8 @@ public class %s extends TestLib {
 		 assertNotNull(varDie);
 		 varType = typeEntry.getType(varDie.getType());
 		 assertNotNull(varType);
+                 // System.out.println("Expect: " + expect[i].symbol + "\\n'" +
+                 //    expect[i].output + "'\\nGot:\\n'" + varType.toPrint());
 		 assertEquals(myName + expect[i].symbol, expect[i].output, varType.toPrint());
 	     }
 	}
@@ -137,7 +139,7 @@ public class %s extends TestLib {
                 assertNotNull(varDie);
 		DebugInfo debugInfo = new DebugInfo(frame);
                 Value value =  debugInfo.print(expect[i].symbol, frame);
-                value.toPrint(pw, task.getMemory(), Format.NATURAL);
+                value.toPrint(pw, task.getMemory(), Format.NATURAL, 0);
                 pw.flush();
                 String valueString = baos.toString();
                 // System.out.println("Expect: " + expect[i].symbol +
diff --git a/frysk-core/frysk/hpd/EvalCommands.java b/frysk-core/frysk/hpd/EvalCommands.java
index 1d6082a..b63e3bf 100644
--- a/frysk-core/frysk/hpd/EvalCommands.java
+++ b/frysk-core/frysk/hpd/EvalCommands.java
@@ -63,10 +63,10 @@ abstract class EvalCommands extends ParameterizedCommand {
 		    Type t = e.getType();
 		    if (t instanceof PointerType) {
 			writer.print("(");
-			t.toPrint(writer);
+			t.toPrint(writer, 0);
 			writer.print(") ");
 		    }	
-		    e.getValue().toPrint(writer, memory, format);
+		    e.getValue().toPrint(writer, memory, format, 0);
 		    writer.println();
 		}
 	    };
@@ -80,7 +80,7 @@ abstract class EvalCommands extends ParameterizedCommand {
 	static final Printer TYPE = new Printer() {
 		void print(Expression e, PrintWriter writer, Format format,
 			   ByteBuffer memory) {
-		    e.getType().toPrint(writer);
+		    e.getType().toPrint(writer, 0);
 		    writer.println();
 		}
 	    };
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index 607b5fb..d383139 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-19  Stan Cox  <scox@redhat.com>
+
+	* gen-type-funit-tests.py (main): Allow for improved formatting of
+	array of struct and ptr to struct.
+
 2007-11-15  Stan Cox  <scox@redhat.com>
 
 	* funit-quicksort.c: New.
diff --git a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
index a23ae24..123d477 100644
--- a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
+++ b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
@@ -417,32 +417,31 @@ c_file.add('''struct {
 }''', "struct_arr_arr_int", '''{
   .arr_arr_int={{1,2},{3,4}},
 }''')
-# ??? array doesn't know the current indentation level
 c_file.add('''struct {
   struct {
-  int int_var;
-} arr_struct[2];
+    int int_var;
+  } arr_struct[2];
 }''', "struct_arr_struct", '''{
   .arr_struct={{
-  .int_var=1,
-},{
-  .int_var=2,
-}},
+    .int_var=1,
+  },{
+    .int_var=2,
+  }},
 }''')
 c_file.add('''struct {
   union {
-  int int_var;
-} arr_union[4];
+    int int_var;
+  } arr_union[4];
 }''', "struct_arr_union", '''{
   .arr_union={{
-  .int_var=1,
-},{
-  .int_var=2,
-},{
-  .int_var=0,
-},{
-  .int_var=0,
-}},
+    .int_var=1,
+  },{
+    .int_var=2,
+  },{
+    .int_var=0,
+  },{
+    .int_var=0,
+  }},
 }''')
 c_file.add('''struct {
   int * arr_ptr[2];
@@ -532,16 +531,15 @@ c_file.add('''struct {
 c_file.add('''struct {
   int (* ptr_arr)[4];
 }''', "struct_ptr_arr", "")
-# ??? ptr  doesn't know the current indentation level
 c_file.add('''struct {
   struct {
-  int int_var;
-} * ptr_struct;
+    int int_var;
+  } * ptr_struct;
 }''', "struct_ptr_struct", "")
 c_file.add('''struct {
   union {
-  int int_var;
-} * ptr_union;
+    int int_var;
+  } * ptr_union;
 }''', "struct_ptr_union", "")
 c_file.add('''struct {
   int * * ptr_ptr;
@@ -555,28 +553,28 @@ c_file.add('''union {
 }''')
 c_file.add('''union {
   struct {
-  int int_var;
-} arr_struct[2];
+    int int_var;
+  } arr_struct[2];
 }''', "union_arr_struct", '''{
   .arr_struct={{
-  .int_var=1,
-},{
-  .int_var=0,
-}},
+    .int_var=1,
+  },{
+    .int_var=0,
+  }},
 }''')
 c_file.add('''union {
   union {
-  int int_var;
-  float float_var;
-} arr_union[2];
+    int int_var;
+    float float_var;
+  } arr_union[2];
 }''', "union_arr_union", '''{
   .arr_union={{
-  .int_var=1,
-  .float_var=1.4012985E-45,
-},{
-  .int_var=0,
-  .float_var=0.0,
-}},
+    .int_var=1,
+    .float_var=1.4012985E-45,
+  },{
+    .int_var=0,
+    .float_var=0.0,
+  }},
 }''')
 c_file.add('''union {
   int * arr_ptr[4];
@@ -671,13 +669,13 @@ c_file.add('''union {
 }''', "union_ptr_arr", "")
 c_file.add('''union {
   struct {
-  int int_var;
-} * ptr_struct;
+    int int_var;
+  } * ptr_struct;
 }''', "union_ptr_struct", "")
 c_file.add('''union {
   union {
-  int int_var;
-} * ptr_union;
+    int int_var;
+  } * ptr_union;
 }''', "union_ptr_union", "")
 c_file.add('''union {
   int * * ptr_ptr;
diff --git a/frysk-core/frysk/value/ArithmeticType.java b/frysk-core/frysk/value/ArithmeticType.java
index 4134a05..a0fc2d7 100644
--- a/frysk-core/frysk/value/ArithmeticType.java
+++ b/frysk-core/frysk/value/ArithmeticType.java
@@ -70,7 +70,7 @@ public abstract class ArithmeticType
 	return var1.assign(var2);
     }
 
-    public void toPrint(PrintWriter writer) {
+    public void toPrint(PrintWriter writer, int indent) {
 	writer.print(getName());
     }
 
diff --git a/frysk-core/frysk/value/ArrayType.java b/frysk-core/frysk/value/ArrayType.java
index 897c9ec..c5e7b06 100644
--- a/frysk-core/frysk/value/ArrayType.java
+++ b/frysk-core/frysk/value/ArrayType.java
@@ -169,8 +169,8 @@ public class ArrayType
     }
 
     void toPrint(PrintWriter writer, Location location,
-		 ByteBuffer memory, Format format) {
-	// XXX: Add dimension start/end instead of assuming {}
+		 ByteBuffer memory, Format format, int indent) {
+	// XXX: Add dimension start/end string instead of assuming {}
 	for (int i = 0; i < dimension.length - 1; i++)
 	    writer.print("{");
 	for (ArrayIterator e = new ArrayIterator(location); e.hasNext(); ) {
@@ -184,7 +184,7 @@ public class ArrayType
 		    if ((e.idx % stride[i]) == 0)
 			writer.print("{");
 	    }
-	    if (! toPrintVector(writer, type, e, memory, format))
+	    if (! toPrintVector(writer, type, e, memory, format, indent))
 	      break;
 	}
 	for (int i = 0; i < dimension.length - 1; i++)
@@ -192,7 +192,7 @@ public class ArrayType
     }
 
     private boolean toPrintVector(PrintWriter writer, Type type, ArrayIterator e,
-	    ByteBuffer memory, Format format)
+	    ByteBuffer memory, Format format, int indent)
     {
 	boolean isVector = dimension.length == 1;
 	int vectorLength = dimension[dimension.length - 1];
@@ -222,7 +222,7 @@ public class ArrayType
 		writer.print((char)c.longValue());
 	    }
 	    else {
-		type.toPrint(writer, l, memory, format);
+		type.toPrint(writer, l, memory, format, indent);
 		if (i < vectorLength - 1)
 		    writer.print(",");
 	    }
@@ -238,8 +238,8 @@ public class ArrayType
 	return noNullByte;
     }
 
-    public void toPrint(String s, PrintWriter writer) {
-	type.toPrint(writer);
+    public void toPrint(PrintWriter writer, String s, int indent) {
+	type.toPrint(writer, indent);
 	writer.print(" " + s);
 	for(int i = 0; i < this.dimension.length; i++) {
 	    writer.print("[");
@@ -248,8 +248,8 @@ public class ArrayType
 	}
     }
     
-    public void toPrint(PrintWriter writer) {
-	this.toPrint("", writer);
+    public void toPrint(PrintWriter writer, int indent) {
+	this.toPrint(writer, "", indent);
     }
     
     /* getALUs are double dispatch functions to determine 
diff --git a/frysk-core/frysk/value/BooleanType.java b/frysk-core/frysk/value/BooleanType.java
index 63001db..4db5245 100644
--- a/frysk-core/frysk/value/BooleanType.java
+++ b/frysk-core/frysk/value/BooleanType.java
@@ -71,7 +71,7 @@ public class BooleanType
 	    super.putBigInteger(location, BigInteger.ONE);
     }
     public void toPrint(PrintWriter writer, Location location,
-			ByteBuffer memory, Format format) {
+			ByteBuffer memory, Format format, int indent) {
 	if (getBigInteger(location).equals(BigInteger.ZERO))
 	    writer.print("true");
 	else
diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog
index d30cda8..3b2cf17 100644
--- a/frysk-core/frysk/value/ChangeLog
+++ b/frysk-core/frysk/value/ChangeLog
@@ -1,3 +1,13 @@
+2007-11-19  Stan Cox  <scox@redhat.com>
+
+	* Type.java (toPrint(PrintWriter, Location, ByteBuffer, Format, int)):
+	Add indent parameter.  Change all implementers.
+	(toPrint(PrintWriter writer, int indent)): Likewise.
+	* Value.java (toPrint(PrintWriter, ByteBuffer, Format, int): Likewise.
+	* CompositeType.java (toPrint (PrintWriter, Location, ByteBuffer,
+	Format, int)): Remove CompositeType special case.
+	(toPrint (PrintWriter, int)): Likewise.
+
 2007-11-18  Andrew Cagney  <cagney@redhat.com>
 
 	* ArrayType.java (completeMember(String,List)): New.
diff --git a/frysk-core/frysk/value/CharType.java b/frysk-core/frysk/value/CharType.java
index 6319c84..852ccef 100644
--- a/frysk-core/frysk/value/CharType.java
+++ b/frysk-core/frysk/value/CharType.java
@@ -62,7 +62,7 @@ public class CharType
     }
 
     public void toPrint(PrintWriter writer, Location location,
-			ByteBuffer memory, Format format) {
+			ByteBuffer memory, Format format, int indent) {
 	writer.print("'");
 	writer.print((char) getBigInteger(location).longValue());
 	writer.print("'");
diff --git a/frysk-core/frysk/value/CompositeType.java b/frysk-core/frysk/value/CompositeType.java
index 9937d28..7bc3c43 100644
--- a/frysk-core/frysk/value/CompositeType.java
+++ b/frysk-core/frysk/value/CompositeType.java
@@ -249,8 +249,12 @@ public abstract class CompositeType
 	return new ClassIterator();
     }
 
-    void toPrint(int indentation, PrintWriter writer, Location location,
-		 ByteBuffer memory, Format format) {
+    
+    
+    void toPrint(PrintWriter writer, Location location,
+		 ByteBuffer memory, Format format, int indentation) {
+	if (indentation == 0)
+	    indentation = 2;
 	String indentPrefix = "";
 	for (int indent = 1; indent <= indentation; indent++)
 	    indentPrefix = indentPrefix + " ";
@@ -269,11 +273,7 @@ public abstract class CompositeType
 		Location loc = location.slice(member.offset,
 					      member.type.getSize());
 		Value val = new Value(member.type, loc);
-		if (member.type instanceof CompositeType)
-		    ((CompositeType) member.type).toPrint(indentation + 2,
-							  writer, loc, memory, format);
-		else
-		    val.toPrint(writer, memory, format);
+		val.toPrint(writer, memory, format, indentation + 2);
 		writer.print(",\n");
 	    }
 	}
@@ -282,12 +282,7 @@ public abstract class CompositeType
 	writer.print("}");
     }
 
-    void toPrint(PrintWriter writer, Location location, ByteBuffer memory,
-		 Format format) {
-	this.toPrint(2, writer, location, memory, format);
-    }
-  
-    public void toPrint(int indentation, PrintWriter writer) {
+    public void toPrint(PrintWriter writer, int indentation) {
 	// FIXME: going away.
 	if (this.isTypedef() && this.getName() != null
 	    && this.getName().length() > 0) {
@@ -295,6 +290,8 @@ public abstract class CompositeType
 	    return;
 	}
 
+	if (indentation == 0)
+	    indentation = 2;
 	String indentPrefix = "";
 	for (int indent = 1; indent <= indentation; indent++)
 	    indentPrefix = indentPrefix + " ";
@@ -344,18 +341,19 @@ public abstract class CompositeType
 	    writer.print(indentPrefix);
 	    if (member.type.isTypedef())
 		writer.print(member.type.getName());
-	    else if (member.type instanceof CompositeType)
-		((CompositeType) member.type).toPrint(indentation + 2, writer);
 	    else if (member.type instanceof ArrayType) {
+		// For handling int x[2]
 		printName = false;
-		((ArrayType) member.type).toPrint(member.name, writer);
+		((ArrayType) member.type).toPrint(writer, member.name, indentation + 2);
 	    }
 	    else if (member.type instanceof PointerType) {
+		// For handling int (*x)[2]
 		printName = false;
-		((PointerType) member.type).toPrint(" " + member.name, writer);
+		((PointerType) member.type).toPrint(writer, " " + member.name,
+						    indentation + 2);
 	    }
 	    else
-		member.type.toPrint(writer);
+		member.type.toPrint (writer, indentation + 2);
 	    if (member.type instanceof frysk.value.FunctionType)
 		printName = false;
 	    if (printName) {
@@ -378,10 +376,6 @@ public abstract class CompositeType
 	writer.print("}");
     }
     
-    public void toPrint( PrintWriter writer) {
-	this.toPrint(2, writer);
-    }
-
     public Value member(Value var1, String member)
     {
 	DynamicMember mem = (DynamicMember)nameToMember.get(member);
diff --git a/frysk-core/frysk/value/EnumType.java b/frysk-core/frysk/value/EnumType.java
index ff59cdd..872be47 100644
--- a/frysk-core/frysk/value/EnumType.java
+++ b/frysk-core/frysk/value/EnumType.java
@@ -86,7 +86,7 @@ public class EnumType extends IntegerTypeDecorator
     // Should Format be made responsible?  So that HEX would override
     // printing the enum's name and print raw hex instead?
     void toPrint (PrintWriter writer, Location location,
-		  ByteBuffer memory, Format format) {
+		  ByteBuffer memory, Format format, int indent) {
 	BigInteger value = getBigInteger(location);
 	Member map = (Member)valueToMember.get(value);
 	if (map != null)
@@ -96,7 +96,7 @@ public class EnumType extends IntegerTypeDecorator
 	    format.print(writer, location, this);
     }
 
-    public void toPrint(PrintWriter writer) {
+    public void toPrint(PrintWriter writer, int indent) {
 	writer.print("enum");
 	if (getName() != null) {
 	    writer.print(" ");
diff --git a/frysk-core/frysk/value/FloatingPointType.java b/frysk-core/frysk/value/FloatingPointType.java
index 63aa570..9baf827 100644
--- a/frysk-core/frysk/value/FloatingPointType.java
+++ b/frysk-core/frysk/value/FloatingPointType.java
@@ -56,7 +56,7 @@ public class FloatingPointType
     }
 
     public void toPrint(PrintWriter writer, Location location,
-			ByteBuffer memory, Format format) {
+			ByteBuffer memory, Format format, int indent) {
 	// double-dispatch.
 	format.print(writer, location, this);
     }
diff --git a/frysk-core/frysk/value/FunctionType.java b/frysk-core/frysk/value/FunctionType.java
index 44efb9d..4a85845 100644
--- a/frysk-core/frysk/value/FunctionType.java
+++ b/frysk-core/frysk/value/FunctionType.java
@@ -58,23 +58,23 @@ public class FunctionType
   
    
     void toPrint(PrintWriter writer, Location location,
-		 ByteBuffer memory, Format format) {
+		 ByteBuffer memory, Format format, int indent) {
 	// XXX: Print the function's name?
 	writer.print("0x");
 	BigInteger v = new BigInteger(1, location.get(memory.order()));
 	writer.print(Long.toHexString(v.longValue()));
     }
   
-    public void toPrint(PrintWriter writer) {
+    public void toPrint(PrintWriter writer, int indent) {
 	if (returnType == null)
 	    writer.print("void");
 	else
-	    returnType.toPrint(writer);
+	    returnType.toPrint(writer, 0);
 	writer.print(" ");
 	writer.print(this.getName());
 	writer.print(" (");
 	for (int i = 0; i < this.parmTypes.size(); i++) {
-	    ((Type)this.parmTypes.get(i)).toPrint(writer);
+	    ((Type)this.parmTypes.get(i)).toPrint(writer, 0);
 	    writer.print(" ");
 	    writer.print((String)this.parmNames.get(i));
 	    if (i < this.parmTypes.size() - 1)
diff --git a/frysk-core/frysk/value/IntegerType.java b/frysk-core/frysk/value/IntegerType.java
index db9166b..2cf02ba 100644
--- a/frysk-core/frysk/value/IntegerType.java
+++ b/frysk-core/frysk/value/IntegerType.java
@@ -55,7 +55,7 @@ public abstract class IntegerType
     }
 
     void toPrint(PrintWriter writer, Location location,
-		 ByteBuffer memory, Format format) {
+		 ByteBuffer memory, Format format, int indent) {
 	// double-dispatch.
 	format.print(writer, location, this);
     }
diff --git a/frysk-core/frysk/value/PointerType.java b/frysk-core/frysk/value/PointerType.java
index f7805d8..0e6cad1 100644
--- a/frysk-core/frysk/value/PointerType.java
+++ b/frysk-core/frysk/value/PointerType.java
@@ -76,7 +76,7 @@ public class PointerType
     }
     
     void toPrint(PrintWriter writer, Location location, ByteBuffer memory,
-		 Format format) {
+		 Format format, int indent) {
 	format.print(writer, location, this);


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-17  8:35 rmoseley
  0 siblings, 0 replies; 30+ messages in thread
From: rmoseley @ 2007-11-17  8:35 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  c91caeb6b58115c176b57e419581084ee067888c (commit)
       via  b5cd3e0210e13f705c31ee46e992fbda3d61979f (commit)
      from  c9bca79bdca4785a6ca8209aaab7ffcf8ea24d1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit c91caeb6b58115c176b57e419581084ee067888c
Merge: b5cd3e0210e13f705c31ee46e992fbda3d61979f c9bca79bdca4785a6ca8209aaab7ffcf8ea24d1c
Author: Rick Moseley <rmoseley@redhat.com>
Date:   Sat Nov 17 02:35:03 2007 -0600

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk
    
    Conflicts:
    
    	frysk-core/frysk/hpd/ChangeLog

commit b5cd3e0210e13f705c31ee46e992fbda3d61979f
Author: Rick Moseley <rmoseley@redhat.com>
Date:   Sat Nov 17 02:26:53 2007 -0600

    Implement load/run capability.
    
    * AttachCommand.java: Implement load/run capability.
    * CLI.java: Ditto.
    * LoadCommand.java: Ditto.
    * RunCommand.java: Ditto.
    * TestLoadCommand: Test new load/run capability.
    * ProcTaskIDManager.java(removeProcID,manageProcSelect): New.
    * fhpd.java: Fix bz #5256.
    * TestFhd.java(testHpdCommand): Ditto.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog          |    5 +++
 frysk-core/frysk/bindir/TestFhd.java       |    2 +-
 frysk-core/frysk/bindir/fhpd.java          |   13 ++-----
 frysk-core/frysk/hpd/AttachCommand.java    |    2 +-
 frysk-core/frysk/hpd/CLI.java              |   28 ++++++++++++---
 frysk-core/frysk/hpd/ChangeLog             |    8 ++++
 frysk-core/frysk/hpd/LoadCommand.java      |    8 +++-
 frysk-core/frysk/hpd/RunCommand.java       |   49 +++++++++++++++++++++++++--
 frysk-core/frysk/hpd/TestLoadCommand.java  |   27 +++++++++++++++-
 frysk-core/frysk/rt/ChangeLog              |    4 ++
 frysk-core/frysk/rt/ProcTaskIDManager.java |   16 +++++++++
 11 files changed, 138 insertions(+), 24 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index 3280ca7..69e9e03 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-16  Rick Moseley  <rmoseley@redhat.com>
+
+	* fhpd.java: Fix bz #5256.
+	* TestFhd.java(testHpdCommand): Ditto.
+
 2007-11-16  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* fhpd.java(main): Add option -noexe. Append
diff --git a/frysk-core/frysk/bindir/TestFhd.java b/frysk-core/frysk/bindir/TestFhd.java
index 0a4865f..08d4fb1 100755
--- a/frysk-core/frysk/bindir/TestFhd.java
+++ b/frysk-core/frysk/bindir/TestFhd.java
@@ -81,7 +81,7 @@ public class TestFhd
 			   Config.getBinFile("fhpd").getPath(), 
 			   Config.getPkgLibFile("hpd-c").getPath() 
 		       });
-	e.expect(5, "Attached to process.*\n" + prompt);
+	e.expect(5, "Loaded executable file.*" + prompt);
 	e.close();
     }
   
diff --git a/frysk-core/frysk/bindir/fhpd.java b/frysk-core/frysk/bindir/fhpd.java
index f065cef..4012dd0 100644
--- a/frysk-core/frysk/bindir/fhpd.java
+++ b/frysk-core/frysk/bindir/fhpd.java
@@ -104,12 +104,7 @@ public class fhpd
 	core = corePairs[0].coreFile;
 	exeFile = corePairs[0].exeFile;
     }
-    
-  
-      
-      
     };
-    
     parser.add(new Option("noexe", "Do not attempt to read an"+
 	" executable for a corefile ") {
 	public void parsed(String exeValue) throws OptionException {
@@ -121,10 +116,10 @@ public class fhpd
 				      + exeValue);
 	  }
 	}
-      });
-    parser.setHeader("Usage: fhpd <PID> || fhpd <COREFILE> [<EXEFILE>]");
-    parser.parse(args);
+    });
     
+    parser.setHeader("Usage: fhpd <PID> || fhpd <EXEFILE> || fhpd <COREFILE> [<EXEFILE>]");
+    parser.parse(args);
     Manager.eventLoop.start();
     String line = "";
     
@@ -133,7 +128,7 @@ public class fhpd
       if (pid > 0)
         line = "attach " + pid;
       else if (execFile != null)
-        line = "run " + execFile.getCanonicalPath();
+        line = "load " + execFile.getCanonicalPath();
       else if (core != null) {
 	  line = "core " + core.getCanonicalPath();      
 	  if (exeFile != null)
diff --git a/frysk-core/frysk/hpd/AttachCommand.java b/frysk-core/frysk/hpd/AttachCommand.java
index 69c2ba2..dd3e519 100644
--- a/frysk-core/frysk/hpd/AttachCommand.java
+++ b/frysk-core/frysk/hpd/AttachCommand.java
@@ -100,7 +100,7 @@ class AttachCommand extends ParameterizedCommand {
 		cli.outWriter.println(pid);
 		continue;
 	    }
-	    cli.doAttach(findProc.proc);
+	    cli.doAttach(findProc.proc, -1);
 	}
     }
 
diff --git a/frysk-core/frysk/hpd/CLI.java b/frysk-core/frysk/hpd/CLI.java
index d7fcf07..2134399 100644
--- a/frysk-core/frysk/hpd/CLI.java
+++ b/frysk-core/frysk/hpd/CLI.java
@@ -69,6 +69,8 @@ public class CLI {
     CountDownLatch attachedLatch;
     //Processes started with run command
     final HashSet runningProcs = new HashSet();
+    //Processes loaded with load command
+    final HashSet loadedProcs = new HashSet();
 
     private class TaskInfo {
         DebugInfoFrame frame;
@@ -125,14 +127,14 @@ public class CLI {
 	} catch (RuntimeException e) {
 	    if (nasty(e))
 		e.printStackTrace(outWriter);
-	    return -1;		
+	    return -1;
 	}
     }
 
     /*
      * Command handlers
      */
-    public void doAttach(Proc proc) {
+    public void doAttach(Proc proc, int procID) {
         synchronized (this) {
             attached = -1;
             attachedLatch = new CountDownLatch(1);
@@ -144,7 +146,7 @@ public class CLI {
 	    outWriter.print("Attached to process ");
 	    outWriter.println(attached);
         } catch (InterruptedException ie) {
-	    throw new RuntimeException("attachLatch interrupted");
+            throw new RuntimeException("attachLatch interrupted");
         } finally {
             synchronized (this) {
                 attached = -1;
@@ -152,7 +154,12 @@ public class CLI {
             }
         }
         steppingEngine.getBreakpointManager().manageProcess(proc);
-        idManager.manageProc(proc, idManager.reserveProcID());
+        // If passed a taskID < 0, request a reserved ProcID
+        if (procID < 0)
+            idManager.manageProc(proc, idManager.reserveProcID());
+        // Assign this proc to the passed in procID 
+        else
+            idManager.manageProcSelect(proc, procID);
     }
 
     final PrintWriter outWriter;
@@ -255,13 +262,13 @@ public class CLI {
                 }
             }
             catch (RuntimeException e) {
-		printError(e);
+                printError(e);
             }
             flushMessages();
         }
         return null;
     }
-
+    
     /**
      * Identify "nasty", or internal exceptions; these are the
      * RuntimeExceptions thrown by the Java system.
@@ -435,6 +442,15 @@ public class CLI {
         return runningProcs;
     }
  
+    /**
+     * Get the set of processes (Proc) started by the load command. Access to the
+     * CLI object should be synchronized when using the set.
+     * @return the set
+     */
+    public HashSet getLoadedProcs() {
+        return loadedProcs;
+    }
+    
     SteppingEngine getSteppingEngine () {
         return this.steppingEngine;
     }
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index b5690a0..e743c96 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-16  Rick Moseley  <rmoseley@redhat.com>
+
+	* AttachCommand.java: Implement load/run capability.
+	* CLI.java: Ditto.
+	* LoadCommand.java: Ditto.
+	* RunCommand.java: Ditto.
+	* TestLoadCommand: Test new load/run capability.
+	
 2007-11-16  Stan Cox  <scox@redhat.com>
 
 	* TestListCommand.java (testListPC): Use sendCommandExpectPrompt.
diff --git a/frysk-core/frysk/hpd/LoadCommand.java b/frysk-core/frysk/hpd/LoadCommand.java
index cbad88d..d3f61e9 100644
--- a/frysk-core/frysk/hpd/LoadCommand.java
+++ b/frysk-core/frysk/hpd/LoadCommand.java
@@ -70,9 +70,10 @@ public class LoadCommand extends ParameterizedCommand {
 
 	File executableFile = new File(cmd.parameter(0));
 
-	if (!executableFile.exists() || !executableFile.canRead()) {
+	if (!executableFile.exists() || !executableFile.canRead()
+		|| !executableFile.isFile()) {
 	    throw new InvalidCommandException
-		("File does not exist or is not readable.");
+		("File does not exist or is not readable or is not a file.");
 	}
 
 	Host exeHost = new LinuxExeHost(Manager.eventLoop, executableFile);
@@ -97,6 +98,9 @@ public class LoadCommand extends ParameterizedCommand {
 			frame));
 	    }
 	}
+	synchronized (cli) {
+	    cli.getLoadedProcs().add(exeProc);
+	}
     }
 
 
diff --git a/frysk-core/frysk/hpd/RunCommand.java b/frysk-core/frysk/hpd/RunCommand.java
index f50feb3..2fec965 100644
--- a/frysk-core/frysk/hpd/RunCommand.java
+++ b/frysk-core/frysk/hpd/RunCommand.java
@@ -48,6 +48,7 @@ import frysk.proc.Task;
 import frysk.proc.TaskObserver;
 import frysk.util.CountDownLatch;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 
 class RunCommand extends Command {
@@ -116,10 +117,44 @@ class RunCommand extends Command {
     }
 
     public void interpret(CLI cli, Input cmd) {
+	/* If the run command is given no args, check to see if 
+	   any procs were loaded with the load command or loaded
+	   when fhpd was started */
 	if (cmd.size() < 1) {
-	    // XXX: should default to previous values.
-	    throw new InvalidCommandException("missing program");
+	    if (cli.runningProcs.isEmpty() && cli.loadedProcs.isEmpty())
+		throw new InvalidCommandException("missing program");
 	}
+	
+	// If a parameter was given the run command, go ahead and run it
+	if (cmd.size() >= 1) {
+	    run(cli, cmd);
+	    return;
+	}
+	
+	/* If we made it here, a run command was given with no parameters
+	 * and there are either running procs or loaded procs
+	 */
+	
+	/* This is the case where there are loaded procs */
+	if (!cli.loadedProcs.isEmpty()) {
+	    Iterator foo = cli.targetset.getTasks();
+	    while (foo.hasNext()) {
+		Task task = (Task) foo.next();
+		int taskID = cli.idManager.getProcID(task.getProc());
+		cli.execCommand("run " + task.getProc().getExe() + " " +
+			Integer.toString(taskID));
+	    }
+	    // Clear all of the loaded procs now that they have been run
+	    synchronized(cli) {
+		cli.loadedProcs.clear();
+	    }
+	}
+	// Found no loaded procs, print usage message
+	// XXX Need to fix, add core files and running proc handling
+	else throw new InvalidCommandException("missing program");  
+    }
+	
+    private void run(CLI cli, Input cmd) {
 	Runner runner = new Runner(cli);
 	Manager.host.requestCreateAttachedProc(cmd.stringArrayValue(), runner);
         try {
@@ -128,10 +163,16 @@ class RunCommand extends Command {
             return;
         }
         // register with SteppingEngine et.al.
-	cli.doAttach(runner.launchedTask.getProc());
+        // If a second parameter was passed, it was a specific ProcTaskID to use
+        if (cmd.size() > 1)
+            cli.doAttach(runner.launchedTask.getProc(), 
+        	    Integer.parseInt(cmd.parameter(1)));
+        // If not, pass a -1 so a new ProcTaskID will be assigned
+        else
+            cli.doAttach(runner.launchedTask.getProc(), -1);
 	runner.launchedTask.requestUnblock(runner);
     }
-
+    
     int complete(CLI cli, Input input, int cursor, List completions) {
 	return CompletionFactory.completeFileName(cli, input, cursor,
 						  completions);
diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java
index 467ccbc..10eeee4 100644
--- a/frysk-core/frysk/hpd/TestLoadCommand.java
+++ b/frysk-core/frysk/hpd/TestLoadCommand.java
@@ -59,7 +59,32 @@ public class TestLoadCommand extends TestLib {
 	e = new HpdTestbed();
 	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath()
 		+ "foo\n");
-	e.expect(5, "File does not exist or is not readable.*");
+	e.expect(5, "File does not exist or is not readable*");
+	e.close();
+    }
+    
+    public void testLoadRun() {
+	e = new HpdTestbed();
+	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
+		+ "\n");
+	e.expect(5, "Loaded executable file.*" + prompt);
+	e.send("focus\n");
+	e.expect(5, "Target set*");
+	e.expect(5, "[0.0]*0*0*");
+	e.send("load " + Config.getPkgLibFile("funit-hello").getPath()
+		+ "\n");
+	e.expect(5, "Loaded executable file.*" + prompt);
+	e.send("focus\n");
+	e.expect(5, "Target set*");
+	e.expect(5, "[0.0]*0*0*");
+	e.expect(5, "[1.0]*0*0*" + prompt);
+	e.send("run\n");
+	e.expect(5, "Attached to process*");
+	e.expect(5, "Attached to process*");
+	e.send("focus\n");
+	e.expect(5, "Target set*");
+	e.expect(5, "[0.0]*");
+	e.expect(5, "[1.0]*" + prompt);
 	e.close();
     }
 }
diff --git a/frysk-core/frysk/rt/ChangeLog b/frysk-core/frysk/rt/ChangeLog
index f1f42ec..b7ac848 100644
--- a/frysk-core/frysk/rt/ChangeLog
+++ b/frysk-core/frysk/rt/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-16  Rick Moseley  <rmoseley@redhat.com>
+
+	* ProcTaskIDManager.java(removeProcID,manageProcSelect): New.
+
 2007-11-06  Tim Moore  <timoore@redhat.com>
     
     	* BreakpointManager.java (refreshBreakpoints): Enable breakpoint
diff --git a/frysk-core/frysk/rt/ProcTaskIDManager.java b/frysk-core/frysk/rt/ProcTaskIDManager.java
index d24086f..1e8934e 100644
--- a/frysk-core/frysk/rt/ProcTaskIDManager.java
+++ b/frysk-core/frysk/rt/ProcTaskIDManager.java
@@ -87,6 +87,15 @@ public class ProcTaskIDManager
         procList.add(null);
         return result;
     }
+    
+    public void manageProcSelect(Proc proc, int usedID) {
+	ProcEntry entry;
+	synchronized (this) {
+	    entry = new ProcEntry(proc, usedID);
+	    procList.set(usedID, entry);
+	    procMap.put(proc, new Integer(usedID));
+	}
+    }
 
     public void manageProc(Proc proc, int reservedID) {
         ProcEntry entry;
@@ -103,6 +112,13 @@ public class ProcTaskIDManager
         else
             return null;
     }
+    
+    public synchronized boolean removeProcID(int id) {
+	if (id > procList.size() || id < 0)
+	    return false;
+	procList.remove(id);
+	return true;
+    }
 
     public synchronized int getProcID(Proc proc) {
         Integer result = (Integer)procMap.get(proc);


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-16 15:59 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-16 15:59 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  c0c08f0972f8bf58b60bad249421032b17e55f63 (commit)
       via  f76200f31dc070adaff33426daa90b239dd53865 (commit)
      from  afccca1009fdea92c30ebc3a34227045daa6d929 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit c0c08f0972f8bf58b60bad249421032b17e55f63
Merge: f76200f31dc070adaff33426daa90b239dd53865 afccca1009fdea92c30ebc3a34227045daa6d929
Author: Stan Cox <scox@redhat.com>
Date:   Fri Nov 16 10:57:20 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit f76200f31dc070adaff33426daa90b239dd53865
Author: Stan Cox <scox@redhat.com>
Date:   Fri Nov 16 10:56:57 2007 -0500

    Use sendCommandExpectPrompt where applicable.
    
    * TestListCommand.java (testListPC): Use sendCommandExpectPrompt.
    (testListFunction): Likewise.
    (testListReverse): Likewise.
    (testListErrors): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    7 +++++++
 frysk-core/frysk/hpd/TestListCommand.java |   22 ++++++++--------------
 2 files changed, 15 insertions(+), 14 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 0f67675..b5690a0 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-16  Stan Cox  <scox@redhat.com>
+
+	* TestListCommand.java (testListPC): Use sendCommandExpectPrompt.
+	(testListFunction): Likewise.
+	(testListReverse): Likewise.
+	(testListErrors): Likewise.
+
 2007-11-15  Stan Cox  <scox@redhat.com>
 	* TestListCommand.java (testListPC): Change to use funit-quicksort.
 	(testListFunction): Likewise.
diff --git a/frysk-core/frysk/hpd/TestListCommand.java b/frysk-core/frysk/hpd/TestListCommand.java
index ae3fb49..8b2a015 100644
--- a/frysk-core/frysk/hpd/TestListCommand.java
+++ b/frysk-core/frysk/hpd/TestListCommand.java
@@ -52,8 +52,7 @@ public class TestListCommand extends TestLib {
 
     public void testListPC() {
 	e = HpdTestbed.run("funit-quicksort");
-        e.send("break main\n");
-        e.expect("breakpoint.*" + prompt);
+	e.sendCommandExpectPrompt("break main", "breakpoint.*");
         e.send("go\n");
         e.expect("go.*\n" + prompt + "Breakpoint");
 	// Matching the list expected output is a trial and error process
@@ -80,8 +79,7 @@ public class TestListCommand extends TestLib {
 
     public void testListFunction() {
 	e = HpdTestbed.run("funit-quicksort");
-        e.send("break main\n");
-        e.expect("breakpoint.*" + prompt);
+	e.sendCommandExpectPrompt("break main", "breakpoint.*");
         e.send("go\n");
         e.expect("go.*\n" + prompt + "Breakpoint");
 	e.send("list\n");
@@ -125,8 +123,7 @@ public class TestListCommand extends TestLib {
 
     public void testListReverse() {
 	e = HpdTestbed.run("funit-quicksort");
-        e.send("break main\n");
-        e.expect("breakpoint.*" + prompt);
+	e.sendCommandExpectPrompt("break main", "breakpoint.*");
         e.send("go\n");
         e.expect("go.*\n" + prompt + "Breakpoint");
 	e.send("list\n");
@@ -160,16 +157,13 @@ public class TestListCommand extends TestLib {
 
     public void testListErrors() {
 	e = HpdTestbed.run("funit-quicksort");
-        e.send("break main\n");
-        e.expect("breakpoint.*" + prompt);
+	e.sendCommandExpectPrompt("break main", "breakpoint.*");
         e.send("go\n");
         e.expect("go.*\n" + prompt + "Breakpoint");
-	e.send("list x\n");
-	e.expect(".*function x not found.*" + prompt);
-	e.send("list xyz\n");
-	e.expect(".*symbol xyz not found.*" + prompt);
-        e.send("quit\n");
-        e.expect("quit.*\nQuitting...");
+	e.sendCommandExpectPrompt("list x", ".*function x not found.*"); 
+	e.sendCommandExpectPrompt("list xyz", ".*symbol xyz not found.*");
+	e.send("quit\n");
+	e.expect("quit.*\nQuitting...");
         e.close();
     }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-16 14:59 pmuldoon
  0 siblings, 0 replies; 30+ messages in thread
From: pmuldoon @ 2007-11-16 14:59 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  afccca1009fdea92c30ebc3a34227045daa6d929 (commit)
       via  baa1c43a2327ef44189fc18bfbc68a7155843b29 (commit)
      from  61c0f2d4090b4e683195cd530fb9ce4eef33c9b6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit afccca1009fdea92c30ebc3a34227045daa6d929
Merge: baa1c43a2327ef44189fc18bfbc68a7155843b29 61c0f2d4090b4e683195cd530fb9ce4eef33c9b6
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Fri Nov 16 14:59:27 2007 +0000

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit baa1c43a2327ef44189fc18bfbc68a7155843b29
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Fri Nov 16 14:59:01 2007 +0000

    Correct previous commit 8 space indention.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/fhpd.java |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/fhpd.java b/frysk-core/frysk/bindir/fhpd.java
index 167adde..f065cef 100644
--- a/frysk-core/frysk/bindir/fhpd.java
+++ b/frysk-core/frysk/bindir/fhpd.java
@@ -110,19 +110,18 @@ public class fhpd
       
     };
     
-    parser.add(new Option("noexe", 
-				" Do not attempt to read an executable for a corefile") {
-			public void parsed(String exeValue) throws OptionException {
-				try {
-					noExe = true;
-
-				} catch (IllegalArgumentException e) {
-					throw new OptionException("Invalid noexe parameter "
-							+ exeValue);
-				}
-
-			}
-		});
+    parser.add(new Option("noexe", "Do not attempt to read an"+
+	" executable for a corefile ") {
+	public void parsed(String exeValue) throws OptionException {
+	  try {
+	    noExe = true;
+	    
+	  } catch (IllegalArgumentException e) {
+	    throw new OptionException("Invalid noexe parameter "
+				      + exeValue);
+	  }
+	}
+      });
     parser.setHeader("Usage: fhpd <PID> || fhpd <COREFILE> [<EXEFILE>]");
     parser.parse(args);
     
@@ -138,9 +137,9 @@ public class fhpd
       else if (core != null) {
 	  line = "core " + core.getCanonicalPath();      
 	  if (exeFile != null)
-	      line += " " + exeFile.getCanonicalPath();
+	    line += " " + exeFile.getCanonicalPath();
 	  else if (noExe)
-		  line +=" -noexe";
+	    line +=" -noexe";
       }
     }
     catch (IOException ignore) {}


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-14  2:38 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-14  2:38 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  7b8e7ff2a2900c7837e1fee0de204f049fa01e58 (commit)
       via  208d3e75e13ae1fbf8f8c24b222e34a2ef5054fb (commit)
      from  9198be3c3245c0e8a8ab7cd054e99306d1a51250 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 7b8e7ff2a2900c7837e1fee0de204f049fa01e58
Merge: 208d3e75e13ae1fbf8f8c24b222e34a2ef5054fb 9198be3c3245c0e8a8ab7cd054e99306d1a51250
Author: Stan Cox <scox@redhat.com>
Date:   Tue Nov 13 21:36:31 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 208d3e75e13ae1fbf8f8c24b222e34a2ef5054fb
Author: Stan Cox <scox@redhat.com>
Date:   Tue Nov 13 21:04:02 2007 -0500

    Add tests for hpd list request.
    
    * ListCommand.java (interpret): Check that symbol is a subprogram.
    Fix reversing.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    5 +
 frysk-core/frysk/hpd/ListCommand.java     |   22 ++++--
 frysk-core/frysk/hpd/TestListCommand.java |  129 +++++++++++++++++++++++++++++
 3 files changed, 149 insertions(+), 7 deletions(-)
 create mode 100644 frysk-core/frysk/hpd/TestListCommand.java

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 6115ec8..3905c2e 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-13  Stan Cox  <scox@redhat.com>
+
+	* ListCommand.java (interpret): Check that symbol is a subprogram.
+	Fix reversing.  
+
 2007-11-13  Andrew Cagney  <cagney@redhat.com>
 
 	* Input.java (getAction): Delete.
diff --git a/frysk-core/frysk/hpd/ListCommand.java b/frysk-core/frysk/hpd/ListCommand.java
index c4f3cc4..81dbd74 100644
--- a/frysk-core/frysk/hpd/ListCommand.java
+++ b/frysk-core/frysk/hpd/ListCommand.java
@@ -46,6 +46,7 @@ import java.io.IOException;
 import java.io.LineNumberReader;
 import java.util.Iterator;
 import lib.dwfl.DwarfDie;
+import lib.dwfl.DwTag; 
 import frysk.debuginfo.DebugInfoFrame;
 import frysk.debuginfo.DebugInfo;
 import frysk.proc.Task;
@@ -80,6 +81,7 @@ class ListCommand extends ParameterizedCommand {
     private File file = null;
     private int line;
     private int exec_line = 0;
+
     void interpret(CLI cli, Input cmd, Object o) {
 	Options options = (Options)o;
         PTSet ptset = cli.getCommandPTSet(cmd);
@@ -113,18 +115,24 @@ class ListCommand extends ParameterizedCommand {
 			    funcDie = debugInfo
 				.getSymbolDie(cmd.parameter(0));
                         }
-                        line = (int)funcDie.getDeclLine();
+			if (funcDie.getTag().hashCode() == DwTag.SUBPROGRAM_) {
+			    line = (int)funcDie.getDeclLine();
+			    file = new File(funcDie.getDeclFile());
+			}
+			else {
+			    cli.addMessage("function " + cmd.parameter(0) + " not found.",
+					   Message.TYPE_ERROR);
+			    return;
+			}
                     }
                 }
             }
 	    else if (options.length != null) {
 		windowSize = options.length.magnitude;
-		if (options.length.sign < 0)
-		    line -= windowSize;
-		else if (options.length.sign > 0)
+		if (options.length.sign < 0) {
+		    windowSize *= -1;
 		    line += windowSize;
-		else
-		    line -= windowSize / 2;
+		}
 	    }
             else if (frame.getLines()[0].getLine() != exec_line) {
                 // list around pc.
@@ -192,7 +200,7 @@ class ListCommand extends ParameterizedCommand {
                 cli.addMessage("file " + file + " not found.",
                                Message.TYPE_ERROR);
             }
-        }
+	}
 
     }
 
diff --git a/frysk-core/frysk/hpd/TestListCommand.java b/frysk-core/frysk/hpd/TestListCommand.java
new file mode 100644
index 0000000..48c6144
--- /dev/null
+++ b/frysk-core/frysk/hpd/TestListCommand.java
@@ -0,0 +1,129 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2007 Red Hat Inc.
+//
+// FRYSK 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; version 2 of the License.
+//
+// FRYSK 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 FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// 
+// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+package frysk.hpd;
+
+
+/**
+ * Test the functionality of the alias and unalias commands.
+ */
+
+public class TestListCommand extends TestLib {
+    public void setUp() {
+	super.setUp();
+	e = new HpdTestbed();
+    }
+
+    public void testListPC() {
+	e = HpdTestbed.run("hpd-c");
+        e.send("break main\n");
+        e.expect("breakpoint.*" + prompt);
+        e.send("go\n");
+        e.expect("go.*\n" + prompt + "Breakpoint");
+	e.send("list\n");
+	e.expect(".*208.*int.*209.*int.*210.*int_21.*211.*int_21.*215.*int.*" +
+		 "216.*main.*\\*.*218.*if.*219.*fprintf" +
+		 ".*221.*int.*222.*int.*.*223.*return.*224.*");
+        e.send("quit\n");
+        e.expect("quit.*\nQuitting...");
+        e.close();
+    }
+
+    public void testListFunction() {
+	e = HpdTestbed.run("hpd-c");
+        e.send("break main\n");
+        e.expect("breakpoint.*" + prompt);
+        e.send("go\n");
+        e.expect("go.*\n" + prompt + "Breakpoint");
+	e.send("list\n");
+	e.expect(prompt);
+	e.send("list func_2\n");
+	e.expect(
+		 ".*158.*159.*typedef.*160.*static_class_t.*161.*enum.*" +
+		 "162.*static_class_t.*163.*struct.*164.*asm.*165.*struct.*" +
+		 "166.*asm.*167.*struct.*168.*struct.*169.*typedef.*" +
+		 "170.*volatile.*171.*long.*172.*int.*173.*float.*174.*char.*" +
+		 "175.*static_class_t.*176.*volatile.*177.*sportscar.*" +
+		 prompt);
+	e.send("list -length 10\n");
+	e.expect(
+		".*178.*char.*179.*short.*180.*int.*181.*long.*182.*float.*" +
+		"183.*double.*184.*assign_long_arr.*185.*assign_int_arr.*");
+        e.send("quit\n");
+        e.expect("quit.*\nQuitting...");
+        e.close();
+    }
+
+    public void testListReverse() {
+	e = HpdTestbed.run("hpd-c");
+        e.send("break main\n");
+        e.expect("breakpoint.*" + prompt);
+        e.send("go\n");
+        e.expect("go.*\n" + prompt + "Breakpoint");
+	e.send("list\n");
+	e.expect(prompt);
+	e.send("list -length -10\n");
+	e.expect(".*198.*while.*202.*return.*205.*static.*206.*func_1.*207");
+	e.send("list -length -10\n");
+	e.expect(".*188.*sportscar.*190.*int_p.*191.*class_p.*192.*class_p.*" +
+		 "193.*class_p.*194.*class_1.*196.*int_21.*197.*");
+        e.send("quit\n");
+        e.expect("quit.*\nQuitting...");
+        e.close();
+    }
+
+    public void testListErrors() {
+	e = HpdTestbed.run("hpd-c");
+        e.send("break main\n");
+        e.expect("breakpoint.*" + prompt);
+        e.send("go\n");
+        e.expect("go.*\n" + prompt + "Breakpoint");
+	e.send("list x\n");
+	e.expect(".*function x not found.*" + prompt);
+	e.send("list xyz\n");
+	e.expect(".*symbol xyz not found.*" + prompt);
+        e.send("quit\n");
+        e.expect("quit.*\nQuitting...");
+        e.close();
+    }
+}
+
+
+
+		


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-14  2:09 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-14  2:09 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  9198be3c3245c0e8a8ab7cd054e99306d1a51250 (commit)
       via  c646b2fa475a95b3ed6d0ba9e877b2d4e3ead03e (commit)
       via  e4196532f54d8a7724158b3c229d30934058721d (commit)
      from  7d8807565260d2a245e35af7ee1e06473e48588c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 9198be3c3245c0e8a8ab7cd054e99306d1a51250
Merge: c646b2fa475a95b3ed6d0ba9e877b2d4e3ead03e 7d8807565260d2a245e35af7ee1e06473e48588c
Author: Jose Flavio Aguilar Paulino <jflavio@bart.ltc.br.ibm.com>
Date:   Tue Nov 13 22:59:31 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit c646b2fa475a95b3ed6d0ba9e877b2d4e3ead03e
Author: Jose Flavio Aguilar Paulino <jflavio@bart.ltc.br.ibm.com>
Date:   Tue Nov 13 22:58:09 2007 -0200

    Fixing build system to ppc32 libunwind cni.

commit e4196532f54d8a7724158b3c229d30934058721d
Author: Jose Flavio Aguilar Paulino <jflavio@bart.ltc.br.ibm.com>
Date:   Tue Nov 13 22:47:10 2007 -0200

    Correcting last files to support libunwind CNI to PowerPC32/64.

-----------------------------------------------------------------------

Summary of changes:
 frysk-common/ChangeLog                             |    5 +++++
 frysk-common/Makefile.rules                        |    1 +
 frysk-core/ChangeLog                               |    4 ++++
 frysk-core/Makefile.am                             |    1 +
 frysk-core/frysk/stack/ChangeLog                   |    4 ++++
 frysk-core/frysk/stack/LibunwindAddressSpace.java  |    6 ++++++
 frysk-gui/ChangeLog                                |    4 ++++
 frysk-gui/Makefile.am                              |    1 +
 frysk-sys/ChangeLog                                |    4 ++++
 frysk-sys/Makefile.am                              |    1 +
 frysk-sys/lib/unwind/ChangeLog                     |    3 +++
 .../cni/{UnwindPPC64.cxx => UnwindPPC32.cxx}       |    6 +++---
 12 files changed, 37 insertions(+), 3 deletions(-)
 copy frysk-sys/lib/unwind/cni/{UnwindPPC64.cxx => UnwindPPC32.cxx} (94%)

First 500 lines of diff:
diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog
index b78e8df..a9feb80 100644
--- a/frysk-common/ChangeLog
+++ b/frysk-common/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+
+	* Makefile.rules: Add to CXX includes the directory
+	frysk-imports/libunwind-ppc32/include
+
 2007-10-31  Andrew Cagney  <cagney@redhat.com>
 
 	* Makefile.gen.sh (nodist_lib_sources): Delete.
diff --git a/frysk-common/Makefile.rules b/frysk-common/Makefile.rules
index 4115b5f..bc7a68c 100644
--- a/frysk-common/Makefile.rules
+++ b/frysk-common/Makefile.rules
@@ -178,6 +178,7 @@ AM_CXXFLAGS = \
 	-I$(top_builddir)/../frysk-imports/libunwind-i386/include \
 	-I$(top_builddir)/../frysk-imports/libunwind-x86_64/include \
 	-I$(top_builddir)/../frysk-imports/libunwind-ppc64/include \
+	-I$(top_builddir)/../frysk-imports/libunwind-ppc32/include \
 	-fPIC \
 	$(ZZZ)
 
diff --git a/frysk-core/ChangeLog b/frysk-core/ChangeLog
index 5b6cdf2..cd66969 100644
--- a/frysk-core/ChangeLog
+++ b/frysk-core/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+
+	* Makefile.am: Add libunwind-ppc32 to gcj linker dependencies. 
+
 2007-10-30  Andrew Cagney  <cagney@redhat.com>
 
 	* Makefile.am (frysk/debuginfo/TestTypeEntryType.java)
diff --git a/frysk-core/Makefile.am b/frysk-core/Makefile.am
index c110926..59be031 100644
--- a/frysk-core/Makefile.am
+++ b/frysk-core/Makefile.am
@@ -65,6 +65,7 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
+                 ../frysk-imports/libunwind-ppc32/src/.libs/libunwind-ppc32.a \
                  ../frysk-imports/libunwind-ppc64/src/.libs/libunwind-ppc64.a
 endif
 GEN_GCJ_LDADD_LIST += -lstdc++
diff --git a/frysk-core/frysk/stack/ChangeLog b/frysk-core/frysk/stack/ChangeLog
index d842a57..f5bce74 100644
--- a/frysk-core/frysk/stack/ChangeLog
+++ b/frysk-core/frysk/stack/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+	* LibunwindAddressSpace.java: Add PowerPC32/64 unwinder 
+	classes to the constructors.
+
 2007-10-19  Andrew Cagney  <cagney@redhat.com>
 
 	* StackFactory.java (printStack(PrintWriter,Frame)): Call
diff --git a/frysk-core/frysk/stack/LibunwindAddressSpace.java b/frysk-core/frysk/stack/LibunwindAddressSpace.java
index 44cd283..80eb3cf 100644
--- a/frysk-core/frysk/stack/LibunwindAddressSpace.java
+++ b/frysk-core/frysk/stack/LibunwindAddressSpace.java
@@ -43,6 +43,8 @@ import frysk.isa.Register;
 import lib.unwind.Unwind;
 import lib.unwind.UnwindX8664;
 import lib.unwind.UnwindX86;
+import lib.unwind.UnwindPPC32;
+import lib.unwind.UnwindPPC64;
 import frysk.dwfl.DwflCache;
 import frysk.dwfl.DwflFactory;
 import frysk.event.Event;
@@ -82,6 +84,10 @@ class LibunwindAddressSpace extends AddressSpace {
 	    return new UnwindX86();
 	else if (isa == ISA.X8664)
 	    return new UnwindX8664();
+	else if (isa == ISA.PPC32BE) 
+	    return new UnwindPPC32();
+	else if (isa == ISA.PPC64BE)
+	    return new UnwindPPC64();
 	else
 	    throw new RuntimeException("unhandled ISA: " + isa);
     }
diff --git a/frysk-gui/ChangeLog b/frysk-gui/ChangeLog
index 72de0c5..7fa3697 100644
--- a/frysk-gui/ChangeLog
+++ b/frysk-gui/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+
+        * Makefile.am: Add libunwind-ppc32 to gcj linker dependencies.
+
 2007-10-31  Andrew Cagney  <cagney@redhat.com>
 
 	* Makefile.am: Replace dist_glade_DATA with glade_DATA; ditto for
diff --git a/frysk-gui/Makefile.am b/frysk-gui/Makefile.am
index 734fb8d..1ba069c 100644
--- a/frysk-gui/Makefile.am
+++ b/frysk-gui/Makefile.am
@@ -70,6 +70,7 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
+                 ../frysk-imports/libunwind-ppc32/src/.libs/libunwind-ppc32.a \
                  ../frysk-imports/libunwind-ppc64/src/.libs/libunwind-ppc64.a
 endif
 GEN_GCJ_LDADD_LIST += -lstdc++
diff --git a/frysk-sys/ChangeLog b/frysk-sys/ChangeLog
index 44760ed..9d768c4 100644
--- a/frysk-sys/ChangeLog
+++ b/frysk-sys/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+
+        * Makefile.am: Add libunwind-ppc32 to gcj linker dependencies.
+
 2007-08-24  Mark Wielaard  <mwielaard@redhat.com>
 
 	* Makefile.am: Change GEN_GCJ_LDADD to GEN_GCJ_LDADD_LIST.
diff --git a/frysk-sys/Makefile.am b/frysk-sys/Makefile.am
index a6866b0..d7f8aca 100644
--- a/frysk-sys/Makefile.am
+++ b/frysk-sys/Makefile.am
@@ -62,6 +62,7 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
+		 ../frysk-imports/libunwind-ppc32/src/.libs/libunwind-ppc32.a \
                  ../frysk-imports/libunwind-ppc64/src/.libs/libunwind-ppc64.a
 endif
 GEN_GCJ_LDADD_LIST += -lstdc++ -laudit
diff --git a/frysk-sys/lib/unwind/ChangeLog b/frysk-sys/lib/unwind/ChangeLog
index ca06169..4ccd677 100644
--- a/frysk-sys/lib/unwind/ChangeLog
+++ b/frysk-sys/lib/unwind/ChangeLog
@@ -1,3 +1,6 @@
+2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+	* UnwindPPC32.cxx: New. To support powerpc32.
+
 2007-11-09  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
         * UnwindPPC32.java-sh: New
         * UnwindRegistersPPC32.shenum: New
diff --git a/frysk-sys/lib/unwind/cni/UnwindPPC64.cxx b/frysk-sys/lib/unwind/cni/UnwindPPC32.cxx
similarity index 94%
copy from frysk-sys/lib/unwind/cni/UnwindPPC64.cxx
copy to frysk-sys/lib/unwind/cni/UnwindPPC32.cxx
index bafdc9d..3c2584a 100644
--- a/frysk-sys/lib/unwind/cni/UnwindPPC64.cxx
+++ b/frysk-sys/lib/unwind/cni/UnwindPPC32.cxx
@@ -37,8 +37,8 @@
 // version and license this file solely under the GPL without
 // exception.
 
-#define TARGET UnwindPPC64
-#define LIBUNWIND_TARGET_H <libunwind-ppc64.h>
-#define LIB_UNWIND_UNWIND_TARGET_H "lib/unwind/UnwindPPC64.h"
+#define TARGET UnwindPPC32
+#define LIBUNWIND_TARGET_H <libunwind-ppc32.h>
+#define LIB_UNWIND_UNWIND_TARGET_H "lib/unwind/UnwindPPC32.h"
 
 #include "lib/unwind/cni/UnwindH.hxx"


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-13  0:41 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-13  0:41 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  815b8c4c2b6a75432eddf73cb74df27e9553acb5 (commit)
       via  847686667e0bee61585272f989e62d68595b4188 (commit)
      from  0631ebed24c1df74fb903d8429916768602aca43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 815b8c4c2b6a75432eddf73cb74df27e9553acb5
Merge: 847686667e0bee61585272f989e62d68595b4188 0631ebed24c1df74fb903d8429916768602aca43
Author: Stan Cox <scox@redhat.com>
Date:   Mon Nov 12 19:39:55 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 847686667e0bee61585272f989e62d68595b4188
Author: Stan Cox <scox@redhat.com>
Date:   Mon Nov 12 19:39:16 2007 -0500

    Fix line numbers and current line position.
    
    * ListCommand.java (interpret): Initialize from function PC.
    Right adjust line numbers.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog        |    5 +++++
 frysk-core/frysk/hpd/ListCommand.java |   25 +++++++++++++++++++------
 2 files changed, 24 insertions(+), 6 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 5f65f6c..75453df 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-12  Stan Cox  <scox@redhat.com>
+
+	* ListCommand.java (interpret): Initialize from function PC.
+	Right adjust line numbers.   
+
 2007-11-12  Andrew Cagney  <cagney@redhat.com>
 
 	* TestStackCommands.java (testFrame()): New.
diff --git a/frysk-core/frysk/hpd/ListCommand.java b/frysk-core/frysk/hpd/ListCommand.java
index 8f76a8e..c4f3cc4 100644
--- a/frysk-core/frysk/hpd/ListCommand.java
+++ b/frysk-core/frysk/hpd/ListCommand.java
@@ -132,7 +132,7 @@ class ListCommand extends ParameterizedCommand {
                 line = exec_line - 10;
             }
  
-            if (file== null) {
+            if (file == null) {
                 if (frame.getLines().length > 0) {
                     file = (frame.getLines()[0]).getFile();
                     if (file == null) {
@@ -141,7 +141,8 @@ class ListCommand extends ParameterizedCommand {
                         return;
                     }
                     line = (frame.getLines()[0]).getLine() - 10;
-                    exec_line = line;
+		    if (exec_line == 0)
+			exec_line = line;
                 }
                 else { 
                     cli.outWriter.println("No source for current frame");
@@ -158,16 +159,28 @@ class ListCommand extends ParameterizedCommand {
                 boolean display = false;
                 int endLine = line + StrictMath.abs(windowSize);
                 String flag = "";
-                while ((str = lr.readLine()) != null) 		    {
+                while ((str = lr.readLine()) != null) {
                     if (lr.getLineNumber() == line)
                         display = true;
                     else if (lr.getLineNumber() == endLine)
                         break;
                     if (display && lr.getLineNumber() == exec_line)
                         flag = "*";
-                
-                    if (display)			    {
-                        cli.outWriter.println(lr.getLineNumber() + flag + "\t "+ str);
+		    else
+			flag = " ";
+
+                    if (display) {
+			int lineNumber = lr.getLineNumber();
+			String rightAdjust;
+			if (lineNumber < 10)
+			    rightAdjust = "   ";
+			else if (lineNumber < 100)
+			    rightAdjust = "  ";
+			else if (lineNumber < 1000)
+			    rightAdjust = " ";
+			else
+			    rightAdjust = "";
+                        cli.outWriter.println(flag + rightAdjust + lineNumber + "\t "+ str);
                         flag = "";
                     }
                 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-10 14:47 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-10 14:47 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  3d96853b2e7b6935288fc4881f2a9230bc743506 (commit)
       via  26494adb8e756245aebbb591ad28aba39375aa58 (commit)
      from  bddcc9f83077db2a97348cb8689975794c819d55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 3d96853b2e7b6935288fc4881f2a9230bc743506
Merge: 26494adb8e756245aebbb591ad28aba39375aa58 bddcc9f83077db2a97348cb8689975794c819d55
Author: Jose Flavio Aguilar Paulino <jflavio@bart.ltc.br.ibm.com>
Date:   Sat Nov 10 12:47:16 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 26494adb8e756245aebbb591ad28aba39375aa58
Author: Jose Flavio Aguilar Paulino <jflavio@bart.ltc.br.ibm.com>
Date:   Sat Nov 10 02:06:29 2007 -0200

    Fix for Power64 (isa registers and groups)

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/isa/ChangeLog           |    3 +
 frysk-core/frysk/isa/PPC64Registers.java |   91 ++++++++++++++++++++++++++++--
 2 files changed, 88 insertions(+), 6 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/isa/ChangeLog b/frysk-core/frysk/isa/ChangeLog
index 671c4d2..195f4bc 100644
--- a/frysk-core/frysk/isa/ChangeLog
+++ b/frysk-core/frysk/isa/ChangeLog
@@ -1,3 +1,6 @@
+2007-11-10  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+        * PPC64Registers.java: Fixing Power64 registers and groups.
+
 2007-11-09  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
         * Fixing Power32 ISA. Patching the registers and creating 
 	register group
diff --git a/frysk-core/frysk/isa/PPC64Registers.java b/frysk-core/frysk/isa/PPC64Registers.java
index 611f16d..f93fcb1 100644
--- a/frysk-core/frysk/isa/PPC64Registers.java
+++ b/frysk-core/frysk/isa/PPC64Registers.java
@@ -173,9 +173,88 @@ public class PPC64Registers extends Registers {
     public static final Register FPR31
 	= new Register("fpr31", StandardTypes.FLOAT64B_T);
 
+    /* Special Registers */
+    public static final Register LR
+	= new Register("lr", StandardTypes.VOIDPTR64B_T);
+    public static final Register CTR
+	= new Register("ctr", StandardTypes.INT64B_T);
+    public static final Register ARG
+	= new Register("arg", StandardTypes.INT64B_T);
+    public static final Register CR
+	= new Register("cr", StandardTypes.INT64B_T);
+    public static final Register XER
+	= new Register("xer", StandardTypes.INT64B_T);
+
+    /* Alti-vec special register */
+    public static final Register VRSAVE
+	= new Register("vrsave", StandardTypes.INT64B_T);
+    public static final Register VSCR
+	= new Register("vscr", StandardTypes.INT64B_T);
+
+    /* SPUs special registers (for CELL processors) */
+    public static final Register SPEACC
+	= new Register("speacc", StandardTypes.INT64B_T);
+    public static final Register SPEFSCR
+	= new Register("spefscr", StandardTypes.INT64B_T);
+
+    /* Frame-Pointer */
+    public static final Register FRP
+	= new Register("frp", StandardTypes.VOIDPTR64B_T);
+
+    /* Next-Instruction Pointer (Program Pointer) */
     public static final Register NIP
 	= new Register("nip", StandardTypes.VOIDPTR64B_T);
 
+    /* 
+     * Defining Register Groups
+     */
+    public static final RegisterGroup GENERAL
+        = new RegisterGroup("general",
+                  new Register[] {
+                          GPR0 , GPR1 , GPR2 , GPR3 , GPR4 , GPR5 , GPR6 , GPR7 , GPR8 , GPR9 ,
+                          GPR10, GPR11, GPR12, GPR13, GPR14, GPR15, GPR16, GPR17, GPR18, GPR19,
+                          GPR20, GPR21, GPR22, GPR23, GPR24, GPR25, GPR26, GPR27, GPR28, GPR29,
+                          GPR30, GPR31 });
+
+    public static final RegisterGroup SPECIAL
+        = new RegisterGroup("special",
+                  new Register[] { LR, CTR, ARG, CR, XER, 
+                                   VRSAVE, VSCR, SPEACC, SPEFSCR, 
+                                   FRP, NIP });
+
+    public static final RegisterGroup FLOATING_POINTER
+        = new RegisterGroup("floatingpointer",
+                  new Register[] {
+                          FPR0 , FPR1 , FPR2 , FPR3 , FPR4 , FPR5 , FPR6 , FPR7 , FPR8 , FPR9 ,
+                          FPR10, FPR11, FPR12, FPR13, FPR14, FPR15, FPR16, FPR17, FPR18, FPR19,
+                          FPR20, FPR21, FPR22, FPR23, FPR24, FPR25, FPR26, FPR27, FPR28, FPR29,
+                          FPR30, FPR31 });
+
+    /*
+     * Creating the special ALL group
+     */
+    public static final RegisterGroup ALL;
+    static {
+        Register[] allRegs = new Register[
+                GENERAL.getRegisters().length +
+                SPECIAL.getRegisters().length +
+                FLOATING_POINTER.getRegisters().length];
+
+        System.arraycopy(GENERAL.getRegisters(), 0,
+                         allRegs, 0,
+                         GENERAL.getRegisters().length);
+
+        System.arraycopy(SPECIAL.getRegisters(), 0,
+                         allRegs, GENERAL.getRegisters().length,
+                         SPECIAL.getRegisters().length);
+
+        System.arraycopy(FLOATING_POINTER.getRegisters(), 0,
+                         allRegs, GENERAL.getRegisters().length + SPECIAL.getRegisters().length,
+                         FLOATING_POINTER.getRegisters().length);
+
+        ALL = new RegisterGroup("all", allRegs);
+    }
+
     public Register getProgramCounter() {
 	return NIP;
     }
@@ -185,17 +264,17 @@ public class PPC64Registers extends Registers {
     }
 
     public RegisterGroup getDefaultRegisterGroup() {
-	// FIXME!
-	return null;
+	return GENERAL;
     }
 
     public RegisterGroup getAllRegistersGroup() {
-	// FIXME!
-	return null;
+	return ALL;
     }
 
+    /* 
+     * Default Constructor
+     */
     PPC64Registers() {
-	// FIXME!
-	super(null);
+	super(new RegisterGroup[] { GENERAL, SPECIAL, FLOATING_POINTER, ALL });
     }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-10  0:34 scox
  0 siblings, 0 replies; 30+ messages in thread
From: scox @ 2007-11-10  0:34 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  15b8b363369e0940cf83a199162a1e4023bf22e5 (commit)
       via  691f275a213a2eaddb4689b83fee7bfdd8d1842c (commit)
       via  541b4186e931dab4246e5dc99efa811c06945822 (commit)
      from  3b9805588cfd98e0f769f691365f9d55b7204a01 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 15b8b363369e0940cf83a199162a1e4023bf22e5
Merge: 691f275a213a2eaddb4689b83fee7bfdd8d1842c 3b9805588cfd98e0f769f691365f9d55b7204a01
Author: Stan Cox <scox@redhat.com>
Date:   Fri Nov 9 19:32:55 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 691f275a213a2eaddb4689b83fee7bfdd8d1842c
Merge: 541b4186e931dab4246e5dc99efa811c06945822 8b867fb62647409597fd921ec3e0888e53976190
Author: Stan Cox <scox@redhat.com>
Date:   Fri Nov 9 18:02:57 2007 -0500

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit 541b4186e931dab4246e5dc99efa811c06945822
Author: Stan Cox <scox@redhat.com>
Date:   Fri Nov 9 18:02:09 2007 -0500

    Clean up array display in anticipation of turning on TestTypeEntryValue.
    
    * gen-type-expect-tests.py (j.prologue): Throttle ptr tests for now.
    * gen-type-funit-tests.py (c.add): Filter quotes, new lines, member "."
    (main): Handle char specially.  Match result formatting to fhpd
    * ArrayType.java (toPrint): Do multiple dimension here.  Move
    vector handling...
    (toPrintVector): ...here.
    expectations.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/debuginfo/ChangeLog               |    4 +
 .../frysk/debuginfo/gen-type-expect-tests.py       |   14 ++--
 frysk-core/frysk/pkglibdir/ChangeLog               |    6 ++
 frysk-core/frysk/pkglibdir/gen-type-funit-tests.py |   58 +++++++++------
 frysk-core/frysk/value/ArrayType.java              |   81 ++++++++++++++-----
 frysk-core/frysk/value/ChangeLog                   |    6 ++
 6 files changed, 117 insertions(+), 52 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index 0f09d35..83e86a8 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-09  Stan Cox  <scox@redhat.com>
+
+	* gen-type-expect-tests.py (j.prologue): Throttle ptr tests for now.
+
 2007-11-09  Sami Wagiaalla  <swagiaal@redhat.com>
 
 	* TestTypeEntry.java (testClassWithStaticMembers): New test.
diff --git a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
index 7b6f526..4d748ec 100644
--- a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
+++ b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
@@ -114,7 +114,6 @@ public class %s extends TestLib {
                      System.out.println("Error: Cannot find " + expect[i].symbol);
 		 assertNotNull(varDie);
 		 varType = typeEntry.getType(varDie.getType());
-                    // System.out.println("Expect: " + expect[i].symbol + "\\n'" + expect[i].output + "'\\nGot:\\n'" + valueString + "'");
 		 assertNotNull(varType);
 		 assertEquals(myName + expect[i].symbol, expect[i].output, varType.toPrint());
 	     }
@@ -128,11 +127,9 @@ public class %s extends TestLib {
 	    ByteArrayOutputStream baos = new ByteArrayOutputStream(32);
 	    PrintWriter pw = new PrintWriter(baos, true);
 	    for (int i = 0; i < expect.length; i++) {
-                // ??? cache address of x so &x can be checked
-	        if (expect[i].output.indexOf("&") >= 0)
-		    continue;
-                // ??? ignore char for now
-	        if (expect[i].symbol.indexOf("char_") >= 0)
+                // ??? cache address of x so &x can be checked?
+	        if (expect[i].output.indexOf("&") >= 0
+                    || expect[i].symbol.indexOf("ptr") >= 0)
 		    continue;
                 DwarfDie varDie = die.getScopeVar(allDies, expect[i].symbol);
                 if (varDie == null)
@@ -143,7 +140,9 @@ public class %s extends TestLib {
                 value.toPrint(pw, task.getMemory(), Format.NATURAL);
                 pw.flush();
                 String valueString = baos.toString();
-//                System.out.println("Expect: " + expect[i].symbol + "\\n'" + expect[i].output + "'\\nGot:\\n'" + valueString + "'");
+                // System.out.println("Expect: " + expect[i].symbol +
+                //     "\\n'" + expect[i].output + "'\\nGot:\\n'" +
+                //     valueString + "'" + " " + value.getType());
                 assertEquals(myName + expect[i].symbol, expect[i].output, valueString);
                 baos.reset();
             }
@@ -169,6 +168,7 @@ public class %s extends TestLib {
 
     def start_test(self, tool, name):
         print("    public void test%s () {" % (name))
+#        if (tool == "value" and (name == "Enum" or name == "Struct")):
         if (tool == "value"):
             print('''
         if (unresolved(5235))
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index f4de0b2..5901a1e 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-09  Stan Cox  <scox@redhat.com>
+
+	* gen-type-funit-tests.py (c.add): Filter quotes, new lines, member "."
+	(main): Handle char specially.  Match result formatting to fhpd
+	expectations. 
+
 2007-11-05  Sami Wagiaalla  <swagiaal@redhat.com>
 
 	* funit-cpp-scopes-class-static.cxx: Removed print statement.
diff --git a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
index 8a2f744..6150c40 100644
--- a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
+++ b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
@@ -21,7 +21,8 @@ class c:
             self.write(" = " + initial)
         self.c_file.write(";\n")
         self.c_file.write("// Name: " + var + var_suffix + "\n")
-        self.c_file.write("// Value: " + initial + "\n")
+        # Escape quotes and new lines, remove struct member "."
+        self.c_file.write("// Value: " + initial.replace('"','\\"').replace('\n',"\\n").replace('{.','{').replace(' .',' ') + "\n")
         self.c_file.write("// Type: ")
         type += type_arr
         self.c_file.write(type.replace("\n", "\n// Type: "))
@@ -79,14 +80,14 @@ for t in sys.argv:
 # base types we generate variables for.  used to index into limits map
 base_types=('char','short int','int','long int','long long int','float','double')
 # Used for variable initialization
-limits={'char' : {'min' : '41', 'max' : '176'},
+limits={'char' : {'min' : "'!'", 'max' : "'~'"},
         'short int' : {'min' : '-32767', 'max' : '32767'},
-        'int' : {'min' : '-2147483647', 'max' : '2147483647'},
-        'long int' : {'min' : '-2147483647L', 'max' : '2147483647L'},
-        'long long int' : {'min' : '-9223372036854775807LL', 
-                           'max' :  '9223372036854775807LL'},
-        'float' : {'min' : '1.175494E-38', 'max' : '3.402823E+38'},
-        'double' : {'min' : '2.225074E-308', 'max' : '1.797693E+308'}
+        'int' : {'min' : '-65536', 'max' : '65536'},
+        'long int' : {'min' : '-65536', 'max' : '65536'},
+        'long long int' : {'min' : '-65536', 
+                           'max' :  '65536'},
+        'float' : {'min' : '1.1754939E-38', 'max' : '3.402823E38'},
+        'double' : {'min' : '2.225074E-308', 'max' : '1.797693E308'}
 }
 type_modifiers=('const','volatile')
 
@@ -136,26 +137,37 @@ for t in base_types:
     ts = t.replace(" ","_")
     min = limits[t]['min']
     max = limits[t]['max']
-    c_file.add(t, "arr_%s" % ts, "{%s,%s}" % (min,max), " [2]")
-    c_file.add(t, "arr_arr_%s" % ts, "{{%s,%s},{%s,%s}}" % (min,max,min,max), " [2][2]")
-    c_file.add(t, "arr_arr_arr_%s" % ts, "{{{%s,%s},{%s,%s}},{{%s,%s},{%s,%s}}}" % (min,max,min,max,min,max,min,max), " [2][2][2]")
-    c_file.add("%s *" % t, "arr_ptr_arr_arr_%s" % ts, "{arr_arr_%s[0],arr_arr_%s[1]}" % (ts,ts), " [2]")
-    c_file.add("%s (*" % t, "ptr_arr_%s" % ts, "&arr_%s" % ts, ")[2]")
+    if (t == "char"):
+        char1 = min.strip("'")
+        char2 = max.strip("'")
+        c_file.add(t, "arr_%s" % ts, '"%s%s"' % (char1,char2), " [2]")
+        c_file.add(t, "arr_arr_%s" % ts, '{{"%s%s"},{"%s%s"}}' % (char1,char2,char1,char2), " [2][2]")
+        c_file.add(t, "arr_arr_arr_%s" % ts, '{{{"%s%s"},{"%s%s"}},{{"%s%s"},{"%s%s"}}}' % (char1,char2,char1,char2,char1,char2,char1,char2), " [2][2][2]")
+        c_file.add("%s *" % t, "arr_ptr_arr_arr_%s" % ts, "{arr_arr_%s[0],arr_arr_%s[1]}" % (ts,ts), " [2]")
+        c_file.add("%s (*" % t, "ptr_arr_%s" % ts, "&arr_%s" % ts, ")[2]")
+    else:
+        c_file.add(t, "arr_%s" % ts, "{%s,%s}" % (min,max), " [2]")
+        c_file.add(t, "arr_arr_%s" % ts, "{{%s,%s},{%s,%s}}" % (min,max,min,max), " [2][2]")
+        c_file.add(t, "arr_arr_arr_%s" % ts, "{{{%s,%s},{%s,%s}},{{%s,%s},{%s,%s}}}" % (min,max,min,max,min,max,min,max), " [2][2][2]")
+        c_file.add(t, "arr_arr_arr_arr_%s" % ts, 
+                   "{{{{%s,%s},{%s,%s},{%s,%s}},{{%s,%s},{%s,%s},{%s,%s}}},{{{%s,%s},{%s,%s},{%s,%s}},{{%s,%s},{%s,%s},{%s,%s}}},{{{%s,%s},{%s,%s},{%s,%s}},{{%s,%s},{%s,%s},{%s,%s}}}}" % (min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max,min,max), " [3][2][3][2]")
+        c_file.add("%s *" % t, "arr_ptr_arr_arr_%s" % ts, "{arr_arr_%s[0],arr_arr_%s[1]}" % (ts,ts), " [2]")
+        c_file.add("%s (*" % t, "ptr_arr_%s" % ts, "&arr_%s" % ts, ")[2]")
 
 c_file.write("\nstatic int one = 1, two = 2, three = 3, four = 4;\n")
 
-c_file.add("struct {\n  int int_var;\n}", "arr_struct", "{{1},{2}}", " [2]")
-c_file.add("union {\n  int int_var;\n  float fl;\n}", "arr_union", "{{1},{2}}", " [2]")
-c_file.add("struct {\n  int int_var;\n}", "arr_arr_struct", "{{{1},{2}},{{3},{4}}}", " [2][2]")
-c_file.add("union {\n  int int_var;\n  float float_var;\n}", "arr_arr_union", "{{{1},{2}},{{3},{4}}}", " [2][2]")
+c_file.add("struct {\n  int int_var;\n}", "arr_struct", "{{.int_var=1,\n},{.int_var=2,\n}}", " [2]")
+c_file.add("union {\n  int int_var;\n  float fl;\n}", "arr_union", "{{.int_var=1,\n .fl=1.4012985E-45,\n},{.int_var=1073741824,\n .fl=2.0,\n}}", " [2]")
+c_file.add("struct {\n  int int_var;\n}", "arr_arr_struct", "{{{.int_var=1,\n},{.int_var=2,\n}},{{.int_var=3,\n},{.int_var=4,\n}}}", " [2][2]")
+c_file.add("union {\n  int int_var;\n  float float_var;\n}", "arr_arr_union", "{{{.int_var=1,\n .float_var=1.4012985E-45,\n},{.int_var=2,\n .float_var=2.802597E-45,\n}},{{.int_var=3,\n .float_var=4.2038954E-45,\n},{.int_var=4,\n .float_var=5.605194E-45,\n}}}", " [2][2]")
 c_file.add("int *", "arr_arr_ptr", "{{&one,&two},{&three,&four}}", " [2][2]")
-c_file.add("struct {\n  int arr_int[2];\n}", "arr_struct_arr_int", "{{{1, 2}}, {{3, 4}}}", " [2]")
-c_file.add("struct {\n  struct {\n    int int_var;\n  } struct_a;\n}", "arr_struct_struct", "{{{1}},{{2}}}", " [2]")
-c_file.add("struct {\n  union {\n    int int_var;\n    float float_var;\n  } struct_a;\n}", "arr_struct_union", "{{{1}},{{2}}}", " [2]")
+c_file.add("struct {\n  int arr_int[2];\n}", "arr_struct_arr_int", "{{.arr_int={1,2},\n},{.arr_int={3,4},\n}}", " [2]")
+c_file.add("struct {\n  struct {\n    int int_var;\n  } struct_a;\n}", "arr_struct_struct", "{{.struct_a={.int_var=1,\n},\n},{.struct_a={.int_var=2,\n},\n}}", " [2]")
+c_file.add("struct {\n  union {\n    int int_var;\n    float float_var;\n  } struct_a;\n}", "arr_struct_union", "{{.struct_a={.int_var=1,\n .float_var=1.4012985E-45,\n},\n},{.struct_a={.int_var=2,\n .float_var=2.802597E-45,\n},\n}}", " [2]")
 c_file.add("struct {\n  int * ptr;\n}", "arr_struct_ptr", "{{&one},{&two}}", " [2]")
-c_file.add("union {\n  int arr_int[2];\n  float arr_float[2];\n}", "arr_union_arr_int", "{{{1, 2}}, {{3, 4}}}", " [2]")
-c_file.add("union {\n  struct {\n    int int_var;\n  } struct_a;\n}", "arr_union_struct", "{{{1}}, {{2}}}", " [2]")
-c_file.add("union {\n  union {\n    int int_var;\n  } union_a;\n}", "arr_union_union", "{{{1}}, {{2}}}", " [2]")
+c_file.add("union {\n  int arr_int[2];\n  float arr_float[2];\n}", "arr_union_arr_int", "{{.arr_int={1,2},\n .arr_float={1.4012985E-45,2.802597E-45},\n},{.arr_int={3,4},\n .arr_float={4.2038954E-45,5.605194E-45},\n}}", " [2]")
+c_file.add("union {\n  struct {\n    int int_var;\n  } struct_a;\n}", "arr_union_struct", "{{.struct_a={.int_var=1,\n},\n},{.struct_a={.int_var=2,\n},\n}}", " [2]")
+c_file.add("union {\n  union {\n    int int_var;\n  } union_a;\n}", "arr_union_union", "{{.union_a={.int_var=1,\n},\n},{.union_a={.int_var=2,\n},\n}}", " [2]")
 c_file.add("union {\n  int * ptr;\n}", "arr_union_ptr", "{{&one}, {&two}}", " [2]", )
 # ??? fails
 # c_file.add("int (*", "arr_ptr_arr", "{&arr_int, &arr_int}", " [2])[2]")
diff --git a/frysk-core/frysk/value/ArrayType.java b/frysk-core/frysk/value/ArrayType.java
index 6eb0893..9505874 100644
--- a/frysk-core/frysk/value/ArrayType.java
+++ b/frysk-core/frysk/value/ArrayType.java
@@ -166,39 +166,76 @@ public class ArrayType
 	Location loc = PieceLocation.createSimpleLoc
 		       (var1.getLocation().getAddress(), type.getSize(), taskMem);
 	return new Value (type, loc);  
-    }    
-    
+    }
+
     void toPrint(PrintWriter writer, Location location,
 		 ByteBuffer memory, Format format) {
-	if (type instanceof CharType) {
-	    // Treat it as a character string
+	// XXX: Add dimension start/end instead of assuming {}
+	for (int i = 0; i < dimension.length - 1; i++)
+	    writer.print("{");
+	for (ArrayIterator e = new ArrayIterator(location); e.hasNext(); ) {
+	    if (e.idx > 0) {
+		for (int i = 0; i < stride.length - 2; i++)
+		    if ((e.idx % stride[i]) == 0)
+			writer.print("}");
+		if ((e.idx % stride[stride.length - 2]) == 0)
+		    writer.print(",");
+		for (int i = 0; i < stride.length - 2; i++)
+		    if ((e.idx % stride[i]) == 0)
+			writer.print("{");
+	    }
+	    if (! toPrintVector(writer, type, e, memory, format))
+	      break;
+	}
+	for (int i = 0; i < dimension.length - 1; i++)
+	    writer.print("}");
+    }
+
+    private boolean toPrintVector(PrintWriter writer, Type type, ArrayIterator e,
+	    ByteBuffer memory, Format format)
+    {
+	boolean isVector = dimension.length == 1;
+	int vectorLength = dimension[dimension.length - 1];
+	boolean haveCharType;
+	boolean noNullByte = true;
+	if (type instanceof CharType)
+	    haveCharType = true;
+	else
+	    haveCharType = false;
+	
+	if (haveCharType) {
+	    if (! isVector)
+		writer.print("{");
 	    writer.print("\"");
-	    for (ArrayIterator e = new ArrayIterator(location);
-		 e.hasNext(); ) {
-		Location l = (Location)e.next();
+	}
+	else
+	    writer.print("{");
+
+	for (int i = 0; i < vectorLength; i++) {
+	    Location l = (Location)e.next();
+	    if (haveCharType) {
 		BigInteger c = ((CharType)type).getBigInteger(l);
-		if (c.equals(BigInteger.ZERO))
+		if (c.equals(BigInteger.ZERO)) {
+		    noNullByte = false;
 		    break; // NUL
+		}
 		writer.print((char)c.longValue());
 	    }
-	    writer.print("\"");
-	} else {
-	    for (int i = 0; i < dimension.length; i++)
-		writer.print("{");
-	    for (ArrayIterator e = new ArrayIterator(location);
-		 e.hasNext(); ) {
-		if (e.idx > 0) {
-		    if ((e.idx % dimension[dimension.length - 1]) == 0)
-			writer.print("},{");
-		    else
-			writer.print(",");
-		}
-		Location l = (Location)e.next();
+	    else {
 		type.toPrint(writer, l, memory, format);
+		if (i < vectorLength - 1)
+		    writer.print(",");
 	    }
-	    for (int i = 0; i < dimension.length; i++)
+	}
+
+	if (haveCharType) {
+	    writer.print("\"");
+	    if (! isVector)
 		writer.print("}");
 	}
+	else
+	    writer.print("}");
+	return noNullByte;
     }
 
     public void toPrint(String s, PrintWriter writer) {
diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog
index f89f379..48bf9aa 100644
--- a/frysk-core/frysk/value/ChangeLog
+++ b/frysk-core/frysk/value/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-09  Stan Cox  <scox@redhat.com>
+
+	* ArrayType.java (toPrint): Do multiple dimension here.  Move
+	vector handling...
+	(toPrintVector): ...here.
+
 2007-11-09  Teresa Thomas  <tthomas@redhat.com>
 
 	* TestValue.java (testIntOps): Test for logicalNegation,


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [SCM]  master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk
@ 2007-11-09 14:59 jflavio
  0 siblings, 0 replies; 30+ messages in thread
From: jflavio @ 2007-11-09 14:59 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  6c44fcf8aa2f01b9cc33e1a44994baac43d02a4a (commit)
       via  e9ed145fa778d99060a834f06d4221438309f7f6 (commit)
       via  cb713025e2c07f132a37d73d1dbea95dd1c5b4a8 (commit)
      from  b6cf2c808620d180fdcf03ff2e4dc0451768fef4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 6c44fcf8aa2f01b9cc33e1a44994baac43d02a4a
Merge: e9ed145fa778d99060a834f06d4221438309f7f6 b6cf2c808620d180fdcf03ff2e4dc0451768fef4
Author: Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
Date:   Fri Nov 9 12:58:34 2007 -0200

    Merge branch 'master' of ssh://sources.redhat.com/git/frysk

commit e9ed145fa778d99060a834f06d4221438309f7f6
Author: Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
Date:   Fri Nov 9 12:14:56 2007 -0200

    Fixing a minor PPC32 script issue.

commit cb713025e2c07f132a37d73d1dbea95dd1c5b4a8
Author: Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
Date:   Fri Nov 9 11:37:22 2007 -0200

    Adding scripts to generate unwind classes for Power32/64

-----------------------------------------------------------------------

Summary of changes:
 frysk-imports/libunwind/include/libunwind-ppc32.h  |    2 +-
 frysk-imports/libunwind/include/libunwind-ppc64.h  |    2 +-
 frysk-sys/lib/unwind/ChangeLog                     |    5 +++++
 .../{UnwindPPC64.java-sh => UnwindPPC32.java-sh}   |    5 ++++-
 ...stersX86.shenum => UnwindRegistersPPC32.shenum} |   13 ++++++++-----
 ...stersX86.shenum => UnwindRegistersPPC64.shenum} |   13 ++++++++-----
 6 files changed, 27 insertions(+), 13 deletions(-)
 copy frysk-sys/lib/unwind/{UnwindPPC64.java-sh => UnwindPPC32.java-sh} (95%)
 copy frysk-sys/lib/unwind/{UnwindRegistersX86.shenum => UnwindRegistersPPC32.shenum} (89%)
 copy frysk-sys/lib/unwind/{UnwindRegistersX86.shenum => UnwindRegistersPPC64.shenum} (89%)

First 500 lines of diff:
diff --git a/frysk-imports/libunwind/include/libunwind-ppc32.h b/frysk-imports/libunwind/include/libunwind-ppc32.h
index b40a84e..c45a43a 100644
--- a/frysk-imports/libunwind/include/libunwind-ppc32.h
+++ b/frysk-imports/libunwind/include/libunwind-ppc32.h
@@ -52,7 +52,7 @@ extern "C" {
  * to err on making it rather too big than too small.
  *
  * To simplify this whole process, we are at least initially taking the
- * tack that UNW_PPC32_* map straight across to the .eh_frame column register
+ * tack that ppc32 regs map straight across to the .eh_frame column register
  * numbers.  These register numbers come from gcc's source in
  * gcc/config/rs6000/rs6000.h
  *
diff --git a/frysk-imports/libunwind/include/libunwind-ppc64.h b/frysk-imports/libunwind/include/libunwind-ppc64.h
index 66420b3..1a5e626 100644
--- a/frysk-imports/libunwind/include/libunwind-ppc64.h
+++ b/frysk-imports/libunwind/include/libunwind-ppc64.h
@@ -52,7 +52,7 @@ extern "C" {
  * to err on making it rather too big than too small.
  *
  * To simplify this whole process, we are at least initially taking the
- * tack that UNW_PPC64_* map straight across to the .eh_frame column register
+ * tack that ppc64 regs map straight across to the .eh_frame column register
  * numbers.  These register numbers come from gcc's source in
  * gcc/config/rs6000/rs6000.h
  *
diff --git a/frysk-sys/lib/unwind/ChangeLog b/frysk-sys/lib/unwind/ChangeLog
index a64a04e..ca06169 100644
--- a/frysk-sys/lib/unwind/ChangeLog
+++ b/frysk-sys/lib/unwind/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-09  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
+        * UnwindPPC32.java-sh: New
+        * UnwindRegistersPPC32.shenum: New
+	* UnwindRegistersPPC64.shenum: New	
+
 2007-10-30  Andrew Cagney  <cagney@redhat.com>
 
 	* UnwindPPC64.java-sh: Rename UnwindPPC64.shjava.
diff --git a/frysk-sys/lib/unwind/UnwindPPC64.java-sh b/frysk-sys/lib/unwind/UnwindPPC32.java-sh
similarity index 95%
copy from frysk-sys/lib/unwind/UnwindPPC64.java-sh
copy to frysk-sys/lib/unwind/UnwindPPC32.java-sh
index ec3e721..3d3050e 100644
--- a/frysk-sys/lib/unwind/UnwindPPC64.java-sh
+++ b/frysk-sys/lib/unwind/UnwindPPC32.java-sh
@@ -1,7 +1,10 @@
 #!/bin/sh -e
 # This file is part of the program FRYSK.
 #
-# Copyright 2007, Red Hat Inc.
+# Copyright (C) 2006-2007 IBM
+#
+# Contributed by
+# Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
 #
 # FRYSK is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
diff --git a/frysk-sys/lib/unwind/UnwindRegistersX86.shenum b/frysk-sys/lib/unwind/UnwindRegistersPPC32.shenum
similarity index 89%
copy from frysk-sys/lib/unwind/UnwindRegistersX86.shenum
copy to frysk-sys/lib/unwind/UnwindRegistersPPC32.shenum
index 3e097b1..2f9997b 100644
--- a/frysk-sys/lib/unwind/UnwindRegistersX86.shenum
+++ b/frysk-sys/lib/unwind/UnwindRegistersPPC32.shenum
@@ -1,7 +1,10 @@
 #!/bin/sh -e
 # This file is part of the program FRYSK.
 #
-# Copyright 2007, Red Hat Inc.
+# Copyright (C) 2006-2007 IBM
+#
+# Contributed by
+# Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
 #
 # FRYSK is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -38,11 +41,11 @@
 # version and license this file solely under the GPL without
 # exception.
 
-# Generate a mkenum.sh table for the UNW_X86 encodings we are interested in.
-cat $(dirname $0)/../../../frysk-imports/libunwind/include/libunwind-x86.h | awk ' 
-    /UNW_X86/ {
+# Generate a mkenum.sh table for the UNW_PPC32 encodings we are interested in.
+cat $(dirname $0)/../../../frysk-imports/libunwind/include/libunwind-ppc32.h | awk ' 
+    /UNW_PPC32/ {
    	gsub(",","",$1) 
-   	gsub("UNW_X86_", "", $1)
+   	gsub("UNW_PPC32_", "", $1)
 	printf "%s\n", $1
     }' | awk '{printf "%s %s\n", $1, NR -1 }
 ' 2>&1
diff --git a/frysk-sys/lib/unwind/UnwindRegistersX86.shenum b/frysk-sys/lib/unwind/UnwindRegistersPPC64.shenum
similarity index 89%
copy from frysk-sys/lib/unwind/UnwindRegistersX86.shenum
copy to frysk-sys/lib/unwind/UnwindRegistersPPC64.shenum
index 3e097b1..51c515f 100644
--- a/frysk-sys/lib/unwind/UnwindRegistersX86.shenum
+++ b/frysk-sys/lib/unwind/UnwindRegistersPPC64.shenum
@@ -1,7 +1,10 @@
 #!/bin/sh -e
 # This file is part of the program FRYSK.
 #
-# Copyright 2007, Red Hat Inc.
+# Copyright (C) 2006-2007 IBM
+#
+# Contributed by
+# Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
 #
 # FRYSK is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -38,11 +41,11 @@
 # version and license this file solely under the GPL without
 # exception.
 
-# Generate a mkenum.sh table for the UNW_X86 encodings we are interested in.
-cat $(dirname $0)/../../../frysk-imports/libunwind/include/libunwind-x86.h | awk ' 
-    /UNW_X86/ {
+# Generate a mkenum.sh table for the UNW_PPC64 encodings we are interested in.
+cat $(dirname $0)/../../../frysk-imports/libunwind/include/libunwind-ppc64.h | awk ' 
+    /UNW_PPC64/ {
    	gsub(",","",$1) 
-   	gsub("UNW_X86_", "", $1)
+   	gsub("UNW_PPC64_", "", $1)
 	printf "%s\n", $1
     }' | awk '{printf "%s %s\n", $1, NR -1 }
 ' 2>&1


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2008-06-05 15:33 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 17:45 [SCM] master: Merge branch 'master' of ssh://sources.redhat.com/git/frysk jflavio
  -- strict thread matches above, loose matches on Subject: below --
2008-06-05 15:33 rmoseley
2008-05-12 16:30 rmoseley
2008-05-12 16:07 pmuldoon
2008-05-09 17:29 rmoseley
2008-04-02 22:41 pmuldoon
2008-04-01 12:28 pmuldoon
2008-03-20 20:20 rmoseley
2008-03-18 16:22 pmuldoon
2008-02-26 15:32 pmuldoon
2008-01-24 19:23 rmoseley
2008-01-23 21:10 rmoseley
2008-01-03 16:55 pmuldoon
2007-12-13 20:18 rmoseley
2007-11-30  4:24 jflavio
2007-11-28 21:40 jflavio
2007-11-28 16:20 jflavio
2007-11-28 13:08 pmuldoon
2007-11-28 12:04 mark
2007-11-20 22:47 scox
2007-11-19 17:58 scox
2007-11-17  8:35 rmoseley
2007-11-16 15:59 scox
2007-11-16 14:59 pmuldoon
2007-11-14  2:38 scox
2007-11-14  2:09 jflavio
2007-11-13  0:41 scox
2007-11-10 14:47 jflavio
2007-11-10  0:34 scox
2007-11-09 14:59 jflavio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).