As it turned out it was related to the fact that I create the symbol
reader and writer
manually using the PdbFactory class.
The reason I did that is that the default LoadSymbols() method
searches for the Mono.Cecil.Pdb.dll file.
This did not work for me since I have used ILMerge to merge the cecil
binaries into my core utility assembly.
So what I did was to modify the InitFactory method in the
StoreSymbolHelper class and have it search loaded assemblies for the
factory type if the Mono.Cecil.Pdb.dll was not found.
The change in InitFactory
Type factoryType = Type.GetType (type_name + ", " + assembly_name,
false);
if (factoryType == null)
factoryType = Find(type_name);
The Find method searches loaded assemblies for the requested type
name.
public static Type Find(string typeName)
{
Type type = Type.GetType(typeName);
if (type == null)
foreach (Assembly assembly in
AppDomain.CurrentDomain.GetAssemblies())
{
type = assembly.GetType(typeName, false, true);
if (type != null)
break;
}
return type;
}
Regards
Bernhard Richter
On May 13, 10:00 am, seesharper <[email protected]> wrote:
> Hi again!
>
> I'm so close to the finish line with my library and then stumbled
> across this exception.
>
> Only occurs when doing LoadSymbols and SaveSymbols using the native
> PdbReader
>
> Any idea as to why this happens?
>
> The managed PdbReader causes my breakpoints to be ignored
>
> Regards
>
> Bernhard Richter
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---