diff options
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Interpreter/Options.cpp | 12 | ||||
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 15 |
3 files changed, 24 insertions, 6 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 291dc401357..fa5a9a0b2e8 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -1123,6 +1123,9 @@ CommandObject::g_arguments_data[] = { eArgTypeOffset, "offset", CommandCompletions::eNoCompletion, { NULL, false }, "Help text goes here." }, { eArgTypeOldPathPrefix, "old-path-prefix", CommandCompletions::eNoCompletion, { NULL, false }, "Help text goes here." }, { eArgTypeOneLiner, "one-line-command", CommandCompletions::eNoCompletion, { NULL, false }, "A command that is entered as a single line of text." }, + { eArgTypePath, "path", CommandCompletions::eDiskFileCompletion, { NULL, false }, "Path." }, + { eArgTypePermissionsNumber, "perms-numeric", CommandCompletions::eNoCompletion, { NULL, false }, "Permissions given as an octal number (e.g. 755)." }, + { eArgTypePermissionsString, "perms=string", CommandCompletions::eNoCompletion, { NULL, false }, "Permissions given as a string value (e.g. rw-r-xr--)." }, { eArgTypePid, "pid", CommandCompletions::eNoCompletion, { NULL, false }, "The process ID number." }, { eArgTypePlugin, "plugin", CommandCompletions::eNoCompletion, { NULL, false }, "Help text goes here." }, { eArgTypeProcessName, "process-name", CommandCompletions::eNoCompletion, { NULL, false }, "The name of the process." }, diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp index 293d7535663..af700ea9a95 100644 --- a/lldb/source/Interpreter/Options.cpp +++ b/lldb/source/Interpreter/Options.cpp @@ -992,6 +992,18 @@ OptionGroupOptions::Append (OptionGroup* group) } } +const OptionGroup* +OptionGroupOptions::GetGroupWithOption (char short_opt) +{ + for (uint32_t i = 0; i < m_option_defs.size(); i++) + { + OptionDefinition opt_def = m_option_defs[i]; + if (opt_def.short_option == short_opt) + return m_option_infos[i].option_group; + } + return NULL; +} + void OptionGroupOptions::Append (OptionGroup* group, uint32_t src_mask, diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 9d9b8d93fb4..73619371ba9 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -52,6 +52,7 @@ static ScriptInterpreter::SWIGPythonCalculateNumChildren g_swig_calc_children = static ScriptInterpreter::SWIGPythonGetChildAtIndex g_swig_get_child_index = NULL; static ScriptInterpreter::SWIGPythonGetIndexOfChildWithName g_swig_get_index_child = NULL; static ScriptInterpreter::SWIGPythonCastPyObjectToSBValue g_swig_cast_to_sbvalue = NULL; +static ScriptInterpreter::SWIGPythonGetValueObjectSPFromSBValue g_swig_get_valobj_sp_from_sbvalue = NULL; static ScriptInterpreter::SWIGPythonUpdateSynthProviderInstance g_swig_update_provider = NULL; static ScriptInterpreter::SWIGPythonMightHaveChildrenSynthProviderInstance g_swig_mighthavechildren_provider = NULL; static ScriptInterpreter::SWIGPythonCallCommand g_swig_call_command = NULL; @@ -104,6 +105,9 @@ LLDBSwigPython_GetIndexOfChildWithName (void *implementor, const char* child_nam extern "C" void * LLDBSWIGPython_CastPyObjectToSBValue (void* data); +extern lldb::ValueObjectSP +LLDBSWIGPython_GetValueObjectSPFromSBValue (void* data); + extern "C" bool LLDBSwigPython_UpdateSynthProviderInstance (void* implementor); @@ -2451,20 +2455,18 @@ ScriptInterpreterPython::GetChildAtIndex (const lldb::ScriptInterpreterObjectSP& if (!g_swig_get_child_index || !g_swig_cast_to_sbvalue) return lldb::ValueObjectSP(); - void* child_ptr = NULL; - lldb::SBValue* value_sb = NULL; lldb::ValueObjectSP ret_val; { Locker py_lock(this); - child_ptr = g_swig_get_child_index (implementor,idx); + void* child_ptr = g_swig_get_child_index (implementor,idx); if (child_ptr != NULL && child_ptr != Py_None) { - value_sb = (lldb::SBValue*)g_swig_cast_to_sbvalue(child_ptr); - if (value_sb == NULL) + lldb::SBValue* sb_value_ptr = (lldb::SBValue*)g_swig_cast_to_sbvalue(child_ptr); + if (sb_value_ptr == NULL) Py_XDECREF(child_ptr); else - ret_val = value_sb->GetSP(); + ret_val = g_swig_get_valobj_sp_from_sbvalue (sb_value_ptr); } else { @@ -3058,6 +3060,7 @@ ScriptInterpreterPython::InitializeInterpreter (SWIGInitCallback python_swig_ini g_swig_get_child_index = LLDBSwigPython_GetChildAtIndex; g_swig_get_index_child = LLDBSwigPython_GetIndexOfChildWithName; g_swig_cast_to_sbvalue = LLDBSWIGPython_CastPyObjectToSBValue; + g_swig_get_valobj_sp_from_sbvalue = LLDBSWIGPython_GetValueObjectSPFromSBValue; g_swig_update_provider = LLDBSwigPython_UpdateSynthProviderInstance; g_swig_mighthavechildren_provider = LLDBSwigPython_MightHaveChildrenSynthProviderInstance; g_swig_call_command = LLDBSwigPythonCallCommand; |