From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: [RFA/commit+NEWS 1/2] Add command set/show debug unwind.
Date: Wed, 09 Jan 2013 10:53:00 -0000 [thread overview]
Message-ID: <1357728781-15073-2-git-send-email-brobecker@adacore.com> (raw)
In-Reply-To: <1357728781-15073-1-git-send-email-brobecker@adacore.com>
Hello,
This patch adds a new debug setting to be used by frame unwinders.
It should be relatively straightforward.
gdb/ChangeLog:
* frame-unwind.h (unwind_debug): Declare.
* frame-unwind.c: #include "command.h" and "gdbcmd.h".
(unwind_debug): New global.
(show_unwind_debug): New function.
(_initialize_frame_unwind): Add "set/show debug unwind"
commands.
* NEWS: Add entry for new "set/show debug unwind" commands.
gdb/doc/ChangeLog:
* gdb.texinfo (Debugging Output): Document the new
"set/show debug unwind" commands.
Will commit in a couple of days, if no objection.
---
gdb/NEWS | 4 ++++
gdb/doc/gdb.texinfo | 5 +++++
gdb/frame-unwind.c | 26 ++++++++++++++++++++++++++
gdb/frame-unwind.h | 4 ++++
4 files changed, 39 insertions(+)
diff --git a/gdb/NEWS b/gdb/NEWS
index 36bbd12..3451505 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -84,6 +84,10 @@ set debug notification
show debug notification
Control display of debugging info for async remote notification.
+set debug unwind
+show debug unwind
+ Control display of debugging info for some unwinders.
+
* Removed commands
** For the Renesas Super-H architecture, the "regs" command has been removed
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f973263..f6fb342 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -22046,6 +22046,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 b66febf..7a9f6a2 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 frame-unwind debugging. */
+
+int unwind_debug;
+
+/* Implement the "show debug unwind" command. */
+
+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,14 @@ void
_initialize_frame_unwind (void)
{
frame_unwind_data = gdbarch_data_register_pre_init (frame_unwind_init);
+
+ 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 91ccf8c..0471730 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -30,6 +30,10 @@ struct value;
#include "frame.h" /* For enum frame_type. */
+/* Flag to control frame-unwind debugging. */
+
+extern int unwind_debug;
+
/* The following unwind functions assume a chain of frames forming the
sequence: (outer) prev <-> this <-> next (inner). All the
functions are called with this frame's `struct frame_info' and
--
1.7.10.4
next prev parent reply other threads:[~2013-01-09 10:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 10:53 Add Windows x64 SEH unwinder (take 2) Joel Brobecker
2013-01-09 10:53 ` [RFA/commit+doco 2/2] Windows x64 SEH unwinder Joel Brobecker
2013-01-09 15:52 ` Pedro Alves
2013-01-09 16:28 ` Tristan Gingold
2013-01-09 17:10 ` Pedro Alves
2013-01-09 17:53 ` Tom Tromey
2013-01-09 19:11 ` Pedro Alves
2013-01-09 20:07 ` Tristan Gingold
2013-01-10 16:24 ` Pedro Alves
2013-01-11 8:04 ` Tristan Gingold
2013-07-08 10:55 ` [RFA] Windows x64 SEH unwinder (v2) Tristan Gingold
2013-07-26 15:22 ` Pedro Alves
2013-08-19 13:59 ` Tristan Gingold
2013-08-19 14:13 ` Pedro Alves
2013-08-22 9:33 ` [PATCH v3] Windows x64 SEH unwinder Tristan Gingold
2013-08-22 15:10 ` Eli Zaretskii
2013-08-22 15:26 ` Pedro Alves
2013-08-22 15:41 ` Tristan Gingold
2013-08-22 16:15 ` Pedro Alves
2013-08-23 6:54 ` Tristan Gingold
2013-08-27 17:45 ` Pedro Alves
2013-09-02 9:28 ` Tristan Gingold
2013-01-09 16:06 ` [RFA/commit+doco 2/2] " Eli Zaretskii
2013-01-09 16:29 ` Tristan Gingold
2013-01-09 10:53 ` Joel Brobecker [this message]
2013-01-09 12:41 ` [RFA/commit+NEWS 1/2] Add command set/show debug unwind Jan Kratochvil
2013-01-09 18:40 ` Joel Brobecker
2013-01-09 15:14 ` Tom Tromey
2013-01-09 16:01 ` Eli Zaretskii
2013-01-09 11:05 ` Add Windows x64 SEH unwinder (take 2) Pedro Alves
2013-01-09 11:11 ` Joel Brobecker
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=1357728781-15073-2-git-send-email-brobecker@adacore.com \
--to=brobecker@adacore.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