9#include "llvm/Support/Casting.h"
48 bool resolve_indirect_symbols)
70 bp->m_resolver_sp = bp_to_copy_from.
m_resolver_sp->CopyForBreakpoint(bp);
71 bp->m_filter_sp = bp_to_copy_from.
m_filter_sp->CreateCopy(new_target);
86 names_array_sp->AddItem(std::make_shared<StructuredData::String>(name));
92 breakpoint_contents_sp->AddBooleanItem(
97 if (!resolver_dict_sp)
113 if (!options_dict_sp)
120 return breakpoint_dict_sp;
131 if (!breakpoint_dict || !breakpoint_dict->
IsValid()) {
133 "Can't deserialize from an invalid data object.");
142 "Breakpoint data missing toplevel resolver key");
150 if (create_error.
Fail()) {
152 "Error creating breakpoint resolver from data: {0}.", create_error);
162 std::make_shared<SearchFilterForUnconstrainedSearches>(target_sp);
166 if (create_error.
Fail()) {
168 "Error creating breakpoint filter from data: %s.",
174 std::unique_ptr<BreakpointOptions> options_up;
176 Target &target = *target_sp;
181 target, *options_dict, create_error);
182 if (create_error.
Fail()) {
184 "Error creating breakpoint options from data: %s.",
190 bool hardware =
false;
197 if (result_sp && options_up) {
198 result_sp->m_options = *options_up;
204 if (success && names_array) {
205 size_t num_names = names_array->
GetSize();
206 for (
size_t i = 0; i < num_names; i++) {
207 if (std::optional<llvm::StringRef> maybe_name =
236 size_t num_names = names_array->
GetSize();
238 for (
size_t i = 0; i < num_names; i++) {
239 std::optional<llvm::StringRef> maybe_name =
241 if (maybe_name && llvm::is_contained(names, *maybe_name))
255 return llvm::Error::success();
260 std::vector<BreakpointLocationSP> locations;
262 if (!location_sp || !location_sp->IsEnabled())
266 location_sp->GetBreakpointSite();
267 if (!breakpoint_site_sp ||
271 locations.push_back(location_sp);
272 if (llvm::Error
error = location_sp->SetEnabled(
false))
274 "Failed to disable breakpoint location: {0}");
281 size_t num_failures = 0;
283 if (llvm::Error
error = location_sp->SetEnabled(
true)) {
285 "Failed to re-enable breakpoint location: {0}");
290 if (num_failures != 0)
291 return llvm::createStringError(
292 "%ull out of %ull breakpoint locations left disabled because they "
293 "couldn't be converted to hardware",
294 num_failures, locations.size());
296 return llvm::Error::success();
300 bool *new_location) {
344 : eBreakpointEventTypeDisabled);
358 uint32_t ignore =
m_options.GetIgnoreCount();
381 m_options.SetAutoContinue(auto_continue);
385 if (
m_options.GetThreadSpec()->GetTID() == thread_id)
388 m_options.GetThreadSpec()->SetTID(thread_id);
393 if (
m_options.GetThreadSpecNoCreate() ==
nullptr)
395 return m_options.GetThreadSpecNoCreate()->GetTID();
399 if (
m_options.GetThreadSpec()->GetIndex() == index)
402 m_options.GetThreadSpec()->SetIndex(index);
407 if (
m_options.GetThreadSpecNoCreate() ==
nullptr)
409 return m_options.GetThreadSpecNoCreate()->GetIndex();
413 if (
m_options.GetThreadSpec()->GetName() !=
nullptr &&
414 ::strcmp(
m_options.GetThreadSpec()->GetName(), thread_name) == 0)
417 m_options.GetThreadSpec()->SetName(thread_name);
422 if (
m_options.GetThreadSpecNoCreate() ==
nullptr)
424 return m_options.GetThreadSpecNoCreate()->GetName();
428 if (
m_options.GetThreadSpec()->GetQueueName() !=
nullptr &&
429 ::strcmp(
m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0)
432 m_options.GetThreadSpec()->SetQueueName(queue_name);
437 if (
m_options.GetThreadSpecNoCreate() ==
nullptr)
439 return m_options.GetThreadSpecNoCreate()->GetQueueName();
443 m_options.SetCondition(std::move(condition));
453 bool is_synchronous) {
456 m_options.SetCallback(callback, std::make_shared<UntypedBaton>(baton),
465 const BatonSP &callback_baton_sp,
466 bool is_synchronous) {
467 m_options.SetCallback(callback, callback_baton_sp, is_synchronous);
491 m_locations.StartRecordingNewLocations(new_locations);
504 std::shared_ptr<BreakpointEventData> new_locations_event =
505 std::make_shared<BreakpointEventData>(
506 eBreakpointEventTypeLocationsAdded, shared_from_this());
508 module_list, new_locations_event->GetBreakpointLocationCollection());
509 if (new_locations_event->GetBreakpointLocationCollection().GetSize() != 0)
525 bool delete_locations) {
528 "Breakpoint::ModulesChanged: num_modules: %zu load: %i "
529 "delete_locations: %i\n",
530 module_list.
GetSize(), load, delete_locations);
560 Address section_addr(break_loc_sp->GetAddress());
562 locations_with_no_section.
Add(break_loc_sp);
566 if (!break_loc_sp->IsEnabled())
575 if (section_sp && section_sp->GetModule() == module_sp) {
579 if (llvm::Error
error = break_loc_sp->ResolveBreakpointSite()) {
581 "could not set breakpoint site for "
582 "breakpoint location {1} of breakpoint {2}: {0}",
583 break_loc_sp->GetID(),
GetID());
588 size_t num_to_delete = locations_with_no_section.
GetSize();
590 for (
size_t i = 0; i < num_to_delete; i++)
597 if (new_modules.
GetSize() > 0) {
605 std::shared_ptr<BreakpointEventData> removed_locations_event;
607 removed_locations_event = std::make_shared<BreakpointEventData>(
608 eBreakpointEventTypeLocationsRemoved, shared_from_this());
615 for (loc_idx = 0; loc_idx < num_locations; loc_idx++) {
617 SectionSP section_sp(break_loc_sp->GetAddress().GetSection());
618 if (section_sp && section_sp->GetModule() == module_sp) {
622 if (llvm::Error
error = break_loc_sp->ClearBreakpointSite())
624 "Failed to clear breakpoint locations on library "
626 if (removed_locations_event) {
627 removed_locations_event->GetBreakpointLocationCollection().Add(
630 if (delete_locations)
631 locations_to_remove.
Add(break_loc_sp);
635 if (delete_locations) {
636 size_t num_locations_to_remove = locations_to_remove.
GetSize();
637 for (loc_idx = 0; loc_idx < num_locations_to_remove; loc_idx++)
648 bool equivalent_scs =
false;
657 equivalent_scs =
true;
661 equivalent_scs =
true;
671 equivalent_scs =
true;
677 equivalent_scs =
true;
681 return equivalent_scs;
687 LLDB_LOGF(log,
"Breakpoint::ModulesReplaced for %s\n",
688 old_module_sp->GetSpecificationDescription().c_str());
693 SectionSP section_sp = break_loc_sp->GetAddress().GetSection();
694 if (section_sp && section_sp->GetModule() == old_module_sp) {
695 old_break_locs.
Add(break_loc_sp);
699 size_t num_old_locations = old_break_locs.
GetSize();
701 if (num_old_locations == 0) {
705 temp_list.
Append(new_module_sp);
717 temp_list.
Append(new_module_sp);
723 size_t num_new_locations = new_break_locs.
GetSize();
725 if (num_new_locations > 0) {
729 if (num_new_locations == 1 && num_old_locations == 1) {
730 bool equivalent_locations =
false;
737 if (old_loc_sp->GetAddress().CalculateSymbolContext(&old_sc) ==
738 new_loc_sp->GetAddress().CalculateSymbolContext(&new_sc)) {
739 equivalent_locations =
743 if (equivalent_locations) {
746 locations_to_remove.
Add(old_loc_sp);
747 locations_to_announce.
Add(new_loc_sp);
753 typedef std::map<lldb::break_id_t, SymbolContext> IDToSCMap;
754 IDToSCMap old_sc_map;
755 for (
size_t idx = 0; idx < num_old_locations; idx++) {
759 bp_loc_sp->GetAddress().CalculateSymbolContext(&old_sc_map[loc_id]);
762 std::map<lldb::break_id_t, SymbolContext> new_sc_map;
763 for (
size_t idx = 0; idx < num_new_locations; idx++) {
767 bp_loc_sp->GetAddress().CalculateSymbolContext(&new_sc_map[loc_id]);
770 while (old_sc_map.size() > 0) {
776 std::vector<lldb::break_id_t> old_id_vec;
777 old_id_vec.push_back(old_id);
779 IDToSCMap::iterator tmp_iter;
780 for (tmp_iter = ++old_sc_map.begin(); tmp_iter != old_sc_map.end();
783 old_id_vec.push_back(tmp_iter->first);
787 std::vector<lldb::break_id_t> new_id_vec;
788 for (tmp_iter = new_sc_map.begin(); tmp_iter != new_sc_map.end();
791 new_id_vec.push_back(tmp_iter->first);
801 if (old_id_vec.size() == new_id_vec.size()) {
802 llvm::sort(old_id_vec);
803 llvm::sort(new_id_vec);
804 size_t num_elements = old_id_vec.size();
805 for (
size_t idx = 0; idx < num_elements; idx++) {
811 old_sc_map.erase(old_id_vec[idx]);
812 new_sc_map.erase(new_id_vec[idx]);
816 locations_to_remove.
Add(
818 old_sc_map.erase(old_id);
821 locations_to_announce.
Add(
823 new_sc_map.erase(new_id);
836 std::shared_ptr<BreakpointEventData> removed_locations_event;
838 removed_locations_event = std::make_shared<BreakpointEventData>(
839 eBreakpointEventTypeLocationsRemoved, shared_from_this());
844 if (removed_locations_event)
845 removed_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
852 std::shared_ptr<BreakpointEventData> added_locations_event =
853 std::make_shared<BreakpointEventData>(
854 eBreakpointEventTypeLocationsAdded, shared_from_this());
857 added_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
884 bool show_locations) {
885 assert(s !=
nullptr);
887 const bool dim_breakpoint_description =
889 if (dim_breakpoint_description)
891 GetTarget().GetDebugger().GetDisabledAnsiPrefix())
917 if (num_locations > 0) {
918 s->
Printf(
", locations = %" PRIu64, (uint64_t)num_locations);
919 if (num_resolved_locations > 0)
920 s->
Printf(
", resolved = %" PRIu64
", hit count = %d",
927 s->
Printf(
", locations = 0 (pending)");
944 s->
Printf(
"%s\n", name.c_str());
955 if (num_locations == 0) {
956 s->
Printf(
"no locations (pending).");
957 }
else if (num_locations == 1 && !show_locations) {
962 s->
Printf(
"%" PRIu64
" locations.",
static_cast<uint64_t
>(num_locations));
983 for (
size_t i = 0; i < num_locations; ++i) {
992 if (dim_breakpoint_description)
994 GetTarget().GetDebugger().GetDisabledAnsiSuffix())
1015 if (resolverFileLine &&
1037 lldb::BreakpointEventType eventKind) {
1040 std::shared_ptr<BreakpointEventData> data =
1041 std::make_shared<BreakpointEventData>(eventKind, shared_from_this());
1049 if (!breakpoint_data_sp)
1055 breakpoint_data_sp);
1060 case eBreakpointEventTypeInvalidType:
1062 case eBreakpointEventTypeAdded:
1063 return "breakpoint added";
1064 case eBreakpointEventTypeRemoved:
1065 return "breakpoint removed";
1066 case eBreakpointEventTypeLocationsAdded:
1067 return "locations added";
1068 case eBreakpointEventTypeLocationsRemoved:
1069 return "locations removed";
1070 case eBreakpointEventTypeLocationsResolved:
1071 return "locations resolved";
1072 case eBreakpointEventTypeEnabled:
1073 return "breakpoint enabled";
1074 case eBreakpointEventTypeDisabled:
1075 return "breakpoint disabled";
1076 case eBreakpointEventTypeCommandChanged:
1077 return "command changed";
1078 case eBreakpointEventTypeConditionChanged:
1079 return "condition changed";
1080 case eBreakpointEventTypeIgnoreChanged:
1081 return "ignore count changed";
1082 case eBreakpointEventTypeThreadChanged:
1083 return "thread changed";
1084 case eBreakpointEventTypeAutoContinueChanged:
1085 return "autocontinue changed";
1087 llvm_unreachable(
"Fully covered switch above!");
1095 BreakpointEventType sub_type,
const BreakpointSP &new_breakpoint_sp)
1096 : m_breakpoint_event(sub_type), m_new_breakpoint_sp(new_breakpoint_sp) {}
1101 return "Breakpoint::BreakpointEventData";
1122 s->
Format(
"bkpt: {0} type: {1}", bkpt_id,
1129 const EventData *event_data =
event->GetData();
1142 if (data ==
nullptr)
1143 return eBreakpointEventTypeInvalidType;
1182 bp.try_emplace(
"id",
GetID());
1186 bp.try_emplace(
"hitCount", (int64_t)
GetHitCount());
1197 llvm::raw_string_ostream ss(buffer);
1198 json::OStream json_os(ss);
1199 bp_data_sp->Serialize(json_os);
1200 if (
auto expected_value = llvm::json::parse(buffer)) {
1201 bp.try_emplace(
"details", std::move(*expected_value));
1203 std::string details_error =
toString(expected_value.takeError());
1204 json::Object details;
1205 details.try_emplace(
"error", details_error);
1206 bp.try_emplace(
"details", std::move(details));
1209 return json::Value(std::move(bp));
static bool SymbolContextsMightBeEquivalent(SymbolContext &old_sc, SymbolContext &new_sc)
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
#define LLDB_LOG_ERROR(log, error,...)
static double elapsed(const StatsTimepoint &start, const StatsTimepoint &end)
A section + offset based address class.
lldb::SectionSP GetSection() const
Get const accessor for the section.
bool SectionWasDeleted() const
An architecture specification class.
lldb::BreakpointLocationSP FindByIDPair(lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
Returns a shared pointer to the breakpoint location with id breakID.
BreakpointLocationCollectionIterable BreakpointLocations()
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
void Add(const lldb::BreakpointLocationSP &bp_loc_sp)
Add the breakpoint bp_loc_sp to the list.
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Print a description of this breakpoint location to the stream s.
"lldb/Breakpoint/BreakpointOptions.h" Class that manages the options on a breakpoint or breakpoint lo...
static std::unique_ptr< BreakpointOptions > CreateFromStructuredData(Target &target, const StructuredData::Dictionary &data_dict, Status &error)
static const char * GetSerializationKey()
"lldb/Breakpoint/BreakpointResolverFileLine.h" This class sets breakpoints by file and line.
SourceLocationSpec m_location_spec
static lldb::BreakpointResolverSP CreateFromStructuredData(const StructuredData::Dictionary &resolver_dict, Status &error)
This section handles serializing and deserializing from StructuredData objects.
static const char * GetSerializationKey()
static llvm::StringRef GetFlavorString()
BreakpointEventData(lldb::BreakpointEventType sub_type, const lldb::BreakpointSP &new_breakpoint_sp)
void Dump(Stream *s) const override
BreakpointLocationCollection m_locations
static lldb::BreakpointEventType GetBreakpointEventTypeFromEvent(const lldb::EventSP &event_sp)
lldb::BreakpointEventType m_breakpoint_event
static lldb::BreakpointLocationSP GetBreakpointLocationAtIndexFromEvent(const lldb::EventSP &event_sp, uint32_t loc_idx)
~BreakpointEventData() override
lldb::BreakpointSP m_new_breakpoint_sp
static lldb::BreakpointSP GetBreakpointFromEvent(const lldb::EventSP &event_sp)
llvm::StringRef GetFlavor() const override
lldb::BreakpointEventType GetBreakpointEventType() const
static const BreakpointEventData * GetEventDataFromEvent(const Event *event_sp)
Log * GetLogChannel() override
lldb::BreakpointSP GetBreakpoint() const
static size_t GetNumBreakpointLocationsFromEvent(const lldb::EventSP &event_sp)
void RemoveInvalidLocations(const ArchSpec &arch)
Removes all invalid breakpoint locations.
virtual StructuredData::ObjectSP SerializeToStructuredData()
lldb::BreakpointLocationSP AddLocation(const Address &addr, bool *new_location=nullptr)
Add a location to the breakpoint's location list.
uint32_t GetThreadIndex() const
StatsDuration m_resolve_time
bool IsAutoContinue() const
Check the AutoContinue state.
void SetOneShot(bool one_shot)
If one_shot is true, breakpoint will be deleted on first hit.
void ModuleReplaced(lldb::ModuleSP old_module_sp, lldb::ModuleSP new_module_sp)
Tells the breakpoint the old module old_module_sp has been replaced by new_module_sp (usually because...
~Breakpoint() override
Destructor.
lldb::tid_t GetThreadID() const
Return the current stop thread value.
llvm::json::Value GetStatistics()
Get statistics associated with this breakpoint in JSON format.
void SetAutoContinue(bool auto_continue)
If auto_continue is true, breakpoint will auto-continue when on hit.
bool InvokeCallback(StoppointCallbackContext *context, lldb::break_id_t bp_loc_id)
Invoke the callback action when the breakpoint is hit.
StoppointHitCounter m_hit_counter
Number of times this breakpoint has been hit.
static const char * GetKey(OptionNames enum_value)
uint32_t GetIgnoreCount() const
Return the current ignore count/.
bool EvaluatePrecondition(StoppointCallbackContext &context)
void SetThreadIndex(uint32_t index)
const char * GetQueueName() const
const lldb::TargetSP GetTargetSP()
friend class BreakpointLocation
static lldb::BreakpointSP CreateFromStructuredData(lldb::TargetSP target_sp, StructuredData::ObjectSP &data_object_sp, Status &error)
void ResetHitCount()
Resets the current hit count for all locations.
BreakpointLocationList m_locations
const char * GetBreakpointKind() const
Return the "kind" description for a breakpoint.
bool IsEnabled() override
Check the Enable/Disable state.
void GetDescription(Stream *s, lldb::DescriptionLevel level, bool show_locations=false)
Put a description of this breakpoint into the stream s.
void ClearAllBreakpointSites()
Tell this breakpoint to clear all its breakpoint sites.
BreakpointOptions & GetOptions()
Returns the BreakpointOptions structure set at the breakpoint level.
void DecrementIgnoreCount()
void SetQueueName(const char *queue_name)
lldb::break_id_t FindLocationIDByAddress(const Address &addr)
Find a breakpoint location ID by Address.
void ResolveBreakpointInModules(ModuleList &module_list, bool send_event=true)
Tell this breakpoint to scan a given module list and resolve any new locations that match the breakpo...
static lldb::BreakpointSP CopyFromBreakpoint(lldb::TargetSP new_target, const Breakpoint &bp_to_copy_from)
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
void AddName(llvm::StringRef new_name)
bool m_resolve_indirect_symbols
lldb::BreakpointLocationSP FindLocationByAddress(const Address &addr)
Find a breakpoint location by Address.
static const char * g_option_names[static_cast< uint32_t >(OptionNames::LastOptionName)]
void GetResolverDescription(Stream *s)
static const char * GetSerializationKey()
void ModulesChanged(ModuleList &changed_modules, bool load_event, bool delete_locations=false)
Like ResolveBreakpointInModules, but allows for "unload" events, in which case we will remove any loc...
static bool SerializedBreakpointMatchesNames(StructuredData::ObjectSP &bkpt_object_sp, std::vector< std::string > &names)
std::unordered_set< std::string > m_name_list
const StopCondition & GetCondition() const
Return the breakpoint condition.
const char * GetThreadName() const
bool GetMatchingFileLine(ConstString filename, uint32_t line_number, BreakpointLocationCollection &loc_coll)
Find breakpoint locations which match the (filename, line_number) description.
lldb::BreakpointLocationSP FindLocationByID(lldb::break_id_t bp_loc_id)
Find a breakpoint location for a given breakpoint location ID.
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
void GetFilterDescription(Stream *s)
void ResolveBreakpoint()
Tell this breakpoint to scan it's target's module list and resolve any new locations that match the b...
lldb::BreakpointLocationSP GetLocationAtIndex(size_t index)
Get breakpoint locations by index.
lldb::BreakpointPreconditionSP m_precondition_sp
BreakpointOptions m_options
Target & GetTarget()
Accessor for the breakpoint Target.
size_t GetNumLocations() const
Return the number of breakpoint locations.
void SetIgnoreCount(uint32_t count)
Set the breakpoint to ignore the next count breakpoint hits.
bool IsOneShot() const
Check the OneShot state.
uint32_t GetHitCount() const
Return the current hit count for all locations.
static const char * BreakpointEventTypeAsCString(lldb::BreakpointEventType type)
void SetCondition(StopCondition condition)
Set the breakpoint's condition.
void SetCallback(BreakpointHitCallback callback, void *baton, bool is_synchronous=false)
Set the callback action invoked when the breakpoint is hit.
void SetEnabled(bool enable) override
If enable is true, enable the breakpoint, if false disable it.
lldb::BreakpointResolverSP m_resolver_sp
void Dump(Stream *s) override
Standard "Dump" method. At present it does nothing.
bool IsInternal() const
Tell whether this breakpoint is an "internal" breakpoint.
lldb::SearchFilterSP m_filter_sp
void SetThreadName(const char *thread_name)
llvm::Error SetIsHardware(bool is_hardware)
size_t GetNumResolvedLocations() const
Return the number of breakpoint locations that have resolved to actual breakpoint sites.
std::string m_kind_description
void SendBreakpointChangedEvent(lldb::BreakpointEventType eventKind)
Breakpoint(Target &target, lldb::SearchFilterSP &filter_sp, lldb::BreakpointResolverSP &resolver_sp, bool hardware, bool resolve_indirect_symbols=true)
Constructors and Destructors Only the Target can make a breakpoint, and it owns the breakpoint lifesp...
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
const FileSpec & GetPrimaryFile() const
Return the primary source spec associated with this compile unit.
A uniqued constant string class.
A class that measures elapsed time in an exception safe way.
virtual llvm::StringRef GetFlavor() const =0
const ConstString & GetFilename() const
Filename string const get accessor.
ConstString GetName() const
static int Compare(const Mangled &lhs, const Mangled &rhs)
Compare the mangled string values.
A collection class for Module objects.
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
ModuleIterable Modules() const
size_t GetSize() const
Gets the size of the module list.
static const char * GetSerializationKey()
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
std::optional< uint32_t > GetLine() const
FileSpec GetFileSpec() const
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Fail() const
Test for error condition.
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
lldb::break_id_t GetID() const
A stream class that can stream formatted output to a file.
void Format(const char *format, Args &&... args)
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
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.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
std::optional< llvm::StringRef > GetItemAtIndexAsString(size_t idx) const
bool GetValueForKeyAsBoolean(llvm::StringRef key, bool &result) const
bool GetValueForKeyAsArray(llvm::StringRef key, Array *&result) const
bool GetValueForKeyAsDictionary(llvm::StringRef key, Dictionary *&result) const
Dictionary * GetAsDictionary()
virtual bool IsValid() const
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
std::shared_ptr< Array > ArraySP
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function 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.
@ eBroadcastBitBreakpointChanged
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name, Status &error)
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
#define LLDB_INVALID_THREAD_ID
#define LLDB_BREAK_ID_IS_INTERNAL(bid)
std::string FormatAnsiTerminalCodes(llvm::StringRef format, bool do_color=true)
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.
const char * toString(AppleArm64ExceptionClass EC)
std::function< bool(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)> BreakpointHitCallback
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP
std::shared_ptr< lldb_private::SearchFilter > SearchFilterSP
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelInitial
@ eDescriptionLevelVerbose
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::Baton > BatonSP
std::shared_ptr< lldb_private::Event > EventSP
std::shared_ptr< lldb_private::Section > SectionSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::EventData > EventDataSP