diff options
author | Keith Seitz <keiths@redhat.com> | 2002-08-28 17:27:44 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2002-08-28 17:27:44 +0000 |
commit | bfb3754e3d662ed801fe51563ef872f376130560 (patch) | |
tree | 4f37319e212ad53cee55dc18367c5a7ce1502bd1 /gdb/stack.c | |
parent | 051b807af79cfd6259032a75c49e981209a63ce1 (diff) | |
download | gdb-bfb3754e3d662ed801fe51563ef872f376130560.zip gdb-bfb3754e3d662ed801fe51563ef872f376130560.tar.gz gdb-bfb3754e3d662ed801fe51563ef872f376130560.tar.bz2 |
* stack.c (select_frame): Add FIXME concerning selected-frame
events.
(select_frame_command): Send selected-frame-level-changed
event notification, but only if the level actually changed.
(up_silently_base): Add selected-frame-level-changed event
notification.
(down_silently_base): Likewise.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index fa58963..23ca3df 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1517,6 +1517,15 @@ select_frame (struct frame_info *fi) if (selected_frame_level_changed_hook) selected_frame_level_changed_hook (frame_relative_level (fi)); + /* FIXME: kseitz/2002-08-28: It would be nice to call + selected_frame_level_changed_event right here, but due to limitations + in the current interfaces, we would end up flooding UIs with events + because select_frame is used extensively internally. + + Once we have frame-parameterized frame (and frame-related) commands, + the event notification can be moved here, since this function will only + be called when the users selected frame is being changed. */ + /* Ensure that symbols for this frame are read in. Also, determine the source language of this frame, and switch to it if desired. */ if (fi) @@ -1620,8 +1629,8 @@ select_frame_command_wrapper (char *level_exp, int from_tty) static void select_frame_command (char *level_exp, int from_tty) { - register struct frame_info *frame, *frame1; - unsigned int level = 0; + struct frame_info *frame; + int level = frame_relative_level (selected_frame); if (!target_has_stack) error ("No stack."); @@ -1629,6 +1638,8 @@ select_frame_command (char *level_exp, int from_tty) frame = parse_frame_specification (level_exp); select_frame (frame); + if (level != frame_relative_level (selected_frame)) + selected_frame_level_changed_event (frame_relative_level (selected_frame)); } /* The "frame" command. With no arg, print selected frame briefly. @@ -1674,6 +1685,7 @@ up_silently_base (char *count_exp) if (count1 != 0 && count_exp == 0) error ("Initial frame selected; you cannot go up."); select_frame (fi); + selected_frame_level_changed_event (frame_relative_level (selected_frame)); } static void @@ -1719,6 +1731,7 @@ down_silently_base (char *count_exp) } select_frame (frame); + selected_frame_level_changed_event (frame_relative_level (selected_frame)); } /* ARGSUSED */ |