This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Process/FreeBSDRemote] Access debug registers via offsets
ClosedPublic

Authored by mgorny on Nov 11 2020, 8:09 AM.

Details

Summary

Use offset-based method to access x86 debug registers. This also
involves adding a test for the correctness of these offsets, and making
GetDR() method of NativeRegisterContextWatchpoint_x86 public to avoid
duplicate code.

Diff Detail

Event Timeline

mgorny created this revision.Nov 11 2020, 8:09 AM
mgorny updated this revision to Diff 304863.Nov 12 2020, 9:03 AM

Update following the changes in GPR patch.

mgorny updated this revision to Diff 305089.Nov 13 2020, 3:50 AM

Rebased.

labath accepted this revision.Nov 13 2020, 6:21 AM
This revision is now accepted and ready to land.Nov 13 2020, 6:21 AM
mgorny updated this revision to Diff 305364.Nov 15 2020, 8:20 AM

Fix native_i386_dbregs on i386.

labath accepted this revision.Nov 16 2020, 1:06 AM
labath added inline comments.
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
699–711

return GetDR(0)->byte_offset?

mgorny added inline comments.Nov 16 2020, 1:18 AM
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
699–711

Is there a point in changing this given that it gets replaced by D91411?

labath added inline comments.Nov 16 2020, 1:50 AM
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
699–711

nah, that's fine

Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2020, 4:03 AM