[Lldb-commits] [lldb] Add a scripted way to re-present a stop location (PR #158128)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 7 13:05:08 PDT 2025
================
@@ -566,43 +655,51 @@ void BreakpointLocation::GetDescription(Stream *s,
s->Indent();
}
- if (m_address.IsSectionOffset() &&
- (level == eDescriptionLevelFull || level == eDescriptionLevelInitial))
- s->Printf(", ");
- s->Printf("address = ");
-
- ExecutionContextScope *exe_scope = nullptr;
- Target *target = &m_owner.GetTarget();
- if (target)
- exe_scope = target->GetProcessSP().get();
- if (exe_scope == nullptr)
- exe_scope = target;
-
- if (level == eDescriptionLevelInitial)
- m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
- Address::DumpStyleFileAddress);
- else
- m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
- Address::DumpStyleModuleWithFileAddress);
-
- if (IsIndirect() && m_bp_site_sp) {
- Address resolved_address;
- resolved_address.SetLoadAddress(m_bp_site_sp->GetLoadAddress(), target);
- Symbol *resolved_symbol = resolved_address.CalculateSymbolContextSymbol();
- if (resolved_symbol) {
- if (level == eDescriptionLevelFull || level == eDescriptionLevelInitial)
- s->Printf(", ");
- else if (level == lldb::eDescriptionLevelVerbose) {
- s->EOL();
- s->Indent();
+ if (!is_scripted_desc) {
+ if (m_address.IsSectionOffset() &&
+ (level == eDescriptionLevelFull || level == eDescriptionLevelInitial))
+ s->Printf(", ");
+ s->Printf("address = ");
+
+ ExecutionContextScope *exe_scope = nullptr;
+ Target *target = &m_owner.GetTarget();
+ if (target)
+ exe_scope = target->GetProcessSP().get();
+ if (exe_scope == nullptr)
+ exe_scope = target;
+
+ if (level == eDescriptionLevelInitial)
+ m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
+ Address::DumpStyleFileAddress);
+ else
+ m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress,
+ Address::DumpStyleModuleWithFileAddress);
+
+ if (IsIndirect() && m_bp_site_sp) {
+ Address resolved_address;
+ resolved_address.SetLoadAddress(m_bp_site_sp->GetLoadAddress(), target);
+ Symbol *resolved_symbol = resolved_address.CalculateSymbolContextSymbol();
+ if (resolved_symbol) {
+ if (level == eDescriptionLevelFull || level == eDescriptionLevelInitial)
+ s->Printf(", ");
+ else if (level == lldb::eDescriptionLevelVerbose) {
+ s->EOL();
+ s->Indent();
+ }
+ s->Printf("indirect target = %s",
+ resolved_symbol->GetName().GetCString());
}
- s->Printf("indirect target = %s",
- resolved_symbol->GetName().GetCString());
}
}
- bool is_resolved = IsResolved();
- bool is_hardware = is_resolved && m_bp_site_sp->IsHardware();
+ // Scripted breakpoint are currently always resolved. Does this seem right?
----------------
JDevlieghere wrote:
Should this be a fixme?
https://github.com/llvm/llvm-project/pull/158128
More information about the lldb-commits
mailing list