Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2016-05-12 18:04:37 +0000
committerGerrit Code Review @ Eclipse.org2016-05-13 13:10:33 +0000
commit7436cb9ae4ae04300dca893bf5dfbc4f92abbe27 (patch)
tree4ee5897220d6e7f270cce5592fbe1a6c05ba30ca /memory/org.eclipse.cdt.debug.ui.memory.traditional
parented7f1cea097ab88843afb5baf0a2900509d7324d (diff)
downloadorg.eclipse.cdt-7436cb9ae4ae04300dca893bf5dfbc4f92abbe27.tar.gz
org.eclipse.cdt-7436cb9ae4ae04300dca893bf5dfbc4f92abbe27.tar.xz
org.eclipse.cdt-7436cb9ae4ae04300dca893bf5dfbc4f92abbe27.zip
Bug 489512 - Show local variables in the traditional memory render
* Added an adjustment to the calculation of the addressable char width so it does not go beyond the containing cell size when using radixes where the number of characters does not grow linearly with the number of octets being represented. This adjustment is only necessary when the cell can contain the same number of octets as the addressable size Change-Id: Ic9643c98094bc28621e6807eeed0c283dbe6672a
Diffstat (limited to 'memory/org.eclipse.cdt.debug.ui.memory.traditional')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/DataPane.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/DataPane.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/DataPane.java
index 3e13968dbb8..6c59d75c93d 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/DataPane.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/DataPane.java
@@ -507,6 +507,13 @@ public class DataPane extends AbstractPane
}
// Prepare to enclose addresses with additional info in a rectangle
int addressableWidth = getAddressableWidth();
+ if (fRendering.getAddressableSize() == fRendering.getBytesPerColumn()) {
+ // When the cell size is dimensioned to enclose an addressable size, the width can not be larger
+ // than the containing cell, this adjustment is necessary when using radixes where the number of characters
+ // does not increase in proportion to the number of bytes e.g. octal, decimal, etc.
+ addressableWidth = getAddressableWidth() > getCellWidth() ? getCellWidth() : getAddressableWidth();
+ }
+
assert addressableWidth > 0;
// Initialize the dimensions for the rectangle

Back to the top