Add source map for binaries from RBE
Binaries built from RBE are using a source path under /b/f/w. Also map that to local source path.
Test: lldbclient.py -r /system/bin/ls
Change-Id: I02a90a9c827189a14b2d83485ed2abda68f9e084
diff --git a/scripts/gdbclient.py b/scripts/gdbclient.py
index d7c8ecb..639f6e9 100755
--- a/scripts/gdbclient.py
+++ b/scripts/gdbclient.py
@@ -351,7 +351,9 @@
'settings append target.exec-search-paths {}'.format(' '.join(solib_search_path)))
commands.append('target create {}'.format(binary_name))
- commands.append("settings set target.source-map '' '{}'".format(root))
+ # For RBE support.
+ commands.append("settings append target.source-map '/b/f/w' '{}'".format(root))
+ commands.append("settings append target.source-map '' '{}'".format(root))
commands.append('target modules search-paths add / {}/'.format(sysroot))
commands.append('gdb-remote {}'.format(port))
return '\n'.join(commands)