This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] New debug_displays_assert


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b451e98a909e1a6afa71c4a4655adc4cfeea5249

commit b451e98a909e1a6afa71c4a4655adc4cfeea5249
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Mar 2 10:58:19 2017 +0100

    New debug_displays_assert
    
    binutils/
    2017-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* dwarf.c (debug_displays_assert): New static assertion.

Diff:
---
 binutils/ChangeLog | 4 ++++
 binutils/dwarf.c   | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 24c74a1..fa33a43 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
 2017-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+	* dwarf.c (debug_displays_assert): New static assertion.
+
+2017-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
 	* dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists.
 
 2017-03-01  Nick Clifton  <nickc@redhat.com>
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index ad0bfcf..fdfbc16 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -8591,3 +8591,6 @@ struct dwarf_section_display debug_displays[] =
   { { ".debug_tu_index",    "",			NULL, NULL, 0, 0, 0, NULL, 0, NULL },
     display_cu_index,       &do_debug_cu_index,	FALSE },
 };
+
+/* A static assertion.  */
+extern int debug_displays_assert[ARRAY_SIZE (debug_displays) == max ? 1 : -1];


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]