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] record: automatically start recording


Markus Metzger <markus.t.metzger@intel.com> writes:

Hi Markus,

> Is the added convenience worth a new option or do we want to point users to the
> breakpoint-command solution?
>

I don't think it can justify adding a option in GDB to do that, but I am
open to others' thought.  If people think it is useful to have such
option, see my comments below on the patch,

> +/* The inferior-created observer implementing "set auto-record".  */
> +
> +static void
> +record_inferior_created (struct target_ops *ops, int from_tty)
> +{
> +  if (auto_record_string == auto_record_off)
> +    return;
> +
> +  TRY
> +    {
> +      char command[64];
> +
> +      snprintf (command, sizeof(command), "record %s", auto_record_string);
> +

xsnprintf

> +      execute_command (command, from_tty);
> +    }
> +  CATCH (exception, RETURN_MASK_ALL)
> +    {
> +      warning (_("Could not enable record %s: %s"), auto_record_string,
> +	       exception.message);
> +    }
> +  END_CATCH
> +}
> +

> +
> +# check for btrace support
> +if { [skip_btrace_tests] } { return -1 }
> +

Can we test this option on the target without btrace?  I think we can.
The command/option itself is about restarting recording automatically,
but the record type (full/btrace/bts/pt/) doesn't matter.

-- 
Yao (éå)


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