From 5432ae0bcd465b4542b9b550d355832d71122b90 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 22 Dec 2003 19:54:11 +0000 Subject: [PATCH] Fix for bug 49278 do not retry the "info threads" command if the first attempt fails. --- debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 6 ++++++ .../eclipse/cdt/debug/mi/core/cdi/model/Target.java | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 49074c2e874..6952ae4e554 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,9 @@ +2003-12-22 Mikhail Khodjaiants + Fix for bug 49278 do not retry the "info threads" command if the first attempt fails. + Throw an exception from the "getCThreads" method when it fails. + + * src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java + 2003-12-18 Alain Magloire PR 49148 diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java index ff14266d7b2..74de17cd642 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java @@ -164,7 +164,11 @@ public class Target implements ICDITarget { currentThreadId = newThreadId; // get the new Threads. - currentThreads = getCThreads(); + try { + currentThreads = getCThreads(); + } catch (CDIException e) { + currentThreads = noThreads; + } // Fire CreatedEvent for new threads. // Replace the new threads with the old thread object @@ -222,7 +226,7 @@ public class Target implements ICDITarget { /** * Do the real work of call -thread-list-ids. */ - public Thread[] getCThreads() { //throws CDIException { + public Thread[] getCThreads() throws CDIException { Thread[] cthreads = noThreads; MISession mi = session.getMISession(); CommandFactory factory = mi.getCommandFactory(); @@ -259,7 +263,7 @@ public class Target implements ICDITarget { } } catch (MIException e) { // Do not throw anything in this case. - //throw new CDIException(e.getMessage()); + throw new CDIException(e.getMessage()); } return cthreads; }