Fixed
Created: Aug 10, 2022
Updated: Dec 20, 2022
Resolved Date: Nov 5, 2022
Found In Version: 10.21.20.13
Fix Version: 10.21.20.15
Severity: Severe
Applicable for: Wind River Linux LTS 21
Component/s: Userspace
32bit applications issues on new LTS21 64bit BSP which didn´t appear on old LTS18 64bit system.
When start debugging any of the applications with gdb on the target I get:
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
The customer said that libthread_db is available on the system.
1. $ git clone --branch WRLINUX_10_21_LTS https://gateway.delivers.windriver.com/git/linux-lts/release/wrlinux-lts.21/WRLinux-lts-21-Core/wrlinux-x
2. $ ./wrlinux-x/setup.sh --machines intel-x86-64 --dl-layers
3. $ . environment-setup-x86_64-wrlinuxsdk-linux
$ . oe-init-build-env wrl-intel-x86-64
4. add the following to conf/local.conf
WRTEMPLATE += " feature/busybox"
WRTEMPLATE += " feature/debug"
IMAGE_GEN_DEBUGFS = "1"
IMAGE_INSTALL_append = " lib32-libstdc++"
5. $ bitbake wrlinux-image-small
$ bitbake wrlinux-image-small -c populate_sdk
6 .Write the wic to USB key and start system from this device
7. Install the SDK to a development host in the directory /opt/windriver/sdk-x86-wr
Create sysroot directory on the development host using the archives from the build:
mkdir /home/developer/gdbtest/sysroot
cd /home/developer/gdbtest/sysroot
tar xf wrlinux-image-small-intel-x86-64.tar.bz2
tar xf wrlinux-image-small-intel-x86-64-dbg.tar.gz
8. Create a test program threadtest.cpp:
#include <iostream>
#include <thread>
int main()
{
std::thread thr{[]() {
std::cout << "Hello, world!\n";
}};
thr.join();
}
9. Build the application as 64bit and 32bit application:
source /opt/windriver/sdk-x86-wr/environment-setup-corei7-32-wrsmllib32-linux
$CXX -g -ggdb -Og -o threadtest32 threadtest.cpp -pthread
exit
source /opt/windriver/sdk-x86-wr/environment-setup-corei7-64-wrs-linux
$CXX -g -ggdb -Og -o threadtest64 threadtest.cpp -pthread
exit
10. Copy both applications to the target system.
Both applications are able to run on the target
11. When I start debugging any of the applications with gdb on the target I get:
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.