From b2115cf81a981c6e6d30fcd6e51d2b04f68e675f Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 18 Nov 2014 05:43:11 +0000 Subject: [PATCH] Add documentation for the SBTarget::ReadInstructions and SBTarget::GetInstructions APIs so it's a little clearer to understand which should be used. llvm-svn: 222225 --- lldb/scripts/Python/interface/SBTarget.i | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index e44bc6e..0237dd5 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -868,16 +868,41 @@ public: lldb::SBValue CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type); - + + %feature("docstring", " + Disassemble a specified number of instructions starting at an address. + Parameters: + base_addr -- the address to start disassembly from + count -- the number of instructions to disassemble + flavor_string -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly + Returns an SBInstructionList.") + ReadInstructions; lldb::SBInstructionList ReadInstructions (lldb::SBAddress base_addr, uint32_t count); lldb::SBInstructionList ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string); + %feature("docstring", " + Disassemble the bytes in a buffer and return them in an SBInstructionList. + Parameters: + base_addr -- used for symbolicating the offsets in the byte stream when disassembling + buf -- bytes to be disassembled + size -- (C++) size of the buffer + Returns an SBInstructionList.") + GetInstructions; lldb::SBInstructionList GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size); - + + %feature("docstring", " + Disassemble the bytes in a buffer and return them in an SBInstructionList, with a supplied flavor. + Parameters: + base_addr -- used for symbolicating the offsets in the byte stream when disassembling + flavor -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly + buf -- bytes to be disassembled + size -- (C++) size of the buffer + Returns an SBInstructionList.") + GetInstructionsWithFlavor; lldb::SBInstructionList GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size); -- 2.7.4