aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-02-20 12:20:14 +0100
committerTom de Vries <tdevries@suse.de>2023-02-20 12:20:14 +0100
commitcb911672fb70233f3ef127f68fc0a43d7f339a62 (patch)
tree2233ec1e60478508cdbb7a900b198f4016c32e1f /gdb/symtab.h
parent1bcaeecb7fd8a23f05033bc9a340696b685db17f (diff)
downloadgdb-cb911672fb70233f3ef127f68fc0a43d7f339a62.zip
gdb-cb911672fb70233f3ef127f68fc0a43d7f339a62.tar.gz
gdb-cb911672fb70233f3ef127f68fc0a43d7f339a62.tar.bz2
[gdb/symtab] Factor out compunit_epilogue_unwind_valid
Factor out compunit_epilogue_unwind_valid from both amd64_stack_frame_destroyed_p and i386_stack_frame_destroyed_p. No functional changes. Also add a comment in the new function about the assumption that in absence of producer information, epilogue unwind info is invalid. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 11ff875..cd6b5f7 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1917,6 +1917,19 @@ is_main_symtab_of_compunit_symtab (struct symtab *symtab)
{
return symtab == symtab->compunit ()->primary_filetab ();
}
+
+/* Return true if epilogue unwind info of CUST is valid. */
+
+static inline bool
+compunit_epilogue_unwind_valid (struct compunit_symtab *cust)
+{
+ /* In absence of producer information, assume epilogue unwind info is
+ invalid. */
+ if (cust == nullptr)
+ return false;
+
+ return cust->epilogue_unwind_valid ();
+}
/* The virtual function table is now an array of structures which have the