RFC: lazily call save_current_space_and_thread

Jan Kratochvil jan.kratochvil@redhat.com
Tue Mar 8 17:16:00 GMT 2011


On Tue, 08 Mar 2011 17:51:56 +0100, Tom Tromey wrote:
> +/* If there is a selected frame, return it.  Otherwise, return NULL.  */
> +
> +struct frame_info *
> +get_selected_frame_if_set (void)
> +{
> +  if (selected_frame == NULL)
> +    return NULL;
> +  return get_selected_frame (NULL);
> +}

Maybe it could be just:
{
  return selected_frame;
}

It seems safe to me.


Thanks,
Jan



More information about the Gdb-patches mailing list