bombela/backward-cpp

Default source line format compatible with compiler error format

iripoll opened this issue · 2 comments

It would be nice, that by default, the line printed by print_source_loc() has the same aspect than those generated by most compilers.
That is: [filename]:[line]

May code editors accept this syntax to open the file and move to the line. May be other debugging tools can also benefit from this small change. The current print is very human friendly, but it is less practical.

Here is an example:
Current line error looks like:
#0 Source "src/statistics.c", line 29, in BlockEntropy(void *data) ....

Suggested change:
#0 Source "src/statistics.c:29", in BlockEntropy(void *data) ....

I also ran across the same issue and created a PR.