buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Romain Naour <romain.naour@gmail.com>,
	Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCHv2 2/3] toolchain/toolchain-external: fixup gdb pretty-printer loader for libstdcxx
Date: Sun, 25 Jul 2021 23:23:07 +0200	[thread overview]
Message-ID: <20210725232307.777d4ba7@windsurf> (raw)
In-Reply-To: <20210608151840.20917-3-patrickdepinguin@gmail.com>

On Tue,  8 Jun 2021 17:18:38 +0200
Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:

> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> 
> 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.

So I wasn't really sure if turning them into absolute paths was really
the best way. For example, in the ARM AArch64 toolchain, the
libstdcxx-....so-gdb.py file contains relative paths.

But I checked, and the absolute paths get properly fixed up by
relocate-sdk.sh when using the SDK feature, so I believe it's good
enough.

> +	pythondir=$$(find $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) -path '*/libstdcxx/__init__.py' 2>/dev/null | xargs dirname | xargs dirname | head -n1); \

I found this xargs dirname | xargs dirname a bit odd, so I replaced
with a sed expression.

Applied, thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

  reply	other threads:[~2021-07-25 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 15:18 [Buildroot] [PATCHv2 0/3] Fix gdb pretty printers for libstdcxx Thomas De Schampheleire
2021-06-08 15:18 ` [Buildroot] [PATCHv2 1/3] package/gdb: fix gdb 9.2 segfault with Python 3.9 support Thomas De Schampheleire
2021-07-25 21:21   ` Thomas Petazzoni
2021-08-05 11:10   ` Peter Korsgaard
2021-06-08 15:18 ` [Buildroot] [PATCHv2 2/3] toolchain/toolchain-external: fixup gdb pretty-printer loader for libstdcxx Thomas De Schampheleire
2021-07-25 21:23   ` Thomas Petazzoni [this message]
2021-06-08 15:18 ` [Buildroot] [PATCHv2 3/3] toolchain: mark sysroot as 'safe' path for gdb auto-load Thomas De Schampheleire
2021-07-25 21:23   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210725232307.777d4ba7@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=patrickdepinguin@gmail.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.de_schampheleire@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).