This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Process/NetBSD] Set xs_xstate_bv correctly when setting regs
ClosedPublic

Authored by mgorny on Oct 24 2020, 2:42 PM.

Details

Summary

Ensure that xs_xstate_bv is set correctly before calling
WriteRegisterSet(). The bit can be clear if the relevant registers
were at their initial state when they were read, and it needs to be set
in order to apply changes from the XState structure.

Diff Detail

Event Timeline

mgorny requested review of this revision.Oct 24 2020, 2:42 PM
mgorny planned changes to this revision.
mgorny created this revision.

Hmm, I have an idea how to avoid all this repetition.

mgorny updated this revision to Diff 300505.Oct 24 2020, 2:46 PM

Reduce the repetition by bringing the most common case out.

krytarowski accepted this revision.Oct 24 2020, 10:57 PM
This revision is now accepted and ready to land.Oct 24 2020, 10:57 PM
labath accepted this revision.Oct 26 2020, 3:14 AM

Linux has this factored into a separate function (UpdateXSTATEforWrite), but this isn't too bad either. Could be another candidate for factoring...

Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2020, 3:56 AM