* Support building for Windows on ARM
* Fix usage of reserved function name on ARM
* Fix architecture dependent `CONTEXT` fields access
* Fixes for debugging on Windows on ARM
* Fix breakpoint behavior on windows on ARM
* Fix register profile when debugging
* Remove `drx` error message if not supported
* Add support for hardware breakpoints
* Disable support for hardware single-stepping
* Fix Windows Message breakpoints on ARM
* Fix software single-stepping on return instruction on ARM
* Consider link register as destination for return instructions
* Fix setting debug bits to 16
* Rename `r12` to `ip` for windows arm register profile
* Remove debug bits hardcoding on windows
* Add 32bit registers to Windows ARM64 register profile
* Fix software step breakpoint alignment when entering thumb mode
* Define `RZ_TEST_ARCH` for `arm` and `arm64`
* Use `StackWalk64` API for backtracing on Windows
* Fix software single-stepping ARM in thumb mode
* Sync `asm.bits` with debugger
* Cleanup windows_debug.c
* Add SPDX for cross-arm64-windows.txt
* Add floating point control register flags
* Fix Windows Arm register profile alignment
* Keep `drx` warning
* Use wide version of Windows APIs in subprocess functions
* Use `wmain` on Windows to get UTF16 arguments
* Use wide version of APIs in `rz_cons`
* Always try to set console codepage to UTF8
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
By default, pipes file descriptors are not closed on exec. This means
they are inherited by the child process. However, this may be a problem
in particular in multi-threading programs (e.g. rz-test), because EOF is
not sent to a pipe until the last pipe file descriptor is closed.
This commit makes sure that by default pipes are created with O_CLOEXEC,
so they are closed whenever an exec syscall is executed. Usually pipe
file descriptors are duplicated to be stdin/stdout/stderr of the
children process and those dupped file descriptors won't be closed on
exec.
In case pipe2 is not available (e.g. MacOS), we do a pipe + fcntl, which
is in theory racy (see man open(2)). For this reason pipe, exec, system,
etc. are wrapped in rz_sys and they use a global mutex to make sure a
pipe is either created and set as O_CLOEXEC or not created at all before
an exec operation is done.
On very old systems, O_CLOEXEC may not be available at all. In those
cases, which should be rare, we just keep a list of file descriptors
created with rz_sys_pipe that we need to close before executing another
process.
Interaction with external libs may be tricky. We expect external libs to
create files/pipes that need to be closed on exec with the right flags
and we expect rizin code to manually close pipes file descriptors as
appropriate if the exec syscall is executed by an external library
(non-rizin code).
Make sure execl is found by acr/make