mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-09-22 20:53:34 +08:00
hello...
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
probe syscall.mkdir
|
||||
{
|
||||
printf("exit %s\n", argstr);
|
||||
}
|
||||
|
||||
probe begin
|
||||
{
|
||||
printf("test mkdir begin\n");
|
||||
}
|
||||
|
||||
probe end
|
||||
{
|
||||
printf("test mkdir end\n");
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
probe begin
|
||||
{
|
||||
log("begin to probe")
|
||||
}
|
||||
|
||||
|
||||
probe syscall.open
|
||||
{
|
||||
printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
|
||||
}
|
||||
|
||||
|
||||
probe timer.ms(4000) # after 4 seconds
|
||||
{
|
||||
exit ()
|
||||
}
|
||||
|
||||
|
||||
probe end
|
||||
{
|
||||
log("end to probe")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
probe process("/lib64/libc.so.6").function("malloc") {
|
||||
if (target()== pid()) {
|
||||
print_ubacktrace();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
probe begin {
|
||||
println("~");
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*************************************************************************
|
||||
> File Name: t.c
|
||||
> Author: gatieme
|
||||
> Created Time: Thu 13 Apr 2017 06:13:39 PM CST
|
||||
************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void fun()
|
||||
{
|
||||
malloc(1000);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
fun();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user