diff options
author | Kevin Buettner <kevinb@redhat.com> | 2016-09-27 20:33:38 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2016-11-16 11:37:11 -0700 |
commit | df433d316277ff5293832d3cd6cbc30b5c38dec0 (patch) | |
tree | ae3708506c40cdf2a53130c175d518ac0cb77931 /gdb/valops.c | |
parent | 1a2f3d7ff1d79b1290704e48c71e905b987393a6 (diff) | |
download | gdb-df433d316277ff5293832d3cd6cbc30b5c38dec0.zip gdb-df433d316277ff5293832d3cd6cbc30b5c38dec0.tar.gz gdb-df433d316277ff5293832d3cd6cbc30b5c38dec0.tar.bz2 |
Distinguish sentinel frame from null frame.
This patch replaces the `current_frame' static global in frame.c with
`sentinel_frame'. It also makes the sentinel frame id unique and
different from the null frame.
By itself, there is not much point to this patch, but it makes
the code cleaner for the VALUE_FRAME_ID changes in another patch.
Since we now allow "navigation" to the sentinel frame, it removes
the necessity of adding special cases to other parts of GDB.
Note that a new function, get_next_frame_sentinel_okay, is introduced
in this patch. It will be used by the VALUE_FRAME_ID changes that
I've made.
Thanks to Pedro Alves for this suggestion.
gdb/ChangeLog:
* frame.h (enum frame_id_stack_status): Add FID_STACK_SENTINEL.
(struct frame_id): Increase number of bits required for storing
stack status to 3 from 2.
(sentinel_frame_id): New declaration.
(get_next_frame_sentinel_okay): Declare.
(frame_find_by_id_sentinel_okay): Declare.
* frame.c (current_frame): Rename this static global to...
(sentinel_frame): ...this static global, which has also been
moved an earlier location in the file.
(fprint_frame_id): Add case for sentinel frame id.
(get_frame_id): Return early for sentinel frame.
(sentinel_frame_id): Define.
(frame_find_by_id): Add case for sentinel_frame_id.
(create_sentinel_frame): Use sentinel_frame_id for this_id.value
instead of null_frame_id.
(get_current_frame): Add local declaration for `current_frame'.
Remove local declaration for `sentinel_frame.'
(get_next_frame_sentinel_okay): New function.
(reinit_frame_cache): Use `sentinel_frame' in place of
`current_frame'.
Diffstat (limited to 'gdb/valops.c')
0 files changed, 0 insertions, 0 deletions