52
thirdparty/libbacktrace/internal.h
vendored
52
thirdparty/libbacktrace/internal.h
vendored
@ -1,5 +1,5 @@
|
||||
/* internal.h -- Internal header file for stack backtrace library.
|
||||
Copyright (C) 2012-2021 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Google.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -56,6 +56,11 @@ POSSIBILITY OF SUCH DAMAGE. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __has_attribute
|
||||
# if __has_attribute(fallthrough)
|
||||
# define ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
|
||||
# endif
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_FALLTHROUGH
|
||||
# if (GCC_VERSION >= 7000)
|
||||
# define ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
|
||||
@ -323,10 +328,44 @@ struct dwarf_sections
|
||||
|
||||
struct dwarf_data;
|
||||
|
||||
/* The load address mapping. */
|
||||
|
||||
#if defined(__FDPIC__) && defined(HAVE_DL_ITERATE_PHDR) && (defined(HAVE_LINK_H) || defined(HAVE_SYS_LINK_H))
|
||||
|
||||
#ifdef HAVE_LINK_H
|
||||
#include <link.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_LINK_H
|
||||
#include <sys/link.h>
|
||||
#endif
|
||||
|
||||
#define libbacktrace_using_fdpic() (1)
|
||||
|
||||
struct libbacktrace_base_address
|
||||
{
|
||||
struct elf32_fdpic_loadaddr m;
|
||||
};
|
||||
|
||||
#define libbacktrace_add_base(pc, base) \
|
||||
((uintptr_t) (__RELOC_POINTER ((pc), (base).m)))
|
||||
|
||||
#else /* not _FDPIC__ */
|
||||
|
||||
#define libbacktrace_using_fdpic() (0)
|
||||
|
||||
struct libbacktrace_base_address
|
||||
{
|
||||
uintptr_t m;
|
||||
};
|
||||
|
||||
#define libbacktrace_add_base(pc, base) ((pc) + (base).m)
|
||||
|
||||
#endif /* not _FDPIC__ */
|
||||
|
||||
/* Add file/line information for a DWARF module. */
|
||||
|
||||
extern int backtrace_dwarf_add (struct backtrace_state *state,
|
||||
uintptr_t base_address,
|
||||
struct libbacktrace_base_address base_address,
|
||||
const struct dwarf_sections *dwarf_sections,
|
||||
int is_bigendian,
|
||||
struct dwarf_data *fileline_altlink,
|
||||
@ -368,6 +407,15 @@ extern int backtrace_uncompress_zdebug (struct backtrace_state *,
|
||||
unsigned char **uncompressed,
|
||||
size_t *uncompressed_size);
|
||||
|
||||
/* A test-only hook for elf_zstd_decompress. */
|
||||
|
||||
extern int backtrace_uncompress_zstd (struct backtrace_state *,
|
||||
const unsigned char *compressed,
|
||||
size_t compressed_size,
|
||||
backtrace_error_callback, void *data,
|
||||
unsigned char *uncompressed,
|
||||
size_t uncompressed_size);
|
||||
|
||||
/* A test-only hook for elf_uncompress_lzma. */
|
||||
|
||||
extern int backtrace_uncompress_lzma (struct backtrace_state *,
|
||||
|
||||
Reference in New Issue
Block a user