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]

Re: PATCH: Add --insn-width to objdump


Hi H.J.

2009-07-19 H.J. Lu <hongjiu.lu@intel.com>

* NEWS: Mention --insn-width.

	* objdump.c (insn_width): New.
	(usage): Display --insn-width.
	(option_values): Add OPTION_INSN_WIDTH.
	(long_options): Add --insn-width.
	(disassemble_bytes): Handle insn_width.
	(main): Handle OPTION_INSN_WIDTH.

* doc/binutils.texi: Document --insn-width.

Approved, with one minor change:


+	case OPTION_INSN_WIDTH:
+	  insn_width = atoi (optarg);

I recommend using strtoul (with a base value of 0) here rather than atoi. It allows the use to prefix their values with 0x or 0 if they so wish and it detects bogus characters in the input value.


Cheers
  Nick



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