aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-03-26 09:28:08 -0600
committerTom Tromey <tom@tromey.com>2020-03-26 09:28:12 -0600
commit3d27bbdb4bc02968ffd86c6b5c331d0e04bc3ed9 (patch)
treedd7d72ee57523167563e5603b8125ca10ce1fb69
parent9eac9650ce7de1f6e4b5ddc103d6530ebc32582d (diff)
downloadbinutils-3d27bbdb4bc02968ffd86c6b5c331d0e04bc3ed9.zip
binutils-3d27bbdb4bc02968ffd86c6b5c331d0e04bc3ed9.tar.gz
binutils-3d27bbdb4bc02968ffd86c6b5c331d0e04bc3ed9.tar.bz2
Move dwarf2_section_buffer_overflow_complaint to dwarf2/section.c
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.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/dwarf2/read.c9
-rw-r--r--gdb/dwarf2/section.c10
-rw-r--r--gdb/dwarf2/section.h3
4 files changed, 22 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0d58750..aa462ad 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
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.
2020-03-26 Tom Tromey <tom@tromey.com>
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 4a17a7e..f42058f 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1712,15 +1712,6 @@ dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
}
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)
{
complaint (_("macro debug info contains a "
diff --git a/gdb/dwarf2/section.c b/gdb/dwarf2/section.c
index 5e33809..31cb8b9 100644
--- a/gdb/dwarf2/section.c
+++ b/gdb/dwarf2/section.c
@@ -28,6 +28,16 @@
#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
diff --git a/gdb/dwarf2/section.h b/gdb/dwarf2/section.h
index 8ddedca..f4ac9af 100644
--- a/gdb/dwarf2/section.h
+++ b/gdb/dwarf2/section.h
@@ -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 */