Remove commented-out code from gcore.c
I found some code in gcore.c that has been commented out since
d3420b2fce
(Mark Kettenis 2003-09-04 166) #if 1 /* See if this even matters... */
This patch deletes this entire function, because the body was reduced
to just "return 0".
gdb/ChangeLog
2020-10-29 Tom Tromey <tom@tromey.com>
* gcore.c (default_gcore_mach): Remove.
(create_gcore_bfd): Update.
This commit is contained in:
parent
8a4f140205
commit
784c859246
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
21
gdb/gcore.c
21
gdb/gcore.c
@ -46,7 +46,6 @@
|
||||
|
||||
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).
|
||||
@ -60,7 +59,7 @@ create_gcore_bfd (const char *filename)
|
||||
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;
|
||||
}
|
||||
|
||||
@ -165,24 +164,6 @@ gcore_command (const char *args, int from_tty)
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user