scripts/remote-gdb: add support for debugging core files