debugpy 1.8.5__zip → 1.8.7__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. {debugpy-1.8.5/src/debugpy.egg-info → debugpy-1.8.7}/PKG-INFO +1 -1
  2. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py +19 -21
  3. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py +30 -30
  4. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py +3 -1
  5. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +43 -0
  6. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py +35 -32
  7. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py +83 -84
  8. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py +92 -99
  9. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py +2 -3
  10. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py +51 -27
  11. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py +11 -7
  12. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py +6 -5
  13. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py +34 -38
  14. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +71 -69
  15. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py +1 -3
  16. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py +0 -1
  17. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py +14 -16
  18. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py +81 -93
  19. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py +3 -3
  20. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py +9 -8
  21. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py +33 -25
  22. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py +183 -170
  23. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py +33 -29
  24. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py +6 -4
  25. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py +19 -18
  26. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py +3 -3
  27. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py +165 -138
  28. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +77 -0
  29. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py +35 -36
  30. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py +22 -23
  31. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py +37 -57
  32. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py +54 -52
  33. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py +28 -37
  34. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py +56 -53
  35. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +604 -0
  36. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +551 -445
  37. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py +25 -29
  38. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +17458 -0
  39. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py +11 -12
  40. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py +18 -19
  41. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +41 -0
  42. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +328 -0
  43. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +263 -214
  44. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py +7 -10
  45. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py +187 -92
  46. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py +105 -0
  47. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py +46 -51
  48. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +239 -176
  49. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +370 -297
  50. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +78 -86
  51. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py +55 -59
  52. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py +194 -58
  53. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py +2 -3
  54. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py +18 -23
  55. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py +159 -127
  56. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +10 -12
  57. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +55527 -0
  58. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd +15 -0
  59. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +803 -511
  60. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py +18 -7
  61. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py +32 -24
  62. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py +11 -13
  63. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py +16 -16
  64. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +27 -2
  65. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py +1 -1
  66. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py +4 -5
  67. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py +8 -10
  68. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +50 -45
  69. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py +462 -407
  70. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py +69 -61
  71. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py +14 -16
  72. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +27 -25
  73. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py +40 -42
  74. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +200 -0
  75. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +20 -19
  76. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +199 -108
  77. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +121 -73
  78. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +208 -0
  79. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +206 -159
  80. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +346 -334
  81. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py +75 -80
  82. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py +35 -35
  83. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py +116 -124
  84. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py +44 -58
  85. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py +51 -55
  86. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py +4 -2
  87. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py +24 -24
  88. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py +19 -20
  89. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py +45 -49
  90. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +61 -58
  91. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py +23 -13
  92. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py +29 -31
  93. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py +41 -11
  94. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py +117 -55
  95. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py +11 -14
  96. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +90 -89
  97. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py +106 -97
  98. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +40 -0
  99. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py +56 -46
  100. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py +5 -5
  101. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +71 -0
  102. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +11165 -5326
  103. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +5 -6
  104. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py +53 -56
  105. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py +1 -0
  106. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py +4 -6
  107. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py +6 -26
  108. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py +7 -21
  109. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py +5 -24
  110. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py +10 -34
  111. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +1 -4
  112. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +2 -6
  113. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +3 -5
  114. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +11 -31
  115. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +2 -2
  116. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +14 -41
  117. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +2 -4
  118. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +7 -18
  119. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +6 -18
  120. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +7 -18
  121. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py +1 -3
  122. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py +14 -19
  123. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py +1929 -0
  124. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c +43253 -0
  125. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd +46 -0
  126. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx +1935 -0
  127. debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py +16 -0
  128. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py +12 -11
  129. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_coverage.py +30 -32
  130. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhook.py +58 -54
  131. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py +20 -24
  132. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py +8 -7
  133. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py +8 -6
  134. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py +11 -8
  135. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py +21 -18
  136. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py +17 -15
  137. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py +17 -15
  138. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py +6 -4
  139. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py +14 -10
  140. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py +30 -26
  141. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +24 -0
  142. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py +37 -34
  143. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py +86 -73
  144. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/version.py +7 -7
  145. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_pysrc.py +1 -0
  146. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_run_in_console.py +23 -24
  147. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +267 -0
  148. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevconsole.py +55 -47
  149. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd.py +732 -508
  150. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +40 -0
  151. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py +1 -0
  152. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +11 -0
  153. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +75 -0
  154. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +130 -125
  155. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
  156. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
  157. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +89 -0
  158. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py +41 -32
  159. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
  160. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
  161. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp +1 -0
  162. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp +9 -1
  163. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
  164. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
  165. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe +0 -0
  166. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
  167. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py +10 -9
  168. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
  169. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
  170. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
  171. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
  172. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py +103 -119
  173. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py +457 -516
  174. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py +33 -15
  175. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py +336 -281
  176. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py +101 -131
  177. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py +148 -153
  178. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py +310 -302
  179. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py +235 -208
  180. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py +185 -218
  181. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py +428 -564
  182. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py +54 -53
  183. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py +69 -73
  184. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py +158 -170
  185. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py +143 -213
  186. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py +302 -333
  187. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py +220 -239
  188. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py +198 -177
  189. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py +11 -11
  190. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py +1191 -713
  191. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py +248 -194
  192. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py +132 -120
  193. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py +450 -346
  194. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py +305 -286
  195. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +526 -0
  196. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py +1479 -1097
  197. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +579 -0
  198. debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +3517 -0
  199. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py +54 -31
  200. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py +170 -149
  201. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py +190 -108
  202. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py +542 -437
  203. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py +489 -442
  204. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py +83 -65
  205. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py +70 -76
  206. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp +17 -9
  207. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat +1 -1
  208. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_file_utils.py +141 -120
  209. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py +1 -0
  210. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py +175 -149
  211. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py +1 -0
  212. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py +1 -0
  213. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py +5 -5
  214. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py +28 -28
  215. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py +22 -30
  216. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py +3 -2
  217. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py +130 -108
  218. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py +27 -14
  219. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_tracing.py +85 -66
  220. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/setup_pydevd_cython.py +96 -59
  221. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_version.py +3 -3
  222. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/messaging.py +2 -1
  223. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/cli.py +32 -17
  224. {debugpy-1.8.5 → debugpy-1.8.7/src/debugpy.egg-info}/PKG-INFO +1 -1
  225. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/SOURCES.txt +6 -1
  226. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +0 -41
  227. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +0 -76
  228. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +0 -592
  229. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +0 -19514
  230. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +0 -19
  231. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +0 -153
  232. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +0 -43377
  233. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +0 -204
  234. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +0 -91
  235. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py +0 -62
  236. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +0 -41
  237. debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +0 -48
  238. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +0 -23
  239. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_pysrc.py +0 -1
  240. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +0 -237
  241. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +0 -32
  242. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +0 -9
  243. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +0 -74
  244. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
  245. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
  246. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +0 -79
  247. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
  248. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
  249. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
  250. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
  251. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
  252. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
  253. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
  254. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
  255. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
  256. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +0 -507
  257. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +0 -539
  258. debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +0 -3435
  259. {debugpy-1.8.5 → debugpy-1.8.7}/DESCRIPTION.md +0 -0
  260. {debugpy-1.8.5 → debugpy-1.8.7}/LICENSE +0 -0
  261. {debugpy-1.8.5 → debugpy-1.8.7}/MANIFEST.in +0 -0
  262. {debugpy-1.8.5 → debugpy-1.8.7}/README.md +0 -0
  263. {debugpy-1.8.5 → debugpy-1.8.7}/pyproject.toml +0 -0
  264. {debugpy-1.8.5 → debugpy-1.8.7}/setup.cfg +0 -0
  265. {debugpy-1.8.5 → debugpy-1.8.7}/setup.py +0 -0
  266. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/ThirdPartyNotices.txt +0 -0
  267. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__init__.py +0 -0
  268. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__main__.py +0 -0
  269. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/__init__.py +0 -0
  270. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_pydevd_packaging.py +0 -0
  271. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_util.py +0 -0
  272. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/force_pydevd.py +0 -0
  273. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py +0 -0
  274. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py +0 -0
  275. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py +0 -0
  276. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py +0 -0
  277. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json +0 -0
  278. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py +0 -0
  279. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore +0 -0
  280. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py +0 -0
  281. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd +0 -0
  282. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pyx +0 -0
  283. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx +0 -0
  284. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h +0 -0
  285. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt +0 -0
  286. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py +0 -0
  287. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/README +0 -0
  288. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/__init__.py +0 -0
  289. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt +0 -0
  290. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt +0 -0
  291. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp +0 -0
  292. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp +0 -0
  293. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp +0 -0
  294. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp +0 -0
  295. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp +0 -0
  296. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h +0 -0
  297. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp +0 -0
  298. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore +0 -0
  299. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp +0 -0
  300. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh +0 -0
  301. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh +0 -0
  302. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd +0 -0
  303. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h +0 -0
  304. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp +0 -0
  305. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp +0 -0
  306. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp +0 -0
  307. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp +0 -0
  308. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp +0 -0
  309. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h +0 -0
  310. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h +0 -0
  311. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md +0 -0
  312. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__init__.py +0 -0
  313. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__main__.py +0 -0
  314. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/clients.py +0 -0
  315. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/components.py +0 -0
  316. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/launchers.py +0 -0
  317. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/servers.py +0 -0
  318. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/sessions.py +0 -0
  319. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/__init__.py +0 -0
  320. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/json.py +0 -0
  321. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/log.py +0 -0
  322. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/singleton.py +0 -0
  323. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/sockets.py +0 -0
  324. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/stacks.py +0 -0
  325. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/timestamp.py +0 -0
  326. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/util.py +0 -0
  327. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__init__.py +0 -0
  328. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__main__.py +0 -0
  329. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/debuggee.py +0 -0
  330. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/handlers.py +0 -0
  331. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/output.py +0 -0
  332. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/winapi.py +0 -0
  333. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/public_api.py +0 -0
  334. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/__init__.py +0 -0
  335. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/api.py +0 -0
  336. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/attach_pid_injected.py +0 -0
  337. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/dependency_links.txt +0 -0
  338. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/entry_points.txt +0 -0
  339. {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/top_level.txt +0 -0
  340. {debugpy-1.8.5 → debugpy-1.8.7}/versioneer.py +0 -0
@@ -44,16 +44,16 @@ Functions for text input, logging or text output.
44
44
 
45
45
  __revision__ = "$Id$"
46
46
 
47
- __all__ = [
48
- 'HexDump',
49
- 'HexInput',
50
- 'HexOutput',
51
- 'Color',
52
- 'Table',
53
- 'CrashDump',
54
- 'DebugLog',
55
- 'Logger',
56
- ]
47
+ __all__ = [
48
+ "HexDump",
49
+ "HexInput",
50
+ "HexOutput",
51
+ "Color",
52
+ "Table",
53
+ "CrashDump",
54
+ "DebugLog",
55
+ "Logger",
56
+ ]
57
57
 
58
58
  import sys
59
59
  from winappdbg import win32
@@ -65,9 +65,10 @@ import time
65
65
  import struct
66
66
  import traceback
67
67
 
68
- #------------------------------------------------------------------------------
68
+ # ------------------------------------------------------------------------------
69
69
 
70
- class HexInput (StaticClass):
70
+
71
+ class HexInput(StaticClass):
71
72
  """
72
73
  Static functions for user input parsing.
73
74
  The counterparts for each method are in the L{HexOutput} class.
@@ -86,20 +87,20 @@ class HexInput (StaticClass):
86
87
  """
87
88
  token = token.strip()
88
89
  neg = False
89
- if token.startswith(compat.b('-')):
90
+ if token.startswith(compat.b("-")):
90
91
  token = token[1:]
91
92
  neg = True
92
- if token.startswith(compat.b('0x')):
93
- result = int(token, 16) # hexadecimal
94
- elif token.startswith(compat.b('0b')):
93
+ if token.startswith(compat.b("0x")):
94
+ result = int(token, 16) # hexadecimal
95
+ elif token.startswith(compat.b("0b")):
95
96
  result = int(token[2:], 2) # binary
96
- elif token.startswith(compat.b('0o')):
97
- result = int(token, 8) # octal
97
+ elif token.startswith(compat.b("0o")):
98
+ result = int(token, 8) # octal
98
99
  else:
99
100
  try:
100
- result = int(token) # decimal
101
+ result = int(token) # decimal
101
102
  except ValueError:
102
- result = int(token, 16) # hexadecimal (no "0x" prefix)
103
+ result = int(token, 16) # hexadecimal (no "0x" prefix)
103
104
  if neg:
104
105
  result = -result
105
106
  return result
@@ -128,14 +129,14 @@ class HexInput (StaticClass):
128
129
  @rtype: str
129
130
  @return: Parsed string value.
130
131
  """
131
- token = ''.join([ c for c in token if c.isalnum() ])
132
+ token = "".join([c for c in token if c.isalnum()])
132
133
  if len(token) % 2 != 0:
133
134
  raise ValueError("Missing characters in hex data")
134
- data = ''
135
+ data = ""
135
136
  for i in compat.xrange(0, len(token), 2):
136
- x = token[i:i+2]
137
+ x = token[i : i + 2]
137
138
  d = int(x, 16)
138
- s = struct.pack('<B', d)
139
+ s = struct.pack("<B", d)
139
140
  data += s
140
141
  return data
141
142
 
@@ -158,24 +159,24 @@ class HexInput (StaticClass):
158
159
  @rtype: str
159
160
  @return: Parsed string value.
160
161
  """
161
- token = ''.join([ c for c in token if c == '?' or c.isalnum() ])
162
+ token = "".join([c for c in token if c == "?" or c.isalnum()])
162
163
  if len(token) % 2 != 0:
163
164
  raise ValueError("Missing characters in hex data")
164
- regexp = ''
165
+ regexp = ""
165
166
  for i in compat.xrange(0, len(token), 2):
166
- x = token[i:i+2]
167
- if x == '??':
168
- regexp += '.'
169
- elif x[0] == '?':
170
- f = '\\x%%.1x%s' % x[1]
171
- x = ''.join([ f % c for c in compat.xrange(0, 0x10) ])
172
- regexp = '%s[%s]' % (regexp, x)
173
- elif x[1] == '?':
174
- f = '\\x%s%%.1x' % x[0]
175
- x = ''.join([ f % c for c in compat.xrange(0, 0x10) ])
176
- regexp = '%s[%s]' % (regexp, x)
167
+ x = token[i : i + 2]
168
+ if x == "??":
169
+ regexp += "."
170
+ elif x[0] == "?":
171
+ f = "\\x%%.1x%s" % x[1]
172
+ x = "".join([f % c for c in compat.xrange(0, 0x10)])
173
+ regexp = "%s[%s]" % (regexp, x)
174
+ elif x[1] == "?":
175
+ f = "\\x%s%%.1x" % x[0]
176
+ x = "".join([f % c for c in compat.xrange(0, 0x10)])
177
+ regexp = "%s[%s]" % (regexp, x)
177
178
  else:
178
- regexp = '%s\\x%s' % (regexp, x)
179
+ regexp = "%s\\x%s" % (regexp, x)
179
180
  return regexp
180
181
 
181
182
  @staticmethod
@@ -215,13 +216,13 @@ class HexInput (StaticClass):
215
216
  @rtype: list( int )
216
217
  @return: List of integers read from the file.
217
218
  """
218
- count = 0
219
+ count = 0
219
220
  result = list()
220
- fd = open(filename, 'r')
221
+ fd = open(filename, "r")
221
222
  for line in fd:
222
223
  count = count + 1
223
- if '#' in line:
224
- line = line[ : line.find('#') ]
224
+ if "#" in line:
225
+ line = line[: line.find("#")]
225
226
  line = line.strip()
226
227
  if line:
227
228
  try:
@@ -252,13 +253,13 @@ class HexInput (StaticClass):
252
253
  @rtype: list
253
254
  @return: List of integers and strings read from the file.
254
255
  """
255
- count = 0
256
+ count = 0
256
257
  result = list()
257
- fd = open(filename, 'r')
258
+ fd = open(filename, "r")
258
259
  for line in fd:
259
260
  count = count + 1
260
- if '#' in line:
261
- line = line[ : line.find('#') ]
261
+ if "#" in line:
262
+ line = line[: line.find("#")]
262
263
  line = line.strip()
263
264
  if line:
264
265
  result.append(line)
@@ -287,13 +288,13 @@ class HexInput (StaticClass):
287
288
  @rtype: list
288
289
  @return: List of integers and strings read from the file.
289
290
  """
290
- count = 0
291
+ count = 0
291
292
  result = list()
292
- fd = open(filename, 'r')
293
+ fd = open(filename, "r")
293
294
  for line in fd:
294
295
  count = count + 1
295
- if '#' in line:
296
- line = line[ : line.find('#') ]
296
+ if "#" in line:
297
+ line = line[: line.find("#")]
297
298
  line = line.strip()
298
299
  if line:
299
300
  try:
@@ -303,9 +304,11 @@ class HexInput (StaticClass):
303
304
  result.append(value)
304
305
  return result
305
306
 
306
- #------------------------------------------------------------------------------
307
307
 
308
- class HexOutput (StaticClass):
308
+ # ------------------------------------------------------------------------------
309
+
310
+
311
+ class HexOutput(StaticClass):
309
312
  """
310
313
  Static functions for user output parsing.
311
314
  The counterparts for each method are in the L{HexInput} class.
@@ -319,11 +322,11 @@ class HexOutput (StaticClass):
319
322
  This value is platform dependent.
320
323
  """
321
324
 
322
- integer_size = (win32.SIZEOF(win32.DWORD) * 2) + 2
325
+ integer_size = (win32.SIZEOF(win32.DWORD) * 2) + 2
323
326
  address_size = (win32.SIZEOF(win32.SIZE_T) * 2) + 2
324
327
 
325
328
  @classmethod
326
- def integer(cls, integer, bits = None):
329
+ def integer(cls, integer, bits=None):
327
330
  """
328
331
  @type integer: int
329
332
  @param integer: Integer.
@@ -341,11 +344,11 @@ class HexOutput (StaticClass):
341
344
  else:
342
345
  integer_size = (bits / 4) + 2
343
346
  if integer >= 0:
344
- return ('0x%%.%dx' % (integer_size - 2)) % integer
345
- return ('-0x%%.%dx' % (integer_size - 2)) % -integer
347
+ return ("0x%%.%dx" % (integer_size - 2)) % integer
348
+ return ("-0x%%.%dx" % (integer_size - 2)) % -integer
346
349
 
347
350
  @classmethod
348
- def address(cls, address, bits = None):
351
+ def address(cls, address, bits=None):
349
352
  """
350
353
  @type address: int
351
354
  @param address: Memory address.
@@ -364,8 +367,8 @@ class HexOutput (StaticClass):
364
367
  else:
365
368
  address_size = (bits / 4) + 2
366
369
  if address < 0:
367
- address = ((2 ** bits) - 1) ^ ~address
368
- return ('0x%%.%dx' % (address_size - 2)) % address
370
+ address = ((2**bits) - 1) ^ ~address
371
+ return ("0x%%.%dx" % (address_size - 2)) % address
369
372
 
370
373
  @staticmethod
371
374
  def hexadecimal(data):
@@ -378,10 +381,10 @@ class HexOutput (StaticClass):
378
381
  @rtype: str
379
382
  @return: Hexadecimal representation.
380
383
  """
381
- return HexDump.hexadecimal(data, separator = '')
384
+ return HexDump.hexadecimal(data, separator="")
382
385
 
383
386
  @classmethod
384
- def integer_list_file(cls, filename, values, bits = None):
387
+ def integer_list_file(cls, filename, values, bits=None):
385
388
  """
386
389
  Write a list of integers to a file.
387
390
  If a file of the same name exists, it's contents are replaced.
@@ -399,7 +402,7 @@ class HexOutput (StaticClass):
399
402
  (Optional) Number of bits of the target architecture.
400
403
  The default is platform dependent. See: L{HexOutput.integer_size}
401
404
  """
402
- fd = open(filename, 'w')
405
+ fd = open(filename, "w")
403
406
  for integer in values:
404
407
  print >> fd, cls.integer(integer, bits)
405
408
  fd.close()
@@ -418,7 +421,7 @@ class HexOutput (StaticClass):
418
421
  @type values: list( int )
419
422
  @param values: List of strings to write to the file.
420
423
  """
421
- fd = open(filename, 'w')
424
+ fd = open(filename, "w")
422
425
  for string in values:
423
426
  print >> fd, string
424
427
  fd.close()
@@ -442,7 +445,7 @@ class HexOutput (StaticClass):
442
445
  (Optional) Number of bits of the target architecture.
443
446
  The default is platform dependent. See: L{HexOutput.integer_size}
444
447
  """
445
- fd = open(filename, 'w')
448
+ fd = open(filename, "w")
446
449
  for original in values:
447
450
  try:
448
451
  parsed = cls.integer(original, bits)
@@ -451,9 +454,11 @@ class HexOutput (StaticClass):
451
454
  print >> fd, parsed
452
455
  fd.close()
453
456
 
454
- #------------------------------------------------------------------------------
455
457
 
456
- class HexDump (StaticClass):
458
+ # ------------------------------------------------------------------------------
459
+
460
+
461
+ class HexDump(StaticClass):
457
462
  """
458
463
  Static functions for hexadecimal dumps.
459
464
 
@@ -466,11 +471,11 @@ class HexDump (StaticClass):
466
471
  This value is platform dependent.
467
472
  """
468
473
 
469
- integer_size = (win32.SIZEOF(win32.DWORD) * 2)
470
- address_size = (win32.SIZEOF(win32.SIZE_T) * 2)
474
+ integer_size = win32.SIZEOF(win32.DWORD) * 2
475
+ address_size = win32.SIZEOF(win32.SIZE_T) * 2
471
476
 
472
477
  @classmethod
473
- def integer(cls, integer, bits = None):
478
+ def integer(cls, integer, bits=None):
474
479
  """
475
480
  @type integer: int
476
481
  @param integer: Integer.
@@ -487,10 +492,10 @@ class HexDump (StaticClass):
487
492
  integer_size = cls.integer_size
488
493
  else:
489
494
  integer_size = bits / 4
490
- return ('%%.%dX' % integer_size) % integer
495
+ return ("%%.%dX" % integer_size) % integer
491
496
 
492
497
  @classmethod
493
- def address(cls, address, bits = None):
498
+ def address(cls, address, bits=None):
494
499
  """
495
500
  @type address: int
496
501
  @param address: Memory address.
@@ -509,8 +514,8 @@ class HexDump (StaticClass):
509
514
  else:
510
515
  address_size = bits / 4
511
516
  if address < 0:
512
- address = ((2 ** bits) - 1) ^ ~address
513
- return ('%%.%dX' % address_size) % address
517
+ address = ((2**bits) - 1) ^ ~address
518
+ return ("%%.%dX" % address_size) % address
514
519
 
515
520
  @staticmethod
516
521
  def printable(data):
@@ -523,16 +528,16 @@ class HexDump (StaticClass):
523
528
  @rtype: str
524
529
  @return: Printable text.
525
530
  """
526
- result = ''
531
+ result = ""
527
532
  for c in data:
528
533
  if 32 < ord(c) < 128:
529
534
  result += c
530
535
  else:
531
- result += '.'
536
+ result += "."
532
537
  return result
533
538
 
534
539
  @staticmethod
535
- def hexadecimal(data, separator = ''):
540
+ def hexadecimal(data, separator=""):
536
541
  """
537
542
  Convert binary data to a string of hexadecimal numbers.
538
543
 
@@ -546,10 +551,10 @@ class HexDump (StaticClass):
546
551
  @rtype: str
547
552
  @return: Hexadecimal representation.
548
553
  """
549
- return separator.join( [ '%.2x' % ord(c) for c in data ] )
554
+ return separator.join(["%.2x" % ord(c) for c in data])
550
555
 
551
556
  @staticmethod
552
- def hexa_word(data, separator = ' '):
557
+ def hexa_word(data, separator=" "):
553
558
  """
554
559
  Convert binary data to a string of hexadecimal WORDs.
555
560
 
@@ -564,12 +569,11 @@ class HexDump (StaticClass):
564
569
  @return: Hexadecimal representation.
565
570
  """
566
571
  if len(data) & 1 != 0:
567
- data += '\0'
568
- return separator.join( [ '%.4x' % struct.unpack('<H', data[i:i+2])[0] \
569
- for i in compat.xrange(0, len(data), 2) ] )
572
+ data += "\0"
573
+ return separator.join(["%.4x" % struct.unpack("<H", data[i : i + 2])[0] for i in compat.xrange(0, len(data), 2)])
570
574
 
571
575
  @staticmethod
572
- def hexa_dword(data, separator = ' '):
576
+ def hexa_dword(data, separator=" "):
573
577
  """
574
578
  Convert binary data to a string of hexadecimal DWORDs.
575
579
 
@@ -584,12 +588,11 @@ class HexDump (StaticClass):
584
588
  @return: Hexadecimal representation.
585
589
  """
586
590
  if len(data) & 3 != 0:
587
- data += '\0' * (4 - (len(data) & 3))
588
- return separator.join( [ '%.8x' % struct.unpack('<L', data[i:i+4])[0] \
589
- for i in compat.xrange(0, len(data), 4) ] )
591
+ data += "\0" * (4 - (len(data) & 3))
592
+ return separator.join(["%.8x" % struct.unpack("<L", data[i : i + 4])[0] for i in compat.xrange(0, len(data), 4)])
590
593
 
591
594
  @staticmethod
592
- def hexa_qword(data, separator = ' '):
595
+ def hexa_qword(data, separator=" "):
593
596
  """
594
597
  Convert binary data to a string of hexadecimal QWORDs.
595
598
 
@@ -604,12 +607,11 @@ class HexDump (StaticClass):
604
607
  @return: Hexadecimal representation.
605
608
  """
606
609
  if len(data) & 7 != 0:
607
- data += '\0' * (8 - (len(data) & 7))
608
- return separator.join( [ '%.16x' % struct.unpack('<Q', data[i:i+8])[0]\
609
- for i in compat.xrange(0, len(data), 8) ] )
610
+ data += "\0" * (8 - (len(data) & 7))
611
+ return separator.join(["%.16x" % struct.unpack("<Q", data[i : i + 8])[0] for i in compat.xrange(0, len(data), 8)])
610
612
 
611
613
  @classmethod
612
- def hexline(cls, data, separator = ' ', width = None):
614
+ def hexline(cls, data, separator=" ", width=None):
613
615
  """
614
616
  Dump a line of hexadecimal numbers from binary data.
615
617
 
@@ -629,16 +631,13 @@ class HexDump (StaticClass):
629
631
  @return: Multiline output text.
630
632
  """
631
633
  if width is None:
632
- fmt = '%s %s'
634
+ fmt = "%s %s"
633
635
  else:
634
- fmt = '%%-%ds %%-%ds' % ((len(separator)+2)*width-1, width)
636
+ fmt = "%%-%ds %%-%ds" % ((len(separator) + 2) * width - 1, width)
635
637
  return fmt % (cls.hexadecimal(data, separator), cls.printable(data))
636
638
 
637
639
  @classmethod
638
- def hexblock(cls, data, address = None,
639
- bits = None,
640
- separator = ' ',
641
- width = 8):
640
+ def hexblock(cls, data, address=None, bits=None, separator=" ", width=8):
642
641
  """
643
642
  Dump a block of hexadecimal numbers from binary data.
644
643
  Also show a printable text version of the data.
@@ -665,15 +664,10 @@ class HexDump (StaticClass):
665
664
  @rtype: str
666
665
  @return: Multiline output text.
667
666
  """
668
- return cls.hexblock_cb(cls.hexline, data, address, bits, width,
669
- cb_kwargs = {'width' : width, 'separator' : separator})
667
+ return cls.hexblock_cb(cls.hexline, data, address, bits, width, cb_kwargs={"width": width, "separator": separator})
670
668
 
671
669
  @classmethod
672
- def hexblock_cb(cls, callback, data, address = None,
673
- bits = None,
674
- width = 16,
675
- cb_args = (),
676
- cb_kwargs = {}):
670
+ def hexblock_cb(cls, callback, data, address=None, bits=None, width=16, cb_args=(), cb_kwargs={}):
677
671
  """
678
672
  Dump a block of binary data using a callback function to convert each
679
673
  line of text.
@@ -708,26 +702,18 @@ class HexDump (StaticClass):
708
702
  @rtype: str
709
703
  @return: Multiline output text.
710
704
  """
711
- result = ''
705
+ result = ""
712
706
  if address is None:
713
707
  for i in compat.xrange(0, len(data), width):
714
- result = '%s%s\n' % ( result, \
715
- callback(data[i:i+width], *cb_args, **cb_kwargs) )
708
+ result = "%s%s\n" % (result, callback(data[i : i + width], *cb_args, **cb_kwargs))
716
709
  else:
717
710
  for i in compat.xrange(0, len(data), width):
718
- result = '%s%s: %s\n' % (
719
- result,
720
- cls.address(address, bits),
721
- callback(data[i:i+width], *cb_args, **cb_kwargs)
722
- )
711
+ result = "%s%s: %s\n" % (result, cls.address(address, bits), callback(data[i : i + width], *cb_args, **cb_kwargs))
723
712
  address += width
724
713
  return result
725
714
 
726
715
  @classmethod
727
- def hexblock_byte(cls, data, address = None,
728
- bits = None,
729
- separator = ' ',
730
- width = 16):
716
+ def hexblock_byte(cls, data, address=None, bits=None, separator=" ", width=16):
731
717
  """
732
718
  Dump a block of hexadecimal BYTEs from binary data.
733
719
 
@@ -753,15 +739,10 @@ class HexDump (StaticClass):
753
739
  @rtype: str
754
740
  @return: Multiline output text.
755
741
  """
756
- return cls.hexblock_cb(cls.hexadecimal, data,
757
- address, bits, width,
758
- cb_kwargs = {'separator': separator})
742
+ return cls.hexblock_cb(cls.hexadecimal, data, address, bits, width, cb_kwargs={"separator": separator})
759
743
 
760
744
  @classmethod
761
- def hexblock_word(cls, data, address = None,
762
- bits = None,
763
- separator = ' ',
764
- width = 8):
745
+ def hexblock_word(cls, data, address=None, bits=None, separator=" ", width=8):
765
746
  """
766
747
  Dump a block of hexadecimal WORDs from binary data.
767
748
 
@@ -787,15 +768,10 @@ class HexDump (StaticClass):
787
768
  @rtype: str
788
769
  @return: Multiline output text.
789
770
  """
790
- return cls.hexblock_cb(cls.hexa_word, data,
791
- address, bits, width * 2,
792
- cb_kwargs = {'separator': separator})
771
+ return cls.hexblock_cb(cls.hexa_word, data, address, bits, width * 2, cb_kwargs={"separator": separator})
793
772
 
794
773
  @classmethod
795
- def hexblock_dword(cls, data, address = None,
796
- bits = None,
797
- separator = ' ',
798
- width = 4):
774
+ def hexblock_dword(cls, data, address=None, bits=None, separator=" ", width=4):
799
775
  """
800
776
  Dump a block of hexadecimal DWORDs from binary data.
801
777
 
@@ -821,15 +797,10 @@ class HexDump (StaticClass):
821
797
  @rtype: str
822
798
  @return: Multiline output text.
823
799
  """
824
- return cls.hexblock_cb(cls.hexa_dword, data,
825
- address, bits, width * 4,
826
- cb_kwargs = {'separator': separator})
800
+ return cls.hexblock_cb(cls.hexa_dword, data, address, bits, width * 4, cb_kwargs={"separator": separator})
827
801
 
828
802
  @classmethod
829
- def hexblock_qword(cls, data, address = None,
830
- bits = None,
831
- separator = ' ',
832
- width = 2):
803
+ def hexblock_qword(cls, data, address=None, bits=None, separator=" ", width=2):
833
804
  """
834
805
  Dump a block of hexadecimal QWORDs from binary data.
835
806
 
@@ -855,15 +826,15 @@ class HexDump (StaticClass):
855
826
  @rtype: str
856
827
  @return: Multiline output text.
857
828
  """
858
- return cls.hexblock_cb(cls.hexa_qword, data,
859
- address, bits, width * 8,
860
- cb_kwargs = {'separator': separator})
829
+ return cls.hexblock_cb(cls.hexa_qword, data, address, bits, width * 8, cb_kwargs={"separator": separator})
861
830
 
862
- #------------------------------------------------------------------------------
831
+
832
+ # ------------------------------------------------------------------------------
863
833
 
864
834
  # TODO: implement an ANSI parser to simplify using colors
865
835
 
866
- class Color (object):
836
+
837
+ class Color(object):
867
838
  """
868
839
  Colored console output.
869
840
  """
@@ -874,9 +845,9 @@ class Color (object):
874
845
 
875
846
  @staticmethod
876
847
  def _set_text_attributes(wAttributes):
877
- win32.SetConsoleTextAttribute(wAttributes = wAttributes)
848
+ win32.SetConsoleTextAttribute(wAttributes=wAttributes)
878
849
 
879
- #--------------------------------------------------------------------------
850
+ # --------------------------------------------------------------------------
880
851
 
881
852
  @classmethod
882
853
  def can_use_colors(cls):
@@ -903,10 +874,10 @@ class Color (object):
903
874
  "Reset the colors to the default values."
904
875
  cls._set_text_attributes(win32.FOREGROUND_GREY)
905
876
 
906
- #--------------------------------------------------------------------------
877
+ # --------------------------------------------------------------------------
907
878
 
908
- #@classmethod
909
- #def underscore(cls, on = True):
879
+ # @classmethod
880
+ # def underscore(cls, on = True):
910
881
  # wAttributes = cls._get_text_attributes()
911
882
  # if on:
912
883
  # wAttributes |= win32.COMMON_LVB_UNDERSCORE
@@ -914,14 +885,14 @@ class Color (object):
914
885
  # wAttributes &= ~win32.COMMON_LVB_UNDERSCORE
915
886
  # cls._set_text_attributes(wAttributes)
916
887
 
917
- #--------------------------------------------------------------------------
888
+ # --------------------------------------------------------------------------
918
889
 
919
890
  @classmethod
920
891
  def default(cls):
921
892
  "Make the current foreground color the default."
922
893
  wAttributes = cls._get_text_attributes()
923
894
  wAttributes &= ~win32.FOREGROUND_MASK
924
- wAttributes |= win32.FOREGROUND_GREY
895
+ wAttributes |= win32.FOREGROUND_GREY
925
896
  wAttributes &= ~win32.FOREGROUND_INTENSITY
926
897
  cls._set_text_attributes(wAttributes)
927
898
 
@@ -944,7 +915,7 @@ class Color (object):
944
915
  "Make the text foreground color black."
945
916
  wAttributes = cls._get_text_attributes()
946
917
  wAttributes &= ~win32.FOREGROUND_MASK
947
- #wAttributes |= win32.FOREGROUND_BLACK
918
+ # wAttributes |= win32.FOREGROUND_BLACK
948
919
  cls._set_text_attributes(wAttributes)
949
920
 
950
921
  @classmethod
@@ -952,7 +923,7 @@ class Color (object):
952
923
  "Make the text foreground color white."
953
924
  wAttributes = cls._get_text_attributes()
954
925
  wAttributes &= ~win32.FOREGROUND_MASK
955
- wAttributes |= win32.FOREGROUND_GREY
926
+ wAttributes |= win32.FOREGROUND_GREY
956
927
  cls._set_text_attributes(wAttributes)
957
928
 
958
929
  @classmethod
@@ -960,7 +931,7 @@ class Color (object):
960
931
  "Make the text foreground color red."
961
932
  wAttributes = cls._get_text_attributes()
962
933
  wAttributes &= ~win32.FOREGROUND_MASK
963
- wAttributes |= win32.FOREGROUND_RED
934
+ wAttributes |= win32.FOREGROUND_RED
964
935
  cls._set_text_attributes(wAttributes)
965
936
 
966
937
  @classmethod
@@ -968,7 +939,7 @@ class Color (object):
968
939
  "Make the text foreground color green."
969
940
  wAttributes = cls._get_text_attributes()
970
941
  wAttributes &= ~win32.FOREGROUND_MASK
971
- wAttributes |= win32.FOREGROUND_GREEN
942
+ wAttributes |= win32.FOREGROUND_GREEN
972
943
  cls._set_text_attributes(wAttributes)
973
944
 
974
945
  @classmethod
@@ -976,7 +947,7 @@ class Color (object):
976
947
  "Make the text foreground color blue."
977
948
  wAttributes = cls._get_text_attributes()
978
949
  wAttributes &= ~win32.FOREGROUND_MASK
979
- wAttributes |= win32.FOREGROUND_BLUE
950
+ wAttributes |= win32.FOREGROUND_BLUE
980
951
  cls._set_text_attributes(wAttributes)
981
952
 
982
953
  @classmethod
@@ -984,7 +955,7 @@ class Color (object):
984
955
  "Make the text foreground color cyan."
985
956
  wAttributes = cls._get_text_attributes()
986
957
  wAttributes &= ~win32.FOREGROUND_MASK
987
- wAttributes |= win32.FOREGROUND_CYAN
958
+ wAttributes |= win32.FOREGROUND_CYAN
988
959
  cls._set_text_attributes(wAttributes)
989
960
 
990
961
  @classmethod
@@ -992,7 +963,7 @@ class Color (object):
992
963
  "Make the text foreground color magenta."
993
964
  wAttributes = cls._get_text_attributes()
994
965
  wAttributes &= ~win32.FOREGROUND_MASK
995
- wAttributes |= win32.FOREGROUND_MAGENTA
966
+ wAttributes |= win32.FOREGROUND_MAGENTA
996
967
  cls._set_text_attributes(wAttributes)
997
968
 
998
969
  @classmethod
@@ -1000,17 +971,17 @@ class Color (object):
1000
971
  "Make the text foreground color yellow."
1001
972
  wAttributes = cls._get_text_attributes()
1002
973
  wAttributes &= ~win32.FOREGROUND_MASK
1003
- wAttributes |= win32.FOREGROUND_YELLOW
974
+ wAttributes |= win32.FOREGROUND_YELLOW
1004
975
  cls._set_text_attributes(wAttributes)
1005
976
 
1006
- #--------------------------------------------------------------------------
977
+ # --------------------------------------------------------------------------
1007
978
 
1008
979
  @classmethod
1009
980
  def bk_default(cls):
1010
981
  "Make the current background color the default."
1011
982
  wAttributes = cls._get_text_attributes()
1012
983
  wAttributes &= ~win32.BACKGROUND_MASK
1013
- #wAttributes |= win32.BACKGROUND_BLACK
984
+ # wAttributes |= win32.BACKGROUND_BLACK
1014
985
  wAttributes &= ~win32.BACKGROUND_INTENSITY
1015
986
  cls._set_text_attributes(wAttributes)
1016
987
 
@@ -1033,7 +1004,7 @@ class Color (object):
1033
1004
  "Make the text background color black."
1034
1005
  wAttributes = cls._get_text_attributes()
1035
1006
  wAttributes &= ~win32.BACKGROUND_MASK
1036
- #wAttributes |= win32.BACKGROUND_BLACK
1007
+ # wAttributes |= win32.BACKGROUND_BLACK
1037
1008
  cls._set_text_attributes(wAttributes)
1038
1009
 
1039
1010
  @classmethod
@@ -1041,7 +1012,7 @@ class Color (object):
1041
1012
  "Make the text background color white."
1042
1013
  wAttributes = cls._get_text_attributes()
1043
1014
  wAttributes &= ~win32.BACKGROUND_MASK
1044
- wAttributes |= win32.BACKGROUND_GREY
1015
+ wAttributes |= win32.BACKGROUND_GREY
1045
1016
  cls._set_text_attributes(wAttributes)
1046
1017
 
1047
1018
  @classmethod
@@ -1049,7 +1020,7 @@ class Color (object):
1049
1020
  "Make the text background color red."
1050
1021
  wAttributes = cls._get_text_attributes()
1051
1022
  wAttributes &= ~win32.BACKGROUND_MASK
1052
- wAttributes |= win32.BACKGROUND_RED
1023
+ wAttributes |= win32.BACKGROUND_RED
1053
1024
  cls._set_text_attributes(wAttributes)
1054
1025
 
1055
1026
  @classmethod
@@ -1057,7 +1028,7 @@ class Color (object):
1057
1028
  "Make the text background color green."
1058
1029
  wAttributes = cls._get_text_attributes()
1059
1030
  wAttributes &= ~win32.BACKGROUND_MASK
1060
- wAttributes |= win32.BACKGROUND_GREEN
1031
+ wAttributes |= win32.BACKGROUND_GREEN
1061
1032
  cls._set_text_attributes(wAttributes)
1062
1033
 
1063
1034
  @classmethod
@@ -1065,7 +1036,7 @@ class Color (object):
1065
1036
  "Make the text background color blue."
1066
1037
  wAttributes = cls._get_text_attributes()
1067
1038
  wAttributes &= ~win32.BACKGROUND_MASK
1068
- wAttributes |= win32.BACKGROUND_BLUE
1039
+ wAttributes |= win32.BACKGROUND_BLUE
1069
1040
  cls._set_text_attributes(wAttributes)
1070
1041
 
1071
1042
  @classmethod
@@ -1073,7 +1044,7 @@ class Color (object):
1073
1044
  "Make the text background color cyan."
1074
1045
  wAttributes = cls._get_text_attributes()
1075
1046
  wAttributes &= ~win32.BACKGROUND_MASK
1076
- wAttributes |= win32.BACKGROUND_CYAN
1047
+ wAttributes |= win32.BACKGROUND_CYAN
1077
1048
  cls._set_text_attributes(wAttributes)
1078
1049
 
1079
1050
  @classmethod
@@ -1081,7 +1052,7 @@ class Color (object):
1081
1052
  "Make the text background color magenta."
1082
1053
  wAttributes = cls._get_text_attributes()
1083
1054
  wAttributes &= ~win32.BACKGROUND_MASK
1084
- wAttributes |= win32.BACKGROUND_MAGENTA
1055
+ wAttributes |= win32.BACKGROUND_MAGENTA
1085
1056
  cls._set_text_attributes(wAttributes)
1086
1057
 
1087
1058
  @classmethod
@@ -1089,27 +1060,29 @@ class Color (object):
1089
1060
  "Make the text background color yellow."
1090
1061
  wAttributes = cls._get_text_attributes()
1091
1062
  wAttributes &= ~win32.BACKGROUND_MASK
1092
- wAttributes |= win32.BACKGROUND_YELLOW
1063
+ wAttributes |= win32.BACKGROUND_YELLOW
1093
1064
  cls._set_text_attributes(wAttributes)
1094
1065
 
1095
- #------------------------------------------------------------------------------
1066
+
1067
+ # ------------------------------------------------------------------------------
1096
1068
 
1097
1069
  # TODO: another class for ASCII boxes
1098
1070
 
1099
- class Table (object):
1071
+
1072
+ class Table(object):
1100
1073
  """
1101
1074
  Text based table. The number of columns and the width of each column
1102
1075
  is automatically calculated.
1103
1076
  """
1104
1077
 
1105
- def __init__(self, sep = ' '):
1078
+ def __init__(self, sep=" "):
1106
1079
  """
1107
1080
  @type sep: str
1108
1081
  @param sep: Separator between cells in each row.
1109
1082
  """
1110
- self.__cols = list()
1083
+ self.__cols = list()
1111
1084
  self.__width = list()
1112
- self.__sep = sep
1085
+ self.__sep = sep
1113
1086
 
1114
1087
  def addRow(self, *row):
1115
1088
  """
@@ -1118,18 +1091,18 @@ class Table (object):
1118
1091
  @type row: tuple
1119
1092
  @keyword row: Each argument is a cell in the table.
1120
1093
  """
1121
- row = [ str(item) for item in row ]
1122
- len_row = [ len(item) for item in row ]
1123
- width = self.__width
1094
+ row = [str(item) for item in row]
1095
+ len_row = [len(item) for item in row]
1096
+ width = self.__width
1124
1097
  len_old = len(width)
1125
1098
  len_new = len(row)
1126
- known = min(len_old, len_new)
1099
+ known = min(len_old, len_new)
1127
1100
  missing = len_new - len_old
1128
1101
  if missing > 0:
1129
- width.extend( len_row[ -missing : ] )
1102
+ width.extend(len_row[-missing:])
1130
1103
  elif missing < 0:
1131
- len_row.extend( [0] * (-missing) )
1132
- self.__width = [ max( width[i], len_row[i] ) for i in compat.xrange(len(len_row)) ]
1104
+ len_row.extend([0] * (-missing))
1105
+ self.__width = [max(width[i], len_row[i]) for i in compat.xrange(len(len_row))]
1133
1106
  self.__cols.append(row)
1134
1107
 
1135
1108
  def justify(self, column, direction):
@@ -1148,9 +1121,9 @@ class Table (object):
1148
1121
  @raise ValueError: Bad direction value.
1149
1122
  """
1150
1123
  if direction == -1:
1151
- self.__width[column] = abs(self.__width[column])
1124
+ self.__width[column] = abs(self.__width[column])
1152
1125
  elif direction == 1:
1153
- self.__width[column] = - abs(self.__width[column])
1126
+ self.__width[column] = -abs(self.__width[column])
1154
1127
  else:
1155
1128
  raise ValueError("Bad direction value.")
1156
1129
 
@@ -1164,7 +1137,7 @@ class Table (object):
1164
1137
  """
1165
1138
  width = 0
1166
1139
  if self.__width:
1167
- width = sum( abs(x) for x in self.__width )
1140
+ width = sum(abs(x) for x in self.__width)
1168
1141
  width = width + len(self.__width) * len(self.__sep) + 1
1169
1142
  return width
1170
1143
 
@@ -1175,7 +1148,7 @@ class Table (object):
1175
1148
  @rtype: str
1176
1149
  @return: Text output.
1177
1150
  """
1178
- return '%s\n' % '\n'.join( self.yieldOutput() )
1151
+ return "%s\n" % "\n".join(self.yieldOutput())
1179
1152
 
1180
1153
  def yieldOutput(self):
1181
1154
  """
@@ -1187,12 +1160,12 @@ class Table (object):
1187
1160
  width = self.__width
1188
1161
  if width:
1189
1162
  num_cols = len(width)
1190
- fmt = ['%%%ds' % -w for w in width]
1163
+ fmt = ["%%%ds" % -w for w in width]
1191
1164
  if width[-1] > 0:
1192
- fmt[-1] = '%s'
1165
+ fmt[-1] = "%s"
1193
1166
  fmt = self.__sep.join(fmt)
1194
1167
  for row in self.__cols:
1195
- row.extend( [''] * (num_cols - len(row)) )
1168
+ row.extend([""] * (num_cols - len(row)))
1196
1169
  yield fmt % tuple(row)
1197
1170
 
1198
1171
  def show(self):
@@ -1201,9 +1174,11 @@ class Table (object):
1201
1174
  """
1202
1175
  print(self.getOutput())
1203
1176
 
1204
- #------------------------------------------------------------------------------
1205
1177
 
1206
- class CrashDump (StaticClass):
1178
+ # ------------------------------------------------------------------------------
1179
+
1180
+
1181
+ class CrashDump(StaticClass):
1207
1182
  """
1208
1183
  Static functions for crash dumps.
1209
1184
 
@@ -1213,21 +1188,21 @@ class CrashDump (StaticClass):
1213
1188
 
1214
1189
  # Templates for the dump_registers method.
1215
1190
  reg_template = {
1216
- win32.ARCH_I386 : (
1217
- 'eax=%(Eax).8x ebx=%(Ebx).8x ecx=%(Ecx).8x edx=%(Edx).8x esi=%(Esi).8x edi=%(Edi).8x\n'
1218
- 'eip=%(Eip).8x esp=%(Esp).8x ebp=%(Ebp).8x %(efl_dump)s\n'
1219
- 'cs=%(SegCs).4x ss=%(SegSs).4x ds=%(SegDs).4x es=%(SegEs).4x fs=%(SegFs).4x gs=%(SegGs).4x efl=%(EFlags).8x\n'
1220
- ),
1221
- win32.ARCH_AMD64 : (
1222
- 'rax=%(Rax).16x rbx=%(Rbx).16x rcx=%(Rcx).16x\n'
1223
- 'rdx=%(Rdx).16x rsi=%(Rsi).16x rdi=%(Rdi).16x\n'
1224
- 'rip=%(Rip).16x rsp=%(Rsp).16x rbp=%(Rbp).16x\n'
1225
- ' r8=%(R8).16x r9=%(R9).16x r10=%(R10).16x\n'
1226
- 'r11=%(R11).16x r12=%(R12).16x r13=%(R13).16x\n'
1227
- 'r14=%(R14).16x r15=%(R15).16x\n'
1228
- '%(efl_dump)s\n'
1229
- 'cs=%(SegCs).4x ss=%(SegSs).4x ds=%(SegDs).4x es=%(SegEs).4x fs=%(SegFs).4x gs=%(SegGs).4x efl=%(EFlags).8x\n'
1230
- ),
1191
+ win32.ARCH_I386: (
1192
+ "eax=%(Eax).8x ebx=%(Ebx).8x ecx=%(Ecx).8x edx=%(Edx).8x esi=%(Esi).8x edi=%(Edi).8x\n"
1193
+ "eip=%(Eip).8x esp=%(Esp).8x ebp=%(Ebp).8x %(efl_dump)s\n"
1194
+ "cs=%(SegCs).4x ss=%(SegSs).4x ds=%(SegDs).4x es=%(SegEs).4x fs=%(SegFs).4x gs=%(SegGs).4x efl=%(EFlags).8x\n"
1195
+ ),
1196
+ win32.ARCH_AMD64: (
1197
+ "rax=%(Rax).16x rbx=%(Rbx).16x rcx=%(Rcx).16x\n"
1198
+ "rdx=%(Rdx).16x rsi=%(Rsi).16x rdi=%(Rdi).16x\n"
1199
+ "rip=%(Rip).16x rsp=%(Rsp).16x rbp=%(Rbp).16x\n"
1200
+ " r8=%(R8).16x r9=%(R9).16x r10=%(R10).16x\n"
1201
+ "r11=%(R11).16x r12=%(R12).16x r13=%(R13).16x\n"
1202
+ "r14=%(R14).16x r15=%(R15).16x\n"
1203
+ "%(efl_dump)s\n"
1204
+ "cs=%(SegCs).4x ss=%(SegSs).4x ds=%(SegDs).4x es=%(SegEs).4x fs=%(SegFs).4x gs=%(SegGs).4x efl=%(EFlags).8x\n"
1205
+ ),
1231
1206
  }
1232
1207
 
1233
1208
  @staticmethod
@@ -1244,56 +1219,56 @@ class CrashDump (StaticClass):
1244
1219
  @return: Text suitable for logging.
1245
1220
  """
1246
1221
  if efl is None:
1247
- return ''
1248
- efl_dump = 'iopl=%1d' % ((efl & 0x3000) >> 12)
1222
+ return ""
1223
+ efl_dump = "iopl=%1d" % ((efl & 0x3000) >> 12)
1249
1224
  if efl & 0x100000:
1250
- efl_dump += ' vip'
1225
+ efl_dump += " vip"
1251
1226
  else:
1252
- efl_dump += ' '
1227
+ efl_dump += " "
1253
1228
  if efl & 0x80000:
1254
- efl_dump += ' vif'
1229
+ efl_dump += " vif"
1255
1230
  else:
1256
- efl_dump += ' '
1231
+ efl_dump += " "
1257
1232
  # 0x20000 ???
1258
1233
  if efl & 0x800:
1259
- efl_dump += ' ov' # Overflow
1234
+ efl_dump += " ov" # Overflow
1260
1235
  else:
1261
- efl_dump += ' no' # No overflow
1236
+ efl_dump += " no" # No overflow
1262
1237
  if efl & 0x400:
1263
- efl_dump += ' dn' # Downwards
1238
+ efl_dump += " dn" # Downwards
1264
1239
  else:
1265
- efl_dump += ' up' # Upwards
1240
+ efl_dump += " up" # Upwards
1266
1241
  if efl & 0x200:
1267
- efl_dump += ' ei' # Enable interrupts
1242
+ efl_dump += " ei" # Enable interrupts
1268
1243
  else:
1269
- efl_dump += ' di' # Disable interrupts
1244
+ efl_dump += " di" # Disable interrupts
1270
1245
  # 0x100 trap flag
1271
1246
  if efl & 0x80:
1272
- efl_dump += ' ng' # Negative
1247
+ efl_dump += " ng" # Negative
1273
1248
  else:
1274
- efl_dump += ' pl' # Positive
1249
+ efl_dump += " pl" # Positive
1275
1250
  if efl & 0x40:
1276
- efl_dump += ' zr' # Zero
1251
+ efl_dump += " zr" # Zero
1277
1252
  else:
1278
- efl_dump += ' nz' # Nonzero
1253
+ efl_dump += " nz" # Nonzero
1279
1254
  if efl & 0x10:
1280
- efl_dump += ' ac' # Auxiliary carry
1255
+ efl_dump += " ac" # Auxiliary carry
1281
1256
  else:
1282
- efl_dump += ' na' # No auxiliary carry
1257
+ efl_dump += " na" # No auxiliary carry
1283
1258
  # 0x8 ???
1284
1259
  if efl & 0x4:
1285
- efl_dump += ' pe' # Parity odd
1260
+ efl_dump += " pe" # Parity odd
1286
1261
  else:
1287
- efl_dump += ' po' # Parity even
1262
+ efl_dump += " po" # Parity even
1288
1263
  # 0x2 ???
1289
1264
  if efl & 0x1:
1290
- efl_dump += ' cy' # Carry
1265
+ efl_dump += " cy" # Carry
1291
1266
  else:
1292
- efl_dump += ' nc' # No carry
1267
+ efl_dump += " nc" # No carry
1293
1268
  return efl_dump
1294
1269
 
1295
1270
  @classmethod
1296
- def dump_registers(cls, registers, arch = None):
1271
+ def dump_registers(cls, registers, arch=None):
1297
1272
  """
1298
1273
  Dump the x86/x64 processor register values.
1299
1274
  The output mimics that of the WinDBG debugger.
@@ -1312,23 +1287,23 @@ class CrashDump (StaticClass):
1312
1287
  @return: Text suitable for logging.
1313
1288
  """
1314
1289
  if registers is None:
1315
- return ''
1290
+ return ""
1316
1291
  if arch is None:
1317
- if 'Eax' in registers:
1292
+ if "Eax" in registers:
1318
1293
  arch = win32.ARCH_I386
1319
- elif 'Rax' in registers:
1294
+ elif "Rax" in registers:
1320
1295
  arch = win32.ARCH_AMD64
1321
1296
  else:
1322
- arch = 'Unknown'
1297
+ arch = "Unknown"
1323
1298
  if arch not in cls.reg_template:
1324
1299
  msg = "Don't know how to dump the registers for architecture: %s"
1325
1300
  raise NotImplementedError(msg % arch)
1326
1301
  registers = registers.copy()
1327
- registers['efl_dump'] = cls.dump_flags( registers['EFlags'] )
1302
+ registers["efl_dump"] = cls.dump_flags(registers["EFlags"])
1328
1303
  return cls.reg_template[arch] % registers
1329
1304
 
1330
1305
  @staticmethod
1331
- def dump_registers_peek(registers, data, separator = ' ', width = 16):
1306
+ def dump_registers_peek(registers, data, separator=" ", width=16):
1332
1307
  """
1333
1308
  Dump data pointed to by the given registers, if any.
1334
1309
 
@@ -1344,21 +1319,18 @@ class CrashDump (StaticClass):
1344
1319
  @return: Text suitable for logging.
1345
1320
  """
1346
1321
  if None in (registers, data):
1347
- return ''
1322
+ return ""
1348
1323
  names = compat.keys(data)
1349
1324
  names.sort()
1350
- result = ''
1325
+ result = ""
1351
1326
  for reg_name in names:
1352
- tag = reg_name.lower()
1353
- dumped = HexDump.hexline(data[reg_name], separator, width)
1354
- result += '%s -> %s\n' % (tag, dumped)
1327
+ tag = reg_name.lower()
1328
+ dumped = HexDump.hexline(data[reg_name], separator, width)
1329
+ result += "%s -> %s\n" % (tag, dumped)
1355
1330
  return result
1356
1331
 
1357
1332
  @staticmethod
1358
- def dump_data_peek(data, base = 0,
1359
- separator = ' ',
1360
- width = 16,
1361
- bits = None):
1333
+ def dump_data_peek(data, base=0, separator=" ", width=16, bits=None):
1362
1334
  """
1363
1335
  Dump data from pointers guessed within the given binary data.
1364
1336
 
@@ -1377,18 +1349,18 @@ class CrashDump (StaticClass):
1377
1349
  @return: Text suitable for logging.
1378
1350
  """
1379
1351
  if data is None:
1380
- return ''
1352
+ return ""
1381
1353
  pointers = compat.keys(data)
1382
1354
  pointers.sort()
1383
- result = ''
1355
+ result = ""
1384
1356
  for offset in pointers:
1385
- dumped = HexDump.hexline(data[offset], separator, width)
1357
+ dumped = HexDump.hexline(data[offset], separator, width)
1386
1358
  address = HexDump.address(base + offset, bits)
1387
- result += '%s -> %s\n' % (address, dumped)
1359
+ result += "%s -> %s\n" % (address, dumped)
1388
1360
  return result
1389
1361
 
1390
1362
  @staticmethod
1391
- def dump_stack_peek(data, separator = ' ', width = 16, arch = None):
1363
+ def dump_stack_peek(data, separator=" ", width=16, arch=None):
1392
1364
  """
1393
1365
  Dump data from pointers guessed within the given stack dump.
1394
1366
 
@@ -1412,28 +1384,28 @@ class CrashDump (StaticClass):
1412
1384
  @return: Text suitable for logging.
1413
1385
  """
1414
1386
  if data is None:
1415
- return ''
1387
+ return ""
1416
1388
  if arch is None:
1417
1389
  arch = win32.arch
1418
1390
  pointers = compat.keys(data)
1419
1391
  pointers.sort()
1420
- result = ''
1392
+ result = ""
1421
1393
  if pointers:
1422
1394
  if arch == win32.ARCH_I386:
1423
- spreg = 'esp'
1395
+ spreg = "esp"
1424
1396
  elif arch == win32.ARCH_AMD64:
1425
- spreg = 'rsp'
1397
+ spreg = "rsp"
1426
1398
  else:
1427
- spreg = 'STACK' # just a generic tag
1428
- tag_fmt = '[%s+0x%%.%dx]' % (spreg, len( '%x' % pointers[-1] ) )
1399
+ spreg = "STACK" # just a generic tag
1400
+ tag_fmt = "[%s+0x%%.%dx]" % (spreg, len("%x" % pointers[-1]))
1429
1401
  for offset in pointers:
1430
- dumped = HexDump.hexline(data[offset], separator, width)
1431
- tag = tag_fmt % offset
1432
- result += '%s -> %s\n' % (tag, dumped)
1402
+ dumped = HexDump.hexline(data[offset], separator, width)
1403
+ tag = tag_fmt % offset
1404
+ result += "%s -> %s\n" % (tag, dumped)
1433
1405
  return result
1434
1406
 
1435
1407
  @staticmethod
1436
- def dump_stack_trace(stack_trace, bits = None):
1408
+ def dump_stack_trace(stack_trace, bits=None):
1437
1409
  """
1438
1410
  Dump a stack trace, as returned by L{Thread.get_stack_trace} with the
1439
1411
  C{bUseLabels} parameter set to C{False}.
@@ -1451,17 +1423,17 @@ class CrashDump (StaticClass):
1451
1423
  @return: Text suitable for logging.
1452
1424
  """
1453
1425
  if not stack_trace:
1454
- return ''
1426
+ return ""
1455
1427
  table = Table()
1456
- table.addRow('Frame', 'Origin', 'Module')
1457
- for (fp, ra, mod) in stack_trace:
1428
+ table.addRow("Frame", "Origin", "Module")
1429
+ for fp, ra, mod in stack_trace:
1458
1430
  fp_d = HexDump.address(fp, bits)
1459
1431
  ra_d = HexDump.address(ra, bits)
1460
1432
  table.addRow(fp_d, ra_d, mod)
1461
1433
  return table.getOutput()
1462
1434
 
1463
1435
  @staticmethod
1464
- def dump_stack_trace_with_labels(stack_trace, bits = None):
1436
+ def dump_stack_trace_with_labels(stack_trace, bits=None):
1465
1437
  """
1466
1438
  Dump a stack trace,
1467
1439
  as returned by L{Thread.get_stack_trace_with_labels}.
@@ -1479,11 +1451,11 @@ class CrashDump (StaticClass):
1479
1451
  @return: Text suitable for logging.
1480
1452
  """
1481
1453
  if not stack_trace:
1482
- return ''
1454
+ return ""
1483
1455
  table = Table()
1484
- table.addRow('Frame', 'Origin')
1485
- for (fp, label) in stack_trace:
1486
- table.addRow( HexDump.address(fp, bits), label )
1456
+ table.addRow("Frame", "Origin")
1457
+ for fp, label in stack_trace:
1458
+ table.addRow(HexDump.address(fp, bits), label)
1487
1459
  return table.getOutput()
1488
1460
 
1489
1461
  # TODO
@@ -1493,9 +1465,7 @@ class CrashDump (StaticClass):
1493
1465
  # + It'd be very useful to show some labels here.
1494
1466
  # + It'd be very useful to show register contents for code at EIP
1495
1467
  @staticmethod
1496
- def dump_code(disassembly, pc = None,
1497
- bLowercase = True,
1498
- bits = None):
1468
+ def dump_code(disassembly, pc=None, bLowercase=True, bits=None):
1499
1469
  """
1500
1470
  Dump a disassembly. Optionally mark where the program counter is.
1501
1471
 
@@ -1518,26 +1488,21 @@ class CrashDump (StaticClass):
1518
1488
  @return: Text suitable for logging.
1519
1489
  """
1520
1490
  if not disassembly:
1521
- return ''
1522
- table = Table(sep = ' | ')
1523
- for (addr, size, code, dump) in disassembly:
1491
+ return ""
1492
+ table = Table(sep=" | ")
1493
+ for addr, size, code, dump in disassembly:
1524
1494
  if bLowercase:
1525
1495
  code = code.lower()
1526
1496
  if addr == pc:
1527
- addr = ' * %s' % HexDump.address(addr, bits)
1497
+ addr = " * %s" % HexDump.address(addr, bits)
1528
1498
  else:
1529
- addr = ' %s' % HexDump.address(addr, bits)
1499
+ addr = " %s" % HexDump.address(addr, bits)
1530
1500
  table.addRow(addr, dump, code)
1531
1501
  table.justify(1, 1)
1532
1502
  return table.getOutput()
1533
1503
 
1534
1504
  @staticmethod
1535
- def dump_code_line(disassembly_line, bShowAddress = True,
1536
- bShowDump = True,
1537
- bLowercase = True,
1538
- dwDumpWidth = None,
1539
- dwCodeWidth = None,
1540
- bits = None):
1505
+ def dump_code_line(disassembly_line, bShowAddress=True, bShowDump=True, bLowercase=True, dwDumpWidth=None, dwCodeWidth=None, bits=None):
1541
1506
  """
1542
1507
  Dump a single line of code. To dump a block of code use L{dump_code}.
1543
1508
 
@@ -1573,29 +1538,29 @@ class CrashDump (StaticClass):
1573
1538
  else:
1574
1539
  address_size = bits / 4
1575
1540
  (addr, size, code, dump) = disassembly_line
1576
- dump = dump.replace(' ', '')
1541
+ dump = dump.replace(" ", "")
1577
1542
  result = list()
1578
- fmt = ''
1543
+ fmt = ""
1579
1544
  if bShowAddress:
1580
- result.append( HexDump.address(addr, bits) )
1581
- fmt += '%%%ds:' % address_size
1545
+ result.append(HexDump.address(addr, bits))
1546
+ fmt += "%%%ds:" % address_size
1582
1547
  if bShowDump:
1583
1548
  result.append(dump)
1584
1549
  if dwDumpWidth:
1585
- fmt += ' %%-%ds' % dwDumpWidth
1550
+ fmt += " %%-%ds" % dwDumpWidth
1586
1551
  else:
1587
- fmt += ' %s'
1552
+ fmt += " %s"
1588
1553
  if bLowercase:
1589
1554
  code = code.lower()
1590
1555
  result.append(code)
1591
1556
  if dwCodeWidth:
1592
- fmt += ' %%-%ds' % dwCodeWidth
1557
+ fmt += " %%-%ds" % dwCodeWidth
1593
1558
  else:
1594
- fmt += ' %s'
1559
+ fmt += " %s"
1595
1560
  return fmt % tuple(result)
1596
1561
 
1597
1562
  @staticmethod
1598
- def dump_memory_map(memoryMap, mappedFilenames = None, bits = None):
1563
+ def dump_memory_map(memoryMap, mappedFilenames=None, bits=None):
1599
1564
  """
1600
1565
  Dump the memory map of a process. Optionally show the filenames for
1601
1566
  memory mapped files as well.
@@ -1616,7 +1581,7 @@ class CrashDump (StaticClass):
1616
1581
  @return: Text suitable for logging.
1617
1582
  """
1618
1583
  if not memoryMap:
1619
- return ''
1584
+ return ""
1620
1585
 
1621
1586
  table = Table()
1622
1587
  if mappedFilenames:
@@ -1626,28 +1591,27 @@ class CrashDump (StaticClass):
1626
1591
 
1627
1592
  # For each memory block in the map...
1628
1593
  for mbi in memoryMap:
1629
-
1630
1594
  # Address and size of memory block.
1631
1595
  BaseAddress = HexDump.address(mbi.BaseAddress, bits)
1632
- RegionSize = HexDump.address(mbi.RegionSize, bits)
1596
+ RegionSize = HexDump.address(mbi.RegionSize, bits)
1633
1597
 
1634
1598
  # State (free or allocated).
1635
1599
  mbiState = mbi.State
1636
- if mbiState == win32.MEM_RESERVE:
1637
- State = "Reserved"
1600
+ if mbiState == win32.MEM_RESERVE:
1601
+ State = "Reserved"
1638
1602
  elif mbiState == win32.MEM_COMMIT:
1639
- State = "Commited"
1603
+ State = "Commited"
1640
1604
  elif mbiState == win32.MEM_FREE:
1641
- State = "Free"
1605
+ State = "Free"
1642
1606
  else:
1643
- State = "Unknown"
1607
+ State = "Unknown"
1644
1608
 
1645
1609
  # Page protection bits (R/W/X/G).
1646
1610
  if mbiState != win32.MEM_COMMIT:
1647
1611
  Protect = ""
1648
1612
  else:
1649
1613
  mbiProtect = mbi.Protect
1650
- if mbiProtect & win32.PAGE_NOACCESS:
1614
+ if mbiProtect & win32.PAGE_NOACCESS:
1651
1615
  Protect = "--- "
1652
1616
  elif mbiProtect & win32.PAGE_READONLY:
1653
1617
  Protect = "R-- "
@@ -1665,46 +1629,48 @@ class CrashDump (StaticClass):
1665
1629
  Protect = "RCX "
1666
1630
  else:
1667
1631
  Protect = "??? "
1668
- if mbiProtect & win32.PAGE_GUARD:
1632
+ if mbiProtect & win32.PAGE_GUARD:
1669
1633
  Protect += "G"
1670
1634
  else:
1671
1635
  Protect += "-"
1672
- if mbiProtect & win32.PAGE_NOCACHE:
1636
+ if mbiProtect & win32.PAGE_NOCACHE:
1673
1637
  Protect += "N"
1674
1638
  else:
1675
1639
  Protect += "-"
1676
- if mbiProtect & win32.PAGE_WRITECOMBINE:
1640
+ if mbiProtect & win32.PAGE_WRITECOMBINE:
1677
1641
  Protect += "W"
1678
1642
  else:
1679
1643
  Protect += "-"
1680
1644
 
1681
1645
  # Type (file mapping, executable image, or private memory).
1682
1646
  mbiType = mbi.Type
1683
- if mbiType == win32.MEM_IMAGE:
1684
- Type = "Image"
1647
+ if mbiType == win32.MEM_IMAGE:
1648
+ Type = "Image"
1685
1649
  elif mbiType == win32.MEM_MAPPED:
1686
- Type = "Mapped"
1650
+ Type = "Mapped"
1687
1651
  elif mbiType == win32.MEM_PRIVATE:
1688
- Type = "Private"
1652
+ Type = "Private"
1689
1653
  elif mbiType == 0:
1690
- Type = ""
1654
+ Type = ""
1691
1655
  else:
1692
- Type = "Unknown"
1656
+ Type = "Unknown"
1693
1657
 
1694
1658
  # Output a row in the table.
1695
1659
  if mappedFilenames:
1696
- FileName = mappedFilenames.get(mbi.BaseAddress, '')
1697
- table.addRow( BaseAddress, RegionSize, State, Protect, Type, FileName )
1660
+ FileName = mappedFilenames.get(mbi.BaseAddress, "")
1661
+ table.addRow(BaseAddress, RegionSize, State, Protect, Type, FileName)
1698
1662
  else:
1699
- table.addRow( BaseAddress, RegionSize, State, Protect, Type )
1663
+ table.addRow(BaseAddress, RegionSize, State, Protect, Type)
1700
1664
 
1701
1665
  # Return the table output.
1702
1666
  return table.getOutput()
1703
1667
 
1704
- #------------------------------------------------------------------------------
1705
1668
 
1706
- class DebugLog (StaticClass):
1707
- 'Static functions for debug logging.'
1669
+ # ------------------------------------------------------------------------------
1670
+
1671
+
1672
+ class DebugLog(StaticClass):
1673
+ "Static functions for debug logging."
1708
1674
 
1709
1675
  @staticmethod
1710
1676
  def log_text(text):
@@ -1717,16 +1683,16 @@ class DebugLog (StaticClass):
1717
1683
  @rtype: str
1718
1684
  @return: Log line.
1719
1685
  """
1720
- if text.endswith('\n'):
1721
- text = text[:-len('\n')]
1722
- #text = text.replace('\n', '\n\t\t') # text CSV
1686
+ if text.endswith("\n"):
1687
+ text = text[: -len("\n")]
1688
+ # text = text.replace('\n', '\n\t\t') # text CSV
1723
1689
  ltime = time.strftime("%X")
1724
1690
  msecs = (time.time() % 1) * 1000
1725
- return '[%s.%04d] %s' % (ltime, msecs, text)
1726
- #return '[%s.%04d]\t%s' % (ltime, msecs, text) # text CSV
1691
+ return "[%s.%04d] %s" % (ltime, msecs, text)
1692
+ # return '[%s.%04d]\t%s' % (ltime, msecs, text) # text CSV
1727
1693
 
1728
1694
  @classmethod
1729
- def log_event(cls, event, text = None):
1695
+ def log_event(cls, event, text=None):
1730
1696
  """
1731
1697
  Log lines of text associated with a debug event.
1732
1698
 
@@ -1744,29 +1710,31 @@ class DebugLog (StaticClass):
1744
1710
  if event.get_event_code() == win32.EXCEPTION_DEBUG_EVENT:
1745
1711
  what = event.get_exception_description()
1746
1712
  if event.is_first_chance():
1747
- what = '%s (first chance)' % what
1713
+ what = "%s (first chance)" % what
1748
1714
  else:
1749
- what = '%s (second chance)' % what
1715
+ what = "%s (second chance)" % what
1750
1716
  try:
1751
1717
  address = event.get_fault_address()
1752
1718
  except NotImplementedError:
1753
1719
  address = event.get_exception_address()
1754
1720
  else:
1755
- what = event.get_event_name()
1721
+ what = event.get_event_name()
1756
1722
  address = event.get_thread().get_pc()
1757
1723
  process = event.get_process()
1758
1724
  label = process.get_label_at_address(address)
1759
1725
  address = HexDump.address(address, process.get_bits())
1760
1726
  if label:
1761
- where = '%s (%s)' % (address, label)
1727
+ where = "%s (%s)" % (address, label)
1762
1728
  else:
1763
1729
  where = address
1764
- text = '%s at %s' % (what, where)
1765
- text = 'pid %d tid %d: %s' % (event.get_pid(), event.get_tid(), text)
1766
- #text = 'pid %d tid %d:\t%s' % (event.get_pid(), event.get_tid(), text) # text CSV
1730
+ text = "%s at %s" % (what, where)
1731
+ text = "pid %d tid %d: %s" % (event.get_pid(), event.get_tid(), text)
1732
+ # text = 'pid %d tid %d:\t%s' % (event.get_pid(), event.get_tid(), text) # text CSV
1767
1733
  return cls.log_text(text)
1768
1734
 
1769
- #------------------------------------------------------------------------------
1735
+
1736
+ # ------------------------------------------------------------------------------
1737
+
1770
1738
 
1771
1739
  class Logger(object):
1772
1740
  """
@@ -1783,7 +1751,7 @@ class Logger(object):
1783
1751
  C{None} if no log file is used.
1784
1752
  """
1785
1753
 
1786
- def __init__(self, logfile = None, verbose = True):
1754
+ def __init__(self, logfile=None, verbose=True):
1787
1755
  """
1788
1756
  @type logfile: str or None
1789
1757
  @param logfile: Append messages to this text file.
@@ -1794,7 +1762,7 @@ class Logger(object):
1794
1762
  self.verbose = verbose
1795
1763
  self.logfile = logfile
1796
1764
  if self.logfile:
1797
- self.fd = open(self.logfile, 'a+')
1765
+ self.fd = open(self.logfile, "a+")
1798
1766
 
1799
1767
  def __logfile_error(self, e):
1800
1768
  """
@@ -1807,11 +1775,12 @@ class Logger(object):
1807
1775
  @param e: Exception raised when trying to write to the log file.
1808
1776
  """
1809
1777
  from sys import stderr
1778
+
1810
1779
  msg = "Warning, error writing log file %s: %s\n"
1811
1780
  msg = msg % (self.logfile, str(e))
1812
1781
  stderr.write(DebugLog.log_text(msg))
1813
1782
  self.logfile = None
1814
- self.fd = None
1783
+ self.fd = None
1815
1784
 
1816
1785
  def __do_log(self, text):
1817
1786
  """
@@ -1824,12 +1793,12 @@ class Logger(object):
1824
1793
  @param text: Text to print.
1825
1794
  """
1826
1795
  if isinstance(text, compat.unicode):
1827
- text = text.encode('cp1252')
1796
+ text = text.encode("cp1252")
1828
1797
  if self.verbose:
1829
1798
  print(text)
1830
1799
  if self.logfile:
1831
1800
  try:
1832
- self.fd.writelines('%s\n' % text)
1801
+ self.fd.writelines("%s\n" % text)
1833
1802
  except IOError:
1834
1803
  e = sys.exc_info()[1]
1835
1804
  self.__logfile_error(e)
@@ -1841,9 +1810,9 @@ class Logger(object):
1841
1810
  @type text: str
1842
1811
  @param text: Text to log.
1843
1812
  """
1844
- self.__do_log( DebugLog.log_text(text) )
1813
+ self.__do_log(DebugLog.log_text(text))
1845
1814
 
1846
- def log_event(self, event, text = None):
1815
+ def log_event(self, event, text=None):
1847
1816
  """
1848
1817
  Log lines of text associated with a debug event.
1849
1818
 
@@ -1854,13 +1823,13 @@ class Logger(object):
1854
1823
  @param text: (Optional) Text to log. If no text is provided the default
1855
1824
  is to show a description of the event itself.
1856
1825
  """
1857
- self.__do_log( DebugLog.log_event(event, text) )
1826
+ self.__do_log(DebugLog.log_event(event, text))
1858
1827
 
1859
1828
  def log_exc(self):
1860
1829
  """
1861
1830
  Log lines of text associated with the last Python exception.
1862
1831
  """
1863
- self.__do_log( 'Exception raised: %s' % traceback.format_exc() )
1832
+ self.__do_log("Exception raised: %s" % traceback.format_exc())
1864
1833
 
1865
1834
  def is_enabled(self):
1866
1835
  """