3 ms·
Yeah for backtraces to work you also need to have debug info enabled which puts a major burden onto linking time. And once they are enabled, you have to scan th
by est31 7y ago
Yeah for backtraces to work you also need to have debug info enabled which puts a major burden onto linking time. And once they are enabled, you have to scan the backtrace carefully to filter out the parts that are in the panic library. The line message is displayed prominently and thus allows for a much faster development cycle in finding the error.
- umanwizard 7y agoBacktraces even without line numbers are still quite useful, as long as they have function names.
- nicoburns 7y agoI mean, they're better than nothing. But they leave you guessing at exactly where the error is if you do similar operations more than once in your function. A line number is much better.
- ComputerGuru 7y agoJust as a life tip (regardless of language): Without a line number you would get an offset, which you can use gdb or addr2line to go back to line numbers if you have the unstripped binary or debug symbols available (or the source, but that’s not necessarily deterministic).
- saagarjha 7y agoOffsets are occasionally more useful than line numbers, especially if you have multiple things on one line.