1# to activate the AOO-LLDB helper script type the line below into LLDB 2# command script import path-to-script/lldb4aoo.py 3# or activate it automatically by adding the line to ~/.lldbinit 4 5def __lldb_init_module( dbg, dict): 6 # the list of AOO specific types 7 aoo_types = ['rtl_String', 'rtl_uString', '_ByteStringData', '_UniStringData'] 8 pimpl_types = ['rtl::OString', 'rtl::OUString', 'ByteString', 'UniString'] 9 # register a helper function for each non-trivial type 10 for t in aoo_types: 11 f = 'getinfo_for_' + t.replace( '::', '_') 12 if f in globals(): 13 dbg.HandleCommand( 'type summary add %s -v -C yes -F %s.%s' % (t,__name__,f)) 14 else: 15 print( 'AOO-LLDB helper function "%s" is not yet defined: ' 16 '"%s" types cannot be displayed properly!' % (f,t)) 17 # register a generic helper function for pimpl types 18 dbg.HandleCommand( 'type summary add -F %s.%s -v -C yes -n PIMPL %s' % ( __name__,'get_pimpl_info', ' '.join(pimpl_types))) 19
| 1# to activate the AOO-LLDB helper script type the line below into LLDB 2# command script import path-to-script/lldb4aoo.py 3# or activate it automatically by adding the line to ~/.lldbinit 4 5def __lldb_init_module( dbg, dict): 6 # the list of AOO specific types 7 aoo_types = ['rtl_String', 'rtl_uString', '_ByteStringData', '_UniStringData'] 8 pimpl_types = ['rtl::OString', 'rtl::OUString', 'ByteString', 'UniString'] 9 # register a helper function for each non-trivial type 10 for t in aoo_types: 11 f = 'getinfo_for_' + t.replace( '::', '_') 12 if f in globals(): 13 dbg.HandleCommand( 'type summary add %s -v -C yes -F %s.%s' % (t,__name__,f)) 14 else: 15 print( 'AOO-LLDB helper function "%s" is not yet defined: ' 16 '"%s" types cannot be displayed properly!' % (f,t)) 17 # register a generic helper function for pimpl types 18 dbg.HandleCommand( 'type summary add -F %s.%s -v -C yes -n PIMPL %s' % ( __name__,'get_pimpl_info', ' '.join(pimpl_types))) 19
|