[Lldb-commits] [lldb] [lldb] Print mangled names with verbose break list (PR #84071)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 6 10:04:53 PST 2024


================
@@ -524,6 +524,9 @@ void BreakpointLocation::GetDescription(Stream *s,
           s->EOL();
           s->Indent("function = ");
           s->PutCString(sc.function->GetName().AsCString("<unknown>"));
+          s->EOL();
+          s->Indent("mangled function = ");
+          s->PutCString(sc.function->GetMangled().GetMangledName().AsCString("<unknown>"));
----------------
clayborg wrote:

It does look like `SymbolContext::DumpStopContext` does what we want. Will the output fit well into the "breakpoint list --verbose" output? Or will it look too different?

I would be fine to just print the inline function name if the output is too different. 

FYI: Any `lldb_private::Block` may or may not have inlined function info. You can always call:
```
Block *inlined_block = block->GetContainingInlinedBlock();
```
If `block` is an inlined function it will return `block`, else it will get the parent block and see if any parent blocks contain inline function info. If it returns NULL, then `block` isn't a or contained in an inline block. 

Getting an inline call stack from this information is tricky and is done in `SymbolContext::DumpStopContext()` correctly.

https://github.com/llvm/llvm-project/pull/84071


More information about the lldb-commits mailing list