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()) {
131 error.SetErrorString(
"Can't deserialize from an invalid data object.");
139 error.SetErrorString(
"Breakpoint data missing toplevel resolver key");
147 if (create_error.
Fail()) {
148 error.SetErrorStringWithFormat(
149 "Error creating breakpoint resolver from data: %s.",
160 std::make_shared<SearchFilterForUnconstrainedSearches>(target_sp);
164 if (create_error.
Fail()) {
165 error.SetErrorStringWithFormat(
166 "Error creating breakpoint filter from data: %s.",
172 std::unique_ptr<BreakpointOptions> options_up;
174 Target& target = *target_sp;
179 target, *options_dict, create_error);
180 if (create_error.
Fail()) {
181 error.SetErrorStringWithFormat(
182 "Error creating breakpoint options from data: %s.",
188 bool hardware =
false;
195 if (result_sp && options_up) {
196 result_sp->m_options = *options_up;
202 if (success && names_array) {
203 size_t num_names = names_array->
GetSize();
204 for (
size_t i = 0; i < num_names; i++) {
205 if (std::optional<llvm::StringRef> maybe_name =
234 size_t num_names = names_array->
GetSize();
236 for (
size_t i = 0; i < num_names; i++) {
237 std::optional<llvm::StringRef> maybe_name =
239 if (maybe_name && llvm::is_contained(names, *maybe_name))
252 bool *new_location) {
296 : eBreakpointEventTypeDisabled);
409 bool is_synchronous) {
421 const BatonSP &callback_baton_sp,
422 bool is_synchronous) {
460 std::shared_ptr<BreakpointEventData> new_locations_event =
461 std::make_shared<BreakpointEventData>(
462 eBreakpointEventTypeLocationsAdded, shared_from_this());
464 module_list, new_locations_event->GetBreakpointLocationCollection());
465 if (new_locations_event->GetBreakpointLocationCollection().GetSize() != 0)
481 bool delete_locations) {
484 "Breakpoint::ModulesChanged: num_modules: %zu load: %i "
485 "delete_locations: %i\n",
486 module_list.
GetSize(), load, delete_locations);
516 Address section_addr(break_loc_sp->GetAddress());
518 locations_with_no_section.
Add(break_loc_sp);
522 if (!break_loc_sp->IsEnabled())
531 if (section_sp && section_sp->GetModule() == module_sp) {
535 if (!break_loc_sp->ResolveBreakpointSite()) {
537 "Warning: could not set breakpoint site for "
538 "breakpoint location %d of breakpoint %d.\n",
539 break_loc_sp->GetID(),
GetID());
544 size_t num_to_delete = locations_with_no_section.
GetSize();
546 for (
size_t i = 0; i < num_to_delete; i++)
553 if (new_modules.
GetSize() > 0) {
561 std::shared_ptr<BreakpointEventData> removed_locations_event;
563 removed_locations_event = std::make_shared<BreakpointEventData>(
564 eBreakpointEventTypeLocationsRemoved, shared_from_this());
571 for (loc_idx = 0; loc_idx < num_locations; loc_idx++) {
573 SectionSP section_sp(break_loc_sp->GetAddress().GetSection());
574 if (section_sp && section_sp->GetModule() == module_sp) {
578 break_loc_sp->ClearBreakpointSite();
579 if (removed_locations_event) {
580 removed_locations_event->GetBreakpointLocationCollection().Add(
583 if (delete_locations)
584 locations_to_remove.
Add(break_loc_sp);
588 if (delete_locations) {
589 size_t num_locations_to_remove = locations_to_remove.
GetSize();
590 for (loc_idx = 0; loc_idx < num_locations_to_remove; loc_idx++)
601 bool equivalent_scs =
false;
610 equivalent_scs =
true;
614 equivalent_scs =
true;
624 equivalent_scs =
true;
630 equivalent_scs =
true;
634 return equivalent_scs;
640 LLDB_LOGF(log,
"Breakpoint::ModulesReplaced for %s\n",
641 old_module_sp->GetSpecificationDescription().c_str());
646 SectionSP section_sp = break_loc_sp->GetAddress().GetSection();
647 if (section_sp && section_sp->GetModule() == old_module_sp) {
648 old_break_locs.
Add(break_loc_sp);
652 size_t num_old_locations = old_break_locs.
GetSize();
654 if (num_old_locations == 0) {
658 temp_list.
Append(new_module_sp);
670 temp_list.
Append(new_module_sp);
676 size_t num_new_locations = new_break_locs.
GetSize();
678 if (num_new_locations > 0) {
682 if (num_new_locations == 1 && num_old_locations == 1) {
683 bool equivalent_locations =
false;
690 if (old_loc_sp->GetAddress().CalculateSymbolContext(&old_sc) ==
691 new_loc_sp->GetAddress().CalculateSymbolContext(&new_sc)) {
692 equivalent_locations =
696 if (equivalent_locations) {
699 locations_to_remove.
Add(old_loc_sp);
700 locations_to_announce.
Add(new_loc_sp);
706 typedef std::map<lldb::break_id_t, SymbolContext> IDToSCMap;
707 IDToSCMap old_sc_map;
708 for (
size_t idx = 0; idx < num_old_locations; idx++) {
712 bp_loc_sp->GetAddress().CalculateSymbolContext(&old_sc_map[loc_id]);
715 std::map<lldb::break_id_t, SymbolContext> new_sc_map;
716 for (
size_t idx = 0; idx < num_new_locations; idx++) {
720 bp_loc_sp->GetAddress().CalculateSymbolContext(&new_sc_map[loc_id]);
723 while (old_sc_map.size() > 0) {
729 std::vector<lldb::break_id_t> old_id_vec;
730 old_id_vec.push_back(old_id);
732 IDToSCMap::iterator tmp_iter;
733 for (tmp_iter = ++old_sc_map.begin(); tmp_iter != old_sc_map.end();
736 old_id_vec.push_back(tmp_iter->first);
740 std::vector<lldb::break_id_t> new_id_vec;
741 for (tmp_iter = new_sc_map.begin(); tmp_iter != new_sc_map.end();
744 new_id_vec.push_back(tmp_iter->first);
754 if (old_id_vec.size() == new_id_vec.size()) {
755 llvm::sort(old_id_vec);
756 llvm::sort(new_id_vec);
757 size_t num_elements = old_id_vec.size();
758 for (
size_t idx = 0; idx < num_elements; idx++) {
764 old_sc_map.erase(old_id_vec[idx]);
765 new_sc_map.erase(new_id_vec[idx]);
769 locations_to_remove.
Add(
771 old_sc_map.erase(old_id);
774 locations_to_announce.
Add(
776 new_sc_map.erase(new_id);
789 std::shared_ptr<BreakpointEventData> removed_locations_event;
791 removed_locations_event = std::make_shared<BreakpointEventData>(
792 eBreakpointEventTypeLocationsRemoved, shared_from_this());
797 if (removed_locations_event)
798 removed_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
805 std::shared_ptr<BreakpointEventData> added_locations_event =
806 std::make_shared<BreakpointEventData>(
807 eBreakpointEventTypeLocationsAdded, shared_from_this());
810 added_locations_event->GetBreakpointLocationCollection().Add(loc_sp);
837 bool show_locations) {
838 assert(s !=
nullptr);
863 if (num_locations > 0) {
864 s->
Printf(
", locations = %" PRIu64, (uint64_t)num_locations);
865 if (num_resolved_locations > 0)
866 s->
Printf(
", resolved = %" PRIu64
", hit count = %d",
873 s->
Printf(
", locations = 0 (pending)");
890 s->
Printf(
"%s\n", name.c_str());
901 if (num_locations == 0) {
902 s->
Printf(
"no locations (pending).");
903 }
else if (num_locations == 1 && !show_locations) {
908 s->
Printf(
"%" PRIu64
" locations.",
static_cast<uint64_t
>(num_locations));
929 for (
size_t i = 0; i < num_locations; ++i) {
944 uint32_t line_number,
956 if (resolverFileLine &&
978 lldb::BreakpointEventType eventKind) {
981 std::shared_ptr<BreakpointEventData> data =
982 std::make_shared<BreakpointEventData>(eventKind, shared_from_this());
990 if (!breakpoint_data_sp)
1001 case eBreakpointEventTypeInvalidType:
return "invalid";
1002 case eBreakpointEventTypeAdded:
return "breakpoint added";
1003 case eBreakpointEventTypeRemoved:
return "breakpoint removed";
1004 case eBreakpointEventTypeLocationsAdded:
return "locations added";
1005 case eBreakpointEventTypeLocationsRemoved:
return "locations removed";
1006 case eBreakpointEventTypeLocationsResolved:
return "locations resolved";
1007 case eBreakpointEventTypeEnabled:
return "breakpoint enabled";
1008 case eBreakpointEventTypeDisabled:
return "breakpoint disabled";
1009 case eBreakpointEventTypeCommandChanged:
return "command changed";
1010 case eBreakpointEventTypeConditionChanged:
return "condition changed";
1011 case eBreakpointEventTypeIgnoreChanged:
return "ignore count changed";
1012 case eBreakpointEventTypeThreadChanged:
return "thread changed";
1013 case eBreakpointEventTypeAutoContinueChanged:
return "autocontinue changed";
1015 llvm_unreachable(
"Fully covered switch above!");
1023 BreakpointEventType sub_type,
const BreakpointSP &new_breakpoint_sp)
1024 : m_breakpoint_event(sub_type), m_new_breakpoint_sp(new_breakpoint_sp) {}
1029 return "Breakpoint::BreakpointEventData";
1037 return m_new_breakpoint_sp;
1042 return m_breakpoint_event;
1048 BreakpointEventType event_type = GetBreakpointEventType();
1049 break_id_t bkpt_id = GetBreakpoint()->GetID();
1050 s->
Format(
"bkpt: {0} type: {1}", bkpt_id,
1057 const EventData *event_data =
event->GetData();
1070 if (data ==
nullptr)
1071 return eBreakpointEventTypeInvalidType;
1111 bp.try_emplace(
"id",
GetID());
1115 bp.try_emplace(
"hitCount", (int64_t)
GetHitCount());
1126 llvm::raw_string_ostream ss(buffer);
1127 json::OStream json_os(ss);
1128 bp_data_sp->Serialize(json_os);
1129 if (
auto expected_value = llvm::json::parse(ss.str())) {
1130 bp.try_emplace(
"details", std::move(*expected_value));
1132 std::string details_error =
toString(expected_value.takeError());
1133 json::Object details;
1134 details.try_emplace(
"error", details_error);
1135 bp.try_emplace(
"details", std::move(details));
1138 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
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.
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