File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,12 @@ Debug symbols
11
11
GDB requires debug symbols to map the memory addresses in your binary to the original position in your source code. To
12
12
generate debug symbols you need to pass the ``--enable-debug `` flag to the ``./configure `` script. To get even more
13
13
debugging information you may add the ``CFLAGS="-ggdb3" `` flag which will add support for macros.
14
+
15
+ Debugging the VM
16
+ ----------------
17
+
18
+ The VM lives in the big ``zend_vm_execute.h `` file that is generated by ``zend_vm_gen.php `` from ``zend_vm_def.h ``.
19
+ Debugging this file can be tedious because it is very large, and it's often not obvious which specialized handler
20
+ will run. Luckily, it is possible to debug ``zend_vm_def.h `` directly by generating the VM using the
21
+ ``php Zend/zend_vm_gen.php --with-lines `` command. This will annotate the code with the ``#line `` preprocessor directive
22
+ to allow the debugger to know the origin of the generated instructions.
You can’t perform that action at this time.
0 commit comments