diff options
author | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:33 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:35 -0600 |
commit | 784c859246ae2cf3ffa07376cfe8ec60e4526e57 (patch) | |
tree | 751d401c053146fd18136f25b83703862033d4a1 /gdb | |
parent | 8a4f140205d1fb7240b154fd2f9074d7b42330b7 (diff) | |
download | gdb-784c859246ae2cf3ffa07376cfe8ec60e4526e57.zip gdb-784c859246ae2cf3ffa07376cfe8ec60e4526e57.tar.gz gdb-784c859246ae2cf3ffa07376cfe8ec60e4526e57.tar.bz2 |
Remove commented-out code from gcore.c
I found some code in gcore.c that has been commented out since
d3420b2fce5e (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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gcore.c | 21 |
2 files changed, 6 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d06ea47..13d6e56 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 exec_close in exec.c. * exec.c (exec_close): Move to progspace.c. diff --git a/gdb/gcore.c b/gdb/gcore.c index 15721f8..54b43aa 100644 --- a/gdb/gcore.c +++ b/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) { |