================
@@ -508,8 +508,20 @@ void BreakpointLocation::GetDescription(Stream *s,
s->PutCString("re-exported target = ");
else
s->PutCString("where = ");
+
+ // If there's a preferred line entry for printing, use that.
+ bool show_function_info = true;
+ if (auto preferred = GetPreferredLineEntry()) {
+ sc.line_entry = *preferred;
+ // FIXME: We're going to get the function name wrong when the preferred
+ // line entry is not the lowest one. For now, just leave the function
+ // out in this case, but we really should also figure out how to easily
+ // fake the function name here.
----------------
clayborg wrote:
Would a solution that changed `GetPreferredLineEntry()` to be
`GetPreferredSymbolContext()` where it would return a `SymbolContext` object
where anything that is valid in the `SymbolContext` would end up overriding the
actual symbol context in `sc`? We might want to add a new function like:
```
SymbolContext BreakpointLocation::CalculateSymbolContext()
```
That would calll `m_address.CalculateSymbolContext(&sc);` and then insert any
preferred entries into that symbol context. That would allow anyone to get the
right symbol context for a `BreakpointLocation` easily. Then this function
would change or need to know anything about the preferred stuff.
https://github.com/llvm/llvm-project/pull/112939
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits