3 Commits
Author SHA1 Message Date
Bin Wang 436da3609c i#8021: Include source files in core/ as dependencies for kernel module (#8025)
- Update `core/kernel_linux/CMakeLists.txt`:
  - Include source files in `core/` as dependencies for kernel module.
- Define `LINUX_KERNEL`, `DYNAMORIO_INTERNAL`,
`DR_DO_NOT_DEFINE_MAX_MIN`
  - Add `-Wframe-larger-than=4096`
- Update include headers in source files under `core/`. This includes
using wrapper headers (e.g., `stdarg_wrapper.h`) or excluding headers
that don't have an equivalent in kernel (e.g., `math.h`).
- Exclude floating point arithmetic and user space specific logic (e.g.,
signal handling, rseq) from kernel build.
- Optimize frame stack in `options.c` to make frame less than 4KB.

Issue: #8021
2026-08-03 12:12:14 -07:00
Derek Bruening 82d9da3f91 i#8001 shared defs: Share TEST* and BUFFER* macros (#8030)
Shares TESTANY, TESTALL, and BUFFER_SIZE_ELEMENTS and related defines,
in dr_project_wide_defines.h, eliminating duplication in many places.

Removes ext/ext_utils.h which becomes empty after this change.

Issue: #8001
2026-08-03 12:52:58 -04:00
Derek Bruening 3280e26f0e i#8001 shared defs: Add project-wide header with ALIGN* macros (#8007)
Adds a new top-level header common/dr_project_wide_defines.h that is
shared across all domains to avoid duplication.

This PR moves just the ALIGN* macros into this header. More shared
defines will be moved in further installments.

The new header is installed into the drmemtrace export dir as A) we're
already exporting utils.h which includes it and B) otherwise we have to
duplicate some defines in trace_entry.h. However, I first tried
duplicating and not including utils.h in trace_entry.h, which revealed
several missing headers in clients/drcachesim/ files. I left those
additions in this PR though they could be separated out.

The new header includes stdint.h to avoid depending on DR API integer
defines, which caused a Windows build issue which was resolved by
removing defines we had added to libdwarf.h back when we supported
VS2008 which did not have stdint.h. Those added defines are removed
here.

Issue: #8001
2026-07-27 17:12:12 -04:00