Genesis
When my eyes went on strike after inspecting yet another objdump output piped to a pager in a silly console, i searched the web, thinking someone ought to have even less patience than i have, only to find a bunch of ugly incomplete disassemblers or proprietary reverse engineering tools. Later on i stumbled onto dissy, which fits the bill much better, but i was at it already; plus it makes the cardinal sin to depend on both python and gtk ;)
Synopsis
Embroider isn't a disassembler, it relies on objdump - of binutils fame - to do the grunt work. That output is massaged, some crude flow analysis is done and finally an HTML 4.01 compliant document is produced; the goal being to quickly produce a static thing which would allow fancy display (via CSS 2.x) pretty much anywhere.
I'm no HTML or CSS expert. I couldn't make a decent design even if my life depended on. Yet it's quite amazing what kind of UI fakery CSS 2.x enables. That allowed me to minimize dependencies, even if i'm sure some cool tricks could be done with some javascript here or there.
In any case, please forgive me for the styling, i ran out of pastels.
Notes
Shortcomings
- requires a C++ compiler (known to work with g++ and msvc8).
- requires a working objdump (known to work even on cygwin).
- x86* only, even if making it grok another architecture would only take 5mn.
- output isn't that interesting without symbols; that's mostly an issue on silly platform/compiler combo.
- right now output isn't split into multiple 'pages' and loading a few megabytes of fancy divs & spans into a browser is an interesting experience.
- i don't have the patience to teach lame browsers like IE 7 how to render stuff properly; on the other hand Firefox 2.x does the right thing.
- i don't have the patience to wait 10s for output because of STL's ostream amazing inneficiency - as far as g++ is concerned - hence horrid kludging.
Todo
- split output into multiple documents.
- ask those in the know - ie Firefox devs - what kind of layout would help their browser render the whole enchilada faster.
- find someone with a bit of taste to tweak styling.
- embed a default css style.
Stuff
- an example of self embroidment; ATTENTION: large.
-
a tarball with source - under GPL v2 -, makefile, msvc8 project/solution, some css... etc...:
embroider v0.4
- 2008-08-01: v0.2, fixes for g++ 4.3, stylesheet inlining.
- 2009-10-15: v0.3, fixed typo for when decorating forward call/branch landing on another branch, misc objdump kludges (but that's rather hopeless), anonymous namespace shortening, externals cross referencing.
- 2009-10-16: v0.4, support for Intel syntax, various fixes thanks to splicer.
Remarks, patches, insults & flames should be addressed to Thierry Berger-Perrin <tbptbp@gmail.com>