I have written a small demo program to demonstrate the problem:
// intel_inspector_demo.cpp : Defines the entry point for the console application.
char *pStr = (char*) malloc(512);
char* pStr = (char*) malloc(20);
char c = pStr; // the contents of pStr were not initialized
HPEN pen = CreatePen(0, 0, 0);
int _tmain(int argc, _TCHAR* argv)
I copy the .cpp/.exe/.pdb file to another host that has Intel Inspect XE 2013 installed and run this command:
C:\Users\admin\Desktop\demo>inspxe-cl -collect mi2 -result-dir .\result@@@ -search-dir all=%cd% -- intel_inspector_demo.exe
I open the result000.inspxe file and it can't display source. There is no way to add the source location through the UI. Is there a way to fix this? I attached a screen capture in case it helps.
The solution is to create a project in the GUI and set the directory in the "Source Search" tab (under File->Project Properties).
Then either run the analysis using the GUI, or import a command line result (File->Import Result).
(It does appear that setting the -search-dir option on the command line should set the search directory for source as well - I don't know why it doesn't work.)