mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
When generating disassembly instructions by file name and line number check if the frame address is in the address range of the instruction set.
If the instruction set doesn't contain the frame address generate a new instruction set based on the frame address.
This commit is contained in:
parent
9e873ea496
commit
359c65a4f5
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-05-12 Mikhail Khodjaiants
|
||||
When generating disassembly instructions by file name and line number check
|
||||
if the frame address is in the address range of the instruction set.
|
||||
If the instruction set doesn't contain the frame address generate a new instruction set
|
||||
based on the frame address.
|
||||
* DisassemblyManager.java
|
||||
|
||||
2003-05-08 Mikhail Khodjaiants
|
||||
In the "terminate" event handler of the session manager check the targets that
|
||||
belong to the current session.
|
||||
|
|
|
@ -128,6 +128,7 @@ public class DisassemblyManager
|
|||
String fileName = frameInfo.getFile();
|
||||
int lineNumber = frameInfo.getFrameLineNumber();
|
||||
ICDIInstruction[] instructions = new ICDIInstruction[0];
|
||||
long address = frameInfo.getAddress();
|
||||
if ( fileName != null && fileName.length() > 0 )
|
||||
{
|
||||
try
|
||||
|
@ -138,9 +139,10 @@ public class DisassemblyManager
|
|||
{
|
||||
}
|
||||
}
|
||||
if ( instructions.length == 0 )
|
||||
if ( instructions.length == 0 ||
|
||||
// Double check if debugger returns correct address range.
|
||||
!containsAddress( instructions, address ) )
|
||||
{
|
||||
long address = frameInfo.getAddress();
|
||||
if ( address >= 0 )
|
||||
{
|
||||
try
|
||||
|
@ -213,4 +215,14 @@ public class DisassemblyManager
|
|||
}
|
||||
return rawInstructions;
|
||||
}
|
||||
|
||||
private boolean containsAddress( ICDIInstruction[] instructions, long address )
|
||||
{
|
||||
for ( int i = 0; i < instructions.length; ++i )
|
||||
{
|
||||
if ( instructions[i].getAdress() == address )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue