LLDB mainline
|
"lldb/Breakpoint/BreakpointResolverFileLine.h" This class sets breakpoints by file and line. More...
#include <BreakpointResolverFileLine.h>
Public Member Functions | |
BreakpointResolverFileLine (const lldb::BreakpointSP &bkpt, lldb::addr_t offset, bool skip_prologue, const SourceLocationSpec &location_spec, std::optional< llvm::StringRef > removed_prefix_opt=std::nullopt) | |
StructuredData::ObjectSP | SerializeToStructuredData () override |
~BreakpointResolverFileLine () override=default | |
Searcher::CallbackReturn | SearchCallback (SearchFilter &filter, SymbolContext &context, Address *addr) override |
lldb::SearchDepth | GetDepth () override |
void | GetDescription (Stream *s) override |
Prints a canonical description for the breakpoint to the stream s. | |
void | Dump (Stream *s) const override |
Standard "Dump" method. At present it does nothing. | |
lldb::BreakpointResolverSP | CopyForBreakpoint (lldb::BreakpointSP &breakpoint) override |
Public Member Functions inherited from lldb_private::BreakpointResolver | |
BreakpointResolver (const lldb::BreakpointSP &bkpt, unsigned char resolverType, lldb::addr_t offset=0) | |
The breakpoint resolver need to have a breakpoint for "ResolveBreakpoint to make sense. | |
~BreakpointResolver () override | |
The Destructor is virtual, all significant breakpoint resolvers derive from this class. | |
void | SetBreakpoint (const lldb::BreakpointSP &bkpt) |
This sets the breakpoint for this resolver. | |
lldb::BreakpointSP | GetBreakpoint () const |
This gets the breakpoint for this resolver. | |
void | SetOffset (lldb::addr_t offset) |
This updates the offset for this breakpoint. | |
lldb::addr_t | GetOffset () const |
virtual void | ResolveBreakpoint (SearchFilter &filter) |
In response to this method the resolver scans all the modules in the breakpoint's target, and adds any new locations it finds. | |
virtual void | ResolveBreakpointInModules (SearchFilter &filter, ModuleList &modules) |
In response to this method the resolver scans the modules in the module list modules, and adds any new locations it finds. | |
void | GetDescription (Stream *s) override=0 |
Prints a canonical description for the breakpoint to the stream s. | |
virtual void | Dump (Stream *s) const =0 |
Standard "Dump" method. At present it does nothing. | |
virtual StructuredData::ObjectSP | SerializeToStructuredData () |
StructuredData::DictionarySP | WrapOptionsDict (StructuredData::DictionarySP options_dict_sp) |
unsigned | getResolverID () const |
getResolverID - Return an ID for the concrete type of this object. | |
enum ResolverTy | GetResolverTy () |
const char * | GetResolverName () |
virtual lldb::BreakpointResolverSP | CopyForBreakpoint (lldb::BreakpointSP &breakpoint)=0 |
Public Member Functions inherited from lldb_private::Searcher | |
Searcher () | |
virtual | ~Searcher () |
virtual CallbackReturn | SearchCallback (SearchFilter &filter, SymbolContext &context, Address *addr)=0 |
virtual lldb::SearchDepth | GetDepth ()=0 |
virtual void | GetDescription (Stream *s) |
Prints a canonical description for the searcher to the stream s. | |
Static Public Member Functions | |
static lldb::BreakpointResolverSP | CreateFromStructuredData (const StructuredData::Dictionary &data_dict, Status &error) |
static bool | classof (const BreakpointResolverFileLine *) |
Methods for support type inquiry through isa, cast, and dyn_cast: | |
static bool | classof (const BreakpointResolver *V) |
Static Public Member Functions inherited from lldb_private::BreakpointResolver | |
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 const char * | GetSerializationSubclassKey () |
static const char * | GetSerializationSubclassOptionsKey () |
static const char * | ResolverTyToName (enum ResolverTy) |
static ResolverTy | NameToResolverTy (llvm::StringRef name) |
static const char * | GetKey (OptionNames enum_value) |
Protected Member Functions | |
void | FilterContexts (SymbolContextList &sc_list) |
void | DeduceSourceMapping (const SymbolContextList &sc_list) |
Protected Member Functions inherited from lldb_private::BreakpointResolver | |
virtual void | NotifyBreakpointSet () |
void | SetSCMatchesByLine (SearchFilter &filter, SymbolContextList &sc_list, bool skip_prologue, llvm::StringRef log_ident, uint32_t line=0, std::optional< uint16_t > column=std::nullopt) |
Takes a symbol context list of matches which supposedly represent the same file and line number in a CU, and find the nearest actual line number that matches, and then filter down the matching addresses to unique entries, and skip the prologue if asked to do so, and then set breakpoint locations in this breakpoint for all the resultant addresses. | |
void | SetSCMatchesByLine (SearchFilter &, SymbolContextList &, bool, const char *)=delete |
lldb::BreakpointLocationSP | AddLocation (Address loc_addr, bool *new_location=nullptr) |
Protected Attributes | |
SourceLocationSpec | m_location_spec |
bool | m_skip_prologue |
std::optional< llvm::StringRef > | m_removed_prefix_opt |
Private Member Functions | |
BreakpointResolverFileLine (const BreakpointResolverFileLine &)=delete | |
const BreakpointResolverFileLine & | operator= (const BreakpointResolverFileLine &)=delete |
Friends | |
class | Breakpoint |
"lldb/Breakpoint/BreakpointResolverFileLine.h" This class sets breakpoints by file and line.
Optionally, it will look for inlined instances of the file and line specification.
Definition at line 23 of file BreakpointResolverFileLine.h.
BreakpointResolverFileLine::BreakpointResolverFileLine | ( | const lldb::BreakpointSP & | bkpt, |
lldb::addr_t | offset, | ||
bool | skip_prologue, | ||
const SourceLocationSpec & | location_spec, | ||
std::optional< llvm::StringRef > | removed_prefix_opt = std::nullopt |
||
) |
Definition at line 26 of file BreakpointResolverFileLine.cpp.
|
overridedefault |
|
privatedelete |
|
inlinestatic |
Definition at line 52 of file BreakpointResolverFileLine.h.
References lldb_private::BreakpointResolver::FileLineResolver, and lldb_private::BreakpointResolver::getResolverID().
|
inlinestatic |
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 49 of file BreakpointResolverFileLine.h.
|
overridevirtual |
Implements lldb_private::BreakpointResolver.
Definition at line 345 of file BreakpointResolverFileLine.cpp.
References lldb_private::BreakpointResolver::GetOffset(), m_location_spec, and m_skip_prologue.
|
static |
Definition at line 34 of file BreakpointResolverFileLine.cpp.
References lldb_private::BreakpointResolver::Column, error(), lldb_private::BreakpointResolver::ExactMatch, lldb_private::BreakpointResolver::FileName, lldb_private::BreakpointResolver::GetKey(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsBoolean(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsInteger(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsString(), lldb_private::BreakpointResolver::Inlines, lldb_private::BreakpointResolver::LineNumber, and lldb_private::BreakpointResolver::SkipPrologue.
Referenced by lldb_private::BreakpointResolver::CreateFromStructuredData().
|
protected |
Definition at line 195 of file BreakpointResolverFileLine.cpp.
References lldb_private::PathMappingList::AppendUnique(), lldb_private::Breakpoints, lldb_private::FileSpec::Equal(), lldb_private::TargetProperties::GetAutoSourceMapRelative(), lldb_private::BreakpointResolver::GetBreakpoint(), lldb_private::FileSpec::GetDirectory(), lldb_private::SourceLocationSpec::GetFileSpec(), lldb_private::GetLog(), lldb_private::TargetProperties::GetSourcePathMap(), lldb_private::Target::GetStatistics(), lldb_private::ConstString::GetStringRef(), lldb_private::TargetStats::IncreaseSourceMapDeduceCount(), lldb_private::FileSpec::IsCaseSensitive(), lldb_private::FileSpec::IsRelative(), LLDB_LOG, m_location_spec, and m_removed_prefix_opt.
Referenced by SearchCallback().
|
overridevirtual |
Standard "Dump" method. At present it does nothing.
Implements lldb_private::BreakpointResolver.
Definition at line 342 of file BreakpointResolverFileLine.cpp.
|
protected |
Definition at line 126 of file BreakpointResolverFileLine.cpp.
References lldb_private::SymbolContext::block, lldb_private::Breakpoints, lldb_private::SymbolContext::function, lldb_private::Block::GetContainingInlinedBlock(), lldb_private::SymbolContextList::GetContextAtIndex(), lldb_private::FunctionInfo::GetDeclaration(), lldb_private::SourceLocationSpec::GetExactMatch(), lldb_private::Declaration::GetFile(), lldb_private::LineEntry::GetFile(), lldb_private::Block::GetInlinedFunctionInfo(), lldb_private::Declaration::GetLine(), lldb_private::SourceLocationSpec::GetLine(), lldb_private::GetLog(), lldb_private::SymbolContextList::GetSize(), lldb_private::Function::GetStartLineSourceInfo(), lldb_private::Declaration::IsValid(), lldb_private::LineEntry::line, lldb_private::SymbolContext::line_entry, LLDB_LOG, m_location_spec, and lldb_private::SymbolContextList::RemoveContextAtIndex().
Referenced by SearchCallback().
|
overridevirtual |
Implements lldb_private::Searcher.
Definition at line 328 of file BreakpointResolverFileLine.cpp.
References lldb::eSearchDepthModule.
|
overridevirtual |
Prints a canonical description for the breakpoint to the stream s.
[in] | s | Stream to which the output is copied. |
Implements lldb_private::BreakpointResolver.
Definition at line 332 of file BreakpointResolverFileLine.cpp.
References lldb_private::SourceLocationSpec::GetColumn(), lldb_private::SourceLocationSpec::GetExactMatch(), lldb_private::SourceLocationSpec::GetFileSpec(), lldb_private::SourceLocationSpec::GetLine(), lldb_private::FileSpec::GetPath(), m_location_spec, and lldb_private::Stream::Printf().
|
privatedelete |
|
overridevirtual |
Implements lldb_private::Searcher.
Definition at line 271 of file BreakpointResolverFileLine.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::SearchFilter::CompUnitPasses(), DeduceSourceMapping(), lldb_private::Searcher::eCallbackReturnContinue, FilterContexts(), lldb_private::BreakpointResolver::GetBreakpoint(), lldb_private::SourceLocationSpec::GetColumn(), lldb_private::FileSpec::GetFilename(), lldb_private::SourceLocationSpec::GetFileSpec(), lldb_private::SourceLocationSpec::GetLine(), lldb_private::RealpathPrefixes::GetSourceRealpathAttemptCount(), lldb_private::RealpathPrefixes::GetSourceRealpathCompatibleCount(), lldb_private::TargetProperties::GetSourceRealpathPrefixes(), lldb_private::Target::GetStatistics(), lldb_private::StreamString::GetString(), lldb_private::TargetStats::IncreaseSourceRealpathAttemptCount(), lldb_private::TargetStats::IncreaseSourceRealpathCompatibleCount(), m_location_spec, m_skip_prologue, lldb_private::SymbolContext::module_sp, lldb_private::Stream::Printf(), and lldb_private::BreakpointResolver::SetSCMatchesByLine().
|
overridevirtual |
Reimplemented from lldb_private::BreakpointResolver.
Definition at line 98 of file BreakpointResolverFileLine.cpp.
References lldb_private::BreakpointResolver::Column, lldb_private::BreakpointResolver::ExactMatch, lldb_private::BreakpointResolver::FileName, lldb_private::SourceLocationSpec::GetCheckInlines(), lldb_private::SourceLocationSpec::GetColumn(), lldb_private::SourceLocationSpec::GetExactMatch(), lldb_private::SourceLocationSpec::GetFileSpec(), lldb_private::BreakpointResolver::GetKey(), lldb_private::SourceLocationSpec::GetLine(), lldb_private::FileSpec::GetPath(), lldb_private::BreakpointResolver::Inlines, lldb_private::BreakpointResolver::LineNumber, LLDB_INVALID_COLUMN_NUMBER, m_location_spec, m_skip_prologue, lldb_private::BreakpointResolver::SkipPrologue, and lldb_private::BreakpointResolver::WrapOptionsDict().
|
friend |
Definition at line 63 of file BreakpointResolverFileLine.h.
|
protected |
Definition at line 64 of file BreakpointResolverFileLine.h.
Referenced by CopyForBreakpoint(), DeduceSourceMapping(), FilterContexts(), GetDescription(), lldb_private::Breakpoint::GetMatchingFileLine(), SearchCallback(), and SerializeToStructuredData().
|
protected |
Definition at line 68 of file BreakpointResolverFileLine.h.
Referenced by DeduceSourceMapping().
|
protected |
Definition at line 65 of file BreakpointResolverFileLine.h.
Referenced by CopyForBreakpoint(), SearchCallback(), and SerializeToStructuredData().