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 v10 21/21] btrace: fix crash when losing the remote connection on process exit


On Fri, 08 Mar 2013 10:16:08 +0100, Markus Metzger wrote:
> The patch will be split and merged into the btrace patch series.

OK for the merge.


> --- a/gdb/record-btrace.c
> +++ b/gdb/record-btrace.c
> @@ -99,16 +99,11 @@ record_btrace_enable_warn (struct thread_info *tp)
>  static void
>  record_btrace_disable_callback (void *arg)
>  {
> -  volatile struct gdb_exception error;
>    struct thread_info *tp;
>  
>    tp = arg;
>  
> -  TRY_CATCH (error, RETURN_MASK_ERROR)
> -    btrace_disable (tp);
> -
> -  if (error.message != NULL)
> -    warning ("%s", error.message);
> +  btrace_disable (tp);
>  }

I do not see how is it related to this patch.  But OK with it.


> --- a/gdb/target.h
> +++ b/gdb/target.h
> @@ -870,10 +870,19 @@ struct target_ops
>      /* Disable branch tracing and deallocate @tinfo.  */
>      void (*to_disable_btrace) (struct btrace_target_info *tinfo);
>  
> +    /* Disable branch tracing and deallocate @tinfo.  This function is similar

@tinfo -> TINFO

in the GNU Coding Standards style (I see it used multiple times already),
sorry for the nitpick.


> +       to to_disable_btrace, except that it is called during teardown and is
> +       only allowed to perform actions that are safe.  A counter-example would
> +       be attempting to talk to a remote target.  */
> +    void (*to_teardown_btrace) (struct btrace_target_info *tinfo);


Thanks,
Jan


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