aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-03-26 15:20:34 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-03-26 17:07:45 -0400
commit093c33e7a707b7f6654b7331dff31b743a49eb8a (patch)
tree3a34be5e0cdbe955f1c68d572d672951887f37ad /gdb/Makefile.in
parent9f034d7573ec4fb4bd3879ce66fef0a20167a2ba (diff)
downloadgdb-users/simark/split-dwarf2read.zip
gdb-users/simark/split-dwarf2read.tar.gz
gdb-users/simark/split-dwarf2read.tar.bz2
Move DWARF index-related things to a separate fileusers/simark/split-dwarf2read
I want to add a DWARF index-related feature (automatically produce index files when loading objfiles in GDB), but I don't want to add many hundred lines to the already too big dwarf2read.c. I thought it would be a logical split to move everything related to the DWARF index to its own file. I first tried to move everything that reads and writes DWARF indices to a separate file, but found that the "read" part is a little bit entangled with the rest of dwarf2read.c, so the line is hard to draw about where to split. The write part is quite isolated though, so I moved this part to a new file, dwarf-index-write.c. Some things are necessary to both reading and writing indices, so I placed them in dwarf-index-common.{c,h}. The idea would be to have a dwarf-index-read.c eventually that would use it too (for now that code is still in dwarf2read.c). This required moving some things to a new dwarf2read.h header, so they can be read by the code that writes the index. The patch is big in number of lines, but it's all existing code being moved around. The only changes are that some functions are not static anymore, a declaration is added in a .h file, and therefore the comment is moved there. I built-tested it with a little and big endian target. This patch is also available on the users/simark/split-dwarf2read branch. gdb/ChangeLog: * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and dwarf-index-write.c (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h. * dwarf-index-common.c: New file. * dwarf-index-common.h: New file. * dwarf-index-write.c: New file. * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h. (struct dwarf2_section_info): Move from here. (dwarf2_section_info_def): Likewise. (DEF_VEC_O (dwarf2_section_info_def)): Likewise. (offset_type): Likewise. (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise. (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise. (DW2_GDB_INDEX_CU_SET_VALUE): Likewise. (byte_swap): Likewise. (MAYBE_SWAP): Likewise. (dwarf2_per_cu_ptr): Likewise. (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise. (struct tu_stats): Likewise. (struct dwarf2_per_objfile): Likewise. (struct dwarf2_per_cu_data): Likewise. (struct signatured_type): Likewise. (sig_type_ptr): Likewise. (DEF_VEC_P (sig_type_ptr)): Likewise. (INDEX4_SUFFIX): Likewise. (INDEX5_SUFFIX): Likewise. (DEBUG_STR_SUFFIX): Likewise. (dwarf2_read_section): Make non-static. (mapped_index_string_hash): Move from here. (dwarf5_djb_hash): Likewise. (file_write): Likewise. (class data_buf): Likewise. (struct symtab_index_entry): Likewise. (struct mapped_symtab): Likewise. (find_slot): Likewise. (hash_expand): Likewise. (add_index_entry): Likewise. (uniquify_cu_indices): Likewise. (class c_str_view): Likewise. (class c_str_view_hasher): Likewise. (class vector_hasher): Likewise. (write_hash_table): Likewise. (psym_index_map): Likewise. (struct addrmap_index_data): Likewise. (add_address_entry): Likewise. (add_address_entry_worker): Likewise. (write_address_map): Likewise. (symbol_kind): Likewise. (write_psymbols): Likewise. (struct signatured_type_index_data): Likewise. (write_one_signatured_type): Likewise. (recursively_count_psymbols): Likewise. (recursively_write_psymbols): Likewise. (class debug_names): Likewise. (check_dwarf64_offsets): Likewise. (psyms_seen_size): Likewise. (write_gdbindex): Likewise. (write_debug_names): Likewise. (assert_file_size): Likewise. (write_psymtabs_to_index): Likewise. (save_gdb_index_command): Likewise. (_initialize_dwarf2_read): Don't register the "save gdb-index" command. * dwarf2read.h: New file.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index b1ba005..0a07cab 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -992,6 +992,8 @@ COMMON_SFILES = \
disasm.c \
disasm-selftests.c \
dummy-frame.c \
+ dwarf-index-common.c \
+ dwarf-index-write.c \
dwarf2-frame.c \
dwarf2-frame-tailcall.c \
dwarf2expr.c \
@@ -1213,10 +1215,12 @@ HFILES_NO_SRCDIR = \
dictionary.h \
disasm.h \
dummy-frame.h \
+ dwarf-index-common.h \
dwarf2-frame.h \
dwarf2-frame-tailcall.h \
dwarf2expr.h \
dwarf2loc.h \
+ dwarf2read.h \
event-loop.h \
event-top.h \
exceptions.h \