Always have been curious to know what your compiler makes out of your
sources ?

This is the first release of a little tool i've called showasm. It's
purpose is to show a C/C++ file and the assembly produced from it in a
way so that it's easy to figure out which assembly code each C-source
line resulted in.

The idea was taken from a skript named "listing" that comes with the gcc
compiler sources. Unfortunately I found that it didn't work for me properly.

showasm has got the additional feature to use colors to make the
output easily readable, so be sure to use an appropriate VT100/ANSI
Terminal (both linux console and color-xterm to the job for me).

For example take you favorite C-File and call

showasm favorite.c | less -r

Please note the options -r given to less because showasm outputs
vt100 control codes which otherwise wouldn't be displayed correctly.

Want to know how optimization would change the output ? No problem,
just run:

showasm favorite.c -O2 -funroll-loops -fwhatever-c-compiler-options-you-want

You can even compile by hand and feed in the .asm file instead:

gcc -S -gstabs favorite.c
showasm favorite.s

When given a C/C++ file showasm tries to run gcc, but you can use any
compiler you like as long as it can dump out assembler output and --
this is important -- uses the stabs debugging format. Apart from that
it should run on different architectures (tested on x86(IA32) and
Alpha AXP with gcc).

If you've got any idea how to improve showasm or found a bug don't hesitate to
contact me. My email address is:

schuetz.kai@gmx.de

My ideas so far:
- make color an option (for now you've got to uncomment three lines in the
  showasm script - look for FIXME)

- Support different output formats like HTML/TeX/whatdoyouneed to
  incorporate it's output into Web-Pages, papers, e.t.c.

- For HTML output: it would be fun to make label into links !

- support for non ANSI/VT100 Terminals (use perl Terminfo package)

If you like one the the ideas above feel free to mail me to encurage
me implementing it.

Enjoy !
