1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

in getInstructions() use long instead of String for addresses.

This commit is contained in:
Alain Magloire 2002-10-10 15:18:23 +00:00
parent 32b09f9ef9
commit 16e22eb4b8
4 changed files with 19 additions and 9 deletions

View file

@ -0,0 +1,4 @@
2002-10-10 Alain Magloire
* ICDISourceManager.java: Changing the getInstructions()
method to take long instead of String.

View file

@ -52,26 +52,26 @@ public interface ICDISourceManager extends ICDISessionObject
* @throws CDIException on failure. Reasons include:
*/
void reset() throws CDIException;
/**
* @param startAdress is the begining address
* @param startAddress is the begining address
* @param endAddress is the end address
* @throws CDIException on failure.
*/
ICDIInstruction[] getInstructions(String startAddress, String endAddress) throws CDIException;
ICDIInstruction[] getInstructions(long startAddress, long endAddress) throws CDIException;
/**
* @param filename is the name of the file to disassemble
* @param linenum is the line number to disassemble around
* @throws CDIException on failure
* @param linenum is the line number to disassemble around
* @throws CDIException on failure
*/
ICDIInstruction[] getInstructions(String filename, int linenum) throws CDIException;
/**
* @param filename is the name of the file to disassemble
* @param linenum is the line number to disassemble around
* @param lines is the number of disassembly to produced
* @throws CDIException on failure
* @param linenum is the line number to disassemble around
* @param lines is the number of disassembly to produced
* @throws CDIException on failure
*/
ICDIInstruction[] getInstructions(String filename, int linenum, int lines) throws CDIException;

View file

@ -0,0 +1,3 @@
2002-10-10 Alain Magloire
* SourceManager.java: Implement getInstructions().

View file

@ -151,9 +151,12 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
/**
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(String, String)
*/
public ICDIInstruction[] getInstructions(String sa, String ea) throws CDIException {
public ICDIInstruction[] getInstructions(long start, long end) throws CDIException {
MISession mi = getCSession().getMISession();
CommandFactory factory = mi.getCommandFactory();
String hex = "0x";
String sa = hex + Long.toHexString(start);
String ea = hex + Long.toHexString(end);
MIDataDisassemble dis = factory.createMIDataDisassemble(sa, ea, false);
try {
mi.postCommand(dis);