[lldb-dev] Strange x86_64 RegisterContext behaviour

Richard Mitton richard at codersnotes.com
Fri Jul 26 18:11:06 PDT 2013


I'm puzzled by a few uses of amd64 vs. 386 register contexts.

In POSIXThread::GetRegisterName (and a few other places in that file) it 
reads the host architecture in order to decide what kind of context to 
create. Is this right? Surely it should be using the target's 
architecture instead?

And in RegisterContext_x86_64::ConvertRegisterKindToRegisterNumber, it 
switches based on the target's architecture. But surely the target's 
architecture _has_ to be eCore_x86_64_x86_64, otherwise we wouldn't have 
created a 64-bit register context?

Please let me know if I'm just misunderstanding how it should work :-)

-- 
Richard Mitton
richard at codersnotes.com




More information about the lldb-dev mailing list