From f681b94f90b97794ed005701e542594d72766e55 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 31 Aug 2010 18:35:14 +0000 Subject: 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 --- lldb/tools/debugserver/source/DNB.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/tools/debugserver/source/DNB.cpp') diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index 72a111bab2c..ce7670cb209 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -177,10 +177,11 @@ DNBProcessLaunch (const char *path, const char *envp[], const char *stdio_path, nub_launch_flavor_t launch_flavor, + int disable_aslr, char *err_str, size_t err_len) { - DNBLogThreadedIf(LOG_PROCESS, "%s ( path='%s', argv = %p, envp = %p, launch_flavor = %u, err = %p, err_len = %zu) called...", __FUNCTION__, path, argv, envp, launch_flavor, err_str, err_len); + DNBLogThreadedIf(LOG_PROCESS, "%s ( path='%s', argv = %p, envp = %p, launch_flavor = %u, disable_aslr = %d, err = %p, err_len = %zu) called...", __FUNCTION__, path, argv, envp, launch_flavor, disable_aslr, err_str, err_len); if (err_str && err_len > 0) err_str[0] = '\0'; @@ -197,7 +198,7 @@ DNBProcessLaunch (const char *path, if (processSP.get()) { DNBError launch_err; - pid_t pid = processSP->LaunchForDebug(path, argv, envp, stdio_path, launch_flavor, launch_err); + pid_t pid = processSP->LaunchForDebug(path, argv, envp, stdio_path, launch_flavor, disable_aslr, launch_err); if (err_str) { *err_str = '\0'; -- cgit v1.2.3