diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-10-07 04:19:01 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-10-07 04:19:01 +0000 |
| commit | 05faeb71350f65bbe8e41b68b22345e992e9a497 (patch) | |
| tree | e01f0087d0afd0f1050c255be597fcbdcbfe7c49 /lldb/source/Commands/CommandObjectProcess.cpp | |
| parent | 1b468683c273ca438345381fa89d52355bb04a80 (diff) | |
| download | llvm-05faeb71350f65bbe8e41b68b22345e992e9a497.zip llvm-05faeb71350f65bbe8e41b68b22345e992e9a497.tar.gz llvm-05faeb71350f65bbe8e41b68b22345e992e9a497.tar.bz2 | |
Cleaned up the SWIG stuff so all includes happen as they should, no pulling
tricks to get types to resolve. I did this by correctly including the correct
files: stdint.h and all lldb-*.h files first before including the API files.
This allowed me to remove all of the hacks that were in the lldb.swig file
and it also allows all of the #defines in lldb-defines.h and enumerations
in lldb-enumerations.h to appear in the lldb.py module. This will make the
python script code a lot more readable.
Cleaned up the "process launch" command to not execute a "process continue"
command, it now just does what it should have with the internal API calls
instead of executing another command line command.
Made the lldb_private::Process set the state to launching and attaching if
WillLaunch/WillAttach return no error respectively.
llvm-svn: 115902
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 73d03f5..c2f4336 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -133,13 +133,9 @@ public: } bool - Execute (Args& launch_args, - CommandReturnObject &result) + Execute (Args& launch_args, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - bool synchronous_execution = m_interpreter.GetSynchronous (); - // bool launched = false; - // bool stopped_after_launch = false; if (target == NULL) { @@ -235,22 +231,29 @@ public: if (error.Success()) { result.AppendMessageWithFormat ("Launching '%s' (%s)\n", filename, archname); - result.SetStatus (eReturnStatusSuccessContinuingNoResult); + result.SetDidChangeProcessState (true); if (m_options.stop_at_entry == false) { + result.SetStatus (eReturnStatusSuccessContinuingNoResult); StateType state = process->WaitForProcessToStop (NULL); if (state == eStateStopped) { - // Call continue_command. - CommandReturnObject continue_result; - m_interpreter.HandleCommand("process continue", false, continue_result); - } - - if (synchronous_execution) - { - result.SetDidChangeProcessState (true); - result.SetStatus (eReturnStatusSuccessFinishNoResult); + error = process->Resume(); + if (error.Success()) + { + bool synchronous_execution = m_interpreter.GetSynchronous (); + if (synchronous_execution) + { + state = process->WaitForProcessToStop (NULL); + result.SetDidChangeProcessState (true); + result.SetStatus (eReturnStatusSuccessFinishResult); + } + else + { + result.SetStatus (eReturnStatusSuccessContinuingNoResult); + } + } } } } |
