Move more declarations from dwarf2/loc.h to dwarf2/read.h
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 26 Feb 2020 14:35:22 +0000 (09:35 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 26 Feb 2020 14:36:44 +0000 (09:36 -0500)
All these functions have their implementations in dwarf2/read.c, so move
their declarations to dwarf2/read.h.  Move the doc to the header, at the
same time.

gdb/ChangeLog:

* dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
dwarf2_fetch_die_type_sect_off): Move to...
* dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
dwarf2_fetch_die_type_sect_off): ... here.
* dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
dwarf2_fetch_die_type_sect_off): Move doc to header file.

gdb/ChangeLog
gdb/dwarf2/loc.h
gdb/dwarf2/read.c
gdb/dwarf2/read.h

index fb4cc033a9030bfaa1416b84727e7ad025eb6d6c..33f7bc8707ab82a408a8981cbd66142992c5b1de 100644 (file)
@@ -1,3 +1,15 @@
+2020-02-26  Simon Marchi  <simon.marchi@efficios.com>
+
+       * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
+       dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
+       dwarf2_fetch_die_type_sect_off): Move to...
+       * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
+       dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
+       dwarf2_fetch_die_type_sect_off): ... here.
+       * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
+       dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
+       dwarf2_fetch_die_type_sect_off): Move doc to header file.
+
 2020-02-26  Tom de Vries  <tdevries@suse.de>
 
        PR gdb/25603
index dfb6f05525c6733540c8c6b844145bdc9949a2ec..98a7d8a60697cbe1884795ba342a4e848dd8a000 100644 (file)
@@ -41,24 +41,6 @@ const gdb_byte *dwarf2_find_location_expression
    size_t *locexpr_length,
    CORE_ADDR pc);
 
-struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off
-  (sect_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu,
-   CORE_ADDR (*get_frame_pc) (void *baton),
-   void *baton, bool resolve_abstract_p = false);
-
-struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off
-  (cu_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu,
-   CORE_ADDR (*get_frame_pc) (void *baton),
-   void *baton);
-
-extern const gdb_byte *dwarf2_fetch_constant_bytes (sect_offset,
-                                                   struct dwarf2_per_cu_data *,
-                                                   struct obstack *,
-                                                   LONGEST *);
-
-struct type *dwarf2_fetch_die_type_sect_off (sect_offset,
-                                            struct dwarf2_per_cu_data *);
-
 /* Find the frame base information for FRAMEFUNC at PC.  START is an
    out parameter which is set to point to the DWARF expression to
    compute.  LENGTH is an out parameter which is set to the length of
index 37d4af14ea50f6e189325369a9c7f9f9f1c59f36..6849644748481bd4b36b0afeb2b02e1904ca3426 100644 (file)
@@ -22211,14 +22211,11 @@ follow_die_ref (struct die_info *src_die, const struct attribute *attr,
   return die;
 }
 
-/* Return DWARF block referenced by DW_AT_location of DIE at SECT_OFF at PER_CU.
-   Returned value is intended for DW_OP_call*.  Returned
-   dwarf2_locexpr_baton->data has lifetime of
-   PER_CU->DWARF2_PER_OBJFILE->OBJFILE.  */
+/* See read.h.  */
 
 struct dwarf2_locexpr_baton
 dwarf2_fetch_die_loc_sect_off (sect_offset sect_off,
-                              struct dwarf2_per_cu_data *per_cu,
+                              dwarf2_per_cu_data *per_cu,
                               CORE_ADDR (*get_frame_pc) (void *baton),
                               void *baton, bool resolve_abstract_p)
 {
@@ -22317,12 +22314,11 @@ dwarf2_fetch_die_loc_sect_off (sect_offset sect_off,
   return retval;
 }
 
-/* Like dwarf2_fetch_die_loc_sect_off, but take a CU
-   offset.  */
+/* See read.h.  */
 
 struct dwarf2_locexpr_baton
 dwarf2_fetch_die_loc_cu_off (cu_offset offset_in_cu,
-                            struct dwarf2_per_cu_data *per_cu,
+                            dwarf2_per_cu_data *per_cu,
                             CORE_ADDR (*get_frame_pc) (void *baton),
                             void *baton)
 {
@@ -22350,15 +22346,12 @@ write_constant_as_bytes (struct obstack *obstack,
   return result;
 }
 
-/* If the DIE at OFFSET in PER_CU has a DW_AT_const_value, return a
-   pointer to the constant bytes and set LEN to the length of the
-   data.  If memory is needed, allocate it on OBSTACK.  If the DIE
-   does not have a DW_AT_const_value, return NULL.  */
+/* See read.h.  */
 
 const gdb_byte *
 dwarf2_fetch_constant_bytes (sect_offset sect_off,
-                            struct dwarf2_per_cu_data *per_cu,
-                            struct obstack *obstack,
+                            dwarf2_per_cu_data *per_cu,
+                            obstack *obstack,
                             LONGEST *len)
 {
   struct dwarf2_cu *cu;
@@ -22483,12 +22476,11 @@ dwarf2_fetch_constant_bytes (sect_offset sect_off,
   return result;
 }
 
-/* Return the type of the die at OFFSET in PER_CU.  Return NULL if no
-   valid type for this die is found.  */
+/* See read.h.  */
 
 struct type *
 dwarf2_fetch_die_type_sect_off (sect_offset sect_off,
-                               struct dwarf2_per_cu_data *per_cu)
+                               dwarf2_per_cu_data *per_cu)
 {
   struct dwarf2_cu *cu;
   struct die_info *die;
index a3ae412379ac84acb3a794f06e22d7849d3f6a5c..00652c2b45a71dec209167c1df67bb6006bd35bc 100644 (file)
@@ -537,6 +537,39 @@ struct type *dwarf2_get_die_type (cu_offset die_offset,
 CORE_ADDR dwarf2_read_addr_index (dwarf2_per_cu_data *per_cu,
                                  unsigned int addr_index);
 
+/* Return DWARF block referenced by DW_AT_location of DIE at SECT_OFF at PER_CU.
+   Returned value is intended for DW_OP_call*.  Returned
+   dwarf2_locexpr_baton->data has lifetime of
+   PER_CU->DWARF2_PER_OBJFILE->OBJFILE.  */
+
+struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off
+  (sect_offset sect_off, dwarf2_per_cu_data *per_cu,
+   CORE_ADDR (*get_frame_pc) (void *baton),
+   void *baton, bool resolve_abstract_p = false);
+
+/* Like dwarf2_fetch_die_loc_sect_off, but take a CU
+   offset.  */
+
+struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off
+  (cu_offset offset_in_cu, dwarf2_per_cu_data *per_cu,
+   CORE_ADDR (*get_frame_pc) (void *baton),
+   void *baton);
+
+/* If the DIE at SECT_OFF in PER_CU has a DW_AT_const_value, return a
+   pointer to the constant bytes and set LEN to the length of the
+   data.  If memory is needed, allocate it on OBSTACK.  If the DIE
+   does not have a DW_AT_const_value, return NULL.  */
+
+extern const gdb_byte *dwarf2_fetch_constant_bytes
+  (sect_offset sect_off, dwarf2_per_cu_data *per_cu, obstack *obstack,
+   LONGEST *len);
+
+/* Return the type of the die at SECT_OFF in PER_CU.  Return NULL if no
+   valid type for this die is found.  */
+
+struct type *dwarf2_fetch_die_type_sect_off
+  (sect_offset sect_off, dwarf2_per_cu_data *per_cu);
+
 /* When non-zero, dump line number entries as they are read in.  */
 extern unsigned int dwarf_line_debug;
 
This page took 0.036136 seconds and 4 git commands to generate.