]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/NEWS
gdb: new 'maint flush source-cache' command
authorAndrew Burgess <aburgess@redhat.com>
Fri, 26 Nov 2021 13:51:36 +0000 (13:51 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Wed, 12 Jan 2022 11:19:48 +0000 (11:19 +0000)
commit393707788800b05448201fbb184ba758e26960fd
tree678f039f2aa09dc16899e259c3530bfe6044a5aa
parent8864ef428d92e58b48ec11136d3b91622345c838
gdb: new 'maint flush source-cache' command

This commit adds a new 'maint flush source-cache' command, this
flushes the cache of source file contents.

After flushing GDB is forced to reread source files the next time any
source lines are to be displayed.

I've added a test for this new feature.  The test is a little weird,
in that it modifies a source file after compilation, and makes use of
the cache flush so that the changes show up when listing the source
file.  I'm not sure when such a situation would ever crop up in real
life, but maybe we can imagine such cases.

In reality, this command is useful for testing the syntax highlighting
within GDB, we can adjust the syntax highlighting settings, flush the
cache, and then get the file contents re-highlighted using the new
settings.
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/source-cache.c
gdb/testsuite/gdb.base/cached-source-file.exp