[Libreoffice-commits] core.git: solenv/gdb
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 25 11:24:15 UTC 2019
solenv/gdb/libreoffice/tl.py | 24 ------------------------
1 file changed, 24 deletions(-)
New commits:
commit 2f00a7c61fff9c091f08b6aaa4f829cd34fb3745
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 25 13:23:16 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jun 25 13:23:16 2019 +0200
remove Fraction pretty-printer
no longer necessary after
commit 31589bf0239679d73417902655045c48c4868016
Date: Mon Jun 24 15:02:55 2019 +0200
tdf#94677 Calc is slow opening large CSV, improve tools::Fraction
Change-Id: I1c9ee043a51216f7005bf8a4bf60bb4b4e39ab61
diff --git a/solenv/gdb/libreoffice/tl.py b/solenv/gdb/libreoffice/tl.py
index 44f3c78210cb..22ca3ba57c5f 100644
--- a/solenv/gdb/libreoffice/tl.py
+++ b/solenv/gdb/libreoffice/tl.py
@@ -53,29 +53,6 @@ class ColorPrinter(object):
else:
return "rgb(%d, %d, %d)" % (r, g, b)
-class FractionPrinter(object):
- '''Prints fraction'''
-
- def __init__(self, typename, val):
- self.typename = typename
- self.val = val
-
- def to_string(self):
- # Workaround gdb bug <https://sourceware.org/bugzilla/show_bug.cgi?id=22968> "ptype does not
- # find inner C++ class type without -readnow"
- gdb.lookup_type('Fraction')
- # This would be simpler and more reliable if we could call the operator* on mpImpl to get the internal Impl.
- # Different libc have different structures. Some have one _M_t, some have two nested.
- tmp = self.val['mpImpl']['_M_t']
- if tmp.type.fields()[0].name == '_M_t': tmp = tmp['_M_t']
- impl = tmp['_M_head_impl'].dereference().cast(gdb.lookup_type('Fraction::Impl'))
- numerator = impl['value']['num']
- denominator = impl['value']['den']
- if impl['valid']:
- return "%d/%d" % (numerator, denominator)
- else:
- return "invalid %s %d/%d" % (self.typename, numerator, denominator)
-
class DateTimeImpl(object):
def __init__(self, date, time):
@@ -228,7 +205,6 @@ def build_pretty_printers():
# various types
printer.add('BigInt', BigIntPrinter)
printer.add('Color', ColorPrinter)
- printer.add('Fraction', FractionPrinter)
printer.add('DateTime', DateTimePrinter)
printer.add('Date', DatePrinter)
printer.add('Time', TimePrinter)
More information about the Libreoffice-commits
mailing list