Move `compute_probe_arg' and `compile_probe_arg' to probe.c
[deliverable/binutils-gdb.git] / binutils / dwarf.h
index 75d93c86518583d0148fe7c70a7139e095d0a81f..45f99277dbf63665d58f952b18ded9e16f5e2c3b 100644 (file)
@@ -1,6 +1,5 @@
 /* dwarf.h - DWARF support header file
-   Copyright 2005, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2005-2015 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -24,24 +23,11 @@ typedef HOST_WIDEST_INT           dwarf_signed_vma;
 typedef unsigned HOST_WIDEST_INT  dwarf_size_type;
 
 /* Structure found in the .debug_line section.  */
-typedef struct
-{
-  unsigned char li_length          [4];
-  unsigned char li_version         [2];
-  unsigned char li_prologue_length [4];
-  unsigned char li_min_insn_length [1];
-  unsigned char li_default_is_stmt [1];
-  unsigned char li_line_base       [1];
-  unsigned char li_line_range      [1];
-  unsigned char li_opcode_base     [1];
-}
-DWARF2_External_LineInfo;
-
 typedef struct
 {
   dwarf_vma     li_length;
   unsigned short li_version;
-  unsigned int   li_prologue_length;
+  dwarf_vma      li_prologue_length;
   unsigned char  li_min_insn_length;
   unsigned char  li_max_ops_per_insn;
   unsigned char  li_default_is_stmt;
@@ -52,15 +38,6 @@ typedef struct
 DWARF2_Internal_LineInfo;
 
 /* Structure found in .debug_pubnames section.  */
-typedef struct
-{
-  unsigned char pn_length  [4];
-  unsigned char pn_version [2];
-  unsigned char pn_offset  [4];
-  unsigned char pn_size    [4];
-}
-DWARF2_External_PubNames;
-
 typedef struct
 {
   dwarf_vma     pn_length;
@@ -71,15 +48,6 @@ typedef struct
 DWARF2_Internal_PubNames;
 
 /* Structure found in .debug_info section.  */
-typedef struct
-{
-  unsigned char  cu_length        [4];
-  unsigned char  cu_version       [2];
-  unsigned char  cu_abbrev_offset [4];
-  unsigned char  cu_pointer_size  [1];
-}
-DWARF2_External_CompUnit;
-
 typedef struct
 {
   dwarf_vma     cu_length;
@@ -89,16 +57,7 @@ typedef struct
 }
 DWARF2_Internal_CompUnit;
 
-typedef struct
-{
-  unsigned char  ar_length       [4];
-  unsigned char  ar_version      [2];
-  unsigned char  ar_info_offset  [4];
-  unsigned char  ar_pointer_size [1];
-  unsigned char  ar_segment_size [1];
-}
-DWARF2_External_ARange;
-
+/* Structure found in .debug_aranges section.  */
 typedef struct
 {
   dwarf_vma     ar_length;
@@ -109,29 +68,7 @@ typedef struct
 }
 DWARF2_Internal_ARange;
 
-struct dwarf_section
-{
-  /* A debug section has a different name when it's stored compressed
-     or not.  COMPRESSED_NAME and UNCOMPRESSED_NAME are the two
-     possibilities.  NAME is set to whichever one is used for this
-     input file, as determined by load_debug_section().  */
-  const char *uncompressed_name;
-  const char *compressed_name;
-  const char *name;
-  unsigned char *start;
-  dwarf_vma address;
-  dwarf_size_type size;
-};
-
-/* A structure containing the name of a debug section
-   and a pointer to a function that can decode it.  */
-struct dwarf_section_display
-{
-  struct dwarf_section section;
-  int (*display) (struct dwarf_section *, void *);
-  int *enabled;
-  unsigned int relocate : 1;
-};
+/* N.B. The order here must match the order in debug_displays.  */
 
 enum dwarf_section_display_enum
 {
@@ -141,12 +78,14 @@ enum dwarf_section_display_enum
   info,
   line,
   pubnames,
+  gnu_pubnames,
   eh_frame,
   macinfo,
   macro,
   str,
   loc,
   pubtypes,
+  gnu_pubtypes,
   ranges,
   static_func,
   static_vars,
@@ -156,9 +95,49 @@ enum dwarf_section_display_enum
   trace_info,
   trace_abbrev,
   trace_aranges,
+  info_dwo,
+  abbrev_dwo,
+  types_dwo,
+  line_dwo,
+  loc_dwo,
+  macro_dwo,
+  macinfo_dwo,
+  str_dwo,
+  str_index,
+  str_index_dwo,
+  debug_addr,
+  dwp_cu_index,
+  dwp_tu_index,
   max
 };
 
+struct dwarf_section
+{
+  /* A debug section has a different name when it's stored compressed
+     or not.  COMPRESSED_NAME and UNCOMPRESSED_NAME are the two
+     possibilities.  NAME is set to whichever one is used for this
+     input file, as determined by load_debug_section().  */
+  const char *uncompressed_name;
+  const char *compressed_name;
+  const char *name;
+  unsigned char *start;
+  dwarf_vma address;
+  dwarf_size_type size;
+  enum dwarf_section_display_enum abbrev_sec;
+  /* A spare field for random use.  */
+  void *user_data;
+};
+
+/* A structure containing the name of a debug section
+   and a pointer to a function that can decode it.  */
+struct dwarf_section_display
+{
+  struct dwarf_section section;
+  int (*display) (struct dwarf_section *, void *);
+  int *enabled;
+  unsigned int relocate : 1;
+};
+
 extern struct dwarf_section_display debug_displays [];
 
 /* This structure records the information that
@@ -170,6 +149,12 @@ typedef struct
   int            dwarf_version;
   dwarf_vma     cu_offset;
   dwarf_vma     base_address;
+  /* This field is filled in when reading the attribute DW_AT_GNU_addr_base and
+     is used with the form DW_AT_GNU_FORM_addr_index.  */
+  dwarf_vma     addr_base;
+  /* This field is filled in when reading the attribute DW_AT_GNU_ranges_base and
+     is used when calculating ranges.  */
+  dwarf_vma     ranges_base;
   /* This is an array of offsets to the location list table.  */
   dwarf_vma *    loc_offsets;
   int *          have_frame_base;
@@ -182,7 +167,7 @@ typedef struct
 }
 debug_info;
 
-extern int eh_addr_size;
+extern unsigned int eh_addr_size;
 
 extern int do_debug_info;
 extern int do_debug_abbrevs;
@@ -200,14 +185,19 @@ extern int do_gdb_index;
 extern int do_trace_info;
 extern int do_trace_abbrevs;
 extern int do_trace_aranges;
+extern int do_debug_addr;
+extern int do_debug_cu_index;
 extern int do_wide;
 
 extern int dwarf_cutoff_level;
 extern unsigned long dwarf_start_die;
 
+extern int dwarf_check;
+
 extern void init_dwarf_regnames (unsigned int);
 extern void init_dwarf_regnames_i386 (void);
 extern void init_dwarf_regnames_x86_64 (void);
+extern void init_dwarf_regnames_aarch64 (void);
 
 extern int load_debug_section (enum dwarf_section_display_enum, void *);
 extern void free_debug_section (enum dwarf_section_display_enum);
@@ -218,8 +208,11 @@ extern void dwarf_select_sections_by_names (const char *);
 extern void dwarf_select_sections_by_letters (const char *);
 extern void dwarf_select_sections_all (void);
 
-void * cmalloc (size_t, size_t);
-void * xcmalloc (size_t, size_t);
-void * xcrealloc (void *, size_t, size_t);
+extern unsigned int * find_cu_tu_set (void *, unsigned int);
+
+extern void * cmalloc (size_t, size_t);
+extern void * xcalloc2 (size_t, size_t);
+extern void * xcmalloc (size_t, size_t);
+extern void * xcrealloc (void *, size_t, size_t);
 
-dwarf_vma read_leb128 (unsigned char *, unsigned int *, int);
+extern dwarf_vma read_leb128 (unsigned char *, unsigned int *, bfd_boolean, const unsigned char * const);
This page took 0.026271 seconds and 4 git commands to generate.