Bug 85839 - [Qt] Unbreak debugging of WebKit2.
Summary: [Qt] Unbreak debugging of WebKit2.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Alexis Menard (darktears)
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2012-05-07 15:57 PDT by Alexis Menard (darktears)
Modified: 2012-05-08 07:00 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.89 KB, patch)
2012-05-07 16:10 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (5.33 KB, patch)
2012-05-07 16:34 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2012-05-07 15:57:42 PDT
[Qt] Unbreak debugging of WebKit2.
Comment 1 Alexis Menard (darktears) 2012-05-07 16:10:52 PDT
Created attachment 140614 [details]
Patch
Comment 2 Simon Hausmann 2012-05-07 16:17:37 PDT
Comment on attachment 140614 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140614&action=review

> Tools/WebKitTestRunner/qt/main.cpp:71
> +void sigcontHandler(int signal)

missing static

> Tools/WebKitTestRunner/qt/main.cpp:90
> +        signal(SIGCONT, sigcontHandler);

sigaction should be used instead of signal.
Comment 3 Simon Hausmann 2012-05-07 16:18:35 PDT
Comment on attachment 140614 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140614&action=review

>> Tools/WebKitTestRunner/qt/main.cpp:71
>> +void sigcontHandler(int signal)
> 
> missing static

I forgot: unused parameter signal :)
Comment 4 Kenneth Rohde Christiansen 2012-05-07 16:20:16 PDT
(In reply to comment #3)
> (From update of attachment 140614 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=140614&action=review
> 
> >> Tools/WebKitTestRunner/qt/main.cpp:71
> >> +void sigcontHandler(int signal)
> > 
> > missing static
> 
> I forgot: unused parameter signal :)

Wow, you are up late Simon :-) I guess we should be sleeping.
Comment 5 Kenneth Rohde Christiansen 2012-05-07 16:22:19 PDT
Comment on attachment 140614 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140614&action=review

Looks pretty ok

> Source/WebKit2/ChangeLog:8
> +        When you attach GDB to a running process it stops it.

I would add a , before 'it'

> Source/WebKit2/ChangeLog:14
> +        state when the debugger send the signal SIGCONT. The old code

sent*
Comment 6 Alexis Menard (darktears) 2012-05-07 16:34:10 PDT
Created attachment 140619 [details]
Patch
Comment 7 Alexis Menard (darktears) 2012-05-07 16:34:34 PDT
I'm very unfamiliar with the sigaction stuff so I hope I did right.
Comment 8 Simon Hausmann 2012-05-08 06:29:22 PDT
Comment on attachment 140619 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140619&action=review

> Source/WebKit2/qt/MainQt.cpp:68
> +        sigaction(SIGCONT, 0, &oldAction);
> +        sigaction(SIGCONT, &newAction, 0);

I think you should combine these into one call, i.e.

    sigaction(SIGCONT, &newAction, &oldAction);
Comment 9 Alexis Menard (darktears) 2012-05-08 07:00:24 PDT
Committed r116417: <http://trac.webkit.org/changeset/116417>