zturner added inline comments.
================
Comment at:
source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.cpp:49
@@ +48,3 @@
+ writeRegister(source_data, result_base, ®_info[lldb_cs_x86_64], 2);
+ }
+
----------------
dvlahovski wrote:
> sizeof(uint16_t), sizeof(uint32_t), etc ?
I think my comments got out of line and this is no longer at the position I
suggested it. that said, I actually didn't notice all these constants being
passed into `writeRegister`. I would propose changing this. Find the
`RegisterInfo` class in `lldb-private-types.h` and add the following methods:
```
llvm::ArrayRef<uint8_t> data(const uint8_t *context_base) const {
return llvm::ArrayRef<uint8_t>(context_base + byte_offset, byte_size);
}
llvm::MutableArrayRef<uint8_t> mutable_data(uint8_t *context_base) const {
return llvm::MutableArrayRef<uint8_t>(context_base + byte_offset, byte_size);
}
```
Then you can write:
```writeRegister(source_data,
reg_info[lldb_cs_x86_64].mutable_data(result_base));```
https://reviews.llvm.org/D24919
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits