aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-03-27 15:57:19 +0100
committerPedro Alves <palves@redhat.com>2017-03-27 15:57:19 +0100
commit8c43009f48a0d4be497cf7c1285784aa70fc5abd (patch)
tree8fb67ece7ebff4e95eeb9cb56a9bc55c2924f8fd /gdb/ChangeLog
parenta7e80b9e21eb907ac5c90de7452588c059db0cec (diff)
downloadgdb-8c43009f48a0d4be497cf7c1285784aa70fc5abd.zip
gdb-8c43009f48a0d4be497cf7c1285784aa70fc5abd.tar.gz
gdb-8c43009f48a0d4be497cf7c1285784aa70fc5abd.tar.bz2
dwarf2read.c: Clean up out of bounds handling
Multiple places in dwarf2read.c open code 1-based to 0-based index conversion and check for out of bounds accesses to lh->include_dirs and lh->file_names. This commit factors those out to a couple methods and uses them throughout. gdb/ChangeLog: 2017-03-27 Pedro Alves <palves@redhat.com> * dwarf2read.c (file_entry) <dir_index>: Add comment. (file_entry::include_dir): New method. (line_header::include_dir_at, line_header::file_name_at): New methods. (setup_type_unit_groups, setup_type_unit_groups) (psymtab_include_file_name): Simplify using the new methods. (lnp_state_machine) <the_line_header>: New field. <file>: Add comment. (lnp_state_machine::current_file): New method. (dwarf_record_line): Simplify using the new methods. (init_lnp_state_machine): Initialize the "the_line_header" field. (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name): Simplify using the new methods.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 517aa3d..106388f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,21 @@
2017-03-27 Pedro Alves <palves@redhat.com>
+ * dwarf2read.c (file_entry) <dir_index>: Add comment.
+ (file_entry::include_dir): New method.
+ (line_header::include_dir_at, line_header::file_name_at): New
+ methods.
+ (setup_type_unit_groups, setup_type_unit_groups)
+ (psymtab_include_file_name): Simplify using the new methods.
+ (lnp_state_machine) <the_line_header>: New field.
+ <file>: Add comment.
+ (lnp_state_machine::current_file): New method.
+ (dwarf_record_line): Simplify using the new methods.
+ (init_lnp_state_machine): Initialize the "the_line_header" field.
+ (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
+ Simplify using the new methods.
+
+2017-03-27 Pedro Alves <palves@redhat.com>
+
* cp-name-parser.y (make_empty): Delete.
(demangler_special, nested_name, ptr_operator, array_indicator)
(direct_declarator, declarator_1): Use fill_comp instead of