2005-02-24 Andrew Cagney <cagney@gnu.org>

Add show_VARIABLE functions, update add_setshow call.
	* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
	* valprint.c (_initialize_valprint, show_print_max)
	(show_stop_print_at_null, show_repeat_count_threshold)
	(show_prettyprint_structs, show_unionprint)
	(show_prettyprint_arrays, show_addressprint, show_input_radix)
	(show_output_radix): Ditto.
	* valops.c (_initialize_valops, show_overload_resolution): Ditto.
	* utils.c (initialize_utils, show_chars_per_line)
	(show_lines_per_page, show_demangle, show_pagination_enabled)
	(show_sevenbit_strings, show_asm_demangle): Ditto
	* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
	(show_tui_border_mode, show_tui_active_border_mode): Ditto.
	* top.c (init_main, show_new_async_prompt)
	(show_async_command_editing_p, show_write_history_p)
	(show_history_size, show_history_filename, show_caution)
	(show_annotation_level, init_main): Ditto.
	* target.c (initialize_targets, show_targetdebug)
	(show_trust_readonly): Ditto.
	* symfile.c (_initialize_symfile, show_symbol_reloading)
	(show_ext_args, show_download_write_size)
	(show_debug_file_directory): Ditto.
	* source.c (_initialize_source, show_lines_to_list): Ditto.
	* solib.c (_initialize_solib, show_auto_solib_add)
	(show_solib_search_path): Ditto.
	* p-valprint.c (_initialize_pascal_valprint)
	(show_pascal_static_field_print): Ditto.
	* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
	(show_print_symbol_filename): Add and update.
	* parse.c (_initialize_parse, show_expressiondebug): Dito.
	* observer.c (_initialize_observer, show_observer_debug): Dito.
	* maint.c (_initialize_maint_cmds, show_watchdog)
	(show_maintenance_profile_p): Dito.
	* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
	* infrun.c (_initialize_infrun, show_debug_infrun)
	(show_stop_on_solib_events, show_follow_fork_mode_string)
	(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
	* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
	(show_unwind_on_signal_p): Ditto.
	* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
	(_initialize_gdbtypes, show_overload_debug): Ditto.
	* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
	(show_gdb_events_debug): Ditto.
	* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
	(_initialize_gdbarch): Ditto.
	* frame.c (_initialize_frame, show_backtrace_past_main)
	(show_backtrace_past_entry, show_backtrace_limit)
	(show_frame_debug): Ditto.
	* exec.c (_initialize_exec, show_write_files): Ditto.
	* dwarf2read.c (_initialize_dwarf2_read)
	(show_dwarf2_max_cache_age): Ditto.
	* demangle.c (_initialize_demangler)
	(show_demangling_style_names): Ditto.
	* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
	* cp-valprint.c (show_static_field_print)
	(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
	* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
	* cli/cli-logging.c (_initialize_cli_logging)
	(show_logging_overwrite, show_logging_redirect)
	(show_logging_filename): Ditto.
	* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
	(init_cli_cmds, show_baud_rate, show_remote_debug)
	(show_remote_timeout, show_max_user_call_depth): Ditto.
	* charset.c (show_host_charset_name, show_target_charset_name)
	(initialize_charset): Ditto.
	* breakpoint.c (show_can_use_hw_watchpoints)
	(show_pending_break_support, _initialize_breakpoint): Ditto.
This commit is contained in:
Andrew Cagney 2005-02-24 13:51:36 +00:00
parent 47d8304e88
commit 920d2a4419
35 changed files with 812 additions and 88 deletions

View File

@ -1,3 +1,73 @@
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-23 Jim Blandy <jimb@redhat.com>
* disasm.c (gdb_disassemble_info): Call disassemble_init_for_target.

View File

@ -204,11 +204,30 @@ static void ep_skip_leading_whitespace (char **s);
if such is available. */
static int can_use_hw_watchpoints;
static void
show_can_use_hw_watchpoints (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
fprintf_filtered (file, _("\
Debugger's willingness to use watchpoint hardware is %s.\n"),
value);
}
/* If AUTO_BOOLEAN_FALSE, gdb will not attempt to create pending breakpoints.
If AUTO_BOOLEAN_TRUE, gdb will automatically create pending breakpoints
for unrecognized breakpoint locations.
If AUTO_BOOLEAN_AUTO, gdb will query when breakpoints are unrecognized. */
static enum auto_boolean pending_break_support;
static void
show_pending_break_support (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
fprintf_filtered (file, _("\
Debugger's behavior regarding pending breakpoints is %s.\n"),
value);
}
void _initialize_breakpoint (void);
@ -7928,6 +7947,8 @@ an expression is either read or written."));
_("Synonym for ``info breakpoints''."));
/* XXX: cagney/2005-02-23: This should be a boolean, and should
respond to changes - contrary to the description. */
add_setshow_zinteger_cmd ("can-use-hw-watchpoints", class_support,
&can_use_hw_watchpoints, _("\
Set debugger's willingness to use watchpoint hardware."), _("\
@ -7937,7 +7958,7 @@ such is available. (However, any hardware watchpoints that were\n\
created before setting this to nonzero, will continue to use watchpoint\n\
hardware.)"),
NULL,
NULL, /* FIXME: i18n: */
show_can_use_hw_watchpoints,
&setlist, &showlist);
can_use_hw_watchpoints = 1;
@ -7964,7 +7985,7 @@ pending breakpoint. If off, an unrecognized breakpoint location results in\n\
an error. If auto, an unrecognized breakpoint location results in a\n\
user-query to see if a pending breakpoint should be created."),
NULL,
NULL, /* FIXME: i18n: Debugger's behavior regarding pending breakpoints is %s. */
show_pending_break_support,
&breakpoint_set_cmdlist,
&breakpoint_show_cmdlist);

View File

@ -165,7 +165,23 @@ struct translation {
#endif
static const char *host_charset_name = GDB_DEFAULT_HOST_CHARSET;
static void
show_host_charset_name (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
fprintf_filtered (file, _("The host character set is \"%s\".\n"), value);
}
static const char *target_charset_name = GDB_DEFAULT_TARGET_CHARSET;
static void
show_target_charset_name (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The target character set is \"%s\".\n"),
value);
}
static const char *host_charset_enum[] =
{
@ -1243,7 +1259,7 @@ You may only use supersets of ASCII for your host character set; GDB does\n\
not support any others.\n\
To see a list of the character sets GDB supports, type `set host-charset <TAB>'."),
set_host_charset_sfunc,
NULL, /* FIXME: i18n: */
show_host_charset_name,
&setlist, &showlist);
add_setshow_enum_cmd ("target-charset", class_support,
@ -1255,6 +1271,6 @@ GDB translates characters and strings between the host and target\n\
character sets as needed.\n\
To see a list of the character sets GDB supports, type `set target-charset'<TAB>"),
set_target_charset_sfunc,
NULL, /* FIXME: i18n: */
show_target_charset_name,
&setlist, &showlist);
}

