From 6c00f721c834e2c622eb995a58f02900b6d98574 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 28 Jan 2022 11:19:50 -0500 Subject: gdb: remove BLOCK_FUNCTION macro Replace with equivalent methods. Change-Id: I31ec00f5bf85335c8b23d306ca0fe0b84d489101 --- gdb/python/py-block.c | 2 +- gdb/python/py-frame.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c index aa8f3df..7ab9868 100644 --- a/gdb/python/py-block.c +++ b/gdb/python/py-block.c @@ -130,7 +130,7 @@ blpy_get_function (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - sym = BLOCK_FUNCTION (block); + sym = block->function (); if (sym) return symbol_to_symbol_object (sym); diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index d07158a..c4225c8 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -292,11 +292,11 @@ frapy_block (PyObject *self, PyObject *args) } for (fn_block = block; - fn_block != NULL && BLOCK_FUNCTION (fn_block) == NULL; + fn_block != NULL && fn_block->function () == NULL; fn_block = BLOCK_SUPERBLOCK (fn_block)) ; - if (block == NULL || fn_block == NULL || BLOCK_FUNCTION (fn_block) == NULL) + if (block == NULL || fn_block == NULL || fn_block->function () == NULL) { PyErr_SetString (PyExc_RuntimeError, _("Cannot locate block for frame.")); @@ -306,7 +306,7 @@ frapy_block (PyObject *self, PyObject *args) if (block) { return block_to_block_object - (block, BLOCK_FUNCTION (fn_block)->objfile ()); + (block, fn_block->function ()->objfile ()); } Py_RETURN_NONE; -- cgit v1.1