[Ada] Consistently use explicit Entity_Id type instead of alias
[gcc.git] / libbacktrace / internal.h
index a9c6688251aa14ea169522d3fbd28591e89557c1..659db9e21e2bf4bfba15e72078d31179e23c27bd 100644 (file)
@@ -1,5 +1,5 @@
 /* internal.h -- Internal header file for stack backtrace library.
-   Copyright (C) 2012-2019 Free Software Foundation, Inc.
+   Copyright (C) 2012-2020 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Google.
 
 Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,14 @@ POSSIBILITY OF SUCH DAMAGE.  */
 # endif
 #endif
 
+#ifndef ATTRIBUTE_FALLTHROUGH
+# if (GCC_VERSION >= 7000)
+#  define ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+#  define ATTRIBUTE_FALLTHROUGH
+# endif
+#endif
+
 #ifndef HAVE_SYNC_FUNCTIONS
 
 /* Define out the sync functions.  These should never be called if
@@ -326,6 +334,31 @@ extern int backtrace_dwarf_add (struct backtrace_state *state,
                                void *data, fileline *fileline_fn,
                                struct dwarf_data **fileline_entry);
 
+/* A data structure to pass to backtrace_syminfo_to_full.  */
+
+struct backtrace_call_full
+{
+  backtrace_full_callback full_callback;
+  backtrace_error_callback full_error_callback;
+  void *full_data;
+  int ret;
+};
+
+/* A backtrace_syminfo_callback that can call into a
+   backtrace_full_callback, used when we have a symbol table but no
+   debug info.  */
+
+extern void backtrace_syminfo_to_full_callback (void *data, uintptr_t pc,
+                                               const char *symname,
+                                               uintptr_t symval,
+                                               uintptr_t symsize);
+
+/* An error callback that corresponds to
+   backtrace_syminfo_to_full_callback.  */
+
+extern void backtrace_syminfo_to_full_error_callback (void *, const char *,
+                                                     int);
+
 /* A test-only hook for elf_uncompress_zdebug.  */
 
 extern int backtrace_uncompress_zdebug (struct backtrace_state *,
@@ -335,4 +368,13 @@ extern int backtrace_uncompress_zdebug (struct backtrace_state *,
                                        unsigned char **uncompressed,
                                        size_t *uncompressed_size);
 
+/* A test-only hook for elf_uncompress_lzma.  */
+
+extern int backtrace_uncompress_lzma (struct backtrace_state *,
+                                     const unsigned char *compressed,
+                                     size_t compressed_size,
+                                     backtrace_error_callback, void *data,
+                                     unsigned char **uncompressed,
+                                     size_t *uncompressed_size);
+
 #endif