[Lldb-commits] [lldb] r163162 - /lldb/trunk/examples/summaries/cocoa/NSDate.py
Enrico Granata
egranata at apple.com
Tue Sep 4 13:02:39 PDT 2012
Author: enrico
Date: Tue Sep 4 15:02:39 2012
New Revision: 163162
URL: http://llvm.org/viewvc/llvm-project?rev=163162&view=rev
Log:
<rdar://problem/12068655> Make sure [NSDate distantPast] is formatted correctly
Modified:
lldb/trunk/examples/summaries/cocoa/NSDate.py
Modified: lldb/trunk/examples/summaries/cocoa/NSDate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/summaries/cocoa/NSDate.py?rev=163162&r1=163161&r2=163162&view=diff
==============================================================================
--- lldb/trunk/examples/summaries/cocoa/NSDate.py (original)
+++ lldb/trunk/examples/summaries/cocoa/NSDate.py Tue Sep 4 15:02:39 2012
@@ -78,6 +78,8 @@
# while all Python knows about is the "epoch", which is a platform-dependent
# year (1970 of *nix) whose Jan 1 at midnight is taken as reference
value_double = struct.unpack('d', struct.pack('Q', self.data))[0]
+ if value_double == -63114076800.0:
+ return '0001-12-30 00:00:00 +0000'
return xcode_format_count(osx_to_python_time(value_double))
@@ -107,6 +109,8 @@
self.offset(),
self.sys_params.types_cache.double)
value_double = struct.unpack('d', struct.pack('Q', value.GetValueAsUnsigned(0)))[0]
+ if value_double == -63114076800.0:
+ return '0001-12-30 00:00:00 +0000'
return xcode_format_count(osx_to_python_time(value_double))
class NSCalendarDate_SummaryProvider:
More information about the lldb-commits
mailing list