projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made main memory access via the Memory view work
[Mograsim.git]
/
plugins
/
net.mograsim.plugin.core
/
src
/
net
/
mograsim
/
plugin
/
launch
/
MachineProcess.java
diff --git
a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineProcess.java
b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineProcess.java
index
b22d9c5
..
f386690
100644
(file)
--- a/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineProcess.java
+++ b/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineProcess.java
@@
-90,11
+90,9
@@
public class MachineProcess extends PlatformObject implements IProcess, ISuspend
public void suspend() throws DebugException
{
if (isTerminated())
public void suspend() throws DebugException
{
if (isTerminated())
- throw new DebugException(new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED,
- "Can't suspend a terminated MachineProcess", null));
+ throwDebugException("Can't suspend a terminated MachineProcess");
if (isSuspended())
if (isSuspended())
- throw new DebugException(new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED,
- "Can't suspend a suspended MachineProcess", null));
+ throwDebugException("Can't suspend a suspended MachineProcess");
exec.pauseLiveExecution();
fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
exec.pauseLiveExecution();
fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
@@
-110,11
+108,9
@@
public class MachineProcess extends PlatformObject implements IProcess, ISuspend
public void resume() throws DebugException
{
if (isTerminated())
public void resume() throws DebugException
{
if (isTerminated())
- throw new DebugException(new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED,
- "Can't resume a terminated MachineProcess", null));
+ throwDebugException("Can't resume a terminated MachineProcess");
if (!isSuspended())
if (!isSuspended())
- throw new DebugException(new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED,
- "Can't resume a non-suspended MachineProcess", null));
+ throwDebugException("Can't resume a non-suspended MachineProcess");
exec.unpauseLiveExecution();
fireResumeEvent(DebugEvent.CLIENT_REQUEST);
exec.unpauseLiveExecution();
fireResumeEvent(DebugEvent.CLIENT_REQUEST);
@@
-147,8
+143,7
@@
public class MachineProcess extends PlatformObject implements IProcess, ISuspend
public int getExitValue() throws DebugException
{
if (!isTerminated())
public int getExitValue() throws DebugException
{
if (!isTerminated())
- throw new DebugException(new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED,
- "Can't get the exit value of a running process", null));
+ throwDebugException("Can't get the exit value of a running process");
return 0;
}
return 0;
}
@@
-262,4
+257,10
@@
public class MachineProcess extends PlatformObject implements IProcess, ISuspend
if (manager != null)
manager.fireDebugEventSet(new DebugEvent[] { event });
}
if (manager != null)
manager.fireDebugEventSet(new DebugEvent[] { event });
}
+
+ private static void throwDebugException(String message) throws DebugException
+ {
+ throw new DebugException(
+ new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED, message, null));
+ }
}
\ No newline at end of file
}
\ No newline at end of file