gdbstub: replace global gdb_has_xml with a function