• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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:

"set print raw frame-arguments"

The problem is that space between "raw" and "frame-arguments".

Calling the option

"bt -raw frame-arguments"

would be odd. So I'm calling the option

"bt -raw-frame-arguments"

instead.

And for consistency, this patch renames the set/show commands to:

"set print raw-frame-arguments"
"show print raw-frame-arguments"

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) set print raw frame-arguments on
Warning: command 'set print raw frame-arguments' is deprecated.
Use 'set print raw-frame-arguments'.

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.

変更サマリ

差分

--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -105,6 +105,13 @@ show style
105105 a style name in their output using its own style, to help
106106 the user visualize the different styles.
107107
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.
108115
109116 * New MI commands
110117
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -585,8 +585,10 @@ const char * const boolean_enums[] = { "on", "off", NULL };
585585 /* Add element named NAME to both the set and show command LISTs (the
586586 list for set/show or some sublist thereof). CLASS is as in
587587 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 *
590592 add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
591593 const char *set_doc, const char *show_doc,
592594 const char *help_doc,
@@ -603,6 +605,8 @@ add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var
603605 set_list, show_list,
604606 &c, NULL);
605607 c->enums = boolean_enums;
608+
609+ return c;
606610 }
607611
608612 /* Add element named NAME to both the set and show command LISTs (the
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -328,15 +328,16 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
328328 struct cmd_list_element **set_list,
329329 struct cmd_list_element **show_list);
330330
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);
340341
341342 extern void add_setshow_filename_cmd (const char *name,
342343 enum command_class theclass,
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10533,16 +10533,16 @@ thus speeding up the display of each Ada frame.
1053310533 @item show print frame-arguments
1053410534 Show how the value of arguments should be displayed when printing a frame.
1053510535
10536-@item set print raw frame-arguments on
10536+@item set print raw-frame-arguments on
1053710537 Print frame arguments in raw, non pretty-printed, form.
1053810538
10539-@item set print raw frame-arguments off
10539+@item set print raw-frame-arguments off
1054010540 Print frame arguments in pretty-printed form, if there is a pretty-printer
1054110541 for the value (@pxref{Pretty Printing}),
1054210542 otherwise print the value in raw form.
1054310543 This is the default.
1054410544
10545-@item show print raw frame-arguments
10545+@item show print raw-frame-arguments
1054610546 Show whether to print frame arguments in raw form.
1054710547
1054810548 @anchor{set print entry-values}
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -3106,14 +3106,26 @@ Usage: func NAME"));
31063106 _("Show printing of non-scalar frame arguments"),
31073107 NULL, NULL, NULL, &setprintlist, &showprintlist);
31083108
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,
31103122 &print_raw_frame_arguments, _("\
31113123 Set whether to print frame arguments in raw form."), _("\
31123124 Show whether to print frame arguments in raw form."), _("\
31133125 If set, frame arguments are printed in raw form, bypassing any\n\
31143126 pretty-printers for that value."),
31153127 NULL, NULL,
3116- &setprintrawlist, &showprintrawlist);
3128+ &setprintlist, &showprintlist);
31173129
31183130 add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack,
31193131 &disassemble_next_line, _("\
--- a/gdb/testsuite/gdb.guile/scm-frame-args.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-args.exp
@@ -38,7 +38,7 @@ gdb_continue_to_breakpoint "break-here" ".* break-here .*"
3838
3939 # Test all combinations with raw off.
4040
41-gdb_test_no_output "set print raw frame-arguments off"
41+gdb_test_no_output "set print raw-frame-arguments off"
4242
4343 gdb_test_no_output "set print frame-arguments none"
4444 gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \
@@ -57,7 +57,7 @@ gdb_test "frame" \
5757
5858 # Test all combinations with raw on.
5959
60-gdb_test_no_output "set print raw frame-arguments on"
60+gdb_test_no_output "set print raw-frame-arguments on"
6161
6262 gdb_test_no_output "set print frame-arguments none"
6363 gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -36,7 +36,7 @@ gdb_continue_to_breakpoint "break-here" ".* break-here .*"
3636
3737 # Test all combinations with raw off.
3838
39-gdb_test_no_output "set print raw frame-arguments off"
39+gdb_test_no_output "set print raw-frame-arguments off"
4040
4141 gdb_test_no_output "set print frame-arguments none"
4242 gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \
@@ -53,7 +53,7 @@ gdb_test "frame" \
5353
5454 # Test all combinations with raw on.
5555
56-gdb_test_no_output "set print raw frame-arguments on"
56+gdb_test_no_output "set print raw-frame-arguments on"
5757
5858 gdb_test_no_output "set print frame-arguments none"
5959 gdb_test "frame" ".*foo \\(x=\[.\]{3}, ss=\[.\]{3}\\).*" \
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -3248,6 +3248,8 @@ make_value_print_options_def_group (value_print_options *opts)
32483248 void
32493249 _initialize_valprint (void)
32503250 {
3251+ cmd_list_element *cmd;
3252+
32513253 add_prefix_cmd ("print", no_class, set_print,
32523254 _("Generic command for setting how things print."),
32533255 &setprintlist, "set print ", 0, &setlist);
@@ -3261,13 +3263,18 @@ _initialize_valprint (void)
32613263 add_alias_cmd ("p", "print", no_class, 1, &showlist);
32623264 add_alias_cmd ("pr", "print", no_class, 1, &showlist);
32633265
3264- add_prefix_cmd ("raw", no_class, set_print_raw,
3265- _("\
3266+ cmd = add_prefix_cmd ("raw", no_class, set_print_raw,
3267+ _("\
32663268 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);
32713278
32723279 gdb::option::add_setshow_cmds_for_options
32733280 (class_support, &user_print_options, value_print_option_defs,