From 16e22eb4b861e3681ff7863bbc920e65f1f74b78 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Thu, 10 Oct 2002 15:18:23 +0000 Subject: [PATCH] in getInstructions() use long instead of String for addresses. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 4 ++++ .../cdt/debug/core/cdi/ICDISourceManager.java | 16 ++++++++-------- debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 3 +++ .../cdt/debug/mi/core/cdi/SourceManager.java | 5 ++++- 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 debug/org.eclipse.cdt.debug.core/ChangeLog create mode 100644 debug/org.eclipse.cdt.debug.mi.core/ChangeLog diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog new file mode 100644 index 00000000000..e8b6564dd69 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -0,0 +1,4 @@ +2002-10-10 Alain Magloire + + * ICDISourceManager.java: Changing the getInstructions() + method to take long instead of String. \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java index fbec0cca030..defd8dd5fd6 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java @@ -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; diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog new file mode 100644 index 00000000000..0f6bc3f594f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -0,0 +1,3 @@ +2002-10-10 Alain Magloire + + * SourceManager.java: Implement getInstructions(). \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java index 63c06c95d12..b8400ae7d3f 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java @@ -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);