History log of /external/lldb/test/python_api/function_symbol/main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
51ed1b614f2c2b6970f50296d7d41c9de2c30ff4 03-Mar-2011 Johnny Chen <johnny.chen@apple.com> Add TestDisasmAPI.py which exercises the newly added SBFunction/SBSymbol.GetStartAddress(),
among other things:

// When stopped on breakppint 1, we can get the line entry using SBFrame API
// SBFrame.GetLineEntry(). We'll get the start address for the the line entry
// with the SBAddress type, resolve the symbol context using the SBTarget API
// SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol.
//
// We then stop at breakpoint 2, get the SBFrame, and the the SBFunction object.
//
// The address from calling GetStartAddress() on the symbol and the function
// should point to the same address, and we also verify that.

And add one utility function disassemble(target, function_or_symbol) to lldbutil.py:

"""Disassemble the function or symbol given a target.

It returns the disassembly content in a string object.
"""

TestDisasm.py uses the disassemble() function to do disassembly on the SBSymbol, and
then the SBFunction object.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/test/python_api/function_symbol/main.c