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
@@ -39,7 +39,7 @@ from __future__ import with_statement
39
39
 
40
40
  __revision__ = "$Id$"
41
41
 
42
- __all__ = ['Thread']
42
+ __all__ = ["Thread"]
43
43
 
44
44
  from winappdbg import win32
45
45
  from winappdbg import compat
@@ -54,12 +54,13 @@ import warnings
54
54
  # delayed imports
55
55
  Process = None
56
56
 
57
- #==============================================================================
57
+ # ==============================================================================
58
58
 
59
59
  # TODO
60
60
  # + fetch special registers (MMX, XMM, 3DNow!, etc)
61
61
 
62
- class Thread (object):
62
+
63
+ class Thread(object):
63
64
  """
64
65
  Interface to a thread in another process.
65
66
 
@@ -126,7 +127,7 @@ class Thread (object):
126
127
  when the injected thread is killed.
127
128
  """
128
129
 
129
- def __init__(self, dwThreadId, hThread = None, process = None):
130
+ def __init__(self, dwThreadId, hThread=None, process=None):
130
131
  """
131
132
  @type dwThreadId: int
132
133
  @param dwThreadId: Global thread ID.
@@ -137,34 +138,34 @@ class Thread (object):
137
138
  @type process: L{Process}
138
139
  @param process: (Optional) Parent Process object.
139
140
  """
140
- self.dwProcessId = None
141
- self.dwThreadId = dwThreadId
142
- self.hThread = hThread
141
+ self.dwProcessId = None
142
+ self.dwThreadId = dwThreadId
143
+ self.hThread = hThread
143
144
  self.pInjectedMemory = None
144
145
  self.set_name(None)
145
146
  self.set_process(process)
146
147
 
147
148
  # Not really sure if it's a good idea...
148
- ## def __eq__(self, aThread):
149
- ## """
150
- ## Compare two Thread objects. The comparison is made using the IDs.
151
- ##
152
- ## @warning:
153
- ## If you have two Thread instances with different handles the
154
- ## equality operator still returns C{True}, so be careful!
155
- ##
156
- ## @type aThread: L{Thread}
157
- ## @param aThread: Another Thread object.
158
- ##
159
- ## @rtype: bool
160
- ## @return: C{True} if the two thread IDs are equal,
161
- ## C{False} otherwise.
162
- ## """
163
- ## return isinstance(aThread, Thread) and \
164
- ## self.get_tid() == aThread.get_tid()
149
+ ## def __eq__(self, aThread):
150
+ ## """
151
+ ## Compare two Thread objects. The comparison is made using the IDs.
152
+ ##
153
+ ## @warning:
154
+ ## If you have two Thread instances with different handles the
155
+ ## equality operator still returns C{True}, so be careful!
156
+ ##
157
+ ## @type aThread: L{Thread}
158
+ ## @param aThread: Another Thread object.
159
+ ##
160
+ ## @rtype: bool
161
+ ## @return: C{True} if the two thread IDs are equal,
162
+ ## C{False} otherwise.
163
+ ## """
164
+ ## return isinstance(aThread, Thread) and \
165
+ ## self.get_tid() == aThread.get_tid()
165
166
 
166
167
  def __load_Process_class(self):
167
- global Process # delayed import
168
+ global Process # delayed import
168
169
  if Process is None:
169
170
  from winappdbg.process import Process
170
171
 
@@ -180,7 +181,7 @@ class Thread (object):
180
181
  self.__process = Process(self.get_pid())
181
182
  return self.__process
182
183
 
183
- def set_process(self, process = None):
184
+ def set_process(self, process=None):
184
185
  """
185
186
  Manually set the parent Process object. Use with care!
186
187
 
@@ -189,11 +190,11 @@ class Thread (object):
189
190
  """
190
191
  if process is None:
191
192
  self.dwProcessId = None
192
- self.__process = None
193
+ self.__process = None
193
194
  else:
194
195
  self.__load_Process_class()
195
196
  if not isinstance(process, Process):
196
- msg = "Parent process must be a Process instance, "
197
+ msg = "Parent process must be a Process instance, "
197
198
  msg += "got %s instead" % type(process)
198
199
  raise TypeError(msg)
199
200
  self.dwProcessId = process.get_pid()
@@ -217,8 +218,7 @@ class Thread (object):
217
218
  try:
218
219
  # I wish this had been implemented before Vista...
219
220
  # XXX TODO find the real ntdll call under this api
220
- hThread = self.get_handle(
221
- win32.THREAD_QUERY_LIMITED_INFORMATION)
221
+ hThread = self.get_handle(win32.THREAD_QUERY_LIMITED_INFORMATION)
222
222
  self.dwProcessId = win32.GetProcessIdOfThread(hThread)
223
223
  except AttributeError:
224
224
  # This method is really bad :P
@@ -226,7 +226,7 @@ class Thread (object):
226
226
  return self.dwProcessId
227
227
 
228
228
  def __get_pid_by_scanning(self):
229
- 'Internally used by get_pid().'
229
+ "Internally used by get_pid()."
230
230
  dwProcessId = None
231
231
  dwThreadId = self.get_tid()
232
232
  with win32.CreateToolhelp32Snapshot(win32.TH32CS_SNAPTHREAD) as hSnapshot:
@@ -255,7 +255,7 @@ class Thread (object):
255
255
  """
256
256
  return self.name
257
257
 
258
- def set_name(self, name = None):
258
+ def set_name(self, name=None):
259
259
  """
260
260
  Sets the thread's name.
261
261
 
@@ -264,9 +264,9 @@ class Thread (object):
264
264
  """
265
265
  self.name = name
266
266
 
267
- #------------------------------------------------------------------------------
267
+ # ------------------------------------------------------------------------------
268
268
 
269
- def open_handle(self, dwDesiredAccess = win32.THREAD_ALL_ACCESS):
269
+ def open_handle(self, dwDesiredAccess=win32.THREAD_ALL_ACCESS):
270
270
  """
271
271
  Opens a new handle to the thread, closing the previous one.
272
272
 
@@ -289,7 +289,7 @@ class Thread (object):
289
289
 
290
290
  # In case hThread was set to an actual handle value instead of a Handle
291
291
  # object. This shouldn't happen unless the user tinkered with it.
292
- if not hasattr(self.hThread, '__del__'):
292
+ if not hasattr(self.hThread, "__del__"):
293
293
  self.close_handle()
294
294
 
295
295
  self.hThread = hThread
@@ -303,14 +303,14 @@ class Thread (object):
303
303
  collector claims them.
