Merge pull request #3655 from Theldus/fix_gdbstub_build

Fix GDB stub builds due to undeclared symbol
This commit is contained in:
Miran Grča
2023-08-31 04:02:26 +02:00
committed by GitHub

View File

@@ -222,8 +222,10 @@ static char target_xml[] = /* QEMU gdb-xml/i386-32bit.xml with modificati
"<reg name=\"fs\" bitsize=\"16\" type=\"int32\"/>" "<reg name=\"fs\" bitsize=\"16\" type=\"int32\"/>"
"<reg name=\"gs\" bitsize=\"16\" type=\"int32\"/>" "<reg name=\"gs\" bitsize=\"16\" type=\"int32\"/>"
"" ""
#if 0
"<reg name=\"fs_base\" bitsize=\"32\" type=\"int32\"/>" "<reg name=\"fs_base\" bitsize=\"32\" type=\"int32\"/>"
"<reg name=\"gs_base\" bitsize=\"32\" type=\"int32\"/>" "<reg name=\"gs_base\" bitsize=\"32\" type=\"int32\"/>"
#endif
"" ""
"<flags id=\"i386_cr0\" size=\"4\">" "<flags id=\"i386_cr0\" size=\"4\">"
"<field name=\"PG\" start=\"31\" end=\"31\"/>" "<field name=\"PG\" start=\"31\" end=\"31\"/>"
@@ -548,10 +550,12 @@ gdbstub_client_write_reg(int index, uint8_t *buf)
flushmmucache(); flushmmucache();
break; break;
#if 0
case GDB_REG_FS_BASE ... GDB_REG_GS_BASE: case GDB_REG_FS_BASE ... GDB_REG_GS_BASE:
/* Do what qemu does and just load the base. */ /* Do what qemu does and just load the base. */
segment_regs[(index - 16) + (GDB_REG_FS - GDB_REG_CS)]->base = *((uint32_t *) buf); segment_regs[(index - 16) + (GDB_REG_FS - GDB_REG_CS)]->base = *((uint32_t *) buf);
break; break;
#endif
case GDB_REG_CR0 ... GDB_REG_CR4: case GDB_REG_CR0 ... GDB_REG_CR4:
*cr_regs[index - GDB_REG_CR0] = *((uint32_t *) buf); *cr_regs[index - GDB_REG_CR0] = *((uint32_t *) buf);