Re: [PATCH 7/7] Add documentation for new instruction record Python bindings.

Simon Marchi
2016-10-27T16:10:32Z

On 2016-10-27 02:28, Tim Wiederhake wrote:
> +@defun gdb.start_recording ([method])
> +Starts a recording using the given @var{method}. If no @var{method}
> is
> +given, the default method will be used. Returns a @code{gdb.Record}
> +object on success. Throws an exception on failure. The following
> +methods are currently supported:

Would it be better to separate the method and format? Like:

gdb.start_recording([method], [format]);

Omitting the format would let the method choose the best format (like pt
vs bts for btrace).

Also, for a programmatic API such as this one, I don't really see the
advantage of allowing shorthands like "pt" instead of "btrace pt". It
makes the code and API more complex with not much gain.

Thanks,

Simon