Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
615 lines (566 sloc) 16 KB
; ltrace.conf
;
; ~/.ltrace.conf will also be read, if it exists. The -F option may be
; used to suppress the automatic inclusion of both this file and
; ~/.ltrace.conf, and load a different config file or config files
; instead.
; Argument types:
; + == May vary (ie, is a returned value) (prefix)
; void
; int
; uint == (unsigned int)
; long
; ulong == (unsigned long)
; octal == (unsigned) [written in octal]
; char
; short == (short)
; ushort == (unsigned short)
; addr == (void *) [unsigned, written in hexa]
; file == (FILE *) [TODO]
; format == ((const char *), ...) [printf() like] [TODO]
; string == (char *)
; string[argN] == (char *) [N>0] [show only up to (arg N) bytes]
; string[eltN] == (char *) [N>0] [show only up to (elt N) bytes]
; string[retval] == (char *) [show only up to (return val) bytes]
; string[arg0] == (char *) [same as string[retval]]
; string[N] == (char *) [N>0] [show only up to N bytes]
; binary == (char *)
; binary[argN] == (char *) [N>0] [show only up to (arg N) bytes]
; binary[eltN] == (char *) [N>0] [show only up to (elt N) bytes]
; binary[retval] == (char *) [show only up to (return val) bytes]
; binary[arg0] == (char *) [same as string[retval]]
; binary[N] == (char *) [N>0] [show only up to N bytes]
; type* == (type *) [pointer to any other type]
; enum (key=value,key=value,...) [enumeration, see below]
; array(type,argN)
; == (type[SIZE]) [array of (arg N) elements]
; array(type,eltN)
; == (type[SIZE]) [array of (struct element N) elements]
; array(type,N) == (type[N]) [array of N elements]
; struct(type,type,...)
; == (struct {...}) [struct of several types]
;
; Backwards-compatibility:
; string0 == (char *) [same as string[retval]]
; stringN == (char *) [N>0] [same as string[argN]]
; binary0 == (char *) [same as binary[retval]]
; binaryN == (char *) [N>0] [same as binary[argN]]
; Typedefs
;
; To make it easier to specify argument lists, you can use 'typedef'
; directives to avoid repeating complex parameter descriptors:
;
; typedef color = enum(RED=1,BLUE=2,GREEN=3)
; void draw_line(color,int,int,int,int)
; void draw_square(color,int,int,int,int)
;
; Enumerations
;
; The syntax is a parenthesized list of key=value assignments, like so:
; enum (F_DUPFD=0,F_GETFD=1,F_SETFD=2)
; an example usage might look like
; int fcntl(int,enum (F_DUPFD=0,F_GETFD=1,F_SETFD=2))
;
; Arrays
;
; NOTE: Uses of array(...) alone are very rare. You almost always
; want array(...)*. The exceptions are when you have a fixed-size
; array.
;
; Structs
;
; NOTE: Uses of struct(...) alone are very rare. You almost always
; want struct(...)* (a pointer to a struct) anyway. Most compilers
; pass structs as pointers anyway, and those that don't are not yet
; supported. The one time when you want to use a non-pointer
; struct(...) type are when you have an array of structs, or a struct
; containing another struct.
;
; For example, if you have
; struct s1 {
; int y_size;
; int * y;
; int z[3];
; struct { char c; } a;
; struct { char c; } * b;
; }
; and a function
; void f(struct s1*)
; then the corresponding ltrace spec is
; void f(struct(int,array(int,elt0),array(int,3),struct(char),struct(char)*)*)
; which, formatted similarly to the C declaration, looks like
; void f(struct(
; int,
; array(int,elt0),
; array(int,3),
; struct(char),
; struct(char)*
; )*
; )
; arpa/inet.h
int inet_aton(string,addr);
string inet_ntoa(addr); ; It isn't an ADDR but an hexa number...
addr inet_addr(string);
; bfd.h
void bfd_init(void);
int bfd_set_default_target(string);
addr bfd_scan_vma(string, addr, int);
addr bfd_openr(string,string);
int bfd_check_format(addr,int);
; ctype.h
char tolower(char);
char toupper(char);
addr __ctype_b_loc(void);
addr __ctype_tolower_loc(void);
addr __ctype_toupper_loc(void);
; curses.h
int waddch(addr, char);
int mvprintw(int, int, format);
int wmove(addr, int, int);
int waddnstr(addr, string, int);
string tgoto(string, int, int);
; dirent.h
int closedir(addr);
addr opendir(string);
addr readdir(addr);
addr readdir64(addr);
; dlfcn.h
addr dlopen(string, int);
string dlerror(void);
addr dlsym(addr, string);
int dlclose(addr);
; errno.h
addr __errno_location(void);
; fcntl.h
int open(string,int,octal); ; WARNING: 3rd argument may not be there
int open64(string,int,octal); ; WARNING: 3rd argument may not be there
; fnmatch.h
int fnmatch(string, string, int);
; getopt.h
int getopt_long(int,addr,string,addr,int*);
int getopt_long_only(int,addr,string,addr,addr);
; grp.h
void endgrent(void);
addr getgrnam(string);
void setgrent(void);
addr getgrent(void);
; libintl.h
string __dcgettext(string,string,int);
string bindtextdomain(string, string);
string textdomain(string);
; libio.h
char _IO_getc(file);
int _IO_putc(char,file);
; locale.h
string setlocale(int, string);
; mcheck.h
void mtrace(void);
void muntrace(void);
; mntent.h
int endmntent(file);
file setmntent(string,string);
addr getmntent(addr);
; mqueue.h
int mq_open(string, int, octal, addr); ; WARNING: 3rd and 4th arguments may not be there
int mq_close(int);
int mq_unlink(string);
int mq_getattr(int, addr);
int mq_setattr(int, addr, addr);
int mq_notify(int, addr);
int mq_send(int, string3, ulong, uint);
int mq_timedsend(int, string3, ulong, uint, addr);
long mq_receive(int, +string0, ulong, addr);
long mq_timedreceive(int, +string0, ulong, addr, addr);
; netdb.h
void endhostent(void);
void endnetent(void);
void endnetgrent(void);
void endprotoent(void);
void endservent(void);
void freeaddrinfo(addr);
string gai_strerror(int);
int getaddrinfo(string, string, addr, addr);
addr gethostbyaddr(string, uint, int);
addr gethostbyname(string);
addr gethostent(void);
int getnameinfo(addr, uint, string, uint, string, uint, uint);
addr getnetbyaddr(uint, int);
addr getnetbyname(string);
addr getnetent(void);
int getnetgrent(addr, addr, addr);
addr getprotobyname(string);
addr getprotobynumber(int);
addr getprotoent(void);
addr getservbyname(string, string);
addr getservbyport(int, string);
addr getservent(void);
void herror(string);
string hstrerror(int);
int rcmd(addr, ushort, string, string, string, addr);
int rcmd_af(addr, ushort, string, string, string, addr, int);
int rexec(addr, int, string, string, string, addr);
int rexec_af(addr, int, string, string, string, addr, int);
int rresvport (addr);
int rresvport_af (addr, int);
int ruserok(string, int, string, string);
int ruserok_af(string, int, string, string, int);
void sethostent(int);
void setnetent(int);
int setnetgrent(string);
void setprotoent(int);
void setservent(int);
; netinet/in.h
uint ntohs(uint);
; pcap.h
string pcap_lookupdev(addr);
addr pcap_open_live(string, int, int, int, addr);
int pcap_snapshot(addr);
int pcap_lookupnet(string, addr, addr, addr);
int pcap_compile(addr, addr, string, int, addr);
; pwd.h
string getpass(string);
void endpwent(void);
addr getpwnam(string);
void setpwent(void);
; readline/readline.h
string readline(string);
; signal.h
int kill(int,int);
addr signal(int,addr);
int sigemptyset(addr);
int sigfillset(addr);
int sigaddset(addr, int);
int sigdelset(addr, int);
int sigismember(addr, int);
int sigaction(int, addr, addr);
int sigprocmask(int, addr, addr);
int sigpending(addr);
int sigsuspend(addr);
; stdio.h
int fclose(file);
int feof(file);
int ferror(file);
int fflush(file);
char fgetc(file);
addr fgets(+string, int, file);
int fileno(file);
file fopen(string,string);
file fopen64(string,string);
int fprintf(file,format);
int fputc(char,file);
int fputs(string,file);
ulong fread(addr,ulong,ulong,file);
ulong fread_unlocked(addr,ulong,ulong,file);
ulong fwrite(string,ulong,ulong,file);
ulong fwrite_unlocked(string,ulong,ulong,file);
int pclose(addr);
void perror(string);
addr popen(string, string);
int printf(format);
int puts(string);
int remove(string);
int snprintf(+string2,ulong,format);
int sprintf(+string,format);
string tempnam(string,string);
int vfprintf(file,string,addr);
int vsnprintf(+string2,ulong,string,addr);
int setvbuf(file,addr,int,ulong);
void setbuf(file,addr);
void setbuffer(file,addr,ulong);
void setlinebuf(file);
int rename(string,string);
; stdlib.h
long __strtol_internal(string,addr,int);
ulong __strtoul_internal(string,addr,int);
int atexit(addr);
addr bsearch(string, addr, ulong, ulong, addr);
addr calloc(ulong, ulong);
void exit(int);
void free(addr);
string getenv(string);
int putenv(string);
int setenv(string,string,int);
void unsetenv(string);
addr malloc(ulong);
void qsort(addr,ulong,ulong,addr);
int random(void);
addr realloc(addr,ulong);
void srandom(uint);
int system(string);
; string.h
void bcopy(addr,addr,ulong);
void bzero(addr,ulong);
string basename(string);
string index(string,char);
addr memchr(string,char,ulong);
addr memcpy(addr,string3,ulong);
addr memmove(addr,string3,ulong);
addr memset(addr,char,long);
string rindex(string,char);
addr stpcpy(addr,string);
int strcasecmp(string, string);
string strcat(string, string);
string strchr(string,char);
int strcoll(string,string);
ulong strlen(string);
int strcmp(string,string);
addr strcpy(addr,string);
addr strdup(string);
string strerror(int);
int strncmp(string,string,ulong);
addr strncpy(addr,string3,ulong);
string strrchr(string,char);
string strsep(addr,string);
ulong strspn(string,string);
ulong strcspn(string,string);
string strstr(string,string);
string strtok(string, string);
; sys/ioctl.h
int ioctl(int, int, addr);
; sys/socket.h
int socket(int,int,int);
; sys/stat.h
int __fxstat(int,int,addr);
int __xstat(int,string,addr);
int __lxstat(int,string,addr);
int __fxstat64(int,int,addr);
int __xstat64(int,string,addr);
int __lxstat64(int,string,addr);
int chmod(string,octal);
int fchmod(int,octal);
int mkfifo(string,octal);
octal umask(octal);
; sys/utsname.h
int uname(addr);
; sys/vfs.h
int statfs(string,addr);
; syslog.h
void closelog(void);
void openlog(string,int,int);
void syslog(int,format);
; term.h
int tputs(string, int, addr);
; termios.h
int tcgetattr(int,addr);
int tcsetattr(int,int,addr);
; time.h
string ctime(addr);
int gettimeofday(addr, addr);
int clock_gettime(enum(CLOCK_REALTIME=0,CLOCK_MONOTONIC=1,CLOCK_PROCESS_CPUTIME_ID=2,CLOCK_THREAD_CPUTIME_ID=3,CLOCK_REALTIME_HR=4,CLOCK_MONOTONIC_HR=5),struct(int, long)*);
addr gmtime(addr);
addr localtime(addr);
ulong strftime(+string2,ulong,string,addr);
long time(addr);
; unistd.h
void _exit(int);
int access(string, int);
uint alarm(uint);
int chdir(string);
int chown(string,int,int);
int close(int);
string crypt(string,string);
int dup2(int,int);
int execlp(string,string,addr,addr,addr);
int execv(string,addr);
int fchdir(int);
int fork(void);
int ftruncate(int,ulong);
string2 getcwd(addr,ulong);
int getdomainname(+string2,ulong);
int geteuid(void);
int getegid(void);
int getgid(void);
int gethostname(+string2,ulong);
string getlogin(void);
int getopt(int,addr,string);
int getpid(void);
int getppid(void);
int getuid(void);
int getpgrp(void);
int setpgrp(void);
int getpgid(int);
int isatty(int);
int link(string,string);
int mkdir(string,octal);
long read(int, +string[retval], ulong);
int rmdir(string);
int seteuid(uint);
int setgid(int);
int sethostname(+string2,ulong);
int setpgid(int,int);
int setreuid(uint, uint);
int setuid(int);
uint sleep(uint);
int symlink(string,string);
int sync(void);
int truncate(string,ulong);
string ttyname(int);
int unlink(string);
void usleep(uint);
long write(int, bytes3, ulong);
addr sbrk(long);
int getpagesize(void);
long lseek(int,long,int);
int pipe(addr);
; utmp.h
void endutent(void);
addr getutent(void);
void setutent(void);
; wchar.h
int fwide(addr, int);
; sys/wait.h
int wait(addr);
int waitpid(int,addr,int);
; X11/Xlib.h
void XCloseDisplay(addr);
int XMapWindow(addr,addr);
addr XOpenDisplay(string);
; sys/acl.h
int acl_add_perm(addr,uint);
int acl_calc_mask(addr);
int acl_clear_perms(addr);
int acl_copy_entry(addr,addr);
int acl_copy_ext(addr,addr,int);
addr acl_copy_int(addr);
int acl_create_entry(addr,addr);
int acl_delete_def_file(string);
int acl_delete_entry(addr,addr);
int acl_delete_perm(addr,uint);
addr acl_dup(addr);
int acl_free(addr);
addr acl_from_text(string);
int acl_get_entry(addr,int,addr);
addr acl_get_fd(int);
addr acl_get_file(string,int);
int acl_get_permset(addr,addr);
addr acl_get_qualifier(addr);
int acl_get_tag_type(addr,addr);
addr acl_init(int);
int acl_set_fd(int,addr);
int acl_set_file(string,int,addr);
int acl_set_permset(addr,addr);
int acl_set_qualifier(addr,addr);
int acl_set_tag_type(addr,int);
int acl_size(addr);
string acl_to_text(addr,addr);
itn acl_valid(addr);
; acl/libacl.h
int acl_check(addr,addr);
int acl_cmp(addr,addr);
int acl_entries(addr);
int acl_equiv_mode(addr,addr);
string acl_error(int);
int acl_extended_fd(int);
int acl_extended_file(string);
addr acl_from_mode(octal);
int acl_get_perm(addr,uint);
string acl_to_any_text(addr,string,char,int);
; SYSCALLS
addr SYS_brk(addr);
int SYS_close(int);
int SYS_execve(string,addr,addr);
void SYS_exit(int);
void SYS_exit_group(int);
int SYS_fork(void);
int SYS_getcwd(+string2,ulong);
int SYS_getpid(void);
;addr SYS_mmap(addr,ulong,int,int,int,long);
int SYS_munmap(addr,ulong);
int SYS_open(string,int,octal);
int SYS_personality(uint);
long SYS_read(int,+string0,ulong);
int SYS_stat(string,addr);
octal SYS_umask(octal);
int SYS_uname(addr);
long SYS_write(int,string3,ulong);
int SYS_sync(void);
int SYS_setxattr(string,string,addr,uint,int);
int SYS_lsetxattr(string,string,addr,uint,int);
int SYS_fsetxattr(int,string,addr,uint,int);
int SYS_getxattr(string,string,addr,uint);
int SYS_lgetxattr(string,string,addr,uint);
int SYS_fgetxattr(int,string,addr,uint);
int SYS_listxattr(string,addr,uint);
int SYS_llistxattr(string,addr,uint);
int SYS_flistxattr(int,addr,uint);
int SYS_removexattr(string,string);
int SYS_lremovexattr(string,string);
int SYS_fremovexattr(int,string);
int SYS_chdir(string);
int SYS_fchdir(int);
int SYS_chmod(string,octal);
int SYS_fchmod(int,octal);
int SYS_chown(string,int,int);
int SYS_fchown(int,int,int);
int SYS_lchown(string,int,int);
int SYS_chroot(string);
int SYS_dup(int);
int SYS_dup2(int,int);
int SYS_fdatasync(int);
int SYS_fsync(int);
int SYS_getpriority(int,int);
int SYS_setpriority(int,int,int);
int SYS_getrlimit(int,addr);
int SYS_setrlimit(int,addr);
int SYS_gettimeofday(addr,addr);
int SYS_settimeofday(addr,addr);
int SYS_setfsgid(int);
int SYS_setfsuid(int);
int SYS_getuid(void);
int SYS_setuid(int);
int SYS_getgid(void);
int SYS_setgid(int);
int SYS_getsid(int);
int SYS_setsid(int);
int SYS_setreuid(int,int);
int SYS_setregid(int,int);
int SYS_geteuid(void);
int SYS_getegid(void);
int SYS_setpgid(int,int);
int SYS_getresuid(addr,addr,addr);
int SYS_setresuid(int,int,int);
int SYS_getresgid(addr,addr,addr);
int SYS_setresgid(int,int,int);
int SYS_kill(int,int);
int SYS_link(string,string);
int SYS_madvise(addr,ulong,int);
int SYS_mkdir(string,octal);
int SYS_mknod(string,octal,int);
int SYS_msync(addr,ulong,int);
int SYS_nice(int);
int SYS_poll(addr,uint,int);
int SYS_readdir(uint,addr,uint);
int SYS_readlink(string,string,ulong);
int SYS_reboot(int,int,int,addr);
int SYS_rename(string,string);
int SYS_rmdir(string);
int SYS_sigaltstack(addr,addr);
int SYS_statfs(string,addr);
int SYS_fstatfs(int,addr);
int SYS_fstat(int,addr);
int SYS_lstat(string,addr);
int SYS_stime(addr);
int SYS_symlink(string, string);
int SYS_sysinfo(addr);
int SYS_syslog(int,string,int);
int SYS_truncate(string,long);
int SYS_ftruncate(int,long);
int SYS_mount(string,string,string,ulong,addr);
int SYS_umount(string);
int SYS_umount2(string,int);
int SYS_unlink(string);
int SYS_utime(string,addr);
long SYS_lseek(int,long,int);
addr SYS_signal(int,addr);
int SYS_sigaction(int,addr,addr);
int SYS_pause(void);
int SYS_sigpending(addr);
int SYS_sigprocmask(int,addr,addr);
int SYS_sigqueue(int,int,addr);
int SYS_sigsuspend(addr);
int SYS_wait(addr);
int SYS_waitpid(int,addr,int);
ulong SYS_readv(int,addr,int);
ulong SYS_writev(int,addr,int);
int SYS_mprotect(addr,int,int);
int SYS_access(string,octal);