Steve's Techspot. Over the course of the last few months, I've really put lots of effort into understanding and utilizing Win. Dbg. As a primarily C# developer, this meant also becoming intimately familiar with the SOS extension. Though a bit tedious, this exercise has already paid rich dividends in my debugging experience. As powerful and handy as SOS is, however, it has some annoying limitations and quirks. My personal peeves with SOS, combined with my desire to learn to write a Win. Dbg extension, led me to develop SOSEX, a debugging extension for managed code that begins to alleviate some of my frustrations with SOS. SOSEX (available in x. GC generation), ! GC generation of a given object), ! The rest of this post will provide a bit more detail about each command and how they can save you time. Use the ! help command for a list of commands and ! With SOS, you can dump the contents of the heap like so: 0: 0. The problem with this is that there is no easy way to tell from the output which generation each object belongs to. You can follow up the call to ! However, determining the contents of, say, generation 2 using this method is very tedious. Here's the output of ! GC mode: 0: 0. 00> ! Number of GC Heaps: 2- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -Heap 0 (0. Large object heap starts at 0x. Heap Size 0x. Heap 1 (0. 00. 00. Large object heap starts at 0x. Heap Size 0x. GC Heap Size 0x. What is File Extension DPK? Windows is associating DPK file extensions with the wrong software program. To begin your free file analysis. Free downloads & security. This change has affected your software updates and. Your manufacturer is best qualified to support the software that your. As you can see, you have a lot of work to do in order to pick through the output of ! Enter SOSEX's ! dumpgen command. Using ! dumpgen, you can easily determine the contents of a given generation simply by providing the number of the generation you wish to examine: 0: 0. System. Object. 00. System. String STRVAL=length. System. String STRVAL=Argument. Out. Of. Range. If ! IL offset, and, if symbols are available, the source code and line number at which each thread is waiting: 0: 0. Deadlock detected: CLR thread 4 holds sync block 0. OBJ: 0. 00. 00. 00. One important caveat holds true for ! Put more simply, it will only spot locks created by Monitor. Enter (which is used by the C# lock keyword).
With the ! bpsc command, it is now simple to set source code breakpoints. I've often wanted to stop the execution of my application either deep inside a method in the BCL or in one of my own methods in a build for which I have no symbols. Though SOS provides the handy ! This is often not effective for more difficult debugging scenarios. The ! bpmo command now provides a means for you to set a breakpoint at specific IL offset within a given type and method. If symbols are available, ! Names of arguments are (with rare exception) provided even without symbols. In order to inspect member variables, first call ! Using SOS, it is a bit of a cumbersome process to view the contents of static fields. The ! isf command makes it simple by allowing you to simply specify the type and field name to inspect. Please provide bug reports and feature requests either in the comments for this post or via the . I owe many thanks to John Robbins, who provided some key feature ideas for SOSEX as well as some valuable testing time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |