flat assembler
Message board for the users of flat assembler.

Index > Windows > debugging

Author
Thread Post new topic Reply to topic
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 22 Jul 2007, 15:05
Is there a good debugger for use under windows with fasm?
Post 22 Jul 2007, 15:05
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 22 Jul 2007, 15:41
fasm doesn't support debugging formats so the executables are always stripped. To debug I suggest you to use OllyDbg.
Post 22 Jul 2007, 15:41
View user's profile Send private message Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight 22 Jul 2007, 21:17
Hwere are a few Free ones


OllyDbg

Windbg [32] [64]
Post 22 Jul 2007, 21:17
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 22 Jul 2007, 21:33
Post 22 Jul 2007, 21:33
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 22 Jul 2007, 22:06
Quote:

Microsoft WinDbg isn't bad either: http://www.microsoft.com/whdc/devtools/debugging/default.mspx


It does some kind of analysis? The problem with fasm is that you can't add debugging info so if the debugger does not perform any analisys of the program is pretty hard to follow the debugging (not impossible of course).

BTW, why every post repeats the previous?Razz
Post 22 Jul 2007, 22:06
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 22 Jul 2007, 22:49
Last time I checked it didn't really do any analysis, but I'm used to work with softice, so... it's not that necessary for normal debugging. Having some kind of symbol information is nice though, and it's a shame that FASM can't add it.
Post 22 Jul 2007, 22:49
View user's profile Send private message Visit poster's website Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight 23 Jul 2007, 10:56
That is why i perfer ollydbg
Post 23 Jul 2007, 10:56
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 23 Jul 2007, 22:22
Also, another little trick is to follow through the code with your finger. you'd be surprised how many bugs you can catch by manual execution of the program.
Post 23 Jul 2007, 22:22
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
handyman



Joined: 04 Jun 2007
Posts: 40
Location: USA - KS
handyman 24 Jul 2007, 03:03
I use Ollydbg all the time. You can add symbolic information by putting the list of labels in the export section. Be sure to sort all the entries in the export section and be aware that the entries and sort are case sensitive.

Ollydbg also keeps track of the entries according to address, so if multiple labels in the code refer to the same program address then be sure to use NOP after these labels to insure that all labels have unique addresses. This messes up optimization, but it makes following the code easier since what Ollydbg displays matches the source code.

If there are labels in the code starting with a dot, then be sure to prepend the dot label name in the export section with the previous non-dot label in code. This is because dot labels are considered local to the previous non-dot label and you need to be sure that all label names being exported are unique.
Post 24 Jul 2007, 03:03
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 24 Jul 2007, 10:05
handyman: thanks for the tip, but gosh - it'd be a lot easier if FASM could generate some debug info Smile
Post 24 Jul 2007, 10:05
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 25 Jul 2007, 04:49
I think Tomasz couldn't decide what format to support, so he'd possibly have to invent his own. (And there was also a weird macro hack, see here).

Anyways, if you refuse to debug pure code via stopping at int3 then try YASM (CodeView8, Dwarf2, or Stabs), which I'm almost definitely sure would work with OpenWatcom's debugger.
Post 25 Jul 2007, 04:49
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 25 Jul 2007, 05:49
Quote:

I think Tomasz couldn't decide what format to support, so he'd possibly have to invent his own.


I suspect the reason for the lack of an official fasm symbolic debug format is far worse than you believe

http://board.flatassembler.net/topic.php?t=4191&start=25#32063

Tomasz Grysztar wrote:

I'm also working now (though only in design area at the moment) on the new line of fasm's core (will become 1.65.x when ready) that will support in much better way (and without a not-fully-reliable tricks like the one used by my listing extension) exporting any kind of debug information or listings. This, to be truly well working and reliable, needs some important changes in all the basic internal structures used by fasm, so it might still take some time for me to finish it.



Given that fasm may now be abandonware ???????? (I hope not), perhaps it may never happen.
Post 25 Jul 2007, 05:49
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 25 Jul 2007, 06:43
It's hardly abandonware (few months, heck I procrastinate way worse, heh), but he's busy with school, getting a degree and whatnot.
Post 25 Jul 2007, 06:43
View user's profile Send private message Visit poster's website 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.