Revert "core: cleanup dumpvar"

This reverts commit b8db3188447b59b0ea9b00c84f3b1b30e3b0d47f.