[3/9] Remove commented-out code from gcore.c

Message ID 20200722033444.18522-4-tom@tromey.com
State New
Headers show
Series
  • Remove some macros from exec.h and progspace.h
Related show

Commit Message

Tom Tromey July 22, 2020, 3:34 a.m.
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 code.

gdb/ChangeLog
2020-07-21  Tom Tromey  <tom@tromey.com>

	* gcore.c (default_gcore_mach): Remove commented-out code.
---
 gdb/ChangeLog |  4 ++++
 gdb/gcore.c   | 12 ------------
 2 files changed, 4 insertions(+), 12 deletions(-)

-- 
2.17.2

Patch

diff --git a/gdb/gcore.c b/gdb/gcore.c
index 7b653fb74e3..8036ce52d50 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -163,19 +163,7 @@  gcore_command (const char *args, int from_tty)
 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