This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/5] inline download_tracepoints into cmd_qtstart.


On 03/07/2012 03:31 PM, Yao Qi wrote:


>  
> -/* If the in-process agent library isn't loaded in the inferior, write
> -   an error to BUFFER, and return 1.  Otherwise, return 0.  */
> -
> -static int
> -maybe_write_ipa_not_loaded (char *buffer)
> -{
> -  if (!agent_loaded_p ())
> -    {
> -      write_e_ipa_not_loaded (buffer);
> -      return 1;
> -    }
> -  return 0;
> -}


We are losing the error message sent to GDB.  Why is that okay?

>    /* Sync the fast tracepoints list in the inferior ftlib.  */
>    if (agent_loaded_p ())
> -    {
> -      download_tracepoints ();
> -      download_trace_state_variables ();
> -    }
> +    download_trace_state_variables ();
>  
>    /* No previous fast tpoint yet.  */
>    prev_ftpoint = NULL;
> @@ -3095,7 +3080,10 @@ cmd_qtstart (char *packet)
>  
>    *packet = '\0';
>  
> -  /* Install tracepoints.  */
> +  /* Start out empty.  */
> +  write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0);


Certainly we shouldn't do this if the IPA isn't loaded.

> +
> +  /* Donwload and install tracepoints.  */


Typo "Donwload".

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]