[heap.py] Add missing declaration for malloc_get_all_zones
authorVedant Kumar <vsk@apple.com>
Thu, 22 Aug 2019 18:51:03 +0000 (18:51 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 22 Aug 2019 18:51:03 +0000 (18:51 +0000)
The evaluation context isn't guaranteed to have this declaration.

Fixes "error: use of undeclared identifier 'malloc_get_all_zones'" bugs.

llvm-svn: 369684

lldb/examples/darwin/heap_find/heap.py

index 0c8744ff15f4c65ee4e25b0fcb1ff9d953d4f09c..7753d3ab74b0a4031c61596cfc5abbd1c27c13cb 100644 (file)
@@ -129,6 +129,7 @@ typedef struct malloc_zone_t {
     void *reserved1[12];
     struct malloc_introspection_t      *introspect;
 } malloc_zone_t;
+kern_return_t malloc_get_all_zones(task_t task, memory_reader_t reader, vm_address_t **addresses, unsigned *count);
 memory_reader_t task_peek = [](task_t task, vm_address_t remote_address, vm_size_t size, void **local_memory) -> kern_return_t {
     *local_memory = (void*) remote_address;
     return KERN_SUCCESS;