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