debug: absract debug device

DO NOT MERGE THIS COMMIT NOW.
A temporary commit for backup only. It require further
verification and cleaning up.

Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>