304
304
  """
305
305
  try:
306
- if hasattr(self.hThread, 'close'):
306
+ if hasattr(self.hThread, "close"):
307
307
  self.hThread.close()
308
308
  elif self.hThread not in (None, win32.INVALID_HANDLE_VALUE):
309
309
  win32.CloseHandle(self.hThread)
310
310
  finally:
311
311
  self.hThread = None
312
312
 
313
- def get_handle(self, dwDesiredAccess = win32.THREAD_ALL_ACCESS):
313
+ def get_handle(self, dwDesiredAccess=win32.THREAD_ALL_ACCESS):
314
314
  """
315
315
  Returns a handle to the thread with I{at least} the access rights
316
316
  requested.
@@ -349,9 +349,9 @@ class Thread (object):
349
349
  finally:
350
350
  self.close_handle()
351
351
 
352
- #------------------------------------------------------------------------------
352
+ # ------------------------------------------------------------------------------
353
353
 
354
- def wait(self, dwTimeout = None):
354
+ def wait(self, dwTimeout=None):
355
355
  """
356
356
  Waits for the thread to finish executing.
357
357
 
@@ -361,7 +361,7 @@ class Thread (object):
361
361
  """
362
362
  self.get_handle(win32.SYNCHRONIZE).wait(dwTimeout)
363
363
 
364
- def kill(self, dwExitCode = 0):
364
+ def kill(self, dwExitCode=0):
365
365
  """
366
366
  Terminates the thread execution.
367
367
 
@@ -381,7 +381,7 @@ class Thread (object):
381
381
  self.get_process().free(self.pInjectedMemory)
382
382
  self.pInjectedMemory = None
383
383
  except Exception:
384
- ## raise # XXX DEBUG
384
+ ## raise # XXX DEBUG
385
385
  pass
386
386
 
387
387
  # XXX TODO
@@ -441,9 +441,9 @@ class Thread (object):
441
441
  dwAccess = win32.THREAD_QUERY_LIMITED_INFORMATION
442
442
  else:
443
443
  dwAccess = win32.THREAD_QUERY_INFORMATION
444
- return win32.GetExitCodeThread( self.get_handle(dwAccess) )
444
+ return win32.GetExitCodeThread(self.get_handle(dwAccess))
445
445
 
446
- #------------------------------------------------------------------------------
446
+ # ------------------------------------------------------------------------------
447
447
 
448
448
  # XXX TODO
449
449
  # Support for string searches on the window captions.
@@ -457,16 +457,13 @@ class Thread (object):
457
457
  process = self.get_process()
458
458
  except Exception:
459
459
  process = None
460
- return [
461
- Window( hWnd, process, self ) \
462
- for hWnd in win32.EnumThreadWindows( self.get_tid() )
463
- ]
460
+ return [Window(hWnd, process, self) for hWnd in win32.EnumThreadWindows(self.get_tid())]
464
461
 
465
- #------------------------------------------------------------------------------
462
+ # ------------------------------------------------------------------------------
466
463
 
467
464
  # TODO
468
465
  # A registers cache could be implemented here.
469
- def get_context(self, ContextFlags = None, bSuspend = False):
466
+ def get_context(self, ContextFlags=None, bSuspend=False):
470
467
  """
471
468
  Retrieves the execution context (i.e. the registers values) for this
472
469
  thread.
@@ -523,37 +520,30 @@ class Thread (object):
523
520
 
524
521
  # If an exception is raised, make sure the thread execution is resumed.
525
522
  try:
526
-
527
523
  if win32.bits == self.get_bits():
528
-
529
524
  # 64 bit debugger attached to 64 bit process, or
530
525
  # 32 bit debugger attached to 32 bit process.
531
- ctx = win32.GetThreadContext(hThread,
532
- ContextFlags = ContextFlags)
526
+ ctx = win32.GetThreadContext(hThread, ContextFlags=ContextFlags)
533
527
 
534
528
  else:
535
529
  if self.is_wow64():
536
-
537
530
  # 64 bit debugger attached to 32 bit process.
538
531
  if ContextFlags is not None:
539
532
  ContextFlags &= ~win32.ContextArchMask
540
- ContextFlags |= win32.WOW64_CONTEXT_i386
533
+ ContextFlags |= win32.WOW64_CONTEXT_i386
541
534
  ctx = win32.Wow64GetThreadContext(hThread, ContextFlags)
542
535
 
543
536
  else:
544
-
545
537
  # 32 bit debugger attached to 64 bit process.
546
538
  # XXX only i386/AMD64 is supported in this particular case
547
539
  if win32.arch not in (win32.ARCH_I386, win32.ARCH_AMD64):
548
540
  raise NotImplementedError()
549
541
  if ContextFlags is not None:
550
542
  ContextFlags &= ~win32.ContextArchMask
551
- ContextFlags |= win32.context_amd64.CONTEXT_AMD64
552
- ctx = win32.context_amd64.GetThreadContext(hThread,
553
- ContextFlags = ContextFlags)
543
+ ContextFlags |= win32.context_amd64.CONTEXT_AMD64
544
+ ctx = win32.context_amd64.GetThreadContext(hThread, ContextFlags=ContextFlags)
554
545
 
555
546
  finally:
556
-
557
547
  # Resume the thread if we suspended it.
558
548
  if bSuspend:
559
549
  self.resume()
@@ -561,7 +551,7 @@ class Thread (object):
561
551
  # Return the context.
562
552
  return ctx
563
553
 
564
- def set_context(self, context, bSuspend = False):
554
+ def set_context(self, context, bSuspend=False):
565
555
  """
566
556
  Sets the values of the registers.
567
557
 
@@ -614,7 +604,7 @@ class Thread (object):
614
604
  @rtype: int
615
605
  @return: Value of the requested register.
616
606
  """
617
- 'Returns the value of a specific register.'
607
+ "Returns the value of a specific register."
618
608
  context = self.get_context()
619
609
  return context[register]
620
610
 
@@ -632,7 +622,7 @@ class Thread (object):
632
622
  context[register] = value
633
623
  self.set_context(context)
634
624
 
635
- #------------------------------------------------------------------------------
625
+ # ------------------------------------------------------------------------------
636
626
 
637
627
  # TODO: a metaclass would do a better job instead of checking the platform
638
628
  # during module import, also would support mixing 32 and 64 bits
@@ -698,26 +688,27 @@ class Thread (object):
698
688
  context.fp = fp
699
689
  self.set_context(context)
700
690
 
701
- #------------------------------------------------------------------------------
691
+ # ------------------------------------------------------------------------------
702
692
 
703
693
  if win32.arch in (win32.ARCH_I386, win32.ARCH_AMD64):
704
694
 
