Is there a way to load debug symbols at runtime without any files #710
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is what I am trying to do:
It works fine when I generate a file but It doesn't when I try to load it in memory.
It fails with the following message:
Module was built without symbols;What is the right way to do it?
Hey! That's a great question. I'm not really sure to be honest. Maybe when writing to a symbol stream instead of a file Cecil doesn't write the expected information in the debug header (after all, there's no path to write), and then the loader is confused.
Maybe try to hardcode a file name in there:
https://github.com/jbevain/cecil/blob/master/Mono.Cecil.Cil/PortablePdb.cs#L304
Instead of
writer.BaseStream.GetFileName (), as this will return an empty string on a non file based stream.And see if then the symbols are loaded?
@Serg046 Did you find something that worked in the end?
I postponed the task where I need this behaviour that's why I didn't answer anything that time. But actually your idea works fine, thank you! What do you think about this https://github.com/jbevain/cecil/pull/735?
This is issue is related to #734 has well. Cecil needs to do a better job at handling filenames for non
FileStreamscenarios. But I like your fix in the meantime. Thanks!