Johnny Chen | 5cb6cab | 2011-07-19 22:41:47 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBCommandInterpreter -----------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | class SBCommandInterpreter |
| 13 | { |
| 14 | public: |
| 15 | enum |
| 16 | { |
| 17 | eBroadcastBitThreadShouldExit = (1 << 0), |
| 18 | eBroadcastBitResetPrompt = (1 << 1), |
| 19 | eBroadcastBitQuitCommandReceived = (1 << 2), // User entered quit |
| 20 | eBroadcastBitAsynchronousOutputData = (1 << 3), |
| 21 | eBroadcastBitAsynchronousErrorData = (1 << 4) |
| 22 | }; |
| 23 | |
| 24 | SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs); |
| 25 | |
| 26 | ~SBCommandInterpreter (); |
| 27 | |
| 28 | static const char * |
| 29 | GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type); |
| 30 | |
| 31 | static const char * |
| 32 | GetArgumentDescriptionAsCString (const lldb::CommandArgumentType arg_type); |
| 33 | |
| 34 | bool |
| 35 | IsValid() const; |
| 36 | |
| 37 | bool |
| 38 | CommandExists (const char *cmd); |
| 39 | |
| 40 | bool |
| 41 | AliasExists (const char *cmd); |
| 42 | |
| 43 | lldb::SBBroadcaster |
| 44 | GetBroadcaster (); |
| 45 | |
| 46 | bool |
| 47 | HasCommands (); |
| 48 | |
| 49 | bool |
| 50 | HasAliases (); |
| 51 | |
| 52 | bool |
| 53 | HasAliasOptions (); |
| 54 | |
| 55 | lldb::SBProcess |
| 56 | GetProcess (); |
| 57 | |
| 58 | ssize_t |
| 59 | WriteToScriptInterpreter (const char *src); |
| 60 | |
| 61 | ssize_t |
| 62 | WriteToScriptInterpreter (const char *src, size_t src_len); |
| 63 | |
| 64 | void |
| 65 | SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result); |
| 66 | |
| 67 | void |
| 68 | SourceInitFileInCurrentWorkingDirectory (lldb::SBCommandReturnObject &result); |
| 69 | |
| 70 | lldb::ReturnStatus |
| 71 | HandleCommand (const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history = false); |
| 72 | |
| 73 | int |
| 74 | HandleCompletion (const char *current_line, |
| 75 | const char *cursor, |
| 76 | const char *last_char, |
| 77 | int match_start_point, |
| 78 | int max_return_elements, |
| 79 | lldb::SBStringList &matches); |
| 80 | }; |
| 81 | |
| 82 | } // namespace lldb |