mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
Improve the previous commit:
- log an error if some assumptions are not true
- Use TARGET_DBGSRC_DIR variable
- Do the same for ide none
Why the additional source mapping is required:
For example the cmake-example recipe refers to sources like this:
./recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-readelf \
-wi image/usr/bin/cmake-example | grep -B1 DW_AT_comp_dir
...
<560> DW_AT_name : (indirect line string, offset: 0x1da):
/usr/src/debug/cmake-example/1.0/oe-local-files/cpp-example.cpp
...
Another example is powertop:
./recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-readelf \
-wi image/usr/sbin/powertop | grep -B1 DW_AT_comp_dir
...
<561> DW_AT_name : (indirect line string, offset: 0x1da):
/usr/src/debug/powertop/2.15/src/devlist.cpp
...
For recipes with local files this works. The oe-local-files folder is
not available in the rootfs-dbg and therefore the sources are first
found in the workspace folder. GDB searches for source files in various
places:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Source-Path.html
However, for the powertop example the sources opened in the editor are
from the rootfs-dbg instead of from the workspace.
Bitbake calls the compiler with
-fmacro-prefix-map=${S}=${TARGET_DBGSRC_DIR}
where TARGET_DBGSRC_DIR defaults to "/usr/src/debug/${PN}/${PV}".
A source map which maps the recipe specific path from TARGET_DBGSRC_DIR
to the workspace fixes this.
The already existing source map for /usr/src/debug applies for all other
recipes. It finds the sources (read only) in the rootfs-dbg folder.
(From OE-Core rev: 06601632c1879cb80276f9b36de91fb7808311a5)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||
|---|---|---|
| .. | ||
| contrib | ||
| cross-intercept | ||
| esdk-tools | ||
| lib | ||
| native-intercept | ||
| nativesdk-intercept | ||
| postinst-intercepts | ||
| pybootchartgui | ||
| tiny | ||
| .oe-layers.json | ||
| autobuilder-worker-prereq-tests | ||
| bblock | ||
| bitbake-prserv-tool | ||
| buildall-qemu | ||
| buildhistory-collect-srcrevs | ||
| buildhistory-diff | ||
| buildstats-diff | ||
| buildstats-summary | ||
| combo-layer | ||
| combo-layer-hook-default.sh | ||
| combo-layer.conf.example | ||
| cp-noerror | ||
| create-pull-request | ||
| crosstap | ||
| devtool | ||
| gen-lockedsig-cache | ||
| gen-site-config | ||
| git | ||
| install-buildtools | ||
| multilib_header_wrapper.h | ||
| oe-build-perf-report | ||
| oe-build-perf-test | ||
| oe-buildenv-internal | ||
| oe-check-sstate | ||
| oe-debuginfod | ||
| oe-depends-dot | ||
| oe-find-native-sysroot | ||
| oe-git-archive | ||
| oe-git-proxy | ||
| oe-gnome-terminal-phonehome | ||
| oe-pkgdata-browser | ||
| oe-pkgdata-browser.glade | ||
| oe-pkgdata-util | ||
| oe-publish-sdk | ||
| oe-pylint | ||
| oe-run-native | ||
| oe-selftest | ||
| oe-setup-build | ||
| oe-setup-builddir | ||
| oe-setup-layers | ||
| oe-setup-vscode | ||
| oe-test | ||
| oe-time-dd-test.sh | ||
| oe-trim-schemas | ||
| oepydevshell-internal.py | ||
| opkg-query-helper.py | ||
| patchtest | ||
| patchtest-get-branch | ||
| patchtest-get-series | ||
| patchtest-send-results | ||
| patchtest-setup-sharedir | ||
| patchtest.README | ||
| pythondeps | ||
| README | ||
| recipetool | ||
| relocate_sdk.py | ||
| resulttool | ||
| rootfs_rpm-extract-postinst.awk | ||
| rpm2cpio.sh | ||
| runqemu | ||
| runqemu-addptable2image | ||
| runqemu-export-rootfs | ||
| runqemu-extract-sdk | ||
| runqemu-gen-tapdevs | ||
| runqemu-ifdown | ||
| runqemu-ifup | ||
| runqemu.README | ||
| send-error-report | ||
| send-pull-request | ||
| sstate-cache-management.py | ||
| sstate-diff-machines.sh | ||
| sstate-sysroot-cruft.sh | ||
| sysroot-relativelinks.py | ||
| task-time | ||
| test-reexec | ||
| test-remote-image | ||
| verify-bashisms | ||
| wic | ||
| yocto_testresults_query.py | ||
| yocto-check-layer | ||
| yocto-check-layer-wrapper | ||
This directory contains Various useful scripts for working with OE builds