diff options
author | Andreas Kling <kling@serenityos.org> | 2020-09-14 13:00:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-14 16:16:36 +0200 |
commit | aa3c28957ad3e9203cc9842c1ba90ff671c0c99f (patch) | |
tree | 1a11e828adc2a5110a517219cf319d4622f2617c | |
parent | 2e547ce7a354df41c7a4b9e36479804d12e835e3 (diff) | |
download | serenity-aa3c28957ad3e9203cc9842c1ba90ff671c0c99f.zip |
LibCore: Include object names in Object::dump_tree() output
-rw-r--r-- | Libraries/LibCore/Object.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Libraries/LibCore/Object.cpp b/Libraries/LibCore/Object.cpp index 0aaf415f83..2c4b87cece 100644 --- a/Libraries/LibCore/Object.cpp +++ b/Libraries/LibCore/Object.cpp @@ -155,7 +155,10 @@ void Object::dump_tree(int indent) for (int i = 0; i < indent; ++i) { printf(" "); } - printf("%s{%p}\n", class_name(), this); + printf("%s{%p}", class_name(), this); + if (!name().is_null()) + printf(" %s", name().characters()); + printf("\n"); for_each_child([&](auto& child) { child.dump_tree(indent + 2); |