I noticed that get_inferior_args should return const char *, because
it is just returning a reference to something owned by the inferior.
I'm checking this in.
gdb/ChangeLog
2018-09-15 Tom Tromey <tom@tromey.com>
* infcmd.c (get_inferior_args): Return const char *.
* inferior.h (get_inferior_args): Return type now const.
* linux-tdep.c (linux_fill_prpsinfo): Update.
* procfs.c (procfs_target::make_corefile_notes): Update.
+2018-09-15 Tom Tromey <tom@tromey.com>
+
+ * infcmd.c (get_inferior_args): Return const char *.
+ * inferior.h (get_inferior_args): Return type now const.
+ * linux-tdep.c (linux_fill_prpsinfo): Update.
+ * procfs.c (procfs_target::make_corefile_notes): Update.
+
2018-09-07 Tom Tromey <tom@tromey.com>
* python/python.c (execute_gdb_command): Call bpstat_do_actions
"is \"%s\".\n"), inferior_io_terminal);
}
-char *
+const char *
get_inferior_args (void)
{
if (current_inferior ()->argc != 0)
extern void attach_command (const char *, int);
-extern char *get_inferior_args (void);
+extern const char *get_inferior_args (void);
extern void set_inferior_args (const char *);
char filename[100];
/* The basename of the executable. */
const char *basename;
- char *infargs;
+ const char *infargs;
/* Temporary buffer. */
char *tmpstr;
/* The valid states of a process, according to the Linux kernel. */
char psargs[80] = {'\0'};
procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);
char *note_data = NULL;
- char *inf_args;
+ const char *inf_args;
struct procfs_corefile_thread_data thread_args;
enum gdb_signal stop_signal;