From 2ae122963cd25ccf94b2b8a54642267d46a56fba Mon Sep 17 00:00:00 2001 From: Marc Dumais Date: Tue, 15 Nov 2016 09:20:33 -0500 Subject: [PATCH] Bug 303808 - Silence error changing thread in all-stop In all-stop mode for a remote session, it's not possible to have the target switch thread, while the target is running. At the moment, the GDB focus synchronizer attempts to switch the thread in that case, when the user switches thread in the Debug View, which can fail and ends-up logging an error. This patch silences this error. Change-Id: Ib21347fe9f4c31b3a42b4a83d289dbcd10b74a07 --- .../gdb/internal/ui/sync/GdbDebugContextSyncManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/sync/GdbDebugContextSyncManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/sync/GdbDebugContextSyncManager.java index 96cce9903e9..075436aefc4 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/sync/GdbDebugContextSyncManager.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/sync/GdbDebugContextSyncManager.java @@ -71,7 +71,13 @@ public class GdbDebugContextSyncManager implements IDebugContextListener { tracker.dispose(); if (gdbSync != null) { - gdbSync.setFocus(new IDMContext[] {dmc}, new ImmediateRequestMonitor() {}); + gdbSync.setFocus(new IDMContext[] {dmc}, new ImmediateRequestMonitor() { + @Override + protected void handleFailure() { + // do not set error - it's normal in some cases to fail to switch thread + // for example in a remote session with the inferior running and in all-stop mode + } + }); } } });