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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 20 08:02:11 PDT 2018


Well, if it depends on everything, then it can only used from places
that also depend on everything. Right now I don't think it matters now
(though it will create a new Dump <-> "everything calling Dump"
cycle). However, I can imagine this might cause some tricky situations
later on when we try to clean up dependencies between the high level
classes.
On Fri, 20 Jul 2018 at 15:50, Zachary Turner via Phabricator via
lldb-commits <lldb-commits at lists.llvm.org> wrote:
>
> zturner added a subscriber: labath.
> zturner added a comment.
>
> 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

Also remember that our dump functions have various (and
non-homogeneous) arguments to tweak the dump format. That doesn't mean
this couldn't work, just that the calls will look more like dump(T,
Stream, format_arg_1, format_arg_2, ... format_arg_n).


More information about the lldb-commits mailing list