From 987436c90b82b765b55c72471d015c10ae917f37 Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Tue, 22 Sep 2020 21:01:31 -0700 Subject: [PATCH] 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 --- scripts/gdbclient.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gdbclient.py b/scripts/gdbclient.py index d7c8ecb8e..639f6e9d0 100755 --- a/scripts/gdbclient.py +++ b/scripts/gdbclient.py @@ -351,7 +351,9 @@ def generate_lldb_script(root, sysroot, binary_name, port, solib_search_path): '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)