From 1a84719e0b42782db96af9a07e40c16aa1c7be1f Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Tue, 11 Sep 2018 20:52:53 -0400 Subject: [PATCH 1/2] build luajit with debug symbols --- images/nginx/Makefile | 2 +- images/nginx/rootfs/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/nginx/Makefile b/images/nginx/Makefile index 5e11f4e6e..19528e00d 100644 --- a/images/nginx/Makefile +++ b/images/nginx/Makefile @@ -13,7 +13,7 @@ # limitations under the License. # 0.0.0 shouldn't clobber any released builds -TAG ?= 0.61 +TAG ?= 0.62 REGISTRY ?= quay.io/kubernetes-ingress-controller ARCH ?= $(shell go env GOARCH) DOCKER ?= docker diff --git a/images/nginx/rootfs/build.sh b/images/nginx/rootfs/build.sh index 8123f58fe..e28f37498 100755 --- a/images/nginx/rootfs/build.sh +++ b/images/nginx/rootfs/build.sh @@ -243,7 +243,7 @@ fi # luajit is not available on ppc64le and s390x if [[ (${ARCH} != "ppc64le") && (${ARCH} != "s390x") ]]; then cd "$BUILD_PATH/luajit2-2.1-20180420" - make + make CCDEBUG=-g make install export LUAJIT_LIB=/usr/local/lib From c83150739c2b86d887d1d6d6786fd1186a03e7ed Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Tue, 11 Sep 2018 20:55:35 -0400 Subject: [PATCH 2/2] install openresty-gdb-utils --- images/nginx/rootfs/build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/images/nginx/rootfs/build.sh b/images/nginx/rootfs/build.sh index e28f37498..8e6cdbe8a 100755 --- a/images/nginx/rootfs/build.sh +++ b/images/nginx/rootfs/build.sh @@ -282,6 +282,22 @@ if [[ (${ARCH} != "ppc64le") && (${ARCH} != "s390x") ]]; then /install_lua_resty_waf.sh fi +# install openresty-gdb-utils +cd / +git clone --depth=1 https://github.com/openresty/openresty-gdb-utils.git +cat > ~/.gdbinit << EOF +directory /openresty-gdb-utils + +py import sys +py sys.path.append("/openresty-gdb-utils") + +source luajit20.gdb +source ngx-lua.gdb +source luajit21.py +source ngx-raw-req.py +set python print-stack full +EOF + # build opentracing lib cd "$BUILD_PATH/opentracing-cpp-$OPENTRACING_CPP_VERSION" mkdir .build