Skip to content

Commit 9804aca

Browse files
committed
Merge branch 'topic/debug_info' into 'master'
Strip debug info into separate `.debug` files Closes #1135 See merge request eng/ide/ada_language_server!1203
2 parents b2760e1 + 7fffb9b commit 9804aca

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build-binaries.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export CPATH=/usr/local/include:/mingw64/include
2020
export LIBRARY_PATH=/usr/local/lib:/mingw64/lib
2121
export DYLD_LIBRARY_PATH=/usr/local/lib
2222
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
23+
export ADAFLAGS=-g1
2324
echo PATH=$PATH
2425

2526
BRANCH=master
@@ -78,5 +79,16 @@ if [ $RUNNER_OS = macOS ]; then
7879
fi
7980

8081
if [ "$DEBUG" != "debug" ]; then
81-
strip -v integration/vscode/ada/*/ada_language_server*
82+
if [ $RUNNER_OS = macOS ]; then
83+
# Install binutils to have objcopy on Mac OS X
84+
brew install binutils
85+
export PATH="/usr/local/opt/binutils/bin:$PATH"
86+
fi
87+
ALS=`ls integration/vscode/ada/*/ada_language_server*`
88+
objcopy --only-keep-debug ${ALS} ${ALS}.debug
89+
objcopy --strip-all ${ALS}
90+
cd `dirname $ALS`
91+
ALS=`basename ${ALS}`
92+
objcopy --add-gnu-debuglink=${ALS}.debug ${ALS}
93+
cd -
8294
fi

.github/workflows/pack-binaries.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function make_change_log()
1919

2020
chmod -R -v +x als-*-$DEBUG
2121
for X in Linux macOS Windows ; do mv -v -f als-$X-$DEBUG/* integration/vscode/ada/; done
22+
rm -f -v integration/vscode/ada/{linux,darwin,win32}/*.debug
2223
pushd integration/vscode/ada
2324
sed -i -e "/version/s/[0-9][0-9.]*/$TAG/" package.json
2425
[ -z "$DEBUG" ] || sed -i -e '/^ "name"/s/ada/ada-debug/' \

0 commit comments

Comments
 (0)