#include "qemu/osdep.h"
#include "exec/gdbstub.h"

const GDBFeature gdb_static_features[] = {
    {
        "aarch64-core.xml",
        "<?xml version=\"1.0\"?>\n"
        "<!-- Copyright (C) 2009-2012 Free Software Foundation, Inc.\n"
        "     Contributed by ARM Ltd.\n"
        "\n"
        "     Copying and distribution of this file, with or without modification,\n"
        "     are permitted in any medium without royalty provided the copyright\n"
        "     notice and this notice are preserved.  -->\n"
        "\n"
        "<!DOCTYPE feature SYSTEM \"gdb-target.dtd\">\n"
        "<feature name=\"org.gnu.gdb.aarch64.core\">\n"
        "  <reg name=\"x0\" bitsize=\"64\"/>\n"
        "  <reg name=\"x1\" bitsize=\"64\"/>\n"
        "  <reg name=\"x2\" bitsize=\"64\"/>\n"
        "  <reg name=\"x3\" bitsize=\"64\"/>\n"
        "  <reg name=\"x4\" bitsize=\"64\"/>\n"
        "  <reg name=\"x5\" bitsize=\"64\"/>\n"
        "  <reg name=\"x6\" bitsize=\"64\"/>\n"
        "  <reg name=\"x7\" bitsize=\"64\"/>\n"
        "  <reg name=\"x8\" bitsize=\"64\"/>\n"
        "  <reg name=\"x9\" bitsize=\"64\"/>\n"
        "  <reg name=\"x10\" bitsize=\"64\"/>\n"
        "  <reg name=\"x11\" bitsize=\"64\"/>\n"
        "  <reg name=\"x12\" bitsize=\"64\"/>\n"
        "  <reg name=\"x13\" bitsize=\"64\"/>\n"
        "  <reg name=\"x14\" bitsize=\"64\"/>\n"
        "  <reg name=\"x15\" bitsize=\"64\"/>\n"
        "  <reg name=\"x16\" bitsize=\"64\"/>\n"
        "  <reg name=\"x17\" bitsize=\"64\"/>\n"
        "  <reg name=\"x18\" bitsize=\"64\"/>\n"
        "  <reg name=\"x19\" bitsize=\"64\"/>\n"
        "  <reg name=\"x20\" bitsize=\"64\"/>\n"
        "  <reg name=\"x21\" bitsize=\"64\"/>\n"
        "  <reg name=\"x22\" bitsize=\"64\"/>\n"
        "  <reg name=\"x23\" bitsize=\"64\"/>\n"
        "  <reg name=\"x24\" bitsize=\"64\"/>\n"
        "  <reg name=\"x25\" bitsize=\"64\"/>\n"
        "  <reg name=\"x26\" bitsize=\"64\"/>\n"
        "  <reg name=\"x27\" bitsize=\"64\"/>\n"
        "  <reg name=\"x28\" bitsize=\"64\"/>\n"
        "  <reg name=\"x29\" bitsize=\"64\"/>\n"
        "  <reg name=\"x30\" bitsize=\"64\"/>\n"
        "  <reg name=\"sp\" bitsize=\"64\" type=\"data_ptr\"/>\n"
        "\n"
        "  <reg name=\"pc\" bitsize=\"64\" type=\"code_ptr\"/>\n"
        "  <reg name=\"cpsr\" bitsize=\"32\"/>\n"
        "</feature>\n",
        34,
    },
    {
        "aarch64-fpu.xml",
        "<?xml version=\"1.0\"?>\n"
        "<!-- Copyright (C) 2009-2012 Free Software Foundation, Inc.\n"
        "     Contributed by ARM Ltd.\n"
        "\n"
        "     Copying and distribution of this file, with or without modification,\n"
        "     are permitted in any medium without royalty provided the copyright\n"
        "     notice and this notice are preserved.  -->\n"
        "\n"
        "<!DOCTYPE feature SYSTEM \"gdb-target.dtd\">\n"
        "<feature name=\"org.gnu.gdb.aarch64.fpu\">\n"
        "  <vector id=\"v2d\" type=\"ieee_double\" count=\"2\"/>\n"
        "  <vector id=\"v2u\" type=\"uint64\" count=\"2\"/>\n"
        "  <vector id=\"v2i\" type=\"int64\" count=\"2\"/>\n"
        "  <vector id=\"v4f\" type=\"ieee_single\" count=\"4\"/>\n"
        "  <vector id=\"v4u\" type=\"uint32\" count=\"4\"/>\n"
        "  <vector id=\"v4i\" type=\"int32\" count=\"4\"/>\n"
        "  <vector id=\"v8u\" type=\"uint16\" count=\"8\"/>\n"
        "  <vector id=\"v8i\" type=\"int16\" count=\"8\"/>\n"
        "  <vector id=\"v16u\" type=\"uint8\" count=\"16\"/>\n"
        "  <vector id=\"v16i\" type=\"int8\" count=\"16\"/>\n"
        "  <vector id=\"v1u\" type=\"uint128\" count=\"1\"/>\n"
        "  <vector id=\"v1i\" type=\"int128\" count=\"1\"/>\n"
        "  <union id=\"vnd\">\n"
        "    <field name=\"f\" type=\"v2d\"/>\n"
        "    <field name=\"u\" type=\"v2u\"/>\n"
        "    <field name=\"s\" type=\"v2i\"/>\n"
        "  </union>\n"
        "  <union id=\"vns\">\n"
        "    <field name=\"f\" type=\"v4f\"/>\n"
        "    <field name=\"u\" type=\"v4u\"/>\n"
        "    <field name=\"s\" type=\"v4i\"/>\n"
        "  </union>\n"
        "  <union id=\"vnh\">\n"
        "    <field name=\"u\" type=\"v8u\"/>\n"
        "    <field name=\"s\" type=\"v8i\"/>\n"
        "  </union>\n"
        "  <union id=\"vnb\">\n"
        "    <field name=\"u\" type=\"v16u\"/>\n"
        "    <field name=\"s\" type=\"v16i\"/>\n"
        "  </union>\n"
        "  <union id=\"vnq\">\n"
        "    <field name=\"u\" type=\"v1u\"/>\n"
        "    <field name=\"s\" type=\"v1i\"/>\n"
        "  </union>\n"
        "  <union id=\"aarch64v\">\n"
        "    <field name=\"d\" type=\"vnd\"/>\n"
        "    <field name=\"s\" type=\"vns\"/>\n"
        "    <field name=\"h\" type=\"vnh\"/>\n"
        "    <field name=\"b\" type=\"vnb\"/>\n"
        "    <field name=\"q\" type=\"vnq\"/>\n"
        "  </union>\n"
        "  <reg name=\"v0\" bitsize=\"128\" type=\"aarch64v\" regnum=\"34\"/>\n"
        "  <reg name=\"v1\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v2\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v3\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v4\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v5\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v6\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v7\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v8\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v9\" bitsize=\"128\" type=\"aarch64v\" />\n"
        "  <reg name=\"v10\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v11\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v12\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v13\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v14\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v15\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v16\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v17\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v18\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v19\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v20\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v21\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v22\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v23\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v24\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v25\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v26\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v27\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v28\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v29\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v30\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"v31\" bitsize=\"128\" type=\"aarch64v\"/>\n"
        "  <reg name=\"fpsr\" bitsize=\"32\"/>\n"
        "  <reg name=\"fpcr\" bitsize=\"32\"/>\n"
        "</feature>\n",
        34,
    },
    {
        "aarch64-pauth.xml",
        "<?xml version=\"1.0\"?>\n"
        "<!-- Copyright (C) 2018-2022 Free Software Foundation, Inc.\n"
        "\n"
        "     Copying and distribution of this file, with or without modification,\n"
        "     are permitted in any medium without royalty provided the copyright\n"
        "     notice and this notice are preserved.  -->\n"
        "\n"
        "<!DOCTYPE feature SYSTEM \"gdb-target.dtd\">\n"
        "<feature name=\"org.gnu.gdb.aarch64.pauth_v2\">\n"
        "  <reg name=\"pauth_dmask\" bitsize=\"64\"/>\n"
        "  <reg name=\"pauth_cmask\" bitsize=\"64\"/>\n"
        "  <reg name=\"pauth_dmask_high\" bitsize=\"64\"/>\n"
        "  <reg name=\"pauth_cmask_high\" bitsize=\"64\"/>\n"
        "</feature>\n"
        "\n",
        4,
    },
    { NULL }
};