705
- class Flags (object):
706
- 'Commonly used processor flags'
707
- Overflow = 0x800
708
- Direction = 0x400
709
- Interrupts = 0x200
710
- Trap = 0x100
711
- Sign = 0x80
712
- Zero = 0x40
695
+ class Flags(object):
696
+ "Commonly used processor flags"
697
+
698
+ Overflow = 0x800
699
+ Direction = 0x400
700
+ Interrupts = 0x200
701
+ Trap = 0x100
702
+ Sign = 0x80
703
+ Zero = 0x40
713
704
  # 0x20 ???
714
- Auxiliary = 0x10
705
+ Auxiliary = 0x10
715
706
  # 0x8 ???
716
- Parity = 0x4
707
+ Parity = 0x4
717
708
  # 0x2 ???
718
- Carry = 0x1
709
+ Carry = 0x1
719
710
 
720
- def get_flags(self, FlagMask = 0xFFFFFFFF):
711
+ def get_flags(self, FlagMask=0xFFFFFFFF):
721
712
  """
722
713
  @type FlagMask: int
723
714
  @param FlagMask: (Optional) Bitwise-AND mask.
@@ -726,9 +717,9 @@ class Thread (object):
726
717
  @return: Flags register contents, optionally masking out some bits.
727
718
  """
728
719
  context = self.get_context(win32.CONTEXT_CONTROL)
729
- return context['EFlags'] & FlagMask
720
+ return context["EFlags"] & FlagMask
730
721
 
731
- def set_flags(self, eflags, FlagMask = 0xFFFFFFFF):
722
+ def set_flags(self, eflags, FlagMask=0xFFFFFFFF):
732
723
  """
733
724
  Sets the flags register, optionally masking some bits.
734
725
 
@@ -739,7 +730,7 @@ class Thread (object):
739
730
  @param FlagMask: (Optional) Bitwise-AND mask.
740
731
  """
741
732
  context = self.get_context(win32.CONTEXT_CONTROL)
742
- context['EFlags'] = (context['EFlags'] & FlagMask) | eflags
733
+ context["EFlags"] = (context["EFlags"] & FlagMask) | eflags
743
734
  self.set_context(context)
744
735
 
745
736
  def get_flag_value(self, FlagBit):
@@ -750,7 +741,7 @@ class Thread (object):
750
741
  @rtype: bool
751
742
  @return: Boolean value of the requested flag.
752
743
  """
753
- return bool( self.get_flags(FlagBit) )
744
+ return bool(self.get_flags(FlagBit))
754
745
 
755
746
  def set_flag_value(self, FlagBit, FlagValue):
756
747
  """
@@ -805,46 +796,46 @@ class Thread (object):
805
796
  return self.get_flag_value(self.Flags.Trap)
806
797
 
807
798
  def clear_zf(self):
808
- 'Clears the Zero flag.'
799
+ "Clears the Zero flag."
809
800
  self.set_flag_value(self.Flags.Zero, False)
810
801
 
811
802
  def clear_cf(self):
812
- 'Clears the Carry flag.'
803
+ "Clears the Carry flag."
813
804
  self.set_flag_value(self.Flags.Carry, False)
814
805
 
815
806
  def clear_sf(self):
816
- 'Clears the Sign flag.'
807
+ "Clears the Sign flag."
817
808
  self.set_flag_value(self.Flags.Sign, False)
818
809
 
819
810
  def clear_df(self):
820
- 'Clears the Direction flag.'
811
+ "Clears the Direction flag."
821
812
  self.set_flag_value(self.Flags.Direction, False)
822
813
 
823
814
  def clear_tf(self):
824
- 'Clears the Trap flag.'
815
+ "Clears the Trap flag."
825
816
  self.set_flag_value(self.Flags.Trap, False)
826
817
 
827
818
  def set_zf(self):
828
- 'Sets the Zero flag.'
819
+ "Sets the Zero flag."
829
820
  self.set_flag_value(self.Flags.Zero, True)
830
821
 
831
822
  def set_cf(self):
832
- 'Sets the Carry flag.'
823
+ "Sets the Carry flag."
833
824
  self.set_flag_value(self.Flags.Carry, True)
834
825
 
835
826
  def set_sf(self):
836
- 'Sets the Sign flag.'
827
+ "Sets the Sign flag."
837
828
  self.set_flag_value(self.Flags.Sign, True)
838
829
 
839
830
  def set_df(self):
840
- 'Sets the Direction flag.'
831
+ "Sets the Direction flag."
841
832
  self.set_flag_value(self.Flags.Direction, True)
842
833
 
843
834
  def set_tf(self):
844
- 'Sets the Trap flag.'
835
+ "Sets the Trap flag."
845
836
  self.set_flag_value(self.Flags.Trap, True)
846
837
 
847
- #------------------------------------------------------------------------------
838
+ # ------------------------------------------------------------------------------
848
839
 
849
840
  def is_wow64(self):
850
841
  """
@@ -866,7 +857,7 @@ class Thread (object):
866
857
  try:
867
858
  wow64 = self.__wow64
868
859
  except AttributeError:
869
- if (win32.bits == 32 and not win32.wow64):
860
+ if win32.bits == 32 and not win32.wow64:
870
861
  wow64 = False
871
862
  else:
872
863
  wow64 = self.get_process().is_wow64()
@@ -909,8 +900,9 @@ class Thread (object):
909
900
  events, and thus said events won't be sent to the debugger.
910
901
  """
911
902
  return win32.NtQueryInformationThread(
912
- self.get_handle(), # XXX what permissions do I need?
913
- win32.ThreadHideFromDebugger)
903
+ self.get_handle(), # XXX what permissions do I need?
904
+ win32.ThreadHideFromDebugger,
905
+ )
914
906
 
915
907
  def get_teb(self):
916
908
  """
@@ -921,8 +913,7 @@ class Thread (object):
921
913
  @return: TEB structure.
922
914
  @raise WindowsError: An exception is raised on error.
923
915
  """
924
- return self.get_process().read_structure( self.get_teb_address(),
925
- win32.TEB )
916
+ return self.get_process().read_structure(self.get_teb_address(), win32.TEB)
926
917
 
927
918
  def get_teb_address(self):
928
919
  """
@@ -937,11 +928,10 @@ class Thread (object):
937
928
  except AttributeError:
938
929
  try:
939
930
  hThread = self.get_handle(win32.THREAD_QUERY_INFORMATION)
940
- tbi = win32.NtQueryInformationThread( hThread,
941
- win32.ThreadBasicInformation)
931
+ tbi = win32.NtQueryInformationThread(hThread, win32.ThreadBasicInformation)
942
932
  address = tbi.TebBaseAddress
943
933
  except WindowsError:
944
- address = self.get_linear_address('SegFs', 0) # fs:[0]
934
+ address = self.get_linear_address("SegFs", 0) # fs:[0]
945
935
  if not address:
946
936
  raise
947
937
  self._teb_ptr = address
@@ -969,20 +959,19 @@ class Thread (object):
969
959
  The current architecture does not support selectors.
970
960
  Selectors only exist in x86-based systems.
971
961
  """
