This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] use zuinteger_unlimited for heuristic-fence-post


Hi,
The comment here gives me a feeling that we should convert this
command to zuinteger_unlimited_cmd.

gdb:

2013-02-15  Yao Qi  <yao@codesourcery.com>

	* alpha-tdep.c (_initialize_alpha_tdep): Call
	add_setshow_zuinteger_unlimited_cmd instead of
	add_setshow_zinteger_cmd.
	Remove comments.
	* mips-tdep.c (_initialize_mips_tdep): Likewise.
---
 gdb/alpha-tdep.c |   16 +++++++---------
 gdb/mips-tdep.c  |   16 +++++++---------
 2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index e394605..1a6ceb7 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1872,20 +1872,18 @@ _initialize_alpha_tdep (void)
 
   /* Let the user set the fence post for heuristic_proc_start.  */
 
-  /* We really would like to have both "0" and "unlimited" work, but
-     command.c doesn't deal with that.  So make it a var_zinteger
-     because the user can always use "999999" or some such for unlimited.  */
   /* We need to throw away the frame cache when we set this, since it
      might change our ability to get backtraces.  */
-  add_setshow_zinteger_cmd ("heuristic-fence-post", class_support,
-			    &heuristic_fence_post, _("\
+  add_setshow_zuinteger_unlimited_cmd ("heuristic-fence-post", class_support,
+				       &heuristic_fence_post, _("\
 Set the distance searched for the start of a function."), _("\
 Show the distance searched for the start of a function."), _("\
 If you are debugging a stripped executable, GDB needs to search through the\n\
 program for the start of a function.  This command sets the distance of the\n\
 search.  The only need to set it is when debugging a stripped executable."),
-			    reinit_frame_cache_sfunc,
-			    NULL, /* FIXME: i18n: The distance searched for
-				     the start of a function is \"%d\".  */
-			    &setlist, &showlist);
+				       reinit_frame_cache_sfunc,
+				       NULL, /* FIXME: i18n: The distance
+						searched for the start of a
+						function is \"%d\".  */
+				       &setlist, &showlist);
 }
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c7684f8..12bb8ab 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8884,20 +8884,18 @@ and is updated automatically from ELF file flags if available."),
 	   _("Show current use of MIPS floating-point coprocessor target."),
 	   &showlist);
 
-  /* We really would like to have both "0" and "unlimited" work, but
-     command.c doesn't deal with that.  So make it a var_zinteger
-     because the user can always use "999999" or some such for unlimited.  */
-  add_setshow_zinteger_cmd ("heuristic-fence-post", class_support,
-			    &heuristic_fence_post, _("\
+  add_setshow_zuinteger_unlimited_cmd ("heuristic-fence-post", class_support,
+				       &heuristic_fence_post, _("\
 Set the distance searched for the start of a function."), _("\
 Show the distance searched for the start of a function."), _("\
 If you are debugging a stripped executable, GDB needs to search through the\n\
 program for the start of a function.  This command sets the distance of the\n\
 search.  The only need to set it is when debugging a stripped executable."),
-			    reinit_frame_cache_sfunc,
-			    NULL, /* FIXME: i18n: The distance searched for
-				     the start of a function is %s.  */
-			    &setlist, &showlist);
+				       reinit_frame_cache_sfunc,
+				       NULL, /* FIXME: i18n: The distance
+						searched for the start of a
+						function is %s.  */
+				       &setlist, &showlist);
 
   /* Allow the user to control whether the upper bits of 64-bit
      addresses should be zeroed.  */
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]