views:

118

answers:

5

I have an assembler program and I try to understand it. (I'm actually profiling it). Is there a Linux tool/editor that would structurize it a little for me? Displaying where loops/jumps are would be enough. Handy description of what an instruction does would be great.

A: 

There's an Asm plugin for Eclipse you could use.

However, usually IDEs aren't employed for assembly programming. I'm not sure how much more understanding you will gain by easily spotting where the jumps and loops are - you have to read through everything anyway.

Eli Bendersky
A: 

Have a look at this...

http://sourceforge.net/projects/asmplugin/

It's a plugin for Eclipse...

Martin Milan
Snap! lol......
Martin Milan
A: 

Not really, but you can always look at instruction references, use syntax highlighting (vim asm syntax) also you could step it through debugger if there's no limitation running it. For already assembled code this might be interesting: LIDA

pk4r
+3  A: 

If you look for something that resembles OllyDbg but for linux, you might try edb.

andras
+1  A: 

Since you are really reversing a high level language for profiling, you can do a couple things to help the process. First enable and preserve debugging information in the C++ compiler and linker (don't let it strip the executable). In g++ the -g command line flag does this. Second many C++ compilers have flags to output the immediate assembly source code, rather than emitting the object code (which is used by the linker). In g++ the -S flag enables this.

The assembly from the compiler can be compared to the assembly from the oprofile disassembly.

I'm not very familiar with decompilers, but two including one from another SO post are Boomerang and REC for C, rather than C++.

I hope that helps.

mctylr