This is an archive of the discontinued LLVM Phabricator instance.

[Windows] Added support of watchpoints to `NativeProcessWindows`
ClosedPublic

Authored by aleksandr.urakov on Sep 5 2019, 5:07 AM.

Details

Summary

This patch adds support of watchpoints to the new NativeProcessWindows plugin. The same tests as in D67168 pass with these changes when the old plugin is turned off, so they will cover this functionality when the old plugin is gone.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

labath added a subscriber: labath.Sep 24 2019, 5:08 AM

This looks mostly fine to me. There's still a lot more copy-pasta between the three kinds of register contexts than I'd like (e.g. on linux, all of these three cases are handled by a single class), but I don't have a clear idea what to do about that at this point.

lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
446–448

Though the std::stringstream classes are used in a couple of places, we usually try to stay away from all std::stream classes. In this case, I'd just do a llvm::formatv(...).str()

Btw, in the context of D67954, I realized that I don't know how to actually enable the usage of lldb-server in lldb on windows. Can you share how you did that ?

Update the patch due to Pavel's request.

Btw, in the context of D67954, I realized that I don't know how to actually enable the usage of lldb-server in lldb on windows. Can you share how you did that ?

Hi, Pavel! Thanks for taking a look. To be honest, I just have commented out content of the ProcessWindows::Initialize() function to test this :)

labath accepted this revision.Sep 30 2019, 5:53 AM

Cool, maybe we should have a setting/environment variable/something to control which plugin is used. That would make it easier to switch between the two implementations.

This revision is now accepted and ready to land.Sep 30 2019, 5:53 AM

Thank you! I've added a switch in a manner similar to one that Zachary has chosen for SymbolFilePDB/NativePDB plugins here: D68258

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2019, 10:53 PM