The MASM Forum

General => The Campus => Topic started by: raleep on April 28, 2015, 01:49:57 PM

Title: Clean Reinstall Has Lost Debugging
Post by: raleep on April 28, 2015, 01:49:57 PM
This is embarrassing.  Before my recent reinstall, when my program would crash or encounter an int 3 a windbg window would open and I could usually find a way to continue, or at least save my files.  Now I just get a message saying "[the program] has encountered a problem and needs to close".

I don't remember what I did to set up debugging in the first place and I can't figure out how to get it back.  I thought there would be a box to check in the installation process for the SDK, but alas no.

Can anyone help? :redface:

Thanks, Robert
Title: Re: Clean Reinstall Has Lost Debugging
Post by: dedndave on April 28, 2015, 02:26:51 PM
you want to change the "just in time" exception handler
most debuggers have a menu item to set this value, i think
for Olly, Options - Options - Debugging - Just-in-time
Olly will preserve the previous value so that it can be restored later, if desired

if you want to do it manually, this knowledge base article has the registry keys...

https://support.microsoft.com/en-us/kb/923827 (https://support.microsoft.com/en-us/kb/923827)
Title: Re: Clean Reinstall Has Lost Debugging
Post by: raleep on April 29, 2015, 06:19:09 AM
Quote from: dedndave on April 28, 2015, 02:26:51 PM
you want to change the "just in time" exception handler
most debuggers have a menu item to set this value, i think
for Olly, Options - Options - Debugging - Just-in-time
Olly will preserve the previous value so that it can be restored later, if desired

if you want to do it manually, this knowledge base article has the registry keys...

https://support.microsoft.com/en-us/kb/923827 (https://support.microsoft.com/en-us/kb/923827)
The manual method worked about 2/3 of the way, and the remaining 1/3 is 1) the problem I have getting the symbols right (I have learned to live with this when I open the debugger by a shortcut), and 2) the result of a flaw in my assembly procedure (which I will correct).  I can now save my files, which is my main concern.

Thank you very much.
Title: Re: Clean Reinstall Has Lost Debugging
Post by: dedndave on April 29, 2015, 09:54:46 PM
you should look at compiler options
i'm sure setting it that way will get your symbols back, etc
Title: Re: Clean Reinstall Has Lost Debugging
Post by: raleep on April 30, 2015, 01:49:33 PM
Quote from: dedndave on April 29, 2015, 09:54:46 PM
you should look at compiler options
i'm sure setting it that way will get your symbols back, etc
OK. I will. (I take it you mean command line options for ml.exe and link.exe)

Thanks
Title: Re: Clean Reinstall Has Lost Debugging
Post by: dedndave on April 30, 2015, 02:27:21 PM
oh - thought you were talking C compiler or something
nevertheless, yes - i think the linker has some options to create public symbols
i don't really know because i don't use them   :P
Title: Re: Clean Reinstall Has Lost Debugging
Post by: jj2007 on April 30, 2015, 05:33:52 PM
JWasm/ML: /c /coff /Zi /Zf
Link: /debug

More is overkill.
Title: Re: Clean Reinstall Has Lost Debugging
Post by: raleep on August 06, 2015, 07:14:22 AM
Quote from: raleep on April 29, 2015, 06:19:09 AM
Quote from: dedndave on April 28, 2015, 02:26:51 PM
you want to change the "just in time" exception handler
most debuggers have a menu item to set this value, i think
for Olly, Options - Options - Debugging - Just-in-time
Olly will preserve the previous value so that it can be restored later, if desired

if you want to do it manually, this knowledge base article has the registry keys...

https://support.microsoft.com/en-us/kb/923827 (https://support.microsoft.com/en-us/kb/923827)
The manual method worked about 2/3 of the way, and the remaining 1/3 is 1) the problem I have getting the symbols right (I have learned to live with this when I open the debugger by a shortcut), and 2) the result of a flaw in my assembly procedure (which I will correct).  I can now save my files, which is my main concern.

Thank you very much.
Actually the manual method did not work.  I set this problem aside back in April because I was not having crashes.  Recently I looked more deeply into the problem and found a simple solution: just run

"C:\Program Files\Debugging Tools for Windows\windbg.exe" -I

This sets

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger to:

"C:\Program Files\Debugging Tools for Windows\windbg.exe" -p %ld -e %ld -g

The material at

https://support.microsoft.com/en-us/kb/923827 (https://support.microsoft.com/en-us/kb/923827)

merely said to set ...AeDebug/Debugger to the proper parameter.

Best wishes,
Robert