Modified: 1764120 - Variables View doesn't show global vars in class context
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / model / PHPDBGEvalString.java
index d74a154..8916bce 100644 (file)
@@ -489,6 +489,7 @@ public class PHPDBGEvalString {
                                case 'z': ParseEvalResource (name, parent, list, var_list, startIdx);                            break;
                                case 'R': ParseEvalRef          (name, parent, list, var_list, false, startIdx);                 break;
                                case 'r': ParseEvalRef          (name, parent, list, var_list, true, startIdx);                  break;
+                               case '?': ParseEvalUnknown(name, parent, list, var_list, startIdx);                                      break;
                        }
                } catch (DebugException e) {
                        // TODO Auto-generated catch block
@@ -514,4 +515,26 @@ public class PHPDBGEvalString {
 */
                return  ret_val;                                                                                        // Always false
        }
+
+       /*
+        *
+        */
+       private void ParseEvalUnknown(String name, PHPVariable parent, Vector list,
+                       Vector var_list, int startIdx) throws DebugException {
+
+               if ((startIdx >= workStr.length()) || (workStr.charAt(startIdx) != ';')) {
+                       Status status = new Status(Status.ERROR, PHPDebugCorePlugin
+                                       .getUniqueIdentifier(), Status.OK, "unexpected response",
+                                       null);
+                       throw new DebugException(status);
+               }
+
+               workStr = workStr.substring(1);
+               PHPVariable item = new PHPVariable(fStackFrame, name, parent, "?",
+                               PHPValue.PEVT_UNKNOWN, null);
+               list.add(item);
+               if (var_list != null) {
+                       var_list.add(item);
+               }
+       }
 }