[Lldb-commits] [lldb] r124889 - in /lldb/trunk/source: Plugins/Disassembler/llvm/DisassemblerLLVM.cpp Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp lldb-log.cpp
Greg Clayton
gclayton at apple.com
Fri Feb 4 10:55:41 PST 2011
Author: gclayton
Date: Fri Feb 4 12:55:41 2011
New Revision: 124889
URL: http://llvm.org/viewvc/llvm-project?rev=124889&view=rev
Log:
Patch to remove uses of non-standard strcasestr and replace then with
strncasecmp equivalents from Kirk Beitz.
Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
lldb/trunk/source/lldb-log.cpp
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp?rev=124889&r1=124888&r2=124889&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp Fri Feb 4 12:55:41 2011
@@ -360,9 +360,9 @@
{
const char *arch_name = arch.AsCString();
- if (arch_name != NULL &&
- ((strcasestr (arch_name, "i386") == arch_name) ||
- (strcasestr (arch_name, "x86_64") == arch_name)))
+ if (arch_name != NULL
+ && ( (0 == ::strncasecmp (arch_name, "i386", 4))
+ || (0 == ::strncasecmp (arch_name, "x86_64", 6))))
return kEDAssemblySyntaxX86ATT;
return (EDAssemblySyntax_t)0; // default
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp?rev=124889&r1=124888&r2=124889&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp Fri Feb 4 12:55:41 2011
@@ -57,19 +57,19 @@
{
const char *arg = args.GetArgumentAtIndex (i);
- if (::strcasecmp (arg, "all") == 0 ) flag_bits &= ~PD_LOG_ALL;
- else if (::strcasestr (arg, "break") == arg ) flag_bits &= ~PD_LOG_BREAKPOINTS;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits &= ~PD_LOG_DEFAULT;
- else if (::strcasestr (arg, "exc") == arg ) flag_bits &= ~PD_LOG_EXCEPTIONS;
- else if (::strcasecmp (arg, "memory") == 0 ) flag_bits &= ~PD_LOG_MEMORY;
- else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~PD_LOG_MEMORY_DATA_SHORT;
- else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits &= ~PD_LOG_MEMORY_DATA_LONG;
- else if (::strcasecmp (arg, "protections")== 0 ) flag_bits &= ~PD_LOG_PROCESS;
- else if (::strcasecmp (arg, "step") == 0 ) flag_bits &= ~PD_LOG_STEP;
- else if (::strcasecmp (arg, "task") == 0 ) flag_bits &= ~PD_LOG_TASK;
- else if (::strcasecmp (arg, "thread") == 0 ) flag_bits &= ~PD_LOG_THREAD;
- else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits &= ~PD_LOG_VERBOSE;
- else if (::strcasestr (arg, "watch") == arg ) flag_bits &= ~PD_LOG_WATCHPOINTS;
+ if (::strcasecmp (arg, "all") == 0 ) flag_bits &= ~PD_LOG_ALL;
+ else if (::strncasecmp (arg, "break", 5) == 0 ) flag_bits &= ~PD_LOG_BREAKPOINTS;
+ else if (::strcasecmp (arg, "default") == 0 ) flag_bits &= ~PD_LOG_DEFAULT;
+ else if (::strncasecmp (arg, "exc", 3) == 0 ) flag_bits &= ~PD_LOG_EXCEPTIONS;
+ else if (::strcasecmp (arg, "memory") == 0 ) flag_bits &= ~PD_LOG_MEMORY;
+ else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~PD_LOG_MEMORY_DATA_SHORT;
+ else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits &= ~PD_LOG_MEMORY_DATA_LONG;
+ else if (::strcasecmp (arg, "protections")== 0 ) flag_bits &= ~PD_LOG_PROCESS;
+ else if (::strcasecmp (arg, "step") == 0 ) flag_bits &= ~PD_LOG_STEP;
+ else if (::strcasecmp (arg, "task") == 0 ) flag_bits &= ~PD_LOG_TASK;
+ else if (::strcasecmp (arg, "thread") == 0 ) flag_bits &= ~PD_LOG_THREAD;
+ else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits &= ~PD_LOG_VERBOSE;
+ else if (::strncasecmp (arg, "watch", 5) == 0 ) flag_bits &= ~PD_LOG_WATCHPOINTS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -109,20 +109,20 @@
{
const char *arg = args.GetArgumentAtIndex(i);
- if (::strcasecmp (arg, "all") == 0 ) flag_bits |= PD_LOG_ALL;
- else if (::strcasestr (arg, "break") == arg ) flag_bits |= PD_LOG_BREAKPOINTS;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits |= PD_LOG_DEFAULT;
- else if (::strcasestr (arg, "exc") == arg ) flag_bits |= PD_LOG_EXCEPTIONS;
- else if (::strcasecmp (arg, "memory") == 0 ) flag_bits |= PD_LOG_MEMORY;
- else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits |= PD_LOG_MEMORY_DATA_SHORT;
- else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits |= PD_LOG_MEMORY_DATA_LONG;
- else if (::strcasecmp (arg, "protections")== 0 ) flag_bits |= PD_LOG_MEMORY_PROTECTIONS;
- else if (::strcasecmp (arg, "process") == 0 ) flag_bits |= PD_LOG_PROCESS;
- else if (::strcasecmp (arg, "step") == 0 ) flag_bits |= PD_LOG_STEP;
- else if (::strcasecmp (arg, "task") == 0 ) flag_bits |= PD_LOG_TASK;
- else if (::strcasecmp (arg, "thread") == 0 ) flag_bits |= PD_LOG_THREAD;
- else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits |= PD_LOG_VERBOSE;
- else if (::strcasestr (arg, "watch") == arg ) flag_bits |= PD_LOG_WATCHPOINTS;
+ if (::strcasecmp (arg, "all") == 0 ) flag_bits |= PD_LOG_ALL;
+ else if (::strncasecmp (arg, "break", 5) == 0 ) flag_bits |= PD_LOG_BREAKPOINTS;
+ else if (::strcasecmp (arg, "default") == 0 ) flag_bits |= PD_LOG_DEFAULT;
+ else if (::strncasecmp (arg, "exc", 3) == 0 ) flag_bits |= PD_LOG_EXCEPTIONS;
+ else if (::strcasecmp (arg, "memory") == 0 ) flag_bits |= PD_LOG_MEMORY;
+ else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits |= PD_LOG_MEMORY_DATA_SHORT;
+ else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits |= PD_LOG_MEMORY_DATA_LONG;
+ else if (::strcasecmp (arg, "protections")== 0 ) flag_bits |= PD_LOG_MEMORY_PROTECTIONS;
+ else if (::strcasecmp (arg, "process") == 0 ) flag_bits |= PD_LOG_PROCESS;
+ else if (::strcasecmp (arg, "step") == 0 ) flag_bits |= PD_LOG_STEP;
+ else if (::strcasecmp (arg, "task") == 0 ) flag_bits |= PD_LOG_TASK;
+ else if (::strcasecmp (arg, "thread") == 0 ) flag_bits |= PD_LOG_THREAD;
+ else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits |= PD_LOG_VERBOSE;
+ else if (::strncasecmp (arg, "watch", 5) == 0 ) flag_bits |= PD_LOG_WATCHPOINTS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp?rev=124889&r1=124888&r2=124889&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp Fri Feb 4 12:55:41 2011
@@ -59,20 +59,20 @@
const char *arg = args.GetArgumentAtIndex (i);
- if (::strcasecmp (arg, "all") == 0 ) flag_bits &= ~GDBR_LOG_ALL;
- else if (::strcasecmp (arg, "async") == 0 ) flag_bits &= ~GDBR_LOG_ASYNC;
- else if (::strcasestr (arg, "break") == arg ) flag_bits &= ~GDBR_LOG_BREAKPOINTS;
- else if (::strcasestr (arg, "comm") == arg ) flag_bits &= ~GDBR_LOG_COMM;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits &= ~GDBR_LOG_DEFAULT;
- else if (::strcasecmp (arg, "packets") == 0 ) flag_bits &= ~GDBR_LOG_PACKETS;
- else if (::strcasecmp (arg, "memory") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY;
- else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY_DATA_SHORT;
- else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY_DATA_LONG;
- else if (::strcasecmp (arg, "process") == 0 ) flag_bits &= ~GDBR_LOG_PROCESS;
- else if (::strcasecmp (arg, "step") == 0 ) flag_bits &= ~GDBR_LOG_STEP;
- else if (::strcasecmp (arg, "thread") == 0 ) flag_bits &= ~GDBR_LOG_THREAD;
- else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits &= ~GDBR_LOG_VERBOSE;
- else if (::strcasestr (arg, "watch") == arg ) flag_bits &= ~GDBR_LOG_WATCHPOINTS;
+ if (::strcasecmp (arg, "all") == 0 ) flag_bits &= ~GDBR_LOG_ALL;
+ else if (::strcasecmp (arg, "async") == 0 ) flag_bits &= ~GDBR_LOG_ASYNC;
+ else if (::strncasecmp (arg, "break", 5) == 0 ) flag_bits &= ~GDBR_LOG_BREAKPOINTS;
+ else if (::strncasecmp (arg, "comm", 4) == 0 ) flag_bits &= ~GDBR_LOG_COMM;
+ else if (::strcasecmp (arg, "default") == 0 ) flag_bits &= ~GDBR_LOG_DEFAULT;
+ else if (::strcasecmp (arg, "packets") == 0 ) flag_bits &= ~GDBR_LOG_PACKETS;
+ else if (::strcasecmp (arg, "memory") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY;
+ else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY_DATA_SHORT;
+ else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits &= ~GDBR_LOG_MEMORY_DATA_LONG;
+ else if (::strcasecmp (arg, "process") == 0 ) flag_bits &= ~GDBR_LOG_PROCESS;
+ else if (::strcasecmp (arg, "step") == 0 ) flag_bits &= ~GDBR_LOG_STEP;
+ else if (::strcasecmp (arg, "thread") == 0 ) flag_bits &= ~GDBR_LOG_THREAD;
+ else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits &= ~GDBR_LOG_VERBOSE;
+ else if (::strncasecmp (arg, "watch", 5) == 0 ) flag_bits &= ~GDBR_LOG_WATCHPOINTS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -116,20 +116,20 @@
{
const char *arg = args.GetArgumentAtIndex(i);
- if (::strcasecmp (arg, "all") == 0 ) flag_bits |= GDBR_LOG_ALL;
- else if (::strcasecmp (arg, "async") == 0 ) flag_bits |= GDBR_LOG_ASYNC;
- else if (::strcasestr (arg, "break") == arg ) flag_bits |= GDBR_LOG_BREAKPOINTS;
- else if (::strcasestr (arg, "comm") == arg ) flag_bits |= GDBR_LOG_COMM;
- else if (::strcasecmp (arg, "default") == 0 ) flag_bits |= GDBR_LOG_DEFAULT;
- else if (::strcasecmp (arg, "packets") == 0 ) flag_bits |= GDBR_LOG_PACKETS;
- else if (::strcasecmp (arg, "memory") == 0 ) flag_bits |= GDBR_LOG_MEMORY;
- else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits |= GDBR_LOG_MEMORY_DATA_SHORT;
- else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits |= GDBR_LOG_MEMORY_DATA_LONG;
- else if (::strcasecmp (arg, "process") == 0 ) flag_bits |= GDBR_LOG_PROCESS;
- else if (::strcasecmp (arg, "step") == 0 ) flag_bits |= GDBR_LOG_STEP;
- else if (::strcasecmp (arg, "thread") == 0 ) flag_bits |= GDBR_LOG_THREAD;
- else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits |= GDBR_LOG_VERBOSE;
- else if (::strcasestr (arg, "watch") == arg ) flag_bits |= GDBR_LOG_WATCHPOINTS;
+ if (::strcasecmp (arg, "all") == 0 ) flag_bits |= GDBR_LOG_ALL;
+ else if (::strcasecmp (arg, "async") == 0 ) flag_bits |= GDBR_LOG_ASYNC;
+ else if (::strncasecmp (arg, "break", 5) == 0 ) flag_bits |= GDBR_LOG_BREAKPOINTS;
+ else if (::strncasecmp (arg, "comm", 4) == 0 ) flag_bits |= GDBR_LOG_COMM;
+ else if (::strcasecmp (arg, "default") == 0 ) flag_bits |= GDBR_LOG_DEFAULT;
+ else if (::strcasecmp (arg, "packets") == 0 ) flag_bits |= GDBR_LOG_PACKETS;
+ else if (::strcasecmp (arg, "memory") == 0 ) flag_bits |= GDBR_LOG_MEMORY;
+ else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits |= GDBR_LOG_MEMORY_DATA_SHORT;
+ else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits |= GDBR_LOG_MEMORY_DATA_LONG;
+ else if (::strcasecmp (arg, "process") == 0 ) flag_bits |= GDBR_LOG_PROCESS;
+ else if (::strcasecmp (arg, "step") == 0 ) flag_bits |= GDBR_LOG_STEP;
+ else if (::strcasecmp (arg, "thread") == 0 ) flag_bits |= GDBR_LOG_THREAD;
+ else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits |= GDBR_LOG_VERBOSE;
+ else if (::strncasecmp (arg, "watch", 5) == 0 ) flag_bits |= GDBR_LOG_WATCHPOINTS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
Modified: lldb/trunk/source/lldb-log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb-log.cpp?rev=124889&r1=124888&r2=124889&view=diff
==============================================================================
--- lldb/trunk/source/lldb-log.cpp (original)
+++ lldb/trunk/source/lldb-log.cpp Fri Feb 4 12:55:41 2011
@@ -113,27 +113,27 @@
{
const char *arg = args.GetArgumentAtIndex (i);
- if (strcasecmp(arg, "all") == 0 ) flag_bits &= ~LIBLLDB_LOG_ALL;
- else if (strcasecmp(arg, "api") == 0) flag_bits &= ~LIBLLDB_LOG_API;
- else if (strcasestr(arg, "break") == arg) flag_bits &= ~LIBLLDB_LOG_BREAKPOINTS;
- else if (strcasecmp(arg, "commands")== 0) flag_bits &= ~LIBLLDB_LOG_COMMANDS;
- else if (strcasecmp(arg, "default") == 0 ) flag_bits &= ~LIBLLDB_LOG_DEFAULT;
- else if (strcasecmp(arg, "dyld") == 0 ) flag_bits &= ~LIBLLDB_LOG_DYNAMIC_LOADER;
- else if (strcasestr(arg, "event") == arg) flag_bits &= ~LIBLLDB_LOG_EVENTS;
- else if (strcasestr(arg, "expr") == arg) flag_bits &= ~LIBLLDB_LOG_EXPRESSIONS;
- else if (strcasestr(arg, "object") == arg) flag_bits &= ~LIBLLDB_LOG_OBJECT;
- else if (strcasecmp(arg, "process") == 0 ) flag_bits &= ~LIBLLDB_LOG_PROCESS;
- else if (strcasecmp(arg, "script") == 0) flag_bits &= ~LIBLLDB_LOG_SCRIPT;
- else if (strcasecmp(arg, "state") == 0 ) flag_bits &= ~LIBLLDB_LOG_STATE;
- else if (strcasecmp(arg, "step") == 0 ) flag_bits &= ~LIBLLDB_LOG_STEP;
- else if (strcasecmp(arg, "thread") == 0 ) flag_bits &= ~LIBLLDB_LOG_THREAD;
- else if (strcasecmp(arg, "verbose") == 0 ) flag_bits &= ~LIBLLDB_LOG_VERBOSE;
- else if (strcasestr(arg, "watch") == arg) flag_bits &= ~LIBLLDB_LOG_WATCHPOINTS;
- else if (strcasestr(arg, "temp") == arg) flag_bits &= ~LIBLLDB_LOG_TEMPORARY;
- else if (strcasestr(arg, "comm") == arg) flag_bits &= ~LIBLLDB_LOG_COMMUNICATION;
- else if (strcasestr(arg, "conn") == arg) flag_bits &= ~LIBLLDB_LOG_CONNECTION;
- else if (strcasestr(arg, "host") == arg) flag_bits &= ~LIBLLDB_LOG_HOST;
- else if (strcasestr(arg, "unwind") == arg) flag_bits &= ~LIBLLDB_LOG_UNWIND;
+ if (0 == ::strcasecmp(arg, "all")) flag_bits &= ~LIBLLDB_LOG_ALL;
+ else if (0 == ::strcasecmp(arg, "api")) flag_bits &= ~LIBLLDB_LOG_API;
+ else if (0 == ::strncasecmp(arg, "break", 5)) flag_bits &= ~LIBLLDB_LOG_BREAKPOINTS;
+ else if (0 == ::strcasecmp(arg, "commands")) flag_bits &= ~LIBLLDB_LOG_COMMANDS;
+ else if (0 == ::strcasecmp(arg, "default")) flag_bits &= ~LIBLLDB_LOG_DEFAULT;
+ else if (0 == ::strcasecmp(arg, "dyld")) flag_bits &= ~LIBLLDB_LOG_DYNAMIC_LOADER;
+ else if (0 == ::strncasecmp(arg, "event", 5)) flag_bits &= ~LIBLLDB_LOG_EVENTS;
+ else if (0 == ::strncasecmp(arg, "expr", 4)) flag_bits &= ~LIBLLDB_LOG_EXPRESSIONS;
+ else if (0 == ::strncasecmp(arg, "object", 6)) flag_bits &= ~LIBLLDB_LOG_OBJECT;
+ else if (0 == ::strcasecmp(arg, "process")) flag_bits &= ~LIBLLDB_LOG_PROCESS;
+ else if (0 == ::strcasecmp(arg, "script")) flag_bits &= ~LIBLLDB_LOG_SCRIPT;
+ else if (0 == ::strcasecmp(arg, "state")) flag_bits &= ~LIBLLDB_LOG_STATE;
+ else if (0 == ::strcasecmp(arg, "step")) flag_bits &= ~LIBLLDB_LOG_STEP;
+ else if (0 == ::strcasecmp(arg, "thread")) flag_bits &= ~LIBLLDB_LOG_THREAD;
+ else if (0 == ::strcasecmp(arg, "verbose")) flag_bits &= ~LIBLLDB_LOG_VERBOSE;
+ else if (0 == ::strncasecmp(arg, "watch", 5)) flag_bits &= ~LIBLLDB_LOG_WATCHPOINTS;
+ else if (0 == ::strncasecmp(arg, "temp", 4)) flag_bits &= ~LIBLLDB_LOG_TEMPORARY;
+ else if (0 == ::strncasecmp(arg, "comm", 4)) flag_bits &= ~LIBLLDB_LOG_COMMUNICATION;
+ else if (0 == ::strncasecmp(arg, "conn", 4)) flag_bits &= ~LIBLLDB_LOG_CONNECTION;
+ else if (0 == ::strncasecmp(arg, "host", 4)) flag_bits &= ~LIBLLDB_LOG_HOST;
+ else if (0 == ::strncasecmp(arg, "unwind", 6)) flag_bits &= ~LIBLLDB_LOG_UNWIND;
else
{
feedback_strm->Printf ("error: unrecognized log category '%s'\n", arg);
@@ -179,27 +179,27 @@
{
const char *arg = args.GetArgumentAtIndex(i);
- if (strcasecmp(arg, "all") == 0 ) flag_bits |= LIBLLDB_LOG_ALL;
- else if (strcasecmp(arg, "api") == 0) flag_bits |= LIBLLDB_LOG_API;
- else if (strcasestr(arg, "break") == arg) flag_bits |= LIBLLDB_LOG_BREAKPOINTS;
- else if (strcasecmp(arg, "commands")== 0) flag_bits |= LIBLLDB_LOG_COMMANDS;
- else if (strcasecmp(arg, "default") == 0 ) flag_bits |= LIBLLDB_LOG_DEFAULT;
- else if (strcasecmp(arg, "dyld") == 0 ) flag_bits |= LIBLLDB_LOG_DYNAMIC_LOADER;
- else if (strcasestr(arg, "event") == arg) flag_bits |= LIBLLDB_LOG_EVENTS;
- else if (strcasestr(arg, "expr") == arg) flag_bits |= LIBLLDB_LOG_EXPRESSIONS;
- else if (strcasestr(arg, "object") == arg) flag_bits |= LIBLLDB_LOG_OBJECT;
- else if (strcasecmp(arg, "process") == 0 ) flag_bits |= LIBLLDB_LOG_PROCESS;
- else if (strcasecmp(arg, "script") == 0) flag_bits |= LIBLLDB_LOG_SCRIPT;
- else if (strcasecmp(arg, "state") == 0 ) flag_bits |= LIBLLDB_LOG_STATE;
- else if (strcasecmp(arg, "step") == 0 ) flag_bits |= LIBLLDB_LOG_STEP;
- else if (strcasecmp(arg, "thread") == 0 ) flag_bits |= LIBLLDB_LOG_THREAD;
- else if (strcasecmp(arg, "verbose") == 0 ) flag_bits |= LIBLLDB_LOG_VERBOSE;
- else if (strcasestr(arg, "watch") == arg) flag_bits |= LIBLLDB_LOG_WATCHPOINTS;
- else if (strcasestr(arg, "temp") == arg) flag_bits |= LIBLLDB_LOG_TEMPORARY;
- else if (strcasestr(arg, "comm") == arg) flag_bits |= LIBLLDB_LOG_COMMUNICATION;
- else if (strcasestr(arg, "conn") == arg) flag_bits |= LIBLLDB_LOG_CONNECTION;
- else if (strcasestr(arg, "host") == arg) flag_bits |= LIBLLDB_LOG_HOST;
- else if (strcasestr(arg, "unwind") == arg) flag_bits |= LIBLLDB_LOG_UNWIND;
+ if (0 == ::strcasecmp(arg, "all")) flag_bits |= LIBLLDB_LOG_ALL;
+ else if (0 == ::strcasecmp(arg, "api")) flag_bits |= LIBLLDB_LOG_API;
+ else if (0 == ::strncasecmp(arg, "break", 5)) flag_bits |= LIBLLDB_LOG_BREAKPOINTS;
+ else if (0 == ::strcasecmp(arg, "commands")) flag_bits |= LIBLLDB_LOG_COMMANDS;
+ else if (0 == ::strcasecmp(arg, "default")) flag_bits |= LIBLLDB_LOG_DEFAULT;
+ else if (0 == ::strcasecmp(arg, "dyld")) flag_bits |= LIBLLDB_LOG_DYNAMIC_LOADER;
+ else if (0 == ::strncasecmp(arg, "event", 5)) flag_bits |= LIBLLDB_LOG_EVENTS;
+ else if (0 == ::strncasecmp(arg, "expr", 4)) flag_bits |= LIBLLDB_LOG_EXPRESSIONS;
+ else if (0 == ::strncasecmp(arg, "object", 6)) flag_bits |= LIBLLDB_LOG_OBJECT;
+ else if (0 == ::strcasecmp(arg, "process")) flag_bits |= LIBLLDB_LOG_PROCESS;
+ else if (0 == ::strcasecmp(arg, "script")) flag_bits |= LIBLLDB_LOG_SCRIPT;
+ else if (0 == ::strcasecmp(arg, "state")) flag_bits |= LIBLLDB_LOG_STATE;
+ else if (0 == ::strcasecmp(arg, "step")) flag_bits |= LIBLLDB_LOG_STEP;
+ else if (0 == ::strcasecmp(arg, "thread")) flag_bits |= LIBLLDB_LOG_THREAD;
+ else if (0 == ::strcasecmp(arg, "verbose")) flag_bits |= LIBLLDB_LOG_VERBOSE;
+ else if (0 == ::strncasecmp(arg, "watch", 5)) flag_bits |= LIBLLDB_LOG_WATCHPOINTS;
+ else if (0 == ::strncasecmp(arg, "temp", 4)) flag_bits |= LIBLLDB_LOG_TEMPORARY;
+ else if (0 == ::strncasecmp(arg, "comm", 4)) flag_bits |= LIBLLDB_LOG_COMMUNICATION;
+ else if (0 == ::strncasecmp(arg, "conn", 4)) flag_bits |= LIBLLDB_LOG_CONNECTION;
+ else if (0 == ::strncasecmp(arg, "host", 4)) flag_bits |= LIBLLDB_LOG_HOST;
+ else if (0 == ::strncasecmp(arg, "unwind", 6)) flag_bits |= LIBLLDB_LOG_UNWIND;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
More information about the lldb-commits
mailing list