Refactor Debugger interface for attaching/detaching. Fix bugs with line
mapping generation