diff options
author | Jiri Smid <smid@suse.cz> | 2001-12-07 12:10:15 +0000 |
---|---|---|
committer | Jiri Smid <smid@suse.cz> | 2001-12-07 12:10:15 +0000 |
commit | b6af0555b58f4a5996fd3590f2cb40d3664136f7 (patch) | |
tree | 9b7a4ced0b51e81f780db2bf5cf41bc7ba9c281d /gdb/gdbarch.h | |
parent | 1fbc4a84a3764dd04760128c5666348c0fa070eb (diff) | |
download | gdb-b6af0555b58f4a5996fd3590f2cb40d3664136f7.zip gdb-b6af0555b58f4a5996fd3590f2cb40d3664136f7.tar.gz gdb-b6af0555b58f4a5996fd3590f2cb40d3664136f7.tar.bz2 |
* dwarf2cfi.c: New file.
* dwarf2cfi.h: New file.
* dwarf2read.c (dwarf_frame_offset, dwarf_frame_size): New variables.
(dwarf_eh_frame_offset, dwarf_eh_frame_size): New variables.
(dwarf2_read_section): Change to non static.
(dwarf2_locate_sections): Add .debug_frame and .eh_frame section
recognition.
(FRAME_SECTION, EH_FRAME_SECTION): New define.
* elfread.c (elf_symfile_read): Add call of frame informations build.
* frame.h (frame_info): Add pointer to unwind_context.
* symfile.h (dwarf2_build_frame_info): Add declaration.
* gdbarch.sh (DWARF2_BUILD_FRAME_INFO): Add.
* gdbarch.h, gdbarch.c: Regenerate.
* Makefile.in: Add dwarf2cfi_h, dwarf2cfi.o
* x86-64-tdep.c (i386_gdbarch_init): Initialize target vector to
use debug frame info.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 2294595..21e5317 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -42,7 +42,7 @@ struct frame_info; struct value; - +struct objfile; extern struct gdbarch *current_gdbarch; @@ -2166,6 +2166,43 @@ typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdb extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); +#if defined (DWARF2_BUILD_FRAME_INFO) +/* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */ +#if !defined (DWARF2_BUILD_FRAME_INFO_P) +#define DWARF2_BUILD_FRAME_INFO_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P) +#define DWARF2_BUILD_FRAME_INFO_P() (0) +#endif + +extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P) +#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P) +#define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO) +#define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0) +#endif + +typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile); +extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile); +extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO) +#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO) +#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile)) +#endif +#endif + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |