This way if we're linking against an old KF5, we still generate a backtrace
- Group Reviewers
- R871:cfa43ed278c8: Read the new message string after rather than before
Quick recap from what we talked about on telegram: putting the print after the bt is most definitely going to throw off the backtrace parsing logic, so doing it this way would require extensive changes there, which is a dangerous place to make extensive changes.
Or we could define a simple function to ignore errors https://stackoverflow.com/questions/17923865/gdb-stops-in-a-command-file-if-there-is-an-error-how-to-continue-despite-the-er but that's also a bit faffy.
Another completely standalone approach would be to change BacktraceGenerator (I think?) to invoke the print in a completely independent gdb invocation i.e. separate the print call from the regular batchcommands and have drkonqi assemble it back into the final report. That way the actual tracing batch command couldn't fail on the print.
Mh. Not quite what I had in mind but I suppose it makes sense this way.
I think we need a test case for the highlighter though :| It totally blows up in my face when I trace a running dolphin because toskip isn't quite right.
This is leaking the file, is it not? It never deletes this object.
|59 ↗||(On Diff #78117)|
lineNr is initialized to currentBlock().firstLineNumber() that is not necessarily 0, so toskip needs to be
Should also be camel toSkip.
|65 ↗||(On Diff #78117)|
Isn't this off-by-one versus the original code?
|76 ↗||(On Diff #78117)|
The assert below fails when I trace a running dolphin, I am not super sure why but I am guessing it's because the toskip init being bugged vis a vis the lineNr being an offset.