summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/Makefile.in2
-rw-r--r--tools/misc/h5debug.c36
2 files changed, 35 insertions, 3 deletions
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 3362269..f76b769 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -294,7 +294,7 @@ all: all-am
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign tools/misc/Makefile
+ $(AUTOMAKE) --gnu tools/misc/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
h5cc: $(top_builddir)/config.status h5cc.in
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 466279c..88dc861 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -26,9 +26,11 @@
*/
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
-#include "H5private.h"
+#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h"
+#include "H5B2pkg.h" /* B-trees */
#include "H5Dprivate.h"
#include "H5Fpkg.h"
#include "H5Gprivate.h"
@@ -75,7 +77,7 @@ main(int argc, char *argv[])
if (argc == 1) {
fprintf(stderr,
- "Usage: %s filename [signature addr [extra]]\n", argv[0]);
+ "Usage: %s filename [signature-addr [extra]]\n", argv[0]);
HDexit(1);
}
@@ -173,6 +175,36 @@ main(int argc, char *argv[])
HDexit(4);
}
+ } else if (!HDmemcmp(sig, H5B2_HDR_MAGIC, H5B2_SIZEOF_MAGIC)) {
+ /*
+ * Debug a v2 B-tree. B-trees are debugged through the B-tree
+ * subclass. The subclass identifier is two bytes after the
+ * B-tree signature.
+ */
+ H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
+
+#ifdef NOT_YET
+ switch (subtype) {
+ case H5B_SNODE_ID:
+ status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
+ break;
+
+ case H5B_ISTORE_ID:
+ ndims = (unsigned)extra;
+ status = H5D_istore_debug (f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims);
+ break;
+
+ default:
+ fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDexit(4);
+ }
+#else /* NOT_YET */
+H5B2_class_t type={0,sizeof(hsize_t),NULL,NULL,NULL}; /* B-tree class information */
+
+fprintf(stderr,"B-tree subtype=%u\n",(unsigned)subtype);
+ status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, &type);
+#endif /* NOT_YET */
+
} else if (sig[0] == H5O_VERSION) {
/*
* This could be an object header. Since they don't have a signature