Move dwarf2_section_buffer_overflow_complaint to dwarf2/section.c
authorTom Tromey <tom@tromey.com>
Thu, 26 Mar 2020 15:28:08 +0000 (09:28 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 26 Mar 2020 15:28:12 +0000 (09:28 -0600)
This moves dwarf2_section_buffer_overflow_complaint to
dwarf2/section.c.

gdb/ChangeLog
2020-03-26  Tom Tromey  <tom@tromey.com>

* dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
Declare.
* dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
Move from read.c.
* dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
to section.c.

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

index 0d58750472c538305000bd8d6308954a5972d5ed..aa462adb6f8b1b2a5bb0b1b169a007cc93f29821 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-26  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
+       Declare.
+       * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
+       Move from read.c.
+       * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
+       to section.c.
+
 2020-03-26  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
index 4a17a7ea98dcdae0bf59b024cc03ed8216f556b6..f42058fb7740b91ee96857f0f70b393a92d606a3 100644 (file)
@@ -1711,15 +1711,6 @@ dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
             arg1, arg2, arg3);
 }
 
-static void
-dwarf2_section_buffer_overflow_complaint (struct dwarf2_section_info *section)
-{
-  complaint (_("debug info runs off end of %s section"
-              " [in module %s]"),
-            section->get_name (),
-            section->get_file_name ());
-}
-
 static void
 dwarf2_macro_malformed_definition_complaint (const char *arg1)
 {
index 5e33809117d9ba05de1faf9febf9384f0912ebc1..31cb8b9b2e759faa3b07f16bc4fb67dad0b2eea4 100644 (file)
 #include "dwarf2/section.h"
 #include "gdb_bfd.h"
 #include "objfiles.h"
+#include "complaints.h"
+
+void
+dwarf2_section_buffer_overflow_complaint (struct dwarf2_section_info *section)
+{
+  complaint (_("debug info runs off end of %s section"
+              " [in module %s]"),
+            section->get_name (),
+            section->get_file_name ());
+}
 
 struct dwarf2_section_info *
 dwarf2_section_info::get_containing_section () const
index 8ddedcaf76171b384d4235da81ba10b04678ed2e..f4ac9af311e26a5195504fe5a92dbaff19282b9f 100644 (file)
@@ -116,4 +116,7 @@ struct dwarf2_section_info
   bool is_virtual;
 };
 
+extern void dwarf2_section_buffer_overflow_complaint
+  (struct dwarf2_section_info *section);
+
 #endif /* GDB_DWARF2_SECTION_H */
This page took 0.03498 seconds and 4 git commands to generate.