gdb调试php代码提示No symbol "xxx" in current context解决方式

 

gdb调试php代码时提示

No symbol “HT_MIN_MASK” in current context

lALPDgQ9q4Rq7oDNAWnNA7Q_948_361

 

需要修改Makefile

 

image

 

源码编译php-7.1.0

 

 

cd /opt/apps
wget -O – ‘http://ftp.ntu.edu.tw/pub/php/distributions/php-7.1.0.tar.gz’ | tar -xz && cd php-*
./configure \
    –disable-all \
    –enable-debug \
    –enable-fpm \
    –enable-cli \
    –prefix=$PWD/dist
# Makefile
sed -i -E ‘s/^(CC = .*)/\1 -ggdb3 -fkeep-inline-functions/’ Makefile && grep ‘^CC = ‘ Makefile
sed -i -E ‘s/^(CFLAGS_CLEAN = -g)/\1gdb3 -fkeep-inline-functions/’ Makefile && grep ‘^CFLAGS_CLEAN = ‘ Makefile
sed -i -E ‘s/^(DEBUG_CFLAGS = .*)/\1 -g -O0/’ Makefile && grep ‘^DEBUG_CFLAGS = ‘ Makefile
make -j $(nproc) && make install

 

image

About 智足者富

http://chenpeng.info

发表评论

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>