X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6a181a303aeebb013d5237bfc8dd8b3b12aea50..45416752623a6ac0df3a8f5f55c1933ff52e1dbb:/misc/gdb/print.py?ds=sidebyside diff --git a/misc/gdb/print.py b/misc/gdb/print.py index 26186867aa..40084758e3 100755 --- a/misc/gdb/print.py +++ b/misc/gdb/print.py @@ -22,7 +22,7 @@ class wxStringPrinter: self.val = val def to_string(self): - return self.val['m_impl']['_M_dataplus']['_M_p'].string() + return self.val['m_impl']['_M_dataplus']['_M_p'] def display_hint(self): return 'string' @@ -36,6 +36,8 @@ class wxDateTimePrinter: # expressions directly so we need to convert it to long long first and # then cast to int explicitly to be able to use it as a timestamp. msec = self.val['m_time'].cast(gdb.lookup_type('long long')) + if msec == 0x8000000000000000: + return 'NONE' sec = int(msec / 1000) return datetime.datetime.fromtimestamp(sec).isoformat(' ')