本文整理汇总了C++中CommandInterpreter::GetExecutionContext方法的典型用法代码示例。如果您正苦于以下问题:C++ CommandInterpreter::GetExecutionContext方法的具体用法?C++ CommandInterpreter::GetExecutionContext怎么用?C++ CommandInterpreter::GetExecutionContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandInterpreter
的用法示例。
在下文中一共展示了CommandInterpreter::GetExecutionContext方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exe_ctx
bool
OptionGroupFormat::ParserGDBFormatLetter (CommandInterpreter &interpreter, char format_letter, Format &format, uint32_t &byte_size)
{
m_has_gdb_format = true;
switch (format_letter)
{
case 'o': format = eFormatOctal; m_prev_gdb_format = format_letter; return true;
case 'x': format = eFormatHex; m_prev_gdb_format = format_letter; return true;
case 'd': format = eFormatDecimal; m_prev_gdb_format = format_letter; return true;
case 'u': format = eFormatUnsigned; m_prev_gdb_format = format_letter; return true;
case 't': format = eFormatBinary; m_prev_gdb_format = format_letter; return true;
case 'f': format = eFormatFloat; m_prev_gdb_format = format_letter; return true;
case 'a': format = eFormatAddressInfo;
{
ExecutionContext exe_ctx(interpreter.GetExecutionContext());
Target *target = exe_ctx.GetTargetPtr();
if (target)
byte_size = target->GetArchitecture().GetAddressByteSize();
m_prev_gdb_format = format_letter;
return true;
}
case 'i': format = eFormatInstruction; m_prev_gdb_format = format_letter; return true;
case 'c': format = eFormatChar; m_prev_gdb_format = format_letter; return true;
case 's': format = eFormatCString; m_prev_gdb_format = format_letter; return true;
case 'T': format = eFormatOSType; m_prev_gdb_format = format_letter; return true;
case 'A': format = eFormatHexFloat; m_prev_gdb_format = format_letter; return true;
case 'b': byte_size = 1; m_prev_gdb_size = format_letter; return true;
case 'h': byte_size = 2; m_prev_gdb_size = format_letter; return true;
case 'w': byte_size = 4; m_prev_gdb_size = format_letter; return true;
case 'g': byte_size = 8; m_prev_gdb_size = format_letter; return true;
default: break;
}
return false;
}
示例2:
void
OptionGroupValueObjectDisplay::OptionParsingStarting (CommandInterpreter &interpreter)
{
// If these defaults change, be sure to modify AnyOptionWasSet().
show_types = false;
no_summary_depth = 0;
show_location = false;
flat_output = false;
use_objc = false;
max_depth = UINT32_MAX;
ptr_depth = 0;
use_synth = true;
be_raw = false;
ignore_cap = false;
run_validator = false;
Target *target = interpreter.GetExecutionContext().GetTargetPtr();
if (target != nullptr)
use_dynamic = target->GetPreferDynamicValue();
else
{
// If we don't have any targets, then dynamic values won't do us much good.
use_dynamic = lldb::eNoDynamicValues;
}
}
示例3: AutoComplete
int
CommandCompletions::VariablePath (CommandInterpreter &interpreter,
const char *partial_name,
int match_start_point,
int max_return_elements,
SearchFilter *searcher,
bool &word_complete,
lldb_private::StringList &matches)
{
return Variable::AutoComplete (interpreter.GetExecutionContext(), partial_name, matches, word_complete);
}
示例4: exe_ctx
size_t
OptionValueUUID::AutoComplete (CommandInterpreter &interpreter,
const char *s,
int match_start_point,
int max_return_elements,
bool &word_complete,
StringList &matches)
{
word_complete = false;
matches.Clear();
ExecutionContext exe_ctx(interpreter.GetExecutionContext());
Target *target = exe_ctx.GetTargetPtr();
if (target)
{
const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
UUID::ValueType uuid_bytes;
const size_t num_bytes_decoded = UUID::DecodeUUIDBytesFromCString(s, uuid_bytes, NULL);
for (size_t i=0; i<num_modules; ++i)
{
ModuleSP module_sp (target->GetImages().GetModuleAtIndex(i));
if (module_sp)
{
const UUID &module_uuid = module_sp->GetUUID();
if (module_uuid.IsValid())
{
bool add_uuid = false;
if (num_bytes_decoded == 0)
add_uuid = true;
else
add_uuid = ::memcmp(module_uuid.GetBytes(), uuid_bytes, num_bytes_decoded) == 0;
if (add_uuid)
{
std::string uuid_str;
uuid_str = module_uuid.GetAsString();
if (!uuid_str.empty())
matches.AppendString(uuid_str.c_str());
}
}
}
}
}
}
return matches.GetSize();
}
示例5: VariablePath
int CommandCompletions::VariablePath(CommandInterpreter &interpreter,
CompletionRequest &request,
SearchFilter *searcher) {
return Variable::AutoComplete(interpreter.GetExecutionContext(), request);
}