diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cba0464770c..cc13e41c649 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-05-18 Rainer Orth + PR build/25981 + * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap): + Hardcode register numbers. + PR build/25981 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry, procfs_find_LDT_entry): Remove. diff --git a/gdb/i386-sol2-nat.c b/gdb/i386-sol2-nat.c index f54b3b109e8..054d2ec81b6 100644 --- a/gdb/i386-sol2-nat.c +++ b/gdb/i386-sol2-nat.c @@ -178,10 +178,22 @@ fill_fpregset (const struct regcache *regcache, format and GDB's register array layout. */ static int regmap[] = { - EAX, ECX, EDX, EBX, - UESP, EBP, ESI, EDI, - EIP, EFL, CS, SS, - DS, ES, FS, GS + 11 /* EAX */, + 10 /* ECX */, + 9 /* EDX */, + 8 /* EBX */, + 17 /* UESP */, + 6 /* EBP */, + 5 /* ESI */, + 4 /* EDI */, + 14 /* EIP */, + 16 /* EFL */, + 15 /* CS */, + 18 /* SS */, + 3 /* DS */, + 2 /* ES */, + 1 /* FS */, + 0 /* GS */ }; /* Fill GDB's register array with the general-purpose register values