You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/debug.rst
+116-2Lines changed: 116 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@
7
7
8
8
See sample :ref:`sample_debugger`
9
9
10
+
.. note::
11
+
12
+
If you are interrested by symbols (PDB) handling, go to subsection :ref:`debug_symbols_module`
13
+
10
14
:class:`Debugger`
11
15
"""""""""""""""""
12
16
@@ -24,6 +28,13 @@ This means that those methods see the original ``current_process`` memory access
24
28
.. automethod:: __init__
25
29
26
30
31
+
:class:`SymbolDebugger`
32
+
"""""""""""""""""""""""
33
+
34
+
.. autoclass:: SymbolDebugger
35
+
:members:
36
+
:no-inherited-members:
37
+
27
38
28
39
:class:`LocalDebugger`
29
40
""""""""""""""""""""""
@@ -43,7 +54,6 @@ There is not much documentation for now as the code might change soon.
43
54
:members:
44
55
45
56
46
-
47
57
:class:`Breakpoint`
48
58
"""""""""""""""""""
49
59
@@ -99,4 +109,108 @@ When a breakpoint is hit, its ``trigger`` function is called with the debugger a
99
109
100
110
.. note::
101
111
102
-
See sample :ref:`sample_debugger_bp_functionbp`
112
+
See sample :ref:`sample_debugger_bp_functionbp`
113
+
114
+
115
+
.. _debug_symbols_module:
116
+
117
+
:mod:`windows.debug.symbols` -- Using symbols
118
+
"""""""""""""""""""""""""""""""""""""""""""""
119
+
120
+
.. module:: windows.debug.symbols
121
+
122
+
The :mod:`windows.debug.symbols` module provide classes to load PDB and resolve name/address.
123
+
In its current state, this module does not handle types.
124
+
125
+
.. note::
126
+
127
+
See sample <TODO>
128
+
129
+
130
+
Configuration
131
+
'''''''''''''
132
+
133
+
In order to be able to automatically download PDB and parse remote ``_NT_SYMBOL_PATH``, a debug version of the DLL `dbghelp.dll` must be used.
134
+
(See `MSDN: DbgHelp Versions <https://docs.microsoft.com/en-us/windows/win32/debug/dbghelp-versions>`_)
135
+
136
+
As it is NOT recommended to replace ``system32/dbghelp.dll``, its path must be provided to PythonForWindows.
137
+
This path must be provided before any call to the ``dbghelp.dll`` APIs.
138
+
Also, the ``symsrv.dll`` DLL should be present in the same directory as ``dbghelp.dll`` (See `SymSrv Installation <https://docs.microsoft.com/en-us/windows/win32/debug/using-symsrv#installation>`_)
139
+
140
+
There is 2 ways to pass this information to ``PythonForWindows``:
141
+
142
+
* Using the function :func:`set_dbghelp_path`
143
+
* Using the environment variable ``PFW_DBGHELP_PATH``
144
+
* If this variable exists it will simply trigger a call to ``set_dbghelp_path(PFW_DBGHELP_PATH)``
145
+
146
+
147
+
If the given path is a directory, the final path will be computer as ``path\<current_process_bitness>\dbghelp.dll``.
148
+
This allow to use the same script (or environment variable) transparently in bot 32b & 64b python interpreters.
149
+
150
+
.. note::
151
+
152
+
For example, on my computer my setup is done through the environment variable: ``PFW_DBGHELP_PATH=D:\pysym\bin``
0 commit comments