diff options
author | arades79 <scravers@protonmail.com> | 2023-02-14 11:33:42 -0500 |
---|---|---|
committer | arades79 <scravers@protonmail.com> | 2023-02-14 12:35:40 -0500 |
commit | 880b6e9795e2a86d8f31f437c9ac7d356e7790a5 (patch) | |
tree | 57b8656c56f3c1840a4dafe2400ebf9d717b1052 /src/core/debugger/gdbstub_arch.h | |
parent | 683019878fc939b418a65e1c5d84b066596d7655 (diff) |
use a string view to skip allocation
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/core/debugger/gdbstub_arch.h')
-rw-r--r-- | src/core/debugger/gdbstub_arch.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/debugger/gdbstub_arch.h b/src/core/debugger/gdbstub_arch.h index 2540d64566..1958fdf88d 100644 --- a/src/core/debugger/gdbstub_arch.h +++ b/src/core/debugger/gdbstub_arch.h @@ -16,7 +16,7 @@ namespace Core { class GDBStubArch { public: virtual ~GDBStubArch() = default; - virtual std::string GetTargetXML() const = 0; + virtual constexpr std::string_view GetTargetXML() const = 0; virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; @@ -27,7 +27,7 @@ public: class GDBStubA64 final : public GDBStubArch { public: - std::string GetTargetXML() const override; + constexpr std::string_view GetTargetXML() const override; std::string RegRead(const Kernel::KThread* thread, size_t id) const override; void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; std::string ReadRegisters(const Kernel::KThread* thread) const override; @@ -47,7 +47,7 @@ private: class GDBStubA32 final : public GDBStubArch { public: - std::string GetTargetXML() const override; + constexpr std::string_view GetTargetXML() const override; std::string RegRead(const Kernel::KThread* thread, size_t id) const override; void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; std::string ReadRegisters(const Kernel::KThread* thread) const override; |