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 7/7] Add documentation for new instruction record Python bindings.


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


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