Merge "Migrated dumpstate to C++."