mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Revert "gdb/gdbserver: share x86/linux tdesc caching"
This reverts commit 198ff6ff81.
This commit is contained in:
@@ -1579,6 +1579,37 @@ amd64_linux_record_signal (struct gdbarch *gdbarch,
|
||||
return 0;
|
||||
}
|
||||
|
||||
const target_desc *
|
||||
amd64_linux_read_description (uint64_t xcr0_features_bit, bool is_x32)
|
||||
{
|
||||
static target_desc *amd64_linux_tdescs \
|
||||
[2/*AVX*/][2/*MPX*/][2/*AVX512*/][2/*PKRU*/] = {};
|
||||
static target_desc *x32_linux_tdescs \
|
||||
[2/*AVX*/][2/*AVX512*/][2/*PKRU*/] = {};
|
||||
|
||||
target_desc **tdesc;
|
||||
|
||||
if (is_x32)
|
||||
{
|
||||
tdesc = &x32_linux_tdescs[(xcr0_features_bit & X86_XSTATE_AVX) ? 1 : 0 ]
|
||||
[(xcr0_features_bit & X86_XSTATE_AVX512) ? 1 : 0]
|
||||
[(xcr0_features_bit & X86_XSTATE_PKRU) ? 1 : 0];
|
||||
}
|
||||
else
|
||||
{
|
||||
tdesc = &amd64_linux_tdescs[(xcr0_features_bit & X86_XSTATE_AVX) ? 1 : 0]
|
||||
[(xcr0_features_bit & X86_XSTATE_MPX) ? 1 : 0]
|
||||
[(xcr0_features_bit & X86_XSTATE_AVX512) ? 1 : 0]
|
||||
[(xcr0_features_bit & X86_XSTATE_PKRU) ? 1 : 0];
|
||||
}
|
||||
|
||||
if (*tdesc == NULL)
|
||||
*tdesc = amd64_create_target_description (xcr0_features_bit, is_x32,
|
||||
true, true);
|
||||
|
||||
return *tdesc;
|
||||
}
|
||||
|
||||
/* Get Linux/x86 target description from core dump. */
|
||||
|
||||
static const struct target_desc *
|
||||
|
||||
Reference in New Issue
Block a user