Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#1436 closed enhancement (fixed)

Add Signal Tracing to strace (easy)

Reported by: bonefish Owned by: bonefish
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

ATM strace prints the traced syscalls only. It could (optionally) also trace signals.

Attachments (5)

patch (3.0 KB ) - added by absabs 16 years ago.
screen1.png (76.4 KB ) - added by absabs 16 years ago.
newpatch (3.0 KB ) - added by absabs 16 years ago.
newpatch.2 (3.0 KB ) - added by absabs 16 years ago.
final.patch (3.7 KB ) - added by absabs 16 years ago.

Download all attachments as: .zip

Change History (12)

by absabs, 16 years ago

Attachment: patch added

by absabs, 16 years ago

Attachment: screen1.png added

comment:1 by absabs, 16 years ago

when applied the patch, strace now can trace signals tested as following:

  1. in one terminal

strace sleep 666

  1. in another terminal

kill -s sig pid where sig is the signal such as URG\USR1 and so on.

see the screenshot

by absabs, 16 years ago

Attachment: newpatch added

in reply to:  1 ; comment:2 by absabs, 16 years ago

Resolution: fixed
Status: newclosed

oh, some code for debug was not removed. Now the newpatch should fix the bug Replying to absabs:

when applied the patch, strace now can trace signals tested as following:

  1. in one terminal

strace sleep 666

  1. in another terminal

kill -s sig pid where sig is the signal such as URG\USR1 and so on.

see the screenshot

by absabs, 16 years ago

Attachment: newpatch.2 added

in reply to:  2 comment:3 by absabs, 16 years ago

sorry for my mistake. Give up "patch\newpatch\newpatch.2", we need only the final.patch Replying to absabs:

oh, some code for debug was not removed. Now the newpatch should fix the bug Replying to absabs:

when applied the patch, strace now can trace signals tested as following:

  1. in one terminal

strace sleep 666

  1. in another terminal

kill -s sig pid where sig is the signal such as URG\USR1 and so on.

see the screenshot

comment:4 by axeld, 16 years ago

Thanks for your patch! It looks very nice! Do you have the time to fix the coding style problems (constants have the 'k' prefix, so it would be kSignalName), and add an option to make signal tracing optional? If not, I can make the changes, too, just tell.

in reply to:  4 ; comment:5 by absabs, 16 years ago

No problem. I will upload the patch later. :) Replying to axeld:

Thanks for your patch! It looks very nice! Do you have the time to fix the coding style problems (constants have the 'k' prefix, so it would be kSignalName), and add an option to make signal tracing optional? If not, I can make the changes, too, just tell.

by absabs, 16 years ago

Attachment: final.patch added

in reply to:  5 comment:6 by absabs, 16 years ago

I have updated the final.patch. Thanks Replying to absabs:

No problem. I will upload the patch later. :) Replying to axeld:

Thanks for your patch! It looks very nice! Do you have the time to fix the coding style problems (constants have the 'k' prefix, so it would be kSignalName), and add an option to make signal tracing optional? If not, I can make the changes, too, just tell.

comment:7 by axeld, 16 years ago

Thanks! Applied in hrev23436 with minor changes (-g now turns off signal tracing, it's enabled by default).

Note: See TracTickets for help on using tickets.