Don't print symbol declaration's line number in rbreak output
[external/binutils.git] / gdb / ChangeLog
1 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2
3         * symtab.c (print_symbol_info): Skip printing filename and line
4         number when `last' is NULL.
5         (symtab_symbol_info): Use empty string instead of NULL for first
6         invocation of print_symbol_info.
7         (rbreak_command): Pass NULL to `last' parameter of
8         print_symbol_info.
9
10 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
13         instead of nullptr.
14
15 2018-04-16  Pedro Alves  <palves@redhat.com>
16
17         * MAINTAINERS (sh): Remove.
18         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
19         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
20         (ALLDEPFILES): Remove sh64-tdep.c.
21         * NEWS: Mentions that support for SH-5/SH64 is removed.
22         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
23         (sh*-*-openbsd*): Ditto.
24         (sh64-*-elf*): Remove.
25         (sh*): Remove.
26         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
27         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
28         * sh-tdep.c: No longer include "sh64-tdep.h".
29         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
30         * sh64-tdep.c, sh64-tdep.h: Remove files.
31
32 2018-04-16  Pedro Alves  <palves@redhat.com>
33
34         * MAINTAINERS: Remove m88k.
35         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
36         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
37         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
38         * NEWS: Mention that support for m88k was removed.
39         * configure.host (m88*-*-*): Remove support.
40         * configure.nat (m88k-*-*): Remove support.
41         * configure.tgt (m88*-*-openbsd*): Remove.
42         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
43
44 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
45
46         * configure.tgt (x86_tobjs): New variable.
47         (amd64_tobjs, i386_tobjs): Use it.
48
49 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
50
51         * symtab.c (print_symbol_info): Precede the symbol definition by
52         the line number when available.
53         * NEWS: Advertise this enhancement.
54
55 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
56
57         * NEWS (New options): announce set/show record btrace cpu.
58         * btrace.c: Include record-btrace.h.
59         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
60         the vendor is unknown.
61         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
62         Maybe overwrite the btrace configuration's cpu.
63         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
64         (btrace_fetch): Add cpu parameter.  Update callers.
65         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
66         Maybe overwrite the btrace configuration's cpu.  Skip enabling
67         errata workarounds if the vendor is unknown.
68         * python/py-record-btrace.c: Include record-btrace.h.
69         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
70         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
71         * record-btrace.c (record_btrace_cpu_state_kind): New.
72         (record_btrace_cpu): New.
73         (set_record_btrace_cpu_cmdlist): New.
74         (record_btrace_get_cpu): New.
75         (require_btrace_thread, record_btrace_info)
76         (record_btrace_resume_thread): Call record_btrace_get_cpu.
77         (cmd_set_record_btrace_cpu_none): New.
78         (cmd_set_record_btrace_cpu_auto): New.
79         (cmd_set_record_btrace_cpu): New.
80         (cmd_show_record_btrace_cpu): New.
81         (_initialize_record_btrace): Initialize set/show record btrace cpu
82         commands.
83         * record-btrace.h (record_btrace_get_cpu): New.
84
85 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
86
87         * record.c (set_record_command): Fix typo in message.
88
89 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
90
91         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
92
93 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
94
95         * infrun.c (process_event_stop_test): Call
96         gdbarch_in_indirect_branch_thunk.
97         * gdbarch.sh (in_indirect_branch_thunk): New.
98         * gdbarch.c: Regenerated.
99         * gdbarch.h: Regenerated.
100         * x86-tdep.h: New.
101         * x86-tdep.c: New.
102         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
103         (HFILES_NO_SRCDIR): Add x86-tdep.h.
104         (ALLDEPFILES): Add x86-tdep.c.
105         * arch-utils.h (default_in_indirect_branch_thunk): New.
106         * arch-utils.c (default_in_indirect_branch_thunk): New.
107         * i386-tdep: Include x86-tdep.h.
108         (i386_in_indirect_branch_thunk): New.
109         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
110         function.
111         * amd64-tdep: Include x86-tdep.h.
112         (amd64_in_indirect_branch_thunk): New.
113         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
114
115 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
116
117         PR gdb/23053
118         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
119         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
120         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
121         regression.
122
123 2018-04-12  Tom Tromey  <tom@tromey.com>
124
125         * rust-lang.c (rust_print_struct_def): Remove univariant code.
126         (rust_evaluate_subexp): Likewise.
127
128 2018-04-12  Pedro Alves  <palves@redhat.com>
129
130         * procfs.c (procfs_detach): Make forward declaration's prototype
131         match definition's protototype.
132         (proc_get_LDT_entry): Remove stale do_cleanups call.
133
134 2018-04-12  Pedro Alves  <palves@redhat.com>
135
136         * target.h (target_ops::to_has_exited): Delete.
137         (target_has_exited): Delete.
138         * target-delegates.c: Regenerate.
139
140 2018-04-11  Pedro Alves  <palves@redhat.com>
141
142         * target.c (fileio_fh_t::t): Add comment.
143         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
144         (target_fileio_close): Handle a NULL target.
145         (invalidate_fileio_fh): New.
146         (target_close): Call it.
147         * remote.c (remote_hostio_send_command): No longer check whether
148         remote_desc is open.
149
150 2018-04-11  Pedro Alves  <palves@redhat.com>
151
152         * target.c (fileio_fh_t): Make it a named struct instead of a
153         typedef.
154         (fileio_fh_t::is_closed): New method.
155         (DEF_VEC_O (fileio_fh_t)): Remove.
156         (fileio_fhandles): Now a std::vector.
157         (is_closed_fileio_fh): Delete.
158         (acquire_fileio_fd): Adjust.  Rename parameters.
159         (release_fileio_fd): Adjust.
160         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
161         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
162         (target_fileio_close): Adjust.
163
164 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
165
166         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
167         index.
168
169 2018-04-10  Pedro Alves  <palves@redhat.com>
170
171         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
172         (scoped_finish_thread_state): New class.
173         * infcmd.c (run_command_1): Use it instead of finish_thread_state
174         cleanup.
175         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
176         (fetch_inferior_event, normal_stop): Likewise.
177         * thread.c (finish_thread_state_cleanup): Delete.
178
179 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
180             Pedro Alves  <palves@redhat.com>
181
182         * value.c: Include "selftest.h" and "common/array-view.h".
183         (struct range) <operator ==>: New.
184         (test_ranges_contain): New.
185         (check_ranges_vector): New.
186         (test_insert_into_bit_range_vector): New.
187         (_initialize_values): Register selftests.
188         * common/array-view.h (operator==, operator!=): New.
189
190 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
191
192         * common/gdb_vecs.h (unordered_remove): Add overload that takes
193         an iterator.
194         * inline-frame.c: Include <algorithm>.
195         (struct inline_state): Add constructor.
196         (inline_state_s): Remove.
197         (DEF_VEC_O(inline_state_s)): Remove.
198         (inline_states): Change type to std::vector.
199         (find_inline_frame_state): Adjust to std::vector.
200         (allocate_inline_frame_state): Remove.
201         (clear_inline_frame_state): Adjust to std::vector.
202         (skip_inline_frames): Adjust to std::vector.
203
204 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
205
206         * tracepoint.h (struct trace_state_variable): Add constructor.
207         <name>: Change type to std::string.
208         * tracepoint.c (tsv_s): Remove.
209         (DEF_VEC_O(tsv_s)): Remove.
210         (tvariables): Change to std::vector.
211         (create_trace_state_variable): Adjust to std::vector.
212         (find_trace_state_variable): Likewise.
213         (find_trace_state_variable_by_number): Likewise.
214         (delete_trace_state_variable): Likewise.
215         (trace_variable_command): Adjust to std::string.
216         (delete_trace_variable_command): Likewise.
217         (tvariables_info_1): Adjust to std::vector.
218         (save_trace_state_variables): Likewise.
219         (start_tracing): Likewise.
220         (merge_uploaded_trace_state_variables): Adjust to std::vector
221         and std::string.
222         * target.h (struct target_ops)
223         <to_download_trace_state_variable>: Pass reference to
224         trace_state_variable.
225         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
226         * target-delegates.c: Re-generate.
227         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
228         (mi_tsv_deleted): Likewise.
229         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
230         * remote.c (remote_download_trace_state_variable): Change
231         pointer to reference and adjust.
232         * make-target-delegates (parse_argtypes): Handle references.
233         (write_function_header): Likewise.
234         (munge_type): Likewise.
235
236 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
237
238         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
239         string_view-selftests.c.
240         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
241         testsuite.
242         * unittests/basic_string_view/cons/char/1.cc: Likewise.
243         * unittests/basic_string_view/cons/char/2.cc: Likewise.
244         * unittests/basic_string_view/cons/char/3.cc: Likewise.
245         * unittests/basic_string_view/element_access/char/1.cc:
246         Likewise.
247         * unittests/basic_string_view/element_access/char/empty.cc:
248         Likewise.
249         * unittests/basic_string_view/element_access/char/front_back.cc:
250         Likewise.
251         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
252         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
253         Likewise.
254         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
255         Likewise.
256         * unittests/basic_string_view/modifiers/swap/char/1.cc:
257         Likewise.
258         * unittests/basic_string_view/operations/compare/char/1.cc:
259         Likewise.
260         * unittests/basic_string_view/operations/compare/char/13650.cc:
261         Likewise.
262         * unittests/basic_string_view/operations/copy/char/1.cc:
263         Likewise.
264         * unittests/basic_string_view/operations/data/char/1.cc:
265         Likewise.
266         * unittests/basic_string_view/operations/find/char/1.cc:
267         Likewise.
268         * unittests/basic_string_view/operations/find/char/2.cc:
269         Likewise.
270         * unittests/basic_string_view/operations/find/char/3.cc:
271         Likewise.
272         * unittests/basic_string_view/operations/find/char/4.cc:
273         Likewise.
274         * unittests/basic_string_view/operations/rfind/char/1.cc:
275         Likewise.
276         * unittests/basic_string_view/operations/rfind/char/2.cc:
277         Likewise.
278         * unittests/basic_string_view/operations/rfind/char/3.cc:
279         Likewise.
280         * unittests/basic_string_view/operations/substr/char/1.cc:
281         Likewise.
282         * unittests/basic_string_view/operators/char/2.cc: Likewise.
283         * unittests/string_view-selftests.c: New file.
284
285 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
286
287         * unittests/basic_string_view/capacity/1.cc: New file.
288         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
289         * unittests/basic_string_view/cons/char/1.cc: New file.
290         * unittests/basic_string_view/cons/char/2.cc: New file.
291         * unittests/basic_string_view/cons/char/3.cc: New file.
292         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
293         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
294         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
295         * unittests/basic_string_view/element_access/char/1.cc: New file.
296         * unittests/basic_string_view/element_access/char/2.cc: New file.
297         * unittests/basic_string_view/element_access/char/empty.cc: New file.
298         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
299         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
300         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
301         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
302         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
303         * unittests/basic_string_view/include.cc: New file.
304         * unittests/basic_string_view/inserters/char/1.cc: New file.
305         * unittests/basic_string_view/inserters/char/2.cc: New file.
306         * unittests/basic_string_view/inserters/char/3.cc: New file.
307         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
308         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
309         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
310         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
311         * unittests/basic_string_view/literals/types.cc: New file.
312         * unittests/basic_string_view/literals/values.cc: New file.
313         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
314         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
315         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
316         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
317         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
318         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
319         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
320         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
321         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
322         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
323         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
324         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
325         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
326         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
327         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
328         * unittests/basic_string_view/operations/data/char/1.cc: New file.
329         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
330         * unittests/basic_string_view/operations/find/char/1.cc: New file.
331         * unittests/basic_string_view/operations/find/char/2.cc: New file.
332         * unittests/basic_string_view/operations/find/char/3.cc: New file.
333         * unittests/basic_string_view/operations/find/char/4.cc: New file.
334         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
335         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
336         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
337         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
338         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
339         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
340         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
341         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
342         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
343         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
344         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
345         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
346         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
347         * unittests/basic_string_view/operators/char/2.cc: New file.
348         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
349         * unittests/basic_string_view/range_access/char/1.cc: New file.
350         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
351         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
352         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
353         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
354         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
355         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
356         * unittests/basic_string_view/requirements/typedefs.cc: New file.
357         * unittests/basic_string_view/typedefs.cc: New file.
358         * unittests/basic_string_view/types/1.cc: New file.
359
360 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
361
362         * common/gdb_string_view.h: Remove libstdc++ implementation
363         details, adjust to gdb reality.
364         * common/gdb_string_view.tcc: Likewise.
365         * cli/cli-script.c (struct string_view): Remove.
366         (user_args) <m_args>: Change element type to gdb::string_view.
367         (user_args::insert_args): Adjust.
368
369 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
370
371         * common/gdb_string_view.h: New file.
372         * common/gdb_string_view.tcc: New file.
373
374 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
375
376         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
377         * configure: Re-generate.
378
379 2018-04-09  Pedro Alves  <palves@redhat.com>
380
381         * gdbarch.sh: Include "observable.h" instead of "observer.h".
382         (set_target_gdbarch): Call
383         gdb::observers::architecture_changed.notify instead of
384         observer_notify_architecture_changed.
385
386 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
387
388         * tracepoint.c (struct current_traceframe_cleanup): Remove.
389         (do_restore_current_traceframe_cleanup): Remove.
390         (restore_current_traceframe_cleanup_dtor): Remove.
391         (make_cleanup_restore_current_traceframe): Remove.
392         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
393         New.
394         * tracepoint.h (struct scoped_restore_current_traceframe): New.
395         * infrun.c (fetch_inferior_event): Use
396         scoped_restore_current_traceframe.
397
398 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
399
400         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
401         Remove.
402         <n_allocated_type_units>: Remove.
403         <all_type_units>: Change to std::vector.
404         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
405         to std::vector change.
406         (dwarf2_per_objfile::get_cutu): Likewise.
407         (dwarf2_per_objfile::get_tu): Likewise.
408         (create_signatured_type_table_from_index): Likewise.
409         (create_signatured_type_table_from_debug_names): Likewise.
410         (dw2_symtab_iter_next): Likewise.
411         (dw2_print_stats): Likewise.
412         (dw2_expand_all_symtabs): Likewise.
413         (dw2_expand_marked_cus): Likewise.
414         (dw2_debug_names_iterator::next): Likewise.
415         (dwarf2_initialize_objfile): Likewise.
416         (add_signatured_type_cu_to_table): Likewise.
417         (create_all_type_units): Likewise.
418         (add_type_unit): Likewise.
419         (struct tu_abbrev_offset): Add constructor.
420         (build_type_psymtabs_1): Adjust to std::vector change.
421         (print_tu_stats): Likewise.
422         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
423         (write_debug_names): Likewise.
424
425 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
426
427         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
428         Make an std::vector.
429         <n_comp_units>: Remove.
430         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
431         to std::vector change.
432         (dwarf2_per_objfile::get_cutu): Likewise.
433         (dwarf2_per_objfile::get_cu): Likewise.
434         (create_cus_from_index): Likewise.
435         (create_addrmap_from_index): Likewise.
436         (create_addrmap_from_aranges): Likewise.
437         (dwarf2_read_index): Likewise.
438         (dw2_find_last_source_symtab): Likewise.
439         (dw2_map_symtabs_matching_filename): Likewise.
440         (dw2_symtab_iter_next): Likewise.
441         (dw2_print_stats): Likewise.
442         (dw2_expand_all_symtabs): Likewise.
443         (dw2_expand_symtabs_with_fullname): Likewise.
444         (dw2_expand_marked_cus): Likewise.
445         (dw2_map_symbol_filenames): Likewise.
446         (create_cus_from_debug_names): Likewise.
447         (dwarf2_read_debug_names): Likewise.
448         (dw2_debug_names_iterator::next): Likewise.
449         (dwarf2_initialize_objfile): Likewise.
450         (set_partial_user): Likewise.
451         (dwarf2_build_psymtabs_hard): Likewise.
452         (read_comp_units_from_section): Remove arguments, adjust to
453         std::vector change.
454         (create_all_comp_units): Adjust to std::vector and
455         read_comp_units_from_section changes.
456         (dwarf2_find_containing_comp_unit): Adjust to std::vector
457         change.
458         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
459         (psyms_seen_size): Likewise.
460         (write_gdbindex): Likewise.
461         (write_debug_names): Likewise.
462
463 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
464
465         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
466         with dwarf2_per_objfile.
467         (create_cus_from_index): Likewise.
468         (create_signatured_type_table_from_index): Likewise.
469         (dwarf2_read_index): Likewise.
470         (dwarf2_initialize_objfile): Likewise.
471         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
472         per_cu rather than get_dwarf2_per_objfile.
473
474 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
475
476         * dwarf2read.h (struct signatured_type): Forward declare.
477         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
478         New methods.
479         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
480         (dw2_get_cutu): ...this.
481         (dwarf2_per_objfile::get_cu): Rename from...
482         (dw2_get_cu): ...this.
483         (dwarf2_per_objfile::get_tu): New.
484         (create_addrmap_from_index): Adjust.
485         (create_addrmap_from_aranges): Adjust.
486         (dw2_find_last_source_symtab): Adjust.
487         (dw2_map_symtabs_matching_filename): Adjust.
488         (dw2_symtab_iter_next): Adjust.
489         (dw2_print_stats): Adjust.
490         (dw2_expand_all_symtabs): Adjust.
491         (dw2_expand_symtabs_with_fullname): Adjust.
492         (dw2_expand_marked_cus): Adjust.
493         (dw_expand_symtabs_matching_file_matcher): Adjust.
494         (dw2_map_symbol_filenames): Adjust.
495         (dw2_debug_names_iterator::next): Adjust.
496         (dwarf2_initialize_objfile): Adjust.
497         (set_partial_user): Adjust.
498         (dwarf2_build_psymtabs_hard): Adjust.
499
500 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
501
502         * dwarf2read.c (create_signatured_type_table_from_debug_names):
503         Remove unused variables.
504         (dw2_map_symtabs_matching_filename): Likewise.
505         (dwarf2_record_block_ranges): Likewise.
506         (dwarf2_read_addr_index): Likewise.
507         (follow_die_offset): Likewise.
508
509 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
510
511         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
512         to symbol_file_add_main.
513
514 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
515
516         PR mi/22299
517         * mi/mi-console.c (do_fputc_async_safe): New.
518         (mi_console_file::write_async_safe): New.
519         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
520         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
521         New.
522         * ui-file.c (ui_file::putstrn): Adjust call to
523         fputstrn_unfiltered.
524         * utils.c (printchar): Replace do_fputs and do_fprintf
525         parameters by do_fputc.
526         (fputstr_filtered): Adjust call to printchar.
527         (fputstr_unfiltered): Likewise.
528         (fputstrn_filtered): Likewise.
529         (fputstrn_unfiltered): Add do_fputc parameter, pass to
530         printchar.
531         * utils.h (do_fputc_ftype): New typedef.
532         (fputstrn_unfiltered): Add do_fputc parameter.
533
534 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
535
536         * regformats/i386/i386-avx.dat: Remove.
537
538 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
539
540         PR gdb/22979
541         * amd64-tdep.c (amd64_none_init_abi): New function.
542         (amd64_x32_none_init_abi): New function.
543         (_initialize_amd64_tdep): Register handlers for x86-64 and
544         x64_32 with GDB_OSABI_NONE.
545         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
546         GDB_OSABI_NONE osabi.
547
548 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
549
550         PR gdb/22980
551         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
552         GDB_OSABI_NONE.
553         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
554         * osabi.c (gdb_osabi_names): Add "unknown" entry.
555
556 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
557
558         * common/byte-vector.h (char_vector): New type.
559         * target.h (target_read_alloc): Return
560         gdb::optional<byte_vector>.
561         (target_read_stralloc): Return gdb::optional<char_vector>.
562         (target_get_osdata): Return gdb::optional<char_vector>.
563         * target.c (target_read_alloc_1): Templatize.  Replacement
564         manual memory management with vector.
565         (target_read_alloc): Change return type, adjust.
566         (target_read_stralloc): Change return type, adjust.
567         (target_get_osdata): Change return type, adjust.
568         * auxv.c (struct auxv_info) <length>: Remove.
569         <data>: Change type to gdb::optional<byte_vector>.
570         (auxv_inferior_data_cleanup): Free auxv_info with delete.
571         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
572         (target_auxv_search): Adjust.
573         (fprint_target_auxv): Adjust.
574         * avr-tdep.c (avr_io_reg_read_command): Adjust.
575         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
576         (linux_make_corefile_notes): Adjust.
577         * osdata.c (get_osdata): Adjust.
578         * remote.c (remote_get_threads_with_qxfer): Adjust.
579         (remote_memory_map): Adjust.
580         (remote_traceframe_info): Adjust.
581         (btrace_read_config): Adjust.
582         (remote_read_btrace): Adjust.
583         (remote_pid_to_exec_file): Adjust.
584         * solib-aix.c (solib_aix_get_library_list): Adjust.
585         * solib-dsbt.c (decode_loadmap): Don't free buf.
586         (dsbt_get_initial_loadmaps): Adjust.
587         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
588         * solib-target.c (solib_target_current_sos): Adjust.
589         * tracepoint.c (sdata_make_value): Adjust.
590         * xml-support.c (xinclude_start_include): Adjust.
591         (xml_fetch_content_from_file): Adjust.
592         * xml-support.h (xml_fetch_another): Change return type.
593         (xml_fetch_content_from_file): Change return type.
594         * xml-syscall.c (xml_init_syscalls_info): Adjust.
595         * xml-tdesc.c (file_read_description_xml): Adjust.
596         (fetch_available_features_from_target): Change return type.
597         (target_fetch_description_xml): Adjust.
598         (target_read_description_xml): Adjust.
599
600 2018-04-06  Tom Tromey  <tom@tromey.com>
601
602         * value.c (~value): Update.
603         (struct value) <contents>: Now unique_xmalloc_ptr.
604         (value_contents_bits_eq, allocate_value_contents)
605         (value_contents_raw, value_contents_all_raw)
606         (value_contents_for_printing, value_contents_for_printing_const)
607         (set_value_enclosing_type): Update.
608
609 2018-04-06  Tom Tromey  <tom@tromey.com>
610
611         * value.c (range_s): Remove typedef, VEC.
612         (struct range): Add operator<.
613         (range_lessthan): Remove.
614         (ranges_contain): Change type.
615         (~value): Update.
616         (struct value) <unavailable, optimized_out>: Now std::vector.
617         (value_entirely_available)
618         (value_entirely_covered_by_range_vector)
619         (value_entirely_unavailable, value_entirely_optimized_out):
620         Update.
621         (insert_into_bit_range_vector): Change argument type.
622         (find_first_range_overlap): Likewise.
623         (struct ranges_and_idx, value_contents_bits_eq)
624         (require_not_optimized_out, require_available): Update.
625         (ranges_copy_adjusted): Change argument types.
626         (value_optimized_out, value_copy, value_fetch_lazy): Update.
627
628 2018-04-06  Tom Tromey  <tom@tromey.com>
629
630         * value.c (~value): Update.
631         (struct value) <parent>: Now a value_ref_ptr.
632         (value_parent, set_value_parent, value_address, value_copy):
633         Update.
634
635 2018-04-06  Tom Tromey  <tom@tromey.com>
636
637         * value.c (struct value): Add constructor, destructor, and member
638         initializers.
639         (allocate_value_lazy, value_decref): Update.
640
641 2018-04-06  Tom Tromey  <tom@tromey.com>
642
643         * value.c (struct value) <released, next>: Remove.
644         (all_values): Now a std::vector.
645         (allocate_value_lazy): Update.
646         (value_next): Remove.
647         (value_mark, value_free_to_mark, release_value)
648         (value_release_to_mark): Update.
649
650 2018-04-06  Tom Tromey  <tom@tromey.com>
651
652         * value.h (fetch_subexp_value, value_release_to_mark): Update.
653         (free_value_chain): Remove.
654         * value.c (free_value_chain): Remove.
655         (value_release_to_mark): Return a std::vector.
656         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
657         std::vector.
658         (check_condition): Update.
659         * eval.c (fetch_subexp_value): Change "val_chain" to a
660         std::vector.
661         * breakpoint.c (update_watchpoint): Update.
662         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
663
664 2018-04-06  Tom Tromey  <tom@tromey.com>
665
666         * value.h (free_all_values): Remove.
667         * value.c (free_all_values): Remove.
668
669 2018-04-06  Tom Tromey  <tom@tromey.com>
670
671         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
672         (value_history_chain, value_history_count): Remove.
673         (value_history): New global.
674         (record_latest_value, access_value_history, show_values)
675         (preserve_values): Update.
676
677 2018-04-06  Tom Tromey  <tom@tromey.com>
678
679         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
680         * varobj.c (varobj_set_display_format, varobj_set_value)
681         (install_default_visualizer, construct_visualizer)
682         (install_new_value, ~varobj, varobj_get_value_type)
683         (my_value_of_variable, varobj_editable_p): Update.
684         * c-varobj.c (c_describe_child, c_value_of_variable)
685         (cplus_number_of_children, cplus_describe_child): Update.
686         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
687         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
688         (ada_value_of_variable, ada_value_is_changeable_p): Update.
689
690 2018-04-06  Tom Tromey  <tom@tromey.com>
691
692         * printcmd.c (last_examine_address): Change type to
693         value_ref_ptr.
694         (do_examine, x_command): Update.
695
696 2018-04-06  Tom Tromey  <tom@tromey.com>
697
698         * value.c (release_value): Update.
699         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
700         (struct bpstats) <val>: Now a value_ref_ptr.
701         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
702         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
703         (~watchpoint, print_it_watchpoint, watch_command_1)
704         (invalidate_bp_value_on_memory_change): Update.
705
706 2018-04-06  Tom Tromey  <tom@tromey.com>
707
708         * varobj.c (varobj_clear_saved_item)
709         (update_dynamic_varobj_children, install_new_value, ~varobj):
710         Update.
711         * value.h (value_incref): Move declaration earlier.
712         (value_decref): Rename from value_free.
713         (struct value_ref_policy): New.
714         (value_ref_ptr): New typedef.
715         (struct value_deleter): Remove.
716         (gdb_value_up): Remove typedef.
717         (release_value): Change return type.
718         (release_value_or_incref): Remove.
719         * value.c (set_value_parent): Update.
720         (value_incref): Change return type.
721         (value_decref): Rename from value_free.
722         (value_free_to_mark, free_all_values, free_value_chain): Update.
723         (release_value): Return value_ref_ptr.
724         (release_value_or_incref): Remove.
725         (record_latest_value, set_internalvar, clear_internalvar):
726         Update.
727         * stack.c (info_frame_command): Don't call value_free.
728         * python/py-value.c (valpy_dealloc, valpy_new)
729         (value_to_value_object): Update.
730         * printcmd.c (do_examine): Update.
731         * opencl-lang.c (lval_func_free_closure): Update.
732         * mi/mi-main.c (register_changed_p): Don't call value_free.
733         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
734         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
735         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
736         value_free.
737         * guile/scm-value.c (vlscm_free_value_smob)
738         (vlscm_scm_from_value): Update.
739         * frame.c (frame_register_unwind, frame_unwind_register_signed)
740         (frame_unwind_register_unsigned, get_frame_register_bytes)
741         (put_frame_register_bytes): Don't call value_free.
742         * findvar.c (address_from_register): Don't call value_free.
743         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
744         * dwarf2loc.c (entry_data_value_free_closure)
745         (value_of_dwarf_reg_entry, free_pieced_value_closure)
746         (dwarf2_evaluate_loc_desc_full): Update.
747         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
748         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
749         (~watchpoint, watch_command_1)
750         (invalidate_bp_value_on_memory_change): Update.
751         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
752
753 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
754
755         PR gdb/23022
756         * warning.m4: Add -Wno-error=deprecated-register.
757         * configure: Re-generate.
758
759 2018-04-05  Tom Tromey  <tom@tromey.com>
760
761         * linespec.h: Remove include of "vec.h".
762
763 2018-04-05  Tom Tromey  <tom@tromey.com>
764
765         * linespec.c (typep): Remove typedef.
766         (find_methods, find_superclass_methods): Take a std::vector.
767         (find_method): Use std::vector.
768
769 2018-04-05  Tom Tromey  <tom@tromey.com>
770
771         * utils.c (compare_strings): Remove.
772         * utils.h (compare_strings): Remove.
773         * objc-lang.h (find_imps): Update.
774         * objc-lang.c (find_methods): Take a std::vector.
775         (uniquify_strings, find_imps): Likewise.
776         * linespec.c (find_methods): Take a std::vector.
777         (decode_objc): Use std::vector.
778         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
779         a std::vector.
780         (find_method, find_function_symbols): Use std::vector.
781
782 2018-04-05  Tom Tromey  <tom@tromey.com>
783
784         * completer.c (completion_tracker::completion_tracker): Remove
785         cast.
786         (completion_tracker::discard_completions): Likewise.
787         * breakpoint.c (ambiguous_names_p): Remove cast.
788         * ada-lang.c (_initialize_ada_language): Remove cast.
789         * utils.h (streq): Update.
790         (streq_hash): Add new declaration.
791         * utils.c (streq): Return bool.
792         (streq_hash): New function.
793
794 2018-04-05  Tom Tromey  <tom@tromey.com>
795
796         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
797         Remove a string copy.
798
799 2018-04-05  Tom Tromey  <tom@tromey.com>
800
801         * linespec.c (filter_results): Use std::vector.
802         (decode_line_2, decode_line_full): Update.
803
804 2018-04-05  Tom Tromey  <tom@tromey.com>
805
806         * linespec.c (canonical_to_fullform): Return std::string.
807         (filter_results): Update.
808         (struct decode_line_2_item): Add constructor.
809         <fullform, displayform>: Now std::string.
810         (decode_line_2_compare_items): Now a std::sort comparator.
811         (decode_line_2): Update.
812
813 2018-04-05  Tom Tromey  <tom@tromey.com>
814
815         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
816         (unexpected_linespec_error): Update.
817         (linespec_parse_basic, parse_linespec): Update.
818
819 2018-04-05  Tom Tromey  <tom@tromey.com>
820
821         * linespec.c (linespec_parse_basic): Reindent.
822
823 2018-04-05  Tom Tromey  <tom@tromey.com>
824
825         * minsyms.h (iterate_over_minimal_symbols): Update.
826         * minsyms.c (iterate_over_minimal_symbols): Take a
827         gdb::function_view.
828         * linespec.c (struct collect_minsyms): Remove.
829         (compare_msyms): Now a std::sort comparator.
830         (add_minsym): Add parameters.
831         (search_minsyms_for_name): Update.  Use std::vector.
832
833 2018-04-03  Tom Tromey  <tom@tromey.com>
834
835         * mipsread.c (read_alphacoff_dynamic_symtab): Use
836         gdb::byte_vector.
837
838 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
839
840         * MAINTAINERS (Write After Approval): Add Weimin Pan.
841
842 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
843
844         PR gdb/16959
845         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
846         printing static type.
847
848 2018-04-01  Tom Tromey  <tom@tromey.com>
849
850         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
851         (rs6000_xfer_shared_libraries): Update.
852
853 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
854
855         * common/gdb_vecs.h (char_ptr): Remove.
856         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
857
858 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
859
860         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
861         with std::vector.
862         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
863
864 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
865
866         * tracepoint.h (struct uploaded_tp): Initialize fields.
867         <actions, step_actions, cmd_strings>: Change type to
868         std::vector<char *>.
869         * tracepoint.c (get_uploaded_tp): Allocate with new.
870         (free_uploaded_tps): Free with delete.
871         (parse_tracepoint_definition): Adjust to std::vector change.
872         * breakpoint.c (read_uploaded_action): Likewise.
873         (create_tracepoint_from_upload): Likewise.
874         * ctf.c (ctf_write_uploaded_tp): Likewise.
875         (SET_ARRAY_FIELD): Likewise.
876         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
877
878 2018-03-30  Tom Tromey  <tom@tromey.com>
879
880         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
881         std::unique_ptr.
882         (svr4_keep_data_in_core): Update.
883         (svr4_read_so_list): Update.
884
885 2018-03-30  Tom Tromey  <tom@tromey.com>
886
887         * windows-nat.c (handle_output_debug_string, handle_exception):
888         Update.
889         * target.h (target_read_string): Update.
890         * target.c (target_read_string): Change "string" to
891         unique_xmalloc_ptr.
892         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
893         Update.
894         * solib-frv.c (frv_current_sos): Update.
895         * solib-dsbt.c (dsbt_current_sos): Update.
896         * solib-darwin.c (darwin_current_sos): Update.
897         * linux-thread-db.c (inferior_has_bug): Update.
898         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
899         Update.  Remove alloca.
900         * ada-lang.c (ada_main_name): Update.
901
902 2018-03-30  Tom Tromey  <tom@tromey.com>
903
904         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
905         (struct dwo_file_deleter): New.
906         (dwo_file_up): New typedef.
907         (open_and_init_dwo_file): Use dwo_file_up.
908         (free_dwo_file_cleanup): Remove.
909
910 2018-03-30  Tom Tromey  <tom@tromey.com>
911
912         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
913         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
914
915 2018-03-30  Tom Tromey  <tom@tromey.com>
916
917         * dwarf2read.c (class free_cached_comp_units): New class.
918         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
919         (free_cached_comp_units): Remove function.
920
921 2018-03-30  Tom Tromey  <tom@tromey.com>
922
923         * utils.h (make_cleanup_unpush_target): Remove.
924         * inf-ptrace.c (struct target_unpusher): New.
925         (target_unpush_up) New typedef.
926         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
927         target_unpush_up.
928         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
929
930 2018-03-27  Tom Tromey  <tom@tromey.com>
931
932         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
933
934 2018-03-27  Pedro Alves  <palves@redhat.com>
935             Tom Tromey  <tom@tromey.com>
936
937         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
938         destructor.  Now a class.
939         (gdb_readline_wrapper_cleanup): Remove function.
940         (gdb_readline_wrapper): Remove cleanups.
941
942 2018-03-27  Tom Tromey  <tom@tromey.com>
943
944         * typeprint.h (struct type_print_options) <local_typedefs,
945         global_typedefs>: Remove "struct" keyword.
946         (class typedef_hash_table): New class.
947         (recursively_update_typedef_hash, add_template_parameters)
948         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
949         (find_typedef_in_hash): Don't declare.
950         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
951         (typedef_hash_table::recursively_update): Rename from
952         recursively_update_typedef_hash.  Now a member.
953         (typedef_hash_table::add_template_parameters): Rename from
954         add_template_parameters.  Now a member.
955         (typedef_hash_table::typedef_hash_table): Now a constructor;
956         rename from create_typedef_hash.
957         (typedef_hash_table::~typedef_hash_table): Now a destructor;
958         rename from free_typedef_hash.
959         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
960         (do_free_global_table): Remove.
961         (typedef_hash_table::typedef_hash_table): New constructor; renamed
962         from copy_type_recursive.
963         (create_global_typedef_table): Remove.
964         (typedef_hash_table::find_global_typedef): Now a member of
965         typedef_hash_table.
966         (typedef_hash_table::find_typedef): Rename from
967         find_typedef_in_hash; now a member.
968         (whatis_exp): Update.
969         * extension.h (struct ext_lang_type_printers): Add constructor and
970         destructor.
971         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
972         declare.
973         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
974         Now a constructor; rename from start_ext_lang_type_printers.
975         (ext_lang_type_printers): Now a destructor; rename from
976         free_ext_lang_type_printers.
977         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
978         Update.
979         (c_type_print_base_struct_union): Update.  Remove cleanups.
980
981 2018-03-27  Tom Tromey  <tom@tromey.com>
982
983         * dwarf-index-write.c: Include <cmath>.
984
985 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
986
987         * NEWS: Add entry describing new "set|show varsize-limit" command.
988         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
989         command.
990         * printcmd.c (_initialize_printcmd): Add "set var" alias of
991         "set variable".
992
993 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
994
995         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
996         dwarf-index-write.c
997         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
998         * dwarf-index-common.c: New file.
999         * dwarf-index-common.h: New file.
1000         * dwarf-index-write.c: New file.
1001         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
1002         (struct dwarf2_section_info): Move from here.
1003         (dwarf2_section_info_def): Likewise.
1004         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
1005         (offset_type): Likewise.
1006         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
1007         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
1008         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
1009         (byte_swap): Likewise.
1010         (MAYBE_SWAP): Likewise.
1011         (dwarf2_per_cu_ptr): Likewise.
1012         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
1013         (struct tu_stats): Likewise.
1014         (struct dwarf2_per_objfile): Likewise.
1015         (struct dwarf2_per_cu_data): Likewise.
1016         (struct signatured_type): Likewise.
1017         (sig_type_ptr): Likewise.
1018         (DEF_VEC_P (sig_type_ptr)): Likewise.
1019         (INDEX4_SUFFIX): Likewise.
1020         (INDEX5_SUFFIX): Likewise.
1021         (DEBUG_STR_SUFFIX): Likewise.
1022         (dwarf2_read_section): Make non-static.
1023         (mapped_index_string_hash): Move from here.
1024         (dwarf5_djb_hash): Likewise.
1025         (file_write): Likewise.
1026         (class data_buf): Likewise.
1027         (struct symtab_index_entry): Likewise.
1028         (struct mapped_symtab): Likewise.
1029         (find_slot): Likewise.
1030         (hash_expand): Likewise.
1031         (add_index_entry): Likewise.
1032         (uniquify_cu_indices): Likewise.
1033         (class c_str_view): Likewise.
1034         (class c_str_view_hasher): Likewise.
1035         (class vector_hasher): Likewise.
1036         (write_hash_table): Likewise.
1037         (psym_index_map): Likewise.
1038         (struct addrmap_index_data): Likewise.
1039         (add_address_entry): Likewise.
1040         (add_address_entry_worker): Likewise.
1041         (write_address_map): Likewise.
1042         (symbol_kind): Likewise.
1043         (write_psymbols): Likewise.
1044         (struct signatured_type_index_data): Likewise.
1045         (write_one_signatured_type): Likewise.
1046         (recursively_count_psymbols): Likewise.
1047         (recursively_write_psymbols): Likewise.
1048         (class debug_names): Likewise.
1049         (check_dwarf64_offsets): Likewise.
1050         (psyms_seen_size): Likewise.
1051         (write_gdbindex): Likewise.
1052         (write_debug_names): Likewise.
1053         (assert_file_size): Likewise.
1054         (write_psymtabs_to_index): Likewise.
1055         (save_gdb_index_command): Likewise.
1056         (_initialize_dwarf2_read): Don't register the "save gdb-index"
1057         command.
1058         * dwarf2read.h: New file.
1059
1060 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
1061
1062         PR gdb/22670
1063         * dwarf2read.c (dwarf2_physname): Do not return the demangled
1064         symbol name if the CU's language stores symbol names in linkage
1065         format.
1066         * language.h (struct language_defn)
1067         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
1068         all instances of this struct.
1069
1070 2018-03-26  Tom Tromey  <tom@tromey.com>
1071
1072         * stack.c (backtrace_command_1): Remove verbose code.
1073
1074 2018-03-26  Tom Tromey  <tom@tromey.com>
1075
1076         * python/py-framefilter.c (py_print_type): Don't catch
1077         exceptions.  Return void.
1078         (py_print_value): Likewise.
1079         (py_print_single_arg): Likewise.
1080         (enumerate_args): Don't catch exceptions.
1081         (py_print_args): Likewise.
1082         (py_print_frame): Likewise.
1083         (gdbpy_apply_frame_filter): Catch exceptions here.
1084
1085 2018-03-26  Tom Tromey  <tom@tromey.com>
1086
1087         * stack.c (_initialize_stack): Remove trailing newlines from help
1088         text.  Add "Usage" line to "backtrace" help.
1089
1090 2018-03-26  Tom Tromey  <tom@tromey.com>
1091
1092         PR python/16486:
1093         * python/py-framefilter.c (py_print_args): Call wrap_hint.
1094
1095 2018-03-26  Tom Tromey  <tom@tromey.com>
1096
1097         * python/py-framefilter.c (py_print_single_arg): Return
1098         EXT_LANG_BT_ERROR from catch.
1099
1100 2018-03-26  Tom Tromey  <tom@tromey.com>
1101
1102         PR backtrace/15584:
1103         * stack.c (backtrace_command_1): Move some code into no-filters
1104         "if".
1105
1106 2018-03-26  Tom Tromey  <tom@tromey.com>
1107
1108         * python/py-framefilter.c (throw_quit_or_print_exception): New
1109         function.
1110         (gdbpy_apply_frame_filter): Use it.
1111
1112 2018-03-26  Tom Tromey  <tom@tromey.com>
1113
1114         PR cli/17716:
1115         * python/py-framefilter.c (py_print_type, py_print_value)
1116         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
1117         RETURN_MASK_ERROR.
1118
1119 2018-03-26  Tom Tromey  <tom@tromey.com>
1120
1121         * python/py-framefilter.c (enumerate_args): Use
1122         gdb::unique_xmalloc_ptr.
1123
1124 2018-03-26  Tom Tromey  <tom@tromey.com>
1125
1126         * python/py-framefilter.c (py_print_frame): Return
1127         EXT_LANG_BT_OK.
1128         (gdbpy_apply_frame_filter): Update comment.
1129         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
1130         Remove.
1131         <EXT_LANG_BT_NO_FILTERS>: Change value.
1132
1133 2018-03-26  Tom Tromey  <tom@tromey.com>
1134
1135         PR backtrace/15582:
1136         * stack.c (backtrace_command): Parse "hide" argument.
1137         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
1138         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
1139         constant.
1140
1141 2018-03-26  Tom Tromey  <tom@tromey.com>
1142
1143         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
1144         add "flags".
1145         (backtrace_command): Remove "fulltrace", add "flags".
1146
1147 2018-03-26  Tom Tromey  <tom@tromey.com>
1148
1149         * stack.c (backtrace_command): Rewrite command line parsing.
1150
1151 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
1152
1153         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
1154
1155 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
1156
1157         * filename-seen-cache.h: Add include guard.
1158
1159 2018-03-26  Keith Seitz  <keiths@redhat.com>
1160
1161         * symfile.c (place_section): Remove "struct" from section_addr_info
1162         in comment.
1163         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
1164         "struct" keyword from section_addr_info.
1165
1166 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
1167
1168         * regformats/regdef.h (reg): Add constructors.
1169
1170 2018-03-25  Pedro Alves  <palves@redhat.com>
1171
1172         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
1173         if then/else bodies in var_func_name extraction.
1174
1175 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
1176
1177         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
1178         lookup_minimal_symbol() to find symbol entry.
1179         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
1180
1181 2018-03-23  Keith Seitz  <keiths@redhat.com>
1182
1183         PR c++/22968
1184         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
1185         nested type definitions for C++, too.
1186
1187 2018-03-23  Tom Tromey  <tom@tromey.com>
1188
1189         * machoread.c (struct oso_el): Add a constructor.  Don't define as
1190         a typedef.
1191         (macho_register_oso): Remove.
1192         (macho_symtab_read): Take a std::vector.
1193         (oso_el_compare_name): Now a std::sort comparator.
1194         (macho_symfile_read_all_oso): Take a std::vector.
1195         (macho_symfile_read): Use std::vector.  Remove cleanups.
1196
1197 2018-03-22  Tom Tromey  <tom@tromey.com>
1198
1199         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
1200         (record_full_goto_bookmark): Use std::string.
1201
1202 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1203
1204         PR tdep/18295
1205         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
1206         a single mask.
1207
1208 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1209
1210         * rs6000-tdep.c (store_insn_p): New function.
1211         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
1212         and cr_reg to their unshifted values. Use store_insn_p to
1213         match LR saves using either R1 or fdata->alloca_reg. Use
1214         store_insn_p to match CR saves. Set alloca_reg_offset
1215         when alloca_reg and framep are set. Remove lr_reg shift
1216         when assigning to fdata->lr_register.
1217
1218 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1219
1220         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
1221         command line args instead of emitting a warning.
1222
1223 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
1224
1225         * tracepoint.h (struct static_tracepoint_marker): Initialize
1226         fields, define default constructor, move constructor and move
1227         assignment, disable the rest.
1228         <str_id, extra>: Make std::string.
1229         (release_static_tracepoint_marker): Remove.
1230         (free_current_marker): Remove.
1231         * tracepoint.c (free_current_marker): Remove.
1232         (parse_static_tracepoint_marker_definition): Adjust to
1233         std::string, use new hex2str overload.
1234         (release_static_tracepoint_marker): Remove.
1235         (print_one_static_tracepoint_marker): Get marker by reference
1236         and adjust to std::string.
1237         (info_static_tracepoint_markers_command): Adjust to std::vector
1238         changes
1239         * target.h (static_tracepoint_marker_p): Remove typedef.
1240         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
1241         (struct target_ops) <to_static_tracepoint_marker_at>: Return
1242         bool.
1243         <to_static_tracepoint_markers_by_strid>: Return std::vector.
1244         * target-debug.h
1245         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
1246         (target_debug_print_std_vector_static_tracepoint_marker): New.
1247         (target_debug_print_struct_static_tracepoint_marker_p): Rename
1248         to...
1249         (target_debug_print_static_tracepoint_marker_p): ... this.
1250         * target-delegates.c: Re-generate.
1251         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
1252         Make std::string.
1253         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
1254         (decode_static_tracepoint_spec): Adjust to std::vector.
1255         (tracepoint_print_one_detail): Adjust to std::string.
1256         (strace_marker_decode_location): Adjust to std::string.
1257         (update_static_tracepoint): Adjust to std::string, remove call
1258         to release_static_tracepoint_marker.
1259         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1260         Adjust to std::vector.
1261         * remote.c (remote_static_tracepoint_marker_at): Return bool.
1262         (remote_static_tracepoint_markers_by_strid): Adjust to
1263         std::vector.
1264         * common/rsp-low.h (hex2str): New overload with explicit count
1265         of bytes.
1266         * common/rsp-low.c (hex2str): New overload with explicit count
1267         of bytes.
1268         * unittests/rsp-low-selftests.c (test_hex2str): New function.
1269         (_initialize_rsp_low_selftests): Add test_hex2str test.
1270         * unittests/tracepoint-selftests.c
1271         (test_parse_static_tracepoint_marker_definition): Adjust to
1272         std::string.
1273
1274 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
1275
1276         * tracepoint.c (parse_static_tracepoint_marker_definition):
1277         Consider case where the definition is followed by more
1278         definitions.
1279         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1280         tracepoint-selftests.c.
1281         * unittests/tracepoint-selftests.c: New.
1282
1283 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
1284
1285         * MAINTAINERS (Write After Approval): Add Pedro Franco de
1286         Carvalho.
1287
1288 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
1289
1290         * symtab.c (find_pc_sect_line): fixed indentation.
1291
1292 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
1293
1294         * symtab.c (find_pc_sect_line): now uses binary search.
1295
1296 2018-03-19  Tom Tromey  <tom@tromey.com>
1297
1298         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1299         "IDENT" production.
1300
1301 2018-03-19  Pedro Alves  <palves@redhat.com>
1302             Tom Tromey  <tom@tromey.com>
1303
1304         * unittests/observable-selftests.c: New file.
1305         * common/observable.h: New file.
1306         * observable.h: New file.
1307         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1308         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1309         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1310         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1311         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1312         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1313         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1314         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1315         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1316         python/py-breakpoint.c, python/py-finishbreakpoint.c,
1317         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1318         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1319         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1320         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1321         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1322         tui/tui-interp.c, valops.c: Update all users.
1323         * tui/tui-hooks.c (tui_bp_created_observer)
1324         (tui_bp_deleted_observer, tui_bp_modified_observer)
1325         (tui_inferior_exit_observer, tui_before_prompt_observer)
1326         (tui_normal_stop_observer, tui_register_changed_observer):
1327         Remove.
1328         (tui_observers_token): New global.
1329         (attach_or_detach, tui_attach_detach_observers): New functions.
1330         (tui_install_hooks, tui_remove_hooks): Use
1331         tui_attach_detach_observers.
1332         * record-btrace.c (record_btrace_thread_observer): Remove.
1333         (record_btrace_thread_observer_token): New global.
1334         * observer.sh: Remove.
1335         * observer.c: Rename to observable.c.
1336         * observable.c (namespace gdb_observers): Define new objects.
1337         (observer_debug): Move into gdb_observers namespace.
1338         (struct observer, struct observer_list, xalloc_observer_list_node)
1339         (xfree_observer_list_node, generic_observer_attach)
1340         (generic_observer_detach, generic_observer_notify): Remove.
1341         (_initialize_observer): Update.
1342         Don't include observer.inc.
1343         * Makefile.in (generated_files): Remove observer.h, observer.inc.
1344         (clean mostlyclean): Likewise.
1345         (observer.h, observer.inc): Remove targets.
1346         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1347         (COMMON_SFILES): Use observable.c, not observer.c.
1348         * .gitignore: Remove observer.h.
1349
1350 2018-03-18  Tom Tromey  <tom@tromey.com>
1351
1352         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1353         gdb::def_vector.
1354         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1355
1356 2018-03-17  Tom Tromey  <tom@tromey.com>
1357
1358         * auto-load.c (auto_load_objfile_script_1): Use std::string.
1359
1360 2018-03-17  Tom Tromey  <tom@tromey.com>
1361
1362         * target.c (class scoped_target_fd): New.
1363         (target_fileio_close_cleanup): Remove.
1364         (target_fileio_read_alloc_1): Use scoped_target_fd.
1365
1366 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
1367
1368         * silent-rules.mk: New.
1369         * Makefile.in: Include silent-rules.mk
1370         (srcdir, VPATH, top_srcdir): Move up.
1371         (COMPILE): Add ECHO_CXX.
1372         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
1373         (init.c): Add ECHO_INIT_C.
1374         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1375         (version.c): Add ECHO_GEN.
1376         (printcmd.o): Add ECHO_CXX.
1377         (target-float.o): Add ECHO_CXX.
1378         (ada-exp.o): Add ECHO_CXX.
1379         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
1380         (insight$(EXEEXT)): Add ECHO_CXXLD.
1381         * gnulib/configure.ac: Add AM_SILENT_RULES.
1382         * gnulib/aclocal.m4: Re-generate.
1383         * gnulib/configure: Re-generate.
1384         * gnulib/import/Makefile.in: Re-generate.
1385
1386 2018-03-16  Tom Tromey  <tom@tromey.com>
1387
1388         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
1389         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
1390         * utils.c (do_free_section_addr_info)
1391         (make_cleanup_free_section_addr_info): Remove.
1392         * symfile.h (struct other_sections): Add constructor.
1393         (struct section_addr_info): Remove.
1394         (section_addr_info): New typedef.
1395         (struct sym_fns) <sym_offsets>: Change type of parameter.
1396         (build_section_addr_info_from_objfile)
1397         (relative_addr_info_to_section_offsets, addr_info_make_relative)
1398         (default_symfile_offsets, symbol_file_add)
1399         (symbol_file_add_from_bfd)
1400         (build_section_addr_info_from_section_table): Update.
1401         (alloc_section_addr_info, free_section_addr_info): Don't declare.
1402         * symfile.c (alloc_section_addr_info): Remove.
1403         (build_section_addr_info_from_section_table): Change return type.
1404         Update.
1405         (build_section_addr_info_from_bfd)
1406         (build_section_addr_info_from_objfile): Likewise.
1407         (free_section_addr_info): Remove.
1408         (relative_addr_info_to_section_offsets): Change type of "addrs".
1409         (addrs_section_compar): Now a std::sort comparator.
1410         (addrs_section_sort): Change return type.
1411         (addr_info_make_relative): Change type of "addrs".  Update.
1412         (default_symfile_offsets, syms_from_objfile_1)
1413         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
1414         (symbol_file_add_separate): Update.
1415         (symbol_file_add): Change type of "addrs".  Update.
1416         (add_symbol_file_command): Update.  Remove cleanups.
1417         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
1418         cleanups.
1419         * symfile-debug.c (debug_sym_offsets): Change type of "info".
1420         * solib.c (solib_read_symbols): Update.
1421         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
1422         * machoread.c (macho_symfile_offsets): Update.
1423         * jit.c (jit_bfd_try_read_symtab): Update.
1424
1425 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
1426
1427         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1428         unittests/utils-selftests.c.
1429         * unittests/utils-selftests.c: New file.
1430
1431 2018-03-14  Tom Tromey  <tom@tromey.com>
1432
1433         PR cli/14977:
1434         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
1435         for NULL.
1436
1437 2018-03-14  Tom Tromey  <tom@tromey.com>
1438
1439         PR cli/19918:
1440         * printcmd.c (printf_pointer): Allow "-" in format.
1441
1442 2018-03-14  Tom Tromey  <tom@tromey.com>
1443
1444         * printcmd.c (_initialize_printcmd): Add usage to printf.
1445
1446 2018-03-14  Yao Qi  <qiyao@sourceware.org>
1447
1448         * MAINTAINERS: Update my email address.
1449
1450 2018-03-13  Tom Tromey  <tom@tromey.com>
1451
1452         * machoread.c (macho_check_dsym): Change filenamep to a
1453         std::string*.
1454         (macho_symfile_read): Update.
1455         * symfile.c (load_command): Use std::string.
1456
1457 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
1458
1459         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
1460         to error message string.
1461         (riscv_register_name): Use xsnprintf instead of sprintf.
1462         (riscv_insn::fetch_instruction): Use gdb_assert instead of
1463         internal_error.
1464         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
1465         error.
1466         (riscv_push_dummy_call): Likewise.
1467
1468 2018-03-12  Tom Tromey  <tom@tromey.com>
1469
1470         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
1471         Use gdb::byte_vector.
1472         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
1473
1474 2018-03-12  Yao Qi  <yao.qi@linaro.org>
1475
1476         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
1477         parameter type to readable_regcache.
1478         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
1479         the declaration.
1480
1481 2018-03-11  Tom Tromey  <tom@tromey.com>
1482
1483         * dwarf2read.c (struct nextfield): Add initializers.
1484         (struct nextfnfield): Remove.
1485         (struct fnfieldlist): Add initializers.  Remove "length" and
1486         "head", use std::vector.
1487         (struct decl_field_list): Remove.
1488         (struct field_info): Add initializers.
1489         <fields, baseclasses>: Now std::vector.
1490         <nbaseclasses, nfnfields, typedef_field_list_count,
1491         nested_types_list_count>: Remove.
1492         (dwarf2_add_field, dwarf2_add_type_defn)
1493         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
1494         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
1495         (process_structure_scope): Update.
1496
1497 2018-03-11  Tom Tromey  <tom@tromey.com>
1498
1499         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
1500         for use by std::sort.
1501         (build_type_psymtabs_1): Use std::vector.
1502
1503 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
1504
1505         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
1506         and LIBMPFR in the printed configuration.
1507
1508 2018-03-08  Tom Tromey  <tom@tromey.com>
1509
1510         * source.c (get_filename_and_charpos): Use scoped_fd.
1511         * nto-procfs.c (procfs_open_1): Use scoped_fd.
1512         (procfs_pidlist): Likewise.
1513         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
1514         (iterate_over_mappings): Likewise.
1515
1516 2018-03-08  Tom Tromey  <tom@tromey.com>
1517
1518         * infcall.c (struct call_return_meta_info)
1519         <stack_temporaries_enabled>: Remove.
1520         (get_call_return_value, call_function_by_hand_dummy): Update.
1521         * thread.c (disable_thread_stack_temporaries): Remove.
1522         (enable_thread_stack_temporaries): Remove.
1523         (thread_stack_temporaries_enabled_p): Return bool.
1524         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
1525         (get_last_thread_stack_temporary): Update.
1526         * eval.c (evaluate_subexp): Update.
1527         * gdbthread.h (class enable_thread_stack_temporaries): Now a
1528         class, not a function.
1529         (value_ptr, value_vec): Remove typedefs.
1530         (class thread_info) <stack_temporaries_enabled>: Now bool.
1531         <stack_temporaries>: Now a std::vector.
1532         (thread_stack_temporaries_enabled_p)
1533         (value_in_thread_stack_temporaries): Return bool.
1534
1535 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
1536
1537         * remote.c (putpkt_binary): Fix omitted bytes reporting.
1538         (getpkt_or_notif_sane_1): Likewise.
1539
1540 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
1541
1542         * build-id.c (build_id_to_debug_bfd): Use std::string.
1543
1544 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
1545
1546         * build-id.c (find_separate_debug_file_by_buildid): Return
1547         std::string.
1548         * build-id.h (find_separate_debug_file_by_buildid): Return
1549         std::string.
1550         * coffread.c (coff_symfile_read): Adjust to std::string.
1551         * elfread.c (elf_symfile_read): Adjust to std::string.
1552         * symfile.c (separate_debug_file_exists): Change parameter to
1553         std::string.
1554         (find_separate_debug_file): Return std::string.
1555         (find_separate_debug_file_by_debuglink): Return std::string.
1556         * symfile.h (find_separate_debug_file_by_debuglink): Return
1557         std::string.
1558
1559 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
1560
1561         * common/xml-utils.c (xml_escape_text): Move code to...
1562         (xml_escape_text_append): ... this new function.
1563         * common/xml-utils.h (xml_escape_text_append): New declaration.
1564         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
1565         New function.
1566         (_initialize_xml_utils): register test_xml_escape_text_append as
1567         a selftest.
1568
1569 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
1570
1571         * defs.h: Remove MAX_REGISTER_SIZE.
1572         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
1573         asserts.
1574         * python/py-unwind.c (pyuw_sniffer): Likewise.
1575
1576 2018-03-07  Tom Tromey  <tom@tromey.com>
1577
1578         * linux-tdep.c (linux_info_proc): Update.
1579         * target.h (struct target_ops) <to_fileio_readlink>: Return
1580         optional<string>.
1581         (target_fileio_readlink): Return optional<string>.
1582         * remote.c (remote_hostio_readlink): Return optional<string>.
1583         * inf-child.c (inf_child_fileio_readlink): Return
1584         optional<string>.
1585         * target.c (target_fileio_readlink): Return optional<string>.
1586
1587 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1588
1589         * regcache.c (cooked_read_test): Add riscv to the list of
1590         architectures that have a save_reggroup.
1591
1592 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1593
1594         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
1595         value is not a dynamic class object.
1596
1597 2018-03-06  Tom Tromey  <tom@tromey.com>
1598
1599         * rust-exp.y: Formatting fixes.
1600
1601 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1602
1603         * riscv-tdep.c (riscv_register_name): Remove target description
1604         support.
1605         (riscv_gdbarch_init): Remove target description check.
1606
1607 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1608
1609         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
1610         comment.
1611         * riscv-tdep.h: Likewise.
1612
1613 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1614
1615         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
1616         (riscv_pseudo_register_write): Delete.
1617         (riscv_gdbarch_init): Remove all use of pseudo registers.
1618
1619 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
1620
1621         * record-btrace.c (btrace_print_lines): Replace cleanup
1622         parameter with RAII equivalents.
1623         (btrace_insn_history): Replace cleanup with RAII equivalents.
1624         * ui-out.h (make_cleanup_ui_out_list_begin_end,
1625         make_cleanup_ui_out_tuple_begin_end): Remove.
1626         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
1627         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
1628         make_cleanup_ui_out_list_begin_end): Remove.
1629
1630 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
1631
1632         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
1633         parameter types to std::vector.  Use bool.
1634         (record_btrace_wait): Replace VEC(tp_t) with
1635         std::vector<thread_info *>.
1636         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
1637
1638 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
1639
1640         * record-btrace.c (record_btrace_disable_callback): Remove.
1641         (struct scoped_btrace_disable): New.
1642         (record_btrace_open): Use scoped_btrace_disable.
1643
1644 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1645
1646         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
1647         reading values from registers.
1648
1649 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1650
1651         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
1652         where appropriate.
1653
1654 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1655
1656         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
1657         change parameter type.  Use GDB's print functions, and use
1658         core_addr_to_string where appropriate.
1659         (riscv_push_dummy_call): Use core_addr_to_string where
1660         appropriate, update call to riscv_print_arg_location, and reindent
1661         a few lines.
1662         (riscv_return_value): Update call to riscv_print_arg_location.
1663
1664 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1665             Tim Newsome <tim@sifive.com>
1666             Albert Ou <a0u@eecs.berkeley.edu>
1667             Darius Rad <darius@bluespec.com>
1668
1669         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
1670         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
1671         (ALLDEPFILES): Add riscv-tdep.c
1672         * configure.tgt: Add riscv support.
1673         * riscv-tdep.c: New file.
1674         * riscv-tdep.h: New file.
1675         * NEWS: Mention new target.
1676         * MAINTAINERS: Add entry for riscv.
1677
1678 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1679
1680         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
1681         fields within aggregates.
1682
1683 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
1684
1685         * record-btrace.c (btrace_print_lines): Change type of flags to
1686         gdb_disassembly_flags.
1687
1688 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
1689
1690         * fbsd-nat.c: Include "inf-ptrace.h".
1691         (USE_SIGTRAP_SIGINFO): Conditionally define.
1692         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
1693         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
1694         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
1695         function.
1696         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
1697         Likewise.
1698         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
1699         Likewise.
1700         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
1701         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
1702         "supports_stopped_by_hw_breakpoint" target methods.
1703
1704 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
1705
1706         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
1707         * fbsd-nat.c (debug_fbsd_nat): New variable.
1708         (show_fbsd_nat_debug): New function.
1709         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
1710         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
1711
1712 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
1713
1714         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
1715         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
1716         prototype.
1717         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
1718         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
1719         method.
1720
1721 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1722
1723         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
1724         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
1725
1726 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1727
1728         * charset.c (struct charset_vector): New.
1729         (charsets): Change type to charset_vector.
1730         (find_charset_names): Adjust.
1731         (add_one): Adjust.
1732         (_initialize_charset): Adjust.
1733
1734 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1735
1736         * progspace.h (struct program_space) <deleted_solibs>: Change
1737         type to std::vector<std::string>.
1738         * progspace.c (clear_program_space_solib_cache): Adjust.
1739         * breakpoint.c (print_solib_event): Adjust.
1740         (check_status_catch_solib): Adjust.
1741         * solib.c (update_solib_list): Adjust.
1742         * ui-out.h (class ui_out) <field_string>: New overload.
1743         * ui-out.c (ui_out::field_string): New overload.
1744
1745 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1746
1747         * progspace.h (struct program_space): Add constructor and
1748         destructor, initialize fields.
1749         (add_program_space): Remove.
1750         * progspace.c (add_program_space): Rename to...
1751         (program_space::program_space): ... this.
1752         (release_program_space): Rename to...
1753         (program_space::~program_space): ... this.
1754         (delete_program_space): Use delete to delete program_space.
1755         (initialize_progspace): Use new to allocate program_space.
1756         * inferior.c (add_inferior_with_spaces): Likewise.
1757         (clone_inferior_command): Likewise.
1758         * infrun.c (follow_fork_inferior): Likewise.
1759         (handle_vfork_child_exec_or_exit): Likewise.
1760
1761 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1762
1763         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
1764         (delim_string_to_char_ptr_vec): Return std::vector of
1765         gdb::unique_xmalloc_ptr.
1766         (dirnames_to_char_ptr_vec_append): Take std::vector of
1767         gdb::unique_xmalloc_ptr.
1768         (dirnames_to_char_ptr_vec): Return std::vector of
1769         gdb::unique_xmalloc_ptr.
1770         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
1771         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
1772         (delim_string_to_char_ptr_vec): Return an std::vector of
1773         gdb::unique_xmalloc_ptr, adjust the code.
1774         (dirnames_to_char_ptr_vec_append): Take an std::vector of
1775         gdb::unique_xmalloc_ptr, adjust the code.
1776         (dirnames_to_char_ptr_vec): Return an std::vector of
1777         gdb::unique_xmalloc_ptr, adjust the code.
1778         * auto-load.c (auto_load_safe_path_vec): Change type to
1779         std::vector of gdb::unique_xmalloc_ptr.
1780         (auto_load_expand_dir_vars): Return an std::vector of
1781         gdb::unique_xmalloc_ptr, adjust the code.
1782         (auto_load_safe_path_vec_update): Adjust.
1783         (filename_is_in_auto_load_safe_path_vec): Adjust.
1784         (auto_load_objfile_script_1): Adjust.
1785         * build-id.c (build_id_to_debug_bfd): Adjust.
1786         * linux-thread-db.c (thread_db_load_search): Adjust.
1787         * source.c (add_path): Adjust.
1788         (openp): Adjust.
1789         * symfile.c (find_separate_debug_file): Adjust.
1790         * utils.c (do_free_char_ptr_vec): Remove.
1791         (make_cleanup_free_char_ptr_vec): Remove.
1792
1793 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1794
1795         PR gdb/22907
1796         * common/pathstuff.c: Conditionally include "<windows.h>".
1797
1798 2018-03-01  Georg Sauthoff  <mail@georg.so>
1799
1800         PR gdb/22888
1801         * gcore.in: Quote variables and switch interpreter to bash.
1802
1803 2018-03-01  Tom Tromey  <tom@tromey.com>
1804
1805         * dwarf2read.c (alloc_discriminant_info): Fix default_index
1806         assertion.  Add assertion for discriminant_index.
1807         (quirk_rust_enum): Use correct base type name in univariant case.
1808
1809 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
1810
1811         * record.c (get_call_history_modifiers): Return a
1812         record_print_flags.
1813         (cmd_record_call_history): Adjust.
1814         * record-btrace.c (record_btrace_call_history): Adjust.
1815         (record_btrace_call_history_range): Adjust.
1816         (record_btrace_call_history_from): Adjust.
1817         * target-debug.h (target_debug_print_record_print_flags): New.
1818         * target-delegates.c: Re-generate.
1819         * target.c (target_call_history): Change flags type.
1820         (target_call_history_from): Likewise.
1821         (target_call_history_range): Likewise.
1822         * target.h (struct target_ops) <target_call_history>: Likewise.
1823         (target_call_history_from): Likewise.
1824         (target_call_history_range): Likewise.
1825
1826 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
1827             Simon Marchi  <simon.marchi@polymtl.ca>
1828
1829         * common/common-utils.c: Include "sys/stat.h".
1830         (is_regular_file): Move here from "source.c"; change return
1831         type to "bool".
1832         * common/common-utils.h (is_regular_file): New prototype.
1833         * common/pathstuff.c (contains_dir_separator): New function.
1834         * common/pathstuff.h (contains_dir_separator): New prototype.
1835         * source.c: Don't include "sys/stat.h".
1836         (is_regular_file): Move to "common/common-utils.c".
1837
1838 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
1839
1840         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
1841         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
1842         * auto-load.c: Include "common/pathstuff.h".
1843         * common/common-def.h (current_directory): Move here.
1844         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
1845         function.
1846         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
1847         prototype.
1848         * common/pathstuff.c: New file.
1849         * common/pathstuff.h: New file.
1850         * compile/compile.c: Include "common/pathstuff.h".
1851         * defs.h (current_directory): Move to "common/common-defs.h".
1852         * dwarf2read.c: Include "common/pathstuff.h".
1853         * exec.c: Likewise.
1854         * guile/scm-safe-call.c: Likewise.
1855         * linux-thread-db.c: Likewise.
1856         * main.c: Likewise.
1857         * nto-tdep.c: Likewise.
1858         * objfiles.c: Likewise.
1859         * source.c: Likewise.
1860         * symtab.c: Likewise.
1861         * utils.c: Include "common/pathstuff.h".
1862         (gdb_realpath): Move to "common/pathstuff.c".
1863         (gdb_realpath_keepfile): Likewise.
1864         (gdb_abspath): Likewise.
1865         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
1866         (gdb_realpath_keepfile): Likewise.
1867         (gdb_abspath): Likewise.
1868
1869 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
1870
1871         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
1872         wildcard process pid for super_resume for kernels with a
1873         specific bug.
1874
1875 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
1876
1877         * compile/compile.c (get_args): Add additional comments
1878         explaining function.
1879
1880 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
1881             Tom Tromey  <tom@tromey.com>
1882
1883         * target.h (memory_write_request_s): Remove typedef.  Don't define
1884         VEC.
1885         (target_write_memory_blocks): Change argument to std::vector.
1886         (struct memory_write_request): Add constructor.
1887         * target-memory.c (compare_block_starting_address): Return bool.
1888         Change argument types.
1889         (claim_memory): Change arguments to use std::vector.
1890         (split_regular_and_flash_blocks, blocks_to_erase)
1891         (compute_garbled_blocks): Likewise.
1892         (cleanup_request_data, cleanup_write_requests_vector): Remove.
1893         (target_write_memory_blocks): Change argument to std::vector.
1894         * symfile.c (struct load_section_data): Add constructor and
1895         destructor.  Use std::vector for "requests".
1896         (struct load_progress_data): Add initializers.
1897         (load_section_callback): Update.  Use "new".
1898         (clear_memory_write_data): Remove.
1899         (generic_load): Update.
1900
1901 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
1902
1903         * arch/aarch64.h: Use common/tdesc.h.
1904
1905 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
1906
1907         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
1908         architecture with a 64-bit ABI.
1909
1910 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
1911
1912         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
1913         ahead of target description loading.
1914
1915 2018-02-26  Tom Tromey  <tom@tromey.com>
1916
1917         * stack.c (backtrace_command_1): Update.
1918         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
1919         of "flags".
1920         * python/py-framefilter.c (py_print_frame)
1921         (gdbpy_apply_frame_filter): Change type of "flags".
1922         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
1923         of "flags".
1924         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
1925         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
1926         * extension.h (enum frame_filter_flag): Rename from
1927         frame_filter_flags.
1928         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
1929         (apply_ext_lang_frame_filter): Change type of "flags".
1930         * extension.c (apply_ext_lang_frame_filter): Change type of
1931         "flags".
1932         * extension-priv.h (struct extension_language_ops)
1933         <apply_frame_filter>: Change type of "flags".
1934
1935 2018-02-26  Tom Tromey  <tom@tromey.com>
1936
1937         PR python/16497:
1938         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
1939         off-by-one in py_end computation.
1940         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
1941         PRINT_MORE_FRAMES.
1942         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
1943         constant.
1944
1945 2018-02-26  Tom Tromey  <tom@tromey.com>
1946
1947         * dwarf2read.c (struct variant_field): New.
1948         (struct nextfield) <variant>: New field.
1949         (dwarf2_add_field): Handle DW_TAG_variant_part.
1950         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
1951         discriminated union.
1952         (read_structure_type): Handle DW_TAG_variant_part.
1953         (handle_struct_member_die): New function, extracted from
1954         process_structure_scope.  Handle DW_TAG_variant.
1955         (process_structure_scope): Handle discriminated unions.  Call
1956         handle_struct_member_die.
1957
1958 2018-02-26  Tom Tromey  <tom@tromey.com>
1959
1960         * rust-lang.h (rust_last_path_segment): Declare.
1961         * rust-lang.c (rust_last_path_segment): Now public.  Change
1962         contract.
1963         (struct disr_info): Remove.
1964         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
1965         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
1966         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
1967         (rust_enum_p, rust_enum_variant): New function.
1968         (rust_underscore_fields): Remove "offset" parameter.
1969         (rust_print_enum): New function.
1970         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
1971         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
1972         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
1973         enums.
1974         (rust_internal_print_type): New function, from rust_print_type.
1975         Remove enum code.
1976         (rust_print_type): Call rust_internal_print_type.
1977         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
1978         Update enum handling.
1979         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
1980         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
1981         (rust_union_quirks): New functions.
1982         (process_full_comp_unit, process_full_type_unit): Call
1983         rust_union_quirks.
1984         (process_structure_scope): Update rust_unions if necessary.
1985
1986 2018-02-26  Tom Tromey  <tom@tromey.com>
1987
1988         * value.h (value_union_variant): Declare.
1989         * valops.c (value_union_variant): New function.
1990         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
1991         (struct discriminant_info): New.
1992         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
1993         enumerator.
1994         (struct main_type) <flag_discriminated_union>: New field.
1995
1996 2018-02-26  Tom Tromey  <tom@tromey.com>
1997
1998         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1999         unittests/unpack-selftests.c.
2000         * unittests/unpack-selftests.c: New file.
2001         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
2002
2003 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2004
2005         * dwarf2read.c (struct partial_die_info) <read>: New method.
2006         (read_partial_die): Remove the declaration.
2007         (load_partial_dies): Update.
2008         (partial_die_info::partial_die_info):
2009         (read_partial_die): Change it to partial_die_info::read.
2010
2011 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2012
2013         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
2014         (fixup_partial_die): Remove declaration.
2015         (scan_partial_symbols): Update.
2016         (partial_die_parent_scope): Likewise.
2017         (partial_die_full_name): Likewise.
2018         (fixup_partial_die): Change it to partial_die_info::fixup.
2019
2020 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2021
2022         * dwarf2read.c (read_partial_die): Update the declaration.
2023         (load_partial_dies): Caller update.
2024         (read_partial_die): Remove one argument abbrev_len.
2025
2026 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2027
2028         * dwarf2read.c (struct partial_die_info): Add ctor, delete
2029         assignment operator.
2030         (load_partial_dies): Use ctor and copy ctor.
2031         (read_partial_die): Update.
2032         (dwarf2_cu::find_partial_die): Use ctor.
2033
2034 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2035
2036         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
2037         (find_partial_die_in_comp_unit): Change it to
2038         dwarf2_cu::find_partial_die.
2039         (find_partial_die): Update.
2040
2041 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2042
2043         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
2044         is NULL.
2045
2046 2018-02-26  Yao Qi  <yao.qi@linaro.org>
2047
2048         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
2049
2050 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
2051
2052         * arch/amd64.h: Use common/tdesc.h.
2053         * arch/i386.c: Likewise.
2054         * arch/i386.h: Likewise.
2055         * arch/tic6x.c: Likewise.
2056         * arch/tdesc.h: Move file from here...
2057         * common/tdesc.h: ...to here.
2058         * features/aarch64-core.c: Regenerate.
2059         * features/aarch64-fpu.c: Regenerate.
2060         * features/i386/32bit-avx.c: Regenerate.
2061         * features/i386/32bit-avx512.c: Regenerate.
2062         * features/i386/32bit-core.c: Regenerate.
2063         * features/i386/32bit-linux.c: Regenerate.
2064         * features/i386/32bit-mpx.c: Regenerate.
2065         * features/i386/32bit-pkeys.c: Regenerate.
2066         * features/i386/32bit-sse.c: Regenerate.
2067         * features/i386/64bit-avx.c: Regenerate.
2068         * features/i386/64bit-avx512.c: Regenerate.
2069         * features/i386/64bit-core.c: Regenerate.
2070         * features/i386/64bit-linux.c: Regenerate.
2071         * features/i386/64bit-mpx.c: Regenerate.
2072         * features/i386/64bit-pkeys.c: Regenerate.
2073         * features/i386/64bit-segments.c: Regenerate.
2074         * features/i386/64bit-sse.c: Regenerate.
2075         * features/i386/x32-core.c: Regenerate.
2076         * features/tic6x-c6xp.c: Regenerate.
2077         * features/tic6x-core.c: Regenerate.
2078         * features/tic6x-gp.c: Regenerate.
2079         * target-descriptions.c: Use common/tdesc.h.
2080         * target-descriptions.h: Likewise.
2081
2082 2018-02-24  Tom Tromey  <tom@tromey.com>
2083
2084         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
2085         (try_thread_db_load_from_dir, thread_db_load_search): Use
2086         std::string.
2087         (info_auto_load_libthread_db_compare): Return bool.  Change
2088         argument types.
2089         (info_auto_load_libthread_db): Use std::vector, std::string.
2090         Remove cleanups.
2091
2092 2018-02-24  Tom Tromey  <tom@tromey.com>
2093
2094         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
2095         std::string.
2096         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
2097         std::string*.
2098         * gdbarch.c: Rebuild.
2099         * gdbarch.h: Rebuild.
2100         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
2101         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
2102         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
2103         std::string*.
2104
2105 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
2106
2107         * gdbtypes.h (sect_offset): Change type to uint64_t.
2108         (sect_offset_str): New function.
2109         * dwarf2read.c (create_addrmap_from_aranges): Use
2110         sect_offset_str.
2111         (error_check_comp_unit_head): Likewise.
2112         (create_debug_type_hash_table): Likewise.
2113         (read_cutu_die_from_dwo): Likewise.
2114         (init_cutu_and_read_dies): Likewise.
2115         (init_cutu_and_read_dies_no_follow): Likewise.
2116         (process_psymtab_comp_unit_reader): Likewise.
2117         (partial_die_parent_scope): Likewise.
2118         (peek_die_abbrev): Likewise.
2119         (process_queue): Likewise.
2120         (dwarf2_physname): Likewise.
2121         (read_namespace_alias): Likewise.
2122         (read_import_statement): Likewise.
2123         (create_dwo_cu_reader): Likewise.
2124         (create_cus_hash_table): Likewise.
2125         (lookup_dwo_cutu): Likewise.
2126         (inherit_abstract_dies): Likewise.
2127         (read_func_scope): Likewise.
2128         (read_call_site_scope): Likewise.
2129         (dwarf2_add_member_fn): Likewise.
2130         (read_common_block): Likewise.
2131         (read_module_type): Likewise.
2132         (read_typedef): Likewise.
2133         (read_subrange_type): Likewise.
2134         (load_partial_dies): Likewise.
2135         (read_partial_die): Likewise.
2136         (find_partial_die): Likewise.
2137         (read_str_index): Likewise.
2138         (dwarf2_string_attr): Likewise.
2139         (build_error_marker_type): Likewise.
2140         (lookup_die_type): Likewise.
2141         (dump_die_shallow): Likewise.
2142         (follow_die_ref): Likewise.
2143         (dwarf2_fetch_die_loc_sect_off): Likewise.
2144         (dwarf2_fetch_constant_bytes): Likewise.
2145         (follow_die_sig): Likewise.
2146         (get_signatured_type): Likewise.
2147         (get_DW_AT_signature_type): Likewise.
2148         (dwarf2_find_containing_comp_unit): Likewise.
2149         (set_die_type): Likewise.
2150
2151 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
2152
2153         * arch/aarch64.c: Include "common-defs.h".
2154         * arch/amd64.c: Likewise.
2155         * arch/i386.c: Likewise.
2156
2157 2018-02-21  Tom Tromey  <tom@tromey.com>
2158
2159         * value.h: (extract_field_op): Update.
2160         * eval.c (extract_field_op): Return a const char *.
2161         * expression.h (parse_expression_for_completion): Update.
2162         * completer.c (complete_expression): Update.
2163         (add_struct_fields): Make fieldname const.
2164         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
2165         (mark_completion_tag, parse_exp_in_context_1): Update.
2166         (parse_expression_for_completion): Change "name" to
2167         unique_xmalloc_ptr*.
2168
2169 2018-02-21  Tom Tromey  <tom@tromey.com>
2170
2171         * infcall.c (call_function_by_hand_dummy): Use std::vector.
2172
2173 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2174
2175         * avr-tdep.c (avr_read_pc): Change parameter type to
2176         readable_regcache.
2177         * gdbarch.sh (read_pc): Likewise.
2178         * gdbarch.c: Re-generated.
2179         * gdbarch.h: Re-generated.
2180         * hppa-tdep.c (hppa_read_pc): Change parameter type to
2181         readable_regcache.
2182         * ia64-tdep.c (ia64_read_pc): Likewise.
2183         * mips-tdep.c (mips_read_pc): Likewise.
2184         * spu-tdep.c (spu_read_pc): Likewise.
2185
2186 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2187
2188         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
2189         * regcache-dump.c: New file.
2190         * regcache.c: Move register_dump to regcache-dump.c.
2191         (maintenance_print_registers): Likewise.
2192         (maintenance_print_raw_registers): Likewise.
2193         (maintenance_print_cooked_registers): Likewise.
2194         (maintenance_print_register_groups): Likewise.
2195         (maintenance_print_remote_registers): Likewise.
2196         (_initialize_regcache): Likewise.
2197         * regcache.h (register_dump): Moved from regcache.c.
2198
2199 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2200
2201         * regcache.c (regcache::regcache): Update.
2202         (regcache::invalidate): Move it to detached_regcache::invalidate.
2203         (get_thread_arch_aspace_regcache): Update.
2204         (regcache::raw_update): Update.
2205         (regcache::cooked_read): Remove some code.
2206         (regcache::cooked_read_value): Likewise.
2207         (regcache::raw_write): Remove assert on m_readonly_p.
2208         (regcache::raw_supply_integer): Move it to
2209         detached_regcache::raw_supply_integer.
2210         (regcache::raw_supply_zeroed): Likewise.
2211         * regcache.h (detached_regcache) <raw_supply_integer>: New
2212         declaration.
2213         <raw_supply_zeroed, invalidate>: Likewise.
2214         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
2215         <invalidate>: Likewise.
2216         <m_readonly_p>: Removed.
2217
2218 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2219
2220         * infcmd.c (get_return_value): Let stop_regs point to
2221         get_current_regcache.
2222         * regcache.c (regcache::regcache): Remove.
2223         (register_dump_reg_buffer): New class.
2224         (regcache_print): Adjust.
2225         * regcache.h (regcache): Remove constructors.
2226
2227 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2228
2229         * regcache.c (class register_dump): New class.
2230         (register_dump_regcache, register_dump_none): New class.
2231         (register_dump_remote, register_dump_groups): New class.
2232         (regcache_print): Update.
2233         * regcache.h (regcache_dump_what): Move it to regcache.c.
2234         (regcache) <dump>: Remove.
2235
2236 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2237
2238         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
2239          reg_buffer_rw *.
2240         (jit_unwind_reg_set_impl): Call raw_supply.
2241         (jit_frame_sniffer): Use reg_buffer_rw.
2242         * record-full.c (record_full_core_regbuf): Change its type.
2243         (record_full_core_open_1): Use reg_buffer_rw.
2244         (record_full_close): Likewise.
2245         (record_full_core_fetch_registers): Use regcache->raw_supply.
2246         (record_full_core_store_registers): Likewise.
2247         * regcache.c (regcache::get_register_status): Move it to
2248         reg_buffer.
2249         (regcache_raw_set_cached_value): Remove.
2250         (regcache::raw_set_cached_value): Remove.
2251         (regcache::raw_write): Call raw_supply.
2252         (regcache::raw_supply): Move it to reg_buffer_rw.
2253         * regcache.h (regcache_raw_set_cached_value): Remove.
2254         (reg_buffer_rw): New class.
2255
2256 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2257
2258         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
2259         readonly_detached_regcache.
2260         (dummy_frame_prev_register): Use regcache->cooked_read.
2261         * frame.c (frame_save_as_regcache): Change return type.
2262         (frame_pop): Update.
2263         * frame.h (frame_save_as_regcache): Update declaration.
2264         * inferior.h (get_infcall_suspend_state_regcache): Update
2265         declaration.
2266         * infrun.c (infcall_suspend_state) <registers>: use
2267         readonly_detached_regcache.
2268         (save_infcall_suspend_state): Don't use regcache_dup.
2269         (get_infcall_suspend_state_regcache): Change return type.
2270         * linux-fork.c (struct fork_info) <savedregs>: Change to
2271         readonly_detached_regcache.
2272         <pc>: New field.
2273         (fork_save_infrun_state): Don't use regcache_dup.
2274         (info_checkpoints_command): Adjust.
2275         * mi/mi-main.c (register_changed_p): Update declaration.
2276         (mi_cmd_data_list_changed_registers): Use
2277         readonly_detached_regcache.
2278         (register_changed_p): Change parameter type to
2279         readonly_detached_regcache.
2280         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
2281         readonly_detached_regcache.
2282         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
2283         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2284         New.
2285         (regcache::save): Move it to reg_buffer.
2286         (regcache::restore): Change parameter type.
2287         (regcache_dup): Remove.
2288         * regcache.h (reg_buffer) <save>: New method.
2289         (readonly_detached_regcache): New class.
2290         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2291         readonly_detached_regcache.
2292         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2293
2294 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2295
2296         * frame.c (frame_save_as_regcache): Use regcache method save.
2297         (frame_pop): Use regcache method restore.
2298         * infrun.c (restore_infcall_suspend_state): Likewise.
2299         * linux-fork.c (fork_load_infrun_state): Likewise.
2300         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2301         save.
2302         * regcache.c (regcache_save): Remove.
2303         (regcache::restore): More asserts.
2304         (regcache_cpy): Remove.
2305         * regcache.h (regcache_save): Remove the declaration.
2306         (regcache::restore): Move from private to public.
2307         Remove the friend declaration of regcache_cpy.
2308         (regcache_cpy): Remove declaration.
2309
2310 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2311
2312         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2313         parameter type to 'readable_regcache *'.
2314         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2315         * arm-tdep.c (arm_neon_quad_read): Likewise.
2316         (arm_pseudo_read): Likewise.
2317         * avr-tdep.c (avr_pseudo_register_read): Likewise.
2318         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2319         * frv-tdep.c (frv_pseudo_register_read): Likewise.
2320         * gdbarch.c: Re-generated.
2321         * gdbarch.h: Re-generated.
2322         * gdbarch.sh (pseudo_register_read): Change parameter type to
2323         'readable_regcache *'.
2324         (pseudo_register_read_value): Likewise.
2325         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2326         (h8300_pseudo_register_read): Likewise.
2327         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2328         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2329         (i386_pseudo_register_read_into_value): Likewise.
2330         (i386_pseudo_register_read_value): Likewise.
2331         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2332         declaration.
2333         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2334         * m32c-tdep.c (m32c_raw_read): Likewise.
2335         (m32c_read_flg): Likewise.
2336         (m32c_banked_register): Likewise.
2337         (m32c_banked_read): Likewise.
2338         (m32c_sb_read): Likewise.
2339         (m32c_part_read): Likewise.
2340         (m32c_cat_read): Likewise.
2341         (m32c_r3r2r1r0_read): Likewise.
2342         (m32c_pseudo_register_read): Likewise.
2343         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2344         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2345         (mep_pseudo_cr64_read): Likewise.
2346         (mep_pseudo_register_read): Likewise.
2347         * mips-tdep.c (mips_pseudo_register_read): Likewise.
2348         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2349         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2350         * regcache.c (regcache::raw_read): Move it to readable_regcache.
2351         (regcache::cooked_read): Likewise.
2352         (regcache::cooked_read_value): Likewise.
2353         (regcache_cooked_read_signed):
2354         (regcache::cooked_read): Likewise.
2355         * regcache.h (readable_regcache): New class.
2356         (regcache): Inherit readable_regcache.  Move some methods to
2357         readable_regcache.
2358         * rl78-tdep.c (rl78_pseudo_register_read): Change
2359         parameter type to 'readable_regcache *'.
2360         * rs6000-tdep.c (do_regcache_raw_read): Remove.
2361         (e500_pseudo_register_read): Change parameter type to
2362         'readable_regcache *'.
2363         (dfp_pseudo_register_read): Likewise.
2364         (vsx_pseudo_register_read): Likewise.
2365         (efpr_pseudo_register_read): Likewise.
2366         * s390-tdep.c (s390_pseudo_register_read): Likewise.
2367         * sh-tdep.c (sh_pseudo_register_read): Likewise.
2368         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
2369         (sh64_pseudo_register_read): Likewise.
2370         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2371         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2372         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2373         (spu_pseudo_register_read): Likewise.
2374         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2375         (xtensa_pseudo_register_read): Likewise.
2376
2377 2018-02-21  Yao Qi  <yao.qi@linaro.org>
2378
2379         * regcache.c (regcache::regcache): Call reg_buffer ctor.
2380         (regcache::arch): Move it to reg_buffer::arch.
2381         (regcache::register_buffer): Likewise.
2382         (regcache::assert_regnum): Likewise.
2383         (regcache::num_raw_registers): Likewise.
2384         * regcache.h (reg_buffer): New class.
2385         (regcache): Inherit reg_buffer.
2386
2387 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
2388
2389         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
2390         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
2391
2392 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
2393
2394         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
2395
2396 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
2397
2398         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
2399         (SFILES): Remove common/*.c files.
2400         (COMMON_OBS): Remove some *.o files built from common/*.c files.
2401         * common/common.host: Add common reference.
2402         * configure.ac: Likewise.
2403         * configure: Regenerate.
2404
2405 2018-02-16  Yao Qi  <yao.qi@linaro.org>
2406
2407         * block.c (block_namespace_info): Inherit allocate_on_obstack.
2408         (block_initialize_namespace): Use new.
2409         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
2410         (dwarf2_free_objfile): Use delete.
2411         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
2412         (copy_type_recursive): Use new.
2413         * gdb_obstack.h (allocate_on_obstack): New.
2414
2415 2018-02-15  Yao Qi  <yao.qi@linaro.org>
2416
2417         PR gdb/22849
2418         * inferior.c (exit_inferior_1): Reset inf->control.
2419
2420 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
2421
2422         * ada-lang.c (ada_to_fixed_value_create): Delete advance
2423         declaration.
2424
2425 2018-02-14  Pedro Alves  <palves@redhat.com>
2426
2427         * frame-unwind.c (frame_unwind_try_unwinder): Always call
2428         frame_cleanup_after_sniffer on exception.
2429
2430 2018-02-14  Tom Tromey  <tom@tromey.com>
2431
2432         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
2433         const.
2434         (solib_bfd_open): Make pathname const.
2435         * solib.c (solib_bfd_open): Make pathname const.
2436         * solib-spu.c (spu_bfd_fopen): Make name const.
2437         (spu_bfd_open): Make pathname const.
2438         * solib-darwin.c (darwin_bfd_open): Make pathname const.
2439         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
2440
2441 2018-02-14  Tom Tromey  <tom@tromey.com>
2442
2443         * symfile.c (symfile_bfd_open): Update.
2444         * source.h (openp, source_full_path_of, find_and_open_source):
2445         Change argument type to unique_xmalloc_ptr.
2446         * source.c (openp): Take a unique_xmalloc_ptr.
2447         (source_full_path_of, find_and_open_source): Likewise.
2448         (open_source_file, symtab_to_fullname): Update.
2449         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
2450         unique_xmalloc_ptr.
2451         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
2452         (exec_file_find): Update.
2453         * psymtab.c (psymtab_to_fullname): Update.
2454         * nto-tdep.h (nto_find_and_open_solib): Update.
2455         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
2456         unique_xmalloc_ptr.
2457         * exec.c (exec_file_attach): Update.
2458         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
2459         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
2460
2461 2018-02-14  Tom Tromey  <tom@tromey.com>
2462
2463         * solib.c: Include source.h.
2464         * nto-tdep.c: Include source.h.
2465         * mi/mi-cmd-env.c: Include source.h.
2466         * infcmd.c: Include source.h.
2467         * exec.c: Include source.h.
2468         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
2469         (add_path, directory_switch, source_path, init_source_path): Move
2470         declarations...
2471         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
2472         (add_path, directory_switch, source_path, init_source_path):
2473         ...here.
2474
2475 2018-02-14  Tom Tromey  <tom@tromey.com>
2476
2477         * solist.h (exec_file_find, solib_find): Return
2478         unique_xmalloc_ptr.
2479         (solib_bfd_fopen): Take a const char *.
2480         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
2481         (exec_file_find, solib_find): Likewise.
2482         (solib_bfd_fopen): Do not take ownership of "pathname".
2483         (solib_bfd_open): Use unique_xmalloc_ptr.
2484         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
2485         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
2486         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
2487         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
2488
2489 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
2490
2491         * ada-lang.c (name_match_type_from_name): Remove reference to
2492         ada_name_for_lookup in function's documentation.
2493         * ada-lang.h (ada_name_for_lookup): Delete declaration.
2494
2495 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
2496
2497         * defs.h (enum openp_flags): New enum.
2498         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
2499         Move to enum openp_flags.
2500         (openp_flags): New enum flags.
2501         (openp): Change parameter type to openp_flags.
2502         * source.c (openp): Change parameter type to openp_flags.
2503         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
2504         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
2505
2506 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
2507
2508         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
2509         per-command.
2510
2511 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2512
2513         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
2514         into...
2515         (class dwarf2_queue_guard): ...the destructor of this new class.
2516         (dw2_do_instantiate_symtab): Create instance of the new class
2517         dwarf2_queue_guard, remove cleanup.
2518
2519 2018-02-09  Tom Tromey  <tom@tromey.com>
2520
2521         * source.c (find_source_lines): Don't reference past the end of
2522         the vector.
2523
2524 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2525
2526         * remote.c (remote_btrace_maybe_reopen): Change error message.
2527         * btrace.c (btrace_enable): Likewise.
2528         (parse_xml_btrace): Likewise.
2529         (parse_xml_btrace_conf): Likewise.
2530
2531 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2532
2533         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
2534         (linux_enable_pt, linux_enable_bts): Call
2535         diagnose_perf_event_open_fail.
2536
2537 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2538
2539         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
2540         Remove parameter and change return type.  Update callers.  Move it.
2541         (linux_enable_bts, linux_enable_pt): Improve error message.
2542         (linux_enable_pt): Remove zero buffer size check.
2543         (linux_enable_btrace): Improve error messages.  Remove NULL return
2544         check.
2545
2546 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2547
2548         * btrace.c (btrace_enable): Remove target_supports_btrace call.
2549         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
2550         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
2551         (linux_supports_pt, linux_supports_btrace): Remove.
2552         (linux_enable_bts): Call cpu_supports_bts.
2553         * nat/linux-btrace.h (linux_supports_btrace): Remove.
2554         * remote.c (remote_supports_btrace): Remove.
2555         (init_remote_ops): Remove remote_supports_btrace.
2556         * target-delegates.c: Regenerated.
2557         * target.c (target_supports_btrace): Remove.
2558         * target.h (target_ops) <to_supports_btrace>: Remove
2559         (target_supports_btrace): Remove.
2560         * x86-linux-nat.c (x86_linux_create_target): Remove
2561         linux_supports_btrace.
2562
2563 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2564
2565         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
2566         btrace failed.
2567         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
2568         exception and use message in own exception.
2569
2570 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2571
2572         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
2573         (perf_event_pt_event_type): Use gdb_file_up.
2574         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
2575         scoped_fd, and scoped_mmap.
2576
2577 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2578
2579         * common/scoped_mmap.h: New.
2580         * unittests/scoped_mmap-selftest.c: New.
2581         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2582         unittests/scoped_mmap-selftest.c.
2583
2584 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2585
2586         * common/scoped_fd.h: New.
2587         * unittests/scoped_fd-selftest.c: New.
2588         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2589         unittests/scoped_fd-selftest.c.
2590
2591 2018-02-09  Tom Tromey  <tom@tromey.com>
2592
2593         * auto-load.c (auto_load_section_scripts): Use
2594         gdb::unique_xmalloc_ptr.
2595
2596 2018-02-09  Tom Tromey  <tom@tromey.com>
2597
2598         * auto-load.c (execute_script_contents): Use std::string.
2599
2600 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
2601
2602         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
2603         Python function, rather than a new command.
2604
2605 2018-02-08  Tom Tromey  <tom@tromey.com>
2606
2607         * solib.c (solib_find_1): Use std::string.
2608         (solib_bfd_fopen): Use unique_xmalloc_ptr.
2609
2610 2018-02-08  Tom Tromey  <tom@tromey.com>
2611
2612         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
2613
2614 2018-02-08  Tom Tromey  <tom@tromey.com>
2615
2616         * source.c (find_source_lines): Use gdb::def_vector.
2617
2618 2018-02-08  Tom Tromey  <tom@tromey.com>
2619
2620         * macrocmd.c (struct temporary_macro_definition): New.
2621         (macro_define_command): Use temporary_macro_definition.  Remove
2622         cleanups.
2623         (free_macro_definition_ptr): Remove.
2624
2625 2018-02-08  Tom Tromey  <tom@tromey.com>
2626
2627         * macroexp.c (maybe_expand): Use std::string.
2628
2629 2018-02-08  Tom Tromey  <tom@tromey.com>
2630
2631         * macroexp.c (struct macro_buffer): Add initializers for some
2632         members.
2633         (init_buffer, init_shared_buffer, free_buffer)
2634         (free_buffer_return_text): Remove.
2635         (macro_buffer): New constructors.
2636         (~macro_buffer): New destructor.
2637         (macro_buffer::set_shared): New method.
2638         (macro_buffer::resize_buffer, macro_buffer::appendc)
2639         (macro_buffer::appendmem): Now methods, not free functions.
2640         (set_token, append_tokens_without_splicing, stringify)
2641         (macro_stringify): Update.
2642         (gather_arguments): Change return type.  Remove argc_p argument,
2643         add args_ptr argument.  Use std::vector.
2644         (substitute_args): Remove argc argument.  Accept std::vector.
2645         (expand): Update.  Use std::vector.
2646         (scan, macro_expand, macro_expand_next): Update.
2647
2648 2018-02-08  Tom Tromey  <tom@tromey.com>
2649
2650         * symtab.c (default_collect_symbol_completion_matches_break_on):
2651         Use unique_xmalloc_ptr.
2652         * macroscope.h: (sal_macro_scope, user_macro_scope)
2653         (default_macro_scope): Return unique_xmalloc_ptr.
2654         * macroscope.c (sal_macro_scope, user_macro_scope)
2655         (default_macro_scope): Return unique_xmalloc_ptr.
2656         * macroexp.h (macro_expand, macro_expand_once): Return
2657         unique_xmalloc_ptr.
2658         * macroexp.c (macro_expand, macro_expand_once): Return
2659         unique_xmalloc_ptr.
2660         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2661         (info_macro_command, info_macros_command): Use
2662         unique_xmalloc_ptr.
2663         * compile/compile-c-support.c (write_macro_definitions): Use
2664         unique_xmalloc_ptr.
2665         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
2666
2667 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
2668
2669         * value.c (value_static_field): Assign field type instead of
2670         containing type when returning an optimized out value.
2671
2672 2018-02-06  Yao Qi  <yao.qi@linaro.org>
2673
2674         * ft32-tdep.c (ft32_read_pc): Remove.
2675         (ft32_write_pc): Remove.
2676         (ft32_gdbarch_init): Update.
2677         * m32r-tdep.c (m32r_read_pc): Remove.
2678         (m32r_gdbarch_init): Update.
2679         * mep-tdep.c (mep_read_pc): Remove.
2680         (mep_gdbarch_init): Update.
2681         * microblaze-tdep.c (microblaze_write_pc): Remove.
2682         (microblaze_gdbarch_init): Update.
2683         * mn10300-tdep.c (mn10300_read_pc): Remove.
2684         (mn10300_write_pc): Remove.
2685         (mn10300_gdbarch_init): Update.
2686         * moxie-tdep.c (moxie_read_pc): Remove.
2687         (moxie_write_pc): Remove.
2688         (moxie_gdbarch_init): Update.
2689
2690 2018-02-06  Yao Qi  <yao.qi@linaro.org>
2691
2692         * expprint.c (print_subexp_standard): Handle
2693         OP_F77_UNDETERMINED_ARGLIST.
2694         (dump_subexp_body_standard): Likewise.
2695
2696 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
2697
2698         * target-descriptions.c (tdesc_element_visitor) Add empty
2699         implementations.
2700         (tdesc_type): Move make_gdb_type from here.
2701         (tdesc_type_builtin): Likewise.
2702         (tdesc_type_vector): Likewise.
2703         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
2704         (make_gdb_type_struct): Move from tdesc_type_with_fields.
2705         (make_gdb_type_union): Likewise.
2706         (make_gdb_type_flags): Likewise.
2707         (make_gdb_type_enum): Likewise.
2708         (make_gdb_type): New function.
2709         (tdesc_register_type): Use static make_gdb_type.
2710
2711 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
2712
2713         * infcmd.c (default_print_one_register_info): Align natural-format
2714         column values consistently one under another.
2715         (pad_to_column): New function.
2716
2717 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
2718
2719         * dwarf2read.c (dwarf2_physname): Move commment.
2720
2721 2018-02-01  Leszek Swirski  <leszeks@google.com>
2722
2723         * varobj.c (varobj_formatted_print_options): Allow recursive
2724         pretty printing if pretty printing is enabled.
2725
2726 2018-02-01  Leszek Swirski  <leszeks@google.com>
2727
2728         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
2729         names after a structop as a filename.
2730
2731 2018-02-01  Yao Qi  <yao.qi@linaro.org>
2732
2733         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
2734         (arm_record_coproc_data_proc): Likewise.
2735
2736 2018-02-01  Yao Qi  <yao.qi@linaro.org>
2737
2738         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
2739
2740 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
2741
2742         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
2743         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
2744
2745 2018-01-31  Pedro Alves  <palves@redhat.com>
2746
2747         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
2748         * inflow.c (child_terminal_save_inferior): Wrap reference to
2749         tcgetpgrp in HAVE_TERMIOS_H.
2750         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
2751         _WIN32.
2752         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
2753         always iterate over all inferiors.
2754         (gdbsim_cntrl_c): Adjust.
2755         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
2756
2757 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
2758
2759         * gdbtypes.c (lookup_array_range_type): Make sure the array's
2760         index type is objfile-owned if the element type is as well.
2761
2762 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
2763
2764         GDB 8.1 released.
2765
2766 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
2767
2768         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
2769         "features/s390x-linux64.c".
2770         (_initialize_s390_linux_tdep): Remove initialization of tdescs
2771         s390_linux32 and s390x_linux64.
2772         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
2773         default tdesc.
2774         * s390-tdep.c: Include "features/s390-linux32.c" and
2775         "features/s390x-linux64.c".
2776         (s390_tdesc_valid): Add check for tdesc_has_registers.
2777         (s390_gdbarch_init): Make sure there is always a valid tdesc.
2778         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
2779         tdesc_s390x_linux64.
2780         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
2781         tdesc_s390x_linux64 to...
2782         * s390-tdep.h: ...here.
2783
2784 2018-01-30  Pedro Alves  <palves@redhat.com>
2785
2786         PR gdb/13211
2787         * config.in, configure: Regenerate.
2788         * configure.ac: Check for getpgid.
2789         * go32-nat.c (go32_pass_ctrlc): New.
2790         (go32_target): Install it.
2791         * inf-child.c (inf_child_target): Install
2792         child_terminal_save_inferior, child_pass_ctrlc and
2793         child_interrupt.
2794         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
2795         (inf_ptrace_target): No longer install it.
2796         * infcmd.c (interrupt_target_1): Adjust.
2797         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
2798         (child_interrupt): Declare.
2799         (inferior::terminal_state): New.
2800         * inflow.c (struct terminal_info): Update comments.
2801         (inferior_process_group): Delete.
2802         (terminal_is_ours): Delete.
2803         (gdb_tty_state): New.
2804         (child_terminal_init): Adjust.
2805         (is_gdb_terminal, sharing_input_terminal_1)
2806         (sharing_input_terminal): New functions.
2807         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
2808         Set the process's actual process group in the foreground if
2809         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
2810         mark terminal as the inferior's if not sharing GDB's terminal.
2811         Don't check attach_flag.
2812         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
2813         pass down a target_terminal_state.
2814         (child_terminal_save_inferior): New, factored out from ...
2815         (child_terminal_ours_1): ... this.  Handle
2816         target_terminal_state::is_ours_for_output.
2817         (child_interrupt, child_pass_ctrlc): New.
2818         (inflow_inferior_exit): Clear the inferior's terminal_state.
2819         (copy_terminal_info): Copy the inferior's terminal state.
2820         (_initialize_inflow): Remove reference to terminal_is_ours.
2821         * inflow.h (inferior_process_group): Delete.
2822         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
2823         * procfs.c (procfs_target): Don't install procfs_interrupt.
2824         (procfs_interrupt): Delete.
2825         * remote.c (remote_serial_quit_handler): Adjust.
2826         (remote_interrupt): Remove ptid parameter.  Adjust.
2827         * target-delegates.c: Regenerate.
2828         * target.c: Include "terminal.h".
2829         (target_terminal::terminal_state): Rename to ...
2830         (target_terminal::m_terminal_state): ... this.
2831         (target_terminal::init): Adjust.
2832         (target_terminal::inferior): Adjust to per-inferior
2833         terminal_state.
2834         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
2835         (target_terminal::ours, target_terminal::ours_for_output): Use
2836         target_terminal_is_ours_kind.
2837         (target_interrupt): Remove ptid parameter.  Adjust.
2838         (default_target_pass_ctrlc): Adjust.
2839         * target.h (target_ops::to_terminal_save_inferior): New field.
2840         (target_ops::to_interrupt): Remove ptid_t parameter.
2841         (target_interrupt): Remove ptid_t parameter.  Update comment.
2842         (target_pass_ctrlc): Update comment.
2843         * target/target.h (target_terminal_state): New scoped enum,
2844         factored out of ...
2845         (target_terminal::terminal_state): ... here.
2846         (target_terminal::inferior): Update comments.
2847         (target_terminal::restore_inferior): New.
2848         (target_terminal::is_inferior, target_terminal::is_ours)
2849         (target_terminal::is_ours_for_output): Adjust.
2850         (target_terminal::scoped_restore_terminal_state): Adjust to
2851         rename, and call restore_inferior() instead of inferior().
2852         (target_terminal::scoped_restore_terminal_state::m_state): Change
2853         type.
2854         (target_terminal::terminal_state): Rename to ...
2855         (target_terminal::m_terminal_state): ... this and change type.
2856
2857 2018-01-30  Pedro Alves  <palves@redhat.com>
2858
2859         * linux-nat.c (wait_for_signal): New function.
2860         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
2861         directly.
2862         (async_terminal_is_ours)
2863         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
2864         (linux_nat_add_target): Don't override
2865         to_terminal_inferior/to_terminal_ours.
2866
2867 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2868
2869         * remote.c (remote_follow_fork): Don't call "detach_inferior".
2870
2871 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
2872
2873         * dwarf2read.c (free_dwo_files): Add forward-declaration.
2874         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
2875         dwarf2_per_objfile_free here.
2876         (dwarf2_per_objfile_free): Remove.
2877         (_initialize_dwarf2_read): Don't register
2878         dwarf2_per_objfile_free as a registry cleanup.
2879
2880 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
2881
2882         Avoid compilation errors in MinGW native builds
2883
2884         The error is triggered by including python-internal.h, and the
2885         error message is:
2886
2887              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
2888                       from build-gnulib/import/math.h:27,
2889                       from d:/usr/Python26/include/pyport.h:235,
2890                       from d:/usr/Python26/include/Python.h:58,
2891                       from python/python-internal.h:94,
2892                       from python/py-arch.c:24:
2893              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
2894         using ::hypot;
2895                 ^~~~~
2896
2897         This happens because Python headers define 'hypot' to expand t
2898         '_hypot' in the Windows builds.
2899         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
2900         'hypoth'.  This avoids a compilation error.
2901
2902 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
2903
2904         * MAINTAINERS (Write After Approval): Fix ordering.
2905
2906 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
2907
2908         * MAINTAINERS (Write After Approval): Add Alan Hayward.
2909
2910 2018-01-26  Alan Modra  <amodra@gmail.com>
2911
2912         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
2913         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
2914         Remove nop.  Make const.  Comment.
2915         (powerpc32_plt_stub_so_2): New.
2916         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
2917         Correct count.  Update uses.
2918         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
2919         Move common code reading PLT entry word.  Correct
2920         powerpc32_plt_stub PLT address calculation.
2921         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
2922         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
2923         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
2924         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
2925         (ppc64_standard_linkage8): Likewise.
2926         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
2927         Correct insns description.
2928         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
2929
2930 2018-01-24  Pedro Alves  <palves@redhat.com>
2931
2932         GCC PR libstdc++/83906
2933         * gdbtypes.c (operator==(const dynamic_prop &,
2934         const dynamic_prop &)): New.
2935         (operator==(const range_bounds &, const range_bounds &)): New.
2936         (check_types_equal): Use them instead of memcmp.
2937         * gdbtypes.h (operator==(const dynamic_prop &,
2938         const dynamic_prop &)): Declare.
2939         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
2940         (operator==(const range_bounds &, const range_bounds &)): Declare.
2941         (operator!=(const range_bounds &, const range_bounds &)): Declare.
2942
2943 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
2944
2945         * s390-linux-tdep.c (s390_record_address_mask)
2946         (s390_record_calc_disp_common, s390_record_calc_disp)
2947         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2948         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2949         (s390_process_record): Move to s390-tdep.c.
2950         (s390_linux_init_abi_any): Adjust.
2951         * s390-tdep.c (s390_record_address_mask)
2952         (s390_record_calc_disp_common, s390_record_calc_disp)
2953         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2954         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2955         (s390_process_record): Moved from s390-linux-tdep.c
2956         (s390_gdbarch_init): Adjust.
2957
2958 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
2959
2960         * s390-linux-nat.c (s390-tdep.h): New include.
2961         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
2962         (HFILES_NO_SRCDIR): Add s390-tdep.h.
2963         (ALLDEPFILES): Add s390-tdep.c.
2964         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
2965         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
2966         * s390-tdep.h: ...this.  New file.
2967         * s390-linux-tdep.c (s390-tdep.h): New include.
2968         (_initialize_s390_tdep): Rename to...
2969         (_initialize_s390_linux_tdep): ...this and adjust.
2970         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
2971         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
2972         s390-tdep.h.
2973         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
2974         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
2975         (s390_is_partial_instruction, s390_software_single_step)
2976         (is_non_branch_ril, s390_displaced_step_copy_insn)
2977         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
2978         (s390_prologue_data, s390_addr, s390_store, s390_load)
2979         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
2980         (s390_register_call_saved, s390_guess_tracepoint_registers)
2981         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
2982         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
2983         (s390_pseudo_register_name, s390_pseudo_register_type)
2984         (s390_pseudo_register_read, s390_pseudo_register_write)
2985         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
2986         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
2987         (s390_addr_bits_remove, s390_address_class_type_flags)
2988         (s390_address_class_type_flags_to_name)
2989         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
2990         (s390_function_arg_float, s390_function_arg_vector)
2991         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
2992         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
2993         (s390_frame_align, s390_register_return_value, s390_return_value)
2994         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
2995         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
2996         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
2997         (s390_trad_frame_prev_register, s390_unwind_cache)
2998         (s390_prologue_frame_unwind_cache)
2999         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
3000         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
3001         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
3002         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
3003         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
3004         (s390_frame_base_address, s390_local_base_address)
3005         (s390_frame_base, s390_gcc_target_options)
3006         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
3007         (s390_validate_reg_range, s390_tdesc_valid)
3008         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
3009         * s390-tdep.c: ...this.  New file.
3010
3011 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3012
3013         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
3014         (s390_process_record, s390_gdbarch_tdep_alloc)
3015         (s390_linux_init_abi_any): Use/set new hook.
3016
3017 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3018
3019         * s390-linux-tdep.c (osabi.h): New include.
3020         (s390_linux_init_abi_31, s390_linux_init_abi_64)
3021         (s390_linux_init_abi_any): New functions.
3022         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
3023
3024 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3025
3026         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
3027         tdesc_has_registers check
3028
3029 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3030
3031         * s390-linux-tdep.c (s390_tdesc_valid): New function.
3032         (s390_validate_reg_range): New macro.
3033         (s390_gdbarch_init): Adjust.
3034
3035 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3036
3037         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
3038         (s390_gdbarch_tdep_alloc): Adjust.
3039         (s390_gdbarch_init): Adjust.
3040
3041 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3042
3043         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
3044         <have_tdb>: Change type to bool.
3045         (s390_gdbarch_tdep_alloc): Adjust.
3046         (s390_gdbarch_init): Adjust.
3047
3048 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3049
3050         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
3051         (gdbarch_tdep) <have_upper, have_vx>: New fields.
3052         (s390_gdbarch_tdep_alloc): New function.
3053         (s390_gdbarch_init): Allocate tdep at start and use its fields
3054         instead of separate variables.
3055
3056 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3057
3058         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
3059         when looking for cached gdbarch and add comment for remaining.
3060
3061 2018-01-22  Pedro Alves  <palves@redhat.com>
3062             Sergio Durigan Junior  <sergiodj@redhat.com>
3063
3064         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
3065         case.
3066
3067 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
3068
3069         * MAINTAINERS: Update my company e-mail address.
3070
3071 2018-01-22  Yao Qi  <yao.qi@linaro.org>
3072
3073         * regcache.c (cooked_write_test): New function.
3074         (_initialize_regcache): Register the test.
3075
3076 2018-01-22  Yao Qi  <yao.qi@linaro.org>
3077
3078         * ia64-tdep.c (ia64_pseudo_register_read): Call
3079         regcache->cooked_read instead of regcache_cooked_read_unsigned.
3080         * m32c-tdep.c (m32c_cat_read): Likewise.
3081         (m32c_r3r2r1r0_read): Likewise.
3082         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
3083         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
3084
3085 2018-01-22  Yao Qi  <yao.qi@linaro.org>
3086
3087         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
3088         method raw_read instead of regcache_raw_read.
3089         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3090         * arm-tdep.c (arm_neon_quad_read): Likewise.
3091         * avr-tdep.c (avr_pseudo_register_read): Likewise.
3092         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3093         * frv-tdep.c (frv_pseudo_register_read): Likewise.
3094         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
3095         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3096         (i386_pseudo_register_read_into_value): Likewise.
3097         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3098         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3099         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3100         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
3101         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
3102         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
3103         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3104         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
3105         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
3106
3107 2018-01-22  Yao Qi  <yao.qi@linaro.org>
3108
3109         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
3110         * configure.tgt: Remove target mt.
3111         * mt-tdep.c: Remove.
3112         * regcache.c (cooked_read_test): Remove the check for mt.
3113
3114 2018-01-22  Yao Qi  <yao.qi@linaro.org>
3115
3116         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
3117         instead of gdbarch_pseudo_register_read_value.
3118
3119 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
3120
3121         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
3122         language is Ada.
3123
3124 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
3125
3126         * linespec.c (create_sals_line_offset): Remove code that preserved
3127         the symtab_and_line's line number.
3128
3129 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3130
3131         * varobj.c (varobj_create): Don't set valid_block when creating a
3132         floating varobj.
3133
3134 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3135
3136         * varobj.c (varobj_create): Remove out of date comment.
3137
3138 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3139
3140         PR mi/20395
3141         * ada-exp.y (write_var_from_sym): Pass extra parameter when
3142         updating innermost block.
3143         * parse.c (innermost_block_tracker::update): Take extra type
3144         parameter, and check types match before updating innermost block.
3145         (write_dollar_variable): Update innermost block for registers.
3146         * parser-defs.h (enum innermost_block_tracker_type): New enum.
3147         (innermost_block_tracker::innermost_block_tracker): Initialise
3148         m_types member.
3149         (innermost_block_tracker::reset): Take type parameter.
3150         (innermost_block_tracker::update): Take type parameter, and pass
3151         type through as needed.
3152         (innermost_block_tracker::m_types): New member.
3153         * varobj.c (varobj_create): Pass type when reseting innermost
3154         block.
3155
3156 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3157
3158         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
3159         * ada-lang.c (resolve_subexp): Likewise.
3160         * breakpoint.c (set_breakpoint_condition) Likewise.
3161         (watch_command_1) Likewise.
3162         * c-exp.y (variable): Likewise.
3163         * d-exp.y (PrimaryExpression): Likewise.
3164         * f-exp.y (variable): Likewise.
3165         * go-exp.y (variable): Likewise.
3166         * m2-exp.y (variable): Likewise.
3167         * objfiles.c (objfile::~objfile): Likewise.
3168         * p-exp.y (variable): Likewise.
3169         * parse.c (innermost_block): Change type.
3170         * parser-defs.h (class innermost_block_tracker): New.
3171         (innermost_block): Change to innermost_block_tracker.
3172         * printcmd.c (display_command): Switch to innermost_block API.
3173         (do_one_display): Likewise.
3174         * rust-exp.y (do_one_display): Likewise.
3175         * symfile.c (clear_symtab_users): Likewise.
3176         * varobj.c (varobj_create): Switch to innermost_block API, replace
3177         use of innermost_block with block stored on varobj object.
3178
3179 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3180
3181         * expression.h (innermost_block): Remove declaration.
3182         * varobj.c: Add 'parser-defs.h' include.
3183
3184 2018-01-19  Tom Tromey  <tom@tromey.com>
3185
3186         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
3187         symbols in the static and global blocks.
3188
3189 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
3190
3191         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
3192         gdb_ptrace.h, and move including gdb_wait.h ...
3193         * nat/linux-ptrace.h: ... to here.
3194
3195 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
3196
3197         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
3198         inf_ptrace_detach_success.
3199         (inf_ptrace_detach_success): Add inferior parameter, use it
3200         instead of inferior_ptid, pass it to detach_inferior.
3201         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
3202         parameter.
3203         * inferior.c (detach_inferior): Add overload that takes an
3204         inferior object.
3205         * inferior.h (detach_inferior): Likewise.
3206         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
3207         use inferior_ptid, adjust call to inf_ptrace_detach_success.
3208         * linux-thread-db.c (thread_db_detach): Use inf parameter.
3209
3210 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
3211
3212         * target.h (struct target_ops) <to_detach>: Add inferior
3213         parameter.
3214         (target_detach): Likewise.
3215         * target.c (dispose_inferior): Pass inferior down.
3216         (target_detach): Pass inferior down.  Assert that it is equal to
3217         the current inferior.
3218         * aix-thread.c (aix_thread_detach): Pass inferior down.
3219         * corefile.c (core_file_command): Pass current_inferior() down.
3220         * corelow.c (core_detach): Add inferior parameter.
3221         * darwin-nat.c (darwin_detach): Likewise.
3222         * gnu-nat.c (gnu_detach): Likewise.
3223         * inf-ptrace.c (inf_ptrace_detach): Likewise.
3224         * infcmd.c (detach_command): Pass current_inferior() down to
3225         target_detach.
3226         * infrun.c (follow_fork_inferior): Pass parent_inf to
3227         target_detach.
3228         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
3229         target_detach.
3230         * linux-nat.c (linux_nat_detach): Add inferior parameter.
3231         * linux-thread-db.c (thread_db_detach): Likewise.
3232         * nto-procfs.c (procfs_detach): Likewise.
3233         * procfs.c (procfs_detach): Likewise.
3234         * record.c (record_detach): Likewise.
3235         * record.h (struct inferior): Forward-declare.
3236         (record_detach): Add inferior parameter.
3237         * remote-sim.c (gdbsim_detach): Likewise.
3238         * remote.c (remote_detach_1): Likewise.
3239         (remote_detach): Likewise.
3240         (extended_remote_detach): Likewise.
3241         * sol-thread.c (sol_thread_detach): Likewise.
3242         * target-debug.h (target_debug_print_inferior_p): New macro.
3243         * target-delegates.c: Re-generate.
3244         * top.c (kill_or_detach): Pass inferior down to target_detach.
3245         * windows-nat.c (windows_detach): Add inferior parameter.
3246
3247 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
3248
3249         * target.h (struct target_ops) <to_detach>: Remove args
3250         parameter.
3251         (target_detach): Likewise.
3252         * target.c (dispose_inferior): Adjust.
3253         (target_detach): Remove args parameter, adjust.
3254         * aix-thread.c (aix_thread_detach): Adjust.
3255         * corefile.c (core_file_command): Adjust.
3256         * corelow.c (core_detach): Adjust.
3257         * darwin-nat.c (darwin_detach): Adjust.
3258         * gnu-nat.c (gnu_detach): Adjust.
3259         * inf-ptrace.c (inf_ptrace_detach): Adjust.
3260         * infcmd.c (detach_command): Adjust
3261         * infrun.c (follow_fork_inferior): Adjust.
3262         (handle_vfork_child_exec_or_exit): Adjust.
3263         * linux-fork.c (linux_fork_detach): Remove args parameter.
3264         * linux-fork.h (linux_fork_detach): Likewise.
3265         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
3266         * linux-thread-db.c (thread_db_detach): Likewise.
3267         * nto-procfs.c (procfs_detach): Likewise.
3268         * procfs.c (procfs_detach): Likewise.
3269         (do_detach): Remove signo parameter.
3270         * record.c (record_detach): Remove args parameter.
3271         * record.h (record_detach): Likewise.
3272         * remote-sim.c (gdbsim_detach): Likewise.
3273         * remote.c (remote_detach_1): Likewise.
3274         (remote_detach): Likewise.
3275         (extended_remote_detach): Likewise.
3276         * sol-thread.c (sol_thread_detach): Likewise.
3277         * target-delegates.c: Re-generate.
3278         * top.c (struct qt_args) <args>: Remove field.
3279         (kill_or_detach): Don't pass args.
3280         (quit_force): Don't set args.
3281         * windows-nat.c (windows_detach): Remove args parameter.
3282
3283 2018-01-19  Yao Qi  <yao.qi@linaro.org>
3284
3285         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3286         (arm_linux_init_abi): Install it.
3287
3288 2018-01-19  Yao Qi  <yao.qi@linaro.org>
3289
3290         * osabi.c (gdb_osabi_names): Extend the regexp for
3291         arm-linux-gnueabihf.
3292
3293 2018-01-18  Yao Qi  <yao.qi@linaro.org>
3294
3295         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3296         m_abbrevs.
3297         (abbrev_table::add_abbrev): Update.
3298         (abbrev_table::lookup_abbrev): Update.
3299
3300 2018-01-18  Yao Qi  <yao.qi@linaro.org>
3301
3302         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3303
3304 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
3305
3306         * compile/compile.c (compile_to_object): Convert "triplet_rx"
3307         to "std::string".
3308
3309 2018-01-17  Tom Tromey  <tom@tromey.com>
3310
3311         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
3312
3313 2018-01-17  Tom Tromey  <tom@tromey.com>
3314
3315         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3316         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3317         (create_array_type_with_stride): Update.
3318         * dwarf2read.c (set_die_type): Update.
3319
3320 2018-01-17  Tom Tromey  <tom@tromey.com>
3321
3322         * dwarf2read.c (delayed_method_info): Remove typedef.
3323         (dwarf2_cu::method_info): Now a std::vector.
3324         (add_to_method_list): Update.
3325         (free_delayed_list): Remove.
3326         (compute_delayed_physnames): Update.
3327         (process_full_comp_unit, process_full_type_unit): Clear the method
3328         list.  Remove cleanups.
3329         (psymtab_include_file_name): Add name_holder parameter.  Use
3330         unique_xmalloc_ptr.
3331         (dwarf_decode_lines): Update.
3332
3333 2018-01-17  Tom Tromey  <tom@tromey.com>
3334             Simon Marchi  <simon.marchi@ericsson.com>
3335
3336         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3337         (dwarf2_per_objfile::free_cached_comp_units)
3338         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3339         (init_cutu_and_read_dies_no_follow): Update.
3340         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3341         (dwarf2_cu::~dwarf2_cu): New.
3342         (free_heap_comp_unit, free_stack_comp_unit): Remove.
3343         (age_cached_comp_units, free_one_cached_comp_unit): Update.
3344
3345 2018-01-17  Tom Tromey  <tom@tromey.com>
3346             Simon Marchi  <simon.marchi@ericsson.com>
3347
3348         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3349         (struct die_reader_specs) <abbrev_table>: New member.
3350         (struct abbrev_table): Add constructor.
3351         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3352         <abbrev_obstack>: Now an auto_obstack.
3353         (abbrev_table_up): New typedef.
3354         (init_cu_die_reader): Add abbrev_table parameter.
3355         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3356         Add result_dwo_abbrev_table.
3357         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3358         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3359         Update.
3360         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3361         parameter.
3362         (skip_children): Update.
3363         (abbrev_table::alloc_abbrev): Rename from
3364         abbrev_table_alloc_abbrev.
3365         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
3366         (abbrev_table::lookup_abbrev): Rename from
3367         abbrev_table_lookup_abbrev.
3368         (abbrev_table_read_table): Return abbrev_table_up.
3369         (abbrev_table_free, abbrev_table_free_cleanup)
3370         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
3371         (load_partial_dies): Update.
3372
3373 2018-01-17  Tom Tromey  <tom@tromey.com>
3374
3375         * dwarf2read.c (dwarf2_compute_name): Update comment.
3376         (read_func_scope, read_variable): Update.
3377         (new_symbol): Remove.
3378         (new_symbol_full): Rename to new_symbol.
3379
3380 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
3381
3382         PR gdb/16577
3383         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
3384         a warning instead of throwing an error, set section size to 0 and return
3385         NULL.
3386         * gdb_bfd.h (gdb_bfd_map_section): Update description.
3387
3388 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
3389
3390         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
3391         std::string.
3392         (linux_ptrace_attach_fail_reason_string): Likewise.
3393         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
3394         Likewise.
3395         (linux_ptrace_attach_fail_reason_string): Likewise.
3396         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
3397
3398 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
3399
3400         * linux-nat.c (linux_nat_attach): Remove xstrdup.
3401
3402 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
3403
3404         PR gdb/21559
3405         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3406         checking for fs_base/gs_base fields in struct user_regs_struct.
3407         * configure: Regenerate.
3408
3409 2018-01-17  Yao Qi  <yao.qi@linaro.org>
3410
3411         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
3412         function.
3413         (aarch64_linux_init_abi): Install it to gdbarch hook
3414         gcc_target_options.
3415
3416 2018-01-15  Pedro Alves  <palves@redhat.com>
3417
3418         * common/signals-state-save-restore.c
3419         (save_original_signals_state): Fix typos.
3420
3421 2017-01-12  Tom Tromey  <tom@tromey.com>
3422             Sergio Durigan Junior  <sergiodj@redhat.com>
3423
3424         * Makefile.in (install-only): Install gdb-add-index.
3425
3426 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
3427
3428         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
3429
3430 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3431
3432         * infrun.c (keep_going_pass_signal): Clear step-over info when
3433         insert_breakpoints fails.
3434
3435 2018-01-11  Pedro Alves  <palves@redhat.com>
3436
3437         PR gdb/22583
3438         * infrun.c (resume): Rename to ...
3439         (resume_1): ... this.
3440         (resume): Reimplement as wrapper around resume_1.
3441
3442 2018-01-11  Pedro Alves  <palves@redhat.com>
3443
3444         PR remote/22597
3445         * remote.c (remote_parse_stop_reply): Default to the last-set
3446         general thread instead of to 'magic_null_ptid'.
3447
3448 2018-01-10  Pedro Alves  <palves@redhat.com>
3449
3450         * language.h (language_get_symbol_name_matcher): Rename ...
3451         (get_symbol_name_matcher): ... this.
3452         * language.c (language_get_symbol_name_matcher): Ditto.
3453         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
3454         callers adjusted.
3455
3456 2018-01-10  Pedro Alves  <palves@redhat.com>
3457
3458         PR gdb/22670
3459         * dwarf2read.c
3460         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
3461         Adjust to use language_get_symbol_name_matcher instead of
3462         language_defn::la_get_symbol_name_matcher.
3463         * language.c (language_get_symbol_name_matcher): If in Ada mode
3464         and the lookup name is a verbatim match, return Ada's matcher.
3465         * language.h (language_get_symbol_name_matcher): Adjust comment.
3466         (ada_lookup_name_info::verbatim_p):: New method.
3467
3468 2018-01-10  Pedro Alves  <palves@redhat.com>
3469
3470         PR gdb/22670
3471         * ada-lang.c (ada_collect_symbol_completion_matches): If the
3472         minsym's language is language_auto or language_cplus, pass down
3473         language_ada instead.
3474         * symtab.c (compare_symbol_name): Don't frob symbol language here.
3475
3476 2018-01-10  Pedro Alves  <palves@redhat.com>
3477
3478         PR gdb/22670
3479         * minsyms.c (linkage_name_str): New function.
3480         (iterate_over_minimal_symbols): Use it.
3481
3482 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
3483
3484         * NEWS: Document that 'info proc' now works on FreeBSD.
3485
3486 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
3487
3488         * configure.ac: Check for kinfo_getfile in libutil.
3489         * configure: Regenerate.
3490         * config.in: Regenerate.
3491         * fbsd-nat.c: Include "fbsd-tdep.h".
3492         (fbsd_fetch_cmdline): New.
3493         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
3494         rather than calling error.
3495         (fbsd_info_proc): New.
3496         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
3497         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
3498         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
3499
3500 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
3501
3502         * fbsd-nat.c (struct free_deleter): Remove.
3503         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
3504
3505 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
3506
3507         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
3508         NULL for an empty pathname.
3509
3510 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
3511
3512         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
3513         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
3514         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
3515         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
3516         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
3517         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
3518         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
3519         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
3520         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
3521         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
3522         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
3523         (fbsd_core_fetch_timeval, fbsd_print_sigset)
3524         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
3525         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
3526         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
3527
3528 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
3529
3530         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
3531         (gnu_xfer_auxv): New function.
3532         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
3533         TARGET_OBJECT_AUXV.
3534
3535 2018-01-08  Yao Qi  <yao.qi@linaro.org>
3536             Simon Marchi  <simon.marchi@ericsson.com>
3537
3538         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
3539         common/selftest.c.
3540         (COMMON_OBS): Remove selftest.o.
3541         * configure.ac: Append selftest-arch.c and common/selftest.c to
3542         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
3543         * configure: Re-generated.
3544         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
3545         GDB_SELF_TEST.
3546         (maintenance_info_selftests): Likewise.
3547
3548 2018-01-08  Xavier Roirand  <roirand@adacore.com>
3549
3550         * ada-valprint.c (val_print_packed_array_elements): Use
3551         proper number of elements when printing an array indexed
3552         by an enumeration type.
3553
3554 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
3555
3556         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
3557         (dw2_get_file_names_reader): Adjust.
3558         (lookup_dwo_signatured_type): Adjust.
3559         (lookup_dwp_signatured_type): Adjust.
3560         (lookup_signatured_type): Adjust.
3561         (create_type_unit_group): Adjust.
3562         (get_type_unit_group): Adjust.
3563         (process_psymtab_comp_unit_reader): Adjust.
3564         (build_type_psymtabs_reader): Adjust.
3565         (scan_partial_symbols): Adjust.
3566         (add_partial_symbol): Adjust.
3567         (add_partial_subprogram): Adjust.
3568         (peek_die_abbrev): Adjust.
3569         (fixup_go_packaging): Adjust.
3570         (process_imported_unit_die): Adjust.
3571         (dwarf2_compute_name): Adjust.
3572         (dwarf2_physname): Adjust.
3573         (read_import_statement): Adjust.
3574         (handle_DW_AT_stmt_list): Adjust.
3575         (read_file_scope): Adjust.
3576         (read_func_scope): Adjust.
3577         (read_lexical_block_scope): Adjust.
3578         (read_call_site_scope): Adjust.
3579         (read_variable): Adjust.
3580         (dwarf2_rnglists_process): Adjust.
3581         (dwarf2_ranges_process): Adjust.
3582         (dwarf2_ranges_read): Adjust.
3583         (dwarf2_get_pc_bounds): Adjust.
3584         (dwarf2_record_block_ranges): Adjust.
3585         (dwarf2_add_field): Adjust.
3586         (dwarf2_add_member_fn): Adjust.
3587         (read_structure_type): Adjust.
3588         (process_structure_scope): Adjust.
3589         (read_enumeration_type): Adjust.
3590         (read_array_type): Adjust.
3591         (mark_common_block_symbol_computed): Adjust.
3592         (read_common_block): Adjust.
3593         (read_namespace_type): Adjust.
3594         (read_namespace): Adjust.
3595         (read_module_type): Adjust.
3596         (read_tag_pointer_type): Adjust.
3597         (read_tag_ptr_to_member_type): Adjust.
3598         (read_tag_string_type): Adjust.
3599         (read_subroutine_type): Adjust.
3600         (read_typedef): Adjust.
3601         (read_base_type): Adjust.
3602         (attr_to_dynamic_prop): Adjust.
3603         (read_subrange_type): Adjust.
3604         (read_unspecified_type): Adjust.
3605         (dwarf2_read_abbrevs): Adjust.
3606         (load_partial_dies): Adjust.
3607         (read_partial_die): Adjust.
3608         (find_partial_die): Adjust.
3609         (guess_partial_die_structure_name): Adjust.
3610         (fixup_partial_die): Adjust.
3611         (read_attribute_value): Adjust.
3612         (read_addr_index): Adjust.
3613         (read_addr_index_from_leb128): Adjust.
3614         (read_str_index): Adjust.
3615         (dwarf2_string_attr): Adjust.
3616         (get_debug_line_section): Adjust.
3617         (dwarf_decode_line_header): Adjust.
3618         (lnp_state_machine::check_line_address): Adjust.
3619         (dwarf_decode_lines_1): Adjust.
3620         (dwarf_decode_lines): Adjust.
3621         (dwarf2_start_symtab): Adjust.
3622         (var_decode_location): Adjust.
3623         (new_symbol_full): Adjust.
3624         (dwarf2_const_value_data): Adjust.
3625         (dwarf2_const_value_attr): Adjust.
3626         (dwarf2_const_value): Adjust.
3627         (die_type): Adjust.
3628         (die_containing_type): Adjust.
3629         (build_error_marker_type): Adjust.
3630         (lookup_die_type): Adjust.
3631         (guess_full_die_structure_name): Adjust.
3632         (anonymous_struct_prefix): Adjust.
3633         (determine_prefix): Adjust.
3634         (dwarf2_name): Adjust.
3635         (follow_die_ref_or_sig): Adjust.
3636         (follow_die_offset): Adjust.
3637         (follow_die_ref): Adjust.
3638         (follow_die_sig_1): Adjust.
3639         (follow_die_sig): Adjust.
3640         (get_signatured_type): Adjust.
3641         (get_DW_AT_signature_type): Adjust.
3642         (decode_locdesc): Adjust.
3643         (dwarf_decode_macros): Adjust.
3644         (cu_debug_loc_section): Adjust.
3645         (fill_in_loclist_baton): Adjust.
3646         (dwarf2_symbol_mark_computed): Adjust.
3647         (init_one_comp_unit): Don't assign
3648         dwarf2_cu::dwarf2_per_objfile.
3649         (set_die_type): Adjust.
3650
3651 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
3652
3653         * dwarf2read.c (struct mapped_debug_names): Add constructor.
3654         <dwarf2_per_objfile>: New field.
3655         (dwarf2_per_objfile): Remove global.
3656         (get_dwarf2_per_objfile): New function.
3657         (set_dwarf2_per_objfile): New function.
3658         (dwarf2_build_psymtabs_hard): Change objfile parameter to
3659         dwarf2_per_objfile.
3660         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3661         (read_abbrev_offset): Likewise.
3662         (read_indirect_string): Likewise.
3663         (read_indirect_line_string): Likewise.
3664         (read_indirect_string_at_offset): Likewise.
3665         (read_indirect_string_from_dwz): Likewise.
3666         (dwarf2_find_containing_comp_unit): Change objfile parameter to
3667         dwarf2_per_objfile.
3668         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3669         (create_all_comp_units): Change objfile parameter to
3670         dwarf2_per_objfile.
3671         (create_all_type_units): Likewise.
3672         (process_queue): Add dwarf2_per_objfile parameter.
3673         (read_and_check_comp_unit_head): Likewise.
3674         (lookup_dwo_unit_in_dwp): Likewise.
3675         (get_dwp_file): Likewise.
3676         (process_cu_includes): Likewise.
3677         (struct free_dwo_file_cleanup_data): New struct.
3678         (dwarf2_has_info): Use get_dwarf2_per_objfile and
3679         set_dwarf2_per_objfile.
3680         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
3681         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
3682         context, adjust calls.
3683         (dw2_instantiate_symtab): Likewise.
3684         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
3685         (dw2_get_cu): Likewise.
3686         (create_cu_from_index_list): Change objfile parameter to
3687         dwarf2_per_objfile.
3688         (create_cus_from_index_list): Get dwarf2_per_objfile from
3689         context, adjust calls.
3690         (create_cus_from_index): Likewise.
3691         (create_signatured_type_table_from_index): Change objfile
3692         parameter to dwarf2_per_objfile.
3693         (create_signatured_type_table_from_debug_names): Change objfile
3694         parameter to dwarf2_per_objfile.
3695         (create_addrmap_from_index): Likewise.
3696         (create_addrmap_from_aranges): Likewise.
3697         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
3698         (dw2_setup): Remove.
3699         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
3700         context.
3701         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
3702         get_dwarf2_per_objfile.
3703         (dw2_forget_cached_source_info): Likewise.
3704         (dw2_map_symtabs_matching_filename): Likewise.
3705         (struct dw2_symtab_iterator) <index>: Remove.
3706         <dwarf2_per_objfile>: New field.
3707         (dw2_symtab_iter_init): Replace index parameter with
3708         dwarf2_per_objfile.
3709         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
3710         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
3711         (dw2_print_stats): Likewise.
3712         (dw2_dump): Likewise.
3713         (dw2_expand_symtabs_for_function): Likewise.
3714         (dw2_expand_all_symtabs): Likewise.
3715         (dw2_expand_symtabs_with_fullname): Likewise.
3716         (dw2_expand_marked_cus): Replace index and objfile parameters
3717         with dwarf2_per_objfile.
3718         (dw_expand_symtabs_matching_file_matcher): Add
3719         dwarf2_per_objfile parameter and adjust calls.
3720         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
3721         adjust calls.
3722         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
3723         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
3724         adjust calls.
3725         (create_cus_from_debug_names_list): Replace objfile parameter
3726         with dwarf2_per_objfile and adjust calls.
3727         (create_cus_from_debug_names): Likewise.
3728         (dwarf2_read_debug_names): Likewise.
3729         (mapped_debug_names::namei_to_name): Adjust call.
3730         (dw2_debug_names_iterator::next): Likewise.
3731         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
3732         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
3733         (dw2_debug_names_dump): Likewise.
3734         (dw2_debug_names_expand_symtabs_for_function): Likewise.
3735         (dw2_debug_names_expand_symtabs_matching): Likewise.
3736         (dwarf2_initialize_objfile): Likewise.
3737         (dwarf2_build_psymtabs): Likewise.
3738         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
3739         this_cu.
3740         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
3741         (read_and_check_comp_unit_head): Likewise.
3742         (read_abbrev_offset): Likewise.
3743         (create_debug_type_hash_table): Likewise.
3744         (create_debug_types_hash_table): Likewise.
3745         (create_all_type_units): Replace objfile parameter with
3746         dwarf2_per_objfile.
3747         (add_type_unit): Add dwarf2_per_objfile parameter.
3748         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
3749         with dwarf2_per_objfile.
3750         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
3751         (lookup_dwp_signatured_type): Likewise.
3752         (lookup_signatured_type): Likewise.
3753         (read_cutu_die_from_dwo): Likewise.
3754         (init_tu_and_read_dwo_dies): Likewise.
3755         (init_cutu_and_read_dies): Likewise.
3756         (init_cutu_and_read_dies_no_follow): Likewise.
3757         (allocate_type_unit_groups_table): Add objfile parameter.
3758         (create_type_unit_group): Use dwarf2_per_objfile from cu.
3759         (get_type_unit_group): Likewise.
3760         (process_psymtab_comp_unit): Update call.
3761         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
3762         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
3763         (print_tu_stats): Likewise.
3764         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
3765         in void* parameter.
3766         (build_type_psymtabs): Change objfile parameter to
3767         dwarf2_per_objfile.
3768         (process_skeletonless_type_unit): Use dwarf2_per_objfile
3769         passed in void* parameter.
3770         (process_skeletonless_type_units): Change objfile parameter to
3771         dwarf2_per_objfile.
3772         (set_partial_user): Likewise.
3773         (dwarf2_build_psymtabs_hard): Likewise.
3774         (read_comp_units_from_section): Likewise.
3775         (create_all_comp_units): Likewise.
3776         (scan_partial_symbols): Update calls.
3777         (add_partial_symbol): Likewise.
3778         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
3779         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
3780         (process_queue): Add dwarf2_per_objfile parameter.
3781         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
3782         (compute_compunit_symtab_includes): Likewise.
3783         (process_cu_includes): Add dwarf2_per_objfile parameter.
3784         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
3785         (process_full_type_unit): Likewise.
3786         (process_imported_unit_die): Update call.
3787         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
3788         (read_file_scope): Likewise.
3789         (allocate_dwo_file_hash_table): Add objfile parameter.
3790         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
3791         (create_cus_hash_table): Likewise.
3792         (create_dwp_hash_table): Likewise.
3793         (create_dwo_unit_in_dwp_v1): Likewise.
3794         (create_dwp_v2_section): Likewise.
3795         (create_dwo_unit_in_dwp_v2): Likewise.
3796         (lookup_dwo_unit_in_dwp): Likewise.
3797         (try_open_dwop_file): Likewise.
3798         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
3799         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
3800         cleanup to include a reference to dwarf2_per_objfile.
3801         (open_dwp_file): Add dwarf2_per_objfile parameter.
3802         (open_and_init_dwp_file): Likewise.
3803         (get_dwp_file): Likewise.
3804         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
3805         (queue_and_load_all_dwo_tus): Update call.
3806         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
3807         data.
3808         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
3809         (dwarf2_ranges_process): Likewise.
3810         (dwarf2_get_pc_bounds): Likewise.
3811         (mark_common_block_symbol_computed): Likewise.
3812         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3813         (dwarf2_read_abbrevs): Update call.
3814         (read_partial_die): Use dwarf2_per_objfile from cu.
3815         (find_partial_die): Likewise.
3816         (fixup_partial_die): Likewise.
3817         (read_attribute_value): Likewise.
3818         (read_indirect_string_at_offset_from): Add objfile parameter.
3819         (read_indirect_string_at_offset): Add dwarf2_per_objfile
3820         parameter.
3821         (read_indirect_string_from_dwz): Add objfile parameter.
3822         (read_indirect_string): Add objfile parameter.
3823         (read_addr_index_1): Add dwarf2_per_objfile parameter.
3824         (read_addr_index): Use dwarf2_per_objfile from cu.
3825         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
3826         call dw2_setup.
3827         (read_str_index): Use dwarf2_per_objfile from cu.
3828         (get_debug_line_section): Likewise.
3829         (read_formatted_entries): Add dwarf2_per_objfile parameter.
3830         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
3831         (new_symbol_full): Use dwarf2_per_objfile from cu.
3832         (build_error_marker_type): Likewise.
3833         (lookup_die_type): Likewise.
3834         (determine_prefix): Likewise.
3835         (follow_die_offset): Likewise.
3836         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
3837         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
3838         (dwarf2_fetch_die_type_sect_off): Likewise.
3839         (dwarf2_get_die_type): Likewise.
3840         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
3841         (get_signatured_type): Likewise.
3842         (get_DW_AT_signature_type): Likewise.
3843         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
3844         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
3845         (cu_debug_loc_section): Likewise.
3846         (fill_in_loclist_baton): Likewise.
3847         (dwarf2_symbol_mark_computed): Likewise.
3848         (dwarf2_find_containing_comp_unit): Change objfile parameter to
3849         dwarf2_per_objfile.
3850         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
3851         parameter.
3852         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3853         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
3854         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
3855         (set_die_type): Use dwarf2_free_objfile from cu.
3856         (get_die_type_at_offset): Likewise.
3857         (dwarf2_per_objfile_free): Don't assign global variable.
3858         (debug_names) <constructor>: Add dwarf2_per_objfile
3859         parameter, update m_debugstrlookup construction.
3860         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
3861         parameter.
3862         <m_dwarf2_per_objfile>: New field.
3863         <lookup>: Use m_dwarf2_per_objfile.
3864         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
3865         (psyms_seen_size): Likewise.
3866         (write_gdbindex): Replace objfile parameter with
3867         dwarf2_per_objfile.
3868         (write_debug_names): Likewise.
3869         (write_psymtabs_to_index): Likewise.
3870         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
3871         calls.
3872
3873 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
3874
3875         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
3876         <dwarf2_per_objfile>: New field.
3877         (struct dwarf2_per_cu_data) <objfile>: Remove.
3878         <dwarf2_per_objfile>: New field.
3879         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
3880         of objfile.
3881         (create_signatured_type_table_from_index): Likewise.
3882         (create_debug_type_hash_table): Likewise.
3883         (fill_in_sig_entry_from_dwo_entry): Likewise.
3884         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
3885         (create_type_unit_group): Assign dwarf2_per_objfile instead of
3886         objfile.
3887         (create_partial_symtab): Access objfile through
3888         dwarf2_per_objfile.
3889         (process_psymtab_comp_unit_reader): Likewise.
3890         (read_comp_units_from_section): Likewise.
3891         (scan_partial_symbols): Likewise.
3892         (add_partial_symbol): Likewise.
3893         (add_partial_subprogram): Likewise.
3894         (peek_die_abbrev): Likewise.
3895         (fixup_go_packaging): Likewise.
3896         (process_full_comp_unit): Likewise.
3897         (process_full_type_unit): Likewise.
3898         (process_imported_unit_die): Likewise.
3899         (dwarf2_compute_name): Likewise.
3900         (dwarf2_physname): Likewise.
3901         (read_import_statement): Likewise.
3902         (create_cus_hash_table): Assign dwarf2_physname instead of
3903         objfile.
3904         (read_func_scope): Access objfile through dwarf2_per_objfile.
3905         (read_lexical_block_scope): Likewise.
3906         (read_call_site_scope): Likewise.
3907         (read_variable): Likewise.
3908         (dwarf2_rnglists_process): Likewise.
3909         (dwarf2_ranges_process): Likewise.
3910         (dwarf2_ranges_read): Likewise.
3911         (dwarf2_record_block_ranges): Likewise.
3912         (dwarf2_add_field): Likewise.
3913         (dwarf2_add_member_fn): Likewise.
3914         (read_structure_type): Likewise.
3915         (process_structure_scope): Likewise.
3916         (read_enumeration_type): Likewise.
3917         (read_array_type): Likewise.
3918         (read_common_block): Likewise.
3919         (read_namespace_type): Likewise.
3920         (read_namespace): Likewise.
3921         (read_module_type): Likewise.
3922         (read_tag_pointer_type): Likewise.
3923         (read_tag_ptr_to_member_type): Likewise.
3924         (read_tag_string_type): Likewise.
3925         (read_subroutine_type): Likewise.
3926         (read_typedef): Likewise.
3927         (read_base_type): Likewise.
3928         (attr_to_dynamic_prop): Likewise.
3929         (read_subrange_type): Likewise.
3930         (read_unspecified_type): Likewise.
3931         (load_partial_dies): Likewise.
3932         (read_partial_die): Likewise.
3933         (find_partial_die): Likewise.
3934         (guess_partial_die_structure_name): Likewise.
3935         (fixup_partial_die): Likewise.
3936         (read_attribute_value): Likewise.
3937         (read_addr_index_from_leb128): Likewise.
3938         (dwarf2_read_addr_index): Likewise.
3939         (dwarf2_string_attr): Likewise.
3940         (lnp_state_machine::check_line_address): Likewise.
3941         (dwarf_decode_lines_1): Likewise.
3942         (dwarf_decode_lines): Likewise.
3943         (dwarf2_start_symtab): Likewise.
3944         (var_decode_location): Likewise.
3945         (new_symbol_full): Likewise.
3946         (dwarf2_const_value_data): Likewise.
3947         (dwarf2_const_value_attr): Likewise.
3948         (dwarf2_const_value): Likewise.
3949         (die_type): Likewise.
3950         (die_containing_type): Likewise.
3951         (lookup_die_type): Likewise.
3952         (guess_full_die_structure_name): Likewise.
3953         (anonymous_struct_prefix): Likewise.
3954         (dwarf2_name): Likewise.
3955         (follow_die_ref_or_sig): Likewise.
3956         (follow_die_offset): Likewise.
3957         (follow_die_ref): Likewise.
3958         (dwarf2_fetch_die_loc_sect_off): Likewise.
3959         (dwarf2_fetch_constant_bytes): Likewise.
3960         (dwarf2_fetch_die_type_sect_off): Likewise.
3961         (dwarf2_get_die_type): Likewise.
3962         (follow_die_sig): Likewise.
3963         (decode_locdesc): Likewise.
3964         (dwarf2_per_cu_objfile): Likewise.
3965         (dwarf2_per_cu_text_offset): Likewise.
3966         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
3967         objfile.
3968         (set_die_type): Access objfile through
3969         dwarf2_per_objfile.
3970
3971 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
3972
3973         * valprint.c (converted_character_d): Remove typedef.
3974         (DEF_VEC_O (converted_character_d)): Remove.
3975         (count_next_character): Use std::vector.
3976         (print_converted_chars_to_obstack): Likewise.
3977         (generic_printstr): Likewise.
3978
3979 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
3980
3981         * xml-support.h (struct gdb_xml_value): Add constructor.
3982         <value>: Change type to unique_xmalloc_ptr.
3983         (gdb_xml_value_s): Remove typedef.
3984         (DEF_VEC_O (gdb_xml_value_s)): Remove.
3985         (gdb_xml_element_start_handler): Change parameter type to
3986         std::vector.
3987         (xml_find_attribute): Likewise.
3988         * xml-support.c (xml_find_attribute): Change parameter type to
3989         std::vector and adjust.
3990         (gdb_xml_values_cleanup): Remove.
3991         (gdb_xml_parser::start_element): Adjust to std::vector.
3992         (xinclude_start_include): Change paraeter type to std::vector
3993         and adjust.
3994         * btrace.c (check_xml_btrace_version): Likewise.
3995         (parse_xml_btrace_block): Likewise.
3996         (parse_xml_btrace_pt_config_cpu): Likewise.
3997         (parse_xml_btrace_pt): Likewise.
3998         (parse_xml_btrace_conf_bts): Likewise.
3999         (parse_xml_btrace_conf_pt): Likewise.
4000         * memory-map.c (memory_map_start_memory): Likewise.
4001         (memory_map_start_property): Likewise.
4002         * osdata.c (osdata_start_osdata): Likewise.
4003         (osdata_start_item): Likewise.
4004         (osdata_start_column): Likewise.
4005         * remote.c (start_thread): Likewise.
4006         * solib-aix.c (library_list_start_library): Likewise.
4007         (library_list_start_list): Likewise.
4008         * solib-svr4.c (library_list_start_library): Likewise.
4009         (svr4_library_list_start_list): Likewise.
4010         * solib-target.c (library_list_start_segment): Likewise.
4011         (library_list_start_section): Likewise.
4012         (library_list_start_library): Likewise.
4013         (library_list_start_list): Likewise.
4014         * tracepoint.c (traceframe_info_start_memory): Likewise.
4015         (traceframe_info_start_tvar): Likewise.
4016         * xml-syscall.c (syscall_start_syscall): Likewise.
4017         * xml-tdesc.c (tdesc_start_target): Likewise.
4018         (tdesc_start_feature): Likewise.
4019         (tdesc_start_reg): Likewise.
4020         (tdesc_start_union): Likewise.
4021         (tdesc_start_struct): Likewise.
4022         (tdesc_start_flags): Likewise.
4023         (tdesc_start_enum): Likewise.
4024         (tdesc_start_field): Likewise.
4025         (tdesc_start_enum_value): Likewise.
4026         (tdesc_start_vector): Likewise.
4027
4028 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
4029
4030         * extension.h (struct xmethod_worker) <clone>: Remove.
4031         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
4032         Remove.
4033         (python_xmethod_worker::clone): Remove.
4034         * valops.c (find_overload_match): Use std::move instead of
4035         clone.
4036
4037 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
4038
4039         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
4040         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
4041         <free_xmethod_worker_data>: Remove.
4042         <get_matching_xmethod_workers>: Chance VEC to std::vector.
4043         <get_xmethod_arg_types>: Remove.
4044         <get_xmethod_result_type>: Remove.
4045         <invoke_xmethod>: Remove.
4046         * extension.c (new_xmethod_worker): Remove.
4047         (clone_xmethod_worker): Remove.
4048         (get_matching_xmethod_workers): Return void, pass std::vector by
4049         pointer.
4050         (get_xmethod_arg_types): Rename to...
4051         (xmethod_worker::get_arg_types): ... this, and adjust.
4052         (get_xmethod_result_type): Rename to...
4053         (xmethod_worker::get_result_type): ... this, and adjust.
4054         (invoke_xmethod): Remove.
4055         (free_xmethod_worker): Remove.
4056         (free_xmethod_worker_vec): Remove.
4057         * extension.h (enum ext_lang_rc): Move here from
4058         extension-priv.h.
4059         (struct xmethod_worker): Add constructor and destructor.
4060         <data>: Remove.
4061         <value>: Remove.
4062         <invoke, clone, do_get_result_type, do_get_arg_types>: New
4063         virtual pure methods.
4064         <get_arg_types, get_result_type>: New methods.
4065         (xmethod_worker_ptr): Remove typedef.
4066         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
4067         (xmethod_worker_vec): Remove typedef.
4068         (xmethod_worker_up): New typedef.
4069         (invoke_xmethod): Remove.
4070         (clone_xmethod_worker): Remove.
4071         (free_xmethod_worker): Remove.
4072         (free_xmethod_worker_vec): Remove.
4073         (get_xmethod_arg_types): Remove.
4074         (get_xmethod_result_type): Remove.
4075         * valops.c (find_method_list): Use std::vector, don't use
4076         intermediate vector.
4077         (value_find_oload_method_list): Use std::vector.
4078         (find_overload_match): Use std::vector.
4079         (find_oload_champ): Use std::vector.
4080         * value.c (value_free): Use operator delete.
4081         (value_of_xmethod): Rename to...
4082         (value_from_xmethod): ... this.  Don't assign
4083         xmethod_worker::value, take rvalue-reference.
4084         (result_type_of_xmethod): Adjust.
4085         (call_xmethod): Adjust.
4086         * value.h: Include extension.h.
4087         (struct xmethod_worker): Don't forward-declare.
4088         (value_of_xmethod): Rename to...
4089         (value_from_xmethod): ... this, take rvalue-reference.
4090         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
4091         (struct python_xmethod_worker): ... this, add constructor and
4092         destructor.
4093         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
4094         (gdbpy_free_xmethod_worker_data): Rename to...
4095         (python_xmethod_worker::~python_xmethod_worker): ... this and
4096         adjust.
4097         (gdbpy_clone_xmethod_worker_data): Rename to...
4098         (python_xmethod_worker::clone): ... this and adjust.
4099         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
4100         temporary vector.
4101         (gdbpy_get_xmethod_arg_types): Rename to...
4102         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
4103         (gdbpy_get_xmethod_result_type): Rename to...
4104         (python_xmethod_worker::do_get_result_type): ... this and
4105         adjust.
4106         (gdbpy_invoke_xmethod): Rename to...
4107         (python_xmethod_worker::invoke): ... this and adjust.
4108         (new_python_xmethod_worker): Rename to...
4109         (python_xmethod_worker::python_xmethod_worker): ... this and
4110         adjust.
4111         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
4112         Remove.
4113         (gdbpy_free_xmethod_worker_data): Remove.
4114         (gdbpy_get_matching_xmethod_workers): Use std::vector.
4115         (gdbpy_get_xmethod_arg_types): Remove.
4116         (gdbpy_get_xmethod_result_type): Remove.
4117         (gdbpy_invoke_xmethod): Remove.
4118         * python/python.c (python_extension_ops): Remove obsolete
4119         callbacks.
4120
4121 2018-01-05  Pedro Alves  <palves@redhat.com>
4122
4123         PR gdb/18653
4124         * common/signals-state-save-restore.c
4125         (save_original_signals_state): New parameter 'quiet'.  Warn if we
4126         find a custom handler preinstalled, instead of internal erroring.
4127         But only warn if !quiet.
4128         * common/signals-state-save-restore.h
4129         (save_original_signals_state): New parameter 'quiet'.
4130         * main.c (captured_main_1): Move save_original_signals_state call
4131         after option handling, and pass QUIET.
4132
4133 2018-01-05  Pedro Alves  <palves@redhat.com>
4134
4135         * spu-tdep.c (spu_catch_start): Pass
4136         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
4137
4138 2018-01-05  Pedro Alves  <palves@redhat.com>
4139
4140         PR gdb/22670
4141         * ada-lang.c (literal_symbol_name_matcher): New function.
4142         (ada_get_symbol_name_matcher): Use it for
4143         symbol_name_match_type::SEARCH_NAME.
4144         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
4145         it down instead of assuming symbol_name_match_type::FULL.
4146         * block.h (block_lookup_symbol): New parameter 'match_type'.
4147         * c-valprint.c (print_unpacked_pointer): Use
4148         lookup_symbol_search_name instead of lookup_symbol.
4149         * compile/compile-object-load.c (get_out_value_type): Pass down
4150         symbol_name_match_type::SEARCH_NAME.
4151         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
4152         symbol_name_match_type::FULL.
4153         * cp-support.c (cp_get_symbol_name_matcher): Handle
4154         symbol_name_match_type::SEARCH_NAME.
4155         * infrun.c (insert_exception_resume_breakpoint): Use
4156         lookup_symbol_search_name.
4157         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
4158         * psymtab.c (maintenance_check_psymtabs): Use
4159         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
4160         * stack.c (print_frame_args): Use lookup_symbol_search_name and
4161         SYMBOL_SEARCH_NAME.
4162         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
4163         if symbol_name_match_type::SEARCH_NAME.
4164         (lookup_symbol_in_language): Pass down
4165         symbol_name_match_type::FULL.
4166         (lookup_symbol_search_name): New.
4167         (lookup_language_this): Pass down
4168         symbol_name_match_type::SEARCH_NAME.
4169         (lookup_symbol_aux, lookup_local_symbol): New parameter
4170         'match_type'.  Pass it down.
4171         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
4172         (lookup_symbol_search_name): New declaration.
4173         (lookup_symbol_in_block): New 'match_type' parameter.
4174
4175 2018-01-05  Pedro Alves  <palves@redhat.com>
4176
4177         PR gdb/22670
4178         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
4179         ada_lookup_symbol.
4180         (ada_lookup_symbol): Reimplement in terms of
4181         ada_lookup_symbol_list, bits factored out from
4182         ada_lookup_encoded_symbol.
4183
4184 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
4185
4186         * ada-exp.y (write_object_renaming): When subscripting an array
4187         using a symbol as the index, pass the block in call to
4188         ada_lookup_encoded_symbol when looking that symbol up.
4189
4190 2018-01-05  Jerome Guitton  <guitton@adacore.com>
4191
4192         * ada-lang.c (ada_array_length): Use ada_index_type instead of
4193         TYPE_INDEX_TYPE.
4194
4195 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
4196
4197         * ada-lang.c (ada_to_fixed_value_create): Add handling of
4198         the case where VALUE_LVAL (val0) is not lval_memory.
4199
4200 2018-01-05  Xavier Roirand  <roirand@adacore.com>
4201
4202         * ada-valprint.c (print_optional_low_bound): Handle
4203         character-indexed array printing like boolean-indexed array
4204         printing.
4205
4206 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
4207
4208         * NEWS: Create a new section for the next release branch.
4209         Rename the section of the current branch, now that it has
4210         been cut.
4211
4212 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
4213
4214         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
4215         * version.in: Bump version to 8.1.50.DATE-git.
4216
4217 2018-01-03  Xavier Roirand  <roirand@adacore.com>
4218
4219         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
4220         Add field.
4221         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
4222         Add field.
4223         (default_exception_support_info) <catch_handlers_sym>: Add field.
4224         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
4225         (ada_exception_name_addr_1): Add "catch handlers" handling.
4226         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
4227         Update all callers.
4228         (create_excep_cond_exprs) <ex>: Add parameter.
4229         (re_set_exception): Update create_excep_cond_exprs call.
4230         (print_it_exception, print_one_exception, print_mention_exception)
4231         (print_recreate_exception): Add "catch handler" handling.
4232         (allocate_location_catch_handlers, re_set_catch_handlers)
4233         (check_status_catch_handlers, print_it_catch_handlers)
4234         (print_one_catch_handlers, print_mention_catch_handlers)
4235         (print_recreate_catch_handlers): New function.
4236         (catch_handlers_breakpoint_ops): New variable.
4237         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
4238         Add parameter.  Add "catch handler" handling.
4239         (ada_exception_sym_name, ada_exception_breakpoint_ops):
4240         Add "catch handler" handling.
4241         (ada_exception_catchpoint_cond_string): Add "catch handler"
4242         handling.
4243         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
4244         call.
4245         (catch_ada_handlers_command): New function.
4246         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
4247         operations structure.
4248         (_initialize_ada_language): Add "catch handlers" command entry.
4249         * NEWS: Document "catch handlers" feature.
4250
4251 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
4252
4253         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
4254         account when creating the array type of the slice.
4255         (ada_value_slice): Likewise.
4256
4257 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
4258
4259         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
4260         New enum value.
4261         (create_array_type_with_stride): Add byte_stride_prop parameter.
4262         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
4263         New parameter.  Update all callers in this file.
4264         (array_type_has_dynamic_stride): New function.
4265         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
4266         of arrays with dynamic byte strides.
4267         * dwarf2read.c (read_array_type): Add support for dynamic
4268         DW_AT_byte_stride attributes.
4269
4270 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
4271
4272         * dwarf2read.c (read_unspecified_type): Treat
4273         DW_TAG_enumeration_type DIEs from Ada units as stubs.
4274
4275 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
4276
4277         Update copyright year range in all GDB files.
4278
4279 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
4280
4281         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
4282         and gdb/testsuite/gdb.base/step-line.c.
4283
4284 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
4285
4286         * copyright.py (main): Dump the contents of
4287         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4288         even if BY_HAND is empty.
4289
4290 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
4291
4292         * top.c (print_gdb_version): Update Copyright year in version
4293         message.
4294
4295 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
4296
4297         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
4298
4299 For older changes see ChangeLog-2017.
4300 \f
4301 Local Variables:
4302 mode: change-log
4303 left-margin: 8
4304 fill-column: 74
4305 version-control: never
4306 coding: utf-8
4307 End: