Dap: refactor DapService, extract method

Signed-off-by: Andrés G. Aragoneses <knocte@gmail.com>