brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 21181a8 Raw
57 lines · plain
1%feature("docstring",2"A section + offset based address class.3 4The SBAddress class allows addresses to be relative to a section5that can move during runtime due to images (executables, shared6libraries, bundles, frameworks) being loaded at different7addresses than the addresses found in the object file that8represents them on disk. There are currently two types of addresses9for a section:10 11* file addresses12* load addresses13 14File addresses represents the virtual addresses that are in the 'on15disk' object files. These virtual addresses are converted to be16relative to unique sections scoped to the object file so that17when/if the addresses slide when the images are loaded/unloaded18in memory, we can easily track these changes without having to19update every object (compile unit ranges, line tables, function20address ranges, lexical block and inlined subroutine address21ranges, global and static variables) each time an image is loaded or22unloaded.23 24Load addresses represents the virtual addresses where each section25ends up getting loaded at runtime. Before executing a program, it26is common for all of the load addresses to be unresolved. When a27DynamicLoader plug-in receives notification that shared libraries28have been loaded/unloaded, the load addresses of the main executable29and any images (shared libraries) will be  resolved/unresolved. When30this happens, breakpoints that are in one of these sections can be31set/cleared.32 33See docstring of SBFunction for example usage of SBAddress."34) lldb::SBAddress;35 36%feature("docstring", "37    Create an address by resolving a load address using the supplied target.")38lldb::SBAddress::SBAddress;39 40%feature("docstring", "41    GetSymbolContext() and the following can lookup symbol information for a given address.42    An address might refer to code or data from an existing module, or it43    might refer to something on the stack or heap. The following functions44    will only return valid values if the address has been resolved to a code45    or data address using :py:class:`SBAddress.SetLoadAddress' or46    :py:class:`SBTarget.ResolveLoadAddress`.") lldb::SBAddress::GetSymbolContext;47 48%feature("docstring", "49    GetModule() and the following grab individual objects for a given address and50    are less efficient if you want more than one symbol related objects.51    Use :py:class:`SBAddress.GetSymbolContext` or52    :py:class:`SBTarget.ResolveSymbolContextForAddress` when you want multiple53    debug symbol related objects for an address.54    One or more bits from the SymbolContextItem enumerations can be logically55    OR'ed together to more efficiently retrieve multiple symbol objects.")56lldb::SBAddress::GetModule;57