disassembly options

Robin Getz rgetz@blackfin.uclinux.org
Sat Sep 8 04:37:00 GMT 2007


On Fri 7 Sep 2007 10:52, Nick Clifton pondered:
> Hi Robin,
> 
> > It would be nice to have something that automatically told me that the 
> > MMR at 0xffc00000 == "PLL_CTL", (the name actually means something - 
> > and is referenced in the standard processor documentation), and get
> > something that looks like:
> > 
> >     20e4:       4a e1 c0 ff     P2.H = 0xffc0   /* 0xffc01f24 */;
> >     20e8:       0a e1 00 00     P2.L = 0x0      /* 0xffc00000 */;
> >     20ec:       10 95           R0 = W[P2] (Z)  /* PLL_CTL */;
> 
> I think that this would be useful.
> 
> You may find however that implementing it in a nice generic way will 
> mean that you will have to rewrite the symbol/address decoding part 
> of the disassembler.  Not that this would be a bad thing, it could 
> certainly use a tidy up. 

OK - I will have a look at this. I was thinking of doing something separate, 
(as opposed to put it in the common symbol lookup) to allow the arch specific 
implementation to get it only when it thought it was necessary. At least for 
Blackfin, there might be times when we don't want symbols, but only MMR names 
or visa versa.


The next question is - what is the most generic way to keep the memory mapped 
register address <-> names? 

I was thinking/hoping that an external xml file would be the best/easiest way. 
(Since we already use something like this for an eclipse plugin).

if '-M mmr-names=ARCH' is given, it looks for the './ARCH.xml' file. (as well 
as --include=dir). (assuming that we don't really want to recycle reg-names).

This allows new SOC to be supported without releasing/testing new toolchain 
binaries (just update/drop in some xml files beside your existing toolchain).

This would use the hated/loved expat lib which is already used/tested in gdb, 
and would include addition configure options (as in gdb):

  --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
  --without-libexpat-prefix     don't search for libexpat in includedir and 
libdir

Comments/complaints welcome...

-Robin



More information about the Binutils mailing list