- Timestamp:
- Jan 17, 2007, 4:21:09 PM (14 years ago)
- Location:
- zzuf/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/src/lib-fd.c
r1686 r1687 98 98 { \ 99 99 if(oflag & O_CREAT) \ 100 debug( STR(fn) "(\"%s\", %i, %i) = %i", \101 file, oflag, mode, ret); \100 debug("%s(\"%s\", %i, %i) = %i", \ 101 __func__, file, oflag, mode, ret); \ 102 102 else \ 103 debug( STR(fn) "(\"%s\", %i) = %i", file, oflag, ret); \103 debug("%s(\"%s\", %i) = %i", __func__, file, oflag, ret); \ 104 104 _zz_register(ret); \ 105 105 } \ … … 129 129 if(ret >= 0) 130 130 { 131 debug(" accept(%i, %p, %p) = %i", sockfd, addr, addrlen, ret);131 debug("%s(%i, %p, %p) = %i", __func__, sockfd, addr, addrlen, ret); 132 132 _zz_register(ret); 133 133 } … … 147 147 if(ret >= 0) 148 148 { 149 debug(" socket(%i, %i, %i) = %i", domain, type, protocol, ret);149 debug("%s(%i, %i, %i) = %i", __func__, domain, type, protocol, ret); 150 150 _zz_register(ret); 151 151 } … … 172 172 173 173 if(ret >= 4) 174 debug("%s(%i, %p, %li) = %i \"%c%c%c%c...", __ FUNCTION__, s, buf,174 debug("%s(%i, %p, %li) = %i \"%c%c%c%c...", __func__, s, buf, 175 175 (long int)len, ret, b[0], b[1], b[2], b[3]); 176 176 else 177 debug("%s(%i, %p, %li) = %i \"%c...", __ FUNCTION__, s, buf,177 debug("%s(%i, %p, %li) = %i \"%c...", __func__, s, buf, 178 178 (long int)len, ret, b[0]); 179 179 } 180 180 else 181 debug("%s(%i, %p, %li) = %i", __ FUNCTION__, s, buf, (long int)len, ret);181 debug("%s(%i, %p, %li) = %i", __func__, s, buf, (long int)len, ret); 182 182 183 183 return ret; … … 217 217 218 218 if(ret >= 4) 219 debug(" read(%i, %p, %li) = %i \"%c%c%c%c...", fd, buf,219 debug("%s(%i, %p, %li) = %i \"%c%c%c%c...", __func__, fd, buf, 220 220 (long int)count, ret, b[0], b[1], b[2], b[3]); 221 221 else 222 debug(" read(%i, %p, %li) = %i \"%c...", fd, buf,222 debug("%s(%i, %p, %li) = %i \"%c...", __func__, fd, buf, 223 223 (long int)count, ret, b[0]); 224 224 } 225 225 else 226 debug(" read(%i, %p, %li) = %i", fd, buf, (long int)count, ret);226 debug("%s(%i, %p, %li) = %i", __func__, fd, buf, (long int)count, ret); 227 227 228 228 offset_check(fd); … … 239 239 return ret; 240 240 241 debug(" readv(%i, %p, %i) = %li", fd, iov, count, (long int)ret);241 debug("%s(%i, %p, %i) = %li", __func__, fd, iov, count, (long int)ret); 242 242 243 243 while(ret > 0) … … 279 279 280 280 if(ret >= 4) 281 debug(" pread(%i, %p, %li, %li) = %i \"%c%c%c%c...", fd, buf,281 debug("%s(%i, %p, %li, %li) = %i \"%c%c%c%c...", __func__, fd, buf, 282 282 (long int)count, (long int)offset, ret, 283 283 b[0], b[1], b[2], b[3]); 284 284 else 285 debug(" pread(%i, %p, %li, %li) = %i \"%c...", fd, buf,285 debug("%s(%i, %p, %li, %li) = %i \"%c...", __func__, fd, buf, 286 286 (long int)count, (long int)offset, ret, b[0]); 287 287 } 288 288 else 289 debug(" pread(%i, %p, %li, %li) = %i", fd, buf,289 debug("%s(%i, %p, %li, %li) = %i", __func__, fd, buf, 290 290 (long int)count, (long int)offset, ret); 291 291 … … 300 300 if(!_zz_ready || !_zz_iswatched(fd) || _zz_disabled) \ 301 301 return ret; \ 302 debug( STR(fn)"(%i, %lli, %i) = %lli", \303 fd,(long long int)offset, whence, (long long int)ret); \302 debug("%s(%i, %lli, %i) = %lli", __func__, fd, \ 303 (long long int)offset, whence, (long long int)ret); \ 304 304 if(ret != (off_t)-1) \ 305 305 _zz_setpos(fd, ret); \ … … 335 335 return ret; 336 336 337 debug(" close(%i) = %i", fd, ret);337 debug("%s(%i) = %i", __func__, fd, ret); 338 338 _zz_unregister(fd); 339 339 -
zzuf/trunk/src/lib-load.h
r1683 r1687 14 14 15 15 /* 16 * preload.h: preloaded library functions16 * lib-load.h: preloaded library functions 17 17 */ 18 18 19 /* The __func__ macro to get the current function name */ 20 #if __STDC_VERSION__ < 199901L 21 # if __GNUC__ >= 2 22 # define __func__ __FUNCTION__ 23 # else 24 # define __func__ "<?>" 25 # endif 26 #endif 27 28 /* Symbol loading stuff */ 19 29 #define STR(x) #x 20 30 #define ORIG(x) x##_orig -
zzuf/trunk/src/lib-mem.c
r1683 r1687 213 213 ret = b; \ 214 214 if(length >= 4) \ 215 debug( STR(fn)"(%p, %li, %i, %i, %i, %lli) = %p \"%c%c%c%c...", \216 start, (long int)length, prot, flags, fd, \215 debug("%s(%p, %li, %i, %i, %i, %lli) = %p \"%c%c%c%c...", \ 216 __func__, start, (long int)length, prot, flags, fd, \ 217 217 (long long int)offset, ret, b[0], b[1], b[2], b[3]); \ 218 218 else \ 219 debug( STR(fn)"(%p, %li, %i, %i, %i, %lli) = %p \"%c...", \220 start, (long int)length, prot, flags, fd, \219 debug("%s(%p, %li, %i, %i, %i, %lli) = %p \"%c...", \ 220 __func__, start, (long int)length, prot, flags, fd, \ 221 221 (long long int)offset, ret, b[0]); \ 222 222 } \ 223 223 else \ 224 debug( STR(fn)"(%p, %li, %i, %i, %i, %lli) = %p", \225 start, (long int)length, prot, flags, fd, \224 debug("%s(%p, %li, %i, %i, %i, %lli) = %p", \ 225 __func__, start, (long int)length, prot, flags, fd, \ 226 226 (long long int)offset, ret); \ 227 227 } while(0) … … 255 255 maps[i] = NULL; 256 256 maps[i + 1] = NULL; 257 debug(" munmap(%p, %li) = %i", start, (long int)length, ret);257 debug("%s(%p, %li) = %i", __func__, start, (long int)length, ret); 258 258 return ret; 259 259 } … … 285 285 286 286 if(numbytes >= 4) 287 debug(" map_fd(%i, %lli, &%p, %i, %lli) = %i \"%c%c%c%c", fd,288 (long long int)offset, (void *)*addr, (int)find_space,287 debug("%s(%i, %lli, &%p, %i, %lli) = %i \"%c%c%c%c", __func__, 288 fd, (long long int)offset, (void *)*addr, (int)find_space, 289 289 (long long int)numbytes, ret, b[0], b[1], b[2], b[3]); 290 290 else 291 debug(" map_fd(%i, %lli, &%p, %i, %lli) = %i \"%c", fd,291 debug("%s(%i, %lli, &%p, %i, %lli) = %i \"%c", __func__, fd, 292 292 (long long int)offset, (void *)*addr, (int)find_space, 293 293 (long long int)numbytes, ret, b[0]); 294 294 } 295 295 else 296 debug("map_fd(%i, %lli, &%p, %i, %lli) = %i", fd, (long long int)offset, 297 (void *)*addr, (int)find_space, (long long int)numbytes, ret); 298 299 return ret; 300 } 301 #endif 302 296 debug("%s(%i, %lli, &%p, %i, %lli) = %i", __func__, fd, 297 (long long int)offset, (void *)*addr, (int)find_space, 298 (long long int)numbytes, ret); 299 300 return ret; 301 } 302 #endif 303 -
zzuf/trunk/src/lib-signal.c
r1683 r1687 95 95 ret = signal_orig(signum, isfatal(signum) ? SIG_DFL : handler); 96 96 97 debug(" signal(%i, %p) = %p", signum, handler, ret);97 debug("%s(%i, %p) = %p", __func__, signum, handler, ret); 98 98 99 99 return ret; … … 119 119 ret = sigaction_orig(signum, act, oldact); 120 120 121 debug(" sigaction(%i, %p, %p) = %i", signum, act, oldact, ret);121 debug("%s(%i, %p, %p) = %i", __func__, signum, act, oldact, ret); 122 122 123 123 return ret; -
zzuf/trunk/src/lib-stream.c
r1683 r1687 103 103 int fd = fileno(ret); \ 104 104 _zz_register(fd); \ 105 debug( STR(fn) "(\"%s\", \"%s\") = [%i]", path, mode, fd); \105 debug("%s(\"%s\", \"%s\") = [%i]", __func__, path, mode, fd); \ 106 106 } \ 107 107 } while(0) … … 143 143 144 144 if(disp) 145 debug("freopen(\"%s\", \"%s\", [%i]) = [%i]", path, mode, fd0, fd1); 145 debug("%s(\"%s\", \"%s\", [%i]) = [%i]", __func__, 146 path, mode, fd0, fd1); 146 147 147 148 return ret; … … 181 182 ret = ORIG(fn)(stream, offset, whence); \ 182 183 _zz_disabled = 0; \ 183 debug( STR(fn)"([%i], %lli, %i) = %i", \184 debug("%s([%i], %lli, %i) = %i", __func__, \ 184 185 fd, (long long int)offset, whence, ret); \ 185 186 FSEEK_FUZZ(fn2) \ … … 213 214 rewind_orig(stream); 214 215 _zz_disabled = 0; 215 debug(" rewind([%i])", fd);216 debug("%s([%i])", __func__, fd); 216 217 217 218 #if defined HAVE___SREFILL /* Don't fuzz or seek if we have __srefill() */ … … 241 242 ret = fread_orig(ptr, size, nmemb, stream); 242 243 _zz_disabled = 0; 243 debug(" fread(%p, %li, %li, [%i]) = %li",244 ptr,(long int)size, (long int)nmemb, fd, (long int)ret);244 debug("%s(%p, %li, %li, [%i]) = %li", __func__, ptr, 245 (long int)size, (long int)nmemb, fd, (long int)ret); 245 246 246 247 #if defined HAVE___SREFILL /* Don't fuzz or seek if we have __srefill() */ … … 288 289 FGETC_FUZZ \ 289 290 if(ret >= 0x20 && ret <= 0x7f) \ 290 debug( STR(fn)"([%i]) = 0x%02x '%c'", fd, ret, (char)ret); \291 debug("%s([%i]) = 0x%02x '%c'", __func__, fd, ret, (char)ret); \ 291 292 else \ 292 debug( STR(fn)"([%i]) = 0x%02x", fd, ret); \293 debug("%s([%i]) = 0x%02x", __func__, fd, ret); \ 293 294 } while(0) 294 295 … … 362 363 #endif 363 364 364 debug(" fgets(%p, %i, [%i]) = %p", s, size, fd, ret);365 debug("%s(%p, %i, [%i]) = %p", __func__, s, size, fd, ret); 365 366 return ret; 366 367 } … … 394 395 395 396 if(ret >= 0x20 && ret <= 0x7f) 396 debug(" ungetc(0x%02x, [%i]) = 0x%02x '%c'", c, fd, ret, ret);397 debug("%s(0x%02x, [%i]) = 0x%02x '%c'", __func__, c, fd, ret, ret); 397 398 else 398 debug(" ungetc(0x%02x, [%i]) = 0x%02x", c, fd, ret);399 debug("%s(0x%02x, [%i]) = 0x%02x", __func__, c, fd, ret); 399 400 return ret; 400 401 } … … 412 413 ret = fclose_orig(fp); 413 414 _zz_disabled = 0; 414 debug(" fclose([%i]) = %i", fd, ret);415 debug("%s([%i]) = %i", __func__, fd, ret); 415 416 _zz_unregister(fd); 416 417 … … 466 467 } \ 467 468 if(need_delim) \ 468 debug( STR(fn) "(%p, %p, 0x%02x, [%i]) = %li", \469 debug("%s(%p, %p, 0x%02x, [%i]) = %li", __func__, \ 469 470 lineptr, n, delim, fd, (long int)ret); \ 470 471 else \ 471 debug( STR(fn) "(%p, %p, [%i]) = %li", \472 debug("%s(%p, %p, [%i]) = %li", __func__, \ 472 473 lineptr, n, fd, (long int)ret); \ 473 474 return ret; \ … … 545 546 #endif 546 547 547 debug(" fgetln([%i], &%li) = %p", fd, (long int)*len, ret);548 debug("%s([%i], &%li) = %p", __func__, fd, (long int)*len, ret); 548 549 return ret; 549 550 } … … 575 576 576 577 if(!_zz_disabled) 577 debug(" __srefill([%i]) = %i", fd, ret);578 579 return ret; 580 } 581 #endif 582 578 debug("%s([%i]) = %i", __func__, fd, ret); 579 580 return ret; 581 } 582 #endif 583
Note: See TracChangeset
for help on using the changeset viewer.