From f135fe728e2d0a6168a8445a50a6d63547c4db2f Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 28 Jan 2022 11:41:38 -0500 Subject: gdb: remove BLOCK_SUPERBLOCK macro Replace with equivalent methods. Change-Id: I334a319909a50b5cc5570a45c38c70e10dc00630 --- gdb/python/py-block.c | 10 +++++----- gdb/python/py-frame.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c index 7ab9868..872fb89 100644 --- a/gdb/python/py-block.c +++ b/gdb/python/py-block.c @@ -146,7 +146,7 @@ blpy_get_superblock (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - super_block = BLOCK_SUPERBLOCK (block); + super_block = block->superblock (); if (super_block) return block_to_block_object (super_block, self_obj->objfile); @@ -183,7 +183,7 @@ blpy_get_static_block (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - if (BLOCK_SUPERBLOCK (block) == NULL) + if (block->superblock () == NULL) Py_RETURN_NONE; static_block = block_static_block (block); @@ -201,7 +201,7 @@ blpy_is_global (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - if (BLOCK_SUPERBLOCK (block)) + if (block->superblock ()) Py_RETURN_FALSE; Py_RETURN_TRUE; @@ -217,8 +217,8 @@ blpy_is_static (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - if (BLOCK_SUPERBLOCK (block) != NULL - && BLOCK_SUPERBLOCK (BLOCK_SUPERBLOCK (block)) == NULL) + if (block->superblock () != NULL + && block->superblock ()->superblock () == NULL) Py_RETURN_TRUE; Py_RETURN_FALSE; diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index c4225c8..769e28c 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -293,7 +293,7 @@ frapy_block (PyObject *self, PyObject *args) for (fn_block = block; fn_block != NULL && fn_block->function () == NULL; - fn_block = BLOCK_SUPERBLOCK (fn_block)) + fn_block = fn_block->superblock ()) ; if (block == NULL || fn_block == NULL || fn_block->function () == NULL) -- cgit v1.1