Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [commit] remove "info catch"
Date: Tue, 24 Jan 2012 15:18:00 -0000	[thread overview]
Message-ID: <20120124151456.GB9140@redhat.com> (raw)
In-Reply-To: <E1RpHC6-0002ki-Pv@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Eli Zaretskii wrote:
> > Date: Mon, 23 Jan 2012 09:42:20 +0000
> > From: Gary Benson <gbenson@redhat.com>
> > 
> > Tom approved the code parts of this.  Could somebody (Eli?) please
> > check the documentation changes?
> 
> They are trivial, so please go ahead.

I have committed this now (patch attached).

Cheers,
Gary

--
http://gbenson.net/

[-- Attachment #2: info-catch.patch --]
[-- Type: text/plain, Size: 8813 bytes --]

Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.13769
diff -u -r1.13769 ChangeLog
--- gdb/ChangeLog	24 Jan 2012 14:19:01 -0000	1.13769
+++ gdb/ChangeLog	24 Jan 2012 15:10:59 -0000
@@ -1,3 +1,11 @@
+2012-01-24  Gary Benson  <gbenson@redhat.com>
+
+	Delete #if 0'd out code.
+	* stack.c (print_frame_label_vars): Remove.
+	(catch_info): Likewise.
+	(_initialize_stack): Remove "info catch" command.
+	* NEWS: Mention the above.
+
 2012-01-24  Pedro Alves  <palves@redhat.com>
 
 	* remote.c (remote_add_inferior): New `fake_pid_p' parameter.  Use
Index: gdb/NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.483
diff -u -r1.483 NEWS
--- gdb/NEWS	20 Jan 2012 10:31:26 -0000	1.483
+++ gdb/NEWS	24 Jan 2012 15:11:01 -0000
@@ -31,6 +31,9 @@
 * The "info proc" and "generate-core-file" commands will now also
   work on remote targets connected to GDBserver on Linux.
 
+* The command "info catch" has been removed.  It has been disabled
+  since December 2007.
+
 *** Changes in GDB 7.4
 
 * GDB now handles ambiguous linespecs more consistently; the existing
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.244
diff -u -r1.244 stack.c
--- gdb/stack.c	4 Jan 2012 08:17:12 -0000	1.244
+++ gdb/stack.c	24 Jan 2012 15:11:01 -0000
@@ -1968,82 +1968,6 @@
     fprintf_filtered (stream, _("No locals.\n"));
 }
 
-/* Same, but print labels.  */
-
-static void
-print_frame_label_vars (struct frame_info *frame, int this_level_only,
-			struct ui_file *stream)
-{
-#if 1
-  fprintf_filtered (stream, "print_frame_label_vars disabled.\n");
-#else
-  struct blockvector *bl;
-  struct block *block = get_frame_block (frame, 0);
-  struct gdbarch *gdbarch = get_frame_arch (frame);
-  int values_printed = 0;
-  int index, have_default = 0;
-  char *blocks_printed;
-  CORE_ADDR pc = get_frame_pc (frame);
-
-  if (block == 0)
-    {
-      fprintf_filtered (stream, "No symbol table info available.\n");
-      return;
-    }
-
-  bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
-  blocks_printed = alloca (BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
-  memset (blocks_printed, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
-
-  while (block != 0)
-    {
-      CORE_ADDR end = BLOCK_END (block) - 4;
-      int last_index;
-
-      if (bl != blockvector_for_pc (end, &index))
-	error (_("blockvector blotch"));
-      if (BLOCKVECTOR_BLOCK (bl, index) != block)
-	error (_("blockvector botch"));
-      last_index = BLOCKVECTOR_NBLOCKS (bl);
-      index += 1;
-
-      /* Don't print out blocks that have gone by.  */
-      while (index < last_index
-	     && BLOCK_END (BLOCKVECTOR_BLOCK (bl, index)) < pc)
-	index++;
-
-      while (index < last_index
-	     && BLOCK_END (BLOCKVECTOR_BLOCK (bl, index)) < end)
-	{
-	  if (blocks_printed[index] == 0)
-	    {
-	      if (print_block_frame_labels (gdbarch,
-					    BLOCKVECTOR_BLOCK (bl, index),
-					    &have_default, stream))
-		values_printed = 1;
-	      blocks_printed[index] = 1;
-	    }
-	  index++;
-	}
-      if (have_default)
-	return;
-      if (values_printed && this_level_only)
-	return;
-
-      /* After handling the function's top-level block, stop.  Don't
-         continue to its superblock, the block of per-file symbols.
-         Also do not continue to the containing function of an inlined
-         function.  */
-      if (BLOCK_FUNCTION (block))
-	break;
-      block = BLOCK_SUPERBLOCK (block);
-    }
-
-  if (!values_printed && !this_level_only)
-    fprintf_filtered (stream, _("No catches.\n"));
-#endif
-}
-
 void
 locals_info (char *args, int from_tty)
 {
@@ -2051,14 +1975,6 @@
 			  0, gdb_stdout);
 }
 
-static void
-catch_info (char *ignore, int from_tty)
-{
-  /* Assume g++ compiled code; old GDB 4.16 behaviour.  */
-  print_frame_label_vars (get_selected_frame (_("No frame selected.")),
-                          0, gdb_stdout);
-}
-
 /* Iterate over all the argument variables in block B.
 
    Returns 1 if any argument was walked; 0 otherwise.  */
@@ -2615,9 +2531,6 @@
 Select the stack frame that contains <func>.\n\
 Usage: func <name>\n"));
 
-  add_info ("catch", catch_info,
-	    _("Exceptions that can be caught in the current stack frame."));
-
   add_setshow_enum_cmd ("frame-arguments", class_stack,
 			print_frame_arguments_choices, &print_frame_arguments,
 			_("Set printing of non-scalar frame arguments"),
Index: gdb/doc/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/doc/ChangeLog,v
retrieving revision 1.1267
diff -u -r1.1267 ChangeLog
--- gdb/doc/ChangeLog	20 Jan 2012 09:47:32 -0000	1.1267
+++ gdb/doc/ChangeLog	24 Jan 2012 15:11:03 -0000
@@ -1,3 +1,8 @@
+2012-01-24  Gary Benson  <gbenson@redhat.com>
+
+	Delete #if 0'd out code.
+	* gdb.texinfo (Frame Info): Remove "info catch".
+
 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
 	* gdb.texinfo (Remote Configuration): Document
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.914
diff -u -r1.914 gdb.texinfo
--- gdb/doc/gdb.texinfo	20 Jan 2012 09:47:32 -0000	1.914
+++ gdb/doc/gdb.texinfo	24 Jan 2012 15:11:13 -0000
@@ -6339,16 +6339,6 @@
 line.  These are all variables (declared either static or automatic)
 accessible at the point of execution of the selected frame.
 
-@kindex info catch
-@cindex catch exceptions, list active handlers
-@cindex exception handlers, how to list
-@item info catch
-Print a list of all the exception handlers that are active in the
-current stack frame at the current point of execution.  To see other
-exception handlers, visit the associated frame (using the @code{up},
-@code{down}, or @code{frame} commands); then type @code{info catch}.
-@xref{Set Catchpoints, , Setting Catchpoints}.
-
 @end table
 
 
Index: gdb/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.3034
diff -u -r1.3034 ChangeLog
--- gdb/testsuite/ChangeLog	24 Jan 2012 13:49:58 -0000	1.3034
+++ gdb/testsuite/ChangeLog	24 Jan 2012 15:11:20 -0000
@@ -1,3 +1,10 @@
+2012-01-24  Gary Benson  <gbenson@redhat.com>
+
+	Delete #if 0'd out code.
+	* gdb.base/default.exp (info catch): Remove.
+	* gdb.base/gdb_history (info catch): Likewise.
+	* gdb.base/help.exp (info catch): Likewise.
+
 2012-01-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	Fix watchpoints to be specific for each inferior.
Index: gdb/testsuite/gdb.base/default.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v
retrieving revision 1.53
diff -u -r1.53 default.exp
--- gdb/testsuite/gdb.base/default.exp	11 Jan 2012 10:59:51 -0000	1.53
+++ gdb/testsuite/gdb.base/default.exp	24 Jan 2012 15:11:20 -0000
@@ -282,8 +282,6 @@
 gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\".  Try \"help info\".*" "info bogus-gdb-command"
 #test info breakpoints
 gdb_test "info breakpoints" "No breakpoints or watchpoints." "info breakpoints"
-#test info catch
-gdb_test "info catch" "No frame selected." "info catch"
 #test info copying
 # FIXME -- doesn't work worth a shit
 #send_gdb "info copying"
Index: gdb/testsuite/gdb.base/gdb_history
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb_history,v
retrieving revision 1.1
diff -u -r1.1 gdb_history
--- gdb/testsuite/gdb.base/gdb_history	8 Jun 2003 13:14:05 -0000	1.1
+++ gdb/testsuite/gdb.base/gdb_history	24 Jan 2012 15:11:20 -0000
@@ -85,7 +85,6 @@
 info args
 info bogus-gdb-command
 info breakpoints
-info catch
 info copying
 info display
 info f
Index: gdb/testsuite/gdb.base/help.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/help.exp,v
retrieving revision 1.54
diff -u -r1.54 help.exp
--- gdb/testsuite/gdb.base/help.exp	4 Jan 2012 08:17:45 -0000	1.54
+++ gdb/testsuite/gdb.base/help.exp	24 Jan 2012 15:11:21 -0000
@@ -240,8 +240,6 @@
 gdb_test "help info breakpoints" \
     "Status of specified breakpoints .all user-settable breakpoints if no argument.*\[\r\n\]+breakpoint set\." \
     "help info breakpoints"
-# test help info catch
-gdb_test "help info catch" "Exceptions that can be caught in the current stack frame\." "help info catch"
 # test help info copying
 gdb_test "help info copying" "Conditions for redistributing copies of GDB\." "help info copying"
 # test help info display

      parent reply	other threads:[~2012-01-24 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 17:09 RFC: " Gary Benson
2012-01-13 22:19 ` Tom Tromey
2012-01-23 10:32 ` RFC: remove "info catch": doc review ping Gary Benson
2012-01-23 12:08   ` Eli Zaretskii
2012-01-23 12:32     ` Gary Benson
2012-01-24 15:18     ` Gary Benson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120124151456.GB9140@redhat.com \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox