[PATCH v3 05/13] add helper functions to get dump mode