aboutsummaryrefslogtreecommitdiffstats
path: root/system_cmds/gcore.tproj
diff options
context:
space:
mode:
Diffstat (limited to 'system_cmds/gcore.tproj')
-rw-r--r--system_cmds/gcore.tproj/Makefile9
-rw-r--r--system_cmds/gcore.tproj/convert.c4
-rw-r--r--system_cmds/gcore.tproj/corefile.c1
-rw-r--r--system_cmds/gcore.tproj/dyld.c1
-rw-r--r--system_cmds/gcore.tproj/main.c1
-rw-r--r--system_cmds/gcore.tproj/sparse.c1
-rw-r--r--system_cmds/gcore.tproj/threads.c1
-rw-r--r--system_cmds/gcore.tproj/utils.c1
-rw-r--r--system_cmds/gcore.tproj/vanilla.c1
-rw-r--r--system_cmds/gcore.tproj/vm.c2
10 files changed, 21 insertions, 1 deletions
diff --git a/system_cmds/gcore.tproj/Makefile b/system_cmds/gcore.tproj/Makefile
new file mode 100644
index 0000000..78b3db6
--- /dev/null
+++ b/system_cmds/gcore.tproj/Makefile
@@ -0,0 +1,9 @@
+PROG= gcore
+MAN= gcore-internal.1 gcore.1
+SRCS= convert.c corefile.c dyld_shared_cache.c \
+ dyld.c main.c sparse.c threads.c utils.c \
+ vanilla.c vm.c
+
+LDADD+=-lutil -lcompression
+
+.include <bsd.prog.mk>
diff --git a/system_cmds/gcore.tproj/convert.c b/system_cmds/gcore.tproj/convert.c
index b945733..5e38244 100644
--- a/system_cmds/gcore.tproj/convert.c
+++ b/system_cmds/gcore.tproj/convert.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "convert.h"
#include "corefile.h"
#include "vanilla.h"
@@ -29,7 +30,8 @@
#include <spawn.h>
#include <signal.h>
#include <xpc/xpc.h>
-#include <xpc/private.h>
+/* Declare xpc_create_from_plist manually because xpc/private.h is closed source */
+xpc_object_t xpc_create_from_plist(void *data, size_t size);
#include <sys/event.h>
#include <sys/time.h>
diff --git a/system_cmds/gcore.tproj/corefile.c b/system_cmds/gcore.tproj/corefile.c
index b1e4421..8e61ca6 100644
--- a/system_cmds/gcore.tproj/corefile.c
+++ b/system_cmds/gcore.tproj/corefile.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016-2018 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "corefile.h"
#include "sparse.h"
diff --git a/system_cmds/gcore.tproj/dyld.c b/system_cmds/gcore.tproj/dyld.c
index 92aeac1..5ef9899 100644
--- a/system_cmds/gcore.tproj/dyld.c
+++ b/system_cmds/gcore.tproj/dyld.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "dyld.h"
#include "utils.h"
diff --git a/system_cmds/gcore.tproj/main.c b/system_cmds/gcore.tproj/main.c
index abefa14..b20e721 100644
--- a/system_cmds/gcore.tproj/main.c
+++ b/system_cmds/gcore.tproj/main.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "utils.h"
#include "corefile.h"
diff --git a/system_cmds/gcore.tproj/sparse.c b/system_cmds/gcore.tproj/sparse.c
index c62b9f3..616eedf 100644
--- a/system_cmds/gcore.tproj/sparse.c
+++ b/system_cmds/gcore.tproj/sparse.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "vm.h"
#include "region.h"
diff --git a/system_cmds/gcore.tproj/threads.c b/system_cmds/gcore.tproj/threads.c
index b1b3d6f..f47cbfd 100644
--- a/system_cmds/gcore.tproj/threads.c
+++ b/system_cmds/gcore.tproj/threads.c
@@ -2,6 +2,7 @@
* Copyright (c) 2015 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "utils.h"
#include "threads.h"
diff --git a/system_cmds/gcore.tproj/utils.c b/system_cmds/gcore.tproj/utils.c
index f0edcf8..8706b6e 100644
--- a/system_cmds/gcore.tproj/utils.c
+++ b/system_cmds/gcore.tproj/utils.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "utils.h"
#include "region.h"
diff --git a/system_cmds/gcore.tproj/vanilla.c b/system_cmds/gcore.tproj/vanilla.c
index 2253bff..46b91b5 100644
--- a/system_cmds/gcore.tproj/vanilla.c
+++ b/system_cmds/gcore.tproj/vanilla.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "vm.h"
#include "region.h"
diff --git a/system_cmds/gcore.tproj/vm.c b/system_cmds/gcore.tproj/vm.c
index 22b0efe..0504f51 100644
--- a/system_cmds/gcore.tproj/vm.c
+++ b/system_cmds/gcore.tproj/vm.c
@@ -2,6 +2,7 @@
* Copyright (c) 2016 Apple Inc. All rights reserved.
*/
+typedef char *kobject_description_t[512];
#include "options.h"
#include "vm.h"
#include "utils.h"
@@ -16,6 +17,7 @@
#include <stdbool.h>
#include <assert.h>
#include <sys/queue.h>
+#include <machine/cpu_capabilities.h>
/*
* There should be better APIs to describe the shared region