forked from qt-creator/qt-creator
Debugger: Better fall back for LLDB without remote support
Change-Id: I517052bb795674d4beda05e3909dc05afc99bfe3 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -43,6 +43,22 @@ else:
|
|||||||
verbosity = 0
|
verbosity = 0
|
||||||
verbosity = 1
|
verbosity = 1
|
||||||
|
|
||||||
|
# Debugger start modes. Keep in sync with DebuggerStartMode in debuggerconstants.h
|
||||||
|
NoStartMode, \
|
||||||
|
StartInternal, \
|
||||||
|
StartExternal, \
|
||||||
|
AttachExternal, \
|
||||||
|
AttachCrashedExternal, \
|
||||||
|
AttachCore, \
|
||||||
|
AttachToRemoteServer, \
|
||||||
|
AttachToRemoteProcess, \
|
||||||
|
LoadRemoteCore, \
|
||||||
|
StartRemoteProcess, \
|
||||||
|
StartRemoteGdb, \
|
||||||
|
StartRemoteEngine \
|
||||||
|
= range(0, 12)
|
||||||
|
|
||||||
|
|
||||||
# Known special formats. Keep in sync with DisplayFormat in watchhandler.h
|
# Known special formats. Keep in sync with DisplayFormat in watchhandler.h
|
||||||
KnownDumperFormatBase, \
|
KnownDumperFormatBase, \
|
||||||
Latin1StringFormat, \
|
Latin1StringFormat, \
|
||||||
|
|||||||
@@ -682,12 +682,13 @@ class Dumper(DumperBase):
|
|||||||
# and later detects that it did stop after all, so it is be
|
# and later detects that it did stop after all, so it is be
|
||||||
# better to mirror that and wait for the spontaneous stop.
|
# better to mirror that and wait for the spontaneous stop.
|
||||||
self.reportState("enginerunandinferiorrunok")
|
self.reportState("enginerunandinferiorrunok")
|
||||||
elif len(self.remoteChannel_) > 0:
|
elif self.startMode_ == AttachToRemoteServer:
|
||||||
self.process = self.target.ConnectRemote(
|
self.process = self.target.ConnectRemote(
|
||||||
self.debugger.GetListener(),
|
self.debugger.GetListener(),
|
||||||
self.remoteChannel_, None, error)
|
self.remoteChannel_, None, error)
|
||||||
if not error.Success():
|
if not error.Success():
|
||||||
self.reportState("inferiorrunfailed")
|
self.reportError(error)
|
||||||
|
self.reportState("enginerunfailed")
|
||||||
return
|
return
|
||||||
# Even if it stops it seems that LLDB assumes it is running
|
# Even if it stops it seems that LLDB assumes it is running
|
||||||
# and later detects that it did stop after all, so it is be
|
# and later detects that it did stop after all, so it is be
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ enum DebuggerState
|
|||||||
DebuggerFinished
|
DebuggerFinished
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Keep in sync with dumper.py
|
||||||
enum DebuggerStartMode
|
enum DebuggerStartMode
|
||||||
{
|
{
|
||||||
NoStartMode,
|
NoStartMode,
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ void LldbEngine::setupInferior()
|
|||||||
cmd.arg("executable", executable);
|
cmd.arg("executable", executable);
|
||||||
cmd.arg("breakOnMain", sp.breakOnMain);
|
cmd.arg("breakOnMain", sp.breakOnMain);
|
||||||
cmd.arg("useTerminal", sp.useTerminal);
|
cmd.arg("useTerminal", sp.useTerminal);
|
||||||
|
cmd.arg("startMode", sp.startMode);
|
||||||
|
|
||||||
cmd.beginList("processArgs");
|
cmd.beginList("processArgs");
|
||||||
foreach (const QString &arg, args.toUnixArgs())
|
foreach (const QString &arg, args.toUnixArgs())
|
||||||
@@ -298,7 +299,6 @@ void LldbEngine::setupInferior()
|
|||||||
? QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID)
|
? QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID)
|
||||||
: QString::fromLatin1("Attaching to %1").arg(attachedPID);
|
: QString::fromLatin1("Attaching to %1").arg(attachedPID);
|
||||||
showMessage(msg, LogMisc);
|
showMessage(msg, LogMisc);
|
||||||
cmd.arg("startMode", AttachExternal);
|
|
||||||
cmd.arg("attachPid", attachedPID);
|
cmd.arg("attachPid", attachedPID);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user