14 import inspect |
14 import inspect |
15 from inspect import CO_GENERATOR |
15 from inspect import CO_GENERATOR |
16 |
16 |
17 from DebugProtocol import ResponseClearWatch, ResponseClearBreak, \ |
17 from DebugProtocol import ResponseClearWatch, ResponseClearBreak, \ |
18 ResponseLine, ResponseSyntax, ResponseException, CallTrace |
18 ResponseLine, ResponseSyntax, ResponseException, CallTrace |
|
19 from DebugUtilities import getargvalues, formatargvalues |
19 |
20 |
20 gRecursionLimit = 64 |
21 gRecursionLimit = 64 |
21 |
22 |
22 |
23 |
23 def printerr(s): |
24 def printerr(s): |
588 |
589 |
589 if ffunc == '?': |
590 if ffunc == '?': |
590 ffunc = '' |
591 ffunc = '' |
591 |
592 |
592 if ffunc and not ffunc.startswith("<"): |
593 if ffunc and not ffunc.startswith("<"): |
593 argInfo = inspect.getargvalues(fr) |
594 argInfo = getargvalues(fr) |
594 try: |
595 try: |
595 fargs = inspect.formatargvalues( |
596 fargs = formatargvalues( |
596 argInfo.args, argInfo.varargs, |
597 argInfo.args, argInfo.varargs, |
597 argInfo.keywords, argInfo.locals) |
598 argInfo.keywords, argInfo.locals) |
598 except Exception: |
599 except Exception: |
599 fargs = "" |
600 fargs = "" |
600 else: |
601 else: |
650 |
651 |
651 if ffunc == '?': |
652 if ffunc == '?': |
652 ffunc = '' |
653 ffunc = '' |
653 |
654 |
654 if ffunc and not ffunc.startswith("<"): |
655 if ffunc and not ffunc.startswith("<"): |
655 argInfo = inspect.getargvalues(fr) |
656 argInfo = getargvalues(fr) |
656 try: |
657 try: |
657 fargs = inspect.formatargvalues( |
658 fargs = formatargvalues( |
658 argInfo.args, argInfo.varargs, |
659 argInfo.args, argInfo.varargs, |
659 argInfo.keywords, argInfo.locals) |
660 argInfo.keywords, argInfo.locals) |
660 except Exception: |
661 except Exception: |
661 fargs = "" |
662 fargs = "" |
662 else: |
663 else: |
757 |
758 |
758 if ffunc == '?': |
759 if ffunc == '?': |
759 ffunc = '' |
760 ffunc = '' |
760 |
761 |
761 if ffunc and not ffunc.startswith("<"): |
762 if ffunc and not ffunc.startswith("<"): |
762 argInfo = inspect.getargvalues(fr) |
763 argInfo = getargvalues(fr) |
763 try: |
764 try: |
764 fargs = inspect.formatargvalues( |
765 fargs = formatargvalues( |
765 argInfo.args, argInfo.varargs, |
766 argInfo.args, argInfo.varargs, |
766 argInfo.keywords, argInfo.locals) |
767 argInfo.keywords, argInfo.locals) |
767 except Exception: |
768 except Exception: |
768 fargs = "" |
769 fargs = "" |
769 else: |
770 else: |