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