Changes between Initial Version and Version 1 of WebKitGTK/Debugging


Ignore:
Timestamp:
Jun 19, 2013 8:55:47 AM (8 years ago)
Author:
Andres Gomez
Comment:

Initial editing

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/Debugging

    v1 v1  
     1[[PageOutline]]
     2
     3= Debugging WebKitGTK+ =
     4
     5You need a compilation with symbols (''take it easy as it'll take some time/hours''):
     6{{{
     7#!sh
     8$ Tools/Scripts/build-webkit --gtk --debug
     9}}}
     10
     11On 32-bits arch it is quite unlikely this build will succeed. If you need a build with debug symbols but still without ASSERTs enabled you can try these options:
     12{{{
     13#!sh
     14$ Tools/Scripts/build-webkit --gtk --disable-fast-malloc --enable-debug-symbols=full --disable-optimizations
     15}}}
     16
     17In other to run ''GtkLauncher'' under ''gdb'' you should use a ''jhbuild'' shell and run ''gdb'' normally or use the ''jhbuild-wrapper'' as follows:
     18{{{
     19#!sh
     20$ Tools/jhbuild/jhbuild-wrapper --gtk run gdb --args WebKitBuild/Debug/Programs/GtkLauncher --debug
     21}}}
     22
     23== Debugging multimedia stuff ==
     24
     25You can use the environment variable ''GST_DEBUG'':
     26{{{
     27#!sh
     28$ export GST_DEBUG="webkit*:5"
     29}}}
     30
     31To debug a multimedia test inside DRT (Dump Render Tree):
     32{{{
     33#!sh
     34$ Tools/Scripts/run-webkit-tests --gtk --additional-env-var=GST_DEBUG=webkit*:5 --additional-env-var=GST_DEBUG_NO_COLOR=1 http/tests/media/video-play-stall.html
     35}}}
     36
     37== Debugging tests ==
     38
     39 * In order to run tests inside the @jhbuild@ shell, these two environment variables must be set:
     40{{{
     41#!sh
     42$ export TEST_RUNNER_TEST_PLUGIN_PATH=$WEBKIT_HOME/WebKitBuild/Release/Libraries/.libs/
     43$ export TEST_RUNNER_INJECTED_BUNDLE_FILENAME=$WEBKIT_HOME/WebKitBuild/Release/Libraries/libTestRunnerInjectedBundle.la
     44}}}
     45
     46== Debugging issues ==
     47
     48 * Some times when running the WebKitTestRunner (WK2) you can see linking errors like the following one:
     49{{{
     50#!sh
     51
     52(lt-WebKitWebProcess:3392): WARNING **: Error loading the injected bundle (/home/javi/devel/WebKit/webkit.git/WebKitBuild/Debug/Libraries/libTestRunnerInjectedBundle.la): /home/javi/devel/WebKit/webkit.git/WebKitBuild/Debug/Libraries/.libs/libTestRunnerInjectedBundle.so: undefined symbol: _ZTVN7leveldb10ComparatorE
     53}}}
     54   * One possible cause of such errors are missing symbols in the '''Source/autotools/symbols.filter'''. These symbols are automatically exposed in the by the '''libWebCoreInternals''' library via tags. Such library expose some symbols for testing purposes, just like the WTR application does.
     55   * The symbols.filter should be updated by a fresh checkout, but if that's not the case, it's possible to workaround the issue by manually adding the missing symbols to the file.