Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeodor Madan2014-05-21 13:46:36 +0000
committerTeodor Madan2014-05-21 14:56:14 +0000
commit0cac486c62a922b4665f2ecab629e686c3aa69f4 (patch)
tree9bc5f74e3d10967c2a1c488ed60fa120e65c80aa
parent8f700b4d917e9b1cc829f7ca174ab792fcc179e0 (diff)
downloadorg.eclipse.cdt-0cac486c62a922b4665f2ecab629e686c3aa69f4.tar.gz
org.eclipse.cdt-0cac486c62a922b4665f2ecab629e686c3aa69f4.tar.xz
org.eclipse.cdt-0cac486c62a922b4665f2ecab629e686c3aa69f4.zip
Bug 435401 - Mixed-mode disassembly does not display the same source as
source editor for the same address change IMixedInstruction.getFileName implementation to return full path if reported by gdb. In the same way as MIFrame Change-Id: I16ee540c02da95bbaa1881a813e8bf9326d1f63d Signed-off-by: Teodor Madan <teodor.madan@freescale.com> Reviewed-on: https://git.eclipse.org/r/27014 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Hudson CI
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java
index 582a84484dd..af0f3faefed 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java
@@ -22,6 +22,7 @@ public class MIMixedInstruction implements IMixedInstruction {
// The parsed information
private String fileName = ""; //$NON-NLS-1$
+ private String fullName = ""; //$NON-NLS-1$
private int lineNumber = 0;
private MIInstruction[] assemblyCode;
@@ -31,7 +32,8 @@ public class MIMixedInstruction implements IMixedInstruction {
@Override
public String getFileName() {
- return fileName;
+ String result = getFullName();
+ return result.isEmpty() ? fileName : result;
}
@Override
@@ -80,6 +82,11 @@ public class MIMixedInstruction implements IMixedInstruction {
fileName = str;
continue;
}
+
+ if (var.equals("fullname")) { //$NON-NLS-1$
+ fullName = str;
+ continue;
+ }
if (var.equals("line_asm_insn")) { //$NON-NLS-1$
if (value instanceof MIList) {
@@ -97,4 +104,11 @@ public class MIMixedInstruction implements IMixedInstruction {
}
+ /**
+ * Get full source path as reported by gdb-mi "fullname" attribute.
+ * @since 4.4
+ */
+ public String getFullName() {
+ return fullName;
+ }
}

Back to the top