aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-05-18 22:02:47 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-07-23 15:38:54 -0400
commite51695253e5594ea7fda3c52aa9126ee4f9e9fc2 (patch)
treee5b3aaef55d3f3f35c132f135c844587141c0a9e /gdb/linux-tdep.c
parenta69e37dc2b1dbb84a1ba924532cbaede648b69e8 (diff)
downloadgdb-e51695253e5594ea7fda3c52aa9126ee4f9e9fc2.zip
gdb-e51695253e5594ea7fda3c52aa9126ee4f9e9fc2.tar.gz
gdb-e51695253e5594ea7fda3c52aa9126ee4f9e9fc2.tar.bz2
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
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 8c0885e..99e868e 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -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 ();