Debug chromium in xcode, only can use the symbol breakpoint now

467 views
Skip to first unread message

sakura sakura

unread,
Nov 11, 2019, 1:02:19 PM11/11/19
to Chromium-dev
I build the latest version of chromium and v8.
Mac 10.15, xcode 11.0

test.html in chromium

<html>
<script>
alert(1);
Math.sin(1);
alert(2);
</script>
</html>

(lldb) b v8::base::ieee754::sin
libv8.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
Breakpoint 2: where = libv8_libbase.dylib`v8::base::ieee754::sin(double) + 22 at ieee754.cc:2509:3, address = 0x00000001f01c74e6

(lldb) br list
Current breakpoints:
2: name = 'v8::base::ieee754::sin', locations = 1, resolved = 1, hit count = 1
2.1: where = libv8_libbase.dylib`v8::base::ieee754::sin(double) + 22 at ieee754.cc:2509:3, address = 0x00000001f01c74e6, resolved, hit count = 1

3: file = '/Volumes/sakura_T5/chromium/src/v8/src/base/ieee754.cc', line = 2504, exact_match = 0, locations = 0 (pending)

4: file = '/Volumes/sakura_T5/chromium/src/v8/src/base/ieee754.cc', line = 2512, exact_match = 0, locations = 0 (pending)

I find the file in the file list on the xcode left, apply my breakpoints.
but they are pending, only use symbol breakpoint(such as v8::base::ieee754::sin)

when I triggers the breakpoint, it just show assembly instead of source.

Is this a problem with the Chrome compilation option, or other reasons?

I build chromium and v8 by default method.
(autoninja -C out/Default chrome)

I can see the source directly on the lower version of chromium and v8 (such as v8 7.0.1) when trigger breakpoint, so I think this is not a problem with the Mac and xcode version.
QQ20191108-181953.png

Takuto Ikuta

unread,
Nov 11, 2019, 3:55:21 PM11/11/19
to eternal...@gmail.com, Chromium-dev

--
--
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/6767eab3-481a-4a63-84c0-2f5ef1a0b281%40chromium.org.

Claudio deSouza

unread,
Nov 13, 2019, 1:01:28 PM11/13/19
to Chromium-dev
You have to pass strip_absolute_paths_from_debug_symbols=false to gn (e.g. gn gen out/Default --args="strip_absolute_paths_from_debug_symbols=false")

I had the same problem as well. I'm not sure if this is the correct solution, and there's an open issue for this problem.

Claudio.

Nico Weber

unread,
Nov 26, 2019, 3:09:15 PM11/26/19
to Claudio M. D. Souza Junior, Chromium-dev
On Wed, Nov 13, 2019 at 1:01 PM Claudio deSouza <claudi...@gmail.com> wrote:
You have to pass strip_absolute_paths_from_debug_symbols=false to gn (e.g. gn gen out/Default --args="strip_absolute_paths_from_debug_symbols=false")

I had the same problem as well. I'm not sure if this is the correct solution, and there's an open issue for this problem.

As mentioned on the other thread, do _not_ set strip_absolute_paths_from_debug_symbols=false. This just suppresses problems that are elsewhere. (E.g. your Xcode might be too old.) We'll likely disable that toggle soon.
 

Claudio.

--
--
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.

xinggang ling

unread,
Sep 15, 2020, 5:42:50 PM9/15/20
to Chromium-dev, eternal...@gmail.com
same issue, how to resolve it? T_T,help me please

Bruce Dawson

unread,
Sep 16, 2020, 6:06:55 PM9/16/20
to Chromium-dev, ling...@163.com, eternal...@gmail.com
What gn args are you using? What commit are you synced to?


Remember that you need symbol_level=2 in order to get source-level debugging.

xinggang ling

unread,
Sep 29, 2020, 9:36:04 AM9/29/20
to Chromium-dev, Bruce Dawson, xinggang ling, eternal...@gmail.com
wow ~ it works expectly!!! 
thank you Bruce Dawson!!!
Reply all
Reply to author
Forward
0 new messages