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 v4 5/9] Add method to query current recording method to target_ops.


> -----Original Message-----
> From: Wiederhake, Tim
> Sent: Wednesday, January 4, 2017 1:46 PM
> To: gdb-patches@sourceware.org
> Cc: Metzger, Markus T <markus.t.metzger@intel.com>
> Subject: [PATCH v4 5/9] Add method to query current recording method to
> target_ops.

Hello Tim,
 
> 	* record-btrace.c (record_btrace_record_method): New function.
> 	(init_record_btrace_ops): Add btrace_record_method.

I think that's "record_btrace_record_method" or "Initialize to_record_method".


> +/* The to_record_method method of target record-btrace.  */
> +
> +static enum record_method
> +record_btrace_record_method (struct target_ops *self, ptid_t ptid)
> +{
> +  const struct btrace_config *config;
> +  struct thread_info * const tp = find_thread_ptid (ptid);
> +
> +  if (tp == NULL)
> +    error (_("No thread."));
> +
> +  config = btrace_conf (&tp->btrace);
> +  if (config == NULL)
> +    return RECORD_METHOD_NONE;

We may instead just check "tp->btrace.target == NULL".

thanks,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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