Debugger: Un-duplicate dumper code

Change-Id: Idf617c9ea7e13474abab6fc5dad4f8885dc7902b
Reviewed-by: hjk <hjk121@nokiamail.com>