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",
+        )
         all_mappings = {}
         args = shlex.split(debug_prefix_map)
         i = 0
