[Lldb-commits] [PATCH] D71237: [FormatEntity] Add mangled function name support

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 9 17:16:31 PST 2019

JDevlieghere added inline comments.

Comment at: lldb/include/lldb/Target/Language.h:146
+    eNameWithNoArgs,
+    eMangledName

Comment at: lldb/source/Core/FormatEntity.cpp:1754
+    StreamString ss;
+    if (sc->function)
+      language_plugin = Language::FindPlugin(sc->function->GetLanguage());
Let's be consistent with the braces. Either all single-line statements should have them, or none. 

Comment at: lldb/source/Core/FormatEntity.cpp:1782
+      if (name) {
+        s.PutCString(name);
Early return?

Comment at: lldb/source/Core/FormatEntity.cpp:1800
+  }
+    return false;
This looks odd, are you missing a closing brace?

Comment at: lldb/test/Shell/Settings/Inputs/main.cpp:9
+class Conversion
This looks not clang formatted. I'm pretty sure I added a `.clang-format` file for the shell tests that should match the one used by LLDB but without the 80 col limit. 

Comment at: lldb/test/Shell/Settings/TestFrameFormatMangling.test:7
+# CHECK: frame #0: {{.*}}C::C(this=
+set set frame-format "frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{\`${function.mangled-name}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n"
+frame info
Can we simplify the format? For example, I don't think the color matters here. 

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list