{"id":4412,"date":"2012-10-12T12:07:37","date_gmt":"2012-10-12T10:07:37","guid":{"rendered":"https:\/\/ingmarverheij.com\/?p=4412"},"modified":"2012-10-12T12:13:01","modified_gmt":"2012-10-12T10:13:01","slug":"windbg-couldnt-load-mismatched-pdb-for-ntkrpamp-exe","status":"publish","type":"post","link":"https:\/\/ingmarverheij.com\/en\/windbg-couldnt-load-mismatched-pdb-for-ntkrpamp-exe\/","title":{"rendered":"WinDbg: Couldn&rsquo;t load mismatched pdb for ntkrpamp.exe"},"content":{"rendered":"<\/p>\n<p><a href=\"https:\/\/www.toonpool.com\/cartoons\/debug%20educational%20software_51092\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" align=\"right\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/debug_educational_software_5109251.jpg\" width=\"204\" height=\"147\" \/><\/a>When using a&#160; debugging tool (like WinDbg) the debugging tool needs symbol files to display and interpret data. The symbol files (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Program_database\">.pdb &#8211; program database<\/a>) are provided by the software vendor, it is not part of the debugging software.<\/p>\n<p>If your system is connected to the internet providing the Microsoft symbol files is very easy, just provide the online symbol server of Microsoft (explained in <a href=\"https:\/\/support.microsoft.com\/kb\/311503\">KB311503<\/a>).&#160; In <strong>my case <\/strong>the system had no direct internet connection so I had to download the symbol files manually.<\/p>\n<p><!--more--><\/p>\n<h2>Mismatched PDB<\/h2>\n<p>In this case I was debugging the <em>running <\/em>kernel of a Microsoft Windows server 2003R2 SP2. Therefore I downloaded the Windows Symbol Package from the Microsoft site (<a href=\"https:\/\/msdn.microsoft.com\/en-us\/windows\/hardware\/gg463028.aspx\">link<\/a>). Which file you need is pretty simple, choose the operating system and the processor architecture (like x86 or x64). <em>You usually need the download that says \u201cMost customers want this package\u201d.<\/em><\/p>\n<p><a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/msimatched-pdb2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"ntkrpamp.pdb - mismatched pdb\" border=\"0\" alt=\"ntkrpamp.pdb - mismatched pdb\" align=\"right\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/msimatched-pdb_thumb2.png\" width=\"254\" height=\"67\" \/><\/a>Don\u2019t be surprised you\u2019ll get the following error:<\/p>\n<pre>DBGHELP: (symbol search path)<symbolpath>\\ntkrpamp.pdb - file not found\nDBGHELP: (symbol search path)<symbolpath>\\exe\\ntkrpamp.pdb - mismatched pdb\nDBGHELP: (symbol search path)<symbolpath>\\symbols\\exe\\ntkrpamp.pdb - file not found\nDBGHELP: ntkrpamp.pdb - file not found\nDBGHELP: Couldn't load mismatched pdb for ntkrpamp.exe\n*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrpamp.exe\nDBGHELP: nt - export symbols<\/pre>\n<p>\n  <br clear=\"all\" \/>The main reason for this is: you\u2019ve installed a <strong>post SP2 <\/strong>hotfix that updated ntkrpamp.exe (this applies to other files as well).&#160; <\/p>\n<p>&#160;<\/p>\n<h2>Solution \/ work-around<\/h2>\n<p>You can solve this by downloading the correct symbol file from the online symbol server of Microsoft (explained in <a href=\"https:\/\/support.microsoft.com\/kb\/311503\">KB311503<\/a>). <em>This of course requires the use of another machine that is connected to the internet and has the WinDbg installed (<\/em><a href=\"https:\/\/msdn.microsoft.com\/en-us\/windows\/hardware\/gg463009.aspx\"><em>Download and Install Debugging Tools for Windows<\/em><\/a><em>) .<\/em><\/p>\n<p>Steps<\/p>\n<ol>\n<li>Copy the <strong>executable <\/strong>(of which you want to download the symbol file) to the machine<\/li>\n<li>Open <strong>Windows GUI symbolic debugger <\/strong>(WinDbg)\n<p>    <br clear=\"all\" \/><a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/WinDbg6.12.0002.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/WinDbg6.12.0002_thumb.png\" width=\"154\" height=\"123\" \/><\/a><\/li>\n<li>Configure the <strong>Symbol Search Path <\/strong>(CTRL+S, see <a href=\"https:\/\/support.microsoft.com\/kb\/311503\">KB311503<\/a>). Make sure you specify both a local and a remote path\n<p>    <br clear=\"all\" \/><a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Symbol-Search-Path_2012-10-12_12-45-44.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Symbol-Search-Path_2012-10-12_12-45-44_thumb.png\" width=\"154\" height=\"55\" \/><\/a><\/li>\n<li>Open the executable (copied in step 1) via <strong>Open Crash Dump<\/strong> (CTRL+D)\n<p>    <br clear=\"all\" \/> <a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Open-Crash-Dump_2012-10-12_12-57-22.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Open-Crash-Dump_2012-10-12_12-57-22_thumb.png\" width=\"119\" height=\"76\" \/><\/a><\/li>\n<li><em>If you get the question \u2018Save information to workspace\u2019 click No (but that\u2019s up to you)<br \/>\n      <br clear=\"all\" \/><a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Workspace-base_2012-10-12_12-49-45.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/Workspace-base_2012-10-12_12-49-45_thumb.png\" width=\"154\" height=\"60\" \/><\/a><\/em><\/li>\n<li>Open the <strong>local symbol path <\/strong>(specified in step 3)\n<p>    <br clear=\"all\" \/><a href=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/CC85375F758E4215A78014A1252103581_2012-10-12_12-51-12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"\" border=\"0\" alt=\"\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2012\/10\/CC85375F758E4215A78014A1252103581_2012-10-12_12-51-12_thumb.png\" width=\"154\" height=\"112\" \/><\/a><\/li>\n<li>Copy the &lt;e<em>xecutablename&gt;<\/em>.pdb <strong>folder <\/strong>to symbol search path on the machine where you have no internet access<\/li>\n<li>The error of \u2018mismatched pdb\u2019 should not be solved<\/li>\n<\/ol>\n<p>&#160;<\/p>\n<p>Cheers!<\/p>","protected":false},"excerpt":{"rendered":"<p>When using a&#160; debugging tool (like WinDbg) the debugging tool needs symbol files to display and interpret data. The symbol files (.pdb &#8211; program database) are provided by the software vendor, it is not part of the debugging software. If your system is connected to the internet providing the Microsoft symbol files is very easy, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[288],"tags":[513,512,130],"class_list":["post-4412","post","type-post","status-publish","format-standard","hentry","category-other","tag-ntkrpamp","tag-symbols","tag-windbg"],"_links":{"self":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/4412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/comments?post=4412"}],"version-history":[{"count":4,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/4412\/revisions"}],"predecessor-version":[{"id":4423,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/4412\/revisions\/4423"}],"wp:attachment":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/media?parent=4412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/categories?post=4412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/tags?post=4412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}