RadASM creates $.pdb in debug mode
Problem
While using UASM64.ini(or MASM64.ini), and if we want to compile our sources as debug, RadASM creates appname.exe and $.pdb
Expectation
When compiling as debug we want RadASM to create appname.exe and appname.pdb
Details
In RadASM.chm, RadASM > Customizing RadASM > Assembler.ini section states that:
Special characters
' $ ' Gets the filename from topmost editor window without extension
So when we write e.g. /PDB:$.pdb, we expect RadASM to create appname.pdb, but it creates $.pdb
I have tried this on on:
- masm
- masm64
- UASM64
But unfortunately if someone uses a single $ sign, RadASM interprets it as a single dollar sign. If someone uses dollar sign with a number stated under [MakeFiles], there is no problem; then RadASM interprets $ sign as appname.
Temporary workaround
Only for debug version we don't need to use linker parameter /PDB. Without this parameter link.exe already creates appname.pdb
Temporary Workaround 2
We can add xx=.pdb under [MakeFiles] section in Assembler.ini
Yes, I use the makefiles section. Most of my templates that I use add the following:
17=AppName.dp32
18=AppName.pdb
19=AppName.dp64
then i can reference them in the asm or link section:
LINK.EXE /SUBSYSTEM:CONSOLE /DEBUG /DEBUGTYPE:CV /PDB:"$18" /VERSION:4.0 /LIBPATH:"$L" /OUT:"$5",3,4
the dp32 and dp64 are for creating x64dbg plugins (that are essentially dll files names .dp32 or dp64)
So yes modifying templates to use the makefiles section and adding a ref to a .pdb is what i do as well. Another example I use this in is the DialogAsMain.tpl template:
[MakeFiles]
18=DialogAsMain.pdb
Then when an app is made with that template, the app inherits the 18=appname.pdb and the link settings refer to a "$18" by default then
Exactly!
But in UASM64.ini there are these lines https://github.com/mrfearless/UASM-with-RadASM/blob/726fd843709081babeaed37adc5b205216b4fb3f/UASM64.ini#L253
Maybe you want to review them.