diff options
author | Jim Ingham <jingham@apple.com> | 2014-10-11 00:38:27 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2014-10-11 00:38:27 +0000 |
commit | 26c7bf9312939025f710bd4c4e0174488da25c7c (patch) | |
tree | a4c57cdaba6967e417a24316a9d92f932dbf01f9 /lldb/scripts/Python/interface/SBCommandInterpreter.i | |
parent | 41c79d934ba10ba61beef70534ec3fed410f5ab0 (diff) | |
download | bcm5719-llvm-26c7bf9312939025f710bd4c4e0174488da25c7c.tar.gz bcm5719-llvm-26c7bf9312939025f710bd4c4e0174488da25c7c.zip |
Rework the way we pass "run multiple command" options to the various API's that
do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather
the options into an options class. Also expose that to the SB API's.
Change the way the "-o" options to the lldb driver are processed so:
1) They are run synchronously - didn't really make any sense to run the asynchronously.
2) The stop on error
3) "quit" in one of the -o commands will not quit lldb - not the command interpreter
that was running the -o commands.
I added an entry to the run options to stop-on-crash, but I haven't implemented that yet.
llvm-svn: 219553
Diffstat (limited to 'lldb/scripts/Python/interface/SBCommandInterpreter.i')
-rw-r--r-- | lldb/scripts/Python/interface/SBCommandInterpreter.i | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBCommandInterpreter.i b/lldb/scripts/Python/interface/SBCommandInterpreter.i index 9dc842e87c2..856038094f7 100644 --- a/lldb/scripts/Python/interface/SBCommandInterpreter.i +++ b/lldb/scripts/Python/interface/SBCommandInterpreter.i @@ -10,6 +10,71 @@ namespace lldb { %feature("docstring", +"SBCommandInterpreterRunOptions controls how the RunCommandInterpreter runs the code it is fed. +A default SBCommandInterpreterRunOptions object has: + StopOnContinue: false + StopOnError: false + StopOnCrash: false + EchoCommands: true + PrintResults: true + AddToHistory: true + + +") SBCommandInterpreterRunOptions; +class SBCommandInterpreterRunOptions +{ +friend class SBDebugger; +public: + SBCommandInterpreterRunOptions(); + ~SBCommandInterpreterRunOptions(); + + bool + GetStopOnContinue () const; + + void + SetStopOnContinue (bool); + + bool + GetStopOnError () const; + + void + SetStopOnError (bool); + + bool + GetStopOnCrash () const; + + void + SetStopOnCrash (bool); + + bool + GetEchoCommands () const; + + void + SetEchoCommands (bool); + + bool + GetPrintResults () const; + + void + SetPrintResults (bool); + + bool + GetAddToHistory () const; + + void + SetAddToHistory (bool); +private: + lldb_private::CommandInterpreterRunOptions * + get () const; + + lldb_private::CommandInterpreterRunOptions & + ref () const; + + // This is set in the constructor and will always be valid. + mutable std::unique_ptr<lldb_private::CommandInterpreterRunOptions> m_opaque_up; +}; + +%feature("docstring", "SBCommandInterpreter handles/interprets commands for lldb. You get the command interpreter from the SBDebugger instance. For example (from test/ python_api/interpreter/TestCommandInterpreterAPI.py), |