solenv/gdb/libreoffice/basegfx.py |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 157d82354876493542b7ac1066b847fee59ebc61
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jan 30 11:23:46 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jan 30 12:22:59 2025 +0100

    Revert "Adapting basegfx.py due to blocking in some situations"
    
    This reverts commit 3c82f49fcee3f1e4ddae8919993dde57e8bbab2d.
    
    This fixes the use of these pretty-printers in gdb.
    Otherwise the call to 'if self.exists()' throws an error
    because the exists() method does not exist.
    
    Change-Id: Ie3cd2f50a08508ed44f4a062777f3fb455b34d89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180935
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/solenv/gdb/libreoffice/basegfx.py 
b/solenv/gdb/libreoffice/basegfx.py
index b2e4db94536c..b6291605c5f2 100644
--- a/solenv/gdb/libreoffice/basegfx.py
+++ b/solenv/gdb/libreoffice/basegfx.py
@@ -60,9 +60,8 @@ class B2DPolygonPrinter(object):
     def _count(self):
         # It's a call into the inferior (being debugged) process.
         # Will not work with core dumps and can cause a deadlock.
-        if self.exists():
-            return int(gdb.parse_and_eval(
-                    "(('basegfx::B2DPolygon' *) 
{})->count()".format(self.value.address)))
+        return int(gdb.parse_and_eval(
+                "(('basegfx::B2DPolygon' *) 
{})->count()".format(self.value.address)))
 
     def _isEmpty(self):
         return self._count() == 0
@@ -70,9 +69,8 @@ class B2DPolygonPrinter(object):
     def _hasCurves(self):
         # It's a call into the inferior (being debugged) process.
         # Will not work with core dumps and can cause a deadlock.
-        if self.exists():
-            return int(gdb.parse_and_eval(
-                    "(('basegfx::B2DPolygon' *) 
{})->areControlPointsUsed()".format(self.value.address))) != 0
+        return int(gdb.parse_and_eval(
+                "(('basegfx::B2DPolygon' *) 
{})->areControlPointsUsed()".format(self.value.address))) != 0
 
     def _children(self):
         if self._hasCurves():
@@ -153,16 +151,14 @@ class B2DPolyPolygonPrinter(object):
     def _count(self):
         # It's a call into the inferior (being debugged) process.
         # Will not work with core dumps and can cause a deadlock.
-        if self.exists():
-            return int(gdb.parse_and_eval(
-                    "(('basegfx::B2DPolyPolygon' *) 
{})->count()".format(self.value.address)))
+        return int(gdb.parse_and_eval(
+                "(('basegfx::B2DPolyPolygon' *) 
{})->count()".format(self.value.address)))
 
     def _isClosed(self):
         # It's a call into the inferior (being debugged) process.
         # Will not work with core dumps and can cause a deadlock.
-        if self.exists():
-            return int(gdb.parse_and_eval(
-                    "(('basegfx::B2DPolyPolygon' *) 
{})->isClosed()".format(self.value.address))) != 0
+        return int(gdb.parse_and_eval(
+                "(('basegfx::B2DPolyPolygon' *) 
{})->isClosed()".format(self.value.address))) != 0
 
     def _isEmpty(self):
         return self._count() == 0

Reply via email to