Browse by Tags

Tagged Content List
  • Blog Post: Batch File with Self-Awareness

    Batch file is a double-edged sword, the good side is that batch file runs on almost all of the Microsoft platforms, while the evil side is people just couldn't get it right. At the highest level, batch file is interpreted by the command processor, which is cmd.exe or command.com. The interpreter is...
  • Blog Post: Pop Quiz - JavaScript for Fun

    Most people could write something in JavaScript, though they barely made it correct. I started using JavaScript while I was in school, and the project I gave myself was to implement a Scheme interpreter that runs in web browsers. As a result, I've realized the tight relationship between JavaScript...
  • Blog Post: Undocumented Environment Variables

    Although we have less Easter Eggs , there are still a huge number of undocumented behaviors . Recently I'm writing a CLR profiler using ICorProfilerCallback for fun, the CLR profiler was modeled as an in-proc COM server, and the activition was done through environment variables: SET COR_ENABLE_PROFILING...
  • Blog Post: Error and Exception Revisited

    Unless suffering is the direct and immediate object of life, our existence must entirely fail of its aim. It is absurd to look upon the enormous amount of pain that abounds everywhere in the world, and originates in needs and necessities inseparable from life itself, as serving no purpose at all and...
  • Blog Post: Visualize Assembly using DGML

    Starting from Visual Studio 2010 Ultimate there is a cool feature called DGML ( Directed Graph Markup Language ). I wrote a small script to convert the disassembled code from WinDBG into a DGML. In order to use it, simply type the following commands under a debug session: .shell -o LoadLibraryA...
  • Blog Post: Process and Job Objects

    Just like we mentioned in The Main Thread Problem , some questions do not have direct answer just because they are invalid by definition. Today, the invalid question would be: How do I kill a process tree in Windows? Unfortunately, the question is invalid, since Windows by design doesn't keep...
  • Blog Post: CRT Startup

    In my previous blog Early Debugging , we've demonstrated how early can you get using a user mode debugger. Normally we don't want to be such early, there are some other places we would want to start with: OEP (Original Entry Point) of the EXE module. WinDBG has a predefined Pseudo-Register called...
  • Blog Post: The Main Thread Problem

    Every few months I heard people asking the same question: Given a process ID (or handle), how can I get its main thread ID (or handle)? Normally that would raise another question: What is the definition of a main thread? While the Windows operating system doesn't have a concept called main...
  • Blog Post: What is Autos Window?

    The developers in Microsoft have done a great job by bringing a great number of nice features, however, some of these features are poorly documented or even not documented at all. Autos Window in the Visual Studio Debugger is one of the best example of the gaps between implementation and documentation...
  • Blog Post: Pop Quiz - Debug Event Loop and Timeslice Quota

    You might have heard of the Popek and Goldberg Virtualization Requirements . In theory, debugger shares a similar set of problems as virtualization, this is especially true for func-eval (Function Evaluation). Here goes a pop quiz about the side effects of the presence of debugger: #define WIN32_LEAN_AND_MEAN...
Page 1 of 1 (10 items)