static void until_command (char *, int);
-static void path_info (char *, int);
-
static void path_command (char *, int);
static void unset_command (char *, int);
static void disconnect_command (char *, int);
-static void unset_environment_command (char *, int);
-
-static void set_environment_command (char *, int);
-
-static void environment_info (char *, int);
-
static void info_program_command (char *, int);
static void finish_command (char *, int);
}
\f
static void
-environment_info (char *var, int from_tty)
+environment_info (const char *var, int from_tty)
{
if (var)
{
}
static void
-set_environment_command (char *arg, int from_tty)
+set_environment_command (const char *arg, int from_tty)
{
- char *p, *val, *var;
+ const char *p, *val;
int nullset = 0;
if (arg == 0)
while (p != arg && (p[-1] == ' ' || p[-1] == '\t'))
p--;
- var = savestring (arg, p - arg);
+ std::string var (arg, p - arg);
if (nullset)
{
printf_filtered (_("Setting environment variable "
"\"%s\" to null value.\n"),
- var);
- current_inferior ()->environment.set (var, "");
+ var.c_str ());
+ current_inferior ()->environment.set (var.c_str (), "");
}
else
- current_inferior ()->environment.set (var, val);
- xfree (var);
+ current_inferior ()->environment.set (var.c_str (), val);
}
static void
-unset_environment_command (char *var, int from_tty)
+unset_environment_command (const char *var, int from_tty)
{
if (var == 0)
{
static const char path_var_name[] = "PATH";
static void
-path_info (char *args, int from_tty)
+path_info (const char *args, int from_tty)
{
puts_filtered ("Executable and object file path: ");
puts_filtered (current_inferior ()->environment.get (path_var_name));
/* Implement `info proc' family of commands. */
static void
-info_proc_cmd_1 (char *args, enum info_proc_what what, int from_tty)
+info_proc_cmd_1 (const char *args, enum info_proc_what what, int from_tty)
{
struct gdbarch *gdbarch = get_current_arch ();
/* Implement `info proc mappings'. */
static void
-info_proc_cmd_mappings (char *args, int from_tty)
+info_proc_cmd_mappings (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_MAPPINGS, from_tty);
}
/* Implement `info proc stat'. */
static void
-info_proc_cmd_stat (char *args, int from_tty)
+info_proc_cmd_stat (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_STAT, from_tty);
}
/* Implement `info proc status'. */
static void
-info_proc_cmd_status (char *args, int from_tty)
+info_proc_cmd_status (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_STATUS, from_tty);
}
/* Implement `info proc cwd'. */
static void
-info_proc_cmd_cwd (char *args, int from_tty)
+info_proc_cmd_cwd (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_CWD, from_tty);
}
/* Implement `info proc cmdline'. */
static void
-info_proc_cmd_cmdline (char *args, int from_tty)
+info_proc_cmd_cmdline (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_CMDLINE, from_tty);
}
/* Implement `info proc exe'. */
static void
-info_proc_cmd_exe (char *args, int from_tty)
+info_proc_cmd_exe (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_EXE, from_tty);
}
/* Implement `info proc all'. */
static void
-info_proc_cmd_all (char *args, int from_tty)
+info_proc_cmd_all (const char *args, int from_tty)
{
info_proc_cmd_1 (args, IP_ALL, from_tty);
}