Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeodor Madan2014-04-14 13:58:06 +0000
committerTeodor Madan2014-04-14 15:09:47 +0000
commit90f0e179762d3c2d819e852ed058c1e582c0f5a9 (patch)
treed083ced25767e8474acc4a9929fb82042e377d95 /dsf-gdb
parente0154961f6bb75b6d390af9b99065940ec815ac0 (diff)
downloadorg.eclipse.cdt-90f0e179762d3c2d819e852ed058c1e582c0f5a9.tar.gz
org.eclipse.cdt-90f0e179762d3c2d819e852ed058c1e582c0f5a9.tar.xz
org.eclipse.cdt-90f0e179762d3c2d819e852ed058c1e582c0f5a9.zip
Bug 432734 - Infinite loop retrieving disassembly when debugging
optimized code with GDB Implement IInstructionWithSize#getSize() for DSF-GDB backend. Change-Id: Id2daa9f5924caee975ce69c5d7e4ffd9cab0b103 Signed-off-by: Teodor Madan <teodor.madan@freescale.com> Reviewed-on: https://git.eclipse.org/r/24962 Tested-by: Hudson CI Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java
index fd07c36a2e2..69b8250ee70 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInstruction.java
@@ -27,6 +27,7 @@ public class MIInstruction extends AbstractInstruction {
String opcode = ""; //$NON-NLS-1$
String args = ""; //$NON-NLS-1$
BigInteger rawOpcodes = null;
+ Integer opcodeSize = null;
public MIInstruction(MITuple tuple) {
parse(tuple);
@@ -154,6 +155,7 @@ public class MIInstruction extends AbstractInstruction {
if (var.equals("opcodes")) { //$NON-NLS-1$
try {
rawOpcodes = decodeOpcodes(str);
+ opcodeSize = Integer.valueOf(str.replace(" ", "").length() / 2); //$NON-NLS-1$//$NON-NLS-2$
} catch (NumberFormatException e) {
}
continue;
@@ -189,4 +191,12 @@ public class MIInstruction extends AbstractInstruction {
// Removing space separation and parse as single big integer
return new BigInteger(string.replace(" ", ""), 16); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.dsf.debug.service.AbstractInstruction#getSize()
+ */
+ @Override
+ public Integer getSize() {
+ return opcodeSize;
+ }
}

Back to the top