gdb: fix vfork with multiple threads
[deliverable/binutils-gdb.git] / gdb / regcache-dump.c
index 1bcf9c3d17adf81c8c81710e4b8ad72fb8648349..eebca61474a9cef79a8d6708d5a7d45f3a0b8152 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1986-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1986-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "defs.h"
 #include "gdbcmd.h"
 #include "regcache.h"
-#include "common/def-vector.h"
+#include "gdbsupport/def-vector.h"
 #include "valprint.h"
 #include "remote.h"
 #include "reggroups.h"
 #include "target.h"
+#include "gdbarch.h"
 
 /* Dump registers from regcache, used for dumping raw registers and
    cooked registers.  */
@@ -235,7 +236,7 @@ regcache_print (const char *args, enum regcache_dump_what what_to_dump)
   std::unique_ptr<regcache> regs;
   gdbarch *gdbarch;
 
-  if (target_has_registers)
+  if (target_has_registers ())
     gdbarch = get_current_regcache ()->arch ();
   else
     gdbarch = target_gdbarch ();
@@ -256,7 +257,7 @@ regcache_print (const char *args, enum regcache_dump_what what_to_dump)
       {
        auto dump_pseudo = (what_to_dump == regcache_dump_cooked);
 
-       if (target_has_registers)
+       if (target_has_registers ())
          dump.reset (new register_dump_regcache (get_current_regcache (),
                                                  dump_pseudo));
        else
@@ -304,8 +305,9 @@ maintenance_print_remote_registers (const char *args, int from_tty)
   regcache_print (args, regcache_dump_remote);
 }
 
+void _initialize_regcache_dump ();
 void
-_initialize_regcache_dump (void)
+_initialize_regcache_dump ()
 {
   add_cmd ("registers", class_maintenance, maintenance_print_registers,
           _("Print the internal register configuration.\n"
@@ -328,8 +330,8 @@ _initialize_regcache_dump (void)
           &maintenanceprintlist);
   add_cmd ("remote-registers", class_maintenance,
           maintenance_print_remote_registers, _("\
-Print the internal register configuration including each register's\n\
-remote register number and buffer offset in the g/G packets.\n\
+Print the internal register configuration including remote register number "
+"and g/G packets offset.\n\
 Takes an optional file parameter."),
           &maintenanceprintlist);
 }
This page took 0.024529 seconds and 4 git commands to generate.