aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-07-13 12:01:16 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2018-07-26 08:53:02 +0100
commit3c3bb0580be0027a1c7187b78c747af74dcfa884 (patch)
tree4b643758965fcbbec45e7f3e1f2b4913d392cb66 /gdb/doc
parent33cb30a1f932b5a211aa319a01783d4957ae5d57 (diff)
downloadgdb-3c3bb0580be0027a1c7187b78c747af74dcfa884.zip
gdb-3c3bb0580be0027a1c7187b78c747af74dcfa884.tar.gz
gdb-3c3bb0580be0027a1c7187b78c747af74dcfa884.tar.bz2
gdb: Add switch to disable DWARF stack unwinders
Add a maintenance command to disable the DWARF stack unwinders. Normal users would not need this feature, but it is useful to allow extended testing of fallback stack unwinding strategies, for example, prologue scanners. This is a partial implementation of the idea discussed in pr gdb/8434, which talks about a generic ability to disable any frame unwinder. Being able to arbitrarily disable any frame unwinder would be a more complex patch, and I was unsure how useful such a feature would really be, however, I can see (and have) a real need to disable DWARF unwinders. That's why this patch only targets that specific set of unwinders. If in the future we find ourselves adding more switches to disable different unwinders, then we should probably move to a more generic solution, and remove this patch. gdb/ChangeLog: * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if DWARF unwinders are disabled. * dwarf2-frame.c: Add dwarf2read.h include. (dwarf2_frame_sniffer): Exit early if DWARF unwinders are disabled. (dwarf2_frame_unwinders_enabled_p): Define. (show_dwarf_unwinders_enabled_p): New function. (_initialize_dwarf2_frame): Register switch to control DWARF unwinder use. * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare. * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword. (show_dwarf_cmdlist): Remove static keyword. * dwarf2read.h (set_dwarf_cmdlist): Declare. (show_dwarf_cmdlist): Declare. * NEWS: Document new feature. gdb/doc/ChangeLog: * gdb.texinfo (Maintenance Commands): Add description of maintenance command to control dwarf unwinders. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Add check that dwarf unwinders control flag is visible.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo24
2 files changed, 29 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index d2bd383..1bcf9df 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.texinfo (Maintenance Commands): Add description of
+ maintenance command to control dwarf unwinders.
+
2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.texinfo (Debugging Programs with Multiple Threads):
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b36a39b..b95c2b4 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -35986,6 +35986,30 @@ compilation units will be stored in memory longer, and more total
memory will be used. Setting it to zero disables caching, which will
slow down @value{GDBN} startup, but reduce memory consumption.
+@kindex maint set dwarf unwinders
+@kindex maint show dwarf unwinders
+@item maint set dwarf unwinders
+@itemx maint show dwarf unwinders
+Control use of the DWARF frame unwinders.
+
+@cindex DWARF frame unwinders
+Many targets that support DWARF debugging use @value{GDBN}'s DWARF
+frame unwinders to build the backtrace. Many of these targets will
+also have a second mechanism for building the backtrace for use in
+cases where DWARF information is not available, this second mechanism
+is often an analysis of a function's prologue.
+
+In order to extend testing coverage of the second level stack
+unwinding mechanisms it is helpful to be able to disable the DWARF
+stack unwinders, this can be done with this switch.
+
+In normal use of @value{GDBN} disabling the DWARF unwinders is not
+advisable, there are cases that are better handled through DWARF than
+prologue analysis, and the debug experience is likely to be better
+with the DWARF frame unwinders enabled.
+
+If DWARF frame unwinders are not supported for a particular target
+architecture, then enabling this flag does not cause them to be used.
@kindex maint set profile
@kindex maint show profile
@cindex profiling GDB