Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does x32dbg support source level debugging? #2264

Closed
wangyue0101 opened this issue Dec 10, 2019 · 6 comments
Closed

Does x32dbg support source level debugging? #2264

wangyue0101 opened this issue Dec 10, 2019 · 6 comments
Labels

Comments

@wangyue0101
Copy link

@wangyue0101 wangyue0101 commented Dec 10, 2019

I want to view the source code of the program in x32, and the page is blank after clicking the source code bar. Is it because x32 does not support source code viewing, or does it need another way to display source code?

@wangyue0101 wangyue0101 changed the title Does x64dbg support source level debugging? Does x32dbg support source level debugging? Dec 10, 2019
@mrfearless

This comment has been minimized.

Copy link
Contributor

@mrfearless mrfearless commented Dec 10, 2019

You can use source level debugging, if you have the source code, compile your project to use the appropriate debug flags and options for assembler/compiler and for the linker to output a pdb file.
Once debugging in x64dbg with this special debug build of exe you can then switch to source level debugging to step through code, set breakpoints etc instead of via the normal cpu view.

@wangyue0101

This comment has been minimized.

Copy link
Author

@wangyue0101 wangyue0101 commented Dec 10, 2019

@mrfearless
thank you for your reply. I am trying to learn this
“Once debugging in x64dbg with this special debug build of exe you can then switch to source level debugging to step through code”?
Is this version not official?

@mrfearless

This comment has been minimized.

Copy link
Contributor

@mrfearless mrfearless commented Dec 10, 2019

The special build of exe - comes from your own compiled source, which uses the correct debug flags and options to create the debug build of your exe along with the full pdb file for your exe. For me to build a properly debug source exe requires that i include the following switches for assembler (ml.exe):

ML.EXE /c /coff /Cp /Zi /Zd /nologo /I:"\Masm32\Include" MyApp.asm

And for the linker i require the following:

LINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /PDB:"MyApp.pdb" /VERSION:4.0 /LIBPATH:"\Masm32\Lib" /OUT:"MyApp.exe" MyApp.obj, MyApp.res

Once i debug MyApp.exe in x64dbg, i can view the source as the pdb and source are to be found alongside my special MyApp.exe debug build.

For C/C++ source level debugging, it will require specific options set when compiling, may have to ask someone who knows C/C++ to indicate the proper flags and switches required.

@mrexodia

This comment has been minimized.

Copy link
Member

@mrexodia mrexodia commented Dec 10, 2019

@wangyue0101

This comment has been minimized.

Copy link
Author

@wangyue0101 wangyue0101 commented Dec 11, 2019

Thanks for your reply. I will try it now

@mrexodia mrexodia added the question label Jan 16, 2020
@mrexodia

This comment has been minimized.

Copy link
Member

@mrexodia mrexodia commented Jan 16, 2020

Closing this for now. Let me know if you have further questions.

@mrexodia mrexodia closed this Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.