[Lldb-commits] [PATCH] Create x86 specific NativeRegisterContextLinux

Chaoren Lin chaorenl at google.com
Mon Feb 16 11:46:30 PST 2015

I also tried to separate i386 from x86_64, but it seemed a bit unnecessary
since the only real difference is the register sets.

The m_gpr_x86_64 does bother me a bit too, but I imagine
>= k_num_gpr_registers_i386 would always be true, and we should probably
always use GetRegisterInfoInterface().GetGPRSize() instead of sizeof.

How does this look instead?

union {

uint64_t m_gpr_i386[k_num_gpr_registers_i386];
uint64_t m_gpr_x86_64[k_num_gpr_registers_x86_64];

} m_gpr;

In any case, let's get some more opinions on this first.

On Mon, Feb 16, 2015 at 11:14 AM, Tamas Berghammer <tberghammer at google.com>

> Previously the "uint64_t m_gpr_x86_64[k_num_gpr_registers_x86_64];"
> variable was used to store the value of the gpr registers for both x86 and
> for x64 contexts what isn't a problem until k_num_gpr_registers_x86_64 >=
> k_num_gpr_registers_i386 (currently true) and we don't use sizeof on it but
> I think it is a bit of a design flow.
> If your fix for the debug registers will go in then this CL only contains
> the separation.
> http://reviews.llvm.org/D7667
>   http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150216/9b2f4231/attachment.html>

More information about the lldb-commits mailing list