GNU Binutils with patches for OS216
リビジョン | 8ef80d1a68c64e5a0c37ae5246dc958e7b172392 (tree) |
---|---|
日時 | 2019-06-05 07:30:02 |
作者 | Pedro Alves <palves@redh...> |
コミッター | Pedro Alves |
"set print raw frame-arguments" -> "set print raw-frame-arguments"
A following patch will introduce options for the "backtrace" command,
based on some "set print" and "set backtrace" settings. There's one
setting in particular that is a bit annoying if we want to describe
the backtrace options and the settings commands using the same data
structures:
The problem is that space between "raw" and "frame-arguments".
Calling the option
would be odd. So I'm calling the option
instead.
And for consistency, this patch renames the set/show commands to:
I.e., dash instead of space. The old commands are left in place, but
marked deprecated.
We need to adjust a couple testcases, because the relevant tests use
gdb_test_no_output and the old commands are no longer silent:
gdb/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>
* NEWS (Changed commands): Mention set/show print raw-frame-arguments,
and that "set/show print raw frame-arguments" are now deprecated.
* cli/cli-decode.c (add_setshow_boolean_cmd): Now returns the
command.
* command.h (add_setshow_boolean_cmd): Return cmd_list_element *.
* stack.c (_initialize_stack): Install "set/show print
raw-frame-arguments", and deprecate "set/show print raw
frame-arguments".
* valprint.c (_initialize_valprint): Deprecate "set/show print
raw".
gdb/doc/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>
* gdb.texinfo (Print Settings): Document "set/show print
raw-frame-arguments" instead of "set/show print raw
frame-arguments".
gdb/testsuite/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>
* gdb.guile/scm-frame-args.exp: Use "set print
raw-frame-arguments" instead of "set print raw frame-arguments".
* gdb.python/py-frame-args.exp: Likewise.
@@ -105,6 +105,13 @@ show style | ||
105 | 105 | a style name in their output using its own style, to help |
106 | 106 | the user visualize the different styles. |
107 | 107 | |
108 | +set print raw-frame-arguments | |
109 | +show print raw-frame-arguments | |
110 | + | |
111 | + These commands replace the similarly-named "set/show print raw | |
112 | + frame-arguments" commands (now with a dash instead of a space). The | |
113 | + old commands are now deprecated and may be removed in a future | |
114 | + release. | |
108 | 115 | |
109 | 116 | * New MI commands |
110 | 117 |
@@ -585,8 +585,10 @@ const char * const boolean_enums[] = { "on", "off", NULL }; | ||
585 | 585 | /* Add element named NAME to both the set and show command LISTs (the |
586 | 586 | list for set/show or some sublist thereof). CLASS is as in |
587 | 587 | add_cmd. VAR is address of the variable which will contain the |
588 | - value. SET_DOC and SHOW_DOC are the documentation strings. */ | |
589 | -void | |
588 | + value. SET_DOC and SHOW_DOC are the documentation strings. | |
589 | + Returns the new command element. */ | |
590 | + | |
591 | +cmd_list_element * | |
590 | 592 | add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var, |
591 | 593 | const char *set_doc, const char *show_doc, |
592 | 594 | const char *help_doc, |
@@ -603,6 +605,8 @@ add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var | ||
603 | 605 | set_list, show_list, |
604 | 606 | &c, NULL); |
605 | 607 | c->enums = boolean_enums; |
608 | + | |
609 | + return c; | |
606 | 610 | } |
607 | 611 | |
608 | 612 | /* Add element named NAME to both the set and show command LISTs (the |
@@ -328,15 +328,16 @@ extern void add_setshow_auto_boolean_cmd (const char *name, | ||
328 | 328 | struct cmd_list_element **set_list, |
329 | 329 | struct cmd_list_element **show_list); |
330 | 330 | |
331 | -extern void add_setshow_boolean_cmd (const char *name, | |
332 | - enum command_class theclass, | |
333 | - int *var, | |
334 | - const char *set_doc, const char *show_doc, | |
335 | - const char *help_doc, | |
336 | - cmd_const_sfunc_ftype *set_func, | |
337 | - show_value_ftype *show_func, | |
338 | - struct cmd_list_element **set_list, | |
339 | - struct cmd_list_element **show_list); | |
331 | +extern cmd_list_element * | |
332 | + add_setshow_boolean_cmd (const char *name, | |
333 | + enum command_class theclass, | |
334 | + int *var, | |
335 | + const char *set_doc, const char *show_doc, | |
336 | + const char *help_doc, | |
337 | + cmd_const_sfunc_ftype *set_func, | |
338 | + show_value_ftype *show_func, | |
339 | + struct cmd_list_element **set_list, | |
340 | + struct cmd_list_element **show_list); | |
340 | 341 | |
341 | 342 | extern void add_setshow_filename_cmd (const char *name, |
342 | 343 | enum command_class theclass, |
@@ -10533,16 +10533,16 @@ thus speeding up the display of each Ada frame. | ||
10533 | 10533 | @item show print frame-arguments |
10534 | 10534 | Show how the value of arguments should be displayed when printing a frame. |
10535 | 10535 | |
10536 | -@item set print raw frame-arguments on | |
10536 | +@item set print raw-frame-arguments on | |
10537 | 10537 | Print frame arguments in raw, non pretty-printed, form. |
10538 | 10538 | |
10539 | -@item set print raw frame-arguments off | |
10539 | +@item set print raw-frame-arguments off | |
10540 | 10540 | Print frame arguments in pretty-printed form, if there is a pretty-printer |
10541 | 10541 | for the value (@pxref{Pretty Printing}), |
10542 | 10542 | otherwise print the value in raw form. |
10543 | 10543 | This is the default. |
10544 | 10544 | |
10545 | -@item show print raw frame-arguments | |
10545 | +@item show print raw-frame-arguments | |
10546 | 10546 | Show whether to print frame arguments in raw form. |
10547 | 10547 | |
10548 | 10548 | @anchor{set print entry-values} |
@@ -3106,14 +3106,26 @@ Usage: func NAME")); | ||
3106 | 3106 | _("Show printing of non-scalar frame arguments"), |
3107 | 3107 | NULL, NULL, NULL, &setprintlist, &showprintlist); |
3108 | 3108 | |
3109 | - add_setshow_boolean_cmd ("frame-arguments", no_class, | |
3109 | + /* Install "set print raw frame-arguments", a deprecated spelling of | |
3110 | + "set print raw-frame-arguments". */ | |
3111 | + cmd = add_setshow_boolean_cmd ("frame-arguments", no_class, | |
3112 | + &print_raw_frame_arguments, _("\ | |
3113 | +Set whether to print frame arguments in raw form."), _("\ | |
3114 | +Show whether to print frame arguments in raw form."), _("\ | |
3115 | +If set, frame arguments are printed in raw form, bypassing any\n\ | |
3116 | +pretty-printers for that value."), | |
3117 | + NULL, NULL, | |
3118 | + &setprintrawlist, &showprintrawlist); | |
3119 | + deprecate_cmd (cmd, "set print raw-frame-arguments"); | |
3120 | + | |
3121 | + add_setshow_boolean_cmd ("raw-frame-arguments", no_class, | |
3110 | 3122 | &print_raw_frame_arguments, _("\ |
3111 | 3123 | Set whether to print frame arguments in raw form."), _("\ |
3112 | 3124 | Show whether to print frame arguments in raw form."), _("\ |
3113 | 3125 | If set, frame arguments are printed in raw form, bypassing any\n\ |
3114 | 3126 | pretty-printers for that value."), |
3115 | 3127 | NULL, NULL, |
3116 | - &setprintrawlist, &showprintrawlist); | |
3128 | + &setprintlist, &showprintlist); | |
3117 | 3129 | |
3118 | 3130 | add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack, |
3119 | 3131 | &disassemble_next_line, _("\ |
@@ -38,7 +38,7 @@ gdb_continue_to_breakpoint "break-here" ".* break-here .*" | ||
38 | 38 | |
39 | 39 | # Test all combinations with raw off. |
40 | 40 | |
41 | -gdb_test_no_output "set print raw frame-arguments off" | |
41 | +gdb_test_no_output "set print raw-frame-arguments off" | |
42 | 42 | |
43 | 43 | gdb_test_no_output "set print frame-arguments none" |
44 | 44 | gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \ |
@@ -57,7 +57,7 @@ gdb_test "frame" \ | ||
57 | 57 | |
58 | 58 | # Test all combinations with raw on. |
59 | 59 | |
60 | -gdb_test_no_output "set print raw frame-arguments on" | |
60 | +gdb_test_no_output "set print raw-frame-arguments on" | |
61 | 61 | |
62 | 62 | gdb_test_no_output "set print frame-arguments none" |
63 | 63 | gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \ |
@@ -36,7 +36,7 @@ gdb_continue_to_breakpoint "break-here" ".* break-here .*" | ||
36 | 36 | |
37 | 37 | # Test all combinations with raw off. |
38 | 38 | |
39 | -gdb_test_no_output "set print raw frame-arguments off" | |
39 | +gdb_test_no_output "set print raw-frame-arguments off" | |
40 | 40 | |
41 | 41 | gdb_test_no_output "set print frame-arguments none" |
42 | 42 | gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \ |
@@ -53,7 +53,7 @@ gdb_test "frame" \ | ||
53 | 53 | |
54 | 54 | # Test all combinations with raw on. |
55 | 55 | |
56 | -gdb_test_no_output "set print raw frame-arguments on" | |
56 | +gdb_test_no_output "set print raw-frame-arguments on" | |
57 | 57 | |
58 | 58 | gdb_test_no_output "set print frame-arguments none" |
59 | 59 | gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \ |
@@ -3248,6 +3248,8 @@ make_value_print_options_def_group (value_print_options *opts) | ||
3248 | 3248 | void |
3249 | 3249 | _initialize_valprint (void) |
3250 | 3250 | { |
3251 | + cmd_list_element *cmd; | |
3252 | + | |
3251 | 3253 | add_prefix_cmd ("print", no_class, set_print, |
3252 | 3254 | _("Generic command for setting how things print."), |
3253 | 3255 | &setprintlist, "set print ", 0, &setlist); |
@@ -3261,13 +3263,18 @@ _initialize_valprint (void) | ||
3261 | 3263 | add_alias_cmd ("p", "print", no_class, 1, &showlist); |
3262 | 3264 | add_alias_cmd ("pr", "print", no_class, 1, &showlist); |
3263 | 3265 | |
3264 | - add_prefix_cmd ("raw", no_class, set_print_raw, | |
3265 | - _("\ | |
3266 | + cmd = add_prefix_cmd ("raw", no_class, set_print_raw, | |
3267 | + _("\ | |
3266 | 3268 | Generic command for setting what things to print in \"raw\" mode."), |
3267 | - &setprintrawlist, "set print raw ", 0, &setprintlist); | |
3268 | - add_prefix_cmd ("raw", no_class, show_print_raw, | |
3269 | - _("Generic command for showing \"print raw\" settings."), | |
3270 | - &showprintrawlist, "show print raw ", 0, &showprintlist); | |
3269 | + &setprintrawlist, "set print raw ", 0, | |
3270 | + &setprintlist); | |
3271 | + deprecate_cmd (cmd, nullptr); | |
3272 | + | |
3273 | + cmd = add_prefix_cmd ("raw", no_class, show_print_raw, | |
3274 | + _("Generic command for showing \"print raw\" settings."), | |
3275 | + &showprintrawlist, "show print raw ", 0, | |
3276 | + &showprintlist); | |
3277 | + deprecate_cmd (cmd, nullptr); | |
3271 | 3278 | |
3272 | 3279 | gdb::option::add_setshow_cmds_for_options |
3273 | 3280 | (class_support, &user_print_options, value_print_option_defs, |