summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-08-31 19:34:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-08-31 19:34:39 (GMT)
commitb8d1216dcac1b773f9a7f757ee4dca67547dc082 (patch)
treee9548723856027a225796d4c309b7fd70ad449d3 /tools
parentcf4e0ca807fedf1d1ce43acfc9660aa4a2f1d768 (diff)
downloadhdf5-b8d1216dcac1b773f9a7f757ee4dca67547dc082.zip
hdf5-b8d1216dcac1b773f9a7f757ee4dca67547dc082.tar.gz
hdf5-b8d1216dcac1b773f9a7f757ee4dca67547dc082.tar.bz2
[svn-r19324] Description:
Bring recent tweaks to extensible and fixed array file formats from revise_chunks branch back to trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) 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 (amani) 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.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools')
-rw-r--r--tools/misc/h5debug.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index b45cfce..5589d51 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -21,8 +21,6 @@
*
* Purpose: Debugs an existing HDF5 file at a low level.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#define H5A_PACKAGE /*suppress error about including H5Apkg */
@@ -259,6 +257,12 @@ main(int argc, char *argv[])
HDexit(2);
} /* end if */
+ /* Ignore metadata tags while using h5debug */
+ if(H5AC_ignore_tags(f) < 0) {
+ fprintf(stderr, "cannot ignore metadata tags\n");
+ HDexit(1);
+ }
+
/*
* Parse command arguments.
*/
@@ -479,7 +483,16 @@ main(int argc, char *argv[])
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
- status = H5EA__hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls);
+
+ /* Check for enough valid parameters */
+ if(extra == 0) {
+ fprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n");
+ fprintf(stderr, "Extensible array header block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <Extensible Array header address> <object header address>\n");
+ HDexit(4);
+ } /* end if */
+
+ status = H5EA__hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra);
} else if(!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -489,14 +502,14 @@ main(int argc, char *argv[])
HDassert(cls);
/* Check for enough valid parameters */
- if(extra == 0) {
- fprintf(stderr, "ERROR: Need extensible array header address in order to dump index block\n");
+ if(extra == 0 || extra2 == 0) {
+ fprintf(stderr, "ERROR: Need extensible array header address and object header address containing the layout message in order to dump index block\n");
fprintf(stderr, "Extensible array index block usage:\n");
- fprintf(stderr, "\th5debug <filename> <index block address> <array header address>\n");
+ fprintf(stderr, "\th5debug <filename> <index block address> <array header address> <object header address\n");
HDexit(4);
} /* end if */
- status = H5EA__iblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra);
+ status = H5EA__iblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, extra2);
} else if(!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -506,14 +519,14 @@ main(int argc, char *argv[])
HDassert(cls);
/* Check for enough valid parameters */
- if(extra == 0 || extra2 == 0) {
- fprintf(stderr, "ERROR: Need extensible array header address and super block index in order to dump super block\n");
+ if(extra == 0 || extra2 == 0 || extra3 == 0) {
+ fprintf(stderr, "ERROR: Need extensible array header address, super block index and object header address containing the layout message in order to dump super block\n");
fprintf(stderr, "Extensible array super block usage:\n");
- fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super block index>\n");
+ fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super block index> <object header address>\n");
HDexit(4);
} /* end if */
- status = H5EA__sblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2);
+ status = H5EA__sblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, extra3);
} else if(!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -523,14 +536,14 @@ main(int argc, char *argv[])
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");
+ if(extra == 0 || extra2 == 0 || extra3 == 0) {
+ fprintf(stderr, "ERROR: Need extensible array header address, # of elements in data block and object header address containing the layout message 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");
+ fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of elements in data block> <object header address\n");
HDexit(4);
} /* end if */
- status = H5EA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2);
+ status = H5EA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2, extra3);
} else if(!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -541,7 +554,7 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0) {
- fprintf(stderr, "ERROR: Need object header address containing the layout messagein order to dump header\n");
+ fprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n");
fprintf(stderr, "Fixed array header block usage:\n");
fprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
HDexit(4);
@@ -564,7 +577,7 @@ main(int argc, char *argv[])
HDexit(4);
} /* end if */
- status = H5FA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2);
+ status = H5FA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, extra2);
} else if(!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*