diff options
author | Jim Ingham <jingham@apple.com> | 2013-02-09 01:29:05 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-02-09 01:29:05 +0000 |
commit | 0161b49cbadd54431b4acefa8dae954ebef12ec8 (patch) | |
tree | 2f6c58512e07b7d65af0a6de0a0fd9df6e1d6013 /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | 1aa79e9f637d9f5fb514095e8b29108bd15c261f (diff) | |
download | llvm-0161b49cbadd54431b4acefa8dae954ebef12ec8.zip llvm-0161b49cbadd54431b4acefa8dae954ebef12ec8.tar.gz llvm-0161b49cbadd54431b4acefa8dae954ebef12ec8.tar.bz2 |
Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug
session.
<rdar://problem/12993641>
llvm-svn: 174793
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index df5d8ff..f39c322 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -199,6 +199,11 @@ protected: if (environment.GetArgumentCount() > 0) m_options.launch_info.GetEnvironmentEntries ().AppendArguments (environment); + // Get the value of synchronous execution here. If you wait till after you have started to + // run, then you could have hit a breakpoint, whose command might switch the value, and + // then you'll pick up that incorrect value. + bool synchronous_execution = m_interpreter.GetSynchronous (); + // Finalize the file actions, and if none were given, default to opening // up a pseudo terminal const bool default_to_use_pty = true; @@ -258,7 +263,6 @@ protected: error = process->Resume(); if (error.Success()) { - bool synchronous_execution = m_interpreter.GetSynchronous (); if (synchronous_execution) { state = process->WaitForProcessToStop (NULL); |