[Lldb-commits] [PATCH] D49740: Move RegisterValue, Scalar, State from Core to Utility

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 7 03:56:49 PDT 2018


labath added a comment.

Thanks. I'll commit this and look at moving SafeMachO next.

> But I guess I'm looking for an organization based on "groups by functionality" rather than "who uses what".  So even though other actors might use Scalar, it's reason for being is to present values.  For the purposes of understanding the code, grouping all the files that work together for a task seems to me like it would help.

I don't this these are that much different objectives. If Scalar is used by RegisterValue then, whether we like it or not, it's functionality is also to provide services to that class. That certainly wasn't what the class was written for originally, but it is what we have now.

When working on ValueObjects, it would be logical to have Scalar next to them. However, I don't think having Scalar somewhere else would be too surprising either. After all, displaying debugger values is a complex functionality, so it's not surprising it uses some generic number manipulation class (which is what Scalar would be in this world view). On the other hand, I would be *very* surprised if I was working on code reading a register from process memory and found out it references a class which purports to do dwarf expression evaluation.


https://reviews.llvm.org/D49740





More information about the lldb-commits mailing list