This revision was automatically updated to reflect the committed changes. Closed by commit rG8018e7b447da: [lldb] [Process/FreeBSDRemote] Fix regset names and related tests (authored by mgorny). Herald added a project: LLDB.
Changed prior to commit: https://reviews.llvm.org/D91923?vs=306872&id=306967#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91923/new/ https://reviews.llvm.org/D91923 Files: 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 Index: lldb/test/API/tools/lldb-server/TestLldbGdbServer.py =================================================================== --- lldb/test/API/tools/lldb-server/TestLldbGdbServer.py +++ lldb/test/API/tools/lldb-server/TestLldbGdbServer.py @@ -433,7 +433,7 @@ "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() Index: lldb/test/API/commands/register/register/register_command/TestRegisters.py =================================================================== --- lldb/test/API/commands/register/register/register_command/TestRegisters.py +++ lldb/test/API/commands/register/register/register_command/TestRegisters.py @@ -404,7 +404,12 @@ 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 differently + # 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: Index: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp =================================================================== --- lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp +++ lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp @@ -215,9 +215,9 @@ {"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 @@ 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}, };
Index: lldb/test/API/tools/lldb-server/TestLldbGdbServer.py =================================================================== --- lldb/test/API/tools/lldb-server/TestLldbGdbServer.py +++ lldb/test/API/tools/lldb-server/TestLldbGdbServer.py @@ -433,7 +433,7 @@ "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() Index: lldb/test/API/commands/register/register/register_command/TestRegisters.py =================================================================== --- lldb/test/API/commands/register/register/register_command/TestRegisters.py +++ lldb/test/API/commands/register/register/register_command/TestRegisters.py @@ -404,7 +404,12 @@ 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 differently + # 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: Index: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp =================================================================== --- lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp +++ lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp @@ -215,9 +215,9 @@ {"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 @@ 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}, };
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits