Please tell me how to properly debug the application in assembly language. Previously, for console applications I used oli debager, everything was fine, now the GUI needs to debug the application, you need to stop at a certain point in the code after pressing a button. But when you press the button, the debugger does not stop, it just takes an action by pressing the button. Please tell me how to stop at a certain place and how to properly debug such programs. thank
- Refine the platform at least. If Microsoft, then no problems with native debuggers did not notice, until the ascent of the breakpoints inside the VxD. - user6550
- Compile FASMOM, under Windu - NewbieTeapot
- Emnip, more recently, the fasm just did not know how to generate common debugging information. How now - I do not know. - user6550
1 answer
need at a certain place the code will stop after clicking on the button
You can insert int3 directly into the code in the right place (at the beginning of the code that handles pressing the button). When you start the program under the debugger, the execution will stop at this place. When run without a debugger, an unhandled exception will simply occur and the program will be closed.
more recently, the fasm simply did not know how to generate common debugging information.
Starting from version 1.67.29, fasm can generate debugging / symbolic information (enabled by the -s
key when compiling from source from the command line). It uses its own format that is not compatible with any other tool, but there is, for example, a plugin for OllyDbg 1.10, including its support, and there are utilities that convert this format to common formats.
Quote from forum.flatassembler.net (theme " Symbolic / debug information ", post number 2):
Tomasz grysztar
Here is the list of tools for converting the "fas" into some other formats (for some new tools arrive):
- Tool that generates debug info in COFF object files generated by fasm: http://board.flatassembler.net/topic.php?p=89369
- Linux file generated for the ELF binary: http://board.flatassembler.net/topic.php?t=10029
- Plugin for OllyDbg that loads debug info from .fas file: http://board.flatassembler.net/topic.php?p=114370
- IDA script which adds FASM debug info: http://board.flatassembler.net/topic.php?p=118458
- fasolly: yet another plugin which imports .fas into OllyDbg http://board.flatassembler.net/topic.php?t=12365
- Hmm, well, isn't it the only right and convenient way to debug ASM applications at the same time? With the help of the software breack: You can insert int3 in the right place in the code in the right place - AseN
- @ 0xFFh, except for "breakpoints" are the names of labels / procedures / variables that I would like to see in a readable form. - insolor
- @ 0xFFh, in fact, a normal debugger assumes much more. Even in times of deep DOS, drivers could be debugged (not to mention simple programs), lounging in a comfortable chair of some TD - with memory, code, registers, changing anything, and even stepping back by the instructions, and all of this by source - with all labels, symbolic names, variables, etc. Well, for residents there was a smart Quaid Analyzer ... Eh :-) - user6550