View File

@ -1039,6 +1039,60 @@ init_cmd_lists (void)
showchecklist = NULL;
}
static void
show_info_verbose (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
if (info_verbose)
fprintf_filtered (file, _("\
Verbose printing of informational messages is %s.\n"), value);
else
fprintf_filtered (file, _("Verbosity is %s.\n"), value);
}
static void
show_history_expansion_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("History expansion on command input is %s.\n"),
value);
}
static void
show_baud_rate (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Baud rate for remote serial I/O is %s.\n"),
value);
}
static void
show_remote_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Debugging of remote protocol is %s.\n"),
value);
}
static void
show_remote_timeout (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Timeout limit to wait for target to respond is %s.\n"),
value);
}
static void
show_max_user_call_depth (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The max call depth for user-defined commands is %s.\n"),
value);
}
void
init_cli_cmds (void)
@ -1125,7 +1179,7 @@ when gdb is started."), &cmdlist);
Set verbosity."), _("\
Show verbosity."), NULL,
set_verbose,
NULL, /* FIXME: i18n: */
show_info_verbose,
&setlist, &showlist);
add_prefix_cmd ("history", class_support, set_history,
@ -1140,7 +1194,7 @@ Set history expansion on command input."), _("\
Show history expansion on command input."), _("\
Without an argument, history expansion is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_history_expansion_p,
&sethistlist, &showhistlist);
add_prefix_cmd ("info", class_info, info_command, _("\
@ -1187,7 +1241,7 @@ Show baud rate for remote serial I/O."), _("\
This value is used to set the speed of the serial port when debugging\n\
using remote targets."),
NULL,
NULL, /* FIXME: i18n: */
show_baud_rate,
&setlist, &showlist);
add_setshow_zinteger_cmd ("remote", no_class, &remote_debug, _("\
@ -1196,7 +1250,7 @@ Show debugging of remote protocol."), _("\
When enabled, each packet sent or received with the remote target\n\
is displayed."),
NULL,
NULL, /* FIXME: i18n: */
show_remote_debug,
&setdebuglist, &showdebuglist);
add_setshow_integer_cmd ("remotetimeout", no_class, &remote_timeout, _("\
@ -1205,7 +1259,7 @@ Show timeout limit to wait for target to respond."), _("\
This value is used to set the time limit for gdb to wait for a response\n\
from the target."),
NULL,
NULL, /* FIXME: i18n: */
show_remote_timeout,
&setlist, &showlist);
add_prefix_cmd ("debug", no_class, set_debug,
@ -1288,6 +1342,6 @@ With no argument, show definitions of all user defined commands."), &showlist);
Set the max call depth for user-defined commands."), _("\
Show the max call depth for user-defined commands."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_max_user_call_depth,
&setlist, &showlist);
}

View File

@ -38,7 +38,31 @@ static struct saved_output_files saved_output;
static char *saved_filename;
static char *logging_filename;
int logging_overwrite, logging_redirect;
static void
show_logging_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The current logfile is \"%s\".\n"),
value);
}
int logging_overwrite;
static void
show_logging_overwrite (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Whether logging overwrites or appends to the log file is %s.\n"),
value);
}
int logging_redirect;
static void
show_logging_redirect (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The logging output mode is %s.\n"), value);
}
/* If we've pushed output files, close them and pop them. */
static void
@ -180,7 +204,7 @@ Set whether logging overwrites or appends to the log file."), _("\
Show whether logging overwrites or appends to the log file."), _("\
If set, logging overrides the log file."),
NULL,
NULL, /* FIXME: i18n: Whether logging overwrites or appends to the log file is %s. */
show_logging_overwrite,
&set_logging_cmdlist, &show_logging_cmdlist);
add_setshow_boolean_cmd ("redirect", class_support, &logging_redirect, _("\
Set the logging output mode."), _("\
@ -188,14 +212,14 @@ Show the logging output mode."), _("\
If redirect is off, output will go to both the screen and the log file.\n\
If redirect is on, output will go only to the log file."),
NULL,
NULL, /* FIXME: i18n: The logging output mode is %s. */
show_logging_redirect,
&set_logging_cmdlist, &show_logging_cmdlist);
add_setshow_filename_cmd ("file", class_support, &logging_filename, _("\
Set the current logfile."), _("\
Show the current logfile."), _("\
The logfile is used when directing GDB's output."),
NULL,
NULL, /* FIXME: i18n: The current logfile is %s. */
show_logging_filename,
&set_logging_cmdlist, &show_logging_cmdlist);
add_cmd ("on", class_support, set_logging_on,
_("Enable logging."), &set_logging_cmdlist);

View File

