This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Process/NetBSD] Fix reading FIP/FDP registers
ClosedPublic

Authored by mgorny on Oct 1 2020, 10:42 AM.

Details

Summary

Fix reading FIP/FDP registers to correctly return segment and offset
parts. On amd64, this roughly matches the Linux behavior of splitting
the 64-bit FIP/FDP into two halves, and putting the higher 32 bits
into f*seg and lower into f*off. Well, actually we use only 16 bits
of higher half but the CPUs do not seem to handle more than that anyway.

Diff Detail

Event Timeline

mgorny requested review of this revision.Oct 1 2020, 10:42 AM
mgorny created this revision.
labath accepted this revision.Oct 2 2020, 12:04 AM

I'm assuming this is tested by D88583.

This revision is now accepted and ready to land.Oct 2 2020, 12:04 AM

Yes. We also need to fix our kernel but it's no less broken than it was before.

krytarowski added inline comments.Oct 2 2020, 10:31 AM
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
954

GetAsUInt32 above and GetAsUInt64 here?

mgorny updated this revision to Diff 295869.Oct 2 2020, 10:48 AM
mgorny marked an inline comment as done.

Fix mistype.

krytarowski accepted this revision.Oct 2 2020, 10:50 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2020, 10:55 AM