Changes between Initial Version and Version 1 of WebKitFlatpakSDK/DebugWithRR


Ignore:
Timestamp:
Aug 12, 2020 6:33:36 AM (4 years ago)
Author:
Philippe Normand
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitFlatpakSDK/DebugWithRR

    v1 v1  
     1[[PageOutline]]
     2
     3== Debugging with RR
     4
     5[https://rr-project.org/ rr]  is a lightweight tool for recording, replaying and debugging execution of applications (trees of processes and threads). Debugging extends gdb with very efficient reverse-execution, which in combination with standard gdb/x86 features like hardware data watchpoints, makes debugging much more fun.
     6
     7=== Using RR with the SDK
     8
     9The Flatpak SDK already provides RR. You don't need to install it on your host machine. To record a trace, use this command:
     10
     11{{{
     12#!sh
     13$ WEBKIT_MINI_BROWSER_PREFIX=rr Tools/Scripts/run-minibrowser --gtk ...
     14}}}
     15
     16You don't necessarily need a debug build, but it's better to have one.
     17
     18To replay a trace or simply run rr:
     19
     20{{{
     21#!sh
     22$ Tools/Scripts/webkit-flatpak -c rr <rr arguments here>
     23...
     24$ Tools/Scripts/webkit-flatpak -c rr ps                                                                                                                                                            14:32:37
     25PID     PPID    EXIT    CMD
     2635      --      0       /app/webkit/WebKitBuild/Debug/bin/MiniBrowser http://192.168.1.44/test.html
     2743      35      -5      /app/webkit/WebKitBuild/Debug/bin/WebKitWebProcess 7 24
     2844      35      0       /app/webkit/WebKitBuild/Debug/bin/WebKitNetworkProcess 8 24
     29}}}
     30