This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: RFC/gdbarch: Make OS ABI a real member of the gdbarch


+#
+i:2:TARGET_OSABI:enum gdb_osabi:osabi::::GDB_OSABI_UNKNOWN
Yes, much better.

+enum gdb_osabi
+{
+  GDB_OSABI_UNINITIALIZED = -1, /* For struct gdbarch_info.  */
+
+  GDB_OSABI_UNKNOWN = 0,	/* keep this zero */
I belive that both of these `= ...' can be dropped - since info.osabi is explicitly initialized, no magic values are needed. This is also more consistent with it being a named enum.

Hmm, why was the enum to a new file? Ah! Ulgh, "gdbarch.h" needs the definition :-/ Rather than create a new file, just move the enum to "defs.h". This is consistent with other, similar, enums solved the problem. It also stops me thinking that "osabi.h" should include "osabi-list.h" (nb, s/_/-/) :-)

enjoy,
Andrew



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