[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/dtcxzyw review_requested https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/dtcxzyw review_requested https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/dtcxzyw review_requested https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/dtcxzyw review_requested https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/dtcxzyw review_requested https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)
=?utf-8?q?Björn_Schäpers?= ,Mehdi Amini ,Vitaly Buka ,Vitaly Buka ,Vitaly Buka ,Mehdi Amini ,Shilei Tian ,"Kazushi (Jam) Marukawa" ,Fabian Mora ,Kazushi Marukawa ,Jonas Devlieghere ,Jan Svoboda ,Jan Svoboda ,Alex Brachet ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Jan Svoboda ,Fangrui Song ,Matt Arsenault ,Younan Zhang ,Brad Smith ,Christian Sigg ,David Green ,David Green ,Piotr Zegar ,Ignat Loskutov ,Alex Brachet ,Congcong Cai ,Congcong Cai ,Jan Svoboda ,Jan Svoboda ,Yingwei Zheng ,Simon Pilgrim ,Piotr Zegar ,Jan Svoboda ,Jan Svoboda ,Mark de Wever ,Jan Svoboda ,Jay Foad ,Yingwei Zheng ,Yingwei Zheng ,Simon Pilgrim ,Yingwei Zheng ,Fangrui Song ,Owen Pan ,Billy Laws ,Fangrui Song ,Tianlan Zhou ,Yingwei Zheng https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb-vscode] Make descriptive summaries and raw child for synthetics configurable (PR #65687)
tru wrote: Note that the formatting check failed! It shouldn't be ignored :) https://github.com/llvm/llvm-project/pull/65687 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 8f2ffb1 - [lldb][AArch64] Add type marker to ReadAll/WriteALLRegisterValues data
Author: David Spickett Date: 2023-09-11T07:56:59+01:00 New Revision: 8f2ffb1cf31fffda0e139dd8afeb02f4001745e5 URL: https://github.com/llvm/llvm-project/commit/8f2ffb1cf31fffda0e139dd8afeb02f4001745e5 DIFF: https://github.com/llvm/llvm-project/commit/8f2ffb1cf31fffda0e139dd8afeb02f4001745e5.diff LOG: [lldb][AArch64] Add type marker to ReadAll/WriteALLRegisterValues data While working in support for SME's ZA register, I found a circumstance where restoring ZA after SVE, when the current SVE mode is non-streaming, will kick the process back into FPSIMD mode. Meaning the SVE values that you just wrote are now cut off at 128 bit. The fix for that is to write ZA then SVE. Problem with that is, the current ReadAll/WriteAll makes a lot of assumptions about the saved data length. This patch changes the format so there is a "type" written before each data block. This tells WriteAllRegisterValues what it's looking at without brittle checks on length, or assumptions about ordering. If we want to change the order of restoration, all we now have to do is change the order of saving. This exposes a bug where the TLS registers are not restored. This will be fixed by https://reviews.llvm.org/D156512 in some form, depending on what lands first. Existing SVE tests certainly check restoration and when I got this wrong, many, many tests failed. So I think we have enough coverage already, and more will be coming with future ZA changes. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D156687 Added: Modified: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h Removed: diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp index 490b4d619edb59a..df83a833dfaf9d1 100644 --- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -499,76 +499,119 @@ Status NativeRegisterContextLinux_arm64::WriteRegister( return Status("Failed to write register value"); } -Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues( -lldb::WritableDataBufferSP &data_sp) { - // AArch64 register data must contain GPRs and either FPR or SVE registers. - // SVE registers can be non-streaming (aka SVE) or streaming (aka SSVE). - // Finally an optional MTE register. Pointer Authentication (PAC) registers - // are read-only and will be skipped. +enum RegisterSetType : uint32_t { + GPR, + SVE, // Used for SVE and SSVE. + FPR, // When there is no SVE, or SVE in FPSIMD mode. + MTE, + TLS, +}; + +static uint8_t *AddRegisterSetType(uint8_t *dst, + RegisterSetType register_set_type) { + *(reinterpret_cast(dst)) = register_set_type; + return dst + sizeof(uint32_t); +} - // In order to create register data checkpoint we first read all register - // values if not done already and calculate total size of register set data. - // We store all register values in data_sp by copying full PTrace data that - // corresponds to register sets enabled by current register context. +static uint8_t *AddSavedRegistersData(uint8_t *dst, void *src, size_t size) { + ::memcpy(dst, src, size); + return dst + size; +} +static uint8_t *AddSavedRegisters(uint8_t *dst, + enum RegisterSetType register_set_type, + void *src, size_t size) { + dst = AddRegisterSetType(dst, register_set_type); + return AddSavedRegistersData(dst, src, size); +} + +Status +NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) { Status error; - uint32_t reg_data_byte_size = GetGPRBufferSize(); + cached_size = sizeof(RegisterSetType) + GetGPRBufferSize(); error = ReadGPR(); if (error.Fail()) return error; // If SVE is enabled we need not copy FPR separately. if (GetRegisterInfo().IsSVEEnabled() || GetRegisterInfo().IsSSVEEnabled()) { -reg_data_byte_size += GetSVEBufferSize(); -// Also store the current SVE mode. -reg_data_byte_size += sizeof(uint32_t); +// Store mode and register data. +cached_size += +sizeof(RegisterSetType) + sizeof(m_sve_state) + GetSVEBufferSize(); error = ReadAllSVE(); } else { -reg_data_byte_size += GetFPRSize(); +cached_size += sizeof(RegisterSetType) + GetFPRSize(); error = ReadFPR(); } if (error.Fail()) return error; if (GetRegisterInfo().IsMTEEnabled()) { -reg_data_byte_size += GetMTEControlSize(); +cached_size += sizeof(RegisterSetType) + GetMTEControlSize(); error = ReadMTEControl(); if (error.Fail()) return error; } // tpidr is always present but tpidr2 depends on SME. - reg_data_byte_size
[Lldb-commits] [PATCH] D156687: [lldb][AArch64] Add type marker to ReadAll/WriteALLRegisterValues data
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8f2ffb1cf31f: [lldb][AArch64] Add type marker to ReadAll/WriteALLRegisterValues data (authored by DavidSpickett). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156687/new/ https://reviews.llvm.org/D156687 Files: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h === --- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h +++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h @@ -181,6 +181,8 @@ void ConfigureRegisterContext(); uint32_t CalculateSVEOffset(const RegisterInfo *reg_info) const; + + Status CacheAllRegisters(uint32_t &cached_size); }; } // namespace process_linux Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp === --- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -499,76 +499,119 @@ return Status("Failed to write register value"); } -Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues( -lldb::WritableDataBufferSP &data_sp) { - // AArch64 register data must contain GPRs and either FPR or SVE registers. - // SVE registers can be non-streaming (aka SVE) or streaming (aka SSVE). - // Finally an optional MTE register. Pointer Authentication (PAC) registers - // are read-only and will be skipped. +enum RegisterSetType : uint32_t { + GPR, + SVE, // Used for SVE and SSVE. + FPR, // When there is no SVE, or SVE in FPSIMD mode. + MTE, + TLS, +}; + +static uint8_t *AddRegisterSetType(uint8_t *dst, + RegisterSetType register_set_type) { + *(reinterpret_cast(dst)) = register_set_type; + return dst + sizeof(uint32_t); +} - // In order to create register data checkpoint we first read all register - // values if not done already and calculate total size of register set data. - // We store all register values in data_sp by copying full PTrace data that - // corresponds to register sets enabled by current register context. +static uint8_t *AddSavedRegistersData(uint8_t *dst, void *src, size_t size) { + ::memcpy(dst, src, size); + return dst + size; +} +static uint8_t *AddSavedRegisters(uint8_t *dst, + enum RegisterSetType register_set_type, + void *src, size_t size) { + dst = AddRegisterSetType(dst, register_set_type); + return AddSavedRegistersData(dst, src, size); +} + +Status +NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) { Status error; - uint32_t reg_data_byte_size = GetGPRBufferSize(); + cached_size = sizeof(RegisterSetType) + GetGPRBufferSize(); error = ReadGPR(); if (error.Fail()) return error; // If SVE is enabled we need not copy FPR separately. if (GetRegisterInfo().IsSVEEnabled() || GetRegisterInfo().IsSSVEEnabled()) { -reg_data_byte_size += GetSVEBufferSize(); -// Also store the current SVE mode. -reg_data_byte_size += sizeof(uint32_t); +// Store mode and register data. +cached_size += +sizeof(RegisterSetType) + sizeof(m_sve_state) + GetSVEBufferSize(); error = ReadAllSVE(); } else { -reg_data_byte_size += GetFPRSize(); +cached_size += sizeof(RegisterSetType) + GetFPRSize(); error = ReadFPR(); } if (error.Fail()) return error; if (GetRegisterInfo().IsMTEEnabled()) { -reg_data_byte_size += GetMTEControlSize(); +cached_size += sizeof(RegisterSetType) + GetMTEControlSize(); error = ReadMTEControl(); if (error.Fail()) return error; } // tpidr is always present but tpidr2 depends on SME. - reg_data_byte_size += GetTLSBufferSize(); + cached_size += sizeof(RegisterSetType) + GetTLSBufferSize(); error = ReadTLS(); + + return error; +} + +Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues( +lldb::WritableDataBufferSP &data_sp) { + // AArch64 register data must contain GPRs and either FPR or SVE registers. + // SVE registers can be non-streaming (aka SVE) or streaming (aka SSVE). + // Finally an optional MTE register. Pointer Authentication (PAC) registers + // are read-only and will be skipped. + + // In order to create register data checkpoint we first read all register + // values if not done already and calculate total size of register set data. + // We store all register values in data_sp by copying full PTrace data that + // corresponds to register sets enabled by current register context. + + uint32_t reg_data_byte_si
[Lldb-commits] [PATCH] D157846: [lldb][AArch64] Add SME's SVE register state to TestArm64DynamicRegsets
DavidSpickett added a comment. ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157846/new/ https://reviews.llvm.org/D157846 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits