Bug 8434 - Maint command to enable/disable unwinders
Summary: Maint command to enable/disable unwinders
Status: ASSIGNED
Alias: None
Product: gdb
Classification: Unclassified
Component: backtrace (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 15:58 UTC by ac131313
Modified: 2018-07-26 07:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ac131313 2003-08-09 15:58:00 UTC
[Converted from Gnats 1329]

Should there be a command to explicitly enable/disable specific unwinders?

Release:
unknown
Comment 1 Sourceware Commits 2018-07-26 07:54:48 UTC
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3bb0580be0027a1c7187b78c747af74dcfa884

commit 3c3bb0580be0027a1c7187b78c747af74dcfa884
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Jul 13 12:01:16 2018 +0100

    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.