Permalink
Browse files

added get_arguments function

  • Loading branch information...
1 parent f9cbe0c commit 2f9902c505af15dc90262087b64408e7bcbb9834 @devhawk committed Mar 28, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 ipydbg.py
View
@@ -173,6 +173,15 @@ def get_locals(frame, show_hidden = False, scope=None, offset = None):
if s.StartOffset <= offset and s.EndOffset >= offset:
for ret in get_locals(frame, show_hidden, s, offset): yield ret
+def get_arguments(frame, show_hidden = False):
+ mi = frame.GetMethodInfo()
+ for pi in mi.GetParameters():
+ if pi.Position == 0: continue
+ if not pi.Name.startswith("$") or show_hidden:
+ arg = frame.GetArgument(pi.Position - 1)
+ yield pi.Name, arg
+
+
_type_map = {
'System.Boolean': ELEMENT_TYPE_BOOLEAN,
'System.SByte' : ELEMENT_TYPE_I1,

0 comments on commit 2f9902c

Please sign in to comment.