[Lldb-commits] [lldb] [lldb][Expression] Encode Module and DIE UIDs into function AsmLabels (PR #148877)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 30 05:35:59 PDT 2025
================
@@ -26,3 +30,74 @@ Expression::Expression(ExecutionContextScope &exe_scope)
m_jit_end_addr(LLDB_INVALID_ADDRESS) {
assert(m_target_wp.lock());
}
+
+/// Returns the components of the specified function call label.
+///
+/// The format of \c label is described in \c FunctionCallLabel.
+/// The label prefix is not one of the components.
+static llvm::Expected<llvm::SmallVector<llvm::StringRef, 3>>
+splitFunctionCallLabel(llvm::StringRef label) {
+ if (!label.consume_front(FunctionCallLabelPrefix))
----------------
labath wrote:
You can split this up with
```
llvm::SmallVector<llvm::StringRef, 4> components;
label.split(components, ":", /*MaxSplit=*/3);
if (label[0] != FunctionCallLabelPrefix || label.size()!=4)
return "bad input";
```
.. at which point this maybe doesn't need to be a separate function?
https://github.com/llvm/llvm-project/pull/148877
More information about the lldb-commits
mailing list