[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] [DSF] SessionType
|
On Thursday 08 July 2010 15:07:15 Anna Dushistova wrote:
> I had the same problem.
> I wanted to do "target remote", but with "-exec-run" later
> and not "-exec-continue" as SessionType.REMOTE implies.
Good to know we're not the only one with this problem. I've filed
a bug report, with a patch:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319257
Let me know what you think.
Thanks,
--
Vladimir Prus
CodeSourcery
vladimir@xxxxxxxxxxxxxxxx
(650) 331-3385 x722
--- a/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java
+++ b/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java
@@ -776,4 +776,8 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
fInterruptFailedJob = null;
}
}
+
+ public boolean useRun() {
+ return getSessionType() == SessionType.LOCAL;
+ }
}
diff --git a/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java b/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java
index 5c9a6ed..299d1ee 100644
--- a/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java
+++ b/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBBackend.java
@@ -156,4 +156,12 @@ public interface IGDBBackend extends IMIBackend {
* @since 3.0
*/
public boolean getUpdateThreadListOnSuspend() throws CoreException;
+
+ /**
+ * @return Whether '-exec-run' should be used when starting the debug
+ * session. In general '-exec-run' is used when gdb directly starts
+ * the application, while -exec-continue is used when gdb connects
+ * to some target that already has execution, but there are exceptions.
+ */
+ public boolean useRun();
}