aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-22 15:20:24 -0600
committerTom Tromey <tromey@adacore.com>2019-08-06 08:04:33 -0600
commitb08b16c8391bbcd706a4aaa4b09509e7c2b8c676 (patch)
tree29164c2b0b5dff2ac4b43a22044b1c6abcf2d97d /gdb/ui-out.h
parentcb44333d99548bbbf7be06387a31877ee9322ab4 (diff)
downloadgdb-b08b16c8391bbcd706a4aaa4b09509e7c2b8c676.zip
gdb-b08b16c8391bbcd706a4aaa4b09509e7c2b8c676.tar.gz
gdb-b08b16c8391bbcd706a4aaa4b09509e7c2b8c676.tar.bz2
Clean up source file error reporting
print_source_lines_base reopens the source file every time that a source line is to be printed. However, there's no need to do this so frequently -- it's enough to do it when switching source files, and otherwise rely on the cache. The code seems to try to avoid these multiple opens; at a guess I'd say something just got confused along the way. This patch fixes the problem by reorganizing the code both to make it more clear, and to ensure that reopens only occur when the "last source visited" changes. gdb/ChangeLog 2019-08-06 Tom Tromey <tromey@adacore.com> * source.c (last_source_error): Now bool. (print_source_lines_base): Make "noprint" bool. Only open source file when last_source_visited changes.
Diffstat (limited to 'gdb/ui-out.h')
0 files changed, 0 insertions, 0 deletions