summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/misc/h5debug.c68
1 files changed, 24 insertions, 44 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 04e2b22..dca6216 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -28,10 +28,12 @@
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
+#define H5BT_PACKAGE /*suppress error about including H5BTpkg */
#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h"
#include "H5B2pkg.h" /* B-trees */
+#include "H5BTpkg.h" /* Block tracker */
#include "H5Dprivate.h"
#include "H5Fpkg.h"
#include "H5Gprivate.h"
@@ -114,7 +116,7 @@ main(int argc, char *argv[])
* Parse command arguments.
*/
if (argc > 2) {
- printf("New address: %s\n", argv[2]);
+/* printf("New address: %s\n", argv[2]); */
addr = HDstrtoll(argv[2], NULL, 0);
}
if (argc > 3) {
@@ -187,27 +189,19 @@ main(int argc, char *argv[])
*/
H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
-#ifdef NOT_YET
- unsigned ndims;
-
switch (subtype) {
- case H5B_SNODE_ID:
- status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
+ case H5B2_TEST_ID:
+ status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST);
break;
- case H5B_ISTORE_ID:
- ndims = (unsigned)extra;
- status = H5D_istore_debug (f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims);
+ case H5B2_BLK_TRK_ID:
+ status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_BLKTRK);
break;
default:
fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
- }
-#else /* NOT_YET */
-fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
- status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST);
-#endif /* NOT_YET */
+ } /* end switch */
} else if (!HDmemcmp(sig, H5B2_INT_MAGIC, H5B2_SIZEOF_MAGIC)) {
/*
@@ -216,30 +210,20 @@ fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
* B-tree signature.
*/
H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
- unsigned nrecs;
-#ifdef NOT_YET
- unsigned ndims;
-
switch (subtype) {
- case H5B_SNODE_ID:
- status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
+ case H5B2_TEST_ID:
+ status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, (unsigned)extra2);
break;
- case H5B_ISTORE_ID:
- ndims = (unsigned)extra;
- status = H5D_istore_debug (f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims);
+ case H5B2_BLK_TRK_ID:
+ status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_BLKTRK, extra, (unsigned)extra2);
break;
default:
fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
- }
-#else /* NOT_YET */
-fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
- nrecs = (unsigned)extra2;
- status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, nrecs);
-#endif /* NOT_YET */
+ } /* end switch */
} else if (!HDmemcmp(sig, H5B2_LEAF_MAGIC, H5B2_SIZEOF_MAGIC)) {
/*
@@ -248,30 +232,26 @@ fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
* B-tree signature.
*/
H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
- unsigned nrecs;
-#ifdef NOT_YET
- unsigned ndims;
-
switch (subtype) {
- case H5B_SNODE_ID:
- status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
+ case H5B2_TEST_ID:
+ status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, (unsigned)extra2);
break;
- case H5B_ISTORE_ID:
- ndims = (unsigned)extra;
- status = H5D_istore_debug (f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims);
+ case H5B2_BLK_TRK_ID:
+ status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_BLKTRK, extra, (unsigned)extra2);
break;
default:
fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
- }
-#else /* NOT_YET */
-fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
- nrecs = (unsigned)extra2;
- status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, nrecs);
-#endif /* NOT_YET */
+ } /* end switch */
+
+ } else if (!HDmemcmp(sig, H5BT_MAGIC, H5BT_SIZEOF_MAGIC)) {
+ /*
+ * Debug a block tracker info
+ */
+ status = H5BT_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL);
} else if (sig[0] == H5O_VERSION) {
/*