Links to exception-handling resources

  In-depth Articles- [Matt Pietrek] Internals of SEH. [Matt Pietrek] Vectored Exception Handling. [Chris Brumme] Managed Exception Model. [Jeremy Gordon] SEH for assembler programmers. [Gaurav Khanna] How CLR maps SEH exceptions to managed exception types. Tips and Tricks- [Raymond Chen] Sucking the exception pointers from a stack trace. [Mike Stall] Finding where unmanaged exceptions come from. [Gregg Miskelly] Debugging an UEF. [Skywing] Debugging a custom…

0

Links to MDA resources

    In-depth Articles- [MSDN] Let CLR find bugs for you with MDAs Tips and Tricks- [Thomas Lai] How to disable a specific MDA Misc- [Mike Stall] MDAs are cool. [Thottam Sriram] Managed Debugging Assistants (MDAs). References- [MSDN] MDA reference                

0

Profiler and NGEN’ed images.

[NOTE: This is a repost from my old blog www.debugtricks.com. The old blog no longer exists and I’ll be migrating my old posts over to this blog.] Question: How does the runtime (CLR) decide which flavor of a module to load while profiling? Under what circumstances will it load the profiler-enhanced ngen’ed images? When does…

0

Image File Execution Options (IFEO)

[NOTE: This is a repost from my old blog www.debugtricks.com. The old blog no longer exists and I’ll be migrating my old posts over to this blog.]  Image File Execution options provides you with a mechanism to always launch an executable directly under the debugger. This is extremely useful if you ever need to investigate…

0

[Random] How to quickly view a binary’s embedded manifest?

  The “sigcheck” tool from sysinternals is of great help here. Use the “-m” option to view the embedded manifest.     Sigcheck v1.63 – File version and signature viewer Copyright (C) 2004-2009 Mark Russinovich Sysinternals – www.sysinternals.com   usage: \\live.sysinternals.com\tools\sigcheck.exe [-a][-h][-i][-e][-n][[-s]|[-v]|[-m]][-q][-r][-u][-c catalog file] <file or directory> -a Show extended version information -c Look for…

0

SeImpersonatePrivilege

  NOTE – I wrote this up more than a year back and for some mysterious reasons forgot to post it! Much of what is written here applies to Vista UAC accounts as well. QUESTION – Under Windows Server 2003, can a “limited user” impersonate an “administrator”? ANSWER –  As you are aware, there are…

0

DllImportAttribute.PreserveSig vs PreserveSigAttribute

DllImportAttribute.PreserveSig – Mainly used in PInvoke Signatures By default, while using DllImportAttribute to p-invoke, the DllImportAttribute.PreserveSig is set to true. If false: Converts returned HRESULTS from unmanaged signature to managed exceptions if they are not S_OK. If true: Does not convert returned HRESULT to exceptions.     PreserveSigAttribute (pseudo custom attribute)– This is mainly used…

0

Why does ICorDebug::SetManagedHandler() return E_NOINTERFACE?

  Since I have no energy to type a long post today (sigh), I’ll spare you the gory details on the cause of this error. Here are the main reasons why you would be seeing this error – While expecting to debug a v2.0.xxxx managed app, you have forgotten to implement ICorDebugManagedCallback2 in your managed callback handler. The managed…

0

Pay attention to the calling convention!

  Ever seen this run-time failure? – “The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention” Whenever I get sloppy, I tend to write awful code as shown…

0

Quote of the day!

When I score goals I’m great, when I don’t I’m fat. – Ronaldo

0