diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-10-18 18:09:30 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-10-18 18:09:30 +0000 |
| commit | 0d5f2d425aef5bc593c81be4d7573f3c19e050d3 (patch) | |
| tree | ad2e0e1bd007a0afa5f6b08db6c98c5a331a9232 /lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp | |
| parent | d1bc6da6575160887cd7e8e4b82016bc555ed792 (diff) | |
| download | bcm5719-llvm-0d5f2d425aef5bc593c81be4d7573f3c19e050d3.tar.gz bcm5719-llvm-0d5f2d425aef5bc593c81be4d7573f3c19e050d3.zip | |
This patch fixes debugging of single threaded apps on Linux.
It also adds some asserts and additional logging support.
from dawn@burble.org
llvm-svn: 142384
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp b/lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp index e3bd6e85870..c07263e891c 100644 --- a/lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp +++ b/lldb/source/Plugins/Process/Linux/ProcessLinuxLog.cpp @@ -69,6 +69,8 @@ ProcessLinuxLog::DisableLog (Args &args, Stream *feedback_strm) else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~LINUX_LOG_MEMORY_DATA_SHORT; else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits &= ~LINUX_LOG_MEMORY_DATA_LONG; else if (::strcasecmp (arg, "process") == 0 ) flag_bits &= ~LINUX_LOG_PROCESS; + else if (::strcasecmp (arg, "ptrace") == 0 ) flag_bits &= ~LINUX_LOG_PTRACE; + else if (::strcasecmp (arg, "registers") == 0 ) flag_bits &= ~LINUX_LOG_REGISTERS; else if (::strcasecmp (arg, "step") == 0 ) flag_bits &= ~LINUX_LOG_STEP; else if (::strcasecmp (arg, "thread") == 0 ) flag_bits &= ~LINUX_LOG_THREAD; else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits &= ~LINUX_LOG_VERBOSE; @@ -126,6 +128,8 @@ ProcessLinuxLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, Args else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits |= LINUX_LOG_MEMORY_DATA_SHORT; else if (::strcasecmp (arg, "data-long") == 0 ) flag_bits |= LINUX_LOG_MEMORY_DATA_LONG; else if (::strcasecmp (arg, "process") == 0 ) flag_bits |= LINUX_LOG_PROCESS; + else if (::strcasecmp (arg, "ptrace") == 0 ) flag_bits |= LINUX_LOG_PTRACE; + else if (::strcasecmp (arg, "registers") == 0 ) flag_bits |= LINUX_LOG_REGISTERS; else if (::strcasecmp (arg, "step") == 0 ) flag_bits |= LINUX_LOG_STEP; else if (::strcasecmp (arg, "thread") == 0 ) flag_bits |= LINUX_LOG_THREAD; else if (::strcasecmp (arg, "verbose") == 0 ) flag_bits |= LINUX_LOG_VERBOSE; @@ -162,6 +166,10 @@ ProcessLinuxLog::ListLogCategories (Stream *strm) " data-short - log memory bytes for memory reads and writes for short transactions only\n" " data-long - log memory bytes for memory reads and writes for all transactions\n" " process - log process events and activities\n" +#ifndef LLDB_CONFIGURATION_BUILDANDINTEGRATION + " ptrace - log all calls to ptrace\n" +#endif + " registers - log register read/writes\n" " thread - log thread events and activities\n" " step - log step related activities\n" " verbose - enable verbose logging\n" @@ -181,3 +189,5 @@ ProcessLinuxLog::LogIf (uint32_t mask, const char *format, ...) va_end (args); } } + +int ProcessLinuxLog::m_nestinglevel; |

