Reputation: 33
I was debugging V8 x64 Debug Version, it has all debug files, I built with debug files for debugging. But symbols not properly loading in GDB. I cannot search or set breakpoint by function names, and when it triggers it is giving multiple warning messages
NU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
GEF for linux ready, type `gef' to start, `gef config' to configure
89 commands loaded and 5 functions added for GDB 9.2 in 0.00ms using Python engine 3.8
Reading symbols from v8/out/x64.debug/d8...
warning: Could not find DWO CU obj/d8/d8.dwo(0xbad43b0798af8f6e) referenced by CU at offset 0xc0 [in module /home/user/V8/2020/v8/out/x64.debug/d8]
gef➤ r
Starting program: /home/user/V8/2020/v8/out/x64.debug/d8 --allow-natives-syntax
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3098700 (LWP 15345)]
[New Thread 0x7ffff2897700 (LWP 15346)]
V8 version 8.5.51
d8> ^C
Thread 1 "d8" received signal SIGINT, Interrupt.
__GI___libc_read (nbytes=0x400, buf=0x555555710eb0, fd=0x0) at ../sysdeps/unix/sysv/linux/read.c:26
26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory.
warning: Could not find DWO CU obj/d8/async-hooks-wrapper.dwo(0x8b18cdce576077a3) referenced by CU at offset 0x0 [in module /home/user/V8/2020/v8/out/x64.debug/d8]
warning: Could not find DWO CU obj/d8/d8-console.dwo(0x95a818df7e6b7bf3) referenced by CU at offset 0x34 [in module /home/user/V8/2020/v8/out/x64.debug/d8]
warning: Could not find DWO CU obj/d8/d8-js.dwo(0xaf722a5967a4a306) referenced by CU at offset 0x68 [in module /home/user/V8/2020/v8/out/x64.debug/d8]
warning: Could not find DWO CU obj/d8/d8-platforms.dwo(0xa3760e5b0c2de1da) referenced by CU at offset 0x8c [in module /home/user/V8/2020/v8/out/x64.debug/d8]
warning: Could not find DWO CU obj/d8/d8-posix.dwo(0xf4154270b654d114) referenced by CU at offset 0xf4 [in module /home/user/V8/2020/v8/out/x64.debug/d8]
I even built multiple times V8, and this issue still appears!
And warnings after breakpoint triggers
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
...
...
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
warning: (Internal error: pc 0x7ffff4688dd5 in read in CU, but not in symtab.)
V8 version 8.5.51 OS: 20.04.1 Ubuntu GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2 + GEF extension
I try to solve this issue:
Upvotes: 2
Views: 779
Reputation: 40661
Try sourcing V8's tools/gdbinit
from your ~/.gdbinit
. In addition to defining some useful macros, it also helps GDB find things. (I'm not sure whether this will fix your issue, but it's the first thing I'd try.)
A note on asking good SO questions:
Instead of saying that you "re-built V8 multiple times with different flags", it would be more useful to list the actual flags you used. Give anyone who's willing to volunteer their time to help you everything they need to reproduce your problem.
And a note on V8 version 8.5.51:
That's some random snapshot from 3.5 years ago. There is a very good chance that it contains various bugs, possibly including debuggability. Nobody should use it for anything. It became outdated and unsupported about two hours after its creation, when 8.5.52 was automatically tagged by the same bot. From your path names I guess that for some reason you're specifically interested in archeological versions, but you should be aware that "outdated and unsupported" means that when something doesn't work, you're on your own.
Upvotes: 1