Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-07-28 16:19:43 -0400
committerEugene Tarassov2015-07-28 16:19:43 -0400
commit1b7b7252370d26d27061b107eebfe3fb5a95f1d9 (patch)
treed0a78ade86c98b2d319a0ecde707912c399dcbe2
parentb43bd4a9fc874dfe30eb8a9de70940a2cc6d8ed1 (diff)
downloadorg.eclipse.tcf-1b7b7252370d26d27061b107eebfe3fb5a95f1d9.tar.gz
org.eclipse.tcf-1b7b7252370d26d27061b107eebfe3fb5a95f1d9.tar.xz
org.eclipse.tcf-1b7b7252370d26d27061b107eebfe3fb5a95f1d9.zip
TCF Debugger: fixed incorrect display of char values when size of the value is bigger than 1
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java17
1 files changed, 13 insertions, 4 deletions
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 a9efeecda..1a9de3977 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
@@ -454,10 +454,19 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
if (is_char == null) return false;
if (is_char) {
byte[] data = value_data.getValue();
- StyledStringBuffer bf = new StyledStringBuffer();
- bf.append(toASCIIString(data, 0, data.length, '\''), StyledStringBuffer.MONOSPACED);
- set(null, null, bf);
- return true;
+ if (data.length > 0) {
+ if (data.length > 1) {
+ BigInteger value_int = TCFNumberFormat.toBigInteger(
+ data, value_data.isBigEndian(), false);
+ if (value_int.compareTo(BigInteger.valueOf(0x80)) >= 0) break;
+ data = new byte[1];
+ data[0] = value_int.byteValue();
+ }
+ StyledStringBuffer bf = new StyledStringBuffer();
+ bf.append(toASCIIString(data, 0, 1, '\''), StyledStringBuffer.MONOSPACED);
+ set(null, null, bf);
+ return true;
+ }
}
}
break;

Back to the top