autoexp.dat位于C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger 目录下,
控制了Visual Studio中变量的调试时候的显示方式, 其中预定义了STL中许多类型的显示
Python源码中,很多都是PyObject* 类型的变量, 查看起来非常不便,所以自己在autoexp.dat里面加了对PyObject类型的强制转换后的显示
;-----------------Python--- _object|*::_object{ preview ( #( [(PyTupleObject*)(&$c), lx], " ,[Type] ", [$c.ob_type->tp_name,s], " ,[tp_flags] ", [$c.ob_type->tp_flags, lx], #if ($c.ob_type->tp_name[0] == 't' && $c.ob_type->tp_name[1] == 'u') ( #( " ,[Size] ", [((PyTupleObject*)(&$c))->ob_base.ob_size,s] ) ) #else( #if ($c.ob_type->tp_name[0] == 'd' && $c.ob_type->tp_name[1] == 'i') ( #( " ,[ma_fill] ", [((_dictobject*)(&$c))->ma_fill, s], " ,[ma_used] ", [((_dictobject*)(&$c))->ma_used, s] ) ) #else( #if ($c.ob_type->tp_name[0] == 's' && $c.ob_type->tp_name[1] == 't') ( #( ",[buf] ", [((PyUnicodeObject*)(&$c))->str, su] ) ) #else( ) ) ) ) ) children( #if ($c.ob_type->tp_name[0] == 'd' && $c.ob_type->tp_name[1] == 'i') ( #array( expr : ((_dictobject*)(&$c))->ma_table[$i].me_key , size: ((_dictobject*)(&$c))->ma_mask ):$e ) #else( #if ($c.ob_type->tp_name[0] == 't' && $c.ob_type->tp_name[1] == 'u') ( #array( expr: ((PyTupleObject*)(&$c))->ob_item[$i] , size:((PyTupleObject*)(&$c))->ob_base.ob_size ):$e ) #else ( ) ) ) }