Skip to content

Instantly share code, notes, and snippets.

@marpie
marpie / convKDdef.py
Created April 8, 2012 14:50
convKDdef takes a file of KD/WinDBG "Define Type" (dt) command output and tries to convert them to C structs.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" convKDdef
convKDdef takes a file of KD/WinDBG "Define Type" (dt) command output
and tries to convert them to C structs.
It uses a two pass approch to parse and resolv all dependencies. After
reading the file content and parsing it to Type() objects the
Types().parse() function gets calls to invoke the two pass algo: