Modifying the pdb file to match with the modified assembly

485 views
Skip to first unread message

Gábor Kozár

unread,
Mar 28, 2011, 10:24:36 AM3/28/11
to mono-...@googlegroups.com
Hey guys,

I'm writing a tiny little post compiler, which simply makes some basic transformations based on the attributes of the user code elements.
Now the assembly is modified correctly, and produces the expected result when run, however, I would like to be able to debug the assembly as well.

VS says that "The breakpoint will not currently be hit. No symbols have been loaded for this document." when trying to place a breakpoint into the source code - I take it as an indicating of the debugger realizing that the assembly has been modified and the symbol file has been not.

As far as I know Mono.Cecil is capable of altering symbol files. Could somebody point me into the right direction with this? I have absolutely no knowledge regarding the symbol files, or how the VS debugger works.
Any help would be greatly appreciated!

Thank you!

Jb Evain

unread,
Mar 28, 2011, 10:31:03 AM3/28/11
to mono-...@googlegroups.com
Hi,

On Mon, Mar 28, 2011 at 4:24 PM, Gábor Kozár <kozar...@gmail.com> wrote:
> As far as I know Mono.Cecil is capable of altering symbol files. Could
> somebody point me into the right direction with this?

https://github.com/jbevain/cecil/wiki/Debug-symbols

Jb

Gábor Kozár

unread,
Mar 28, 2011, 10:54:38 AM3/28/11
to mono-...@googlegroups.com
I've tried that, but the result is the same. I mean, literally: getting no pdb file generated, even though I've set both the ReadSymbols and WriteSymbols properties, and I have Mono.Cecil.Mdb.dll referenced. The output .exe is written fine, but no pdb. I get no errors or exceptions.

My corresponding lines are exactly the same as on your wiki. Any hints?

2011/3/28 Jb Evain <jbe...@gmail.com>
--
--
mono-cecil

Jb Evain

unread,
Mar 28, 2011, 11:33:24 AM3/28/11
to mono-...@googlegroups.com
On Mon, Mar 28, 2011 at 4:54 PM, Gábor Kozár <kozar...@gmail.com> wrote:
> My corresponding lines are exactly the same as on your wiki. Any hints?

Yes, you probably don't have Mono.Cecil.Pdb.dll deployed with Mono.Cecil.dll

Jb

Gábor Kozár

unread,
Mar 28, 2011, 11:35:10 AM3/28/11
to mono-...@googlegroups.com
Oh, nevermind that last, I'm just dumb. I missed the part that Mono.Cecil.Pdb will be tried to be used under Windows, and Mono.Cecil just apparently failed silently when I didn't have dll referenced. Really should cause an exception!

Thanks for your help! Works perfectly now!

(Haha, just received your e-mail telling the same. Thanks for coping with stupid users like myself. :))

2011/3/28 Gábor Kozár <kozar...@gmail.com>
Reply all
Reply to author
Forward
Message has been deleted
0 new messages