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: [RFAv3 1/3] Implement 'set print frame-info|frame-arguments presence'.


>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:

Philippe> New settings allow to better control what frame information is printed.
Philippe> 'set print frame-info' allows to override the default frame information
Philippe> printed when a GDB command prints a frame.
Philippe> The backtrace command has a new option -frame-info to override
Philippe> this global setting.

Thanks for the patch.

It is essentially ok, there are just a few nits.
You can check it in with those fixed.

Philippe> +static const char *const print_frame_info_choices[] =
Philippe> +  {print_frame_info_auto,

The text here should be on a new line, not next to the brace.

Philippe> +   print_frame_info_source_line,
Philippe> +   print_frame_info_location,
Philippe> +   print_frame_info_source_and_location,
Philippe> +   print_frame_info_location_and_address,
Philippe> +   print_frame_info_short_location,
Philippe> +   NULL};

Likewise.

Philippe> +  bool print_args = print_names
Philippe> +    && fp_opts.print_frame_arguments != print_frame_arguments_none;
 
This looks incorrectly formatted.  It needs parens around the RHS.

Philippe> +static gdb::optional<enum print_what>
Philippe> +print_frame_info_to_print_what (const char *print_frame_info)
Philippe> +{
Philippe> +
Philippe> +  for (int i = 0; print_frame_info_choices[i] != NULL; i++)

Extra newline.

Philippe> +
Philippe> +void
Philippe> +get_user_print_what_frame_info (gdb::optional<enum print_what> *what)
Philippe> +{

Need some intro comment.

Philippe> +  *what = print_frame_info_to_print_what
Philippe> +    (user_frame_print_options.print_frame_info);

This also looks incorrectly formatted.  Needs parens perhaps.

Tom


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