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

Tom Tromey tom@tromey.com
Wed Jul 22 03:34:38 GMT 2020


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(-)

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
-- 
2.17.2



More information about the Gdb-patches mailing list