aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-04-13 14:53:48 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-08-18 14:03:14 +0100
commitc04fe68f6b94815d3f49c9aed64b2c388d45f4aa (patch)
tree72b268617ac9f019df3d32da7363540b3c37fa0f /gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
parent0e1862bb401f47716446aef143b2bf7a4563f541 (diff)
downloadbinutils-c04fe68f6b94815d3f49c9aed64b2c388d45f4aa.zip
binutils-c04fe68f6b94815d3f49c9aed64b2c388d45f4aa.tar.gz
binutils-c04fe68f6b94815d3f49c9aed64b2c388d45f4aa.tar.bz2
gdb: Improve cache matching criteria for the bfd cache.
Within gdb open bfd objects are reused where possible if an attempt is made to reopen a file that is already being debugged. To spot if the on disc file has changed gdb currently examines the mtime of the file and compares it to the mtime of the open bfd in the cache. A problem exists when the on disc file is being rapidly regenerated, as happens, for example, with automated testing. In some cases the file is generated so quickly that the mtime appears not to change, while the on disc file has changed. This patch extends the bfd cache to also hold the file size of the file, the inode of the file, and the device id of the file; gdb can then compare filename, file size, mtime, inode, and device id to determine if an existing bfd object can be reused. gdb/ChangeLog: * gdb_bfd.c (struct gdb_bfd_data): Add size, inode, and device id field. (struct gdb_bfd_cache_search): Likewise. (eq_bfd): Compare the size, inode, and device id fields. (gdb_bfd_open): Initialise the size, inode, and device id fields. (gdb_bfd_ref): Likewise. (gdb_bfd_unref): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-mi-objfile-gdb.py')
0 files changed, 0 insertions, 0 deletions