]> git.bitcoin.ninja Git - rust-lightning/commitdiff
debug symbol match
authorMatt Corallo <git@bluematt.me>
Tue, 10 Jan 2023 04:59:36 +0000 (04:59 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 10 Jan 2023 05:04:08 +0000 (05:04 +0000)
lightning/src/debug_sync.rs

index b61d1cb55e8cff3143c686c4ad6fbc13427b47d9..3cb0f4612d01122bfea49ff91e1f3978dd60cef7 100644 (file)
@@ -85,11 +85,11 @@ fn get_construction_location(backtrace: &Backtrace) -> String {
                        if !sync_mutex_constr_regex.is_match(symbol_name) {
                                if found_debug_sync {
                                        if let Some(col) = symbol.colno() {
-                                               return format!("{}:{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), col);
+                                               return format!("{}:{}:{} ({})", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), col, symbol_name);
                                        } else {
                                                // Windows debug symbols don't support column numbers, so fall back to
                                                // line numbers only if no `colno` is available
-                                               return format!("{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap());
+                                               return format!("{}:{} ({})", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), symbol_name);
                                        }
                                }
                        } else { found_debug_sync = true; }