*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@1023 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2cb7f0ff85
commit
740151afe1
13 changed files with 464 additions and 153 deletions
49
SWIG/Tools/WAD/Test/wadpm.py
Normal file
49
SWIG/Tools/WAD/Test/wadpm.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# Wad port-mortem debugger
|
||||
#
|
||||
# David Beazley
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
import sys
|
||||
|
||||
_last_exc = None
|
||||
_last_level = 0
|
||||
|
||||
print "WAD port-mortem"
|
||||
|
||||
class where_impl:
|
||||
def __repr__(self):
|
||||
global _last_exc, _last_level
|
||||
if sys.last_value:
|
||||
if sys.last_value[0] != _last_exc:
|
||||
_last_exc = sys.last_value[0]
|
||||
_last_level = 0
|
||||
else:
|
||||
raise RuntimeError,"No pending error."
|
||||
print repr(_last_exc)
|
||||
return ""
|
||||
|
||||
where = where_impl()
|
||||
|
||||
class up_impl:
|
||||
def __repr__(self):
|
||||
global _last_exc, _last_level
|
||||
if not _last_exc:
|
||||
return ""
|
||||
_last_level += 1
|
||||
print repr(_last_exc[_last_level])
|
||||
return ""
|
||||
|
||||
up = up_impl()
|
||||
|
||||
class down_impl:
|
||||
def __repr__(self):
|
||||
global _last_exc, _last_level
|
||||
if not _last_exc:
|
||||
return ""
|
||||
_last_level -= 1
|
||||
print repr(_last_exc[_last_level])
|
||||
return ""
|
||||
|
||||
down = down_impl()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue