summaryrefslogtreecommitdiffstats
path: root/chromium/tools/lldb/lldbinit.py
blob: 8617b5c79fd788fcc0a4af649d606434b03f78ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# The GN arg `strip_absolute_paths_from_debug_symbols = 1` uses relative paths
# for debug symbols. This confuses lldb. We explicitly set the source-map to
# point at the root directory of the chromium checkout.
import os
import lldb
this_dir = os.path.dirname(os.path.abspath(__file__))
source_dir = os.path.join(os.path.join(this_dir, os.pardir), os.pardir)

lldb.debugger.HandleCommand(
    'settings set target.source-map ../.. ' + source_dir)
lldb.debugger.HandleCommand(
    'settings set target.env-vars CHROMIUM_LLDBINIT_SOURCED=1')