teak-llvm/lldb/scripts/Python/interface
Johnny Chen c44e20cec0 Migrate the in_range(symbol, section) and symbol_iter(module, section) utility functions
from lldbutil.py to the lldb.py proper.  The in_range() function becomes a function in
the lldb module.  And the symbol_iter() function becomes a method within the SBModule
called symbol_in_section_iter().  Example:

        # Iterates the text section and prints each symbols within each sub-section.
        for subsec in text_sec:
            print INDENT + repr(subsec)
            for sym in exe_module.symbol_in_section_iter(subsec):
                print INDENT2 + repr(sym)
                print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType())

might produce this following output:

    [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
        id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
        symbol type: code
        id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0)
        symbol type: code
        id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c)
        symbol type: code
        id = {0x00000023}, name = 'start', address = 0x0000000100001780
        symbol type: code
    [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
        id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62)
        symbol type: trampoline
        id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68)
        symbol type: trampoline
        id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e)
        symbol type: trampoline
        id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74)
        symbol type: trampoline
        id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a)
        symbol type: trampoline
        id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80)
        symbol type: trampoline
        id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86)
        symbol type: trampoline
        id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c)
        symbol type: trampoline
        id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92)
        symbol type: trampoline
        id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98)
        symbol type: trampoline
        id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e)
        symbol type: trampoline
        id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4)
        symbol type: trampoline
    [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
    [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
    [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
    [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame

llvm-svn: 140830
2011-09-30 00:42:49 +00:00
..
SBAddress.i Added to the public API to allow symbolication: 2011-09-24 00:52:29 +00:00
SBBlock.i Added more functionality to the public API to allow for better 2011-09-26 07:11:27 +00:00
SBBreakpoint.i Add SWIG Python interface files for SBLineEntry, SBListener, and SBModule. 2011-07-18 23:11:07 +00:00
SBBreakpointLocation.i Add SWIG Python interface files for SBAddress, SBBlock, SBBreakpoint, and SBBreakpointLocation. 2011-07-18 21:30:21 +00:00
SBBroadcaster.i Add docstring for SBBroadcaster class. 2011-07-20 22:29:58 +00:00
SBCommandInterpreter.i Add a new breakpoint type "break by source regular expression". 2011-09-21 01:17:13 +00:00
SBCommandReturnObject.i Changes to Python commands: 2011-08-16 23:24:13 +00:00
SBCommunication.i Move the rest of the SB headers to interface files. 2011-07-19 22:41:47 +00:00
SBCompileUnit.i Added the ability to restrict breakpoints by function name, function regexp, selector 2011-09-23 00:54:11 +00:00
SBData.i Added the ability to get all section contents, or the section 2011-09-24 05:04:40 +00:00
SBDebugger.i Added to the public API to allow symbolication: 2011-09-24 00:52:29 +00:00
SBError.i Add some docstrings for SBError class. 2011-07-20 00:23:11 +00:00
SBEvent.i Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent. 2011-07-18 22:11:53 +00:00
SBFileSpec.i Add some docstrings for SBFileSpec class. 2011-07-20 01:06:37 +00:00
SBFileSpecList.i Added the ability to restrict breakpoints by function name, function regexp, selector 2011-09-23 00:54:11 +00:00
SBFrame.i Add an SB API SBFrame::WatchValue() and exported to the Python interface to 2011-09-24 00:50:33 +00:00
SBFunction.i Missed the interface file for SBFunction in the previous checkin. 2011-07-18 22:15:37 +00:00
SBHostOS.i Move the rest of the SB headers to interface files. 2011-07-19 22:41:47 +00:00
SBInputReader.i Move the rest of the SB headers to interface files. 2011-07-19 22:41:47 +00:00
SBInstruction.i Fixed the public and internal disassembler API to be named correctly: 2011-09-27 00:58:45 +00:00
SBInstructionList.i Change docstring wording: from 'method' to 'function'. 2011-07-21 00:50:54 +00:00
SBLineEntry.i Added more functionality to the public API to allow for better 2011-09-26 07:11:27 +00:00
SBListener.i Add SWIG Python interface files for SBLineEntry, SBListener, and SBModule. 2011-07-18 23:11:07 +00:00
SBModule.i Migrate the in_range(symbol, section) and symbol_iter(module, section) utility functions 2011-09-30 00:42:49 +00:00
SBProcess.i Add SWIG Python interface files for SBProcess, SBThread, and SBFrame. 2011-07-18 20:13:38 +00:00
SBSection.i Added the ability to get all section contents, or the section 2011-09-24 05:04:40 +00:00
SBSourceManager.i Add some docstrings for SBSourceManager class. 2011-07-19 23:35:10 +00:00
SBStream.i Add some docstrings for SBStream class. 2011-07-19 23:24:36 +00:00
SBStringList.i Move the rest of the SB headers to interface files. 2011-07-19 22:41:47 +00:00
SBSymbol.i Add SWIG interface files for SBSymbol, SBSymbolContext, and SBSymbolContextList. 2011-07-19 01:07:06 +00:00
SBSymbolContext.i Added more functionality to the public API to allow for better 2011-09-26 07:11:27 +00:00
SBSymbolContextList.i Add SWIG interface files for SBSymbol, SBSymbolContext, and SBSymbolContextList. 2011-07-19 01:07:06 +00:00
SBTarget.i Add SBTarget::GetLastCreatedWatchpointLocation() API and export to the Python interface. 2011-09-27 20:29:45 +00:00
SBThread.i Add SWIG Python interface files for SBProcess, SBThread, and SBFrame. 2011-07-18 20:13:38 +00:00
SBType.i Added the ability to introspect types thourgh the public SBType interface. 2011-09-09 23:04:00 +00:00
SBValue.i Added the ability to introspect types thourgh the public SBType interface. 2011-09-09 23:04:00 +00:00
SBValueList.i Add SWIG Python interface files for SBProcess, SBThread, and SBFrame. 2011-07-18 20:13:38 +00:00
SBWatchpointLocation.i Export the watchpoint related API (SBWatchpointLocation class and added SBTarget methods) 2011-09-27 01:19:20 +00:00