gdb/cli: Factor out code to list lines around a given line
authorBruno Larsen <blarsen@redhat.com>
Thu, 15 Jun 2023 09:02:11 +0000 (11:02 +0200)
committerBruno Larsen <blarsen@redhat.com>
Fri, 14 Jul 2023 08:57:34 +0000 (10:57 +0200)
commit0f819434f242abef3cdbdd3b6f1d94317bc1e81a
tree95c5aa42d43ce2346454a7ec11267edefb6c8ed1
parent9d9f26d8b1a15561af02370f15be0af0d56ac5fa
gdb/cli: Factor out code to list lines around a given line

A future patch will add more situations that calculates "lines around a
certain point" to be printed using print_source_lines, and the logic
could be re-used. As a preparation for those commits, this one factors
out that part of the logic of the list command into its own function.
No functional changes are expected

Approved-By: Tom Tromey <tom@tromey.com>
gdb/cli/cli-cmds.c