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/guile/scm-block.c | 14 +++++++------- gdb/guile/scm-frame.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gdb/guile') diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c index 1683ed1..41954c7 100644 --- a/gdb/guile/scm-block.c +++ b/gdb/guile/scm-block.c @@ -151,9 +151,9 @@ bkscm_print_block_smob (SCM self, SCM port, scm_print_state *pstate) gdbscm_printf (port, "#<%s", block_smob_name); - if (BLOCK_SUPERBLOCK (b) == NULL) + if (b->superblock () == NULL) gdbscm_printf (port, " global"); - else if (BLOCK_SUPERBLOCK (BLOCK_SUPERBLOCK (b)) == NULL) + else if (b->superblock ()->superblock () == NULL) gdbscm_printf (port, " static"); if (b->function () != NULL) @@ -421,7 +421,7 @@ gdbscm_block_superblock (SCM self) const struct block *block = b_smob->block; const struct block *super_block; - super_block = BLOCK_SUPERBLOCK (block); + super_block = block->superblock (); if (super_block) return bkscm_scm_from_block (super_block, b_smob->objfile); @@ -456,7 +456,7 @@ gdbscm_block_static_block (SCM self) const struct block *block = b_smob->block; const struct block *static_block; - if (BLOCK_SUPERBLOCK (block) == NULL) + if (block->superblock () == NULL) return SCM_BOOL_F; static_block = block_static_block (block); @@ -474,7 +474,7 @@ gdbscm_block_global_p (SCM self) = bkscm_get_valid_block_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); const struct block *block = b_smob->block; - return scm_from_bool (BLOCK_SUPERBLOCK (block) == NULL); + return scm_from_bool (block->superblock () == NULL); } /* (block-static? ) -> boolean @@ -487,8 +487,8 @@ gdbscm_block_static_p (SCM self) = bkscm_get_valid_block_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); const struct block *block = b_smob->block; - if (BLOCK_SUPERBLOCK (block) != NULL - && BLOCK_SUPERBLOCK (BLOCK_SUPERBLOCK (block)) == NULL) + if (block->superblock () != NULL + && block->superblock ()->superblock () == NULL) return SCM_BOOL_T; return SCM_BOOL_F; } diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c index f0de7c3..6bbb6f8 100644 --- a/gdb/guile/scm-frame.c +++ b/gdb/guile/scm-frame.c @@ -612,7 +612,7 @@ gdbscm_frame_block (SCM self) for (fn_block = block; fn_block != NULL && fn_block->function () == NULL; - fn_block = BLOCK_SUPERBLOCK (fn_block)) + fn_block = fn_block->superblock ()) continue; if (block == NULL || fn_block == NULL || fn_block->function () == NULL) -- cgit v1.1