The MASM Forum

Projects => Rarely Used Projects => GoAsm => Topic started by: satpro on June 24, 2024, 11:40:13 AM

Title: debug symbols
Post by: satpro on June 24, 2024, 11:40:13 AM
I am hoping someone has an answer to this.  I need to find a way to generate symbols in an x64 GoAsm program.  Everything was good with GoBug until I moved over to 64-bit.  Looking at symbols in a debugger is so much better than guessing at everything.

I use GoLink and x64dbg now but am open to any linker that might be used with GoAsm.

Thank you.
Title: Re: debug symbols
Post by: fearless on June 24, 2024, 07:09:58 PM
https://github.com/x64dbg/x64dbg/issues/2264

ML.EXE /c /coff /Cp /Zi /Zd /nologo /I:"\Masm32\Include" MyApp.asm
LINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /PDB:"MyApp.pdb" /VERSION:4.0 /LIBPATH:"\Masm32\Lib" /OUT:"MyApp.exe" MyApp.obj, MyApp.res
Not used GoAsm, so dont know if using just the microsoft linker will work, or if GoAsm.exe requires some other switch equivalent to the /Zd one used in ML.exe
Title: Re: debug symbols
Post by: satpro on June 25, 2024, 10:46:27 AM
Quote from: fearless on June 24, 2024, 07:09:58 PMNot used GoAsm, so dont know if using just the microsoft linker will work, or if GoAsm.exe requires some other switch equivalent to the /Zd one used in ML.exe

Thank you.  That is my question, too.  I will keep looking, but it is confusing, to say the least.

Ahhh.... here is wishing for a GoBug made with all 64 bits...  :eusa_pray:

I am going to have to try something.
Title: Re: debug symbols
Post by: wjr on July 02, 2024, 07:28:12 AM
I use an older version of x64dbg, snapshot_2018-06-19-02, which I believe was one of the last versions that still supported embedded COFF debug symbols in the EXE.
Title: Re: debug symbols
Post by: fearless on July 02, 2024, 10:06:28 AM
I think at some point x64dbg used DbgHelp and then moved over to DIA instead from what I recall. So possibly thats the reason the older snapshot supports that, perhaps?
Title: Re: debug symbols
Post by: satpro on July 03, 2024, 10:40:43 AM

Quote from: wjr on July 02, 2024, 07:28:12 AMI use an older version of x64dbg, snapshot_2018-06-19-02, which I believe was one of the last versions that still supported embedded COFF debug symbols in the EXE.

That was exactly what I needed!  Works great, too.

Thank you.

Title: Re: debug symbols
Post by: TimoVJL on July 03, 2024, 07:22:02 PM
Same problem is with Pelles C since version 9, as it no longer have CV debug format.
Title: Re: debug symbols
Post by: greenozon on July 07, 2024, 06:15:16 PM
Never seen before the GoBug debugger

it looks... like from the stone age but still fully functional!
Title: Re: debug symbols
Post by: satpro on December 30, 2024, 05:09:28 AM
Update:   The way to see labels in x64dbg (using 64-bit GoAsm) is to type the word EXPORT in front of any code or data label you wish to see,  e.g.  "EXPORT Label: " .  Then, instead of a raw address you see will the label.

That took just five months to figure out!   :biggrin:
Title: Re: debug symbols
Post by: zedd151 on December 30, 2024, 07:11:42 AM
Quote from: satpro on December 30, 2024, 05:09:28 AMThat took just five months to figure out!  :biggrin:

:biggrin: