aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-23 08:22:50 -0600
committerTom Tromey <tromey@adacore.com>2019-08-06 08:04:33 -0600
commit269249d9406096dd59aecd8845e960fdddb1ebfe (patch)
tree8a74c5a0650640b8a702853502b3bda2be844f55 /gdb/source.h
parentc0e8dcd87101119806c5bbca4c7b649c1b8c0996 (diff)
downloadbinutils-269249d9406096dd59aecd8845e960fdddb1ebfe.zip
binutils-269249d9406096dd59aecd8845e960fdddb1ebfe.tar.gz
binutils-269249d9406096dd59aecd8845e960fdddb1ebfe.tar.bz2
Fix latent bug in source cache
The source cache was not returning the final \n of the requested range of lines. This caused regressions with later patches in this series, so this patch pre-emptively fixes the bug. This adds a self-test of "extract_lines" to the source cache code. To make it simpler to test, I changed extract_lines to be a static function, and changed it's API a bit. gdb/ChangeLog 2019-08-06 Tom Tromey <tromey@adacore.com> * source-cache.c (extract_lines): No longer a method. Changed type of parameter. Include final newline. (selftests::extract_lines_test): New function. (_initialize_source_cache): Likewise. * source-cache.h (class source_cache) <extract_lines>: Don't declare.
Diffstat (limited to 'gdb/source.h')
0 files changed, 0 insertions, 0 deletions