[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

Hui Li via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 6 18:48:57 PST 2022


lh03061238 added inline comments.


================
Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h:58
+                                               uint32_t reg_num) override;
+  lldb::addr_t ReadPC(bool *success);
+  bool WritePC(lldb::addr_t pc);
----------------
DavidSpickett wrote:
> I think the older targets use this form but for riscv they went with `llvm::Optional<lldb::addr_t> ReadPC();` which I prefer over pointer plus addr_t.
> I think the older targets use this form but for riscv they went with `llvm::Optional<lldb::addr_t> ReadPC();` which I prefer over pointer plus addr_t.

EmulateInstructionLoongArch is relatively simple Compared with riscv. If use llvm::Optional<lldb::addr_t> ReadPC(), There will be more type 
conversions here. I prefer to keep that definition for now, Considering the complexity of the code at this stage.

Thank you.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139158/new/

https://reviews.llvm.org/D139158



More information about the lldb-commits mailing list