const char *get_feature_xml(CPUState *env, const char *p, const char **newp)

{

    extern const char *const xml_builtin[][2];

    size_t len;

    int i;

    const char *name;

    static char target_xml[1024];



    len = 0;

    while (p[len] && p[len] != ':')

        len++;

    *newp = p + len;



    name = NULL;

    if (strncmp(p, "target.xml", len) == 0) {

        /* Generate the XML description for this CPU.  */

        if (!target_xml[0]) {

            GDBRegisterState *r;



            sprintf(target_xml,

                    "<?xml version=\"1.0\"?>"

                    "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"

                    "<target>"

                    "<xi:include href=\"%s\"/>",

                    GDB_CORE_XML);



            for (r = env->gdb_regs; r; r = r->next) {

                strcat(target_xml, "<xi:include href=\"");

                strcat(target_xml, r->xml);

                strcat(target_xml, "\"/>");

            }

            strcat(target_xml, "</target>");

        }

        return target_xml;

    }

    for (i = 0; ; i++) {

        name = xml_builtin[i][0];

        if (!name || (strncmp(name, p, len) == 0 && strlen(name) == len))

            break;

    }

    return name ? xml_builtin[i][1] : NULL;

}

const char *get_feature_xml(CPUState *env, const char *p, const char **newp)

{

    extern const char *const xml_builtin[][2];

    size_t len;

    int i;

    const char *name;

    static char target_xml[1024];



    len = 0;

    while (p[len] && p[len] != ':')

        len++;

    *newp = p + len;



    name = NULL;

    if (strncmp(p, "target.xml", len) == 0) {

        

        if (!target_xml[0]) {

            GDBRegisterState *r;



            sprintf(target_xml,

                    "<?xml version=\"1.0\"?>"

                    "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"

                    "<target>"

                    "<xi:include href=\"%s\"/>",

                    GDB_CORE_XML);



            for (r = env->gdb_regs; r; r = r->next) {

                strcat(target_xml, "<xi:include href=\"");

                strcat(target_xml, r->xml);

                strcat(target_xml, "\"/>");

            }

            strcat(target_xml, "</target>");

        }

        return target_xml;

    }

    for (i = 0; ; i++) {

        name = xml_builtin[i][0];

        if (!name || (strncmp(name, p, len) == 0 && strlen(name) == len))

            break;

    }

    return name ? xml_builtin[i][1] : NULL;

}

const char *FUNC_0(CPUState *VAR_0, const char *VAR_1, const char **VAR_2)

{

    extern const char *const VAR_3[][2];

    size_t len;

    int VAR_4;

    const char *VAR_5;

    static char VAR_6[1024];



    len = 0;

    while (VAR_1[len] && VAR_1[len] != ':')

        len++;

    *VAR_2 = VAR_1 + len;



    VAR_5 = NULL;

    if (strncmp(VAR_1, "target.xml", len) == 0) {

        

        if (!VAR_6[0]) {

            GDBRegisterState *r;



            sprintf(VAR_6,

                    "<?xml version=\"1.0\"?>"

                    "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"

                    "<target>"

                    "<xi:include href=\"%s\"/>",

                    GDB_CORE_XML);



            for (r = VAR_0->gdb_regs; r; r = r->next) {

                strcat(VAR_6, "<xi:include href=\"");

                strcat(VAR_6, r->xml);

                strcat(VAR_6, "\"/>");

            }

            strcat(VAR_6, "</target>");

        }

        return VAR_6;

    }

    for (VAR_4 = 0; ; VAR_4++) {

        VAR_5 = VAR_3[VAR_4][0];

        if (!VAR_5 || (strncmp(VAR_5, VAR_1, len) == 0 && strlen(VAR_5) == len))

            break;

    }

    return VAR_5 ? VAR_3[VAR_4][1] : NULL;

}

const char *FUNC_0(CPUState *VAR_0, const char *VAR_1, const char **VAR_2)
{ extern const char *const VAR_3[][2]; size_t len; int VAR_4; const char *VAR_5; static char VAR_6[1024]; len = 0; while (VAR_1[len] && VAR_1[len] != ':')
len++; *VAR_2 = VAR_1 + len; VAR_5 = NULL; if (strncmp(VAR_1, "target.xml", len) == 0) { if (!VAR_6[0]) { GDBRegisterState *r; sprintf(VAR_6,
"<?xml version=\"1.0\"?>"
"<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"
"<target>"
"<xi:include href=\"%s\"/>",
GDB_CORE_XML); for (r = VAR_0->gdb_regs; r; r = r->next) { strcat(VAR_6, "<xi:include href=\""); strcat(VAR_6, r->xml); strcat(VAR_6, "\"/>"); } strcat(VAR_6, "</target>"); } return VAR_6; } for (VAR_4 = 0; ; VAR_4++) { VAR_5 = VAR_3[VAR_4][0]; if (!VAR_5 || (strncmp(VAR_5, VAR_1, len) == 0 && strlen(VAR_5) == len))
break; } return VAR_5 ? VAR_3[VAR_4][1] : NULL; }