Commit 44e9a143 authored by Peifeng Yu's avatar Peifeng Yu
Browse files

Workaround for lldb tty setting on linux

parent 512e39aa
......@@ -11,10 +11,9 @@
- [DONE] Verify how unit test works in test_gdb
- [DONE] Create minimal unit test cases to be able to test debugger and debugsession
+ [DONE] can break on start
+ environment var successfully set
+ [DONE] environment var successfully set
+ Check if lldb supports unicode correctly
* a program output in encoding other than utf8 and different from host system default
+ set-tty actually works
- [DONE] Verify MIParser/MILexer can handle output without any stream prefix: no they can't
......@@ -41,9 +40,11 @@
* when hit watch point, nothing is output, which confuses the controller
* thread-info returns malformated result
+ there should be only one 'frame' key for each thread in the list
+ there shoule be a current-thread-id field
+ there shoule be a current-thread-id field (fixed at least in revision 265858)
* var-update doesn't support * as variable name
* can't have space in environment cd
* -inferior-tty-set only has dummy implementation
* 'process launch' doesn't provide thread-group-started notification
* File bug to lldb-mi for other missing commands
- Data formatter for lldb
......
......@@ -242,7 +242,21 @@ bool DebugSession::execInferior(ILaunchConfiguration *cfg, IExecutePlugin *iexec
addCommand(new SentinelCommand([this]() {
breakpointController()->initSendBreakpoints();
addCommand(MI::ExecRun, QString(), CmdMaybeStartsRunning);
// FIXME: a hacky way to emulate tty setting on linux. Not sure if this provides all needed
// functionalities of a pty. Should make this conditional on other platforms.
// FIXME: 'process launch' doesn't provide thread-group-started notification which MIDebugSession
// relies on to know the inferior has been started
QPointer<DebugSession> guarded_this(this);
addCommand(MI::NonMI,
QStringLiteral("process launch --stdin %0 --stdout %0 --stderr %0").arg(m_tty->getSlave()),
[guarded_this](const MI::ResultRecord &r) {
qCDebug(DEBUGGERLLDB) << "process launched:" << r.reason;
if (guarded_this)
guarded_this->setDebuggerStateOff(s_appNotStarted | s_programExited);
},
CmdMaybeStartsRunning);
//addCommand(MI::ExecRun, QString(), CmdMaybeStartsRunning);
}, CmdMaybeStartsRunning));
return true;
}
......
......@@ -1789,8 +1789,6 @@ void LldbTest::testBug301287()
void LldbTest::testDebugInExternalTerminal()
{
QSKIP("Skipping... Not implemented");
TestLaunchConfiguration cfg;
foreach (const QString & console, QStringList() << "konsole" << "xterm" << "xfce4-terminal" << "gnome-terminal") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment