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