int bpNo= 0;
try {
PHPLineBreakpoint phpLBP;
- if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier()) {
+ if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getUniqueIdentifier()) {
IPath filename;
phpLBP= (PHPLineBreakpoint)breakpoint;
// bpNo= DBGInt.addBreakpoint(phpLBP.getMarker().getResource().getLocation().toOSString(), phpLBP.getLineNumber());
if (DBGInt == null) return;
try {
PHPLineBreakpoint phpLBP;
- if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier()) {
+ if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getUniqueIdentifier()) {
phpLBP= (PHPLineBreakpoint)breakpoint;
IPath filename;
if (remote)
throw new RuntimeException(ex.getMessage());
}
}
-
- public PHPVariable[] readInstanceVariables(PHPVariable variable) {
+
+ public PHPVariable[] eval(PHPStackFrame frame,String evalString) {
try {
- return DBGInt.getInstVars(variable);
+ return DBGInt.evalBlock(frame,evalString);
+ // return DBGInt.getVariables(frame);
+ } catch (IOException ioex) {
+ ioex.printStackTrace();
+ throw new RuntimeException(ioex.getMessage());
} catch (DebugException ex) {
ex.printStackTrace();
throw new RuntimeException(ex.getMessage());
}
-
}
public void readStepOverEnd(PHPStackFrame stackFrame) {
while (!shouldStop)
{
newconnect=true;
- try {
- newSocket = server.accept();
+ try {
+ newSocket = server.accept();
//System.out.println("Accepted! : " + socket.toString());
- } catch (SocketTimeoutException e) {
+ } catch (SocketTimeoutException e) {
// no one wants to connect
newconnect=false;
- } catch (IOException e) {
- PHPDebugCorePlugin.log(e);
- return;
- }
+ } catch (IOException e) {
+ PHPDebugCorePlugin.log(e);
+ return;
+ }
if (newconnect)
{
server.setSoTimeout(1);
newDBGInt= new PHPDBGInterface(getReader(newSocket), newSocket.getOutputStream(), thisProxy);
newDBGInt.waitResponse(1000);
- newDBGInt.flushAllPackets();
+ newDBGInt.flushAllPackets();
// Check version and session ID
- if ((DBGInt==null) || (DBGInt.getSID()==newDBGInt.getSID()))
- {
- DBGInt=newDBGInt;
+ if ((DBGInt==null) || (DBGInt.getSID()==newDBGInt.getSID()))
+ {
+ DBGInt=newDBGInt;
try {
closeSocket();
} catch (IOException e) {
PHPDebugCorePlugin.log(e);
shouldStop=true;
}
- socket=newSocket;
+ socket=newSocket;
setBreakPoints();
DBGInt.continueExecution();
- } else
- {
+ } else
+ {
newDBGInt.continueExecution();
- newSocket.close();
- }
+ newSocket.close();
+ }
}
- if(DBGInt.waitResponse(interval))
- {
+ if(DBGInt.waitResponse(interval))
+ {
- DBGInt.flushAllPackets();
-
- if (DBGInt.BPUnderHit != 0) {
- StackList = DBGInt.getStackList();
- if (StackList.length > 0) {
- for (i = 0; i < StackList.length; i++) {
- StackList[i].setThread(PHPMainThread);
- if (DBGInt.getModByNo(StackList[i].getModNo()).equals("")) {
- DBGInt.getSourceTree();
- }
- StackList[i].setFile(
- DBGInt.getModByNo(StackList[i].getModNo()));
- }
- PHPMainThread.setStackFrames(StackList);
- }
- // Fire debug event
- PHPMainThread.suspend();
-
- synchronized (this) {
- wait();
- }
- }
- }
- if (remote) {
- if (PHPMainThread.isTerminated())
- {
- shouldStop=true;
- break;
- }
- } else {
- if (PHPMainThread.isTerminated() || getDebugTarget().getProcess().isTerminated())
- {
+ DBGInt.flushAllPackets();
+
+ if (DBGInt.BPUnderHit != 0) {
+ StackList = DBGInt.getStackList();
+ if (StackList.length > 0) {
+ for (i = 0; i < StackList.length; i++) {
+ StackList[i].setThread(PHPMainThread);
+ if (DBGInt.getModByNo(StackList[i].getModNo()).equals("")) {
+ DBGInt.getSourceTree();
+ }
+ StackList[i].setFile(
+ DBGInt.getModByNo(StackList[i].getModNo()));
+ }
+ PHPMainThread.setStackFrames(StackList);
+ }
+ // Fire debug event
+ PHPMainThread.suspend();
+
+ synchronized (this) {
+ wait();
+ }
+ }
+ }
+ if (remote) {
+ if (PHPMainThread.isTerminated()) {
+ shouldStop=true;
+ break;
+ }
+ } else {
+ if (PHPMainThread.isTerminated() || getDebugTarget().getProcess().isTerminated()) {
shouldStop=true;
break;
- }
- }
+ }
+ }
+ }
+ }
+ catch (Exception ex) {
+ PHPDebugCorePlugin.log(ex);
+ System.out.println(ex);
+ }
+ finally {
+ try {
+ getDebugTarget().terminate();
+ closeSocket();
+ closeServerSocket();
+ } catch (IOException e) {
+ PHPDebugCorePlugin.log(e);
+ return;
}
- }
- catch (Exception ex) {
- PHPDebugCorePlugin.log(ex);
- System.out.println(ex);
- }
- finally {
- try {
- getDebugTarget().terminate();
- closeSocket();
- closeServerSocket();
- }
- catch (IOException e) {
- PHPDebugCorePlugin.log(e);
- return;
- }
//System.out.println("Socket loop finished.");
- }
+ }
}
}
}