Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-09-02 19:35:51 +0000
committereutarass2011-09-02 19:35:51 +0000
commit6ee7bee6aeeb03edca368b32a6b10095dde4f850 (patch)
tree01581a1e39ce5a5ad0a4f048cb0969d0fed4133b /plugins/org.eclipse.tm.tcf.debug.ui/src/org
parent867c14dd6f5d54ca5a611d64f2a0f6ce1997ac0c (diff)
downloadorg.eclipse.tcf-6ee7bee6aeeb03edca368b32a6b10095dde4f850.tar.gz
org.eclipse.tcf-6ee7bee6aeeb03edca368b32a6b10095dde4f850.tar.xz
org.eclipse.tcf-6ee7bee6aeeb03edca368b32a6b10095dde4f850.zip
TCF Debugger: improved handling of symbol flags.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java2
2 files changed, 19 insertions, 3 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
index b2813ab1a..165fe7277 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
@@ -653,8 +653,14 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
if (!type_cache.validate(done)) return false;
ISymbols.Symbol type_symbol = type_cache.getData();
if (type_symbol != null) {
+ int flags = type_symbol.getFlags();
s = type_symbol.getName();
- if (s != null && type_symbol.getTypeClass() == ISymbols.TypeClass.composite) s = "struct " + s;
+ if (s != null && type_symbol.getTypeClass() == ISymbols.TypeClass.composite) {
+ if ((flags & ISymbols.SYM_FLAG_UNION_TYPE) != 0) s = "union " + s;
+ else if ((flags & ISymbols.SYM_FLAG_CLASS_TYPE) != 0) s = "class " + s;
+ else if ((flags & ISymbols.SYM_FLAG_INTERFACE_TYPE) != 0) s = "interface " + s;
+ else s = "struct " + s;
+ }
if (s == null && type_symbol.getSize() == 0) s = "void";
if (s == null) {
switch (type_symbol.getTypeClass()) {
@@ -685,6 +691,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
break;
case pointer:
s = "*";
+ if ((flags & ISymbols.SYM_FLAG_REFERENCE) != 0) s = "&";
get_base_type = true;
break;
case array:
@@ -724,6 +731,10 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
break;
}
}
+ if (s != null) {
+ if ((flags & ISymbols.SYM_FLAG_VOLATILE_TYPE) != 0) s = "volatile " + s;
+ if ((flags & ISymbols.SYM_FLAG_CONST_TYPE) != 0) s = "const " + s;
+ }
}
if (s == null) {
name = "N/A";
@@ -898,7 +909,12 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
TCFDataCache<ISymbols.Symbol> var = model.getSymbolInfoCache(var_expression.getData().getSymbolID());
if (var != null) {
if (!var.validate(done)) return false;
- if (var.getData() != null) name = var.getData().getName();
+ ISymbols.Symbol var_data = var.getData();
+ if (var_data != null) {
+ name = var_data.getName();
+ if (name == null && var_data.getFlag(ISymbols.SYM_FLAG_VARARG)) name = "<VarArg>";
+ if (name == null) name = "<" + var_data.getID() + ">";
+ }
}
}
if (name == null && base_text.getData() != null) name = base_text.getData();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
index e7ee532d1..a11cc01d7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
@@ -373,7 +373,7 @@ public class TCFNodeStackFrame extends TCFNode {
sym = s.getData();
}
if (sym == null) continue;
- if ((sym.getFlags() & ISymbols.SYM_FLAG_PARAMETER) == 0) continue;
+ if (!sym.getFlag(ISymbols.SYM_FLAG_PARAMETER)) continue;
if (cnt > 0) bf.append(',');
if (show_arg_names) {
String name = "?";

Back to the top