[PATCH 2 of 2] cross-gdb: fix runtime sysroot

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Wed May 25 17:29:00 GMT 2011


Benoit, All,

On Tuesday 24 May 2011 13:20:46 Benoît THÉBAUDEAU wrote:
> # HG changeset patch
> # User "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
> # Date 1306235541 -7200
> # Node ID 6f6493d05f127328c6168f0a381dbc1080f070c2
> # Parent  420687b63c9775201e84e40f76b4c176996e3bda
> cross-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>
> 
> diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
> --- a/scripts/build/debug/300-gdb.sh
> +++ b/scripts/build/debug/300-gdb.sh
> @@ -161,6 +161,7 @@
>              --target=${CT_TARGET}                       \
>              --prefix="${CT_PREFIX_DIR}"                 \
>              --with-build-sysroot="${CT_SYSROOT_DIR}"    \
> +            --with-sysroot="${CT_SYSROOT_DIR}"          \

How does the cross-gdb behaves if the toolchain is relocated? Is gdb able
to detect that, and adapt the sysroot accordingly, like gcc and ld do, or
is it simply hard-coded?

In case relocation does not work, then this would imply that the behavior
of the toolchain (as a whole) is different before and after relocation, in
the former case, sysroot is automatically detected, and in the latter case
the user would have to enter the sysroot location manually with 'set sysroot'.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list