<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6043482</id><updated>2010-04-05T18:31:20.063+02:00</updated><title type='text'>Experiments in Software</title><subtitle type='html'>A blog on the MOSA project, .NET, software design &amp;amp; architecture - and my daily life.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.michaelruck.de/atom.xml'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6043482.post-6561668006461690892</id><published>2010-04-05T12:23:00.000+02:00</published><updated>2010-04-05T12:40:38.647+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Implications of ECMA-335 and Partition I, 12.1.2 and 12.</title><content type='html'>As I&amp;#x2019;ve been spending quite some time this weekend to refactor parts of the MOSA compiler and fixing things small and large. I&amp;#x2019;ve stumbled once again over our memory model. I was refactoring our internal representation in order to make load and store operations explicit and broke almost all of our tests at once. Fixing them was pretty easy, except for the smaller types... Section 12.1.2 states:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;#x201e;Loading from 1- or 2-byte locations (arguments, locals, fields, statics, pointers) expands to 4-byte values.&amp;#x201c;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Ouch. We&amp;#x2019;ve gone through a lot of trouble to ensure correct arithmetics on all types and have been badly missing the point: All smaller integral types are handled at 4 bytes in size on the evaluation stack.&lt;br /&gt;&lt;br /&gt;Next step was to change the CIL load instructions to correctly reflect this fact and fortunately we already had the appropriate instructions in the IR. So the current state of work is that most of our tests are passing again, but not all yet. Then I started wondering about the floating point specification. Looking at the section for floating point values (12.1.3), it states:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;#x201e;The supported storage sizes are float32 and float64. Everywhere else (on the evaluation stack, as arguments, as return types, and as local variables) floating-point numbers are represented using an internal floating-point type. In each such instance, the nominal type of the variable or expression is either float32or float64, but its value can be represented internally with additional range and/or precision. The size of the internal floating- point representation is implementation-dependent, can vary, and shall have precision at least as great as that of the variable or expression being represented. An implicit widening conversion to the internal representation from float32 or float64 is performed when those types are loaded from storage. The internal representation is typically the native size for the hardware, or as required for efficient implementation of an operation.&amp;#x201c;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;So for floating point types we have exactly one stack type F, but the implementation is free to choose the precision of its operations as long as it is at least as large as the storage size of the floating point type. Since we&amp;#x2019;ve spent a great deal of time on single precision arithmetics, I&amp;#x2019;m inclined to keep the reduced precision operations there. Any opinions?&lt;br /&gt;&lt;br /&gt;I&amp;#x2019;ll continue fixing this in the next couple of days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-6561668006461690892?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/6561668006461690892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=6561668006461690892&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/6561668006461690892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/6561668006461690892'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/04/implications-of-ecma-335-and-partition.html' title='Implications of ECMA-335 and Partition I, 12.1.2 and 12.'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-1863326071199471714</id><published>2010-04-04T02:50:00.000+02:00</published><updated>2010-04-04T02:53:21.530+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Why the Switch Fixture has crashed on I2/U2 and others...</title><content type='html'>The tests are run by .NET calling through a function pointer delegate using the stdcall calling convention. This calling convention is similar to cdecl. One of the similarities is that the EBX register must be saved by the callee and restored before it returns to the caller. We didn&amp;#x2019;t do that and thus corrupted the state of the .NET runtime on Windows. Bug fixed and commit following soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-1863326071199471714?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/1863326071199471714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=1863326071199471714&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/1863326071199471714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/1863326071199471714'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/04/why-switch-fixture-has-crashed-on-i2u2.html' title='Why the Switch Fixture has crashed on I2/U2 and others...'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-4573515164397375233</id><published>2010-03-27T21:05:00.000+01:00</published><updated>2010-03-28T14:40:20.996+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>The next step: Virtual methods and method tables</title><content type='html'>After the static object allocation, I&amp;#x2019;ve finished the next step for MOSA. The compiler now emits mtable (virtual method tables) records for compiled types and is able to properly call virtual functions. The test to check these is in CallVirtFixture. I&amp;#x2019;ll add a couple more tests there to check for proper hiding, base class calls and other things - hopefully the current code should handle all of those cases sufficiently well.&lt;br /&gt;&lt;br /&gt;In order to accomplish this I&amp;#x2019;ve had to add a fake System.Object implementation to the existing tests, as those classes wouldn&amp;#x2019;t compile anymore - the linker couldn&amp;#x2019;t create the vtable for them due to the 4 virtual methods every object inherits from System.Object: ToString, GetHashCode, Equals and Finalize.&lt;br /&gt;&lt;br /&gt;The good thing about this is of course we can now use virtual functions and use overrides to do OO-kernels, the down side of course is: Every kernel has to provide at least a fake implementation of System.Object.&lt;br /&gt;&lt;br /&gt;I&amp;#x2019;ve added a fake System.Object to the existing HelloWorld kernel. &lt;br /&gt;&lt;br /&gt;Let&amp;#x2019;s see what Phil and Simon can come up with in Hello World, now that this is out of the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-4573515164397375233?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/4573515164397375233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=4573515164397375233&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/4573515164397375233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/4573515164397375233'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/next-step-virtual-methods-and-method.html' title='The next step: Virtual methods and method tables'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-7858614625910372428</id><published>2010-03-15T21:55:00.000+01:00</published><updated>2010-03-28T13:10:28.961+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Making good on a promise I've made a long time ago.</title><content type='html'>After improving our test situation on the weekend, I&amp;#x2019;ve started on making good a promise I&amp;#x2019;ve given a long time ago. The promise was: Allocate static objects at compile time for core kernel services.&lt;br /&gt;&lt;br /&gt;The issue with writing a managed operating system or any operating system is memory management and moving to the OS way of working at boot time. The core problem is that there are assumptions about objects, which can&amp;#x2019;t be met easily as memory management is being initialized on the CPU(s) the OS will run on. MOSA is facing this problem too, with one addition: Writing non-OO code in an OO language feels broken.&lt;br /&gt;&lt;br /&gt;Classical operating systems solve this by having a reduced set of services while booting and initializing the OS services later in the OS specific fashion. We could&amp;#x2019;ve done this too, but why go for common ground if there&amp;#x2019;s new to explore.&lt;br /&gt;&lt;br /&gt;So what does this feature do? This feature detects all dynamic memory allocations happening in static constructors and allocates memory for the allocated objects at compile time in the bss segment of an executable. It replaces the call to new with a load of the address of the data segment location, making the position of the object fixed in memory relative to its load address. This allows core OS services to be written using C# classes right from the start and allows them to be used as such.&lt;br /&gt;&lt;br /&gt;There are some limitations though: The allocated object must be fixed in size, it must not have a complex structure and the field used to store the object must have the exact same type as used for the new operator. No casts allowed.&lt;br /&gt;&lt;br /&gt;There&amp;#x2019;re probably further limits to this feature, but I haven&amp;#x2019;t figured them out yet. It will certainly be interesting to explore our HelloWorld kernel with OO-features using the new MOSA compiler.&lt;br /&gt;&lt;br /&gt;Oh and before I forget: The feature must be turned on explicitly on the command line. Use --enable-static-alloc (or the shorter --sa) to enable it.&lt;br /&gt;&lt;br /&gt;I&amp;#x2019;ve update the HelloWorld projects CMOS and Boot classes to take advantage of this mechanism.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-7858614625910372428?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/7858614625910372428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=7858614625910372428&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7858614625910372428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7858614625910372428'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/making-good-on-promise-i-made-long-time.html' title='Making good on a promise I&amp;#39;ve made a long time ago.'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-3563059652124509024</id><published>2010-03-11T20:44:00.000+01:00</published><updated>2010-03-28T13:10:26.654+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Changes I've made to MOSA to support generics, Part I</title><content type='html'>Over the past couple of days I&amp;#x2019;ve made changes to MOSA to support generics. The first and primary change was to support a scheduled compilation model.&lt;br /&gt;&lt;br /&gt;Let me explain this: Up to these changes the MOSA compiler would just scan an assembly, locate all types and compile each method contained in them. The only exceptions to this rule were native methods, generic types and generic methods.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The revised compilation scheduler stage&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;However skipping generics doesn&amp;#x2019;t work anymore - you want those generic types and methods compiled too. The issue you face is how to compile these methods and types without knowing the usage. So I basically kept the current compilation scheduler, but added the capability for the pipeline to schedule additional types and methods in the scheduler. In order to do this, there&amp;#x2019;s a new assembly compilation stage: The ICompilationSchedulerStage. This stage performs the type lookups that used to be done by the MethodCompilerBuilderStage.&lt;br /&gt;&lt;br /&gt;The compilation scheduler now maintains a schedule of methods and types to compile and executes these in order. Once all scheduled methods and types are compiled, the entire assembly including all of its generic usages has been compiled.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-3563059652124509024?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/3563059652124509024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=3563059652124509024&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3563059652124509024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3563059652124509024'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/changes-i-made-to-mosa-to-support.html' title='Changes I&amp;#39;ve made to MOSA to support generics, Part I'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-3497195645254494643</id><published>2010-03-11T03:01:00.000+01:00</published><updated>2010-03-11T03:07:09.924+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>MOSA: Generic method compilation, first test succeeded</title><content type='html'>After about 3 hours patching and fixing the last issues I finally completed the first successful test of generics in MOSA. The following C# fragment compiles successfully and passes all tests:&lt;br /&gt;&lt;br /&gt;static class Test&lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;private static T GenericMethod&amp;lt;T&amp;gt;(T value)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return value;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;         public static bool TestCallGenericMethodWith(int value)&lt;br /&gt;         {&lt;br /&gt;         &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return value == GenericMethod(value);&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;It may not look like much, but this test is the ground for all other generic arguments and has moved forward not only the compiler, but also the assembly loader, the MOSA runtime and some other additions like cleaner error messages from mosacl.&lt;br /&gt;&lt;br /&gt;I&amp;#x2019;ll finish this test case tomorrow and push my changes to Github, I&amp;#x2019;ll probably need some help with that from fellow MOSA contributors. &lt;br /&gt;&lt;br /&gt;Good night.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-3497195645254494643?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/3497195645254494643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=3497195645254494643&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3497195645254494643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3497195645254494643'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/mosa-generic-method-compilation-first.html' title='MOSA: Generic method compilation, first test succeeded'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-104699448497933699</id><published>2010-03-09T02:11:00.000+01:00</published><updated>2010-03-09T02:13:10.543+01:00</updated><title type='text'>mosacl is compiling very simple generic types</title><content type='html'>Let mosacl speak for itself:&lt;br /&gt;&lt;br /&gt;Mini:Bin Michael$ mono --debug mosacl.exe -a x86 -o MQT.exe -f PE Mosa.QuickTest.exe&lt;br /&gt;MOSA AOT Compiler, Version 0.6 'Tanigawa'&lt;br /&gt;Copyright 2009 by the MOSA Project. Licensed under the New BSD License.&lt;br /&gt;Copyright 2008 by Novell. NDesk.Options is released under the MIT/X11 license.&lt;br /&gt;&lt;br /&gt;Output file: MQT.exe&lt;br /&gt;Input file(s): /Users/Michael/Projects/MOSA/MOSA-Project/Bin/Mosa.QuickTest.exe&lt;br /&gt;Architecture: Mosa.Platforms.x86.Architecture&lt;br /&gt;Binary format: Portable Executable File Linker&lt;br /&gt;Boot format: Not bootable&lt;br /&gt;Is executable: True&lt;br /&gt;&lt;br /&gt;Compiling ...&lt;br /&gt;Scheduling type Mosa.QuickTest.App for compilation.&lt;br /&gt;Compiling type Mosa.QuickTest.App&lt;br /&gt;Compiling method Main&lt;br /&gt;Loaded generic type Mosa.QuickTest.Generic`1&lt;br /&gt;Scheduling type Mosa.QuickTest.Generic`1&amp;lt;System.Int32&amp;gt; for compilation.&lt;br /&gt;Compiling type Mosa.QuickTest.Generic`1&amp;lt;System.Int32&amp;gt;&lt;br /&gt;Compiling method .ctor&lt;br /&gt;Compiling method get_Value&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Unresolved symbols.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;System.Object..ctor()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mini:Bin Michael$&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-104699448497933699?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/104699448497933699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=104699448497933699&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/104699448497933699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/104699448497933699'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/mosacl-is-compiling-very-simple-generic.html' title='mosacl is compiling very simple generic types'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-2685171217474606500</id><published>2010-03-07T10:03:00.000+01:00</published><updated>2010-03-08T00:40:03.714+01:00</updated><title type='text'>Signs of generic types</title><content type='html'>After hacking MOSA two days again and trying to figure out what I was thinking way back, here&amp;#x2019;s one of the first runs with generic types:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mini:Bin Michael$ mono --debug mosacl.exe -o MQT.exe --Architecture=x86 --format=PE  Mosa.QuickTest.exe&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;MOSA AOT Compiler, Version 0.6 'Tanigawa'&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Copyright 2009 by the MOSA Project. Licensed under the New BSD License.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Copyright 2008 by Novell. NDesk.Options is released under the MIT/X11 license.&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Output file: MQT.exe&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Input file(s): /Users/Michael/Projects/MOSA/MOSA-Project/Bin/Mosa.QuickTest.exe&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Architecture: Mosa.Platforms.x86.Architecture&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Binary format: Portable Executable File Linker&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Boot format: Not bootable&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Is executable: True&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Compiling ...&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Scheduling type Mosa.QuickTest.App for compilation.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Compiling type Mosa.QuickTest.App&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Compiling method Main&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Scheduling type System.Collections.Generic.List`1&amp;lt;System.Int32&amp;gt; for compilation.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Scheduling type Mosa.QuickTest.Generic`1&amp;lt;System.String&amp;gt; for compilation.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Compiling type System.Collections.Generic.List`1&amp;lt;System.Int32&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Compiling method .ctor&lt;br /&gt;&lt;br /&gt;Unfortunately this is as far as it gets right now, but I&amp;#x2019;m sure I&amp;#x2019;ll find the reason for this soon.&lt;br /&gt;&lt;br /&gt;I had to rewrite a whole bunch of stuff to get this far, including the way types are scheduled for compilation by mosacl. Surprising is that generics can be AOT&amp;#x2019;d under certain circumstances.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-2685171217474606500?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/2685171217474606500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=2685171217474606500&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/2685171217474606500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/2685171217474606500'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/signs-of-generic-types.html' title='Signs of generic types'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-2141951294572296929</id><published>2010-03-06T13:26:00.000+01:00</published><updated>2010-03-06T13:41:37.497+01:00</updated><title type='text'>Solving the pkg-config and Mono 3.5 Profile mysteries on MacOS X 10.6 (Mono 2.6.1)</title><content type='html'>Yesterday I&amp;#x2019;ve tried to install Mono 2.6.1 on my Mac mini to do some work on my pet project MOSA. Unfortunately things didn&amp;#x2019;t work out as smoothly as I thought as nant greeted me with the following error message:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Failed to initialize the 'Mono 3.5 Profile' (mono-3.5) target framework.&lt;br /&gt;&lt;br /&gt;Furthermore it stated:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;'pkg-config' failed to start.&lt;br /&gt;&lt;br /&gt;I tried all sorts of things from reinstalling, to cleaning, to trying to pull mono from Macports  and even compiling Mono myself. Nothing has helped, every attempt was stopped by some error at some point.&lt;br /&gt;&lt;br /&gt;The I started to do some digging and tried running pkg-config from Terminal - sure enough it wasn&amp;#x2019;t there. It was however in my /opt/local/bin folder, so running&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/opt/local/bin/pkg-config --modversion mono&lt;br /&gt;&lt;br /&gt;resulted in:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Package mono was not found in the pkg-config search path.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Perhaps you should add the directory containing `mono.pc'&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;to the PKG_CONFIG_PATH environment variable&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;No package 'mono' found&lt;br /&gt;&lt;br /&gt;Ok, so again I stumbled - looking further I found another pkg-config installed by Mono itself. So running it with the following two commands in Terminal:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;export PATH=/Library/Frameworks/Mono.framework/Versions/2.6.1/bin:$PATH&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;pkg-config --modversion mono&lt;br /&gt;&lt;br /&gt;produced:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Package glib-2.0 was not found in the pkg-config search path.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Perhaps you should add the directory containing `glib-2.0.pc'&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;to the PKG_CONFIG_PATH environment variable&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Package 'glib-2.0', required by 'Mono', not found&lt;br /&gt;&lt;br /&gt;Again I stumbled. Looking for glib-2.0.pc I found it in /opt/local/lib. So I added it to the PKG_CONFIG_PATH and ran it again:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;pkg-config --modversion mono&lt;br /&gt;&lt;br /&gt;Now I finally got the response:&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;2.6.1&lt;br /&gt;&lt;br /&gt;So I&amp;#x2019;ve finally got pkg-config to work and running nant worked too - I can now start contributing some code again...&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-2141951294572296929?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/2141951294572296929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=2141951294572296929&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/2141951294572296929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/2141951294572296929'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2010/03/solving-pkg-config-and-mono-35-profile.html' title='Solving the pkg-config and Mono 3.5 Profile mysteries on MacOS X 10.6 (Mono 2.6.1)'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-7341819317024410120</id><published>2009-01-18T00:53:00.002+01:00</published><updated>2009-06-14T22:42:22.320+02:00</updated><title type='text'>Debug Symbols for MOSA #4 - PDB File Format</title><content type='html'>&lt;p style="clear: both"&gt;I'll continue my series with this posting about the PDB file format. There are some places on the net, which already describe the file format. However I've found some inaccuracies in most places - probably due to the fact that the format itself is not open and everyone performs some kind of interpretation of the data they see. Again, take this post with a grain of salt. I'm going to talk about the managed PDB files explicitly, so expect some differences compared to native code PDB files.&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;h5&gt;Test Code&lt;/h5&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;Before we'll dive into the format itself I want to show you the sample code I'm going to use to describe the format with. The following C# source is compiled with debug support in order to generate a PDB file. &lt;/p&gt;&lt;p style="clear: both"&gt;&lt;div class="wlWriterSmartContent" id="scid:F2210F5F-69EB-4d4c-AFF7-B8A050E9CC72:39d789b7-e6b8-4b10-b6db-c331dc722026" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 733px; PADDING-TOP: 0px"&gt;&lt;pre style="clear: both"&gt;&amp;lt;span style="color:#999999;"&gt;1&amp;lt;/span&gt; &amp;lt;span style="color:#0000ff;"&gt;using&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; System;&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;2&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;3&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;namespace&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; PdbExample&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;4&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;{&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;5&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;class&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; Program&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;6&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;{&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;7&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;static&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;void&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; Main(&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;string&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;[] args)&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;8&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;{&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;9&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;Console.WriteLine(&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;"&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;Hello World!&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;"&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;);&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;10&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;for&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; (&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;int&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; i &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;=&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#800080;"&gt;0&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;; i &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;lt;&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#800080;"&gt;10&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;; i&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;++&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;)&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;11&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;Console.WriteLine(&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;"&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;Count: {0}&amp;lt;/span&gt;&amp;lt;span style="color:#800000;"&gt;"&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;, i);&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;12&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;}&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;13&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;}&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;14&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;}&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#999999;"&gt;15&amp;lt;/span&gt; &amp;lt;span style="color:#000000;"&gt;&amp;lt;/span&gt;&amp;lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;The examples shown in this series use the C# 3.5 compiler, however I believe the format hasn't changed since C# 1.0.&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;h5&gt;PDB Header&lt;/h5&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;PDB files start with a pretty large header of 32 bytes, which can be used to identify the file. The following dump shows a header of the resulting PDB file: &lt;/p&gt;&lt;p style="clear: both"&gt;&lt;div class="wlWriterSmartContent" id="scid:F2210F5F-69EB-4d4c-AFF7-B8A050E9CC72:01ec04b2-379e-407a-828a-c5f4524a2653" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="clear: both"&gt;&amp;lt;span style="color:#000000;"&gt;00000000&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 4D &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;69&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;63&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;72&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 6F &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;73&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 6F &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;66&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;74&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;20&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;43&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 2F &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;43&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 2B 2B &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;20&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; Microsoft C&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;/&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;C&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;++&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;00000010&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 4D &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;53&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;46&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;20&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;37&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 2E &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;30&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;30&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; 0D 0A 1A &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;44&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;53&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;00&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;00&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;00&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; MSF &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;7.00&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;...&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;DS&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;...&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;lt;br /&gt;&amp;lt;/span&gt;&amp;lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;The header has some interesting properties. First it is an ASCII string, which contains a line break and is zero terminated. This makes it possible to pass a PDB file to the DOS command 'type' and be able to see the version of the PDB file we have:&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;div class="wlWriterSmartContent" id="scid:F2210F5F-69EB-4d4c-AFF7-B8A050E9CC72:1d433972-238e-4b1c-b0bf-1e63130e2271" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="clear: both"&gt;&amp;lt;span style="color:#000000;"&gt;D:&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;My Projects&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;Tests&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;CSharpConsoleBlog&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;CSharpConsoleBlog&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;gt;&amp;lt;/span&gt;&amp;lt;span style="color:#0000ff;"&gt;type&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; Program10&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;.&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;pdb&amp;lt;br /&gt;Microsoft C&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;/&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;C&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;++&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt; MSF &amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;7.00&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;lt;br /&gt;&amp;lt;br /&gt;D:&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;My Projects&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;Tests&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;CSharpConsoleBlog&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;\&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;CSharpConsoleBlog&amp;lt;/span&gt;&amp;lt;span style="color:#000000;"&gt;&amp;gt;&amp;lt;/span&gt;&amp;lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;You don't get the garbage displayed on the screen but still some valuable information from the file itself. The two letters DS in the header are the initials of Dan Spalding, who owned the linker and much of the PDB code for many years according to &lt;a href="http://blogs.msdn.com/andypennell/archive/2005/12/09/502267.aspx"&gt;Andy Penell&lt;/a&gt;.&lt;/p&gt;&lt;p style="clear: both"&gt;Next, at byte 0x00000020 starts a structure, which contains a lot of settings and provides a lot of information to a PDB reader:&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;table border="1" style="margin: 0; padding: 0; border: solid 1px black;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Field&lt;/td&gt;&lt;td&gt;Size&lt;/td&gt;&lt;td&gt;Meaning&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pageSize&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;The size of a page in the file.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bitmapPage&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;The page number of the bitmap page.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;filePages&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;The number of pages in the file.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;rootBytes&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;The number of bytes in the root stream.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;reserved&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;Unused as far as I know.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;indexPage&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;The page number of the index page.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;Ok, so a PDB file is divided into fixed size pages (size in the pageSize field) and there's a bitmap that specifies if a page is in use or not. Sounds familiar? Well, yes it's the same strategy as used for the FAT file system, OLE compound files and in a lot of other areas.&lt;/p&gt;&lt;p style="clear: both"&gt;The filePages field can be used to make sure the PDB file is completely available - multiply pageSize with filePages and you should have the size of the PDB file.&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;h5&gt;PDB Root Stream&lt;/h5&gt;&lt;/p&gt;&lt;p style="clear: both"&gt;Using the fields we have right now, we still can't unlock the contents of the PDB file. To get there we need to combine the rootBytes and indexPage fields. The indexPage field points to a page, which contains page numbers of the root stream. So it is an array of 4-byte page numbers, which hold the contents of the root stream in order. To determine the number of entries in the index, you must divide rootBytes by pageSize.&lt;/p&gt;&lt;p style="clear: both"&gt;If you read all pages in order of the index, you've read the root stream. The root stream tells us, what is contained in the file. The root stream starts with 4 bytes, which tell the total number of streams in the file. An array of stream lengths is located after the stream count, e.g. each entry in this array corresponds to the length of that stream. What follows next is a page index for all streams, e.g. an array of page numbers for stream #1, an array of page numbers for stream #2 etc. The number of entries is again determined by the length of that stream divided by the page size.&lt;/p&gt;&lt;p style="clear: both"&gt;The root stream gives us basically an index of all streams available and how they're spread accross the PDB file.&lt;/p&gt;&lt;p style="clear: both"&gt;Starting with the next posting, I'll dive into the important streams in order.&lt;/p&gt;&lt;p style="clear: both"&gt;&lt;/p&gt;&lt;br class='final-break' style='clear: both' /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-7341819317024410120?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/7341819317024410120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=7341819317024410120&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7341819317024410120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7341819317024410120'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-4-pdb-file.html' title='Debug Symbols for MOSA #4 - PDB File Format'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-3670168276938410952</id><published>2009-01-17T22:12:00.001+01:00</published><updated>2009-01-17T22:13:36.851+01:00</updated><title type='text'>Updated my blog style again...</title><content type='html'>Ok, this is going to be the last update for some time. I'll add some more categories for postings I've planned, but this will be it - unless I'll find some more bugs somewhere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-3670168276938410952?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/3670168276938410952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=3670168276938410952&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3670168276938410952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3670168276938410952'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/updated-my-blog-style-again.html' title='Updated my blog style again...'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-1455587601268712105</id><published>2009-01-16T02:14:00.003+01:00</published><updated>2009-01-16T02:21:47.508+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Debug Symbols for MOSA #3 - Accessing PDB files</title><content type='html'>&lt;p&gt;In the last post, I wrote about the &lt;a href="http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-2-debug-symbol.html"&gt;debug symbol formats&lt;/a&gt; used by Microsoft in recent years. This post is dedicated to tell you, where to look about accessing these files using official APIs. If the world consisted only of Windows, we could stop here. We wouldn't need to understand the file format itself or be able to read the files without the APIs described below. However the world isn't living in monoculture so I'll keep my goal to describe the PDB format in the next posts.&lt;/p&gt;&lt;p&gt;Essentially Microsoft only makes four APIs available to access debugging symbols:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms680321(VS.85).aspx"&gt;Image Helper Library&lt;/a&gt; (included with Windows, not redistributable) &lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms679309%28VS.85%29.aspx"&gt;Debug Help Library&lt;/a&gt; (included with Windows, redistributable, updated versions in the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows&lt;/a&gt;) &lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/x93ctkx8%28VS.80%29.aspx"&gt;Debug Interface Access SDK&lt;/a&gt; (included with Visual Studio) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;and the only remaining API is in the .NET &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore%28VS.71%29.aspx"&gt;System.Diagnostics.SymbolStore&lt;/a&gt; namespace in mscorlib.&lt;/p&gt;&lt;p&gt;Of all of these APIs the Image Helper Library provides the most features, followed by the Debug Help Library. The later is used by the Microsoft Debuggers to load symbol information. While both of these libraries are regular Win32 DLLs with WINAPI entry points, the Debug Interface Access SDK provides COM objects to access the contents of symbol files. The library is very easy to work with.&lt;/p&gt;&lt;p&gt;As one can easily see these three options don't work outside the Microsoft world, well they don't except for maybe Wine or ReactOS. My first hope was that using the System.Diagnostics.SymbolStore namespace would be sufficient for our purpose of retrieving the symbol information, but again this quickly makes the code a Windows only option.&lt;/p&gt;&lt;p&gt;From &lt;a href="http://blogs.msdn.com/jmstall"&gt;Mike Stall's .NET Debugging Blog&lt;/a&gt;, I've taken the following snippet from the &lt;a href="http://blogs.msdn.com/jmstall/pages/sample-pdb2xml.aspx"&gt;sample code of PDB2XML&lt;/a&gt; tool - a tool, which uses ISymbolReader to read a PDB file and writes it in an XML file.&lt;/p&gt;&lt;pre&gt;&lt;span style="color:#008000;"&gt;        // We demand Unmanaged code permissions because we're reading from the file system and calling out to the Symbol Reader&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;        &lt;/span&gt;&lt;span style="color:#008000;"&gt;// @TODO - make this more specific.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;        [System.Security.Permissions.&lt;/span&gt;&lt;span style="color:#008080;"&gt;SecurityPermission&lt;/span&gt;&lt;span style="color:#000000;"&gt;(System.Security.Permissions.&lt;/span&gt;&lt;span style="color:#008080;"&gt;SecurityAction&lt;/span&gt;&lt;span style="color:#000000;"&gt;.Demand,&lt;br /&gt;            Flags = System.Security.Permissions.&lt;/span&gt;&lt;span style="color:#008080;"&gt;SecurityPermissionFlag&lt;/span&gt;&lt;span style="color:#000000;"&gt;.UnmanagedCode)]&lt;br /&gt;        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;static&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#008080;"&gt;ISymbolReader&lt;/span&gt;&lt;span style="color:#000000;"&gt; GetSymbolReaderForFile(&lt;/span&gt;&lt;span style="color:#008080;"&gt;SymbolBinder&lt;/span&gt;&lt;span style="color:#000000;"&gt; binder, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt; pathModule, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt; searchPath)&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008000;"&gt;// Guids for imported metadata interfaces.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt; dispenserClassID = &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt;(0xe5cb7a31, 0x7512, 0x11d2, 0x89, 0xce, 0x00, 0x80, 0xc7, 0x92, 0xe5, 0xd8); &lt;/span&gt;&lt;span style="color:#008000;"&gt;// CLSID_CorMetaDataDispenser&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt; dispenserIID = &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt;(0x809c652e, 0x7396, 0x11d2, 0x97, 0x71, 0x00, 0xa0, 0xc9, 0xb4, 0xd5, 0x0c); &lt;/span&gt;&lt;span style="color:#008000;"&gt;// IID_IMetaDataDispenser&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt; importerIID = &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#008080;"&gt;Guid&lt;/span&gt;&lt;span style="color:#000000;"&gt;(0x7dac8207, 0xd3ae, 0x4c75, 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44); &lt;/span&gt;&lt;span style="color:#008000;"&gt;// IID_IMetaDataImport&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#008000;"&gt;// First create the Metadata dispenser.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&lt;span style="color:#000000;"&gt; objDispenser;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;NativeMethods&lt;/span&gt;&lt;span style="color:#000000;"&gt;.CoCreateInstance(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt;&lt;span style="color:#000000;"&gt; dispenserClassID, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;&lt;span style="color:#000000;"&gt;, 1, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt;&lt;span style="color:#000000;"&gt; dispenserIID, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;out&lt;/span&gt;&lt;span style="color:#000000;"&gt; objDispenser);&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008000;"&gt;// Now open an Importer on the given filename. We'll end up passing this importer straight&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#008000;"&gt;// through to the Binder.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&lt;span style="color:#000000;"&gt; objImporter;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;IMetaDataDispenser&lt;/span&gt;&lt;span style="color:#000000;"&gt; dispenser = (&lt;/span&gt;&lt;span style="color:#008080;"&gt;IMetaDataDispenser&lt;/span&gt;&lt;span style="color:#000000;"&gt;)objDispenser;&lt;br /&gt;            dispenser.OpenScope(pathModule, 0, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt;&lt;span style="color:#000000;"&gt; importerIID, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;out&lt;/span&gt;&lt;span style="color:#000000;"&gt; objImporter);&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;IntPtr&lt;/span&gt;&lt;span style="color:#000000;"&gt; importerPtr = &lt;/span&gt;&lt;span style="color:#008080;"&gt;IntPtr&lt;/span&gt;&lt;span style="color:#000000;"&gt;.Zero;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#008080;"&gt;ISymbolReader&lt;/span&gt;&lt;span style="color:#000000;"&gt; reader;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;try&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            {&lt;br /&gt;                &lt;/span&gt;&lt;span style="color:#008000;"&gt;// This will manually AddRef the underlying object, so we need to be very careful to Release it.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;                importerPtr = &lt;/span&gt;&lt;span style="color:#008080;"&gt;Marshal&lt;/span&gt;&lt;span style="color:#000000;"&gt;.GetComInterfaceForObject(objImporter, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#008080;"&gt;IMetadataImport&lt;/span&gt;&lt;span style="color:#000000;"&gt;));&lt;br /&gt;&lt;br /&gt;                reader = binder.GetReader(importerPtr, pathModule, searchPath);&lt;br /&gt;            }&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;finally&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;            {&lt;br /&gt;                &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (importerPtr != &lt;/span&gt;&lt;span style="color:#008080;"&gt;IntPtr&lt;/span&gt;&lt;span style="color:#000000;"&gt;.Zero)&lt;br /&gt;                {&lt;br /&gt;                    &lt;/span&gt;&lt;span style="color:#008080;"&gt;Marshal&lt;/span&gt;&lt;span style="color:#000000;"&gt;.Release(importerPtr);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; reader;&lt;br /&gt;        }&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Ouch, that was a lot of code just to get the symbol reader - but wait a minute, what are the Guids doing there and the CoCreateInstance call? This screams trouble for cross platform code... It turns out that &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore.isymbolreader.aspx"&gt;ISymbolReader&lt;/a&gt; is not useful without an object, which implements the &lt;a href="http://msdn.microsoft.com/en-us/library/ms230172.aspx"&gt;IMetadataImport&lt;/a&gt; interface. This is a COM interface implemented by mscoree.dll, the Microsoft .NET Runtime Execution Engine. And you can't get an ISymbolReader without a &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore.symbinder.aspx"&gt;SymBinder&lt;/a&gt;, which is not even defined in the namespace. These GUIDs and the COM classes are defined in ISymWrapper.dll, a COM interop assembly.&lt;/p&gt;&lt;p&gt;But not enough, the &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore.isymbolbinder1.aspx"&gt;ISymbolBinder1&lt;/a&gt; (don't ask, look up &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore.isymbolbinder.aspx"&gt;ISymbolBinder&lt;/a&gt; and ISymbolBinder1 and figure out the reason for ISymbolBinder1) interface uses an IntPtr to access this IMetadataImport interface. Essentially you're passing a COM interface in an unmanaged pointer (or native int in CIL speak) to another unmanaged COM object.&lt;/p&gt;&lt;p&gt;Somehow this is messed up. Really messed up. It looks like symbol information was an afterthought in the development of .NET and hasn't received any priority ever since .NET 1.0 - this mess has been this way since .NET 1.0 was released. I hope that things get better with .NET 4.0, but for some reason I doubt that.&lt;/p&gt;&lt;p&gt;Now we've collected lots of unusable APIs and we still can't read those PDB files anywhere outside of Windows. However this gives us something else: All of those APIs have documented some structures to pass symbol information to the calling application. These structures are very likely to be similar to what is stored on disk - at least these APIs give us some hints that the format is more complex than one might think. And finally the .NET namespace gives us some design guidelines to realize a PDB reader/writer using plain .NET.&lt;/p&gt;&lt;p&gt;More in the next post.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-1455587601268712105?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/1455587601268712105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=1455587601268712105&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/1455587601268712105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/1455587601268712105'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-3-accessing-pdb.html' title='Debug Symbols for MOSA #3 - Accessing PDB files'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-6951804900079378240</id><published>2009-01-16T01:34:00.001+01:00</published><updated>2009-01-16T01:34:16.937+01:00</updated><title type='text'>New blog design</title><content type='html'>&lt;p&gt;Ok, another blog design. The green didn't really look good so now I've been looking on the web for a better blog template and have found some nice ones made by &lt;a href="http://andreasviklund.com"&gt;Andreas Viklund&lt;/a&gt;. Thank you for sharing these templates.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-6951804900079378240?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/6951804900079378240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=6951804900079378240&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/6951804900079378240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/6951804900079378240'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/new-blog-design.html' title='New blog design'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-4213120108239773981</id><published>2009-01-15T14:16:00.007+01:00</published><updated>2009-01-16T00:24:40.302+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Debug Symbols for MOSA #2 - Debug Symbol Formats</title><content type='html'>This continues the series of Debug Symbols for MOSA, started in &lt;a href="http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-1-why-we-need.html"&gt;Why we need them&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As the title says, there's a multitude of debug symbol formats out there. It usually depends on the operating system, the compiler, compiler switches and linker of choice what kind of symbols are emitted or even worse if any at all. I'm only going to talk about the Microsoft formats, as these are the ones I've actively been working with.&lt;br /&gt;&lt;br /&gt;Microsoft has created a multitude of symbol formats in the past, where even PDB files exist in multiple formats. This post sheds some light, which debug symbols are out there.&lt;br /&gt;&lt;br /&gt;The general history for Microsoft Symbol Formats is that there are mainly three kinds:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pre-CodeView&lt;/li&gt;&lt;li&gt;CodeView&lt;/li&gt;&lt;li&gt;PDB&lt;/li&gt;&lt;/ul&gt;I will not dive into the Pre-CodeView era mainly because I don't have much knowledge about it.&lt;br /&gt;&lt;br /&gt;So why does Microsoft change the symbol format all the time? The &lt;a href="http://blogs.msdn.com/matt_pietrek/archive/2005/02/05/367836.aspx"&gt;answer&lt;/a&gt; was given by Matt Pietrek. As the compilers and debuggers advanced more information was stored in the file. Some changes were performed due to the 16-&gt;32 bit transition, but most changes can be attributed to advances in the debugger. Edit and Continue is an example of this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CodeView&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CodeView is format developed by Microsoft sometime along with the CodeView debugger, which was later integrated into the Microsoft C to become the Visual Studio we know today. There are several revisions of CodeView, which adopt the format to the specific compiler version in use.&lt;br /&gt;&lt;br /&gt;There's even a public specification for the CodeView format available various &lt;a href="http://www.google.de/search?q=Microsoft+Symbol+and+Type+Information"&gt;places on the internet&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The CodeView format was stored in various containers (files) over the years, namely the *.dbg files upto Windows 2000 and it is still in use today in the *.pdb files emitted by Visual Studio compilers since around 1997 and more importantly for MOSA: It is also emitted by the .NET compilers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PDB files are in use for quite some time now, but even this file format has went through at least three transitions. There's at least one format for managed symbols produced by csc, vbc and the other .NET compilers - yes another format. Again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CILDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Microsoft has submitted the Common Language Infrastructure to the ECMA for standardization. The latest standardized edition I'm aware of is  ISO/IEC 23271, published on 2006-10-01. Partition V of this standardization defines a Debug Interchange Format, specifically called CILDB. The specification is available for &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-335.htm"&gt;download&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The specification introduction says this:&lt;br /&gt;&lt;blockquote&gt;Portable CILDB files provide a standard way to interchange debugging information between CLI producers and consumers. This partition serves to fill in gaps not covered by metadata, notably the names of local variables and source line correspondences.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Even though Microsoft has pushed this format as part of the specification, no Microsoft tool included with the .NET Framework SDK, the Framework itself or Visual Studio is able to generate or consume these files. So the interchange aspect of this standard is not realized. There are both open and closed source apps, that are able to convert Microsoft PDB files to CILDB - all with a drawback I'll talk about in the next post.&lt;br /&gt;&lt;br /&gt;More in the next post. However one last format for managed code remains:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the mono debug format - it is used by mdb and MonoDevelop. There's integrated support in mono using a SymbolWriter/SymbolReader to produce and consume these files from managed code. Talk about fun!&lt;br /&gt;&lt;br /&gt;The MDB option is definitely one we should follow to debug applications on MOSA, but it is not one we are able to use for kernel debugging or debugging native code.&lt;br /&gt;&lt;br /&gt;Basically this means that mosacl (our ahead of time compiler) must be able to read PDB, MDB and CILDB files in order to map the source code to appropriate places in the native code. Again - more in another post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-4213120108239773981?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/4213120108239773981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=4213120108239773981&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/4213120108239773981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/4213120108239773981'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-2-debug-symbol.html' title='Debug Symbols for MOSA #2 - Debug Symbol Formats'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-3475008663259583269</id><published>2009-01-14T10:59:00.006+01:00</published><updated>2009-01-16T00:24:40.302+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>Debug Symbols for MOSA #1 - Why we need them</title><content type='html'>The MOSA compiler is nearing its 0.1 alpha release and one of the things that has been bugging me since the start was creating debug symbols for compiled assemblies. The &lt;a href="http://www.codeplex.com/mosa/Wiki/View.aspx?title=mosacl"&gt;MOSA compiler&lt;/a&gt; converts CIL assemblies to native code for a specific target architecture. In the process however the mapping of source code to native code gets lost, unless the compiler is able to create new symbol information to map the native code back to the managed source code.&lt;br /&gt;&lt;br /&gt;There are various reasons that support is needed for symbols, one of them is that it makes kernel debugging a whole lot easier if the debugger allows stepping in the source code and variable inspection (the Visual Studio experience.) The other point is that various .NET APIs allow creating debug symbols (CodeDOM or Reflection.Emit) or inspecting them  using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore%28VS.71%29.aspx"&gt;System.Diagnostics.SymbolStore&lt;/a&gt; namespace.&lt;br /&gt;&lt;br /&gt;As I'll explain in the posts later this is no easy task, but one that'll raise the productivity of kernel development a lot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-3475008663259583269?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/3475008663259583269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=3475008663259583269&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3475008663259583269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3475008663259583269'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2009/01/debug-symbols-for-mosa-1-why-we-need.html' title='Debug Symbols for MOSA #1 - Why we need them'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-961056968818025769</id><published>2008-11-10T17:54:00.001+01:00</published><updated>2009-01-16T00:25:30.279+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><title type='text'>It appears the defense date for my diploma thesis is set</title><content type='html'>&lt;p&gt;It's on November 24th 2008 at 9:30 or 10:00 AM. After that I'm finally done with that...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-961056968818025769?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/961056968818025769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=961056968818025769&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/961056968818025769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/961056968818025769'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2008/11/it-appears-defense-date-for-my-diploma.html' title='It appears the defense date for my diploma thesis is set'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-5406611695249469306</id><published>2008-11-10T17:51:00.001+01:00</published><updated>2009-01-16T00:25:10.250+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Undocumented CIL Metadata Tables</title><content type='html'>&lt;p&gt;For some reason some (IMHO useful) tables in the CIL specification (ISO/IEC 23271, Second edition from 2006-10-01) are not documented. These are mainly the AssemblyOS and AssemblyProcessor tables. As I'm working on finishing the MOSA ahead of time compiler to finally be able to produce bootable images, I think these metadata tables are very useful. What really makes me wonder is that even the constants for these tables seem to be &lt;a href="http://msdn.microsoft.com/en-us/library/ms230277.aspx"&gt;documented&lt;/a&gt;. The rdwProcessors field is an array of processor types as defined in winnt.h and the OS version is the same as usually encoded in unmanaged Win32 &lt;a href="http://msdn.microsoft.com/en-us/library/ms724833.aspx"&gt;OSVERSIONINFOEX&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I guess it's time to visit the &lt;a href="http://www.reactos.org/en/index.html"&gt;ReactOS&lt;/a&gt; project and to pull these constants out of their repository.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-5406611695249469306?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/5406611695249469306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=5406611695249469306&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/5406611695249469306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/5406611695249469306'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2008/11/undocumented-cil-metadata-tables.html' title='Undocumented CIL Metadata Tables'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-3914751995621626836</id><published>2008-11-09T23:32:00.001+01:00</published><updated>2008-11-09T23:32:31.124+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>.NET Metadata</title><content type='html'>&lt;p&gt;.NET metadata is what powers the platform. Unfortunately the tables in binary files are in typical Microsoft style. Right now I'm trying to rewrite the metadata loader in the mosa runtime to be reusable for our aot compiler. It is just an ugly format to export - at least I can speed up our metadata loading this way too. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-3914751995621626836?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/3914751995621626836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=3914751995621626836&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3914751995621626836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/3914751995621626836'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2008/11/net-metadata.html' title='.NET Metadata'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-7214240566796358880</id><published>2008-11-09T23:30:00.001+01:00</published><updated>2008-11-09T23:30:18.636+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOSA'/><title type='text'>MOSA &amp; SharpOS</title><content type='html'>&lt;p&gt;As the SharpOS page has gone offline earlier this week/past week (The domain name has expired) I'm wondering how the two projects will relate in the future. MOSA only came to be what it is today by the initial talks tgihil, xfury and I had with other projects, mainly Ensemble and the JNode group.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-7214240566796358880?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/7214240566796358880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=7214240566796358880&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7214240566796358880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/7214240566796358880'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2008/11/mosa-sharpos.html' title='MOSA &amp;amp; SharpOS'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-110331117415187614</id><published>2004-12-17T20:12:00.000+01:00</published><updated>2004-12-17T20:19:34.153+01:00</updated><title type='text'>Admin sein oder nicht?</title><content type='html'>Viele Leute installieren sich ein Windows 2000/XP und laufen dann mit dem Nutzerkonto, welches während der Installation angelegt wurde. Was viele jedoch nicht wissen ist, dass dieses Konto (unsinnigerweise) Administrator-Rechte hat.&lt;br /&gt;&lt;br /&gt;Viele Viren, Würmer, Trojaner und sonstige Spyware kann sich nur durch diese Rechte installieren. Daher empfehle ich jedem die Rechte der allgemeinen Nutzerkonten auf normale Nutzerrechte zu beschränken.&lt;br /&gt;&lt;br /&gt;Falls dies nicht geht, gibts nun doch ein neues Mittel: &lt;a href="http://download.microsoft.com/download/f/2/e/f2e49491-efde-4bca-9057-adc89c476ed4/DropMyRights.msi"&gt;DropMyRights&lt;/a&gt;. Das Programm ermöglicht das starten von anderen Programmen mit anderen Rechten.&lt;br /&gt;&lt;br /&gt;Da viele Viren und andere malware sich über den Browser oder den E-Mail client verbreitet, kann man diese mittels DropMyRights nun auch ohne Administratorrechte laufen lassen - obwohl man sonst in einer solchen Umgebung arbeitet. &lt;br /&gt;&lt;br /&gt;Weitere Details verrät der (englische) MSDN Artikel: &lt;a href="http://msdn.microsoft.com/security/securecode/columns/default.aspx?pull=/library/en-us/dncode/html/secure11152004.asp"&gt;Browsing the Web and Reading E-mail Safely as an Administrator&lt;/a&gt;.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-110331117415187614?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn.microsoft.com/security/securecode/columns/default.aspx?pull=/library/en-us/dncode/html/secure11152004.asp' title='Admin sein oder nicht?'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/110331117415187614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=110331117415187614&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/110331117415187614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/110331117415187614'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/12/admin-sein-oder-nicht.html' title='Admin sein oder nicht?'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-109740590547988766</id><published>2004-10-10T13:57:00.000+02:00</published><updated>2004-10-10T12:59:58.433+02:00</updated><title type='text'>Neue Bilder und andere Änderungen</title><content type='html'>Ich habe mal wieder Zeit gefunden neue Bilder hochzuladen. Dabei habe ich die Gallerie vom Tim umgestaltet und auch per Passwort gesch&amp;uuml;tzt.&lt;br /&gt;&lt;br /&gt;Der Passwortschutz dient lediglich der Vorbeugung. Alle Freunde, Verwandte und Familienmitglieder erhalten das Passwort nat&amp;uuml;rlich von Anja oder mir.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-109740590547988766?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/109740590547988766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=109740590547988766&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/109740590547988766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/109740590547988766'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/10/neue-bilder-und-andere.html' title='Neue Bilder und andere &amp;Auml;nderungen'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-108309408171167988</id><published>2004-04-27T21:28:00.000+02:00</published><updated>2008-01-30T14:45:31.050+01:00</updated><title type='text'>Das liebe Essen und unser Tim...</title><content type='html'>Diesmal wurde der Tim beim Essen beobachtet. Allerdings war das V&amp;ouml;gelchen wahrscheinlich toller und das Essen nur eine leckere Nebensache. ;-)&lt;br /&gt;&lt;br /&gt;Hier gibts &lt;a href="http://www.michaelruck.de/galleries/Tim/page11.html"&gt;Bilder von der Raupe mit sieben K&amp;ouml;pfen.&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-108309408171167988?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.michaelruck.de/galleries/Tim/page11.html' title='Das liebe Essen und unser Tim...'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/108309408171167988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=108309408171167988&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108309408171167988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108309408171167988'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/04/das-liebe-essen-und-unser-tim.html' title='Das liebe Essen und unser Tim...'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-108230661531432812</id><published>2004-04-18T18:43:00.000+02:00</published><updated>2008-01-30T14:45:31.058+01:00</updated><title type='text'>Visual C++ Developer Center: Microsoft Visual C++ Toolkit 2003</title><content type='html'>Dieser Beitrag hat mal wieder nichts mit dem Tim zu tun ;-). &lt;br /&gt;&lt;br /&gt;Microsoft macht mit seinen kostenlosen Entwicklertools weiter: Nachdem im .NET Framework SDK bereits seit mehr als 2 Jahren die Compiler von Visual Basic .NET und C# kostenlos verf&amp;uuml;gbar sind gibt es nun auch den Microsoft Visual C++ Toolkit kostenlos... Ist das etwa eine neue Strategie um Entwickler von Open Source Plattformen zur&amp;uuml;ckzuholen?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/visualc/vctoolkit2003/"&gt;Visual C++ Developer Center: Microsoft Visual C++ Toolkit 2003&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Und wenn: Dann sind sie auf dem richtigen Weg.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-108230661531432812?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/108230661531432812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=108230661531432812&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108230661531432812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108230661531432812'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/04/visual-c-developer-center-microsoft.html' title='Visual C++ Developer Center: Microsoft Visual C++ Toolkit 2003'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-108197090509758595</id><published>2004-04-14T21:28:00.000+02:00</published><updated>2008-01-30T14:45:31.068+01:00</updated><title type='text'>Tims Lieblingsspielzeug</title><content type='html'>F&amp;uuml;r alle Fans vom Tim gibts heute auch ein Video mit seinem Lieblingsspielzeug - einem kleinen L&amp;ouml;wen (eine Rassel) von Fisherprice.&lt;br /&gt;&lt;br /&gt;&lt;a href="images/tim und der loewe.wmv"&gt;Tim und der L&amp;ouml;we&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Der Ton wurde auf Wunsch des L&amp;ouml;wen entfernt. Dem Tier wurde w&amp;auml;hrend der Dreharbeiten kein Schaden zugef&amp;uuml;gt. Video im &lt;a href="http://www.microsoft.com/windows/windowsmedia/de/"&gt;Microsoft Windows Media Video 9 Format&lt;/a&gt;.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-108197090509758595?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/108197090509758595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=108197090509758595&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108197090509758595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108197090509758595'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/04/tims-lieblingsspielzeug.html' title='Tims Lieblingsspielzeug'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6043482.post-108181495715921085</id><published>2004-04-13T02:09:00.000+02:00</published><updated>2008-01-30T14:45:31.108+01:00</updated><title type='text'>Wieder mal die Fotos...</title><content type='html'>Da ich mal wieder im R&amp;uuml;ckstand bin, habe ich den heutigen (eigentlich schon gestrigen) Tag genutzt neue Fotos hochzuladen. Tim ist im Vergleich zu seinen ersten Tagen schon erstaunlich gro&amp;szlig;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.michaelruck.de/galleries/Tim/page7.html"&gt;Neue Fotos vom Tim&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6043482-108181495715921085?l=www.michaelruck.de' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.michaelruck.de/galleries/Tim/page7.html' title='Wieder mal die Fotos...'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/108181495715921085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6043482&amp;postID=108181495715921085&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108181495715921085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6043482/posts/default/108181495715921085'/><link rel='alternate' type='text/html' href='http://www.michaelruck.de/2004/04/wieder-mal-die-fotos.html' title='Wieder mal die Fotos...'/><author><name>Michael</name><uri>http://www.blogger.com/profile/14104198334525403058</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13170968078824615161'/></author><thr:total>0</thr:total></entry></feed>