This is the mail archive of the binutils@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]

[patch obvious] Add missing enum constant for gdb_index to dwarf_section_display_enum


I'm committing the following patch as trivial and obvious. The enum
dwarf_section_display_enum is missing the entry for gdb_index; as a
result, the constant "max" is too small, and
--debug-dump=trace_aranges won't actually dump anything.

(It seems to me that this is fragile. When looping over
debug_displays[], wouldn't it be better to use
sizeof(debug_displays)/sizeof(struct dwarf_section_display) instead of
max? It doesn't seem like these enum constants are used for anything,
either.)

-cary


	* binutils/dwarf.h (dwarf_section_display_enum): Add missing enum
	constant.


Index: dwarf.h
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.h,v
retrieving revision 1.24
diff -u -p -r1.24 dwarf.h
--- dwarf.h	26 Jul 2011 21:31:37 -0000	1.24
+++ dwarf.h	30 Sep 2011 20:49:25 -0000
@@ -152,6 +152,7 @@ enum dwarf_section_display_enum
   static_vars,
   types,
   weaknames,
+  gdb_index,
   trace_info,
   trace_abbrev,
   trace_aranges,


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