diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-02-03 19:59:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-02-03 19:59:05 (GMT) |
commit | 0b332ace5e6a94c1238b99268675a9ba840215c0 (patch) | |
tree | 373c7c8d4533ea7273d4bfd9c4bf72a559399b5a /tools/misc | |
parent | 3bf1bfa4ec9988e038944b59fcaa8acc2d79f734 (diff) | |
download | hdf5-0b332ace5e6a94c1238b99268675a9ba840215c0.zip hdf5-0b332ace5e6a94c1238b99268675a9ba840215c0.tar.gz hdf5-0b332ace5e6a94c1238b99268675a9ba840215c0.tar.bz2 |
[svn-r9928] Purpose:
New feature
Description:
Add basic code for new B-tree implementation. They don't do much yet,
aren't hooked up to anything yet and the format may change, but I'd like to
start getting them into the daily tests.
Platforms tested:
FreeBSD 4.11 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/Makefile.in | 2 | ||||
-rw-r--r-- | tools/misc/h5debug.c | 36 |
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 |