The dbg library with modifications for use by d2.