 +# also simplifies relocation in DR
 +# set(DynamoRIO_USE_LIBC OFF)
 +
-+add_library(drsigil SHARED drsigil.c drsigil_instrument.c drsigil_ipc.c drsigil_parser.c)
++add_library(drsigil SHARED drsigil.c instrument.c ipc.c parser.c)
 +find_package(DynamoRIO)
 +if (NOT DynamoRIO_FOUND)
 +  message(FATAL_ERROR "DynamoRIO package required to build")

From a0c5d5a06440a6a4cbb0c52b09f869ea5df8d128 Mon Sep 17 00:00:00 2001
From: Mike Lui <mike.d.lui@gmail.com>
Date: Thu, 20 Jul 2017 14:29:46 -0400
Subject: [PATCH] patch

---
 clients/drsigil/CMakeLists.txt         |  27 ++
 clients/drsigil/drsigil.c              | 259 ++++++++++++++
 clients/drsigil/drsigil.h              | 301 +++++++++++++++++
 clients/drsigil/drsigil_instrument.c   | 602 +++++++++++++++++++++++++++++++++
 clients/drsigil/drsigil_ipc.c          | 376 ++++++++++++++++++++
 clients/drsigil/drsigil_parser.c       |  55 +++
 clients/drsigil/pthread_defines.h      | 283 ++++++++++++++++
 clients/drsigil/start_stop_functions.h |  50 +++
 8 files changed, 1953 insertions(+)
 create mode 100644 clients/drsigil/CMakeLists.txt
 create mode 100644 clients/drsigil/drsigil.c
 create mode 100644 clients/drsigil/drsigil.h
 create mode 100644 clients/drsigil/drsigil_instrument.c
 create mode 100644 clients/drsigil/drsigil_ipc.c
 create mode 100644 clients/drsigil/drsigil_parser.c
 create mode 100644 clients/drsigil/pthread_defines.h
 create mode 100644 clients/drsigil/start_stop_functions.h

diff --git a/clients/drsigil/CMakeLists.txt b/clients/drsigil/CMakeLists.txt
new file mode 100644
index 00000000..0e38aff6
--- /dev/null
+++ b/clients/drsigil/CMakeLists.txt
@@ -0,0 +1,27 @@

+void parse(int argc, char *argv[], command_line_options *clo);
+
+#endif
diff --git a/clients/drsigil/instrument.c b/clients/drsigil/instrument.c
new file mode 100644
index 00000000..05d9868b
--- /dev/null
+++ b/clients/drsigil/instrument.c
@@ -0,0 +1,602 @@
+#include "drsigil.h"
+#include "drmgr.h"
