@@ -2652,10 +2652,12 @@ _initialize_printcmd (void)
26522652 gdb ::observers ::free_objfile .attach (clear_dangling_display_expressions );
26532653
26542654 add_info ("address" , info_address_command ,
2655- _ ("Describe where symbol SYM is stored." ));
2655+ _ ("Describe where symbol SYM is stored.\n\
2656+ Usage: info address SYM" ));
26562657
26572658 add_info ("symbol" , info_symbol_command , _ ("\
26582659Describe what symbol is at location ADDR.\n\
2660+ Usage: info symbol ADDR\n\
26592661Only for symbols with fixed locations (global or static scope)." ));
26602662
26612663 add_com ("x" , class_vars , x_command , _ ("\
@@ -2673,16 +2675,13 @@ Defaults for format and size letters are those previously used.\n\
26732675Default count is 1. Default address is following last thing printed\n\
26742676with this command or \"print\"." ));
26752677
2676- #if 0
2677- add_com ("whereis" , class_vars , whereis_command ,
2678- _ ("Print line number and file of definition of variable." ));
2679- #endif
2680-
26812678 add_info ("display" , info_display_command , _ ("\
2682- Expressions to display when program stops, with code numbers." ));
2679+ Expressions to display when program stops, with code numbers.\n\
2680+ Usage: info display" ));
26832681
26842682 add_cmd ("undisplay" , class_vars , undisplay_command , _ ("\
26852683Cancel some expressions to be displayed when program stops.\n\
2684+ Usage: undisplay [NUM]...\n\
26862685Arguments are the code numbers of the expressions to stop displaying.\n\
26872686No argument means cancel all automatic-display expressions.\n\
26882687\"delete display\" has the same effect as this command.\n\
@@ -2691,6 +2690,7 @@ Do \"info display\" to see current list of code numbers."),
26912690
26922691 add_com ("display" , class_vars , display_command , _ ("\
26932692Print value of expression EXP each time the program stops.\n\
2693+ Usage: display[/FMT] EXP\n\
26942694/FMT may be used before EXP as in the \"print\" command.\n\
26952695/FMT \"i\" or \"s\" or including a size-letter is allowed,\n\
26962696as in the \"x\" command, and then EXP is used to get the address to examine\n\
@@ -2700,35 +2700,41 @@ Use \"undisplay\" to cancel display requests previously made."));
27002700
27012701 add_cmd ("display" , class_vars , enable_display_command , _ ("\
27022702Enable some expressions to be displayed when program stops.\n\
2703+ Usage: enable display [NUM]...\n\
27032704Arguments are the code numbers of the expressions to resume displaying.\n\
27042705No argument means enable all automatic-display expressions.\n\
27052706Do \"info display\" to see current list of code numbers." ), & enablelist );
27062707
27072708 add_cmd ("display" , class_vars , disable_display_command , _ ("\
27082709Disable some expressions to be displayed when program stops.\n\
2710+ Usage: disable display [NUM]...\n\
27092711Arguments are the code numbers of the expressions to stop displaying.\n\
27102712No argument means disable all automatic-display expressions.\n\
27112713Do \"info display\" to see current list of code numbers." ), & disablelist );
27122714
27132715 add_cmd ("display" , class_vars , undisplay_command , _ ("\
27142716Cancel some expressions to be displayed when program stops.\n\
2717+ Usage: delete display [NUM]...\n\
27152718Arguments are the code numbers of the expressions to stop displaying.\n\
27162719No argument means cancel all automatic-display expressions.\n\
27172720Do \"info display\" to see current list of code numbers." ), & deletelist );
27182721
27192722 add_com ("printf" , class_vars , printf_command , _ ("\
27202723Formatted printing, like the C \"printf\" function.\n\
2721- Usage: printf \"format string\", arg1, arg2, arg3 , ..., argn \n\
2724+ Usage: printf \"format string\", ARG1, ARG2, ARG3 , ..., ARGN \n\
27222725This supports most C printf format specifications, like %s, %d, etc." ));
27232726
27242727 add_com ("output" , class_vars , output_command , _ ("\
27252728Like \"print\" but don't put in value history and don't print newline.\n\
2729+ Usage: output EXP\n\
27262730This is useful in user-defined commands." ));
27272731
27282732 add_prefix_cmd ("set" , class_vars , set_command , _ ("\
2729- Evaluate expression EXP and assign result to variable VAR, using assignment\n\
2730- syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n\
2731- example). VAR may be a debugger \"convenience\" variable (names starting\n\
2733+ Evaluate expression EXP and assign result to variable VAR\n\
2734+ Usage: set VAR = EXP\n\
2735+ This uses assignment syntax appropriate for the current language\n\
2736+ (VAR = EXP or VAR := EXP for example).\n\
2737+ VAR may be a debugger \"convenience\" variable (names starting\n\
27322738with $), a register (a few standard names starting with $), or an actual\n\
27332739variable in the program being debugged. EXP is any valid expression.\n\
27342740Use \"set variable\" for variables with names identical to set subcommands.\n\
@@ -2738,9 +2744,11 @@ You can see these environment settings with the \"show\" command."),
27382744 & setlist , "set " , 1 , & cmdlist );
27392745 if (dbx_commands )
27402746 add_com ("assign" , class_vars , set_command , _ ("\
2741- Evaluate expression EXP and assign result to variable VAR, using assignment\n\
2742- syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n\
2743- example). VAR may be a debugger \"convenience\" variable (names starting\n\
2747+ Evaluate expression EXP and assign result to variable VAR\n\
2748+ Usage: assign VAR = EXP\n\
2749+ This uses assignment syntax appropriate for the current language\n\
2750+ (VAR = EXP or VAR := EXP for example).\n\
2751+ VAR may be a debugger \"convenience\" variable (names starting\n\
27442752with $), a register (a few standard names starting with $), or an actual\n\
27452753variable in the program being debugged. EXP is any valid expression.\n\
27462754Use \"set variable\" for variables with names identical to set subcommands.\n\
@@ -2750,15 +2758,18 @@ You can see these environment settings with the \"show\" command."));
27502758 /* "call" is the same as "set", but handy for dbx users to call fns. */
27512759 c = add_com ("call" , class_vars , call_command , _ ("\
27522760Call a function in the program.\n\
2761+ Usage: call EXP\n\
27532762The argument is the function name and arguments, in the notation of the\n\
27542763current working language. The result is printed and saved in the value\n\
27552764history, if it is not void." ));
27562765 set_cmd_completer (c , expression_completer );
27572766
27582767 add_cmd ("variable" , class_vars , set_command , _ ("\
2759- Evaluate expression EXP and assign result to variable VAR, using assignment\n\
2760- syntax appropriate for the current language (VAR = EXP or VAR := EXP for\n\
2761- example). VAR may be a debugger \"convenience\" variable (names starting\n\
2768+ Evaluate expression EXP and assign result to variable VAR\n\
2769+ Usage: set variable VAR = EXP\n\
2770+ This uses assignment syntax appropriate for the current language\n\
2771+ (VAR = EXP or VAR := EXP for example).\n\
2772+ VAR may be a debugger \"convenience\" variable (names starting\n\
27622773with $), a register (a few standard names starting with $), or an actual\n\
27632774variable in the program being debugged. EXP is any valid expression.\n\
27642775This may usually be abbreviated to simply \"set\"." ),
@@ -2767,6 +2778,7 @@ This may usually be abbreviated to simply \"set\"."),
27672778
27682779 c = add_com ("print" , class_vars , print_command , _ ("\
27692780Print value of expression EXP.\n\
2781+ Usage: print[/FMT] EXP\n\
27702782Variables accessible are those of the lexical environment of the selected\n\
27712783stack frame, plus all those whose scope is global or an entire file.\n\
27722784\n\
@@ -2793,8 +2805,8 @@ but no count or size letter (see \"x\" command)."));
27932805
27942806 add_setshow_uinteger_cmd ("max-symbolic-offset" , no_class ,
27952807 & max_symbolic_offset , _ ("\
2796- Set the largest offset that will be printed in <symbol +1234> form." ), _ ("\
2797- Show the largest offset that will be printed in <symbol +1234> form." ), _ ("\
2808+ Set the largest offset that will be printed in <SYMBOL +1234> form." ), _ ("\
2809+ Show the largest offset that will be printed in <SYMBOL +1234> form." ), _ ("\
27982810Tell GDB to only display the symbolic form of an address if the\n\
27992811offset between the closest earlier symbol and the address is less than\n\
28002812the specified maximum offset. The default is \"unlimited\", which tells GDB\n\
@@ -2805,13 +2817,15 @@ it. Zero is equivalent to \"unlimited\"."),
28052817 & setprintlist , & showprintlist );
28062818 add_setshow_boolean_cmd ("symbol-filename" , no_class ,
28072819 & print_symbol_filename , _ ("\
2808- Set printing of source filename and line number with <symbol >." ), _ ("\
2809- Show printing of source filename and line number with <symbol >." ), NULL ,
2820+ Set printing of source filename and line number with <SYMBOL >." ), _ ("\
2821+ Show printing of source filename and line number with <SYMBOL >." ), NULL ,
28102822 NULL ,
28112823 show_print_symbol_filename ,
28122824 & setprintlist , & showprintlist );
28132825
28142826 add_com ("eval" , no_class , eval_command , _ ("\
2815- Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\
2816- a command line, and call it." ));
2827+ Construct a GDB command and then evaluate it.\n\
2828+ Usage: eval \"format string\", ARG1, ARG2, ARG3, ..., ARGN\n\
2829+ Convert the arguments to a string as \"printf\" would, but then\n\
2830+ treat this string as a command line, and evaluate it." ));
28172831}
0 commit comments