This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] record: automatically start recording
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: gdb-patches at sourceware dot org, palves at redhat dot com, ak at linux dot intel dot com, jan dot kratochvil at redhat dot com
- Date: Thu, 12 May 2016 14:13:40 +0100
- Subject: Re: [PATCH] record: automatically start recording
- Authentication-results: sourceware.org; auth=none
- References: <1459866845-28423-1-git-send-email-markus dot t dot metzger at intel dot com>
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 (éå)