October 11th, 2018

How can I include/exclude specific memory blocks in user-mode crash dumps?

You can tweak the information included in crash dumps created by Windows Error Reporting.

To request that Windows Error Reporting include a dump of another process if the calling process crashes, use the Wer­Register­Additional­Process function. This is useful if your program is split up into multiple processes.

You can add additional key/value pairs of data with the Wer­Register­Custom­Metadata function. This information can be used to help categorize and filter crash dumps automatically. For example, you might include metadata that says whether the app is running in trial mode.

You can add a block of memory to user-mode crash dumps (heap dumps or larger), with the Wer­Register­Memory­Block function. Note that this memory will be captured in the dump, but it’s not the same as metadata because you can’t filter on it.

Conversely, you can exclude a block of memory from user-mode crash dumps with the Wer­Register­Excluded­Memory­Block function. This is handy if you have large memory blocks containing information that isn’t all that interesting from a debugging standpoint, like video texture buffers or audio output buffers.

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.

Feedback