[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Fix in branch 1_0_1 mi.debug.core
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.48
diff -u -r1.48 ChangeLog
--- ChangeLog 2 Jan 2003 21:45:48 -0000 1.48
+++ ChangeLog 6 Mar 2003 15:15:16 -0000
@@ -1,3 +1,13 @@
+2003-03-06 Alain Magloire
+
+ GDB on certain platform is very susceptible to register probing
+ and on some platform it will simply crash, we will try to accomodate.
+
+ * src/org/eclipse/cdt/debug/mi/core/cdi/CTarget.java: New method
+ setCurrentThread with a boolean to not call the data-list-register
+ * src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java:
+ * src/org/eclipse/cdt/debug/mi/core/cdi/StackFrame.java
+
2003-01-02 Alain Magloire
Bug when using recursive:
Index: src/org/eclipse/cdt/debug/mi/core/cdi/CTarget.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Attic/CTarget.java,v
retrieving revision 1.36
diff -u -r1.36 CTarget.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/CTarget.java 5 Dec 2002 15:59:27 -0000 1.36
+++ src/org/eclipse/cdt/debug/mi/core/cdi/CTarget.java 6 Mar 2003 15:15:16 -0000
@@ -80,14 +80,20 @@
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#setCurrentThread(ICDIThread)
*/
public void setCurrentThread(ICDIThread cthread) throws CDIException {
+ if (cthread instanceof Thread) {
+ setCurrentThread(cthread, true);
+ }
+ }
+
+ public void setCurrentThread(ICDIThread cthread, boolean doUpdate) throws CDIException {
if (cthread instanceof CThread) {
- setCurrentThread((CThread)cthread);
+ setCurrentThread((CThread)cthread, doUpdate);
}
}
/**
*/
- public void setCurrentThread(CThread cthread) throws CDIException {
+ public void setCurrentThread(CThread cthread, boolean doUpdate) throws CDIException {
session.setCurrentTarget(this);
int id = cthread.getId();
// No need to set thread id 0, it is a dummy thread.
@@ -113,8 +119,10 @@
// Resetting threads may change the value of
// some variables like Register. Send an update
// To generate changeEvents.
- RegisterManager regMgr = session.getRegisterManager();
- regMgr.update();
+ if (doUpdate) {
+ RegisterManager regMgr = session.getRegisterManager();
+ regMgr.update();
+ }
}
// We should be allright now.
Index: src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Attic/CThread.java,v
retrieving revision 1.23
diff -u -r1.23 CThread.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java 5 Dec 2002 16:00:05 -0000 1.23
+++ src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java 6 Mar 2003 15:15:16 -0000
@@ -64,7 +64,7 @@
MIStackListFrames frames = factory.createMIStackListFrames();
try {
ICDIThread oldThread = getCTarget().getCurrentThread();
- getCTarget().setCurrentThread(this);
+ getCTarget().setCurrentThread(this, false);
mi.postCommand(frames);
MIStackListFramesInfo info = frames.getMIStackListFramesInfo();
if (info == null) {
@@ -75,7 +75,7 @@
for (int i = 0; i < stack.length; i++) {
stack[i] = new StackFrame(this, miFrames[i]);
}
- getCTarget().setCurrentThread(oldThread);
+ getCTarget().setCurrentThread(oldThread, false);
return stack;
} catch (MIException e) {
//throw new CDIException(e.getMessage());
@@ -97,13 +97,13 @@
MIStackInfoDepth depth = factory.createMIStackInfoDepth();
try {
ICDIThread oldThread = getCTarget().getCurrentThread();
- getCTarget().setCurrentThread(this);
+ getCTarget().setCurrentThread(this, false);
mi.postCommand(depth);
MIStackInfoDepthInfo info = depth.getMIStackInfoDepthInfo();
if (info == null) {
throw new CDIException("No answer");
}
- getCTarget().setCurrentThread(oldThread);
+ getCTarget().setCurrentThread(oldThread, false);
return info.getDepth();
} catch (MIException e) {
throw new MI2CDIException(e);
@@ -123,7 +123,7 @@
MIStackListFrames frames = factory.createMIStackListFrames(low, high);
try {
ICDIThread oldThread = getCTarget().getCurrentThread();
- getCTarget().setCurrentThread(this);
+ getCTarget().setCurrentThread(this, false);
mi.postCommand(frames);
MIStackListFramesInfo info = frames.getMIStackListFramesInfo();
if (info == null) {
@@ -134,7 +134,7 @@
for (int i = 0; i < stack.length; i++) {
stack[i] = new StackFrame(this, miFrames[i]);
}
- getCTarget().setCurrentThread(oldThread);
+ getCTarget().setCurrentThread(oldThread, false);
return stack;
} catch (MIException e) {
//throw new CDIException(e.getMessage());
@@ -151,11 +151,12 @@
*/
public void setCurrentStackFrame(ICDIStackFrame stackframe) throws CDIException {
if (stackframe instanceof StackFrame) {
- setCurrentStackFrame((StackFrame)stackframe);
+ setCurrentStackFrame((StackFrame)stackframe, true);
}
}
- public void setCurrentStackFrame(StackFrame stackframe) throws CDIException {
+
+ public void setCurrentStackFrame(StackFrame stackframe, boolean doUpdate) throws CDIException {
CSession session = getCTarget().getCSession();
MISession mi = session.getMISession();
CommandFactory factory = mi.getCommandFactory();
@@ -174,7 +175,7 @@
MIStackSelectFrame frame = factory.createMIStackSelectFrame(frameNum);
try {
// Set ourself as the current thread first.
- getCTarget().setCurrentThread(this);
+ getCTarget().setCurrentThread(this, doUpdate);
mi.postCommand(frame);
MIInfo info = frame.getMIInfo();
if (info == null) {
Index: src/org/eclipse/cdt/debug/mi/core/cdi/StackFrame.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Attic/StackFrame.java,v
retrieving revision 1.13
diff -u -r1.13 StackFrame.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/StackFrame.java 6 Nov 2002 21:04:57 -0000 1.13
+++ src/org/eclipse/cdt/debug/mi/core/cdi/StackFrame.java 6 Mar 2003 15:15:16 -0000
@@ -58,7 +58,7 @@
MIStackListArguments listArgs =
factory.createMIStackListArguments(false, level, level);
try {
- cthread.setCurrentStackFrame(this);
+ cthread.setCurrentStackFrame(this, false);
MIArg[] args = null;
mi.postCommand(listArgs);
MIStackListArgumentsInfo info =
@@ -100,7 +100,7 @@
CommandFactory factory = mi.getCommandFactory();
MIStackListLocals locals = factory.createMIStackListLocals(false);
try {
- cthread.setCurrentStackFrame(this);
+ cthread.setCurrentStackFrame(this, false);
MIArg[] args = null;
mi.postCommand(locals);
MIStackListLocalsInfo info = locals.getMIStackListLocalsInfo();