Debug in Xcode

201 views
Skip to first unread message

Andy

unread,
Jun 23, 2020, 6:15:42 PM6/23/20
to Chromium-dev
Hello all, 

I've followed all of the docs I can find, but somehow can't get Xcode 11.5 to show the source when hitting a breakpoint.

Steps:
1) Download Chromium source
2) Full build
3) Create an Xcode project file
4) Create lldbinit.py with the correct lldb path
5) Set breakpoint
6) Attach Xcode to the Chromium Helper (Plugin) process (Xcode waits to attach until it finds the process)
8) Start Chromium from terminal (I have tried with --no-sandbox as well)
/Users/andy/chromium_debug/chromium/src/out/Default/Chromium.app/Contents/MacOS/Chromium --enable-logging=stderr --vmodule=*video*=3

# Set build arguments here. See `gn help buildargs`.

target_os = "mac"
target_cpu = "x64"
is_debug = true
is_component_build = true
symbol_level = 2
enable_nacl = false

.lldbinit
# So that lldbinit.py takes precedence.

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


When the Xcode attaches to the process and I assume hits a breakpoint, I get the following in the logs and Xcode:

0623/154357.585093:FATAL:debugger_posix.cc(145)] 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:
To continue anyway, type 'continue' in lldb. To always skip this check, define an environment variable CHROMIUM_LLDBINIT_SOURCED=1



Any ideas?

Thanks in advance,

Andy

Takuto Ikuta

unread,
Jun 23, 2020, 6:26:57 PM6/23/20
to arah...@gmail.com, Chromium-dev
Do you have ~/.lldbinit-Xcode instead?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/21b94854-1c89-49fc-98c5-410fd84ae18fo%40chromium.org.

Andy

unread,
Jun 23, 2020, 11:10:23 PM6/23/20
to Chromium-dev, tik...@chromium.org, Chromium-dev, Andy
I tried changing the name and have the same issue...

"(lldb) image list" shows the dylibs with the correct path but they don't
seem to be loaded.

Thanks,

Andy


On Tuesday, June 23, 2020 at 6:26:57 PM UTC-4 tik...@chromium.org wrote:

> Do you have ~/.lldbinit-Xcode instead?
> https://lldb.llvm.org/man/lldb.html#configuration-files
>
> On Wed, Jun 24, 2020 at 7:14 AM Andy <arah...@gmail.com> wrote:
>
>> Hello all,
>>
>> I've followed all of the docs I can find, but somehow can't get Xcode
>> 11.5 to show the source when hitting a breakpoint.
>>

>> *Steps:*


>> 1) Download Chromium source
>> 2) Full build
>> 3) Create an Xcode project file
>> 4) Create lldbinit.py with the correct lldb path
>> 5) Set breakpoint
>> 6) Attach Xcode to the Chromium Helper (Plugin) process (Xcode waits to
>> attach until it finds the process)
>> 8) Start Chromium from terminal (I have tried with --no-sandbox as well)
>> /Users/andy/chromium_debug/chromium/src/out/Default/Chromium.app/Contents
>> /MacOS/Chromium --enable-logging=stderr --vmodule=*video*=3
>>

>> *args.gn <http://args.gn>*


>> # Set build arguments here. See `gn help buildargs`.
>>
>> target_os = "mac"
>> target_cpu = "x64"
>> is_debug = true
>> is_component_build = true
>> symbol_level = 2
>> enable_nacl = false
>>

>> *.lldbinit*


>> # So that lldbinit.py takes precedence.
>>
>> script sys.path[:0] = [
>> '/Users/andy/chromium_webcam_debug/chromium/src/tools/lldb']
>> script import lldbinit
>>
>>
>> When the Xcode attaches to the process and I assume hits a breakpoint, I
>> get the following in the logs and Xcode:
>>
>> 0623/154357.585093:FATAL:debugger_posix.cc(145)] 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/+/master/docs/lldbinit.md
>> To continue anyway, type 'continue' in lldb. To always skip this check,
>> define an environment variable CHROMIUM_LLDBINIT_SOURCED=1
>>
>>
>>

>> Any ideas?
>>
>> Thanks in advance,
>>
>> Andy
>>
>> --
>> --
>> Chromium Developers mailing list: chromi...@chromium.org
>> View archives, change email options, or unsubscribe:
>> http://groups.google.com/a/chromium.org/group/chromium-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Chromium-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to chromium-dev...@chromium.org.
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/21b94854-1c89-49fc-98c5-410fd84ae18fo%40chromium.org

>> <https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/21b94854-1c89-49fc-98c5-410fd84ae18fo%40chromium.org?utm_medium=email&utm_source=footer>
>> .
>>
>

xinggang ling

unread,
Sep 14, 2020, 5:52:02 PM9/14/20
to Chromium-dev, Andy
same issue, only symbolic breakpoint can be hit,

I had try
xcode 11.7
xcode 12 beta6
Reply all
Reply to author
Forward
0 new messages