@ -416,6 +416,12 @@ char *gnutarget;
/* Same thing, except it is "auto" not NULL for the default case. */
static char *gnutarget_string;
static void
show_gnutarget_string (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The current BFD target is \"%s\".\n"), value);
}
static void set_gnutarget_command (char *, int, struct cmd_list_element *);
@ -455,7 +461,7 @@ Set the current BFD target."), _("\
Show the current BFD target."), _("\
Use `set gnutarget auto' to specify automatic detection."),
set_gnutarget_command,
NULL, /* FIXME: i18n: */
show_gnutarget_string,
&setlist, &showlist);
if (getenv ("GNUTARGET"))

View File

@ -38,10 +38,39 @@
#include "cp-support.h"
#include "language.h"
int vtblprint; /* Controls printing of vtbl's */
int objectprint; /* Controls looking up an object's derived type
using what we find in its vtables. */
/* Controls printing of vtbl's */
int vtblprint;
static void
show_vtblprint (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Printing of C++ virtual function tables is %s.\n"),
value);
}
/* Controls looking up an object's derived type using what we find in
its vtables. */
int objectprint;
static void
show_objectprint (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
fprintf_filtered (file, _("\
Printing of object's derived type based on vtable info is %s.\n"),
value);
}
int static_field_print; /* Controls printing of static fields. */
static void
show_static_field_print (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Printing of C++ static members is %s.\n"),
value);
}
static struct obstack dont_print_vb_obstack;
static struct obstack dont_print_statmem_obstack;
@ -815,7 +844,7 @@ _initialize_cp_valprint (void)
Set printing of C++ static members."), _("\
Show printing of C++ static members."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_static_field_print,
&setprintlist, &showprintlist);
/* Turn on printing of static fields. */
static_field_print = 1;
@ -824,14 +853,14 @@ Show printing of C++ static members."), NULL,
Set printing of C++ virtual function tables."), _("\
Show printing of C++ virtual function tables."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_vtblprint,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("object", class_support, &objectprint, _("\
Set printing of object's derived type based on vtable info."), _("\
Show printing of object's derived type based on vtable info."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_objectprint,
&setprintlist, &showprintlist);
/* Give people the defaults which they are used to. */

View File

@ -181,6 +181,13 @@ static void dcache_info (char *exp, int tty);
void _initialize_dcache (void);
static int dcache_enabled_p = 0;
static void
show_dcache_enabled_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Cache use for remote targets is %s.\n"), value);
}
DCACHE *last_cache; /* Used by info dcache */
@ -595,7 +602,7 @@ Unfortunately, gdb does not currently know anything about volatile\n\
registers and thus data caching will produce incorrect results with\n\
volatile registers are in use. By default, this option is off."),
NULL,
NULL, /* FIXME: i18n: */
show_dcache_enabled_p,
&setlist, &showlist);
add_info ("dcache", dcache_info,

View File

@ -56,6 +56,14 @@ static char *current_demangling_style_string;
_initialize_demangler from libiberty_demanglers[] array. */
static const char **demangling_style_names;
static void
show_demangling_style_names(struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The current C++ demangling style is \"%s\".\n"),
value);
}
static void set_demangling_command (char *, int, struct cmd_list_element *);
@ -200,7 +208,7 @@ Set the current C++ demangling style."), _("\
Show the current C++ demangling style."), _("\
Use `set demangle-style' without arguments for a list of demangling styles."),
set_demangling_command,
NULL, /* FIXME: i18n: */
show_demangling_style_names,
&setlist, &showlist);
/* Set the default demangling style chosen at compilation time. */

View File

@ -659,6 +659,15 @@ static struct dwarf2_queue_item *dwarf2_queue, *dwarf2_queue_tail;
sizes of up to at least twenty will improve startup time for
typical inter-CU-reference binaries, at an obvious memory cost. */
static int dwarf2_max_cache_age = 5;
static void
show_dwarf2_max_cache_age (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The upper bound on the age of cached dwarf2 compilation units is %s.\n"),
value);
}
/* Various complaints about symbol reading that don't abort the process */
@ -9650,7 +9659,7 @@ A higher limit means that cached compilation units will be stored\n\
in memory longer, and more total memory will be used. Zero disables\n\
caching, which can slow down startup."),
NULL,
NULL, /* FIXME: i18n: The upper bound on the age of cached dwarf2 compilation units is %d. */
show_dwarf2_max_cache_age,
&set_dwarf2_cmdlist,
&show_dwarf2_cmdlist);
}

View File

@ -78,6 +78,14 @@ bfd *exec_bfd = NULL;
/* Whether to open exec and core files read-only or read-write. */
int write_files = 0;
static void
show_write_files (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Writing into executable and core files is %s.\n"),
value);
}
struct vmap *vmap;
@ -746,7 +754,7 @@ file itself are wrong. Each section must be changed separately. The\n\
Set writing into executable and core files."), _("\
Show writing into executable and core files."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_write_files,
&setlist, &showlist);
add_target (&exec_ops);

View File

@ -112,12 +112,45 @@ struct frame_info
/* Flag to control debugging. */
static int frame_debug;
static void
show_frame_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Frame debugging is %s.\n"), value);
}
/* Flag to indicate whether backtraces should stop at main et.al. */
static int backtrace_past_main;
static void
show_backtrace_past_main (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Whether backtraces should continue past \"main\" is %s.\n"),
value);
}
static int backtrace_past_entry;
static void
show_backtrace_past_entry (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Whether backtraces should continue past the entry point of a program is %s.\n"),
value);
}
static unsigned int backtrace_limit = UINT_MAX;
static void
show_backtrace_limit (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
An upper bound on the number of backtrace levels is %s.\n"),
value);
}
static void
fprint_field (struct ui_file *file, const char *name, int p, CORE_ADDR addr)
@ -1557,7 +1590,7 @@ Normally the caller of \"main\" is not of interest, so GDB will terminate\n\
the backtrace at \"main\". Set this variable if you need to see the rest\n\
of the stack trace."),
NULL,
NULL, /* FIXME: i18n: Whether backtraces should continue past \"main\" is %s. */
show_backtrace_past_main,
&set_backtrace_cmdlist,
&show_backtrace_cmdlist);
@ -1571,7 +1604,7 @@ Normally there are no callers beyond the entry point of a program, so GDB\n\
will terminate the backtrace there. Set this variable if you need to see \n\
the rest of the stack trace."),
NULL,
NULL, /* FIXME: i18n: Whether backtraces should continue past the entry point is %s. */
show_backtrace_past_entry,
&set_backtrace_cmdlist,
&show_backtrace_cmdlist);
@ -1582,7 +1615,7 @@ Show the upper bound on the number of backtrace levels."), _("\
No more than the specified number of frames can be displayed or examined.\n\
Zero is unlimited."),
NULL,
NULL, /* FIXME: i18n: An upper bound on the number of backtrace levels is %s. */
show_backtrace_limit,
&set_backtrace_cmdlist,
&show_backtrace_cmdlist);
@ -1592,6 +1625,6 @@ Set frame debugging."), _("\
Show frame debugging."), _("\
When non-zero, frame specific internal debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_frame_debug,
&setdebuglist, &showdebuglist);
}

View File

@ -45,6 +45,13 @@ static struct gdb_events queue_event_hooks;
static struct gdb_events *current_event_hooks = &null_event_hooks;
int gdb_events_debug;
static void
show_gdb_events_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Event debugging is %s.\n"), value);
}
void
breakpoint_create_event (int b)
@ -338,6 +345,6 @@ Set event debugging."), _("\
Show event debugging."), _("\
When non-zero, event/notify debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_gdb_events_debug,
&setdebuglist, &showdebuglist);
}

View File

@ -225,6 +225,13 @@ static struct gdb_events queue_event_hooks;
static struct gdb_events *current_event_hooks = &null_event_hooks;
int gdb_events_debug;
static void
show_gdb_events_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Event debugging is %s.\\n"), value);
}
EOF
# function bodies
@ -480,7 +487,7 @@ Set event debugging."), _("\\
Show event debugging."), _("\\
When non-zero, event/notify debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_gdb_events_debug,
&setdebuglist, &showdebuglist);
}
EOF

