This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH RFC 0/5] Add a DWARF index cache


I made a quick and dirty prototype a while ago where GDB would automatically
save and lookup DWARF index files.  A few people told me that it was quite
useful, so I'm trying to make it suitable for merging.  I'm sending it as an
RFC first to get comments on the feature and the approach, and because there
are probably a few loose ends.  Patches 1-4 are mostly cleanup or preparatory,
the final one contains the actual feature.  The commit message of that last
patch also contains more details.

Simon Marchi (5):
  Rename some functions, index -> gdb_index
  Remove mapped_index::total_size
  Make index reading functions more modular
  Introduce scoped_mmapped_file
  Add DWARF index cache

 gdb/Makefile.in                               |   3 +
 gdb/build-id.h                                |  11 +
 gdb/common/pathstuff.c                        |  16 +
 gdb/common/pathstuff.h                        |  10 +
 gdb/common/scoped_fd.h                        |  17 +-
 gdb/common/scoped_mmapped_file.h              |  70 +++++
 gdb/dwarf-index-cache.c                       | 421 ++++++++++++++++++++++++++
 gdb/dwarf-index-cache.h                       |  86 ++++++
 gdb/dwarf-index-common.h                      |   5 +
 gdb/dwarf-index-write.c                       |  81 +++--
 gdb/dwarf-index-write.h                       |  34 +++
 gdb/dwarf2read.c                              | 257 +++++++++++-----
 gdb/dwarf2read.h                              |   5 +
 gdb/testsuite/boards/local-board.exp          |   1 +
 gdb/testsuite/gdb.base/index-cache.c          |  23 ++
 gdb/testsuite/gdb.base/index-cache.exp        | 204 +++++++++++++
 gdb/testsuite/gdb.base/maint.exp              |  23 ++
 gdb/testsuite/lib/mi-support.exp              |  16 +-
 gdb/unittests/scoped_mmapped_file-selftests.c |  95 ++++++
 19 files changed, 1270 insertions(+), 108 deletions(-)
 create mode 100644 gdb/common/scoped_mmapped_file.h
 create mode 100644 gdb/dwarf-index-cache.c
 create mode 100644 gdb/dwarf-index-cache.h
 create mode 100644 gdb/dwarf-index-write.h
 create mode 100644 gdb/testsuite/gdb.base/index-cache.c
 create mode 100644 gdb/testsuite/gdb.base/index-cache.exp
 create mode 100644 gdb/unittests/scoped_mmapped_file-selftests.c

-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]