793c99156b54a23bce7cbea286b6cc739cec1af3
[external/binutils.git] / gdb / ChangeLog
1 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
2             Tim Newsome <tim@sifive.com>
3             Albert Ou <a0u@eecs.berkeley.edu>
4             Darius Rad <darius@bluespec.com>
5
6         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8         (ALLDEPFILES): Add riscv-tdep.c
9         * configure.tgt: Add riscv support.
10         * riscv-tdep.c: New file.
11         * riscv-tdep.h: New file.
12         * NEWS: Mention new target.
13         * MAINTAINERS: Add entry for riscv.
14
15 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
16
17         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
18         fields within aggregates.
19
20 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
21
22         * record-btrace.c (btrace_print_lines): Change type of flags to
23         gdb_disassembly_flags.
24
25 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
26
27         * fbsd-nat.c: Include "inf-ptrace.h".
28         (USE_SIGTRAP_SIGINFO): Conditionally define.
29         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
30         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
31         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
32         function.
33         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
34         Likewise.
35         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
36         Likewise.
37         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
38         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
39         "supports_stopped_by_hw_breakpoint" target methods.
40
41 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
42
43         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
44         * fbsd-nat.c (debug_fbsd_nat): New variable.
45         (show_fbsd_nat_debug): New function.
46         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
47         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
48
49 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
50
51         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
52         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
53         prototype.
54         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
55         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
56         method.
57
58 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
59
60         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
61         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
62
63 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
64
65         * charset.c (struct charset_vector): New.
66         (charsets): Change type to charset_vector.
67         (find_charset_names): Adjust.
68         (add_one): Adjust.
69         (_initialize_charset): Adjust.
70
71 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
72
73         * progspace.h (struct program_space) <deleted_solibs>: Change
74         type to std::vector<std::string>.
75         * progspace.c (clear_program_space_solib_cache): Adjust.
76         * breakpoint.c (print_solib_event): Adjust.
77         (check_status_catch_solib): Adjust.
78         * solib.c (update_solib_list): Adjust.
79         * ui-out.h (class ui_out) <field_string>: New overload.
80         * ui-out.c (ui_out::field_string): New overload.
81
82 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
83
84         * progspace.h (struct program_space): Add constructor and
85         destructor, initialize fields.
86         (add_program_space): Remove.
87         * progspace.c (add_program_space): Rename to...
88         (program_space::program_space): ... this.
89         (release_program_space): Rename to...
90         (program_space::~program_space): ... this.
91         (delete_program_space): Use delete to delete program_space.
92         (initialize_progspace): Use new to allocate program_space.
93         * inferior.c (add_inferior_with_spaces): Likewise.
94         (clone_inferior_command): Likewise.
95         * infrun.c (follow_fork_inferior): Likewise.
96         (handle_vfork_child_exec_or_exit): Likewise.
97
98 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
99
100         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
101         (delim_string_to_char_ptr_vec): Return std::vector of
102         gdb::unique_xmalloc_ptr.
103         (dirnames_to_char_ptr_vec_append): Take std::vector of
104         gdb::unique_xmalloc_ptr.
105         (dirnames_to_char_ptr_vec): Return std::vector of
106         gdb::unique_xmalloc_ptr.
107         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
108         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
109         (delim_string_to_char_ptr_vec): Return an std::vector of
110         gdb::unique_xmalloc_ptr, adjust the code.
111         (dirnames_to_char_ptr_vec_append): Take an std::vector of
112         gdb::unique_xmalloc_ptr, adjust the code.
113         (dirnames_to_char_ptr_vec): Return an std::vector of
114         gdb::unique_xmalloc_ptr, adjust the code.
115         * auto-load.c (auto_load_safe_path_vec): Change type to
116         std::vector of gdb::unique_xmalloc_ptr.
117         (auto_load_expand_dir_vars): Return an std::vector of
118         gdb::unique_xmalloc_ptr, adjust the code.
119         (auto_load_safe_path_vec_update): Adjust.
120         (filename_is_in_auto_load_safe_path_vec): Adjust.
121         (auto_load_objfile_script_1): Adjust.
122         * build-id.c (build_id_to_debug_bfd): Adjust.
123         * linux-thread-db.c (thread_db_load_search): Adjust.
124         * source.c (add_path): Adjust.
125         (openp): Adjust.
126         * symfile.c (find_separate_debug_file): Adjust.
127         * utils.c (do_free_char_ptr_vec): Remove.
128         (make_cleanup_free_char_ptr_vec): Remove.
129
130 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
131
132         PR gdb/22907
133         * common/pathstuff.c: Conditionally include "<windows.h>".
134
135 2018-03-01  Georg Sauthoff  <mail@georg.so>
136
137         PR gdb/22888
138         * gcore.in: Quote variables and switch interpreter to bash.
139
140 2018-03-01  Tom Tromey  <tom@tromey.com>
141
142         * dwarf2read.c (alloc_discriminant_info): Fix default_index
143         assertion.  Add assertion for discriminant_index.
144         (quirk_rust_enum): Use correct base type name in univariant case.
145
146 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
147
148         * record.c (get_call_history_modifiers): Return a
149         record_print_flags.
150         (cmd_record_call_history): Adjust.
151         * record-btrace.c (record_btrace_call_history): Adjust.
152         (record_btrace_call_history_range): Adjust.
153         (record_btrace_call_history_from): Adjust.
154         * target-debug.h (target_debug_print_record_print_flags): New.
155         * target-delegates.c: Re-generate.
156         * target.c (target_call_history): Change flags type.
157         (target_call_history_from): Likewise.
158         (target_call_history_range): Likewise.
159         * target.h (struct target_ops) <target_call_history>: Likewise.
160         (target_call_history_from): Likewise.
161         (target_call_history_range): Likewise.
162
163 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
164             Simon Marchi  <simon.marchi@polymtl.ca>
165
166         * common/common-utils.c: Include "sys/stat.h".
167         (is_regular_file): Move here from "source.c"; change return
168         type to "bool".
169         * common/common-utils.h (is_regular_file): New prototype.
170         * common/pathstuff.c (contains_dir_separator): New function.
171         * common/pathstuff.h (contains_dir_separator): New prototype.
172         * source.c: Don't include "sys/stat.h".
173         (is_regular_file): Move to "common/common-utils.c".
174
175 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
176
177         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
178         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
179         * auto-load.c: Include "common/pathstuff.h".
180         * common/common-def.h (current_directory): Move here.
181         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
182         function.
183         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
184         prototype.
185         * common/pathstuff.c: New file.
186         * common/pathstuff.h: New file.
187         * compile/compile.c: Include "common/pathstuff.h".
188         * defs.h (current_directory): Move to "common/common-defs.h".
189         * dwarf2read.c: Include "common/pathstuff.h".
190         * exec.c: Likewise.
191         * guile/scm-safe-call.c: Likewise.
192         * linux-thread-db.c: Likewise.
193         * main.c: Likewise.
194         * nto-tdep.c: Likewise.
195         * objfiles.c: Likewise.
196         * source.c: Likewise.
197         * symtab.c: Likewise.
198         * utils.c: Include "common/pathstuff.h".
199         (gdb_realpath): Move to "common/pathstuff.c".
200         (gdb_realpath_keepfile): Likewise.
201         (gdb_abspath): Likewise.
202         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
203         (gdb_realpath_keepfile): Likewise.
204         (gdb_abspath): Likewise.
205
206 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
207
208         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
209         wildcard process pid for super_resume for kernels with a
210         specific bug.
211
212 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
213
214         * compile/compile.c (get_args): Add additional comments
215         explaining function.
216
217 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
218             Tom Tromey  <tom@tromey.com>
219
220         * target.h (memory_write_request_s): Remove typedef.  Don't define
221         VEC.
222         (target_write_memory_blocks): Change argument to std::vector.
223         (struct memory_write_request): Add constructor.
224         * target-memory.c (compare_block_starting_address): Return bool.
225         Change argument types.
226         (claim_memory): Change arguments to use std::vector.
227         (split_regular_and_flash_blocks, blocks_to_erase)
228         (compute_garbled_blocks): Likewise.
229         (cleanup_request_data, cleanup_write_requests_vector): Remove.
230         (target_write_memory_blocks): Change argument to std::vector.
231         * symfile.c (struct load_section_data): Add constructor and
232         destructor.  Use std::vector for "requests".
233         (struct load_progress_data): Add initializers.
234         (load_section_callback): Update.  Use "new".
235         (clear_memory_write_data): Remove.
236         (generic_load): Update.
237
238 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
239
240         * arch/aarch64.h: Use common/tdesc.h.
241
242 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
243
244         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
245         architecture with a 64-bit ABI.
246
247 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
248
249         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
250         ahead of target description loading.
251
252 2018-02-26  Tom Tromey  <tom@tromey.com>
253
254         * stack.c (backtrace_command_1): Update.
255         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
256         of "flags".
257         * python/py-framefilter.c (py_print_frame)
258         (gdbpy_apply_frame_filter): Change type of "flags".
259         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
260         of "flags".
261         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
262         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
263         * extension.h (enum frame_filter_flag): Rename from
264         frame_filter_flags.
265         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
266         (apply_ext_lang_frame_filter): Change type of "flags".
267         * extension.c (apply_ext_lang_frame_filter): Change type of
268         "flags".
269         * extension-priv.h (struct extension_language_ops)
270         <apply_frame_filter>: Change type of "flags".
271
272 2018-02-26  Tom Tromey  <tom@tromey.com>
273
274         PR python/16497:
275         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
276         off-by-one in py_end computation.
277         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
278         PRINT_MORE_FRAMES.
279         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
280         constant.
281
282 2018-02-26  Tom Tromey  <tom@tromey.com>
283
284         * dwarf2read.c (struct variant_field): New.
285         (struct nextfield) <variant>: New field.
286         (dwarf2_add_field): Handle DW_TAG_variant_part.
287         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
288         discriminated union.
289         (read_structure_type): Handle DW_TAG_variant_part.
290         (handle_struct_member_die): New function, extracted from
291         process_structure_scope.  Handle DW_TAG_variant.
292         (process_structure_scope): Handle discriminated unions.  Call
293         handle_struct_member_die.
294
295 2018-02-26  Tom Tromey  <tom@tromey.com>
296
297         * rust-lang.h (rust_last_path_segment): Declare.
298         * rust-lang.c (rust_last_path_segment): Now public.  Change
299         contract.
300         (struct disr_info): Remove.
301         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
302         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
303         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
304         (rust_enum_p, rust_enum_variant): New function.
305         (rust_underscore_fields): Remove "offset" parameter.
306         (rust_print_enum): New function.
307         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
308         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
309         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
310         enums.
311         (rust_internal_print_type): New function, from rust_print_type.
312         Remove enum code.
313         (rust_print_type): Call rust_internal_print_type.
314         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
315         Update enum handling.
316         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
317         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
318         (rust_union_quirks): New functions.
319         (process_full_comp_unit, process_full_type_unit): Call
320         rust_union_quirks.
321         (process_structure_scope): Update rust_unions if necessary.
322
323 2018-02-26  Tom Tromey  <tom@tromey.com>
324
325         * value.h (value_union_variant): Declare.
326         * valops.c (value_union_variant): New function.
327         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
328         (struct discriminant_info): New.
329         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
330         enumerator.
331         (struct main_type) <flag_discriminated_union>: New field.
332
333 2018-02-26  Tom Tromey  <tom@tromey.com>
334
335         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
336         unittests/unpack-selftests.c.
337         * unittests/unpack-selftests.c: New file.
338         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
339
340 2018-02-26  Yao Qi  <yao.qi@linaro.org>
341
342         * dwarf2read.c (struct partial_die_info) <read>: New method.
343         (read_partial_die): Remove the declaration.
344         (load_partial_dies): Update.
345         (partial_die_info::partial_die_info):
346         (read_partial_die): Change it to partial_die_info::read.
347
348 2018-02-26  Yao Qi  <yao.qi@linaro.org>
349
350         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
351         (fixup_partial_die): Remove declaration.
352         (scan_partial_symbols): Update.
353         (partial_die_parent_scope): Likewise.
354         (partial_die_full_name): Likewise.
355         (fixup_partial_die): Change it to partial_die_info::fixup.
356
357 2018-02-26  Yao Qi  <yao.qi@linaro.org>
358
359         * dwarf2read.c (read_partial_die): Update the declaration.
360         (load_partial_dies): Caller update.
361         (read_partial_die): Remove one argument abbrev_len.
362
363 2018-02-26  Yao Qi  <yao.qi@linaro.org>
364
365         * dwarf2read.c (struct partial_die_info): Add ctor, delete
366         assignment operator.
367         (load_partial_dies): Use ctor and copy ctor.
368         (read_partial_die): Update.
369         (dwarf2_cu::find_partial_die): Use ctor.
370
371 2018-02-26  Yao Qi  <yao.qi@linaro.org>
372
373         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
374         (find_partial_die_in_comp_unit): Change it to
375         dwarf2_cu::find_partial_die.
376         (find_partial_die): Update.
377
378 2018-02-26  Yao Qi  <yao.qi@linaro.org>
379
380         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
381         is NULL.
382
383 2018-02-26  Yao Qi  <yao.qi@linaro.org>
384
385         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
386
387 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
388
389         * arch/amd64.h: Use common/tdesc.h.
390         * arch/i386.c: Likewise.
391         * arch/i386.h: Likewise.
392         * arch/tic6x.c: Likewise.
393         * arch/tdesc.h: Move file from here...
394         * common/tdesc.h: ...to here.
395         * features/aarch64-core.c: Regenerate.
396         * features/aarch64-fpu.c: Regenerate.
397         * features/i386/32bit-avx.c: Regenerate.
398         * features/i386/32bit-avx512.c: Regenerate.
399         * features/i386/32bit-core.c: Regenerate.
400         * features/i386/32bit-linux.c: Regenerate.
401         * features/i386/32bit-mpx.c: Regenerate.
402         * features/i386/32bit-pkeys.c: Regenerate.
403         * features/i386/32bit-sse.c: Regenerate.
404         * features/i386/64bit-avx.c: Regenerate.
405         * features/i386/64bit-avx512.c: Regenerate.
406         * features/i386/64bit-core.c: Regenerate.
407         * features/i386/64bit-linux.c: Regenerate.
408         * features/i386/64bit-mpx.c: Regenerate.
409         * features/i386/64bit-pkeys.c: Regenerate.
410         * features/i386/64bit-segments.c: Regenerate.
411         * features/i386/64bit-sse.c: Regenerate.
412         * features/i386/x32-core.c: Regenerate.
413         * features/tic6x-c6xp.c: Regenerate.
414         * features/tic6x-core.c: Regenerate.
415         * features/tic6x-gp.c: Regenerate.
416         * target-descriptions.c: Use common/tdesc.h.
417         * target-descriptions.h: Likewise.
418
419 2018-02-24  Tom Tromey  <tom@tromey.com>
420
421         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
422         (try_thread_db_load_from_dir, thread_db_load_search): Use
423         std::string.
424         (info_auto_load_libthread_db_compare): Return bool.  Change
425         argument types.
426         (info_auto_load_libthread_db): Use std::vector, std::string.
427         Remove cleanups.
428
429 2018-02-24  Tom Tromey  <tom@tromey.com>
430
431         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
432         std::string.
433         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
434         std::string*.
435         * gdbarch.c: Rebuild.
436         * gdbarch.h: Rebuild.
437         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
438         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
439         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
440         std::string*.
441
442 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
443
444         * gdbtypes.h (sect_offset): Change type to uint64_t.
445         (sect_offset_str): New function.
446         * dwarf2read.c (create_addrmap_from_aranges): Use
447         sect_offset_str.
448         (error_check_comp_unit_head): Likewise.
449         (create_debug_type_hash_table): Likewise.
450         (read_cutu_die_from_dwo): Likewise.
451         (init_cutu_and_read_dies): Likewise.
452         (init_cutu_and_read_dies_no_follow): Likewise.
453         (process_psymtab_comp_unit_reader): Likewise.
454         (partial_die_parent_scope): Likewise.
455         (peek_die_abbrev): Likewise.
456         (process_queue): Likewise.
457         (dwarf2_physname): Likewise.
458         (read_namespace_alias): Likewise.
459         (read_import_statement): Likewise.
460         (create_dwo_cu_reader): Likewise.
461         (create_cus_hash_table): Likewise.
462         (lookup_dwo_cutu): Likewise.
463         (inherit_abstract_dies): Likewise.
464         (read_func_scope): Likewise.
465         (read_call_site_scope): Likewise.
466         (dwarf2_add_member_fn): Likewise.
467         (read_common_block): Likewise.
468         (read_module_type): Likewise.
469         (read_typedef): Likewise.
470         (read_subrange_type): Likewise.
471         (load_partial_dies): Likewise.
472         (read_partial_die): Likewise.
473         (find_partial_die): Likewise.
474         (read_str_index): Likewise.
475         (dwarf2_string_attr): Likewise.
476         (build_error_marker_type): Likewise.
477         (lookup_die_type): Likewise.
478         (dump_die_shallow): Likewise.
479         (follow_die_ref): Likewise.
480         (dwarf2_fetch_die_loc_sect_off): Likewise.
481         (dwarf2_fetch_constant_bytes): Likewise.
482         (follow_die_sig): Likewise.
483         (get_signatured_type): Likewise.
484         (get_DW_AT_signature_type): Likewise.
485         (dwarf2_find_containing_comp_unit): Likewise.
486         (set_die_type): Likewise.
487
488 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
489
490         * arch/aarch64.c: Include "common-defs.h".
491         * arch/amd64.c: Likewise.
492         * arch/i386.c: Likewise.
493
494 2018-02-21  Tom Tromey  <tom@tromey.com>
495
496         * value.h: (extract_field_op): Update.
497         * eval.c (extract_field_op): Return a const char *.
498         * expression.h (parse_expression_for_completion): Update.
499         * completer.c (complete_expression): Update.
500         (add_struct_fields): Make fieldname const.
501         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
502         (mark_completion_tag, parse_exp_in_context_1): Update.
503         (parse_expression_for_completion): Change "name" to
504         unique_xmalloc_ptr*.
505
506 2018-02-21  Tom Tromey  <tom@tromey.com>
507
508         * infcall.c (call_function_by_hand_dummy): Use std::vector.
509
510 2018-02-21  Yao Qi  <yao.qi@linaro.org>
511
512         * avr-tdep.c (avr_read_pc): Change parameter type to
513         readable_regcache.
514         * gdbarch.sh (read_pc): Likewise.
515         * gdbarch.c: Re-generated.
516         * gdbarch.h: Re-generated.
517         * hppa-tdep.c (hppa_read_pc): Change parameter type to
518         readable_regcache.
519         * ia64-tdep.c (ia64_read_pc): Likewise.
520         * mips-tdep.c (mips_read_pc): Likewise.
521         * spu-tdep.c (spu_read_pc): Likewise.
522
523 2018-02-21  Yao Qi  <yao.qi@linaro.org>
524
525         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
526         * regcache-dump.c: New file.
527         * regcache.c: Move register_dump to regcache-dump.c.
528         (maintenance_print_registers): Likewise.
529         (maintenance_print_raw_registers): Likewise.
530         (maintenance_print_cooked_registers): Likewise.
531         (maintenance_print_register_groups): Likewise.
532         (maintenance_print_remote_registers): Likewise.
533         (_initialize_regcache): Likewise.
534         * regcache.h (register_dump): Moved from regcache.c.
535
536 2018-02-21  Yao Qi  <yao.qi@linaro.org>
537
538         * regcache.c (regcache::regcache): Update.
539         (regcache::invalidate): Move it to detached_regcache::invalidate.
540         (get_thread_arch_aspace_regcache): Update.
541         (regcache::raw_update): Update.
542         (regcache::cooked_read): Remove some code.
543         (regcache::cooked_read_value): Likewise.
544         (regcache::raw_write): Remove assert on m_readonly_p.
545         (regcache::raw_supply_integer): Move it to
546         detached_regcache::raw_supply_integer.
547         (regcache::raw_supply_zeroed): Likewise.
548         * regcache.h (detached_regcache) <raw_supply_integer>: New
549         declaration.
550         <raw_supply_zeroed, invalidate>: Likewise.
551         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
552         <invalidate>: Likewise.
553         <m_readonly_p>: Removed.
554
555 2018-02-21  Yao Qi  <yao.qi@linaro.org>
556
557         * infcmd.c (get_return_value): Let stop_regs point to
558         get_current_regcache.
559         * regcache.c (regcache::regcache): Remove.
560         (register_dump_reg_buffer): New class.
561         (regcache_print): Adjust.
562         * regcache.h (regcache): Remove constructors.
563
564 2018-02-21  Yao Qi  <yao.qi@linaro.org>
565
566         * regcache.c (class register_dump): New class.
567         (register_dump_regcache, register_dump_none): New class.
568         (register_dump_remote, register_dump_groups): New class.
569         (regcache_print): Update.
570         * regcache.h (regcache_dump_what): Move it to regcache.c.
571         (regcache) <dump>: Remove.
572
573 2018-02-21  Yao Qi  <yao.qi@linaro.org>
574
575         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
576          reg_buffer_rw *.
577         (jit_unwind_reg_set_impl): Call raw_supply.
578         (jit_frame_sniffer): Use reg_buffer_rw.
579         * record-full.c (record_full_core_regbuf): Change its type.
580         (record_full_core_open_1): Use reg_buffer_rw.
581         (record_full_close): Likewise.
582         (record_full_core_fetch_registers): Use regcache->raw_supply.
583         (record_full_core_store_registers): Likewise.
584         * regcache.c (regcache::get_register_status): Move it to
585         reg_buffer.
586         (regcache_raw_set_cached_value): Remove.
587         (regcache::raw_set_cached_value): Remove.
588         (regcache::raw_write): Call raw_supply.
589         (regcache::raw_supply): Move it to reg_buffer_rw.
590         * regcache.h (regcache_raw_set_cached_value): Remove.
591         (reg_buffer_rw): New class.
592
593 2018-02-21  Yao Qi  <yao.qi@linaro.org>
594
595         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
596         readonly_detached_regcache.
597         (dummy_frame_prev_register): Use regcache->cooked_read.
598         * frame.c (frame_save_as_regcache): Change return type.
599         (frame_pop): Update.
600         * frame.h (frame_save_as_regcache): Update declaration.
601         * inferior.h (get_infcall_suspend_state_regcache): Update
602         declaration.
603         * infrun.c (infcall_suspend_state) <registers>: use
604         readonly_detached_regcache.
605         (save_infcall_suspend_state): Don't use regcache_dup.
606         (get_infcall_suspend_state_regcache): Change return type.
607         * linux-fork.c (struct fork_info) <savedregs>: Change to
608         readonly_detached_regcache.
609         <pc>: New field.
610         (fork_save_infrun_state): Don't use regcache_dup.
611         (info_checkpoints_command): Adjust.
612         * mi/mi-main.c (register_changed_p): Update declaration.
613         (mi_cmd_data_list_changed_registers): Use
614         readonly_detached_regcache.
615         (register_changed_p): Change parameter type to
616         readonly_detached_regcache.
617         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
618         readonly_detached_regcache.
619         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
620         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
621         New.
622         (regcache::save): Move it to reg_buffer.
623         (regcache::restore): Change parameter type.
624         (regcache_dup): Remove.
625         * regcache.h (reg_buffer) <save>: New method.
626         (readonly_detached_regcache): New class.
627         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
628         readonly_detached_regcache.
629         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
630
631 2018-02-21  Yao Qi  <yao.qi@linaro.org>
632
633         * frame.c (frame_save_as_regcache): Use regcache method save.
634         (frame_pop): Use regcache method restore.
635         * infrun.c (restore_infcall_suspend_state): Likewise.
636         * linux-fork.c (fork_load_infrun_state): Likewise.
637         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
638         save.
639         * regcache.c (regcache_save): Remove.
640         (regcache::restore): More asserts.
641         (regcache_cpy): Remove.
642         * regcache.h (regcache_save): Remove the declaration.
643         (regcache::restore): Move from private to public.
644         Remove the friend declaration of regcache_cpy.
645         (regcache_cpy): Remove declaration.
646
647 2018-02-21  Yao Qi  <yao.qi@linaro.org>
648
649         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
650         parameter type to 'readable_regcache *'.
651         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
652         * arm-tdep.c (arm_neon_quad_read): Likewise.
653         (arm_pseudo_read): Likewise.
654         * avr-tdep.c (avr_pseudo_register_read): Likewise.
655         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
656         * frv-tdep.c (frv_pseudo_register_read): Likewise.
657         * gdbarch.c: Re-generated.
658         * gdbarch.h: Re-generated.
659         * gdbarch.sh (pseudo_register_read): Change parameter type to
660         'readable_regcache *'.
661         (pseudo_register_read_value): Likewise.
662         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
663         (h8300_pseudo_register_read): Likewise.
664         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
665         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
666         (i386_pseudo_register_read_into_value): Likewise.
667         (i386_pseudo_register_read_value): Likewise.
668         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
669         declaration.
670         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
671         * m32c-tdep.c (m32c_raw_read): Likewise.
672         (m32c_read_flg): Likewise.
673         (m32c_banked_register): Likewise.
674         (m32c_banked_read): Likewise.
675         (m32c_sb_read): Likewise.
676         (m32c_part_read): Likewise.
677         (m32c_cat_read): Likewise.
678         (m32c_r3r2r1r0_read): Likewise.
679         (m32c_pseudo_register_read): Likewise.
680         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
681         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
682         (mep_pseudo_cr64_read): Likewise.
683         (mep_pseudo_register_read): Likewise.
684         * mips-tdep.c (mips_pseudo_register_read): Likewise.
685         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
686         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
687         * regcache.c (regcache::raw_read): Move it to readable_regcache.
688         (regcache::cooked_read): Likewise.
689         (regcache::cooked_read_value): Likewise.
690         (regcache_cooked_read_signed):
691         (regcache::cooked_read): Likewise.
692         * regcache.h (readable_regcache): New class.
693         (regcache): Inherit readable_regcache.  Move some methods to
694         readable_regcache.
695         * rl78-tdep.c (rl78_pseudo_register_read): Change
696         parameter type to 'readable_regcache *'.
697         * rs6000-tdep.c (do_regcache_raw_read): Remove.
698         (e500_pseudo_register_read): Change parameter type to
699         'readable_regcache *'.
700         (dfp_pseudo_register_read): Likewise.
701         (vsx_pseudo_register_read): Likewise.
702         (efpr_pseudo_register_read): Likewise.
703         * s390-tdep.c (s390_pseudo_register_read): Likewise.
704         * sh-tdep.c (sh_pseudo_register_read): Likewise.
705         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
706         (sh64_pseudo_register_read): Likewise.
707         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
708         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
709         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
710         (spu_pseudo_register_read): Likewise.
711         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
712         (xtensa_pseudo_register_read): Likewise.
713
714 2018-02-21  Yao Qi  <yao.qi@linaro.org>
715
716         * regcache.c (regcache::regcache): Call reg_buffer ctor.
717         (regcache::arch): Move it to reg_buffer::arch.
718         (regcache::register_buffer): Likewise.
719         (regcache::assert_regnum): Likewise.
720         (regcache::num_raw_registers): Likewise.
721         * regcache.h (reg_buffer): New class.
722         (regcache): Inherit reg_buffer.
723
724 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
725
726         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
727         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
728
729 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
730
731         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
732
733 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
734
735         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
736         (SFILES): Remove common/*.c files.
737         (COMMON_OBS): Remove some *.o files built from common/*.c files.
738         * common/common.host: Add common reference.
739         * configure.ac: Likewise.
740         * configure: Regenerate.
741
742 2018-02-16  Yao Qi  <yao.qi@linaro.org>
743
744         * block.c (block_namespace_info): Inherit allocate_on_obstack.
745         (block_initialize_namespace): Use new.
746         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
747         (dwarf2_free_objfile): Use delete.
748         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
749         (copy_type_recursive): Use new.
750         * gdb_obstack.h (allocate_on_obstack): New.
751
752 2018-02-15  Yao Qi  <yao.qi@linaro.org>
753
754         PR gdb/22849
755         * inferior.c (exit_inferior_1): Reset inf->control.
756
757 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
758
759         * ada-lang.c (ada_to_fixed_value_create): Delete advance
760         declaration.
761
762 2018-02-14  Pedro Alves  <palves@redhat.com>
763
764         * frame-unwind.c (frame_unwind_try_unwinder): Always call
765         frame_cleanup_after_sniffer on exception.
766
767 2018-02-14  Tom Tromey  <tom@tromey.com>
768
769         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
770         const.
771         (solib_bfd_open): Make pathname const.
772         * solib.c (solib_bfd_open): Make pathname const.
773         * solib-spu.c (spu_bfd_fopen): Make name const.
774         (spu_bfd_open): Make pathname const.
775         * solib-darwin.c (darwin_bfd_open): Make pathname const.
776         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
777
778 2018-02-14  Tom Tromey  <tom@tromey.com>
779
780         * symfile.c (symfile_bfd_open): Update.
781         * source.h (openp, source_full_path_of, find_and_open_source):
782         Change argument type to unique_xmalloc_ptr.
783         * source.c (openp): Take a unique_xmalloc_ptr.
784         (source_full_path_of, find_and_open_source): Likewise.
785         (open_source_file, symtab_to_fullname): Update.
786         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
787         unique_xmalloc_ptr.
788         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
789         (exec_file_find): Update.
790         * psymtab.c (psymtab_to_fullname): Update.
791         * nto-tdep.h (nto_find_and_open_solib): Update.
792         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
793         unique_xmalloc_ptr.
794         * exec.c (exec_file_attach): Update.
795         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
796         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
797
798 2018-02-14  Tom Tromey  <tom@tromey.com>
799
800         * solib.c: Include source.h.
801         * nto-tdep.c: Include source.h.
802         * mi/mi-cmd-env.c: Include source.h.
803         * infcmd.c: Include source.h.
804         * exec.c: Include source.h.
805         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
806         (add_path, directory_switch, source_path, init_source_path): Move
807         declarations...
808         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
809         (add_path, directory_switch, source_path, init_source_path):
810         ...here.
811
812 2018-02-14  Tom Tromey  <tom@tromey.com>
813
814         * solist.h (exec_file_find, solib_find): Return
815         unique_xmalloc_ptr.
816         (solib_bfd_fopen): Take a const char *.
817         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
818         (exec_file_find, solib_find): Likewise.
819         (solib_bfd_fopen): Do not take ownership of "pathname".
820         (solib_bfd_open): Use unique_xmalloc_ptr.
821         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
822         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
823         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
824         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
825
826 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
827
828         * ada-lang.c (name_match_type_from_name): Remove reference to
829         ada_name_for_lookup in function's documentation.
830         * ada-lang.h (ada_name_for_lookup): Delete declaration.
831
832 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
833
834         * defs.h (enum openp_flags): New enum.
835         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
836         Move to enum openp_flags.
837         (openp_flags): New enum flags.
838         (openp): Change parameter type to openp_flags.
839         * source.c (openp): Change parameter type to openp_flags.
840         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
841         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
842
843 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
844
845         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
846         per-command.
847
848 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
849
850         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
851         into...
852         (class dwarf2_queue_guard): ...the destructor of this new class.
853         (dw2_do_instantiate_symtab): Create instance of the new class
854         dwarf2_queue_guard, remove cleanup.
855
856 2018-02-09  Tom Tromey  <tom@tromey.com>
857
858         * source.c (find_source_lines): Don't reference past the end of
859         the vector.
860
861 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
862
863         * remote.c (remote_btrace_maybe_reopen): Change error message.
864         * btrace.c (btrace_enable): Likewise.
865         (parse_xml_btrace): Likewise.
866         (parse_xml_btrace_conf): Likewise.
867
868 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
869
870         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
871         (linux_enable_pt, linux_enable_bts): Call
872         diagnose_perf_event_open_fail.
873
874 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
875
876         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
877         Remove parameter and change return type.  Update callers.  Move it.
878         (linux_enable_bts, linux_enable_pt): Improve error message.
879         (linux_enable_pt): Remove zero buffer size check.
880         (linux_enable_btrace): Improve error messages.  Remove NULL return
881         check.
882
883 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
884
885         * btrace.c (btrace_enable): Remove target_supports_btrace call.
886         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
887         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
888         (linux_supports_pt, linux_supports_btrace): Remove.
889         (linux_enable_bts): Call cpu_supports_bts.
890         * nat/linux-btrace.h (linux_supports_btrace): Remove.
891         * remote.c (remote_supports_btrace): Remove.
892         (init_remote_ops): Remove remote_supports_btrace.
893         * target-delegates.c: Regenerated.
894         * target.c (target_supports_btrace): Remove.
895         * target.h (target_ops) <to_supports_btrace>: Remove
896         (target_supports_btrace): Remove.
897         * x86-linux-nat.c (x86_linux_create_target): Remove
898         linux_supports_btrace.
899
900 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
901
902         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
903         btrace failed.
904         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
905         exception and use message in own exception.
906
907 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
908
909         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
910         (perf_event_pt_event_type): Use gdb_file_up.
911         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
912         scoped_fd, and scoped_mmap.
913
914 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
915
916         * common/scoped_mmap.h: New.
917         * unittests/scoped_mmap-selftest.c: New.
918         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
919         unittests/scoped_mmap-selftest.c.
920
921 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
922
923         * common/scoped_fd.h: New.
924         * unittests/scoped_fd-selftest.c: New.
925         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
926         unittests/scoped_fd-selftest.c.
927
928 2018-02-09  Tom Tromey  <tom@tromey.com>
929
930         * auto-load.c (auto_load_section_scripts): Use
931         gdb::unique_xmalloc_ptr.
932
933 2018-02-09  Tom Tromey  <tom@tromey.com>
934
935         * auto-load.c (execute_script_contents): Use std::string.
936
937 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
938
939         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
940         Python function, rather than a new command.
941
942 2018-02-08  Tom Tromey  <tom@tromey.com>
943
944         * solib.c (solib_find_1): Use std::string.
945         (solib_bfd_fopen): Use unique_xmalloc_ptr.
946
947 2018-02-08  Tom Tromey  <tom@tromey.com>
948
949         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
950
951 2018-02-08  Tom Tromey  <tom@tromey.com>
952
953         * source.c (find_source_lines): Use gdb::def_vector.
954
955 2018-02-08  Tom Tromey  <tom@tromey.com>
956
957         * macrocmd.c (struct temporary_macro_definition): New.
958         (macro_define_command): Use temporary_macro_definition.  Remove
959         cleanups.
960         (free_macro_definition_ptr): Remove.
961
962 2018-02-08  Tom Tromey  <tom@tromey.com>
963
964         * macroexp.c (maybe_expand): Use std::string.
965
966 2018-02-08  Tom Tromey  <tom@tromey.com>
967
968         * macroexp.c (struct macro_buffer): Add initializers for some
969         members.
970         (init_buffer, init_shared_buffer, free_buffer)
971         (free_buffer_return_text): Remove.
972         (macro_buffer): New constructors.
973         (~macro_buffer): New destructor.
974         (macro_buffer::set_shared): New method.
975         (macro_buffer::resize_buffer, macro_buffer::appendc)
976         (macro_buffer::appendmem): Now methods, not free functions.
977         (set_token, append_tokens_without_splicing, stringify)
978         (macro_stringify): Update.
979         (gather_arguments): Change return type.  Remove argc_p argument,
980         add args_ptr argument.  Use std::vector.
981         (substitute_args): Remove argc argument.  Accept std::vector.
982         (expand): Update.  Use std::vector.
983         (scan, macro_expand, macro_expand_next): Update.
984
985 2018-02-08  Tom Tromey  <tom@tromey.com>
986
987         * symtab.c (default_collect_symbol_completion_matches_break_on):
988         Use unique_xmalloc_ptr.
989         * macroscope.h: (sal_macro_scope, user_macro_scope)
990         (default_macro_scope): Return unique_xmalloc_ptr.
991         * macroscope.c (sal_macro_scope, user_macro_scope)
992         (default_macro_scope): Return unique_xmalloc_ptr.
993         * macroexp.h (macro_expand, macro_expand_once): Return
994         unique_xmalloc_ptr.
995         * macroexp.c (macro_expand, macro_expand_once): Return
996         unique_xmalloc_ptr.
997         * macrocmd.c (macro_expand_command, macro_expand_once_command)
998         (info_macro_command, info_macros_command): Use
999         unique_xmalloc_ptr.
1000         * compile/compile-c-support.c (write_macro_definitions): Use
1001         unique_xmalloc_ptr.
1002         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1003
1004 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
1005
1006         * value.c (value_static_field): Assign field type instead of
1007         containing type when returning an optimized out value.
1008
1009 2018-02-06  Yao Qi  <yao.qi@linaro.org>
1010
1011         * ft32-tdep.c (ft32_read_pc): Remove.
1012         (ft32_write_pc): Remove.
1013         (ft32_gdbarch_init): Update.
1014         * m32r-tdep.c (m32r_read_pc): Remove.
1015         (m32r_gdbarch_init): Update.
1016         * mep-tdep.c (mep_read_pc): Remove.
1017         (mep_gdbarch_init): Update.
1018         * microblaze-tdep.c (microblaze_write_pc): Remove.
1019         (microblaze_gdbarch_init): Update.
1020         * mn10300-tdep.c (mn10300_read_pc): Remove.
1021         (mn10300_write_pc): Remove.
1022         (mn10300_gdbarch_init): Update.
1023         * moxie-tdep.c (moxie_read_pc): Remove.
1024         (moxie_write_pc): Remove.
1025         (moxie_gdbarch_init): Update.
1026
1027 2018-02-06  Yao Qi  <yao.qi@linaro.org>
1028
1029         * expprint.c (print_subexp_standard): Handle
1030         OP_F77_UNDETERMINED_ARGLIST.
1031         (dump_subexp_body_standard): Likewise.
1032
1033 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
1034
1035         * target-descriptions.c (tdesc_element_visitor) Add empty
1036         implementations.
1037         (tdesc_type): Move make_gdb_type from here.
1038         (tdesc_type_builtin): Likewise.
1039         (tdesc_type_vector): Likewise.
1040         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1041         (make_gdb_type_struct): Move from tdesc_type_with_fields.
1042         (make_gdb_type_union): Likewise.
1043         (make_gdb_type_flags): Likewise.
1044         (make_gdb_type_enum): Likewise.
1045         (make_gdb_type): New function.
1046         (tdesc_register_type): Use static make_gdb_type.
1047
1048 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
1049
1050         * infcmd.c (default_print_one_register_info): Align natural-format
1051         column values consistently one under another.
1052         (pad_to_column): New function.
1053
1054 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
1055
1056         * dwarf2read.c (dwarf2_physname): Move commment.
1057
1058 2018-02-01  Leszek Swirski  <leszeks@google.com>
1059
1060         * varobj.c (varobj_formatted_print_options): Allow recursive
1061         pretty printing if pretty printing is enabled.
1062
1063 2018-02-01  Leszek Swirski  <leszeks@google.com>
1064
1065         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1066         names after a structop as a filename.
1067
1068 2018-02-01  Yao Qi  <yao.qi@linaro.org>
1069
1070         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1071         (arm_record_coproc_data_proc): Likewise.
1072
1073 2018-02-01  Yao Qi  <yao.qi@linaro.org>
1074
1075         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1076
1077 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
1078
1079         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1080         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1081
1082 2018-01-31  Pedro Alves  <palves@redhat.com>
1083
1084         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1085         * inflow.c (child_terminal_save_inferior): Wrap reference to
1086         tcgetpgrp in HAVE_TERMIOS_H.
1087         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1088         _WIN32.
1089         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1090         always iterate over all inferiors.
1091         (gdbsim_cntrl_c): Adjust.
1092         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1093
1094 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
1095
1096         * gdbtypes.c (lookup_array_range_type): Make sure the array's
1097         index type is objfile-owned if the element type is as well.
1098
1099 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
1100
1101         GDB 8.1 released.
1102
1103 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1104
1105         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1106         "features/s390x-linux64.c".
1107         (_initialize_s390_linux_tdep): Remove initialization of tdescs
1108         s390_linux32 and s390x_linux64.
1109         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1110         default tdesc.
1111         * s390-tdep.c: Include "features/s390-linux32.c" and
1112         "features/s390x-linux64.c".
1113         (s390_tdesc_valid): Add check for tdesc_has_registers.
1114         (s390_gdbarch_init): Make sure there is always a valid tdesc.
1115         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1116         tdesc_s390x_linux64.
1117         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1118         tdesc_s390x_linux64 to...
1119         * s390-tdep.h: ...here.
1120
1121 2018-01-30  Pedro Alves  <palves@redhat.com>
1122
1123         PR gdb/13211
1124         * config.in, configure: Regenerate.
1125         * configure.ac: Check for getpgid.
1126         * go32-nat.c (go32_pass_ctrlc): New.
1127         (go32_target): Install it.
1128         * inf-child.c (inf_child_target): Install
1129         child_terminal_save_inferior, child_pass_ctrlc and
1130         child_interrupt.
1131         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1132         (inf_ptrace_target): No longer install it.
1133         * infcmd.c (interrupt_target_1): Adjust.
1134         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1135         (child_interrupt): Declare.
1136         (inferior::terminal_state): New.
1137         * inflow.c (struct terminal_info): Update comments.
1138         (inferior_process_group): Delete.
1139         (terminal_is_ours): Delete.
1140         (gdb_tty_state): New.
1141         (child_terminal_init): Adjust.
1142         (is_gdb_terminal, sharing_input_terminal_1)
1143         (sharing_input_terminal): New functions.
1144         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
1145         Set the process's actual process group in the foreground if
1146         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
1147         mark terminal as the inferior's if not sharing GDB's terminal.
1148         Don't check attach_flag.
1149         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1150         pass down a target_terminal_state.
1151         (child_terminal_save_inferior): New, factored out from ...
1152         (child_terminal_ours_1): ... this.  Handle
1153         target_terminal_state::is_ours_for_output.
1154         (child_interrupt, child_pass_ctrlc): New.
1155         (inflow_inferior_exit): Clear the inferior's terminal_state.
1156         (copy_terminal_info): Copy the inferior's terminal state.
1157         (_initialize_inflow): Remove reference to terminal_is_ours.
1158         * inflow.h (inferior_process_group): Delete.
1159         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1160         * procfs.c (procfs_target): Don't install procfs_interrupt.
1161         (procfs_interrupt): Delete.
1162         * remote.c (remote_serial_quit_handler): Adjust.
1163         (remote_interrupt): Remove ptid parameter.  Adjust.
1164         * target-delegates.c: Regenerate.
1165         * target.c: Include "terminal.h".
1166         (target_terminal::terminal_state): Rename to ...
1167         (target_terminal::m_terminal_state): ... this.
1168         (target_terminal::init): Adjust.
1169         (target_terminal::inferior): Adjust to per-inferior
1170         terminal_state.
1171         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1172         (target_terminal::ours, target_terminal::ours_for_output): Use
1173         target_terminal_is_ours_kind.
1174         (target_interrupt): Remove ptid parameter.  Adjust.
1175         (default_target_pass_ctrlc): Adjust.
1176         * target.h (target_ops::to_terminal_save_inferior): New field.
1177         (target_ops::to_interrupt): Remove ptid_t parameter.
1178         (target_interrupt): Remove ptid_t parameter.  Update comment.
1179         (target_pass_ctrlc): Update comment.
1180         * target/target.h (target_terminal_state): New scoped enum,
1181         factored out of ...
1182         (target_terminal::terminal_state): ... here.
1183         (target_terminal::inferior): Update comments.
1184         (target_terminal::restore_inferior): New.
1185         (target_terminal::is_inferior, target_terminal::is_ours)
1186         (target_terminal::is_ours_for_output): Adjust.
1187         (target_terminal::scoped_restore_terminal_state): Adjust to
1188         rename, and call restore_inferior() instead of inferior().
1189         (target_terminal::scoped_restore_terminal_state::m_state): Change
1190         type.
1191         (target_terminal::terminal_state): Rename to ...
1192         (target_terminal::m_terminal_state): ... this and change type.
1193
1194 2018-01-30  Pedro Alves  <palves@redhat.com>
1195
1196         * linux-nat.c (wait_for_signal): New function.
1197         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1198         directly.
1199         (async_terminal_is_ours)
1200         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1201         (linux_nat_add_target): Don't override
1202         to_terminal_inferior/to_terminal_ours.
1203
1204 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1205
1206         * remote.c (remote_follow_fork): Don't call "detach_inferior".
1207
1208 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
1209
1210         * dwarf2read.c (free_dwo_files): Add forward-declaration.
1211         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1212         dwarf2_per_objfile_free here.
1213         (dwarf2_per_objfile_free): Remove.
1214         (_initialize_dwarf2_read): Don't register
1215         dwarf2_per_objfile_free as a registry cleanup.
1216
1217 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
1218
1219         Avoid compilation errors in MinGW native builds
1220
1221         The error is triggered by including python-internal.h, and the
1222         error message is:
1223
1224              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1225                       from build-gnulib/import/math.h:27,
1226                       from d:/usr/Python26/include/pyport.h:235,
1227                       from d:/usr/Python26/include/Python.h:58,
1228                       from python/python-internal.h:94,
1229                       from python/py-arch.c:24:
1230              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1231         using ::hypot;
1232                 ^~~~~
1233
1234         This happens because Python headers define 'hypot' to expand t
1235         '_hypot' in the Windows builds.
1236         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1237         'hypoth'.  This avoids a compilation error.
1238
1239 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
1240
1241         * MAINTAINERS (Write After Approval): Fix ordering.
1242
1243 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
1244
1245         * MAINTAINERS (Write After Approval): Add Alan Hayward.
1246
1247 2018-01-26  Alan Modra  <amodra@gmail.com>
1248
1249         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1250         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1251         Remove nop.  Make const.  Comment.
1252         (powerpc32_plt_stub_so_2): New.
1253         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1254         Correct count.  Update uses.
1255         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1256         Move common code reading PLT entry word.  Correct
1257         powerpc32_plt_stub PLT address calculation.
1258         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1259         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1260         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1261         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1262         (ppc64_standard_linkage8): Likewise.
1263         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1264         Correct insns description.
1265         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1266
1267 2018-01-24  Pedro Alves  <palves@redhat.com>
1268
1269         GCC PR libstdc++/83906
1270         * gdbtypes.c (operator==(const dynamic_prop &,
1271         const dynamic_prop &)): New.
1272         (operator==(const range_bounds &, const range_bounds &)): New.
1273         (check_types_equal): Use them instead of memcmp.
1274         * gdbtypes.h (operator==(const dynamic_prop &,
1275         const dynamic_prop &)): Declare.
1276         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1277         (operator==(const range_bounds &, const range_bounds &)): Declare.
1278         (operator!=(const range_bounds &, const range_bounds &)): Declare.
1279
1280 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1281
1282         * s390-linux-tdep.c (s390_record_address_mask)
1283         (s390_record_calc_disp_common, s390_record_calc_disp)
1284         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1285         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1286         (s390_process_record): Move to s390-tdep.c.
1287         (s390_linux_init_abi_any): Adjust.
1288         * s390-tdep.c (s390_record_address_mask)
1289         (s390_record_calc_disp_common, s390_record_calc_disp)
1290         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1291         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1292         (s390_process_record): Moved from s390-linux-tdep.c
1293         (s390_gdbarch_init): Adjust.
1294
1295 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1296
1297         * s390-linux-nat.c (s390-tdep.h): New include.
1298         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1299         (HFILES_NO_SRCDIR): Add s390-tdep.h.
1300         (ALLDEPFILES): Add s390-tdep.c.
1301         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1302         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1303         * s390-tdep.h: ...this.  New file.
1304         * s390-linux-tdep.c (s390-tdep.h): New include.
1305         (_initialize_s390_tdep): Rename to...
1306         (_initialize_s390_linux_tdep): ...this and adjust.
1307         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1308         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1309         s390-tdep.h.
1310         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1311         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1312         (s390_is_partial_instruction, s390_software_single_step)
1313         (is_non_branch_ril, s390_displaced_step_copy_insn)
1314         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1315         (s390_prologue_data, s390_addr, s390_store, s390_load)
1316         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1317         (s390_register_call_saved, s390_guess_tracepoint_registers)
1318         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1319         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1320         (s390_pseudo_register_name, s390_pseudo_register_type)
1321         (s390_pseudo_register_read, s390_pseudo_register_write)
1322         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1323         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1324         (s390_addr_bits_remove, s390_address_class_type_flags)
1325         (s390_address_class_type_flags_to_name)
1326         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1327         (s390_function_arg_float, s390_function_arg_vector)
1328         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1329         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1330         (s390_frame_align, s390_register_return_value, s390_return_value)
1331         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1332         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1333         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1334         (s390_trad_frame_prev_register, s390_unwind_cache)
1335         (s390_prologue_frame_unwind_cache)
1336         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1337         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1338         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1339         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1340         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1341         (s390_frame_base_address, s390_local_base_address)
1342         (s390_frame_base, s390_gcc_target_options)
1343         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1344         (s390_validate_reg_range, s390_tdesc_valid)
1345         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1346         * s390-tdep.c: ...this.  New file.
1347
1348 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1349
1350         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1351         (s390_process_record, s390_gdbarch_tdep_alloc)
1352         (s390_linux_init_abi_any): Use/set new hook.
1353
1354 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1355
1356         * s390-linux-tdep.c (osabi.h): New include.
1357         (s390_linux_init_abi_31, s390_linux_init_abi_64)
1358         (s390_linux_init_abi_any): New functions.
1359         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1360
1361 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1362
1363         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1364         tdesc_has_registers check
1365
1366 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1367
1368         * s390-linux-tdep.c (s390_tdesc_valid): New function.
1369         (s390_validate_reg_range): New macro.
1370         (s390_gdbarch_init): Adjust.
1371
1372 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1373
1374         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1375         (s390_gdbarch_tdep_alloc): Adjust.
1376         (s390_gdbarch_init): Adjust.
1377
1378 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1379
1380         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1381         <have_tdb>: Change type to bool.
1382         (s390_gdbarch_tdep_alloc): Adjust.
1383         (s390_gdbarch_init): Adjust.
1384
1385 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1386
1387         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1388         (gdbarch_tdep) <have_upper, have_vx>: New fields.
1389         (s390_gdbarch_tdep_alloc): New function.
1390         (s390_gdbarch_init): Allocate tdep at start and use its fields
1391         instead of separate variables.
1392
1393 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1394
1395         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1396         when looking for cached gdbarch and add comment for remaining.
1397
1398 2018-01-22  Pedro Alves  <palves@redhat.com>
1399             Sergio Durigan Junior  <sergiodj@redhat.com>
1400
1401         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1402         case.
1403
1404 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
1405
1406         * MAINTAINERS: Update my company e-mail address.
1407
1408 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1409
1410         * regcache.c (cooked_write_test): New function.
1411         (_initialize_regcache): Register the test.
1412
1413 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1414
1415         * ia64-tdep.c (ia64_pseudo_register_read): Call
1416         regcache->cooked_read instead of regcache_cooked_read_unsigned.
1417         * m32c-tdep.c (m32c_cat_read): Likewise.
1418         (m32c_r3r2r1r0_read): Likewise.
1419         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1420         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1421
1422 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1423
1424         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1425         method raw_read instead of regcache_raw_read.
1426         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1427         * arm-tdep.c (arm_neon_quad_read): Likewise.
1428         * avr-tdep.c (avr_pseudo_register_read): Likewise.
1429         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1430         * frv-tdep.c (frv_pseudo_register_read): Likewise.
1431         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1432         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1433         (i386_pseudo_register_read_into_value): Likewise.
1434         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1435         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1436         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1437         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1438         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1439         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
1440         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1441         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
1442         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1443
1444 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1445
1446         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1447         * configure.tgt: Remove target mt.
1448         * mt-tdep.c: Remove.
1449         * regcache.c (cooked_read_test): Remove the check for mt.
1450
1451 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1452
1453         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1454         instead of gdbarch_pseudo_register_read_value.
1455
1456 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
1457
1458         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1459         language is Ada.
1460
1461 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
1462
1463         * linespec.c (create_sals_line_offset): Remove code that preserved
1464         the symtab_and_line's line number.
1465
1466 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1467
1468         * varobj.c (varobj_create): Don't set valid_block when creating a
1469         floating varobj.
1470
1471 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1472
1473         * varobj.c (varobj_create): Remove out of date comment.
1474
1475 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1476
1477         PR mi/20395
1478         * ada-exp.y (write_var_from_sym): Pass extra parameter when
1479         updating innermost block.
1480         * parse.c (innermost_block_tracker::update): Take extra type
1481         parameter, and check types match before updating innermost block.
1482         (write_dollar_variable): Update innermost block for registers.
1483         * parser-defs.h (enum innermost_block_tracker_type): New enum.
1484         (innermost_block_tracker::innermost_block_tracker): Initialise
1485         m_types member.
1486         (innermost_block_tracker::reset): Take type parameter.
1487         (innermost_block_tracker::update): Take type parameter, and pass
1488         type through as needed.
1489         (innermost_block_tracker::m_types): New member.
1490         * varobj.c (varobj_create): Pass type when reseting innermost
1491         block.
1492
1493 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1494
1495         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
1496         * ada-lang.c (resolve_subexp): Likewise.
1497         * breakpoint.c (set_breakpoint_condition) Likewise.
1498         (watch_command_1) Likewise.
1499         * c-exp.y (variable): Likewise.
1500         * d-exp.y (PrimaryExpression): Likewise.
1501         * f-exp.y (variable): Likewise.
1502         * go-exp.y (variable): Likewise.
1503         * m2-exp.y (variable): Likewise.
1504         * objfiles.c (objfile::~objfile): Likewise.
1505         * p-exp.y (variable): Likewise.
1506         * parse.c (innermost_block): Change type.
1507         * parser-defs.h (class innermost_block_tracker): New.
1508         (innermost_block): Change to innermost_block_tracker.
1509         * printcmd.c (display_command): Switch to innermost_block API.
1510         (do_one_display): Likewise.
1511         * rust-exp.y (do_one_display): Likewise.
1512         * symfile.c (clear_symtab_users): Likewise.
1513         * varobj.c (varobj_create): Switch to innermost_block API, replace
1514         use of innermost_block with block stored on varobj object.
1515
1516 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1517
1518         * expression.h (innermost_block): Remove declaration.
1519         * varobj.c: Add 'parser-defs.h' include.
1520
1521 2018-01-19  Tom Tromey  <tom@tromey.com>
1522
1523         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
1524         symbols in the static and global blocks.
1525
1526 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
1527
1528         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
1529         gdb_ptrace.h, and move including gdb_wait.h ...
1530         * nat/linux-ptrace.h: ... to here.
1531
1532 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
1533
1534         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
1535         inf_ptrace_detach_success.
1536         (inf_ptrace_detach_success): Add inferior parameter, use it
1537         instead of inferior_ptid, pass it to detach_inferior.
1538         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
1539         parameter.
1540         * inferior.c (detach_inferior): Add overload that takes an
1541         inferior object.
1542         * inferior.h (detach_inferior): Likewise.
1543         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
1544         use inferior_ptid, adjust call to inf_ptrace_detach_success.
1545         * linux-thread-db.c (thread_db_detach): Use inf parameter.
1546
1547 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
1548
1549         * target.h (struct target_ops) <to_detach>: Add inferior
1550         parameter.
1551         (target_detach): Likewise.
1552         * target.c (dispose_inferior): Pass inferior down.
1553         (target_detach): Pass inferior down.  Assert that it is equal to
1554         the current inferior.
1555         * aix-thread.c (aix_thread_detach): Pass inferior down.
1556         * corefile.c (core_file_command): Pass current_inferior() down.
1557         * corelow.c (core_detach): Add inferior parameter.
1558         * darwin-nat.c (darwin_detach): Likewise.
1559         * gnu-nat.c (gnu_detach): Likewise.
1560         * inf-ptrace.c (inf_ptrace_detach): Likewise.
1561         * infcmd.c (detach_command): Pass current_inferior() down to
1562         target_detach.
1563         * infrun.c (follow_fork_inferior): Pass parent_inf to
1564         target_detach.
1565         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
1566         target_detach.
1567         * linux-nat.c (linux_nat_detach): Add inferior parameter.
1568         * linux-thread-db.c (thread_db_detach): Likewise.
1569         * nto-procfs.c (procfs_detach): Likewise.
1570         * procfs.c (procfs_detach): Likewise.
1571         * record.c (record_detach): Likewise.
1572         * record.h (struct inferior): Forward-declare.
1573         (record_detach): Add inferior parameter.
1574         * remote-sim.c (gdbsim_detach): Likewise.
1575         * remote.c (remote_detach_1): Likewise.
1576         (remote_detach): Likewise.
1577         (extended_remote_detach): Likewise.
1578         * sol-thread.c (sol_thread_detach): Likewise.
1579         * target-debug.h (target_debug_print_inferior_p): New macro.
1580         * target-delegates.c: Re-generate.
1581         * top.c (kill_or_detach): Pass inferior down to target_detach.
1582         * windows-nat.c (windows_detach): Add inferior parameter.
1583
1584 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
1585
1586         * target.h (struct target_ops) <to_detach>: Remove args
1587         parameter.
1588         (target_detach): Likewise.
1589         * target.c (dispose_inferior): Adjust.
1590         (target_detach): Remove args parameter, adjust.
1591         * aix-thread.c (aix_thread_detach): Adjust.
1592         * corefile.c (core_file_command): Adjust.
1593         * corelow.c (core_detach): Adjust.
1594         * darwin-nat.c (darwin_detach): Adjust.
1595         * gnu-nat.c (gnu_detach): Adjust.
1596         * inf-ptrace.c (inf_ptrace_detach): Adjust.
1597         * infcmd.c (detach_command): Adjust
1598         * infrun.c (follow_fork_inferior): Adjust.
1599         (handle_vfork_child_exec_or_exit): Adjust.
1600         * linux-fork.c (linux_fork_detach): Remove args parameter.
1601         * linux-fork.h (linux_fork_detach): Likewise.
1602         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
1603         * linux-thread-db.c (thread_db_detach): Likewise.
1604         * nto-procfs.c (procfs_detach): Likewise.
1605         * procfs.c (procfs_detach): Likewise.
1606         (do_detach): Remove signo parameter.
1607         * record.c (record_detach): Remove args parameter.
1608         * record.h (record_detach): Likewise.
1609         * remote-sim.c (gdbsim_detach): Likewise.
1610         * remote.c (remote_detach_1): Likewise.
1611         (remote_detach): Likewise.
1612         (extended_remote_detach): Likewise.
1613         * sol-thread.c (sol_thread_detach): Likewise.
1614         * target-delegates.c: Re-generate.
1615         * top.c (struct qt_args) <args>: Remove field.
1616         (kill_or_detach): Don't pass args.
1617         (quit_force): Don't set args.
1618         * windows-nat.c (windows_detach): Remove args parameter.
1619
1620 2018-01-19  Yao Qi  <yao.qi@linaro.org>
1621
1622         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
1623         (arm_linux_init_abi): Install it.
1624
1625 2018-01-19  Yao Qi  <yao.qi@linaro.org>
1626
1627         * osabi.c (gdb_osabi_names): Extend the regexp for
1628         arm-linux-gnueabihf.
1629
1630 2018-01-18  Yao Qi  <yao.qi@linaro.org>
1631
1632         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
1633         m_abbrevs.
1634         (abbrev_table::add_abbrev): Update.
1635         (abbrev_table::lookup_abbrev): Update.
1636
1637 2018-01-18  Yao Qi  <yao.qi@linaro.org>
1638
1639         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
1640
1641 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
1642
1643         * compile/compile.c (compile_to_object): Convert "triplet_rx"
1644         to "std::string".
1645
1646 2018-01-17  Tom Tromey  <tom@tromey.com>
1647
1648         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
1649
1650 2018-01-17  Tom Tromey  <tom@tromey.com>
1651
1652         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
1653         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
1654         (create_array_type_with_stride): Update.
1655         * dwarf2read.c (set_die_type): Update.
1656
1657 2018-01-17  Tom Tromey  <tom@tromey.com>
1658
1659         * dwarf2read.c (delayed_method_info): Remove typedef.
1660         (dwarf2_cu::method_info): Now a std::vector.
1661         (add_to_method_list): Update.
1662         (free_delayed_list): Remove.
1663         (compute_delayed_physnames): Update.
1664         (process_full_comp_unit, process_full_type_unit): Clear the method
1665         list.  Remove cleanups.
1666         (psymtab_include_file_name): Add name_holder parameter.  Use
1667         unique_xmalloc_ptr.
1668         (dwarf_decode_lines): Update.
1669
1670 2018-01-17  Tom Tromey  <tom@tromey.com>
1671             Simon Marchi  <simon.marchi@ericsson.com>
1672
1673         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
1674         (dwarf2_per_objfile::free_cached_comp_units)
1675         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1676         (init_cutu_and_read_dies_no_follow): Update.
1677         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
1678         (dwarf2_cu::~dwarf2_cu): New.
1679         (free_heap_comp_unit, free_stack_comp_unit): Remove.
1680         (age_cached_comp_units, free_one_cached_comp_unit): Update.
1681
1682 2018-01-17  Tom Tromey  <tom@tromey.com>
1683             Simon Marchi  <simon.marchi@ericsson.com>
1684
1685         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
1686         (struct die_reader_specs) <abbrev_table>: New member.
1687         (struct abbrev_table): Add constructor.
1688         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
1689         <abbrev_obstack>: Now an auto_obstack.
1690         (abbrev_table_up): New typedef.
1691         (init_cu_die_reader): Add abbrev_table parameter.
1692         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
1693         Add result_dwo_abbrev_table.
1694         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1695         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
1696         Update.
1697         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
1698         parameter.
1699         (skip_children): Update.
1700         (abbrev_table::alloc_abbrev): Rename from
1701         abbrev_table_alloc_abbrev.
1702         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
1703         (abbrev_table::lookup_abbrev): Rename from
1704         abbrev_table_lookup_abbrev.
1705         (abbrev_table_read_table): Return abbrev_table_up.
1706         (abbrev_table_free, abbrev_table_free_cleanup)
1707         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
1708         (load_partial_dies): Update.
1709
1710 2018-01-17  Tom Tromey  <tom@tromey.com>
1711
1712         * dwarf2read.c (dwarf2_compute_name): Update comment.
1713         (read_func_scope, read_variable): Update.
1714         (new_symbol): Remove.
1715         (new_symbol_full): Rename to new_symbol.
1716
1717 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
1718
1719         PR gdb/16577
1720         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
1721         a warning instead of throwing an error, set section size to 0 and return
1722         NULL.
1723         * gdb_bfd.h (gdb_bfd_map_section): Update description.
1724
1725 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
1726
1727         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
1728         std::string.
1729         (linux_ptrace_attach_fail_reason_string): Likewise.
1730         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
1731         Likewise.
1732         (linux_ptrace_attach_fail_reason_string): Likewise.
1733         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
1734
1735 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
1736
1737         * linux-nat.c (linux_nat_attach): Remove xstrdup.
1738
1739 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
1740
1741         PR gdb/21559
1742         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1743         checking for fs_base/gs_base fields in struct user_regs_struct.
1744         * configure: Regenerate.
1745
1746 2018-01-17  Yao Qi  <yao.qi@linaro.org>
1747
1748         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
1749         function.
1750         (aarch64_linux_init_abi): Install it to gdbarch hook
1751         gcc_target_options.
1752
1753 2018-01-15  Pedro Alves  <palves@redhat.com>
1754
1755         * common/signals-state-save-restore.c
1756         (save_original_signals_state): Fix typos.
1757
1758 2017-01-12  Tom Tromey  <tom@tromey.com>
1759             Sergio Durigan Junior  <sergiodj@redhat.com>
1760
1761         * Makefile.in (install-only): Install gdb-add-index.
1762
1763 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
1764
1765         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
1766
1767 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1768
1769         * infrun.c (keep_going_pass_signal): Clear step-over info when
1770         insert_breakpoints fails.
1771
1772 2018-01-11  Pedro Alves  <palves@redhat.com>
1773
1774         PR gdb/22583
1775         * infrun.c (resume): Rename to ...
1776         (resume_1): ... this.
1777         (resume): Reimplement as wrapper around resume_1.
1778
1779 2018-01-11  Pedro Alves  <palves@redhat.com>
1780
1781         PR remote/22597
1782         * remote.c (remote_parse_stop_reply): Default to the last-set
1783         general thread instead of to 'magic_null_ptid'.
1784
1785 2018-01-10  Pedro Alves  <palves@redhat.com>
1786
1787         * language.h (language_get_symbol_name_matcher): Rename ...
1788         (get_symbol_name_matcher): ... this.
1789         * language.c (language_get_symbol_name_matcher): Ditto.
1790         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
1791         callers adjusted.
1792
1793 2018-01-10  Pedro Alves  <palves@redhat.com>
1794
1795         PR gdb/22670
1796         * dwarf2read.c
1797         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
1798         Adjust to use language_get_symbol_name_matcher instead of
1799         language_defn::la_get_symbol_name_matcher.
1800         * language.c (language_get_symbol_name_matcher): If in Ada mode
1801         and the lookup name is a verbatim match, return Ada's matcher.
1802         * language.h (language_get_symbol_name_matcher): Adjust comment.
1803         (ada_lookup_name_info::verbatim_p):: New method.
1804
1805 2018-01-10  Pedro Alves  <palves@redhat.com>
1806
1807         PR gdb/22670
1808         * ada-lang.c (ada_collect_symbol_completion_matches): If the
1809         minsym's language is language_auto or language_cplus, pass down
1810         language_ada instead.
1811         * symtab.c (compare_symbol_name): Don't frob symbol language here.
1812
1813 2018-01-10  Pedro Alves  <palves@redhat.com>
1814
1815         PR gdb/22670
1816         * minsyms.c (linkage_name_str): New function.
1817         (iterate_over_minimal_symbols): Use it.
1818
1819 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
1820
1821         * NEWS: Document that 'info proc' now works on FreeBSD.
1822
1823 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
1824
1825         * configure.ac: Check for kinfo_getfile in libutil.
1826         * configure: Regenerate.
1827         * config.in: Regenerate.
1828         * fbsd-nat.c: Include "fbsd-tdep.h".
1829         (fbsd_fetch_cmdline): New.
1830         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
1831         rather than calling error.
1832         (fbsd_info_proc): New.
1833         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
1834         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
1835         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
1836
1837 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
1838
1839         * fbsd-nat.c (struct free_deleter): Remove.
1840         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
1841
1842 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
1843
1844         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
1845         NULL for an empty pathname.
1846
1847 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
1848
1849         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
1850         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
1851         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
1852         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
1853         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
1854         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
1855         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
1856         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
1857         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
1858         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
1859         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
1860         (fbsd_core_fetch_timeval, fbsd_print_sigset)
1861         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
1862         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
1863         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
1864
1865 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1866
1867         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
1868         (gnu_xfer_auxv): New function.
1869         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
1870         TARGET_OBJECT_AUXV.
1871
1872 2018-01-08  Yao Qi  <yao.qi@linaro.org>
1873             Simon Marchi  <simon.marchi@ericsson.com>
1874
1875         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
1876         common/selftest.c.
1877         (COMMON_OBS): Remove selftest.o.
1878         * configure.ac: Append selftest-arch.c and common/selftest.c to
1879         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
1880         * configure: Re-generated.
1881         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
1882         GDB_SELF_TEST.
1883         (maintenance_info_selftests): Likewise.
1884
1885 2018-01-08  Xavier Roirand  <roirand@adacore.com>
1886
1887         * ada-valprint.c (val_print_packed_array_elements): Use
1888         proper number of elements when printing an array indexed
1889         by an enumeration type.
1890
1891 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1892
1893         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
1894         (dw2_get_file_names_reader): Adjust.
1895         (lookup_dwo_signatured_type): Adjust.
1896         (lookup_dwp_signatured_type): Adjust.
1897         (lookup_signatured_type): Adjust.
1898         (create_type_unit_group): Adjust.
1899         (get_type_unit_group): Adjust.
1900         (process_psymtab_comp_unit_reader): Adjust.
1901         (build_type_psymtabs_reader): Adjust.
1902         (scan_partial_symbols): Adjust.
1903         (add_partial_symbol): Adjust.
1904         (add_partial_subprogram): Adjust.
1905         (peek_die_abbrev): Adjust.
1906         (fixup_go_packaging): Adjust.
1907         (process_imported_unit_die): Adjust.
1908         (dwarf2_compute_name): Adjust.
1909         (dwarf2_physname): Adjust.
1910         (read_import_statement): Adjust.
1911         (handle_DW_AT_stmt_list): Adjust.
1912         (read_file_scope): Adjust.
1913         (read_func_scope): Adjust.
1914         (read_lexical_block_scope): Adjust.
1915         (read_call_site_scope): Adjust.
1916         (read_variable): Adjust.
1917         (dwarf2_rnglists_process): Adjust.
1918         (dwarf2_ranges_process): Adjust.
1919         (dwarf2_ranges_read): Adjust.
1920         (dwarf2_get_pc_bounds): Adjust.
1921         (dwarf2_record_block_ranges): Adjust.
1922         (dwarf2_add_field): Adjust.
1923         (dwarf2_add_member_fn): Adjust.
1924         (read_structure_type): Adjust.
1925         (process_structure_scope): Adjust.
1926         (read_enumeration_type): Adjust.
1927         (read_array_type): Adjust.
1928         (mark_common_block_symbol_computed): Adjust.
1929         (read_common_block): Adjust.
1930         (read_namespace_type): Adjust.
1931         (read_namespace): Adjust.
1932         (read_module_type): Adjust.
1933         (read_tag_pointer_type): Adjust.
1934         (read_tag_ptr_to_member_type): Adjust.
1935         (read_tag_string_type): Adjust.
1936         (read_subroutine_type): Adjust.
1937         (read_typedef): Adjust.
1938         (read_base_type): Adjust.
1939         (attr_to_dynamic_prop): Adjust.
1940         (read_subrange_type): Adjust.
1941         (read_unspecified_type): Adjust.
1942         (dwarf2_read_abbrevs): Adjust.
1943         (load_partial_dies): Adjust.
1944         (read_partial_die): Adjust.
1945         (find_partial_die): Adjust.
1946         (guess_partial_die_structure_name): Adjust.
1947         (fixup_partial_die): Adjust.
1948         (read_attribute_value): Adjust.
1949         (read_addr_index): Adjust.
1950         (read_addr_index_from_leb128): Adjust.
1951         (read_str_index): Adjust.
1952         (dwarf2_string_attr): Adjust.
1953         (get_debug_line_section): Adjust.
1954         (dwarf_decode_line_header): Adjust.
1955         (lnp_state_machine::check_line_address): Adjust.
1956         (dwarf_decode_lines_1): Adjust.
1957         (dwarf_decode_lines): Adjust.
1958         (dwarf2_start_symtab): Adjust.
1959         (var_decode_location): Adjust.
1960         (new_symbol_full): Adjust.
1961         (dwarf2_const_value_data): Adjust.
1962         (dwarf2_const_value_attr): Adjust.
1963         (dwarf2_const_value): Adjust.
1964         (die_type): Adjust.
1965         (die_containing_type): Adjust.
1966         (build_error_marker_type): Adjust.
1967         (lookup_die_type): Adjust.
1968         (guess_full_die_structure_name): Adjust.
1969         (anonymous_struct_prefix): Adjust.
1970         (determine_prefix): Adjust.
1971         (dwarf2_name): Adjust.
1972         (follow_die_ref_or_sig): Adjust.
1973         (follow_die_offset): Adjust.
1974         (follow_die_ref): Adjust.
1975         (follow_die_sig_1): Adjust.
1976         (follow_die_sig): Adjust.
1977         (get_signatured_type): Adjust.
1978         (get_DW_AT_signature_type): Adjust.
1979         (decode_locdesc): Adjust.
1980         (dwarf_decode_macros): Adjust.
1981         (cu_debug_loc_section): Adjust.
1982         (fill_in_loclist_baton): Adjust.
1983         (dwarf2_symbol_mark_computed): Adjust.
1984         (init_one_comp_unit): Don't assign
1985         dwarf2_cu::dwarf2_per_objfile.
1986         (set_die_type): Adjust.
1987
1988 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
1989
1990         * dwarf2read.c (struct mapped_debug_names): Add constructor.
1991         <dwarf2_per_objfile>: New field.
1992         (dwarf2_per_objfile): Remove global.
1993         (get_dwarf2_per_objfile): New function.
1994         (set_dwarf2_per_objfile): New function.
1995         (dwarf2_build_psymtabs_hard): Change objfile parameter to
1996         dwarf2_per_objfile.
1997         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
1998         (read_abbrev_offset): Likewise.
1999         (read_indirect_string): Likewise.
2000         (read_indirect_line_string): Likewise.
2001         (read_indirect_string_at_offset): Likewise.
2002         (read_indirect_string_from_dwz): Likewise.
2003         (dwarf2_find_containing_comp_unit): Change objfile parameter to
2004         dwarf2_per_objfile.
2005         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2006         (create_all_comp_units): Change objfile parameter to
2007         dwarf2_per_objfile.
2008         (create_all_type_units): Likewise.
2009         (process_queue): Add dwarf2_per_objfile parameter.
2010         (read_and_check_comp_unit_head): Likewise.
2011         (lookup_dwo_unit_in_dwp): Likewise.
2012         (get_dwp_file): Likewise.
2013         (process_cu_includes): Likewise.
2014         (struct free_dwo_file_cleanup_data): New struct.
2015         (dwarf2_has_info): Use get_dwarf2_per_objfile and
2016         set_dwarf2_per_objfile.
2017         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2018         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2019         context, adjust calls.
2020         (dw2_instantiate_symtab): Likewise.
2021         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2022         (dw2_get_cu): Likewise.
2023         (create_cu_from_index_list): Change objfile parameter to
2024         dwarf2_per_objfile.
2025         (create_cus_from_index_list): Get dwarf2_per_objfile from
2026         context, adjust calls.
2027         (create_cus_from_index): Likewise.
2028         (create_signatured_type_table_from_index): Change objfile
2029         parameter to dwarf2_per_objfile.
2030         (create_signatured_type_table_from_debug_names): Change objfile
2031         parameter to dwarf2_per_objfile.
2032         (create_addrmap_from_index): Likewise.
2033         (create_addrmap_from_aranges): Likewise.
2034         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2035         (dw2_setup): Remove.
2036         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2037         context.
2038         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2039         get_dwarf2_per_objfile.
2040         (dw2_forget_cached_source_info): Likewise.
2041         (dw2_map_symtabs_matching_filename): Likewise.
2042         (struct dw2_symtab_iterator) <index>: Remove.
2043         <dwarf2_per_objfile>: New field.
2044         (dw2_symtab_iter_init): Replace index parameter with
2045         dwarf2_per_objfile.
2046         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2047         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2048         (dw2_print_stats): Likewise.
2049         (dw2_dump): Likewise.
2050         (dw2_expand_symtabs_for_function): Likewise.
2051         (dw2_expand_all_symtabs): Likewise.
2052         (dw2_expand_symtabs_with_fullname): Likewise.
2053         (dw2_expand_marked_cus): Replace index and objfile parameters
2054         with dwarf2_per_objfile.
2055         (dw_expand_symtabs_matching_file_matcher): Add
2056         dwarf2_per_objfile parameter and adjust calls.
2057         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2058         adjust calls.
2059         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2060         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2061         adjust calls.
2062         (create_cus_from_debug_names_list): Replace objfile parameter
2063         with dwarf2_per_objfile and adjust calls.
2064         (create_cus_from_debug_names): Likewise.
2065         (dwarf2_read_debug_names): Likewise.
2066         (mapped_debug_names::namei_to_name): Adjust call.
2067         (dw2_debug_names_iterator::next): Likewise.
2068         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2069         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2070         (dw2_debug_names_dump): Likewise.
2071         (dw2_debug_names_expand_symtabs_for_function): Likewise.
2072         (dw2_debug_names_expand_symtabs_matching): Likewise.
2073         (dwarf2_initialize_objfile): Likewise.
2074         (dwarf2_build_psymtabs): Likewise.
2075         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2076         this_cu.
2077         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2078         (read_and_check_comp_unit_head): Likewise.
2079         (read_abbrev_offset): Likewise.
2080         (create_debug_type_hash_table): Likewise.
2081         (create_debug_types_hash_table): Likewise.
2082         (create_all_type_units): Replace objfile parameter with
2083         dwarf2_per_objfile.
2084         (add_type_unit): Add dwarf2_per_objfile parameter.
2085         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2086         with dwarf2_per_objfile.
2087         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2088         (lookup_dwp_signatured_type): Likewise.
2089         (lookup_signatured_type): Likewise.
2090         (read_cutu_die_from_dwo): Likewise.
2091         (init_tu_and_read_dwo_dies): Likewise.
2092         (init_cutu_and_read_dies): Likewise.
2093         (init_cutu_and_read_dies_no_follow): Likewise.
2094         (allocate_type_unit_groups_table): Add objfile parameter.
2095         (create_type_unit_group): Use dwarf2_per_objfile from cu.
2096         (get_type_unit_group): Likewise.
2097         (process_psymtab_comp_unit): Update call.
2098         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2099         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2100         (print_tu_stats): Likewise.
2101         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2102         in void* parameter.
2103         (build_type_psymtabs): Change objfile parameter to
2104         dwarf2_per_objfile.
2105         (process_skeletonless_type_unit): Use dwarf2_per_objfile
2106         passed in void* parameter.
2107         (process_skeletonless_type_units): Change objfile parameter to
2108         dwarf2_per_objfile.
2109         (set_partial_user): Likewise.
2110         (dwarf2_build_psymtabs_hard): Likewise.
2111         (read_comp_units_from_section): Likewise.
2112         (create_all_comp_units): Likewise.
2113         (scan_partial_symbols): Update calls.
2114         (add_partial_symbol): Likewise.
2115         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2116         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2117         (process_queue): Add dwarf2_per_objfile parameter.
2118         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2119         (compute_compunit_symtab_includes): Likewise.
2120         (process_cu_includes): Add dwarf2_per_objfile parameter.
2121         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2122         (process_full_type_unit): Likewise.
2123         (process_imported_unit_die): Update call.
2124         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2125         (read_file_scope): Likewise.
2126         (allocate_dwo_file_hash_table): Add objfile parameter.
2127         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2128         (create_cus_hash_table): Likewise.
2129         (create_dwp_hash_table): Likewise.
2130         (create_dwo_unit_in_dwp_v1): Likewise.
2131         (create_dwp_v2_section): Likewise.
2132         (create_dwo_unit_in_dwp_v2): Likewise.
2133         (lookup_dwo_unit_in_dwp): Likewise.
2134         (try_open_dwop_file): Likewise.
2135         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2136         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2137         cleanup to include a reference to dwarf2_per_objfile.
2138         (open_dwp_file): Add dwarf2_per_objfile parameter.
2139         (open_and_init_dwp_file): Likewise.
2140         (get_dwp_file): Likewise.
2141         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2142         (queue_and_load_all_dwo_tus): Update call.
2143         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2144         data.
2145         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2146         (dwarf2_ranges_process): Likewise.
2147         (dwarf2_get_pc_bounds): Likewise.
2148         (mark_common_block_symbol_computed): Likewise.
2149         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2150         (dwarf2_read_abbrevs): Update call.
2151         (read_partial_die): Use dwarf2_per_objfile from cu.
2152         (find_partial_die): Likewise.
2153         (fixup_partial_die): Likewise.
2154         (read_attribute_value): Likewise.
2155         (read_indirect_string_at_offset_from): Add objfile parameter.
2156         (read_indirect_string_at_offset): Add dwarf2_per_objfile
2157         parameter.
2158         (read_indirect_string_from_dwz): Add objfile parameter.
2159         (read_indirect_string): Add objfile parameter.
2160         (read_addr_index_1): Add dwarf2_per_objfile parameter.
2161         (read_addr_index): Use dwarf2_per_objfile from cu.
2162         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2163         call dw2_setup.
2164         (read_str_index): Use dwarf2_per_objfile from cu.
2165         (get_debug_line_section): Likewise.
2166         (read_formatted_entries): Add dwarf2_per_objfile parameter.
2167         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2168         (new_symbol_full): Use dwarf2_per_objfile from cu.
2169         (build_error_marker_type): Likewise.
2170         (lookup_die_type): Likewise.
2171         (determine_prefix): Likewise.
2172         (follow_die_offset): Likewise.
2173         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2174         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2175         (dwarf2_fetch_die_type_sect_off): Likewise.
2176         (dwarf2_get_die_type): Likewise.
2177         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2178         (get_signatured_type): Likewise.
2179         (get_DW_AT_signature_type): Likewise.
2180         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2181         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2182         (cu_debug_loc_section): Likewise.
2183         (fill_in_loclist_baton): Likewise.
2184         (dwarf2_symbol_mark_computed): Likewise.
2185         (dwarf2_find_containing_comp_unit): Change objfile parameter to
2186         dwarf2_per_objfile.
2187         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2188         parameter.
2189         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2190         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2191         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2192         (set_die_type): Use dwarf2_free_objfile from cu.
2193         (get_die_type_at_offset): Likewise.
2194         (dwarf2_per_objfile_free): Don't assign global variable.
2195         (debug_names) <constructor>: Add dwarf2_per_objfile
2196         parameter, update m_debugstrlookup construction.
2197         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2198         parameter.
2199         <m_dwarf2_per_objfile>: New field.
2200         <lookup>: Use m_dwarf2_per_objfile.
2201         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2202         (psyms_seen_size): Likewise.
2203         (write_gdbindex): Replace objfile parameter with
2204         dwarf2_per_objfile.
2205         (write_debug_names): Likewise.
2206         (write_psymtabs_to_index): Likewise.
2207         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2208         calls.
2209
2210 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2211
2212         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2213         <dwarf2_per_objfile>: New field.
2214         (struct dwarf2_per_cu_data) <objfile>: Remove.
2215         <dwarf2_per_objfile>: New field.
2216         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2217         of objfile.
2218         (create_signatured_type_table_from_index): Likewise.
2219         (create_debug_type_hash_table): Likewise.
2220         (fill_in_sig_entry_from_dwo_entry): Likewise.
2221         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2222         (create_type_unit_group): Assign dwarf2_per_objfile instead of
2223         objfile.
2224         (create_partial_symtab): Access objfile through
2225         dwarf2_per_objfile.
2226         (process_psymtab_comp_unit_reader): Likewise.
2227         (read_comp_units_from_section): Likewise.
2228         (scan_partial_symbols): Likewise.
2229         (add_partial_symbol): Likewise.
2230         (add_partial_subprogram): Likewise.
2231         (peek_die_abbrev): Likewise.
2232         (fixup_go_packaging): Likewise.
2233         (process_full_comp_unit): Likewise.
2234         (process_full_type_unit): Likewise.
2235         (process_imported_unit_die): Likewise.
2236         (dwarf2_compute_name): Likewise.
2237         (dwarf2_physname): Likewise.
2238         (read_import_statement): Likewise.
2239         (create_cus_hash_table): Assign dwarf2_physname instead of
2240         objfile.
2241         (read_func_scope): Access objfile through dwarf2_per_objfile.
2242         (read_lexical_block_scope): Likewise.
2243         (read_call_site_scope): Likewise.
2244         (read_variable): Likewise.
2245         (dwarf2_rnglists_process): Likewise.
2246         (dwarf2_ranges_process): Likewise.
2247         (dwarf2_ranges_read): Likewise.
2248         (dwarf2_record_block_ranges): Likewise.
2249         (dwarf2_add_field): Likewise.
2250         (dwarf2_add_member_fn): Likewise.
2251         (read_structure_type): Likewise.
2252         (process_structure_scope): Likewise.
2253         (read_enumeration_type): Likewise.
2254         (read_array_type): Likewise.
2255         (read_common_block): Likewise.
2256         (read_namespace_type): Likewise.
2257         (read_namespace): Likewise.
2258         (read_module_type): Likewise.
2259         (read_tag_pointer_type): Likewise.
2260         (read_tag_ptr_to_member_type): Likewise.
2261         (read_tag_string_type): Likewise.
2262         (read_subroutine_type): Likewise.
2263         (read_typedef): Likewise.
2264         (read_base_type): Likewise.
2265         (attr_to_dynamic_prop): Likewise.
2266         (read_subrange_type): Likewise.
2267         (read_unspecified_type): Likewise.
2268         (load_partial_dies): Likewise.
2269         (read_partial_die): Likewise.
2270         (find_partial_die): Likewise.
2271         (guess_partial_die_structure_name): Likewise.
2272         (fixup_partial_die): Likewise.
2273         (read_attribute_value): Likewise.
2274         (read_addr_index_from_leb128): Likewise.
2275         (dwarf2_read_addr_index): Likewise.
2276         (dwarf2_string_attr): Likewise.
2277         (lnp_state_machine::check_line_address): Likewise.
2278         (dwarf_decode_lines_1): Likewise.
2279         (dwarf_decode_lines): Likewise.
2280         (dwarf2_start_symtab): Likewise.
2281         (var_decode_location): Likewise.
2282         (new_symbol_full): Likewise.
2283         (dwarf2_const_value_data): Likewise.
2284         (dwarf2_const_value_attr): Likewise.
2285         (dwarf2_const_value): Likewise.
2286         (die_type): Likewise.
2287         (die_containing_type): Likewise.
2288         (lookup_die_type): Likewise.
2289         (guess_full_die_structure_name): Likewise.
2290         (anonymous_struct_prefix): Likewise.
2291         (dwarf2_name): Likewise.
2292         (follow_die_ref_or_sig): Likewise.
2293         (follow_die_offset): Likewise.
2294         (follow_die_ref): Likewise.
2295         (dwarf2_fetch_die_loc_sect_off): Likewise.
2296         (dwarf2_fetch_constant_bytes): Likewise.
2297         (dwarf2_fetch_die_type_sect_off): Likewise.
2298         (dwarf2_get_die_type): Likewise.
2299         (follow_die_sig): Likewise.
2300         (decode_locdesc): Likewise.
2301         (dwarf2_per_cu_objfile): Likewise.
2302         (dwarf2_per_cu_text_offset): Likewise.
2303         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2304         objfile.
2305         (set_die_type): Access objfile through
2306         dwarf2_per_objfile.
2307
2308 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2309
2310         * valprint.c (converted_character_d): Remove typedef.
2311         (DEF_VEC_O (converted_character_d)): Remove.
2312         (count_next_character): Use std::vector.
2313         (print_converted_chars_to_obstack): Likewise.
2314         (generic_printstr): Likewise.
2315
2316 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2317
2318         * xml-support.h (struct gdb_xml_value): Add constructor.
2319         <value>: Change type to unique_xmalloc_ptr.
2320         (gdb_xml_value_s): Remove typedef.
2321         (DEF_VEC_O (gdb_xml_value_s)): Remove.
2322         (gdb_xml_element_start_handler): Change parameter type to
2323         std::vector.
2324         (xml_find_attribute): Likewise.
2325         * xml-support.c (xml_find_attribute): Change parameter type to
2326         std::vector and adjust.
2327         (gdb_xml_values_cleanup): Remove.
2328         (gdb_xml_parser::start_element): Adjust to std::vector.
2329         (xinclude_start_include): Change paraeter type to std::vector
2330         and adjust.
2331         * btrace.c (check_xml_btrace_version): Likewise.
2332         (parse_xml_btrace_block): Likewise.
2333         (parse_xml_btrace_pt_config_cpu): Likewise.
2334         (parse_xml_btrace_pt): Likewise.
2335         (parse_xml_btrace_conf_bts): Likewise.
2336         (parse_xml_btrace_conf_pt): Likewise.
2337         * memory-map.c (memory_map_start_memory): Likewise.
2338         (memory_map_start_property): Likewise.
2339         * osdata.c (osdata_start_osdata): Likewise.
2340         (osdata_start_item): Likewise.
2341         (osdata_start_column): Likewise.
2342         * remote.c (start_thread): Likewise.
2343         * solib-aix.c (library_list_start_library): Likewise.
2344         (library_list_start_list): Likewise.
2345         * solib-svr4.c (library_list_start_library): Likewise.
2346         (svr4_library_list_start_list): Likewise.
2347         * solib-target.c (library_list_start_segment): Likewise.
2348         (library_list_start_section): Likewise.
2349         (library_list_start_library): Likewise.
2350         (library_list_start_list): Likewise.
2351         * tracepoint.c (traceframe_info_start_memory): Likewise.
2352         (traceframe_info_start_tvar): Likewise.
2353         * xml-syscall.c (syscall_start_syscall): Likewise.
2354         * xml-tdesc.c (tdesc_start_target): Likewise.
2355         (tdesc_start_feature): Likewise.
2356         (tdesc_start_reg): Likewise.
2357         (tdesc_start_union): Likewise.
2358         (tdesc_start_struct): Likewise.
2359         (tdesc_start_flags): Likewise.
2360         (tdesc_start_enum): Likewise.
2361         (tdesc_start_field): Likewise.
2362         (tdesc_start_enum_value): Likewise.
2363         (tdesc_start_vector): Likewise.
2364
2365 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2366
2367         * extension.h (struct xmethod_worker) <clone>: Remove.
2368         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2369         Remove.
2370         (python_xmethod_worker::clone): Remove.
2371         * valops.c (find_overload_match): Use std::move instead of
2372         clone.
2373
2374 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2375
2376         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2377         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2378         <free_xmethod_worker_data>: Remove.
2379         <get_matching_xmethod_workers>: Chance VEC to std::vector.
2380         <get_xmethod_arg_types>: Remove.
2381         <get_xmethod_result_type>: Remove.
2382         <invoke_xmethod>: Remove.
2383         * extension.c (new_xmethod_worker): Remove.
2384         (clone_xmethod_worker): Remove.
2385         (get_matching_xmethod_workers): Return void, pass std::vector by
2386         pointer.
2387         (get_xmethod_arg_types): Rename to...
2388         (xmethod_worker::get_arg_types): ... this, and adjust.
2389         (get_xmethod_result_type): Rename to...
2390         (xmethod_worker::get_result_type): ... this, and adjust.
2391         (invoke_xmethod): Remove.
2392         (free_xmethod_worker): Remove.
2393         (free_xmethod_worker_vec): Remove.
2394         * extension.h (enum ext_lang_rc): Move here from
2395         extension-priv.h.
2396         (struct xmethod_worker): Add constructor and destructor.
2397         <data>: Remove.
2398         <value>: Remove.
2399         <invoke, clone, do_get_result_type, do_get_arg_types>: New
2400         virtual pure methods.
2401         <get_arg_types, get_result_type>: New methods.
2402         (xmethod_worker_ptr): Remove typedef.
2403         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2404         (xmethod_worker_vec): Remove typedef.
2405         (xmethod_worker_up): New typedef.
2406         (invoke_xmethod): Remove.
2407         (clone_xmethod_worker): Remove.
2408         (free_xmethod_worker): Remove.
2409         (free_xmethod_worker_vec): Remove.
2410         (get_xmethod_arg_types): Remove.
2411         (get_xmethod_result_type): Remove.
2412         * valops.c (find_method_list): Use std::vector, don't use
2413         intermediate vector.
2414         (value_find_oload_method_list): Use std::vector.
2415         (find_overload_match): Use std::vector.
2416         (find_oload_champ): Use std::vector.
2417         * value.c (value_free): Use operator delete.
2418         (value_of_xmethod): Rename to...
2419         (value_from_xmethod): ... this.  Don't assign
2420         xmethod_worker::value, take rvalue-reference.
2421         (result_type_of_xmethod): Adjust.
2422         (call_xmethod): Adjust.
2423         * value.h: Include extension.h.
2424         (struct xmethod_worker): Don't forward-declare.
2425         (value_of_xmethod): Rename to...
2426         (value_from_xmethod): ... this, take rvalue-reference.
2427         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2428         (struct python_xmethod_worker): ... this, add constructor and
2429         destructor.
2430         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2431         (gdbpy_free_xmethod_worker_data): Rename to...
2432         (python_xmethod_worker::~python_xmethod_worker): ... this and
2433         adjust.
2434         (gdbpy_clone_xmethod_worker_data): Rename to...
2435         (python_xmethod_worker::clone): ... this and adjust.
2436         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2437         temporary vector.
2438         (gdbpy_get_xmethod_arg_types): Rename to...
2439         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2440         (gdbpy_get_xmethod_result_type): Rename to...
2441         (python_xmethod_worker::do_get_result_type): ... this and
2442         adjust.
2443         (gdbpy_invoke_xmethod): Rename to...
2444         (python_xmethod_worker::invoke): ... this and adjust.
2445         (new_python_xmethod_worker): Rename to...
2446         (python_xmethod_worker::python_xmethod_worker): ... this and
2447         adjust.
2448         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2449         Remove.
2450         (gdbpy_free_xmethod_worker_data): Remove.
2451         (gdbpy_get_matching_xmethod_workers): Use std::vector.
2452         (gdbpy_get_xmethod_arg_types): Remove.
2453         (gdbpy_get_xmethod_result_type): Remove.
2454         (gdbpy_invoke_xmethod): Remove.
2455         * python/python.c (python_extension_ops): Remove obsolete
2456         callbacks.
2457
2458 2018-01-05  Pedro Alves  <palves@redhat.com>
2459
2460         PR gdb/18653
2461         * common/signals-state-save-restore.c
2462         (save_original_signals_state): New parameter 'quiet'.  Warn if we
2463         find a custom handler preinstalled, instead of internal erroring.
2464         But only warn if !quiet.
2465         * common/signals-state-save-restore.h
2466         (save_original_signals_state): New parameter 'quiet'.
2467         * main.c (captured_main_1): Move save_original_signals_state call
2468         after option handling, and pass QUIET.
2469
2470 2018-01-05  Pedro Alves  <palves@redhat.com>
2471
2472         * spu-tdep.c (spu_catch_start): Pass
2473         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2474
2475 2018-01-05  Pedro Alves  <palves@redhat.com>
2476
2477         PR gdb/22670
2478         * ada-lang.c (literal_symbol_name_matcher): New function.
2479         (ada_get_symbol_name_matcher): Use it for
2480         symbol_name_match_type::SEARCH_NAME.
2481         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
2482         it down instead of assuming symbol_name_match_type::FULL.
2483         * block.h (block_lookup_symbol): New parameter 'match_type'.
2484         * c-valprint.c (print_unpacked_pointer): Use
2485         lookup_symbol_search_name instead of lookup_symbol.
2486         * compile/compile-object-load.c (get_out_value_type): Pass down
2487         symbol_name_match_type::SEARCH_NAME.
2488         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2489         symbol_name_match_type::FULL.
2490         * cp-support.c (cp_get_symbol_name_matcher): Handle
2491         symbol_name_match_type::SEARCH_NAME.
2492         * infrun.c (insert_exception_resume_breakpoint): Use
2493         lookup_symbol_search_name.
2494         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
2495         * psymtab.c (maintenance_check_psymtabs): Use
2496         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
2497         * stack.c (print_frame_args): Use lookup_symbol_search_name and
2498         SYMBOL_SEARCH_NAME.
2499         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
2500         if symbol_name_match_type::SEARCH_NAME.
2501         (lookup_symbol_in_language): Pass down
2502         symbol_name_match_type::FULL.
2503         (lookup_symbol_search_name): New.
2504         (lookup_language_this): Pass down
2505         symbol_name_match_type::SEARCH_NAME.
2506         (lookup_symbol_aux, lookup_local_symbol): New parameter
2507         'match_type'.  Pass it down.
2508         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
2509         (lookup_symbol_search_name): New declaration.
2510         (lookup_symbol_in_block): New 'match_type' parameter.
2511
2512 2018-01-05  Pedro Alves  <palves@redhat.com>
2513
2514         PR gdb/22670
2515         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
2516         ada_lookup_symbol.
2517         (ada_lookup_symbol): Reimplement in terms of
2518         ada_lookup_symbol_list, bits factored out from
2519         ada_lookup_encoded_symbol.
2520
2521 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
2522
2523         * ada-exp.y (write_object_renaming): When subscripting an array
2524         using a symbol as the index, pass the block in call to
2525         ada_lookup_encoded_symbol when looking that symbol up.
2526
2527 2018-01-05  Jerome Guitton  <guitton@adacore.com>
2528
2529         * ada-lang.c (ada_array_length): Use ada_index_type instead of
2530         TYPE_INDEX_TYPE.
2531
2532 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
2533
2534         * ada-lang.c (ada_to_fixed_value_create): Add handling of
2535         the case where VALUE_LVAL (val0) is not lval_memory.
2536
2537 2018-01-05  Xavier Roirand  <roirand@adacore.com>
2538
2539         * ada-valprint.c (print_optional_low_bound): Handle
2540         character-indexed array printing like boolean-indexed array
2541         printing.
2542
2543 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
2544
2545         * NEWS: Create a new section for the next release branch.
2546         Rename the section of the current branch, now that it has
2547         been cut.
2548
2549 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
2550
2551         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
2552         * version.in: Bump version to 8.1.50.DATE-git.
2553
2554 2018-01-03  Xavier Roirand  <roirand@adacore.com>
2555
2556         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
2557         Add field.
2558         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
2559         Add field.
2560         (default_exception_support_info) <catch_handlers_sym>: Add field.
2561         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
2562         (ada_exception_name_addr_1): Add "catch handlers" handling.
2563         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
2564         Update all callers.
2565         (create_excep_cond_exprs) <ex>: Add parameter.
2566         (re_set_exception): Update create_excep_cond_exprs call.
2567         (print_it_exception, print_one_exception, print_mention_exception)
2568         (print_recreate_exception): Add "catch handler" handling.
2569         (allocate_location_catch_handlers, re_set_catch_handlers)
2570         (check_status_catch_handlers, print_it_catch_handlers)
2571         (print_one_catch_handlers, print_mention_catch_handlers)
2572         (print_recreate_catch_handlers): New function.
2573         (catch_handlers_breakpoint_ops): New variable.
2574         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
2575         Add parameter.  Add "catch handler" handling.
2576         (ada_exception_sym_name, ada_exception_breakpoint_ops):
2577         Add "catch handler" handling.
2578         (ada_exception_catchpoint_cond_string): Add "catch handler"
2579         handling.
2580         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
2581         call.
2582         (catch_ada_handlers_command): New function.
2583         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
2584         operations structure.
2585         (_initialize_ada_language): Add "catch handlers" command entry.
2586         * NEWS: Document "catch handlers" feature.
2587
2588 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
2589
2590         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
2591         account when creating the array type of the slice.
2592         (ada_value_slice): Likewise.
2593
2594 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
2595
2596         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
2597         New enum value.
2598         (create_array_type_with_stride): Add byte_stride_prop parameter.
2599         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
2600         New parameter.  Update all callers in this file.
2601         (array_type_has_dynamic_stride): New function.
2602         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
2603         of arrays with dynamic byte strides.
2604         * dwarf2read.c (read_array_type): Add support for dynamic
2605         DW_AT_byte_stride attributes.
2606
2607 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
2608
2609         * dwarf2read.c (read_unspecified_type): Treat
2610         DW_TAG_enumeration_type DIEs from Ada units as stubs.
2611
2612 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
2613
2614         Update copyright year range in all GDB files.
2615
2616 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
2617
2618         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
2619         and gdb/testsuite/gdb.base/step-line.c.
2620
2621 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
2622
2623         * copyright.py (main): Dump the contents of
2624         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
2625         even if BY_HAND is empty.
2626
2627 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
2628
2629         * top.c (print_gdb_version): Update Copyright year in version
2630         message.
2631
2632 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
2633
2634         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
2635
2636 For older changes see ChangeLog-2017.
2637 \f
2638 Local Variables:
2639 mode: change-log
2640 left-margin: 8
2641 fill-column: 74
2642 version-control: never
2643 coding: utf-8
2644 End: