summaryrefslogtreecommitdiff
path: root/etc/ltrace.conf
diff options
context:
space:
mode:
Diffstat (limited to 'etc/ltrace.conf')
-rw-r--r--etc/ltrace.conf255
1 files changed, 97 insertions, 158 deletions
diff --git a/etc/ltrace.conf b/etc/ltrace.conf
index ed4fc5a..8f83986 100644
--- a/etc/ltrace.conf
+++ b/etc/ltrace.conf
@@ -4,104 +4,21 @@
; 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]
-; 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]]
-
-
-
-; 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)*
-; )*
-; )
-
+; See ltrace.conf(5) for description of syntax of this file.
; 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);
+typedef in_addr = struct(hex(uint));
+int inet_aton(string, +in_addr*);
+hex(uint) inet_addr(string);
+hex(uint) inet_network(string);
+string inet_ntoa(in_addr);
+in_addr inet_makeaddr(hex(int), hex(int));
+hex(uint) inet_lnaof(in_addr);
+hex(uint) inet_netof(in_addr);
; bfd.h
-void bfd_init(void);
+void bfd_init();
int bfd_set_default_target(string);
addr bfd_scan_vma(string, addr, int);
addr bfd_openr(string,string);
@@ -110,9 +27,10 @@ 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);
+addr __ctype_b_loc();
+addr __ctype_tolower_loc();
+addr __ctype_toupper_loc();
+ulong __ctype_get_mb_cur_max();
; curses.h
int waddch(addr, char);
@@ -129,12 +47,12 @@ addr readdir64(addr);
; dlfcn.h
addr dlopen(string, int);
-string dlerror(void);
+string dlerror();
addr dlsym(addr, string);
int dlclose(addr);
; errno.h
-addr __errno_location(void);
+addr __errno_location();
; fcntl.h
int open(string,int,octal); ; WARNING: 3rd argument may not be there
@@ -148,10 +66,10 @@ int getopt_long(int,addr,string,addr,int*);
int getopt_long_only(int,addr,string,addr,addr);
; grp.h
-void endgrent(void);
+void endgrent();
addr getgrnam(string);
-void setgrent(void);
-addr getgrent(void);
+void setgrent();
+addr getgrent();
; libintl.h
string __dcgettext(string,string,int);
@@ -163,16 +81,11 @@ char _IO_getc(file);
int _IO_putc(char,file);
; locale.h
-string setlocale(int, string);
+string setlocale(enum(LC_CTYPE=0, LC_NUMERIC=1, LC_TIME=2, LC_COLLATE=3, LC_MONETARY=4, LC_MESSAGES=5, LC_ALL=6, LC_PAPER=7, LC_NAME=8, LC_ADDRESS=9, LC_TELEPHONE=10, LC_MEASUREMENT=11, LC_IDENTIFICATION=12), string);
; mcheck.h
-void mtrace(void);
-void muntrace(void);
-
-; mntent.h
-int endmntent(file);
-file setmntent(string,string);
-addr getmntent(addr);
+void mtrace();
+void muntrace();
; mqueue.h
int mq_open(string, int, octal, addr); ; WARNING: 3rd and 4th arguments may not be there
@@ -187,28 +100,28 @@ 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 endhostent();
+void endnetent();
+void endnetgrent();
+void endprotoent();
+void endservent();
void freeaddrinfo(addr);
string gai_strerror(int);
int getaddrinfo(string, string, addr, addr);
addr gethostbyaddr(string, uint, int);
addr gethostbyname(string);
-addr gethostent(void);
+addr gethostent();
int getnameinfo(addr, uint, string, uint, string, uint, uint);
addr getnetbyaddr(uint, int);
addr getnetbyname(string);
-addr getnetent(void);
+addr getnetent();
int getnetgrent(addr, addr, addr);
addr getprotobyname(string);
addr getprotobynumber(int);
-addr getprotoent(void);
+addr getprotoent();
addr getservbyname(string, string);
addr getservbyport(int, string);
-addr getservent(void);
+addr getservent();
void herror(string);
string hstrerror(int);
int rcmd(addr, ushort, string, string, string, addr);
@@ -237,25 +150,32 @@ int pcap_compile(addr, addr, string, int, addr);
; pwd.h
string getpass(string);
-void endpwent(void);
+void endpwent();
addr getpwnam(string);
-void setpwent(void);
+void setpwent();
; 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);
+typedef signum = enum(SIGHUP=1, SIGINT=2, SIGQUIT=3, SIGILL=4, SIGTRAP=5, SIGABRT=6, SIGBUS=7, SIGFPE=8, SIGKILL=9, SIGUSR1=10, SIGSEGV=11, SIGUSR2=12, SIGPIPE=13, SIGALRM=14, SIGTERM=15, SIGSTKFLT=16, SIGCHLD=17, SIGCONT=18, SIGSTOP=19, SIGTSTP=20, SIGTTIN=21, SIGTTOU=22, SIGURG=23, SIGXCPU=24, SIGXFSZ=25, SIGVTALRM=26, SIGPROF=27, SIGWINCH=28, SIGIO=29, SIGPWR=30, SIGSYS=31, SIGRTMIN_0=32, SIGRTMIN_1=33, SIGRTMIN_2=34, SIGRTMIN_3=35, SIGRTMIN_4=36, SIGRTMIN_5=37, SIGRTMIN_6=38, SIGRTMIN_7=39, SIGRTMIN_8=40, SIGRTMIN_9=41, SIGRTMIN_10=42, SIGRTMIN_11=43, SIGRTMIN_12=44, SIGRTMIN_13=45, SIGRTMIN_14=46, SIGRTMIN_15=47, SIGRTMIN_16=48, SIGRTMIN_17=49, SIGRTMIN_18=50, SIGRTMIN_19=51, SIGRTMIN_20=52, SIGRTMIN_21=53, SIGRTMIN_22=54, SIGRTMIN_23=55, SIGRTMIN_24=56, SIGRTMIN_25=57, SIGRTMIN_26=58, SIGRTMIN_27=59, SIGRTMIN_28=60, SIGRTMIN_29=61, SIGRTMIN_30=62, SIGRTMIN_31=63);
+typedef sigset_t = bitvec(ulong);
+; elm3 should be flags
+typedef sigaction = struct(addr, sigset_t, hex(int), addr);
+int kill(int, signum);
+int sigemptyset(+sigset_t*);
+int sigaddset(+sigset_t*, signum);
+int sigdelset(+sigset_t*, signum);
+int sigfillset(+sigset_t*);
+int sigismember(sigset_t*, signum);
+addr signal(signum,addr);
+int sigaction(signum, sigaction*, +sigaction*);
+int sigprocmask(enum(SIG_BLOCK=1, SIG_UNBLOCK=2, SIG_SETMASK=3), sigset_t*, +sigset_t*);
+int sigpending(+sigset_t*);
+int sigsuspend(sigset_t*);
+int sigisemptyset(sigset_t*);
+int sigorset(+sigset_t*, sigset_t*, sigset_t*);
+int sigandset(+sigset_t*, sigset_t*, sigset_t*);
; stdio.h
int fclose(file);
@@ -305,7 +225,7 @@ int setenv(string,string,int);
void unsetenv(string);
addr malloc(ulong);
void qsort(addr,ulong,ulong,addr);
-int random(void);
+int random();
addr realloc(addr,ulong);
void srandom(uint);
int system(string);
@@ -316,7 +236,8 @@ void bzero(addr,ulong);
string basename(string);
string index(string,char);
addr memchr(string,char,ulong);
-addr memcpy(addr,string3,ulong);
+addr memcpy(addr,string(array(char, arg3)*),ulong);
+addr memmove(addr,string(array(char, arg3)*),ulong);
addr memset(addr,char,long);
string rindex(string,char);
addr stpcpy(addr,string);
@@ -363,7 +284,7 @@ int uname(addr);
int statfs(string,addr);
; syslog.h
-void closelog(void);
+void closelog();
void openlog(string,int,int);
void syslog(int,format);
@@ -394,21 +315,21 @@ int dup2(int,int);
int execlp(string,string,addr,addr,addr);
int execv(string,addr);
int fchdir(int);
-int fork(void);
+int fork();
int ftruncate(int,ulong);
string2 getcwd(addr,ulong);
int getdomainname(+string2,ulong);
-int geteuid(void);
-int getegid(void);
-int getgid(void);
+int geteuid();
+int getegid();
+int getgid();
int gethostname(+string2,ulong);
-string getlogin(void);
+string getlogin();
int getopt(int,addr,string);
-int getpid(void);
-int getppid(void);
-int getuid(void);
-int getpgrp(void);
-int setpgrp(void);
+int getpid();
+int getppid();
+int getuid();
+int getpgrp();
+int setpgrp();
int getpgid(int);
int isatty(int);
int link(string,string);
@@ -423,21 +344,21 @@ int setreuid(uint, uint);
int setuid(int);
uint sleep(uint);
int symlink(string,string);
-int sync(void);
+int sync();
int truncate(string,ulong);
string ttyname(int);
int unlink(string);
void usleep(uint);
long write(int, string3, ulong);
addr sbrk(long);
-int getpagesize(void);
+int getpagesize();
long lseek(int,long,int);
int pipe(addr);
; utmp.h
-void endutent(void);
-addr getutent(void);
-void setutent(void);
+void endutent();
+addr getutent();
+void setutent();
; wchar.h
int fwide(addr, int);
@@ -479,7 +400,7 @@ 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);
+int acl_valid(addr);
; acl/libacl.h
int acl_check(addr,addr);
@@ -493,15 +414,33 @@ addr acl_from_mode(octal);
int acl_get_perm(addr,uint);
string acl_to_any_text(addr,string,char,int);
+; other symbols not included above
+long a64l(string);
+string l64a(long);
+void abort();
+int abs(int);
+long labs(long);
+
+typedef mntent = struct(string, string, string, string, int, int);
+int addmntent(file, mntent*);
+int endmntent(file);
+int __endmntent(file);
+file setmntent(string,string);
+file __setmntent(string,string);
+mntent *getmntent(addr);
+mntent *getmntent_r(file, +mntent*, string, int);
+mntent *__getmntent_r(file, +mntent*, string, int);
+string hasmntopt(mntent*, string);
+
; 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_fork();
int SYS_getcwd(+string2,ulong);
-int SYS_getpid(void);
+int SYS_getpid();
;addr SYS_mmap(addr,ulong,int,int,int,long);
int SYS_munmap(addr,ulong);
int SYS_open(string,int,octal);
@@ -511,7 +450,7 @@ 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_sync();
int SYS_setxattr(string,string,addr,uint,int);
int SYS_lsetxattr(string,string,addr,uint,int);
int SYS_fsetxattr(int,string,addr,uint,int);
@@ -544,16 +483,16 @@ int SYS_gettimeofday(addr,addr);
int SYS_settimeofday(addr,addr);
int SYS_setfsgid(int);
int SYS_setfsuid(int);
-int SYS_getuid(void);
+int SYS_getuid();
int SYS_setuid(int);
-int SYS_getgid(void);
+int SYS_getgid();
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_geteuid();
+int SYS_getegid();
int SYS_setpgid(int,int);
int SYS_getresuid(addr,addr,addr);
int SYS_setresuid(int,int,int);
@@ -591,7 +530,7 @@ 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_pause();
int SYS_sigpending(addr);
int SYS_sigprocmask(int,addr,addr);
int SYS_sigqueue(int,int,addr);