tberghammer requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:820-821
@@ -819,1 +819,4 @@
+
+        ioVec.iov_len = (offsetof (struct user_hwdebug_state, 
dbg_regs[m_max_hwp_supported - 1])
+                        + sizeof (dreg_state.dbg_regs [m_max_hwp_supported - 
1]));
     }
----------------
You are using offsetof with a value determined in runtime (m_max_hwp_supported) 
what won't be work in all case (it isn't standard compliance AFAIK). I suggest 
to sue the following version instead:
```
ioVec.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs) + sizeof 
(dreg_state.dbg_regs [0]) * m_max_hwp_supported);
```


http://reviews.llvm.org/D12522



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to