aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-08-31 18:35:14 +0000
committerGreg Clayton <gclayton@apple.com>2010-08-31 18:35:14 +0000
commitf681b94f90b97794ed005701e542594d72766e55 (patch)
tree5a298e7aff7a214231e62c583b6a946281842ae6 /lldb/source/Commands/CommandObjectProcess.cpp
parent3931c859565a9b4ede553bdc56d90530286e5e93 (diff)
downloadllvm-f681b94f90b97794ed005701e542594d72766e55.zip
llvm-f681b94f90b97794ed005701e542594d72766e55.tar.gz
llvm-f681b94f90b97794ed005701e542594d72766e55.tar.bz2
Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index dd2d545..73386b4 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -163,6 +163,9 @@ public:
const Args *environment = interpreter.GetEnvironmentVariables();
const Args *run_args = interpreter.GetProgramArguments();
+ uint32_t launch_flags = eLaunchFlagNone;
+ if (interpreter.GetDisableASLR())
+ launch_flags |= eLaunchFlagDisableASLR;
// There are two possible sources of args to be passed to the process upon launching: Those the user
// typed at the run command (launch_args); or those the user pre-set in the run-args variable (run_args).
@@ -204,6 +207,7 @@ public:
Error error (process->Launch (launch_args.GetConstArgumentVector(),
environment ? environment->GetConstArgumentVector() : NULL,
+ launch_flags,
stdin_path,
stdout_path,
stderr_path));