9#include "llvm/Support/Casting.h"
41 Breakpoint::OptionNames::LastOptionName)]{
"Names",
"Hardware"};
46 bool resolve_indirect_symbols)
47 : m_hardware(hardware), m_target(target), m_filter_sp(filter_sp),
48 m_resolver_sp(resolver_sp), m_options(true), m_locations(*this),
49 m_resolve_indirect_symbols(resolve_indirect_symbols), m_hit_counter() {}
52 : m_hardware(source_bp.m_hardware), m_target(new_target),
53 m_name_list(source_bp.m_name_list), m_options(source_bp.m_options),
55 m_resolve_indirect_symbols(source_bp.m_resolve_indirect_symbols),
68 bp->m_resolver_sp = bp_to_copy_from.
m_resolver_sp->CopyForBreakpoint(bp);
69 bp->m_filter_sp = bp_to_copy_from.
m_filter_sp->CreateCopy(new_target);
84 names_array_sp->AddItem(
91 breakpoint_contents_sp->AddBooleanItem(
96 if (!resolver_dict_sp)
112 if (!options_dict_sp)
119 return breakpoint_dict_sp;
130 if (!breakpoint_dict || !breakpoint_dict->
IsValid()) {
132 "Can't deserialize from an invalid data object.");
141 "Breakpoint data missing toplevel resolver key");
149 if (create_error.
Fail()) {
151 "Error creating breakpoint resolver from data: {0}.", create_error);
161 std::make_shared<SearchFilterForUnconstrainedSearches>(target_sp);
165 if (create_error.
Fail()) {
167 "Error creating breakpoint filter from data: %s.",
173 std::unique_ptr<BreakpointOptions> options_up;
175 Target& target = *target_sp;
180 target, *options_dict, create_error);
181 if (create_error.
Fail()) {
183 "Error creating breakpoint options from data: %s.",
189 bool hardware =
false;
196 if (result_sp && options_up) {
197 result_sp->m_options = *options_up;
203 if (success && names_array) {
204 size_t num_names = names_array->
GetSize();
205 for (
size_t i = 0; i < num_names; i++) {
206 if (std::optional<llvm::StringRef> maybe_name =
235 size_t num_names = names_array->
GetSize();
237 for (
size_t i = 0; i < num_names; i++) {
238 std::optional<llvm::StringRef> maybe_name =
240 if (maybe_name && llvm::is_contained(names, *maybe_name))
253 bool *new_location) {
297 : eBreakpointEventTypeDisabled);
410 bool is_synchronous) {
422 const BatonSP &callback_baton_sp,
423 bool is_synchronous) {
461 std::shared_ptr<BreakpointEventData> new_locations_event =
462 std::make_shared<BreakpointEventData>(
463 eBreakpointEventTypeLocationsAdded, shared_from_this());
465 module_list, new_locations_event->GetBreakpointLocationCollection());
466 if (new_locations_event->GetBreakpointLocationCollection().GetSize() != 0)
482 bool delete_locations) {
485 "Breakpoint::ModulesChanged: num_modules: %zu load: %i "
486 "delete_locations: %i\n",
487 module_list.
GetSize(), load, delete_locations);
517 Address section_addr(break_loc_sp->GetAddress());
519 locations_with_no_section.
Add(break_loc_sp);
523 if (!break_loc_sp->IsEnabled())
532 if (section_sp && section_sp->GetModule() == module_sp) {
536 if (!break_loc_sp->ResolveBreakpointSite()) {
538 "Warning: could not set breakpoint site for "
539 "breakpoint location %d of breakpoint %d.\n",
540 break_loc_sp->GetID(),
GetID());
545 size_t num_to_delete = locations_with_no_section.
GetSize();
547 for (
size_t i = 0; i < num_to_delete; i++)
554 if (new_modules.
GetSize() > 0) {
562 std::shared_ptr<BreakpointEventData> removed_locations_event;
564 removed_locations_event = std::make_shared<BreakpointEventData>(
565 eBreakpointEventTypeLocationsRemoved, shared_from_this());
572 for (loc_idx = 0; loc_idx < num_locations; loc_idx++) {
574 SectionSP section_sp(break_loc_sp->GetAddress().GetSection());
575 if (section_sp && section_sp->GetModule() == module_sp) {
579 break_loc_sp->ClearBreakpointSite();
580 if (removed_locations_event) {
581 removed_locations_event->GetBreakpointLocationCollection().Add(
584 if (delete_locations)
585 locations_to_remove.
Add(break_loc_sp);
589 if (delete_locations) {
590 size_t num_locations_to_remove = locations_to_remove.
GetSize();
591 for (loc_idx = 0; loc_idx < num_locations_to_remove; loc_idx++)
602 bool equivalent_scs =
false;
611 equivalent_scs =
true;
615 equivalent_scs =
true;
625 equivalent_scs =
true;
631 equivalent_scs =
true;
635 return equivalent_scs;
641 LLDB_LOGF(log,
"Breakpoint::ModulesReplaced for %s\n",
642 old_module_sp->GetSpecificationDescription().c_str());
647 SectionSP section_sp = break_loc_sp->GetAddress().GetSection();
648 if (section_sp && section_sp->GetModule() == old_module_sp) {
649 old_break_locs.
Add(break_loc_sp);
653 size_t num_old_locations = old_break_locs.
GetSize();
655 if (num_old_locations == 0) {
659 temp_list.
Append(new_module_sp);
671 temp_list.
Append(new_module_sp);
677 size_t num_new_locations = new_break_locs.
GetSize();
679 if (num_new_locations > 0) {
683 if (num_new_locations == 1 && num_old_locations == 1) {
684 bool equivalent_locations =
false;
691 if (old_loc_sp->GetAddress().CalculateSymbolContext(&old_sc) ==
692 new_loc_sp->GetAddress().CalculateSymbolContext(&new_sc)) {
693 equivalent_locations =
697 if (equivalent_locations) {
700 locations_to_remove.
Add(old_loc_sp);
701 locations_to_announce.
Add(new_loc_sp);
707 typedef std::map<lldb::break_id_t, SymbolContext> IDToSCMap;
708 IDToSCMap old_sc_map;
709 for (
size_t idx = 0; idx < num_old_locations; idx++) {
713 bp_loc_sp->GetAddress().CalculateSymbolContext(&old_sc_map[loc_id]);
716 std::map<lldb::break_id_t, SymbolContext> new_sc_map;
717 for (
size_t idx = 0; idx < num_new_locations; idx++) {
721 bp_loc_sp->GetAddress().CalculateSymbolContext(&new_sc_map[loc_id]);
724 while (old_sc_map.size() > 0) {
730 std::vector<lldb::break_id_t> old_id_vec;
731 old_id_vec.push_back(old_id);
733 IDToSCMap::iterator tmp_iter;
734 for (tmp_iter = ++old_sc_map.begin(); tmp_iter != old_sc_map.end();
737 old_id_vec.push_back(tmp_iter->first);
741 std::vector<lldb::break_id_t> new_id_vec;
742 for (tmp_iter = new_sc_map.begin(); tmp_iter != new_sc_map.end();
745 new_id_vec.push_back(tmp_iter->first);
755 if (old_id_vec.size() == new_id_vec.size()) {
756 llvm::sort(old_id_vec);
757 llvm::sort(new_id_vec);
758 size_t num_elements = old_id_vec.size();
759 for (
size_t idx = 0; idx < num_elements; idx++) {
765 old_sc_map.erase(old_id_vec[idx]);
766 new_sc_map.erase(new_id_vec[idx]);
770 locations_to_remove.
Add(
772 old_sc_map.erase(old_id);
775 locations_to_announce.
Add(
777 new_sc_map.erase(new_id);
790 std::shared_ptr<BreakpointEventData> removed_locations_event;
792 removed_locations_event = std::make_shared<BreakpointEventData>(
793 eBreakpointEventTypeLocationsRemoved, shared_from_this());
798 if (removed_locations_event)
799 removed_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
806 std::shared_ptr<BreakpointEventData> added_locations_event =
807 std::make_shared<BreakpointEventData>(
808 eBreakpointEventTypeLocationsAdded, shared_from_this());
811 added_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
838 bool show_locations) {
839 assert(s !=
nullptr);
864 if (num_locations > 0) {
865 s->
Printf(
", locations = %" PRIu64, (uint64_t)num_locations);
866 if (num_resolved_locations > 0)
867 s->
Printf(
", resolved = %" PRIu64
", hit count = %d",
874 s->
Printf(
", locations = 0 (pending)");
891 s->
Printf(
"%s\n", name.c_str());
902 if (num_locations == 0) {
903 s->
Printf(
"no locations (pending).");
904 }
else if (num_locations == 1 && !show_locations) {
909 s->
Printf(
"%" PRIu64
" locations.",
static_cast<uint64_t
>(num_locations));
930 for (
size_t i = 0; i < num_locations; ++i) {
945 uint32_t line_number,
957 if (resolverFileLine &&
979 lldb::BreakpointEventType eventKind) {
982 std::shared_ptr<BreakpointEventData> data =
983 std::make_shared<BreakpointEventData>(eventKind, shared_from_this());
991 if (!breakpoint_data_sp)
1002 case eBreakpointEventTypeInvalidType:
return "invalid";
1003 case eBreakpointEventTypeAdded:
return "breakpoint added";
1004 case eBreakpointEventTypeRemoved:
return "breakpoint removed";
1005 case eBreakpointEventTypeLocationsAdded:
return "locations added";
1006 case eBreakpointEventTypeLocationsRemoved:
return "locations removed";
1007 case eBreakpointEventTypeLocationsResolved:
return "locations resolved";
1008 case eBreakpointEventTypeEnabled:
return "breakpoint enabled";
1009 case eBreakpointEventTypeDisabled:
return "breakpoint disabled";
1010 case eBreakpointEventTypeCommandChanged:
return "command changed";
1011 case eBreakpointEventTypeConditionChanged:
return "condition changed";
1012 case eBreakpointEventTypeIgnoreChanged:
return "ignore count changed";
1013 case eBreakpointEventTypeThreadChanged:
return "thread changed";
1014 case eBreakpointEventTypeAutoContinueChanged:
return "autocontinue changed";
1016 llvm_unreachable(
"Fully covered switch above!");
1024 BreakpointEventType sub_type,
const BreakpointSP &new_breakpoint_sp)
1025 : m_breakpoint_event(sub_type), m_new_breakpoint_sp(new_breakpoint_sp) {}
1030 return "Breakpoint::BreakpointEventData";
1038 return m_new_breakpoint_sp;
1043 return m_breakpoint_event;
1049 BreakpointEventType event_type = GetBreakpointEventType();
1050 break_id_t bkpt_id = GetBreakpoint()->GetID();
1051 s->
Format(
"bkpt: {0} type: {1}", bkpt_id,
1058 const EventData *event_data =
event->GetData();
1071 if (data ==
nullptr)
1072 return eBreakpointEventTypeInvalidType;
1112 bp.try_emplace(
"id",
GetID());
1116 bp.try_emplace(
"hitCount", (int64_t)
GetHitCount());
1127 llvm::raw_string_ostream ss(buffer);
1128 json::OStream json_os(ss);
1129 bp_data_sp->Serialize(json_os);
1130 if (
auto expected_value = llvm::json::parse(buffer)) {
1131 bp.try_emplace(
"details", std::move(*expected_value));
1133 std::string details_error =
toString(expected_value.takeError());
1134 json::Object details;
1135 details.try_emplace(
"error", details_error);
1136 bp.try_emplace(
"details", std::move(details));
1139 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,...)
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 ResetHitCount()
Resets the hit count of all locations in this list.
void RemoveInvalidLocations(const ArchSpec &arch)
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
bool RemoveLocation(const lldb::BreakpointLocationSP &bp_loc_sp)
void ClearAllBreakpointSites()
Removes all the locations in this list from their breakpoint site owners list.
const lldb::BreakpointLocationSP FindByAddress(const Address &addr) const
Returns a shared pointer to the breakpoint location at address addr - const version.
void ResolveAllBreakpointSites()
Tells all the breakpoint locations in this list to attempt to resolve any possible breakpoint sites.
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
lldb::BreakpointLocationSP FindByID(lldb::break_id_t breakID) const
Returns a shared pointer to the breakpoint location with id breakID, const version.
lldb::BreakpointLocationSP AddLocation(const Address &addr, bool resolve_indirect_symbols, bool *new_location=nullptr)
void StartRecordingNewLocations(BreakpointLocationCollection &new_locations)
void StopRecordingNewLocations()
lldb::break_id_t FindIDByAddress(const Address &addr)
Returns the breakpoint location id to the breakpoint location at address addr.
size_t GetNumResolvedLocations() const
Returns the number of breakpoint locations in this list with resolved breakpoints.
BreakpointLocationIterable BreakpointLocations()
void SwapLocation(lldb::BreakpointLocationSP to_location_sp, lldb::BreakpointLocationSP from_location_sp)
General Outline: A breakpoint location is defined by the breakpoint that produces it,...
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...
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.
void ClearCallback()
Remove the callback from this option set.
void SetIgnoreCount(uint32_t n)
Set the breakpoint to ignore the next count breakpoint hits.
void SetEnabled(bool enabled)
If enable is true, enable the breakpoint, if false disable it.
void SetCondition(const char *condition)
Set the breakpoint option's condition.
bool IsOneShot() const
Check the One-shot state.
bool IsEnabled() const
Check the Enable/Disable state.
virtual StructuredData::ObjectSP SerializeToStructuredData()
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
uint32_t GetIgnoreCount() const
Return the current Ignore Count.
bool IsAutoContinue() const
Check the auto-continue state.
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it.
void SetOneShot(bool one_shot)
If enable is true, enable the breakpoint, if false disable it.
const ThreadSpec * GetThreadSpecNoCreate() const
Return the current thread spec for this option.
void SetAutoContinue(bool auto_continue)
Set the auto-continue state.
static std::unique_ptr< BreakpointOptions > CreateFromStructuredData(Target &target, const StructuredData::Dictionary &data_dict, Status &error)
const char * GetConditionText(size_t *hash=nullptr) const
Return a pointer to the text of the condition expression.
static const char * GetSerializationKey()
void SetCallback(BreakpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the breakpoint option set.
"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)
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)
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
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 * GetConditionText() const
Return a pointer to the text of the condition expression.
const char * GetQueueName() const
const lldb::TargetSP GetTargetSP()
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 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 SetCondition(const char *condition)
Set the breakpoint's condition.
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 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)
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...
uint32_t GetValue() const
lldb::break_id_t GetID() const
A stream class that can stream formatted output to a file.
void Format(const char *format, Args &&... args)
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< String > StringSP
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.
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name, Status &error)
@ eBroadcastBitBreakpointChanged
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)
void SetIndex(uint32_t index)
void SetName(llvm::StringRef name)
uint32_t GetIndex() const
void SetTID(lldb::tid_t tid)
const char * GetName() const
void SetQueueName(llvm::StringRef queue_name)
const char * GetQueueName() const
lldb::tid_t GetTID() const
#define LLDB_INVALID_THREAD_ID
#define LLDB_BREAK_ID_IS_INTERNAL(bid)
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.
std::function< bool(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)> BreakpointHitCallback
const char * toString(AppleArm64ExceptionClass EC)
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