Skip to content

Commit 4e087db

Browse files
committed
Inline GDB script
1 parent c37f4dd commit 4e087db

File tree

7 files changed

+865
-3
lines changed

7 files changed

+865
-3
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
# Collapse generated files within git and pull request diff.
2323
**/*_arginfo.h linguist-generated -diff
24+
/main/gdb_inlined_script.c linguist-generated -diff
2425
/Zend/zend_vm_execute.h linguist-generated -diff
2526
/Zend/zend_vm_handlers.h linguist-generated -diff
2627
/Zend/zend_vm_opcodes.[ch] linguist-generated -diff

build/Makefile.global

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,10 @@ prof-use:
160160
fi; \
161161
fi;
162162

163+
$(srcdir)/main/gdb_inlined_script.c: $(srcdir)/tools/gdb/gen_gdb_inlined_script.php
164+
@if test ! -z "$(PHP)"; then \
165+
$(PHP) $(srcdir)/tools/gdb/gen_gdb_inlined_script.php; \
166+
fi;
167+
163168
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
164169
.NOEXPORT:

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,6 +1709,10 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c \
17091709
network.c php_open_temporary_file.c php_odbc_utils.c safe_bcmp.c \
17101710
output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
17111711

1712+
if printf "#if __ELF__\nelf\n#endif\n" | $CC -E - | grep elf > /dev/null; then
1713+
PHP_ADD_SOURCES(main, gdb_inlined_script.c)
1714+
fi
1715+
17121716
PHP_ADD_SOURCES_X(main, fastcgi.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, PHP_FASTCGI_OBJS, no)
17131717

17141718
PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \

0 commit comments

Comments
 (0)