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