Folks,
I have an App written in C++, which I compiled using VS 2008 and wanted to
debug (step thru source level) on target machine (a VM).
I execute my Application (a GUI app) and attach to it from the WinDbg using
“.process”.
Whenever I attach to my process I get the warning
*** WARNING: Unable to verify checksum for XXXX.exe
So far so good.
Now I have a function which basically a handler for a button click.
I set the bp on that function, I can see that WinDbg correctly recognizes
the line number and sets the BP.
But when I click on the button, it doesn’t break into debugger.
Is checksum warning is the cause or I am missing some thing.
Which checksum is it complaining about, Is it the checksum inside optional
nt header of PE Image?
I have previously WinDbgugged win32 apps written in C, compiled using build
utility.
Regards
Deepak
I think that the checksum warning just means that the image wasn’t linked with /RELEASE, so I doubt it.
The checksum is indeed a field somewhere in the image headers (IMAGE_OPTIONAL_HEADER, I think), and /RELEASE just causes the linker to calculate and set it. In order for something to be loaded in to the kernel, the checksum must be valid (perhaps native as well; not sure), but the same is not true for user mode.
Good luck,
mm
Yes, it’s the checksum in the optional header.
This is only computed and set if you use the /RELEASE linker flag. While build.exe does this for free builds, by default, VS doesn’t for new projects built in the default Release configuration.
The message can be ignored although you can use /RELEASE when linking to calculate the checksum.
This is not related to the problem that you’re tracking down.
Does “bl” show the bp as really in the right place? Is it possible that you hit the wrong overload for an overloaded function, etc?
From: Deepak Gupta
Sent: Monday, June 22, 2009 12:42
To: Kernel Debugging Interest List
Subject: [windbg] Unable to verify checksum for XXXX.exe
Folks,
I have an App written in C++, which I compiled using VS 2008 and wanted to debug (step thru source level) on target machine (a VM).
I execute my Application (a GUI app) and attach to it from the WinDbg using “.process”.
Whenever I attach to my process I get the warning
*** WARNING: Unable to verify checksum for XXXX.exe
So far so good.
Now I have a function which basically a handler for a button click.
I set the bp on that function, I can see that WinDbg correctly recognizes the line number and sets the BP.
But when I click on the button, it doesn’t break into debugger.
Is checksum warning is the cause or I am missing some thing.
Which checksum is it complaining about, Is it the checksum inside optional nt header of PE Image?
I have previously WinDbgugged win32 apps written in C, compiled using build utility.
Regards
Deepak
— WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thanks Martin and Alex.
@Alex
Not it’s not an overloaded function.
Here is the output of bp and bl that I did again (CLspScanDlg is the dialog
box and Fix is the button)
kd> bp CLspScanDlg::OnBnClickedFixButton
breakpoint 0 redefined
kd> bl
0 e 00410960 0001 (0001)
DiagAndCleanUI!CLspScanDlg::OnBnClickedFixButton
Below is the out if I do “!peb”. You can see that base of DiagAndCleanUI is
00400000
kd> !peb
PEB at 7ffd8000
InheritedAddressSpace: No
ReadImageFileExecOptions: No
BeingDebugged: No
ImageBaseAddress: 00400000
Ldr 00251e90
Ldr.Initialized: Yes
Ldr.InInitializationOrderModuleList: 00251f28 . 00252c88
Ldr.InLoadOrderModuleList: 00251ec0 . 00252c78
Ldr.InMemoryOrderModuleList: 00251ec8 . 00252c80
Base TimeStamp Module
400000 4a3fe02e Jun 23 01:19:02 2009 C:\Documents and
Settings\Deepak\Desktop\DiagAndCleanUI.exe
7c900000 411096b4 Aug 04 13:26:36 2004 C:\WINDOWS\system32\ntdll.dll
7c800000 46239f3f Apr 16 21:37:27 2007
C:\WINDOWS\system32\kernel32.dll
42c10000 462f1a92 Apr 25 14:38:34 2007
C:\WINDOWS\system32\WININET.dll
77c10000 45d97cd1 Feb 19 16:02:49 2007
C:\WINDOWS\system32\msvcrt.dll
77f60000 45091361 Sep 14 14:01:29 2006
C:\WINDOWS\system32\SHLWAPI.dll
77dd0000 411096a7 Aug 04 13:26:23 2004
C:\WINDOWS\system32\ADVAPI32.dll
77e70000 45894fda Dec 20 20:29:38 2006
C:\WINDOWS\system32\RPCRT4.dll
77f10000 4677dc0f Jun 19 19:07:19 2007 C:\WINDOWS\system32\GDI32.dll
7e410000 45f03054 Mar 08 21:18:36 2007
C:\WINDOWS\system32\USER32.dll
340000 44a3ec46 Jun 29 20:35:42 2006
C:\WINDOWS\system32\Normaliz.dll
42990000 462f1a95 Apr 25 14:38:37 2007
C:\WINDOWS\system32\iertutil.dll
763b0000 411096b0 Aug 04 13:26:32 2004
C:\WINDOWS\system32\COMDLG32.dll
773d0000 44ef1b33 Aug 25 21:15:55 2006
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\COMCTL32.dll
7c9c0000 46cab197 Aug 21 15:04:15 2007
C:\WINDOWS\system32\SHELL32.dll
73000000 411096b6 Aug 04 13:26:38 2004
C:\WINDOWS\system32\WINSPOOL.DRV
774e0000 462cc0bb Apr 23 19:50:43 2007 C:\WINDOWS\system32\ole32.dll
77120000 464c3ba1 May 17 16:55:21 2007
C:\WINDOWS\system32\OLEAUT32.dll
76390000 411096ae Aug 04 13:26:30 2004 C:\WINDOWS\system32\IMM32.DLL
5ad70000 43ed5a8c Feb 11 09:01:24 2006
C:\WINDOWS\system32\uxtheme.dll
74720000 465d7e3a May 30 19:08:02 2007 C:\WINDOWS\system32\MSCTF.dll
755c0000 411096eb Aug 04 13:27:31 2004
C:\WINDOWS\system32\msctfime.ime
SubSystemData: 00000000
ProcessHeap: 00150000
ProcessParameters: 00020000
WindowTitle: ‘C:\Documents and
Settings\Deepak\Desktop\DiagAndCleanUI.exe’
ImageFile: ‘C:\Documents and
Settings\Deepak\Desktop\DiagAndCleanUI.exe’
****** Extra output stripped off***************
Regards
Deepak
On Tue, Jun 23, 2009 at 1:27 AM, Skywing wrote:
> Yes, it’s the checksum in the optional header.
>
> This is only computed and set if you use the /RELEASE linker flag. While
> build.exe does this for free builds, by default, VS doesn’t for new projects
> built in the default Release configuration.
>
> The message can be ignored although you can use /RELEASE when linking to
> calculate the checksum.
>
> This is not related to the problem that you’re tracking down.
>
> Does “bl” show the bp as really in the right place? Is it possible that you
> hit the wrong overload for an overloaded function, etc?
>
> - S
>
> ------------------------------
> From: Deepak Gupta
> Sent: Monday, June 22, 2009 12:42
> To: Kernel Debugging Interest List
> Subject: [windbg] Unable to verify checksum for XXXX.exe
>
> Folks,
>
> I have an App written in C++, which I compiled using VS 2008 and wanted to
> debug (step thru source level) on target machine (a VM).
> I execute my Application (a GUI app) and attach to it from the WinDbg using
> “.process”.
>
> Whenever I attach to my process I get the warning
> *** WARNING: Unable to verify checksum for XXXX.exe
>
> So far so good.
> Now I have a function which basically a handler for a button click.
> I set the bp on that function, I can see that WinDbg correctly recognizes
> the line number and sets the BP.
>
> But when I click on the button, it doesn’t break into debugger.
>
> Is checksum warning is the cause or I am missing some thing.
> Which checksum is it complaining about, Is it the checksum inside optional
> nt header of PE Image?
>
> I have previously WinDbgugged win32 apps written in C, compiled using build
> utility.
>
>
> Regards
> Deepak
> — WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Well, I would start from the beginning and put a __debugbreak() as the first statement in the function.
Good luck,
mm
Yeah Martin, this was the last resort. Using DebugBreak now for force break,
then attaching to the process and starting the debugging then.
Well thanks anyways.
Regards
Deepak
On Tue, Jun 23, 2009 at 1:46 AM, wrote:
> Well, I would start from the beginning and put a __debugbreak() as the
> first statement in the function.
>
>
> Good luck,
>
> mm
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>