13#include "llvm/ADT/SmallVector.h"
14#include "llvm/ADT/StringExtras.h"
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Error.h"
35llvm::Expected<FunctionCallLabel>
37 llvm::SmallVector<llvm::StringRef, 5> components;
38 label.split(components,
":", 4);
40 if (components.size() != 5)
41 return llvm::createStringError(
"malformed function call label.");
44 return llvm::createStringError(llvm::formatv(
45 "expected function call label prefix '{0}' but found '{1}' instead.",
49 llvm::StringRef module_label = components[2];
50 llvm::StringRef die_label = components[3];
54 if (!llvm::to_integer(module_label,
module_id))
55 return llvm::createStringError(
56 llvm::formatv(
"failed to parse module ID from '{0}'.", module_label));
59 if (!llvm::to_integer(die_label, die_id))
60 return llvm::createStringError(
61 llvm::formatv(
"failed to parse symbol ID from '{0}'.", die_label));
75void llvm::format_provider<FunctionCallLabel>::format(
77 OS << llvm::formatv(
"FunctionCallLabel{ discriminator: {0}, module_id: "
78 "{1:x}, symbol_id: {2:x}, "
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
lldb::addr_t m_jit_end_addr
The address of the JITted function within the JIT allocation.
lldb::addr_t m_jit_start_addr
An expression might have a process, but it doesn't need to (e.g.
lldb::TargetWP m_target_wp
Expression(Target &target)
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
constexpr llvm::StringRef FunctionCallLabelPrefix
LLDB attaches this prefix to mangled names of functions that get called from JITted expressions.
Holds parsed information about a function call label that LLDB attaches as an AsmLabel to function AS...
lldb::user_id_t symbol_id
Unique identifier of the function symbol on which to perform the function call.
std::string toString() const
Encode this FunctionCallLabel into its string representation.
llvm::StringRef discriminator
Arbitrary string which language plugins can interpret for their own needs.
llvm::StringRef lookup_name
Name to use when searching for the function symbol in module_id.
static llvm::Expected< FunctionCallLabel > fromString(llvm::StringRef label)
Decodes the specified function label into a FunctionCallLabel.
lldb::user_id_t module_id
Unique identifier of the lldb_private::Module which contains the symbol identified by symbol_id.