View File

@ -61,6 +61,12 @@ static void alloc_gdbarch_data (struct gdbarch *);
#define GDBARCH_DEBUG 0
#endif
int gdbarch_debug = GDBARCH_DEBUG;
static void
show_gdbarch_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
}
static const char *
pformat (const struct floatformat *format)
@ -4204,6 +4210,6 @@ Set architecture debugging."), _("\
Show architecture debugging."), _("\
When non-zero, architecture debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_gdbarch_debug,
&setdebuglist, &showdebuglist);
}

View File

@ -1176,6 +1176,12 @@ static void alloc_gdbarch_data (struct gdbarch *);
#define GDBARCH_DEBUG 0
#endif
int gdbarch_debug = GDBARCH_DEBUG;
static void
show_gdbarch_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Architecture debugging is %s.\\n"), value);
}
static const char *
pformat (const struct floatformat *format)
@ -2221,7 +2227,7 @@ Set architecture debugging."), _("\\
Show architecture debugging."), _("\\
When non-zero, architecture debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_gdbarch_debug,
&setdebuglist, &showdebuglist);
}
EOF

View File

@ -124,7 +124,22 @@ struct type *builtin_type_CORE_ADDR;
struct type *builtin_type_bfd_vma;
int opaque_type_resolution = 1;
static void
show_opaque_type_resolution (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Resolution of opaque struct/class/union types (if set before loading symbols) is %s.\n"),
value);
}
int overload_debug = 0;
static void
show_overload_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Debugging of C++ overloading is %s.\n"), value);
}
struct extra
{
@ -3257,7 +3272,7 @@ build_gdbtypes (void)
Set resolution of opaque struct/class/union types (if set before loading symbols)."), _("\
Show resolution of opaque struct/class/union types (if set before loading symbols)."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_opaque_type_resolution,
&setlist, &showlist);
opaque_type_resolution = 1;
@ -3712,6 +3727,6 @@ Set debugging of C++ overloading."), _("\
Show debugging of C++ overloading."), _("\
When enabled, ranking of the functions is displayed."),
NULL,
NULL, /* FIXME: i18n: */
show_overload_debug,
&setdebuglist, &showdebuglist);
}

View File

@ -65,6 +65,14 @@
with "set coerce-float-to-double 0". */
static int coerce_float_to_double_p = 1;
static void
show_coerce_float_to_double_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Coercion of floats to doubles when calling functions is %s.\n"),
value);
}
/* This boolean tells what gdb should do if a signal is received while
in a function called from gdb (call dummy). If set, gdb unwinds
@ -74,6 +82,15 @@ static int coerce_float_to_double_p = 1;
The default is to stop in the frame where the signal was received. */
int unwind_on_signal_p = 0;
static void
show_unwind_on_signal_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Unwinding of stack if a signal is received while in a call dummy is %s.\n"),
value);
}
/* Perform the standard coercions that are specified
for arguments to be passed to C functions.
@ -887,7 +904,7 @@ set, GDB will perform the conversion for a function it considers\n\
unprototyped.\n\
The default is to perform the conversion.\n"),
NULL,
NULL, /* FIXME: i18n: Coercion of floats to doubles when calling functions is %s. */
show_coerce_float_to_double_p,
&setlist, &showlist);
add_setshow_boolean_cmd ("unwindonsignal", no_class,
@ -899,6 +916,6 @@ is received while in a function called from gdb (call dummy). If set, gdb\n\
unwinds the stack and restore the context to what as it was before the call.\n\
The default is to stop in the frame where the signal was received."),
NULL,
NULL, /* FIXME: i18n: Unwinding of stack if a signal is received while in a call dummy is %s. */
show_unwind_on_signal_p,
&setlist, &showlist);
}

View File

@ -87,6 +87,12 @@ int inferior_ignoring_leading_exec_events = 0;
no line number information. The normal behavior is that we step
over such function. */
int step_stop_if_no_debug = 0;
static void
show_step_stop_if_no_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Mode of the step operation is %s.\n"), value);
}
/* In asynchronous mode, but simulating synchronous execution. */
@ -108,6 +114,12 @@ static ptid_t previous_inferior_ptid;
static int may_follow_exec = MAY_FOLLOW_EXEC;
static int debug_infrun = 0;
static void
show_debug_infrun (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Inferior debugging is %s.\n"), value);
}
/* If the program uses ELF-style shared libraries, then calls to
functions in shared libraries go through stubs, which live in a
@ -245,6 +257,13 @@ static int trap_expected;
/* Nonzero if we want to give control to the user when we're notified
of shared library events by the dynamic linker. */
static int stop_on_solib_events;
static void
show_stop_on_solib_events (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Stopping for shared library events is %s.\n"),
value);
}
#endif
/* Nonzero means expecting a trace trap
@ -314,6 +333,14 @@ static const char *follow_fork_mode_kind_names[] = {
};
static const char *follow_fork_mode_string = follow_fork_mode_parent;
static void
show_follow_fork_mode_string (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Debugger response to a program call of fork or vfork is \"%s\".\n"),
value);
}
static int
@ -458,13 +485,21 @@ resume_cleanups (void *ignore)
static const char schedlock_off[] = "off";
static const char schedlock_on[] = "on";
static const char schedlock_step[] = "step";
static const char *scheduler_mode = schedlock_off;
static const char *scheduler_enums[] = {
schedlock_off,
schedlock_on,
schedlock_step,
NULL
};
static const char *scheduler_mode = schedlock_off;
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Mode for locking scheduler during execution is \"%s\".\n"),
value);
}
static void
set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
@ -3835,7 +3870,7 @@ Set inferior debugging."), _("\
Show inferior debugging."), _("\
When non-zero, inferior specific debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_debug_infrun,
&setdebuglist, &showdebuglist);
numsigs = (int) TARGET_SIGNAL_LAST;
@ -3894,7 +3929,7 @@ If nonzero, gdb will give control to the user when the dynamic linker\n\
notifies gdb of shared library events. The most common event of interest\n\
to the user would be loading/unloading of a new library."),
NULL,
NULL, /* FIXME: i18n: */
show_stop_on_solib_events,
&setlist, &showlist);
#endif
@ -3909,7 +3944,7 @@ A fork or vfork creates a new process. follow-fork-mode can be:\n\
The unfollowed process will continue to run.\n\
By default, the debugger will follow the parent process."),
NULL,
NULL, /* FIXME: i18n: */
show_follow_fork_mode_string,
&setlist, &showlist);
add_setshow_enum_cmd ("scheduler-locking", class_run,
@ -3922,7 +3957,7 @@ step == scheduler locked during every single-step operation.\n\
In this mode, no other thread may run during a step command.\n\
Other threads may run while stepping over a function call ('next')."),
set_schedlock_func, /* traps on target vector */
NULL, /* FIXME: i18n: */
show_scheduler_mode,
&setlist, &showlist);
add_setshow_boolean_cmd ("step-mode", class_run, &step_stop_if_no_debug, _("\
@ -3932,7 +3967,7 @@ When set, doing a step over a function without debug line information\n\
will stop at the first instruction of that function. Otherwise, the\n\
function is skipped and the step command stops at a different source line."),
NULL,
NULL, /* FIXME: i18n: */
show_step_stop_if_no_debug,
&setlist, &showlist);
/* ptid initializations */

View File

@ -82,6 +82,13 @@
#endif
static int debug_linux_nat;
static void
show_debug_linux_nat (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Debugging of GNU/Linux lwp module is %s.\n"),
value);
}
static int linux_parent_pid;
@ -3089,7 +3096,7 @@ Set debugging of GNU/Linux lwp module."), _("\
Show debugging of GNU/Linux lwp module."), _("\
Enables printf debugging output."),
NULL,
NULL, /* FIXME: i18n: */
show_debug_linux_nat,
&setdebuglist, &showdebuglist);
}

View File

@ -69,6 +69,12 @@ static void maintenance_do_deprecate (char *, int);
and one with slow communications. */
int watchdog = 0;
static void
show_watchdog (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Watchdog timer is %s.\n"), value);
}
/*
@ -629,6 +635,12 @@ maintenance_show_cmd (char *args, int from_tty)
/* Profiling support. */
static int maintenance_profile_p;
static void
show_maintenance_profile_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Internal profiling is %s.\n"), value);
}
#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
@ -859,7 +871,7 @@ When non-zero, this timeout is used instead of waiting forever for a target\n\
to finish a low-level step or continue operation. If the specified amount\n\
of time passes without a response from the target, an error occurs."),
NULL,
NULL, /* FIXME: i18n: */
show_watchdog,
&setlist, &showlist);
add_setshow_boolean_cmd ("profile", class_maintenance,
@ -868,7 +880,7 @@ Set internal profiling."), _("\
Show internal profiling."), _("\
When enabled GDB is profiled."),
maintenance_set_profile_cmd,
NULL, /* FIXME: i18n: Internal profiling is %s. */
show_maintenance_profile_p,
&maintenance_set_cmdlist,
&maintenance_show_cmdlist);
}

View File

@ -57,6 +57,12 @@
#include "gdbcmd.h"
static int observer_debug;
static void
show_observer_debug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Observer debugging is %s.\n"), value);
}
/* The internal generic observer. */
@ -205,7 +211,7 @@ Set observer debugging."), _("\
Show observer debugging."), _("\
When non-zero, observer debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: Observer debugging is %s. */
show_observer_debug,
&setdebuglist, &showdebuglist);
}

View File

@ -580,6 +580,13 @@ extern int vtblprint; /* Controls printing of vtbl's */
extern int objectprint; /* Controls looking up an object's derived type
using what we find in its vtables. */
static int pascal_static_field_print; /* Controls printing of static fields. */
static void
show_pascal_static_field_print (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Printing of pascal static members is %s.\n"),
value);
}
static struct obstack dont_print_vb_obstack;
static struct obstack dont_print_statmem_obstack;
@ -1112,7 +1119,7 @@ _initialize_pascal_valprint (void)
Set printing of pascal static members."), _("\
Show printing of pascal static members."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_pascal_static_field_print,
&setprintlist, &showprintlist);
/* Turn on printing of static fields. */
pascal_static_field_print = 1;

View File

@ -81,6 +81,12 @@ int paren_depth;
int comma_terminates;
static int expressiondebug = 0;
static void
show_expressiondebug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Expression debugging is %s.\n"), value);
}
static void free_funcalls (void *ignore);
@ -1318,6 +1324,6 @@ Set expression debugging."), _("\
Show expression debugging."), _("\
When non-zero, the internal representation of expressions will be printed."),
NULL,
NULL, /* FIXME: i18n: */
show_expressiondebug,
&setdebuglist, &showdebuglist);
}

View File

@ -83,10 +83,26 @@ static struct value *last_examine_value;
printed as `0x1234 <symbol+offset>'. */
static unsigned int max_symbolic_offset = UINT_MAX;
static void
show_max_symbolic_offset (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The largest offset that will be printed in <symbol+1234> form is %s.\n"),
value);
}
/* Append the source filename and linenumber of the symbol when
printing a symbolic value as `<symbol at filename:linenum>' if set. */
static int print_symbol_filename = 0;
static void
show_print_symbol_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Printing of source filename and line number with <symbol> is %s.\n"),
value);
}
/* Number of auto-display expression currently being displayed.
So that we can disable it if we get an error or a signal within it.
@ -2133,14 +2149,14 @@ environment, the value is printed in its own window."));
Set the largest offset that will be printed in <symbol+1234> form."), _("\
Show the largest offset that will be printed in <symbol+1234> form."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_max_symbolic_offset,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("symbol-filename", no_class,
&print_symbol_filename, _("\
Set printing of source filename and line number with <symbol>."), _("\
Show printing of source filename and line number with <symbol>."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_print_symbol_filename,
&setprintlist, &showprintlist);
/* For examine/instruction a single byte quantity is specified as

View File

@ -70,6 +70,14 @@ static char *solib_absolute_prefix = NULL;
symbol files. This takes precedence over the environment variables PATH
and LD_LIBRARY_PATH. */
static char *solib_search_path = NULL;
static void
show_solib_search_path (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The search path for loading non-absolute shared library symbol files is %s.\n"),
value);
}
/*
@ -886,6 +894,15 @@ reload_shared_libraries (char *ignored, int from_tty,
solib_add (NULL, from_tty, NULL, auto_solib_add);
}
static void
show_auto_solib_add (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Autoloading of shared library symbols is %s.\n"),
value);
}
extern initialize_file_ftype _initialize_solib; /* -Wmissing-prototypes */
void
@ -909,7 +926,7 @@ automatically when the inferior begins execution, when the dynamic linker\n\
informs gdb that a new library has been loaded, or when attaching to the\n\
inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'."),
NULL,
NULL, /* FIXME: i18n: */
show_auto_solib_add,
&setlist, &showlist);
add_setshow_filename_cmd ("solib-absolute-prefix", class_support,
@ -931,6 +948,6 @@ Set the search path for loading non-absolute shared library symbol files."), _("
Show the search path for loading non-absolute shared library symbol files."), _("\
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH."),
reload_shared_libraries,
NULL, /* FIXME: i18n: */
show_solib_search_path,
&setlist, &showlist);
}

