From 18c13b4ce0938b3778d2ca6e43b53a70fad13ec5 Mon Sep 17 00:00:00 2001 From: schlaepfer Date: Wed, 5 Apr 2006 07:06:52 +0000 Subject: [PATCH] - epilogue bug fixec - isFreezeAsserted removed where it is not neccessary git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@124 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c --- mcdp/src/ch/ntb/mcdp/bdi/MPC555.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mcdp/src/ch/ntb/mcdp/bdi/MPC555.java b/mcdp/src/ch/ntb/mcdp/bdi/MPC555.java index 9d1a173..80f0217 100644 --- a/mcdp/src/ch/ntb/mcdp/bdi/MPC555.java +++ b/mcdp/src/ch/ntb/mcdp/bdi/MPC555.java @@ -255,7 +255,7 @@ public class MPC555 { // restore GPR30 // put instr mfspr: GPR30, DPDR - transferAndParse35(false, false, 0x7FF69AA6); + transferAndParse35(false, false, 0x7FD69AA6); // put GPR30 in DPDR logger.finer("write gpr30: 0x" + Integer.toHexString(gpr30)); transferAndParse35(false, true, gpr30); @@ -300,12 +300,8 @@ public class MPC555 { // throw an exception if EBRK (External breakpoint exception) bit is not // set if ((ecr & (EBRK_bit * 2)) <= 0) { - // TODO: change exception string - logger - .warning("Wrong debug enable cause (not due to EBRK): Exception Cause Register = " - + "0x" + Integer.toHexString(ecr)); - System.err - .println("Wrong debug enable cause (not due to EBRK): Exception Cause Register = " + throw new BDIException( + "Wrong debug enable cause (not due to EBRK): Exception Cause Register = " + "0x" + Integer.toHexString(ecr)); } } @@ -325,8 +321,6 @@ public class MPC555 { } // negate breakpoint transferAndParse35(true, true, 0x3E000000); - // check if target is in debug mode - targetInDebugMode = isFreezeAsserted(); } /** @@ -343,6 +337,9 @@ public class MPC555 { } epilogue(); + // force a check whether the freeze signal is asserted or not + // this has to be done, because the state is not updated in the epilogue + // instructions targetInDebugMode = isFreezeAsserted(); } @@ -394,7 +391,6 @@ public class MPC555 { "Wrong debug enable cause (not because of DPI): Exception Cause Register = 0x" + Integer.toHexString(ecr)); } - targetInDebugMode = true; } /**