Go to the documentation of this file.
9 #include "llvm/Support/Casting.h"
41 static ConstString g_identifier(
"event-identifier.breakpoint.changed");
45 const char *Breakpoint::g_option_names[
static_cast<uint32_t>(
46 Breakpoint::OptionNames::LastOptionName)]{
"Names",
"Hardware"};
49 Breakpoint::Breakpoint(
Target &target, SearchFilterSP &filter_sp,
50 BreakpointResolverSP &resolver_sp,
bool hardware,
51 bool resolve_indirect_symbols)
52 : m_being_created(true), m_hardware(hardware), m_target(target),
53 m_filter_sp(filter_sp), m_resolver_sp(resolver_sp), m_options(true),
54 m_locations(*this), m_resolve_indirect_symbols(resolve_indirect_symbols),
60 : m_being_created(true), m_hardware(source_bp.m_hardware),
61 m_target(new_target), m_name_list(source_bp.m_name_list),
62 m_options(source_bp.m_options), m_locations(*this),
63 m_resolve_indirect_symbols(source_bp.m_resolve_indirect_symbols),
72 return BreakpointSP();
74 BreakpointSP bp(
new Breakpoint(*new_target, bp_to_copy_from));
76 bp->m_resolver_sp = bp_to_copy_from.
m_resolver_sp->CopyForBreakpoint(bp);
77 bp->m_filter_sp = bp_to_copy_from.
m_filter_sp->CreateCopy(new_target);
92 names_array_sp->AddItem(
99 breakpoint_contents_sp->AddBooleanItem(
104 if (!resolver_dict_sp)
120 if (!options_dict_sp)
127 return breakpoint_dict_sp;
132 BreakpointSP result_sp;
138 if (!breakpoint_dict || !breakpoint_dict->
IsValid()) {
139 error.SetErrorString(
"Can't deserialize from an invalid data object.");
147 error.SetErrorString(
"Breakpoint data missing toplevel resolver key");
152 BreakpointResolverSP resolver_sp =
155 if (create_error.
Fail()) {
156 error.SetErrorStringWithFormat(
157 "Error creating breakpoint resolver from data: %s.",
165 SearchFilterSP filter_sp;
168 std::make_shared<SearchFilterForUnconstrainedSearches>(target_sp);
172 if (create_error.
Fail()) {
173 error.SetErrorStringWithFormat(
174 "Error creating breakpoint filter from data: %s.",
180 std::unique_ptr<BreakpointOptions> options_up;
182 Target& target = *target_sp;
187 target, *options_dict, create_error);
188 if (create_error.
Fail()) {
189 error.SetErrorStringWithFormat(
190 "Error creating breakpoint options from data: %s.",
196 bool hardware =
false;
203 if (result_sp && options_up) {
204 result_sp->m_options = *options_up;
210 if (success && names_array) {
211 size_t num_names = names_array->
GetSize();
212 for (
size_t i = 0; i < num_names; i++) {
213 llvm::StringRef name;
243 size_t num_names = names_array->
GetSize();
245 for (
size_t i = 0; i < num_names; i++) {
246 llvm::StringRef name;
248 if (llvm::is_contained(names, name))
262 bool *new_location) {
306 : eBreakpointEventTypeDisabled);
414 bool is_synchronous) {
426 const BatonSP &callback_baton_sp,
427 bool is_synchronous) {
466 eBreakpointEventTypeLocationsAdded, shared_from_this());
475 delete new_locations_event;
490 bool delete_locations) {
493 "Breakpoint::ModulesChanged: num_modules: %zu load: %i "
494 "delete_locations: %i\n",
495 module_list.
GetSize(), load, delete_locations);
513 for (ModuleSP module_sp : module_list.
Modules()) {
519 for (BreakpointLocationSP break_loc_sp :
525 Address section_addr(break_loc_sp->GetAddress());
527 locations_with_no_section.
Add(break_loc_sp);
531 if (!break_loc_sp->IsEnabled())
534 SectionSP section_sp(section_addr.
GetSection());
540 if (section_sp && section_sp->GetModule() == module_sp) {
544 if (!break_loc_sp->ResolveBreakpointSite()) {
546 "Warning: could not set breakpoint site for "
547 "breakpoint location %d of breakpoint %d.\n",
548 break_loc_sp->GetID(),
GetID());
553 size_t num_to_delete = locations_with_no_section.
GetSize();
555 for (
size_t i = 0; i < num_to_delete; i++)
562 if (new_modules.
GetSize() > 0) {
573 eBreakpointEventTypeLocationsRemoved, shared_from_this());
575 removed_locations_event =
nullptr;
577 for (ModuleSP module_sp : module_list.
Modules()) {
582 for (loc_idx = 0; loc_idx < num_locations; loc_idx++) {
584 SectionSP section_sp(break_loc_sp->GetAddress().GetSection());
585 if (section_sp && section_sp->GetModule() == module_sp) {
589 break_loc_sp->ClearBreakpointSite();
590 if (removed_locations_event) {
594 if (delete_locations)
595 locations_to_remove.
Add(break_loc_sp);
599 if (delete_locations) {
600 size_t num_locations_to_remove = locations_to_remove.
GetSize();
601 for (loc_idx = 0; loc_idx < num_locations_to_remove; loc_idx++)
612 bool equivalent_scs =
false;
621 equivalent_scs =
true;
625 equivalent_scs =
true;
635 equivalent_scs =
true;
641 equivalent_scs =
true;
645 return equivalent_scs;
649 ModuleSP new_module_sp) {
651 LLDB_LOGF(log,
"Breakpoint::ModulesReplaced for %s\n",
652 old_module_sp->GetSpecificationDescription().c_str());
657 SectionSP section_sp = break_loc_sp->GetAddress().GetSection();
658 if (section_sp && section_sp->GetModule() == old_module_sp) {
659 old_break_locs.
Add(break_loc_sp);
663 size_t num_old_locations = old_break_locs.
GetSize();
665 if (num_old_locations == 0) {
669 temp_list.
Append(new_module_sp);
681 temp_list.
Append(new_module_sp);
687 size_t num_new_locations = new_break_locs.
GetSize();
689 if (num_new_locations > 0) {
693 if (num_new_locations == 1 && num_old_locations == 1) {
694 bool equivalent_locations =
false;
698 BreakpointLocationSP old_loc_sp = old_break_locs.
GetByIndex(0);
699 BreakpointLocationSP new_loc_sp = new_break_locs.
GetByIndex(0);
701 if (old_loc_sp->GetAddress().CalculateSymbolContext(&old_sc) ==
702 new_loc_sp->GetAddress().CalculateSymbolContext(&new_sc)) {
703 equivalent_locations =
707 if (equivalent_locations) {
710 locations_to_remove.
Add(old_loc_sp);
711 locations_to_announce.
Add(new_loc_sp);
717 typedef std::map<lldb::break_id_t, SymbolContext> IDToSCMap;
718 IDToSCMap old_sc_map;
719 for (
size_t idx = 0; idx < num_old_locations; idx++) {
721 BreakpointLocationSP bp_loc_sp = old_break_locs.
GetByIndex(idx);
723 bp_loc_sp->GetAddress().CalculateSymbolContext(&old_sc_map[loc_id]);
726 std::map<lldb::break_id_t, SymbolContext> new_sc_map;
727 for (
size_t idx = 0; idx < num_new_locations; idx++) {
729 BreakpointLocationSP bp_loc_sp = new_break_locs.
GetByIndex(idx);
731 bp_loc_sp->GetAddress().CalculateSymbolContext(&new_sc_map[loc_id]);
734 while (old_sc_map.size() > 0) {
740 std::vector<lldb::break_id_t> old_id_vec;
741 old_id_vec.push_back(old_id);
743 IDToSCMap::iterator tmp_iter;
744 for (tmp_iter = ++old_sc_map.begin(); tmp_iter != old_sc_map.end();
747 old_id_vec.push_back(tmp_iter->first);
751 std::vector<lldb::break_id_t> new_id_vec;
752 for (tmp_iter = new_sc_map.begin(); tmp_iter != new_sc_map.end();
755 new_id_vec.push_back(tmp_iter->first);
765 if (old_id_vec.size() == new_id_vec.size()) {
766 llvm::sort(old_id_vec);
767 llvm::sort(new_id_vec);
768 size_t num_elements = old_id_vec.size();
769 for (
size_t idx = 0; idx < num_elements; idx++) {
770 BreakpointLocationSP old_loc_sp =
772 BreakpointLocationSP new_loc_sp =
775 old_sc_map.erase(old_id_vec[idx]);
776 new_sc_map.erase(new_id_vec[idx]);
780 locations_to_remove.
Add(
782 old_sc_map.erase(old_id);
785 locations_to_announce.
Add(
787 new_sc_map.erase(new_id);
803 eBreakpointEventTypeLocationsRemoved, shared_from_this());
805 locations_event =
nullptr;
807 for (BreakpointLocationSP loc_sp :
819 eBreakpointEventTypeLocationsAdded, shared_from_this());
820 for (BreakpointLocationSP loc_sp :
850 bool show_locations) {
851 assert(s !=
nullptr);
876 if (num_locations > 0) {
877 s->
Printf(
", locations = %" PRIu64, (uint64_t)num_locations);
878 if (num_resolved_locations > 0)
879 s->
Printf(
", resolved = %" PRIu64
", hit count = %d",
886 s->
Printf(
", locations = 0 (pending)");
903 s->
Printf(
"%s\n", name.c_str());
914 if (num_locations == 0) {
915 s->
Printf(
"no locations (pending).");
916 }
else if (num_locations == 1 && !show_locations) {
921 s->
Printf(
"%" PRIu64
" locations.",
static_cast<uint64_t
>(num_locations));
942 for (
size_t i = 0; i < num_locations; ++i) {
969 if (resolverFileLine &&
991 lldb::BreakpointEventType eventKind) {
1003 if (data ==
nullptr)
1015 case eBreakpointEventTypeInvalidType:
return "invalid";
1016 case eBreakpointEventTypeAdded:
return "breakpoint added";
1017 case eBreakpointEventTypeRemoved:
return "breakpoint removed";
1018 case eBreakpointEventTypeLocationsAdded:
return "locations added";
1019 case eBreakpointEventTypeLocationsRemoved:
return "locations removed";
1020 case eBreakpointEventTypeLocationsResolved:
return "locations resolved";
1021 case eBreakpointEventTypeEnabled:
return "breakpoint enabled";
1022 case eBreakpointEventTypeDisabled:
return "breakpoint disabled";
1023 case eBreakpointEventTypeCommandChanged:
return "command changed";
1024 case eBreakpointEventTypeConditionChanged:
return "condition changed";
1025 case eBreakpointEventTypeIgnoreChanged:
return "ignore count changed";
1026 case eBreakpointEventTypeThreadChanged:
return "thread changed";
1027 case eBreakpointEventTypeAutoContinueChanged:
return "autocontinue changed";
1029 llvm_unreachable(
"Fully covered switch above!");
1037 BreakpointEventType sub_type,
const BreakpointSP &new_breakpoint_sp)
1038 : m_breakpoint_event(sub_type), m_new_breakpoint_sp(new_breakpoint_sp) {}
1043 static ConstString g_flavor(
"Breakpoint::BreakpointEventData");
1052 return m_new_breakpoint_sp;
1057 return m_breakpoint_event;
1063 BreakpointEventType event_type = GetBreakpointEventType();
1064 break_id_t bkpt_id = GetBreakpoint()->GetID();
1065 s->
Format(
"bkpt: {0} type: {1}", bkpt_id,
1072 const EventData *event_data =
event->GetData();
1082 const EventSP &event_sp) {
1085 if (data ==
nullptr)
1086 return eBreakpointEventTypeInvalidType;
1092 const EventSP &event_sp) {
1103 const EventSP &event_sp) {
1111 lldb::BreakpointLocationSP
1113 const lldb::EventSP &event_sp,
uint32_t bp_loc_idx) {
1114 lldb::BreakpointLocationSP bp_loc_sp;
1126 bp.try_emplace(
"id",
GetID());
1140 llvm::raw_string_ostream ss(buffer);
1141 json::OStream json_os(ss);
1142 bp_data_sp->Serialize(json_os);
1143 if (
auto expected_value = llvm::json::parse(ss.str())) {
1144 bp.try_emplace(
"details", std::move(*expected_value));
1147 json::Object details;
1148 details.try_emplace(
"error", details_error);
1149 bp.try_emplace(
"details", std::move(details));
1152 return json::Value(std::move(bp));
const char * toString(AppleArm64ExceptionClass EC)
FileSpec GetFileSpec() const
BreakpointOptions & GetOptions()
Returns the BreakpointOptions structure set at the breakpoint level.
lldb::BreakpointPreconditionSP m_precondition_sp
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
#define LLDB_BREAK_ID_IS_INTERNAL(bid)
std::string m_kind_description
llvm::json::Value GetStatistics()
Get statistics associated with this breakpoint in JSON format.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void Format(const char *format, Args &&... args)
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
void ClearAllBreakpointSites()
Tell this breakpoint to clear all its breakpoint sites.
const char * GetConditionText() const
Return a pointer to the text of the condition expression.
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
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.
CompileUnit * comp_unit
The CompileUnit for a given query.
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it.
void SendBreakpointChangedEvent(lldb::BreakpointEventType eventKind)
virtual ConstString GetFlavor() const =0
virtual bool IsValid() const
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
void SetIgnoreCount(uint32_t n)
Set the breakpoint to ignore the next count breakpoint hits.
bool GetMatchingFileLine(ConstString filename, uint32_t line_number, BreakpointLocationCollection &loc_coll)
Find breakpoint locations which match the (filename, line_number) description.
lldb::break_id_t GetID() const
void ResolveAllBreakpointSites()
Tells all the breakpoint locations in this list to attempt to resolve any possible breakpoint sites.
void SetOneShot(bool one_shot)
If one_shot is true, breakpoint will be deleted on first hit.
ModuleIterable Modules() const
~Breakpoint() override
Destructor.
static const char * GetKey(OptionNames enum_value)
lldb::BreakpointSP GetBreakpoint() const
uint32_t GetIgnoreCount() const
Return the current ignore count/.
bool IsOneShot() const
Check the OneShot state.
void SetCondition(const char *condition)
Set the breakpoint option's condition.
void GetDescription(Stream *s, lldb::DescriptionLevel level, bool show_locations=false)
Put a description of this breakpoint into the stream s.
const char * GetConditionText(size_t *hash=nullptr) const
Return a pointer to the text of the condition expression.
void SetAutoContinue(bool auto_continue)
If auto_continue is true, breakpoint will auto-continue when on hit.
const char * GetThreadName() const
void GetResolverDescription(Stream *s)
#define LLDB_LOGF(log,...)
A class that measures elapsed time in an exception safe way.
void SetCondition(const char *condition)
Set the breakpoint's condition.
lldb::break_id_t FindLocationIDByAddress(const Address &addr)
Find a breakpoint location ID by Address.
lldb::BreakpointResolverSP m_resolver_sp
void StartRecordingNewLocations(BreakpointLocationCollection &new_locations)
BreakpointLocationCollectionIterable BreakpointLocations()
void SetEnabled(bool enabled)
If enable is true, enable the breakpoint, if false disable it.
bool m_resolve_indirect_symbols
static lldb::BreakpointEventType GetBreakpointEventTypeFromEvent(const lldb::EventSP &event_sp)
lldb::BreakpointEventType GetBreakpointEventType() const
bool IsEnabled() const
Check the Enable/Disable state.
void GetFilterDescription(Stream *s)
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)
bool EvaluatePrecondition(StoppointCallbackContext &context)
BreakpointLocationCollection & GetBreakpointLocationCollection()
bool RemoveLocation(const lldb::BreakpointLocationSP &bp_loc_sp)
virtual StructuredData::ObjectSP SerializeToStructuredData()
static const BreakpointEventData * GetEventDataFromEvent(const Event *event_sp)
lldb::BreakpointLocationSP AddLocation(const Address &addr, bool resolve_indirect_symbols, bool *new_location=nullptr)
static ConstString GetFlavorString()
uint32_t GetValue() const
void SetAutoContinue(bool auto_continue)
Set the auto-continue state.
General Outline: A breakpoint location is defined by the breakpoint that produces it,...
const ThreadSpec * GetThreadSpecNoCreate() const
Return the current thread spec for this option.
void Dump(Stream *s) const override
static const char * GetSerializationKey()
static size_t GetNumBreakpointLocationsFromEvent(const lldb::EventSP &event_sp)
void SetQueueName(const char *queue_name)
std::unordered_set< std::string > m_name_list
static std::unique_ptr< BreakpointOptions > CreateFromStructuredData(Target &target, const StructuredData::Dictionary &data_dict, Status &error)
static double elapsed(const StatsTimepoint &start, const StatsTimepoint &end)
static llvm::raw_ostream & error(Stream &strm)
bool SectionWasDeleted() const
Symbol * symbol
The Symbol for a given query.
size_t GetSize() const
Gets the size of the module list.
std::shared_ptr< String > StringSP
void SwapLocation(lldb::BreakpointLocationSP to_location_sp, lldb::BreakpointLocationSP from_location_sp)
static lldb::BreakpointResolverSP CreateFromStructuredData(const StructuredData::Dictionary &resolver_dict, Status &error)
This section handles serializing and deserializing from StructuredData objects.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
BreakpointLocationList m_locations
~BreakpointEventData() override
ConstString GetName() const
lldb::BreakpointSP m_new_breakpoint_sp
Log * GetLogChannel() override
lldb::SearchFilterSP m_filter_sp
lldb::BreakpointLocationSP GetLocationAtIndex(size_t index)
Get breakpoint locations by index.
bool IsInternal() const
Tell whether this breakpoint is an "internal" breakpoint.
static bool Compare(BreakpointLocationSP lhs, lldb::break_id_t val)
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
const char * GetBreakpointKind() const
Return the "kind" description for a breakpoint.
bool Fail() const
Test for error condition.
void SetCallback(BreakpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the breakpoint option set.
std::shared_ptr< Object > ObjectSP
void StopRecordingNewLocations()
lldb::BreakpointLocationSP FindByID(lldb::break_id_t breakID) const
Returns a shared pointer to the breakpoint location with id breakID, const version.
const char * GetQueueName() const
Function * function
The Function for a given query.
void SetIgnoreCount(uint32_t count)
Set the breakpoint to ignore the next count breakpoint hits.
void SetQueueName(llvm::StringRef queue_name)
void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error)
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 SetIndex(uint32_t index)
bool InvokeCallback(StoppointCallbackContext *context, lldb::break_id_t bp_loc_id)
Invoke the callback action when the breakpoint is hit.
std::shared_ptr< Dictionary > DictionarySP
const FileSpec & GetPrimaryFile() const
Return the primary source file associated with this compile unit.
ConstString GetFlavor() const override
static const char * GetSerializationKey()
string(SUBSTRING ${p} 10 -1 pStripped) if($
size_t GetNumResolvedLocations() const
Return the number of breakpoint locations that have resolved to actual breakpoint sites.
lldb::SectionSP GetSection() const
Get const accessor for the section.
uint32_t GetThreadIndex() const
SourceLocationSpec m_location_spec
lldb::break_id_t FindIDByAddress(const Address &addr)
Returns the breakpoint location id to the breakpoint location at address addr.
void SetTID(lldb::tid_t tid)
BreakpointOptions m_options
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
void SetThreadIndex(uint32_t index)
void RemoveInvalidLocations(const ArchSpec &arch)
Removes all invalid breakpoint locations.
lldb::tid_t GetThreadID() const
Return the current stop thread value.
bool InvokeCallback(StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Use this function to invoke the callback for a specific stop.
static lldb::BreakpointSP CopyFromBreakpoint(lldb::TargetSP new_target, const Breakpoint &bp_to_copy_from)
virtual StructuredData::ObjectSP SerializeToStructuredData()
const char * GetName() const
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...
void SetEnabled(bool enable) override
If enable is true, enable the breakpoint, if false disable it.
static const char * BreakpointEventTypeAsCString(lldb::BreakpointEventType type)
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
uint32_t GetIndex() const
@ eBroadcastBitBreakpointChanged
const char * GetQueueName() const
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...
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Print a description of this breakpoint location to the stream s.
BreakpointLocationIterable BreakpointLocations()
void IndentMore(unsigned amount=2)
Increment the current indentation level.
void SetName(llvm::StringRef name)
size_t EOL()
Output and End of Line character to the stream.
Dictionary * GetAsDictionary()
lldb::BreakpointLocationSP AddLocation(const Address &addr, bool *new_location=nullptr)
Add a location to the breakpoint's location list.
void SetOneShot(bool one_shot)
If enable is true, enable the breakpoint, if false disable it.
static lldb::SearchFilterSP CreateFromStructuredData(const lldb::TargetSP &target_sp, const StructuredData::Dictionary &data_dict, Status &error)
static lldb::BreakpointLocationSP GetBreakpointLocationAtIndexFromEvent(const lldb::EventSP &event_sp, uint32_t loc_idx)
void SetCallback(BreakpointHitCallback callback, void *baton, bool is_synchronous=false)
Set the callback action invoked when the breakpoint is hit.
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
static bool SymbolContextsMightBeEquivalent(SymbolContext &old_sc, SymbolContext &new_sc)
lldb::ModuleSP module_sp
The Module for a given query.
void RemoveInvalidLocations(const ArchSpec &arch)
bool AddName(llvm::StringRef new_name)
void Add(const lldb::BreakpointLocationSP &bp_loc_sp)
Add the breakpoint bp_loc_sp to the list.
void Dump(Stream *s) override
Standard "Dump" method. At present it does nothing.
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...
bool IsOneShot() const
Check the One-shot state.
StatsDuration m_resolve_time
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t GetNumResolvedLocations() const
Returns the number of breakpoint locations in this list with resolved breakpoints.
static bool SerializedBreakpointMatchesNames(StructuredData::ObjectSP &bkpt_object_sp, std::vector< std::string > &names)
void ResolveBreakpoint()
Tell this breakpoint to scan it's target's module list and resolve any new locations that match the b...
uint32_t GetIgnoreCount() const
Return the current Ignore Count.
A class that represents a running process on the host machine.
@ eDescriptionLevelVerbose
BreakpointLocationCollection m_locations
lldb::BreakpointLocationSP FindLocationByAddress(const Address &addr)
Find a breakpoint location by Address.
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
bool GetValueForKeyAsDictionary(llvm::StringRef key, Dictionary *&result) const
bool IsAutoContinue() const
Check the auto-continue state.
static lldb::BreakpointSP GetBreakpointFromEvent(const lldb::EventSP &event_sp)
StoppointHitCounter m_hit_counter
Number of times this breakpoint has been hit.
void ClearAllBreakpointSites()
Removes all the locations in this list from their breakpoint site owners list.
Target & GetTarget()
Accessor for the breakpoint Target.
size_t GetNumLocations() const
Return the number of breakpoint locations.
lldb::tid_t GetTID() const
#define LLDB_INVALID_THREAD_ID
bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result) const
std::shared_ptr< Array > ArraySP
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
bool GetValueForKeyAsArray(llvm::StringRef key, Array *&result) const
const lldb::TargetSP GetTargetSP()
void DecrementIgnoreCount()
BreakpointEventData(lldb::BreakpointEventType sub_type, const lldb::BreakpointSP &new_breakpoint_sp)
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
static const char * GetSerializationKey()
static const char * GetSerializationKey()
bool GetValueForKeyAsBoolean(llvm::StringRef key, bool &result) const
void ClearCallback()
Remove the callback from this option set.
bool IsEnabled() override
Check the Enable/Disable state.
static lldb::BreakpointSP CreateFromStructuredData(lldb::TargetSP target_sp, StructuredData::ObjectSP &data_object_sp, Status &error)
ConstString & GetFilename()
Filename string get accessor.
lldb::BreakpointLocationSP FindLocationByID(lldb::break_id_t bp_loc_id)
Find a breakpoint location for a given breakpoint location ID.
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
const lldb::BreakpointLocationSP FindByAddress(const Address &addr) const
Returns a shared pointer to the breakpoint location at address addr - const version.
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
@ eDescriptionLevelInitial
bool IsAutoContinue() const
Check the AutoContinue state.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
llvm::Optional< uint32_t > GetLine() const
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
uint32_t GetHitCount() const
Return the current hit count for all locations.
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
void SetThreadName(const char *thread_name)