[lldb] [Process/FreeBSDRemote] Replace GetRegisterSetCount()

Replace the wrong code in GetRegisterSetCount() with a constant return.
The original code passed register index in place of register set index,
effectively getting always true.  Correcting the code to check for
register set existence is not possible as LLDB supports only eliminating
last register sets.  Just return the full number for now which should
be NFC.

Differential Revision: https://reviews.llvm.org/D93396
This commit is contained in:
Michał Górny 2020-12-16 15:51:04 +01:00
parent 17b3ff511c
commit 9ead4e7b4a
1 changed files with 1 additions and 7 deletions

View File

@ -288,13 +288,7 @@ NativeRegisterContextFreeBSD_x86_64::NativeRegisterContextFreeBSD_x86_64(
}
uint32_t NativeRegisterContextFreeBSD_x86_64::GetRegisterSetCount() const {
uint32_t sets = 0;
for (uint32_t set_index = 0; set_index < k_num_register_sets; ++set_index) {
if (GetSetForNativeRegNum(set_index))
++sets;
}
return sets;
return k_num_register_sets;
}
const RegisterSet *