Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Pedro Alves <palves@redhat.com>,
	"gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Add set/show debug unwind command
Date: Mon, 18 Jun 2012 09:12:00 -0000	[thread overview]
Message-ID: <6ADF55F2-9C07-43D4-AD1E-63380720ACD1@adacore.com> (raw)
In-Reply-To: <20120615182236.GY18729@adacore.com>


On Jun 15, 2012, at 8:22 PM, Joel Brobecker wrote:

>> We also document debug and maintenance commands in the manual.
> 
> Thanks for reminding us! And NEWS as well, in fact.

Thanks for the comments.  Here is the new version.

Tristan.

2012-06-15  Tristan Gingold  <gingold@adacore.com>

	* frame-unwind.c (show_unwind_debug): New function.
	(unwind_debug): New variable.
	(_initialize_frame_unwind): Add show debug unwind command.
	* frame-unwind.h (unwind_debug): Declare.
	* doc/gdb.texinfo (Debugging Output): Document set/show debug
	unwind.
	* NEWS: Mention it.


diff --git a/gdb/NEWS b/gdb/NEWS
index 476e5a0..2384489 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -503,6 +503,10 @@ show trace-stop-notes
   instance as an explanation, if you are stopping a trace run that was
   started by someone else.
 
+set debug unwind
+show debug unwind
+  Control display of debugging info for some unwinders.
+
 * New remote packets
 
 QTEnable
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 014cfd8..30cd053 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21850,6 +21850,11 @@ message.
 @item show debug timestamp
 Displays the current state of displaying timestamps with @value{GDBN}
 debugging info.
+@item set debug unwind
+@cindex unwinding debugging info
+Turns on or off display debugging info from some unwinders.
+@item show debug unwind
+Display the current state of displaying unwind debugging info.
 @item set debugvarobj
 @cindex variable object debugging info
 Turns on or off display of @value{GDBN} variable object debugging
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index c90144f..ab67a76 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -27,6 +27,8 @@
 #include "exceptions.h"
 #include "gdb_assert.h"
 #include "gdb_obstack.h"
+#include "command.h"
+#include "gdbcmd.h"
 
 static struct gdbarch_data *frame_unwind_data;
 
@@ -237,6 +239,20 @@ frame_unwind_got_address (struct frame_info *frame, int regnum,
   return reg_val;
 }
 
+/* Flag to control debugging.  */
+
+int unwind_debug;
+
+/* Implements show debug unwind.  */
+
+static void
+show_unwind_debug (struct ui_file *file, int from_tty,
+		   struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("unwind debugging is %s.\n"), value);
+}
+
+
 /* -Wmissing-prototypes */
 extern initialize_file_ftype _initialize_frame_unwind;
 
@@ -244,4 +260,15 @@ void
 _initialize_frame_unwind (void)
 {
   frame_unwind_data = gdbarch_data_register_pre_init (frame_unwind_init);
+
+  /* Debug this files internals.  */
+  add_setshow_zinteger_cmd ("unwind", class_maintenance, &unwind_debug,
+			    _("Set unwind debugging."),
+			    _("Show unwind debugging."),
+			    _("When non-zero, frame specific internal "
+			      "debugging is enabled."),
+			    NULL,
+			    show_unwind_debug,
+			    &setdebuglist, &showdebuglist);
+
 }
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index f82d763..64405b9 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -217,4 +217,8 @@ struct value *frame_unwind_got_bytes (struct frame_info *frame, int regnum,
 struct value *frame_unwind_got_address (struct frame_info *frame, int regnum,
 					CORE_ADDR addr);
 
+/* Flag to control debugging.  */
+
+extern int unwind_debug;
+
 #endif


  reply	other threads:[~2012-06-18  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15  7:51 Tristan Gingold
2012-06-15 17:31 ` Joel Brobecker
2012-06-15 17:40 ` Joel Brobecker
2012-06-15 18:18 ` Pedro Alves
2012-06-15 18:22   ` Joel Brobecker
2012-06-18  9:12     ` Tristan Gingold [this message]
2012-06-18 15:50       ` Joel Brobecker
2012-06-18 16:11       ` Eli Zaretskii

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=6ADF55F2-9C07-43D4-AD1E-63380720ACD1@adacore.com \
    --to=gingold@adacore.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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