summaryrefslogtreecommitdiff
path: root/buildstream/data
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2018-07-03 19:20:56 +0200
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-08-22 19:38:41 +0900
commitf4e51cf1042307cdd45ee34c761424e7848ccc26 (patch)
treea30506dd968ed147842e14d36db3ed94284db262 /buildstream/data
parentff52ae18cf779f109081c33937b8f123780b69b5 (diff)
downloadbuildstream-f4e51cf1042307cdd45ee34c761424e7848ccc26.tar.gz
Don't strip pathname from debug symbol files
When GDB looks for debug symbols it looks for the full path of the file inside the configured debug-file-directory. For example, if the debug-file-directory is set to a default of /usr/lib/debug, and you are debugging /usr/bin/python3, GDB will look for its debug symbols at this location: /usr/lib/debug/usr/bin/python3. BuildStream has been putting all debug files inside /usr/lib/debug under their $(basename), so in the above example GDB would fail to find any debug symbols for /usr/bin/python3 because they would be in the incorrect locatoin of /usr/lib/debug/python3.
Diffstat (limited to 'buildstream/data')
-rw-r--r--buildstream/data/projectconfig.yaml4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml
index 686040ee0..c1ad2d147 100644
--- a/buildstream/data/projectconfig.yaml
+++ b/buildstream/data/projectconfig.yaml
@@ -68,7 +68,7 @@ variables:
# Generic implementation for stripping debugging symbols
strip-binaries: |
- find "%{install-root}" -type f \
+ cd "%{install-root}" && find -type f \
'(' -perm -111 -o -name '*.so*' \
-o -name '*.cmxs' -o -name '*.node' ')' \
-exec sh -ec \
@@ -76,7 +76,7 @@ variables:
if [ "$hdr" != "$(printf \\x7fELF)" ]; then
exit 0
fi
- debugfile="%{install-root}%{debugdir}/$(basename "$1")"
+ debugfile="%{install-root}%{debugdir}/$1"
mkdir -p "$(dirname "$debugfile")"
objcopy %{objcopy-extract-args} "$1" "$debugfile"
chmod 644 "$debugfile"