Red Gate forums :: View topic - Symbol Load Issue
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

Symbol Load Issue

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
bdesmond



Joined: 24 Sep 2010
Posts: 2

PostPosted: Fri Sep 24, 2010 10:35 pm    Post subject: Symbol Load Issue Reply with quote

I'm currently using VS2010 to debug a process on a remote machine. The assembly I'm trying to step in to is GAC'ed on the remote machine. I'm using Reflector 6.5.0.135.

When I hit a breakpoint, I get this error:

Code:

---------------------------
.NET Reflector
---------------------------
The loaded PDB file for the assembly "Microsoft.ResourceManagement" is not the one .NET Reflector expected.



Expected version: “C:\Users\BrianDesmond\AppData\Local\Red Gate\.NET Reflector 6\Cache\V2\x86\CS\V35\Microsoft.ResourceManagement.pdb”



Loaded version: "C:\Windows\assembly\GAC_MSIL\Microsoft.ResourceManagement\4.0.3531.2__31bf3856ad364e35\Microsoft.ResourceManagement.pdb"



If the correct PDB file is not loaded, debugging may not work.
---------------------------
OK   
---------------------------


I've found that everything works if I click OK and step through (e.g. line info is correct, etc.), but no locals are resolved. I'm quite certain that I've copied the symbol file in question from the "expected" path to the "loaded" path.

Here is the error when I try and resolve a local:

Code:
Cannot obtain value of local or argument 'value' as it is not available at this instruction pointer, possibly because it has been optimized away.


Is this a supported scenario? If I really need to I can load VS on the box being debugged but I'd prefer not to.
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Mon Sep 27, 2010 9:25 am    Post subject: Reply with quote

The first warning is not a problem. The system is trying to warn you (correctly) that the pdb it generated isn't loaded into the process being debugged. However, as you say, you've manually copied this pdb to the target machine and it has been loaded correctly.

The inability to see the local variables is most likely due to the optimization the clr is doing - we supply the pdb file and then the debugger works with the clr to get the values without any intervention on our part. If you view Debug/Modules you'll probably see that the module is optimized. You can re-ngen a module with an ini file present to make it more debuggable - see, for example, http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx
Back to top
View user's profile Send private message
bdesmond



Joined: 24 Sep 2010
Posts: 2

PostPosted: Wed Sep 29, 2010 5:37 pm    Post subject: Re: Reply with quote

Clive Tong wrote:
The first warning is not a problem. The system is trying to warn you (correctly) that the pdb it generated isn't loaded into the process being debugged. However, as you say, you've manually copied this pdb to the target machine and it has been loaded correctly.

The inability to see the local variables is most likely due to the optimization the clr is doing - we supply the pdb file and then the debugger works with the clr to get the values without any intervention on our part. If you view Debug/Modules you'll probably see that the module is optimized. You can re-ngen a module with an ini file present to make it more debuggable - see, for example, http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx


Hi-

Thanks for the reply - and sorry for the delay in following up. I didn't get an email alert for some reason.

As far as the alert box, is there any way to disable it? I get it constantly now when debugging in this app and it's more of a nuisance now.

I'll givehte NI file a shot. Since I've actually backed out a couple DLLs and the example is for an EXE, do I just create the INI file for the EXE hosting the DLLs and it will apply to the DLLs as well? What if the app's installer ngen'ed the assemblies at install time?
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Thu Sep 30, 2010 10:04 am    Post subject: Reply with quote

There's no way to turn off the alert in the current version.

To make a particular ngen'ed assembly less optimized, you have to re-ngen that assembly. For example, recently I had cause to step through System.Core using Reflector Pro. In order to re-ngen System.Core to make it more debuggable, I

(i) uninstalled the current ngen version

Code:

ngen.exe uninstall System.Core.dll


(ii) created an ini file named System.Core.ini in the same directory which contained

Code:

[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0


(iii) re-ngened it using

Code:

ngen.exe install System.Core.dll


Does that help?
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group