From 228cb60caf3d40f452ab16fd92c7dea47beaf198 Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 7 Nov 2024 21:28:32 +0000 Subject: [PATCH 1/3] Clean up include files in coredump.c and instrument.c. --- core/lib/instrument.c | 4 ++++ core/unix/coredump.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/lib/instrument.c b/core/lib/instrument.c index 3b3590b42d3..e4deb86c209 100644 --- a/core/lib/instrument.c +++ b/core/lib/instrument.c @@ -48,6 +48,7 @@ #include "instrlist.h" #include "decode.h" #include "disassemble.h" +#include "dr_tools.h" #include "ir_utils.h" #include "../fragment.h" #include "../fcache.h" @@ -62,6 +63,9 @@ #ifdef UNIX # include /* ITIMER_* */ # include "../unix/module.h" /* redirect_* functions */ +# include "../unix/os_exports.h" +#elif defined(WINDOWS) +# include "../win32/os_export.h" #endif /* in utils.c, not exported to everyone */ diff --git a/core/unix/coredump.c b/core/unix/coredump.c index f77f0fa9849..9d5fa02acbc 100644 --- a/core/unix/coredump.c +++ b/core/unix/coredump.c @@ -27,13 +27,16 @@ */ #include +#include #include #include "../globals.h" #include "../hashtable.h" #include "../os_shared.h" #include "../synch.h" -#include "dr_tools.h" +#include "../utils.h" +#include "../lib/globals_api.h" +#include "../lib/globals_shared.h" #include "elf_defines.h" #include "memquery.h" From 1c5cb91c7730be8c4cebec6054ce4fefbef2ea0e Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 7 Nov 2024 21:37:32 +0000 Subject: [PATCH 2/3] Fix the include file name of win32/os_exports.h. --- core/lib/instrument.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/instrument.c b/core/lib/instrument.c index e4deb86c209..b68eef402bc 100644 --- a/core/lib/instrument.c +++ b/core/lib/instrument.c @@ -65,7 +65,7 @@ # include "../unix/module.h" /* redirect_* functions */ # include "../unix/os_exports.h" #elif defined(WINDOWS) -# include "../win32/os_export.h" +# include "../win32/os_exports.h" #endif /* in utils.c, not exported to everyone */ From 17070dbd0b168718606b75b61c6475c151bcc790 Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 7 Nov 2024 23:27:54 +0000 Subject: [PATCH 3/3] Do not include os_exports.h since it's already included from globals.h --- core/lib/instrument.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/lib/instrument.c b/core/lib/instrument.c index b68eef402bc..17b7ce86f2e 100644 --- a/core/lib/instrument.c +++ b/core/lib/instrument.c @@ -63,9 +63,6 @@ #ifdef UNIX # include /* ITIMER_* */ # include "../unix/module.h" /* redirect_* functions */ -# include "../unix/os_exports.h" -#elif defined(WINDOWS) -# include "../win32/os_exports.h" #endif /* in utils.c, not exported to everyone */