Skip to content

Commit 8580abc

Browse files
add suggestion on how to add a panic breakpoint
Co-authored-by: Pat Pannuto <[email protected]>
1 parent caa2b04 commit 8580abc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
625625
.struct_span_err(no_mangle_span, "`#[no_mangle]` cannot be used on weak language items")
626626
.with_note("The linker requires specific names for internal language items,")
627627
.with_note("like panic handlers, eh personality functions or eh catch typeinfo variables.")
628+
.with_note("If you are trying to prevent mangling to ease debugging, many")
629+
.with_note("debuggers support a command such as `rbreak {sym}` to")
630+
.with_note("match `.*{sym}.*` instead of `break {sym}` on a specific name")
628631
.with_span_label(tcx.def_span(did), label)
629632
.with_span_label(span, label_attr);
630633
if let Some(link_name) = lang_item.link_name() {

0 commit comments

Comments
 (0)