Change extension language pretty-printers to use value API
[deliverable/binutils-gdb.git] / gdb / fbsd-tdep.c
index d7482d3b581f3931e2a0d511fef29bbfc0db9668..ffffb187008b8fcfbd207bf84079e526995ed38f 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for FreeBSD, architecture-independent.
 
-   Copyright (C) 2002-2019 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -673,7 +673,8 @@ fbsd_corefile_thread (struct thread_info *info,
 {
   struct regcache *regcache;
 
-  regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
+  regcache = get_thread_arch_regcache (info->inf->process_target (),
+                                      info->ptid, args->gdbarch);
 
   target_fetch_registers (regcache, -1);
 
@@ -724,14 +725,14 @@ fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
   if (get_exec_file (0))
     {
       const char *fname = lbasename (get_exec_file (0));
-      char *psargs = xstrdup (fname);
+      std::string psargs = fname;
 
-      if (get_inferior_args ())
-       psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
-                          (char *) NULL);
+      const char *infargs = get_inferior_args ();
+      if (infargs != NULL)
+       psargs = psargs + " " + infargs;
 
       note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
-                                         fname, psargs);
+                                         fname, psargs.c_str ());
     }
 
   /* Thread register information.  */
@@ -2084,8 +2085,9 @@ fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   set_gdbarch_get_syscall_number (gdbarch, fbsd_get_syscall_number);
 }
 
+void _initialize_fbsd_tdep ();
 void
-_initialize_fbsd_tdep (void)
+_initialize_fbsd_tdep ()
 {
   fbsd_gdbarch_data_handle =
     gdbarch_data_register_post_init (init_fbsd_gdbarch_data);
This page took 0.026149 seconds and 4 git commands to generate.