Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_W_Intel
Employee
106 Views

Getting line numbers in PDB file

Can you provide hints as to the build options I should use to generate symbols + line numbers in my free driver PDB file such that I will be able to perform source level analysis? I have tried various methods but always get the warning that line number information is not available.

Based on other reading in the Windows DDK and the VTune documentation (help/Book) I attempted to get there by adding the following in the 'sources' buildfiles for the various linked driver components:

LINKER_FLAGS= /DEBUG

USER_C_FLAGS=/Zi

I am using the DDK build environment that come with the latest MS WDK. Is there a tool available to inspect a PDB file to verify if line numbers exist?

The build output log verified via a warning that the /Zi option was accepted and overriding the default /Z7.
VTune is able to see module function names for hot spot listing, but just not go to source level inspection.

Thanks --- Wunder

0 Kudos
3 Replies
Peter_W_Intel
Employee
106 Views

Both "/Zi" and "/Z7" should be OK to generate debug info when using Linker option "/DEBUG" together. "/Z7" option doesn't generate PDB file, I remember that debug info will be included in .obj file or exe/dll file?

Using Dumpbin utility with option "/LINENUMBERS" to verify, I think.

My question is - have you put specific Source Directory for searching? Use "Options" of VTune Analyzer to configure.

Other wayare -1) addyour DDK development environments to VTune's environment; 2) Invoke VTune Analyzer from DDK environ.


Regards, Peter
Mark_W_Intel
Employee
106 Views

Thanks Peter,

The dumpbin utility is not compatible with .PDB program database files, so it does not seem to be a viable way to verify symbols in the file. Looking into the DIA SDK as means to inspect these files. Do you know of an existing DIA utility for this?

Yes, when asked by the VTune environment I point (or associate) where the source file exists on the local drive that contains the function of interest. All source files are copied to the system being measured.

Not sure what you mean by invoke VTune from DDK environment, the DDK environment utilizes CMD build batch scripts utilizing build utility which in turn invokes cl utility to compile and link the kernel driver. Are you suggesting adding a batch file command line to startup VTune after the build? Or are you just trying to indicate that it may help to have both the DDK and the VTune utility hosted on the same target machine? As indicated above, I do already have the complete build source tree on the same host as VTune.

BTW, I am building and running in W2k8 R2 x64 bit if that changes anything? Tried /ZI optin but it is not allowed for 64bit, automatically replaced with /Zi.

I also noticed another post where you indicated that use of inline optimizations may cause problems in the case of that Fortran user, is this also the case for C? Do I have to disable such optimizations to be able to resolve linenumbers for source level inspection?

I have also attempted this with a fully checked build of the driver that has full symbols used via WinDBG source level debug. So there appears to be issue with VTune and tracing kernel mode .SYS drivers? VTune will not allow me to identify such a driver as a module of interest.

BTW, have attached screen shots of warnings given by VTune when I attempt to resolve source access.

--- wunder

Peter_W_Intel
Employee
106 Views

Hi Wunder,


If your driver with symbol file can be debugged via WinDBG, it should be a VTune Analyzer bug in source view.

Please submita new issue to https://premier.intel.com with your sampling result (.tb5 file), a pair of .sys and .pdb files, source file (includes hot function).

Regards, Peter
Reply