]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/dwarf2-frame-tailcall.c
gdb: Add switch to disable DWARF stack unwinders
[thirdparty/binutils-gdb.git] / gdb / dwarf2-frame-tailcall.c
index 96951429f6941619112db69f4ce33918873dc354..f565a2eecc84e953c7d0b17ab72b5e9d21f84a68 100644 (file)
@@ -1,6 +1,6 @@
 /* Virtual tail call frames unwinder for GDB.
 
-   Copyright (C) 2010-2016 Free Software Foundation, Inc.
+   Copyright (C) 2010-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -318,6 +318,9 @@ tailcall_frame_sniffer (const struct frame_unwind *self,
   int next_levels;
   struct tailcall_cache *cache;
 
+  if (!dwarf2_frame_unwinders_enabled_p)
+    return 0;
+
   /* Inner tail call element does not make sense for a sentinel frame.  */
   next_frame = get_next_frame (this_frame);
   if (next_frame == NULL)
@@ -464,9 +467,6 @@ const struct frame_unwind dwarf2_tailcall_frame_unwind =
   tailcall_frame_prev_arch
 };
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_tailcall_frame;
-
 void
 _initialize_tailcall_frame (void)
 {