Support syscall tracing by ptrace #5

Merged
merged 5 commits into from Apr 24, 2017

Conversation

Projects
None yet
1 participant
@udzura
Member

udzura commented Apr 24, 2017

See example:

$ sudo ./mruby/bin/mruby examples/tracing.rb 
[11833]: syscall getuid(#102) called. (ud: 0)
[11833]: syscall uname(#63) called. (ud: 0)
[11833]: syscall getuid(#102) called. (ud: 0)
[11833]: syscall getuid(#102) called. (ud: 0)
[11833]: syscall getuid(#102) called. (ud: 0)
[11833]: syscall getuid(#102) called. (ud: 0)
[11833]: syscall uname(#63) called. (ud: 0)
[11833]: syscall uname(#63) called. (ud: 0)
[11833]: syscall uname(#63) called. (ud: 0)
"exited"
@udzura

This comment has been minimized.

Show comment
Hide comment
@udzura

udzura Apr 24, 2017

Member

Syscall tracking shell:

$ sudo ./mruby/bin/mruby examples/tracing.rb 
# uname -a
[12982]: syscall uname(#63) called. (ud: 0)
[12982]: syscall uname(#63) called. (ud: 0)
[12982]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
[12983]: syscall uname(#63) called. (ud: 0)
[12983]: syscall uname(#63) called. (ud: 0)
[12983]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
[12984]: syscall uname(#63) called. (ud: 0)
[12984]: syscall uname(#63) called. (ud: 0)
[12984]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# exit
"exited"
Member

udzura commented Apr 24, 2017

Syscall tracking shell:

$ sudo ./mruby/bin/mruby examples/tracing.rb 
# uname -a
[12982]: syscall uname(#63) called. (ud: 0)
[12982]: syscall uname(#63) called. (ud: 0)
[12982]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
[12983]: syscall uname(#63) called. (ud: 0)
[12983]: syscall uname(#63) called. (ud: 0)
[12983]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
[12984]: syscall uname(#63) called. (ud: 0)
[12984]: syscall uname(#63) called. (ud: 0)
[12984]: syscall uname(#63) called. (ud: 0)
Linux foo.jp 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# exit
"exited"

@udzura udzura merged commit e5e766a into master Apr 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@udzura udzura deleted the support-tracing branch Apr 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment