diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-16 18:14:47 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-19 12:51:06 -0700 |
commit | d24e14a0c62181b49f513f6ed3704212fd276c79 (patch) | |
tree | 341cbf16737b778d0a4cb71276adfe209cf4bb6c /gdb/findvar.c | |
parent | 99f3dfd0f94144d295885e79f4ff5a5f8119fb04 (diff) | |
download | gdb-d24e14a0c62181b49f513f6ed3704212fd276c79.zip gdb-d24e14a0c62181b49f513f6ed3704212fd276c79.tar.gz gdb-d24e14a0c62181b49f513f6ed3704212fd276c79.tar.bz2 |
Convert block_static_block and block_global_block to methods
This converts block_static_block and block_global_block to be methods.
This was mostly written by script. It was simpler to convert them at
the same time because they're often used near each other.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 528181d..806f41d 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -460,8 +460,8 @@ get_hosting_frame (struct symbol *var, const struct block *var_block, tests that embed global/static symbols with null location lists. We want to get <optimized out> instead of <frame required> when evaluating them so return a frame instead of raising an error. */ - else if (var_block == block_global_block (var_block) - || var_block == block_static_block (var_block)) + else if (var_block == var_block->global_block () + || var_block == var_block->static_block ()) return frame; /* We have to handle the "my_func::my_local_var" notation. This requires us @@ -486,7 +486,7 @@ get_hosting_frame (struct symbol *var, const struct block *var_block, /* If we failed to find the proper frame, fallback to the heuristic method below. */ - else if (frame_block == block_global_block (frame_block)) + else if (frame_block == frame_block->global_block ()) { frame = NULL; break; |