[Lldb-commits] [PATCH] D48351: Move dumping code out of RegisterValue class

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 20 07:50:28 PDT 2018

I had previously thought of making a top level project called Dump that
depends on everything. Also makes it very obvious where all the dumpers
are. It can have overloaded functions called lldb_private::dump(T&) for
every value of T, then no matter what type you have, all you have to do is
call dump(T). Kills all birds with one stone
On Fri, Jul 20, 2018 at 7:38 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath added a comment.
> In https://reviews.llvm.org/D48351#1168384, @jingham wrote:
> > If this pattern becomes more common, then we have to deal with how
> somebody would find these dump routines.  If RegisterValue gets moved out
> of Core, would you really look to a file in Core for the dump routine,
> especially as many other classes have an obvious Dump method?
> Do you think it would help if I merged this new file with the existing
> `DumpDataExtractor.cpp` into something like `Core/Dumpers.h` (I've
> considered something like that initially, but then chose not to in order to
> reduce rename churn). If there is a single file containing the dumping
> functions then it should just be a matter of knowing you need to look into
> that file. (OTOH, this way the files at least have the class name in them,
> so it's easier to find them by just browsing the source tree)
> In https://reviews.llvm.org/D48351#1168453, @clayborg wrote:
> > I am fine if this helps with not pulling in the world. Seems like it
> should move out of Core then no? Seems weird to make the change yet keep it
> in the same directory.
> The plan is to move RegisterValue (along with Scalar) into Utility as a
> follow-up. Right now I can't think of a better place than Core for the
> dumping functions as (at least in their current implementations) depend on
> pretty much everything.
> https://reviews.llvm.org/D48351
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180720/7588f848/attachment.html>

More information about the lldb-commits mailing list