[lldb] Start a new line for the next output if there are no symbols in the current...
authorAaron Smith <aaron.smith@microsoft.com>
Mon, 1 Oct 2018 17:08:51 +0000 (17:08 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Mon, 1 Oct 2018 17:08:51 +0000 (17:08 +0000)
Summary:
If there is no newline the "lldb" prompt could be on the wrong line. To reproduce the missing newline you can do 'image dump smytab' on any binary.

Previously

Symtab, file = D:\upstream\build\Debug\bin\clang-diff.exe, num_symbols = 0(lldb)

Now

Symtab, file = D:\upstream\build\Debug\bin\clang-diff.exe, num_symbols = 0
(lldb)

Reviewers: zturner, aleksandr.urakov, lldb-commits

Subscribers: abidh

Differential Revision: https://reviews.llvm.org/D52627

llvm-svn: 343497

lldb/source/Symbol/Symtab.cpp

index 18a2dc7..e1089f9 100644 (file)
@@ -139,6 +139,8 @@ void Symtab::Dump(Stream *s, Target *target, SortOrder sort_order) {
       }
       break;
     }
+  } else {
+    s->PutCString("\n");
   }
 }