diff options
-rw-r--r-- | lldb/examples/summaries/cocoa/Logger.py | 4 | ||||
-rw-r--r-- | lldb/examples/synthetic/libcxx.py | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lldb/examples/summaries/cocoa/Logger.py b/lldb/examples/summaries/cocoa/Logger.py index 8044416e5ba..91d503c3121 100644 --- a/lldb/examples/summaries/cocoa/Logger.py +++ b/lldb/examples/summaries/cocoa/Logger.py @@ -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 diff --git a/lldb/examples/synthetic/libcxx.py b/lldb/examples/synthetic/libcxx.py index 5037187d956..e1f0fa9eb6e 100644 --- a/lldb/examples/synthetic/libcxx.py +++ b/lldb/examples/synthetic/libcxx.py @@ -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?)" |