[Lldb-commits] [PATCH] D62213: [ABI] Implement Windows ABI for x86_64

Saleem Abdulrasool via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 22 16:33:10 PDT 2019


compnerd accepted this revision.
compnerd added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1094
+  if (arch_type == llvm::Triple::x86_64 &&
+      os_type != llvm::Triple::OSType::Win32) {
     return ABISP(new ABISysV_x86_64(process_sp));
----------------
compnerd wrote:
> This really isn't correct.  There is no reason to assume that everything on x86_64 uses the SysV ABI.  Can you convert this to a switch over the OS type and return it from the known OSes (Linux, BSD, and Darwin do conform to SysV, the others can return `ABISP()`.
Nit: a `switch` is clearer and easier to extend.


================
Comment at: lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp:1096
+  if (arch_type == llvm::Triple::x86_64
+    && os_type == llvm::Triple::OSType::Win32) {
+    return ABISP(new ABIWindows_x86_64(process_sp));
----------------
Nit: I think that `arch.GetTriple().isOSWindows()` is nicer than the explicit check of `Win32`.


================
Comment at: lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h:47
+	  if (cfa & (16ull - 1ull))
+      return false; // Not 8 byte aligned
+    if (cfa == 0)
----------------
The comment seems wrong


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62213





More information about the lldb-commits mailing list