[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Changes in the ICDISourceManager.getInstructions()
|
The getInstructions() should take a long not a string, It was
a string since gdb/mi allows the use of "$pc", but maybe having
a specialize method to handle this is better and more portable,
the "$pc" is left for another day.
============================================
Index: ChangeLog
===================================================================
RCS file: ChangeLog
diff -N ChangeLog
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ChangeLog 10 Oct 2002 15:15:21 -0000
@@ -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
Index: src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java,v
retrieving revision 1.8
diff -u -r1.8 ICDISourceManager.java
--- src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java 10 Oct 2002 02:36:42 -0000 1.8
+++ src/org/eclipse/cdt/debug/core/cdi/ICDISourceManager.java 10 Oct 2002 15:15:22 -0000
@@ -52,26 +52,26 @@
* @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;
========================================================================
Index: ChangeLog
===================================================================
RCS file: ChangeLog
diff -N ChangeLog
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ChangeLog 10 Oct 2002 15:16:55 -0000
@@ -0,0 +1,3 @@
+2002-10-10 Alain Magloire
+
+ * SourceManager.java: Implement getInstructions().
\ No newline at end of file
Index: src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java,v
retrieving revision 1.13
diff -u -r1.13 SourceManager.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java 9 Oct 2002 22:09:30 -0000 1.13
+++ src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java 10 Oct 2002 15:16:55 -0000
@@ -151,9 +151,12 @@
/**
* @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);