aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-01-19 15:32:32 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-01-19 21:51:56 -0500
commit7ae24327467750c445733e40d840e502795dbdf3 (patch)
tree48df8ef02f8194822d45d273ac6c92ae6d281103 /gdb/frame.c
parent4a2318c9858fdb1899157339f526df3d20e43cfe (diff)
downloadgdb-7ae24327467750c445733e40d840e502795dbdf3.zip
gdb-7ae24327467750c445733e40d840e502795dbdf3.tar.gz
gdb-7ae24327467750c445733e40d840e502795dbdf3.tar.bz2
gdb: remove SYMBOL_*_OPS macros
Remove SYMBOL_BLOCK_OPS, SYMBOL_COMPUTED_OPS and SYMBOL_REGISTER_OPS, in favor of methods on struct symbol. More changes could be done here to improve the design and make things safer, but I just wanted to do a straightforward change to remove the macros for now. Change-Id: I27adb74a28ea3c0dc9a85c2953413437cd95ad21 Reviewed-by: Kevin Buettner <kevinb@redhat.com>
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index d95d63e..29cda7d 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -3146,12 +3146,15 @@ frame_follow_static_link (frame_info_ptr frame)
/* If we don't know how to compute FRAME's base address, don't give up:
maybe the frame we are looking for is upper in the stack frame. */
- if (framefunc != NULL
- && SYMBOL_BLOCK_OPS (framefunc) != NULL
- && SYMBOL_BLOCK_OPS (framefunc)->get_frame_base != NULL
- && (SYMBOL_BLOCK_OPS (framefunc)->get_frame_base (framefunc, frame)
- == upper_frame_base))
- break;
+ if (framefunc != nullptr)
+ {
+ if (const symbol_block_ops *block_ops = framefunc->block_ops ();
+ (block_ops != nullptr
+ && block_ops->get_frame_base != nullptr
+ && (block_ops->get_frame_base (framefunc, frame)
+ == upper_frame_base)))
+ break;
+ }
}
return frame;