From e00be058710a5fcb15d8703fdd54753141091e8c Mon Sep 17 00:00:00 2001 From: dutor <440396+dutor@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:01:40 +0800 Subject: [PATCH] Release with separate debug info in ELF format --- package/package.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/package.sh b/package/package.sh index d1561e18f00..590c6ded682 100755 --- a/package/package.sh +++ b/package/package.sh @@ -50,7 +50,7 @@ function _extra_release_variables { package_one="OFF" enable_compressed_debug_info="ON" dump_symbols="OFF" - fi + fi } _default_release_variables @@ -227,7 +227,15 @@ function dump_syms { tmp=${pack#nebula-graph} ver=${tmp%.*} + hash objcopy &> /dev/null || { + echo "'objcopy' is not installed" + exit 1 + } + for bin in nebula-graphd nebula-storaged nebula-metad; do + # Create separate debuginfo for GDB + objcopy --only-keep-debug ${build_dir}/bin/${bin} ${syms_dir}/${bin}${ver}.debug + # Create separate debuginfo for breakpad if ! (${dump_syms} ${build_dir}/bin/${bin} > ${syms_dir}/${bin}${ver}.sym); then echo ">>> dump ${bin} symbols failed: $?. <<<" exit 1