How handle pykd exception?
I have code similar to:
m = pykd.module('some_module')
b = pykd.ptrBytes(m.some_symbol)
I can get pykd.MemoryException, so I should rewrite:
try:
m = pykd.module('some_module')
b = pykd.ptrBytes(m.some_symbol)
except pykd.MemoryException:
print 'access violation'
but if there is no 'some_symbol' I will expect to handle exception:
try:
m = pykd.module('some_module')
b = pykd.ptrBytes(m.some_symbol)
except pykd.MemoryException:
print 'access violation'
except pykd.SymbolException:
print 'symbol exception'
or
try:
m = pykd.module('some_module')
b = pykd.ptrBytes(m.symbol)
except pykd.DbgException:
print 'something wrong'
But I've got an standart AttributeError
AttributeError: 'some_module' module has no symbol 'some_symbol'
It is look like normal for python, but it is not obvious for pykd script