I'm debugging PHP 5.2.9 and everything works fine, but today during debugging I see that gdb don't stop when I set:
(gdb) break lstat
the breakpoint is in the list
(gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x00002aaaaf810ea0
but, as written before, during execution gdb don't stop when lstat function is called. Note that I'm sure that lstat is called by PHP engine because I can se开发者_如何学编程e the call using strace.
Please help me, what's wrong with gdb?
Try to set catchpoint on lstat syscall
(gdb) catch syscall lstat
Catchpoint 1 (syscall 'lstat' [107])
(gdb)
You will need gdb 7.0 or above
strace
is showing you that PHP is calling the system call lstat
, however your breakpoint is actually on the library function lstat()
. It's possible that it's a different library call that is directly calling the lstat
system call.
What does ltrace
show?
精彩评论