* gdbarch.sh (target_gdbarch): Remove macro.
[deliverable/binutils-gdb.git] / gdb / gcore.c
index 3c8e2f43fbd9e99400bc12829a14469e514f65e7..566798277e04dc736999e4ebce610567db1015cf 100644 (file)
@@ -75,10 +75,10 @@ write_gcore_file (bfd *obfd)
   /* FIXME: uweigand/2011-10-06: All architectures that support core file
      generation should be converted to gdbarch_make_corefile_notes; at that
      point, the target vector method can be removed.  */
-  if (!gdbarch_make_corefile_notes_p (target_gdbarch))
+  if (!gdbarch_make_corefile_notes_p (target_gdbarch ()))
     note_data = target_make_corefile_notes (obfd, &note_size);
   else
-    note_data = gdbarch_make_corefile_notes (target_gdbarch, obfd, &note_size);
+    note_data = gdbarch_make_corefile_notes (target_gdbarch (), obfd, &note_size);
 
   if (note_data == NULL || note_size == 0)
     error (_("Target does not support core file generation."));
@@ -165,7 +165,7 @@ default_gcore_mach (void)
   return 0;
 #else
 
-  const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch);
+  const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch ());
 
   if (bfdarch != NULL)
     return bfdarch->mach;
@@ -179,7 +179,7 @@ default_gcore_mach (void)
 static enum bfd_architecture
 default_gcore_arch (void)
 {
-  const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch);
+  const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch ());
 
   if (bfdarch != NULL)
     return bfdarch->arch;
@@ -193,8 +193,8 @@ static const char *
 default_gcore_target (void)
 {
   /* The gdbarch may define a target to use for core files.  */
-  if (gdbarch_gcore_bfd_target_p (target_gdbarch))
-    return gdbarch_gcore_bfd_target (target_gdbarch);
+  if (gdbarch_gcore_bfd_target_p (target_gdbarch ()))
+    return gdbarch_gcore_bfd_target (target_gdbarch ());
 
   /* Otherwise, try to fall back to the exec_bfd target.  This will probably
      not work for non-ELF targets.  */
@@ -398,7 +398,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
       if (info_verbose)
         {
           fprintf_filtered (gdb_stdout, "Ignore segment, %s bytes at %s\n",
-                            plongest (size), paddress (target_gdbarch, vaddr));
+                            plongest (size), paddress (target_gdbarch (), vaddr));
         }
 
       return 0;
@@ -458,7 +458,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
   if (info_verbose)
     {
       fprintf_filtered (gdb_stdout, "Save segment, %s bytes at %s\n",
-                       plongest (size), paddress (target_gdbarch, vaddr));
+                       plongest (size), paddress (target_gdbarch (), vaddr));
     }
 
   bfd_set_section_size (obfd, osec, size);
@@ -554,7 +554,7 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
          warning (_("Memory read failed for corefile "
                     "section, %s bytes at %s."),
                   plongest (size),
-                  paddress (target_gdbarch, bfd_section_vma (obfd, osec)));
+                  paddress (target_gdbarch (), bfd_section_vma (obfd, osec)));
          break;
        }
       if (!bfd_set_section_contents (obfd, osec, memhunk, offset, size))
@@ -575,8 +575,8 @@ static int
 gcore_memory_sections (bfd *obfd)
 {
   /* Try gdbarch method first, then fall back to target method.  */
-  if (!gdbarch_find_memory_regions_p (target_gdbarch)
-      || gdbarch_find_memory_regions (target_gdbarch,
+  if (!gdbarch_find_memory_regions_p (target_gdbarch ())
+      || gdbarch_find_memory_regions (target_gdbarch (),
                                      gcore_create_callback, obfd) != 0)
     {
       if (target_find_memory_regions (gcore_create_callback, obfd) != 0)
This page took 0.030788 seconds and 4 git commands to generate.