LLDB
mainline
|
#include "lldb/Symbol/LineEntry.h"
Public Member Functions | |
LineEntry () | |
Default constructor. More... | |
LineEntry (const lldb::SectionSP §ion_sp, lldb::addr_t section_offset, lldb::addr_t byte_size, const FileSpec &file, uint32_t _line, uint16_t _column, bool _is_start_of_statement, bool _is_start_of_basic_block, bool _is_prologue_end, bool _is_epilogue_begin, bool _is_terminal_entry) | |
void | Clear () |
Clear the object's state. More... | |
bool | Dump (Stream *s, Target *target, bool show_file, Address::DumpStyle style, Address::DumpStyle fallback_style, bool show_range) const |
Dump a description of this object to a Stream. More... | |
bool | GetDescription (Stream *s, lldb::DescriptionLevel level, CompileUnit *cu, Target *target, bool show_address_only) const |
bool | DumpStopContext (Stream *s, bool show_fullpaths) const |
Dumps information specific to a process that stops at this line entry to the supplied stream s. More... | |
bool | IsValid () const |
Check if a line entry object is valid. More... | |
AddressRange | GetSameLineContiguousAddressRange (bool include_inlined_functions) const |
Give the range for this LineEntry + any additional LineEntries for this same source line that are contiguous. More... | |
void | ApplyFileMappings (lldb::TargetSP target_sp) |
Apply file mappings from target.source-map to the LineEntry's file. More... | |
Static Public Member Functions | |
static int | Compare (const LineEntry &lhs, const LineEntry &rhs) |
Compare two LineEntry objects. More... | |
Public Attributes | |
AddressRange | range |
The section offset address range for this line entry. More... | |
FileSpec | file |
The source file, possibly mapped by the target.source-map setting. More... | |
FileSpec | original_file |
The original source file, from debug info. More... | |
uint32_t | line = LLDB_INVALID_LINE_NUMBER |
The source line number, or zero if there is no line number information. More... | |
uint16_t | column |
The column number of the source line, or zero if there is no column information. More... | |
uint16_t | is_start_of_statement: 1 |
Indicates this entry is the beginning of a statement. More... | |
uint16_t | is_start_of_basic_block: 1 |
Indicates this entry is the beginning of a basic block. More... | |
uint16_t | is_prologue_end: 1 |
Indicates this entry is one (of possibly many) where execution should be suspended for an entry breakpoint of a function. More... | |
uint16_t | is_epilogue_begin: 1 |
Indicates this entry is one (of possibly many) where execution should be suspended for an exit breakpoint of a function. More... | |
uint16_t | is_terminal_entry: 1 |
Indicates this entry is that of the first byte after the end of a sequence of target machine instructions. More... | |
A line table entry class.
Definition at line 20 of file LineEntry.h.
LineEntry::LineEntry | ( | ) |
Default constructor.
Initialize all member variables to invalid values.
Definition at line 16 of file LineEntry.cpp.
LineEntry::LineEntry | ( | const lldb::SectionSP & | section_sp, |
lldb::addr_t | section_offset, | ||
lldb::addr_t | byte_size, | ||
const FileSpec & | file, | ||
uint32_t | _line, | ||
uint16_t | _column, | ||
bool | _is_start_of_statement, | ||
bool | _is_start_of_basic_block, | ||
bool | _is_prologue_end, | ||
bool | _is_epilogue_begin, | ||
bool | _is_terminal_entry | ||
) |
Definition at line 20 of file LineEntry.cpp.
void LineEntry::ApplyFileMappings | ( | lldb::TargetSP | target_sp | ) |
Apply file mappings from target.source-map to the LineEntry's file.
[in] | target_sp | Shared pointer to the target this LineEntry belongs to. |
Definition at line 253 of file LineEntry.cpp.
References file, and original_file.
Referenced by lldb_private::StackFrameList::GetFramesUpTo(), and lldb_private::StackFrame::GetSymbolContext().
void LineEntry::Clear | ( | ) |
Clear the object's state.
Clears all member variables to invalid values.
Definition at line 33 of file LineEntry.cpp.
References lldb_private::AddressRange::Clear(), lldb_private::FileSpec::Clear(), column, file, is_epilogue_begin, is_prologue_end, is_start_of_basic_block, is_start_of_statement, is_terminal_entry, line, LLDB_INVALID_LINE_NUMBER, original_file, and range.
Referenced by lldb_private::Address::CalculateSymbolContextLineEntry(), lldb_private::SymbolContext::Clear(), lldb_private::Variable::DumpDeclaration(), lldb_private::LineTable::GetLineEntryAtIndex(), and lldb::SBSymbolContext::SetLineEntry().
Compare two LineEntry objects.
[in] | lhs | The Left Hand Side const LineEntry object reference. |
[in] | rhs | The Right Hand Side const LineEntry object reference. |
Definition at line 157 of file LineEntry.cpp.
References column, lldb_private::FileSpec::Compare(), lldb_private::Address::CompareFileAddress(), file, lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), is_terminal_entry, line, and range.
Referenced by lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb::SBLineEntry::operator!=(), lldb_private::operator<(), lldb::SBLineEntry::operator==(), and lldb_private::operator==().
bool LineEntry::Dump | ( | Stream * | s, |
Target * | target, | ||
bool | show_file, | ||
Address::DumpStyle | style, | ||
Address::DumpStyle | fallback_style, | ||
bool | show_range | ||
) | const |
Dump a description of this object to a Stream.
Dump a description of the contents of this object to the supplied stream s.
[in] | s | The stream to which to dump the object description. |
[in] | show_file | If true, display the filename with the line entry which requires that the compile unit object comp_unit be a valid pointer. |
[in] | style | The display style for the section offset address. |
Definition at line 70 of file LineEntry.cpp.
References column, lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), file, lldb_private::AddressRange::GetBaseAddress(), is_epilogue_begin, is_prologue_end, is_start_of_basic_block, is_start_of_statement, is_terminal_entry, line, lldb_private::Stream::Printf(), and range.
Referenced by lldb_private::LineTable::Dump(), lldb_private::SymbolContext::Dump(), GetDescription(), and lldb_private::ThreadPlanStepRange::InRange().
bool LineEntry::DumpStopContext | ( | Stream * | s, |
bool | show_fullpaths | ||
) | const |
Dumps information specific to a process that stops at this line entry to the supplied stream s.
[in] | s | The stream to which to dump the object description. |
Definition at line 50 of file LineEntry.cpp.
References lldb_private::Stream::AsRawOstream(), column, lldb_private::FileSpec::Dump(), lldb_private::ConstString::Dump(), file, lldb_private::FileSpec::GetFilename(), line, lldb_private::Stream::Printf(), and lldb_private::Stream::PutChar().
Referenced by lldb_private::SymbolContext::DumpStopContext(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb_private::ThreadPlanStepInRange::GetDescription(), and lldb_private::BreakpointLocation::GetDescription().
bool LineEntry::GetDescription | ( | Stream * | s, |
lldb::DescriptionLevel | level, | ||
CompileUnit * | cu, | ||
Target * | target, | ||
bool | show_address_only | ||
) | const |
Definition at line 105 of file LineEntry.cpp.
References column, Dump(), lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, lldb_private::Address::DumpStyleModuleWithFileAddress, lldb::eDescriptionLevelBrief, lldb::eDescriptionLevelFull, lldb_private::Stream::EOL(), file, lldb_private::AddressRange::GetBaseAddress(), is_epilogue_begin, is_prologue_end, is_start_of_basic_block, is_start_of_statement, is_terminal_entry, line, lldb_private::Stream::Printf(), and range.
Referenced by CommandObjectSourceInfo::DumpFileLinesInCompUnit(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), lldb_private::LineTable::GetDescription(), and lldb_private::SymbolContext::GetDescription().
AddressRange LineEntry::GetSameLineContiguousAddressRange | ( | bool | include_inlined_functions | ) | const |
Give the range for this LineEntry + any additional LineEntries for this same source line that are contiguous.
A compiler may emit multiple line entries for a single source line, e.g. to indicate subexpressions at different columns. This method will get the AddressRange for all of the LineEntries for this source line that are contiguous. Line entries with a line number of 0 are treated specially - these are compiler-generated line table entries that the user did not write in their source code, and we want to skip past in the debugger. If this LineEntry is for line 32, and the following LineEntry is for line 0, we will extend the range to include the AddressRange of the line 0 LineEntry (and it will include the range of the following LineEntries that match either 32 or 0.)
When include_inlined_functions is true inlined functions with a call site at this LineEntry will also be included in the complete range.
If the initial LineEntry this method is called on is a line #0, only the range of continuous LineEntries with line #0 will be included in the complete range.
[in] | include_inlined_functions | Whether to include inlined functions at the same line or not. |
Definition at line 192 of file LineEntry.cpp.
References lldb_private::SymbolContext::block, lldb_private::Address::CalculateSymbolContext(), lldb_private::AddressRange::Extend(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Block::GetContainingInlinedBlock(), lldb_private::Block::GetContainingInlinedBlockWithCallSite(), IsValid(), line, lldb_private::SymbolContext::line_entry, original_file, range, and lldb_private::Address::Slide().
Referenced by lldb_private::ThreadPlanStepRange::InRange(), lldb_private::Thread::QueueThreadPlanForStepInRange(), lldb_private::Thread::QueueThreadPlanForStepOverRange(), and lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
bool LineEntry::IsValid | ( | ) | const |
Check if a line entry object is valid.
Definition at line 46 of file LineEntry.cpp.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::IsValid(), line, LLDB_INVALID_LINE_NUMBER, and range.
Referenced by lldb_private::SymbolContextList::AppendIfUnique(), lldb_private::Address::CalculateSymbolContextLineEntry(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::FormatEntity::Format(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::CommandObjectDisassemble::GetCurrentLineRanges(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::SymbolContext::GetDescription(), lldb_private::Disassembler::GetFunctionDeclLineEntry(), lldb_private::SymbolContext::GetResolvedMask(), GetSameLineContiguousAddressRange(), lldb_private::StackFrame::GetStatus(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::StackFrame::HasDebugInformation(), lldb_private::ThreadPlanStepRange::InRange(), IsLineEntryValid(), CommandObjectSourceList::SourceInfo::IsValid(), lldb_private::Disassembler::PrintInstructions(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb::SBThread::StepOverUntil(), and lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
uint16_t lldb_private::LineEntry::column |
The column number of the source line, or zero if there is no column information.
Definition at line 146 of file LineEntry.h.
Referenced by Clear(), Compare(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), CommandObjectSourceList::DoExecute(), Dump(), OutputWriterCLI::DumpSegmentContext(), DumpStopContext(), lldb_private::Disassembler::ElideMixedSourceAndDisassemblyLine(), FileLineAndColumnMatches(), lldb_private::FormatEntity::Format(), GetDescription(), lldb_private::Address::GetDescription(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::StackFrame::GetStatus(), lldb_private::Disassembler::PrintInstructions(), and lldb_private::CompileUnit::ResolveSymbolContext().
FileSpec lldb_private::LineEntry::file |
The source file, possibly mapped by the target.source-map setting.
Definition at line 140 of file LineEntry.h.
Referenced by ApplyFileMappings(), Clear(), Compare(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), lldb_private::BreakpointResolverFileLine::DeduceSourceMapping(), CommandObjectSourceList::DisplayFunctionSource(), CommandObjectThreadJump::DoExecute(), Dump(), CommandObjectSourceInfo::DumpFileLinesInCompUnit(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), DumpStopContext(), lldb_private::Disassembler::ElideMixedSourceAndDisassemblyLine(), FileLineAndColumnMatches(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::FormatEntity::Format(), CommandObjectBreakpointSet::GetDefaultFile(), lldb_private::SourceManager::GetDefaultFileAndLine(), GetDescription(), lldb_private::Address::GetDescription(), lldb_private::Function::GetEndLineSourceInfo(), lldb_private::Disassembler::GetFunctionDeclLineEntry(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::Function::GetStartLineSourceInfo(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), CommandObjectSourceList::SourceInfo::operator<(), lldb_private::Disassembler::PrintInstructions(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame(), lldb_private::Thread::SetSelectedFrameByIndexNoisily(), and lldb::SBThread::StepOverUntil().
uint16_t lldb_private::LineEntry::is_epilogue_begin |
Indicates this entry is one (of possibly many) where execution should be suspended for an exit breakpoint of a function.
Definition at line 158 of file LineEntry.h.
Referenced by Clear(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), Dump(), and GetDescription().
uint16_t lldb_private::LineEntry::is_prologue_end |
Indicates this entry is one (of possibly many) where execution should be suspended for an entry breakpoint of a function.
Definition at line 155 of file LineEntry.h.
Referenced by Clear(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), Dump(), GetDescription(), and lldb_private::Function::GetPrologueByteSize().
uint16_t lldb_private::LineEntry::is_start_of_basic_block |
Indicates this entry is the beginning of a basic block.
Definition at line 152 of file LineEntry.h.
Referenced by Clear(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), Dump(), and GetDescription().
uint16_t lldb_private::LineEntry::is_start_of_statement |
Indicates this entry is the beginning of a statement.
Definition at line 150 of file LineEntry.h.
Referenced by Clear(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), Dump(), and GetDescription().
uint16_t lldb_private::LineEntry::is_terminal_entry |
Indicates this entry is that of the first byte after the end of a sequence of target machine instructions.
Definition at line 159 of file LineEntry.h.
Referenced by Clear(), Compare(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), Dump(), and GetDescription().
uint32_t lldb_private::LineEntry::line = LLDB_INVALID_LINE_NUMBER |
The source line number, or zero if there is no line number information.
Definition at line 143 of file LineEntry.h.
Referenced by Clear(), Compare(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), lldb_private::ThreadPlanShouldStopHere::DefaultShouldStopHereCallback(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), CommandObjectSourceList::DisplayFunctionSource(), CommandObjectThreadUntil::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectThreadJump::DoExecute(), Dump(), CommandObjectSourceInfo::DumpFileLinesInCompUnit(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), OutputWriterCLI::DumpSegmentContext(), DumpStopContext(), lldb_private::Disassembler::ElideMixedSourceAndDisassemblyLine(), FileLineAndColumnMatches(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::FormatEntity::Format(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::SourceManager::GetDefaultFileAndLine(), GetDescription(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::Address::GetDescription(), lldb_private::Function::GetEndLineSourceInfo(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::Symbol::GetPrologueByteSize(), lldb_private::Function::GetPrologueByteSize(), GetSameLineContiguousAddressRange(), lldb_private::Function::GetStartLineSourceInfo(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::ThreadPlanStepRange::InRange(), IsLineEntryValid(), IsValid(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), CommandObjectSourceList::SourceInfo::operator!=(), CommandObjectSourceList::SourceInfo::operator<(), CommandObjectSourceList::SourceInfo::operator==(), lldb_private::Disassembler::PrintInstructions(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame(), lldb_private::BreakpointResolver::SetSCMatchesByLine(), lldb_private::Thread::SetSelectedFrameByIndexNoisily(), and lldb_private::SymbolContextSpecifier::SymbolContextMatches().
FileSpec lldb_private::LineEntry::original_file |
The original source file, from debug info.
Definition at line 142 of file LineEntry.h.
Referenced by ApplyFileMappings(), Clear(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), lldb_private::LineTable::Dump(), lldb_private::Disassembler::GetFunctionDeclLineEntry(), lldb_private::SymbolContext::GetParentOfInlinedScope(), GetSameLineContiguousAddressRange(), lldb_private::ThreadPlanStepRange::InRange(), CommandObjectSourceList::SourceInfo::operator!=(), CommandObjectSourceList::SourceInfo::operator==(), lldb_private::Disassembler::PrintInstructions(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
AddressRange lldb_private::LineEntry::range |
The section offset address range for this line entry.
Definition at line 139 of file LineEntry.h.
Referenced by lldb_private::BreakpointResolver::AddLocation(), Clear(), Compare(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), CommandObjectThreadUntil::DoExecute(), CommandObjectSourceList::DoExecute(), Dump(), lldb_private::FormatEntity::Format(), lldb_private::StringSummaryFormat::FormatObject(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::CommandObjectDisassemble::GetCurrentLineRanges(), GetDescription(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::Symbol::GetPrologueByteSize(), lldb_private::Function::GetPrologueByteSize(), GetSameLineContiguousAddressRange(), lldb_private::ThreadPlanStepRange::InRange(), IsValid(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::AddressResolverFileLine::SearchCallback(), lldb_private::BreakpointResolver::SetSCMatchesByLine(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb::SBThread::StepInto(), and lldb::SBThread::StepOverUntil().