Hi, MM
That’s really great help!!!
And you are really warm-hearted to share your knowledge. And I cannot help to admire your great patience to help the newbie! I have received your help several times up to now. 
Luckily I managed to get a copy of “Undocumented Win2k” but not the companion CDRom. I will dive into it and find out what is hidden out there. Maybe later I can share my view so you can recall those details. 
Thanks again for your great help!
Best regards,
Cody
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Wednesday, August 09, 2006 2:30 AM
To: Kernel Debugging Interest List
Subject: Re: [windbg] Question on PDB
CODY:
These are simple questions. They ought to have simple answers that are
easy to find. Some of the answers are simple; none of them are easy to
find in the disaster that is the WinDbg documentation. Your confusion
is the same that everyone experiences when they first start using
WinDbg, and for quite a while afterwards, so no worries.
- Private v. Public PDB
In a PDB (the CodeView information, really), symbols and types may be
either public or private. Private means that one of a few different
Microsoft tools (Rebase, I think; it may be Bind; I don’t recall) can be
used to strip those symbols and types from the image, generally before
it is shipped. Public is whatever is left. For your (3rd party
developer) purposes, generally everything you use that comes with PDB
symbols that you did not write will be public symbols only (i. e. - all
the Windows files), and whatever you create, unless you explicitly stip
them private symbols, will contain both public and private symbols in
the PDB.
This sounds pretty straightforward (if it doesn’t, I didn’t explain it
well), but it appears more complicated than it is because WinDbg’s
messages both tend to suck, and get displayed so as to appears as
thought the earth is going coming to an end because a file doesn’t have
private symbols (even if it is a OS file, which is never going to have
them, unless, as occasionally happens, Microsoft forgets to strip
them).
- VC60.PDB & MY_PROGRAM.PDB.
On this one, I pretty much have to punt. I use to know the answer, but
I don’t recall, as I always use consolidated. While it is not
important, if you just want to know more, an excellent reference (and,
as far as I know, the only one, at least in the form of a published
book) is Sven B. Schreiber’s “Undocumented Windows 2000 Secrets.” It is
an all around excellent book (for kernel work), but, unfortunately, I
believe that is is not published any more.
- dt v. x
dt displays types. x displays symbols. Types are what you think they
are (struct _KPCR, et. c.); symbols, in this context, are, more or less,
variables and functions which have a type. Once again, the
documentation makes this very confusing, because most information about
PDB’s refers to types as form of symbols, which is true, but confusing.
- void funct1()
I’m not sure what you mean here. If you’re saying that x doesn’t show
it, it might be getting tossed out by transitive comdat elimination
performed by the linker if it is not referenced in your program. See
-OPT (in the linker documentation) for that.
If you just mean how to unassemble it, try u !funct1.
If you mean how to display the source, put a break point on it (bp
!funct1) and execute.
WinDbg is not the friendliest, but it is quite powerful once you get
used to it.
Best of luck,
MM
>>> xxxxx@intel.com 2006-08-08 07:17 >>>
HI, All
Forgive me if my question appears to be simple. I am just beginning to
learn windbg and I have found it a very good tool.
My question goes with the PDB and they are:
1) What’s the difference between private pdb and public pdb. How
can I tell the compiler whether to generate private or public copy?
2) What’s the difference between vc60.pdb and my_program.pdb? I
mean, when I use separate mode, what are put in the first one and what
are put in the latter one?
3) What’s the difference between command ‘dt my_program!’ and 'x
myprogram!’?
4) I defined some function as void func1() but I cannot list it
using either dt or x. Am I missing something?
Really grateful if someone can shed me some lights on those questions
as I haven’t been able to figure them out myself.
Best regards,
Cody
—
You are currently subscribed to windbg as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
You are currently subscribed to windbg as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com