Hi!
So far, I started gdb with "gdb /my/path/to/php" (which has debug
symbols enabled); and then tried to set a breakpoint into my extension via:
break /path/to/php/extension/objectmonitor/objectmonitor.c:80
GDB then asks:
No source file named /path/to/php/extension/objectmonitor/objectmonitor.c.
Make breakpoint pending on future shared library load? (y or [n]) y
That's probably because the module is not loaded yet and for some reason
gdb doesn't set the breakpoint correctly when it is (gdb is,
unfortunately, very far from perfect when it comes to dealing with
dynamic loading). What I would advise is to do this:
1. Set the breakpoint in compile_file() or execute(). If you need to
catch earlier phases, you can try php_request_startup().
2. By that time .so should be in, so try setting the breakpont
3. Continue execution.
Alternatively, you could just set the breakpoint in php_dl(), step
through it up to a point where your .so loads and add the breakpoint
then. It's a bit tedious, but should work.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com http://www.zend.com/
(408)253-8829 MSN: s...@zend.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php