diff options
Diffstat (limited to 'gdb/dwarf2/public.h')
-rw-r--r-- | gdb/dwarf2/public.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/gdb/dwarf2/public.h b/gdb/dwarf2/public.h index bc419ff..f9e7488 100644 --- a/gdb/dwarf2/public.h +++ b/gdb/dwarf2/public.h @@ -1,6 +1,6 @@ /* Public API for gdb DWARF reader - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DWARF2_PUBLIC_H -#define DWARF2_PUBLIC_H +#ifndef GDB_DWARF2_PUBLIC_H +#define GDB_DWARF2_PUBLIC_H /* A DWARF names index variant. */ enum class dw_index_kind @@ -30,6 +30,8 @@ enum class dw_index_kind DEBUG_NAMES, }; +#if defined(DWARF_FORMAT_AVAILABLE) + /* Try to locate the sections we need for DWARF 2 debugging information. If these are found, begin reading the DWARF and return true. Otherwise, return false. NAMES points to the dwarf2 @@ -44,4 +46,27 @@ extern bool dwarf2_initialize_objfile extern void dwarf2_build_frame_info (struct objfile *); -#endif /* DWARF2_PUBLIC_H */ +/* Append the DWARF-2 frame unwinders to GDBARCH's list. */ + +void dwarf2_append_unwinders (struct gdbarch *gdbarch); + +#else /* DWARF_FORMAT_AVAILABLE */ + +static inline bool +dwarf2_initialize_objfile (struct objfile *, + const struct dwarf2_debug_sections * = nullptr, + bool = false) +{ + warning (_("No dwarf support available.")); + return false; +} + +static inline void +dwarf2_build_frame_info (struct objfile *) +{ + warning (_("No dwarf support available.")); +} + +#endif /* DWARF_FORMAT_AVAILABLE */ + +#endif /* GDB_DWARF2_PUBLIC_H */ |