From 6ca76ceb63bf91282d9bbcc2a1cad190455a3c5a Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 10 Sep 2019 21:58:22 +0000 Subject: [PATCH] Fix a thinko in handling the QSetLogging packet. The comparison against LOG_MEMORY shortcut all the LOG_MEMORY_* log channels. It has to come last. llvm-svn: 371560 --- lldb/tools/debugserver/source/RNBRemote.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 513cbe10de02..61bdf0d8dac6 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -2091,9 +2091,6 @@ rnb_err_t set_logging(const char *p) { } else if (strncmp(p, "LOG_SHLIB", sizeof("LOG_SHLIB") - 1) == 0) { p += sizeof("LOG_SHLIB") - 1; bitmask |= LOG_SHLIB; - } else if (strncmp(p, "LOG_MEMORY", sizeof("LOG_MEMORY") - 1) == 0) { - p += sizeof("LOG_MEMORY") - 1; - bitmask |= LOG_MEMORY; } else if (strncmp(p, "LOG_MEMORY_DATA_SHORT", sizeof("LOG_MEMORY_DATA_SHORT") - 1) == 0) { p += sizeof("LOG_MEMORY_DATA_SHORT") - 1; @@ -2106,6 +2103,9 @@ rnb_err_t set_logging(const char *p) { sizeof("LOG_MEMORY_PROTECTIONS") - 1) == 0) { p += sizeof("LOG_MEMORY_PROTECTIONS") - 1; bitmask |= LOG_MEMORY_PROTECTIONS; + } else if (strncmp(p, "LOG_MEMORY", sizeof("LOG_MEMORY") - 1) == 0) { + p += sizeof("LOG_MEMORY") - 1; + bitmask |= LOG_MEMORY; } else if (strncmp(p, "LOG_BREAKPOINTS", sizeof("LOG_BREAKPOINTS") - 1) == 0) { p += sizeof("LOG_BREAKPOINTS") - 1;