* @return The string which contains the bytes as strings.
* E.g.: (123) (11) (46) (213) ...
*/
- public static String CharArrayToString (char[] cha) {
- String ret = new String ();
- int i;
- int p;
-
- for (i = 0; i < cha.length; i++) { // For all bytes within the input buffer
- p = (int) cha[i]; // Convert the byte into an integer value
- ret = ret + "(" + String.valueOf (p) + ") "; // Add the value
- }
-
- return ret;
- }
+// public static String CharArrayToString (char[] cha) {
+// String ret = new String ();
+// int i;
+// int p;
+//
+// for (i = 0; i < cha.length; i++) { // For all bytes within the input buffer
+// p = (int) cha[i]; // Convert the byte into an integer value
+// ret = ret + "(" + String.valueOf (p) + ") "; // Add the value
+// }
+//
+// return ret;
+// }
/**
*
private String evalRet = new String("");
private int rawCounter = 1000; // An rawData frame ID counter
private PHPDBGProxy proxy = null;
- private int lastCmd = -1;
+ //private int lastCmd = -1;
private int sid = 0;
private boolean stopOnError = false;
private char[] lastCommand = new char[4];
* Is this method used anywhere?
*
*/
- public void requestDBGVersion () throws IOException {
- PHPDBGPacket DBGPacket; // A DBG message packet
- PHPDBGFrame DBGFrame; // A frame within a DBG packet
-
- DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG
- DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_VER); // We want the version of DBG
-
- DBGPacket.addFrame (DBGFrame); // Add the 'what we want' to the DBG packet
-
- if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
- return; // No
- }
-
- DBGPacket.sendPacket (os); // Send the request to DBG
- }
+// public void requestDBGVersion () throws IOException {
+// PHPDBGPacket DBGPacket; // A DBG message packet
+// PHPDBGFrame DBGFrame; // A frame within a DBG packet
+//
+// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG
+// DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_VER); // We want the version of DBG
+//
+// DBGPacket.addFrame (DBGFrame); // Add the 'what we want' to the DBG packet
+//
+// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
+// return; // No
+// }
+//
+// DBGPacket.sendPacket (os); // Send the request to DBG
+// }
/**
* Called by the proxy
*
* @param modName The modul (filename).
*/
- public void addDBGModName (String modName) throws IOException {
- PHPDBGPacket DBGPacket; // A DBG message packet
- PHPDBGFrame DBGFrame; // A frame within a DBG packet
-
- DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG
- DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_RAWDATA); // We want Module name from DBG
-
- rawCounter++; // Increment the rawData ID counter
- DBGFrame.addInt (rawCounter); // FRAME_RAWDATA ID
- DBGFrame.addInt (modName.length () + 1); // The length of rawdata string (incl. null char termination)
- DBGFrame.addString (modName); // The file name (module name)
- DBGFrame.addChar ('\0'); // Add the C-String null termination
-
- DBGPacket.addFrame (DBGFrame);
-
- if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
- return; // No
- }
-
- DBGPacket.sendPacket (os);
- }
+// public void addDBGModName (String modName) throws IOException {
+// PHPDBGPacket DBGPacket; // A DBG message packet
+// PHPDBGFrame DBGFrame; // A frame within a DBG packet
+//
+// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG
+// DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_RAWDATA); // We want Module name from DBG
+//
+// rawCounter++; // Increment the rawData ID counter
+// DBGFrame.addInt (rawCounter); // FRAME_RAWDATA ID
+// DBGFrame.addInt (modName.length () + 1); // The length of rawdata string (incl. null char termination)
+// DBGFrame.addString (modName); // The file name (module name)
+// DBGFrame.addChar ('\0'); // Add the C-String null termination
+//
+// DBGPacket.addFrame (DBGFrame);
+//
+// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
+// return; // No
+// }
+//
+// DBGPacket.sendPacket (os);
+// }
/**
* This method is called for adding or removing breakpoints.
return BPUnder;
}
- public int getLastCmd()
- {
- return lastCmd;
- }
+// public int getLastCmd()
+// {
+// return lastCmd;
+// }
public int getSID()
{
public void setLastCmd (int cmd)
{
- lastCmd = cmd;
+ //lastCmd = cmd;
}
/**
/**
*
*/
- public void stopExecution () throws IOException {
- PHPDBGPacket DBGPacket;
-
- BPUnderHit = 0;
- DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_STOP);
-
- if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
- return; // No
- }
-
- DBGPacket.sendPacket (os); // Send the request to DBG
- }
+// public void stopExecution () throws IOException {
+// PHPDBGPacket DBGPacket;
+//
+// BPUnderHit = 0;
+// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_STOP);
+//
+// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG?
+// return; // No
+// }
+//
+// DBGPacket.sendPacket (os); // Send the request to DBG
+// }
/**
* This method is called by the proxy.
private String modName;
- public PHPDBGMod() {
- }
+// public PHPDBGMod() {
+// }
public PHPDBGMod(int modNo, String modName) {
this.modNo = modNo;
return modName;
}
- public void setNo(int modNo) {
- this.modNo = modNo;
- }
+// public void setNo(int modNo) {
+// this.modNo = modNo;
+// }
public void setName(String modName) {
this.modName = modName;
public class PHPDBGProxy {
private ServerSocket server = null;
- private BufferedReader reader = null;
+ //private BufferedReader reader = null;
private PHPDBGInterface DBGInt = null; // The DBG interface which is linked with the proxy
private PHPDebugTarget debugTarget = null;
private PHPDBGProxy thisProxy = null;
* Clean up the view, but leave the Debug session running.
* added by ed_mann
*/
- public void updateView(){
- getDebugTarget().updateThreads(PHPMainThread);
- }
+// public void updateView(){
+// getDebugTarget().updateThreads(PHPMainThread);
+// }
/**
* @param remote
*
* @return A server socket
*/
- protected ServerSocket getServerSocket () throws IOException {
- if (server == null) { // Do we have already a server socket
- createServerSocket (); // No, then create one
- }
-
- return server; // Return the server socket
- }
+// protected ServerSocket getServerSocket () throws IOException {
+// if (server == null) { // Do we have already a server socket
+// createServerSocket (); // No, then create one
+// }
+//
+// return server; // Return the server socket
+// }
/**
* Find a free unused port between 10001 and 10101 if the current debug session
*
* @paran DBGInt The DGB interface which is linked with this proxy
*/
- protected void setDBGInterface (PHPDBGInterface DBGInt) {
- this.DBGInt = DBGInt;
- }
+// protected void setDBGInterface (PHPDBGInterface DBGInt) {
+// this.DBGInt = DBGInt;
+// }
/**
* Get the DBG interface which is linked to this proxy
* Give back a buffered input stream for the socket which is
* linked with this proxy
*/
- public BufferedReader getReader () throws IOException {
- if (reader == null) { // Do we already have a buffered input stream
- reader = new BufferedReader (new InputStreamReader (this.getSocket ().getInputStream (),
- "ISO8859_1"));
- }
-
- return reader; // Return the buffered input stream
- }
+// public BufferedReader getReader () throws IOException {
+// if (reader == null) { // Do we already have a buffered input stream
+// reader = new BufferedReader (new InputStreamReader (this.getSocket ().getInputStream (),
+// "ISO8859_1"));
+// }
+//
+// return reader; // Return the buffered input stream
+// }
/**
*
/**
*
*/
- public void phpLoopNotify () {
- phpLoop.notifyWait ();
- }
+// public void phpLoopNotify () {
+// phpLoop.notifyWait ();
+// }
/**
*
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.widgets.Shell;
+//import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
return getDefault().internalGetActivePage();
}
- public static Shell getActiveWorkbenchShell() {
- return getActiveWorkbenchWindow().getShell();
- }
+// public static Shell getActiveWorkbenchShell() {
+// return getActiveWorkbenchWindow().getShell();
+// }
public static IWorkbenchWindow getActiveWorkbenchWindow() {
return getDefault().getWorkbench().getActiveWorkbenchWindow();
return plugin;
}
- public static String getFormattedMessage(String key, String arg) {
- String text = getResourceString(key);
- return java.text.MessageFormat.format(text, new Object[] { arg });
- }
+// public static String getFormattedMessage(String key, String arg) {
+// String text = getResourceString(key);
+// return java.text.MessageFormat.format(text, new Object[] { arg });
+// }
public static String getResourceString(String key) {
ResourceBundle bundle = plugin.getResourceBundle();
/**
* The constructor.
*/
- public PHPDebugCorePlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle
- .getBundle("net.sourceforge.phpdt.internal.debug.core.debugresources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
+// public PHPDebugCorePlugin() {
+// super();
+// plugin = this;
+// try {
+// resourceBundle = ResourceBundle
+// .getBundle("net.sourceforge.phpdt.internal.debug.core.debugresources"); //$NON-NLS-1$
+// } catch (MissingResourceException x) {
+// resourceBundle = null;
+// }
+// }
public java.util.ResourceBundle getResourceBundle() {
return resourceBundle;
return url;
}
- public static Image manage(String key, ImageDescriptor desc) {
- Image image = desc.createImage();
- PLUGIN_REGISTRY.put(key, image);
- return image;
- }
+// public static Image manage(String key, ImageDescriptor desc) {
+// Image image = desc.createImage();
+// PLUGIN_REGISTRY.put(key, image);
+// return image;
+// }
}