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