Add support for generating memory dumps. Handle xmodules that don't load.