flat assembler
Message board for the users of flat assembler.
Index
> Main > How to debug ? |
Author |
|
Mac2004 12 Jan 2008, 19:41
Which platform you are targetting your code (win, dos, *nix etc)?
Basically one good debugging method is to print your variables etc. on screen in order to see whats happening. I use that method most of the time. regards, mac2004 |
|||
12 Jan 2008, 19:41 |
|
edfed 12 Jan 2008, 20:23
one other method is to be used to programming mechanism.
and put a text string before each functions, as this, if an error occurs, the offset given by the error message helps to know where error happens, and reading the binary in an hexa editor directlly show the defected routine. |
|||
12 Jan 2008, 20:23 |
|
Vov4ik 12 Jan 2008, 20:55
Insertion of INT 3 instruction helps to find necessary parts of your code, especially in complex project, or an assembly language procedure in HLL code. Just run program in debugger and wait when it appears.
|
|||
12 Jan 2008, 20:55 |
|
vid 12 Jan 2008, 23:36
1. use FASM to create object, and link them to executable with (at least some) debug info
2. in windows PE, you can create export table, which OllyDbg will resolve as symbols |
|||
12 Jan 2008, 23:36 |
|
bitRAKE 13 Jan 2008, 00:16
INT3 really helps move to the target area quickly. If really lost - use the "divide and conquer" strategy:
Place an INT3 before and after the area of search and see where it stops; next place an INT3 between the previous two, and remove the first one. Keep doing this until the debugger stops right before the error - it is really faster with practice. Another method is to test small code fragments prior to piecing everything together. This promotes good program modularity in general - routines tend to have greater encapsulization and cohesion (inner dependence verse outer dependence). There is the ever-common register MsgBox - don't even need a debugger, lol! vkim made a fun debug window to collect run-time data - very useful tool. It's included with MASM32 package, but also on the web. http://www.radasm.com/projects/Debug.zip http://www.wasm.ru/ (Should be here, but I cannot find it )c: ) Maybe, I'll adapt vkim's debug macros to FASM. Some people on the board have mentioned using a console window in the same fashion. I haven't really searched the board for debug tools - would not be surprised if people have posted something to make data logging easier. |
|||
13 Jan 2008, 00:16 |
|
RazorJack 13 Jan 2008, 17:58
thanks eveyone !
you posted very usefull information ! |
|||
13 Jan 2008, 17:58 |
|
AlexP 14 Jan 2008, 02:36
Someone just created a VERY useful tool for debugging information in fasm with Olly in the Windows section of this site. Check it out
|
|||
14 Jan 2008, 02:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.