Re: Adding checkpointing API to Linux kernel

Miquel van Smoorenburg (miquels@cistron.nl)
19 Jan 1999 09:59:15 +0100


In article <cistron.m102Nzo-0007U2C@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>The libdl stuff itself is pretty portable, although your additional
>hooks do need to match the routines you are replacing yourself in structure
>size and the like.
>
>Things like the realvideo fixing program is a good example of stealing
>the "open" syscall and altering its behaviour to work around a bug in RV

"ltrace" is probably an even better example:

$ ltrace ls
atexit(0x400064e0) = 0
__libc_init_first(1, 0xbffffd83, 0, 0xbffffd86, 0xbffffd9e) = 0x400064e0
atexit(0x0804d440) = 0
setlocale(6, "") = "C"
bindtextdomain("fileutils", "/usr/share/locale") = "/usr/share/locale"
textdomain("fileutils") = "fileutils"
time(NULL) = 916736275
isatty(1) = 0
getenv("POSIXLY_CORRECT") = NULL
getenv("COLUMNS") = NULL
ioctl(1, 21523, 0xbffffc48, 0x4000b3f0, 0xbffffca4) = -1
getenv("POSIXLY_CORRECT") = NULL
getenv("TABSIZE") = NULL
getopt_long(1, 0xbffffca4, "abcdfgiklmnopqrstuw:xABCDFGI:LNQ"..., 0x0804d4ec, NU
LL) = -1
malloc(10800) = 0x0804ff68
malloc(12) = 0x080529a0

ltrace is a library tracer like strace is a system call tracer ..
it's pretty cool.

ftp://ftp.debian.org/debian/dists/unstable/main/source/utils/ltrace_*

Mike.

-- 
Indifference will certainly be the downfall of mankind, but who cares?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/