2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_filename_cmd): Set the completer to filename_completer. * solib.c (_initialize_solib, reload_shared_libraries): Use add_setshow_filename_cmd. * serial.c (_initialize_serial): Ditto. * remote-utils.c (_initialize_sr_support): Ditto.
This commit is contained in:
parent
68320ddb7e
commit
f397e30345
|
@ -1,5 +1,12 @@
|
||||||
2005-02-17 Andrew Cagney <cagney@gnu.org>
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* cli/cli-decode.c (add_setshow_filename_cmd): Set the completer
|
||||||
|
to filename_completer.
|
||||||
|
* solib.c (_initialize_solib, reload_shared_libraries): Use
|
||||||
|
add_setshow_filename_cmd.
|
||||||
|
* serial.c (_initialize_serial): Ditto.
|
||||||
|
* remote-utils.c (_initialize_sr_support): Ditto.
|
||||||
|
|
||||||
* cli/cli-decode.c (add_setshow_string_noescape_cmd): New function.
|
* cli/cli-decode.c (add_setshow_string_noescape_cmd): New function.
|
||||||
* command.h (add_setshow_string_noescape_cmd): Declare.
|
* command.h (add_setshow_string_noescape_cmd): Declare.
|
||||||
* wince.c (_initialize_wince): Use.
|
* wince.c (_initialize_wince): Use.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "gdb_regex.h"
|
#include "gdb_regex.h"
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
|
#include "completer.h"
|
||||||
#include "ui-out.h"
|
#include "ui-out.h"
|
||||||
|
|
||||||
#include "cli/cli-cmds.h"
|
#include "cli/cli-cmds.h"
|
||||||
|
@ -488,11 +488,13 @@ add_setshow_filename_cmd (char *name, enum command_class class,
|
||||||
struct cmd_list_element **set_list,
|
struct cmd_list_element **set_list,
|
||||||
struct cmd_list_element **show_list)
|
struct cmd_list_element **show_list)
|
||||||
{
|
{
|
||||||
|
struct cmd_list_element *set_result;
|
||||||
add_setshow_cmd_full (name, class, var_filename, var,
|
add_setshow_cmd_full (name, class, var_filename, var,
|
||||||
set_doc, show_doc, help_doc,
|
set_doc, show_doc, help_doc,
|
||||||
set_func, show_func,
|
set_func, show_func,
|
||||||
set_list, show_list,
|
set_list, show_list,
|
||||||
NULL, NULL);
|
&set_result, NULL);
|
||||||
|
set_cmd_completer (set_result, filename_completer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add element named NAME to both the set and show command LISTs (the
|
/* Add element named NAME to both the set and show command LISTs (the
|
||||||
|
|
|
@ -788,10 +788,10 @@ _initialize_proc_api (void)
|
||||||
set_cmd_sfunc (c, set_procfs_trace_cmd);
|
set_cmd_sfunc (c, set_procfs_trace_cmd);
|
||||||
set_cmd_completer (c, filename_completer);
|
set_cmd_completer (c, filename_completer);
|
||||||
|
|
||||||
c = add_set_cmd ("procfs-file", no_class, var_filename,
|
add_setshow_filename_cmd ("procfs-file", no_class, &procfs_filename, _("\
|
||||||
(char *) &procfs_filename,
|
Set filename for /proc tracefile."), _("\
|
||||||
"Set filename for /proc tracefile.\n", &setlist);
|
Show filename for /proc tracefile."), NULL,
|
||||||
|
set_procfs_file_cmd,
|
||||||
deprecated_add_show_from_set (c, &showlist);
|
NULL, /* FIXME: i18n: */
|
||||||
set_cmd_sfunc (c, set_procfs_file_cmd);
|
&setlist, &showlist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -595,14 +595,14 @@ gr_prepare_to_store (void)
|
||||||
void
|
void
|
||||||
_initialize_sr_support (void)
|
_initialize_sr_support (void)
|
||||||
{
|
{
|
||||||
/* FIXME-now: if target is open... */
|
/* FIXME-now: if target is open... */
|
||||||
deprecated_add_show_from_set
|
add_setshow_filename_cmd ("remotedevice", no_class, &sr_settings.device, _("\
|
||||||
(add_set_cmd ("remotedevice", no_class,
|
Set device for remote serial I/O."), _("\
|
||||||
var_filename, (char *) &sr_settings.device,
|
Show device for remote serial I/O."), _("\
|
||||||
"Set device for remote serial I/O.\n\
|
This device is used as the serial port when debugging using remote targets."),
|
||||||
This device is used as the serial port when debugging using remote\n\
|
NULL,
|
||||||
targets.", &setlist),
|
NULL, /* FIXME: i18n: */
|
||||||
&showlist);
|
&setlist, &showlist);
|
||||||
|
|
||||||
add_com ("remote <command>", class_obscure, sr_com,
|
add_com ("remote <command>", class_obscure, sr_com,
|
||||||
_("Send a command to the remote monitor."));
|
_("Send a command to the remote monitor."));
|
||||||
|
|
14
gdb/serial.c
14
gdb/serial.c
|
@ -686,14 +686,14 @@ Show default serial/parallel port configuration."),
|
||||||
0/*allow-unknown*/,
|
0/*allow-unknown*/,
|
||||||
&showlist);
|
&showlist);
|
||||||
|
|
||||||
deprecated_add_show_from_set
|
add_setshow_filename_cmd ("remotelogfile", no_class, &serial_logfile, _("\
|
||||||
(add_set_cmd ("remotelogfile", no_class,
|
Set filename for remote session recording."), _("\
|
||||||
var_filename, (char *) &serial_logfile,
|
Show filename for remote session recording."), _("\
|
||||||
"Set filename for remote session recording.\n\
|
|
||||||
This file is used to record the remote session for future playback\n\
|
This file is used to record the remote session for future playback\n\
|
||||||
by gdbserver.",
|
by gdbserver."),
|
||||||
&setlist),
|
NULL,
|
||||||
&showlist);
|
NULL, /* FIXME: i18n: */
|
||||||
|
&setlist, &showlist);
|
||||||
|
|
||||||
deprecated_add_show_from_set
|
deprecated_add_show_from_set
|
||||||
(add_set_enum_cmd ("remotelogbase", no_class,
|
(add_set_enum_cmd ("remotelogbase", no_class,
|
||||||
|
|
21
gdb/solib.c
21
gdb/solib.c
|
@ -879,7 +879,8 @@ no_shared_libraries (char *ignored, int from_tty)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reload_shared_libraries (char *ignored, int from_tty)
|
reload_shared_libraries (char *ignored, int from_tty,
|
||||||
|
struct cmd_list_element *e)
|
||||||
{
|
{
|
||||||
no_shared_libraries (NULL, from_tty);
|
no_shared_libraries (NULL, from_tty);
|
||||||
solib_add (NULL, from_tty, NULL, auto_solib_add);
|
solib_add (NULL, from_tty, NULL, auto_solib_add);
|
||||||
|
@ -910,14 +911,14 @@ inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
|
||||||
&setlist),
|
&setlist),
|
||||||
&showlist);
|
&showlist);
|
||||||
|
|
||||||
c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
|
add_setshow_filename_cmd ("solib-absolute-prefix", class_support,
|
||||||
(char *) &solib_absolute_prefix,
|
&solib_absolute_prefix, _("\
|
||||||
"Set prefix for loading absolute shared library symbol files.\n\
|
Set prefix for loading absolute shared library symbol files."), _("\
|
||||||
For other (relative) files, you can add values using `set solib-search-path'.",
|
Show prefix for loading absolute shared library symbol files."), _("\
|
||||||
&setlist);
|
For other (relative) files, you can add values using `set solib-search-path'."),
|
||||||
deprecated_add_show_from_set (c, &showlist);
|
reload_shared_libraries,
|
||||||
set_cmd_cfunc (c, reload_shared_libraries);
|
NULL,
|
||||||
set_cmd_completer (c, filename_completer);
|
&setlist, &showlist);
|
||||||
|
|
||||||
/* Set the default value of "solib-absolute-prefix" from the sysroot, if
|
/* Set the default value of "solib-absolute-prefix" from the sysroot, if
|
||||||
one is set. */
|
one is set. */
|
||||||
|
@ -929,6 +930,6 @@ For other (relative) files, you can add values using `set solib-search-path'.",
|
||||||
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
|
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
|
||||||
&setlist);
|
&setlist);
|
||||||
deprecated_add_show_from_set (c, &showlist);
|
deprecated_add_show_from_set (c, &showlist);
|
||||||
set_cmd_cfunc (c, reload_shared_libraries);
|
set_cmd_sfunc (c, reload_shared_libraries);
|
||||||
set_cmd_completer (c, filename_completer);
|
set_cmd_completer (c, filename_completer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue