Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-09-08 17:59:02 -0400
committereutarass2011-09-08 17:59:02 -0400
commitc16a2ec9dc162e1437d33cb23084158906cf1b9e (patch)
tree48b3b0ce92cda2a369ab6a6495b522ec937262d2 /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parent2696ebfcf5a97441f2dc980805c05c157b2147fe (diff)
downloadorg.eclipse.tcf-c16a2ec9dc162e1437d33cb23084158906cf1b9e.tar.gz
org.eclipse.tcf-c16a2ec9dc162e1437d33cb23084158906cf1b9e.tar.xz
org.eclipse.tcf-c16a2ec9dc162e1437d33cb23084158906cf1b9e.zip
TCF Debugger: fixed: the debugger should not show decimal value of an array - it looks useless and confusing.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java19
1 files changed, 14 insertions, 5 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 165fe7277..351f93f6f 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
@@ -806,7 +806,14 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
}
private String toNumberString(int radix, ISymbols.Symbol t, byte[] data, int offs, int size, boolean big_endian) {
- if (size <= 0 || size >= 16) return "";
+ if (size <= 0 || size > 16) return "";
+ if (radix != 16 && t != null) {
+ switch (t.getTypeClass()) {
+ case array:
+ case composite:
+ return "";
+ }
+ }
String s = null;
if (data == null) s = "N/A";
if (s == null && radix == 10) {
@@ -837,10 +844,12 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
if (!s.startsWith("0")) s = "0" + s;
break;
case 16:
- int l = size * 2 - s.length();
- if (l < 0) l = 0;
- if (l > 16) l = 16;
- s = "0000000000000000".substring(0, l) + s;
+ if (s.length() < size * 2) {
+ StringBuffer bf = new StringBuffer();
+ while (bf.length() + s.length() < size * 2) bf.append('0');
+ bf.append(s);
+ s = bf.toString();
+ }
break;
}
}

Back to the top