[llvm-branch-commits] [lldb] 8018e7b - [lldb] [Process/FreeBSDRemote] Fix regset names and related tests
Michał Górny via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 23 00:32:32 PST 2020
Author: Michał Górny
Date: 2020-11-23T09:28:20+01:00
New Revision: 8018e7b447dacb37a520fe989ab42c0586730961
URL: https://github.com/llvm/llvm-project/commit/8018e7b447dacb37a520fe989ab42c0586730961
DIFF: https://github.com/llvm/llvm-project/commit/8018e7b447dacb37a520fe989ab42c0586730961.diff
LOG: [lldb] [Process/FreeBSDRemote] Fix regset names and related tests
Restore Linux-alike regset names for AVX/MPX registers
as TestLldbGdbServer seems to depend on them. At the same time, fix
TestRegisters to be aware that they are not available on FreeBSD
and NetBSD, at least until we figure out a better way of reporting
unsupported register sets.
Differential Revision: https://reviews.llvm.org/D91923
Added:
Modified:
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
lldb/test/API/commands/register/register/register_command/TestRegisters.py
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
index ea5400c55713..8f1ba2eb4137 100644
--- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
@@ -215,9 +215,9 @@ static const RegisterSet g_reg_sets_i386[k_num_register_sets] = {
{"Floating Point Registers", "fpu", k_num_fpr_registers_i386,
g_fpu_regnums_i386},
{"Debug Registers", "dbr", k_num_dbr_registers_i386, g_dbr_regnums_i386},
- {"Extended AVX registers", "avx", k_num_avx_registers_i386,
+ {"Advanced Vector Extensions", "avx", k_num_avx_registers_i386,
g_avx_regnums_i386},
- {"Extended MPX registers", "mpx", k_num_mpx_registers_i386,
+ {"Memory Protection Extensions", "mpx", k_num_mpx_registers_i386,
g_mpx_regnums_i386},
};
@@ -229,9 +229,9 @@ static const RegisterSet g_reg_sets_x86_64[k_num_register_sets] = {
g_fpu_regnums_x86_64},
{"Debug Registers", "dbr", k_num_dbr_registers_x86_64,
g_dbr_regnums_x86_64},
- {"Extended AVX registers", "avx", k_num_avx_registers_x86_64,
+ {"Advanced Vector Extensions", "avx", k_num_avx_registers_x86_64,
g_avx_regnums_x86_64},
- {"Extended MPX registers", "mpx", k_num_mpx_registers_x86_64,
+ {"Memory Protection Extensions", "mpx", k_num_mpx_registers_x86_64,
g_mpx_regnums_x86_64},
};
diff --git a/lldb/test/API/commands/register/register/register_command/TestRegisters.py b/lldb/test/API/commands/register/register/register_command/TestRegisters.py
index 98024a83bf42..5e26f3317b41 100644
--- a/lldb/test/API/commands/register/register/register_command/TestRegisters.py
+++ b/lldb/test/API/commands/register/register/register_command/TestRegisters.py
@@ -404,7 +404,12 @@ def fp_register_write(self):
for registerSet in registerSets:
if 'advanced vector extensions' in registerSet.GetName().lower():
has_avx = True
- if 'memory protection extension' in registerSet.GetName().lower():
+ # FreeBSD/NetBSD reports missing register sets
diff erently
+ # at the moment and triggers false positive here.
+ # TODO: remove FreeBSD/NetBSD exception when we make unsupported
+ # register groups correctly disappear.
+ if ('memory protection extension' in registerSet.GetName().lower()
+ and self.getPlatform() not in ["freebsd", "netbsd"]):
has_mpx = True
if has_avx:
diff --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 9fb8cc1892ea..609931e1f892 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -433,7 +433,7 @@ def qRegisterInfo_contains_avx_registers(self):
"Advanced Vector Extensions" in register_sets)
@expectedFailureAll(oslist=["windows"]) # no avx for now.
- @expectedFailureAll(oslist=["freebsd", "netbsd"])
+ @expectedFailureAll(oslist=["netbsd"])
@llgs_test
def test_qRegisterInfo_contains_avx_registers_llgs(self):
self.init_llgs_test()
More information about the llvm-branch-commits
mailing list