[webkit-dev] Debugging Webkit?

Chang.Shu at nokia.com Chang.Shu at nokia.com
Tue Jul 13 19:21:54 PDT 2010


I once also had issues setting break points inside WebCore. Gdb claimed the break points have been set but the source code showing up after hitting the break point always messed up. The problem was resolved by updating my ubuntu to latest version (10.4LTS). I am not sure if this is the same problem you have.

Another tip is to check the size of your webcore.dll. It should be huge.

Hopefully it helps.

Chang

From: webkit-dev-bounces at lists.webkit.org [mailto:webkit-dev-bounces at lists.webkit.org] On Behalf Of ext Chinmaya Sn
Sent: Tuesday, July 13, 2010 10:09 PM
To: Yuchen Zhou
Cc: webkit-dev
Subject: Re: [webkit-dev] Debugging Webkit?

Try This
1. As you already did run ./buid-webkit --debug --qt
2. cd WEBKIT_DIR/WebKitBuild/Debug/bin
3. Assuming you have WEBKIT_DIR/WebCore , WEBKIT_DIR/WebKit source directories
    try
    $ gdb -cd . -d ../../../ --args ./QtLauncher <args-to-QtLauncher>
4. Now at gdb prompt
    (gdb) break main # to add breakpoint to main function
    (gdb) break WebCore::FrameLoader::init # make sure you use fully-qualified namespace

Alternatively
1. same as above
2. same as above
3. Create a text file with gdb commands
$ cat <<EOF > commands.txt
            start
            break main
            break WebCore::FrameLoader::init
            continue
EOF

4. run gdb as
$ gdb -x comands.txt -d ../../../ -cd . --args ./QtLauncher


Qt comes with (std distribution) with gdb 6.8 or something, if you gdb 7.01 or above
you will be able to leverage some of the python gdb scripts distributed with WebKit

See this WEBKIT_DIR/WebKitTools/gdb/webcore.py

--
Chinmaya

On Tue, Jul 13, 2010 at 8:22 PM, Yuchen Zhou <yz8ra at virginia.edu<mailto:yz8ra at virginia.edu>> wrote:
Hi all-

I am newbie to webkit dev and I am trying to debug Webkit with gdb. I tried to build the Qtwebkit with ./build-webkit --debug --qt, and then gdb WebKitBuild/Debug/bin/QtTestBrowser, however seems gdb was not able to add breakpoints for class::functions. It cannot find them. I wonder what is the debugging process for Qtwebkit.

Thanks all,

2010-07-13
________________________________
Yuchen

_______________________________________________
webkit-dev mailing list
webkit-dev at lists.webkit.org<mailto:webkit-dev at lists.webkit.org>
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



--
--
chinmaya sn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100714/486992ed/attachment.html>


More information about the webkit-dev mailing list