http://www.jb51.net/article/76028.htm
http://rango.swoole.com/archives/325
http://phpor.net/blog/post/997
HTTP: //houjixin.blog.163 .com / Blog / static / 35628410201311241916314 /
<php function test1 ()? {
the while (to true) {
SLEEP (. 1);
}
}
test1 ();
?>
execution mode cli php script execution process number added to 14,973. We use gdb commands to debug the process.
GDB the sudo -p 14973 $
(GDB) Print (char *) executor_globals.active_op_array-> filename
$ = 0x9853a34. 1 "/home/xinhailong/test/php/test.php"
(GDB) Print (char *) executor_globals.active_op_array-> FUNCTION_NAME
$ 2 = 0x9854db8 "test1"
(GDB) Print executor_globals-> current_execute_data-> opline-> lineno
$. 3. 4 =
Obviously, he is performing sleep method of the fourth row.
If the above method you feel trouble, you can use .gdbinit file. This file is in the root directory of php source. Use as follows:
$ the sudo -p 14973 GDB
(GDB) Source /home/xinhailong/.gdbinit
(GDB) zbacktrace
[0xa453f34] SLEEP (. 1) /home/xinhailong/test/php/test.php:4
[0xa453ed0] test1 () /home/xinhailong/test/php/test.php:7
(gdb)
Transfer from: http: //www.linuxeden.com/html/news/20160330/165480.html
gdb php
Guess you like
Origin www.cnblogs.com/ginkgo-leaf/p/11490424.html
Ranking