Xcode can't find lldbinit.py path

261 views
Skip to first unread message

Tufan YAVAŞ

unread,
Nov 23, 2023, 8:54:35 AM11/23/23
to Chromium-dev

.lldbinit-Xcode

# So that lldbinit.py takes precedence.
script print("LLDB init script loaded successfully.")

script sys.path[:0] = ['/Users/user/Desktop/chromium/src/tools/lldb']
script import lldbinit


when I run any scheme it builds succesfully and launch succesfully but there is error below: 

LLDB init script loaded successfully.
[1122/211539.891753:FATAL:debugger_posix.cc(134)] Check failed: false. Detected lldb without sourcing //tools/lldb/lldbinit.py. lldb may not be able to find debug symbols. Please see debug instructions for using //tools/lldb/lldbinit.py:

https://chromium.googlesource.com/chromium/src/+/main/docs/lldbinit.md

To continue anyway, type 'continue' in lldb. To always skip this check, define an environment variable CHROMIUM_LLDBINIT_SOURCED=1

  File: /Users/user/Desktop/chromium/src/tools/lldb/lldbinit.py           

# Copyright 2019 The Chromium Authors

# 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

print("a", file=open("/Users/user/Desktop/a.txt", "w"))

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')


It can't find lldbinit.py path because it doesn't write anything to the /Users/user/Desktop/a.txt

Ming Chen

unread,
Dec 11, 2023, 7:09:39 AM12/11/23
to Chromium-dev, Tufan YAVAŞ
I also encountered the same problem. Did you solve it?
Reply all
Reply to author
Forward
0 new messages