BUG loading PDB files

delphi package - automated exception handling
Post Reply
pji
Posts: 3
Joined: Fri Mar 28, 2025 6:43 am

BUG loading PDB files

Post by pji »

I recently found that madExcept supports PDB files, which would make it possible to get more detailed information from exceptions occurring in C++ DLLs that we use. Even though madExcept manages to show some extra information, it was far from complete (no line numbers).

While debugging madExcept itself I found that this information is not loaded in properly because of improper record alignment. After proper adjustment, I now get the expected detailed information.

The file in question is madMapFile.pas. At the beginning of this file there are 3 records used by DbgHelp. These records are marked as 'packed record', which causes improper alignment of data, and, therefore, improper retrieval of the information. I just removed 'packed', and now everything works as expected.

NOTE: Only tested in 64 bits.
Post Reply