[PATCH 8/8] Call target_traceframe_info when traceframe is selected.

Pedro Alves palves@redhat.com
Thu Feb 20 13:30:00 GMT 2014


On 02/12/2014 06:05 AM, Yao Qi wrote:

> --- a/gdb/tracepoint.c
> +++ b/gdb/tracepoint.c
> @@ -4290,7 +4290,7 @@ parse_traceframe_info (const char *tframe_info)
>  struct traceframe_info *
>  get_traceframe_info (void)
>  {
> -  if (traceframe_info == NULL)
> +  if (traceframe_info == NULL && get_traceframe_number () >= 0)
>      traceframe_info = target_traceframe_info ();
>  
>    return traceframe_info;

Hmm, it looks cleaner to me to not have the check here.
It looked to me that after this patch, all callers of
get_traceframe_info or traceframe_available_memory are already
checking whether a traceframe is selected.  So why's this hunk
needed?  What did I miss?

-- 
Pedro Alves



More information about the Gdb-patches mailing list