972
- hThread = self.get_handle(win32.THREAD_QUERY_INFORMATION)
962
+ hThread = self.get_handle(win32.THREAD_QUERY_INFORMATION)
973
963
  selector = self.get_register(segment)
974
- ldt = win32.GetThreadSelectorEntry(hThread, selector)
975
- BaseLow = ldt.BaseLow
976
- BaseMid = ldt.HighWord.Bytes.BaseMid << 16
977
- BaseHi = ldt.HighWord.Bytes.BaseHi << 24
978
- Base = BaseLow | BaseMid | BaseHi
964
+ ldt = win32.GetThreadSelectorEntry(hThread, selector)
965
+ BaseLow = ldt.BaseLow
966
+ BaseMid = ldt.HighWord.Bytes.BaseMid << 16
967
+ BaseHi = ldt.HighWord.Bytes.BaseHi << 24
968
+ Base = BaseLow | BaseMid | BaseHi
979
969
  LimitLow = ldt.LimitLow
980
- LimitHi = ldt.HighWord.Bits.LimitHi << 16
981
- Limit = LimitLow | LimitHi
970
+ LimitHi = ldt.HighWord.Bits.LimitHi << 16
971
+ Limit = LimitLow | LimitHi
982
972
  if address > Limit:
983
973
  msg = "Address %s too large for segment %s (selector %d)"
984
- msg = msg % (HexDump.address(address, self.get_bits()),
985
- segment, selector)
974
+ msg = msg % (HexDump.address(address, self.get_bits()), segment, selector)
986
975
  raise ValueError(msg)
987
976
  return Base + address
988
977
 
@@ -991,7 +980,7 @@ class Thread (object):
991
980
  @rtype: str
992
981
  @return: Label that points to the instruction currently being executed.
993
982
  """
994
- return self.get_process().get_label_at_address( self.get_pc() )
983
+ return self.get_process().get_label_at_address(self.get_pc())
995
984
 
996
985
  def get_seh_chain_pointer(self):
997
986
  """
@@ -1006,12 +995,11 @@ class Thread (object):
1006
995
  This method is only supported in 32 bits versions of Windows.
1007
996
  """
1008
997
  if win32.arch != win32.ARCH_I386:
1009
- raise NotImplementedError(
1010
- "SEH chain parsing is only supported in 32-bit Windows.")
998
+ raise NotImplementedError("SEH chain parsing is only supported in 32-bit Windows.")
1011
999
 
1012
1000
  process = self.get_process()
1013
- address = self.get_linear_address( 'SegFs', 0 )
1014
- return process.read_pointer( address )
1001
+ address = self.get_linear_address("SegFs", 0)
1002
+ return process.read_pointer(address)
1015
1003
 
1016
1004
  def set_seh_chain_pointer(self, value):
1017
1005
  """
@@ -1026,12 +1014,11 @@ class Thread (object):
1026
1014
  This method is only supported in 32 bits versions of Windows.
1027
1015
  """
1028
1016
  if win32.arch != win32.ARCH_I386:
1029
- raise NotImplementedError(
1030
- "SEH chain parsing is only supported in 32-bit Windows.")
1017
+ raise NotImplementedError("SEH chain parsing is only supported in 32-bit Windows.")
1031
1018
 
1032
1019
  process = self.get_process()
1033
- address = self.get_linear_address( 'SegFs', 0 )
1034
- process.write_pointer( address, value )
1020
+ address = self.get_linear_address("SegFs", 0)
1021
+ process.write_pointer(address, value)
1035
1022
 
1036
1023
  def get_seh_chain(self):
1037
1024
  """
@@ -1051,11 +1038,11 @@ class Thread (object):
1051
1038
  process = self.get_process()
1052
1039
  seh = self.get_seh_chain_pointer()
1053
1040
  while seh != 0xFFFFFFFF:
1054
- seh_func = process.read_pointer( seh + 4 )
1055
- seh_chain.append( (seh, seh_func) )
1056
- seh = process.read_pointer( seh )
1041
+ seh_func = process.read_pointer(seh + 4)
1042
+ seh_chain.append((seh, seh_func))
1043
+ seh = process.read_pointer(seh)
1057
1044
  except WindowsError:
1058
- seh_chain.append( (seh, None) )
1045
+ seh_chain.append((seh, None))
1059
1046
  return seh_chain
1060
1047
 
1061
1048
  def get_wait_chain(self):
