Software Archive
Read-only legacy content
17061 Discussions

Inspecting from install location

Jeff_Shanab
Beginner
369 Views
Visual studio has a nasty habit of dropping build products into the source directory, it is an awful policy but easily defeated.

Is there a way to attach to a process with the Inspector product? The problem is that currently I run the inspector by setting the debug and working directories tot he install location and then start the inspect wizard.

Other than the annoying "code has been modified" warning, this seems to work. But after the demo was up and I bought a copy, I do see a lot of cases where it cannot find the source as "it has no stack frames".

I have been taking this to mean the object destructed by the time the inspector ran, but could it be the running it out of the install directory? This is a real program and it requires all the stuff from the install. It seems like I might be doing something wrong, this feels klugey
0 Kudos
6 Replies
SergeyKostrov
Valued Contributor II
369 Views
Quoting Jeff Shanab
Visual studio has a nasty habit of dropping build products into the source directory, it is an awful policy but easily defeated.

[SergeyK] By default '..\Debug' and '..\Release' foldersare used and that Microsoft's policy is at
least 15+ years old. I'm sorry to hear that you have some problems with it and these folders
could be easily changed using aProject Properties dialog box.

Is there a way to attach to a process with the Inspector product? The problem is that currently I run the inspector by setting the debug and working directories tot he install location and then start the inspect wizard.

Other than the annoying "code has been modified" warning, this seems to work. But after the demo was

[SergeyK] Is it a Demo builtin aDebug configuration or in aRelease configuration?

up and I bought a copy, I do see a lot of cases where it cannot find the source as "it has no stack frames".
...


Best regards,
Sergey

0 Kudos
Jeff_Shanab
Beginner
369 Views
First of all let me say this is hands down the best tool of this type I have seen!

I have changed the build locations, but that is not the same as an installed location. It is important that other subdirectories of dll's, config files and all exist. So back some questions.

Is there a way to attach to a process like Visual Studio permits.
What can cause the "it has no stack frames", The licensed product is being run against the exact same debug build as the demo(unlicensed) inspector was.
What does it use to determine this build state, Visual studio does not throw this warning for debug or attach to process.
0 Kudos
Jayant_D_Intel
Employee
369 Views
Hi Jeff

Thanks for the kind words about Parallel Inspector; much appreciated.

Currently, we have no mechanism for Inspector to attach to a running process. See http://software.intel.com/en-us/forums/showthread.php?t=80617 for a discussion of why.

I'm not quite sure I understand the issue you are facing, since Inspector should be able to track back to source code as long as you have compiled with debug information turned on. I do not think this is related to the location of the install directory.

See http://software.intel.com/en-us/articles/intel-inspector-xe-2011-controlling-analysis-cost/ for a discussion of how Inspector XE manages the stack frame depth. Perhaps that is the cause of what you are seeing.

You could also submit an issue in Premier support and we'll try to get to the bottom of it.

Jay
0 Kudos
SergeyKostrov
Valued Contributor II
369 Views
Quoting Jeff Shanab
...
What can cause the "it has no stack frames"
...

- An executable or a DLL is built in a Release configuration
- There is noa 'pdb'-file ( MS Program Database )for a Module you're trying to debug

PS:
With a Visual Studio you could use two techniques for debugging:

- From an Installer down to some Module

- From a Module with an Installer set as a host-application in:

'Configuration Properties' -> 'Debugging' -> 'Command'

In 'Command' you can specify a path to your Installer( as exe or msi ) then put at least one breakpoint
in a Module, for example in case of a DLL in DllMain function, and then hit 'F10'. That way allows to
debug even Windows services or an MS SQL Server.
0 Kudos
Jeff_Shanab
Beginner
369 Views
I would really like to use this to help improve a c++ browser plugin. Attaching would make this easier. We have tried the commandline start of the browsr and that will occasionally work, but most the time it cannot handle the browsers massive memory foot print and crashes (even hard crashing the box. Win7-64 12G ram)

Is there a way to "defer" inspection? like start in ignore mode until it comes across a marker I could place in our code?
0 Kudos
SergeyKostrov
Valued Contributor II
369 Views
Quoting Jeff Shanab
I would really like to use this to help improve a c++ browser plugin. Attaching would make this easier. We have tried the commandline start of the browsr and that will occasionally work, but most the time it cannot handle the browsers massive memory foot print and crashes (even hard crashing the box. Win7-64 12G ram)

[SergeyK] Hi Jeff and thank you for explaining that you're developing a C++ browser plugin.

I have been involved in two similar projects, but we onlyused Visual Studios for
debugging.We used VS98 andVS2005 and we didn't do any inspections with a 3rd party
software, like InspectorXE.Debugging ofthese plugins,with IE as a host application,
worked well. I don't remember any problems related to debugging.
The 1st project was very simple, but the 2nd one was over-complicated and without
debugging it was impossible to stabilize it.

Did you try to analyze what IE options could affectits 'massive memory footprint'?

Is there a way to "defer" inspection? like start in ignore mode until it comes across a marker I could place in our code?


Best regards,
Sergey

0 Kudos
Reply