Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "adrian.freihofer@gmail.com" <adrian.freihofer@gmail.com>
To: enguerrand.de-ribaucourt@savoirfairelinux.com,
	 openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: Re: [OE-core] [PATCH 13/20] devtool: ide-sdk: parse Rust debug path remaps
Date: Thu, 29 Oct 2026 00:16:54 +0100	[thread overview]
Message-ID: <63d7a5c552ad2521cc9f66a9aa17273fc11522ba.camel@gmail.com> (raw)
In-Reply-To: <20261026-devtool-ide-sdk-cargo-v1-13-d4504e124d07@savoirfairelinux.com>

On Mon, 2026-10-26 at 09:55 +0100, Enguerrand de Ribaucourt via
lists.openembedded.org wrote:
> Use Cargo RUSTFLAGS to populate reverse debug mappings and recognize
> Rust
> --remap-path-prefix alongside the existing GCC prefix-map options.
> The
> following LLDB source-map change depends on these normalized
> mappings.
> 
> AI-Generated: Uses GitHub Copilot
> Signed-off-by: Enguerrand de Ribaucourt
> <enguerrand.de-ribaucourt@savoirfairelinux.com>
> ---
>  scripts/lib/devtool/ide_sdk.py | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/lib/devtool/ide_sdk.py
> b/scripts/lib/devtool/ide_sdk.py
> index 44429e80b0..f22a98cedf 100755
> --- a/scripts/lib/devtool/ide_sdk.py
> +++ b/scripts/lib/devtool/ide_sdk.py
> @@ -1140,6 +1140,9 @@ class RecipeModified:
>          if self.build_tool is BuildTool.KERNEL_MODULE:
>              self.reverse_debug_prefix_map =
> self._init_reverse_debug_prefix_map(
>                  self.kernel_cc)
> +        elif self.build_tool is BuildTool.CARGO:
> +            self.reverse_debug_prefix_map =
> self._init_reverse_debug_prefix_map(
> +                self.cargo_rustflags)
>          else:
>              self.reverse_debug_prefix_map =
> self._init_reverse_debug_prefix_map(
>                  recipe_d.getVar('DEBUG_PREFIX_MAP'))
> @@ -1292,15 +1295,20 @@ class RecipeModified:
>          return ':'.join(self.solib_search_path(image))
>  
>      def _init_reverse_debug_prefix_map(self, debug_prefix_map):
> -        """Parses GCC map options and returns a mapping of target to
> host paths.
> +        """Parses compiler map options and returns a mapping of
> target to host paths.
>  
> -        This function scans a string containing GCC options such as
> -fdebug-prefix-map,
> +        This function scans a string containing compiler options
> such as -fdebug-prefix-map,
>          -fmacro-prefix-map, and -ffile-prefix-map (in both '--option
> value' and '--option=value'
>          forms), extracting all mappings from target paths (used in
> debug info) to host source
>          paths. If multiple mappings for the same target path are
> found, the most suitable
>          host path is selected (preferring 'sources' over 'build'
> directories).
>          """
> -        prefixes = ("-fdebug-prefix-map", "-fmacro-prefix-map", "-
> ffile-prefix-map")
> +        prefixes = (
> +            "-fdebug-prefix-map",
> +            "-fmacro-prefix-map",
> +            "-ffile-prefix-map",
> +            "--remap-path-prefix",

mapping.split('=', 1) splits --remap-path-prefix mappings on the first
=, but rustc splits on the last. It only matters for paths containing
=; .

Regards,
Adrian

> +        )
>          all_mappings = {}
>          args = shlex.split(debug_prefix_map)
>          i = 0
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#248650):
> https://lists.openembedded.org/g/openembedded-core/message/248650
> Mute This Topic: https://lists.openembedded.org/mt/121938793/4454582
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe:
> https://lists.openembedded.org/g/openembedded-core/unsub [
> adrian.freihofer@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2026-10-28 23:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  8:55 [PATCH 00/20] devtool: ide-sdk: add support for Rust recipes Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 01/20] cargo-example: add minimal selftest fixture Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 02/20] devtool: ide-sdk: capture Cargo cross environment Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 03/20] devtool: ide-sdk: export recipe Cargo configuration Enguerrand de Ribaucourt
2026-10-28 22:40   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 04/20] devtool: ide-sdk: recommend Rust Analyzer for Cargo Enguerrand de Ribaucourt
2026-10-28 22:48   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 05/20] devtool: ide-sdk: configure " Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 06/20] devtool: ide-sdk: share IntelliSense architecture mapping Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 07/20] devtool: ide-sdk: configure Cargo C++ IntelliSense Enguerrand de Ribaucourt
2026-10-28 22:59   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 08/20] devtool: ide-sdk: generalize binary install task name Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 09/20] devtool: ide-sdk: extract install task definition Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 10/20] devtool: ide-sdk: order install after optional build task Enguerrand de Ribaucourt
2026-10-28 23:01   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 11/20] devtool: ide-sdk: add Cargo " Enguerrand de Ribaucourt
2026-10-28 23:04   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 12/20] devtool: ide-sdk: enforce LLDB for Cargo Enguerrand de Ribaucourt
2026-10-28 23:08   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 13/20] devtool: ide-sdk: parse Rust debug path remaps Enguerrand de Ribaucourt
2026-10-28 23:16   ` adrian.freihofer [this message]
2026-10-26  8:55 ` [PATCH 14/20] devtool: ide-sdk: remap Cargo sources for BitBake builds Enguerrand de Ribaucourt
2026-10-28 23:28   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 15/20] devtool: ide-sdk: map Cargo workspace sources for LLDB Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 16/20] devtool: ide-sdk: map libstd-rs sources to Rust SDK Enguerrand de Ribaucourt
2026-10-28 23:23   ` [OE-core] " adrian.freihofer
2026-10-26  8:55 ` [PATCH 17/20] oeqa/selftest: share source breakpoint lookup Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 18/20] oeqa/selftest: run IDE tasks with configured environment Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 19/20] oeqa/selftest: debug Cargo example over QEMU slirp Enguerrand de Ribaucourt
2026-10-26  8:55 ` [PATCH 20/20] oeqa/selftest: verify Cargo rebuild and redeploy Enguerrand de Ribaucourt
2026-10-28 23:30 ` [OE-core] [PATCH 00/20] devtool: ide-sdk: add support for Rust recipes adrian.freihofer

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=63d7a5c552ad2521cc9f66a9aa17273fc11522ba.camel@gmail.com \
    --to=adrian.freihofer@gmail.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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