[webkit-dev] Debugging Webkit?

Chinmaya Sn chinmaya at gmail.com
Tue Jul 13 19:08:44 PDT 2010


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> 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
> 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/20100713/966c690d/attachment.html>


More information about the webkit-dev mailing list