int mdb_dumpptr(uintptr_t addr, size_t nbytes, uint_t flags, mdb_dumpptr_cb_t func, void *data); int mdb_dump64(uint64_t addr, uint64_t nbytes, uint_t flags, mdb_dump64_cb_t func, void *data);
These functions can be used to generate formatted hexadecimal and ASCII data dumps that are printed to standard output. Each function accepts an addr parameter specifying the starting location, a nbytes parameter specifying the number of bytes to display, a set of flags described below, a func callback function to use to read the data to display, and a data parameter that is passed to each invocation of the callback func as its last argument. The functions are identical in every regard except that mdb_dumpptr uses uintptr_t for its address parameters and mdb_dump64 uses uint64_t. This distinction is useful when combining mdb_dump64 with mdb_pread, for example. The built-in ::dump dcmd uses these functions to perform its data display.
The flags parameter should be the bitwise OR of one or more of the following values:
Number lines relative to the start address instead of with the explicit address of each line.
Display full-width addresses instead of truncating the address to fit the output in 80 columns.
Only read from and display the contents of the specified addresses, instead of reading and printing entire lines.
Elide repeated lines by placing a “*” on a line that is a repeat of the previous line.
Update the value of dot to the address beyond the last address read by the function.
Adjust for endian-ness. This option assumes that the word size is equal to the current group size, specified by MDB_DUMP_GROUP(). This option will always turn off alignment, headers, and ASCII display to avoid confusing output. If MDB_DUMP_TRIM is set with MDB_DUMP_ENDIAN, the number of bytes dumped will be rounded down to the nearest word size bytes.
Increase the number of 16-byte paragraphs per line that are displayed. The default value of width is one, and the maximum value is 16.
Set the byte group size to group. The default group size is four bytes. The group size must be a power of two that divides the line width.