From 8f7180b11e024406e50ed53e27c95af461e6ec4d Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 26 Sep 2011 07:11:27 +0000 Subject: Added more functionality to the public API to allow for better symbolication. Also improved the SBInstruction API to allow access to the instruction opcode name, mnemonics, comment and instruction data. Added the ability to edit SBLineEntry objects (change the file, line and column), and also allow SBSymbolContext objects to be modified (set module, comp unit, function, block, line entry or symbol). The SymbolContext and SBSymbolContext can now generate inlined call stack infomration for symbolication much easier using the SymbolContext::GetParentInlinedFrameInfo(...) and SBSymbolContext::GetParentInlinedFrameInfo(...) methods. llvm-svn: 140518 --- lldb/scripts/Python/interface/SBBlock.i | 16 ++++++++++++++++ lldb/scripts/Python/interface/SBInstruction.i | 12 ++++++++++++ lldb/scripts/Python/interface/SBLineEntry.i | 10 ++++++++++ lldb/scripts/Python/interface/SBSymbolContext.i | 25 +++++++++++++++++++------ 4 files changed, 57 insertions(+), 6 deletions(-) (limited to 'lldb/scripts/Python') diff --git a/lldb/scripts/Python/interface/SBBlock.i b/lldb/scripts/Python/interface/SBBlock.i index ec11fc1f00c..83895edcc06 100644 --- a/lldb/scripts/Python/interface/SBBlock.i +++ b/lldb/scripts/Python/interface/SBBlock.i @@ -63,6 +63,10 @@ public: lldb::SBBlock GetParent (); + %feature("docstring", "Get the inlined block that is or contains this block.") GetContainingInlinedBlock; + lldb::SBBlock + GetContainingInlinedBlock (); + %feature("docstring", "Get the sibling block for this block.") GetSibling; lldb::SBBlock GetSibling (); @@ -70,6 +74,18 @@ public: %feature("docstring", "Get the first child block.") GetFirstChild; lldb::SBBlock GetFirstChild (); + + uint32_t + GetNumRanges (); + + lldb::SBAddress + GetRangeStartAddress (uint32_t idx); + + lldb::SBAddress + GetRangeEndAddress (uint32_t idx); + + uint32_t + GetRangeIndexForBlockAddress (lldb::SBAddress block_addr); bool GetDescription (lldb::SBStream &description); diff --git a/lldb/scripts/Python/interface/SBInstruction.i b/lldb/scripts/Python/interface/SBInstruction.i index 1a9fc205258..cf82ad9e4d6 100644 --- a/lldb/scripts/Python/interface/SBInstruction.i +++ b/lldb/scripts/Python/interface/SBInstruction.i @@ -30,6 +30,18 @@ public: SBAddress GetAddress(); + const char * + GetOpcodeName (lldb::SBTarget target); + + const char * + GetMnemonics (lldb::SBTarget target); + + const char * + GetComment (lldb::SBTarget target); + + lldb::SBData + GetData (lldb::SBTarget target); + size_t GetByteSize (); diff --git a/lldb/scripts/Python/interface/SBLineEntry.i b/lldb/scripts/Python/interface/SBLineEntry.i index 4e2968d0b39..e1631e91d48 100644 --- a/lldb/scripts/Python/interface/SBLineEntry.i +++ b/lldb/scripts/Python/interface/SBLineEntry.i @@ -67,6 +67,16 @@ public: bool GetDescription (lldb::SBStream &description); + + void + SetFileSpec (lldb::SBFileSpec filespec); + + void + SetLine (uint32_t line); + + void + SetColumn (uint32_t column); + }; } // namespace lldb diff --git a/lldb/scripts/Python/interface/SBSymbolContext.i b/lldb/scripts/Python/interface/SBSymbolContext.i index c8ef8eb60ab..00d80da9892 100644 --- a/lldb/scripts/Python/interface/SBSymbolContext.i +++ b/lldb/scripts/Python/interface/SBSymbolContext.i @@ -58,12 +58,25 @@ public: bool IsValid () const; - SBModule GetModule (); - SBCompileUnit GetCompileUnit (); - SBFunction GetFunction (); - SBBlock GetBlock (); - SBLineEntry GetLineEntry (); - SBSymbol GetSymbol (); + lldb::SBModule GetModule (); + lldb::SBCompileUnit GetCompileUnit (); + lldb::SBFunction GetFunction (); + lldb::SBBlock GetBlock (); + lldb::SBLineEntry GetLineEntry (); + lldb::SBSymbol GetSymbol (); + + void SetModule (lldb::SBModule module); + void SetCompileUnit (lldb::SBCompileUnit compile_unit); + void SetFunction (lldb::SBFunction function); + void SetBlock (lldb::SBBlock block); + void SetLineEntry (lldb::SBLineEntry line_entry); + void SetSymbol (lldb::SBSymbol symbol); + + lldb::SBSymbolContext + GetParentInlinedFrameInfo (const lldb::SBAddress &curr_frame_pc, + bool is_concrete_frame, + lldb::SBAddress &parent_frame_addr) const; + bool GetDescription (lldb::SBStream &description); -- cgit v1.2.3