scripts/toolchain-config.in
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Wed May 25 20:23:48 2011 +0200 (2011-05-25)
branch1.11
changeset 2552 cc285cc98e65
parent 1098 035f231898cc
child 2614 814ea73df7e0
permissions -rw-r--r--
debug/gdb: fix runtime sysroot

This patch sets the runtime sysroot to fix the following GDB warning:
"Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code."

The sysroot can later be changed within gdb with the `set sysroot`
command if necessary.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
(transplanted from 7690196856ce4a4700d1887cc3adf80acc627c52)
yann@894
     1
#!/bin/sh
yann@894
     2
yann@894
     3
SKIP_ME="### CT_NG SKIP ME ###"
yann@1189
     4
skip_me=$(($(cat "${0}" |@@grep@@ --binary-files=text -o -b -E "^${SKIP_ME}$" |cut -d : -f 1)+${#SKIP_ME}+1))
yann@894
     5
dd if="${0}" bs=${skip_me} skip=1 2>/dev/null |bzcat
yann@894
     6
exit 0
yann@894
     7
yann@894
     8
### CT_NG SKIP ME ###