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]

Re: [PATCH-ping] VAX: Forced decoding of function entry masks (eg.for disassembling ROM images)


Hi Jan-Benedict,


I'd like to ping for my last patch, introducing the capability to
better disassemble ROM or MOP boot images with eg. objdump. Andreas'
objection about a limited number of entry addresses is fixed.

Sorry - it was in my queue to look at, but I am little behind at the moment.


2005-03-21 Jan-Benedict Glaw <jbglaw@lug-owl.de>

	opcodes/
	* vax-dis.c: (struct private): Add a bfd_vma pointer to store
	supplied function entry mask addresses.
	(init_private_data): New; fill in supplied entry mask addresses.
	(free_private_data): New; free() entry mask addresses.
	(is_function_entry): Check if a given address is a function's
	start address by looking at supplied entry mask addresses and
	symbol information, if available.
	(print_insn_vax): Use init_private_data(), is_function_entry()
	and free_private_data().

	binutils/doc/
	* binutils.texi: Document new VAX disassembler-specific option
	-M entry:0xfooba8.

Approved please apply, but...



+ /* Entry mask handling */

comment formatting. Should be: /* Entry mask handling. */


+static int init_private_data
+  PARAMS ((struct disassemble_info *, struct private *));
+static void free_private_data PARAMS ((struct private *));
+static bfd_boolean is_function_entry
+  PARAMS ((struct disassemble_info *, bfd_vma addr));

We are using ISO C() now, so there is no need for the PARAMS macro. In fact if you place your function declarations carefully in the source file then there is no need for static prototypes at all.


+static int
+init_private_data (info, priv)
+    struct disassemble_info *info;
+    struct private *priv;

Again ISO C90 means that you can include the argument declarations in the parameter list, ie:


  static int
  init_private_data (struct disassemble_info *info, struct private* priv)
  {


Finally - it would be nice if you could come up with a new test for the GAS testsuite that checks this functionality.


Cheers
  Nick


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