Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Stanislav Malyshev
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/objectmonito

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Sebastian Kurfürst
Hi Mathieu, I've figured out that it always worked with GDB when specifying the file name like Derick suggested (break objectmonitor.c and saying "yes" at the question) -- that was a problem on my side when calling the script. However, in Eclipse, it still did not work nicely, i.e. the breakpoint

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread mathieu.suen
One quick but ugly way is to add it in assembler in your C file: __asm__("int3"); or something like this. Sebastian Kurfürst wrote: Hi Derick, Try just "break objectmonitor.c:80". Thanks, just tried that, but same issue: (gdb) break objectmonitor.c:80 No source file named objec

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Sebastian Kurfürst
Hi Derick, > Try just "break objectmonitor.c:80". > Thanks, just tried that, but same issue: (gdb) break objectmonitor.c:80 No source file named objectmonitor.c. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (objectmonitor.c:80) pending. (gdb) run index.php -

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Sebastian Kurfürst
Hey, thanks for your quick replies. I'm definitely using a debug build, both PHP core and my extension. Somehow I think I need to load the symbol table of the shared library into GDB, but I don't know how to do this... Regards, Sebastian -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Derick Rethans
On Thu, 22 Apr 2010, Sebastian Kurfürst wrote: > Hello everybody, > > [I hope this is the right list for this question, if not, it'd be great > if you could point me to the right direction]. > > I'm currently developing a PHP Extension which is built as dynamic > library, and not directly into P

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Antony Dovgal
On 22.04.2010 17:51, Sebastian Kurfürst wrote: > 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 > > When I run php with a script via "run index.php", the system does not > stop at

Re: [PHP-DEV] Debugging a PHP Extension via GDB

2010-04-22 Thread Alexey Zakhlestin
On 22.04.2010, at 17:51, Sebastian Kurfürst wrote: > Hello everybody, > > [I hope this is the right list for this question, if not, it'd be great > if you could point me to the right direction]. > > I'm currently developing a PHP Extension which is built as dynamic > library, and not directly i