php-spx
php-spx copied to clipboard
GDB support / debug build
Is there a way to configure and install this extension with gdb support? I prepared dev env for php-source, however GDB does not hit breakpoints.
I tried both VScode UI and GDB. Both say that module is not loaded.
No source file named /home/www/spx-src/src/spx_php.c.
Make breakpoint pending on future shared library load?
In case of VScode it shows message below and never hits breakpoints.
Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.
But some mentions of spx.so
are seen in stack trace with unknown source.
So only those that were set on core php are hit
As a workaround I tried __asm__("int3");
but it's not that convenient
Adding --enable-debug
to ./configure
should be enough to build it with debug symbols.
I'm a bit curious, what are you trying to achieve ?
I wanted to set up dev environment to dig into source code of spx and php, and nothing worked :(
--enable-debug
did not work.
Thanks for suggestion, I look through the source a bit more and I think it's because in config.m4
https://github.com/NoiseByNorthwest/php-spx/blob/master/config.m4#L17 the -g
flag is missing in CFLAGS
I managed to compile with debug symbols by adding -g
there and now it's working.