diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-22 15:22:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-22 15:22:03 (GMT) |
commit | 00bd6ae9c27f520b4badbe0698ea1a1e1044f305 (patch) | |
tree | 0ca87cd3b1254b3faa9fbcbea2e76d4248f9ffb9 /tools/misc/h5debug.c | |
parent | 0402e025278dbd5ac463ce27805231d5302def1d (diff) | |
download | hdf5-00bd6ae9c27f520b4badbe0698ea1a1e1044f305.zip hdf5-00bd6ae9c27f520b4badbe0698ea1a1e1044f305.tar.gz hdf5-00bd6ae9c27f520b4badbe0698ea1a1e1044f305.tar.bz2 |
[svn-r15674] Description:
Add base support for extensible array "data blocks" to code, tests and
h5debug.
Tested on:
Mac OS X/32 10.5.4 (amazon) in debug mode
Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'tools/misc/h5debug.c')
-rw-r--r-- | tools/misc/h5debug.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index 95bd345..8ae486d 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -206,15 +206,15 @@ main(int argc, char *argv[]) /* * Open the file and get the file descriptor. */ - if((dxpl = H5Pcreate (H5P_DATASET_XFER))<0) { + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) { fprintf(stderr, "cannot create dataset transfer property list\n"); HDexit(1); } /* end if */ - if((fapl = H5Pcreate (H5P_FILE_ACCESS))<0) { + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { fprintf(stderr, "cannot create file access property list\n"); HDexit(1); } /* end if */ - if(strchr (argv[1], '%')) + if(strchr(argv[1], '%')) H5Pset_fapl_family (fapl, (hsize_t)0, H5P_DEFAULT); if((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) { fprintf(stderr, "cannot open file\n"); @@ -464,6 +464,23 @@ main(int argc, char *argv[]) status = H5EA__iblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra); + } else if(!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5EA_SIZEOF_MAGIC)) { + /* + * Debug an extensible aray data block. + */ + const H5EA_class_t *cls = get_H5EA_class(sig); + HDassert(cls); + + /* Check for enough valid parameters */ + if(extra == 0 || extra2 == 0) { + fprintf(stderr, "ERROR: Need extensible array header address and # of elements in data block in order to dump data block\n"); + fprintf(stderr, "Extensible array data block usage:\n"); + fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of elements in data block>\n"); + HDexit(4); + } /* end if */ + + status = H5EA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2); + } else if(!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5O_SIZEOF_MAGIC)) { /* * Debug v2 object header (which have signatures). |