diff options
author | Greg Clayton <gclayton@apple.com> | 2010-08-31 18:35:14 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-08-31 18:35:14 +0000 |
commit | f681b94f90b97794ed005701e542594d72766e55 (patch) | |
tree | 5a298e7aff7a214231e62c583b6a946281842ae6 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 3931c859565a9b4ede553bdc56d90530286e5e93 (diff) | |
download | bcm5719-llvm-f681b94f90b97794ed005701e542594d72766e55.tar.gz bcm5719-llvm-f681b94f90b97794ed005701e542594d72766e55.zip |
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/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index eaf886f76ad..f127fde251f 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -161,6 +161,11 @@ CommandInterpreter::InitializeVariables () 80, "The maximum number of columns to use for displaying text.")); + m_variables["disable-aslr"] = + StateVariableSP (new StateVariable ("disable-aslr", + 1, + "Disable Address Space Layout Randomization (ASLR).")); + } const char * @@ -898,6 +903,14 @@ CommandInterpreter::GetEnvironmentVariables () return NULL; } +int +CommandInterpreter::GetDisableASLR () +{ + StateVariable *var = GetStateVariable ("disable-aslr"); + int disable_aslr = var->GetIntValue(); + + return disable_aslr; +} CommandInterpreter::~CommandInterpreter () { |