1
0
Fork 0
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:
Mikhail Khodjaiants 2003-05-12 14:46:34 +00:00
parent 9e873ea496
commit 359c65a4f5
2 changed files with 21 additions and 2 deletions

View file

@ -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 2003-05-08 Mikhail Khodjaiants
In the "terminate" event handler of the session manager check the targets that In the "terminate" event handler of the session manager check the targets that
belong to the current session. belong to the current session.

View file

@ -128,6 +128,7 @@ public class DisassemblyManager
String fileName = frameInfo.getFile(); String fileName = frameInfo.getFile();
int lineNumber = frameInfo.getFrameLineNumber(); int lineNumber = frameInfo.getFrameLineNumber();
ICDIInstruction[] instructions = new ICDIInstruction[0]; ICDIInstruction[] instructions = new ICDIInstruction[0];
long address = frameInfo.getAddress();
if ( fileName != null && fileName.length() > 0 ) if ( fileName != null && fileName.length() > 0 )
{ {
try 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 ) if ( address >= 0 )
{ {
try try
@ -213,4 +215,14 @@ public class DisassemblyManager
} }
return rawInstructions; 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;
}
} }