@@ -1073,7 +1060,7 @@ class Thread (object):
1073
1060
  U{http://msdn.microsoft.com/en-us/library/ms681622%28VS.85%29.aspx}
1074
1061
  """
1075
1062
  with win32.OpenThreadWaitChainSession() as hWct:
1076
- return win32.GetThreadWaitChain(hWct, ThreadId = self.get_tid())
1063
+ return win32.GetThreadWaitChain(hWct, ThreadId=self.get_tid())
1077
1064
 
1078
1065
  def get_stack_range(self):
1079
1066
  """
@@ -1087,10 +1074,9 @@ class Thread (object):
1087
1074
  # TODO use teb.DeallocationStack too (max. possible stack size)
1088
1075
  teb = self.get_teb()
1089
1076
  tib = teb.NtTib
1090
- return ( tib.StackLimit, tib.StackBase ) # top, bottom
1077
+ return (tib.StackLimit, tib.StackBase) # top, bottom
1091
1078
 
1092
- def __get_stack_trace(self, depth = 16, bUseLabels = True,
1093
- bMakePretty = True):
1079
+ def __get_stack_trace(self, depth=16, bUseLabels=True, bMakePretty=True):
1094
1080
  """
1095
1081
  Tries to get a stack trace for the current function using the debug
1096
1082
  helper API (dbghelp.dll).
@@ -1133,15 +1119,13 @@ class Thread (object):
1133
1119
  msg = "Stack walking is not available for this architecture: %s"
1134
1120
  raise NotImplementedError(msg % arch)
1135
1121
 
1136
- hProcess = aProcess.get_handle( win32.PROCESS_VM_READ |
1137
- win32.PROCESS_QUERY_INFORMATION )
1138
- hThread = self.get_handle( win32.THREAD_GET_CONTEXT |
1139
- win32.THREAD_QUERY_INFORMATION )
1122
+ hProcess = aProcess.get_handle(win32.PROCESS_VM_READ | win32.PROCESS_QUERY_INFORMATION)
1123
+ hThread = self.get_handle(win32.THREAD_GET_CONTEXT | win32.THREAD_QUERY_INFORMATION)
1140
1124
 
1141
1125
  StackFrame = win32.STACKFRAME64()
1142
- StackFrame.AddrPC = win32.ADDRESS64( self.get_pc() )
1143
- StackFrame.AddrFrame = win32.ADDRESS64( self.get_fp() )
1144
- StackFrame.AddrStack = win32.ADDRESS64( self.get_sp() )
1126
+ StackFrame.AddrPC = win32.ADDRESS64(self.get_pc())
1127
+ StackFrame.AddrFrame = win32.ADDRESS64(self.get_fp())
1128
+ StackFrame.AddrStack = win32.ADDRESS64(self.get_sp())
1145
1129
 
1146
1130
  trace = list()
1147
1131
  while win32.StackWalk64(MachineType, hProcess, hThread, StackFrame):
@@ -1162,15 +1146,14 @@ class Thread (object):
1162
1146
  if bUseLabels:
1163
1147
  label = aProcess.get_label_at_address(ra)
1164
1148
  if bMakePretty:
1165
- label = '%s (%s)' % (HexDump.address(ra, bits), label)
1166
- trace.append( (fp, label) )
1149
+ label = "%s (%s)" % (HexDump.address(ra, bits), label)
1150
+ trace.append((fp, label))
1167
1151
  else:
1168
- trace.append( (fp, ra, lib) )
1152
+ trace.append((fp, ra, lib))
1169
1153
  fp = aProcess.peek_pointer(fp)
1170
1154
  return tuple(trace)
1171
1155
 
1172
- def __get_stack_trace_manually(self, depth = 16, bUseLabels = True,
1173
- bMakePretty = True):
1156
+ def __get_stack_trace_manually(self, depth=16, bUseLabels=True, bMakePretty=True):
1174
1157
  """
1175
1158
  Tries to get a stack trace for the current function.
1176
1159
  Only works for functions with standard prologue and epilogue.
@@ -1199,9 +1182,9 @@ class Thread (object):
1199
1182
  @raise WindowsError: Raises an exception on error.
1200
1183
  """
1201
1184
  aProcess = self.get_process()
1202
- st, sb = self.get_stack_range() # top, bottom
1203
- fp = self.get_fp()
1204
- trace = list()
1185
+ st, sb = self.get_stack_range() # top, bottom
1186
+ fp = self.get_fp()
1187
+ trace = list()
1205
1188
  if aProcess.get_module_count() == 0:
1206
1189
  aProcess.scan_modules()
1207
1190
  bits = aProcess.get_bits()
@@ -1210,7 +1193,7 @@ class Thread (object):
1210
1193
  break
1211
1194
  if not st <= fp < sb:
1212
1195
  break
1213
- ra = aProcess.peek_pointer(fp + 4)
1196
+ ra = aProcess.peek_pointer(fp + 4)
1214
1197
  if ra == 0:
1215
1198
  break
1216
1199
  lib = aProcess.get_module_at_address(ra)
@@ -1224,14 +1207,14 @@ class Thread (object):
1224
1207
  if bUseLabels:
1225
1208
  label = aProcess.get_label_at_address(ra)
1226
1209
  if bMakePretty:
1227
- label = '%s (%s)' % (HexDump.address(ra, bits), label)
1228
- trace.append( (fp, label) )
1210
+ label = "%s (%s)" % (HexDump.address(ra, bits), label)
1211
+ trace.append((fp, label))
1229
1212
  else:
1230
- trace.append( (fp, ra, lib) )
1213
+ trace.append((fp, ra, lib))
1231
1214
  fp = aProcess.peek_pointer(fp)
1232
1215
  return tuple(trace)
1233
1216
 
1234
- def get_stack_trace(self, depth = 16):
1217
+ def get_stack_trace(self, depth=16):
1235
1218
  """
1236
1219
  Tries to get a stack trace for the current function.
1237
1220
  Only works for functions with standard prologue and epilogue.
@@ -1249,13 +1232,14 @@ class Thread (object):
1249
1232
  trace = self.__get_stack_trace(depth, False)
1250
1233
  except Exception:
1251
1234
  import traceback
1235
+
1252
1236
  traceback.print_exc()
1253
1237
  trace = ()
1254
1238
  if not trace:
1255
1239
  trace = self.__get_stack_trace_manually(depth, False)
1256
1240
  return trace
1257
1241
 
1258
- def get_stack_trace_with_labels(self, depth = 16, bMakePretty = True):
1242
+ def get_stack_trace_with_labels(self, depth=16, bMakePretty=True):
1259
1243
  """
1260
1244
  Tries to get a stack trace for the current function.
1261
1245
  Only works for functions with standard prologue and epilogue.
@@ -1300,19 +1284,19 @@ class Thread (object):
1300
1284
 
1301
1285
  @raise WindowsError: An error occured when getting the thread context.
1302
1286
  """
1303
- st, sb = self.get_stack_range() # top, bottom
1304
- sp = self.get_sp()
1305
- fp = self.get_fp()
1306
- size = fp - sp
1287
+ st, sb = self.get_stack_range() # top, bottom
1288
+ sp = self.get_sp()
1289
+ fp = self.get_fp()
1290
+ size = fp - sp
1307
1291
  if not st <= sp < sb:
1308
- raise RuntimeError('Stack pointer lies outside the stack')
1292
+ raise RuntimeError("Stack pointer lies outside the stack")
1309
1293
  if not st <= fp < sb:
1310
- raise RuntimeError('Frame pointer lies outside the stack')
1294
+ raise RuntimeError("Frame pointer lies outside the stack")
1311
1295
  if sp > fp:
1312
- raise RuntimeError('No valid stack frame found')
1296
+ raise RuntimeError("No valid stack frame found")
1313
1297
  return (sp, fp)
1314
1298
 
1315
- def get_stack_frame(self, max_size = None):
1299
+ def get_stack_frame(self, max_size=None):
1316
1300
  """
1317
1301
  Reads the contents of the current stack frame.
1318
1302
  Only works for functions with standard prologue and epilogue.
@@ -1332,13 +1316,13 @@ class Thread (object):
1332
1316
  @raise WindowsError: An error occured when getting the thread context
1333
1317
  or reading data from the process memory.
1334
1318
  """
1335
- sp, fp = self.get_stack_frame_range()
1336
- size = fp - sp
1319
+ sp, fp = self.get_stack_frame_range()
1320
+ size = fp - sp
1337
1321
  if max_size and size > max_size:
1338
1322
  size = max_size
1339
1323
  return self.get_process().peek(sp, size)
1340
1324
 
1341
- def read_stack_data(self, size = 128, offset = 0):
1325
+ def read_stack_data(self, size=128, offset=0):
1342
1326
  """
1343
1327
  Reads the contents of the top of the stack.
1344
1328
 
@@ -1356,7 +1340,7 @@ class Thread (object):
1356
1340
  aProcess = self.get_process()
1357
1341
  return aProcess.read(self.get_sp() + offset, size)
1358
1342
 
1359
- def peek_stack_data(self, size = 128, offset = 0):
1343
+ def peek_stack_data(self, size=128, offset=0):
1360
1344
  """
1361
1345
  Tries to read the contents of the top of the stack.
1362
1346
 
@@ -1373,7 +1357,7 @@ class Thread (object):
1373
1357
  aProcess = self.get_process()
1374
1358
  return aProcess.peek(self.get_sp() + offset, size)
1375
1359
 
1376
- def read_stack_dwords(self, count, offset = 0):
1360
+ def read_stack_dwords(self, count, offset=0):
1377
1361
  """
1378
1362
  Reads DWORDs from the top of the stack.
1379
1363
 
@@ -1390,10 +1374,10 @@ class Thread (object):
1390
1374
  """
1391
1375
  if count > 0:
1392
1376
  stackData = self.read_stack_data(count * 4, offset)
1393
- return struct.unpack('<'+('L'*count), stackData)
1377
+ return struct.unpack("<" + ("L" * count), stackData)
1394
1378
  return ()
1395
1379
 
1396
- def peek_stack_dwords(self, count, offset = 0):
1380
+ def peek_stack_dwords(self, count, offset=0):
1397
1381
  """
1398
1382
  Tries to read DWORDs from the top of the stack.
1399
1383
 
@@ -1409,12 +1393,12 @@ class Thread (object):
1409
1393
  """
1410
1394
  stackData = self.peek_stack_data(count * 4, offset)
1411
1395
  if len(stackData) & 3:
1412
- stackData = stackData[:-len(stackData) & 3]
1396
+ stackData = stackData[: -len(stackData) & 3]
1413
1397
  if not stackData:
1414
1398
  return ()
1415
- return struct.unpack('<'+('L'*count), stackData)
1399
+ return struct.unpack("<" + ("L" * count), stackData)
1416
1400
 
1417
- def read_stack_qwords(self, count, offset = 0):
1401
+ def read_stack_qwords(self, count, offset=0):
1418
1402
  """
1419
1403
  Reads QWORDs from the top of the stack.
1420
1404
 
@@ -1430,9 +1414,9 @@ class Thread (object):
1430
1414
  @raise WindowsError: Could not read the requested data.
1431
1415
  """
1432
1416
  stackData = self.read_stack_data(count * 8, offset)
1433
- return struct.unpack('<'+('Q'*count), stackData)
1417
+ return struct.unpack("<" + ("Q" * count), stackData)
1434
1418
 
1435
- def peek_stack_qwords(self, count, offset = 0):
1419
+ def peek_stack_qwords(self, count, offset=0):
1436
1420
  """
1437
1421
  Tries to read QWORDs from the top of the stack.
1438
1422
 
@@ -1448,12 +1432,12 @@ class Thread (object):
1448
1432
  """
1449
1433
  stackData = self.peek_stack_data(count * 8, offset)
1450
1434
  if len(stackData) & 7:
1451
- stackData = stackData[:-len(stackData) & 7]
1435
+ stackData = stackData[: -len(stackData) & 7]
1452
1436
  if not stackData:
1453
1437
  return ()
1454
- return struct.unpack('<'+('Q'*count), stackData)
1438
+ return struct.unpack("<" + ("Q" * count), stackData)
1455
1439
 
1456
- def read_stack_structure(self, structure, offset = 0):
1440
+ def read_stack_structure(self, structure, offset=0):
1457
1441
  """
1458
1442
  Reads the given structure at the top of the stack.
1459
1443
 
@@ -1468,12 +1452,11 @@ class Thread (object):
1468
1452
  @return: Tuple of elements read from the stack. The type of each
1469
1453
  element matches the types in the stack frame structure.
1470
1454
  """
1471
- aProcess = self.get_process()
1455
+ aProcess = self.get_process()
1472
1456
  stackData = aProcess.read_structure(self.get_sp() + offset, structure)
1473
- return tuple([ stackData.__getattribute__(name)
1474
- for (name, type) in stackData._fields_ ])
1457
+ return tuple([stackData.__getattribute__(name) for (name, type) in stackData._fields_])
1475
1458
 
1476
- def read_stack_frame(self, structure, offset = 0):
1459
+ def read_stack_frame(self, structure, offset=0):
1477
1460
  """
1478
1461
  Reads the stack frame of the thread.
1479
1462
 
@@ -1488,12 +1471,11 @@ class Thread (object):
1488
1471
  @return: Tuple of elements read from the stack frame. The type of each
1489
1472
  element matches the types in the stack frame structure.
1490
1473
  """
1491
- aProcess = self.get_process()
1474
+ aProcess = self.get_process()
1492
1475
  stackData = aProcess.read_structure(self.get_fp() + offset, structure)
1493
- return tuple([ stackData.__getattribute__(name)
1494
- for (name, type) in stackData._fields_ ])
1476
+ return tuple([stackData.__getattribute__(name) for (name, type) in stackData._fields_])
1495
1477
 
1496
- def read_code_bytes(self, size = 128, offset = 0):
1478
+ def read_code_bytes(self, size=128, offset=0):
1497
1479
  """
1498
1480
  Tries to read some bytes of the code currently being executed.
1499
1481
 
@@ -1510,7 +1492,7 @@ class Thread (object):
1510
1492
  """
1511
1493
  return self.get_process().read(self.get_pc() + offset, size)
1512
1494
 
1513
- def peek_code_bytes(self, size = 128, offset = 0):
1495
+ def peek_code_bytes(self, size=128, offset=0):
1514
1496
  """
1515
1497
  Tries to read some bytes of the code currently being executed.
1516
1498
 
@@ -1526,7 +1508,7 @@ class Thread (object):
1526
1508
  """
1527
1509
  return self.get_process().peek(self.get_pc() + offset, size)
1528
1510
 
1529
- def peek_pointers_in_registers(self, peekSize = 16, context = None):
1511
+ def peek_pointers_in_registers(self, peekSize=16, context=None):
1530
1512
  """
1531
1513
  Tries to guess which values in the registers are valid pointers,
1532
1514
  and reads some data from them.
@@ -1542,23 +1524,20 @@ class Thread (object):
1542
1524
  @rtype: dict( str S{->} str )
1543
1525
  @return: Dictionary mapping register names to the data they point to.
1544
1526
  """
1545
- peekable_registers = (
1546
- 'Eax', 'Ebx', 'Ecx', 'Edx', 'Esi', 'Edi', 'Ebp'
1547
- )
1527
+ peekable_registers = ("Eax", "Ebx", "Ecx", "Edx", "Esi", "Edi", "Ebp")
1548
1528
  if not context:
1549
- context = self.get_context(win32.CONTEXT_CONTROL | \
1550
- win32.CONTEXT_INTEGER)
1551
- aProcess = self.get_process()
1552
- data = dict()
1553
- for (reg_name, reg_value) in compat.iteritems(context):
1529
+ context = self.get_context(win32.CONTEXT_CONTROL | win32.CONTEXT_INTEGER)
1530
+ aProcess = self.get_process()
1531
+ data = dict()
1532
+ for reg_name, reg_value in compat.iteritems(context):
1554
1533
  if reg_name not in peekable_registers:
1555
1534
  continue
1556
- ## if reg_name == 'Ebp':
1557
- ## stack_begin, stack_end = self.get_stack_range()
1558
- ## print hex(stack_end), hex(reg_value), hex(stack_begin)
1559
- ## if stack_begin and stack_end and stack_end < stack_begin and \
1560
- ## stack_begin <= reg_value <= stack_end:
1561
- ## continue
1535
+ ## if reg_name == 'Ebp':
1536
+ ## stack_begin, stack_end = self.get_stack_range()
1537
+ ## print hex(stack_end), hex(reg_value), hex(stack_begin)
1538
+ ## if stack_begin and stack_end and stack_end < stack_begin and \
1539
+ ## stack_begin <= reg_value <= stack_end:
1540
+ ## continue
1562
1541
  reg_data = aProcess.peek(reg_value, peekSize)
1563
1542
  if reg_data:
1564
1543
  data[reg_name] = reg_data
@@ -1566,7 +1545,7 @@ class Thread (object):
1566
1545
 
1567
1546
  # TODO
1568
1547
  # try to avoid reading the same page twice by caching it
1569
- def peek_pointers_in_data(self, data, peekSize = 16, peekStep = 1):
1548
+ def peek_pointers_in_data(self, data, peekSize=16, peekStep=1):
1570
1549
  """
1571
1550
  Tries to guess which values in the given data are valid pointers,
1572
1551
  and reads some data from them.
@@ -1589,7 +1568,7 @@ class Thread (object):
1589
1568
  aProcess = self.get_process()
1590
1569
  return aProcess.peek_pointers_in_data(data, peekSize, peekStep)
1591
1570
 
1592
- #------------------------------------------------------------------------------
1571
+ # ------------------------------------------------------------------------------
1593
1572
 
1594
1573
  # TODO
1595
1574
  # The disassemble_around and disassemble_around_pc methods
@@ -1637,7 +1616,7 @@ class Thread (object):
1637
1616
  aProcess = self.get_process()
1638
1617
  return aProcess.disassemble(lpAddress, dwSize)
1639
1618
 
1640
- def disassemble_around(self, lpAddress, dwSize = 64):
1619
+ def disassemble_around(self, lpAddress, dwSize=64):
1641
1620
  """
1642
1621
  Disassemble around the given address.
1643
1622
 
@@ -1659,7 +1638,7 @@ class Thread (object):
1659
1638
  aProcess = self.get_process()
1660
1639
  return aProcess.disassemble_around(lpAddress, dwSize)
1661
1640
 
1662
- def disassemble_around_pc(self, dwSize = 64):
1641
+ def disassemble_around_pc(self, dwSize=64):
1663
1642
  """
1664
1643
  Disassemble around the program counter of the given thread.
1665
1644
 
@@ -1708,11 +1687,13 @@ class Thread (object):
1708
1687
  - Disassembly line of instruction.
1709
1688
  - Hexadecimal dump of instruction.
1710
1689
  """
1711
- return self.disassemble_instruction( self.get_pc() )
1690
+ return self.disassemble_instruction(self.get_pc())
1691
+
1692
+
1693
+ # ==============================================================================
1712
1694
 
1713
- #==============================================================================
1714
1695
 
1715
- class _ThreadContainer (object):
1696
+ class _ThreadContainer(object):
1716
1697
  """
1717
1698
  Encapsulates the capability to contain Thread objects.
1718
1699
 
@@ -1830,9 +1811,9 @@ class _ThreadContainer (object):
1830
1811
  self.__initialize_snapshot()
1831
1812
  return len(self.__threadDict)
1832
1813
 
1833
- #------------------------------------------------------------------------------
1814
+ # ------------------------------------------------------------------------------
1834
1815
 
1835
- def find_threads_by_name(self, name, bExactMatch = True):
1816
+ def find_threads_by_name(self, name, bExactMatch=True):
1836
1817
  """
1837
1818
  Find threads by name, using different search methods.
1838
1819
 
@@ -1872,7 +1853,7 @@ class _ThreadContainer (object):
1872
1853
 
1873
1854
  return found_threads
1874
1855
 
1875
- #------------------------------------------------------------------------------
1856
+ # ------------------------------------------------------------------------------
1876
1857
 
1877
1858
  # XXX TODO
1878
1859
  # Support for string searches on the window captions.
@@ -1884,12 +1865,12 @@ class _ThreadContainer (object):
1884
1865
  """
1885
1866
  window_list = list()
1886
1867
  for thread in self.iter_threads():
1887
- window_list.extend( thread.get_windows() )
1868
+ window_list.extend(thread.get_windows())
1888
1869
  return window_list
1889
1870
 
1890
- #------------------------------------------------------------------------------
1871
+ # ------------------------------------------------------------------------------
1891
1872
 
1892
- def start_thread(self, lpStartAddress, lpParameter=0, bSuspended = False):
1873
+ def start_thread(self, lpStartAddress, lpParameter=0, bSuspended=False):
1893
1874
  """
1894
1875
  Remotely creates a new thread in the process.
1895
1876
 
@@ -1907,18 +1888,19 @@ class _ThreadContainer (object):
1907
1888
  dwCreationFlags = win32.CREATE_SUSPENDED
1908
1889
  else:
1909
1890
  dwCreationFlags = 0
1910
- hProcess = self.get_handle( win32.PROCESS_CREATE_THREAD |
1911
- win32.PROCESS_QUERY_INFORMATION |
1912
- win32.PROCESS_VM_OPERATION |
1913
- win32.PROCESS_VM_WRITE |
1914
- win32.PROCESS_VM_READ )
1915
- hThread, dwThreadId = win32.CreateRemoteThread(
1916
- hProcess, 0, 0, lpStartAddress, lpParameter, dwCreationFlags)
1891
+ hProcess = self.get_handle(
1892
+ win32.PROCESS_CREATE_THREAD
1893
+ | win32.PROCESS_QUERY_INFORMATION
1894
+ | win32.PROCESS_VM_OPERATION
1895
+ | win32.PROCESS_VM_WRITE
1896
+ | win32.PROCESS_VM_READ
1897
+ )
1898
+ hThread, dwThreadId = win32.CreateRemoteThread(hProcess, 0, 0, lpStartAddress, lpParameter, dwCreationFlags)
1917
1899
  aThread = Thread(dwThreadId, hThread, self)
1918
1900
  self._add_thread(aThread)
1919
1901
  return aThread
1920
1902
 
1921
- #------------------------------------------------------------------------------
1903
+ # ------------------------------------------------------------------------------
1922
1904
 
1923
1905
  # TODO
1924
1906
  # maybe put all the toolhelp code into their own set of classes?
@@ -1942,11 +1924,10 @@ class _ThreadContainer (object):
1942
1924
  if dwProcessId in (0, 4, 8):
1943
1925
  return
1944
1926
 
1945
- ## dead_tids = set( self.get_thread_ids() ) # XXX triggers a scan
1946
- dead_tids = self._get_thread_ids()
1927
+ ## dead_tids = set( self.get_thread_ids() ) # XXX triggers a scan
1928
+ dead_tids = self._get_thread_ids()
1947
1929
  dwProcessId = self.get_pid()
1948
- hSnapshot = win32.CreateToolhelp32Snapshot(win32.TH32CS_SNAPTHREAD,
1949
- dwProcessId)
1930
+ hSnapshot = win32.CreateToolhelp32Snapshot(win32.TH32CS_SNAPTHREAD, dwProcessId)
1950
1931
  try:
1951
1932
  te = win32.Thread32First(hSnapshot)
1952
1933
  while te is not None:
@@ -1954,9 +1935,9 @@ class _ThreadContainer (object):
1954
1935
  dwThreadId = te.th32ThreadID
1955
1936
  if dwThreadId in dead_tids:
1956
1937
  dead_tids.remove(dwThreadId)
1957
- ## if not self.has_thread(dwThreadId): # XXX triggers a scan
1938
+ ## if not self.has_thread(dwThreadId): # XXX triggers a scan
1958
1939
  if not self._has_thread_id(dwThreadId):
1959
- aThread = Thread(dwThreadId, process = self)
1940
+ aThread = Thread(dwThreadId, process=self)
1960
1941
  self._add_thread(aThread)
1961
1942
  te = win32.Thread32Next(hSnapshot)
1962
1943
  finally:
@@ -1998,7 +1979,7 @@ class _ThreadContainer (object):
1998
1979
  except Exception:
1999
1980
  pass
2000
1981
 
2001
- #------------------------------------------------------------------------------
1982
+ # ------------------------------------------------------------------------------
2002
1983
 
2003
1984
  # XXX _notify_* methods should not trigger a scan
2004
1985
 
@@ -2009,17 +1990,17 @@ class _ThreadContainer (object):
2009
1990
  @type aThread: L{Thread}
2010
1991
  @param aThread: Thread object.
2011
1992
  """
2012
- ## if not isinstance(aThread, Thread):
2013
- ## if hasattr(aThread, '__class__'):
2014
- ## typename = aThread.__class__.__name__
2015
- ## else:
2016
- ## typename = str(type(aThread))
2017
- ## msg = "Expected Thread, got %s instead" % typename
2018
- ## raise TypeError(msg)
1993
+ ## if not isinstance(aThread, Thread):
1994
+ ## if hasattr(aThread, '__class__'):
1995
+ ## typename = aThread.__class__.__name__
1996
+ ## else:
1997
+ ## typename = str(type(aThread))
1998
+ ## msg = "Expected Thread, got %s instead" % typename
1999
+ ## raise TypeError(msg)
2019
2000
  dwThreadId = aThread.dwThreadId
2020
- ## if dwThreadId in self.__threadDict:
2021
- ## msg = "Already have a Thread object with ID %d" % dwThreadId
2022
- ## raise KeyError(msg)
2001
+ ## if dwThreadId in self.__threadDict:
2002
+ ## msg = "Already have a Thread object with ID %d" % dwThreadId
2003
+ ## raise KeyError(msg)
2023
2004
  aThread.set_process(self)
2024
2005
  self.__threadDict[dwThreadId] = aThread
2025
2006
 
@@ -2038,7 +2019,7 @@ class _ThreadContainer (object):
2038
2019
  msg = "Unknown thread ID %d" % dwThreadId
2039
2020
  warnings.warn(msg, RuntimeWarning)
2040
2021
  if aThread:
2041
- aThread.clear() # remove circular references
2022
+ aThread.clear() # remove circular references
2042
2023
 
2043
2024
  def _has_thread_id(self, dwThreadId):
2044
2025
  """
@@ -2061,16 +2042,16 @@ class _ThreadContainer (object):
2061
2042
  @type event: L{Event}
2062
2043
  @param event: Event object.
2063
2044
  """
2064
- dwThreadId = event.get_tid()
2065
- hThread = event.get_thread_handle()
2066
- ## if not self.has_thread(dwThreadId): # XXX this would trigger a scan
2045
+ dwThreadId = event.get_tid()
2046
+ hThread = event.get_thread_handle()
2047
+ ## if not self.has_thread(dwThreadId): # XXX this would trigger a scan
2067
2048
  if not self._has_thread_id(dwThreadId):
2068
2049
  aThread = Thread(dwThreadId, hThread, self)
2069
- teb_ptr = event.get_teb() # remember the TEB pointer
2050
+ teb_ptr = event.get_teb() # remember the TEB pointer
2070
2051
  if teb_ptr:
2071
2052
  aThread._teb_ptr = teb_ptr
2072
2053
  self._add_thread(aThread)
2073
- #else:
2054
+ # else:
2074
2055
  # aThread = self.get_thread(dwThreadId)
2075
2056
  # if hThread != win32.INVALID_HANDLE_VALUE:
2076
2057
  # aThread.hThread = hThread # may have more privileges
@@ -2121,7 +2102,7 @@ class _ThreadContainer (object):
2121
2102
  @return: C{True} to call the user-defined handle, C{False} otherwise.
2122
2103
  """
2123
2104
  dwThreadId = event.get_tid()
2124
- ## if self.has_thread(dwThreadId): # XXX this would trigger a scan
2105
+ ## if self.has_thread(dwThreadId): # XXX this would trigger a scan
2125
2106
  if self._has_thread_id(dwThreadId):
2126
2107
  self._del_thread(dwThreadId)
2127
2108
  return True