+2020-10-29 Tom Tromey <tom@tromey.com>
+
+ * gcore.c (default_gcore_mach): Remove.
+ (create_gcore_bfd): Update.
+
2020-10-29 Tom Tromey <tom@tromey.com>
* progspace.c (program_space::exec_close): New method, from
static const char *default_gcore_target (void);
static enum bfd_architecture default_gcore_arch (void);
-static unsigned long default_gcore_mach (void);
static int gcore_memory_sections (bfd *);
/* create_gcore_bfd -- helper for gcore_command (exported).
if (obfd == NULL)
error (_("Failed to open '%s' for output."), filename);
bfd_set_format (obfd.get (), bfd_core);
- bfd_set_arch_mach (obfd.get (), default_gcore_arch (), default_gcore_mach ());
+ bfd_set_arch_mach (obfd.get (), default_gcore_arch (), 0);
return obfd;
}
fprintf_filtered (gdb_stdout, "Saved corefile %s\n", corefilename.get ());
}
-static unsigned long
-default_gcore_mach (void)
-{
-#if 1 /* See if this even matters... */
- return 0;
-#else
-
- const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch ());
-
- if (bfdarch != NULL)
- return bfdarch->mach;
- if (exec_bfd == NULL)
- error (_("Can't find default bfd machine type (need execfile)."));
-
- return bfd_get_mach (exec_bfd);
-#endif /* 1 */
-}
-
static enum bfd_architecture
default_gcore_arch (void)
{