gdb: add setter/getter for inferior arguments

Add args/set_args to the inferior class, remove the set_inferior_args
and get_inferior_args functions, that would just be wrappers around
them.

Change-Id: If87d52f3402ce08be26c32897ae8915d9f6d1ea3
This commit is contained in:
Simon Marchi
2021-05-18 22:02:47 -04:00
parent a69e37dc2b
commit e51695253e
6 changed files with 40 additions and 39 deletions

View File

@@ -1804,7 +1804,6 @@ linux_fill_prpsinfo (struct elf_internal_linux_prpsinfo *p)
char filename[100];
/* The basename of the executable. */
const char *basename;
const char *infargs;
/* Temporary buffer. */
char *tmpstr;
/* The valid states of a process, according to the Linux kernel. */
@@ -1848,7 +1847,7 @@ linux_fill_prpsinfo (struct elf_internal_linux_prpsinfo *p)
strncpy (p->pr_fname, basename, sizeof (p->pr_fname) - 1);
p->pr_fname[sizeof (p->pr_fname) - 1] = '\0';
infargs = get_inferior_args ();
const char *infargs = current_inferior ()->args ();
/* The arguments of the program. */
std::string psargs = fname.get ();