[Lldb-commits] [lldb] r174795 - Quick fix for the libc++ std::map synthetic children provider
Enrico Granata
egranata at apple.com
Fri Feb 8 17:44:23 PST 2013
Author: enrico
Date: Fri Feb 8 19:44:23 2013
New Revision: 174795
URL: http://llvm.org/viewvc/llvm-project?rev=174795&view=rev
Log:
Quick fix for the libc++ std::map synthetic children provider
If you try to access any child > 0 without having touched child 0, LLDB won't be able to reconstruct type information from the debug info.
Previously, we would fail.
Now, we simply go fetch child 0 and then come back.
Modified:
lldb/trunk/examples/summaries/cocoa/Logger.py
lldb/trunk/examples/synthetic/libcxx.py
Modified: lldb/trunk/examples/summaries/cocoa/Logger.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/summaries/cocoa/Logger.py?rev=174795&r1=174794&r2=174795&view=diff
==============================================================================
--- lldb/trunk/examples/summaries/cocoa/Logger.py (original)
+++ lldb/trunk/examples/summaries/cocoa/Logger.py Fri Feb 8 19:44:23 2013
@@ -58,10 +58,10 @@ class FileLogger:
self.file = None
# to enable logging:
-# define Logger._lldb_formatters_debug_level to any number greater than 0
+# define lldb.formatters.Logger._lldb_formatters_debug_level to any number greater than 0
# if you define it to any value greater than 1, the log will be automatically flushed after each write (slower but should make sure most of the stuff makes it to the log even if we crash)
# if you define it to any value greater than 2, the calling function's details will automatically be logged (even slower, but provides additional details)
-# if you need the log to go to a file instead of on screen, define Logger._lldb_formatters_debug_filename to a valid filename
+# if you need the log to go to a file instead of on screen, define lldb.formatters.Logger._lldb_formatters_debug_filename to a valid filename
class Logger:
def __init__(self,autoflush=False,logcaller=False):
global _lldb_formatters_debug_level
Modified: lldb/trunk/examples/synthetic/libcxx.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/libcxx.py?rev=174795&r1=174794&r2=174795&view=diff
==============================================================================
--- lldb/trunk/examples/synthetic/libcxx.py (original)
+++ lldb/trunk/examples/synthetic/libcxx.py Fri Feb 8 19:44:23 2013
@@ -561,8 +561,12 @@ class stdmap_SynthProvider:
else:
# FIXME we need to have accessed item 0 before accessing any other item!
if self.skip_size == None:
- logger >> "You asked for item > 0 before asking for item == 0, too bad - I have no clue"
- return None
+ logger >> "You asked for item > 0 before asking for item == 0, I will fetch 0 now then retry"
+ if self.get_child_at_index(0):
+ return self.get_child_at_index(index)
+ else:
+ logger >> "item == 0 could not be found. sorry, nothing can be done here."
+ return None
return current.CreateChildAtOffset('[' + str(index) + ']',self.skip_size,self.data_type)
else:
logger >> "Unable to infer data-type - returning None (should mark tree as garbage here?)"
More information about the lldb-commits
mailing list