View File

@ -91,6 +91,14 @@ static int current_source_line;
things are wrapping, but that would be a fair amount of work. */
int lines_to_list = 10;
static void
show_lines_to_list (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Number of source lines gdb will list by default is %s.\n"),
value);
}
/* Line number of last line printed. Default for various commands.
current_source_line is usually, but not always, the same as this. */
@ -1637,6 +1645,6 @@ The matching line number is also stored as the value of \"$_\"."));
Set number of source lines gdb will list by default."), _("\
Show number of source lines gdb will list by default."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_lines_to_list,
&setlist, &showlist);
}

View File

@ -160,6 +160,15 @@ int symbol_reloading = SYMBOL_RELOADING_DEFAULT;
#else
int symbol_reloading = 0;
#endif
static void
show_symbol_reloading (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Dynamic symbol table reloading multiple times in one run is %s.\n"),
value);
}
/* If non-zero, shared library symbols will be added automatically
when the inferior is created, new libraries are loaded, or when
@ -1052,6 +1061,14 @@ separate_debug_file_exists (const char *name, unsigned long crc)
}
static char *debug_file_directory = NULL;
static void
show_debug_file_directory (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The directory where separate debug symbols are searched for is \"%s\".\n"),
value);
}
#if ! defined (DEBUG_SUBDIRECTORY)
#define DEBUG_SUBDIRECTORY ".debug"
@ -1367,6 +1384,14 @@ load_command (char *arg, int from_tty)
performance compares. */
static int download_write_size = 512;
static void
show_download_write_size (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The write size used when downloading a program is %s.\n"),
value);
}
static int validate_download = 0;
/* Callback service function for generic_load (bfd_map_over_sections). */
@ -2086,6 +2111,14 @@ add_filename_language (char *ext, enum language lang)
}
static char *ext_args;
static void
show_ext_args (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Mapping between filename extension and source language is \"%s\".\n"),
value);
}
static void
set_ext_lang_command (char *args, int from_tty, struct cmd_list_element *e)
@ -3565,7 +3598,7 @@ for access from GDB."), &cmdlist);
Set dynamic symbol table reloading multiple times in one run."), _("\
Show dynamic symbol table reloading multiple times in one run."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_symbol_reloading,
&setlist, &showlist);
add_prefix_cmd ("overlay", class_support, overlay_command,
@ -3601,7 +3634,7 @@ Set mapping between filename extension and source language."), _("\
Show mapping between filename extension and source language."), _("\
Usage: set extension-language .foo bar"),
set_ext_lang_command,
NULL, /* FIXME: i18n: */
show_ext_args,
&setlist, &showlist);
add_info ("extensions", info_ext_lang_command,
@ -3617,7 +3650,7 @@ blocked writes. The actual size of each transfer is also\n\
limited by the size of the target packet and the memory\n\
cache."),
NULL,
NULL, /* FIXME: i18n: */
show_download_write_size,
&setlist, &showlist);
debug_file_directory = xstrdup (DEBUGDIR);
@ -3630,6 +3663,6 @@ directory as the binary, then in the `" DEBUG_SUBDIRECTORY "' subdirectory,\n\
and lastly at the path of the directory of the binary with\n\
the global debug-file directory prepended."),
NULL,
NULL, /* FIXME: i18n: */
show_debug_file_directory,
&setlist, &showlist);
}

View File

@ -203,6 +203,12 @@ int attach_flag;
/* Non-zero if we want to see trace of target level stuff. */
static int targetdebug = 0;
static void
show_targetdebug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Target debugging is %s.\n"), value);
}
static void setup_target_debug (void);
@ -1032,6 +1038,14 @@ target_stopped_data_address_p (struct target_ops *target)
#endif
static int trust_readonly = 0;
static void
show_trust_readonly (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Mode for reading from readonly sections is %s.\n"),
value);
}
/* Move memory to or from the targets. The top target gets priority;
if it cannot handle it, it is offered to the next one down, etc.
@ -2559,7 +2573,7 @@ When non-zero, target debugging is enabled. Higher numbers are more\n\
verbose. Changes do not take effect until the next \"run\" or \"target\"\n\
command."),
NULL,
NULL, /* FIXME: i18n: */
show_targetdebug,
&setdebuglist, &showdebuglist);
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
@ -2570,7 +2584,7 @@ When this mode is on, memory reads from readonly sections (such as .text)\n\
will be read from the object file instead of from the target. This will\n\
result in significant performance improvement for remote targets."),
NULL,
NULL, /* FIXME: i18n: Mode for reading from readonly sections is %s. */
show_trust_readonly,
&setlist, &showlist);
add_com ("monitor", class_obscure, do_monitor_command,

View File

@ -88,6 +88,14 @@ extern char lang_frame_mismatch_warn[]; /* language.c */
/* Flag for whether we want all the "from_tty" gubbish printed. */
int caution = 1; /* Default is yes, sigh. */
static void
show_caution (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Whether to confirm potentially dangerous operations is %s.\n"),
value);
}
/* stdio stream that command input is being read from. Set to stdin normally.
Set by source_command to the file we are sourcing. Set to NULL if we are
@ -655,13 +663,40 @@ gdb_readline (char *prompt_arg)
substitution. These variables are given default values at the end
of this file. */
static int command_editing_p;
/* NOTE 1999-04-29: This variable will be static again, once we modify
gdb to use the event loop as the default command loop and we merge
event-top.c into this file, top.c */
/* static */ int history_expansion_p;
static int write_history_p;
static void
show_write_history_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Saving of the history record on exit is %s.\n"),
value);
}
static int history_size;
static void
show_history_size (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The size of the command history is %s.\n"),
value);
}
static char *history_filename;
static void
show_history_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The filename in which to record the command history is \"%s\".\n"),
value);
}
/* This is like readline(), but it has some gdb-specific behavior.
gdb can use readline in both the synchronous and async modes during
@ -1335,6 +1370,37 @@ init_history (void)
read_history (history_filename);
}
static void
show_new_async_prompt (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Gdb's prompt is \"%s\".\n"), value);
}
static void
show_async_command_editing_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Editing of command lines as they are typed is %s.\n"),
value);
}
static void
show_annotation_level (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Annotation_level is %s.\n"), value);
}
static void
show_exec_done_display_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Notification of completion for asynchronous execution commands is %s.\n"),
value);
}
static void
init_main (void)
{
@ -1379,7 +1445,7 @@ init_main (void)
Set gdb's prompt"), _("\
Show gdb's prompt"), NULL,
set_async_prompt,
NULL, /* FIXME: i18n: */
show_new_async_prompt,
&setlist, &showlist);
add_com ("dont-repeat", class_support, dont_repeat_command, _("\
@ -1395,7 +1461,7 @@ Use \"on\" to enable the editing, and \"off\" to disable it.\n\
Without an argument, command line editing is enabled. To edit, use\n\
EMACS-like or VI-like commands like control-P or ESC."),
set_async_editing_command,
NULL, /* FIXME: i18n: */
show_async_command_editing_p,
&setlist, &showlist);
add_setshow_boolean_cmd ("save", no_class, &write_history_p, _("\
@ -1404,7 +1470,7 @@ Show saving of the history record on exit."), _("\
Use \"on\" to enable the saving, and \"off\" to disable it.\n\
Without an argument, saving is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_write_history_p,
&sethistlist, &showhistlist);
add_setshow_integer_cmd ("size", no_class, &history_size, _("\
@ -1412,7 +1478,7 @@ Set the size of the command history,"), _("\
Show the size of the command history,"), _("\
ie. the number of previous commands to keep a record of."),
set_history_size_command,
NULL, /* FIXME: i18n: */
show_history_size,
&sethistlist, &showhistlist);
add_setshow_filename_cmd ("filename", no_class, &history_filename, _("\
@ -1420,14 +1486,14 @@ Set the filename in which to record the command history"), _("\
Show the filename in which to record the command history"), _("\
(the list of previous commands of which a record is kept)."),
NULL,
NULL, /* FIXME: i18n: */
show_history_filename,
&sethistlist, &showhistlist);
add_setshow_boolean_cmd ("confirm", class_support, &caution, _("\
Set whether to confirm potentially dangerous operations."), _("\
Show whether to confirm potentially dangerous operations."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_caution,
&setlist, &showlist);
add_setshow_zinteger_cmd ("annotate", class_obscure, &annotation_level, _("\
@ -1436,7 +1502,7 @@ Show annotation_level."), _("\
0 == normal; 1 == fullname (for use when running under emacs)\n\
2 == output annotated suitably for use by programs that control GDB."),
set_async_annotation_level,
NULL, /* FIXME: i18n: */
show_annotation_level,
&setlist, &showlist);
add_setshow_boolean_cmd ("exec-done-display", class_support,
@ -1445,7 +1511,7 @@ Set notification of completion for asynchronous execution commands."), _("\
Show notification of completion for asynchronous execution commands."), _("\
Use \"on\" to enable the notification, and \"off\" to disable it."),
NULL,
NULL, /* FIXME: i18n: */
show_exec_done_display_p,
&setlist, &showlist);
}

View File

@ -198,8 +198,34 @@ struct tui_translate tui_border_kind_translate_lrcorner[] = {
/* Tui configuration variables controlled with set/show command. */
const char *tui_active_border_mode = "bold-standout";
static void
show_tui_active_border_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The attribute mode to use for the active TUI window border is \"%s\".\n"),
value);
}
const char *tui_border_mode = "normal";
static void
show_tui_border_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
The attribute mode to use for the TUI window borders is \"%s\".\n"),
value);
}
const char *tui_border_kind = "acs";
static void
show_tui_border_kind (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("The kind of border for TUI windows is \"%s\".\n"),
value);
}
/* Tui internal configuration variables. These variables are
updated by tui_update_variables to reflect the tui configuration
@ -383,7 +409,7 @@ space use a white space\n\
ascii use ascii characters + - | for the border\n\
acs use the Alternate Character Set"),
NULL,
NULL, /* FIXME: i18n: */
show_tui_border_kind,
&tui_setlist, &tui_showlist);
add_setshow_enum_cmd ("border-mode", no_class, tui_border_mode_enums,
@ -399,7 +425,7 @@ half-standout use half bright and standout mode\n\
bold use extra bright or bold\n\
bold-standout use extra bright or bold with standout mode"),
NULL,
NULL, /* FIXME: i18n: */
show_tui_border_mode,
&tui_setlist, &tui_showlist);
add_setshow_enum_cmd ("active-border-mode", no_class, tui_border_mode_enums,
@ -415,7 +441,7 @@ half-standout use half bright and standout mode\n\
bold use extra bright or bold\n\
bold-standout use extra bright or bold with standout mode"),
NULL,
NULL, /* FIXME: i18n: */
show_tui_active_border_mode,
&tui_setlist, &tui_showlist);
}

View File

@ -133,18 +133,42 @@ int immediate_quit;
C++/ObjC form rather than raw. */
int demangle = 1;
static void
show_demangle (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Demangling of encoded C++/ObjC names when displaying symbols is %s.\n"),
value);
}
/* Nonzero means that encoded C++/ObjC names should be printed out in their
C++/ObjC form even in assembler language displays. If this is set, but
DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */
int asm_demangle = 0;
static void
show_asm_demangle (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Demangling of C++/ObjC names in disassembly listings is %s.\n"),
value);
}
/* Nonzero means that strings with character values >0x7F should be printed
as octal escapes. Zero means just print the value (e.g. it's an
international character, and the terminal or window can cope.) */
int sevenbit_strings = 0;
static void
show_sevenbit_strings (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Printing of 8-bit characters in strings as \\nnn is %s.\n"),
value);
}
/* String to be printed before error messages, if any. */
@ -159,6 +183,13 @@ char *quit_pre_print;
char *warning_pre_print = "\nwarning: ";
int pagination_enabled = 1;
static void
show_pagination_enabled (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("State of pagination is %s.\n"), value);
}
/* Add a new cleanup to the cleanup_chain,
@ -1525,9 +1556,25 @@ fputstrn_unfiltered (const char *str, int n, int quoter,
/* Number of lines per page or UINT_MAX if paging is disabled. */
static unsigned int lines_per_page;
static void
show_lines_per_page (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Number of lines gdb thinks are in a page is %s.\n"),
value);
}
/* Number of chars per line or UINT_MAX if line folding is disabled. */
static unsigned int chars_per_line;
static void
show_chars_per_line (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Number of characters gdb thinks are in a line is %s.\n"),
value);
}
/* Current count of lines printed on this page, chars on this line. */
static unsigned int lines_printed, chars_printed;
@ -2450,14 +2497,14 @@ initialize_utils (void)
Set number of characters gdb thinks are in a line."), _("\
Show number of characters gdb thinks are in a line."), NULL,
set_width_command,
NULL, /* FIXME: i18n: */
show_chars_per_line,
&setlist, &showlist);
add_setshow_uinteger_cmd ("height", class_support, &lines_per_page, _("\
Set number of lines gdb thinks are in a page."), _("\
Show number of lines gdb thinks are in a page."), NULL,
set_height_command,
NULL, /* FIXME: i18n: */
show_lines_per_page,
&setlist, &showlist);
init_page_info ();
@ -2466,7 +2513,7 @@ Show number of lines gdb thinks are in a page."), NULL,
Set demangling of encoded C++/ObjC names when displaying symbols."), _("\
Show demangling of encoded C++/ObjC names when displaying symbols."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_demangle,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("pagination", class_support,
@ -2474,7 +2521,7 @@ Show demangling of encoded C++/ObjC names when displaying symbols."), NULL,
Set state of pagination."), _("\
Show state of pagination."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_pagination_enabled,
&setlist, &showlist);
if (xdb_commands)
@ -2490,14 +2537,14 @@ Show state of pagination."), NULL,
Set printing of 8-bit characters in strings as \\nnn."), _("\
Show printing of 8-bit characters in strings as \\nnn."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_sevenbit_strings,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("asm-demangle", class_support, &asm_demangle, _("\
Set demangling of C++/ObjC names in disassembly listings."), _("\
Show demangling of C++/ObjC names in disassembly listings."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_asm_demangle,
&setprintlist, &showprintlist);
}

View File

@ -126,6 +126,14 @@ static int auto_abandon = 0;
#endif
int overload_resolution = 0;
static void
show_overload_resolution (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Overload resolution in evaluating C++ functions is %s.\n"),
value);
}
/* Find the address of function name NAME in the inferior. */
@ -2838,7 +2846,7 @@ _initialize_valops (void)
Set overload resolution in evaluating C++ functions."), _("\
Show overload resolution in evaluating C++ functions."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_overload_resolution,
&setlist, &showlist);
overload_resolution = 1;
}

View File

@ -67,11 +67,37 @@ void _initialize_valprint (void);
unsigned int print_max;
#define PRINT_MAX_DEFAULT 200 /* Start print_max off at this value. */
static void
show_print_max (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Limit on string chars or array elements to print is %s.\n"),
value);
}
/* Default input and output radixes, and output format letter. */
unsigned input_radix = 10;
static void
show_input_radix (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Default input radix for entering numbers is %s.\n"),
value);
}
unsigned output_radix = 10;
static void
show_output_radix (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Default output radix for printing of values is %s.\n"),
value);
}
int output_format = 0;
/* Print repeat counts if there are more than this many repetitions of an
@ -79,27 +105,68 @@ int output_format = 0;
print routines. */
unsigned int repeat_count_threshold = 10;
static void
show_repeat_count_threshold (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Threshold for repeated print elements is %s.\n"),
value);
}
/* If nonzero, stops printing of char arrays at first null. */
int stop_print_at_null;
static void
show_stop_print_at_null (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Printing of char arrays to stop at first null char is %s.\n"),
value);
}
/* Controls pretty printing of structures. */
int prettyprint_structs;
static void
show_prettyprint_structs (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Prettyprinting of structures is %s.\n"), value);
}
/* Controls pretty printing of arrays. */
int prettyprint_arrays;
static void
show_prettyprint_arrays (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Prettyprinting of arrays is %s.\n"), value);
}
/* If nonzero, causes unions inside structures or other unions to be
printed. */
int unionprint; /* Controls printing of nested unions. */
static void
show_unionprint (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("\
Printing of unions interior to structures is %s.\n"),
value);
}
/* If nonzero, causes machine addresses to be printed in certain contexts. */
int addressprint; /* Controls printing of machine addresses */
static void
show_addressprint (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Printing of addresses is %s.\n"), value);
}
/* Print data of type TYPE located at VALADDR (within GDB), which came from
@ -1210,14 +1277,14 @@ Set limit on string chars or array elements to print."), _("\
Show limit on string chars or array elements to print."), _("\
\"set print elements 0\" causes there to be no limit."),
NULL,
NULL, /* FIXME: i18n: */
show_print_max,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("null-stop", no_class, &stop_print_at_null, _("\
Set printing of char arrays to stop at first null char."), _("\
Show printing of char arrays to stop at first null char."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_stop_print_at_null,
&setprintlist, &showprintlist);
add_setshow_uinteger_cmd ("repeats", no_class,
@ -1226,49 +1293,49 @@ Set threshold for repeated print elements."), _("\
Show threshold for repeated print elements."), _("\
\"set print repeats 0\" causes all elements to be individually printed."),
NULL,
NULL, /* FIXME: i18n: */
show_repeat_count_threshold,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("pretty", class_support, &prettyprint_structs, _("\
Set prettyprinting of structures."), _("\
Show prettyprinting of structures."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_prettyprint_structs,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("union", class_support, &unionprint, _("\
Set printing of unions interior to structures."), _("\
Show printing of unions interior to structures."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_unionprint,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("array", class_support, &prettyprint_arrays, _("\
Set prettyprinting of arrays."), _("\
Show prettyprinting of arrays."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_prettyprint_arrays,
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("address", class_support, &addressprint, _("\
Set printing of addresses."), _("\
Show printing of addresses."), NULL,
NULL,
NULL, /* FIXME: i18n: */
show_addressprint,
&setprintlist, &showprintlist);
add_setshow_uinteger_cmd ("input-radix", class_support, &input_radix, _("\
Set default input radix for entering numbers."), _("\
Show default input radix for entering numbers."), NULL,
set_input_radix,
NULL, /* FIXME: i18n: */
show_input_radix,
&setlist, &showlist);
add_setshow_uinteger_cmd ("output-radix", class_support, &output_radix, _("\
Set default output radix for printing of values."), _("\
Show default output radix for printing of values."), NULL,
set_output_radix,
NULL, /* FIXME: i18n: */
show_output_radix,
&setlist, &showlist);
/* The "set radix" and "show radix" commands are special in that

View File

@ -34,6 +34,12 @@
/* Non-zero if we want to see trace of varobj level stuff. */
int varobjdebug = 0;
static void
show_varobjdebug (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Varobj debugging is %s.\n"), value);
}
/* String representations of gdb's format codes */
char *varobj_format_string[] =
@ -2545,6 +2551,6 @@ Set varobj debugging."), _("\
Show varobj debugging."), _("\
When non-zero, varobj debugging is enabled."),
NULL,
NULL, /* FIXME: i18n: */
show_varobjdebug,
&setlist, &showlist);
}