File tree Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -102,16 +102,25 @@ class Expression {
102
102
// /
103
103
// / The format being:
104
104
// /
105
- // / <prefix>:<mangled name>:<module id >:<DIE id >
105
+ // / <prefix>:<mangled name>:<module uid >:<symbol uid >
106
106
// /
107
107
// / The label string needs to stay valid for the entire lifetime
108
108
// / of this object.
109
109
struct FunctionCallLabel {
110
- llvm::StringRef m_lookup_name;
111
- lldb::user_id_t m_module_id;
112
-
113
- // / Mostly for debuggability.
114
- lldb::user_id_t m_die_id;
110
+ // / Name to use when searching for the function symbol in
111
+ // / \c module_id. For most function calls this will be a
112
+ // / mangled name. In cases where a mangled name can't be used,
113
+ // / this will be the function name.
114
+ llvm::StringRef lookup_name;
115
+
116
+ // / Unique identifier of the lldb_private::Module
117
+ // / which contains the symbol identified by \c symbol_id.
118
+ lldb::user_id_t module_id;
119
+
120
+ // / Unique identifier of the function symbol on which to
121
+ // / perform the function call. For example, for DWARF this would
122
+ // / be the DIE UID.
123
+ lldb::user_id_t symbol_id;
115
124
};
116
125
117
126
// / LLDB attaches this prefix to mangled names of functions that it get called
Original file line number Diff line number Diff line change @@ -809,11 +809,11 @@ ResolveFunctionCallLabel(llvm::StringRef name,
809
809
810
810
const auto &label = *label_or_err;
811
811
812
- auto module_sp = sc.target_sp ->GetImages ().FindModule (label.m_module_id );
812
+ auto module_sp = sc.target_sp ->GetImages ().FindModule (label.module_id );
813
813
814
814
if (!module_sp)
815
815
return llvm::createStringError (
816
- llvm::formatv (" failed to find module by UID {0}" , label.m_module_id ));
816
+ llvm::formatv (" failed to find module by UID {0}" , label.module_id ));
817
817
818
818
auto *symbol_file = module_sp->GetSymbolFile ();
819
819
if (!symbol_file)
@@ -822,7 +822,7 @@ ResolveFunctionCallLabel(llvm::StringRef name,
822
822
823
823
SymbolContextList sc_list;
824
824
if (auto err =
825
- symbol_file->FindAndResolveFunction (sc_list, label.m_lookup_name ))
825
+ symbol_file->FindAndResolveFunction (sc_list, label.lookup_name ))
826
826
return llvm::joinErrors (
827
827
llvm::createStringError (" failed to resolve function by UID" ),
828
828
std::move (err));
Original file line number Diff line number Diff line change @@ -9783,8 +9783,6 @@ void TypeSystemClang::LogCreation() const {
9783
9783
&getASTContext (), getDisplayName ());
9784
9784
}
9785
9785
9786
- // Expected format is:
9787
- // $__lldb_func:<mangled name>:<module id>:<definition/declaration DIE id>
9788
9786
llvm::Expected<llvm::SmallVector<llvm::StringRef, 3 >>
9789
9787
TypeSystemClang::splitFunctionCallLabel (llvm::StringRef label) const {
9790
9788
if (!label.consume_front (FunctionCallLabelPrefix))
@@ -9827,6 +9825,6 @@ TypeSystemClang::makeFunctionCallLabel(llvm::StringRef label) const {
9827
9825
return llvm::createStringError (
9828
9826
llvm::formatv (" failed to parse DIE ID from '{0}'." , components[2 ]));
9829
9827
9830
- return FunctionCallLabel{/* .m_lookup_name =*/ components[0 ],
9831
- /* .m_module_id =*/ module_id, /* .m_die_id =*/ die_id};
9828
+ return FunctionCallLabel{/* .lookup_name =*/ components[0 ],
9829
+ /* .module_id =*/ module_id, /* .symbol_id =*/ die_id};
9832
9830
}
You can’t perform that action at this time.
0 commit comments