Printing Chromium types for GDB comes errors

61 views
Skip to first unread message

Early

unread,
Apr 25, 2017, 1:25:55 AM4/25/17
to Chromium-dev
config GDB  for `Printing Chromium types`


Step 1: 
config ~/.gdbinit

add-auto-load-safe-path ~/chromium/
set auto-load python-scripts on

Step 2
add the code below into ~/chromium/.gdbinit:


python
import sys
sys
.path.insert(0, "~/chromium/src/third_party/WebKit/Tools/gdb/")
import webkit
sys
.path.insert(0, "~/chromium/src/tools/gdb/")
import gdb_chrome


Then, add this in .gdbinit get errors.

~/chromium$ gdb
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1) 7.12.50.20170314-git
Copyright (C) 2017 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:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
Traceback (most recent call last):
  File "~/chromium/src/tools/gdb/gdb_chrome.py", line 29, in <module>
ImportError: No module named 'webkit'
Traceback (most recent call last):
  File "<string>", line 3, in <module>
ImportError: No module named 'webkit'
.gdbinit:11: Error in sourced command file:
Error while executing Python code.
(gdb) info auto-load python-scripts
No auto-load scripts.
(gdb) info auto-load
gdb-scripts:  No auto-load scripts.
libthread-db:  No auto-loaded libthread-db.
local-gdbinit:  Local .gdbinit file "~/chromium/.gdbinit" has been loaded.
python-scripts:  No auto-load scripts.

What's wrong? Thanks in advance.

Christian Biesinger

unread,
Apr 25, 2017, 10:14:24 AM4/25/17
to Early, chromium-dev
I'm not sure you can use ~ in this context, does it work if you use the full path?

Christian

--
--
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 view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/ed41d59a-b827-4efa-ac05-5fc89788fbb2%40chromium.org.

Early

unread,
Apr 26, 2017, 10:40:45 PM4/26/17
to Chromium-dev, zjc...@gmail.com
It works... Thanks very much! :)
Reply all
Reply to author
Forward
0 new messages