Change get_inferior_args to return const char *

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.
This commit is contained in:
Tom Tromey
2018-09-15 16:29:03 -06:00
parent 3c3741435f
commit cbaaa0cafc
5 changed files with 11 additions and 4 deletions

View File

@@ -161,7 +161,7 @@ extern void post_create_inferior (struct target_ops *, int);
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 *);