flat assembler
Message board for the users of flat assembler.

Index > Windows > Is there a way to symbolically debug fasm compiled exe's?

Author
Thread Post new topic Reply to topic
Alloy



Joined: 21 Apr 2007
Posts: 2
Alloy
I haven't seen any reference of it as a built in feature of fasm.
Post 30 Oct 2008, 02:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17272
Location: In your JS exploiting you and your system
revolution
fasmarm has the DWARF format for symbolic debugging. If you are keen you might like to add something similar for the x86 formats and post it here. I am sure many people would be grateful for it.
Post 30 Oct 2008, 03:36
View user's profile Send private message Visit poster's website Reply with quote
Alloy



Joined: 21 Apr 2007
Posts: 2
Alloy
Thanks revolution.
Post 31 Oct 2008, 10:49
View user's profile Send private message Reply with quote
handyman



Joined: 04 Jun 2007
Posts: 40
Location: USA - KS
handyman
For x86 symbolic debugging I do the following all the time:

If you are using Ollydbg for a debugger (currently I am using version 1.10) you can add the symbolic names to the export section that will then show up in the code and variable sections of the debugger. These will also show up in the names lookup popup window.

Be sure to alphabetize all the symbol names in the list in ASCII order, or some of them may not show up in the debugger. The list ordering is case sensitive.

Make an export section that contains all the symbolic names you want to see in your exe debugging session (labels and variables) using the form:

section '.export' export readable writeable

export 'filename.exe',\
label1 ,'label1:',\
label2 ,'label2:',\
var1 ,'var1',\
var2 ,'var2'


The text of 'filename.exe' must exactly match the name of the file being debugged including the extension.

The text inside the quotes behind the symbol names can be whatever you want to be displayed in debugger, so if they are not the same as the name in the code it is up to you to remember what is what.

If you want to debug local labels (not local variables) then use the form:

prev_global_label.local_label ,'prev_global_label.local_label:',\

since local labels (the ones beginning with 1 dot) are always pinned to the previous global label (..globals do not count). I use the ':' in the label text to help me see what are label names vs. variable names in the names lookup.

Local variables cannot be designated or symbolically debugged using this method

After debugging is completed all you have to do is remove the export section symbol names (or the whole export section) and then recompile again to remove the symbolic names from the exe.

I do not know if this works with other debuggers than Ollydbg,
Post 10 Dec 2008, 01:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.