lldbinit.py 704 B

12345678910111213141516
  1. # Copyright 2019 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. # The GN arg `strip_absolute_paths_from_debug_symbols = 1` uses relative paths
  5. # for debug symbols. This confuses lldb. We explicitly set the source-map to
  6. # point at the root directory of the chromium checkout.
  7. import os
  8. import lldb
  9. this_dir = os.path.dirname(os.path.abspath(__file__))
  10. source_dir = os.path.join(os.path.join(this_dir, os.pardir), os.pardir)
  11. lldb.debugger.HandleCommand(
  12. 'settings set target.source-map ../.. ' + source_dir)
  13. lldb.debugger.HandleCommand(
  14. 'settings set target.env-vars CHROMIUM_LLDBINIT_SOURCED=1')