This is the mail archive of the binutils@sources.redhat.com 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/RFC] NULL terminate mips dis options


Hello!

objdump --help may crash if mips_abi_choices[] and mips_arch_choices[] do
not end in a record with a NULL name. I verified this in a Linux i586 host
configured with --enable-targets=all --enable-64-bit-bfd, using gcc 3.3.

Regards,
Elias

opcodes/ChangeLog

2003-02-10  Elias Athanasopoulos  <elathan@phys.uoa.gr>

	* mips-dis.c (mips_abi_choices): Add a NULL record at the end.
	(mips_arch_choices):  Likewise.


===================================================================
RCS file: /home/anteater/bucvs/src/opcodes/mips-dis.c,v
retrieving revision 1.1
diff -bu -r1.1 /home/anteater/bucvs/src/opcodes/mips-dis.c
--- /home/anteater/bucvs/src/opcodes/mips-dis.c	2003/02/10 09:37:54	1.1
+++ /home/anteater/bucvs/src/opcodes/mips-dis.c	2003/02/10 10:14:03
@@ -299,6 +299,7 @@
   { "32", mips_gpr_names_oldabi, mips_fpr_names_32 },
   { "n32", mips_gpr_names_newabi, mips_fpr_names_n32 },
   { "64", mips_gpr_names_newabi, mips_fpr_names_64 },
+  { NULL, NULL, NULL }
 };
 
 struct mips_arch_choice {
@@ -390,6 +391,8 @@
      not print its name.  */
   { "",		1, bfd_mach_mips16, CPU_MIPS16, ISA_MIPS3 | INSN_MIPS16,
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+  
+  { NULL, 0, 0, 0, 0, NULL, NULL, 0, NULL }
 };
 
 /* ISA and processor type to disassemble for, and register names to use.


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