View Full Version : pdb to nms problem

September 20th, 2007, 08:23
I'm running HP AMD XP Sp 1. I want to convert a .pdb to a .nms.
I can't get my loader to to accept the .pdb. I get the message
"pdb is an unsupported module type", "Unable to translate or
load this type of module". I compiled the exe and pdb using my
DDK which is set to NTDEBUG = ntsd, NTDEBUGTYPE = both, and

I've previously loaded and translated many pdb's I've downloaded
from Microsoft without any problems.

Have I given you enough background for you to come up with some suggestions? Send me to any threads I can use if you know of any.
I'd like to think I've read all there is but I know better.

September 20th, 2007, 16:31
Where are those errors messages coming from? I don't see those strings in either nmsym.exe or nmsym.dll.

How are you translating the pdb's?
nmsym /trans:source,package,always
is the usual syntax.

I don't use the DDK build for building either drivers or exe files, I use VC6++ generally, so I'm not totally conversant in its usage. However, while I think you can build an exe with the DDK, it *is* normally used for drivers.

If you check the OSR threads from a search for NTDEBUGTYPE for example, they discuss its use with respect to drivers and checked/free builds.

Again just a guess but somehow it seems you may be using the wrong build utility for the job. It may create a running exe, but the pdb format is incompatible.

September 20th, 2007, 18:35
The compiled pdb seems to be delivering debug info to both WinDbg and PEBrowseDb. I get a message in WinDbg that says it can't find my symbols, but since I put it in the path, I have a lot more info on the screen than without it. I'm still perplexed but maybe things will look up tomorrow. If I could get my hands on TurboDebugger, I'd use that with my tds file from Borland BCC32.
That's the compiler I normally use because I am comfortable with it. I only used my DDK to get a pdb to translate.

To answer your question on the message. I opened the SI loader, hit open file, and clicked on the pdb. As I recall that's how I got my pdb's from Microsoft into the loader, then I translated them. I don't remember for sure though.

September 20th, 2007, 22:18
I think that explains it then, loader32.exe is not designed to open pdb files, note that it doesn't even give *.pdb as a default option. (and yes I get the same error message if I force it to)

You need to translate them to nms files first. You may have been thinking about Symbol Retriever, which is what is used to deal with MS symbols and optionally translate them to nms at the same time.

Just use the nmsym.exe console program to translate the pdb file with the syntax I gave.

You can use a batch file to do this, here's one I used to use when writing in masm to handle both exe and driver:


@echo off

set PATH=C:\masm32\Projects\SomeProject\
set myexe=SomeExe
set mykmd=SomeSys

C:\SoftICE\nmsym.exe /TRANSLATE:source,package,always /SOURCE:. %mykmd%.sys

C:\SoftICE\nmsym.exe /TRANSLATE:source,package,always /SOURCE:. /SYMLOAD:%mykmd%.NMS /SYMLOAD:%myexe%.NMS /LOAD:execute,nobreak %myexe%.exe

rem DEBUG.BAT =========================================
rem Batch file to debug in Softice with full source.
rem Build separately exe, dll or kmd with option flags to produce .PDB files:
rem ML /Zi

rem /TRANSLATE - convert .pdb files to .nms files for exe or dll or driver
rem /SYMLOAD - load symbols
rem /LOAD - load module directly into Softice
rem ===================================================

September 21st, 2007, 09:03
Right!!! It's been a while since I made my nms stuff. I had my mind on the problem I was trying to solve in a program I wrote and not thinking enough about what I was doing. I solved my programming problem this morning. Now maybe I can gear up my head.

It's great that you sent me some asm code. I want to teach myself how to program in MASM. Every time I play with code, I learn a little bit more. I've got a couple of pretty good tut's on MASM but only played with it a little.

Thanks again for the good reply.

September 21st, 2007, 09:37
After reading this thread, something doesn't sound quite right.
I might have missed something but here is how I interpret it:
[Originally Posted by "kayaker"]You can use a batch file to do this, here's one I used to use when writing in masm to handle both exe and driver:

echo This is not asm code!

[Originally Posted by "toolmanx"]It's great that you sent me some asm code.

September 21st, 2007, 11:38
I'm embarrased. Speed read the thread you wrote, picked up the "writing in MASM" , glanced at the block of code without really looking at it, and quickly wrote you an answer so you would know I got your thread. Later, I pulled it up to carefully go through it and by that time you had caught my dumbhead. I would have edited out my embarrasing moment if I would have beat you to the draw. Oh well.