52static std::pair<const RegisterInfo *, llvm::StringRef>
54 llvm::StringRef expression_path) {
59 return {reg_info, {}};
61 size_t search_end = expression_path.size();
63 llvm::StringRef prefix = expression_path.take_front(search_end);
64 size_t split = prefix.find_last_of(
".[");
65 size_t arrow = prefix.rfind(
"->");
66 if (arrow != llvm::StringRef::npos &&
67 (split == llvm::StringRef::npos || arrow > split))
69 if (split == llvm::StringRef::npos)
73 return {reg_info, expression_path.drop_front(split)};
82#define RESOLVED_FRAME_CODE_ADDR (uint32_t(eSymbolContextLastItem) << 1)
83#define RESOLVED_FRAME_ID_SYMBOL_SCOPE (RESOLVED_FRAME_CODE_ADDR << 1)
84#define GOT_FRAME_BASE (RESOLVED_FRAME_ID_SYMBOL_SCOPE << 1)
85#define RESOLVED_VARIABLES (GOT_FRAME_BASE << 1)
86#define RESOLVED_GLOBAL_VARIABLES (RESOLVED_VARIABLES << 1)
91 bool artificial,
bool behaves_like_zeroth_frame,
95 m_id(
pc, cfa, nullptr, thread_sp->GetProcess().get()),
109 if (sc_ptr !=
nullptr) {
118 addr_t pc,
bool behaves_like_zeroth_frame,
123 m_id(
pc, cfa, nullptr, thread_sp->GetProcess().get()),
130 if (sc_ptr !=
nullptr) {
135 if (reg_context_sp && !
m_sc.target_sp) {
136 m_sc.target_sp = reg_context_sp->CalculateTarget();
138 m_flags.Set(eSymbolContextTarget);
145 const Address &pc_addr,
bool behaves_like_zeroth_frame,
151 nullptr, thread_sp->GetProcess().get()),
158 if (sc_ptr !=
nullptr) {
163 if (!
m_sc.target_sp && reg_context_sp) {
164 m_sc.target_sp = reg_context_sp->CalculateTarget();
166 m_flags.Set(eSymbolContextTarget);
170 if (!
m_sc.module_sp ||
m_sc.module_sp != pc_module_sp) {
172 m_sc.module_sp = pc_module_sp;
173 m_flags.Set(eSymbolContextModule);
175 m_sc.module_sp.reset();
183 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
188 if (
m_id.GetSymbolContextScope()) {
196 if (scope ==
nullptr) {
198 if (
m_flags.IsClear(eSymbolContextSymbol))
215 return thread_sp->GetStackFrameList()->GetVisibleStackFrameIndex(
222 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
224 m_id.SetSymbolContextScope(symbol_scope);
228 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
237 TargetSP target_sp(thread_sp->CalculateTarget());
239 const bool allow_section_end =
true;
245 m_sc.module_sp = module_sp;
246 m_flags.Set(eSymbolContextModule);
268 lookup_addr.
Slide(-1);
285 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
294 thread_sp->ClearStackFrames();
299 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
314 if (
m_sc.block ==
nullptr &&
m_flags.IsClear(eSymbolContextBlock))
318 Block *inline_block =
m_sc.block->GetContainingInlinedBlock();
327 return &
m_sc.function->GetBlock(
false);
336 if (!frame_block || !addr_block)
354 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
356 if ((
m_flags.Get() & resolve_scope) != resolve_scope) {
357 uint32_t resolved = 0;
360 if (!
m_sc.target_sp) {
363 resolved |= eSymbolContextTarget;
380 m_flags.Set(resolve_scope | resolved);
384 if (
m_sc.module_sp) {
389 SymbolContextItem actual_resolve_scope = SymbolContextItem(0);
391 if (resolve_scope & eSymbolContextCompUnit) {
392 if (
m_flags.IsClear(eSymbolContextCompUnit)) {
394 resolved |= eSymbolContextCompUnit;
396 actual_resolve_scope |= eSymbolContextCompUnit;
400 if (resolve_scope & eSymbolContextFunction) {
401 if (
m_flags.IsClear(eSymbolContextFunction)) {
403 resolved |= eSymbolContextFunction;
405 actual_resolve_scope |= eSymbolContextFunction;
409 if (resolve_scope & eSymbolContextBlock) {
410 if (
m_flags.IsClear(eSymbolContextBlock)) {
412 resolved |= eSymbolContextBlock;
414 actual_resolve_scope |= eSymbolContextBlock;
418 if (resolve_scope & eSymbolContextSymbol) {
419 if (
m_flags.IsClear(eSymbolContextSymbol)) {
421 resolved |= eSymbolContextSymbol;
423 actual_resolve_scope |= eSymbolContextSymbol;
427 if (resolve_scope & eSymbolContextLineEntry) {
428 if (
m_flags.IsClear(eSymbolContextLineEntry)) {
429 if (
m_sc.line_entry.IsValid())
430 resolved |= eSymbolContextLineEntry;
432 actual_resolve_scope |= eSymbolContextLineEntry;
436 if (actual_resolve_scope) {
442 resolved |=
m_sc.module_sp->ResolveSymbolContextForAddress(
443 lookup_addr, actual_resolve_scope, sc);
447 if ((resolved & eSymbolContextCompUnit) &&
m_sc.comp_unit ==
nullptr)
449 if ((resolved & eSymbolContextFunction) &&
m_sc.function ==
nullptr)
451 if ((resolved & eSymbolContextBlock) &&
m_sc.block ==
nullptr)
453 if ((resolved & eSymbolContextSymbol) &&
m_sc.symbol ==
nullptr)
455 if ((resolved & eSymbolContextLineEntry) &&
456 !
m_sc.line_entry.IsValid()) {
458 m_sc.line_entry.ApplyFileMappings(
m_sc.target_sp);
465 if (
m_sc.target_sp) {
466 resolved |=
m_sc.target_sp->GetImages().ResolveSymbolContextForAddress(
467 lookup_addr, resolve_scope,
m_sc);
476 m_flags.Set(resolve_scope | resolved);
485 bool include_synthetic_vars,
488 (void)include_synthetic_vars;
490 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
498 const bool get_child_variables =
true;
499 const bool can_create =
true;
500 const bool stop_if_child_block_is_inlined_function =
true;
502 can_create, get_child_variables,
503 stop_if_child_block_is_inlined_function,
511 if (
m_flags.IsClear(eSymbolContextCompUnit))
514 if (
m_sc.comp_unit) {
516 m_sc.comp_unit->GetVariableList(
true));
528 if (
m_sc.module_sp) {
540 bool include_synthetic_vars,
541 bool must_have_valid_location) {
543 (void)include_synthetic_vars;
545 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
554 const bool can_create =
true;
555 const bool get_parent_variables =
true;
556 const bool stop_if_block_is_inlined_function =
true;
557 m_sc.block->AppendVariables(
558 can_create, get_parent_variables, stop_if_block_is_inlined_function,
559 [
this, must_have_valid_location](
Variable *v) {
560 return v->
IsInScope(
this) && (!must_have_valid_location ||
566 if (
m_sc.comp_unit && get_file_globals) {
568 m_sc.comp_unit->GetVariableList(
true));
569 if (global_variable_list_sp)
570 var_list_sp->AddVariables(global_variable_list_sp.get());
586 var_sp,
error, mode);
608 exe_ctx, var_expr, std::move(*lex_or_err), use_dynamic, mode);
609 if (!tree_or_error) {
617 auto valobj_or_error = interpreter.
EvaluateTree(*tree_or_error);
618 if (!valobj_or_error) {
623 var_sp = (*valobj_or_error)->GetVariable();
624 return *valobj_or_error;
630 llvm::StringRef original_var_expr = var_expr;
634 "cannot resolve a variable path in a historical frame");
638 if (var_expr.empty()) {
644 const bool check_ptr_vs_member =
646 const bool no_synth_child =
650 bool address_of =
false;
654 std::string var_expr_storage;
655 if (var_expr[0] ==
'*') {
657 var_expr = var_expr.drop_front();
658 }
else if (var_expr[0] ==
'&') {
660 var_expr = var_expr.drop_front();
663 bool is_register_path = var_expr.consume_front(
"$");
664 if (is_register_path)
666 size_t separator_idx = var_expr.find_first_of(
".-[=+~|&^%#@!/?,<>{}");
669 ConstString name_const_string(var_expr.substr(0, separator_idx));
673 if (is_register_path) {
675 auto [reg_info, register_path] =
678 : std::pair<const RegisterInfo *, llvm::StringRef>{
nullptr, {}};
681 "no register named '%s' found in this frame",
687 var_expr = register_path;
689 const bool get_file_globals =
true;
693 variable_list = var_list_sp.get();
697 var_sp = variable_list->
FindVariable(name_const_string,
false);
699 var_expr = var_expr.drop_front(name_const_string.
GetLength());
702 bool synthetically_added_instance_object =
false;
704 if (!valobj_sp && !var_sp &&
709 llvm::StringRef instance_name =
m_sc.GetInstanceName();
710 if (!instance_name.empty()) {
714 if (
Type *var_type = var_sp->GetType())
715 if (
auto compiler_type = var_type->GetForwardCompilerType())
716 if (!compiler_type.IsPointerType())
717 var_expr_storage =
".";
719 if (var_expr_storage.empty())
720 var_expr_storage =
"->";
721 var_expr_storage += var_expr;
722 var_expr = var_expr_storage;
723 synthetically_added_instance_object =
true;
728 if (!valobj_sp && !var_sp &&
732 for (
const VariableSP &variable_sp : *variable_list) {
735 if (!variable_sp->GetName().IsEmpty())
738 Type *var_type = variable_sp->GetType();
747 valobj_sp = valobj_sp->GetChildMemberWithName(name_const_string);
753 if (var_sp && !valobj_sp) {
760 "no variable named '{0}' found in this frame", name_const_string);
765 while (!var_expr.empty()) {
768 const char separator_type = var_expr[0];
769 bool expr_is_ptr =
false;
770 switch (separator_type) {
776 if (var_expr.size() < 2 || var_expr[1] !=
'>')
781 if (!valobj_sp->IsPointerType() && valobj_sp->HasSyntheticValue()) {
784 valobj_sp->GetSyntheticValue()->Dereference(deref_error);
785 synth_deref_sp && deref_error.
Success()) {
786 valobj_sp = std::move(synth_deref_sp);
788 if (!valobj_sp || deref_error.
Fail()) {
790 "Failed to dereference synthetic value: {0}", deref_error);
803 var_expr = var_expr.drop_front();
806 var_expr = var_expr.drop_front();
807 separator_idx = var_expr.find_first_of(
".-[");
808 ConstString child_name(var_expr.substr(0, var_expr.find_first_of(
".-[")));
810 if (check_ptr_vs_member) {
814 const bool actual_is_ptr = valobj_sp->IsPointerType();
816 if (actual_is_ptr != expr_is_ptr) {
819 valobj_sp->GetExpressionPath(var_expr_path_strm);
822 "\"%s\" is a pointer and . was used to attempt to access "
823 "\"%s\". Did you mean \"%s->%s\"?",
825 var_expr_path_strm.
GetData(), var_expr.str().c_str());
828 "\"%s\" is not a pointer and -> was used to attempt to "
829 "access \"%s\". Did you mean \"%s.%s\"?",
831 var_expr_path_strm.
GetData(), var_expr.str().c_str());
835 child_valobj_sp = valobj_sp->GetChildMemberWithName(child_name);
836 if (!child_valobj_sp) {
837 if (!no_synth_child) {
838 child_valobj_sp = valobj_sp->GetSyntheticValue();
841 child_valobj_sp->GetChildMemberWithName(child_name);
844 if (no_synth_child || !child_valobj_sp) {
846 if (synthetically_added_instance_object) {
851 "no variable or instance variable named '%s' found in "
855 valobj_sp->GetExpressionPath(var_expr_path_strm);
858 "\"%s\" is not a member of \"(%s) %s\"",
860 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
864 "incomplete expression path after \"%s\" in \"%s\"",
866 original_var_expr.str().c_str());
872 synthetically_added_instance_object =
false;
874 var_expr = var_expr.drop_front(child_name.
GetLength());
877 child_valobj_sp->GetDynamicValue(use_dynamic));
878 if (dynamic_value_sp)
879 child_valobj_sp = dynamic_value_sp;
886 if (var_expr.size() <= 2) {
888 "invalid square bracket encountered after \"%s\" in \"%s\"",
889 var_expr_path_strm.
GetData(), var_expr.str().c_str());
894 var_expr = var_expr.drop_front();
895 long child_index = 0;
898 size_t end_pos = var_expr.find_first_of(
']');
899 if (end_pos == llvm::StringRef::npos) {
901 "missing closing square bracket in expression \"%s\"",
905 llvm::StringRef index_expr = var_expr.take_front(end_pos);
906 llvm::StringRef original_index_expr = index_expr;
908 var_expr = var_expr.drop_front(end_pos + 1);
910 if (index_expr.consumeInteger(0, child_index)) {
914 "invalid index expression \"%s\"", index_expr.str().c_str());
918 if (index_expr.empty()) {
922 !valobj_sp->IsPointerType() &&
924 static_cast<unsigned long>(child_index) >
UINT32_MAX)) {
925 valobj_sp->GetExpressionPath(var_expr_path_strm);
927 "array index %ld is not valid for \"(%s) %s\"", child_index,
928 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
933 if (valobj_sp->GetCompilerType().IsPointerToScalarType() && deref) {
939 if (!temp || deref_error.
Fail()) {
940 valobj_sp->GetExpressionPath(var_expr_path_strm);
942 "could not dereference \"(%s) %s\"",
943 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
949 }
else if (valobj_sp->GetCompilerType().IsArrayOfScalarType() &&
957 valobj_sp->GetExpressionPath(var_expr_path_strm);
959 "could not get item 0 for \"(%s) %s\"",
960 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
968 bool is_incomplete_array =
false;
969 if (valobj_sp->IsPointerType()) {
970 bool is_objc_pointer =
true;
972 if (valobj_sp->GetCompilerType().GetMinimumLanguage() !=
974 is_objc_pointer =
false;
975 else if (!valobj_sp->GetCompilerType().IsPointerType())
976 is_objc_pointer =
false;
978 if (no_synth_child && is_objc_pointer) {
980 "\"(%s) %s\" is an Objective-C pointer, and cannot be "
982 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
986 }
else if (is_objc_pointer) {
991 || synthetic == valobj_sp)
994 valobj_sp->GetExpressionPath(var_expr_path_strm);
996 "\"(%s) %s\" is not an array type",
997 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
999 }
else if (
static_cast<uint32_t
>(child_index) >=
1001 ->GetNumChildrenIgnoringErrors()
1004 valobj_sp->GetExpressionPath(var_expr_path_strm);
1006 "array index %ld is not valid for \"(%s) %s\"", child_index,
1007 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1008 var_expr_path_strm.
GetData());
1010 child_valobj_sp = synthetic->GetChildAtIndex(child_index);
1011 if (!child_valobj_sp) {
1012 valobj_sp->GetExpressionPath(var_expr_path_strm);
1014 "array index %ld is not valid for \"(%s) %s\"", child_index,
1015 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1016 var_expr_path_strm.
GetData());
1021 valobj_sp->GetSyntheticArrayMember(child_index,
true);
1022 if (!child_valobj_sp) {
1023 valobj_sp->GetExpressionPath(var_expr_path_strm);
1025 "failed to use pointer as array for index %ld for "
1028 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1029 var_expr_path_strm.
GetData());
1032 }
else if (valobj_sp->GetCompilerType().IsArrayType(
1033 nullptr,
nullptr, &is_incomplete_array) ||
1034 valobj_sp->GetCompilerType().IsVectorType()) {
1037 child_valobj_sp = valobj_sp->GetChildAtIndex(child_index);
1038 if (!child_valobj_sp && (is_incomplete_array || !no_synth_child))
1040 valobj_sp->GetSyntheticArrayMember(child_index,
true);
1042 if (!child_valobj_sp) {
1043 valobj_sp->GetExpressionPath(var_expr_path_strm);
1045 "array index %ld is not valid for \"(%s) %s\"", child_index,
1046 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1047 var_expr_path_strm.
GetData());
1049 }
else if (valobj_sp->GetCompilerType().IsScalarType()) {
1051 child_valobj_sp = valobj_sp->GetSyntheticBitFieldChild(
1052 child_index, child_index,
true);
1053 if (!child_valobj_sp) {
1054 valobj_sp->GetExpressionPath(var_expr_path_strm);
1056 "bitfield range %ld-%ld is not valid for \"(%s) %s\"",
1057 child_index, child_index,
1058 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1059 var_expr_path_strm.
GetData());
1063 if (no_synth_child ||
1065 || synthetic == valobj_sp)
1068 valobj_sp->GetExpressionPath(var_expr_path_strm);
1070 "\"(%s) %s\" is not an array type",
1071 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1072 var_expr_path_strm.
GetData());
1073 }
else if (
static_cast<uint32_t
>(child_index) >=
1074 synthetic->GetNumChildrenIgnoringErrors()
1076 valobj_sp->GetExpressionPath(var_expr_path_strm);
1078 "array index %ld is not valid for \"(%s) %s\"", child_index,
1079 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1080 var_expr_path_strm.
GetData());
1082 child_valobj_sp = synthetic->GetChildAtIndex(child_index);
1083 if (!child_valobj_sp) {
1084 valobj_sp->GetExpressionPath(var_expr_path_strm);
1086 "array index %ld is not valid for \"(%s) %s\"", child_index,
1087 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1088 var_expr_path_strm.
GetData());
1093 if (!child_valobj_sp) {
1100 child_valobj_sp->GetDynamicValue(use_dynamic));
1101 if (dynamic_value_sp)
1102 child_valobj_sp = dynamic_value_sp;
1110 if (index_expr.front() !=
'-') {
1112 "invalid range expression \"'%s'\"",
1113 original_index_expr.str().c_str());
1117 index_expr = index_expr.drop_front();
1118 long final_index = 0;
1119 if (index_expr.getAsInteger(0, final_index)) {
1121 "invalid range expression \"'%s'\"",
1122 original_index_expr.str().c_str());
1127 if (child_index > final_index) {
1128 long temp = child_index;
1129 child_index = final_index;
1134 !valobj_sp->IsPointerType() &&
1135 (child_index < 0 || final_index < 0 ||
1136 static_cast<unsigned long>(child_index) >
UINT32_MAX ||
1137 static_cast<unsigned long>(final_index) >
UINT32_MAX)) {
1138 valobj_sp->GetExpressionPath(var_expr_path_strm);
1140 "bitfield range %ld-%ld is not valid for \"(%s) %s\"", child_index,
1141 final_index, valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1142 var_expr_path_strm.
GetData());
1146 if (valobj_sp->GetCompilerType().IsPointerToScalarType() && deref) {
1153 if (!temp || deref_error.
Fail()) {
1154 valobj_sp->GetExpressionPath(var_expr_path_strm);
1156 "could not dereference \"(%s) %s\"",
1157 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1158 var_expr_path_strm.
GetData());
1163 }
else if (valobj_sp->GetCompilerType().IsArrayOfScalarType() && deref) {
1170 valobj_sp->GetExpressionPath(var_expr_path_strm);
1172 "could not get item 0 for \"(%s) %s\"",
1173 valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1174 var_expr_path_strm.
GetData());
1182 valobj_sp->GetSyntheticBitFieldChild(child_index, final_index,
true);
1183 if (!child_valobj_sp) {
1184 valobj_sp->GetExpressionPath(var_expr_path_strm);
1186 "bitfield range %ld-%ld is not valid for \"(%s) %s\"", child_index,
1187 final_index, valobj_sp->GetTypeName().AsCString(
"<invalid type>"),
1188 var_expr_path_strm.
GetData());
1191 if (!child_valobj_sp) {
1198 child_valobj_sp->GetDynamicValue(use_dynamic));
1199 if (dynamic_value_sp)
1200 child_valobj_sp = dynamic_value_sp;
1209 valobj_sp->GetExpressionPath(var_expr_path_strm);
1211 "unexpected char '%c' encountered after \"%s\" in \"%s\"",
1212 separator_type, var_expr_path_strm.
GetData(),
1213 var_expr.str().c_str());
1219 if (child_valobj_sp)
1220 valobj_sp = child_valobj_sp;
1225 if (!deref_valobj_sp && !no_synth_child) {
1226 if (
ValueObjectSP synth_obj_sp = valobj_sp->GetSyntheticValue()) {
1228 deref_valobj_sp = synth_obj_sp->Dereference(
error);
1231 valobj_sp = deref_valobj_sp;
1232 }
else if (address_of) {
1234 valobj_sp = address_of_valobj_sp;
1241 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
1244 "No frame base available for this historical stack frame.");
1249 if (
m_sc.function) {
1256 if (!
m_sc.function->GetFrameBaseExpression().IsAlwaysValidSingleExpr())
1260 llvm::Expected<Value> expr_value =
1261 m_sc.function->GetFrameBaseExpression().Evaluate(
1262 &exe_ctx,
nullptr, loclist_base_addr,
nullptr,
nullptr);
1277 return llvm::Error::success();
1281 if (!
m_sc.function) {
1288 return &
m_sc.function->GetFrameBaseExpression();
1292 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
1303 return m_sc.line_entry.IsValid();
1316 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
1321 true,
true,
nullptr);
1324 const uint32_t var_idx =
1326 const uint32_t num_variables = var_list->
GetSize();
1327 if (var_idx < num_variables) {
1341 ValueObjectSP dynamic_sp = valobj_sp->GetDynamicValue(use_dynamic);
1349 if (
m_sc.block ==
nullptr)
1352 return m_sc.block->GetContainingInlinedBlock() !=
nullptr;
1368 return recognized_frame_sp->ShouldHide();
1377 if (
auto runtime_sp =
1379 return runtime_sp->GetLanguageSpecificData(
1385 const char *name =
nullptr;
1387 eSymbolContextFunction | eSymbolContextBlock | eSymbolContextSymbol);
1390 if (inlined_block) {
1398 if (name ==
nullptr) {
1403 if (name ==
nullptr) {
1412 const char *name =
nullptr;
1414 eSymbolContextFunction | eSymbolContextBlock | eSymbolContextSymbol);
1417 if (inlined_block) {
1425 if (name ==
nullptr) {
1430 if (name ==
nullptr) {
1460std::pair<const Instruction::Operand *, int64_t>
1463 switch (operand.
m_type) {
1469 return std::make_pair(
nullptr, 0);
1481 if (!immediate_child) {
1482 return std::make_pair(
nullptr, 0);
1490 std::pair<const Instruction::Operand *, int64_t> base_and_offset =
1491 GetBaseExplainingValue(*variable_child, register_context,
1493 if (!base_and_offset.first) {
1494 return std::make_pair(
nullptr, 0);
1497 base_and_offset.second -= immediate_child->
m_immediate;
1499 base_and_offset.second += immediate_child->
m_immediate;
1501 return base_and_offset;
1507 return std::make_pair(
nullptr, 0);
1511 return std::make_pair(
nullptr, 0);
1514 return std::make_pair(&operand, 0);
1516 return std::make_pair(
nullptr, 0);
1520 return std::make_pair(
nullptr, 0);
1523std::pair<const Instruction::Operand *, int64_t>
1528 return GetBaseExplainingValue(operand.
m_children[0], register_context,
1531 return std::make_pair(
nullptr, 0);
1538 const ArchSpec &target_arch = target_sp->GetArchitecture();
1544 const char *plugin_name =
nullptr;
1545 const char *flavor =
nullptr;
1546 const char *cpu =
nullptr;
1547 const char *features =
nullptr;
1548 const bool force_live_memory =
true;
1551 target_arch, plugin_name, flavor, cpu, features, *target_sp, pc_range,
1554 if (!disassembler_sp || !disassembler_sp->GetInstructionList().GetSize()) {
1559 disassembler_sp->GetInstructionList().GetInstructionAtIndex(0);
1561 llvm::SmallVector<Instruction::Operand, 3> operands;
1563 if (!instruction_sp->ParseOperands(operands)) {
1569 if (!register_context_sp) {
1574 std::pair<const Instruction::Operand *, int64_t> base_and_offset =
1575 GetBaseExplainingDereference(operand, *register_context_sp, addr);
1577 if (!base_and_offset.first) {
1581 switch (base_and_offset.first->m_type) {
1584 if (target_sp->ResolveLoadAddress(base_and_offset.first->m_immediate +
1585 base_and_offset.second,
1587 auto c_type_system_or_err =
1589 if (
auto err = c_type_system_or_err.takeError()) {
1591 "Unable to guess value for given address: {0}");
1594 auto ts = *c_type_system_or_err;
1609 base_and_offset.second);
1624 llvm::expectedToOptional(parent->GetByteSize()).value_or(0)) {
1628 if (parent->IsPointerOrReferenceType()) {
1632 for (
int ci = 0, ce = parent->GetNumChildrenIgnoringErrors(); ci != ce;
1640 int64_t child_offset = child_sp->GetByteOffset();
1641 int64_t child_size =
1642 llvm::expectedToOptional(child_sp->GetByteSize()).value_or(0);
1644 if (offset >= child_offset && offset < (child_offset + child_size)) {
1645 return GetValueForOffset(frame, child_sp, offset - child_offset);
1663 if (!base->IsPointerOrReferenceType()) {
1676 llvm::expectedToOptional(pointee->GetByteSize()).value_or(0)) {
1678 llvm::expectedToOptional(pointee->GetByteSize()).value_or(1);
1679 int64_t index = offset / size;
1680 offset = offset % size;
1681 const bool can_create =
true;
1682 pointee = base->GetSyntheticArrayMember(index, can_create);
1685 if (!pointee ||
error.Fail()) {
1689 return GetValueForOffset(frame, pointee, offset);
1761 if (var_sp->LocationExpressionList().MatchesOperand(frame, op))
1765 const uint32_t current_inst =
1771 for (uint32_t ii = current_inst - 1; ii != (uint32_t)-1; --ii) {
1779 if (instruction_sp->IsCall()) {
1785 const char *return_register_name;
1786 if (!abi_sp->GetPointerReturnRegister(return_register_name)) {
1792 return_register_name);
1793 if (!return_register_info) {
1809 llvm::SmallVector<Instruction::Operand, 1> operands;
1810 if (!instruction_sp->ParseOperands(operands) || operands.size() != 1) {
1814 switch (operands[0].m_type) {
1819 if (!
pc.GetModule())
1821 Address address(operands[0].m_immediate,
1822 pc.GetModule()->GetSectionList());
1823 if (!address.IsValid())
1826 address, eSymbolContextFunction, sc);
1840 std::string name_str(
1842 name_str.append(
"()");
1845 &frame, name_str, return_value_address, return_type);
1846 return GetValueForDereferincingOffset(frame, return_value_sp, offset);
1853 llvm::SmallVector<Instruction::Operand, 2> operands;
1854 if (!instruction_sp->ParseOperands(operands) || operands.size() != 2) {
1863 if (clobbered_reg_matcher(operands[0])) {
1864 origin_operand = &operands[1];
1865 }
else if (clobbered_reg_matcher(operands[1])) {
1866 origin_operand = &operands[0];
1873 std::string origin_register;
1874 int64_t origin_offset = 0;
1876 if (
FetchRegOp(origin_register)(*origin_operand)) {
1877 source_path = DoGuessValueAt(frame, origin_register, 0, disassembler,
1878 variables, instruction_sp->GetAddress());
1881 FetchRegOp(origin_register))(*origin_operand) ||
1886 FetchImmOp(origin_offset)))(*origin_operand)) {
1888 DoGuessValueAt(frame, origin_register, origin_offset, disassembler,
1889 variables, instruction_sp->GetAddress());
1893 source_path = GetValueForDereferincingOffset(frame, source_path, offset);
1910 const ArchSpec &target_arch = target_sp->GetArchitecture();
1929 const char *plugin_name =
nullptr;
1930 const char *flavor =
nullptr;
1931 const char *cpu =
nullptr;
1932 const char *features =
nullptr;
1933 const bool force_live_memory =
true;
1935 target_arch, plugin_name, flavor, cpu, features, *target_sp,
1938 if (!disassembler_sp || !disassembler_sp->GetInstructionList().GetSize()) {
1942 const bool get_file_globals =
false;
1946 const bool include_synthetic_vars =
false;
1954 return DoGuessValueAt(*
this, reg, offset, *disassembler_sp, *variables,
1967 if (!target_sp && !process_sp)
1975 const bool can_create =
true;
1976 const bool get_parent_variables =
true;
1977 const bool stop_if_block_is_inlined_function =
true;
1980 can_create, get_parent_variables, stop_if_block_is_inlined_function,
1981 [
this](
Variable *v) { return v->IsInScope(this); },
1997 ProcessSP process_sp(thread_sp->CalculateProcess());
1999 target_sp = process_sp->CalculateTarget();
2008 process_sp = thread_sp->CalculateProcess();
2022 llvm::StringRef frame_marker) {
2037 const llvm::StringRef frame_marker) {
2038 if (strm ==
nullptr)
2049 frame_format = &format_entry;
2052 frame_format = &format_entry;
2056 Dump(strm,
true,
false);
2062 bool show_fullpaths) {
2063 if (strm ==
nullptr)
2066 if (show_frame_index)
2070 strm->
Printf(
"0x%0*" PRIx64
" ",
2075 const bool show_module =
true;
2076 const bool show_inline =
true;
2077 const bool show_function_arguments =
true;
2078 const bool show_function_name =
true;
2081 show_inline, show_function_arguments,
2082 show_function_name);
2086 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
2098 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
2137 const llvm::StringRef frame_marker) {
2138 if (show_frame_info) {
2145 bool have_source =
false, have_debuginfo =
false;
2150 const uint32_t source_lines_before =
2152 const uint32_t source_lines_after =
2157 if (
m_sc.comp_unit ||
m_sc.line_entry.IsValid()) {
2158 have_debuginfo =
true;
2159 if (source_lines_before > 0 || source_lines_after > 0) {
2161 uint32_t start_line =
m_sc.line_entry.line;
2162 if (!start_line &&
m_sc.function) {
2163 m_sc.function->GetStartLineSourceInfo(source_file_sp, start_line);
2168 source_file_sp, start_line,
m_sc.line_entry.column,
2169 source_lines_before, source_lines_after,
"->", &strm,
2174 if (!
m_sc.line_entry.line)
2175 strm <<
"note: This address is not associated with a specific line "
2176 "of code. This may be due to compiler optimizations.\n";
2179 switch (disasm_display) {
2196 if (disasm_lines > 0) {
2198 const char *plugin_name =
nullptr;
2199 const char *flavor =
nullptr;
2200 const bool mixed_source_and_assembly =
false;
2202 target->
GetDebugger(), target_arch, plugin_name, flavor,
2206 mixed_source_and_assembly, 0,
2218 auto process =
GetThread()->GetProcess();
2222 auto &manager = process->GetTarget().GetFrameRecognizerManager();
2223 auto new_generation = manager.GetGeneration();
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG_ERROR(log, error,...)
static std::pair< const RegisterInfo *, llvm::StringRef > FindRegisterInExpressionPath(RegisterContext ®_ctx, llvm::StringRef expression_path)
#define RESOLVED_GLOBAL_VARIABLES
#define RESOLVED_FRAME_ID_SYMBOL_SCOPE
#define RESOLVED_FRAME_CODE_ADDR
#define RESOLVED_VARIABLES
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
void SetByteSize(lldb::addr_t byte_size)
Set accessor for the byte size of this range.
A section + offset based address class.
lldb::addr_t GetOpcodeLoadAddress(Target *target, AddressClass addr_class=AddressClass::eInvalid) const
Get the load address as an opcode load address.
bool SetOpcodeLoadAddress(lldb::addr_t load_addr, Target *target, AddressClass addr_class=AddressClass::eInvalid, bool allow_section_end=false)
bool Slide(int64_t offset)
lldb::ModuleSP GetModule() const
Get accessor for the module for this address.
lldb::addr_t GetOffset() const
Get the section relative offset value.
bool IsValid() const
Check if the object state is valid.
Block * CalculateSymbolContextBlock() const
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
uint32_t GetMaximumOpcodeByteSize() const
A class that describes a single lexical block.
Block * GetContainingInlinedBlock()
Get the inlined block that contains this block.
const InlineFunctionInfo * GetInlinedFunctionInfo() const
Get const accessor for any inlined function information.
Function * CalculateSymbolContextFunction() override
uint32_t AppendVariables(bool can_create, bool get_parent_variables, bool stop_if_block_is_inlined_function, const std::function< bool(Variable *)> &filter, VariableList *variable_list)
Appends the variables from this block, and optionally from all parent blocks, to variable_list.
uint32_t AppendBlockVariables(bool can_create, bool get_child_block_variables, bool stop_if_child_block_is_inlined_function, const std::function< bool(Variable *)> &filter, VariableList *variable_list)
Get the variable list for this block and optionally all child blocks if get_child_variables is true.
A class that describes a compilation unit.
lldb::LanguageType GetLanguage()
Generic representation of a type in a programming language.
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const
Create related types using the current type's AST.
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
bool IsAnonymousType() const
bool IsFunctionType() const
CompilerType GetFunctionReturnType() const
A uniqued constant string class.
size_t GetLength() const
Get the length in bytes of string value.
const char * GetCString() const
Get the string value as a C string.
const char * AsCString(const char *value_if_empty) const
Get the string value as a C string.
"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single ...
A class to manage flag bits.
uint64_t GetDisassemblyLineCount() const
FormatEntity::Entry GetFrameFormatUnique() const
uint64_t GetStopSourceLineCount(bool before) const
FormatEntity::Entry GetFrameFormat() const
lldb::StopDisassemblyType GetStopDisassemblyDisplay() const
static lldb::DisassemblerSP DisassembleRange(const ArchSpec &arch, const char *plugin_name, const char *flavor, const char *cpu, const char *features, Target &target, llvm::ArrayRef< AddressRange > disasm_ranges, bool force_live_memory=false)
static bool Disassemble(Debugger &debugger, const ArchSpec &arch, const char *plugin_name, const char *flavor, const char *cpu, const char *features, const ExecutionContext &exe_ctx, const Address &start, Limit limit, bool mixed_source_and_assembly, uint32_t num_mixed_context_lines, uint32_t options, Stream &strm)
InstructionList & GetInstructionList()
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
ExecutionContextScope * GetBestExecutionContextScope() const
void SetContext(const lldb::TargetSP &target_sp, bool get_process)
Target * GetTargetPtr() const
Returns a pointer to the target object.
Target & GetTargetRef() const
Returns a reference to the target object.
A class that describes a function.
CompilerType GetCompilerType()
bool GetRangeContainingLoadAddress(lldb::addr_t load_addr, Target &target, AddressRange &range)
ConstString GetName() const
const Mangled & GetMangled() const
AddressRanges GetAddressRanges()
ConstString GetDisplayName() const
A class that describes information for an inlined function.
ConstString GetDisplayName() const
ConstString GetName() const
lldb::InstructionSP GetInstructionAtIndex(size_t idx) const
lldb::LanguageType GuessLanguage() const
Try to guess the language from the mangling.
const RegisterInfo * GetRegisterInfoByName(llvm::StringRef reg_name, uint32_t start_idx=0)
virtual bool ReadRegister(const RegisterInfo *reg_info, RegisterValue ®_value)=0
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
size_t DisplaySourceLinesWithLineNumbers(SupportFileNSP support_file_nsp, uint32_t line, uint32_t column, uint32_t context_before, uint32_t context_after, const char *current_line_cstr, Stream *s, const SymbolContextList *bp_locs=nullptr, lldb::LanguageType language_type=lldb::eLanguageTypeUnknown)
This base class provides an interface to stack frames.
virtual lldb::ValueObjectSP GetValueForVariableExpressionPath(llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error, lldb::DILMode mode=lldb::eDILModeFull)
Create a ValueObject for a variable name / pathname, possibly including simple dereference/child sele...
void SetSymbolContextScope(SymbolContextScope *symbol_scope)
uint16_t m_frame_recognizer_generation
lldb::VariableListSP m_variable_list_sp
void UpdatePreviousFrameFromCurrentFrame(StackFrame &curr_frame)
bool m_artificial
Is this an artificial stack frame (e.g.
lldb::ThreadSP GetThread() const
Address m_frame_code_addr
The frame code address (might not be the same as the actual PC for inlined frames) as a section/offse...
@ eExpressionPathOptionCheckPtrVsMember
@ eExpressionPathOptionsInspectAnonymousUnions
@ eExpressionPathOptionsAllowDirectIVarAccess
@ eExpressionPathOptionsNoSyntheticChildren
virtual const char * GetFunctionName()
Get the frame's demangled name.
virtual bool IsHidden()
Query whether this frame should be hidden from backtraces.
virtual lldb::ValueObjectSP GuessValueForRegisterAndOffset(llvm::StringRef reg, int64_t offset)
Attempt to reconstruct the ValueObject for the address contained in a given register plus an offset.
virtual bool IsSynthetic() const
Query whether this frame is synthetic.
virtual DWARFExpressionList * GetFrameBaseExpression(Status *error_ptr)
Get the DWARFExpressionList corresponding to the Canonical Frame Address.
void UpdateCurrentFrameFromPreviousFrame(StackFrame &prev_frame)
ValueObjectList m_variable_list_value_objects
Value objects for each variable in m_variable_list_sp.
bool m_cfa_is_valid
Does this frame have a CFA? Different from CFA == LLDB_INVALID_ADDRESS.
virtual llvm::Error GetFrameBaseValue(Scalar &value)
Return the Canonical Frame Address (DWARF term) for this frame.
lldb::ThreadWP m_thread_wp
For StackFrame and derived classes only.
std::optional< lldb::RecognizedStackFrameSP > m_recognized_frame_sp
virtual bool IsInlined()
Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived ...
lldb::ValueObjectSP DILGetValueForVariableExpressionPath(llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error, lldb::DILMode mode=lldb::eDILModeFull)
virtual SourceLanguage GuessLanguage()
Similar to GetLanguage(), but is allowed to take a potentially incorrect guess if exact information i...
virtual lldb::RegisterContextSP GetRegisterContext()
Get the RegisterContext for this frame, if possible.
bool IsAddressInFrameScope(const Address &addr)
Let F be this frame's function.
lldb::RegisterContextSP m_reg_context_sp
static char ID
LLVM RTTI support.
virtual StructuredData::ObjectSP GetLanguageSpecificData()
Language plugins can use this API to report language-specific runtime information about this compile ...
virtual Address GetFrameCodeAddressForSymbolication()
Get the current code Address suitable for symbolication, may not be the same as GetFrameCodeAddress()...
@ History
A historical stack frame – possibly without CFA or registers or local variables.
@ Regular
A regular stack frame with access to registers and local variables.
@ Synthetic
An synthetic stack frame (e.g.
uint32_t m_concrete_frame_index
bool m_behaves_like_zeroth_frame
Whether this frame behaves like the zeroth frame, in the sense that its pc value might not immediatel...
virtual StackID & GetStackID()
virtual lldb::ValueObjectSP GuessValueForAddress(lldb::addr_t addr)
Attempt to econstruct the ValueObject for a given raw address touched by the current instruction.
virtual bool GetStatus(Stream &strm, bool show_frame_info, bool show_source, bool show_unique=false, const llvm::StringRef frame_marker="")
Print a description of this stack frame and/or the source context/assembly for this stack frame.
virtual bool ChangePC(lldb::addr_t pc)
Change the pc value for a given thread.
lldb::ValueObjectSP LegacyGetValueForVariableExpressionPath(llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error)
Private methods, called from GetValueForVariableExpressionPath.
lldb::ThreadSP CalculateThread() override
virtual SourceLanguage GetLanguage()
Query this frame to determine what the default language should be when parsing expressions given the ...
virtual lldb::ValueObjectSP GetValueObjectForFrameVariable(const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic)
Create a ValueObject for a given Variable in this StackFrame.
virtual VariableList * GetVariableList(bool get_file_globals, bool include_synthetic_vars, Status *error_ptr)
Retrieve the list of variables whose scope either:
bool HasCachedData() const
StreamString m_disassembly
lldb::StackFrameSP CalculateStackFrame() override
virtual const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
virtual const char * GetDisplayFunctionName()
Get the frame's demangled display name.
Status m_frame_base_error
virtual bool IsHistorical() const
Query whether this frame is part of a historical backtrace.
virtual const char * Disassemble()
Return the disassembly for the instructions of this StackFrame's function as a single C string.
virtual bool IsArtificial() const
Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frame...
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
virtual void Dump(Stream *strm, bool show_frame_index, bool show_fullpaths)
Print a description for this frame using a default format.
virtual uint32_t GetFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList.
virtual bool HasDebugInformation()
Determine whether this StackFrame has debug information available or not.
virtual void DumpUsingSettingsFormat(Stream *strm, bool show_unique=false, const llvm::StringRef frame_marker="")
Print a description for this frame using the frame-format formatter settings.
virtual lldb::VariableListSP GetInScopeVariableList(bool get_file_globals, bool include_synthetic_vars=true, bool must_have_valid_location=false)
Retrieve the list of variables that are in scope at this StackFrame's pc.
StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, lldb::addr_t cfa, bool cfa_is_valid, lldb::addr_t pc, Kind frame_kind, bool artificial, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr)
Construct a StackFrame object without supplying a RegisterContextSP.
virtual Block * GetFrameBlock()
Get the current lexical scope block for this StackFrame, if possible.
virtual bool DumpUsingFormat(Stream &strm, const lldb_private::FormatEntity::Entry *format, llvm::StringRef frame_marker={})
Print a description of this frame using the provided frame format.
lldb::ProcessSP CalculateProcess() override
const lldb::RegisterContextSP & GetRegisterContextSP() const
virtual lldb::RecognizedStackFrameSP GetRecognizedFrame()
std::recursive_mutex m_mutex
virtual lldb::ValueObjectSP FindVariable(ConstString name)
Attempt to reconstruct the ValueObject for a variable with a given name from within the current Stack...
virtual const Address & GetFrameCodeAddress()
Get an Address for the current pc value in this StackFrame.
lldb::TargetSP CalculateTarget() override
lldb::addr_t GetPC() const
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Fail() const
Test for error condition.
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
bool Success() const
Test for success condition.
const char * GetData() const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
size_t EOL()
Output and End of Line character to the stream.
std::shared_ptr< Object > ObjectSP
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
Block * block
The Block for a given query.
lldb::ModuleSP module_sp
The Module for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
Symbol * symbol
The Symbol for a given query.
lldb::TargetSP target_sp
The Target for a given query.
LineEntry line_entry
The LineEntry for a given query.
Provides public interface for all SymbolFiles.
Status GetFrameVariableError(StackFrame &frame)
Get an error that describes why variables might be missing for a given symbol context.
ConstString GetName() const
ConstString GetDisplayName() const
const char * GetDisassemblyFeatures() const
const char * GetDisassemblyCPU() const
bool GetUseDIL(ExecutionContext *exe_ctx) const
SourceManager & GetSourceManager()
Debugger & GetDebugger() const
const ArchSpec & GetArchitecture() const
CompilerType GetForwardCompilerType()
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS, ValueObjectManager *manager=nullptr)
These routines create ValueObjectConstResult ValueObjects from various data sources.
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp, ValueObject *parent=nullptr)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, const RegisterInfo *reg_info)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp)
uint32_t FindIndexForVariable(Variable *variable)
lldb::VariableSP FindVariable(ConstString name, bool include_static_members=true) const
bool IsInScope(StackFrame *frame)
bool LocationIsValidForFrame(StackFrame *frame)
static llvm::Expected< DILLexer > Create(llvm::StringRef expr, lldb::DILMode mode=lldb::eDILModeFull)
Lexes all the tokens in expr and calls the private constructor with the lexed tokens.
static llvm::Expected< ASTNodeUP > Parse(ExecutionContext &exe_ctx, llvm::StringRef dil_input_expr, DILLexer lexer, lldb::DynamicValueType use_dynamic, lldb::DILMode mode)
Parse the lexed tokens.
llvm::Expected< lldb::ValueObjectSP > EvaluateTree(const ASTNodeUP &tree)
Evaluate an ASTNode tree.
#define LLDB_INVALID_ADDRESS
std::function< bool(const Instruction::Operand &)> FetchRegOp(std::string ®)
std::function< bool(const Instruction::Operand &)> MatchRegOp(const RegisterInfo &info)
std::function< bool(const Instruction::Operand &)> FetchImmOp(int64_t &imm)
std::function< bool(const Instruction::Operand &)> MatchOpType(Instruction::Operand::Type type)
std::function< bool(const Instruction::Operand &)> MatchBinaryOp(std::function< bool(const Instruction::Operand &)> base, std::function< bool(const Instruction::Operand &)> left, std::function< bool(const Instruction::Operand &)> right)
std::function< bool(const Instruction::Operand &)> MatchUnaryOp(std::function< bool(const Instruction::Operand &)> base, std::function< bool(const Instruction::Operand &)> child)
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
NonNullSharedPtr< lldb_private::SupportFile > SupportFileNSP
std::shared_ptr< lldb_private::ABI > ABISP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::RecognizedStackFrame > RecognizedStackFrameSP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Format
Display format definitions.
@ eLanguageTypeC
Non-standardized C, such as K&R.
@ eLanguageTypeObjC
Objective-C.
std::shared_ptr< lldb_private::Instruction > InstructionSP
std::shared_ptr< lldb_private::Process > ProcessSP
StopDisassemblyType
Used to determine when to show disassembly.
@ eStopDisassemblyTypeNever
@ eStopDisassemblyTypeNoSource
@ eStopDisassemblyTypeAlways
@ eStopDisassemblyTypeNoDebugInfo
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
std::shared_ptr< lldb_private::VariableList > VariableListSP
std::shared_ptr< lldb_private::Variable > VariableSP
@ eValueTypeRegister
stack frame register value
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
DILMode
Data Inspection Language (DIL) evaluation modes.
std::shared_ptr< lldb_private::Module > ModuleSP
enum lldb_private::Instruction::Operand::Type m_type
static Operand BuildImmediate(lldb::addr_t imm, bool neg)
static Operand BuildDereference(const Operand &ref)
std::vector< Operand > m_children
static Operand BuildRegister(llvm::StringRef r)
static Operand BuildSum(const Operand &lhs, const Operand &rhs)
Every register is described in detail including its name, alternate name (optional),...
A type-erased pair of llvm::dwarf::SourceLanguageName and version.
lldb::LanguageType AsLanguageType() const