diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-26 21:42:45 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-26 21:42:45 (GMT) |
commit | 389c88e87cc9c7d71ed9ca792c829a5cc0bae5e6 (patch) | |
tree | 5730cdc617eb87cabea1f225b11e9416038219e3 | |
parent | b6edc2873a0137d8129489ad412372489ea686bf (diff) | |
download | hdf5-389c88e87cc9c7d71ed9ca792c829a5cc0bae5e6.zip hdf5-389c88e87cc9c7d71ed9ca792c829a5cc0bae5e6.tar.gz hdf5-389c88e87cc9c7d71ed9ca792c829a5cc0bae5e6.tar.bz2 |
[svn-r20652] Description:
Teach the tracing script & routines about the 'unsigned long' and
'unsigned long long' types, so that the H5Pset_fapl_log() API routine gets
tracing information correct.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.6 (amazon) in debug mode
Mac OS X/32 10.6.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.6 (amazon) w/parallel, in debug mode
-rwxr-xr-x | bin/trace | 2 | ||||
-rw-r--r-- | src/H5FDlog.c | 2 | ||||
-rw-r--r-- | src/H5trace.c | 56 |
3 files changed, 59 insertions, 1 deletions
@@ -86,6 +86,8 @@ $Source = ""; "H5T_sign_t" => "Ts", "H5T_class_t" => "Tt", "H5T_str_t" => "Tz", + "unsigned long" => "Ul", + "unsigned long long" => "UL", "void" => "x", "FILE" => "x", "H5A_operator_t" => "x", diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 96df596..76053ec 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -318,7 +318,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si herr_t ret_value; FUNC_ENTER_API(H5Pset_fapl_log, FAIL) - H5TRACE4("e", "i*sIuz", fapl_id, logfile, flags, buf_size); + H5TRACE4("e", "i*sULz", fapl_id, logfile, flags, buf_size); if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") diff --git a/src/H5trace.c b/src/H5trace.c index 67a85c5..4637b91 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -2206,6 +2206,62 @@ H5_trace(const double *returning, const char *func, const char *type, ...) } /* end else */ break; + case 'U': + switch(type[1]) { + case 'l': + if(ptr) { + if(vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + if(asize_idx >= 0 && asize[asize_idx] >= 0) { + unsigned long *p = (unsigned long *)vp; + + fprintf(out, " {"); + for(i = 0; i < asize[asize_idx]; i++) + HDfprintf(out, "%s%lu", i?", ":"", p[i]); + fprintf(out, "}"); + } /* end if */ + } /* end if */ + else + fprintf(out, "NULL"); + } /* end if */ + else { + unsigned long iul = va_arg(ap, unsigned long); /*lint !e732 Loss of sign not really occuring */ + + fprintf(out, "%lu", iul); + asize[argno] = iul; + } /* end else */ + break; + + case 'L': + if(ptr) { + if(vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + if(asize_idx >= 0 && asize[asize_idx] >= 0) { + unsigned long long *p = (unsigned long long *)vp; + + fprintf(out, " {"); + for(i = 0; i < asize[asize_idx]; i++) + HDfprintf(out, "%s%llu", i?", ":"", p[i]); + fprintf(out, "}"); + } /* end if */ + } /* end if */ + else + fprintf(out, "NULL"); + } /* end if */ + else { + unsigned long long iull = va_arg(ap, unsigned long long); /*lint !e732 Loss of sign not really occuring */ + + fprintf(out, "%llu", iull); + asize[argno] = iull; + } /* end else */ + break; + + default: + fprintf (out, "BADTYPE(U%c)", type[1]); + goto error; + } /* end switch */ + break; + case 'x': if(ptr) { if(vp) { |