[PATCH v2 05/10] add helper functions to get dump mode