]> git.saurik.com Git - apple/system_cmds.git/blob - zlog.tproj/SymbolicationHelper.h
system_cmds-880.40.5.tar.gz
[apple/system_cmds.git] / zlog.tproj / SymbolicationHelper.h
1 //
2 // SymbolicationHelper.h
3 // zlog
4 //
5 // Created by Rasha Eqbal on 2/26/18.
6 //
7
8 #ifndef SymbolicationHelper_h
9 #define SymbolicationHelper_h
10
11 #include <CoreFoundation/CoreFoundation.h>
12 #include <CoreSymbolication/CoreSymbolication.h>
13
14 /*
15 * Call this function on each address that needs to be symbolicated.
16 *
17 * sym: The CSSymbolicatorRef which will be used for symbolication. For example, to symbolicate
18 * kernel addresses create a CSSymbolicatorRef by calling CSSymbolicatorCreateWithMachKernel().
19 * addr: The address that needs to be symbolicated.
20 * binaryImages: The dictionary that aggregates binary image info for offline symbolication.
21 */
22 void PrintSymbolicatedAddress(CSSymbolicatorRef sym, mach_vm_address_t addr, CFMutableDictionaryRef binaryImages);
23
24 /*
25 * Call this function to dump binary image info required for offline symbolication.
26 *
27 * binaryImages: The dictionary that stores this info.
28 *
29 * The preferred way to use this is to create a CFMutableDictionaryRef with a call to CFDictionaryCreateMutable()
30 * and pass it in to PrintSymbolicatedAddress() when symbolicating addresses. This will auto-populate the dictionary,
31 * which just needs to be passed in here to print the relevant information.
32 */
33 void PrintBinaryImagesInfo(CFMutableDictionaryRef binaryImages);
34
35 #endif /* SymbolicationHelper_h */