diff options
author | 2021-09-08 08:20:29 -0600 | |
---|---|---|
committer | 2022-06-07 09:59:41 -0600 | |
commit | bcb9251f029da8dcf360a4f5acfa3b4211c87bb0 (patch) | |
tree | c56395b22b1c8ceb3ef8d010c61a4e14c9ee5295 /gdbserver/win32-low.h | |
parent | Introduce wrapper for CreateProcess (diff) | |
download | binutils-gdb-bcb9251f029da8dcf360a4f5acfa3b4211c87bb0.tar.gz binutils-gdb-bcb9251f029da8dcf360a4f5acfa3b4211c87bb0.tar.bz2 binutils-gdb-bcb9251f029da8dcf360a4f5acfa3b4211c87bb0.zip |
Allow ASLR to be disabled on Windows
On Windows, it is possible to disable ASLR when creating a process.
This patch adds code to do this, and hooks it up to gdb's existing
disable-randomization feature. Because the Windows documentation
cautions that this isn't available on all versions of Windows, the
CreateProcess wrapper function is updated to make the attempt, and
then fall back to the current approach if it fails.
Diffstat (limited to 'gdbserver/win32-low.h')
-rw-r--r-- | gdbserver/win32-low.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index d16f1f9609c..b29e8b3a10a 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -165,6 +165,11 @@ public: { return true; } const char *pid_to_exec_file (int pid) override; + + bool supports_disable_randomization () override + { + return windows_nat::disable_randomization_available (); + } }; /* The sole Windows process. */ |