Dne 1.9.2010 01:25, Tom Tromey napsal:
Karel> What are the improvements compared to the current ABRT's backtrace code? [...] Karel> - new hand written parser: it parses much more backtraces correctly Karel> (especially those with C++ frames, applications using boost library), Karel> and the code seems to be more readable than the current bison Karel> grammar. That is because some parts of the backtrace format are very Karel> difficult to express in the rules for the Bison GLR parser while Karel> keeping the memory usage and parsing time reasonable
It would not be difficult to change gdb to emit a format that is much simpler to parse. The easiest way is to write a backtrace emitter in Python -- this way you can pick whatever format you like, without having to modify the gdb core. We already have this code, you would just need to adapt it to format how you want.
Hi Tom,
I was imprecise it that email. The new parser handles all valid backtraces (that were sent to Bugzilla) nicely as far as I know (I checked only a few hundreds, not all of them), with the advantage of parsing already existing backtraces, and supporting the most common format. The parser also handles some badly created/formatted backtraces that were created in the early days of ABRT. So the problem we had with parsing is solved for now. The old problem was that the GDB output was not expressible in Bison rules (or I was not skilled enough to do it), and we used Bison to parse the backtraces.
We can use a custom backtrace emitter if we see that the GDB "standard" output changes too much over time and our existing parser needs a lot of tweaking.
Or maybe we can use it if we can get more useful/interesting data out of the coredump with it. I do not know what data that could be.
Thanks.
Karel
There are other ways as well, though, if you don't like that.
Tom