dynamic_debug: add trim_prefix() to provide source-root relative paths