Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-09-21 13:10:54 -0400
committerEugene Tarassov2014-09-21 13:10:54 -0400
commit965c803d5bea3ce4d9c868eef0403ccf64a1ff0a (patch)
tree6233b96e7227bdc5e3d2e808a3fe8c91e4e33d6e
parentb421b9d34164f2ea4fb072f8c10aded7735146d7 (diff)
downloadorg.eclipse.tcf-965c803d5bea3ce4d9c868eef0403ccf64a1ff0a.tar.gz
org.eclipse.tcf-965c803d5bea3ce4d9c868eef0403ccf64a1ff0a.tar.xz
org.eclipse.tcf-965c803d5bea3ce4d9c868eef0403ccf64a1ff0a.zip
TCF Debugger: fixed handling of DWARF implicit pointers
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java9
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java40
4 files changed, 41 insertions, 16 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java
index 52ab93d94..db45fd63b 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java
@@ -146,6 +146,12 @@ public class ExpressionsProxy implements IExpressions {
if (n == null) return false;
return n.booleanValue();
}
+
+ public boolean isImplicitPointer() {
+ Boolean n = (Boolean)props.get(VAL_IMPLICIT_POINTER);
+ if (n == null) return false;
+ return n.booleanValue();
+ }
}
public ExpressionsProxy(IChannel channel) {
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java
index 665a55a54..222e51490 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java
@@ -159,6 +159,14 @@ public interface IExpressions extends IService {
boolean isBigEndian();
/**
+ * Implicit pointer means that the value represents a pointer,
+ * which value is unknown or optimized away,
+ * even though the value it would point to is known.
+ * @return true if the value is implicit pointer.
+ */
+ boolean isImplicitPointer();
+
+ /**
* Return register ID if the value represents register variable.
* @return register ID or null.
*/
@@ -196,6 +204,7 @@ public interface IExpressions extends IService {
VAL_CLASS = "Class",
VAL_TYPE = "Type",
VAL_BIG_ENDIAN = "BigEndian",
+ VAL_IMPLICIT_POINTER = "ImplicitPointer",
VAL_REGISTER = "Register",
VAL_SYMBOL = "Symbol",
VAL_ADDRESS = "Address",
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java
index 97d205587..44df1ca74 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java
@@ -249,7 +249,7 @@ public class TCFChildrenSubExpressions extends TCFChildren {
TCFDataCache<IExpressions.Value> val_cache = ((TCFNodeExpression)exp).getValue();
if (!val_cache.validate(this)) return false;
IExpressions.Value val_data = val_cache.getData();
- if (val_data != null && !isNull(val_data.getValue())) {
+ if (val_data != null && (val_data.isImplicitPointer() || !isNull(val_data.getValue()))) {
TCFDataCache<ISymbols.Symbol> base_type_cache = node.model.getSymbolInfoCache(type_data.getBaseTypeID());
if (base_type_cache != null) {
if (!base_type_cache.validate(this)) return false;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
index 0877560fa..dc5d8d7d7 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
@@ -1638,19 +1638,6 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
break;
}
}
- if (level == 0) {
- if (!type_name.validate(done)) return false;
- bf.append("Size: ", SWT.BOLD);
- bf.append(Integer.toString(type_data.getSize()), StyledStringBuffer.MONOSPACED);
- bf.append(type_data.getSize() == 1 ? " byte" : " bytes");
- String nm = type_name.getData();
- if (nm != null) {
- bf.append(", ");
- bf.append("Type: ", SWT.BOLD);
- bf.append(nm);
- }
- bf.append('\n');
- }
return true;
}
@@ -1678,14 +1665,37 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
if (!value.validate(done)) return false;
IExpressions.Value v = value.getData();
if (v != null) {
- if (value.getError() == null) {
+ String type_id = v.getTypeID();
+ if (v.isImplicitPointer()) {
+ bf.append("Implicit pointer, value not available\n", SWT.BOLD);
+ }
+ else if (value.getError() == null) {
byte[] data = v.getValue();
if (data != null) {
boolean big_endian = v.isBigEndian();
- if (!appendValueText(bf, 0, v.getTypeID(), this,
+ if (!appendValueText(bf, 0, type_id, this,
data, 0, data.length, big_endian, done)) return false;
}
}
+ ISymbols.Symbol type_data = null;
+ if (type_id != null) {
+ TCFDataCache<ISymbols.Symbol> type_cache = model.getSymbolInfoCache(type_id);
+ if (!type_cache.validate(done)) return false;
+ type_data = type_cache.getData();
+ }
+ if (type_data != null) {
+ if (!type_name.validate(done)) return false;
+ bf.append("Size: ", SWT.BOLD);
+ bf.append(Integer.toString(type_data.getSize()), StyledStringBuffer.MONOSPACED);
+ bf.append(type_data.getSize() == 1 ? " byte" : " bytes");
+ String nm = type_name.getData();
+ if (nm != null) {
+ bf.append(", ");
+ bf.append("Type: ", SWT.BOLD);
+ bf.append(nm);
+ }
+ bf.append('\n');
+ }
@SuppressWarnings("unchecked")
List<Map<String,Object>> pieces = (List<Map<String,Object>>)v.getProperties().get(IExpressions.VAL_PIECES);
if (pieces != null) {

Back to the top