Sometimes I'm debugging .NET applications but I don't know whether they will use .NET 2 or .NET 4. I want to break in when .NET gets loaded, so I do
sxe -c ".echo .NET4 loaded" ld clr
sxe -c ".echo .NET2 loaded" ld mscorwks
Unfortunately there can only be one such breakpoint and in above example, mscorwks
overwrites clr
and in case of .NET4, it will not hit the breakpoint.
Is there a way to break on multiple different load events?
I really don't want to fiddle around with my non-working incomprehensible try of
sxe -c".foreach /ps 5 /pS 99 (token {.lastevent}) {.if ($spat(\"[0-9a-z.:\\]*\\clr.dll\",\"${token}\")) {.echo clr;} .elsif ($spat(\".*\mscorwks.dll\",\"${token}\")) {.echo mscorwks} .else {}}" ld
You can set two breakpoints
bu mscorwks!EEStartup
bu clr!EEStartup
(for example bu clr!EEStartup ".echo Breaking into debugger on clr loaded") and only one of them will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With