kumquat-buildroot/toolchain/toolchain-external
Thomas De Schampheleire 049135c409 toolchain/toolchain-external: fixup gdb pretty-printer loader for libstdcxx
gcc installs a libstdcxx-...so-gdb.py file that gdb will load automatically
when it loads libstdcxx.so, via the mechanism described at [1].

However, the auto-load file installed by gcc contains hardcoded paths
referring to the location where the (external) toolchain was built, which
are normally not available.

Fix up the paths in the load file so that the pretty printers can be loaded
automatically.

Note that gdb will only auto-load the file if its location is marked as
'safe'. A subsequent commit will take care of that.

Technically, there could be more than one load file, e.g. in lib and
usr/lib, so fix them all. This was for example observed in
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64.
In a very specific case with a local custom toolchain, there were actually
two 'python' directories, which would break the sed command, so arbitrarily
limit to the first one encountered.

[1] https://sourceware.org/gdb/onlinedocs/gdb/objfile_002dgdbdotext-file.html

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-07-25 23:12:29 +02:00
..
toolchain-external-andes-nds32
toolchain-external-arm-aarch64
toolchain-external-arm-aarch64-be
toolchain-external-arm-arm
toolchain-external-bootlin
toolchain-external-codescape-img-mips
toolchain-external-codescape-mti-mips
toolchain-external-codesourcery-aarch64
toolchain-external-codesourcery-arm
toolchain-external-codesourcery-mips
toolchain-external-codesourcery-niosII
toolchain-external-custom {linux, linux-headers}: add version 5.13 2021-06-29 21:22:28 +02:00
toolchain-external-linaro-aarch64
toolchain-external-linaro-aarch64-be
toolchain-external-linaro-arm
toolchain-external-linaro-armeb
toolchain-external-synopsys-arc
Config.in
pkg-toolchain-external.mk toolchain/toolchain-external: fixup gdb pretty-printer loader for libstdcxx 2021-07-25 23:12:29 +02:00
toolchain-external.mk