What is an “Async Pinned Handle”?

Async pinned handles are strongly correlated with overlapped I/O in Windows. Which supports asynchronous reading and writing with ReadFile and WriteFile, using the OVERLAPPED argument. The device driver stores the passed buffer pointer and directly reads/writes from/to the buffer, entirely asynchronously from the program’s operation. The managed wrapper methods are BeginRead and BeginWrite. If the … Read more

How do I debug a WordPress plugin?

There’s this excellent Q&A at WordPress Stack Exchange, lots of knowledgeable folks explaining their debugging techniques: How do you debug plugins? In the Javascript arena you basically need <script>console.log(‘the value is’ + variable);</script>. And use Google Chrome inspector and/or Firebug. In PHP, it depends on where things are happening or where you want the output. … Read more

Can the DebuggerDisplay attribute be applied to types one doesn’t own?

Example of setting DebuggerDisplay for a foreign type (System.Collections.Generic.KeyValuePair<TKey,TValue>) add the following to AssemblyInfo.cs: using System.Collections.Generic; using System.Diagnostics; [assembly: DebuggerDisplay(“[Key={Key}, Value={Value}]”, Target = typeof(KeyValuePair<,>))] (Tested in VS2015) Edit 2020: Was not able to reproduce the above for KeyValuePair<,> in VS2019 but it seems to be related to KeyValuePair<,>. For private member of non owned types … Read more

How do I use PDB files

PDB files map an assembly’s MSIL to the original source lines. This means that if you put the PDB that was compiled with the assembly in the same directory as the assembly, your exception stack traces will have the names and lines of the positions in the original source files. Without the PDB file, you … Read more

How to get a “codesigned” gdb on OSX?

I.1 Codesigning the Debugger The Darwin Kernel requires the debugger to have special permissions before it is allowed to control other processes. These permissions are granted by codesigning the GDB executable. Without these permissions, the debugger will report error messages such as: Starting program: /x/y/foo Unable to find Mach task port for process-id 28885: (os/kern) … Read more

Compare compiled .NET assemblies?

Ways to Compare .NET Assemblies suggests Commercial: NDepend Free: JustAssembly (only shows differences in API) BitDiffer (same) Reflector Diff Add-in (which you’ve already discovered, but not available anymore) Existing compare tools like Beyond Compare (commercial) can do this by special configuration. Here’s how to do this for Beyond Compare: Go to Tools → Options Click … Read more