]> git.saurik.com Git - apple/system_cmds.git/blob - gcore.tproj/options.h
system_cmds-735.50.6.tar.gz
[apple/system_cmds.git] / gcore.tproj / options.h
1 /*
2 * Copyright (c) 2016 Apple Inc. All rights reserved.
3 */
4
5 #include <sys/types.h>
6 #include <compression.h>
7
8 #include <assert.h>
9
10 #ifndef _OPTIONS_H
11 #define _OPTIONS_H
12
13 #if defined(__arm__) || defined(__arm64__)
14 #define RDAR_23744374 1 /* 'true' while not fixed i.e. enable workarounds */
15 #endif
16
17 #define CONFIG_REFSC 1 /* create shared cache reference segment (-R) */
18 //#define CONFIG_PURGABLE 1 /* record purgability */
19 //#define CONFIG_SUBMAP 1 /* include submaps (debugging) */
20
21 #ifdef NDEBUG
22 #define poison(a, p, s) /* do nothing */
23 #else
24 #define poison(a, p, s) memset(a, p, s) /* scribble on dying memory */
25 #endif
26
27 struct options {
28 int corpse; // dump from a corpse
29 int suspend; // suspend while dumping
30 int preserve; // preserve the core file, even if there are errors
31 int verbose; // be chatty
32 int debug; // internal debugging: options accumulate. very noisy.
33 int dryrun; // do all the work, but throw the dump away
34 int sparse; // use dyld's data about dylibs to reduce the size of the dump
35 off_t sizebound; // maximum size of the dump
36 int coreinfo; // create a (currently experimental) 'coreinfo' section
37 #ifdef CONFIG_REFSC
38 int scfileref; // create "reference" segments that point at the shared cache
39 #endif
40 int compress; // compress the dump
41 size_t chunksize; // max size of the compressed segment
42 compression_algorithm calgorithm; // algorithm in use
43 };
44
45 extern const struct options *opt;
46
47 #endif /* _OPTIONS_H */