mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
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
This commit is contained in:
parent
8f700b4d91
commit
0cac486c62
1 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue