Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | #---------------------------------------------------------------------- |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 4 | # This module is designed to live inside the "lldb" python package |
| 5 | # in the "lldb.macosx" package. To use this in the embedded python |
| 6 | # interpreter using "lldb" just import it: |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 7 | # |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 8 | # (lldb) script import lldb.macosx.heap |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 9 | #---------------------------------------------------------------------- |
| 10 | |
| 11 | import lldb |
| 12 | import commands |
| 13 | import optparse |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 14 | import os |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 15 | import os.path |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 16 | import shlex |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 17 | import string |
| 18 | import tempfile |
Greg Clayton | ed3eee6 | 2012-04-25 01:49:50 +0000 | [diff] [blame] | 19 | import lldb.utils.symbolication |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 20 | |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 21 | g_libheap_dylib_dir = None |
| 22 | g_libheap_dylib_dict = dict() |
| 23 | |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 24 | def load_dylib(): |
| 25 | if lldb.target: |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 26 | global g_libheap_dylib_dir |
| 27 | global g_libheap_dylib_dict |
| 28 | triple = lldb.target.triple |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 29 | if triple in g_libheap_dylib_dict: |
| 30 | libheap_dylib_path = g_libheap_dylib_dict[triple] |
| 31 | else: |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 32 | if not g_libheap_dylib_dir: |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 33 | g_libheap_dylib_dir = tempfile.gettempdir() + '/lldb-dylibs' |
| 34 | triple_dir = g_libheap_dylib_dir + '/' + triple + '/' + __name__ |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 35 | if not os.path.exists(triple_dir): |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 36 | os.makedirs(triple_dir) |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 37 | libheap_dylib_path = triple_dir + '/libheap.dylib' |
| 38 | g_libheap_dylib_dict[triple] = libheap_dylib_path |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 39 | heap_code_directory = os.path.dirname(__file__) + '/heap' |
| 40 | heap_source_file = heap_code_directory + '/heap_find.cpp' |
| 41 | # Check if the dylib doesn't exist, or if "heap_find.cpp" is newer than the dylib |
| 42 | if not os.path.exists(libheap_dylib_path) or os.stat(heap_source_file).st_mtime > os.stat(libheap_dylib_path).st_mtime: |
| 43 | # Remake the dylib |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 44 | make_command = '(cd "%s" ; make EXE="%s" ARCH=%s)' % (heap_code_directory, libheap_dylib_path, string.split(triple, '-')[0]) |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 45 | # print make_command |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 46 | make_output = commands.getoutput(make_command) |
Greg Clayton | 4f76fef | 2012-04-25 21:23:07 +0000 | [diff] [blame] | 47 | # print make_output |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 48 | if os.path.exists(libheap_dylib_path): |
| 49 | libheap_dylib_spec = lldb.SBFileSpec(libheap_dylib_path) |
| 50 | if lldb.target.FindModule(libheap_dylib_spec): |
| 51 | return None # success, 'libheap.dylib' already loaded |
| 52 | if lldb.process: |
| 53 | state = lldb.process.state |
| 54 | if state == lldb.eStateStopped: |
| 55 | (libheap_dylib_path) |
| 56 | error = lldb.SBError() |
| 57 | image_idx = lldb.process.LoadImage(libheap_dylib_spec, error) |
| 58 | if error.Success(): |
| 59 | return None |
| 60 | else: |
| 61 | if error: |
| 62 | return 'error: %s' % error |
| 63 | else: |
| 64 | return 'error: "process load \'%s\'" failed' % libheap_dylib_spec |
| 65 | else: |
| 66 | return 'error: process is not stopped' |
| 67 | else: |
| 68 | return 'error: invalid process' |
| 69 | else: |
| 70 | return 'error: file does not exist "%s"' % libheap_dylib_path |
| 71 | else: |
| 72 | return 'error: invalid target' |
| 73 | |
| 74 | debugger.HandleCommand('process load "%s"' % libheap_dylib_path) |
| 75 | |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 76 | def add_common_options(parser): |
| 77 | parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='display verbose debug info', default=False) |
| 78 | parser.add_option('-o', '--po', action='store_true', dest='print_object_description', help='print the object descriptions for any matches', default=False) |
| 79 | parser.add_option('-m', '--memory', action='store_true', dest='memory', help='dump the memory for each matching block', default=False) |
| 80 | parser.add_option('-f', '--format', type='string', dest='format', help='the format to use when dumping memory if --memory is specified', default=None) |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 81 | parser.add_option('-s', '--stack', action='store_true', dest='stack', help='gets the stack that allocated each malloc block if MallocStackLogging is enabled', default=False) |
| 82 | #parser.add_option('-S', '--stack-history', action='store_true', dest='stack_history', help='gets the stack history for all allocations whose start address matches each malloc block if MallocStackLogging is enabled', default=False) |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 83 | |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 84 | def heap_search(options, arg_str): |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 85 | dylid_load_err = load_dylib() |
| 86 | if dylid_load_err: |
| 87 | print dylid_load_err |
| 88 | return |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 89 | expr = None |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 90 | arg_str_description = arg_str |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 91 | default_memory_format = "Y" # 'Y' is "bytes with ASCII" format |
| 92 | #memory_chunk_size = 1 |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 93 | if options.type == 'pointer': |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 94 | expr = 'find_pointer_in_heap((void *)%s)' % (arg_str) |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 95 | arg_str_description = 'malloc block containing pointer %s' % arg_str |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 96 | default_memory_format = "A" # 'A' is "address" format |
| 97 | #memory_chunk_size = lldb.process.GetAddressByteSize() |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 98 | elif options.type == 'cstr': |
| 99 | expr = 'find_cstring_in_heap("%s")' % arg_str |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 100 | arg_str_description = 'malloc block containing "%s"' % arg_str |
| 101 | elif options.type == 'addr': |
Greg Clayton | 1bcb26c | 2012-04-12 21:06:22 +0000 | [diff] [blame] | 102 | expr = 'find_block_for_address((void *)%s)' % arg_str |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 103 | arg_str_description = 'malloc block for %s' % arg_str |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 104 | else: |
| 105 | print 'error: invalid type "%s"\nvalid values are "pointer", "cstr"' % options.type |
| 106 | return |
| 107 | |
| 108 | expr_sbvalue = lldb.frame.EvaluateExpression (expr) |
| 109 | if expr_sbvalue.error.Success(): |
| 110 | if expr_sbvalue.unsigned: |
| 111 | match_value = lldb.value(expr_sbvalue) |
| 112 | i = 0 |
| 113 | while 1: |
| 114 | match_entry = match_value[i]; i += 1 |
| 115 | malloc_addr = match_entry.addr.sbvalue.unsigned |
| 116 | if malloc_addr == 0: |
| 117 | break |
| 118 | malloc_size = int(match_entry.size) |
| 119 | offset = int(match_entry.offset) |
| 120 | dynamic_value = match_entry.addr.sbvalue.GetDynamicValue(lldb.eDynamicCanRunTarget) |
| 121 | # If the type is still 'void *' then we weren't able to figure |
| 122 | # out a dynamic type for the malloc_addr |
| 123 | type_name = dynamic_value.type.name |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 124 | description = '[%u] %s: addr = 0x%x' % (i, arg_str_description, malloc_addr) |
| 125 | if offset != 0: |
| 126 | description += ' + %u' % (offset) |
| 127 | description += ', size = %u' % (malloc_size) |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 128 | if type_name == 'void *': |
| 129 | if options.type == 'pointer' and malloc_size == 4096: |
| 130 | error = lldb.SBError() |
| 131 | data = bytearray(lldb.process.ReadMemory(malloc_addr, 16, error)) |
| 132 | if data == '\xa1\xa1\xa1\xa1AUTORELEASE!': |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 133 | description += ', type = (AUTORELEASE!)' |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 134 | print description |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 135 | else: |
| 136 | description += ', type = %s' % (type_name) |
| 137 | derefed_dynamic_value = dynamic_value.deref |
| 138 | ivar_member = None |
| 139 | if derefed_dynamic_value: |
| 140 | derefed_dynamic_type = derefed_dynamic_value.type |
| 141 | member = derefed_dynamic_type.GetFieldAtIndex(0) |
| 142 | search_bases = False |
| 143 | if member: |
| 144 | if member.GetOffsetInBytes() <= offset: |
| 145 | for field_idx in range (derefed_dynamic_type.GetNumberOfFields()): |
| 146 | member = derefed_dynamic_type.GetFieldAtIndex(field_idx) |
| 147 | member_byte_offset = member.GetOffsetInBytes() |
| 148 | if member_byte_offset == offset: |
| 149 | ivar_member = member |
| 150 | break |
| 151 | else: |
| 152 | search_bases = True |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 153 | else: |
| 154 | search_bases = True |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 155 | |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 156 | if not ivar_member and search_bases: |
| 157 | for field_idx in range (derefed_dynamic_type.GetNumberOfDirectBaseClasses()): |
| 158 | member = derefed_dynamic_type.GetDirectBaseClassAtIndex(field_idx) |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 159 | member_byte_offset = member.GetOffsetInBytes() |
| 160 | if member_byte_offset == offset: |
| 161 | ivar_member = member |
| 162 | break |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 163 | if not ivar_member: |
| 164 | for field_idx in range (derefed_dynamic_type.GetNumberOfVirtualBaseClasses()): |
| 165 | member = derefed_dynamic_type.GetVirtualBaseClassAtIndex(field_idx) |
| 166 | member_byte_offset = member.GetOffsetInBytes() |
| 167 | if member_byte_offset == offset: |
| 168 | ivar_member = member |
| 169 | break |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 170 | if ivar_member: |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 171 | description +=', ivar = %s' % (ivar_member.name) |
| 172 | |
| 173 | print description |
| 174 | if derefed_dynamic_value: |
| 175 | print derefed_dynamic_value |
| 176 | if options.print_object_description: |
| 177 | desc = dynamic_value.GetObjectDescription() |
| 178 | if desc: |
| 179 | print ' (%s) 0x%x %s\n' % (type_name, malloc_addr, desc) |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 180 | if options.memory: |
| 181 | memory_format = options.format |
| 182 | if not memory_format: |
| 183 | memory_format = default_memory_format |
| 184 | cmd_result = lldb.SBCommandReturnObject() |
| 185 | #count = malloc_size / memory_chunk_size |
| 186 | memory_command = "memory read -f %s 0x%x 0x%x" % (memory_format, malloc_addr, malloc_addr + malloc_size) |
| 187 | lldb.debugger.GetCommandInterpreter().HandleCommand(memory_command, cmd_result) |
| 188 | print cmd_result.GetOutput() |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 189 | if options.stack: |
Greg Clayton | ed3eee6 | 2012-04-25 01:49:50 +0000 | [diff] [blame] | 190 | symbolicator = lldb.utils.symbolication.Symbolicator() |
Greg Clayton | b403a15 | 2012-04-21 00:11:26 +0000 | [diff] [blame] | 191 | symbolicator.target = lldb.target |
| 192 | expr_str = "g_stack_frames_count = sizeof(g_stack_frames)/sizeof(uint64_t); (int)__mach_stack_logging_get_frames((unsigned)mach_task_self(), 0x%xull, g_stack_frames, g_stack_frames_count, &g_stack_frames_count)" % (malloc_addr) |
| 193 | #print expr_str |
| 194 | expr = lldb.frame.EvaluateExpression (expr_str); |
| 195 | expr_error = expr.GetError() |
| 196 | if expr_error.Success(): |
| 197 | err = expr.unsigned |
| 198 | if err: |
| 199 | print 'error: __mach_stack_logging_get_frames() returned error %i' % (err) |
| 200 | else: |
| 201 | count_expr = lldb.frame.EvaluateExpression ("g_stack_frames_count") |
| 202 | count = count_expr.unsigned |
| 203 | #print 'g_stack_frames_count is %u' % (count) |
| 204 | if count > 0: |
| 205 | frame_idx = 0 |
| 206 | frames_expr = lldb.value(lldb.frame.EvaluateExpression ("g_stack_frames")) |
| 207 | done = False |
| 208 | for stack_frame_idx in range(count): |
| 209 | if not done: |
| 210 | frame_load_addr = int(frames_expr[stack_frame_idx]) |
| 211 | if frame_load_addr >= 0x1000: |
| 212 | frames = symbolicator.symbolicate(frame_load_addr) |
| 213 | if frames: |
| 214 | for frame in frames: |
| 215 | print '[%3u] %s' % (frame_idx, frame) |
| 216 | frame_idx += 1 |
| 217 | else: |
| 218 | print '[%3u] 0x%x' % (frame_idx, frame_load_addr) |
| 219 | frame_idx += 1 |
| 220 | else: |
| 221 | done = True |
| 222 | else: |
| 223 | print 'error: %s' % (expr_error) |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 224 | else: |
| 225 | print '%s %s was not found in any malloc blocks' % (options.type, arg_str) |
| 226 | else: |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 227 | print expr_sbvalue.error |
| 228 | print |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 229 | |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 230 | def ptr_refs(debugger, command, result, dict): |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 231 | command_args = shlex.split(command) |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 232 | usage = "usage: %prog [options] <PTR> [PTR ...]" |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 233 | description='''Searches the heap for pointer references on darwin user space programs. |
| 234 | |
| 235 | Any matches that were found will dump the malloc blocks that contain the pointers |
| 236 | and might be able to print what kind of objects the pointers are contained in using |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 237 | dynamic type information in the program.''' |
| 238 | parser = optparse.OptionParser(description=description, prog='ptr_refs',usage=usage) |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 239 | add_common_options(parser) |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 240 | try: |
| 241 | (options, args) = parser.parse_args(command_args) |
| 242 | except: |
| 243 | return |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 244 | |
| 245 | options.type = 'pointer' |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 246 | |
| 247 | if args: |
| 248 | |
| 249 | for data in args: |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 250 | heap_search (options, data) |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 251 | else: |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 252 | print 'error: no pointer arguments were given' |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 253 | |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 254 | def cstr_refs(debugger, command, result, dict): |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 255 | command_args = shlex.split(command) |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 256 | usage = "usage: %prog [options] <CSTR> [CSTR ...]" |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 257 | description='''Searches the heap for C string references on darwin user space programs. |
| 258 | |
| 259 | Any matches that were found will dump the malloc blocks that contain the C strings |
| 260 | and might be able to print what kind of objects the pointers are contained in using |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 261 | dynamic type information in the program.''' |
| 262 | parser = optparse.OptionParser(description=description, prog='cstr_refs',usage=usage) |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 263 | add_common_options(parser) |
Greg Clayton | 7fb671b | 2012-04-11 18:30:53 +0000 | [diff] [blame] | 264 | try: |
| 265 | (options, args) = parser.parse_args(command_args) |
| 266 | except: |
| 267 | return |
| 268 | |
| 269 | options.type = 'cstr' |
| 270 | |
| 271 | if args: |
| 272 | |
| 273 | for data in args: |
| 274 | heap_search (options, data) |
| 275 | else: |
| 276 | print 'error: no c string arguments were given to search for' |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 277 | |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 278 | def malloc_info(debugger, command, result, dict): |
| 279 | command_args = shlex.split(command) |
| 280 | usage = "usage: %prog [options] <ADDR> [ADDR ...]" |
| 281 | description='''Searches the heap a malloc block that contains the addresses specified as arguments. |
| 282 | |
| 283 | Any matches that were found will dump the malloc blocks that match or contain |
| 284 | the specified address. The matching blocks might be able to show what kind |
| 285 | of objects they are using dynamic type information in the program.''' |
| 286 | parser = optparse.OptionParser(description=description, prog='cstr_refs',usage=usage) |
Greg Clayton | d84bb48 | 2012-04-13 16:24:09 +0000 | [diff] [blame] | 287 | add_common_options(parser) |
Greg Clayton | 7767716 | 2012-04-12 18:57:36 +0000 | [diff] [blame] | 288 | try: |
| 289 | (options, args) = parser.parse_args(command_args) |
| 290 | except: |
| 291 | return |
| 292 | |
| 293 | options.type = 'addr' |
| 294 | |
| 295 | if args: |
| 296 | |
| 297 | for data in args: |
| 298 | heap_search (options, data) |
| 299 | else: |
| 300 | print 'error: no c string arguments were given to search for' |
| 301 | |
Greg Clayton | d712ef0 | 2012-04-25 18:40:20 +0000 | [diff] [blame] | 302 | if __name__ == '__main__': |
| 303 | lldb.debugger = lldb.SBDebugger.Create() |
| 304 | |
| 305 | # This initializer is being run from LLDB in the embedded command interpreter |
| 306 | # Add any commands contained in this module to LLDB |
| 307 | lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.ptr_refs ptr_refs') |
| 308 | lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.cstr_refs cstr_refs') |
| 309 | lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.malloc_info malloc_info') |
| 310 | print '"ptr_refs", "cstr_refs", and "malloc_info" commands have been installed, use the "--help" options on these commands for detailed help.' |
Greg Clayton | 804de01 | 2012-04-11 16:27:06 +0000 | [diff] [blame] | 311 | |
| 312 | |
| 313 | |
| 314 | |