flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > New run-in-debugger option for fasmw Goto page 1, 2 Next |
Author |
|
macomics 29 Feb 2024, 15:23
I added fasmw option to run a compiled program in debugger.
These new settings are saved in the program's ini file. Now, when "Debug mode" is activated, compiled program will run through debugger program. When deactivated, the launch will be performed directly (as before). You can specify the path to the debugging program in the corresponding dialog box. Here is the file with new lines I added. Complete ADD: To apply the patch, unzip the archive to the fasm1 root folder and run install.bat I have updated the patch so that the value of the INCLUDE variable is set to the standard placement relative to the position of the patch files.
Last edited by macomics on 21 Sep 2024, 16:11; edited 15 times in total |
|||||||||||||||||||||||||||||
29 Feb 2024, 15:23 |
|
macomics 29 Feb 2024, 20:35
It is also necessary to put "Browse" button in dialog window.
|
|||
29 Feb 2024, 20:35 |
|
macomics 01 Mar 2024, 07:03
Added Browse button. Changed the stack memory allocation to use VirtualAlloc/VirtualFree.
|
|||
01 Mar 2024, 07:03 |
|
MatQuasar 01 Mar 2024, 11:02
Your Assembly skill is way above mine. As an end user, is there any software that can read your FASMW_PATCH.ASM and patch my copy of FASMW source file?
|
|||
01 Mar 2024, 11:02 |
|
macomics 01 Mar 2024, 13:35
---
Last edited by macomics on 04 Mar 2024, 08:31; edited 1 time in total |
|||
01 Mar 2024, 13:35 |
|
MatQuasar 01 Mar 2024, 14:22
Just one suggestion, with MS naming convention, it is recommended to append "..." after "Browse" --> "Browse..." for any action that open a dialog.
Nice work overall! I speak for myself. |
|||
01 Mar 2024, 14:22 |
|
macomics 01 Mar 2024, 15:16
Then correct the name of the button on line 3877 in FASMW.ASM file. I will update the patch with a new name.
Code: dialogitem 'BUTTON','Browse...',ID_BROWSE,200,12,42,14,WS_VISIBLE+WS_TABSTOP ADD: I also want to warn you. If the path and file name of the debugger contain spaces, then you must specify the file name in quotation marks. I removed the forced quoting of the debugger file name, but left it for the program name. Perhaps I will add automatic quoting for the debugger file name, if there are spaces in the string, to the proc of the dialog box. But that will be later. |
|||
01 Mar 2024, 15:16 |
|
MatQuasar 01 Mar 2024, 16:06
Strange, it still opens my Assembly program in IDA Free despite having white space in between the path name.
Code: C:\Program Files\IDA Freeware 8.3\ida64.exe I am running on Windows 10 22H2 Pro.
|
||||||||||
01 Mar 2024, 16:06 |
|
revolution 01 Mar 2024, 16:23
Add support for parameters.
Code: "c:\path\to\my debugger.exe" /option value "%" /another-option |
|||
01 Mar 2024, 16:23 |
|
macomics 01 Mar 2024, 16:41
fasmw does not have ready-made string functions. I will add advanced processing of the debugger name string a little later.
It is necessary not only to add automatic quoting of the debugger file name, but also to determine the presence of quotation marks and additional parameters in the string. I think it will be easier to add a separate line for the debugger arguments. And the name of the program being debugged should be replaced not with one character, but with some kind of understandable template. For example, "$exename" - without quotes. Just to add options, I removed the automatic quoting of debugger file name. So that you can set additional options in string. Then the name of the program being debugged is supplied to this line with the last parameter in quotation marks. Code: "C:\path\to\my debugger.exe" /option value /more /andMore /debug_file Code: "C:\path\to\my debugger.exe" /option value /more /andMore /debug_file "C:\path to source\my program.exe" Alternatively, we can add options for generating debugging information (fasm -s <symbols>) and a template for substituting the name of a file with debugging information. Code: "C:\path\to\my debugger.exe" /option value /more /andMore /debug_symbols $symbols /debug_file $exename |
|||
01 Mar 2024, 16:41 |
|
ProMiNick 01 Mar 2024, 18:52
What is bad - we got numerios of fasm exes (original of different versions, and numerous of patched ones).
That is good that fasm is open source and could be patched directly. but most of patchs are used only by their authors, and erased from memory of other users. But may be would be better to add to official fasm IDE (fasmw fasmgw) ability of loading to fasm address space libraries (of course with executing their libinit with OS launcher) (and maybe ability to unload them). And of course ability to see list of such plugins. Without any requirements to inner plugin structure. I think that could help popularise fasm better. So, would be two abilities to add to fasm additional functional - patching and writing plugin. Plugins could be listed, they could be crosscompatibable with each other e.t.c. |
|||
01 Mar 2024, 18:52 |
|
macomics 01 Mar 2024, 22:16
---
Last edited by macomics on 04 Mar 2024, 08:31; edited 1 time in total |
|||
01 Mar 2024, 22:16 |
|
macomics 02 Mar 2024, 19:38
Updated
|
|||
02 Mar 2024, 19:38 |
|
macomics 03 Mar 2024, 20:22
I can say that the patch is completely ready. Now, when Debug Mode is enabled, a .fas file is additionally generated, and its absolute name can be passed to the debugger via $symbols.
So far, I can no longer think of what settings fasmw can pass to the debugger through its parameters, substituting the necessary values. Maybe, though... You can pass parameters to the debugger that fasmw could not interpret from its command line. Or I can add a template to pass the name of the source (.asm) file to the debugger. |
|||
03 Mar 2024, 20:22 |
|
MatQuasar 12 Mar 2024, 16:56
Hi macomics.
Inspired by Tomasz FASM 2 latest video (and his advice in Discord chatroom), I found an alternative way to launch debugger from software breakpoint. Here's how with WinDbg: (for other debugger may need to modify registry) 1. Download the Windows SDK installer from: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ 2. Select "Debugging tools for Windows" and proceed 3. Run Command Prompt as administrator 4. Run "windbg -I" Now can open FASMW.exe IDE with Assembly code, and insert "int3" at the beginning line, click Run and it opens WinDbg automatically!
|
||||||||||
12 Mar 2024, 16:56 |
|
Tomasz Grysztar 12 Mar 2024, 17:00
MatQuasar wrote: Inspired by Tomasz FASM 2 latest video (and his advice in Discord chatroom), I found an alternative way to launch debugger from software breakpoint. |
|||
12 Mar 2024, 17:00 |
|
macomics 12 Mar 2024, 17:34
MatQuasar wrote: Here's how with WinDbg: (for other debugger may need to modify registry) |
|||
12 Mar 2024, 17:34 |
|
xiaolaba 26 Aug 2024, 01:25
macomics wrote: I added fasmw option to run a compiled program in debugger. when drag and drop the FASMW.EXE to install.bat, something went wrong after awhile, it was close to well done, please help. error code like this, Code: include 'win32ax.inc' error: file not found.
_________________ best regards, xiao |
||||||||||
26 Aug 2024, 01:25 |
|
macomics 26 Aug 2024, 14:21
You do not have the INCLUDE environment variable set, which should include the path to the FASM files. It must contain a path E:\FASM\INCLUDE
Code: ;; To check echo %INCLUDE% It is assumed that you are using FASM and have set the value of this variable for ease of use. Otherwise, you will have to do this every time before launching FASM.EXE. It is not required to use FASMW.EXE. It uses an option from its own INI file. ADD: I have updated the patch so that the value of the INCLUDE variable is set to the standard placement relative to the position of the patch files. |
|||
26 Aug 2024, 14:21 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.