ODR warnings for "struct coff_symbol"
[binutils-gdb.git] / gdb / elf-none-tdep.c
index 4cbb664607e735586524cffba1082c784fa212d9..d7d9e1dc3dc229a72aaef58105f32b805181da75 100644 (file)
@@ -1,7 +1,7 @@
 /* Common code for targets with the none ABI (bare-metal), but where the
    BFD library is build with ELF support.
 
-   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+   Copyright (C) 2020-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,9 +49,9 @@ elf_none_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
       fname = lbasename (exe);
       psargs = std::string (exe);
 
-      const char *infargs = get_inferior_args ();
-      if (infargs != nullptr)
-       psargs += " " + std::string (infargs);
+      const std::string &infargs = current_inferior ()->args ();
+      if (!infargs.empty ())
+       psargs += ' ' + infargs;
 
       /* All existing targets that handle writing out prpsinfo expect the
         fname and psargs strings to be at least 16 and 80 characters long
@@ -92,7 +92,7 @@ elf_none_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
      that stopped SIGNALLED_THR.  */
   gdb_signal stop_signal;
   if (signalled_thr != nullptr)
-    stop_signal = signalled_thr->suspend.stop_signal;
+    stop_signal = signalled_thr->stop_signal ();
   else
     stop_signal = GDB_SIGNAL_0;