debugging library load issues on windows

gflags is quite a versatile tool for debugging all low level things. I have been using it in particular to debug heap and library load issues.

one can launch the gui, however i have preferred cmd line usage more often.

to enable library load debugging:

gflags -i <your-app.exe> +sls

[Read More]


Last time I coded peinfo, to get information from a PE file. It listed the guid for pdb file generated alongwith. This is helpful as it is, but at times you have pdb file and want to query it’s guid.

I did not find anything handy for it, thus ended up coding one myself. Here the Debug Interface Access SDK is of great help.

The idea is pretty simple and straight foward:

  1. Load PDB as DataSource, IDiaDataSource::LoadDataFromPdb (Line#72)
  2. Open Session, IDiaDataSource::openSession (Line#76)
  3. Get GlobalScope, IDiaSession::get_global_scope (Line#80)
  4. Get GUID, IDiaSymbol::get_guid (Line#84)

[Read More]

adding cmd in visual studio

One of the handy commands with VS IDE is to launch cmd, it was provided by default earlier but lately i have been missing it with VS 2015 & onwards.

While poking around i found that you could launch cmd as external tool:

[Read More]