summaryrefslogtreecommitdiffstats
path: root/lldb/source/lldb-log.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-02-06 17:22:03 +0000
committerGreg Clayton <gclayton@apple.com>2013-02-06 17:22:03 +0000
commit5ce9c5657cb77c0f1919be0aa3c990009a7bc60b (patch)
treeaca6aa117e81783b21300ba0ff86b126ef7035e6 /lldb/source/lldb-log.cpp
parent0e1cf09c89343dbbe14490c550ab1fc74b642003 (diff)
downloadbcm5719-llvm-5ce9c5657cb77c0f1919be0aa3c990009a7bc60b.tar.gz
bcm5719-llvm-5ce9c5657cb77c0f1919be0aa3c990009a7bc60b.zip
<rdar://problem/13159777>
lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules. LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required. Added a new logging channel for "lldb" called "mmap" to help track future regressions. Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to. The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info. llvm-svn: 174524
Diffstat (limited to 'lldb/source/lldb-log.cpp')
-rw-r--r--lldb/source/lldb-log.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/lldb-log.cpp b/lldb/source/lldb-log.cpp
index 880598c008d..162599068b9 100644
--- a/lldb/source/lldb-log.cpp
+++ b/lldb/source/lldb-log.cpp
@@ -137,6 +137,7 @@ lldb_private::DisableLog (const char **categories, Stream *feedback_strm)
else if (0 == ::strncasecmp(arg, "types", 5)) flag_bits &= ~LIBLLDB_LOG_TYPES;
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits &= ~LIBLLDB_LOG_SYMBOLS;
else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits &= ~LIBLLDB_LOG_MODULES;
+ else if (0 == ::strncasecmp(arg, "mmap", 4)) flag_bits &= ~LIBLLDB_LOG_MMAP;
else
{
feedback_strm->Printf ("error: unrecognized log category '%s'\n", arg);
@@ -205,6 +206,7 @@ lldb_private::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const ch
else if (0 == ::strncasecmp(arg, "types", 5)) flag_bits |= LIBLLDB_LOG_TYPES;
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits |= LIBLLDB_LOG_SYMBOLS;
else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits |= LIBLLDB_LOG_MODULES;
+ else if (0 == ::strncasecmp(arg, "mmap", 4)) flag_bits |= LIBLLDB_LOG_MMAP;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
OpenPOWER on IntegriCloud