diff options
author | Alex Light <allight@google.com> | 2020-10-16 03:09:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-16 03:09:58 +0000 |
commit | fbf3aa3c8957298192a135b8a7a767ea6361379f (patch) | |
tree | b9fd19839c2d613ca0935aad6bdecf2b1ab850b1 | |
parent | 6cc2141f6b756a7fe71fd682658683a95126776a (diff) | |
parent | 4bf5ac4ddb836d0972ba9429d15dff84c28d714c (diff) | |
download | gtest_extras-fbf3aa3c8957298192a135b8a7a767ea6361379f.tar.gz |
IsolateMain should default off under lldb too am: f63cfd97f3 am: dc10d6d7e9 am: 4bf5ac4ddb
Original change: https://android-review.googlesource.com/c/platform/system/testing/gtest_extras/+/1462707
Change-Id: Iaef2567280bba050b96bea8871b47533ce8dcb26
-rw-r--r-- | IsolateMain.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/IsolateMain.cpp b/IsolateMain.cpp index 898fb52..5b34ef5 100644 --- a/IsolateMain.cpp +++ b/IsolateMain.cpp @@ -97,7 +97,8 @@ static bool RunInIsolationMode(std::vector<const char*>& args) { } } if (!isolation_forced) { - // Check if we are running gdb/gdbserver. No need to be sneaky we are assuming no one is hiding. + // Check if we are running gdb/gdbserver/lldb/lldb-server. No need to be sneaky we are assuming + // no one is hiding. pid_t ppid = getppid(); std::string exe_path = std::string("/proc/") + std::to_string(ppid) + "/exe"; char buf[PATH_MAX + 1]; @@ -110,7 +111,8 @@ static bool RunInIsolationMode(std::vector<const char*>& args) { if ((len = TEMP_FAILURE_RETRY(readlink(exe_path.c_str(), buf, sizeof(buf) - 1))) > 0) { buf[len] = '\0'; std::string_view file(basename(buf)); - return file != "gdb" && file != "gdbserver" && file != "gdbserver64" && file != "gdbserver32"; + return file != "gdb" && file != "gdbserver" && file != "gdbserver64" && + file != "gdbserver32" && file != "lldb" && file != "lldb-server"; } // If we can't figure out what our parent was just assume we are fine to isolate. } |