summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2010-08-25 16:17:38 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2010-08-25 16:17:38 (GMT)
commitabb9cc9cd8834024a7a46cf3438585aad1af09f5 (patch)
treef56c37498104f703db07337a3fa4975553b8cae6 /tools
parent8b07a4a214c0fc8c5d6e3a859f32ee5127cdf473 (diff)
downloadhdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.zip
hdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.tar.gz
hdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.tar.bz2
[svn-r19296] 1) Modifications to h5debug and related coding so that it will handle Fixed Array/Extensible Array meta data.
2) Moved Extensible/Fixed array type to be right after MAGIC # and version so that h5debug can determine the array class type.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/testfiles/h5diff_dset_idx1.h5bin5974 -> 5974 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_dset_idx2.h5bin2206 -> 2206 bytes
-rw-r--r--tools/h5stat/testfiles/h5stat_idx.h5bin2206 -> 2206 bytes
-rw-r--r--tools/misc/h5debug.c60
-rw-r--r--tools/testfiles/tdset_idx.h5bin6760 -> 6760 bytes
5 files changed, 45 insertions, 15 deletions
diff --git a/tools/h5diff/testfiles/h5diff_dset_idx1.h5 b/tools/h5diff/testfiles/h5diff_dset_idx1.h5
index 684925d..1af4e5a 100644
--- a/tools/h5diff/testfiles/h5diff_dset_idx1.h5
+++ b/tools/h5diff/testfiles/h5diff_dset_idx1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_dset_idx2.h5 b/tools/h5diff/testfiles/h5diff_dset_idx2.h5
index ea721d1..64c9330 100644
--- a/tools/h5diff/testfiles/h5diff_dset_idx2.h5
+++ b/tools/h5diff/testfiles/h5diff_dset_idx2.h5
Binary files differ
diff --git a/tools/h5stat/testfiles/h5stat_idx.h5 b/tools/h5stat/testfiles/h5stat_idx.h5
index 6a25272..8b7655a 100644
--- a/tools/h5stat/testfiles/h5stat_idx.h5
+++ b/tools/h5stat/testfiles/h5stat_idx.h5
Binary files differ
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index d79a66a..ef43adb 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -144,6 +144,10 @@ get_H5B2_class(const uint8_t *sig)
* koziol@hdfgroup.org
* Sep 11 2008
*
+ * Modifications:
+ * Vailin Choi; August 2010
+ * Added Extensible Array class callbacks.
+ *
*-------------------------------------------------------------------------
*/
static const H5EA_class_t *
@@ -157,6 +161,14 @@ get_H5EA_class(const uint8_t *sig)
cls = H5EA_CLS_TEST;
break;
+ case H5EA_CLS_CHUNK_ID:
+ cls = H5EA_CLS_CHUNK;
+ break;
+
+ case H5EA_CLS_FILT_CHUNK_ID:
+ cls = H5EA_CLS_FILT_CHUNK;
+ break;
+
default:
fprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid));
HDexit(4);
@@ -222,6 +234,9 @@ get_H5FA_class(const uint8_t *sig)
* matzke@llnl.gov
* Jul 18 1997
*
+ * Modifications:
+ * Vailin Choi; August 2010
+ * Modified to handle Extensible Array and Fixed Array meta data.
*-------------------------------------------------------------------------
*/
int
@@ -267,6 +282,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.
*/
@@ -487,7 +508,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)) {
/*
@@ -497,14 +527,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)) {
/*
@@ -514,14 +544,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)) {
/*
@@ -531,14 +561,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)) {
/*
@@ -549,7 +579,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);
@@ -572,7 +602,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)) {
/*
diff --git a/tools/testfiles/tdset_idx.h5 b/tools/testfiles/tdset_idx.h5
index 920f59e..809aee6 100644
--- a/tools/testfiles/tdset_idx.h5
+++ b/tools/testfiles/tdset_idx.h5
Binary files differ