[PATCH 18/22] Update the source location with Frame.select

Tom Tromey tom@tromey.com
Thu Mar 11 21:53:35 GMT 2021


>>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:

Hannes> If the optional argument is True, then the current source location is
Hannes> also updated, the same as if 'frame #' were used.
Hannes> With this, a following 'list' call will show the source location of the
Hannes> current frame instead of the previous one, and the TUI source window is
Hannes> also updated.

Hannes> +      if (update_sal)
Hannes> +	{
Hannes> +	  set_current_sal_from_frame (fi);
Hannes> +
Hannes> +#ifdef TUI
Hannes> +	  if (tui_active)
Hannes> +	    tui_frame_changed ();
Hannes> +#endif

I'm not sure this is the correct way to do this.
Maybe you need to do what frame_command_core does:

  if (get_selected_frame () != prev_frame)
    gdb::observers::user_selected_context_changed.notify (USER_SELECTED_FRAME);

Tom


More information about the Gdb-patches mailing list