Fix dwarf2read.c:dwarf2_find_containing_comp_unit's binary search
[external/binutils.git] / gdb / ChangeLog
1 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
2             Keith Seitz  <keiths@redhat.com>
3             Tom Tromey  <tom@tromey.com>
4             Sergio Durigan Junior  <sergiodj@redhat.com>
5
6         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
7         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
8         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
9         inside the CU.
10
11 2018-11-30  Pedro Alves  <palves@redhat.com>
12
13         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
14         <stratum>: New override.
15         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
16         <stratum>: New override.
17         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
18         <stratum>: New override.
19         * exec.c (exec_target) <exec_target>: Delete.
20         <stratum>: New override.
21         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
22         stratum method instead of the to_stratum field.
23         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
24         <stratum>: New override.
25         (thread_db_target::thread_db_target): Delete.
26         * make-target-delegates (print_class): Don't print a ctor
27         declaration.  Print a stratum method override declaration.
28         * process-stratum-target.h (process_stratum_target)
29         <process_stratum_target>: Delete.
30         <stratum>: New override.
31         * ravenscar-thread.c (ravenscar_thread_target)
32         <ravenscar_thread_target>: Delete.
33         <stratum>: New override.
34         * record-btrace.c (record_btrace_target)
35         <record_btrace_target>: Delete.
36         <stratum>: New override.
37         * record-full.c (record_full_base_target)
38         <record_full_base_target>: Delete.
39         <stratum>: New override.
40         * record.c (record_disconnect, record_detach)
41         (record_mourn_inferior, record_kill): Adjust to use the stratum
42         method instead of the to_stratum field.
43         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
44         * sol-thread.c (sol_thread_target)
45         <sol_thread_target>: Delete.
46         <stratum>: New override.
47         * spu-multiarch.c (spu_multiarch_target)
48         <spu_multiarch_target>: Delete.
49         <stratum>: New override.
50         * target-delegates.c: Regenerate.
51         * target.c (target_stack::push, target_stack::unpush)
52         (pop_all_targets_above, pop_all_targets_at_and_above)
53         (info_target_command, target_require_runnable)
54         (target_stack::find_beneath): Adjust to use the stratum method
55         instead of the to_stratum field.
56         (dummy_target::dummy_target): Delete.
57         (dummy_target::stratum): New.
58         (debug_target::debug_target): Delete.
59         (debug_target::stratum): New.
60         (maintenance_print_target_stack): Adjust to use the stratum method
61         instead of the to_stratum field.
62         * target.h (struct target_ops) <stratum>: New method.
63         <to_stratum>: Delete.
64         <is_pushed>: Adjust to use the stratum method
65         instead of the to_stratum field.
66
67 2018-11-30  Pedro Alves  <palves@redhat.com>
68
69         * corelow.c (core_target) <has_all_memory, has_execution>: New
70         overrides.
71         * inf-child.c (inf_child_target::has_all_memory)
72         (inf_child_target::has_memory, inf_child_target::has_stack)
73         (inf_child_target::has_registers)
74         (inf_child_target::has_execution): Delete.
75         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
76         has_stack, has_registers, has_execution>: Delete.
77         * process-stratum-target.c
78         (process_stratum_target::has_all_memory)
79         (process_stratum_target::has_memory)
80         (process_stratum_target::has_stack)
81         (process_stratum_target::has_registers)
82         (process_stratum_target::has_execution): New.
83         * process-stratum-target.h (process_stratum_target)
84         <has_all_memory, has_memory, has_stack, has_registers,
85         has_execution>: New method overrides.
86         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
87         has_memory, has_stack, has_registers, has_execution>: Delete.
88         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
89         has_execution>: Delete.
90         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
91         has_registers, has_execution>: Delete.
92         * target.c (default_child_has_all_memory)
93         (default_child_has_memory, default_child_has_stack)
94         (default_child_has_registers, default_child_has_execution):
95         Delete.
96         * target.h (default_child_has_all_memory)
97         (default_child_has_memory, default_child_has_stack)
98         (default_child_has_registers, default_child_has_execution):
99         Delete.
100         * tracefile.h (tracefile_target) <has_execution>: New override.
101
102 2018-11-30  Pedro Alves  <palves@redhat.com>
103
104         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
105         * bsd-kvm.c: Include "process-stratum-target.h".
106         (bsd_kvm_target): Now inherits from process_stratum_target.
107         (bsd_kvm_target::bsd_kvm_target): Default it.
108         * corelow.c: Include "process-stratum-target.h".
109         (core_target): Now inherits from process_stratum_target.
110         (core_target::core_target): Don't set to_stratum here.
111         * inf-child.c (inf_child_target::inf_child_target): Delete.
112         * inf-child.h: Include "process-stratum-target.h".
113         (inf_child_target): Inherit from process_stratum_target.
114         (inf_child_target) <inf_child_target>: Default it.
115         <can_async_p, supports_non_stop, supports_disable_randomization>:
116         Delete overrides.
117         * process-stratum-target.c: New file.
118         * process-stratum-target.h: New file.
119         * remote-sim.c: Include "process-stratum-target.h".
120         (gdbsim_target): Inherit from process_stratum_target.
121         <gdbsim_target>: Default it.
122         * remote.c: Include "process-stratum-target.h".
123         (remote_target): Inherit from process_stratum_target.
124         <remote_target>: Default it.
125         * target.c (default_thread_address_space)
126         (default_thread_architecture): Delete.
127         * target.h (target_ops) <thread_architecture>: Now returns NULL by
128         default.
129         <thread_address_space>: Ditto.
130         * test-target.h: Include "process-stratum-target.h" instead of
131         "target.h".
132         (test_target_ops): Inherit from process_stratum_target.
133         <test_target_ops>: Default it.
134         * tracefile.c (tracefile_target::tracefile_target): Delete.
135         * tracefile.h: Include "process-stratum-target.h".
136         (tracefile_target): Inherit from process_stratum_target.
137         <tracefile_target>: Default it.
138         * target-delegates.c: Regenerate.
139
140 2018-11-30  Pedro Alves  <palves@redhat.com>
141
142         * Makefile.in (COMMON_SFILES): Add test-target.c.
143         * gdbarch-selftests.c: Include "test-target.h".
144         * regcache.c: Include "test-target.h".
145         * target.c (test_target_info, test_target_ops::info): Move to ...
146         * test-target.c: ... this new file.
147         * target.h (test_target_ops): Move to ...
148         * test-target.h: ... this new file.
149
150 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
151
152         * source.c (forward_search_command): Fix leak by using
153         xrealloc even for the first allocation in the loop, as buf
154         is static.
155
156 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
157
158         PR gdb/23093
159         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
160         (fbsd_gdb_signal_to_target): New.
161         (fbsd_init_abi): Install gdbarch "signal_from_target" and
162         "signal_to_target" methods.
163
164 2018-11-29  Tom Tromey  <tom@tromey.com>
165
166         * valarith.c (value_x_unop): Don't set argvec[3].
167
168 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
169
170         PR gdb/23917
171         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
172         semicolon.
173
174 2018-11-26  Pedro Alves  <palves@redhat.com>
175
176         * procfs.c (procfs_notice_thread): Replace uses of
177         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
178         * sol-thread.c (sol_thread_target::wait)
179         (sol_update_thread_list_callback): Likewise.
180
181 2018-11-25  Tom Tromey  <tom@tromey.com>
182
183         * ui-out.c (ui_out::field_fmt): Remove comment.
184         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
185         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
186
187 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
188
189         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
190         leak in open_source_file' has been partially undone by '2179fbc36d23
191         Return scoped_fd from open_source_file'. Re-add the transfer of
192         current s->fullname to the unique_xmalloc_ptr fullname given
193         to find_and_open_source.
194
195 2018-11-23  Pedro Alves  <palves@redhat.com>
196
197         * gdbthread.h (enum thread_state): Move comments here.
198         (is_running, is_stopped, is_exited): Remove declarations.
199
200 2018-11-22  Pedro Alves  <palves@redhat.com>
201
202         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
203         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
204         ALL_NON_EXITED_THREADS with all_non_exited_threads.
205         (print_one_breakpoint_location): Replace ALL_INFERIORS with
206         all_inferiors.
207         * bsd-kvm.c: Include inferior.h.
208         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
209         with all_non_exited_threads.
210         * common/filtered-iterator.h: New.
211         * common/safe-iterator.h: New.
212         * corelow.c (core_target_open): Don't call init_thread_list here.
213         * darwin-nat.c (thread_info_from_private_thread_info): Replace
214         ALL_THREADS with all_threads.
215         * fbsd-nat.c (fbsd_nat_target::resume): Replace
216         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
217         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
218         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
219         * fork-child.c (postfork_hook): Don't call init_thread_list here.
220         * gdbarch-selftests.c (register_to_value_test): Adjust.
221         * gdbthread.h: Don't include "inferior.h" here.
222         (struct inferior): Forward declare.
223         (enum step_over_calls_kind): Moved here from inferior.h.
224         (thread_info::deletable): Definition moved to thread.c.
225         (find_thread_ptid (inferior *, ptid_t)): Declare.
226         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
227         Include "thread-iter.h".
228         (all_threads, all_non_exited_threads, all_threads_safe): New.
229         (any_thread_p): Declare.
230         (thread_list): Delete.
231         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
232         all_non_exited_threads.
233         (proceed_after_attach_callback): Delete.
234         (proceed_after_attach): Take an inferior pointer instead of an
235         integer PID.  Adjust to use range-for.
236         (attach_post_wait): Pass down inferior pointer instead of pid.
237         Use range-for instead of ALL_NON_EXITED_THREADS.
238         (detach_command): Remove init_thread_list call.
239         * inferior-iter.h: New.
240         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
241         (delete_thread_of_inferior): Delete.
242         (delete_inferior, exit_inferior_1): Use range-for with
243         inf->threads_safe() instead of iterate_over_threads.
244         (inferior_appeared): Call init_thread_list here.
245         (discard_all_inferiors): Use all_non_exited_inferiors.
246         (find_inferior_id, find_inferior_pid): Use all_inferiors.
247         (iterate_over_inferiors): Use all_inferiors_safe.
248         (have_inferiors, number_of_live_inferiors): Use
249         all_non_exited_inferiors.
250         (number_of_inferiors): Use all_inferiors and std::distance.
251         (print_inferior): Use all_inferiors.
252         * inferior.h: Include gdbthread.h.
253         (enum step_over_calls_kind): Moved to gdbthread.h.
254         (struct inferior) <thread_list>: New field.
255         <threads, non_exited_threads, threads_safe>: New methods.
256         (ALL_INFERIORS): Delete.
257         Include "inferior-iter.h".
258         (ALL_NON_EXITED_INFERIORS): Delete.
259         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
260         functions.
261         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
262         ALL_NON_EXITED_THREADS with all_non_exited_threads.
263         * infrun.c (follow_exec): Use all_threads_safe.
264         (clear_proceed_status, proceed): Use all_non_exited_threads.
265         (init_wait_for_inferior): Don't clear inline frame state here.
266         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
267         all_threads instead of ALL_NON_EXITED_THREADS.
268         (random_pending_event_thread): Use all_non_exited_threads instead
269         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
270         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
271         instead of ALL_NON_EXITED_THREADS.
272         (handle_no_resumed): Use all_non_exited_threads instead of
273         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
274         ALL_INFERIORS.
275         (restart_threads, switch_back_to_stepped_thread): Use
276         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
277         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
278         all_inferiors.
279         (kill_unfollowed_fork_children): Use inf->non_exited_threads
280         instead of ALL_NON_EXITED_THREADS.
281         * linux-tdep.c (linux_make_corefile_notes): Use
282         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
283         * linux-thread-db.c (thread_db_target::update_thread_list):
284         Replace ALL_INFERIORS with all_inferiors.
285         (thread_db_target::thread_handle_to_thread_info): Use
286         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
287         * mi/mi-interp.c (multiple_inferiors_p): New.
288         (mi_on_resume_1): Simplify using all_non_exited_threads and
289         multiple_inferiors_p.
290         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
291         instead of ALL_NON_EXITED_THREADS.
292         * nto-procfs.c (nto_procfs_target::open): Don't call
293         init_thread_list here.
294         * record-btrace.c (record_btrace_target_open)
295         (record_btrace_target::stop_recording)
296         (record_btrace_target::close)
297         (record_btrace_target::record_is_replaying)
298         (record_btrace_target::resume, record_btrace_target::wait)
299         (record_btrace_target::record_stop_replaying): Use
300         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
301         * record-full.c (record_full_wait_1): Use all_non_exited_threads
302         instead of ALL_NON_EXITED_THREADS.
303         * regcache.c (cooked_read_test): Remove reference to global
304         thread_list.
305         * remote-sim.c (gdbsim_target::create_inferior): Don't call
306         init_thread_list here.
307         * remote.c (remote_target::update_thread_list): Use
308         all_threads_safe instead of ALL_NON_EXITED_THREADS.
309         (remote_target::process_initial_stop_replies): Replace
310         ALL_INFERIORS with all_non_exited_inferiors and use
311         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
312         (remote_target::open_1): Don't call init_thread_list here.
313         (remote_target::append_pending_thread_resumptions)
314         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
315         instead of ALL_NON_EXITED_THREADS.
316         (remote_target::commit_resume)
317         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
318         with all_non_exited_inferiors and use all_non_exited_threads
319         instead of ALL_NON_EXITED_THREADS.
320         (remote_target::kill_new_fork_children): Use
321         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
322         init_thread_list and init_wait_for_inferior calls.
323         (remote_target::remote_btrace_maybe_reopen)
324         (remote_target::thread_handle_to_thread_info): Use
325         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
326         * target.c (target_terminal::restore_inferior)
327         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
328         all_non_exited_inferiors.
329         * thread-iter.c: New file.
330         * thread-iter.h: New file.
331         * thread.c: Include "inline-frame.h".
332         (thread_list): Delete.
333         (clear_thread_inferior_resources): Call clear_inline_frame_state.
334         (init_thread_list): Use all_threads_safe instead of
335         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
336         (new_thread): Adjust to per-inferior thread lists.
337         (add_thread_silent): Pass inferior to find_thread_ptid.
338         (thread_info::deletable): New, moved from the header.
339         (delete_thread_1): Adjust to per-inferior thread lists.
340         (find_thread_global_id): Use inf->threads().
341         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
342         find_thread_ptid.
343         (find_thread_ptid(inferior*, ptid_t)): New overload.
344         (iterate_over_threads): Use all_threads_safe.
345         (any_thread_p): New.
346         (thread_count): Use all_threads and std::distance.
347         (live_threads_count): Use all_non_exited_threads and
348         std::distance.
349         (valid_global_thread_id): Use all_threads.
350         (in_thread_list): Use find_thread_ptid.
351         (first_thread_of_inferior): Adjust to per-inferior thread lists.
352         (any_thread_of_inferior, any_live_thread_of_inferior): Use
353         inf->non_exited_threads().
354         (prune_threads, delete_exited_threads): Use all_threads_safe.
355         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
356         (set_resumed, set_running): Use all_non_exited_threads.
357         (is_thread_state, is_stopped, is_exited, is_running)
358         (is_executing): Delete.
359         (set_executing, set_stop_requested, finish_thread_state): Use
360         all_non_exited_threads.
361         (print_thread_info_1): Use all_inferiors and all_threads.
362         (thread_apply_all_command): Use all_non_exited_threads.
363         (thread_find_command): Use all_threads.
364         (update_threads_executing): Use all_non_exited_threads.
365         * tid-parse.c (parse_thread_id): Use inf->threads.
366         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
367
368 2018-11-22  Pedro Alves  <palves@redhat.com>
369
370         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
371         switch to it before calling into try_open_exec_file.
372
373 2018-11-22  Pedro Alves  <palves@redhat.com>
374
375         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
376         inferior_thread instead of find_thread_ptid, and only when
377         inferior_ptid is not null_ptid.
378         * inferior.c (add_inferior): Don't include target_pid_to_str
379         output when the inferior is not started.
380         * python/py-inferior.c (python_on_normal_stop): Don't use
381         find_thread_ptid.
382         (tui_on_user_selected_context_changed): Use inferior_thread
383         instead of find_thread_ptid, and only when inferior_ptid is not
384         null_ptid.
385
386 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
387
388         PR python/23714
389         * gdb/python/python.c (execute_gdb_command): Call
390         prevent_dont_repeat earlier to avoid affecting dont_repeat.
391
392 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
393
394         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
395         (HFILES_NO_SRCDIR): Add arch/riscv.h.
396         * arch/riscv.c: New file.
397         * arch/riscv.h: New file.
398         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
399         this list, and add arch/riscv.o.
400         * features/Makefile: Add riscv features.
401         * features/riscv/32bit-cpu.c: New file.
402         * features/riscv/32bit-cpu.xml: New file.
403         * features/riscv/32bit-csr.c: New file.
404         * features/riscv/32bit-csr.xml: New file.
405         * features/riscv/32bit-fpu.c: New file.
406         * features/riscv/32bit-fpu.xml: New file.
407         * features/riscv/64bit-cpu.c: New file.
408         * features/riscv/64bit-cpu.xml: New file.
409         * features/riscv/64bit-csr.c: New file.
410         * features/riscv/64bit-csr.xml: New file.
411         * features/riscv/64bit-fpu.c: New file.
412         * features/riscv/64bit-fpu.xml: New file.
413         * features/riscv/rebuild-csr-xml.sh: New file.
414         * riscv-tdep.c: Add 'arch/riscv.h' include.
415         (riscv_gdb_reg_names): Delete.
416         (csr_reggroup): New global.
417         (struct riscv_register_alias): Delete.
418         (struct riscv_register_feature): New structure.
419         (riscv_register_aliases): Delete.
420         (riscv_xreg_feature): New global.
421         (riscv_freg_feature): New global.
422         (riscv_virtual_feature): New global.
423         (riscv_csr_feature): New global.
424         (riscv_create_csr_aliases): New function.
425         (riscv_read_misa_reg): Delete.
426         (riscv_has_feature): Delete.
427         (riscv_isa_xlen): Simplify, just return cached xlen.
428         (riscv_isa_flen): Simplify, just return cached flen.
429         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
430         (riscv_register_name): Update to make use of tdesc_register_name.
431         Look up xreg and freg names in the new globals riscv_xreg_feature
432         and riscv_freg_feature.  Don't supply csr aliases here.
433         (riscv_fpreg_q_type): Delete.
434         (riscv_register_type): Use tdesc_register_type in almost all
435         cases, override the returned type in a few specific cases only.
436         (riscv_print_one_register_info): Handle errors reading registers.
437         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
438         registers that are otherwise unknown to GDB.  Also check the
439         csr_reggroup.
440         (riscv_print_registers_info): Remove assert about upper register
441         number, and use gdbarch_register_reggroup_p instead of
442         short-cutting.
443         (riscv_find_default_target_description): New function.
444         (riscv_check_tdesc_feature): New function.
445         (riscv_add_reggroups): New function.
446         (riscv_setup_register_aliases): New function.
447         (riscv_init_reggroups): New function.
448         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
449         setup register groups.  Register new riscv debug variable.
450         * riscv-tdep.h: Add 'arch/riscv.h' include.
451         (struct gdbarch_tdep): Remove abi union, and add
452         riscv_gdbarch_features field.  Remove cached quad floating point
453         type, and provide initialisation for double type field.
454         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
455         the list of targets using the feature based target descriptions.
456         * NEWS: Mention target description support.
457
458 2018-11-21  Pedro Alves  <palves@redhat.com>
459
460         * valops.c (find_method_list, value_find_oload_method_list)
461         (find_overload_match, find_oload_champ): Rename parameters and
462         locals.
463
464 2018-11-21  Pedro Alves  <palves@redhat.com>
465
466         * valops.c (find_method_list): Replace pointer and length
467         parameters with an gdb::array_view.  Adjust.
468         (value_find_oload_method_list): Likewise.
469         (find_overload_match): Use gdb::array_view for methods list.
470         Adjust to find_oload_champ interface change.
471         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
472         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
473
474 2018-11-21  Pedro Alves  <palves@redhat.com>
475
476         * gdbtypes.c (compare_badness): Change type of parameters to const
477         reference.  Adjust to badness_vector being a std::vector now.
478         (rank_function): Adjust to badness_vector being a std::vector now.
479         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
480         (LENGTH_MATCH): Delete.
481         (compare_badness): Change type of parameters to const reference.
482         (rank_function): Return a badness_vector by value now.
483         (find_overload_match): Adjust to badness_vector being a
484         std::vector now.  Remove cleanups.
485         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
486         badness_vector pointer.
487         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
488         a badness_vector pointer.  Adjust to badness_vector being a
489         std::vector now.  Remove cleanups.
490         (find_oload_champ): 'oload_champ_bv' parameter now
491         a badness_vector pointer.  Adjust to badness_vector being a
492         std::vector now.  Remove cleanups.
493
494 2018-11-21  Pedro Alves  <palves@redhat.com>
495
496         * cp-support.c (sym_return_val_size, sym_return_val_index)
497         (sym_return_val): Delete.
498         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
499         add to the vector.
500         (make_symbol_overload_list): Adjust to return a std::vector
501         instead of maintaining a global open coded vector.
502         (make_symbol_overload_list_block): Add std::vector parameter.
503         (make_symbol_overload_list_block): Rename to ...
504         (add_symbol_overload_list_block): ... this and add std::vector
505         parameter.
506         (make_symbol_overload_list_namespace): Rename to ...
507         (add_symbol_overload_list_namespace): ... this and add std::vector
508         parameter.
509         (make_symbol_overload_list_adl_namespace): Rename to ...
510         (add_symbol_overload_list_adl_namespace): ... this and add
511         std::vector parameter.
512         (make_symbol_overload_list_adl): Delete.
513         (add_symbol_overload_list_adl): New.
514         (make_symbol_overload_list_using): Rename to ...
515         (add_symbol_overload_list_using): ... this and add std::vector
516         parameter.
517         (make_symbol_overload_list_qualified): Rename to ...
518         (add_symbol_overload_list_qualified): ... this and add std::vector
519         parameter.
520         * cp-support.h: Include "common/array-view.h" and <vector>.
521         (make_symbol_overload_list): Change return type to std::vector.
522         (make_symbol_overload_list_adl): Delete declaration.
523         (add_symbol_overload_list_adl): New declaration.
524         * valops.c (find_overload_match): Local 'oload_syms' now a
525         std::vector.
526         (find_oload_champ_namespace): 'oload_syms' parameter now a
527         std::vector pointer.
528         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
529         std::vector pointer.  Adjust to new make_symbol_overload_list
530         interface.
531
532 2018-11-21  Pedro Alves  <palves@redhat.com>
533
534         * common/array-view.h (array_view::splice(size_type, size_t)): New.
535         (array_view::splice(size_type)): New.
536         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
537         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
538         std::vector.
539         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
540         * extension.h: Include "common/array-view.h".
541         (xmethod_worker::invoke): Adjust to use gdb::array_view.
542         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
543         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
544         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
545         (xmethod_worker::do_get_result_type): Adjust to use
546         gdb::array_view.
547         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
548         * gdbtypes.h: Include "common/array-view.h".
549         (rank_function): Adjust to use gdb::array_view.
550         * python/py-xmethods.c (python_xmethod_worker::invoke)
551         (python_xmethod_worker::do_get_arg_types)
552         (python_xmethod_worker::do_get_result_type)
553         (python_xmethod_worker::invoke): Adjust to new interfaces.
554         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
555         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
556         * valops.c (find_overload_match, find_oload_champ_namespace)
557         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
558         gdb:array_view and the new xmethod_worker interfaces.
559         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
560         gdb::array_view.
561         * value.h (find_overload_match, result_type_of_xmethod)
562         (call_xmethod): Adjust to use gdb::array_view.
563         * unittests/array-view-selftests.c: Add slicing tests.
564
565 2018-11-21  Pedro Alves  <palves@redhat.com>
566
567         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
568         * common/array-view.h (make_array_view): New.
569         * compile/compile-object-run.c (compile_object_run): Adjust to
570         pass an array_view.
571         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
572         * eval.c (eval_call): Adjust to pass an array_view.
573         (evaluate_subexp_standard): Adjust to pass an array_view.
574         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
575         * guile/scm-value.c (gdbscm_value_call): Likewise.
576         * infcall.c (push_dummy_code): Replace pointer + size parameters
577         with an array_view parameter.
578         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
579         adjust.
580         * infcall.h: Include "common/array-view.h".
581         (call_function_by_hand, call_function_by_hand_dummy): Replace
582         pointer + size parameters with an array_view parameter.
583         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
584         * linux-tdep.c (linux_infcall_mmap): Likewise.
585         * objc-lang.c (lookup_objc_class, lookup_child_selector)
586         (value_nsstring, print_object_command): Likewise.
587         * python/py-value.c (valpy_call): Likewise.
588         * rust-lang.c (rust_evaluate_funcall): Likewise.
589         * spu-tdep.c (flush_ea_cache): Likewise.
590         * valarith.c (value_x_binop, value_x_unop): Likewise.
591         * valops.c (value_allocate_space_in_inferior): Likewise.
592         * unittests/array-view-selftests.c (run_tests): Add
593         gdb::make_array_view test.
594
595 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
596
597         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
598         than a fixed size buffer.
599
600 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
601
602         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
603         and remove insertion of extra spaces in GDB's output.
604         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
605         Layout field into a temporary buffer, and then output it as a
606         string field.
607
608 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
609
610         * NEWS: Document the language choice done by
611         'info [types|functions|variables]|rbreak'.
612
613 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
614
615         * symtab.c (treg_matches_sym_type_name): Use
616         scoped_switch_to_sym_language_if_auto instead of local logic.
617         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
618         to switch to SYM language when language mode is auto.
619
620 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
621
622         * language.h (scoped_switch_to_sym_language_if_auto): New class.
623
624 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
625
626         * symtab.c (search_symbols): Properly check absence of type regexp
627         before entering the loop scanning the minimal symbols.
628
629 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
630
631         * s12z-tdep.c (s12z_extract_return_value): New function.
632         (inv_reg_perm) New array.
633         (s12z_return_value): Populate readbuf if non-null.
634
635 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
636
637         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
638         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
639         to MinGW fixed by Gnulib.
640         (O_NOINHERIT): Define if not defined.
641
642 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
643
644         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
645
646 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
647
648         * infrun.c (displaced_step_inferior_state) <next>: Remove.
649
650 2018-11-19  Tom Tromey  <tom@tromey.com>
651
652         * source.c (get_filename_and_charpos): Return void.
653
654 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
655
656         * skip.c (_initialize_step_skip): Fix "info skip" help.
657
658 2018-11-16  Tom Tromey  <tom@tromey.com>
659
660         PR rust/23625:
661         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
662
663 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
664
665         * infrun.c (displaced_step_inferior_states): Change type to
666         std::forward_list.
667         (get_displaced_stepping_state): Adjust.
668         (displaced_step_in_progress_any_inferior): Adjust.
669         (add_displaced_stepping_state): Adjust.
670         (remove_displaced_stepping_state): Adjust.
671
672 2018-11-18  Tom Tromey  <tom@tromey.com>
673
674         PR build/23814:
675         * target-delegates.c: Rebuild.
676         * ia64-linux-nat.c (class ia64_linux_nat_target)
677         <have_steppable_watchpoint>: Use override.  Return true, not 1.
678         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
679         "self" argument.
680         (ia64_linux_nat_target::low_new_thread): Rename.
681         (class ia64_linux_nat_target) <read_description>: Don't declare.
682         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
683         bool.
684
685 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
686
687         PR gdb/22736:
688         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
689         lang_struct_return code.
690
691 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
692
693         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
694         return_method.
695         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
696         * amd64-tdep.c (amd64_push_arguments): Likewise.
697         (amd64_push_dummy_call): Likewise.
698         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
699         * arc-tdep.c (arc_push_dummy_call): Likewise.
700         * arm-tdep.c (arm_push_dummy_call): Likewise.
701         * avr-tdep.c (avr_push_dummy_call): Likewise.
702         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
703         * cris-tdep.c (cris_push_dummy_call): Likewise.
704         * csky-tdep.c (csky_push_dummy_call): Likewise.
705         * frv-tdep.c (frv_push_dummy_call): Likewise.
706         * gdbarch.c: Regenerate.
707         * gdbarch.h: Regenerate.
708         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
709         return_method.
710         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
711         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
712         (hppa64_push_dummy_call): Likewise.
713         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
714         * i386-tdep.c (i386_push_dummy_call): Likewise.
715         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
716         * infcall.c (call_function_by_hand_dummy): Likewise.
717         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
718         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
719         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
720         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
721         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
722         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
723         * mep-tdep.c (mep_push_dummy_call): Likewise.
724         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
725         (mips_n32n64_push_dummy_call): Likewise.
726         (mips_o32_push_dummy_call): Likewise.
727         (mips_o64_push_dummy_call): Likewise.
728         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
729         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
730         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
731         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
732         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
733         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
734         (ppc64_sysv_abi_push_dummy_call): Likewise.
735         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
736         (ppc64_sysv_abi_push_dummy_call): Likewise.
737         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
738         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
739         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
740         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
741         * rx-tdep.c (rx_push_dummy_call): Likewise.
742         * s390-tdep.c (s390_push_dummy_call): Likewise.
743         * score-tdep.c (score_push_dummy_call): Likewise.
744         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
745         (sh_push_dummy_call_nofpu): Likewise.
746         * sparc-tdep.c (sparc32_store_arguments): Likewise.
747         (sparc32_push_dummy_call): Likewise.
748         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
749         (sparc64_push_dummy_call): Likewise.
750         * spu-tdep.c (spu_push_dummy_call): Likewise.
751         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
752         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
753         * v850-tdep.c (v850_push_dummy_call): Likewise.
754         * vax-tdep.c (vax_push_dummy_call): Likewise.
755         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
756         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
757
758 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
759
760         * gdbarch.sh (enum function_call_return_method): Add enum.
761         * gdbarch.h: Regenerate.
762         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
763
764 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
765
766         * unittests/copy_bitwise-selftests.c: New file.
767         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
768         (selftests::copy_bitwise_tests): Delete, moving this code to
769         unittests/copy_bitwise-selftests.c instead.
770         (_initialize_utils): Do not register copy_bitwise tests.
771         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
772         unittests/copy_bitwise-selftests.c.
773
774 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
775
776         * ada-lang.c (move_bits): Delete. Update all callers to use
777         copy_bitwise instead.
778         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
779         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
780         Move from here to utils.c.
781         (_initialize_dwarf2loc): Remove call to register copy_bitwise
782         selftests.
783         * utils.h (copy_bitwise): Add declaration.
784         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
785         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
786         Moved here from dwarf2loc.c.
787         (_initialize_utils): Register copy_bitwise selftests.
788
789 2018-11-14  Jim Wilson  <jimw@sifive.com>
790
791         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
792         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
793         then increment next_regnum if odd.
794         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
795         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
796         function type.  Pass new arg to riscv_arg_location based on function
797         type.
798         (riscv_return_value): Pass new arg to riscv_arg_location.
799
800         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
801         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
802         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
803
804         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
805         setting len.  New local align, set to max of arg align and xlen,
806         and pass to first riscv_assign_stack_location call.
807
808 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
809
810         * skip.c (complete_skip_number): New function.
811         (_initialize_step_skip): Add completers to some skip commands.
812
813 2018-11-09  Tom Tromey  <tom@tromey.com>
814
815         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
816         (struct remote_g_packet_data): Derive from allocate_on_obstack.
817         <guesses>: Now a std::vector.
818         (remote_g_packet_data_init, register_remote_g_packet_guess):
819         Update.
820         (remote_read_description_p): Update.  Return bool.
821         (remote_target::read_description): Update.
822         (struct remote_g_packet_guess): Add constructor.
823
824 2018-11-09  Tom Tromey  <tom@tromey.com>
825
826         * common/scoped_fd.h (class scoped_fd): Add move constructor and
827         move assignment operator.
828         * psymtab.c (psymtab_to_fullname): Update.
829         * source.h (open_source_file): Return scoped_fd.
830         (find_and_open_source): Likewise.
831         * source.c (open_source_file): Return scoped_fd.
832         (get_filename_and_charpos): Update.
833         (print_source_lines_base): Update.  Use scoped_fd::to_file.
834         (forward_search_command): Likewise.
835         (reverse_search_command): Likewise.
836         (find_and_open_source): Return scoped_fd.
837         * tui/tui-source.c (tui_set_source_content): Update.  Use
838         gdb_file_up.
839
840 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
841
842         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
843         overflow.
844
845 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
846
847         * configure: Regenerate.
848
849 2018-11-09  Tom de Vries  <tdevries@suse.de>
850
851         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
852         unconditionally, to set the language of the symbol.  Manage freeing
853         returned pointer using gdb::unique_xmalloc_ptr.
854
855 2018-11-08  Tom Tromey  <tom@tromey.com>
856
857         * record.c (require_record_target): Upper-case "<TAB>".
858
859 2018-11-08  Tom Tromey  <tom@tromey.com>
860
861         * python/lib/gdb/command/pretty_printers.py
862         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
863
864 2018-11-08  Tom Tromey  <tom@tromey.com>
865
866         PR gdb/23555:
867         PR gdb/23838:
868         * target.h (target_supports_terminal_ours): Return bool.
869         * target.c (target_supports_terminal_ours): Handle case where
870         current_top_target returns nullptr.  Return bool.
871
872 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
873
874         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
875         return the correct count for potential HFAs.
876
877 2018-11-08  Jan Beulich  <jbeulich@suse.com>
878
879         * i387-tdep.c (i387_supply_xsave): Split handling of
880         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
881         (i387_collect_xsave): Likewise.
882
883 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
884
885         * riscv-tdep.c (riscv_insn::decode): Update header comment.
886         (riscv_frame_this_id): Catch errors thrown while building the
887         frame cache, leave the frame id as the default, which is the outer
888         frame id.
889
890 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
891
892         * ada-lang.c (read_atcb): Only set task_info->called_task if
893         task_info->state == Entry_Caller_Sleep.
894         (print_ada_task_info): Do not check task_info->state before
895         checking task_info->called_task.
896         (info_task): Likewise.
897
898 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
899
900         * ada-tasks.c (read_atcb): Clear task_info before computing
901         the value of each of its fields.
902
903 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
904
905         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
906         NULL before dereferencing it.
907
908 2018-11-06  Tom de Vries  <tdevries@suse.de>
909
910         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
911         program headers.
912
913 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
914
915         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
916         so that it applies to uclinux as well.
917
918 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
919
920         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
921         when on AAPCS.
922
923 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
924
925         * riscv-fbsd-nat.c (getregs_supplies): Return true for
926         RISCV_CSR_SSTATUS_REGNUM.
927
928 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
929
930         * source.c (open_source_file): Fix leak by transferring the
931         current s->fullname to the unique_xmalloc_ptr fullname given
932         to find_and_open_source.
933
934 2018-11-04  Tom Tromey  <tom@tromey.com>
935
936         * varobj.c (install_default_visualizer): Update.
937         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
938         Return gdbpy_ref.
939         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
940         (find_pretty_printer_from_progspace)
941         (find_pretty_printer_from_gdb, find_pretty_printer)
942         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
943         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
944         Update.
945
946 2018-11-04  Tom Tromey  <tom@tromey.com>
947
948         * python/python.c (gdbpy_parameter_value): Update.
949         * python/python-internal.h (python_string_to_unicode)
950         (python_string_to_target_python_string)
951         (host_string_to_python_string): Return gdbpy_ref.
952         * python/py-utils.c (python_string_to_unicode)
953         (unicode_to_encoded_python_string)
954         (unicode_to_target_python_string)
955         (python_string_to_target_string)
956         (python_string_to_target_python_string): Return gdbpy_ref.
957         (python_string_to_host_string): Update.
958         (host_string_to_python_string): Return gdbpy_ref.
959         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
960         (stpy_fullname): Update.
961         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
962         Update.
963         * python/py-prettyprint.c (print_string_repr): Update.
964         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
965         (objfpy_get_build_id): Update.
966         * python/py-breakpoint.c (bppy_get_location)
967         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
968         Update.
969
970 2018-11-04  Tom Tromey  <tom@tromey.com>
971
972         * python/python-internal.h (gdb_py_object_from_longest)
973         (gdb_py_object_from_ulongest): Return gdbpy_ref.
974         * python/py-value.c (valpy_int): Update.
975         * python/py-utils.c (gdb_py_object_from_longest): Return
976         gdbpy_ref.
977         (gdb_py_object_from_ulongest): Likewise.
978         * python/py-type.c (typy_get_alignof): Update.
979         * python/py-linetable.c (ltpy_get_all_source_lines)
980         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
981         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
982
983 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
984
985         * ada-lang.c (_initialize_ada_language): Fix typo.
986
987 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
988
989         * language.c (type): Remove.
990         (_initialize_language): Remove assignment to type.
991
992 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
993
994         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
995         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
996         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
997         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
998         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
999         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1000         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1001         and aarch64-ravenscar-thread.o.
1002         * NEWS: Add entry documenting Ravenscar tasking support
1003         on AArch64 ELF.
1004
1005 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1006
1007         * symtab.c (info_functions_command): Initialize quiet flag.
1008         * stack.c (info_args_command): Likewise.
1009
1010 2018-11-01  Jim Wilson  <jimw@sifive.com>
1011
1012         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1013         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1014         debugging messages.
1015
1016 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1017
1018         * ada-lang.c (ada_watch_location_expression): New function.
1019         (ada_language_defn): Set la_watch_location_expression to
1020         ada_watch_location_expression.
1021
1022 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1023
1024         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1025
1026 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1027
1028         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1029         shifting.
1030
1031 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1032             Joel Brobecker  <brobecker@adacore.com>
1033
1034         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1035         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1036         * arm-pikeos-tdep.c: New file.
1037         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1038         embedded system.
1039         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1040
1041 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1042
1043         * common/pathstuff.c (get_standard_temp_dir): New.
1044         * common/pathstuff.h (get_standard_temp_dir): New.
1045         * config.in: Re-generate.
1046         * configure: Re-generate.
1047         * configure.ac: Don't check for mkdtemp.
1048         * gnulib/aclocal-m4-deps.mk: Re-generate.
1049         * gnulib/aclocal.m4: Re-generate.
1050         * gnulib/config.in: Re-generate.
1051         * gnulib/configure: Re-generate.
1052         * gnulib/import/Makefile.am: Re-generate.
1053         * gnulib/import/Makefile.in: Re-generate.
1054         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1055         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1056         * gnulib/import/m4/mkdtemp.m4: New file.
1057         * gnulib/import/mkdtemp.c: New file.
1058         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1059         Add mkdtemp module.
1060         * unittests/mkdir-recursive-selftests.c (test): Use
1061         get_standard_temp_dir.
1062         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1063         ifdef.
1064         * compile/compile.c (get_compile_file_tempdir): Likewise.
1065
1066 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1067
1068         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1069         (SIG_FRAME_LR_OFFSET64): New define.
1070         (SIG_FRAME_FP_OFFSET64): New define.
1071         (aix_sighandle_frame_cache): New Function.
1072         (aix_sighandle_frame_this_id): New Function.
1073         (aix_sighandle_frame_prev_register): New Function.
1074         (aix_sighandle_frame_sniffer): New Function.
1075         (aix_sighandle_frame_unwind): New global variable.
1076         (rs6000_aix_init_osabi): Install new frame unwinder.
1077
1078 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1079
1080         PR gdb/23835
1081         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1082         already defined.
1083
1084 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1085
1086         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1087
1088 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1089
1090         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1091         (producer_is_icc): New function.
1092         (check_producer): Set producer_is_icc field on dwarf2_cu.
1093         (dwarf2_init_integer_type): New function.
1094         (read_base_type): Call dwarf2_init_integer_type instead of
1095         init_integer_type in all cases.
1096         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1097         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1098         LEN is greater than 0.
1099
1100 2018-10-30  Tom Tromey  <tom@tromey.com>
1101
1102         * main.c (captured_main_1): Check return value of bfd_init.
1103
1104 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1105
1106         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1107         Adjust comments.
1108
1109 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1110
1111         * procfs.c: Include common/pathstuff.h.
1112
1113 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1114
1115         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1116         Add missing braces.  No functional change.
1117
1118 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1119
1120         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1121         to report a bad option and fix indentation.
1122         * demangle.c (demangle_command): Use report_unrecognized_option_error
1123         to report a bad option and correctly report the bad option.
1124
1125 2018-10-27  Tom Tromey  <tom@tromey.com>
1126
1127         PR cli/23364:
1128         * darwin-nat.c (copied_shell): New global.
1129         (may_have_sip): Rename from should_disable_startup_with_shell.
1130         (copy_shell_to_cache, maybe_cache_shell): New functions.
1131         (darwin_nat_target::create_inferior): Update.  Use
1132         copied_shell.
1133
1134 2018-10-27  Tom Tromey  <tom@tromey.com>
1135
1136         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1137         (run_tests): Call test_to_file.
1138         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1139         temporary files.
1140         * common/scoped_fd.h (scoped_fd::to_file): New method.
1141
1142 2018-10-27  Tom Tromey  <tom@tromey.com>
1143
1144         * unittests/scoped_mmap-selftests.c (test_normal): Use
1145         gdb_mkostemp_cloexec.
1146         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1147         Use gdb_mkostemp_cloexec.
1148         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1149         gnulib/config.in, gnulib/configure,
1150         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1151         gnulib/import/m4/gnulib-cache.m4,
1152         gnulib/import/m4/gnulib-comp.m4: Update.
1153         * gnulib/import/m4/mkostemp.m4: New file.
1154         * gnulib/import/m4/mkstemp.m4: Remove.
1155         * gnulib/import/mkostemp.c: New file.
1156         * gnulib/import/mkstemp.m4: Remove.
1157         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1158         mkstemp, add mkostemp.  Apply new patch.
1159         * gnulib/import/stdlib.in.h: Apply patch.
1160         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1161         New file.
1162         * dwarf-index-write.c (write_psymtabs_to_index): Use
1163         gdb_mkostemp_cloexec.
1164         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1165
1166 2018-10-27  Tom Tromey  <tom@tromey.com>
1167
1168         * unittests/mkdir-recursive-selftests.c: New file.
1169         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1170         unittests/mkdir-recursive-selftests.c.
1171         * dwarf-index-cache.c (mkdir_recursive): Move to
1172         common/filestuff.c.
1173         (index_cache::store): Check return value of mkdir_recursive.
1174         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1175         (_initialize_index_cache): Don't register test.
1176         * common/filestuff.h (mkdir_recursive): Declare.
1177         * common/filestuff.c (mkdir_recursive): Move from
1178         dwarf-index-cache.c.  Return bool.
1179
1180 2018-10-27  Tom Tromey  <tom@tromey.com>
1181
1182         * dwarf-index-write.c (write_psymtabs_to_index): Move
1183         make_temp_filename to common/pathstuff.c.
1184         * common/pathstuff.h (make_temp_filename): Declare.
1185         * common/pathstuff.c (make_temp_filename): New function, moved
1186         from dwarf-index-write.c.
1187
1188 2018-10-27  Tom Tromey  <tom@tromey.com>
1189
1190         * procfs.c (procfs_target::create_inferior): Use get_shell.
1191         * cli/cli-cmds.c (shell_escape): Use get_shell.
1192         * windows-nat.c (windows_nat_target::create_inferior): Use
1193         get_shell.
1194         * common/pathstuff.c (get_shell): New function.
1195         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1196         (fork_inferior): Use get_shell.
1197         * common/pathstuff.h (get_shell): Declare.
1198
1199 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1200
1201         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1202
1203 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1204
1205         * stack.c (print_variable_and_value_data): Add preg and treg.
1206         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1207         and update callers.
1208         (print_frame_arg_vars): Likewise.
1209         (prepare_reg): New function.
1210         (info_locals_command): Extract info print args and use them.
1211         (info_args_command): Likewise.
1212         (_initialize_stack): Modify on-line help.
1213         * symtab.c (treg_matches_sym_type_name): New function.
1214         (search_symbols): New arg t_regexp.
1215         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1216         (info_variables_command): Extract info print args and use them.
1217         (info_functions_command): Likewise.
1218         (info_types_command): Update call to symtab_symbol_info.
1219         (_initialize_symtab): Modify on-line help.
1220         * symtab.h (treg_matches_sym_type_name): New function.
1221         (search_symbols): New t_regexp arg.
1222
1223 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1224
1225         * cli-utils.c (extract_arg_maybe_quoted): New function.
1226         (extract_info_print_args): New function.
1227         (info_print_args_help): New function.
1228         (report_unrecognized_option_error): New function.
1229         * cli-utils.h (extract_arg_maybe_quoted): New function.
1230         (extract_info_print_args): New function.
1231         (info_print_args_help): New function.
1232         (report_unrecognized_option_error): New function.
1233
1234 2018-10-26  Tom Tromey  <tom@tromey.com>
1235
1236         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1237         (compute_compunit_symtab_includes): Update.
1238         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1239         (compunit_symtab_ptr): Likewise.
1240
1241 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1242
1243         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1244         default_print_auxv_entry for specific tag values.
1245
1246 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1247
1248         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1249
1250 2018-10-26  Jim Wilson  <jimw@sifive.com>
1251
1252         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1253         (riscv_linux_sigframe_init): Declare.
1254         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1255         (riscv_linux_sigframe): New.
1256         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1257         (riscv_linux_sigframe_init): Define.
1258         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1259
1260         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1261         (riscv_isa_flen): Likewise.  Drop static.
1262         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1263         (riscv_isa_flen): Likewise.  Declare.
1264
1265 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1266             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1267
1268         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1269         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1270         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1271         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1272         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1273         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1274         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1275         Define.
1276         (struct ppc_linux_features) <htm>: New field.
1277         (ppc_linux_no_features): Add initializer for htm field.
1278         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1279         new tdescs.
1280         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1281         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1282         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1283         Define if not already defined.
1284         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1285         and rs6000/powerpc-isa207-htm-vsx64l.
1286         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1287         rs6000/powerpc-isa207-htm-vsx64l.xml.
1288         * features/rs6000/power-htm-spr.xml: New file.
1289         * features/rs6000/power-htm-core.xml: New file.
1290         * features/rs6000/power64-htm-core.xml: New file.
1291         * features/rs6000/power-htm-fpu.xml: New file.
1292         * features/rs6000/power-htm-altivec.xml: New file.
1293         * features/rs6000/power-htm-vsx.xml: New file.
1294         * features/rs6000/power-htm-ppr.xml: New file.
1295         * features/rs6000/power-htm-dscr.xml: New file.
1296         * features/rs6000/power-htm-tar.xml: New file.
1297         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1298         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1299         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1300         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1301         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1302         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1303         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1304         fetch_regset with HTM regsets.
1305         (store_register, store_ppc_registers): Call store_regset with HTM
1306         regsets.
1307         (ppc_linux_nat_target::read_description): Set htm field in the
1308         features struct if needed.
1309         * ppc-linux-tdep.c: Include
1310         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1311         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1312         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1313         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1314         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1315         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1316         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1317         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1318         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1319         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1320         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1321         (ppc32_linux_ctarregset): New globals.
1322         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1323         (ppc_linux_collect_core_cpgrregset): New function.
1324         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1325         regsets.
1326         (ppc_linux_core_read_description): Check if the tm spr section is
1327         present and set htm in the features struct.
1328         (_initialize_ppc_linux_tdep): Call
1329         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1330         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1331         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1332         Declare.
1333         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1334         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1335         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1336         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1337         New fields.
1338         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1339         Likewise.
1340         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1341         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1342         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1343         New enum fields.
1344         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1345         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1346         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1347         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1348         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1349         <PPC_CTAR_REGNUM>: Likewise.
1350         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1351         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1352         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1353         (IS_CEFP_PSEUDOREG): Define.
1354         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1355         registers.  Return names for the checkpointed DFP, VSX, and EFP
1356         pseudo registers.
1357         (rs6000_pseudo_register_type): Remove initial assert and raise an
1358         internal error in the else clause instead.  Return types for the
1359         checkpointed DFP, VSX, and EFP pseudo registers.
1360         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1361         checkpointed DFP pseudo registers.
1362         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1363         checkpointed VSX pseudo registers.
1364         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1365         from efpr_pseudo_register_read and
1366         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1367         registers.
1368         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1369         Handle checkpointed DFP, VSX, and EFP registers.
1370         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1371         (efp_ax_pseudo_register_collect): New functions.
1372         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1373         register logic to new functions.  Handle checkpointed DFP, VSX,
1374         and EFP pseudo registers.
1375         (rs6000_gdbarch_init): Look for and validate the htm features.
1376         Include checkpointed DFP, VSX and EFP pseudo-registers.
1377         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1378         HTM registers.
1379
1380 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1381
1382         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1383         without altivec or fpu.
1384
1385 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1386             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1387
1388         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1389         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1390         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1391         Define if not already defined.
1392         * features/rs6000/power-ebb.xml: New file.
1393         * features/rs6000/power-linux-pmu.xml: New file.
1394         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1395         features.
1396         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1397         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1398         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1399         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1400         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1401         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1402         fetch_regset with ebb and pmu regsets.
1403         (store_register, store_ppc_registers): Call store_regset with ebb
1404         and pmu regsets.
1405         (ppc_linux_nat_target::read_description): Set isa207 field in the
1406         features struct if ebb and pmu are avaiable.
1407         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1408         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1409         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1410         and pmu regsets.
1411         (ppc_linux_core_read_description): Check if the pmu section is
1412         present and set isa207 in the features struct.
1413         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1414         (ppc32_linux_pmuregset): Declare.
1415         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1416         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1417         <ppc_sier_regnum>: New field.
1418         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1419         New enum values.
1420         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1421         values.
1422         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1423         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1424         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1425         ebb and pmu features.
1426
1427 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1428             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1429
1430         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1431         (tdesc_powerpc_isa207_vsx64l): Declare.
1432         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1433         (struct ppc_linux_features) <isa207>: New field.
1434         (ppc_linux_no_features): Add initializer for isa207 field.
1435         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1436         new tdescs.
1437         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1438         (NT_PPC_TAR): Define if not already defined.
1439         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1440         rs6000/powerpc-isa207-vsx64l.
1441         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1442         rs6000/powerpc-isa207-vsx64l.xml.
1443         * features/rs6000/power-tar.xml: New file.
1444         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1445         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1446         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1447         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1448         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1449         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1450         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1451         fetch_regset with the TAR regset.
1452         (store_register, store_ppc_registers): Call store_regset with the
1453         TAR regset.
1454         (ppc_linux_nat_target::read_description): Set isa207 field in the
1455         features struct if needed.
1456         * ppc-linux-tdep.c: Include
1457         features/rs6000/powerpc-isa207-vsx32l.c and
1458         features/rs6000/powerpc-isa207-vsx64l.c.
1459         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1460         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1461         regset.
1462         (ppc_linux_core_read_description): Check if the tar section is
1463         present and set isa207 in the features struct.
1464         (_initialize_ppc_linux_tdep): Call
1465         initialize_tdesc_powerpc_isa207_vsx32l and
1466         initialize_tdesc_powerpc_isa207_vsx64l.
1467         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1468         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1469         (enum) <PPC_TAR_REGNUM>: New enum value.
1470         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1471         feature.
1472         (ppc_process_record_op31): Record changes to TAR.
1473
1474 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1475             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1476
1477         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1478         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1479         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1480         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1481         (struct ppc_linux_features) <ppr_dscr>: New field.
1482         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1483         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1484         new tdescs.
1485         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1486         Define if not already defined.
1487         * features/Makefile (WHICH): Add
1488         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1489         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1490         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1491         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1492         * features/rs6000/power-dscr.xml: New file.
1493         * features/rs6000/power-ppr.xml: New file.
1494         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1495         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1496         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1497         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1498         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1499         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1500         * ppc-linux-nat.c: Include <sys/uio.h>.
1501         (fetch_regset, store_regset, check_regset): New functions.
1502         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1503         DSCR and PPR regsets.
1504         (store_register, store_ppc_registers): Call store_regset with
1505         DSCR and PPR regsets.
1506         (ppc_linux_get_hwcap2): New function.
1507         (ppc_linux_nat_target::read_description): Call
1508         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1509         features struct if needed.
1510         * ppc-linux-tdep.c: Include
1511         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1512         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1513         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1514         (ppc32_linux_dscrregset): New globals.
1515         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1516         and dscr regsets.
1517         (ppc_linux_core_read_description): Check if the ppr and dscr
1518         sections are present and set ppr_dscr in the features struct.
1519         (_initialize_ppc_linux_tdep): Call
1520         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1521         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1522         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1523         (ppc32_linux_dscrregset): Declare.
1524         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1525         <ppc_dscr_regnum>: New field.
1526         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1527         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1528         and dscr features.
1529         (ppc_process_record_op31): Record changes to PPR and DSCR.
1530
1531 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1532
1533         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1534         second initializer line for the have_* variables.  Initialize
1535         have_fpu to 0 instead of 1.
1536
1537 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1538
1539         * arch/ppc-linux-common.c (ppc_linux_match_description):
1540         Parenthesize tdesc assignements and indent them properly.
1541
1542 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1543
1544         * ppc-linux-nat.c (fetch_register): Change if statement to else
1545         if.
1546         (store_register): Likewise.
1547
1548 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1549
1550         * rs6000-tdep.c: Remove reggroups.h include.
1551         (rs6000_pseudo_register_reggroup_p): Remove.
1552         (rs6000_gdbarch_init): Remove call to
1553         set_tdesc_pseudo_register_reggroup_p.
1554
1555 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1556
1557         * reggroups.c (default_register_reggroup_p): Return true for
1558         decfloat registers and float_reggroup.
1559
1560 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1561
1562         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1563         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1564         ppc_linux_collect_vrregset by regcache_collect_regset.
1565
1566 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1567
1568         * linux-tdep.c (linux_collect_regset_section_cb): Use
1569         std::vector<gdb_byte> instead of char * and malloc for buf.
1570         Remove xfree.
1571
1572 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1573
1574         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1575         symtab_start instead of always using language_unknown.
1576
1577 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1578
1579         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1580         READ_P parameter, catch and ignore register access errors from
1581         either the old or new MISA location.
1582         (riscv_has_feature): Update call to riscv_read_misa_reg.
1583
1584 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1585
1586         * python/py-function.c (convert_values_to_python): Return
1587         gdbpy_ref<>.  Add header comment.
1588         (fnpy_call): Adjust.
1589
1590 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1591
1592         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1593         (cmdpy_completer_handle_brkchars): Adjust.
1594         (cmdpy_completer): Adjust.
1595
1596 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1597
1598         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1599         Pass correct regnum to raw_supply_zeroed.
1600
1601 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1602
1603         * regcache.c (cooked_read_test): Add CSKY to the list of
1604         architectures with a save_reggroup
1605
1606 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1607
1608         PR gdb/23368
1609         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1610         transfer terminal state from old new new inferior.
1611         * terminal.h (swap_terminal_info): New function.
1612         * inflow.c (swap_terminal_info): New function.
1613
1614 2018-10-23  Tom Tromey  <tom@tromey.com>
1615
1616         * record-btrace.c (get_thread_current_frame_id): Rename from
1617         get_thread_current_frame.  Return a frame_id.
1618         (record_btrace_start_replaying): Update.
1619
1620 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1621
1622         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1623         for CSRs.
1624
1625 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1626
1627         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1628         have_nonsteppable_watchpoint attribute to 1.
1629
1630 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1631
1632         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1633         register names.
1634         (struct register_alias): Rename to...
1635         (struct riscv_register_alias): ...this, and update comment.
1636         (riscv_register_aliases): Update type, and alias names.  Remove
1637         CSR names from this list.
1638         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1639         register names.  Add an extra assertion.
1640         (riscv_is_regnum_a_named_csr): New function.
1641         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1642
1643 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1644
1645         * configure.tgt: Add configuration for s12z.
1646         * s12z-tdep.c:  New file.
1647         * NEWS: Mention new target.
1648
1649 2018-10-22  Jim Wilson  <jimw@sifive.com>
1650
1651         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1652         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1653
1654         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1655         (riscv_register_type): Use them.
1656         (riscv_print_one_register_info): Handle union of floats same as float.
1657         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1658         riscv_fpreg_q_type fields.
1659
1660 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1661
1662         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1663         * gdbarch.h: Re-generate.
1664         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1665         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1666         * eval.c (evaluate_subexp_standard): Likewise.
1667         * findvar.c (value_of_register): Likewise.
1668         (value_of_register_lazy): Likewise.
1669         (address_from_register): Likewise.
1670         * frame.c (get_frame_register_bytes): Likewise.
1671         * gdbarch-selftests.c (register_to_value_test): Likewise.
1672         * h8300-tdep.c (h8300_register_type): Likewise.
1673         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1674         (i386_svr4_reg_to_regnum): Likewise.
1675         * infcmd.c (default_print_registers_info): Likewise.
1676         (registers_info): Likewise.
1677         (print_vector_info): Likewise.
1678         (default_print_float_info): Likewise.
1679         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1680         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1681         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1682         (mi_cmd_data_list_changed_registers): Likewise.
1683         (mi_cmd_data_list_register_values): Likewise.
1684         (mi_cmd_data_write_register_values): Likewise.
1685         (mi_cmd_trace_frame_collected): Likewise.
1686         * mips-tdep.c (print_gp_register_row): Likewise.
1687         (mips_print_registers_info): Likewise.
1688         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1689         * regcache.c (init_regcache_descr): Likewise.
1690         (register_size): Likewise.
1691         (register_dump::dump): Likewise.
1692         (cooked_read_test): Likewise.
1693         (cooked_write_test): Likewise.
1694         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1695         (rs6000_gdbarch_init): Likewise.
1696         * stabsread.c (stab_reg_to_regnum): Likewise.
1697         * stack.c (info_frame_command): Likewise.
1698         * target-descriptions.c (tdesc_register_name): Likewise.
1699         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1700         * tui/tui-regs.c (tui_show_register_group): Likewise.
1701         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1702         (user_reg_map_regnum_to_name): Likewise.
1703         (value_of_user_reg): Likewise.
1704         (maintenance_print_user_registers): Likewise.
1705         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1706         (xtensa_register_name): Likewise.
1707         (xtensa_register_type): Likewise.
1708         (xtensa_reg_to_regnum): Likewise.
1709         (xtensa_pseudo_register_read): Likewise.
1710         (xtensa_pseudo_register_write): Likewise.
1711
1712 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1713
1714         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1715         correctly-sized buffer with raw_read.
1716         (amd64_pseudo_register_write): Use correctly-sized buffer for
1717         raw_read/raw_write.
1718
1719 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1720
1721         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1722         in add_prefix_cmd of set print type.
1723
1724 2018-10-19  Tom Tromey  <tom@tromey.com>
1725
1726         PR tui/18388:
1727         * NEWS: Mention tabset deprecation.
1728         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1729         (update_tab_width): New function.
1730         (tui_set_tab_width, tui_show_tab_width): New functions.
1731         (tui_set_tab_width_command): Use update_tab_width.
1732         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1733         Add new "set tui tab-width" command.
1734         * tui/tui-source.c (tui_set_source_content): Update.
1735         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1736         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1737         Don't declare.
1738         (tui_tab_width): Declare.
1739         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1740         (tui_set_default_tab_len): Remove.
1741
1742 2018-10-19  Tom Tromey  <tom@tromey.com>
1743
1744         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1745         (key_is_backspace, tui_getc): Don't declare.
1746         * tui/tui-io.c (key_is_start_sequence): Now static.
1747         (key_is_end_sequence, key_is_backspace): Remove.
1748         (tui_getc): Now static.
1749
1750 2018-10-19  Tom Tromey  <tom@tromey.com>
1751
1752         * symfile.c (reread_symbols): Clear "static_links".
1753
1754 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1755
1756         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1757         define.
1758         (aarch64_linux_sigframe_init): Extra boundary checks.
1759
1760 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1761
1762         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1763         the possibly non-existent tdesc type 'vec128', but the type of raw
1764         register v16 instead.
1765
1766 2018-10-19  Gary Benson <gbenson@redhat.com>
1767
1768         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1769
1770 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1771
1772         PR cli/23785
1773         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1774         NULL.
1775
1776 2018-10-17  Paul Koning  <paul_koning@dell.com>
1777
1778         * charset.c (convert_between_encodings): Fix unsigned overflow.
1779
1780 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1781
1782         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1783         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1784         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1785         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1786         New functions.
1787         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1788         and fbsd_info_proc_mappings_header.
1789         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1790         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1791         New.
1792
1793 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1794
1795         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1796         Solaris Maintainer.
1797
1798 2018-10-15  Tom Tromey  <tom@tromey.com>
1799
1800         * tui/tui.c (strcat_to_buf): Remove casts.
1801         * tui/tui-winsource.c (tui_show_source_line)
1802         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1803         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1804         * tui/tui-windata.c (tui_first_data_item_displayed)
1805         (tui_delete_data_content_windows, tui_erase_data_content)
1806         (tui_display_all_data, tui_display_data_from)
1807         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1808         * tui/tui-win.c (tui_set_win_height)
1809         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1810         casts.
1811         * tui/tui-win.c (tui_resize_all): Remove casts.
1812         (tui_scroll_backward_command, tui_set_focus)
1813         (tui_set_tab_width_command): Likewise.
1814         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1815         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1816         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1817         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1818         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1819         Remove casts.
1820
1821 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1822
1823         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1824         AArch64/ARM maintainer.
1825
1826 2018-10-11  Gary Benson <gbenson@redhat.com>
1827
1828         * interps.h (interp::m_name): Make private and mutable.
1829         * interps.c (interp::~interp): Free m_name.
1830
1831 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1832             Simon Marchi <simark@simark.ca>
1833
1834         * README (`configure' options): Add documentation for new
1835         "--enable-unit-tests" option.
1836         * acinclude.m4: Include "selftest.m4".
1837         * configure: Regenerate.
1838         * configure.ac: Use "GDB_AC_SELFTEST".
1839         * maint.c (maintenance_selftest): Update message informing
1840         that selftests have been disabled.
1841         (maintenance_info_selftests): Likewise.
1842         * selftest.m4: New file.
1843
1844 2018-10-10  Gary Benson <gbenson@redhat.com>
1845
1846         * remote.c (remote_target::remote_send_printf): Add
1847         missing va_end found by Coverity.
1848
1849 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1850
1851         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1852
1853 2018-10-09  Tom Tromey  <tom@tromey.com>
1854
1855         * configure: Rebuild.
1856         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1857         * NEWS: Update --enable-ubsan documentation.
1858
1859 2018-10-09  Gary Benson <gbenson@redhat.com>
1860
1861         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1862         found by Coverity.
1863
1864 2018-10-08  Tom Tromey  <tom@tromey.com>
1865
1866         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1867         variable.
1868         (riscv_fbsd_init_abi): Likewise.
1869
1870 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1871         * valops.c (value_struct_elt_for_reference): Rename local variable
1872         to work around the shadowing a previous local warning.
1873
1874 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1875
1876         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1877         * NEWS: Mention new FreeBSD/riscv native configuration.
1878         * configure.host: Add riscv*-*-freebsd*.
1879         * configure.nat: Likewise.
1880         * riscv-fbsd-nat.c: New file.
1881
1882 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1883
1884         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1885         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1886         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1887         * NEWS: Mention new FreeBSD/riscv target.
1888         * configure.tgt: Add riscv*-*-freebsd*.
1889         * riscv-fbsd-tdep.c: New file.
1890         * riscv-fbsd-tdep.h: New file.
1891
1892 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1893
1894         * regcache.h (struct regcache_map_entry): Note that this type can
1895         be used with traditional frame caches.
1896         * trad-frame.c (trad_frame_set_reg_regmap): New.
1897         * trad-frame.h (trad_frame_set_reg_regmap): New.
1898
1899 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1900
1901         PR c++/16841
1902         * valops.c (get_virtual_base_offset): New function.
1903         (value_struct_elt_for_reference): Use it to get virtual base offset
1904         and add it in calculating class member address.
1905
1906 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1907
1908         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1909         (check_producer): Check if the producer is codewarrior.
1910         (producer_is_codewarrior): New function.
1911         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1912         produced by codewarrior.
1913         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1914
1915 2018-10-06  Tom Tromey  <tom@tromey.com>
1916
1917         PR python/19399:
1918         * python/py-inferior.c: Add "architecture" entry.
1919         (infpy_architecture): New function.
1920
1921 2018-10-06  Tom Tromey  <tom@tromey.com>
1922
1923         PR python/21765:
1924         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1925         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1926         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1927         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1928
1929 2018-10-06  Tom Tromey  <tom@tromey.com>
1930
1931         PR build/17077:
1932         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1933         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1934         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1935         #include.
1936
1937 2018-10-06  Tom Tromey  <tom@tromey.com>
1938
1939         * python/py-breakpoint.c (bppy_get_location): Handle a
1940         bp_breakpoint without a location.
1941
1942 2018-10-06  Tom Tromey  <tom@tromey.com>
1943
1944         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1945         (_RegEx): Reformat help text.
1946         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1947         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1948         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1949         text.
1950         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1951         (EnableXMethod, DisableXMethod): Remove help indentation.
1952         Capitalize meta-syntactic variables.
1953         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1954         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1955         Capitalize meta-syntactic variables.
1956         * python/lib/gdb/command/explore.py (ExploreCommand)
1957         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1958         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1959         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1960         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1961         Remove help indentation.
1962         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1963         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1964         (DisableFrameFilter, SetFrameFilterPriority)
1965         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1966
1967 2018-10-06  Tom Tromey  <tom@tromey.com>
1968
1969         PR tui/28819:
1970         * tui/tui-io.c (gdb_wgetch): New function.
1971         (tui_mld_getc, tui_getc): Use it.
1972
1973 2018-10-05  Tom Tromey  <tom@tromey.com>
1974
1975         * sol-thread.c (sol_thread_target::wait): Rename inner
1976         "save_ptid".
1977
1978 2018-10-04  Tom Tromey  <tom@tromey.com>
1979
1980         * configure: Rebuild.
1981         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1982
1983 2018-10-04  Tom Tromey  <tom@tromey.com>
1984
1985         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1986         declaration of "block".
1987
1988 2018-10-04  Tom Tromey  <tom@tromey.com>
1989
1990         * common/filestuff.c (fdwalk): Remove inner declaration of
1991         "result".
1992
1993 2018-10-04  Tom Tromey  <tom@tromey.com>
1994
1995         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1996         "structs_addr" and hoist declaration.
1997
1998 2018-10-04  Tom Tromey  <tom@tromey.com>
1999
2000         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2001         variable "size".
2002
2003 2018-10-04  Tom Tromey  <tom@tromey.com>
2004
2005         * mdebugread.c (parse_partial_symbols): Use std::string.
2006
2007 2018-10-04  Tom Tromey  <tom@tromey.com>
2008
2009         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2010         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2011         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2012         header.
2013         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2014         more inner scope.
2015         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2016         * varobj.c (varobj_update): Rename inner "newobj",
2017         "type_changed".
2018         * valprint.c (generic_emit_char): Rename inner "buf".
2019         * valops.c (find_overload_match): Rename inner "temp".
2020         (value_struct_elt_for_reference): Declare "v" in more inner
2021         scope.
2022         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2023         * unittests/array-view-selftests.c (run_tests): Rename inner
2024         "vec".
2025         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2026         header.
2027         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2028         "tsv" in more inner scope.
2029         (print_one_static_tracepoint_marker): Rename inner
2030         "tuple_emitter".
2031         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2032         (tic6x_push_dummy_call): Don't redeclare "addr".
2033         * target-float.c: Declare "dto" lower.
2034         * symtab.c (lookup_local_symbol): Rename inner "sym".
2035         (find_pc_sect_line): Rename inner "pc".
2036         * stack.c (print_frame): Don't redeclare "gdbarch".
2037         (return_command): Rename inner "gdbarch".
2038         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2039         "sp".
2040         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2041         header.
2042         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2043         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2044         scope.
2045         * remote.c (remote_target::update_thread_list): Don't redeclare
2046         "tp".
2047         (remote_target::process_initial_stop_replies): Rename inner
2048         "thread".
2049         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2050         (remote_target::wait_as): Don't redeclare "stop_reply".
2051         (remote_target::get_thread_local_address): Rename inner
2052         "result".
2053         (remote_target::get_tib_address): Likewise.
2054
2055         * regcache.c (cooked_read_test): Rename "regnum".
2056         * record-btrace.c (cmd_record_btrace_start): Rename inner
2057         "exception".
2058         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2059         loop header.
2060         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2061         header.
2062         (ppu2spu_sniffer): Rename inner "buf".
2063         * parse.c (operator_check_standard): Rename inner "type",
2064         "objfile".
2065         * p-valprint.c (pascal_val_print): Introduce new scope for
2066         "low_bound", "high_bound".
2067         * p-exp.y (yylex): Declare "i" in loop header.
2068         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2069         Lower declaration of "s".
2070         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2071         header.
2072         (nios2_push_dummy_call): Rename "len".
2073         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2074         "buf".
2075         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2076         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2077         (linux_xfer_osdata_modules): Likewise.
2078         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2079         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2080         (mips_o64_push_dummy_call): Likewise.
2081         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2082         "op".
2083         * mi/mi-main.c (list_available_thread_groups): Rename inner
2084         "tuple_emitter".
2085         (mi_cmd_data_read_memory): Rename inner "opts".
2086         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2087         "tuple_emitter".
2088         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2089         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2090         more inner scope.
2091         (parse_partial_symbols): Rename inner "pst", "p", "name"
2092         * main.c (captured_main_1): Rename inner "i"s.
2093         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2094         "oso2".
2095         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2096         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2097         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2098         (handle_signal_stop): Rename inner "gdbarch".
2099         (handle_command): Declare "signum" in loop header.
2100         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2101         "status".
2102         (examine_prologue): Rename inner "sol" and "sof".
2103         (ia64_extract_return_value): Rename inner "val".  Declare another
2104         "val" in a more inner scope.
2105         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2106         inner scope.
2107         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2108         "except".
2109         * findvar.c (default_read_var_value): Don't redeclare "addr".
2110         * f-exp.y (yylex): Declare "i" in loop header.
2111         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2112         Rename inner "type", "expect_type".
2113         (evaluate_subexp_for_sizeof): Rename inner "pc".
2114         * elfread.c (elf_symfile_read): Rename inner "abfd".
2115         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2116         "bytes_read".
2117         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2118         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2119         (dwarf_decode_line_header): Rename inner "lh".
2120         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2121         "offset".  Declare "i" in loop header.
2122         (disassemble_dwarf_expression): Rename inner "addr_size".
2123         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2124         inner "result".
2125         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2126         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2127         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2128         "inner_list_emitter".
2129         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2130         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2131         declaration in a block.
2132         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2133         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2134         "obstack_final_size".
2135         * cp-support.c (inspect_type): Declare "i" in loop header.
2136         * compile/compile.c (compile_instance::insert_symbol_error):
2137         Rename inner "e".
2138         * common/agent.c (agent_run_command): Remove inner "ret"
2139         declaration.
2140         * coffread.c (coff_symfile_read): Rename inner "name".
2141         (coff_symfile_read): Rename inner "abfd".
2142         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2143         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2144         "high".
2145         * c-exp.y (lex_one_token): Move "len" declaration lower.
2146         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2147         "gdbarch".
2148         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2149         "b".
2150         (watch_command_1): Declare "mark" later.
2151         (clear_command): Don't shadow "a" or "b".
2152         (delete_command): Rename inner "b".
2153         (delete_trace_command): Likewise.
2154         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2155         "op".
2156         (arm_gdbarch_init): Remove inner "e_flags".
2157         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2158         "offset" in inner blocks.
2159
2160 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2161
2162         * dwarf-index-write.c (file_write): Don't write if the vector is
2163         empty.
2164
2165 2018-10-05  Tom de Vries  <tdevries@suse.de>
2166
2167         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2168         PyArg_ParseTuple call.
2169
2170 2018-10-05  Tom de Vries  <tdevries@suse.de>
2171
2172         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2173         PyArg_ParseTuple call.
2174
2175 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2176
2177         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2178         to avoid exceeding 80 characters per line limit.
2179
2180 2018-10-04  Tom Tromey  <tom@tromey.com>
2181
2182         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2183         (reread_symbols): Update.
2184         * complaints.h (clear_complaints): Remove argument.
2185         * complaints.c (enum complaint_series): Remove.
2186         (series): Remove global.
2187         (complaint_internal): Update.
2188         (clear_complaints): Remove argument.
2189
2190 2018-10-04  Tom Tromey  <tom@tromey.com>
2191
2192         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2193         debugging symbols" message if there is a separate debug objfile.
2194
2195 2018-10-04  Tom Tromey  <tom@tromey.com>
2196
2197         PR cli/19551:
2198         * symfile.c (symbol_file_add_with_addrs): Update output.
2199         * psymtab.c (require_partial_symbols): Update output.
2200
2201 2018-10-04  Tom Tromey  <tom@tromey.com>
2202
2203         PR cli/22234:
2204         * complaints.c: Emit \n.
2205
2206 2018-10-04  Tom Tromey  <tom@tromey.com>
2207
2208         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2209         (separate_debug_file_exists, find_separate_debug_file)
2210         (add_symbol_file_command, reread_symbols, allocate_symtab)
2211         (allocate_compunit_symtab): Use filtered printing, not
2212         unfiltered.
2213         * psymtab.c (require_partial_symbols, dump_psymtab)
2214         (allocate_psymtab): Use filtered printing, not unfiltered.
2215
2216 2018-10-04  Tom Tromey  <tom@tromey.com>
2217
2218         * complaints.c (complaint_internal): Correctly check complaint
2219         count.
2220
2221 2018-10-04  Tom Tromey  <tom@tromey.com>
2222
2223         * complaints.h (struct complaints): Remove declaration.
2224         * complaints.c (clear_complaints): Remove an unused variable.
2225
2226 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2227
2228         * MAINTAINERS (Write After Approval): Add self.
2229
2230 2018-10-03  Tom Tromey  <tom@tromey.com>
2231
2232         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2233         "buffer_contents".
2234         * coffread.c (coff_symtab_read): Initialize "newobj".
2235
2236 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2237
2238         * dwarf2read.c (read_func_scope): Remove struct keyword in
2239         range-based for.
2240
2241 2018-10-03  Tom Tromey  <tom@tromey.com>
2242
2243         * README: Mention --enable-ubsan.
2244         * NEWS: Mention --enable-ubsan.
2245         * acinclude.m4: Include sanitize.m4.
2246         * configure: Rebuild.
2247         * configure.ac: Call AM_GDB_UBSAN.
2248         * sanitize.m4: New file.
2249
2250 2018-10-03  Tom Tromey  <tom@tromey.com>
2251
2252         * expression.h (enum exp_opcode): Use uint8_t as base type.
2253         * expprint.c (op_name): Handle invalid opcodes.
2254
2255 2018-10-03  Tom Tromey  <tom@tromey.com>
2256
2257         * parse.c (prefixify_expression): Add assert.
2258         (parse_exp_in_context_1): Throw exception if the expression is
2259         empty.
2260
2261 2018-10-03  Tom Tromey  <tom@tromey.com>
2262
2263         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2264
2265 2018-10-03  Tom Tromey  <tom@tromey.com>
2266
2267         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2268
2269 2018-10-03  Tom Tromey  <tom@tromey.com>
2270
2271         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2272         unsigned.
2273
2274 2018-10-03  Tom Tromey  <tom@tromey.com>
2275
2276         * findvar.c (extract_integer): Do work in an unsigned type.
2277
2278 2018-10-03  Tom Tromey  <tom@tromey.com>
2279
2280         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2281         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2282         base type.
2283         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2284         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2285         type.
2286         * c-lang.h (enum c_string_type_values): Use unsigned as base
2287         type.
2288         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2289
2290 2018-10-03  Tom Tromey  <tom@tromey.com>
2291
2292         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2293         <~dwarf2_frame_state_reg_info>: Update.
2294         <dwarf2_frame_state_reg_info>: Update.
2295         <alloc_regs>: Add assertion.  Update.
2296         <reg>: Now a std::vector.
2297         <num_regs>: Remove.
2298         <swap>: Update.
2299         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2300         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2301
2302 2018-10-03  Tom Tromey  <tom@tromey.com>
2303
2304         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2305
2306 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2307
2308         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2309
2310 2018-10-02  Tom Tromey  <tom@tromey.com>
2311
2312         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2313
2314 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2315
2316         * NEWS: Mention changed commands.
2317         * ser-uds.c: New file.
2318         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2319         * configure: Regenerate.
2320         * Makefile.in: Add new file.
2321         * serial.c (serial_open): Check if filename is a socket
2322         and lookup the appropriate interface accordingly.
2323
2324 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2325
2326         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2327         define.
2328         (AARCH64_EXTRA_MAGIC): Likewise.
2329         (AARCH64_FPSIMD_MAGIC): Likewise.
2330         (AARCH64_SVE_MAGIC): Likewise.
2331         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2332         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2333         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2334         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2335         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2336         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2337         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2338         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2339         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2340         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2341         (read_aarch64_ctx): Add function.
2342         (aarch64_linux_sigframe_init): Detect FP registers.
2343
2344 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2345
2346         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2347         (AARCH64_D0_REGNUM): Likewise.
2348         (AARCH64_S0_REGNUM): Likewise.
2349         (AARCH64_H0_REGNUM): Likewise.
2350         (AARCH64_B0_REGNUM): Likewise.
2351         (AARCH64_SVE_V0_REGNUM): Likewise.
2352         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2353         (AARCH64_D0_REGNUM): Likewise.
2354         (AARCH64_S0_REGNUM): Likewise.
2355         (AARCH64_H0_REGNUM): Likewise.
2356         (AARCH64_B0_REGNUM): Likewise.
2357         (AARCH64_SVE_V0_REGNUM): Likewise.
2358
2359 2018-10-01  Gary Benson <gbenson@redhat.com>
2360
2361         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2362         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2363         prfpregset_t instead of gdb_prfpregset_t.
2364         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2365         * configure, config.in: Rebuild.
2366
2367 2018-10-01  Gary Benson <gbenson@redhat.com>
2368
2369         * common/gdb_proc_service.h: New file, factored out from...
2370         * gdb_proc_service.h: Moved common code to the above file.
2371         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2372
2373 2018-10-01  Gary Benson <gbenson@redhat.com>
2374
2375         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2376         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2377
2378 2018-10-01  Gary Benson <gbenson@redhat.com>
2379
2380         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2381         (AC_CHECK_HEADERS): Check for linux/elf.h.
2382         * configure, config.in: Rebuild.
2383         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2384         doesn't define elf_fpregset_t.
2385
2386 2018-10-01  Gary Benson <gbenson@redhat.com>
2387
2388         * gdb_proc_service.h: Whitespace change.
2389
2390 2018-10-01  Tom Tromey  <tom@tromey.com>
2391
2392         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2393         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2394         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2395
2396 2018-10-01  Tom Tromey  <tom@tromey.com>
2397
2398         * README: Minor change.
2399
2400 2018-09-30  Pedro Alves  <palves@redhat.com>
2401
2402         * darwin-nat-info.c (darwin_debug_regions_recurse)
2403         (info_mach_exceptions_command): Remove unused local variables.
2404         * darwin-nat.c (darwin_decode_notify_message)
2405         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2406         (darwin_stop_inferior, darwin_setup_exceptions)
2407         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2408         (darwin_nat_target::attach, darwin_nat_target::detach)
2409         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2410         local variables.
2411         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2412         variables.
2413
2414 2018-09-29  Tom Tromey  <tom@tromey.com>
2415
2416         * README: Remove some leftover text.
2417
2418 2018-09-29  Tom Tromey  <tom@tromey.com>
2419
2420         * PROBLEMS: Rewrite.
2421         * README: Update.
2422
2423 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2424
2425         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2426         case with explicit breakpoint kind.
2427         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2428         'additional_info' and related logic.
2429         (riscv_debug_breakpoints): New variable.
2430         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2431         instruction to determine the breakpoint kind.
2432         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2433         flag.  Update description of 'set/show riscv
2434         use-compressed-breakpoints' flag.
2435
2436 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2437
2438         (NEWS): Mention changes to frame related commands.
2439         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2440         (add_prefix_cmd_suppress_notification): New function.
2441         (add_com_suppress_notification): Call
2442         add_cmd_suppress_notification.
2443         * command.h (add_cmd_suppress_notification): Declare.
2444         (add_prefix_cmd_suppress_notification): Declare.
2445         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2446         (parse_frame_specification): Moved from stack.c, with
2447         simplification to handle a single argument.
2448         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2449         switch to the selected frame.  Add a header comment.
2450         * stack.c: Remove 'safe-ctype.h' include.
2451         (find_frame_for_function): Add declaration.
2452         (find_frame_for_address): New function.
2453         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2454         (frame_selection_by_function_completer): New function.
2455         (info_frame_command): Rename to...
2456         (info_frame_command_core): ...this, and update parameter types.
2457         (select_frame_command): Rename to...
2458         (select_frame_command_core): ...this, and update parameter types.
2459         (frame_command): Rename to...
2460         (frame_command_core): ...this, and update parameter types.
2461         (class frame_command_helper): New class to wrap implementations of
2462         frame related sub-commands.
2463         (frame_apply_cmd_list): New static global.
2464         (frame_cmd_list): Make static.
2465         (select_frame_cmd_list): New global for sub-commands.
2466         (info_frame_cmd_list): New global for sub-commands.
2467         (_initialize_stack): Register sub-commands for 'frame',
2468         'select-frame', and 'info frame'.  Update 'frame apply' commands
2469         to use frame_apply_cmd_list.  Move function local static
2470         frame_apply_list to file static frame_apply_cmd_list for
2471         consistency.
2472         * stack.h (select_frame_command): Delete declarationn.
2473         (select_frame_for_mi): Declare new function.
2474
2475 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2476
2477         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2478         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2479         and NOP.
2480
2481 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2482
2483         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2484
2485 2018-09-26  Tom Tromey  <tom@tromey.com>
2486
2487         * valops.c (auto_abandon): Remove dead code.
2488
2489 2018-09-26  Tom Tromey  <tom@tromey.com>
2490
2491         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2492
2493 2018-09-24  Tom Tromey  <tom@tromey.com>
2494
2495         * common/pathstuff.c (get_standard_cache_dir): Make
2496         "xdg_cache_home" and "home" const.
2497         * top.c (init_history): Make "tmpenv" const.
2498         * main.c (get_init_files): Make "homedir" const.
2499
2500 2018-09-23  Tom Tromey  <tom@tromey.com>
2501
2502         PR python/18852:
2503         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2504
2505 2018-09-23  Tom Tromey  <tom@tromey.com>
2506
2507         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2508         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2509         * python/python-internal.h (gdbpy_handle_exception): Declare.
2510         * python/py-utils.c (gdbpy_handle_exception): New function.
2511
2512 2018-09-23  Tom Tromey  <tom@tromey.com>
2513
2514         PR python/17284:
2515         * python/py-type.c (typy_template_argument): Check for negative
2516         argument number.
2517
2518 2018-09-23  Tom Tromey  <tom@tromey.com>
2519
2520         PR python/14062:
2521         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2522
2523 2018-09-23  Tom Tromey  <tom@tromey.com>
2524
2525         PR python/18170:
2526         * python/py-value.c (valpy_int): Allow conversion from pointer
2527         type.
2528
2529 2018-09-23  Tom Tromey  <tom@tromey.com>
2530
2531         PR python/20126:
2532         * python/py-value.c (valpy_int): Respect type sign.
2533
2534 2018-09-23  Tom Tromey  <tom@tromey.com>
2535
2536         PR python/18352;
2537         * python/py-value.c (valpy_float): Allow conversions from int or
2538         char.
2539         (valpy_int, valpy_long): Allow conversions from float.
2540
2541 2018-09-23  Tom Tromey  <tom@tromey.com>
2542
2543         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2544         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2545
2546 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2547
2548         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2549         __sighndlr.
2550         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2551
2552 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2553
2554         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2555         target_terminal::ours().
2556
2557 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2558
2559         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2560         of vl to ULONGEST.
2561
2562 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2563
2564         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2565         redundant condition.
2566
2567 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2568
2569         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2570
2571         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2572         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2573         * sol-thread.c (ps_pdmodel): Don't guard definition.
2574
2575         * procfs.c: Fix formatting.
2576
2577         * procfs.c (sysset_t_alloc): Remove.
2578         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2579         (procfs_debug_inferior): Likewise.
2580         (procfs_set_exec_trap): Likewise.
2581         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2582         (proc_set_traced_sysexit): Likewise.
2583
2584         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2585         (dead_procinfo): Likewise.
2586         (proc_warn): Likewise.
2587         (proc_error): Likewise.
2588         (proc_get_LDT_entry): Likewise.
2589         (do_attach): Likewise.
2590         (procfs_target::pid_to_str): Likewise.
2591         (iterate_over_mappings): Likewise.
2592
2593         * procfs.c (create_procinfo): Fix ARI warning.
2594         (proc_get_status): Likewise.
2595         (proc_stop_process): Likewise.
2596         (proc_run_process): Likewise.
2597         (proc_kill): Likewise.
2598         (proc_get_LDT_entry): Likewise.
2599         (procfs_find_LDT_entry): Likewise.
2600         (proc_update_threads): Likewise.
2601         (proc_iterate_over_threads): Likewise.
2602         (do_attach): Likewise.
2603         (procfs_xfer_memory): Likewise.
2604         (invalidate_cache): Likewise.
2605         (procfs_target::resume): Likewise.
2606         (procfs_init_inferior): Likewise.
2607         (procfs_set_exec_trap): Likewise.
2608         (procfs_target::thread_alive): Likewise.
2609         (procfs_target::pid_to_exec_file): Likewise.
2610         (iterate_over_mappings): Likewise.
2611         (procfs_target::make_corefile_notes): Likewise.
2612         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2613
2614         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2615         (procfs_find_LDT_entry): Likewise.
2616         * sol-thread.c (ps_lgetLDT): Likewise.
2617
2618 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2619
2620         PR tdep/17903
2621         * procfs.c (procfs_target): Declare pid_to_exec_file.
2622         (procfs_target::pid_to_exec_file): New.
2623
2624 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2625
2626         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2627         renaming.
2628         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2629         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2630
2631 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2632
2633         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2634         (supply_fpregset, fill_fpregset): Move ...
2635         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2636         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2637         Remove references to ioctl-based procfs.
2638         Include <sys/reg.h>.
2639         Remove PR_MODEL_NATIVE guards.
2640         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2641         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2642
2643 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2644
2645         PR gdb/20981:
2646         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2647         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2648         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2649
2650 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2651
2652         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2653         (fbsd_print_sockaddr_in6): Likewise.
2654
2655 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2656             Chris January  <chris.january@arm.com>
2657
2658         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2659         (evaluate_subexp_standard): Return a dummy type when
2660         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2661         OP_F77_UNDETERMINED_ARGLIST case.
2662         * expression.h (enum noside): Update comment.
2663
2664 2018-09-19  George Vasick <george.vasick@oracle.com>
2665
2666         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2667
2668 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2669             April Chin <april.chin@oracle.com>
2670             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2671
2672         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2673         uint_t lwpid_t.
2674         (create_procinfo): Print pids in /proc without leading zeros.
2675
2676 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2677
2678         * nios2-tdep.c (nios2_gcc_target_options): New.
2679         (nios2_gdb_arch_init): Install new hook.
2680
2681 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2682
2683         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2684         New file.
2685         * update-gnulib.sh: Apply patch.
2686         * configure: Re-generate.
2687
2688 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2689
2690         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2691         description.  Make "info proc" command descriptions more
2692         consistent.
2693
2694 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2695
2696         * NEWS: Mention 'info proc files' command.
2697
2698 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2699
2700         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2701         descriptors for IP_FILES and IP_ALL.
2702
2703 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2704
2705         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2706         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2707         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2708         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2709         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2710         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2711         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2712         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2713         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2714         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2715         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2716         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2717         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2718         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2719         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2720         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2721         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2722         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2723         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2724         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2725         (struct fbsd_sockaddr_un): New types.
2726         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2727         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2728         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2729         (fbsd_core_info_proc_files): New functions.
2730         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2731         IP_ALL.
2732         * fbsd-tdep.h (fbsd_info_proc_files_header)
2733         (fbsd_info_proc_files_entry): New.
2734
2735 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2736
2737         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2738         * infcmd.c (info_proc_cmd_files): New function.
2739         (_initialize_infcmd): Register 'info proc files' command.
2740
2741 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2742
2743         * gnulib/aclocal-m4-deps.mk: Re-generate.
2744         * gnulib/aclocal.m4: Re-generate.
2745         * gnulib/config.in: Re-generate.
2746         * gnulib/configure: Re-generate.
2747         * gnulib/import/Makefile.am: Re-generate.
2748         * gnulib/import/Makefile.in: Re-generate.
2749         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2750         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2751         * gnulib/import/arpa_inet.in.h: New file.
2752         * gnulib/import/inet_ntop.c: New file.
2753         * gnulib/import/m4/arpa_inet_h.m4: New file.
2754         * gnulib/import/m4/inet_ntop.m4: New file.
2755         * gnulib/import/m4/netinet_in_h.m4: New file.
2756         * gnulib/import/m4/socklen.m4: New file.
2757         * gnulib/import/m4/sockpfaf.m4: New file.
2758         * gnulib/import/m4/stdalign.m4: New file.
2759         * gnulib/import/m4/sys_uio_h.m4: New file.
2760         * gnulib/import/netinet_in.in.h: New file.
2761         * gnulib/import/stdalign.in.h: New file.
2762         * gnulib/import/sys_socket.c: New file.
2763         * gnulib/import/sys_socket.in.h: New file.
2764         * gnulib/import/sys_uio.in.h: New file.
2765         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2766         module.
2767
2768 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2769
2770         * gnulib/aclocal-m4-deps.mk: New file.
2771         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2772         deterministically.
2773
2774 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2775
2776         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2777         KVE_PATH.
2778
2779 2018-09-18  Tom Tromey  <tom@tromey.com>
2780
2781         * compile/compile-object-load.c (struct
2782         link_hash_table_cleanup_data): Add constructor and destructor.
2783         Use DISABLE_COPY_AND_ASSIGN.
2784         (~link_hash_table_cleanup_data): Rename from
2785         link_hash_table_free.  Now a destructor.
2786         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2787
2788 2018-09-18  Tom Tromey  <tom@tromey.com>
2789
2790         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2791         * compile/compile-object-load.c (struct munmap_list): Move to
2792         header file.
2793         (munmap_list::add): Rename from munmap_list_add; rewrite.
2794         (munmap_list::~munmap_list): Rename from munmap_list_free.
2795         (munmap_listp_free_cleanup): Remove.
2796         (compile_object_load): Update.
2797         * compile/compile-object-load.h (struct munmap_list): Move from
2798         compile-object-load.c.  Rewrite.
2799
2800 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2801
2802         * aarch64-tdep.c (pass_in_v): Use register size.
2803         (aarch64_extract_return_value): Likewise.
2804         (aarch64_store_return_value): Likewise.
2805
2806 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2807
2808         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2809         rlim_t.
2810
2811 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2812
2813         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2814         Fix short help line.
2815
2816 2018-09-17  Tom Tromey  <tom@tromey.com>
2817
2818         PR python/20445:
2819         * configure: Rebuild.
2820         * configure.ac: Conditionally use -DNDEBUG for Python.
2821
2822 2018-09-17  Tom Tromey  <tom@tromey.com>
2823
2824         * configure: Rebuild.
2825         * configure.ac: Use gmp as a library dependency when checking for
2826         mpfr.
2827
2828 2018-09-17  Pedro Alves  <palves@redhat.com>
2829
2830         * python/py-inferior.c (find_inferior_object): Delete.
2831
2832 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2833
2834         * compile/compile-cplus-types.c
2835         (compile_cplus_instance::enter_scope): Don't use new_scope after
2836         std::move.
2837
2838 2018-09-17  Tom Tromey  <tom@tromey.com>
2839
2840         * common/pathstuff.c (get_standard_cache_dir): Use
2841         ~/Library/Caches on macOS.
2842         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2843
2844 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2845
2846         PR python/23669
2847         * breakpoint.c (commands_cmd_element): New.
2848         (_initialize_breakpoint): Assign commands_cmd_element.
2849         * breakpoint.h (commands_cmd_element): New.
2850         * cli/cli-script.c (while_cmd_element, if_command,
2851         define_cmd_element): New.
2852         (command_name_equals): Remove.
2853         (process_next_line): Compare commands by pointer, not by name.
2854         (_initialize_cli_script): Assign the various cmd_list_element
2855         variables.
2856         * compile/compile.c (compile_cmd_element): New.
2857         (_initialize_compile): Assign compile_cmd_element.
2858         * compile/compile.h (compile_cmd_element): New.
2859         * guile/guile.c (guile_cmd_element): New.
2860         (install_gdb_commands): Assign guile_cmd_element.
2861         * guile/guile.h (guile_cmd_element): New.
2862         * python/python.c (python_cmd_element): New.
2863         (_initialize_python): Assign python_cmd_element.
2864         * python/python.h (python_cmd_element): New.
2865         * tracepoint.c (while_stepping_cmd_element): New.
2866         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2867         * tracepoint.h (while_stepping_cmd_element): New.
2868
2869 2018-09-17  Tom Tromey  <tom@tromey.com>
2870
2871         * infrun.c (save_infcall_suspend_state): Return
2872         infcall_suspend_state_up.
2873         (save_infcall_control_state): Return infcall_control_state_up.
2874         * inferior.h (save_infcall_suspend_state)
2875         (save_infcall_control_state): Declare later.  Return unique
2876         pointers.
2877
2878 2018-09-17  Tom Tromey  <tom@tromey.com>
2879
2880         * infrun.c (struct stop_context): Declare constructor,
2881         destructor, "changed" method.
2882         (stop_context::stop_context): Rename from save_stop_context.
2883         (stop_context::~stop_context): Rename from
2884         release_stop_context_cleanup.
2885         (normal_stop): Update.
2886         (stop_context::changed): Rename from stop_context_changed.  Return
2887         bool.
2888
2889 2018-09-17  Tom Tromey  <tom@tromey.com>
2890
2891         * inferior.h (struct infcall_suspend_state_deleter): New.
2892         (infcall_suspend_state_up): New typedef.
2893         (struct infcall_control_state_deleter): New.
2894         (infcall_control_state_up): New typedef.
2895         (make_cleanup_restore_infcall_suspend_state)
2896         (make_cleanup_restore_infcall_control_state): Don't declare.
2897         * infcall.c (call_function_by_hand_dummy): Update.
2898         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2899         (make_cleanup_restore_infcall_suspend_state): Remove.
2900         (do_restore_infcall_control_state_cleanup)
2901         (make_cleanup_restore_infcall_control_state): Remove.
2902
2903 2018-09-17  Tom Tromey  <tom@tromey.com>
2904
2905         * gdbthread.h (struct thread_control_state): Add initializer.
2906         (class thread_info) <control>: Remove initializer.
2907         * inferior.h (struct inferior_control_state): Add initializer.
2908         (class inferior) <control>: Remove initializer.
2909         (exit_inferior_1): Update.
2910         * infrun.c (struct infcall_control_state): Add constructors.
2911         (save_infcall_control_state): Use new.
2912         (restore_infcall_control_state, discard_infcall_control_state):
2913         Use delete.
2914
2915 2018-09-17  Tom Tromey  <tom@tromey.com>
2916
2917         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2918         unique_ptr.
2919         <siginfo_data>: Now a unique_xmalloc_ptr.
2920         (save_infcall_suspend_state, restore_infcall_suspend_state)
2921         (discard_infcall_suspend_state)
2922         (get_infcall_suspend_state_regcache): Update.
2923
2924 2018-09-17  Tom Tromey  <tom@tromey.com>
2925
2926         * gdbthread.h (struct thread_suspend_state): Add initializers.
2927         (class thread_info) <suspend>: Remove initializer.
2928         * infrun.c (struct infcall_suspend_state): Add initializers.
2929         (save_infcall_suspend_state): Use new.
2930         (discard_infcall_suspend_state): Use delete.
2931
2932 2018-09-16  Tom Tromey  <tom@tromey.com>
2933
2934         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2935         Remove.
2936         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2937         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2938         (py_varobj_iter_new): Likewise.
2939         (py_varobj_get_iterator): Use gdbpy_ref.
2940
2941 2018-09-16  Tom Tromey  <tom@tromey.com>
2942
2943         * python/py-threadevent.c (py_get_event_thread): Simplify.
2944         * python/py-inferior.c (infpy_thread_from_thread_handle):
2945         Return immediately after calling thread_to_thread_object.  Use
2946         Py_RETURN_NONE.
2947         (thread_to_thread_object): Set the exception on a NULL return.
2948
2949 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2950
2951         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2952
2953 2018-09-16  Tom Tromey  <tom@tromey.com>
2954
2955         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2956         Remove.
2957
2958 2018-09-16  Tom Tromey  <tom@tromey.com>
2959
2960         * python/python-internal.h (thread_to_thread_object): Change
2961         return type.
2962         * python/py-inferior.c (thread_to_thread_object): Return a new
2963         reference.
2964         (infpy_thread_from_thread_handle): Update.
2965         * python/py-infthread.c (gdbpy_selected_thread): Update.
2966         * python/py-stopevent.c (create_stop_event_object): Update.
2967         * python/py-threadevent.c (py_get_event_thread): Return a new
2968         reference.
2969         (py_get_event_thread): Update.
2970         * python/py-event.h (py_get_event_thread): Change return type.
2971         * python/py-continueevent.c (create_continue_event_object):
2972         Update.
2973
2974 2018-09-16  Tom Tromey  <tom@tromey.com>
2975
2976         * python/py-progspace.c (pspy_get_objfiles): Update.
2977         * python/python-internal.h (objfile_to_objfile_object): Change
2978         return type.
2979         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2980         Update.
2981         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2982         Update.
2983         * python/python.c (gdbpy_get_current_objfile): Update.
2984         (gdbpy_objfiles): Update.
2985         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2986         Update.
2987         (objfile_to_objfile_object): Return a new reference.
2988         * python/py-symtab.c (stpy_get_objfile): Update.
2989         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2990         Update.
2991
2992 2018-09-16  Tom Tromey  <tom@tromey.com>
2993
2994         * python/py-inferior.c (infpy_get_progspace): Update.
2995         * python/python-internal.h (pspace_to_pspace_object): Change
2996         return type.
2997         * python/py-newobjfileevent.c
2998         (create_clear_objfiles_event_object): Update.
2999         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3000         Update.
3001         * python/python.c (gdbpy_get_current_progspace): Update.
3002         (gdbpy_progspaces): Update.
3003         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3004         reference.
3005         * python/py-objfile.c (objfpy_get_progspace): Update.
3006         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3007         Update.
3008
3009 2018-09-16  Tom Tromey  <tom@tromey.com>
3010
3011         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3012         (solib_name, block_for_pc, find_pc_line): New functions.
3013         (execute_unwinders): Update.
3014         * python/py-block.c (gdbpy_block_for_pc): Remove.
3015         * python/py-inferior.c (infpy_get_progspace): New function.
3016         (inferior_object_getset) <progspace>: Add.
3017         * python/py-progspace.c (pspy_objfiles): Rewrite.
3018         (pspy_solib_name, pspy_block_for_pc)
3019         (pspy_find_pc_line, pspy_is_valid): New functions.
3020         (progspace_object_methods): Add entries for solib_name,
3021         block_for_pc, find_pc_line, is_valid.
3022         * python/python-internal.h (gdbpy_block_for_pc)
3023         (build_objfiles_list): Don't declare.
3024         * python/python.c: Don't include solib.h.
3025         (gdbpy_solib_name, gdbpy_find_pc_line)
3026         (gdbpy_get_current_progspace, build_objfiles_list)
3027         (gdbpy_objfiles): Remove.
3028         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3029         solib_name, find_pc_line>: Remove entries.
3030
3031 2018-09-16  Tom Tromey  <tom@tromey.com>
3032
3033         * top.c (new_ui_command): Use GNU style for metasyntactic
3034         variables.
3035         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3036         variables.
3037         * maint.c (maintenance_translate_address): Remove "<>" around
3038         text.
3039         * interps.c (interpreter_exec_cmd): Use GNU style for
3040         metasyntactic variables.
3041         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3042         metasyntactic variables.
3043         * tracepoint.c (tfind_range_command): Use GNU style for
3044         metasyntactic variables.
3045         (tfind_outside_command): Likewise.
3046         (_initialize_tracepoint): Likewise.
3047         * remote.c (extended_remote_target::create_inferior): Use GNU
3048         style for metasyntactic variables.
3049         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3050         metasyntactic variables.
3051         (adi_assign_command): Likewise.
3052
3053 2018-09-16  Tom Tromey  <tom@tromey.com>
3054
3055         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3056         metasyntactic variables.  Print message if no disassembler options
3057         are available.
3058
3059 2018-09-15  Tom Tromey  <tom@tromey.com>
3060
3061         * infcmd.c (get_inferior_args): Return const char *.
3062         * inferior.h (get_inferior_args): Return type now const.
3063         * linux-tdep.c (linux_fill_prpsinfo): Update.
3064         * procfs.c (procfs_target::make_corefile_notes): Update.
3065
3066 2018-09-07  Tom Tromey  <tom@tromey.com>
3067
3068         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3069         inside the TRY.
3070
3071 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3072
3073         * nios2-tdep.c (nios2_type_align): New.
3074         (nios2_gdb_arch_init): Install type_align hook.
3075
3076 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3077
3078         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3079         type that is neither object file owned, nor gdbarch owned.
3080         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3081         gdbarch is non-NULL.
3082         (alloc_type_instance): Allocate non-objfile owned types on the
3083         gdbarch obstack.
3084         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3085         using TYPE_ALLOC to ensure memory is allocated on the correct
3086         obstack.
3087         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3088         obstack, or the gdbarch obstack.
3089         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3090
3091 2018-09-14  Tom Tromey  <tom@tromey.com>
3092
3093         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3094         block.
3095
3096 2018-09-14  Tom Tromey  <tom@tromey.com>
3097
3098         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3099
3100 2018-09-13  Tom Tromey  <tom@tromey.com>
3101
3102         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3103         static.
3104
3105 2018-09-13  Tom Tromey  <tom@tromey.com>
3106
3107         * exec.c (try_open_exec_file): Use std::string.
3108
3109 2018-09-13  Tom Tromey  <tom@tromey.com>
3110
3111         * utils.h (gdb_bfd_errmsg): Return std::string.
3112         * exec.c (exec_file_attach): Update.
3113         * compile/compile-object-load.c (compile_object_load): Update.
3114         * utils.c (gdb_bfd_errmsg): Return std::string.
3115
3116 2018-09-13  Tom Tromey  <tom@tromey.com>
3117
3118         * procfs.c (struct procinfo_deleter): New.
3119         (procinfo_up): New typedef.
3120         (do_destroy_procinfo_cleanup): Remove.
3121         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3122
3123 2018-09-13  Tom Tromey  <tom@tromey.com>
3124
3125         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3126
3127 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3128 2018-09-13  Tom Tromey  <tom@tromey.com>
3129
3130         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3131         (pspy_get_objfiles): New function.
3132         (progspace_object_methods): New.
3133         (pspace_object_type): Add tp_methods callback.
3134         * python/python-internal.h (build_objfiles_list): New
3135         declaration.
3136         * python/python.c (build_objfiles_list): New function.
3137         (gdbpy_objfiles): Implement using build_objfiles_list.
3138         * NEWS: Mention the Progspace.objfiles method.
3139
3140 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3141
3142         * python/py-inferior.c (infpy_get_progspace): New function.
3143         (inferior_object_getset): Add progspace property.
3144         * NEWS: Mention the new property.
3145
3146 2018-09-13  Tom Tromey  <tom@tromey.com>
3147
3148         PR rust/23650:
3149         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3150
3151 2018-09-13  Tom Tromey  <tom@tromey.com>
3152
3153         PR rust/23626:
3154         * rust-lang.c (rust_enum_variant): Now static.
3155         (rust_empty_enum_p): New function.
3156         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3157         Handle empty enum.
3158
3159 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3160
3161         * python/py-inferior.c (infpy_repr): New.
3162         (inferior_object_type): Register infpy_repr.
3163         * python/py-objfile.c (objfpy_repr): New.
3164         (objfile_object_type): Register objfpy_repr.
3165
3166 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3167
3168         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3169
3170 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3171
3172         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3173         typo.
3174
3175 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3176
3177         * common/common-utils.c: Don't include '<sys/stat.h>'.
3178         (is_regular_file): Move to...
3179         * common/filestuff.c (is_regular_file): ... here.
3180         * common/common-utils.h (is_regular_file): Move to...
3181         * common/filestuff.h (is_regular_file): ... here.
3182
3183 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3184
3185         * skip.c (debug_skip): New variable.
3186         (skiplist_entry::do_skip_file_p): Add debug output.
3187         (skiplist_entry::do_skip_gfile_p): Likewise.
3188         (skiplist_entry::skip_function_p): Likewise.
3189         (_initialize_step_skip): Create debug command.
3190         * NEWS: Mention set/show debug skip.
3191
3192 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3193
3194         * darwin-nat.c (should_disable_startup_with_shell):
3195         New function.
3196         (darwin_nat_target::create_inferior): Add call.
3197
3198 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3199
3200         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3201         inf_port, msg_state>: Initialize.
3202         (struct darwin_thread_info) <signaled, single_step>: Change
3203         type and initialize.
3204         (struct darwin_thread_info) <event>: Initialize.
3205
3206 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3207
3208         PR gdb/23555
3209         PR gdb/23558
3210         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3211         guesses.
3212
3213 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3214
3215         Revert:
3216         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3217
3218         PR gdb/23555
3219         PR gdb/23558
3220         * gnulib/aclocal.m4: Regenerate.
3221         * gnulib/config.in: Regenerate.
3222         * gnulib/configure: Regenerate.
3223         * gnulib/import/Makefile.am: Update.
3224         * gnulib/import/Makefile.in: Update.
3225         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3226         * gnulib/import/_Noreturn.h: ... this.
3227         * gnulib/import/alloca.in.h: Update.
3228         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3229         * gnulib/import/arg-nonnull.h: ... this.
3230         * gnulib/import/assure.h: Update.
3231         * gnulib/import/at-func.c: Update.
3232         * gnulib/import/basename-lgpl.c: Update.
3233         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3234         * gnulib/import/c++defs.h: ... this.
3235         * gnulib/import/canonicalize-lgpl.c: Update.
3236         * gnulib/import/cdefs.h: Update.
3237         * gnulib/import/chdir-long.c: Update.
3238         * gnulib/import/chdir-long.h: Update.
3239         * gnulib/import/cloexec.c: Update.
3240         * gnulib/import/cloexec.h: Update.
3241         * gnulib/import/close.c: Update.
3242         * gnulib/import/closedir.c: Update.
3243         * gnulib/import/config.charset: Update.
3244         * gnulib/import/dirent-private.h: Update.
3245         * gnulib/import/dirent.in.h: Update.
3246         * gnulib/import/dirfd.c: Update.
3247         * gnulib/import/dirname-lgpl.c: Update.
3248         * gnulib/import/dirname.h: Update.
3249         * gnulib/import/dosname.h: Update.
3250         * gnulib/import/dup-safer-flag.c: Update.
3251         * gnulib/import/dup-safer.c: Update.
3252         * gnulib/import/dup.c: Update.
3253         * gnulib/import/dup2.c: Update.
3254         * gnulib/import/errno.in.h: Update.
3255         * gnulib/import/error.c: Update.
3256         * gnulib/import/error.h: Update.
3257         * gnulib/import/exitfail.c: Update.
3258         * gnulib/import/exitfail.h: Update.
3259         * gnulib/import/extra/update-copyright: Update.
3260         * gnulib/import/fchdir.c: Update.
3261         * gnulib/import/fcntl.c: Update.
3262         * gnulib/import/fcntl.in.h: Update.
3263         * gnulib/import/fd-hook.c: Update.
3264         * gnulib/import/fd-hook.h: Update.
3265         * gnulib/import/fd-safer-flag.c: Update.
3266         * gnulib/import/fd-safer.c: Update.
3267         * gnulib/import/fdopendir.c: Update.
3268         * gnulib/import/filename.h: Update.
3269         * gnulib/import/filenamecat-lgpl.c: Update.
3270         * gnulib/import/filenamecat.h: Update.
3271         * gnulib/import/flexmember.h: Update.
3272         * gnulib/import/float+.h: Update.
3273         * gnulib/import/float.c: Update.
3274         * gnulib/import/float.in.h: Update.
3275         * gnulib/import/fnmatch.c: Update.
3276         * gnulib/import/fnmatch.in.h: Update.
3277         * gnulib/import/fnmatch_loop.c: Update.
3278         * gnulib/import/fpucw.h: Update.
3279         * gnulib/import/frexp.c: Update.
3280         * gnulib/import/frexpl.c: Update.
3281         * gnulib/import/fstat.c: Update.
3282         * gnulib/import/fstatat.c: Update.
3283         * gnulib/import/getcwd-lgpl.c: Update.
3284         * gnulib/import/getcwd.c: Update.
3285         * gnulib/import/getdtablesize.c: Update.
3286         * gnulib/import/getlogin_r.c: Update.
3287         * gnulib/import/getprogname.c: Update.
3288         * gnulib/import/getprogname.h: Update.
3289         * gnulib/import/gettext.h: Update.
3290         * gnulib/import/gettimeofday.c: Update.
3291         * gnulib/import/glob-libc.h: Update.
3292         * gnulib/import/glob.c: Update.
3293         * gnulib/import/glob.in.h: Update.
3294         * gnulib/import/glob_internal.h: Update.
3295         * gnulib/import/glob_pattern_p.c: Update.
3296         * gnulib/import/globfree.c: Update.
3297         * gnulib/import/hard-locale.c: Update.
3298         * gnulib/import/hard-locale.h: Update.
3299         * gnulib/import/intprops.h: Update.
3300         * gnulib/import/inttypes.in.h: Update.
3301         * gnulib/import/isnan.c: Update.
3302         * gnulib/import/isnand-nolibm.h: Update.
3303         * gnulib/import/isnand.c: Update.
3304         * gnulib/import/isnanl-nolibm.h: Update.
3305         * gnulib/import/isnanl.c: Update.
3306         * gnulib/import/itold.c: Update.
3307         * gnulib/import/libc-config.h: Update.
3308         * gnulib/import/limits.in.h: Update.
3309         * gnulib/import/localcharset.c: Update.
3310         * gnulib/import/localcharset.h: Update.
3311         * gnulib/import/localtime-buffer.c: Update.
3312         * gnulib/import/localtime-buffer.h: Update.
3313         * gnulib/import/lstat.c: Update.
3314         * gnulib/import/m4/00gnulib.m4: Update.
3315         * gnulib/import/m4/__inline.m4: Update.
3316         * gnulib/import/m4/absolute-header.m4: Update.
3317         * gnulib/import/m4/alloca.m4: Update.
3318         * gnulib/import/m4/builtin-expect.m4: Update.
3319         * gnulib/import/m4/canonicalize.m4: Update.
3320         * gnulib/import/m4/chdir-long.m4: Update.
3321         * gnulib/import/m4/close.m4: Update.
3322         * gnulib/import/m4/closedir.m4: Update.
3323         * gnulib/import/m4/configmake.m4: Update.
3324         * gnulib/import/m4/d-ino.m4: Update.
3325         * gnulib/import/m4/d-type.m4: Update.
3326         * gnulib/import/m4/dirent_h.m4: Update.
3327         * gnulib/import/m4/dirfd.m4: Update.
3328         * gnulib/import/m4/dirname.m4: Update.
3329         * gnulib/import/m4/double-slash-root.m4: Update.
3330         * gnulib/import/m4/dup.m4: Update.
3331         * gnulib/import/m4/dup2.m4: Update.
3332         * gnulib/import/m4/eealloc.m4: Update.
3333         * gnulib/import/m4/environ.m4: Update.
3334         * gnulib/import/m4/errno_h.m4: Update.
3335         * gnulib/import/m4/error.m4: Update.
3336         * gnulib/import/m4/exponentd.m4: Update.
3337         * gnulib/import/m4/exponentl.m4: Update.
3338         * gnulib/import/m4/extensions.m4: Update.
3339         * gnulib/import/m4/extern-inline.m4: Update.
3340         * gnulib/import/m4/fchdir.m4: Update.
3341         * gnulib/import/m4/fcntl-o.m4: Update.
3342         * gnulib/import/m4/fcntl.m4: Update.
3343         * gnulib/import/m4/fcntl_h.m4: Update.
3344         * gnulib/import/m4/fdopendir.m4: Update.
3345         * gnulib/import/m4/filenamecat.m4: Update.
3346         * gnulib/import/m4/flexmember.m4: Update.
3347         * gnulib/import/m4/float_h.m4: Update.
3348         * gnulib/import/m4/fnmatch.m4: Update.
3349         * gnulib/import/m4/fnmatch_h.m4: Update.
3350         * gnulib/import/m4/fpieee.m4: Update.
3351         * gnulib/import/m4/frexp.m4: Update.
3352         * gnulib/import/m4/frexpl.m4: Update.
3353         * gnulib/import/m4/fstat.m4: Update.
3354         * gnulib/import/m4/fstatat.m4: Update.
3355         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3356         * gnulib/import/m4/getcwd-path-max.m4: Update.
3357         * gnulib/import/m4/getcwd.m4: Update.
3358         * gnulib/import/m4/getdtablesize.m4: Update.
3359         * gnulib/import/m4/getlogin.m4: Update.
3360         * gnulib/import/m4/getlogin_r.m4: Update.
3361         * gnulib/import/m4/getpagesize.m4: Update.
3362         * gnulib/import/m4/getprogname.m4: Update.
3363         * gnulib/import/m4/gettimeofday.m4: Update.
3364         * gnulib/import/m4/glibc21.m4: Update.
3365         * gnulib/import/m4/glob.m4: Update.
3366         * gnulib/import/m4/glob_h.m4: Update.
3367         * gnulib/import/m4/gnulib-cache.m4: Update.
3368         * gnulib/import/m4/gnulib-common.m4: Update.
3369         * gnulib/import/m4/gnulib-comp.m4: Update.
3370         * gnulib/import/m4/gnulib-tool.m4: Update.
3371         * gnulib/import/m4/hard-locale.m4: Update.
3372         * gnulib/import/m4/include_next.m4: Update.
3373         * gnulib/import/m4/inttypes-pri.m4: Update.
3374         * gnulib/import/m4/inttypes.m4: Update.
3375         * gnulib/import/m4/isnand.m4: Update.
3376         * gnulib/import/m4/isnanl.m4: Update.
3377         * gnulib/import/m4/largefile.m4: Update.
3378         * gnulib/import/m4/limits-h.m4: Update.
3379         * gnulib/import/m4/localcharset.m4: Update.
3380         * gnulib/import/m4/locale-fr.m4: Update.
3381         * gnulib/import/m4/locale-ja.m4: Update.
3382         * gnulib/import/m4/locale-zh.m4: Update.
3383         * gnulib/import/m4/localtime-buffer.m4: Update.
3384         * gnulib/import/m4/longlong.m4: Update.
3385         * gnulib/import/m4/lstat.m4: Update.
3386         * gnulib/import/m4/malloc.m4: Update.
3387         * gnulib/import/m4/malloca.m4: Update.
3388         * gnulib/import/m4/math_h.m4: Update.
3389         * gnulib/import/m4/mbrtowc.m4: Update.
3390         * gnulib/import/m4/mbsinit.m4: Update.
3391         * gnulib/import/m4/mbsrtowcs.m4: Update.
3392         * gnulib/import/m4/mbstate_t.m4: Update.
3393         * gnulib/import/m4/memchr.m4: Update.
3394         * gnulib/import/m4/memmem.m4: Update.
3395         * gnulib/import/m4/mempcpy.m4: Update.
3396         * gnulib/import/m4/memrchr.m4: Update.
3397         * gnulib/import/m4/mkdir.m4: Update.
3398         * gnulib/import/m4/mkstemp.m4: Update.
3399         * gnulib/import/m4/mmap-anon.m4: Update.
3400         * gnulib/import/m4/mode_t.m4: Update.
3401         * gnulib/import/m4/msvc-inval.m4: Update.
3402         * gnulib/import/m4/msvc-nothrow.m4: Update.
3403         * gnulib/import/m4/multiarch.m4: Update.
3404         * gnulib/import/m4/nocrash.m4: Update.
3405         * gnulib/import/m4/off_t.m4: Update.
3406         * gnulib/import/m4/onceonly.m4: Update.
3407         * gnulib/import/m4/open-cloexec.m4: Update.
3408         * gnulib/import/m4/open.m4: Update.
3409         * gnulib/import/m4/openat.m4: Update.
3410         * gnulib/import/m4/opendir.m4: Update.
3411         * gnulib/import/m4/pathmax.m4: Update.
3412         * gnulib/import/m4/rawmemchr.m4: Update.
3413         * gnulib/import/m4/readdir.m4: Update.
3414         * gnulib/import/m4/readlink.m4: Update.
3415         * gnulib/import/m4/realloc.m4: Update.
3416         * gnulib/import/m4/rename.m4: Update.
3417         * gnulib/import/m4/rewinddir.m4: Update.
3418         * gnulib/import/m4/rmdir.m4: Update.
3419         * gnulib/import/m4/save-cwd.m4: Update.
3420         * gnulib/import/m4/secure_getenv.m4: Update.
3421         * gnulib/import/m4/setenv.m4: Update.
3422         * gnulib/import/m4/signal_h.m4: Update.
3423         * gnulib/import/m4/ssize_t.m4: Update.
3424         * gnulib/import/m4/stat-time.m4: Update.
3425         * gnulib/import/m4/stat.m4: Update.
3426         * gnulib/import/m4/std-gnu11.m4: Update.
3427         * gnulib/import/m4/stdbool.m4: Update.
3428         * gnulib/import/m4/stddef_h.m4: Update.
3429         * gnulib/import/m4/stdint.m4: Update.
3430         * gnulib/import/m4/stdio_h.m4: Update.
3431         * gnulib/import/m4/stdlib_h.m4: Update.
3432         * gnulib/import/m4/strchrnul.m4: Update.
3433         * gnulib/import/m4/strdup.m4: Update.
3434         * gnulib/import/m4/strerror.m4: Update.
3435         * gnulib/import/m4/string_h.m4: Update.
3436         * gnulib/import/m4/strstr.m4: Update.
3437         * gnulib/import/m4/strtok_r.m4: Update.
3438         * gnulib/import/m4/sys_socket_h.m4: Update.
3439         * gnulib/import/m4/sys_stat_h.m4: Update.
3440         * gnulib/import/m4/sys_time_h.m4: Update.
3441         * gnulib/import/m4/sys_types_h.m4: Update.
3442         * gnulib/import/m4/tempname.m4: Update.
3443         * gnulib/import/m4/time_h.m4: Update.
3444         * gnulib/import/m4/unistd-safer.m4: Update.
3445         * gnulib/import/m4/unistd_h.m4: Update.
3446         * gnulib/import/m4/warn-on-use.m4: Update.
3447         * gnulib/import/m4/wchar_h.m4: Update.
3448         * gnulib/import/m4/wchar_t.m4: Update.
3449         * gnulib/import/m4/wctype_h.m4: Update.
3450         * gnulib/import/m4/wint_t.m4: Update.
3451         * gnulib/import/malloc.c: Update.
3452         * gnulib/import/malloc/scratch_buffer.h: Update.
3453         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3454         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3455         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3456         * gnulib/import/malloca.c: Update.
3457         * gnulib/import/malloca.h: Update.
3458         * gnulib/import/malloca.valgrind: Update.
3459         * gnulib/import/math.in.h: Update.
3460         * gnulib/import/mbrtowc.c: Update.
3461         * gnulib/import/mbsinit.c: Update.
3462         * gnulib/import/mbsrtowcs-impl.h: Update.
3463         * gnulib/import/mbsrtowcs-state.c: Update.
3464         * gnulib/import/mbsrtowcs.c: Update.
3465         * gnulib/import/memchr.c: Update.
3466         * gnulib/import/memmem.c: Update.
3467         * gnulib/import/mempcpy.c: Update.
3468         * gnulib/import/memrchr.c: Update.
3469         * gnulib/import/mkdir.c: Update.
3470         * gnulib/import/mkstemp.c: Update.
3471         * gnulib/import/msvc-inval.c: Update.
3472         * gnulib/import/msvc-inval.h: Update.
3473         * gnulib/import/msvc-nothrow.c: Update.
3474         * gnulib/import/msvc-nothrow.h: Update.
3475         * gnulib/import/open.c: Update.
3476         * gnulib/import/openat-die.c: Update.
3477         * gnulib/import/openat-priv.h: Update.
3478         * gnulib/import/openat-proc.c: Update.
3479         * gnulib/import/openat.c: Update.
3480         * gnulib/import/openat.h: Update.
3481         * gnulib/import/opendir.c: Update.
3482         * gnulib/import/pathmax.h: Update.
3483         * gnulib/import/pipe-safer.c: Update.
3484         * gnulib/import/rawmemchr.c: Update.
3485         * gnulib/import/readdir.c: Update.
3486         * gnulib/import/readlink.c: Update.
3487         * gnulib/import/realloc.c: Update.
3488         * gnulib/import/ref-add.sin: Update.
3489         * gnulib/import/ref-del.sin: Update.
3490         * gnulib/import/rename.c: Update.
3491         * gnulib/import/rewinddir.c: Update.
3492         * gnulib/import/rmdir.c: Update.
3493         * gnulib/import/same-inode.h: Update.
3494         * gnulib/import/save-cwd.c: Update.
3495         * gnulib/import/save-cwd.h: Update.
3496         * gnulib/import/scratch_buffer.h: Update.
3497         * gnulib/import/secure_getenv.c: Update.
3498         * gnulib/import/setenv.c: Update.
3499         * gnulib/import/signal.in.h: Update.
3500         * gnulib/import/stat-time.c: Update.
3501         * gnulib/import/stat-time.h: Update.
3502         * gnulib/import/stat-w32.c: Update.
3503         * gnulib/import/stat-w32.h: Update.
3504         * gnulib/import/stat.c: Update.
3505         * gnulib/import/stdbool.in.h: Update.
3506         * gnulib/import/stddef.in.h: Update.
3507         * gnulib/import/stdint.in.h: Update.
3508         * gnulib/import/stdio.in.h: Update.
3509         * gnulib/import/stdlib.in.h: Update.
3510         * gnulib/import/str-two-way.h: Update.
3511         * gnulib/import/strchrnul.c: Update.
3512         * gnulib/import/strdup.c: Update.
3513         * gnulib/import/streq.h: Update.
3514         * gnulib/import/strerror-override.c: Update.
3515         * gnulib/import/strerror-override.h: Update.
3516         * gnulib/import/strerror.c: Update.
3517         * gnulib/import/string.in.h: Update.
3518         * gnulib/import/stripslash.c: Update.
3519         * gnulib/import/strnlen1.c: Update.
3520         * gnulib/import/strnlen1.h: Update.
3521         * gnulib/import/strstr.c: Update.
3522         * gnulib/import/strtok_r.c: Update.
3523         * gnulib/import/sys_stat.in.h: Update.
3524         * gnulib/import/sys_time.in.h: Update.
3525         * gnulib/import/sys_types.in.h: Update.
3526         * gnulib/import/tempname.c: Update.
3527         * gnulib/import/tempname.h: Update.
3528         * gnulib/import/time.in.h: Update.
3529         * gnulib/import/unistd--.h: Update.
3530         * gnulib/import/unistd-safer.h: Update.
3531         * gnulib/import/unistd.in.h: Update.
3532         * gnulib/import/unsetenv.c: Update.
3533         * gnulib/import/verify.h: Update.
3534         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3535         * gnulib/import/wchar.in.h: Update.
3536         * gnulib/import/wctype.in.h: Update.
3537         * gnulib/import/xalloc-oversized.h: Update.
3538         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3539         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3540
3541 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3542
3543         * record-btrace.c (get_thread_current_frame): Remove
3544         old_inferior_ptid.
3545
3546 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3547
3548         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3549         with check_tag to 1 if and only if the type is tagged and the
3550         component being searched cannot been found in the current
3551         view. Otherwise, always call ada_to_fixed_type with
3552         check_tag to 0.
3553
3554 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3555
3556         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3557         declaration.
3558         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3559         * ada-varobj.c (ada_varobj_get_number_of_children,
3560         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3561
3562 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3563
3564         * ada-valprint.c (ada_value_print): Use type instead of
3565         enclosing type.
3566
3567 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3568
3569         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3570         an array of access to unconstrained array.
3571
3572 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3573
3574         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3575         (ada_check_typedef): Use it.
3576
3577 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3578
3579         * ada-varobj.c (ada_varobj_describe_struct_child)
3580         (ada_varobj_describe_child): Handle union case like struct one.
3581
3582 2018-09-10  Tom Tromey  <tom@tromey.com>
3583
3584         PR python/18380:
3585         * python/python.c (_initialize_python): Make example in "python"
3586         help work in Python 3.
3587
3588 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3589
3590         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3591         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3592         $(EXEEXT) to the script, as it is not a program.
3593
3594 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3595
3596         * python/py-prettyprint.c (pretty_print_one_value): Return
3597         gdbpy_ref<>.
3598         (print_string_repr): Adjust.
3599         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3600         * python/python-internal.h (apply_varobj_pretty_printer): Return
3601         gdbpy_ref<>.
3602         * varobj.c (varobj_value_get_print_value): Adjust.
3603
3604 2018-09-08  Tom Tromey  <tom@tromey.com>
3605
3606         PR python/16047:
3607         * python/py-prettyprint.c (pretty_print_one_value): Check for
3608         to_string method.
3609
3610 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3611
3612         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3613         replace_operator_with_call.
3614
3615 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3616
3617         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3618
3619 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3620
3621         * ada-typeprint.c (print_range): Print the bounds using TYPE
3622         rather than its TYPE_TARGET_TYPE.
3623
3624 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3625
3626         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3627         call to ada_to_fixed_value_create.
3628
3629 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3630
3631         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3632
3633 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3634
3635         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3636         by calls to error.
3637
3638 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3639
3640         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3641         Move update of loop variable "fi".
3642
3643 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3644
3645         * ada-lang.c (value_assign_to_component): In the case of
3646         big-endian targets, extract the bits of the given VAL
3647         using an src_offset of zero if container is not a scalar.
3648
3649 2018-09-06  Simon Ser  <contact@emersion.fr>
3650
3651         PR gdb/23105
3652         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3653         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3654         * fbsd-tdep.c (fbsd_make_note_desc): New.
3655         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3656         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3657         * target.h (enum target_object) Add FreeBSD-specific
3658         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3659
3660 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3661
3662         * compile/compile-c.h (generate_c_for_variable_locations):
3663         Change reference to pointer.
3664         * compile/compile-c-support.c (compile_program) <compute>:
3665         Likewise.
3666         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3667         (generate_c_for_for_one_variable): Likewise
3668         (generate_c_for_variable_locations): Likewise
3669         * compile/compile-c-types.c (compile_c_instance::convert_type):
3670         Likewise
3671         * compile/compile-cplus-symbols.c (convert_one_symbol):
3672         std::move the scope passed to enter_scope.
3673         * compile/compile-cplus-types.c
3674         (compile_cplus_instance::enter_scope): Make parameter
3675         rvalue-reference.
3676         (compile_cplus_instance::new_scope): Change reference to
3677         pointer.
3678         (compile_cplus_instance::convert_type): Likewise
3679         (compile_cplus_convert_typedef): std::move the scope passed to
3680         enter_scope.
3681         (compile_cplus_convert_struct_or_union): Likewise.
3682         (compile_cplus_convert_enum): Likewise.
3683         (compile_cplus_convert_namespace): Likewise.
3684         * compile/compile-cplus.h (compile_cplus_instance)
3685         <enter_scope>: Make parameter rvalue-reference.
3686         * compile/compile-internal.h (compile_instance)
3687         <get_cached_type>: Likewise
3688         * compile/compile-loc2c.c (push): Likewise
3689         (pushf): Likewise
3690         (unary): Likewise
3691         (binary): Likewise
3692         (print_label): Likewise
3693         (pushf_register_address): Likewise
3694         (pushf_register): Likewise
3695         (do_compile_dwarf_expr_to_c): Likewise
3696         (compile_dwarf_expr_to_c): Likewise
3697         (compile_dwarf_bounds_to_c): Likewise
3698         * compile/compile.c (compile_instance::get_cached_type):
3699         Likewise
3700         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3701         (compile_dwarf_bounds_to_c): Likewise
3702         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3703         (dwarf2_compile_property_to_c): Likewise
3704         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3705         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3706         Likewise
3707
3708 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3709
3710         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3711         * tui/tui-data.c (init_content_element): Don't initialize it.
3712
3713 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3714
3715         * tui/tui-data.h (struct tui_win_info)
3716         <detail::opaque>: Remove.
3717         * tui/tui-data.c (init_win_info): Remove assignment.
3718
3719 2018-09-05  Tom Tromey  <tom@tromey.com>
3720
3721         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3722         -Wformat-nonliteral.
3723         * target-float.c (host_float_ops<T>::to_string)
3724         (host_float_ops<T>::from_string): Use
3725         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3726         * configure: Rebuild.
3727
3728 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3729
3730         * printcmd.c (printf_c_string): Use
3731         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3732         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3733
3734 2018-09-05  Tom Tromey  <tom@tromey.com>
3735
3736         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3737
3738 2018-09-05  Tom de Vries  <tdevries@suse.de>
3739
3740         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3741         with resolve_abstract_p == true.
3742         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3743         defaulting to false. Propagate resolve_abstract_p to
3744         dwarf2_fetch_die_loc_sect_off.
3745         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3746         parameter, defaulting to false.
3747         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3748         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3749         parameter.
3750         * dwarf2read.h (struct die_info): Forward-declare.
3751         (die_info_ptr): New typedef.
3752         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3753
3754 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3755
3756         GDB 8.2 released.
3757
3758 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3759             Pedro Alves  <palves@redhat.com>
3760
3761         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3762         "aclocal-m4-deps.mk".  Include file here.
3763         $(srcdir)/aclocal.m4: Add "configure.ac".
3764         * gnulib/aclocal-m4-deps.mk: New file.
3765         * gnulib/update-gnulib.sh: Automatically update
3766         "aclocal-m4-deps.mk".
3767
3768 2018-09-04  Tom Tromey  <tom@tromey.com>
3769
3770         * configure: Rebuild.
3771         * configure.ac: Remove multi-ice code.
3772
3773 2018-09-04  Tom Tromey  <tom@tromey.com>
3774
3775         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3776         (ada-exp.o): Update.
3777
3778 2018-09-04  Tom Tromey  <tom@tromey.com>
3779
3780         * Makefile.in (printcmd.o, target-float.o): Remove.
3781         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3782
3783 2018-09-04  Tom Tromey  <tom@tromey.com>
3784
3785         * gnulib/Makefile.in: Remove obsolete comment.
3786         * Makefile.in: Remove obsolete comment.
3787
3788 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3789
3790         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3791         line with '+'.
3792
3793 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3794
3795         * riscv-tdep.c: Add 'prologue-value.h' include.
3796         (struct riscv_unwind_cache): New struct.
3797         (riscv_debug_unwinder): New global.
3798         (riscv_scan_prologue): Update arguments, capture register details
3799         from prologue scan.
3800         (riscv_skip_prologue): Reformat arguments line, move end of
3801         prologue calculation into riscv_scan_prologue.
3802         (riscv_frame_cache): Update return type, create
3803         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3804         details.
3805         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3806         (riscv_frame_prev_register): Use the trad_frame within the
3807         riscv_unwind_cache.
3808         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3809         flag.
3810
3811 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3812
3813         * trad-frame.h (trad_frame_set_realreg): Declare.
3814         (trad_frame_set_addr): Declare.
3815         * trad-frame.c (trad_frame_set_realreg): Define new function.
3816         (trad_frame_set_addr): Define new function.
3817         (trad_frame_set_reg_realreg): Use new function.
3818         (trad_frame_set_reg_addr): Use new function.
3819
3820 2018-09-01  Keith Seitz  <keiths@redhat.com>
3821
3822         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3823         pulongest instead of "%lld".
3824         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3825         ATTRIBUTE_UNUSED.
3826
3827 2018-08-31  Tom Tromey  <tom@tromey.com>
3828
3829         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3830         variant part type.
3831
3832 2018-08-31  Pedro Alves  <palves@redhat.com>
3833
3834         * gdbarch.h: Regenerate.
3835
3836 2018-08-31  Pedro Alves  <palves@redhat.com>
3837
3838         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3839         * target.h (Hardware watchpoint interfaces): Describe
3840         continuable/steppable/non-steppable watchpoints.
3841         * gdbarch.h, gdbarch.c: Regenerate.
3842
3843 2018-08-31  Pedro Alves  <palves@redhat.com>
3844
3845         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3846         Delete.
3847         * s390-linux-nat.c
3848         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3849         * target.h (target_ops::have_continuable_watchpoint): Delete.
3850         (target_have_continuable_watchpoint): Delete.
3851         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3852         * target-delegates.c: Regenerate.
3853
3854 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3855
3856         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3857         the files present in "gnulib/import/m4/".
3858
3859 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3860
3861         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3862         c.sw, c.swsp, and c.sdsp.
3863
3864 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3865
3866         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3867         (riscv_read_misa_reg): Don't cache value read into inferior data.
3868         (riscv_new_inferior_data): Delete.
3869         (riscv_inferior_data_cleanup): Delete.
3870         (riscv_inferior_data): Delete.
3871         (riscv_invalidate_inferior_data): Delete.
3872         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3873
3874 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3875
3876         * compile/compile-cplus-types.c
3877         (compile_cplus_instance::leave_scope): Take the address of scope
3878         object.
3879         (compile_cplus_instance::convert_qualified_base): Compare quals
3880         to 0.
3881
3882 2018-08-30  Keith Seitz  <keiths@redhat.com>
3883
3884         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3885         Use "%s" and host_address_to_string instead of "%p" in printf.
3886
3887 2018-08-29  Keith Seitz  <keiths@redhat.com>
3888
3889         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3890         and compile-cplus-types.c.
3891         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3892         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3893         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3894         Declare.
3895         * compile/compile-c-support.c: Include compile-cplus.h.
3896         (load_libcompile): Templatize.
3897         (get_compile_context): "New" function.
3898         (c_get_compile_context): Use get_compile_context.
3899         (cplus_get_compile_context): New function.
3900         (cplus_push_user_expression, cplus_pop_user_expression)
3901         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3902         (cplus_compute_program): Define new structs/functions.
3903         * compile/compile-cplus-symmbols.c: New file.
3904         * compile/compile-cplus-types.c: New file.
3905         * compile/compile-cplus.h: New file.
3906         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3907         Declare.
3908         * compile/compile-object-load.c (get_out_value_type): Use
3909         strncmp_iw when comparing symbol names.
3910         (compile_object_load): Add mst_bss and mst_data.
3911         * compile/compile.c (_initialize_compile): Remove
3912         -Wno-implicit-function-declaration from `compile_args'.
3913         * compile/gcc-cp-plugin.h: New file.
3914         * NEWS: Mention C++ compile support and new debug options.
3915
3916 2018-08-29  Keith Seitz  <keiths@redhat.com>
3917
3918         * linespec.c (collect_info::add_symbol): Make virtual.
3919         (struct symbol_searcher_collect_info): New struct.
3920         (symbol_searcher::find_all_symbols): New method.
3921         * symtab.h (class symbol_searcher): New class.
3922
3923 2018-08-29  Keith Seitz  <keiths@redhat.com>
3924
3925         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3926         Change to vector of block_symbol.  Update all users.
3927         (struct collect_info) <symbols>: Likewise.
3928         (collect_info::add_symbol): Take block_symbol as argument.
3929         Update all callers.
3930         (decode_compound_collector) <m_symbols>: Change type to vector
3931         of block_symbol.  Update all users.
3932         (decode_compound_collector::operator ()): Change parameter type
3933         to block_symbol.
3934         (find_method, find_function_symbols, find_linespec_symbols)
3935         (find_label_symbols_in_block, find_label_symbols): Change symbol
3936         vectors to block_symbol vectors.
3937         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3938         block_symbol.
3939
3940 2018-08-29  Keith Seitz  <keiths@redhat.com>
3941
3942         * linespec.c (symbolp): Remove typedef and VEC definitions.
3943         (bound_minimal_symbol_d): Likewise.
3944
3945 2018-08-29  Keith Seitz  <keiths@redhat.com>
3946
3947         * linespec.c (decode_compound_collector::decode_compound_collector):
3948         Remove initialization for `m_symtabs'.
3949         (decode_compound_collector::release_symbols): Change return type
3950         to std::vector.  Update all callers.
3951         (class decode_compound_collector) <m_symbols>: Change type to
3952         std::vector.
3953         (lookup_prefix_sym): Change return type to std::vector.  Update all
3954         callers.
3955         (compare_symbols): Remove.
3956         (std_compare_symbols): Rename to `compare_symbols'.
3957         (find_method): Change `sym_classes' parameter to std::vector.
3958         Update all callers.  Use std::sort to sort sym_classes.
3959         (find_linespec_symbols): Remove cleanup.
3960
3961 2018-08-29  Keith Seitz  <keiths@redhat.com>
3962
3963         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3964         std::vector.  Update all users.
3965         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3966         (struct collect_info) <minimal_symbols>: Likewise.
3967         (compare_msymbols): Return bool.  Change parameters to const
3968         bound_minimal_symbol references.
3969         (find_method, find_function_symbols, find_linespec_symbols): Change
3970         `minsyms' parameter to std::vector.  Update all callers.
3971
3972 2018-08-29  Keith Seitz  <keiths@redhat.com>
3973
3974         * linespec.c (struct linespec) <label_symbols>: Change type to
3975         std::vector.  Update all users.
3976         (find_label_symbols_in_block): Change `result' parameter to
3977         std::vector.  Update all callers.
3978         (find_label_symbols): Return std::vector.  Update all callers.
3979
3980 2018-08-29  Keith Seitz  <keiths@redhat.com>
3981
3982         * linespec.c (struct linespec) <function_symbols>: Change type to
3983         std::vector.  Update all users.
3984         (struct collect_info) <function_symbols>: Likewise.
3985         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3986         (std_compare_symbols): New function.
3987         (find_method, find_function_symbols, find_linespec_symbols)
3988         (find_label_symbols_in_block): Change `symbols' parameter to
3989         std::vector.  Update all callers.
3990         (find_label_symbols): Likewise for `function_symbols' and
3991         `label_funcs_ret'.
3992
3993 2018-08-29  Keith Seitz  <keiths@redhat.com>
3994
3995         * linespec.c (symtab_vector_up): Define.
3996         (struct linespec) <file_symtabs>: Change type to std::vector *.
3997         Update all uses.
3998         (struct collect_info) <file_symtabs>: Likewise.
3999         (collect_symtabs_from_filename): Return symtab_vector_up.
4000         Update all callers.
4001         (decode_objc): Remove cleanup.
4002         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4003         (symtab_collector::release_symtabs): Return symtab_vector_up.
4004         Update all callers.
4005         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4006         Update all users.
4007         (collect_symtabs_from_filename, symtabs_from_filename): Return
4008         symtab_vector_up.  Update all callers.
4009
4010 2018-08-29  Tom Tromey  <tom@tromey.com>
4011
4012         * csky-tdep.c (csky_analyze_prologue): Use
4013         core_addr_to_string_nz.
4014
4015 2018-08-29  Tom Tromey  <tom@tromey.com>
4016
4017         * windows-nat.c (struct xlate_exception) <them>: Change type to
4018         DWORD.
4019         (xlate): Fix formatting.  Remove last entry.
4020         (struct xlate_exception, xlate): Comment out.
4021         (windows_nat_target::resume): Use ranged for.
4022
4023 2018-08-29  Jim Wilson  <jimw@sifive.com>
4024
4025         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4026         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4027         of NT_PRFPREG.
4028         (riscv_linux_nat_target::store_registers): Likewise.
4029
4030 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4031
4032         PR gdb/23555
4033         PR gdb/23558
4034         * gnulib/aclocal.m4: Regenerate.
4035         * gnulib/config.in: Regenerate.
4036         * gnulib/configure: Regenerate.
4037         * gnulib/import/Makefile.am: Update.
4038         * gnulib/import/Makefile.in: Update.
4039         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4040         * gnulib/import/_Noreturn.h: ... this.
4041         * gnulib/import/alloca.in.h: Update.
4042         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4043         * gnulib/import/arg-nonnull.h: ... this.
4044         * gnulib/import/assure.h: Update.
4045         * gnulib/import/at-func.c: Update.
4046         * gnulib/import/basename-lgpl.c: Update.
4047         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4048         * gnulib/import/c++defs.h: ... this.
4049         * gnulib/import/canonicalize-lgpl.c: Update.
4050         * gnulib/import/cdefs.h: Update.
4051         * gnulib/import/chdir-long.c: Update.
4052         * gnulib/import/chdir-long.h: Update.
4053         * gnulib/import/cloexec.c: Update.
4054         * gnulib/import/cloexec.h: Update.
4055         * gnulib/import/close.c: Update.
4056         * gnulib/import/closedir.c: Update.
4057         * gnulib/import/config.charset: Update.
4058         * gnulib/import/dirent-private.h: Update.
4059         * gnulib/import/dirent.in.h: Update.
4060         * gnulib/import/dirfd.c: Update.
4061         * gnulib/import/dirname-lgpl.c: Update.
4062         * gnulib/import/dirname.h: Update.
4063         * gnulib/import/dosname.h: Update.
4064         * gnulib/import/dup-safer-flag.c: Update.
4065         * gnulib/import/dup-safer.c: Update.
4066         * gnulib/import/dup.c: Update.
4067         * gnulib/import/dup2.c: Update.
4068         * gnulib/import/errno.in.h: Update.
4069         * gnulib/import/error.c: Update.
4070         * gnulib/import/error.h: Update.
4071         * gnulib/import/exitfail.c: Update.
4072         * gnulib/import/exitfail.h: Update.
4073         * gnulib/import/extra/update-copyright: Update.
4074         * gnulib/import/fchdir.c: Update.
4075         * gnulib/import/fcntl.c: Update.
4076         * gnulib/import/fcntl.in.h: Update.
4077         * gnulib/import/fd-hook.c: Update.
4078         * gnulib/import/fd-hook.h: Update.
4079         * gnulib/import/fd-safer-flag.c: Update.
4080         * gnulib/import/fd-safer.c: Update.
4081         * gnulib/import/fdopendir.c: Update.
4082         * gnulib/import/filename.h: Update.
4083         * gnulib/import/filenamecat-lgpl.c: Update.
4084         * gnulib/import/filenamecat.h: Update.
4085         * gnulib/import/flexmember.h: Update.
4086         * gnulib/import/float+.h: Update.
4087         * gnulib/import/float.c: Update.
4088         * gnulib/import/float.in.h: Update.
4089         * gnulib/import/fnmatch.c: Update.
4090         * gnulib/import/fnmatch.in.h: Update.
4091         * gnulib/import/fnmatch_loop.c: Update.
4092         * gnulib/import/fpucw.h: Update.
4093         * gnulib/import/frexp.c: Update.
4094         * gnulib/import/frexpl.c: Update.
4095         * gnulib/import/fstat.c: Update.
4096         * gnulib/import/fstatat.c: Update.
4097         * gnulib/import/getcwd-lgpl.c: Update.
4098         * gnulib/import/getcwd.c: Update.
4099         * gnulib/import/getdtablesize.c: Update.
4100         * gnulib/import/getlogin_r.c: Update.
4101         * gnulib/import/getprogname.c: Update.
4102         * gnulib/import/getprogname.h: Update.
4103         * gnulib/import/gettext.h: Update.
4104         * gnulib/import/gettimeofday.c: Update.
4105         * gnulib/import/glob-libc.h: Update.
4106         * gnulib/import/glob.c: Update.
4107         * gnulib/import/glob.in.h: Update.
4108         * gnulib/import/glob_internal.h: Update.
4109         * gnulib/import/glob_pattern_p.c: Update.
4110         * gnulib/import/globfree.c: Update.
4111         * gnulib/import/hard-locale.c: Update.
4112         * gnulib/import/hard-locale.h: Update.
4113         * gnulib/import/intprops.h: Update.
4114         * gnulib/import/inttypes.in.h: Update.
4115         * gnulib/import/isnan.c: Update.
4116         * gnulib/import/isnand-nolibm.h: Update.
4117         * gnulib/import/isnand.c: Update.
4118         * gnulib/import/isnanl-nolibm.h: Update.
4119         * gnulib/import/isnanl.c: Update.
4120         * gnulib/import/itold.c: Update.
4121         * gnulib/import/libc-config.h: Update.
4122         * gnulib/import/limits.in.h: Update.
4123         * gnulib/import/localcharset.c: Update.
4124         * gnulib/import/localcharset.h: Update.
4125         * gnulib/import/localtime-buffer.c: Update.
4126         * gnulib/import/localtime-buffer.h: Update.
4127         * gnulib/import/lstat.c: Update.
4128         * gnulib/import/m4/00gnulib.m4: Update.
4129         * gnulib/import/m4/__inline.m4: Update.
4130         * gnulib/import/m4/absolute-header.m4: Update.
4131         * gnulib/import/m4/alloca.m4: Update.
4132         * gnulib/import/m4/builtin-expect.m4: Update.
4133         * gnulib/import/m4/canonicalize.m4: Update.
4134         * gnulib/import/m4/chdir-long.m4: Update.
4135         * gnulib/import/m4/close.m4: Update.
4136         * gnulib/import/m4/closedir.m4: Update.
4137         * gnulib/import/m4/configmake.m4: Update.
4138         * gnulib/import/m4/d-ino.m4: Update.
4139         * gnulib/import/m4/d-type.m4: Update.
4140         * gnulib/import/m4/dirent_h.m4: Update.
4141         * gnulib/import/m4/dirfd.m4: Update.
4142         * gnulib/import/m4/dirname.m4: Update.
4143         * gnulib/import/m4/double-slash-root.m4: Update.
4144         * gnulib/import/m4/dup.m4: Update.
4145         * gnulib/import/m4/dup2.m4: Update.
4146         * gnulib/import/m4/eealloc.m4: Update.
4147         * gnulib/import/m4/environ.m4: Update.
4148         * gnulib/import/m4/errno_h.m4: Update.
4149         * gnulib/import/m4/error.m4: Update.
4150         * gnulib/import/m4/exponentd.m4: Update.
4151         * gnulib/import/m4/exponentl.m4: Update.
4152         * gnulib/import/m4/extensions.m4: Update.
4153         * gnulib/import/m4/extern-inline.m4: Update.
4154         * gnulib/import/m4/fchdir.m4: Update.
4155         * gnulib/import/m4/fcntl-o.m4: Update.
4156         * gnulib/import/m4/fcntl.m4: Update.
4157         * gnulib/import/m4/fcntl_h.m4: Update.
4158         * gnulib/import/m4/fdopendir.m4: Update.
4159         * gnulib/import/m4/filenamecat.m4: Update.
4160         * gnulib/import/m4/flexmember.m4: Update.
4161         * gnulib/import/m4/float_h.m4: Update.
4162         * gnulib/import/m4/fnmatch.m4: Update.
4163         * gnulib/import/m4/fnmatch_h.m4: Update.
4164         * gnulib/import/m4/fpieee.m4: Update.
4165         * gnulib/import/m4/frexp.m4: Update.
4166         * gnulib/import/m4/frexpl.m4: Update.
4167         * gnulib/import/m4/fstat.m4: Update.
4168         * gnulib/import/m4/fstatat.m4: Update.
4169         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4170         * gnulib/import/m4/getcwd-path-max.m4: Update.
4171         * gnulib/import/m4/getcwd.m4: Update.
4172         * gnulib/import/m4/getdtablesize.m4: Update.
4173         * gnulib/import/m4/getlogin.m4: Update.
4174         * gnulib/import/m4/getlogin_r.m4: Update.
4175         * gnulib/import/m4/getpagesize.m4: Update.
4176         * gnulib/import/m4/getprogname.m4: Update.
4177         * gnulib/import/m4/gettimeofday.m4: Update.
4178         * gnulib/import/m4/glibc21.m4: Update.
4179         * gnulib/import/m4/glob.m4: Update.
4180         * gnulib/import/m4/glob_h.m4: Update.
4181         * gnulib/import/m4/gnulib-cache.m4: Update.
4182         * gnulib/import/m4/gnulib-common.m4: Update.
4183         * gnulib/import/m4/gnulib-comp.m4: Update.
4184         * gnulib/import/m4/gnulib-tool.m4: Update.
4185         * gnulib/import/m4/hard-locale.m4: Update.
4186         * gnulib/import/m4/include_next.m4: Update.
4187         * gnulib/import/m4/inttypes-pri.m4: Update.
4188         * gnulib/import/m4/inttypes.m4: Update.
4189         * gnulib/import/m4/isnand.m4: Update.
4190         * gnulib/import/m4/isnanl.m4: Update.
4191         * gnulib/import/m4/largefile.m4: Update.
4192         * gnulib/import/m4/limits-h.m4: Update.
4193         * gnulib/import/m4/localcharset.m4: Update.
4194         * gnulib/import/m4/locale-fr.m4: Update.
4195         * gnulib/import/m4/locale-ja.m4: Update.
4196         * gnulib/import/m4/locale-zh.m4: Update.
4197         * gnulib/import/m4/localtime-buffer.m4: Update.
4198         * gnulib/import/m4/longlong.m4: Update.
4199         * gnulib/import/m4/lstat.m4: Update.
4200         * gnulib/import/m4/malloc.m4: Update.
4201         * gnulib/import/m4/malloca.m4: Update.
4202         * gnulib/import/m4/math_h.m4: Update.
4203         * gnulib/import/m4/mbrtowc.m4: Update.
4204         * gnulib/import/m4/mbsinit.m4: Update.
4205         * gnulib/import/m4/mbsrtowcs.m4: Update.
4206         * gnulib/import/m4/mbstate_t.m4: Update.
4207         * gnulib/import/m4/memchr.m4: Update.
4208         * gnulib/import/m4/memmem.m4: Update.
4209         * gnulib/import/m4/mempcpy.m4: Update.
4210         * gnulib/import/m4/memrchr.m4: Update.
4211         * gnulib/import/m4/mkdir.m4: Update.
4212         * gnulib/import/m4/mkstemp.m4: Update.
4213         * gnulib/import/m4/mmap-anon.m4: Update.
4214         * gnulib/import/m4/mode_t.m4: Update.
4215         * gnulib/import/m4/msvc-inval.m4: Update.
4216         * gnulib/import/m4/msvc-nothrow.m4: Update.
4217         * gnulib/import/m4/multiarch.m4: Update.
4218         * gnulib/import/m4/nocrash.m4: Update.
4219         * gnulib/import/m4/off_t.m4: Update.
4220         * gnulib/import/m4/onceonly.m4: Update.
4221         * gnulib/import/m4/open-cloexec.m4: Update.
4222         * gnulib/import/m4/open.m4: Update.
4223         * gnulib/import/m4/openat.m4: Update.
4224         * gnulib/import/m4/opendir.m4: Update.
4225         * gnulib/import/m4/pathmax.m4: Update.
4226         * gnulib/import/m4/rawmemchr.m4: Update.
4227         * gnulib/import/m4/readdir.m4: Update.
4228         * gnulib/import/m4/readlink.m4: Update.
4229         * gnulib/import/m4/realloc.m4: Update.
4230         * gnulib/import/m4/rename.m4: Update.
4231         * gnulib/import/m4/rewinddir.m4: Update.
4232         * gnulib/import/m4/rmdir.m4: Update.
4233         * gnulib/import/m4/save-cwd.m4: Update.
4234         * gnulib/import/m4/secure_getenv.m4: Update.
4235         * gnulib/import/m4/setenv.m4: Update.
4236         * gnulib/import/m4/signal_h.m4: Update.
4237         * gnulib/import/m4/ssize_t.m4: Update.
4238         * gnulib/import/m4/stat-time.m4: Update.
4239         * gnulib/import/m4/stat.m4: Update.
4240         * gnulib/import/m4/std-gnu11.m4: Update.
4241         * gnulib/import/m4/stdbool.m4: Update.
4242         * gnulib/import/m4/stddef_h.m4: Update.
4243         * gnulib/import/m4/stdint.m4: Update.
4244         * gnulib/import/m4/stdio_h.m4: Update.
4245         * gnulib/import/m4/stdlib_h.m4: Update.
4246         * gnulib/import/m4/strchrnul.m4: Update.
4247         * gnulib/import/m4/strdup.m4: Update.
4248         * gnulib/import/m4/strerror.m4: Update.
4249         * gnulib/import/m4/string_h.m4: Update.
4250         * gnulib/import/m4/strstr.m4: Update.
4251         * gnulib/import/m4/strtok_r.m4: Update.
4252         * gnulib/import/m4/sys_socket_h.m4: Update.
4253         * gnulib/import/m4/sys_stat_h.m4: Update.
4254         * gnulib/import/m4/sys_time_h.m4: Update.
4255         * gnulib/import/m4/sys_types_h.m4: Update.
4256         * gnulib/import/m4/tempname.m4: Update.
4257         * gnulib/import/m4/time_h.m4: Update.
4258         * gnulib/import/m4/unistd-safer.m4: Update.
4259         * gnulib/import/m4/unistd_h.m4: Update.
4260         * gnulib/import/m4/warn-on-use.m4: Update.
4261         * gnulib/import/m4/wchar_h.m4: Update.
4262         * gnulib/import/m4/wchar_t.m4: Update.
4263         * gnulib/import/m4/wctype_h.m4: Update.
4264         * gnulib/import/m4/wint_t.m4: Update.
4265         * gnulib/import/malloc.c: Update.
4266         * gnulib/import/malloc/scratch_buffer.h: Update.
4267         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4268         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4269         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4270         * gnulib/import/malloca.c: Update.
4271         * gnulib/import/malloca.h: Update.
4272         * gnulib/import/malloca.valgrind: Update.
4273         * gnulib/import/math.in.h: Update.
4274         * gnulib/import/mbrtowc.c: Update.
4275         * gnulib/import/mbsinit.c: Update.
4276         * gnulib/import/mbsrtowcs-impl.h: Update.
4277         * gnulib/import/mbsrtowcs-state.c: Update.
4278         * gnulib/import/mbsrtowcs.c: Update.
4279         * gnulib/import/memchr.c: Update.
4280         * gnulib/import/memmem.c: Update.
4281         * gnulib/import/mempcpy.c: Update.
4282         * gnulib/import/memrchr.c: Update.
4283         * gnulib/import/mkdir.c: Update.
4284         * gnulib/import/mkstemp.c: Update.
4285         * gnulib/import/msvc-inval.c: Update.
4286         * gnulib/import/msvc-inval.h: Update.
4287         * gnulib/import/msvc-nothrow.c: Update.
4288         * gnulib/import/msvc-nothrow.h: Update.
4289         * gnulib/import/open.c: Update.
4290         * gnulib/import/openat-die.c: Update.
4291         * gnulib/import/openat-priv.h: Update.
4292         * gnulib/import/openat-proc.c: Update.
4293         * gnulib/import/openat.c: Update.
4294         * gnulib/import/openat.h: Update.
4295         * gnulib/import/opendir.c: Update.
4296         * gnulib/import/pathmax.h: Update.
4297         * gnulib/import/pipe-safer.c: Update.
4298         * gnulib/import/rawmemchr.c: Update.
4299         * gnulib/import/readdir.c: Update.
4300         * gnulib/import/readlink.c: Update.
4301         * gnulib/import/realloc.c: Update.
4302         * gnulib/import/ref-add.sin: Update.
4303         * gnulib/import/ref-del.sin: Update.
4304         * gnulib/import/rename.c: Update.
4305         * gnulib/import/rewinddir.c: Update.
4306         * gnulib/import/rmdir.c: Update.
4307         * gnulib/import/same-inode.h: Update.
4308         * gnulib/import/save-cwd.c: Update.
4309         * gnulib/import/save-cwd.h: Update.
4310         * gnulib/import/scratch_buffer.h: Update.
4311         * gnulib/import/secure_getenv.c: Update.
4312         * gnulib/import/setenv.c: Update.
4313         * gnulib/import/signal.in.h: Update.
4314         * gnulib/import/stat-time.c: Update.
4315         * gnulib/import/stat-time.h: Update.
4316         * gnulib/import/stat-w32.c: Update.
4317         * gnulib/import/stat-w32.h: Update.
4318         * gnulib/import/stat.c: Update.
4319         * gnulib/import/stdbool.in.h: Update.
4320         * gnulib/import/stddef.in.h: Update.
4321         * gnulib/import/stdint.in.h: Update.
4322         * gnulib/import/stdio.in.h: Update.
4323         * gnulib/import/stdlib.in.h: Update.
4324         * gnulib/import/str-two-way.h: Update.
4325         * gnulib/import/strchrnul.c: Update.
4326         * gnulib/import/strdup.c: Update.
4327         * gnulib/import/streq.h: Update.
4328         * gnulib/import/strerror-override.c: Update.
4329         * gnulib/import/strerror-override.h: Update.
4330         * gnulib/import/strerror.c: Update.
4331         * gnulib/import/string.in.h: Update.
4332         * gnulib/import/stripslash.c: Update.
4333         * gnulib/import/strnlen1.c: Update.
4334         * gnulib/import/strnlen1.h: Update.
4335         * gnulib/import/strstr.c: Update.
4336         * gnulib/import/strtok_r.c: Update.
4337         * gnulib/import/sys_stat.in.h: Update.
4338         * gnulib/import/sys_time.in.h: Update.
4339         * gnulib/import/sys_types.in.h: Update.
4340         * gnulib/import/tempname.c: Update.
4341         * gnulib/import/tempname.h: Update.
4342         * gnulib/import/time.in.h: Update.
4343         * gnulib/import/unistd--.h: Update.
4344         * gnulib/import/unistd-safer.h: Update.
4345         * gnulib/import/unistd.in.h: Update.
4346         * gnulib/import/unsetenv.c: Update.
4347         * gnulib/import/verify.h: Update.
4348         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4349         * gnulib/import/wchar.in.h: Update.
4350         * gnulib/import/wctype.in.h: Update.
4351         * gnulib/import/xalloc-oversized.h: Update.
4352         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4353         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4354
4355 2018-08-16  Gary Benson <gbenson@redhat.com>
4356
4357         PR gdb/13000:
4358         * gdb/main.c (captured_main_1): Exit with nonzero status
4359         in batch mode if the last command to be executed failed.
4360         * NEWS: Mention the above.
4361
4362 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4363
4364         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4365         end of warning message.
4366
4367 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4368
4369         PR gdb/22943:
4370         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4371         (aarch64_extract_return_value): Use
4372         aapcs_is_vfp_call_or_return_candidate.
4373         (aarch64_return_in_memory): Likewise.
4374         (aarch64_store_return_value): Likewise.
4375
4376 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4377
4378         * aarch64-tdep.c
4379         (aapcs_is_vfp_call_or_return_candidate): Make static
4380         (pass_in_v_or_stack): Remove function.
4381         (pass_in_v_vfp_candidate): New function.
4382         (aarch64_push_dummy_call): Check for float register candidates.
4383
4384 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4385
4386         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4387         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4388         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4389
4390 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4391
4392         PR build/23399
4393         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4394         (struct ipa_sym_addresses): Rename to...
4395         (struct ipa_sym_addresses_common): ... this.
4396         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4397
4398 2018-08-28  Tom Tromey  <tom@tromey.com>
4399
4400         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4401         (token_fifo): Now a std::vector.
4402         (yylex, c_parse): Update.
4403         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4404         (token_fifo): Now a std::vector.
4405         (yylex, d_parse): Update.
4406         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4407         (token_fifo): Now a std::vector.
4408         (yylex, go_parse): Update.
4409
4410 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * parser-defs.h (struct type_stack) <elements>: Change type to
4413         std::vector<union type_stack_elt>.
4414         <depth, size>: Remove.
4415         * parse.c (parse_exp_in_context_1): Adjust.
4416         (type_stack_reserve): Remove.
4417         (check_type_stack_depth): Remove.
4418         (insert_into_type_stack): Adjust to std::vector.
4419         (insert_type): Likewise.
4420         (push_type): Likewise.
4421         (push_type_int): Likewise.
4422         (insert_type_address_space): Likewise.
4423         (pop_type): Likewise.
4424         (pop_type_int): Likewise.
4425         (pop_typelist): Likewise.
4426         (pop_type_stack): Likewise.
4427         (append_type_stack): Likewise.
4428         (push_type_stack): Likewise.
4429         (get_type_stack): Likewise.
4430         (type_stack_cleanup): Likewise.
4431         (push_typelist): Likewise.
4432         (follow_types): Likewise.
4433         (_initialize_parse): Likewise.
4434
4435 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4436
4437         * NEWS: Mention csky target.
4438
4439 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4440             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4441             Don Breazeal  <donb@codesourcery.com>
4442
4443         * csky-linux-tdep.c: New file.
4444         * csky-tdep.c: Likewise.
4445         * csky-tdep.h: Likewise.
4446         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4447         csky-tdep.o.
4448         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4449         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4450         * configure.tgt: Add csky support.
4451
4452 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4453
4454         * python/py-framefilter.c (py_print_frame): Print frame architecture
4455         when printing on an MI output.
4456
4457 2018-08-27  Tom Tromey  <tom@tromey.com>
4458
4459         PR build/23087:
4460         * configure: Rebuild.
4461         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4462
4463 2018-08-27  Tom Tromey  <tom@tromey.com>
4464
4465         * aarch64-linux-tdep.c
4466         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4467         casts to int.
4468
4469 2018-08-27  Tom Tromey  <tom@tromey.com>
4470
4471         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4472         unsigned.
4473         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4474         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4475         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4476         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4477         unsigned.
4478
4479 2018-08-27  Tom Tromey  <tom@tromey.com>
4480
4481         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4482         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4483
4484 2018-08-27  Tom Tromey  <tom@tromey.com>
4485
4486         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4487         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4488         ULONGEST_MAX.
4489         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4490         ULONGEST_MAX.
4491         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4492         ULONGEST_MAX.
4493         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4494         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4495         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4496         ULONGEST_MAX.
4497         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4498         (ppc64_linux_sigaction_tramp_frame)
4499         (ppc32_linux_sighandler_tramp_frame)
4500         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4501         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4502         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4503         * mn10300-linux-tdep.c (am33_linux_sigframe)
4504         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4505         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4506         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4507         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4508         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4509         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4510         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4511         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4512         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4513         * microblaze-linux-tdep.c
4514         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4515         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4516         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4517         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4518         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4519         * common/common-types.h (ULONGEST_MAX): New define.
4520         (CORE_ADDR_MAX): Fix formatting.
4521         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4522         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4523         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4524         (arm_linux_rt_sigreturn_tramp_frame)
4525         (arm_eabi_linux_sigreturn_tramp_frame)
4526         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4527         (thumb2_eabi_linux_sigreturn_tramp_frame)
4528         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4529         (arm_linux_restart_syscall_tramp_frame)
4530         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4531         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4532         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4533         ULONGEST_MAX.
4534         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4535
4536 2018-08-27  Tom Tromey  <tom@tromey.com>
4537
4538         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4539         CORE_ADDR_MAX.
4540         * mips-tdep.c (mips_deal_with_atomic_sequence)
4541         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4542         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4543         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4544         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4545         CORE_ADDR_MAX.
4546         * aarch64-tdep.c (aarch64_software_single_step): Use
4547         CORE_ADDR_MAX.
4548
4549 2018-08-27  Tom Tromey  <tom@tromey.com>
4550
4551         * linespec.c (complete_linespec_component): Add cast to "char".
4552         * completer.c (completion_tracker::build_completion_result): Add
4553         cast to "char".
4554
4555 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4556
4557         * solist.h (struct solist, struct target_so_ops): Fix
4558         indentation.
4559
4560 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4561
4562         * ada-tasks.c (ada_task_info_s): Remove typedef.
4563         (DEF_VEC_O(ada_task_info_s)): Remove.
4564         (struct ada_tasks_inferior_data): Initialize fields.
4565         <task_list>: Make an std::vector.
4566         (get_ada_tasks_inferior_data): Allocate with new.
4567         (ada_get_task_number): Adjust.
4568         (get_task_number_from_id): Likewise.
4569         (valid_task_id): Likewise.
4570         (ada_get_task_info_from_ptid): Likewise.
4571         (iterate_over_live_ada_tasks): Likewise.
4572         (add_ada_task): Likewise.
4573         (read_known_tasks): Likewise.
4574         (ada_build_task_list): Likewise.
4575         (print_ada_task_info): Likewise.
4576         (info_task): Likewise.
4577         (task_command_1): Likewise.
4578
4579 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4580
4581         * ada-lang.c (add_angle_brackets): Return std::string.
4582
4583 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4584
4585         * python/py-threadevent.c (py_get_event_thread): Initialize
4586         pythread.
4587
4588 2018-08-24  Pedro Alves  <palves@redhat.com>
4589
4590         * python/py-bpevent.c (create_breakpoint_event_object): Use
4591         copy-initialization.
4592         * python/py-continueevent.c (emit_continue_event): Use
4593         copy-initialization.
4594         * python/py-exitedevent.c (create_exited_event_object): Return a
4595         gdbpy_ref<>.
4596         (emit_exited_event): Use copy-initialization.
4597         * python/py-inferior.c (python_new_inferior)
4598         (python_inferior_deleted, add_thread_object): Use
4599         copy-initialization.
4600         * python/py-infevents.c (create_inferior_call_event_object)
4601         (create_register_changed_event_object)
4602         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4603         (emit_inferior_call_event, emit_memory_changed_event)
4604         (emit_register_changed_event): Use copy-initialization.
4605         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4606         Return a gdbpy_ref<>.
4607         (emit_new_objfile_event): Use copy-initialization.
4608         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4609         (emit_clear_objfiles_event): Use copy-initialization.
4610         * python/py-signalevent.c (create_signal_event_object): Use
4611         copy-initialization.
4612         * python/py-threadevent.c (create_thread_event_object): Use
4613         copy-initialization.
4614
4615 2018-08-24  Pedro Alves  <palves@redhat.com>
4616             Simon Marchi  <simon.marchi@ericsson.com>
4617
4618         PR gdb/23379
4619         * python/py-continueevent.c: Include "gdbthread.h".
4620         (create_continue_event_object): Add intro comment.  Add 'ptid'
4621         parameter.  Use it to find thread to pass to
4622         create_thread_event_object.
4623         (emit_continue_event): Pass PTID down to
4624         create_continue_event_object.
4625         * python/py-event.h (py_get_event_thread): Declare.
4626         (create_thread_event_object): Remove default from 'thread'
4627         parameter.
4628         * python/py-stopevent.c (create_stop_event_object): Use
4629         py_get_event_thread.
4630         * python/py-threadevent.c (get_event_thread): Rename to ...
4631         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4632         and use it to find the thread.
4633         (create_thread_event_object): Assert that THREAD isn't null.
4634         Don't find the event thread here.
4635
4636 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4637
4638         * block.h (blockrange, blockranges): New struct declarations.
4639         (struct block): Add new field named `ranges'.
4640         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4641         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4642         macros for accessing ranges in struct block.
4643         (make_blockranges): New declaration.
4644         block.c (make_blockranges): New function.
4645         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4646         for block.
4647         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4648         * blockframe.c (cache_pc_function_block): New static global.
4649         (clear_pc_function_cache): Clear cache_pc_function_block.
4650         (find_pc_partial_function): Move comment to symtab.h.  Add
4651         support for non-contiguous blocks.
4652         * cli/cli-cmds.c (block.h): Include.
4653         (print_disassembly): Handle printing of non-contiguous blocks.
4654         (disassemble_current_function): Likewise.
4655         (disassemble_command): Likewise.
4656
4657         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4658         BLOCK_START.
4659         * blockframe.c (get_pc_function_start): Likewise.
4660         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4661         (gcc_symbol_address): Likewise.
4662         * compile/compile-object-run.c (compile_object_run): Likewise.
4663         * compile/compile.c (get_expr_block_and_pc): Likewise.
4664         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4665         (func_addr_to_tail_call_list): Likewise.
4666         * findvar.c (default_read_var_value): Likewise.
4667         * inline-frame.c (inline_frame_this_id): Likewise.
4668         (skip-inline_frames): Likewise.
4669         * infcmd.c (until_next_command): Likewise.
4670         * linespec.c (convert_linespec_to_sals): Likewise.
4671         * parse.c (parse_exp_in_context_1): Likewise.
4672         * printcmd.c (build_address_symbolic): likewise.
4673         (info_address_command): Likewise.
4674         symtab.c (find_function_start_sal): Likewise.
4675         (skip_prologue_sal): Likewise.
4676         (find_function_alias_target): Likewise.
4677         (find_gnu_ifunc): Likewise.
4678         * stack.c (find_frame_funname): Likewise.
4679         * symtab.c (fixup_symbol_section): Likewise.
4680         (find_function_start_sal): Likewise.
4681         (skip_prologue_sal): Likewsie.
4682         (find_function_alias_target): Likewise.
4683         (find_gnu_ifunc): Likewise.
4684         * tracepoint.c (info_scope_command): Likewise.
4685         * value.c (value_fn_field): Likewise.
4686
4687         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4688         in place of find_pc_partial_function.
4689         * blockframe.c (find_function_entry_range_from_pc): New function.
4690         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4691         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4692         for each range in a block.
4693
4694
4695 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4696
4697         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4698         incrementation.
4699
4700 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4701
4702         * solib-svr4.c (read_program_headers_from_bfd): Return
4703         gdb::optional<gdb::byte_vector>.
4704         (svr4_exec_displacement): Adjust.
4705
4706 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4707
4708         * solib-svr4.c (read_program_header): Return
4709         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4710         (find_program_interpreter): Return
4711         gdb::optional<gdb::byte_vector>.
4712         (scan_dyntag_auxv): Adjust.
4713         (enable_break): Adjust.
4714         (svr4_exec_displacement): Adjust.
4715
4716 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4717
4718         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4719         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4720
4721 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4722
4723         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4724         string_vprintf.
4725         * guile/scm-utils.c (gdbscm_printf): Likewise.
4726         * serial.c (serial_printf): Likewise.
4727         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4728
4729 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4730
4731         * stack.c (print_frame): Print frame architecture when printing on
4732         an MI output.
4733         * NEWS: Mention new "arch" attribute in frame output.
4734
4735 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4736
4737         * arch/aarch64.h (aarch64_regnum): Update comment.
4738
4739 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4740
4741         * NEWS: Add SVE to 8.2 section.
4742
4743 2018-08-21  Pedro Alves  <palves@redhat.com>
4744
4745         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4746         out from gdbscm_parse_function_args.
4747         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4748         gdbscm_parse_function_args_1.
4749
4750 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4751
4752         PR gdb/17816
4753         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4754         operator.
4755
4756 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4757
4758         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4759
4760 2018-08-19  Michael Spang  <spang@google.com>
4761
4762         PR gdb/11786
4763         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4764         for PT_TLS segments.
4765
4766 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4767
4768         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4769         dwarf_variable_value.
4770         * dwarf2-frame.c (class dwarf_expr_executor):
4771         Add override for dwarf_variable_value.
4772         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4773         (class symbol_needs_eval_context): Likewise.
4774         (indirect_synthetic_pointer): Add forward declaration.
4775         (sect_variable_value): New function.
4776         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4777         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4778         for DW_OP_GNU_variable_value.
4779
4780 2018-08-16  Tom Tromey  <tom@tromey.com>
4781
4782         * top.c (read_command_file): Update.
4783         (command_line_input): Remove "repeat" argument.
4784         * ada-lang.c (get_selections): Update.
4785         * linespec.c (decode_line_2): Update.
4786         * defs.h (command_line_input): Remove argument.
4787         * cli/cli-script.c (read_next_line): Update.
4788         * python/py-gdb-readline.c: Update.
4789
4790 2018-08-17  Tom Tromey  <tom@tromey.com>
4791
4792         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4793         command_line_input.
4794
4795 2018-08-15  Tom Tromey  <tom@tromey.com>
4796
4797         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4798
4799 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4800
4801         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4802         If used, use find_pc_partial_function to find address range
4803         to disassemble.
4804         * mi/mi-main.c (mi_cmd_list_features): Report
4805         "data-disassemble-a-option" feature.
4806         * NEWS: Mention new -data-disassemble option -a.
4807
4808 2018-08-13  Tom Tromey  <tom@tromey.com>
4809
4810         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4811
4812 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4813
4814         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4815         (aarch64_linux_collect_sve_regset): Likewise.
4816         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4817         * regcache.h (regcache_map_entry_size): New function.
4818
4819 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4820
4821         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4822         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4823         (SVE_HEADER_VL_LENGTH): Likewise.
4824         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4825         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4826         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4827         (SVE_HEADER_SIZE_OFFSET): Likewise.
4828         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4829         (SVE_HEADER_VL_OFFSET): Likewise.
4830         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4831         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4832         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4833         (SVE_HEADER_SIZE): Likewise.
4834         (aarch64_linux_core_read_vq): Add function.
4835         (aarch64_linux_core_read_description): Check for SVE section.
4836
4837 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4838
4839         * aarch64-fbsd-tdep.c
4840         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4841         collect_size.
4842         * aarch64-linux-tdep.c
4843         (aarch64_linux_iterate_over_regset_sections): Likewise.
4844         * alpha-linux-tdep.c
4845         (alpha_linux_iterate_over_regset_sections):
4846         * alpha-nbsd-tdep.c
4847         (alphanbsd_iterate_over_regset_sections): Likewise.
4848         * amd64-fbsd-tdep.c
4849         (amd64fbsd_iterate_over_regset_sections): Likewise.
4850         * amd64-linux-tdep.c
4851         (amd64_linux_iterate_over_regset_sections): Likewise.
4852         * arm-bsd-tdep.c
4853         (armbsd_iterate_over_regset_sections): Likewise.
4854         * arm-fbsd-tdep.c
4855         (arm_fbsd_iterate_over_regset_sections): Likewise.
4856         * arm-linux-tdep.c
4857         (arm_linux_iterate_over_regset_sections): Likewise.
4858         * corelow.c (get_core_registers_cb): Likewise.
4859         (core_target::fetch_registers): Likewise.
4860         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4861         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4862         * gdbarch.h (void): Regenerate.
4863         * gdbarch.sh: Add supply_size and collect_size.
4864         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4865         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4866         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4867         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4868         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4869         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4870         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4871         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4872         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4873         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4874         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4875         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4876         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4877         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4878         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4879         Likewise.
4880         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4881         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4882         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4883         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4884         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4885         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4886         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4887         Likewise.
4888         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4889         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4890         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4891         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4892         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4893         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4894         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4895         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4896
4897 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4900         with string_printf.
4901
4902 2018-08-10  Keith Seitz  <keiths@redhat.com>
4903
4904         * compile/compile-c-support.c (add_code_header, add_code_footer):
4905         Move into policy class.
4906         (c_push_user_expression, pop_user_expression_nop)
4907         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4908         (compile_program): New host class.
4909         (c_compile_program): New typedef.
4910         (c_compute_porgram): Use c_compile_program.
4911
4912 2018-08-10  Keith Seitz  <keiths@redhat.com>
4913
4914         * compile/compile-internal.h (compile_instance::~compile_instance):
4915         Remove calls to htab_delete.
4916         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4917         * compile.c (compile_instance::compile_instance): Initialize
4918         htab unique pointers.
4919         (compile_instance::get_cached_type, compile_instance::insert_type)
4920         (compile_instance::error_symbol_once): Update for unique_ptr.
4921
4922 2018-08-10  Keith Seitz  <keiths@redhat.com>
4923
4924         * compile/compile-c-symbols.c (struct symbol_error)
4925         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4926         (compile_instance::insert_symbol_error)
4927         (compile_instance::error_symbol_once): Move to ...
4928         * compile/compile.c: ... here.
4929
4930 2018-08-10  Keith Seitz  <keiths@redhat.com>
4931
4932         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4933         instead of `new_compile_instance'.
4934         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4935         Update description.
4936         If the symbol error map is not initialized, create it.
4937         (generate_c_for_for_one_symbol): Do not check/initialize
4938         the symbol error map.
4939         * compile/compile-c-types.c (compile_c_instance): Make a class.
4940         Update all callers.
4941         (compile_instance::compile_instance): Initialize the type cache.
4942         (get_cached_type): New function.
4943         (insert_type): Update description.
4944         (compile_c_instance::m_default_cflags): Define.
4945         (convert_type): Update description.  Use get_cached_type.
4946         (delete_instance): Moved to destructor.
4947         (new_compile_instance): Moved to constructor.
4948         * compile/compile-c.h (compile_c_instance): Make class inheriting
4949         from compile_instance.
4950         <base>: Remove field.
4951         <type_map, symbol_err_map>: Move to base class.
4952         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4953         * compile/compile-internal.h (compile_instance): Make class.
4954         <type_map_t, symbol_err_map_t>: Define.
4955         <fe>: Rename to `m_gcc_fe'.
4956         <scope, block, gcc_target_options>: Add `m_' prefix.
4957         <m_type_map, m_symbol_err_map>: New fields, moved from
4958         compile_c_instance.
4959         <destroy>: Remove.
4960         (convert_type, new_compile_instance): Remove.
4961         * compile/compile.c (cleanup_compile_instance): Remove.
4962         (compile_to_object): Use unique_ptr to eliminate cleanups.
4963         (compile_instance::set_print_callback, compile_instance::version)
4964         (compile_instance::set_verbose)
4965         (compile_instance::set_driver_filename)
4966         (compile_instance::set_triplet_regexp)
4967         (compile_instance::set_arguments)
4968         (compile_instance::set_source_file)
4969         (compile_instance::compile): Define.
4970
4971 2018-08-10  Keith Seitz  <keiths@redhat.com>
4972
4973         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4974         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4975         gcc-c-fe.def to define C plugin.
4976         (delete_instance): Delete `c_plugin'.
4977         (new_compile_instance): Initialize `c_plugin'.
4978         * compile/compile-c.h: Include gcc_c_plugin.h.
4979         (struct compile_c_instance) <c_plugin>: New member.
4980         * gcc-c-plugin.h: New file.
4981         Update all callers with API change.
4982
4983 2018-08-10  Keith Seitz  <keiths@redhat.com>
4984
4985         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4986         (HFILES_NO_SRCDIR): ... to here.
4987         Add compile-internal.h and compile-c.h.
4988         * compile/compile-c-support.c: Include compile-c.h.
4989         * compile/compile-c-symbols.c: Include compile-c.h.
4990         (generate_c_for_variable_locations): Update comment.
4991         * compile/compile-c-types.c: Include compile-c.h.
4992         * compile/compile-c.h: New file -- moved C language declarations
4993         from other files here.
4994         * compile/compile-internal.h: Do not include hashtab.h or
4995         common/enum-flags.h.
4996         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4997         (gcc_convert_symbol, gcc_symbol_address)
4998         (generate_c_for_variable_locations, c_get_mode_for_size)
4999         (c_get_range_decl_name): Definitions moved to compile-c.h.
5000         * compile/compile-loc2c.c: Include compile-c.h.
5001
5002 2018-08-10  Keith Seitz  <keiths@redhat.com>
5003
5004         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5005         (c_symbol_substitution_name): ... this.
5006         Update all callers.
5007
5008 2018-08-10  Keith Seitz  <keiths@redhat.com>
5009
5010         * compile/compile-c-support.c (c_compute_program): Use
5011         unique_xmalloc_ptr to eliminate cleanup.
5012         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5013         Return a unique_xmalloc_ptr and eliminate cleanup.
5014         * compile/compile-internal.h (generate_c_for_variable_locations):
5015         Return unique_xmalloc_ptr and update description.
5016
5017 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5018
5019         * corelow.c (core_target::get_core_register_section): Rename
5020         min_size to section_min_size.
5021
5022 2018-08-09  Jim Wilson  <jimw@sifive.com>
5023
5024         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5025         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5026         * NEWS: Mention new GNU/Linux RISC-V target.
5027         * configure.host: Add riscv*-*-linux*.
5028         * configure.nat: Add riscv*.
5029         * configure.tgt: Add riscv*-*-linux*.
5030         * riscv-linux-nat.c: New file.
5031         * riscv-linux-tdep.c: New file.
5032
5033 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5034
5035         * infrun.c (resume): Make static, add forward declaration.
5036         (proceed): Update header comment.
5037         * infrun.h (resume): Delete declaration.
5038
5039 2018-08-09  Tom Tromey  <tom@tromey.com>
5040
5041         * riscv-tdep.h: Minor formatting fixes.
5042
5043 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5044
5045         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5046         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5047         (test_mkdir_recursive): Likewise.
5048         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5049
5050 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5051
5052         * valarith.c (value_subscripted_rvalue): If an array is not in
5053         memory, and we don't know the upper bound, then we can't know that
5054         the requested element exists or not.
5055
5056 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5057
5058         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5059         (target_options_to_string): Add comment.
5060
5061 2018-08-08  Tom Tromey  <tom@tromey.com>
5062
5063         * unittests/scoped_mmap-selftests.c: Check result of "write".
5064
5065 2018-08-08  Jim Wilson  <jimw@sifive.com>
5066
5067         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5068         (decode_register_index_short): New.
5069         (decode_j_type_insn, decode_cj_type_insn): New.
5070         (decode_b_type_insn, decode_cb_type_insn): New.
5071         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5072         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5073         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5074         is_c_sw_insn instead of is_sw_insn.
5075         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5076         (riscv_software_single_step): New.
5077         * riscv-tdep.h (riscv_software_single_step): Declare.
5078
5079         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5080         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5081
5082 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5083
5084         PR gdb/18050:
5085         * target.c (dispose_inferior): Don't dispose of inferiors that are
5086         already killed.
5087
5088 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5089
5090         * remote.c (remote_target::download_tracepoint): Change char* to
5091         const char*.
5092
5093 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5094
5095         * target.h (target_options_to_string): Return an std::string.
5096         * target.c (str_comma_list_concat_elem): Return void, use
5097         std::string.
5098         (do_option): Likewise.
5099         (target_options_to_string): Return an std::string.
5100         * linux-nat.c (linux_nat_target::wait): Adjust.
5101         * target-debug.h (target_debug_print_options): Adjust.
5102
5103 2018-08-07  Tom Tromey  <tom@tromey.com>
5104
5105         * Makefile.in (CPPFLAGS): New variable.
5106         (INTERNAL_CPPFLAGS): Use it.
5107
5108 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5109
5110         * NEWS: Mention the index cache.
5111
5112 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5113
5114         * common/pathstuff.h (get_standard_cache_dir): New.
5115         * common/pathstuff.c (get_standard_cache_dir): New.
5116         * build-id.h (build_id_to_string): New.
5117         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5118         DEBUG_STR_SUFFIX): Move to here.
5119         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5120         DEBUG_STR_SUFFIX): Move from there.
5121         (write_psymtabs_to_index): Make non-static, add basename
5122         parameter.  Write to temporary files, rename when done.
5123         (save_gdb_index_command): Adjust call to
5124         write_psymtabs_to_index.
5125         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5126         field.
5127         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5128         (get_gdb_index_contents_from_cache): New.
5129         (get_gdb_index_contents_from_cache_dwz): New.
5130         (dwarf2_initialize_objfile): Read index from cache.
5131         (dwarf2_build_psymtabs): Save to index.
5132         * dwarf-index-cache.h: New file.
5133         * dwarf-index-cache.c: New file.
5134         * dwarf-index-write.h: New file.
5135
5136 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5137
5138         * gnulib/aclocal.m4: Re-generate.
5139         * gnulib/config.in: Re-generate.
5140         * gnulib/configure: Re-generate.
5141         * gnulib/import/Makefile.am: Re-generate.
5142         * gnulib/import/Makefile.in: Re-generate.
5143         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5144         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5145         * gnulib/import/m4/mkdir.m4: New file.
5146         * gnulib/import/mkdir.c: New file.
5147         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5148         module.
5149
5150 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5151
5152         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5153         * common/scoped_mmap.c: New file.
5154         * common/scoped_mmap.h (destroy): New method.
5155         (~scoped_mmap, reset): Use destroy.
5156         (scoped_mmap): New move constructor.
5157         (mmap_file): New declaration.
5158         * unittests/scoped_mmap-selftests.c (test_normal,
5159         test_invalid_filename, run_tests): New functions.
5160         (_initialize_scoped_mmap_selftests): Register selftest.
5161
5162 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5163
5164         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5165         (read_gdb_index_from_buffer): ... this.  Remove section
5166         parameter, add buffer parameter.
5167         (get_gdb_index_contents_ftype,
5168         get_gdb_index_contents_dwz_ftype): New typedefs.
5169         (dwarf2_read_gdb_index): Add callback parameters to get the
5170         index contents.
5171         (get_gdb_index_contents_from_section): New.
5172         (dwarf2_initialize_objfile): Update call to
5173         dwarf2_read_gdb_index.
5174
5175 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5176
5177         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5178         (gdb_open_cloexec): Likewise.
5179         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5180         (commandline_from_pid): Likewise.
5181         (linux_xfer_osdata_threads): Likewise.
5182         (linux_xfer_osdata_fds): Likewise.
5183         * ada-lang.c (is_package_name): Likewise.
5184         * auxv.c (procfs_xfer_auxv): Likewise.
5185         * breakpoint.c (print_one_breakpoint_location): Use
5186         uiout::field_fmt.
5187         (print_one_catch_solib): Use string_printf.
5188         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5189         (add_pe_forwarded_sym): Likewise.
5190         * dwarf2read.c (create_type_unit_group): Likewise.
5191         (build_error_marker_type): Likewise.
5192         * infcall.c (get_function_name): Likewise.
5193         * valprint.c (print_converted_chars_to_obstack): Likewise.
5194         * xtensa-tdep.c (xtensa_register_type): Likewise.
5195
5196 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5197
5198         * remote.c (remote_target::download_tracepoint): Fix format
5199         string errors.
5200
5201 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5202
5203         * tracefile.c: Include common/byte-vector.h.
5204         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5205         with trace_regblock_size if needed.  Update uses of buf.
5206
5207 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5208
5209         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5210         std::vector<unsigned char>.
5211         * tracepoint.c (collection_list::collection_list): Remove
5212         m_regs_mask initializer from initializer list.  Resize
5213         m_regs_mask using the largest remote register number.
5214         (collection_list::add_remote_register): Remove size check on
5215         m_regs_mask.  Use at to access element.
5216         (collection_list::stringify): Change type of temp_buf to
5217         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5218         stringify the register mask.  Use pack_hex_byte for the register
5219         mask.
5220
5221 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5222
5223         * tracepoint.h (class collection_list) <add_register>: Remove.
5224         <add_remote_register, add_ax_registers, add_local_register>:
5225         Declare.
5226         <add_memrange>: Add scope parameter.
5227         * tracepoint.c (encode_actions_1): Likewise.
5228         (collection_list::add_register): Rename to ...
5229         (collection_list::add_remote_register): ... this.  Update
5230         comment.
5231         (collection_list::add_ax_registers, add_local_register): New
5232         methods.
5233         (collection_list::add_memrange): Add scope parameter.  Call
5234         add_local_register instead of add_register.
5235         (finalize_tracepoint_aexpr): New function.
5236         (collection_list::collect_symbol): Update calls to add_memrange.
5237         Call add_local_register instead of add_register.  Call
5238         add_ax_registers.  Call finalize_tracepoint_aexpr.
5239         (encode_actions_1): Get remote regnos for $reg action.  Call
5240         add_remote_register, add_ax_registers, and add_local_register.
5241         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5242         (validate_actionline): Call finalize_tracepoint_aexpr.
5243
5244 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5245
5246         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5247         Replace array buf with gdb::char_vector buf, of size
5248         get_remote_packet_size ().  Replace references to buf and
5249         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5250         and xsnprintf with snprintf.  Raise errors if the buffer is too
5251         small.
5252
5253 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5254
5255         * remote.c (remote_target::download_tracepoint): Fix the has_more
5256         predicate in the QTDP action list iteration.
5257
5258 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5259
5260         * remote.c (remote_target::download_tracepoint): Fix indentation
5261         in for block.
5262
5263 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5264
5265         * proc-api.c (_initialize_proc_api): Remove c, unused.
5266         * procfs.c (procfs_init_inferior): Remove signals, unused.
5267         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5268         unused.
5269
5270 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5271             Andrew Burgess  <andrew.burgess@embecosm.com>
5272
5273         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5274         'W_STOPCODE (0)' as this could be ambiguous.
5275
5276 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5277
5278         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5279         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5280         "ai_socktype").
5281
5282 2018-08-02  Tom Tromey  <tom@tromey.com>
5283
5284         PR symtab/16842.
5285         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5286         symbols.
5287         (process_structure_scope): Likewise.
5288
5289 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5290
5291         PR gdb/22629:
5292         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5293         kill inferior.
5294
5295 2018-08-02  Tom Tromey  <tom@tromey.com>
5296
5297         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5298         (darwin_suspend_inferior, darwin_resume_inferior)
5299         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5300         (darwin_check_new_threads): Check result of get_darwin_inferior.
5301
5302 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5303
5304         GDB 8.1.1 released.
5305
5306 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5307
5308         * varobj.c (varobj_get_path_expr_parent): Report an error if
5309         parent is a dynamic varobj.
5310
5311 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5312
5313         * gnulib/aclocal.m4: Re-generate.
5314         * gnulib/config.in: Re-generate.
5315         * gnulib/configure: Re-generate.
5316         * gnulib/import/Makefile.in: Re-generate.
5317         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5318         * gnulib/import/m4/onceonly.m4: Re-generate.
5319
5320 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5321
5322         * target-descriptions.c (struct xml_test_tdesc): New.
5323         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5324         (record_xml_tdesc): Update.
5325         (maintenance_check_xml_descriptions): Update.
5326         * target-descriptions.h (record_xml_tdesc): Update comment.
5327
5328 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5329
5330         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5331         checking array bounds are defined.
5332
5333 2018-07-30  Tom Tromey  <tom@tromey.com>
5334
5335         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5336         irreflexivity violation.
5337
5338 2018-07-30  Tom Tromey  <tom@tromey.com>
5339
5340         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5341         * value.c (unpack_long): Remove lint code.
5342         * valops.c (value_ind): Remove lint code.
5343         * valarith.c (value_x_binop, value_x_unop, value_equal)
5344         (value_pos): Remove lint code.
5345
5346 2018-07-28  Tom de Vries  <tdevries@suse.de>
5347
5348         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5349         with undefined upper bound as <optimized out>.
5350
5351 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5352
5353         * gcore.in: Rename variable "name" to "prefix".  Expand
5354         "usage" text.
5355
5356 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5357
5358         * windows-nat.c (windows_nat_target::create_inferior): Update to
5359         call close() in global namespace.
5360
5361 2018-07-26  Tom Tromey  <tom@tromey.com>
5362
5363         * dwarf-index-write.c (add_address_entry): Don't add objfile
5364         offsets.
5365         * dbxread.c (find_stab_function): Rename from
5366         find_stab_function_addr.  Return a bound_minimal_symbol.
5367         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5368         Don't add objfile offsets.
5369         (end_psymtab): Use raw_text_low, raw_text_high,
5370         MSYMBOL_VALUE_RAW_ADDRESS.
5371         (read_ofile_symtab): Update.
5372         (process_one_symbol): Update.
5373         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5374         offsets.
5375         (dw2_relocate): Remove.
5376         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5377         searching addrmap.
5378         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5379         Update.
5380         (process_psymtab_comp_unit_reader, add_partial_symbol)
5381         (add_partial_subprogram, dwarf2_ranges_read): Update.
5382         (load_partial_dies): Update.
5383         (add_address_entry): Don't add objfile offsets.
5384         (dwarf2_build_include_psymtabs): Update.
5385         (create_addrmap_from_aranges): Don't add objfile offsets.
5386         (dw2_find_pc_sect_compunit_symtab): Update.
5387         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5388         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5389         Update.
5390         (parse_partial_symbols): Don't add objfile offsets.  Use
5391         raw_text_low, raw_text_high.  Update.
5392         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5393         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5394         or call 'relocate' quick function.  Clear psymbol_map.
5395         * psympriv.h (struct partial_symbol) <address>: Add section
5396         offset.
5397         <set_unrelocated_address>: Rename from set_address.
5398         <raw_text_low, raw_text_high>: New methods.
5399         <text_low, text_high>: Add objfile parameter.
5400         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5401         set_unrelocated_address.
5402         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5403         (find_pc_psymbol): Update.
5404         (fixup_psymbol_section, relocate_psymtabs): Remove.
5405         (dump_psymtab, psym_functions): Update.
5406         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5407         parameter.
5408         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5409         (start_psymtab_common): Update.
5410         * symfile-debug.c (debug_qf_relocate): Remove.
5411         (debug_sym_quick_functions): Update.
5412         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5413         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5414         Update.
5415
5416 2018-07-26  Tom Tromey  <tromey@redhat.com>
5417
5418         * dbxread.c (end_psymtab): Use text_high_valid and
5419         text_low_valid.
5420         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5421         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5422         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5423         Update comment.
5424         <text_low_valid, text_high_valid>: New fields.
5425         <set_text_low, set_text_high>: Update.
5426         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5427
5428 2018-07-26  Tom Tromey  <tom@tromey.com>
5429
5430         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5431         Update.
5432         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5433         textlow and texthigh fields.
5434         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5435         Update.
5436         * mdebugread.c (parse_lines, parse_partial_symbols)
5437         (psymtab_to_symtab_1): Update.
5438         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5439         Rename fields.  Update comment.  Now private.
5440         <text_low, text_high, set_text_low, set_text_high>: New methods.
5441         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5442         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5443         (start_psymtab_common, maintenance_info_psymtabs)
5444         (maintenance_check_psymtabs): Update.
5445         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5446         texthigh fields.
5447         (scan_xcoff_symtab): Update.
5448
5449 2018-07-26  Tom Tromey  <tromey@redhat.com>
5450
5451         * psympriv.h (struct partial_symbol) <unrelocated_address,
5452         address, set_address>: New methods.
5453         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5454         (fixup_psymbol_section, relocate_psymtabs): Update.
5455         (print_partial_symbols): Add 'objfile' parameter.  Update.
5456         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5457         Update.
5458
5459 2018-07-26  Tom Tromey  <tom@tromey.com>
5460
5461         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5462         (debug_names::write_psymbols): Update.
5463         * psympriv.h (struct partial_symbol): Derive from
5464         general_symbol_info.
5465         <obj_section>: New method.
5466         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5467         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5468         (find_pc_sect_psymbol, fixup_psymbol_section)
5469         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5470         (print_partial_symbols, recursively_search_psymtabs)
5471         (compare_psymbols, psymbol_hash, psymbol_compare)
5472         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5473         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5474
5475 2018-07-26  Tom Tromey  <tromey@redhat.com>
5476
5477         * dbxread.c (end_psymtab): Remove dead code.
5478
5479 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5480
5481         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5482         DWARF unwinders are disabled.
5483         * dwarf2-frame.c: Add dwarf2read.h include.
5484         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5485         disabled.
5486         (dwarf2_frame_unwinders_enabled_p): Define.
5487         (show_dwarf_unwinders_enabled_p): New function.
5488         (_initialize_dwarf2_frame): Register switch to control DWARF
5489         unwinder use.
5490         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5491         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5492         (show_dwarf_cmdlist): Remove static keyword.
5493         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5494         (show_dwarf_cmdlist): Declare.
5495         * NEWS: Document new feature.
5496
5497 2018-07-26  Tom de Vries  <tdevries@suse.de>
5498
5499         PR breakpoints/23366
5500         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5501
5502 2018-07-26  Tom de Vries  <tdevries@suse.de>
5503
5504         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5505         DW_AT_count can't be translated to a dynamic prop.
5506
5507 2018-07-25  Tom de Vries  <tdevries@suse.de>
5508
5509         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5510         try/catch.
5511
5512 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5513
5514         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5515
5516 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5517
5518         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5519
5520 2018-07-24  Keith Seitz  <keiths@redhat.comt
5521
5522         PR symtab/23010
5523         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5524         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5525         instead of add_symbol_to_list.
5526         (read_file_scope): Call prepare_one_comp_unit before reading
5527         any other DIEs.
5528
5529 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5530
5531         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5532
5533 2018-07-24  Tom Tromey  <tom@tromey.com>
5534
5535         * utils.c (malloc, realloc, free): Don't declare.
5536         * configure, config.in: Rebuild.
5537         * configure.ac: Don't check for declarations of free, malloc, or
5538         realloc.
5539
5540 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5541
5542         * aarch64-linux-nat.c
5543         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5544         variable.
5545         * arm-linux-nat.c (fetch_regs): Likewise.
5546         (store_regs): Likewise.
5547         (fetch_vfp_regs): Likewise.
5548         (store_vfp_regs): Likewise.
5549         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5550         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5551         (arm_linux_nat_target::insert_watchpoint): Likewise.
5552         (arm_linux_nat_target::remove_watchpoint): Likewise.
5553         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5554         Likewise.
5555         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5556         Likewise.
5557         * ppc-linux-nat.c (fetch_register): Likewise.
5558         (fetch_all_gp_regs): Likewise.
5559         (fetch_ppc_registers): Likewise.
5560         (store_all_gp_regs): Likewise.
5561         (store_ppc_registers): Likewise.
5562         (hwdebug_insert_point): Likewise.
5563         (can_use_watchpoint_cond_accel): Likewise.
5564         * remote-sim.c (gdb_os_write_stdout): Likewise.
5565
5566 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5567             Tom Tromey  <tom@tromey.com>
5568
5569         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5570         test for it.
5571         * configure: Rebuild.
5572
5573 2018-07-22  Tom Tromey  <tom@tromey.com>
5574
5575         * regformats/regdat.sh: Define xmltarget_${name} inside
5576         #ifndef IN_PROCESS_AGENT.
5577
5578 2018-07-22  Tom Tromey  <tom@tromey.com>
5579
5580         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5581
5582 2018-07-22  Tom Tromey  <tom@tromey.com>
5583
5584         * symfile.c (reread_symbols): Notify iter, not objfile.
5585
5586 2018-07-22  Tom Tromey  <tom@tromey.com>
5587
5588         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5589         Use arch_ops.
5590         (ravenscar_thread_target::prepare_to_store): Likewise.
5591
5592 2018-07-22  Tom Tromey  <tom@tromey.com>
5593
5594         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5595         unused variable.  Call value_fetch_lazy when needed.
5596         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5597         Remove unused variable.  Call value_fetch_lazy when needed.
5598
5599 2018-07-22  Tom Tromey  <tom@tromey.com>
5600
5601         * m32c-tdep.c (mark_dma): Return void.
5602         (make_regs): Remove unused declarations.
5603
5604 2018-07-22  Tom Tromey  <tom@tromey.com>
5605
5606         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5607         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5608         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5609         bkscm_get_valid_block_smob_arg_unsafe for effect.
5610
5611 2018-07-22  Tom Tromey  <tom@tromey.com>
5612
5613         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5614         value_type.
5615
5616 2018-07-22  Tom Tromey  <tom@tromey.com>
5617
5618         * windows-nat.c (saved_context): Conditionally define.
5619         * remote.c (remote_target::remote_btrace_maybe_reopen):
5620         Conditionally declare "warned".
5621         * inflow.c (sigquit_ours): Conditionally define.
5622         (new_tty): Move "tty" declaration inside #if.
5623         * guile/guile.c (guile_datadir): Conditionally define.
5624         * charset.c (set_be_le_names): Move some declarations inside #if.
5625         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5626         #if.
5627         (parse_xml_btrace_conf): Likewise.
5628
5629 2018-07-22  Tom Tromey  <tom@tromey.com>
5630
5631         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5632
5633 2018-07-22  Tom Tromey  <tom@tromey.com>
5634
5635         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5636         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5637         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5638         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5639         * stack.c (frame_apply_level_command): Remove unused variable.
5640         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5641         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5642         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5643         unused variable.
5644         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5645         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5646         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5647         variable.
5648         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5649         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5650         variable.
5651         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5652         Remove unused variable.
5653         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5654         variable.
5655         * common/tdesc.c (print_xml_feature::visit): Remove unused
5656         variable.
5657         * compile/compile-object-load.c (store_regs): Remove unused
5658         variables.
5659         * complaints.c (clear_complaints): Remove unused variable.
5660         * corelow.c (core_target_open): Remove unused variable.
5661         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5662         variable.
5663         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5664         variable.
5665         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5666         variable.
5667         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5668         variable.
5669         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5670         variable.
5671         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5672         variable.
5673         * ia64-tdep.c (examine_prologue): Remove unused variable.
5674         * infcall.c (run_inferior_call): Remove unused variable.
5675         * inferior.c (exit_inferior): Remove unused variable.
5676         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5677         * linespec.c (decode_line_2): Remove unused variable.
5678         * linux-nat.c (super_close): Remove.
5679         * linux-tdep.c (linux_info_proc): Remove unused variable.
5680         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5681         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5682         Remove unused variable.
5683         * parse.c (find_minsym_type_and_address): Remove unused variable.
5684         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5685         variable.
5686         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5687         variable.
5688         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5689         variables.
5690         * record-btrace.c (record_btrace_target::store_registers): Remove
5691         unused variable.
5692         (cmd_show_record_btrace_cpu): Remove unused variable.
5693         * riscv-tdep.c (riscv_register_reggroup_p)
5694         (riscv_push_dummy_call, riscv_return_value): Remove unused
5695         variable.
5696         * rust-exp.y (literal): Remove unused variable.
5697         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5698         unused variable.
5699         <STRUCTOP_ANONYMOUS>: Likewise.
5700         * s390-linux-tdep.c (s390_linux_init_abi_31)
5701         (s390_linux_init_abi_64): Remove unused variable.
5702         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5703         (file_select_thread, net_windows_open, _initialize_ser_windows):
5704         Remove unused variables.
5705         * symtab.c (find_pc_sect_line): Remove unused variable.
5706         * target-memory.c (compute_garbled_blocks): Remove unused
5707         variable.
5708         (target_write_memory_blocks): Remove unused variable.
5709         * target.c (target_stack::unpush): Remove unused variables.
5710         * tracepoint.c (start_tracing, all_tracepoint_actions)
5711         (merge_uploaded_trace_state_variables)
5712         (print_one_static_tracepoint_marker): Remove unused variable.
5713         * unittests/basic_string_view/element_access/char/1.cc (test01):
5714         Remove unused variable.
5715         * windows-nat.c (windows_continue, windows_add_all_dlls)
5716         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5717         Remove unused variables.
5718
5719 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5720
5721         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5722         attr_profile in HAVE_ELF.
5723         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5724         HAVE_ELF.
5725
5726 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5727
5728         * frame.c (frame_register_unwind): Change parameter name.
5729         (frame_unwind_register): Likewise.
5730         (frame_unwind_register_value): Likewise.
5731         (frame_unwind_register_signed): Likewise.
5732         (frame_unwind_register_unsigned): Likewise.
5733         * frame.h (frame_register_unwind): Likewise.
5734         (frame_unwind_register): Likewise.
5735         (frame_unwind_register_value): Likewise.
5736         (frame_unwind_register_signed): Likewise.
5737         (frame_unwind_register_unsigned): Likewise.
5738         (frame_unwind_arch): Likewise.
5739
5740 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5741
5742         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5743         ISA maintenance.
5744
5745 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5746
5747         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5748         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5749         hand.
5750
5751 2018-07-20  Keith Seitz  <keiths@redhat.com>
5752
5753         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5754         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5755         m_compunit_symtab, m_language>: Add "m_" prefix.
5756         Update all uses.
5757         * buildsym.c: Update all uses.
5758
5759 2018-07-20  Tom Tromey  <tom@tromey.com>
5760
5761         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5762         * buildsym.h (record_line_ftype): Remove typedef.
5763
5764 2018-07-20  Tom Tromey  <tom@tromey.com>
5765
5766         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5767         (end_expandable_symtab): Likewise.
5768         (end_symtab_get_static_block): Likewise.
5769         (end_symtab_from_static_block): Likewise.
5770         * buildsym-legacy.c (augment_type_symtab): Remove.
5771         (end_expandable_symtab): Remove.
5772         (end_symtab_get_static_block): Remove.
5773         (end_symtab_from_static_block): Remove.
5774
5775 2018-07-20  Tom Tromey  <tom@tromey.com>
5776
5777         * dwarf2read.c: Include buildsym.h.
5778         (struct dwarf2_cu) <builder>: New method.
5779         (fixup_go_packaging): Update.
5780         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5781         use scoped_free_pendings.
5782         (using_directives): Add "cu" parameter, remove "language".
5783         (read_import_statement, setup_type_unit_groups, )
5784         (read_func_scope, read_lexical_block_scope)
5785         (dwarf2_record_block_ranges, read_namespace): Update.
5786         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5787         (lnp_state_machine::handle_end_sequence): Update.
5788         (class lnp_state_machine) <m_cu>: New member.
5789         <m_record_line_callback>: Remove.
5790         <m_currently_recording_lines>: New member.
5791         (lnp_state_machine::handle_set_file): Update.
5792         (noop_record_line): Remove.
5793         (dwarf_record_line_p): Add cu parameter.
5794         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5795         (lnp_state_machine::record_line)
5796         (lnp_state_machine::lnp_state_machine)
5797         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5798         (dwarf_decode_lines): Update.
5799         (dwarf2_start_subfile): Add cu parameter.
5800         (dwarf2_start_symtab, new_symbol): Update.
5801         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5802         Remove dwarf2_per_objfile parameter.
5803         (dwarf_decode_macros): Update.
5804
5805 2018-07-20  Tom Tromey  <tom@tromey.com>
5806
5807         * stabsread.c (define_symbol): Update.
5808         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5809         * dwarf2read.c (new_symbol): Update.
5810         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5811         * cp-namespace.c: Include buildsym.h.
5812         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5813         * buildsym-legacy.c (get_buildsym_compunit): New function.
5814
5815 2018-07-20  Tom Tromey  <tom@tromey.com>
5816
5817         * xcoffread.c: Include buildsym-legacy.h.
5818         * windows-nat.c: Include buildsym-legacy.h.
5819         * stabsread.c: Include buildsym-legacy.h.
5820         * mdebugread.c: Include buildsym-legacy.h.
5821         * buildsym-legacy.h: New file.
5822         * buildsym-legacy.c: New file, from buildsym.c.
5823         * go32-nat.c: Include buildsym-legacy.h.
5824         * dwarf2read.c: Include buildsym-legacy.h.
5825         * dbxread.c: Include buildsym-legacy.h.
5826         * cp-namespace.c: Include buildsym-legacy.h.
5827         * coffread.c: Include buildsym-legacy.h.
5828         * buildsym.h: Move some contents to buildsym-legacy.h.
5829         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5830         buildsym-legacy.c.
5831         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5832
5833 2018-07-20  Tom Tromey  <tom@tromey.com>
5834
5835         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5836         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5837         (buildsym_compunit::buildsym_compunit)
5838         (buildsym_compunit::~buildsym_compunit)
5839         (buildsym_compunit::get_macro_table): Define.
5840
5841 2018-07-20  Tom Tromey  <tom@tromey.com>
5842
5843         * buildsym.c (reset_symtab_globals): Remove.
5844         (buildsym_compunit::end_symtab_from_static_block): Update.
5845         (buildsym_compunit::augment_type_symtab): Update.
5846         (end_symtab_from_static_block): Call free_buildsym_compunit.
5847         (augment_type_symtab, end_symtab, end_expandable_symtab):
5848         Likewise.
5849
5850 2018-07-20  Tom Tromey  <tom@tromey.com>
5851
5852         * arch-utils.c: Do not include buildsym.h.
5853         * mipsread.c: Do not include buildsym.h.
5854         * machoread.c: Do not include buildsym.h.
5855         * elfread.c: Do not include buildsym.h.
5856
5857 2018-07-20  Tom Tromey  <tom@tromey.com>
5858
5859         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5860         initialization.
5861         (buildsym_compunit): Add new constructor.
5862         (struct buildsym_compunit) <get_last_source_file, finish_block,
5863         record_block_range, start_subfile, patch_subfile_names,
5864         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5865         set_last_source_start_addr, get_last_source_start_addr,
5866         get_local_using_directives, set_local_using_directives,
5867         get_global_using_directives, outermost_context_p,
5868         get_current_context_stack, get_context_stack_depth,
5869         get_current_subfile, get_local_symbols, get_file_symbols,
5870         get_global_symbols, record_debugformat, record_producer,
5871         push_context, pop_context, end_symtab_get_static_block,
5872         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5873         New public methods.
5874         <record_pending_block, finish_block_internal, make_blockvector,
5875         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5876         private methods.
5877         Update all users.
5878
5879 2018-05-22  Tom Tromey  <tom@tromey.com>
5880
5881         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5882         parameter.
5883         (finish_block_internal): Update.
5884
5885 2018-07-20  Tom Tromey  <tom@tromey.com>
5886
5887         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5888         parameter.
5889         (finish_block_internal): Update.
5890
5891 2018-07-20  Tom Tromey  <tom@tromey.com>
5892
5893         * buildsym.h (EXTERN): Don't define or undef.
5894         * buildsym.c (EXTERN): Don't define.
5895
5896 2018-07-20  Tom Tromey  <tom@tromey.com>
5897
5898         * buildsym.c: Remove TODO comment.
5899
5900 2018-07-20  Tom Tromey  <tom@tromey.com>
5901
5902         * coffread.c (coff_symtab_read): Update.
5903         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5904         (xcoff_new_init): Update.
5905         * mipsread.c (mipscoff_new_init): Update.
5906         * mdebugread.c (mdebug_build_psymtabs): Update.
5907         * elfread.c (elf_new_init): Update.
5908         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5909         Update.
5910         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5911         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5912         (stabsect_build_psymtabs): Update.
5913         * buildsym.h (buildsym_init): Don't declare.
5914         * buildsym.c: Update comment.
5915         (prepare_for_building): Remove.
5916         (start_symtab, restart_symtab): Update.
5917         (reset_symtab_globals): Update comment.
5918         (buildsym_init): Remove.
5919
5920 2018-07-20  Tom Tromey  <tom@tromey.com>
5921
5922         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5923         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5924         (read_enum_type, common_block_start, common_block_end)
5925         (cleanup_undefined_types_1, finish_global_stabs): Update.
5926         * mdebugread.c (psymtab_to_symtab_1): Update.
5927         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5928         (read_lexical_block_scope, new_symbol): Update.
5929         * dbxread.c (process_one_symbol): Update.
5930         * coffread.c (coff_symtab_read, process_coff_symbol)
5931         (coff_read_enum_type): Update.
5932         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5933         declare.
5934         (get_local_symbols, get_file_symbols, get_global_symbols): New
5935         functions.
5936         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5937         m_global_symbols.
5938         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5939         (~scoped_free_pendings): Update.
5940         (finish_block, prepare_for_building, reset_symtab_globals)
5941         (end_symtab_get_static_block, end_symtab_with_blockvector)
5942         (augment_type_symtab, push_context): Update.
5943         (get_local_symbols, get_file_symbols, get_global_symbols): New
5944         functions.
5945         (buildsym_init): Update.
5946
5947 2018-07-20  Tom Tromey  <tom@tromey.com>
5948
5949         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5950         (process_full_type_unit): Likewise.
5951         (dwarf2_start_symtab): Set list_in_scope.
5952
5953 2018-07-20  Tom Tromey  <tom@tromey.com>
5954
5955         * dwarf2read.c (process_psymtab_comp_unit_reader)
5956         (build_type_psymtabs_reader): Do not set list_in_scope.
5957
5958 2018-07-20  Tom Tromey  <tom@tromey.com>
5959
5960         * buildsym.c (free_pendings): Remove.
5961         (add_symbol_to_list, scoped_free_pendings)
5962         (finish_block_internal, buildsym_init): Update.
5963
5964 2018-07-20  Tom Tromey  <tom@tromey.com>
5965
5966         * xcoffread.c (read_xcoff_symtab): Update.
5967         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5968         Update.
5969         * dbxread.c (process_one_symbol): Update.
5970         * coffread.c (coff_symtab_read): Update.
5971         * buildsym.h (finish_block): Update.
5972         * buildsym.c (finish_block): Remove "listhead" argument.
5973         (end_symtab_get_static_block): Update.
5974
5975 2018-07-20  Tom Tromey  <tom@tromey.com>
5976
5977         * buildsym.h (class scoped_free_pendings): Remove constructor.
5978         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5979         method.
5980         <m_pending_block_obstack, m_pending_blocks>: New members.
5981         (pending_block_obstack, pending_blocks): Remove.
5982         (scoped_free_pendings::scoped_free_pendings): Default.
5983         (~scoped_free_pendings): Update.
5984         (free_pending_blocks): Remove.
5985         (finish_block_internal, record_pending_block, make_blockvector)
5986         (end_symtab_get_static_block, augment_type_symtab, push_context)
5987         (buildsym_init): Update.
5988
5989 2018-07-20  Tom Tromey  <tom@tromey.com>
5990
5991         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5992         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5993         members.
5994         (pending_addrmap, pending_addrmap_obstack)
5995         (pending_addrmap_interesting): Remove.
5996         (scoped_free_pendings, record_block_range, make_blockvector)
5997         (prepare_for_building, reset_symtab_globals, buildsym_init):
5998         Update.
5999
6000 2018-07-20  Tom Tromey  <tom@tromey.com>
6001
6002         * xcoffread.c (process_linenos): Update.
6003         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6004         * mdebugread.c (psymtab_to_symtab_1): Update.
6005         * dwarf2read.c (setup_type_unit_groups)
6006         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6007         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6008         * dbxread.c (process_one_symbol): Update.
6009         * coffread.c (coff_symtab_read, enter_linenos)
6010         (process_coff_symbol): Update.
6011         * buildsym.h (current_subfile): Don't declare.
6012         (get_current_subfile): Declare.
6013         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6014         member.
6015         (start_subfile, free_buildsym_compunit, push_subfile)
6016         (prepare_for_building, start_symtab): Update.
6017         (get_current_subfile): New function.
6018
6019 2018-07-20  Tom Tromey  <tom@tromey.com>
6020
6021         * coffread.c (coff_symtab_read): Update.
6022         * xcoffread.c (read_xcoff_symtab): Update.
6023         * dwarf2read.c (new_symbol): Update.
6024         (read_func_scope, read_lexical_block_scope): Update.
6025         * dbxread.c (process_one_symbol): Update.
6026         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6027         (outermost_context_p): Remove macro.
6028         (outermost_context_p, get_current_context_stack)
6029         (get_context_stack_depth): Declare.
6030         (pop_context): Return struct context_stack.
6031         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6032         member.
6033         (context_stack_size): Remove.
6034         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6035         (prepare_for_building, end_symtab_get_static_block)
6036         (augment_type_symtab, push_context): Update.
6037         (pop_context): Return struct context_stack.
6038         (outermost_context_p, get_current_context_stack)
6039         (get_context_stack_depth): New functions.
6040         (buildsym_init): Update.
6041
6042 2018-07-20  Tom Tromey  <tom@tromey.com>
6043
6044         * rust-exp.y: Now a pure parser.  Update all rules.
6045         (%union): Move earlier.
6046         (current_parser, work_obstack): Remove globals.
6047         (rust_parser, ~rust_parser): Update.
6048         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6049         lex_character, lex_number, lex_string, lex_identifier,
6050         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6051         convert_name, convert_params_to_expression,
6052         convert_ast_to_expression, ast_basic_type, ast_operation,
6053         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6054         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6055         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6056         ast_array_type, ast_slice_type, ast_reference_type,
6057         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6058         (rust_parse): Update.
6059         (rustyyerror, rustyylex): Add parser parameter.
6060         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6061         (rust_lex_stringish_test, rust_lex_test_sequence)
6062         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6063         (rust_lex_test_push_back, rust_lex_tests): Update.
6064
6065 2018-07-19  Pedro Alves  <palves@redhat.com>
6066
6067         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6068         gdb::unique_xmalloc_ptr.
6069         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6070         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6071         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6072         copy-initialization.
6073         * guile/scm-pretty-print.c (ppscm_print_children): Use
6074         gdb::unique_xmalloc_ptr instead of cleanups.
6075         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6076         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6077         gdb::unique_xmalloc_ptr.
6078         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6079         Adjust to use gdb::unique_xmalloc_ptr.
6080         * guile/scm-utils.c (extract_arg): Adjust.
6081         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6082         gdb::unique_xmalloc_ptr instead of a cleanup.
6083
6084 2018-07-19  Tom Tromey  <tom@tromey.com>
6085
6086         * utils.c (do_value_free_to_mark)
6087         (make_cleanup_value_free_to_mark): Remove.
6088         * utils.h (make_cleanup_value_free_to_mark): Remove.
6089
6090 2018-07-19  Pedro Alves  <palves@redhat.com>
6091
6092         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6093         forwarding reference.
6094
6095 2018-07-18  Pedro Alves  <palves@redhat.com>
6096
6097         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6098         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6099         cleanup.
6100
6101 2018-07-18  Pedro Alves  <palves@redhat.com>
6102
6103         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6104         exceptions.
6105         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6106         (gdbscm_wrap): New.
6107         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6108         directly instead of a cleanup.
6109         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6110         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6111         (vlscm_binop_gdbthrow): New, factored out from ...
6112         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6113         (vlscm_rich_compare): Use gdbscm_wrap.
6114         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6115         instead of a cleanup.
6116         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6117         cleanup.
6118         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6119         Use xfree directly instead of a cleanup.
6120         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6121         Adjust to use gdbscm_wrap and scoped_value_mark.
6122         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6123         (gdbscm_value_address, gdbscm_value_dereference)
6124         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6125         scoped_value_mark.
6126         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6127         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6128         scoped_value_mark.
6129         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6130         gdbscm_wrap and scoped_value_mark.
6131         (gdbscm_value_to_string): Use xfree directly instead of a
6132         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6133         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6134         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6135         scoped_value_mark.
6136         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6137         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6138         scoped_value_mark.
6139         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6140         gdbscm_wrap.
6141
6142 2018-07-18  Tom de Vries  <tdevries@suse.de>
6143
6144         * findvar.c (default_read_var_value): Also resolve dynamic type for
6145         LOC_OPTIMIZED_OUT vars.
6146
6147 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6148
6149         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6150         decoding.
6151
6152 2018-07-17  Tom Tromey  <tom@tromey.com>
6153
6154         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6155         (compute_enum_list, pascm_set_param_value_x)
6156         (gdbscm_parameter_value): Update.
6157         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6158         (gdbscm_scm_to_host_string): Update.
6159         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6160         Update.
6161         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6162         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6163         * guile/scm-string.c (gdbscm_scm_to_string): Return
6164         unique_xmalloc_ptr.
6165         (gdbscm_scm_to_host_string): Likewise.
6166
6167 2018-07-17  Tom Tromey  <tom@tromey.com>
6168
6169         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6170         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6171         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6172         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6173         unique_xmalloc_ptr.
6174
6175 2018-07-17  Tom Tromey  <tom@tromey.com>
6176
6177         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6178         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6179         Update.
6180         * guile/scm-cmd.c (cmdscm_function): Update.
6181         * guile/scm-pretty-print.c
6182         (ppscm_print_exception_unless_memory_error): Update.
6183         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6184         Return unique_xmalloc_ptr.
6185
6186 2018-07-17  Tom Tromey  <tom@tromey.com>
6187
6188         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6189         Use string_printf.
6190
6191 2018-07-17  Jim Wilson  <jimw@sifive.com>
6192
6193         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6194         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6195         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6196         unecessary braces after EF_RISCV_RVC test.  Delete call to
6197         set_gdbarch_decr_pc_after_break.
6198
6199         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6200         RISCV_LAST_FP_REGNUM + 1.
6201         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6202
6203 2018-07-17  Tom Tromey  <tom@tromey.com>
6204
6205         * configure.ac: Remove --disable-gdbcli.
6206         * configure: Rebuild.
6207         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6208         (SUBDIR_CLI_CFLAGS): Remove.
6209         (SFILES): Use SUBDIR_CLI_SRCS.
6210         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6211
6212 2018-07-17  Tom Tromey  <tom@tromey.com>
6213
6214         PR gdb/18624:
6215         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6216
6217 2018-07-16  Jim Wilson  <jimw@sifive.com>
6218
6219         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6220
6221 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6222
6223         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6224         variable.
6225         (libunwind_frame_sniffer): Likewise.
6226         (libunwind_frame_prev_register): Likewise.
6227         (libunwind_sigtramp_frame_sniffer): Likewise.
6228         * ia64-tdep.c (ia64_access_reg): Likewise.
6229         (ia64_access_rse_reg): Likewise.
6230         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6231         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6232
6233 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6234
6235         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6236
6237 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6238
6239         * remote-sim.c (gdbsim_target::close,
6240         gdbsim_target::mourn_inferior): Remove unused variables.
6241
6242 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6243
6244         * ia64-tdep.c (ktab_buf): New global.
6245         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6246         (get_kernel_table): Adjust.
6247
6248 2018-07-16  Tom Tromey  <tom@tromey.com>
6249
6250         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6251         * dwarf2read.c (using_directives, new_symbol): Use
6252         outermost_context_p.
6253         * dbxread.c (process_one_symbol): Use outermost_context_p.
6254         * coffread.c (coff_symtab_read): Use outermost_context_p.
6255
6256 2018-07-16  Tom Tromey  <tom@tromey.com>
6257
6258         * dwarf2read.c (using_directives, read_func_scope)
6259         (read_lexical_block_scope): Update.
6260         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6261         * buildsym.h (local_using_directives, global_using_directives):
6262         Don't declare.
6263         (get_local_using_directives, set_local_using_directives)
6264         (get_global_using_directives): Declare.
6265         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6266         m_global_using_directives>: New members.
6267         (finish_block_internal, prepare_for_building)
6268         (reset_symtab_globals, end_symtab_get_static_block)
6269         (push_context): Update.
6270         (get_local_using_directives, set_local_using_directives)
6271         (get_global_using_directives): New functions.
6272         (buildsym_init): Update.
6273
6274 2018-07-16  Tom Tromey  <tom@tromey.com>
6275
6276         * xcoffread.c (xcoff_initial_scan): Don't call
6277         free_pending_blocks.
6278         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6279         * buildsym.h (class scoped_free_pendings): Add constructor.
6280         (free_pending_blocks): Don't declare.
6281         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6282         (free_pending_blocks): Now static.
6283
6284 2018-07-16  Tom Tromey  <tom@tromey.com>
6285
6286         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6287         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6288         member.
6289         (struct subfile_stack): Remove.
6290         (subfile_stack): Remove.
6291         (push_subfile, pop_subfile, buildsym_init): Update.
6292
6293 2018-07-16  Tom Tromey  <tom@tromey.com>
6294
6295         * buildsym.c (push_subfile): Use gdb_assert.
6296         (pop_subfile): Use gdb_assert.
6297
6298 2018-07-16  Tom Tromey  <tom@tromey.com>
6299
6300         * buildsym.h (merge_symbol_lists): Remove.
6301         * buildsym.c (merge_symbol_lists): Remove.
6302
6303 2018-07-16  Tom Tromey  <tom@tromey.com>
6304
6305         * stabsread.c (scan_file_globals): Update comment.
6306         * stabsread.h (scan_file_globals): Move from buildsym.h.
6307         * buildsym.h (scan_file_globals): Move to stabsread.h.
6308
6309 2018-07-16  Tom Tromey  <tom@tromey.com>
6310
6311         * xcoffread.c (xcoff_new_init): Update.
6312         * mipsread.c (mipscoff_new_init): Update.
6313         * mdebugread.c (mdebug_build_psymtabs): Update.
6314         * elfread.c (elf_new_init): Update.
6315         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6316         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6317         * buildsym.h (buildsym_new_init): Don't declare.
6318         * buildsym.c (buildsym_new_init): Remove.
6319
6320 2018-07-16  Tom Tromey  <tom@tromey.com>
6321
6322         * stabsread.h (within_function): Move from buildsym.h.
6323         * stabsread.c (start_stabs): Clear within_function.
6324         * coffread.c (coff_start_symtab): Clear within_function.
6325         * buildsym.h (within_function): Move to stabsread.h.
6326         * buildsym.c (prepare_for_building): Update.
6327
6328 2018-07-16  Tom Tromey  <tom@tromey.com>
6329
6330         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6331         * dwarf2read.c (dwarf2_start_symtab): Don't set
6332         processing_gcc_compilation.
6333         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6334
6335 2018-07-16  Tom Tromey  <tom@tromey.com>
6336
6337         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6338         (next_symbol_text_func): Move from buildsym.h.
6339         * stabsread.c (hashname): Move from buildsym.c.
6340         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6341         (next_symbol_text_func, hashname): Move to stabsread.h.
6342         * buildsym.c: Don't include bcache.h
6343         (hashname): Move to stasbread.c.
6344
6345 2018-07-16  Tom Tromey  <tom@tromey.com>
6346
6347         * buildsym.h (context_stack_size): Don't declare.
6348         * buildsym.c (context_stack_size): New global.
6349
6350 2018-07-16  Tom Tromey  <tom@tromey.com>
6351
6352         * dbxread.c (processing_acc_compilation): New global.
6353         * buildsym.h (processing_acc_compilation): Don't declare.
6354
6355 2018-07-16  Tom Tromey  <tom@tromey.com>
6356
6357         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6358         * dbxread.c (read_ofile_symtab): Update.
6359         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6360         * buildsym.h (last_source_start_addr): Remove.
6361         (set_last_source_start_addr, get_last_source_start_addr):
6362         Declare.
6363         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6364         parameter.
6365         (struct buildsym_compunit) <m_last_source_start_addr>: New
6366         member.
6367         (prepare_for_building): Remove start_addr parameter.
6368         (start_symtab, restart_symtab, end_symtab_get_static_block)
6369         (end_symtab_with_blockvector): Update.
6370         (set_last_source_start_addr, get_last_source_start_addr): New
6371         functions.
6372
6373 2018-07-16  Tom Tromey  <tom@tromey.com>
6374
6375         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6376         member.
6377         (have_line_numbers): Remove.
6378         (record_line, prepare_for_building, end_symtab_get_static_block)
6379         (augment_type_symtab): Update.
6380
6381 2018-07-16  Tom Tromey  <tom@tromey.com>
6382
6383         * buildsym.c (~buildsym_compunit): Free the macro table.
6384         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6385         methods.
6386         <m_pending_macros>: New member.
6387         (pending_macros): Remove.
6388         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6389         (reset_symtab_globals, end_symtab_get_static_block)
6390         (end_symtab_with_blockvector, augment_type_symtab)
6391         (buildsym_init): Update.
6392
6393 2018-07-16  Tom Tromey  <tom@tromey.com>
6394
6395         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6396         parameter.
6397         (buildsym_compunit::set_last_source_file): New method.
6398         <m_last_source_file>: New member.
6399         (prepare_for_building): Remove "name" parameter.
6400         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6401         (last_source_file): Remove.
6402         (set_last_source_file, get_last_source_file): Update.
6403
6404 2018-07-16  Tom Tromey  <tom@tromey.com>
6405
6406         * buildsym.c (prepare_for_building): Add assert.
6407
6408 2018-07-16  Tom Tromey  <tom@tromey.com>
6409
6410         * buildsym.c (~buildsym_compunit): Update.
6411         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6412         (start_subfile, patch_subfile_names)
6413         (end_symtab_with_blockvector): Update.
6414
6415 2018-07-16  Tom Tromey  <tom@tromey.com>
6416
6417         * buildsym.c (struct buildsym_compunit): Add constructor,
6418         destructor, initializers.
6419         (start_buildsym_compunit): Remove.
6420         (free_buildsym_compunit): Use "delete".
6421         (start_symtab, restart_symtab): Use "new".
6422
6423 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6424
6425         * symfile.c (set_objfile_default_section_offset): Remove struct
6426         keyword.
6427
6428 2018-07-14  Stafford Horne  <shorne@gmail.com>
6429
6430         * (Responsible Maintainers): Add myself as or1k maintainer.
6431
6432 2018-07-13  Tom Tromey  <tom@tromey.com>
6433
6434         * symfile.c (set_objfile_default_section_offset): Use extra braces
6435         around initializer.
6436
6437 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6438
6439         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6440         non-branching basr.
6441
6442 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6443
6444         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6445         unittests/cli-utils-selftests.c
6446         * unittests/cli-utils-selftests.c: New file.
6447
6448 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6449
6450         * NEWS: Mention new commands. Mention change to 'thread apply'.
6451
6452 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6453
6454         * thread.c (thr_try_catch_cmd): New function.
6455         (thread_apply_all_command): Handle qcs flags.
6456         (thread_apply_command): Handle qcs flags.
6457         (taas_command): New function.
6458         (tfaas_command): New function.
6459         (_initialize_thread): Update to setup the new commands 'taas
6460         and 'tfaas'. Change doc string for 'thread apply'.
6461
6462 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6463
6464         * stack.c: (trailing_outermost_frame): New function, mostly
6465         extracted from backtrace_command_1.
6466         (leading_innermost_frame): New function.
6467         (backtrace_command_1): Update to call trailing_outermost_frame.
6468         (frame_apply_command_count): New function.
6469         (frame_apply_level_command): New function.
6470         (frame_apply_all_command): New function.
6471         (frame_apply_command): New function.
6472         (faas_command): New function.
6473         (frame_cmd_list): New variable.
6474         (_initialize_stack): Update to setup the new commands 'frame apply'
6475         and 'faas'.
6476
6477 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6478
6479         * cli-utils.c (number_or_range_parser::get_number): Only handle
6480         numbers or convenience var as numbers.
6481         (parse_flags): New function.
6482         (parse_flags_qcs): New function.
6483         (number_or_range_parser::finished): Ensure parsing end is detected
6484         before end of string.
6485         * cli-utils.h (parse_flags): New function.
6486         (parse_flags_qcs): New function.
6487         (number_or_range_parser): Remove m_finished bool.
6488         (number_or_range_parser::skip_range): Set m_in_range to false.
6489
6490 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6491
6492         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6493         on Windows.
6494
6495 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6496             Jan Kratochvil  <jan.kratochvil@redhat.com>
6497             Paul Fertser  <fercerpav@gmail.com>
6498             Tsutomu Seki  <sekiriki@gmail.com>
6499             Pedro Alves  <palves@redhat.com>
6500
6501         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6502         'unittests/parse-connection-spec-selftests.c'.
6503         (COMMON_SFILES): Add 'common/netstuff.c'.
6504         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6505         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6506         * common/netstuff.c: New file.
6507         * common/netstuff.h: New file.
6508         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6509         (wait_for_connect): Update comment.  New parameter
6510         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6511         Use 'sock' directly instead of 'scb->fd'.
6512         (try_connect): New function, with code from 'net_open'.
6513         (net_open): Rewrite main loop to deal with multiple
6514         sockets/addresses.  Handle IPv6-style hostnames; implement
6515         support for IPv6 connections.
6516         * unittests/parse-connection-spec-selftests.c: New file.
6517
6518 2018-07-11  Pedro Alves  <palves@redhat.com>
6519
6520         PR gdb/23377
6521         * remote.c (remote_target::remote_detach_pid): Call
6522         set_current_process.
6523
6524 2018-07-11  Pedro Alves  <palves@redhat.com>
6525
6526         * h8300-tdep.c (h8300_gdbarch_init): Remove
6527         set_gdbarch_ecoff_reg_to_regnum calls.
6528
6529 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6530
6531         PR c++/23373
6532         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6533         offsets/sizes for static members of a class/struct.
6534
6535 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6536
6537         * target-descriptions.c (tdesc_register_bitsize): Rename.
6538         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6539         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6540         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6541
6542 2018-07-10  Tom Tromey  <tom@tromey.com>
6543
6544         * breakpoint.c (moribund_locations): Now static and a
6545         std::vector.
6546         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6547         (build_bpstat_chain, update_global_location_list)
6548         (breakpoint_retire_moribund): Update.
6549         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6550         VEC.
6551
6552 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6553
6554         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6555         (riscv_register_reggroup_p): Use new function, remove unneeded
6556         parenthesis.
6557         (riscv_push_dummy_call): Extend assert to compare against xlen or
6558         flen based on register type.
6559
6560 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6561
6562         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6563
6564 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6565
6566         * remote.c (show_hardware_watchpoint_limit): New function.
6567         (show_hardware_watchpoint_length_limit): New function.
6568         (show_hardware_breakpoint_limit): New function.
6569         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6570         where appropriate, update help text.
6571
6572 2018-07-09  Tom Tromey  <tom@tromey.com>
6573
6574         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6575         (CLIBS): Don't mention NAT_CLIBS.
6576
6577 2018-07-09  Tom Tromey  <tom@tromey.com>
6578
6579         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6580         (LIBGDB_OBS, clean mostlyclean): Update.
6581         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6582
6583 2018-07-09  Tom Tromey  <tom@tromey.com>
6584
6585         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6586         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6587         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6588
6589 2018-07-09  Tom Tromey  <tom@tromey.com>
6590
6591         * Makefile.in (ALLDEPFILES): Remove exec.c.
6592         (COMMON_OBS): Remove exec.o.
6593         (COMMON_SFILES): Add exec.c.
6594
6595 2018-07-09  Tom Tromey  <tom@tromey.com>
6596
6597         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6598
6599 2018-07-09  Tom Tromey  <tom@tromey.com>
6600
6601         * Makefile.in (clean mostlyclean): Remove stamp-version.
6602         (version.c): Depend on stamp-version.
6603         (stamp-version): New rule, from version.c rule.
6604
6605 2018-07-09  Tom Tromey  <tom@tromey.com>
6606
6607         * Makefile.in (init.c): Depend on stamp-init.
6608         (stamp-init): New rule, from init.c rule.
6609         (clean mostlyclean): Remove stamp-init.
6610
6611 2018-07-09  Tom Tromey  <tom@tromey.com>
6612
6613         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6614         SUBDIR_GCC_COMPILE_SRCS.
6615
6616 2018-07-09  Tom Tromey  <tom@tromey.com>
6617
6618         * Makefile.in (init.c): Remove some unused sed rules.
6619
6620 2018-07-09  Tom Tromey  <tom@tromey.com>
6621
6622         * Makefile.in (TSOBS): Remove.
6623         (INIT_FILES): Update.
6624         (LIBGDB_OBS): Update.
6625         (COMMON_SFILES): Add inflow.c.
6626         (SFILES): Remove inflow.c.
6627
6628 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6629
6630         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6631
6632 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6633
6634         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6635         get_saveloc_name, is_signal_frame_name, step_name,
6636         init_remote_name, create_addr_space_name,
6637         destroy_addr_space_name, search_unwind_table_name,
6638         find_dyn_list_name): Constify.
6639
6640 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6641
6642         * darwin-nat.c (darwin_pthread_kill): New function.
6643         (darwin_resume_thread): Use darwin_pthread_kill.
6644
6645 2018-07-05  Tom de Vries  <tdevries@suse.de>
6646
6647         * macroexp.c (macro_buffer) <operator=>: New member function.
6648
6649 2018-07-04  Tom Tromey  <tom@tromey.com>
6650
6651         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6652
6653 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6654
6655         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6656         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6657         * maint.c: Likewise.
6658         * top.c: Likewise.
6659
6660 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6661
6662         * NEWS: Create a new section for the next release branch.
6663         Rename the section of the current branch, now that it has
6664         been cut.
6665
6666 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6667
6668         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6669         * version.in: Bump version to 8.2.50.DATE-git.
6670
6671 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6672             Pedro Alves  <palves@redhat.com>
6673
6674         * linux-nat.c (linux_init_ptrace): Rename to ...
6675         (linux_init_ptrace_procfs): ... this.  Call
6676         linux_proc_init_warnings.
6677         (linux_nat_target::post_attach)
6678         (linux_nat_target::post_startup_inferior): Adjust.
6679         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6680         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6681
6682 2018-07-04  Tom de Vries  <tdevries@suse.de>
6683
6684         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6685         check ...
6686         (read_comp_unit_head): ... here.
6687
6688 2018-07-03  Tom Tromey  <tom@tromey.com>
6689
6690         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6691         (stop_tracing, tstatus_command)
6692         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6693         (print_one_static_tracepoint_marker): Update.
6694         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6695         std::vector.
6696         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6697         VEC.
6698         (all_tracepoints, static_tracepoints_here): Return std::vector.
6699
6700 2018-07-03  Tom Tromey  <tom@tromey.com>
6701
6702         * common/ptid.c (ptid_equal): Remove.
6703         * common/ptid.h (ptid_equal): Don't declare.
6704         * ada-tasks.c: Update.
6705         * breakpoint.c: Update.
6706         * common/agent.c: Update.
6707         * corelow.c: Update.
6708         * darwin-nat-info.c: Update.
6709         * darwin-nat.c: Update.
6710         * dcache.c: Update.
6711         * dtrace-probe.c: Update.
6712         * dummy-frame.c: Update.
6713         * fbsd-nat.c: Update.
6714         * frame.c: Update.
6715         * gdbthread.h: Update.
6716         * gnu-nat.c: Update.
6717         * go32-nat.c: Update.
6718         * inf-loop.c: Update.
6719         * inf-ptrace.c: Update.
6720         * infcall.c: Update.
6721         * infcmd.c: Update.
6722         * inflow.c: Update.
6723         * infrun.c: Update.
6724         * linux-fork.c: Update.
6725         * linux-nat.c: Update.
6726         * linux-thread-db.c: Update.
6727         * mi/mi-cmd-var.c: Update.
6728         * mi/mi-interp.c: Update.
6729         * mi/mi-main.c: Update.
6730         * nto-procfs.c: Update.
6731         * ppc-linux-tdep.c: Update.
6732         * procfs.c: Update.
6733         * python/py-inferior.c: Update.
6734         * python/py-record-btrace.c: Update.
6735         * python/py-record.c: Update.
6736         * ravenscar-thread.c: Update.
6737         * regcache.c: Update.
6738         * remote-sim.c: Update.
6739         * remote.c: Update.
6740         * sol-thread.c: Update.
6741         * solib.c: Update.
6742         * target.c: Update.
6743         * tui/tui-stack.c: Update.
6744         * varobj.c: Update.
6745         * windows-nat.c: Update.
6746         * windows-tdep.c: Update.
6747
6748 2018-07-03  Tom Tromey  <tom@tromey.com>
6749
6750         * common/ptid.c (ptid_match): Remove.
6751         * common/ptid.h (ptid_match): Don't declare.
6752         * fbsd-nat.c: Update.
6753         * infcmd.c: Update.
6754         * infrun.c: Update.
6755         * linux-nat.c: Update.
6756         * record-btrace.c: Update.
6757         * regcache.c: Update.
6758         * remote.c: Update.
6759
6760 2018-07-03  Tom Tromey  <tom@tromey.com>
6761
6762         * common/ptid.c (ptid_tid_p): Remove.
6763         * common/ptid.h (ptid_tid_p): Don't declare.
6764         * sol-thread.c: Update.
6765
6766 2018-07-03  Tom Tromey  <tom@tromey.com>
6767
6768         * common/ptid.c (ptid_lwp_p): Remove.
6769         * common/ptid.h (ptid_lwp_p): Don't declare.
6770         * fbsd-nat.c: Update.
6771         * linux-nat.c: Update.
6772         * nat/linux-procfs.c: Update.
6773         * nat/x86-linux-dregs.c: Update.
6774         * sol-thread.c: Update.
6775
6776 2018-07-03  Tom Tromey  <tom@tromey.com>
6777
6778         * common/ptid.c (ptid_is_pid): Remove.
6779         * common/ptid.h (ptid_is_pid): Don't declare.
6780         * infrun.c: Update.
6781         * linux-nat.c: Update.
6782         * mi/mi-interp.c: Update.
6783         * remote.c: Update.
6784         * thread.c: Update.
6785
6786 2018-07-03  Tom Tromey  <tom@tromey.com>
6787
6788         * common/ptid.c (ptid_get_tid): Remove.
6789         * common/ptid.h (ptid_get_tid): Don't declare.
6790         * ada-tasks.c: Update.
6791         * aix-thread.c: Update.
6792         * bsd-uthread.c: Update.
6793         * darwin-nat.c: Update.
6794         * fbsd-nat.c: Update.
6795         * i386-darwin-nat.c: Update.
6796         * infrun.c: Update.
6797         * linux-tdep.c: Update.
6798         * nto-procfs.c: Update.
6799         * ppc-ravenscar-thread.c: Update.
6800         * python/py-infthread.c: Update.
6801         * ravenscar-thread.c: Update.
6802         * sol-thread.c: Update.
6803         * sparc-ravenscar-thread.c: Update.
6804         * windows-nat.c: Update.
6805
6806 2018-07-03  Tom Tromey  <tom@tromey.com>
6807
6808         * common/ptid.c (ptid_get_lwp): Remove.
6809         * common/ptid.h (ptid_get_lwp): Don't declare.
6810         * aarch64-linux-nat.c: Update.
6811         * ada-tasks.c: Update.
6812         * aix-thread.c: Update.
6813         * amd64-linux-nat.c: Update.
6814         * arm-linux-nat.c: Update.
6815         * corelow.c: Update.
6816         * fbsd-nat.c: Update.
6817         * fbsd-tdep.c: Update.
6818         * gnu-nat.c: Update.
6819         * i386-cygwin-tdep.c: Update.
6820         * i386-gnu-nat.c: Update.
6821         * i386-linux-nat.c: Update.
6822         * ia64-linux-nat.c: Update.
6823         * inf-ptrace.c: Update.
6824         * infrun.c: Update.
6825         * linux-fork.c: Update.
6826         * linux-nat.c: Update.
6827         * linux-tdep.c: Update.
6828         * linux-thread-db.c: Update.
6829         * mips-linux-nat.c: Update.
6830         * nat/aarch64-linux-hw-point.c: Update.
6831         * nat/aarch64-linux.c: Update.
6832         * nat/linux-btrace.c: Update.
6833         * nat/linux-osdata.c: Update.
6834         * nat/linux-procfs.c: Update.
6835         * nat/x86-linux-dregs.c: Update.
6836         * obsd-nat.c: Update.
6837         * ppc-fbsd-nat.c: Update.
6838         * ppc-linux-nat.c: Update.
6839         * procfs.c: Update.
6840         * python/py-infthread.c: Update.
6841         * ravenscar-thread.c: Update.
6842         * remote.c: Update.
6843         * s390-linux-nat.c: Update.
6844         * sol-thread.c: Update.
6845         * sol2-tdep.c: Update.
6846         * spu-linux-nat.c: Update.
6847         * x86-linux-nat.c: Update.
6848         * xtensa-linux-nat.c: Update.
6849
6850 2018-07-03  Tom Tromey  <tom@tromey.com>
6851
6852         * common/ptid.c (ptid_get_pid): Remove.
6853         * common/ptid.h (ptid_get_pid): Don't declare.
6854         * aarch64-linux-nat.c: Update.
6855         * ada-lang.c: Update.
6856         * aix-thread.c: Update.
6857         * alpha-bsd-nat.c: Update.
6858         * amd64-fbsd-nat.c: Update.
6859         * amd64-linux-nat.c: Update.
6860         * arm-linux-nat.c: Update.
6861         * arm-nbsd-nat.c: Update.
6862         * auxv.c: Update.
6863         * break-catch-syscall.c: Update.
6864         * breakpoint.c: Update.
6865         * bsd-uthread.c: Update.
6866         * corelow.c: Update.
6867         * ctf.c: Update.
6868         * darwin-nat.c: Update.
6869         * fbsd-nat.c: Update.
6870         * fbsd-tdep.c: Update.
6871         * gcore.c: Update.
6872         * gnu-nat.c: Update.
6873         * hppa-nbsd-nat.c: Update.
6874         * hppa-obsd-nat.c: Update.
6875         * i386-fbsd-nat.c: Update.
6876         * ia64-linux-nat.c: Update.
6877         * inf-ptrace.c: Update.
6878         * infcmd.c: Update.
6879         * inferior.c: Update.
6880         * inferior.h: Update.
6881         * inflow.c: Update.
6882         * infrun.c: Update.
6883         * linux-fork.c: Update.
6884         * linux-nat.c: Update.
6885         * linux-tdep.c: Update.
6886         * linux-thread-db.c: Update.
6887         * m68k-bsd-nat.c: Update.
6888         * mi/mi-interp.c: Update.
6889         * mi/mi-main.c: Update.
6890         * mips-linux-nat.c: Update.
6891         * mips-nbsd-nat.c: Update.
6892         * mips64-obsd-nat.c: Update.
6893         * nat/aarch64-linux-hw-point.c: Update.
6894         * nat/aarch64-linux.c: Update.
6895         * nat/linux-btrace.c: Update.
6896         * nat/linux-osdata.c: Update.
6897         * nat/linux-procfs.c: Update.
6898         * nat/x86-linux-dregs.c: Update.
6899         * nto-procfs.c: Update.
6900         * obsd-nat.c: Update.
6901         * ppc-linux-nat.c: Update.
6902         * ppc-nbsd-nat.c: Update.
6903         * ppc-obsd-nat.c: Update.
6904         * proc-service.c: Update.
6905         * procfs.c: Update.
6906         * python/py-inferior.c: Update.
6907         * python/py-infthread.c: Update.
6908         * ravenscar-thread.c: Update.
6909         * record.c: Update.
6910         * remote-sim.c: Update.
6911         * remote.c: Update.
6912         * rs6000-nat.c: Update.
6913         * s390-linux-nat.c: Update.
6914         * sh-nbsd-nat.c: Update.
6915         * sol-thread.c: Update.
6916         * sparc-nat.c: Update.
6917         * sparc64-tdep.c: Update.
6918         * spu-linux-nat.c: Update.
6919         * spu-tdep.c: Update.
6920         * target-debug.h: Update.
6921         * target.c: Update.
6922         * thread.c: Update.
6923         * tid-parse.c: Update.
6924         * tracefile-tfile.c: Update.
6925         * vax-bsd-nat.c: Update.
6926         * windows-nat.c: Update.
6927         * x86-linux-nat.c: Update.
6928         * x86-nat.c: Update.
6929
6930 2018-07-03  Tom Tromey  <tom@tromey.com>
6931
6932         * common/ptid.c (pid_to_ptid): Remove.
6933         * common/ptid.h (pid_to_ptid): Don't declare.
6934         * aix-thread.c: Update.
6935         * arm-linux-nat.c: Update.
6936         * common/ptid.c: Update.
6937         * common/ptid.h: Update.
6938         * corelow.c: Update.
6939         * ctf.c: Update.
6940         * darwin-nat.c: Update.
6941         * fbsd-nat.c: Update.
6942         * fork-child.c: Update.
6943         * gnu-nat.c: Update.
6944         * go32-nat.c: Update.
6945         * inf-ptrace.c: Update.
6946         * infcmd.c: Update.
6947         * inferior.c: Update.
6948         * infrun.c: Update.
6949         * linux-fork.c: Update.
6950         * linux-nat.c: Update.
6951         * nat/aarch64-linux-hw-point.c: Update.
6952         * nat/fork-inferior.c: Update.
6953         * nat/x86-linux-dregs.c: Update.
6954         * nto-procfs.c: Update.
6955         * obsd-nat.c: Update.
6956         * procfs.c: Update.
6957         * progspace.c: Update.
6958         * remote.c: Update.
6959         * rs6000-nat.c: Update.
6960         * s390-linux-nat.c: Update.
6961         * sol-thread.c: Update.
6962         * spu-linux-nat.c: Update.
6963         * target.c: Update.
6964         * top.c: Update.
6965         * tracefile-tfile.c: Update.
6966         * windows-nat.c: Update.
6967
6968 2018-07-03  Tom Tromey  <tom@tromey.com>
6969
6970         * common/ptid.h (ptid_build): Don't declare.
6971         * common/ptid.c (ptid_build): Remove.
6972         * aix-thread.c: Update.
6973         * bsd-kvm.c: Update.
6974         * bsd-uthread.c: Update.
6975         * common/agent.c: Update.
6976         * common/ptid.c: Update.
6977         * common/ptid.h: Update.
6978         * corelow.c: Update.
6979         * darwin-nat.c: Update.
6980         * fbsd-nat.c: Update.
6981         * gnu-nat.c: Update.
6982         * linux-fork.c: Update.
6983         * linux-nat.c: Update.
6984         * linux-thread-db.c: Update.
6985         * nat/linux-osdata.c: Update.
6986         * nat/linux-procfs.c: Update.
6987         * nto-procfs.c: Update.
6988         * obsd-nat.c: Update.
6989         * proc-service.c: Update.
6990         * procfs.c: Update.
6991         * ravenscar-thread.c: Update.
6992         * remote-sim.c: Update.
6993         * remote.c: Update.
6994         * sol-thread.c: Update.
6995         * target.c: Update.
6996         * windows-nat.c: Update.
6997
6998 2018-07-03  Tom Tromey  <tom@tromey.com>
6999
7000         * infrun.c (follow_exec): Use exit_inferior_silent.
7001         * inferior.c (exit_inferior_num_silent): Remove.
7002         * inferior.h (exit_inferior_num_silent): Don't declare.
7003
7004 2018-07-03  Tom Tromey  <tom@tromey.com>
7005
7006         PR cli/23340:
7007         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7008         inferior_ptid on error.
7009
7010 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7011             Simon Marchi  <simon.marchi@polymtl.ca>
7012
7013         PR tdep/8282
7014         * disasm.h (gdb_disassembler): Add
7015         `m_disassembler_options_holder'. member
7016         * disasm.c (get_all_disassembler_options): New function.
7017         (gdb_disassembler::gdb_disassembler): Use it.
7018         (gdb_buffered_insn_length_init_dis): Likewise.
7019         (gdb_buffered_insn_length): Adjust accordingly.
7020         (set_disassembler_options): Handle options with arguments.
7021         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7022         line if showing options with descriptions.
7023         (disassembler_options_completer): Adapt to using the
7024         `disasm_options_and_args_t' structure.
7025         * mips-tdep.c (mips_disassembler_options): New variable.
7026         (mips_disassembler_options_o32): Likewise.
7027         (mips_disassembler_options_n32): Likewise.
7028         (mips_disassembler_options_n64): Likewise.
7029         (gdb_print_insn_mips): Don't set `disassembler_options'.
7030         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7031         functions.
7032         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7033         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7034         `gdbarch_disassembler_options_implicit' and
7035         `gdbarch_valid_disassembler_options'.
7036         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7037         `disasm_options_and_args_t' structure.
7038         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7039         method.
7040         (valid_disassembler_options): Switch from `disasm_options_t' to
7041         the `disasm_options_and_args_t' structure.
7042         * NEWS: Document `set disassembler-options' support for the MIPS
7043         target.
7044         * gdbarch.h: Regenerate.
7045         * gdbarch.c: Regenerate.
7046
7047 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7048
7049         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7050
7051 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7052
7053         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7054         parameter in call to amd64_target_description.
7055         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7056         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7057         (amd64fbsd_init_abi): Likewise.
7058         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7059         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7060         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7061         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7062
7063 2018-06-29  Pedro Alves  <palves@redhat.com>
7064
7065         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7066         "segments" parameter.
7067         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7068         (_initialize_amd64_tdep): Update call to
7069         amd64_create_target_description.
7070         (amd64_target_description): Add "segments" parameter.  Adjust
7071         the implementation to use it.
7072         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7073         call to amd64_create_target_description.
7074         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7075         * gdb/arch/amd64.h (amd64_create_target_description): Add
7076         "segments" register.
7077         * gdb/arch/amd64.c (amd64_create_target_description): Add
7078         "segments" parameter.  Call create_feature_i386_64bit_segments
7079         only if SEGMENTS is true.
7080         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7081         call to amd64_create_target_description.
7082
7083 2018-06-29  Pedro Alves  <palves@redhat.com>
7084
7085         * thread.c (thread_target_id_str): New, factored out from ...
7086         (print_thread_info_1): ... here.  Use it to compute the max
7087         "Target Id" column width.
7088
7089 2018-06-29  Pedro Alves  <palves@redhat.com>
7090
7091         * remote.c (remote_target::extra_thread_info): Delete
7092         'display_buf' and 'n' locals.  from the cache, regardless of
7093         packet mechanims is in use.  Use cache for qThreadExtra and qP
7094         methods too.
7095
7096 2018-06-29  Pedro Alves  <palves@redhat.com>
7097
7098         * blockframe.c (find_pc_sect_containing_function): New function.
7099         * breakpoint.c (print_breakpoint_location): Don't call
7100         find_pc_sect_function.
7101         * linespec.c (create_sals_line_offset): Record the location's
7102         symbol in the sal.
7103         * linespec.c (convert_address_location_to_sals): Fill in sal's
7104         symbol with find_pc_sect_containing_function.
7105         * symtab.c (find_function_start_sal): Rename to ...
7106         (find_function_start_sal_1): ... this.
7107         (find_function_start_sal): Reimplement as wrapper around
7108         find_function_start_sal_1, and use
7109         find_pc_sect_containing_function to fill in the sal's symbol.
7110         (find_function_start_sal(symbol*, bool)): Adjust.
7111         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7112         comments.
7113         (find_pc_sect_containing_function): Declare.
7114
7115 2018-06-29  Pedro Alves  <palves@redhat.com>
7116
7117         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7118         true if the the location has no symbol.
7119
7120 2018-06-28  Tom Tromey  <tom@tromey.com>
7121
7122         * NEWS: Mention --enable-codesign.
7123         * silent-rules.mk (ECHO_SIGN): New variable.
7124         * configure.ac: Add --enable-codesign.
7125         * configure: Rebuild.
7126         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7127         (gdb$(EXEEXT)): Optionally invoke codesign.
7128
7129 2018-06-28  Pedro Alves  <palves@redhat.com>
7130
7131         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7132         comments.
7133         (switch_to_thread_no_regs): Adjust comment.
7134         * infcmd.c (stop_pc): Delete.
7135         (post_create_inferior, info_program_command): Replace references
7136         to stop_pc with references to thread_info->suspend.stop_pc.
7137         * inferior.h (stop_pc): Delete declaration.
7138         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7139         (handle_inferior_event_1, handle_signal_stop)
7140         (process_event_stop_test, keep_going_stepped_thread)
7141         (handle_step_into_function, handle_step_into_function_backward)
7142         (print_stop_location): Replace references to stop_pc with
7143         references to thread_info->suspend.stop_pc.
7144         (struct infcall_suspend_state) <stop_pc>: Delete field.
7145         (save_infcall_suspend_state, restore_infcall_suspend_state):
7146         Remove references to inf_stat->stop_pc.
7147         * linux-fork.c (fork_load_infrun_state): Likewise.
7148         * record-btrace.c (record_btrace_set_replay): Likewise.
7149         * record-full.c (record_full_goto_entry): Likewise.
7150         * remote.c (print_one_stopped_thread): Likewise.
7151         * target.c (target_resume): Extend comment.
7152         * thread.c (set_executing_thread): New.
7153         (set_executing): Use it.
7154         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7155         Remove references to stop_pc.
7156
7157 2018-06-28  Pedro Alves  <palves@redhat.com>
7158
7159         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7160         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7161
7162 2018-06-28  Tom Tromey  <tom@tromey.com>
7163
7164         * coffread.c (coff_symfile_finish): Update.
7165         * xcoffread.c (xcoff_symfile_finish): Update.
7166         * elfread.c (elf_symfile_finish): Update.
7167         * symfile.h (dwarf2_free_objfile): Don't declare.
7168         * dwarf2read.c (_initialize_dwarf2_read): Use
7169         register_objfile_data_with_cleanup.
7170         (dwarf2_free_objfile): Now static.  Change signature.
7171
7172 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7173
7174         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7175         option "-o" to add-symbol-file-load to add an offset to each
7176         section's load address.
7177         * symfile.c (set_objfile_default_section_offset): New function.
7178
7179 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7180
7181         * symfile.c (add_symbol_file_command): Make sure that sections
7182         with the same name are sorted in the same order.
7183
7184 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7185
7186         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7187         require the second argument.  If omitted, load sections at the
7188         addresses specified in the file.
7189
7190 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7191
7192         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7193         (_initialize_symfile): Add option "-o" to symbol-file to add an
7194         offset to each section of the symbol file.
7195
7196 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7197
7198         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7199
7200 2018-06-27  Tom Tromey  <tom@tromey.com>
7201
7202         * stack.c (_initialize_stack): Update "func" help text.
7203
7204 2018-06-27  Tom Tromey  <tom@tromey.com>
7205
7206         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7207         std::vector.
7208         (unwind_infopy_str, pyuw_create_unwind_info)
7209         (unwind_infopy_add_saved_register, pyuw_sniffer)
7210         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7211         Update.
7212         (struct saved_reg): Add constructor.
7213         <value>: Now a gdbpy_ref<>.
7214
7215 2018-06-27  Tom Tromey  <tom@tromey.com>
7216
7217         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7218
7219 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7220
7221         * gdb-gdb.py.in: Format using autopep8.
7222
7223 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7224
7225         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7226         (type_lookup_function): Recognize CORE_ADDR values.
7227
7228 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7229
7230         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7231         print tag_name.
7232
7233 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7234
7235         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7236         <__lt__>: Add.
7237
7238 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7239
7240         * gdb-gdb.py: Move to...
7241         * gdb-gdb.py.in: ... here.
7242         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7243         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7244         dependencies.
7245         (distclean): Remove gdb-gdb.py when cleaning.
7246         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7247         * configure: Re-generate.
7248
7249 2018-06-27  Pedro Alves  <palves@redhat.com>
7250
7251         * proc-service.c (get_ps_regcache): New.
7252         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7253         (ps_lsetfpregs): Use it.
7254
7255 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7256
7257         PR gdb/21695
7258         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7259         declaration.
7260         (dwarf_decode_lines_1): Adjust.
7261
7262 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7263
7264         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7265         override.
7266         <info_proc>: Likewise.
7267
7268 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7269
7270         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7271         to windows_fetch_one_register, and only handle the case of
7272         fetching one register.  Move the code that reloads the context
7273         and iterates over all registers if R is negative to...
7274         (windows_nat_target::fetch_registers): ... here.
7275         (do_windows_store_inferior_registers): Rename to
7276         windows_store_one_register, and only handle the case of storing
7277         one register.  Move the code that handles the case where r is
7278         negative to...
7279         (windows_nat_target::store_registers) ... here.
7280
7281 2018-06-26  Tom Tromey  <tom@tromey.com>
7282
7283         PR rust/22574:
7284         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7285         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7286         Update.
7287         (rust_internal_print_type): Add podata parameter.
7288         (rust_print_type): Update.
7289
7290 2018-06-26  Tom Tromey  <tom@tromey.com>
7291
7292         * typeprint.h (struct print_offset_data) <update, finish,
7293         maybe_print_hole>: New methods.
7294         <indentation>: New constant.
7295         * typeprint.c (print_offset_data::indentation): Define.
7296         (print_offset_data::maybe_print_hole, print_offset_data::update)
7297         (print_offset_data::finish): Move from c-typeprint.c and rename.
7298         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7299         (print_spaces_filtered_with_print_options): Update.
7300         (c_print_type_union_field_offset, maybe_print_hole)
7301         (c_print_type_struct_field_offset): Move to typeprint.c and
7302         rename.
7303         (c_type_print_base_struct_union): Update.
7304
7305 2018-06-25  Pedro Alves  <palves@redhat.com>
7306
7307         * gdbthread.h (thread_info_ref, delete_thread)
7308         (delete_thread_silent, first_thread_of_inferior)
7309         (any_thread_of_inferior, switch_to_thread)
7310         (enable_thread_stack_temporaries)
7311         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7312         (get_last_thread_stack_temporary)
7313         (value_in_thread_stack_temporaries, can_access_registers_thread):
7314         Spell out "struct thread_info" instead of just "thread_info".
7315         * inferior.h (notice_new_inferior): Likewise.
7316
7317 2018-06-25  Pedro Alves  <palves@redhat.com>
7318
7319         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7320         pass thread_info pointer to delete_thread.
7321         (windows_nat_target::detach): Pass inferior pointer to
7322         detach_inferior.
7323         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7324         delete_thread.
7325         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7326         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7327         and pass a thread_info pointer to delete_thread.
7328         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7329         pass thread_info pointer to delete_thread.
7330         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7331         delete_thread_silent call.
7332         * procfs.c (procfs_target::detach): Pass inferior pointer to
7333         detach_inferior.
7334         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7335         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7336         delete_thread_silent call.
7337         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7338         pass thread_info pointer to delete_thread.
7339         (windows_nat_target::detach): Pass inferior pointer to
7340         delete_inferior.
7341
7342 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7343
7344         * regcache.c (readable_regcache::read_part): Fix asserts.
7345         (reg_buffer::raw_collect_part): New function.
7346         (regcache::write_part): Fix asserts.
7347         (reg_buffer::raw_supply_part): New function.
7348         (regcache::transfer_regset_register): New helper function.
7349         (regcache::transfer_regset): Call new functions.
7350         (regcache_supply_regset): Use gdb_byte*.
7351         (regcache::supply_regset): Likewise.
7352         (regcache_collect_regset): Likewise.
7353         (regcache::collect_regset): Likewise.
7354         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7355         (reg_buffer::raw_supply_part): Likewise.
7356         (regcache::transfer_regset_register): Likewise.
7357         (regcache::transfer_regset): Use gdb_byte*.
7358
7359 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7360
7361         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7362
7363 2018-06-21  Pedro Alves  <palves@redhat.com>
7364
7365         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7366         instead of a ptid_t.  All callers adjusted.
7367         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7368         adjusted.
7369         (print_ada_task_info, display_current_task_id, task_command_1):
7370         Adjust.
7371         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7372         inferior_thread.
7373         (breakpoint_kind): Adjust.
7374         (remove_breakpoints_pid): Rename to ...
7375         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7376         pointer.  All callers adjusted.
7377         (bpstat_clear_actions): Use inferior_thread.
7378         (get_bpstat_thread): New.
7379         (bpstat_do_actions): Use it.
7380         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7381         to take a thread_info pointer.  All callers adjusted.
7382         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7383         (breakpoint_re_set_thread): Use inferior_thread.
7384         * breakpoint.h (struct inferior): Forward declare.
7385         (bpstat_stop_status): Update.
7386         (remove_breakpoints_pid): Delete.
7387         (remove_breakpoints_inf): New.
7388         * bsd-uthread.c (bsd_uthread_target::wait)
7389         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7390         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7391         (maint_btrace_packet_history_cmd)
7392         (maint_btrace_clear_packet_history_cmd): Adjust.
7393         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7394         inferior_thread.
7395         * cli/cli-interp.c: Include "inferior.h".
7396         * common/refcounted-object.h (struct
7397         refcounted_object_ref_policy): New.
7398         * compile/compile-object-load.c: Include gdbthread.h.
7399         (store_regs): Use inferior_thread.
7400         * corelow.c (core_target::close): Use current_inferior.
7401         (core_target_open): Adjust to use first_thread_of_inferior and use
7402         the current inferior.
7403         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7404         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7405         <thread>: ... this new field.  All references adjusted.
7406         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7407         Take a thread_info pointer instead of a ptid_t.
7408         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7409         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7410         thread_info pointer instead of a ptid_t.
7411         * elfread.c: Include "inferior.h".
7412         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7413         Use inferior_thread.
7414         * eval.c (evaluate_subexp): Likewise.
7415         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7416         inferior_thread.
7417         * gdb_proc_service.h (struct thread_info): Forward declare.
7418         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7419         <thread>: ... this new field.  All references adjusted.
7420         * gdbarch.h, gdbarch.c: Regenerate.
7421         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7422         'thread' parameter.  All implementations and callers adjusted.
7423         * gdbthread.h (thread_info) <set_running>: New method.
7424         (delete_thread, delete_thread_silent): Take a thread_info pointer
7425         instead of a ptid.
7426         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7427         (first_thread_of_process): Delete, replaced by ...
7428         (first_thread_of_inferior): ... this new function.  All callers
7429         adjusted.
7430         (any_live_thread_of_process): Delete, replaced by ...
7431         (any_live_thread_of_inferior): ... this new function.  All callers
7432         adjusted.
7433         (switch_to_thread, switch_to_no_thread): Declare.
7434         (is_executing): Delete.
7435         (enable_thread_stack_temporaries): Update comment.
7436         <enable_thread_stack_temporaries>: Take a thread_info pointer
7437         instead of a ptid_t.  Incref the thread.
7438         <~enable_thread_stack_temporaries>: Decref the thread.
7439         <m_ptid>: Delete
7440         <m_thr>: New.
7441         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7442         (get_last_thread_stack_temporary)
7443         (value_in_thread_stack_temporaries, can_access_registers_thread):
7444         Take a thread_info pointer instead of a ptid_t.  All callers
7445         adjusted.
7446         * infcall.c (get_call_return_value): Use inferior_thread.
7447         (run_inferior_call): Work with thread pointers instead of ptid_t.
7448         (call_function_by_hand_dummy): Work with thread pointers instead
7449         of ptid_t.  Use thread_info_ref.
7450         * infcmd.c (proceed_thread_callback): Access thread's state
7451         directly.
7452         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7453         access thread's state directly.
7454         (continue_command): Use inferior_thread.
7455         (info_program_command): Use find_thread_ptid and access thread
7456         state directly.
7457         (proceed_after_attach_callback): Use thread state directly.
7458         (notice_new_inferior): Take a thread_info pointer instead of a
7459         ptid_t.  All callers adjusted.
7460         (exit_inferior): Take an inferior pointer instead of a pid.  All
7461         callers adjusted.
7462         (exit_inferior_silent): New.
7463         (detach_inferior): Delete.
7464         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7465         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7466         (detach_inferior_command, kill_inferior_command): Use
7467         find_inferior_id instead of valid_gdb_inferior_id and
7468         gdb_inferior_id_to_pid.
7469         (inferior_command): Use inferior and thread pointers.
7470         * inferior.h (struct thread_info): Forward declare.
7471         (notice_new_inferior): Take a thread_info pointer instead of a
7472         ptid_t.  All callers adjusted.
7473         (detach_inferior): Delete declaration.
7474         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7475         instead of a pid.  All callers adjusted.
7476         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7477         (valid_gdb_inferior_id): Delete.
7478         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7479         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7480         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7481         ...
7482         <inf>: ... this new field.
7483         <step_ptid>: Delete, replaced by ...
7484         <step_thread>: ... this new field.
7485         (get_displaced_stepping_state): Take an inferior pointer instead
7486         of a pid.  All callers adjusted.
7487         (displaced_step_in_progress_any_inferior): Adjust.
7488         (displaced_step_in_progress_thread): Take a thread pointer instead
7489         of a ptid_t.  All callers adjusted.
7490         (displaced_step_in_progress, add_displaced_stepping_state): Take
7491         an inferior pointer instead of a pid.  All callers adjusted.
7492         (get_displaced_step_closure_by_addr): Adjust.
7493         (remove_displaced_stepping_state): Take an inferior pointer
7494         instead of a pid.  All callers adjusted.
7495         (displaced_step_prepare_throw, displaced_step_prepare)
7496         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7497         All callers adjusted.
7498         (start_step_over): Adjust.
7499         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7500         displaced step queue.
7501         (do_target_resume): Adjust.
7502         (fetch_inferior_event): Use inferior_thread.
7503         (context_switch, get_inferior_stop_soon): Take an
7504         execution_control_state pointer instead of a ptid_t.  All callers
7505         adjusted.
7506         (switch_to_thread_cleanup): Delete.
7507         (stop_all_threads): Use scoped_restore_current_thread.
7508         * inline-frame.c: Include "gdbthread.h".
7509         (inline_state) <inline_state>: Take a thread pointer instead of a
7510         ptid_t.  All callers adjusted.
7511         <ptid>: Delete, replaced by ...
7512         <thread>: ... this new field.
7513         (find_inline_frame_state): Take a thread pointer instead of a
7514         ptid_t.  All callers adjusted.
7515         (skip_inline_frames, step_into_inline_frame)
7516         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7517         pointer instead of a ptid_t.  All callers adjusted.
7518         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7519         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7520         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7521         pointers directly.
7522         * linux-nat.c (get_detach_signal): Likewise.
7523         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7524         (thread_db_notice_clone): Adjust.
7525         (thread_db_find_new_threads_silently)
7526         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7527         a thread pointer instead of a ptid_t.  All callers adjusted.
7528         * mi/mi-cmd-var.c: Include "inferior.h".
7529         (mi_cmd_var_update_iter): Update to use thread pointers.
7530         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7531         inferior directly.
7532         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7533         out to ...
7534         (mi_output_running): ... this new function.
7535         (mi_on_resume_1): Adjust to use it.
7536         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7537         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7538         directly.
7539         (interrupt_thread_callback): : Adjust to use thread and inferior
7540         pointers.
7541         * proc-service.c: Include "gdbthread.h".
7542         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7543         * progspace-and-thread.c: Include "inferior.h".
7544         * progspace.c: Include "inferior.h".
7545         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7546         hold a reference to an inferior_object.
7547         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7548         inferior_thread.
7549         * python/py-inferior.c (struct inferior_object): Give the type a
7550         tag name instead of a typedef.
7551         (python_on_normal_stop): No need to check if the current thread is
7552         listed.
7553         (inferior_to_inferior_object): Change return type to
7554         inferior_object.  All callers adjusted.
7555         (find_thread_object): Delete, bits factored out to ...
7556         (thread_to_thread_object): ... this new function.
7557         * python/py-infthread.c (create_thread_object): Use
7558         inferior_to_inferior_object.
7559         (thpy_is_stopped): Use thread pointer directly.
7560         (gdbpy_selected_thread): Use inferior_thread.
7561         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7562         field, replaced with ...
7563         <thread>: ... this new field.  All users adjusted.
7564         (btpy_insn_or_gap_new): Drop const.
7565         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7566         callers adjusted.
7567         * python/py-record.c: Include "gdbthread.h".
7568         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7569         a ptid_t.  All callers adjusted.
7570         (gdbpy_current_recording): Use inferior_thread.
7571         * python/py-record.h (recpy_record_object) <ptid>: Delete
7572         field, replaced with ...
7573         <thread>: ... this new field.  All users adjusted.
7574         (recpy_element_object) <ptid>: Delete
7575         field, replaced with ...
7576         <thread>: ... this new field.  All users adjusted.
7577         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7578         a ptid_t.  All callers adjusted.
7579         * python/py-threadevent.c: Include "gdbthread.h".
7580         (get_event_thread): Use thread_to_thread_object.
7581         * python/python-internal.h (struct inferior_object): Forward
7582         declare.
7583         (find_thread_object, find_inferior_object): Delete declarations.
7584         (thread_to_thread_object, inferior_to_inferior_object): New
7585         declarations.
7586         * record-btrace.c: Include "inferior.h".
7587         (require_btrace_thread): Use inferior_thread.
7588         (record_btrace_frame_sniffer)
7589         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7590         (get_thread_current_frame): Use scoped_restore_current_thread and
7591         switch_to_thread.
7592         (get_thread_current_frame): Use thread pointer directly.
7593         (record_btrace_replay_at_breakpoint): Use thread's inferior
7594         pointer directly.
7595         * record-full.c: Include "inferior.h".
7596         * regcache.c: Include "gdbthread.h".
7597         (get_thread_arch_regcache): Use the inferior's address space
7598         directly.
7599         (get_thread_regcache, registers_changed_thread): New.
7600         * regcache.h (get_thread_regcache(thread_info *thread)): New
7601         overload.
7602         (registers_changed_thread): New.
7603         (remote_target) <remote_detach_1>: Swap order of parameters.
7604         (remote_add_thread): <remote_add_thread>: Return the new thread.
7605         (get_remote_thread_info(ptid_t)): New overload.
7606         (remote_target::remote_notice_new_inferior): Use thread pointers
7607         directly.
7608         (remote_target::process_initial_stop_replies): Use
7609         thread_info::set_running.
7610         (remote_target::remote_detach_1, remote_target::detach)
7611         (extended_remote_target::detach): Adjust.
7612         * stack.c (frame_show_address): Use inferior_thread.
7613         * target-debug.h (target_debug_print_thread_info_pp): New.
7614         * target-delegates.c: Regenerate.
7615         * target.c (default_thread_address_space): Delete.
7616         (memory_xfer_partial_1): Use current_inferior.
7617         (target_detach): Use current_inferior.
7618         (target_thread_address_space): Delete.
7619         (generic_mourn_inferior): Use current_inferior.
7620         * target.h (struct target_ops) <thread_address_space>: Delete.
7621         (target_thread_address_space): Delete.
7622         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7623         pointers directly.
7624         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7625         thread pointer instead of a ptid_t.  Adjust all callers.
7626         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7627         (first_thread_of_process): Delete, replaced by ...
7628         (first_thread_of_inferior): ... this new function.  All callers
7629         adjusted.
7630         (any_thread_of_process): Rename to ...
7631         (any_thread_of_inferior): ... this, and take an inferior pointer.
7632         (any_live_thread_of_process): Rename to ...
7633         (any_live_thread_of_inferior): ... this, and take an inferior
7634         pointer.
7635         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7636         (value_in_thread_stack_temporaries)
7637         (get_last_thread_stack_temporary): Take a thread pointer instead
7638         of a ptid_t.  Adjust all callers.
7639         (thread_info::set_running): New.
7640         (validate_registers_access): Use inferior_thread.
7641         (can_access_registers_ptid): Rename to ...
7642         (can_access_registers_thread): ... this, and take a thread
7643         pointer.
7644         (print_thread_info_1): Adjust to compare thread pointers instead
7645         of ptids.
7646         (switch_to_no_thread, switch_to_thread): Make extern.
7647         (scoped_restore_current_thread::~scoped_restore_current_thread):
7648         Use m_thread pointer directly.
7649         (scoped_restore_current_thread::scoped_restore_current_thread):
7650         Use inferior_thread.
7651         (thread_command): Use thread pointer directly.
7652         (thread_num_make_value_helper): Use inferior_thread.
7653         * top.c (execute_command): Use inferior_thread.
7654         * tui/tui-interp.c: Include "inferior.h".
7655         * varobj.c (varobj_create): Use inferior_thread.
7656         (value_of_root_1): Use find_thread_global_id instead of
7657         global_thread_id_to_ptid.
7658
7659 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7660
7661         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7662         possible.
7663         (regcache::write_part): Likewise.
7664         (readable_regcache::cooked_read_part): Update comment.
7665         (readable_regcache::cooked_write_part): Likewise.
7666         * regcache.h: (readable_regcache::read_part): Likewise.
7667         (regcache::write_part): Likewise.
7668
7669 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7670             Dirk Schubert  <dirk.schubert@arm.com>
7671
7672         * aarch64-linux-nat.c (post_attach): New.
7673         (aarch64_linux_nat_target::post_attach): Override post_attach to
7674         record the number of hardware debug registers.
7675
7676 2018-06-20  Tom Tromey  <tom@tromey.com>
7677
7678         * python/py-param.c (add_setshow_generic): Make parameters const.
7679         (parmpy_init): Update.
7680
7681 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7682
7683         * regcache.h (regcache_cooked_read_ftype): Rename to...
7684         (register_read_ftype): ...this, change type to function_view.
7685         (class reg_buffer) <save>: Remove src parameter.
7686         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7687         parameter non-const in first overload.  Remove src parameter in
7688         second overload.
7689         * regcache.c (do_cooked_read): Remove.
7690         (readonly_detached_regcache::readonly_detached_regcache): Make
7691         parameter non-const, adjust call to other constructor.
7692         (reg_buffer::save): Remove src parameter.
7693         * frame.c (do_frame_register_read): Remove.
7694         (frame_save_as_regcache): Use lambda function.
7695         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7696         parameter to ppu2spu_data *.
7697         (ppu2spu_sniffer): Use lambda function.
7698
7699 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7700
7701         * record-full.c (record_full_target::insert_breakpoint): Remove
7702         "struct" keyword, add const.
7703
7704 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7705
7706         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7707         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7708         * configure.ac: Remove AC_PREREQ, add missing quoting.
7709         * gnulib/configure.ac: Modernize usage of
7710         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7711         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7712         (AUTOMAKE_VERSION): Bump to 1.15.1.
7713         * configure: Re-generate.
7714         * config.in: Re-generate.
7715         * aclocal.m4: Re-generate.
7716         * gnulib/aclocal.m4: Re-generate.
7717         * gnulib/config.in: Re-generate.
7718         * gnulib/configure: Re-generate.
7719         * gnulib/import/Makefile.in: Re-generate.
7720
7721 2018-06-19  Pedro Alves  <palves@redhat.com>
7722
7723         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7724         (lookup_minimal_symbol_by_pc_section): ... here with
7725         gdb_assert_not_reached added.
7726
7727 2018-06-19  Pedro Alves  <palves@redhat.com>
7728
7729         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7730         parameter with a block parameter.  Compare location's block symbol
7731         with the frame's block instead of addresses.
7732         (skip_inline_frames): Pass the current block instead of the
7733         frame's address.  Break out as soon as we determine the frame
7734         should not be skipped.
7735
7736 2018-06-18  Tom Tromey  <tom@tromey.com>
7737
7738         * solib-aix.c (solib_aix_get_section_offsets): Return
7739         unique_xmalloc_ptr.
7740         (solib_aix_solib_create_inferior_hook): Update.
7741
7742 2018-06-18  Tom Tromey  <tom@tromey.com>
7743
7744         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7745
7746 2018-06-18  Tom Tromey  <tom@tromey.com>
7747
7748         * solib-frv.c (frv_relocate_main_executable): Use
7749         unique_xmalloc_ptr.
7750         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7751         unique_xmalloc_ptr.
7752
7753 2018-06-18  Tom Tromey  <tom@tromey.com>
7754
7755         * objfiles.h (inhibit_section_map_updates): Update.
7756         (resume_section_map_updates, resume_section_map_updates_cleanup):
7757         Remove.
7758         * solib-svr4.c (svr4_handle_solib_event): Update.
7759         * objfiles.c (inhibit_section_map_updates): Return
7760         scoped_restore_tmpl<int>.
7761         (resume_section_map_updates, resume_section_map_updates_cleanup):
7762         Remove.
7763
7764 2018-06-18  Tom Tromey  <tom@tromey.com>
7765
7766         * valprint.h (read_string): Update.
7767         * valprint.c (read_string): Change type of "buffer".
7768         (val_print_string): Update.
7769         * python/py-value.c (valpy_string): Update.
7770         * language.h (struct language_defn) <la_get_string>: Change
7771         type of "buffer".
7772         (default_get_string, c_get_string): Update.
7773         * language.c (default_get_string): Change type of "buffer".
7774         * guile/scm-value.c (gdbscm_value_to_string): Update.
7775         * c-lang.c (c_get_string): Change type of "buffer".
7776
7777 2018-06-18  Tom Tromey  <tom@tromey.com>
7778
7779         * ser-mingw.c (struct pipe_state_destroyer): New.
7780         (pipe_state_up): New typedef.
7781         (cleanup_pipe_state): Remove.
7782         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7783
7784 2018-06-18  Tom Tromey  <tom@tromey.com>
7785
7786         * rust-lang.h (rust_yyerror): Don't declare.
7787         * rust-lang.c (rust_language_defn): Update.
7788         * rust-exp.y (yyerror): Now static.
7789         * parse.c (parse_exp_in_context_1): Update.
7790         * p-lang.h (p_yyerror): Don't declare.
7791         * p-lang.c (p_language_defn): Update.
7792         * p-exp.y (yyerror): Now static.
7793         * opencl-lang.c (opencl_language_defn): Update.
7794         * objc-lang.c (objc_language_defn): Update.
7795         * m2-lang.h (m2_yyerror): Don't declare.
7796         * m2-lang.c (m2_language_defn): Update.
7797         * m2-exp.y (yyerror): Now static.
7798         * language.h (struct language_defn) <la_error>: Remove.
7799         * language.c (unk_lang_error): Remove.
7800         (unknown_language_defn, auto_language_defn): Remove.
7801         * go-lang.h (go_yyerror): Don't declare.
7802         * go-lang.c (go_language_defn): Update.
7803         * go-exp.y (yyerror): Now static.
7804         * f-lang.h (f_yyerror): Don't declare.
7805         * f-lang.c (f_language_defn): Update.
7806         * f-exp.y (yyerror): Now static.
7807         * d-lang.h (d_yyerror): Don't declare.
7808         * d-lang.c (d_language_defn): Update.
7809         * d-exp.y (yyerror): Now static.
7810         * c-lang.h (c_yyerror): Don't declare.
7811         * c-lang.c (c_language_defn, cplus_language_defn)
7812         (asm_language_defn, minimal_language_defn): Update.
7813         * c-exp.y (yyerror): Now static.
7814         * ada-lang.h (ada_yyerror): Don't declare.
7815         * ada-lang.c (ada_language_defn): Update.
7816         * ada-exp.y (yyerror): Now static.
7817
7818 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7819
7820         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7821         (store_sveregs_to_thread): Likewise.
7822         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7823         (aarch64_linux_store_inferior_registers): Likewise.
7824         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7825         function.
7826         (aarch64_sve_regs_copy_to_regcache): Likewise.
7827         (aarch64_sve_regs_copy_from_regcache): Likewise.
7828         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7829         declaration.
7830         (aarch64_sve_regs_copy_to_regcache): Likewise.
7831         (aarch64_sve_regs_copy_from_regcache): Likewise.
7832         (sve_context): Structure from Linux headers.
7833         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7834         (SVE_SIG_ZREG_SIZE): Likewise.
7835         (SVE_SIG_PREG_SIZE): Likewise.
7836         (SVE_SIG_FFR_SIZE): Likewise.
7837         (SVE_SIG_REGS_OFFSET): Likewise.
7838         (SVE_SIG_ZREGS_OFFSET): Likewise.
7839         (SVE_SIG_ZREG_OFFSET): Likewise.
7840         (SVE_SIG_ZREGS_SIZE): Likewise.
7841         (SVE_SIG_PREGS_OFFSET): Likewise.
7842         (SVE_SIG_PREG_OFFSET): Likewise.
7843         (SVE_SIG_PREGS_SIZE): Likewise.
7844         (SVE_SIG_FFR_OFFSET): Likewise.
7845         (SVE_SIG_REGS_SIZE): Likewise.
7846         (SVE_SIG_CONTEXT_SIZE): Likewise.
7847         (SVE_PT_REGS_MASK): Likewise.
7848         (SVE_PT_REGS_FPSIMD): Likewise.
7849         (SVE_PT_REGS_SVE): Likewise.
7850         (SVE_PT_VL_INHERIT): Likewise.
7851         (SVE_PT_VL_ONEXEC): Likewise.
7852         (SVE_PT_REGS_OFFSET): Likewise.
7853         (SVE_PT_FPSIMD_OFFSET): Likewise.
7854         (SVE_PT_FPSIMD_SIZE): Likewise.
7855         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7856         (SVE_PT_SVE_PREG_SIZE): Likewise.
7857         (SVE_PT_SVE_FFR_SIZE): Likewise.
7858         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7859         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7860         (__SVE_SIG_TO_PT): Likewise.
7861         (SVE_PT_SVE_OFFSET): Likewise.
7862         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7863         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7864         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7865         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7866         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7867         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7868         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7869         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7870         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7871         (SVE_PT_SVE_SIZE): Likewise.
7872         (SVE_PT_SIZE): Likewise.
7873         (HAS_SVE_STATE): New define.
7874
7875 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7876
7877         * nat/aarch64-sve-linux-sigcontext.h: New file.
7878         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7879         new files.
7880         (SVE_VQ_MIN): Likewise.
7881         (SVE_VQ_MAX): Likewise.
7882         (SVE_VL_MIN): Likewise.
7883         (SVE_VL_MAX): Likewise.
7884         (SVE_NUM_ZREGS): Likewise.
7885         (SVE_NUM_PREGS): Likewise.
7886         (sve_vl_valid): Likewise.
7887         (struct user_sve_header): Likewise.
7888
7889 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7890             Richard Bunt <Richard.Bunt@arm.com>
7891
7892         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7893         was requested by GDB.
7894
7895 2018-06-15  Tom de Vries  <tdevries@suse.de>
7896
7897         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7898
7899 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7900
7901         * gnulib/update-gnulib.sh: Print expected versions of
7902         autoconf/aclocal.
7903
7904 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7905
7906         * arch-utils.c (default_type_align): Use type_length_units.
7907         * gdbtypes.c (type_align): Use type_length_units.
7908
7909 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7910
7911         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7912         of 'define' command.
7913
7914 2018-06-14  Tom de Vries  <tdevries@suse.de>
7915
7916         PR cli/22573
7917         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7918         get_no_prettyformat_print_options.
7919
7920 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7921
7922         * sparc-nat.h: Include target.h.
7923         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7924         <fetch_registers>: Remove this argument in function call.
7925         <store_registers>: Remove this argument in function call, remove
7926         extra semicolon.
7927         <low_forget_process>: Call sparc64_forget_process instead of
7928         sparc_forget_process.
7929
7930 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7931
7932         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7933         (procfs_target::make_corefile_notes): Adjust to new
7934         target_read_alloc return type.
7935
7936 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7937             Stephen Roberts  <stephen.roberts@arm.com>
7938
7939         PR gdb/22882
7940         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7941         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7942         Move should_notify_stop local into more inner scope.
7943
7944 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7945             Stephen Roberts  <stephen.roberts@arm.com>
7946
7947         PR gdb/22882
7948         * infrun.c (resume_1): Add call to mark_async_event_handler.
7949
7950 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7951
7952         * infrun.c (do_target_wait): Change old version of $pc printed.
7953
7954 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7955
7956         * dwarf2read.c (read_index_from_section): Rename to...
7957         (read_gdb_index_from_section): ... this, update all callers.
7958         (dwarf2_read_index): Rename to...
7959         (dwarf2_read_gdb_index): ... this, update all callers.
7960
7961 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7962
7963         * hppa-linux-nat.c
7964         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7965         hppa_linux_nat_target::fetch_registers.
7966
7967 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7968
7969         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7970         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7971         (AARCH64_DWARF_SVE_FFR): Likewise.
7972         (AARCH64_DWARF_SVE_P0): Likewise.
7973         (AARCH64_DWARF_SVE_Z0): Likewise.
7974
7975 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7976
7977         * common/common-regcache.h (raw_compare): New function.
7978         * regcache.c (regcache::raw_compare): Likewise.
7979         * regcache.h (regcache::raw_compare): New declaration.
7980
7981 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7982
7983         * common/common-regcache.h (reg_buffer_common): New structure.
7984         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7985         (reg_buffer::raw_supply): Likewise.
7986         (reg_buffer::raw_supply_integer): Likewise.
7987         (reg_buffer::raw_supply_zeroed): Likewise.
7988         (reg_buffer::raw_collect): Likewise.
7989         (reg_buffer::raw_collect_integer): Likewise.
7990         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7991         (reg_buffer::raw_supply): Likewise.
7992         (reg_buffer::raw_supply_integer): Likewise.
7993         (reg_buffer::raw_supply_zeroed): Likewise.
7994         (reg_buffer::raw_collect): Likewise.
7995         (reg_buffer::raw_collect_integer): Likewise.
7996
7997 2018-06-10  Tom Tromey  <tom@tromey.com>
7998
7999         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8000         (class remote_state) <stop_reply_queue>: Now std::vector.
8001         (remote_state::~remote_state)
8002         (remote_target::stop_reply_queue_length): Update.
8003         (struct queue_iter_param, remove_child_of_pending_fork)
8004         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8005         (check_pending_event_prevents_wildcard_vcont_callback)
8006         (remove_stop_reply_for_inferior)
8007         (remove_stop_reply_of_remote_state)
8008         (remote_notif_remove_once_on_match)
8009         (stop_reply_match_ptid_and_ws)
8010         (remote_kill_child_of_pending_fork): Remove.
8011         (remote_target::remove_new_fork_children)
8012         (remote_target::check_pending_events_prevent_wildcard_vcont)
8013         (remote_target::discard_pending_stop_replies)
8014         (remote_target::discard_pending_stop_replies_in_queue)
8015         (remote_target::remote_notif_remove_queued_reply)
8016         (remote_target::queued_stop_reply)
8017         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8018         (remote_target::wait, remote_target::kill_new_fork_children)
8019         (remote_target::async): Update.
8020
8021 2018-06-10  Tom Tromey  <tom@tromey.com>
8022
8023         * record-full.c (record_full_arch_list_cleanups): Remove.
8024         (record_full_message): Use try/catch.
8025         (record_full_wait_cleanups): Remove.
8026         (record_full_wait_1): Use try/catch.
8027         (record_full_restore): Likewise.
8028
8029 2018-06-10  Tom Tromey  <tom@tromey.com>
8030
8031         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8032         declare VEC.  Add constructor.
8033         <in_target_beneath>: Now bool.
8034         (record_full_breakpoints): Now a std::vector, static.
8035         (record_full_sync_record_breakpoints)
8036         (record_full_init_record_breakpoints)
8037         (record_full_target::insert_breakpoint)
8038         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8039
8040 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8041
8042         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8043         * serial.c (serial_interface_lookup): Remove struct keyword.
8044
8045 2018-06-10  Tom Tromey  <tom@tromey.com>
8046
8047         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8048         method.
8049         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8050         a method.
8051         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8052         method.
8053         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8054         "beneath" as a method.
8055         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8056         Use "beneath" as a method.
8057
8058 2018-06-10  Tom Tromey  <tom@tromey.com>
8059
8060         * tracefile.c (struct trace_file_writer_deleter): New.
8061         <operator()>: Rename from trace_file_writer_xfree.
8062         (trace_file_writer_up): New typedef.
8063         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8064
8065 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8066
8067         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8068         <m_registers, m_register_status>: Change type to
8069         std::unique_ptr.
8070         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8071         XCNEWVEC.
8072
8073 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8074
8075         * common/common-regcache.h (enum register_status): Add
8076         underlying type "signed char".
8077         * regcache.h (reg_buffer) <m_register_status>: Change type to
8078         register_status *.
8079         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8080         register_status instead of signed char.
8081         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8082         (reg_buffer::get_register_status): Remove cast.
8083         (readable_regcache::raw_read): Remove cast.
8084         (readable_regcache::cooked_read): Remove cast.
8085
8086 2018-06-09  Tom Tromey  <tom@tromey.com>
8087
8088         * source.c (reverse_search_command, forward_search_command): Use
8089         scoped_fd.
8090
8091 2018-06-09  Tom Tromey  <tom@tromey.com>
8092
8093         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8094         (serial_ops_list): Now static, std::vector.
8095         (serial_interface_lookup, serial_add_interface): Update.
8096
8097 2018-06-09  Tom Tromey  <tom@tromey.com>
8098
8099         * dwarf2read.c (process_cu_includes): Update.
8100         (process_full_comp_unit): Update.
8101         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8102         std::vector.
8103
8104 2018-06-08  Paul Koning  <paul_koning@dell.com>
8105
8106         PR gdb/23252
8107
8108         * python/python.c (do_start_initialization):
8109         Avoid call to internal Python API.
8110         (init__gdb_module): New function.
8111
8112 2018-06-08  Gary Benson <gbenson@redhat.com>
8113
8114         * linux-thread-db.c (valprint.h): New include.
8115         (struct check_thread_db_info): New structure.
8116         (check_thread_db_on_load, tdb_testinfo): New static globals.
8117         (check_thread_db, check_thread_db_callback): New functions.
8118         (try_thread_db_load_1): Run integrity checks if requested.
8119         (maintenance_check_libthread_db): New function.
8120         (_initialize_thread_db): Register "maint check libthread-db"
8121         and "maint set/show check-libthread-db".
8122         * NEWS: Mention the above new commands.
8123
8124 2018-06-08  Tom Tromey  <tom@tromey.com>
8125
8126         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8127         now a method.
8128
8129 2018-06-08  Tom Tromey  <tom@tromey.com>
8130
8131         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8132
8133 2018-06-08  Tom Tromey  <tom@tromey.com>
8134
8135         * common/btrace-common.h (struct btrace_data): Add constructor,
8136         destructor, move assignment operator.
8137         <empty, clear, fini>: New methods.
8138         <format>: Initialize.
8139         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8140         (btrace_data_empty): Don't declare.
8141         * common/btrace-common.c (btrace_data_init): Remove.
8142         (btrace_data::fini): Rename from btrace_data_fini.
8143         (btrace_data::empty): Rename from btrace_data_empty.
8144         (btrace_data::clear): Rename from btrace_data_clear.  Return
8145         bool.
8146         * btrace.h (make_cleanup_btrace_data): Don't declare.
8147         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8148         (parse_xml_btrace): Update.
8149         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8150         (maint_btrace_clear_packet_history_cmd): Update.
8151
8152 2018-06-07  Pedro Alves  <palves@redhat.com>
8153
8154         * target.h (target_ops) <beneath>: Now a method.  All references
8155         updated.
8156         (class target_stack): New.
8157         * target.c (g_target_stack): New.
8158         (g_current_top_target): Delete.
8159         (current_top_target): Get the top target out of g_target_stack.
8160         (target_stack::push, target_stack::unpush): New.
8161         (push_target, unpush_target): Reimplement.
8162         (target_is_pushed): Reimplement in terms of g_target_stack.
8163         (target_ops::beneath, target_stack::find_beneath): New.
8164
8165 2018-06-07  Pedro Alves  <palves@redhat.com>
8166
8167         * target.h (find_target_beneath): Delete declaration.
8168         * target.c (find_target_beneath): Delete definition.
8169         * aix-thread.c: All callers of find_target_beneath adjusted to
8170         call target_ops::beneath instead.
8171         * bsd-uthread.c: Likewise.
8172         * linux-thread-db.c: Likewise.
8173         * ravenscar-thread.c: Likewise.
8174         * sol-thread.c: Likewise.
8175         * spu-multiarch.c: Likewise.
8176
8177 2018-06-07  Pedro Alves  <palves@redhat.com>
8178
8179         * target.h (target_ops) <beneath>: Now a method.  All references
8180         updated.
8181         (target_ops) <m_beneath>: New.
8182         * target.c (target_ops::beneath): New.
8183         * corelow.c: Adjust all references to target_ops::beneath.
8184         * linux-thread-db.c: Likewise.
8185         * make-target-delegates: Likewise.
8186         * record-btrace.c: Likewise.
8187         * record-full.c: Likewise.
8188         * remote.c: Likewise.
8189         * target.c: Likewise.
8190         * target-delegates.c: Regenerate.
8191
8192 2018-06-07  Pedro Alves  <palves@redhat.com>
8193
8194         * target.h (target_stack): Delete.
8195         (current_top_target): Declare function.
8196         * target.c (target_stack): Delete.
8197         (g_current_top_target): New.
8198         (current_top_target): New function.
8199         * auxv.c: Use current_top_target instead of target_stack
8200         throughout.
8201         * avr-tdep.c: Likewise.
8202         * breakpoint.c: Likewise.
8203         * corefile.c: Likewise.
8204         * elfread.c: Likewise.
8205         * eval.c: Likewise.
8206         * exceptions.c: Likewise.
8207         * frame.c: Likewise.
8208         * gdbarch-selftests.c: Likewise.
8209         * gnu-v3-abi.c: Likewise.
8210         * ia64-tdep.c: Likewise.
8211         * ia64-vms-tdep.c: Likewise.
8212         * infcall.c: Likewise.
8213         * infcmd.c: Likewise.
8214         * infrun.c: Likewise.
8215         * linespec.c: Likewise.
8216         * linux-tdep.c: Likewise.
8217         * minsyms.c: Likewise.
8218         * ppc-linux-nat.c: Likewise.
8219         * ppc-linux-tdep.c: Likewise.
8220         * procfs.c: Likewise.
8221         * regcache.c: Likewise.
8222         * remote.c: Likewise.
8223         * rs6000-tdep.c: Likewise.
8224         * s390-linux-nat.c: Likewise.
8225         * s390-tdep.c: Likewise.
8226         * solib-aix.c: Likewise.
8227         * solib-darwin.c: Likewise.
8228         * solib-dsbt.c: Likewise.
8229         * solib-spu.c: Likewise.
8230         * solib-svr4.c: Likewise.
8231         * solib-target.c: Likewise.
8232         * sparc-tdep.c: Likewise.
8233         * sparc64-tdep.c: Likewise.
8234         * spu-tdep.c: Likewise.
8235         * symfile.c: Likewise.
8236         * symtab.c: Likewise.
8237         * target-descriptions.c: Likewise.
8238         * target-memory.c: Likewise.
8239         * target.c: Likewise.
8240         * target.h: Likewise.
8241         * tracefile-tfile.c: Likewise.
8242         * tracepoint.c: Likewise.
8243         * valops.c: Likewise.
8244         * valprint.c: Likewise.
8245         * value.c: Likewise.
8246         * windows-tdep.c: Likewise.
8247         * mi/mi-main.c: Likewise.
8248
8249 2018-06-07  Tom Tromey  <tom@tromey.com>
8250
8251         * valprint.h (build_address_symbolic): Declare.
8252         * printcmd.c (print_address_symbolic): Update.
8253         (build_address_symbolic): Change "name" and "filename" to
8254         std::string.
8255         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8256         Update.
8257         * defs.h (build_address_symbolic): Remove declaration.
8258
8259 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8260
8261         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8262         (aarch64_vnv_type): Add function.
8263         (aarch64_pseudo_register_name): Add V regs for SVE.
8264         (aarch64_pseudo_register_type): Likewise.
8265         (aarch64_pseudo_register_reggroup_p): Likewise.
8266         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8267         (aarch64_pseudo_read_value): Add V regs for SVE.
8268         (aarch64_pseudo_write_2): Use V0 offset for SVE
8269         (aarch64_pseudo_write): Add V regs for SVE.
8270         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8271
8272 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8273
8274         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8275         (sve_vl_from_vq): Likewise.
8276
8277 2018-06-05  Tom Tromey  <tom@tromey.com>
8278
8279         * cli/cli-cmds.c (show_version): Update.
8280         * top.c (print_gdb_version): Add "interactive" parameter.
8281         Update.
8282         * main.c (captured_main_1): Update.
8283         * top.h (print_gdb_version): Add "interactive" parameter and a
8284         comment.
8285
8286 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8287
8288         * common/enum-flags.h: Add trailing semicolon to example in
8289         comment.
8290
8291 2018-06-05  Tom Tromey  <tom@tromey.com>
8292
8293         PR cli/12326:
8294         * NEWS: Add entry about pager.
8295         * utils.c (pagination_disabled_for_command): New global.
8296         (prompt_for_continue): Allow "c" response to prompt.
8297         (reinitialize_more_filter): Clear
8298         pagination_disabled_for_command.
8299         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8300
8301 2018-06-04  Tom Tromey  <tom@tromey.com>
8302
8303         * ada-lang.h (ada_lookup_symbol_list): Update.
8304         * ada-lang.c (resolve_subexp): Update.
8305         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8306         parameter.
8307         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8308         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8309         results parameter to std::vector.
8310         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8311         Update.
8312         * ada-exp.y (block_lookup): Update.
8313         (select_possible_type_sym): Change type of syms.  Remove nsyms
8314         parameter.
8315         (write_var_or_type, write_name_assoc): Update.
8316
8317 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8318
8319         * windows-nat.c (windows_nat_target::xfer_partial): Return
8320         TARGET_XFER_E_IO if we need to delegate to the target beneath
8321         but BENEATH is NULL.
8322
8323 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8324
8325         * Makefile.in (config.status): Add configure.nat as a
8326         dependency.
8327
8328 2018-06-04  Tom Tromey  <tom@tromey.com>
8329
8330         * cp-name-parser.y (cpname_state): Add method declarations.
8331         (HANDLE_QUAL): Update.
8332         (cpname_state::d_grab, cpname_state::fill_comp)
8333         (cpname_state::make_operator, cpname_state::make_dtor)
8334         (cpname_state::make_builtin_type, cpname_state::make_name)
8335         (cpname_state::d_qualify, cpname_state::d_int_type)
8336         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8337         (%union): Move earlier.
8338
8339 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8340
8341         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8342
8343 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8344
8345         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8346         (aarch64_pseudo_write_1): Likewise.
8347         (aarch64_pseudo_read_value): Use helper.
8348         (aarch64_pseudo_write): Likewise.
8349
8350 2018-06-04  Pedro Alves  <palves@redhat.com>
8351
8352         * darwin-nat.c (darwin_ops): Delete.
8353         (darwin_attach_pid): Use get_native_target.
8354
8355 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8356
8357         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8358         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8359
8360 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8361
8362         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8363         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8364         (aarch64_gdbarch_init): Check for SVE.
8365         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8366
8367 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8368
8369         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8370         * aarch64-tdep.h (aarch64_read_description): Likewise.
8371         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8372         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8373         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8374         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8375         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8376
8377 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8378
8379         * value.c (value_fetch_lazy_bitfield): New.
8380         (value_fetch_lazy_memory): New.
8381         (value_fetch_lazy_register): New.
8382         (value_fetch_lazy): Factor out to smaller functions.
8383
8384 2018-06-01  Tom Tromey  <tom@tromey.com>
8385
8386         * cp-name-parser.y (backslashable, represented): Now const.
8387
8388 2018-06-01  Tom Tromey  <tom@tromey.com>
8389
8390         * cp-name-parser.y: Include parser-defs.h.
8391         (parser_fprintf): Remove declaration.
8392
8393 2018-06-01  Tom Tromey  <tom@tromey.com>
8394
8395         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8396         %parse-param.
8397         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8398         (global_result): Remove globals.
8399         (struct cpname_state): New.
8400         (yyparse): Don't declare.
8401         (yylex, yyerror): Move declarations after %union.
8402         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8403         (make_name): Add state parameter.
8404         Update all callers.
8405         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8406         parameter.
8407         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8408         Update.
8409         (yylex): Add lvalp, state parameters.
8410         (yyerror): Add state parameter.
8411         (cp_demangled_name_to_comp): Update.
8412
8413 2018-06-01  Tom Tromey  <tom@tromey.com>
8414
8415         * cp-name-parser.y (parser_fprintf): Declare.
8416         (GDB_YY_REMAP_PREFIX): Define.
8417         Include yy-remap.h.  Don't redefine yy* identifiers.
8418
8419 2018-06-01  Tom Tromey  <tom@tromey.com>
8420
8421         * python/py-type.c (typy_legacy_template_argument): Update.
8422         * cp-support.h (cp_demangled_name_to_comp): Update.
8423         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8424         parameter to be a "std::string *".
8425         (main): Update.
8426
8427 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8428
8429         * ada-lex.l: Include "diagnostics.h" instead of
8430         "common/diagnostics.h".
8431         * unittests/environ-selftests.c: Likewise.
8432         * common/diagnostics.h: Moved to ../include.
8433
8434 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8435
8436         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8437         to language_mode_manual while calling breakpoint_re_set_one.
8438
8439 2018-06-01  Tom Tromey  <tom@tromey.com>
8440
8441         * valops.c (value_cast_structs, destructor_name_p): Update.
8442         * symtab.c (gdb_mangle_name): Update.
8443         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8444         Update.
8445         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8446         (pascal_object_print_value_fields, pascal_object_print_value):
8447         Update.
8448         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8449         * linespec.c (find_methods): Update.
8450         * gdbtypes.h (type_name_no_tag): Remove.
8451         (type_name_or_error): Rename from type_name_no_tag_or_error.
8452         * gdbtypes.c (type_name_no_tag): Remove.
8453         (type_name_or_error): Rename from type_name_no_tag_or_error.
8454         (lookup_struct_elt_type, check_typedef): Update.
8455         * expprint.c (print_subexp_standard): Update.
8456         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8457         * d-namespace.c (d_lookup_nested_symbol): Update.
8458         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8459         (cp_print_class_member): Update.
8460         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8461         * completer.c (add_struct_fields): Update.
8462         * c-typeprint.c (cp_type_print_derivation_info)
8463         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8464         Update.
8465         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8466         (ada_prefer_type, ada_is_exception_sym): Update.
8467
8468 2018-06-01  Tom Tromey  <tom@tromey.com>
8469
8470         * valops.c (enum_constant_from_type, value_namespace_elt)
8471         (value_maybe_namespace_elt): Update.
8472         * valarith.c (find_size_for_pointer_math): Update.
8473         * target-descriptions.c (make_gdb_type): Update.
8474         * symmisc.c (print_symbol): Update.
8475         * stabsread.c (define_symbol, read_type)
8476         (complain_about_struct_wipeout, add_undefined_type)
8477         (cleanup_undefined_types_1): Update.
8478         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8479         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8480         (rust_internal_print_type, rust_composite_type)
8481         (rust_evaluate_funcall, rust_evaluate_subexp)
8482         (rust_inclusive_range_type_p): Update.
8483         * python/py-type.c (typy_get_tag): Update.
8484         * p-typeprint.c (pascal_type_print_base): Update.
8485         * mdebugread.c (parse_symbol, parse_type): Update.
8486         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8487         Update.
8488         * guile/scm-type.c (gdbscm_type_tag): Update.
8489         * go-lang.c (sixg_string_p): Update.
8490         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8491         Update.
8492         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8493         (TYPE_TAG_NAME): Remove.
8494         * gdbtypes.c (type_name_no_tag): Simplify.
8495         (check_typedef, check_types_equal, recursive_dump_type)
8496         (copy_type_recursive, arch_composite_type): Update.
8497         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8498         in summary mode when needed.
8499         * eval.c (evaluate_funcall): Update.
8500         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8501         (process_structure_scope, read_enumeration_type)
8502         (read_namespace_type, read_module_type, determine_prefix): Update.
8503         * cp-support.c (inspect_type): Update.
8504         * coffread.c (process_coff_symbol, decode_base_type): Update.
8505         * c-varobj.c (c_is_path_expr_parent): Update.
8506         * c-typeprint.c (c_type_print_base_struct_union): Update.
8507         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8508         summary when using C language.
8509         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8510         (gen_maybe_namespace_elt): Update.
8511         * ada-lang.c (ada_type_name): Simplify.
8512         (empty_record, ada_template_to_fixed_record_type_1)
8513         (template_to_static_fixed_type)
8514         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8515
8516 2018-06-01  Tom Tromey  <tom@tromey.com>
8517
8518         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8519         c_print_type.
8520         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8521         (c_print_type): Update.
8522         (c_print_type): New overload.
8523         (c_type_print_varspec_prefix, c_type_print_args)
8524         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8525         (c_type_print_base_struct_union, c_type_print_base_1)
8526         (cp_type_print_method_args): Add "language" parameter.
8527         (c_type_print_base): Update.
8528         * c-lang.h (c_print_type): Add new overload.
8529
8530 2018-06-01  Tom Tromey  <tom@tromey.com>
8531
8532         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8533         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8534
8535 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8536
8537         * aarch64-tdep.c (aarch64_sve_register_names): New const
8538         var.
8539         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8540         (AARCH64_SVE_Z_REGS_NUM): New define.
8541         (AARCH64_SVE_P_REGS_NUM): Likewise.
8542         (AARCH64_SVE_NUM_REGS): Likewise.
8543
8544 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8545
8546         * nat/linux-ptrace.h [__alpha__]
8547         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8548         definitions.
8549
8550 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8551
8552         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8553         the endianness selected.
8554         * NEWS: Document `set endian auto' mode operation update.
8555
8556 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8557
8558         * Makefile.in: Add new header.
8559         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8560         (sve_vl_from_vg): Likewise.
8561         (sve_vq_from_vl): Likewise.
8562         (sve_vl_from_vq): Likewise.
8563         (sve_vq_from_vg): Likewise.
8564         (sve_vg_from_vq): Likewise.
8565         * configure.nat: Add new c file.
8566         * nat/aarch64-sve-linux-ptrace.c: New file.
8567         * nat/aarch64-sve-linux-ptrace.h: New file.
8568
8569 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8570
8571         * aarch64-linux-nat.c (aarch64_linux_read_description):
8572         Add parmeter zero.
8573         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8574         Likewise.
8575         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8576         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8577         (aarch64_gdbarch_init): Add parmeter zero.
8578         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8579         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8580         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8581         parmeter.
8582         * doc/gdb.texinfo: Describe SVE feature
8583         * features/aarch64-sve.c: New file.
8584
8585 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8586
8587         PR gdb/23210
8588         * gdbarch.sh (significant_addr_bit): Default to zero when
8589         not set by target architecture.
8590         * gdbarch.c: Re-generated.
8591         * utils.c (address_significant): Update.
8592
8593 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8594
8595         * stack.c (func_command): Remove trailing newline in call to error.
8596
8597 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8598
8599         * regcache.h (regcache_raw_collect): Remove, update callers to
8600         use regcache::raw_collect.
8601         * regcache.c (regcache_raw_collect): Remove.
8602
8603 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8604
8605         * regcache.h (regcache_raw_supply): Remove, update callers to
8606         use detached_regcache::raw_supply.
8607         * regcache.c (regcache_raw_supply): Remove.
8608
8609 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8610
8611         * regcache.h (regcache_cooked_write_part): Remove, update
8612         callers to use regcache::cooked_write_part.
8613         * regcache.c (regcache_cooked_write_part): Remove.
8614
8615 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8616
8617         * regcache.h (regcache_cooked_read_part): Remove, update callers
8618         to use readable_regcache::cooked_read_part.
8619         * regcache.c (regcache_cooked_read_part): Remove.
8620
8621 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8622
8623         * regcache.h (regcache_cooked_read_value): Remove, update
8624         callers to use readable_regcache::cooked_read_value.
8625         * regcache.c (regcache_cooked_read_value): Remove.
8626
8627 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8628
8629         * regcache.h (regcache_cooked_write): Remove, update callers to
8630         use regcache::cooked_write.
8631         * regcache.c (regcache_cooked_write): Remove.
8632
8633 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8634
8635         * regcache.h (regcache_invalidate): Remove, update callers to
8636         use detached_regcache::invalidate instead.
8637         * regcache.c (regcache_invalidate): Remove.
8638
8639 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8640
8641         * regcache.h (regcache_raw_write_part): Remove, update callers
8642         to use regcache::raw_write_part instead.
8643         * regcache.c (regcache_raw_write_part): Remove.
8644
8645 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8646
8647         * regcache.h (regcache_raw_read_part): Remove, update callers to
8648         use readable_regcache::raw_read_part instead.
8649         * regcache.c (regcache_raw_read_part): Remove.
8650
8651 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8652
8653         * regcache.h (regcache_cooked_read): Remove, update callers to
8654         use readable_regcache::cooked_read instead.
8655         * regcache.c (regcache_cooked_read): Remove.
8656
8657 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8658
8659         * regcache.h (regcache_raw_write): Remove, update callers to use
8660         regcache::raw_write instead.
8661         * regcache.c (regcache_raw_write): Remove.
8662
8663 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8664
8665         * regcache.h (regcache_raw_read): Remove, update callers to use
8666         readable_regcache::raw_read instead.
8667         * regcache.c (regcache_raw_read): Remove.
8668
8669 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8670
8671         * regcache.h (regcache_raw_update): Remove, update callers to
8672         use readable_regcache::raw_update instead.
8673         * regcache.c (regcache_raw_update): Remove.
8674
8675 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8676
8677         * regcache.h (regcache_register_status): Remove, update callers
8678         to use reg_buffer::get_register_status directly instead.
8679         * regcache.c (regcache_register_status): Remove.
8680
8681 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8682
8683         * regcache.h (regcache_get_ptid): Remove, update all callers to
8684         call regcache::ptid instead.
8685         * regcache.c (regcache_get_ptid): Remove.
8686
8687 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8688
8689         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8690
8691 2018-05-30  Pedro Alves  <palves@redhat.com>
8692
8693         * common/common-exceptions.h (exception_rethrow): Use
8694         ATTRIBUTE_NORETURN.
8695
8696 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8697
8698         * breakpoint.c (print_solib_event, check_status_catch_solib):
8699         Remove struct keyword in range-based for loops.
8700         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8701         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8702         Likewise.
8703         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8704         Likewise.
8705         * symfile.c (addr_info_make_relative): Likewise.
8706         * thread.c (value_in_thread_stack_temporaries): Likewise.
8707
8708 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8709
8710         PR gdb/16841
8711         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8712         aggregate type to get its real type before accessing it.
8713
8714 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8715
8716         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8717         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8718         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8719         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8720         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8721         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8722         * printcmd.c (info_address_command): Likewise.
8723
8724 2018-05-29  Tom Tromey  <tom@tromey.com>
8725
8726         * windows-nat.c (handle_exception): Update fall-through comment.
8727
8728 2018-05-29  Tom Tromey  <tom@tromey.com>
8729
8730         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8731         (struct program_space) <added_solibs>: Now a std::vector.
8732         * breakpoint.c (print_solib_event): Update.
8733         (check_status_catch_solib): Update.
8734         * progspace.c (clear_program_space_solib_cache): Update.
8735         * solib.c (update_solib_list): Update.
8736
8737 2018-05-29  Tom Tromey  <tom@tromey.com>
8738
8739         * python/py-type.c (typy_richcompare): Update.
8740         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8741         * gdbtypes.h (types_deeply_equal): Return bool.
8742         (types_equal): Likewise.
8743         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8744         declare VEC.
8745         (check_types_equal): Change worklist to std::vector.  Return
8746         bool.
8747         (struct type_equality_entry): Add constructor.
8748         (compare_maybe_null_strings): Return bool.
8749         (check_types_worklist): Return bool.  Change worklist to
8750         std::vector.
8751         (types_deeply_equal): Use std::vector.
8752         (types_equal): Return bool.
8753         (compare_maybe_null_strings): Simplify.
8754
8755 2018-05-29  Tom Tromey  <tom@tromey.com>
8756
8757         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8758
8759 2018-05-29  Tom Tromey  <tom@tromey.com>
8760
8761         * objc-lang.h: Don't include cp-support.h.
8762         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8763         declare VEC.
8764
8765 2018-05-27  Tom Tromey  <tom@tromey.com>
8766
8767         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8768
8769 2018-05-25  Tom Tromey  <tom@tromey.com>
8770
8771         * value.c (value::location): Initialize.
8772
8773 2018-05-25  Tom Tromey  <tom@tromey.com>
8774
8775         * dbxread.c (init_bincl_list): Remove.
8776         (bincl_list): Now a std::vector.
8777         (bincls_allocated, next_bincl): Remove.
8778         (free_bincl_list, do_free_bincl_list_cleanup)
8779         (make_cleanup_free_bincl_list): Remove.
8780         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8781         unique_xmalloc_ptr.
8782         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8783         (struct header_file_location): Add constructor.
8784         (add_bincl_to_list): Remove.
8785
8786 2018-05-25  Tom Tromey  <tom@tromey.com>
8787
8788         * tui/tui.c (tui_enable): Update.
8789         * mi/mi-interp.c (mi_interp::init): Update.
8790         * interps.h (class interp) <name>: New method.
8791         <m_name>: Rename from name.
8792         (~scoped_restore_interp): Update.
8793         * interps.c (interp::interp): Update.
8794         (interp_add, interp_set, interp_lookup_existing)
8795         (current_interp_named_p): Update.
8796
8797 2018-05-25  Tom Tromey  <tom@tromey.com>
8798
8799         * interps.c (interp_name): Remove.
8800         * mi/mi-interp.c (mi_interp::init): Update.
8801         * interps.h (interp_name): Remove.
8802         (~scoped_restore_interp): Update.
8803         * tui/tui.c (tui_enable): Update.
8804
8805 2018-05-25  Tom Tromey  <tom@tromey.com>
8806
8807         * utils.c (fputs_maybe_filtered): Update.
8808         * linespec.c (decode_line_full): Update.
8809         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8810         (mi_print_breakpoint_for_event, mi_solib_loaded)
8811         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8812         (mi_user_selected_context_changed): Update.
8813         * mi/mi-main.c (mi_execute_command): Update.
8814         * cli/cli-script.c (execute_control_command): Update.
8815         * python/python.c (execute_gdb_command): Update.
8816         * solib.c (info_sharedlibrary_command): Update.
8817         * interps.c (interp_ui_out): Remove.
8818         * interps.h (interp_ui_out): Remove.
8819
8820 2018-05-25  Tom Tromey  <tom@tromey.com>
8821
8822         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8823         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8824         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8825
8826 2018-05-25  Tom Tromey  <tom@tromey.com>
8827
8828         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8829         * interps.c (interp_exec): Use scoped_restore.
8830
8831 2018-05-25  Tom Tromey  <tom@tromey.com>
8832
8833         * remote.c (remote_target::remote_file_get): Use
8834         gdb::byte_vector.
8835         (remote_target::remote_file_put): Likewise.
8836
8837 2018-05-25  Tom Tromey  <tom@tromey.com>
8838
8839         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8840         a std::string.
8841         (get_pe_section_index, add_pe_exported_sym): Update.
8842         (read_pe_exported_syms): Use gdb::def_vector.
8843
8844 2018-05-25  Tom Tromey  <tom@tromey.com>
8845
8846         * frame.c (remove_prev_frame): Remove.
8847         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8848
8849 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8850
8851         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8852         Remove prototypes.
8853         * mips-linux-nat.c (supply_fpregset): Always call
8854         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8855         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8856         `mips_fill_fpregset'.
8857         * mips-linux-tdep.c (mips_supply_fpregset)
8858         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8859         (mips_fill_fpregset_wrapper): Remove functions.
8860         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8861         (mips_linux_fpregset): Remove variable.
8862         (mips_linux_iterate_over_regset_sections): Use
8863         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8864         (mips_linux_o32_sigframe_init): Remove comment.
8865
8866 2018-05-25  Pedro Alves  <palves@redhat.com>
8867
8868         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8869         (struct readahead_cache, struct packet_reg, struct
8870         remote_arch_state, class remote_state): Move higher up in the
8871         file.
8872         (remote_target::m_remote_state): Now an object instead of a pointer.
8873         (remote_target::get_remote_state): Adjust.
8874
8875 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8876
8877         * stack.c (select_and_print_frame): Delete.
8878         (struct function_bounds): Move struct within function.
8879         (func_command): Most content moved into new function
8880         find_frame_for_function, use new function, print result, add
8881         function comment.
8882         (find_frame_for_function): New function, now returns a result.
8883
8884 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8885
8886         * stack.c (iterate_over_block_arg_vars): Fix comment.
8887         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8888
8889 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8890
8891         PR gdb/23203
8892         * frame.c
8893         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8894         Define.
8895         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8896         Define.
8897         * frame.h (class scoped_restore_selected_frame): New class.
8898         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8899         of any exception, use scoped_restore_selected_frame to restore the
8900         frame instead.
8901
8902 2018-05-24  Pedro Alves  <palves@redhat.com>
8903
8904         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8905         override.
8906
8907 2018-05-23  Tom Tromey  <tom@tromey.com>
8908
8909         * complaints.c (struct complaints): Remove.
8910         (symfile_complaint_book): Remove.
8911         (series): New global.
8912         (complaint_internal): Update.
8913         (clear_complaints): Update.
8914
8915 2018-05-23  Tom Tromey  <tom@tromey.com>
8916
8917         * complaints.c (counters): New global.
8918         (struct complain): Remove.
8919         (struct complaints) <root>: Remove.
8920         (complaint_sentinel): Remove.
8921         (symfile_complaint_book): Update.
8922         (find_complaint) Remove.
8923         (complaint_internal, clear_complaints): Update.
8924
8925 2018-05-23  Tom Tromey  <tom@tromey.com>
8926
8927         * complaints.c (struct complain) <file, line>: Remove.
8928         (find_complaint): Remove file, line parameters.
8929         (complaint_internal): Update.
8930
8931 2018-05-23  Tom Tromey  <tom@tromey.com>
8932
8933         * complaints.c (vcomplaint): Remove.
8934         (complaint_internal) Merge in contents of vcomplaint.
8935
8936 2018-05-23  Tom Tromey  <tom@tromey.com>
8937
8938         * complaints.c (struct complaints) <explanation>: Remove.
8939         (symfile_explanations): Remove.
8940         (symfile_complaint_book): Update.
8941         (vcomplaint): Update.
8942         (struct explanation): Remove.
8943
8944 2018-05-23  Tom Tromey  <tom@tromey.com>
8945
8946         * complaints.c (symfile_complaints): Remove.
8947         (complaint_internal): Remove "complaints" parameter.
8948         (clear_complaints, vcomplaint): Remove "c" parameter.
8949         (get_complaints): Remove.
8950         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8951         (dwarf2_debug_line_missing_file_complaint)
8952         (dwarf2_debug_line_missing_end_sequence_complaint)
8953         (dwarf2_complex_location_expr_complaint)
8954         (dwarf2_const_value_length_mismatch_complaint)
8955         (dwarf2_section_buffer_overflow_complaint)
8956         (dwarf2_macro_malformed_definition_complaint)
8957         (dwarf2_invalid_attrib_class_complaint)
8958         (create_addrmap_from_index, dw2_symtab_iter_next)
8959         (dw2_expand_marked_cus)
8960         (dw2_debug_names_iterator::find_vec_in_debug_names)
8961         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8962         (create_debug_type_hash_table, init_cutu_and_read_dies)
8963         (partial_die_parent_scope, add_partial_enumeration)
8964         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8965         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8966         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8967         (create_cus_hash_table, create_dwp_hash_table)
8968         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8969         (dwarf2_rnglists_process, dwarf2_ranges_process)
8970         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8971         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8972         (handle_struct_member_die, process_structure_scope)
8973         (read_array_type, read_common_block, read_module_type)
8974         (read_tag_pointer_type, read_typedef, read_base_type)
8975         (read_subrange_type, load_partial_dies, partial_die_info::read)
8976         (partial_die_info::read, partial_die_info::read)
8977         (partial_die_info::read, read_checked_initial_length_and_offset)
8978         (dwarf2_string_attr, read_formatted_entries)
8979         (dwarf_decode_line_header)
8980         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8981         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8982         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8983         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8984         (get_signatured_type, get_DW_AT_signature_type)
8985         (decode_locdesc, file_file_name, consume_improper_spaces)
8986         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8987         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8988         (dwarf2_symbol_mark_computed, set_die_type)
8989         (read_attribute_value): Update.
8990         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8991         Update.
8992         * dbxread.c (unknown_symtype_complaint)
8993         (lbrac_mismatch_complaint, repeated_header_complaint)
8994         (set_namestring, function_outside_compilation_unit_complaint)
8995         (read_dbx_symtab, process_one_symbol): Update.
8996         * gdbtypes.c (stub_noname_complaint): Update.
8997         * windows-nat.c (handle_unload_dll): Update.
8998         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8999         (decode_base_type): Update.
9000         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9001         (eb_complaint, record_include_begin, record_include_end)
9002         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9003         (process_xcoff_symbol, read_symbol)
9004         (function_outside_compilation_unit_complaint)
9005         (scan_xcoff_symtab): Update.
9006         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9007         * buildsym.c (finish_block_internal, make_blockvector)
9008         (end_symtab_get_static_block, augment_type_symtab): Update.
9009         * dtrace-probe.c (dtrace_process_dof)
9010         (dtrace_static_probe_ops::get_probes): Update.
9011         * complaints.h (struct complaint): Don't declare.
9012         (symfile_complaints): Remove.
9013         (complaint_internal): Remove "complaints" parameter.
9014         (complaint): Likewise.
9015         (clear_complaints): Likewise.
9016         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9017         (reread_symbols): Update.
9018         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9019         (dwarf2_frame_cache, decode_frame_entry): Update.
9020         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9021         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9022         (info_selectors_command): Update.
9023         * macrotab.c (macro_include, check_for_redefinition)
9024         (macro_undef): Update.
9025         * objfiles.c (filter_overlapping_sections): Update.
9026         * stabsread.c (invalid_cpp_abbrev_complaint)
9027         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9028         (define_symbol, error_type, read_type, rs6000_builtin_type)
9029         (stabs_method_name_from_physname, read_member_functions)
9030         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9031         (attach_fields_to_type, complain_about_struct_wipeout)
9032         (read_range_type, read_args, common_block_start)
9033         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9034         Update.
9035         * mdebugread.c (index_complaint, unknown_ext_complaint)
9036         (basic_type_complaint, bad_tag_guess_complaint)
9037         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9038         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9039         (parse_procedure, parse_lines)
9040         (function_outside_compilation_unit_complaint)
9041         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9042         (bad_tag_guess_complaint, reg_value_complaint): Update.
9043         * cp-support.c (demangled_name_complaint): Update.
9044         * macroscope.c (sal_macro_scope): Update.
9045         * dwarf-index-write.c (class debug_names): Update.
9046
9047 2018-05-23  Tom Tromey  <tom@tromey.com>
9048
9049         * complaints.c (clear_complaints): Remove "noisy" parameter.
9050         * complaints.h (clear_complaints): Update.
9051         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9052         (reread_symbols): Update.
9053
9054 2018-05-23  Tom Tromey  <tom@tromey.com>
9055
9056         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9057         SUBSEQUENT_MESSAGE.
9058         (vcomplaint, clear_complaints): Update.
9059         (symfile_explanations): Remove some messages.
9060
9061 2018-05-23  Tom Tromey  <tom@tromey.com>
9062
9063         * complaints.c (internal_complaint): Remove.
9064         * complaints.h (internal_complaint): Remove.
9065
9066 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9067
9068         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9069
9070 2018-05-22  Pedro Alves  <palves@redhat.com>
9071
9072         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9073         (remote_fileio_badfd, remote_fileio_return_errno)
9074         (remote_fileio_return_success, remote_fileio_func_open)
9075         (remote_fileio_func_open, remote_fileio_func_close)
9076         (remote_fileio_func_read, remote_fileio_func_write)
9077         (remote_fileio_func_lseek, remote_fileio_func_rename)
9078         (remote_fileio_func_unlink, remote_fileio_func_stat)
9079         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9080         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9081         remote_target parameter.
9082         (remote_fio_func_map) <func>: Add remote_target parameter.
9083         (do_remote_fileio_request, remote_fileio_request):
9084         * remote-fileio.h (remote_fileio_request):
9085         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9086         remote_target parameter.
9087         (remote_notif_process, handle_notification): Adjust to pass down
9088         the remote.
9089         (remote_notif_state_allocate): Add remote_target parameter.  Save
9090         it.
9091         * remote-notif.h (struct remote_target): Forward declare.
9092         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9093         remote_target parameter.
9094         (struct remote_notif_state) <remote>: New field.
9095         (remote_notif_ack, remote_notif_parse): Add remote_target
9096         parameter.
9097         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9098         remote_target parameter.
9099         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9100         (threads_listing_context, rmt_thread_action, protocol_feature)
9101         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9102         (packet_result, struct threads_listing_context, remote_state):
9103         Move definitions and declarations higher up.
9104         (remote_target) <~remote_target>: Declare.
9105         (remote_download_command_source, remote_file_put, remote_file_get)
9106         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9107         (remote_hostio_pread_vFile, remote_hostio_send_command)
9108         (remote_hostio_set_filesystem, remote_hostio_open)
9109         (remote_hostio_close, remote_hostio_unlink, remote_state)
9110         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9111         (get_memory_write_packet_size, get_memory_read_packet_size)
9112         (append_pending_thread_resumptions, remote_detach_1)
9113         (append_resumption, remote_resume_with_vcont)
9114         (add_current_inferior_and_thread, wait_ns, wait_as)
9115         (process_stop_reply, remote_notice_new_inferior)
9116         (process_initial_stop_replies, remote_add_thread)
9117         (btrace_sync_conf, remote_btrace_maybe_reopen)
9118         (remove_new_fork_children, kill_new_fork_children)
9119         (discard_pending_stop_replies, stop_reply_queue_length)
9120         (check_pending_events_prevent_wildcard_vcont)
9121         (discard_pending_stop_replies_in_queue, stop_reply)
9122         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9123         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9124         (remote_interrupt_as, remote_interrupt_ns)
9125         (remote_get_noisy_reply, remote_query_attached)
9126         (remote_add_inferior, remote_current_thread, get_current_thread)
9127         (set_thread, set_general_thread, set_continue_thread)
9128         (set_general_process, write_ptid)
9129         (remote_unpack_thread_info_response, remote_get_threadinfo)
9130         (parse_threadlist_response, remote_get_threadlist)
9131         (remote_threadlist_iterator, remote_get_threads_with_ql)
9132         (remote_get_threads_with_qxfer)
9133         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9134         (get_offsets, remote_check_symbols, remote_supported_packet)
9135         (remote_query_supported, remote_packet_size)
9136         (remote_serial_quit_handler, remote_detach_pid)
9137         (remote_vcont_probe, remote_resume_with_hc)
9138         (send_interrupt_sequence, interrupt_query)
9139         (remote_notif_get_pending_events, fetch_register_using_p)
9140         (send_g_packet, process_g_packet, fetch_registers_using_g)
9141         (store_register_using_P, store_registers_using_G)
9142         (set_remote_traceframe, check_binary_download)
9143         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9144         (remote_xfer_live_readonly_partial, remote_read_bytes)
9145         (remote_send_printf, remote_flash_write, readchar)
9146         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9147         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9148         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9149         (extended_remote_disable_randomization, extended_remote_run)
9150         (send_environment_packet, extended_remote_environment_support)
9151         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9152         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9153         (packet_command): Now methods of ...
9154         (remote_target): ... this class.
9155         (m_remote_state) <remote_target>: New field.
9156         (struct remote_state) <stop_reply_queue,
9157         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9158         fields.
9159         (remote_state::remote_state): Allocate stop_reply_queue.
9160         (remote_state): Delete global.
9161         (get_remote_state_raw): Delete.
9162         (remote_target::get_remote_state): Allocate m_remote_state on
9163         demand.
9164         (get_current_remote_target): New.
9165         (remote_ops, extended_remote_ops): Delete.
9166         (wait_forever_enabled_p, remote_async_inferior_event_token):
9167         Delete, moved to struct remote_state.
9168         (remote_target::close): Delete self.  Destruction bits split to
9169         ...
9170         (remote_target::~remote_target): ... this.
9171         (show_memory_packet_size): Adjust to use
9172         get_current_remote_target.
9173         (struct protocol_feature) <func>: Add remote_target parameter.
9174         All callers adjusted.
9175         (curr_quit_handler_target): New.
9176         (remote_serial_quit_handler): Reimplement.
9177         (remote_target::open_1): Adjust to use get_current_remote_target.
9178         Heap-allocate remote_target/extended_remote_target instances.
9179         (vcont_builder::vcont_builder): Add remote_target parameter, and
9180         save it in m_remote.  All callers adjusted.
9181         (vcont_builder::m_remote): New field.
9182         (vcont_builder::restart, vcont_builder::flush)
9183         (vcont_builder::push_action): Use it.
9184         (remote_target::commit_resume): Use it.
9185         (struct queue_iter_param) <remote>: New field.
9186         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9187         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9188         (check_pending_event_prevents_wildcard_vcont_callback)
9189         (remote_target::check_pending_events_prevent_wildcard_vcont)
9190         (remote_target::discard_pending_stop_replies)
9191         (remote_target::discard_pending_stop_replies_in_queue)
9192         (remote_target::remote_notif_remove_queued_reply): Fill in
9193         'remote' field.
9194         (remote_notif_get_pending_events): New.
9195         (remote_target::readchar, remote_target::remote_serial_write):
9196         Save/restore curr_quit_handler_target.
9197         (putpkt): New.
9198         (kill_new_fork_children): Fill in 'remote' field.
9199         (packet_command): Use get_current_remote_target, defer to
9200         remote_target method of same name.
9201         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9202         parameter, and save it in m_remote.  All callers adjusted.
9203         (scoped_remote_fd::release): Use m_remote.
9204         (scoped_remote_fd::m_remote): New field.
9205         (remote_file_put, remote_file_get, remote_file_delete): Use
9206         get_current_remote_target, defer to remote_target method of same
9207         name.
9208         (remote_btrace_reset): Add remote_state paremeter.  Update all
9209         callers.
9210         (remote_async_inferior_event_handler). Pass down 'data'.
9211         (remote_new_objfile): Use get_current_remote_target.
9212         (remote_target::vcont_r_supported): New.
9213         (set_range_stepping): Use get_current_remote_target and
9214         remote_target::vcont_r_supported.
9215         (_initialize_remote): Don't allocate 'remote_state' and
9216         'stop_reply_queue' globals.
9217         * remote.h (struct remote_target): Forward declare.
9218         (getpkt, putpkt, remote_notif_get_pending_events): Add
9219         'remote_target' parameter.
9220
9221 2018-05-22  Pedro Alves  <palves@redhat.com>
9222
9223         * remote.c (vcont_builder): Now a class.  Make all data members
9224         private.
9225         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9226         Declare methods.
9227         (vcont_builder_restart): Rename to ...
9228         (vcont_builder::restart): ... this.
9229         (vcont_builder_flush): Rename to ...
9230         (vcont_builder::flush): ... this.
9231         (vcont_builder_push_action): Rename to ...
9232         (vcont_builder::push_action): ... this.
9233         (remote_target::commit_resume): Adjust.
9234
9235 2018-05-22  Pedro Alves  <palves@redhat.com>
9236
9237         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9238         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9239         (get_fixed_memory_packet_size): New.
9240         (get_memory_packet_size): Use it.
9241         (set_memory_packet_size): Don't override the config size with
9242         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9243         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9244         Don't refer to get_memory_packet_size if not connected to a remote
9245         target.  Show "(default)" if configured size is 0.
9246
9247 2018-05-22  Pedro Alves  <palves@redhat.com>
9248
9249         * remote.c (remote_target::mourn_inferior): Move
9250         discard_pending_stop_replies call here from ...
9251         (_initialize_remote): ... here.
9252
9253 2018-05-22  Pedro Alves  <palves@redhat.com>
9254
9255         * remote.c (compare_section_command): Remove set_general_process
9256         call.
9257
9258 2018-05-22  Pedro Alves  <palves@redhat.com>
9259
9260         * remote.c (struct packet_reg, struct remote_arch_state):
9261         Move higher up in the file.
9262         (remote_state) <m_arch_states>: Store remote_arch_state values
9263         instead of remote_arch_state pointers.
9264         (remote_state::get_remote_arch_state): Adjust.
9265
9266 2018-05-22  Pedro Alves  <palves@redhat.com>
9267
9268         * remote.c: Include <unordered_map>.
9269         (remote_state): Now a class.
9270         (remote_state) <get_remote_arch_state>: Declare method.
9271         <get_remote_arch_state>: New field.
9272         (remote_arch_state) <remote_arch_state>: Declare ctor.
9273         <regs>: Now a unique_ptr.
9274         (remote_gdbarch_data_handle): Delete.
9275         (get_remote_arch_state): Delete.
9276         (remote_state::get_remote_arch_state): New.
9277         (get_remote_state): Adjust to call remote_state's
9278         get_remote_arch_state method.
9279         (init_remote_state): Delete, bits factored out to ...
9280         (remote_arch_state::remote_arch_state): ... this new method.
9281         (get_remote_packet_size, get_memory_packet_size)
9282         (process_g_packet, remote_target::fetch_registers)
9283         (remote_target::prepare_to_store, store_registers_using_G)
9284         (remote_target::store_registers, remote_target::get_trace_status):
9285         Adjust to call remote_state's method.
9286         (_initialize_remote): Remove reference to
9287         remote_gdbarch_data_handle.
9288
9289 2018-05-22  Pedro Alves  <palves@redhat.com>
9290
9291         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9292         pread>: New method declarations.
9293         (remote_target::open_1): Adjust.
9294         (readahead_cache_invalidate): Rename to ...
9295         (readahead_cache::invalidate): ... this, and adjust to be a class
9296         method.
9297         (readahead_cache_invalidate_fd): Rename to ...
9298         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9299         class method.
9300         (remote_hostio_pwrite): Adjust.
9301         (remote_hostio_pread_from_cache): Rename to ...
9302         (readahead_cache::pread): ... this, and adjust to be a class
9303         method.
9304         (remote_hostio_close): Adjust.
9305
9306 2018-05-22  Pedro Alves  <palves@redhat.com>
9307
9308         * remote.c (remote_hostio_close_cleanup): Delete.
9309         (class scoped_remote_fd): New.
9310         (remote_file_put, remote_file_get): Use it.
9311
9312 2018-05-22  Pedro Alves  <palves@redhat.com>
9313
9314         (struct vCont_action_support): Use bool and initialize all fields.
9315         (struct readahead_cache): Initialize all fields.
9316         (remote_state): Use bool and initialize all fields.
9317         (remote_state::remote_state, remote_state::~remote_state): New.
9318         (new_remote_state): Delete.
9319         (_initialize_remote): Use new to allocate remote_state.
9320
9321 2018-05-22  Pedro Alves  <palves@redhat.com>
9322             張俊芝  <zjz@zjz.name>
9323
9324         PR gdb/22973
9325         * c-exp.y: Include "c-support.h".
9326         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9327         of tolower.  Use c_ident_is_alpha to scan names.
9328         * c-lang.c: Include "c-support.h".
9329         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9330         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9331         * c-support.h: New file, with bits factored out from ...
9332         * cp-name-parser.y: ... this file.
9333         Include "c-support.h".
9334         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9335         c-support.h and renamed.
9336         (symbol_end, yylex): Adjust.
9337
9338 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9339
9340         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9341         parameter type to CORE_ADDR.
9342         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9343         parameter type in declaration to CORE_ADDR.
9344         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9345         target_auxv_search to get AT_HWCAP and use the result to get the
9346         target description.
9347         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9348         to CORE_ADDR. Remove the cast of the return value to unsigned
9349         long. Fix error predicate of target_auxv_search.
9350         (ppc_linux_nat_target::read_description): Change the type of the
9351         hwcap variable to CORE_ADDR.
9352
9353 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9354
9355         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9356         if the size of fpscr is larger than 32 bits.
9357
9358 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9359
9360         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9361         (ppc32_linux_vsxregmap): New global.
9362         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9363         regcache_supply_regset, and regcache_collect_regset.
9364         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9365         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9366         (fetch_vsx_register, store_vsx_register): Remove.
9367         (fetch_vsx_registers): Add regno parameter. Get regset using
9368         ppc_linux_vsxregset. Use regset to supply registers.
9369         (store_vsx_registers): Add regno parameter. Get regset using
9370         ppc_linux_vsxregset. Use regset to collect registers.
9371         (fetch_register): Call fetch_vsx_registers instead of
9372         fetch_vsx_register.
9373         (store_register): Call store_vsx_registers instead of
9374         store_vsx_register.
9375         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9376         new regno parameter.
9377         (store_ppc_registers): Call store_vsx_registers with -1 for the
9378         new regno parameter.
9379         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9380         (ppc_collect_vsxregset): Remove.
9381
9382 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9383
9384         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9385         offset fields.
9386         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9387         for vector register offset fields.
9388         (ppc64_fbsd_reg_offsets): Likewise.
9389         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9390         to vector register offset fields.
9391         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9392         to vector register offset fields.
9393         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9394         vector register offset fields.
9395         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9396         initializers for vector register offset fields.
9397         (rs6000_aix64_reg_offsets): Likewise.
9398         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9399         (ppc_supply_vrregset): Remove.
9400         (ppc_collect_vrregset): Remove.
9401         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9402         (ppc_linux_vrregset) : New function.
9403         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9404         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9405         (ppc32_linux_vrregset): Remove.
9406         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9407         and use result instead of ppc32_linux_vrregset.
9408         (ppc32_linux_reg_offsets): Remove initializers for vector register
9409         offset fields.
9410         (ppc64_linux_reg_offsets): Likewise.
9411         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9412         * ppc-linux-nat.c: Include regset.h.
9413         (gdb_vrregset_t): Adjust comment to account for little-endian
9414         mode.
9415         (supply_vrregset, fill_vrregset): Remove.
9416         (fetch_altivec_register, store_altivec_register): Remove.
9417         (fetch_altivec_registers): Add regno parameter. Get regset using
9418         ppc_linux_vrregset. Use regset to supply registers.
9419         (store_altivec_registers): Add regno parameter. Get regset using
9420         ppc_linux_vrregset. Use regset to collect registers.
9421         (fetch_register): Call fetch_altivec_registers instead of
9422         fetch_altivec_register.
9423         (store_register): Call store_altivec_registers instead of
9424         store_altivec_register.
9425         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9426         the new regno parameter.
9427         (store_ppc_registers): Call store_altivec_registers with -1 for
9428         the new regno parameter.
9429
9430 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9431
9432         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9433         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9434         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9435         (gdb_vrregset_t): Change array type size to
9436         PPC_LINUX_SIZEOF_VRREGSET.
9437         (gdb_vsxregset_t): Change array type size to
9438         PPC_LINUX_SIZEOF_VSXREGSET.
9439         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9440         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9441         PPC_LINUX_SIZEOF_VSXREGSET.
9442
9443 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9444
9445         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9446         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9447         nat/ppc-linux.c.
9448         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9449         ppc_linux_target_wordsize with tid.
9450         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9451         wordsize with tid.
9452         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9453         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9454         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9455         tid parameter. Remove static specifier.
9456         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9457         (ppc_linux_target_wordsize): New declaration.
9458
9459 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9460
9461         * arch/ppc-linux-common.c: New file.
9462         * arch/ppc-linux-common.h: New file.
9463         * arch/ppc-linux-tdesc.h: New file.
9464         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9465         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9466         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9467         arch/ppc-linux-tdesc.h.
9468         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9469         arch/ppc-linux-tdesc.h.
9470         (ppc_linux_nat_target::read_description): Remove target
9471         description matching code. Fill a ppc_linux_features struct and
9472         call ppc_linux_match_description with it. Move comment about ISA
9473         2.05 to ppc-linux-common.c.
9474         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9475         arch/ppc-linux-tdesc.h.
9476         (ppc_linux_core_read_description): Remove target description
9477         matching code. Fill a ppc_linux_features struct and call
9478         ppc_linux_match_description with it.
9479         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9480         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9481         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9482         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9483         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9484         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9485         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9486         (tdesc_powerpc_e500l): Remove.
9487
9488 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9489
9490         * ada-lang.c (catch_assert_command): Pass empty string instead
9491         of NULL for excep_string argument.
9492
9493 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9494
9495         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9496         the width of the requested register exceeds the width of the
9497         `ptrace' data type.
9498
9499 2018-05-21  Tom Tromey  <tom@tromey.com>
9500
9501         * printcmd.c (output_command): Remove.
9502         (output_command_const): Rename to output_command.
9503         * valprint.h (output_command): Rename from output_command_const.
9504         * tracepoint.c (trace_dump_actions): Call output_command.
9505
9506 2018-05-21  Tom Tromey  <tom@tromey.com>
9507
9508         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9509         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9510         * ada-lang.h (create_ada_exception_catchpoint): Update.
9511         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9512         std::string.
9513         (create_excep_cond_exprs, ~ada_catchpoint)
9514         (should_stop_exception, print_one_exception)
9515         (print_mention_exception, print_recreate_exception): Update.
9516         (ada_get_next_arg): Remove.
9517         (catch_ada_exception_command_split): Use std::string.  Change type
9518         of "excep_string", "cond_string".
9519         (catch_ada_exception_command): Update.
9520         (create_ada_exception_catchpoint): Change type of excep_string.
9521         (ada_exception_sal): Remove excep_string parameter.
9522         (~ada_catchpoint): Remove.
9523
9524 2018-05-21  Tom Tromey  <tom@tromey.com>
9525
9526         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9527         cleanup.
9528
9529 2018-05-21  Tom Tromey  <tom@tromey.com>
9530
9531         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9532         Return unique_xmalloc_ptr.
9533         (print_it_exception): Update.
9534
9535 2018-05-21  Tom Tromey  <tom@tromey.com>
9536
9537         * tracepoint.c (trace_dump_actions): Use std::string.
9538
9539 2018-05-21  Tom Tromey  <tom@tromey.com>
9540
9541         * symfile.c (reread_symbols): Use std::string for original_name.
9542
9543 2018-05-21  Tom Tromey  <tom@tromey.com>
9544
9545         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9546         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9547         constructor.
9548
9549 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9550
9551         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9552         instance to...
9553         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9554         * objfiles.c (get_objfile_bfd_data): Allocate
9555         objfile_per_bfd_storage with obstack_new when allocating on
9556         obstack.
9557
9558 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9559
9560         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9561         OBSTACK_ZALLOC.
9562         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9563         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9564         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9565         (add_pending): Likewise.
9566         (parse_symbol): Likewise.
9567         (parse_partial_symbols): Likewise.
9568         (psymtab_to_symtab_1): Likewise.
9569         (new_psymtab): Likewise.
9570         (elfmdebug_build_psymtabs): Likewise.
9571         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9572         * objfiles.c (get_objfile_bfd_data): Likewise.
9573         (objfile_register_static_link): Likewise.
9574         * psymtab.c (allocate_psymtab): Likewise.
9575         * stabsread.c (read_member_functions): Likewise.
9576         * xcoffread.c (xcoff_end_psymtab): Likewise.
9577
9578 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9579
9580         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9581         compiler supports std::is_trivially_constructible.
9582         * common/poison.h: Include obstack.h.
9583         (IsMallocable): Define to is_trivially_constructible if the
9584         compiler supports it, define to true_type otherwise.
9585         (xobnew): New.
9586         (XOBNEW): Redefine.
9587         (xobnewvec): New.
9588         (XOBNEWVEC): Redefine.
9589         * gdb_obstack.h (obstack_zalloc): New.
9590         (OBSTACK_ZALLOC): Redefine.
9591         (obstack_calloc): New.
9592         (OBSTACK_CALLOC): Redefine.
9593         (obstack_new): New.
9594         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9595         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9596         gdbarch.c.
9597         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9598         obstack_calloc/obstack_zalloc.
9599         (gdbarch_obstack_zalloc): Remove.
9600         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9601
9602 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9603
9604         * stack.c (backtrace_command_1): Remove useless variable int i.
9605
9606 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9607
9608         * stack.c (print_frame_info): Fix comment.
9609
9610 2018-05-18  Tom Tromey  <tom@tromey.com>
9611
9612         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9613         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9614         (~dwarf2_per_objfile): Update
9615         (dwarf2_get_dwz_file): Use new.
9616         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9617         unique_ptr.
9618
9619 2018-05-18  Tom Tromey  <tom@tromey.com>
9620
9621         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9622         unique_ptr.
9623         * dwarf2read.c (struct dwp_file): Add constructor and
9624         initializers.
9625         (open_and_init_dwp_file): Return a unique_ptr.
9626         (dwarf2_per_objfile, create_dwp_hash_table)
9627         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9628         (lookup_dwo_unit_in_dwp): Update.
9629         (open_and_init_dwp_file, get_dwp_file): Update.
9630
9631 2018-05-18  Tom Tromey  <tom@tromey.com>
9632
9633         * dwarf2read.c (dwarf2_per_objfile): Update.
9634         (struct mapped_index): Add initializers.
9635         (dwarf2_read_index): Use new.
9636         (dw2_symtab_iter_init): Update.
9637         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9638         unique_ptr.
9639
9640 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9641
9642         * dwarf2read.c (mapped_index) <total_size>: Remove.
9643
9644 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9645
9646         * unittests/format_pieces-selftests.c (test_format_specifier):
9647         Add ARI comments.
9648
9649 2018-05-18  Tom Tromey  <tom@tromey.com>
9650
9651         * c-typeprint.c (maybe_print_hole): New function.
9652         (c_print_type_struct_field_offset): Update.
9653         (c_type_print_base_struct_union): Call maybe_print_hole.
9654
9655 2018-05-17  Keith Seitz  <keiths@redhat.com>
9656
9657         * breakpoint.c (build_bpstat_chain): New function, moved from
9658         bpstat_stop_status.
9659         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9660         If no stop chain is passed, call build_bpstat_chain to build it.
9661         * breakpoint.h (build_bpstat_chain): Declare.
9662         (bpstat_stop_status): Move documentation here from breakpoint.c.
9663         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9664         build the stop chain and pass it to skip_inline_frames.
9665         Pass this stop chain to bpstat_stop_status.
9666         * inline-frame.c: Include breakpoint.h.
9667         (stopped_by_user_bp_inline_frame): New function.
9668         (skip_inline_frames): Add parameter `stop_chain'.
9669         Move documention to inline-frame.h.
9670         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9671         whether the frame should be elided.
9672         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9673         Add moved documentation and update for new parameter.
9674
9675 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9676
9677         PR cli/14975
9678         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9679         unittests/format_pieces-selftests.c.
9680         * common/format.h (format_piece) <operator==>: New.
9681         (format_pieces) <operator[]>: Remove.
9682         * common/format.c (format_pieces::format_pieces): Handle \e.
9683         * unittests/format_pieces-selftests.c: New.
9684
9685 2018-05-17  Tom Tromey  <tom@tromey.com>
9686
9687         PR symtab/23010:
9688         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9689         (dw2_instantiate_symtab): Add skip_partial parameter.
9690         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9691         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9692         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9693         (dw2_expand_symtabs_matching_one)
9694         (dw2_find_pc_sect_compunit_symtab)
9695         (dw2_debug_names_lookup_symbol)
9696         (dw2_debug_names_expand_symtabs_for_function): Update.
9697         (init_cutu_and_read_dies): Add skip_partial parameter.
9698         (process_psymtab_comp_unit, build_type_psymtabs_1)
9699         (process_skeletonless_type_unit, load_partial_comp_unit)
9700         (psymtab_to_symtab_1): Update.
9701         (load_full_comp_unit): Add skip_partial parameter.
9702         (process_imported_unit_die, dwarf2_read_addr_index)
9703         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9704         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9705         (read_signatured_type): Update.
9706
9707 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9708
9709         * value.c (release_value): Remove unused variable.
9710         (record_latest_value): Likewise.
9711         (access_value_history): Likewise.
9712         (preserve_values): Likewise.
9713
9714 2018-05-17  Tom Tromey  <tom@tromey.com>
9715
9716         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9717         Initialize.
9718
9719 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9720
9721         PR gdb/22286
9722         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9723         Also handle registers whose width is not a multiple of
9724         PTRACE_TYPE_RET.
9725         (linux_nat_trad_target::store_register): Likewise.
9726
9727 2018-05-16  Tom Tromey  <tom@tromey.com>
9728
9729         * gdbcore.h (core_bfd): Redefine.
9730         * corelow.c (core_target::close): Update.
9731         (core_target_open): Update.
9732         * progspace.h (struct program_space) <cbfd>: Now a
9733         gdb_bfd_ref_ptr.
9734
9735 2018-05-16  Tom Tromey  <tom@tromey.com>
9736
9737         PR cli/19551:
9738         * symfile-add-flags.h (enum symfile_add_flags)
9739         <SYMFILE_NOT_FILENAME>: New constant.
9740         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9741         objfile name from BFD.
9742         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9743         * minidebug.c (find_separate_debug_file_in_section): Put
9744         ".gnu_debugdata" into BFD's file name.
9745
9746 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9747
9748         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9749         Remove.
9750
9751 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9752
9753         PR binutils/21446
9754         * aarch64-tdep.c (aarch64_analyze_prologue,
9755         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9756         Indicate not interested in errors.
9757
9758 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9759
9760         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9761         Supply the MIPS_ZERO_REGNUM register.
9762
9763 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9764
9765         * mips-tdep.c (mask_address_var): Make variable static.
9766
9767 2018-05-14  Tom Tromey  <tom@tromey.com>
9768
9769         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9770
9771 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9772
9773         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9774         FXSAVE_ADDR for the mxcsr register.
9775
9776 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9777
9778         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9779
9780 2018-05-11  Pedro Alves  <palves@redhat.com>
9781
9782         * corelow.c (core_target) <core_target>: No longer inline.
9783         Initialize m_core_gdbarch, m_core_vec and build the section table
9784         here.
9785         <~core_target>: New.
9786         <core_gdbarch, get_core_register_section>: New methods.
9787         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9788         factored out from ...
9789         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9790         (core_ops): Delete.
9791         (sniff_core_bfd): Add gdbarch parameter.
9792         (core_close): Delete, merged into ...
9793         (core_target::close): ... here.  Delete self.
9794         (core_close_cleanup): Delete.
9795         (core_target_open): Allocate a core_target on the heap.  Use a
9796         unique_ptr instead of a cleanup.  Bits moved into the core_target
9797         ctor.  Adjust to use core_target methods instead of globals.
9798         (get_core_register_section): Rename to ...
9799         (core_target::get_core_register_section): ... this and adjust.
9800         (struct get_core_registers_cb_data): New.
9801         (get_core_registers_cb): Use it.  Use bool.
9802         (core_target::fetch_registers, core_target::files_info)
9803         (core_target::xfer_partial, core_target::read_description)
9804         (core_target::pid_to, core_target::thread_name): Adjust to
9805         reference class fields instead of globals.
9806         * target.h (struct target_ops_deleter, target_ops_up): New.
9807
9808 2018-05-11  Pedro Alves  <palves@redhat.com>
9809
9810         * corefile.c (core_file_command): Move to corelow.c.
9811         * corelow.c (the_core_target): Delete.
9812         (core_file_command): Moved from corefile.c.  Check exec_bfd
9813         instead of the_core_target.  Use target_detach instead of calling
9814         into the_core_target directly.
9815         (maybe_say_no_core_file_now): New.
9816         (core_target::detach): Use it.
9817         (_initialize_corelow): Remove references to the_core_target.
9818         * gdbcore.h (the_core_target): Delete.
9819
9820 2018-05-11  Tom Tromey  <tromey@redhat.com>
9821             Pedro Alves  <palves@redhat.com>
9822
9823         * corefile.c (core_bfd): Remove.
9824         * gdbcore.h (core_bfd): Now a macro.
9825         * progspace.h (struct program_space) <cbfd>: New field.
9826
9827 2018-05-11  Tom Tromey  <tom@tromey.com>
9828
9829         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9830         gdb::def_vector.
9831
9832 2018-05-10  Tom Tromey  <tom@tromey.com>
9833
9834         * configure: Rebuild.
9835         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9836
9837 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9838
9839         PR server/23158:
9840         * regformats/regdat.sh: Adjust script, following the addition
9841         of the new expedite_regs parameter to init_target_desc.
9842
9843 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9844     
9845         PR gdb/23127
9846         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9847         set_gdbarch_significant_addr_bit.
9848         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9849         set_gdbarch_significant_addr_bit.
9850         * utils.c (address_significant): Update to sign extend addr.
9851
9852 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9853
9854         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9855         (xtensa_linux_init_abi): Limit tdep->num_regs by
9856         tdep->num_nopriv_regs.
9857         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9858         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9859         not initialized.
9860
9861 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9862
9863         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9864
9865 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9866
9867         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9868         (I387_MXCSR_INIT_VAL): New constant.
9869         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9870         buffer if it was supplied by the inferior.
9871         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9872         (i387_xsave_get_clear_bv): New function.
9873         (i387_supply_xsave): Only read x87 control registers from the
9874         xsave buffer if the feature is enabled, and the state will have
9875         been written, otherwise, provide a suitable default.
9876         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9877         including x87 control registers.  Update control registers if they
9878         have changed from the default value, and mark features as enabled
9879         as required.
9880         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9881
9882 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9883
9884         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9885
9886 2018-05-07  Tom Tromey  <tom@tromey.com>
9887
9888         * configure: Rebuild.
9889         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9890
9891 2018-05-07  Tom Tromey  <tom@tromey.com>
9892
9893         PR tdep/20362:
9894         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9895         bit.  Use correct value for VDIV.
9896
9897 2018-05-04  Tom Tromey  <tom@tromey.com>
9898
9899         * configure: Rebuild.
9900         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9901
9902 2018-05-04  Tom Tromey  <tom@tromey.com>
9903
9904         * linux-record.c (record_linux_system_call) <case
9905         RECORD_SYS_RECVFROM>: Add "break".
9906
9907 2018-05-04  Tom Tromey  <tom@tromey.com>
9908
9909         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9910         Add missing "break".
9911         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9912         Add missing "break".
9913
9914 2018-05-04  Tom Tromey  <tom@tromey.com>
9915
9916         * rs6000-tdep.c (ppc_process_record_op4)
9917         (ppc_process_record_op63): Add fall-through comment.
9918
9919 2018-05-04  Tom Tromey  <tom@tromey.com>
9920
9921         * i386-tdep.c (i386_process_record): Add fall-through comment.
9922
9923 2018-05-04  Tom Tromey  <tom@tromey.com>
9924
9925         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9926         comment.
9927
9928 2018-05-04  Tom Tromey  <tom@tromey.com>
9929
9930         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9931         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9932         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9933         comment.
9934         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9935         comment.
9936         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9937         comment.
9938
9939 2018-05-04  Tom Tromey  <tom@tromey.com>
9940
9941         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9942
9943 2018-05-04  Tom Tromey  <tom@tromey.com>
9944
9945         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9946         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9947         * symfile.c (section_is_mapped): Fix fall-through comment.
9948         * stabsread.c (define_symbol, read_member_functions): Fix
9949         fall-through comment.
9950         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9951         comment.
9952         * remote.c (remote_wait_as): Fix fall-through comment.
9953         * p-exp.y (yylex): Fix fall-through comment.
9954         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9955         comment.
9956         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9957         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9958         * jv-exp.y (yylex): Fix fall-through comment.
9959         * go-exp.y (lex_one_token): Fix fall-through comment.
9960         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9961         fall-through comment.
9962         * f-exp.y (yylex): Fix fall-through comment.
9963         * dwarf2read.c (process_die): Fix fall-through comments.
9964         * dbxread.c (process_one_symbol): Fix fall-through comment.
9965         * d-exp.y (lex_one_token): Fix fall-through comment.
9966         * cp-name-parser.y (yylex): Fix fall-through comment.
9967         * coffread.c (coff_symtab_read): Fix fall-through comment.
9968         * c-exp.y (lex_one_token): Fix fall-through comment.
9969         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9970         comment.
9971         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9972         comment.
9973
9974 2018-05-04  Tom Tromey  <tom@tromey.com>
9975
9976         PR python/22730:
9977         * NEWS: Mention gdb.execute change.
9978         * gdbcmd.h (execute_control_command): Don't declare.
9979         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9980         execute_control_commands, execute_control_commands_to_string.
9981         * cli/cli-script.h (execute_control_commands)
9982         (execute_control_commands_to_string): Declare.
9983         (execute_control_command): Add from_tty parameter.
9984         * cli/cli-script.c (execute_control_commands)
9985         (execute_control_commands_to_string): New functions.
9986         (execute_user_command): Use execute_control_commands.
9987         (execute_control_command_1): Add "from_tty" parameter.  Update.
9988         (execute_control_command): Likewise.
9989
9990 2018-05-04  Tom Tromey  <tom@tromey.com>
9991
9992         PR python/22731:
9993         * NEWS: Mention that breakpoint commands are writable.
9994         * python/py-breakpoint.c (bppy_set_commands): New function.
9995         (breakpoint_object_getset) <"commands">: Use it.
9996
9997 2018-05-04  Tom Tromey  <tom@tromey.com>
9998
9999         * tracepoint.c (actions_command): Update.
10000         * mi/mi-cmd-break.c (mi_command_line_array)
10001         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10002         (mi_read_next_line): Remove.
10003         (mi_cmd_break_commands): Update.
10004         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10005         function_view.
10006         * cli/cli-script.c (get_command_line): Update.
10007         (process_next_line): Use function_view.  Constify.
10008         (recurse_read_control_structure, read_command_lines)
10009         (read_command_lines_1): Change argument types to function_view.
10010         (do_define_command, document_command): Update.
10011         * breakpoint.h (check_tracepoint_command): Don't declare.
10012         * breakpoint.c (check_tracepoint_command): Remove.
10013         (commands_command_1, create_tracepoint_from_upload): Update.
10014
10015 2018-05-04  Tom Tromey  <tom@tromey.com>
10016
10017         PR gdb/11750:
10018         * cli/cli-script.h (enum command_control_type) <define_control>:
10019         New constant.
10020         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10021         (build_command_line, execute_control_command_1)
10022         (process_next_line): Likewise.
10023         (do_define_command): New function, extracted from define_command.
10024         (define_command): Use it.
10025
10026 2018-05-04  Tom Tromey  <tom@tromey.com>
10027
10028         * tracepoint.c (actions_command): Update.
10029         * cli/cli-script.h (read_command_lines): Update.
10030         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10031         (MAX_TMPBUF): Remove define.
10032         (define_command): Use string_printf.
10033         (document_command): Likewise.
10034         * breakpoint.c (commands_command_1): Update.
10035
10036 2018-05-04  Tom Tromey  <tom@tromey.com>
10037
10038         * top.c (execute_command): Update.
10039         * cli/cli-script.h (print_command_lines): Now varargs.
10040         * cli/cli-script.c (print_command_lines): Now varargs.
10041         (execute_control_command_1) <case while_control, case if_control>:
10042         Update.
10043
10044 2018-05-04  Tom Tromey  <tom@tromey.com>
10045
10046         * tracepoint.c (all_tracepoint_actions): Rename from
10047         all_tracepoint_actions_and_cleanup.  Change return type.
10048         (actions_command, encode_actions_1, encode_actions)
10049         (trace_dump_actions, tdump_command): Update.
10050         * remote.c (remote_download_command_source): Update.
10051         * python/python.c (gdbpy_eval_from_control_command)
10052         (python_command, python_interactive_command): Update.
10053         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10054         * guile/guile.c (guile_command)
10055         (gdbscm_eval_from_control_command, guile_command): Update.
10056         * compile/compile.c (compile_code_command)
10057         (compile_print_command, compile_to_object): Update.
10058         * cli/cli-script.h (struct command_lines_deleter): New.
10059         (counted_command_line): New typedef.
10060         (struct command_line): Add constructor, destructor.
10061         <body_list>: Remove.
10062         <body_list_0, body_list_1>: New members.
10063         (command_line_up): Remove typedef.
10064         (read_command_lines, read_command_lines_1, get_command_line):
10065         Update.
10066         (copy_command_lines): Don't declare.
10067         * cli/cli-script.c (build_command_line): Use "new".
10068         (get_command_line): Return counted_command_line.
10069         (print_command_lines, execute_user_command)
10070         (execute_control_command_1, while_command, if_command): Update.
10071         (realloc_body_list): Remove.
10072         (process_next_line, recurse_read_control_structure): Update.
10073         (read_command_lines, read_command_lines_1): Return counted_command_line.
10074         (free_command_lines): Use "delete".
10075         (copy_command_lines): Remove.
10076         (define_command, document_command, show_user_1): Update.
10077         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10078         a counted_command_line.
10079         * breakpoint.h (counted_command_line): Remove typedef.
10080         (breakpoint_set_commands): Update.
10081         * breakpoint.c (check_no_tracepoint_commands)
10082         (validate_commands_for_breakpoint): Update.
10083         (breakpoint_set_commands): Change commands to be a
10084         counted_command_line.
10085         (commands_command_1, update_dprintf_command_list)
10086         (create_tracepoint_from_upload): Update.
10087
10088 2018-05-04  Tom Tromey  <tom@tromey.com>
10089
10090         * cli/cli-decode.h (cmd_list_element): New constructor.
10091         (~cmd_list_element): New destructor.
10092         (struct cmd_list_element): Add initializers.
10093         * cli/cli-decode.c (do_add_cmd): Use "new".
10094         (delete_cmd): Use "delete".
10095
10096 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10097             Pedro Alves <palves@redhat.com>
10098
10099         PR breakpoints/19806 and support for PR external/20207.
10100         * NEWS: Mention Aarch64 watchpoint improvements.
10101         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10102         watchpoints and PR external/20207 watchpoints.
10103         * nat/aarch64-linux-hw-point.c
10104         (kernel_supports_any_contiguous_range): New.
10105         (aarch64_watchpoint_offset): New.
10106         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10107         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10108         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10109         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10110         next_addr_orig_p.  Support PR external/20207 watchpoints.
10111         (aarch64_downgrade_regs): New.
10112         (aarch64_dr_state_insert_one_point): New parameters offset and
10113         addr_orig.
10114         (aarch64_dr_state_remove_one_point): Likewise.
10115         (aarch64_handle_breakpoint): Update caller.
10116         (aarch64_handle_aligned_watchpoint): Likewise.
10117         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10118         aligned_offset.
10119         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10120         aarch64_downgrade_regs.
10121         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10122         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10123         (DR_CONTROL_MASK): ... this.
10124         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10125         (unsigned int aarch64_watchpoint_offset): New prototype.
10126         (aarch64_linux_set_debug_regs): Remove const from state.
10127         * utils.c (align_up, align_down): Move to ...
10128         * common/common-utils.c (align_up, align_down): ... here.
10129         * utils.h (align_up, align_down): Move to ...
10130         * common/common-utils.h (align_up, align_down): ... here.
10131
10132 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10133
10134         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10135         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10136         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10137         Re-implement to match the ABI as summarized in GCC's
10138         gcc/config/sparc/sparc.c.  All callers updated.
10139         (sparc32_store_arguments): Remove assertion.
10140
10141 2018-05-04  Tom Tromey  <tom@tromey.com>
10142
10143         * printcmd.c: Don't include tui.h.
10144         (decode_format): Use skip_spaces.
10145
10146 2018-05-04  Tom Tromey  <tom@tromey.com>
10147
10148         PR gdb/22619:
10149         * printcmd.c (last_count): New global.
10150         (x_command): Use saved count when repeating.
10151
10152 2018-05-04  Tom Tromey  <tom@tromey.com>
10153
10154         * nto-procfs.c (do_closedir_cleanup): Remove.
10155         (procfs_pidlist): Use gdb_dir_up.
10156         * procfs.c (do_closedir_cleanup): Remove.
10157         (proc_update_threads): Use gdb_dir_up.
10158         * common/filestuff.h (struct gdb_dir_deleter): New.
10159         (gdb_dir_up): New typedef.
10160
10161 2018-05-04  Tom Tromey  <tom@tromey.com>
10162
10163         * ada-lang.c (print_mention_exception): Use std::string.
10164
10165 2018-05-04  Tom Tromey  <tom@tromey.com>
10166
10167         * ada-lang.c (create_excep_cond_exprs): Update.
10168         (ada_exception_catchpoint_cond_string): Use std::string.
10169
10170 2018-05-04  Tom Tromey  <tom@tromey.com>
10171
10172         * ada-lang.c (xget_renaming_scope): Return std::string.
10173         (old_renaming_is_invisible): Update.
10174
10175 2018-05-04  Tom Tromey  <tom@tromey.com>
10176
10177         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10178         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10179
10180 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10181
10182         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10183
10184 2018-05-04  Tom Tromey  <tom@tromey.com>
10185
10186         * remote.c (remote_query_supported_append): Change type.
10187         (remote_check_symbols): Update.
10188
10189 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10190
10191         PR gdb/11420
10192         * configure.ac: Prepend libpython.
10193         * python/python-config.py: Likewise.
10194         * configure: Regenerate.
10195
10196 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10197
10198         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10199
10200 2018-05-03  Pedro Alves  <palves@redhat.com>
10201
10202         * s390-linux-nat.c
10203         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10204         override.  Write 'true' instead of '1'.
10205         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10206         declaration.
10207
10208 2018-05-02  Pedro Alves  <palves@redhat.com>
10209
10210         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10211         add_inf_child_target.
10212         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10213         add_inf_child_target.
10214         * aix-thread.c (aix_thread_target_info): New.
10215         (aix_thread_target) <shortname, longname, doc>: Delete.
10216         <info>: New.
10217         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10218         add_inf_child_target.
10219         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10220         add_inf_child_target.
10221         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10222         add_inf_child_target.
10223         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10224         add_inf_child_target.
10225         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10226         add_inf_child_target.
10227         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10228         add_inf_child_target.
10229         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10230         add_inf_child_target.
10231         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10232         add_inf_child_target.
10233         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10234         add_inf_child_target.
10235         * bfd-target.c (target_bfd_target_info): New.
10236         (target_bfd) <shortname, longname, doc>: Delete.
10237         <info>: New.
10238         * bsd-kvm.c (bsd_kvm_target_info): New.
10239         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10240         <info>: New.
10241         (bsd_kvm_target::open): Rename to ...
10242         (bsd_kvm_target_open): ... this.  Adjust.
10243         * bsd-uthread.c (bsd_uthread_target_info): New.
10244         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10245         <info>: New.
10246         * corefile.c (core_file_command): Adjust.
10247         * corelow.c (core_target_info): New.
10248         (core_target) <shortname, longname, doc>: Delete.
10249         <info>: New.
10250         (core_target::open): Rename to ...
10251         (core_target_open): ... this.  Adjust.
10252         * ctf.c (ctf_target_info): New.
10253         (ctf_target) <shortname, longname, doc>: Delete.
10254         <info>: New.
10255         (ctf_target::open): Rename to ...
10256         (ctf_target_open): ... this.
10257         (_initialize_ctf): Adjust.
10258         * exec.c (exec_target_info): New.
10259         (exec_target) <shortname, longname, doc>: Delete.
10260         <info>: New.
10261         (exec_target::open): Rename to ...
10262         (exec_target_open): ... this.
10263         * gdbcore.h (core_target_open): Declare.
10264         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10265         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10266         add_inf_child_target.
10267         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10268         add_inf_child_target.
10269         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10270         add_inf_child_target.
10271         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10272         add_inf_child_target.
10273         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10274         add_inf_child_target.
10275         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10276         add_inf_child_target.
10277         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10278         add_inf_child_target.
10279         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10280         add_inf_child_target.
10281         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10282         add_inf_child_target.
10283         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10284         add_inf_child_target.
10285         * inf-child.c (inf_child_target_info): New.
10286         (inf_child_target::info): New.
10287         (inf_child_open_target): Remove 'target' parameter.  Use
10288         get_native_target instead.
10289         (inf_child_target::open): Delete.
10290         (add_inf_child_target): New.
10291         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10292         Delete.
10293         <info>: New.
10294         (add_inf_child_target): Declare.
10295         (inf_child_open_target): Declare.
10296         * linux-thread-db.c (thread_db_target_info): New.
10297         (thread_db_target) <shortname, longname, doc>: Delete.
10298         <info>: New.
10299         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10300         add_inf_child_target.
10301         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10302         add_inf_child_target.
10303         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10304         add_inf_child_target.
10305         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10306         add_inf_child_target.
10307         * make-target-delegates (print_class): Adjust.
10308         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10309         add_inf_child_target.
10310         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10311         add_inf_child_target.
10312         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10313         add_inf_child_target.
10314         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10315         add_inf_child_target.
10316         * nto-procfs.c (nto_native_target_info): New.
10317         (nto_procfs_target_native) <shortname, longname, doc>:
10318         Delete.
10319         <info>: New.
10320         (nto_procfs_target_info): New.
10321         (nto_procfs_target_procfs) <shortname, longname, doc>:
10322         Delete.
10323         <info>: New.
10324         (init_procfs_targets): Adjust.
10325         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10326         add_inf_child_target.
10327         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10328         add_inf_child_target.
10329         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10330         add_inf_child_target.
10331         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10332         add_inf_child_target.
10333         * ravenscar-thread.c (ravenscar_target_info): New.
10334         (ravenscar_thread_target) <shortname, longname, doc>:
10335         Delete.
10336         <info>: New.
10337         * record-btrace.c (record_btrace_target_info):
10338         (record_btrace_target) <shortname, longname, doc>: Delete.
10339         <info>: New.
10340         (record_btrace_target::open): Rename to ...
10341         (record_btrace_target_open): ... this.  Adjust.
10342         * record-full.c (record_longname, record_doc): New.
10343         (record_full_base_target) <shortname, longname, doc>: Delete.
10344         <info>: New.
10345         (record_full_target_info): New.
10346         (record_full_target): <shortname>: Delete.
10347         <info>: New.
10348         (record_full_core_open_1, record_full_open_1): Update comments.
10349         (record_full_base_target::open): Rename to ...
10350         (record_full_open): ... this.
10351         (cmd_record_full_restore): Update.
10352         (_initialize_record_full): Update.
10353         * remote-sim.c (remote_sim_target_info): New.
10354         (gdbsim_target) <shortname, longname, doc>: Delete.
10355         <info>: New.
10356         (gdbsim_target::open): Rename to ...
10357         (gdbsim_target_open): ... this.
10358         (_initialize_remote_sim): Adjust.
10359         * remote.c (remote_doc): New.
10360         (remote_target_info): New.
10361         (remote_target) <shortname, longname, doc>: Delete.
10362         <info>: New.
10363         (extended_remote_target_info): New.
10364         (extended_remote_target) <shortname, longname, doc>: Delete.
10365         <info>: New.
10366         (remote_target::open_1): Make static.  Adjust.
10367         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10368         * s390-linux-nat.c (_initialize_s390_nat): Use
10369         add_inf_child_target.
10370         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10371         add_inf_child_target.
10372         * sol-thread.c (thread_db_target_info): New.
10373         (sol_thread_target) <shortname, longname, doc>: Delete.
10374         <info>: New.
10375         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10376         add_inf_child_target.
10377         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10378         add_inf_child_target.
10379         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10380         add_inf_child_target.
10381         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10382         add_inf_child_target.
10383         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10384         add_inf_child_target.
10385         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10386         add_inf_child_target.
10387         * spu-linux-nat.c (_initialize_spu_nat): Use
10388         add_inf_child_target.
10389         * spu-multiarch.c (spu_multiarch_target_info): New.
10390         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10391         <info>: New.
10392         * target-delegates.c: Regenerate.
10393         * target.c: Include <unordered_map>.
10394         (target_ops_p): Delete.
10395         (DEF_VEC_P(target_ops_p)): Delete.
10396         (target_factories): New.
10397         (test_target_info): New.
10398         (test_target_ops::info): New.
10399         (open_target): Adjust to use target_factories.
10400         (add_target_with_completer): Rename to ...
10401         (add_target): ... this.  Change prototype.  Register target_info
10402         and open callback in target_factories.  Register target_info in
10403         command context instead of target_ops.
10404         (add_target): Delete old implementation.
10405         (add_deprecated_target_alias): Change prototype.  Adjust.
10406         (the_native_target): New.
10407         (set_native_target, get_native_target): New.
10408         (find_default_run_target): Use the_native_target.
10409         (find_attach_target, find_run_target): Simplify.
10410         (target_ops::open): Delete.
10411         (dummy_target_info): New.
10412         (dummy_target::shortname, dummy_target::longname)
10413         (dummy_target::doc): Delete.
10414         (dummy_target::info): New.
10415         (debug_target::shortname, debug_target::longname)
10416         (debug_target::doc): Delete.
10417         (debug_target::info): New.
10418         * target.h (struct target_info): New.
10419         (target_ops::~target_ops): Add comment.
10420         (target_ops::info): New.
10421         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10422         longer virtual.  Implement in terms of target_info.
10423         (set_native_target, get_native_target): Declare.
10424         (target_open_ftype): New.
10425         (add_target, add_target_with_completer)
10426         (add_deprecated_target_alias): Change prototype.
10427         (test_target) <shortname, longname, doc>: Delete.
10428         <info>: New.
10429         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10430         add_inf_child_target.
10431         * tracefile-tfile.c (tfile_target_info): New.
10432         (tfile_target) <shortname, longname, doc>: Delete.
10433         <info>: New.
10434         (tfile_target::open): Rename to ...
10435         (tfile_target_open): ... this.
10436         (_initialize_tracefile_tfile): Adjust.
10437         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10438         add_inf_child_target.
10439         * windows-nat.c (_initialize_windows_nat): Use
10440         add_inf_child_target.
10441         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10442         add_inf_child_target.
10443
10444 2018-05-02  Pedro Alves  <palves@redhat.com>
10445
10446         * linux-nat.h (linux_nat_target) <low_new_thread,
10447         low_delete_thread, low_new_fork, low_forget_process,
10448         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10449         New virtual methods.
10450         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10451         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10452         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10453         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10454         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10455         Delete.
10456         * linux-fork.c (delete_fork): Adjust to call low method.
10457         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10458         (linux_nat_new_fork, linux_nat_forget_process_hook)
10459         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10460         (linux_nat_status_is_event):
10461         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10462         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10463         to call low method.
10464         (sigtrap_is_event): Rename to ...
10465         (linux_nat_target::low_status_is_event): ... this.
10466         (linux_nat_set_status_is_event): Delete.
10467         (save_stop_reason, linux_nat_wait_1)
10468         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10469         low methods.
10470         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10471         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10472         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10473         (linux_nat_set_prepare_to_resume): Delete.
10474         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10475         low virtual methods.
10476         * amd64-linux-nat.c: Likewise.
10477         * arm-linux-nat.c: Likewise.
10478         * i386-linux-nat.c: Likewise.
10479         * ia64-linux-nat.c: Likewise.
10480         * mips-linux-nat.c: Likewise.
10481         * ppc-linux-nat.c: Likewise.
10482         * s390-linux-nat.c: Likewise.
10483         * sparc64-linux-nat.c: Likewise.
10484         * x86-linux-nat.c: Likewise.
10485         * x86-linux-nat.h: Include "nat/x86-linux.h".
10486         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10487         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10488         Override methods.
10489
10490 2018-05-02  Pedro Alves  <palves@redhat.com>
10491
10492         * target.h (target_ops)
10493         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10494         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10495         stopped_by_watchpoint, have_continuable_watchpoint,
10496         stopped_data_address, watchpoint_addr_within_range,
10497         can_accel_watchpoint_condition, can_run, thread_alive,
10498         has_all_memory, has_memory, has_stack, has_registers,
10499         has_execution, can_async_p, is_async_p, supports_non_stop,
10500         always_non_stop_p, can_execute_reverse, supports_multi_process,
10501         supports_enable_disable_tracepoint,
10502         supports_disable_randomization, supports_string_tracing,
10503         supports_evaluation_of_breakpoint_conditions,
10504         can_run_breakpoint_commands, filesystem_is_local,
10505         can_download_tracepoint, get_trace_state_variable_value,
10506         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10507         record_is_replaying, record_will_replay,
10508         augmented_libraries_svr4_read>: Adjust to return bool.
10509         * aarch64-linux-nat.c: All implementations adjusted.
10510         * aix-thread.c: All implementations adjusted.
10511         * arm-linux-nat.c: All implementations adjusted.
10512         * breakpoint.c: All implementations adjusted.
10513         * bsd-kvm.c: All implementations adjusted.
10514         * bsd-uthread.c: All implementations adjusted.
10515         * corelow.c: All implementations adjusted.
10516         * ctf.c: All implementations adjusted.
10517         * darwin-nat.c: All implementations adjusted.
10518         * darwin-nat.h: All implementations adjusted.
10519         * exec.c: All implementations adjusted.
10520         * fbsd-nat.c: All implementations adjusted.
10521         * fbsd-nat.h: All implementations adjusted.
10522         * gnu-nat.c: All implementations adjusted.
10523         * gnu-nat.h: All implementations adjusted.
10524         * go32-nat.c: All implementations adjusted.
10525         * ia64-linux-nat.c: All implementations adjusted.
10526         * inf-child.c: All implementations adjusted.
10527         * inf-child.h: All implementations adjusted.
10528         * inf-ptrace.c: All implementations adjusted.
10529         * inf-ptrace.h: All implementations adjusted.
10530         * linux-nat.c: All implementations adjusted.
10531         * linux-nat.h: All implementations adjusted.
10532         * mips-linux-nat.c: All implementations adjusted.
10533         * nto-procfs.c: All implementations adjusted.
10534         * ppc-linux-nat.c: All implementations adjusted.
10535         * procfs.c: All implementations adjusted.
10536         * ravenscar-thread.c: All implementations adjusted.
10537         * record-btrace.c: All implementations adjusted.
10538         * record-full.c: All implementations adjusted.
10539         * remote-sim.c: All implementations adjusted.
10540         * remote.c: All implementations adjusted.
10541         * s390-linux-nat.c: All implementations adjusted.
10542         * sol-thread.c: All implementations adjusted.
10543         * spu-multiarch.c: All implementations adjusted.
10544         * target-delegates.c: All implementations adjusted.
10545         * target.c: All implementations adjusted.
10546         * target.h: All implementations adjusted.
10547         * tracefile-tfile.c: All implementations adjusted.
10548         * tracefile.c: All implementations adjusted.
10549         * tracefile.h: All implementations adjusted.
10550         * windows-nat.c: All implementations adjusted.
10551         * x86-linux-nat.h: All implementations adjusted.
10552         * x86-nat.h: All implementations adjusted.
10553
10554 2018-05-02  Pedro Alves  <palves@redhat.com>
10555
10556         * make-target-delegates (scan_target_h): Don't trim lines here.
10557         Replace sequences of tabs and/or whitespace with a single
10558         whitespace.
10559         (top level, parsing methods): Trim each line before processing it
10560         here.
10561
10562 2018-05-02  Pedro Alves  <palves@redhat.com>
10563             John Baldwin  <jhb@freebsd.org>
10564
10565         * target.h (enum strata) <debug_stratum>: New.
10566         (struct target_ops) <all delegation methods>: Replace by C++
10567         virtual methods, and drop "to_" prefix.  All references updated
10568         throughout.
10569         <to_shortname, to_longname, to_doc, to_data,
10570         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10571         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10572         virtual methods.  All references updated throughout.
10573         <can_attach, supports_terminal_ours, can_create_inferior,
10574         get_thread_control_capabilities, attach_no_wait>: New
10575         virtual methods.
10576         <insert_breakpoint, remove_breakpoint>: Now
10577         TARGET_DEFAULT_NORETURN methods.
10578         <info_proc>: Now returns bool.
10579         <to_magic>: Delete.
10580         (OPS_MAGIC): Delete.
10581         (current_target): Delete.  All references replaced by references
10582         to ...
10583         (target_stack): ... this.  New.
10584         (target_shortname, target_longname): Adjust.
10585         (target_can_run): Now a function declaration.
10586         (default_child_has_all_memory, default_child_has_memory)
10587         (default_child_has_stack, default_child_has_registers)
10588         (default_child_has_execution): Remove target_ops parameter.
10589         (complete_target_initialization): Delete.
10590         (memory_breakpoint_target): New template class.
10591         (test_target_ops): Refactor as a C++ class with virtual methods.
10592         * make-target-delegates (NAME_PART): Tighten.
10593         (POINTER_PART, CP_SYMBOL): New.
10594         (SIMPLE_RETURN_PART): Reimplement.
10595         (VEC_RETURN_PART): Expect less.
10596         (RETURN_PART, VIRTUAL_PART): New.
10597         (METHOD): Adjust to C++ virtual methods.
10598         (scan_target_h): Remove reference to C99.
10599         (dname): Output "target_ops::" prefix.
10600         (write_function_header): Adjust to output a C++ class method.
10601         (write_declaration): New.
10602         (write_delegator): Adjust to output a C++ class method.
10603         (tdname): Output "dummy_target::" prefix.
10604         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10605         method.
10606         (tdefault_names, debug_names): Delete.
10607         (return_types, tdefaults, styles, argtypes_array): New.
10608         (top level): All methods are delegators.
10609         (print_class): New.
10610         (top level): Print dummy_target and debug_target classes.
10611         * target-delegates.c: Regenerate.
10612         * target-debug.h (target_debug_print_enum_info_proc_what)
10613         (target_debug_print_thread_control_capabilities)
10614         (target_debug_print_thread_info_p): New.
10615         * target.c (dummy_target): Delete.
10616         (the_dummy_target, the_debug_target): New.
10617         (target_stack): Now extern.
10618         (set_targetdebug): Push/unpush debug target.
10619         (default_child_has_all_memory, default_child_has_memory)
10620         (default_child_has_stack, default_child_has_registers)
10621         (default_child_has_execution): Remove target_ops parameter.
10622         (complete_target_initialization): Delete.
10623         (add_target_with_completer): No longer call
10624         complete_target_initialization.
10625         (target_supports_terminal_ours): Use regular delegation.
10626         (update_current_target): Delete.
10627         (push_target): No longer check magic number.  Don't call
10628         update_current_target.
10629         (unpush_target): Don't call update_current_target.
10630         (target_is_pushed): No longer check magic number.
10631         (target_require_runnable): Skip for all stratums over
10632         process_stratum.
10633         (target_ops::info_proc): New.
10634         (target_info_proc): Use find_target_at and
10635         find_default_run_target.
10636         (target_supports_disable_randomization): Use regular delegation.
10637         (target_get_osdata): Use find_target_at.
10638         (target_ops::open, target_ops::close, target_ops::can_attach)
10639         (target_ops::attach, target_ops::can_create_inferior)
10640         (target_ops::create_inferior, target_ops::can_run)
10641         (target_can_run): New.
10642         (default_fileio_target): Use regular delegation.
10643         (target_ops::fileio_open, target_ops::fileio_pwrite)
10644         (target_ops::fileio_pread, target_ops::fileio_fstat)
10645         (target_ops::fileio_close, target_ops::fileio_unlink)
10646         (target_ops::fileio_readlink): New.
10647         (target_fileio_open_1, target_fileio_unlink)
10648         (target_fileio_readlink): Always call the target method.  Handle
10649         FILEIO_ENOSYS.
10650         (return_zero, return_zero_has_execution): Delete.
10651         (init_dummy_target): Delete.
10652         (dummy_target::dummy_target, dummy_target::shortname)
10653         (dummy_target::longname, dummy_target::doc)
10654         (debug_target::debug_target, debug_target::shortname)
10655         (debug_target::longname, debug_target::doc): New.
10656         (target_supports_delete_record): Use regular delegation.
10657         (setup_target_debug): Delete.
10658         (maintenance_print_target_stack): Skip debug_stratum.
10659         (initialize_targets): Instantiate the_dummy_target and
10660         the_debug_target.
10661         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10662         use target_stack.
10663         (target_auxv_search, fprint_target_auxv): Adjust.
10664         (info_auxv_command): Adjust to use target_stack.
10665         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10666         * exceptions.c (print_flush): Handle a NULL target_stack.
10667         * regcache.c (target_ops_no_register): Refactor as class with
10668         virtual methods.
10669
10670         * exec.c (exec_target): New class.
10671         (exec_ops): Now an exec_target.
10672         (exec_open, exec_close_1, exec_get_section_table)
10673         (exec_xfer_partial, exec_files_info, exec_has_memory)
10674         (exec_make_note_section): Refactor as exec_target methods.
10675         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10676         Delete.
10677         (exec_target::find_memory_regions): New.
10678         (_initialize_exec): Don't call init_exec_ops.
10679         * gdbcore.h (exec_file_clear): Delete.
10680
10681         * corefile.c (core_target): Delete.
10682         (core_file_command): Adjust.
10683         * corelow.c (core_target): New class.
10684         (the_core_target): New.
10685         (core_close): Remove target_ops parameter.
10686         (core_close_cleanup): Adjust.
10687         (core_target::close): New.
10688         (core_open, core_detach, get_core_registers, core_files_info)
10689         (core_xfer_partial, core_thread_alive, core_read_description)
10690         (core_pid_to_str, core_thread_name, core_has_memory)
10691         (core_has_stack, core_has_registers, core_info_proc): Rework as
10692         core_target methods.
10693         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10694         (_initialize_corelow): Initialize the_core_target.
10695         * gdbcore.h (core_target): Delete.
10696         (the_core_target): New.
10697
10698         * ctf.c: (ctf_target): New class.
10699         (ctf_ops): Now a ctf_target.
10700         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10701         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10702         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10703         methods.
10704         (init_ctf_ops): Delete.
10705         (_initialize_ctf): Don't call it.
10706         * tracefile-tfile.c (tfile_target): New class.
10707         (tfile_ops): Now a tfile_target.
10708         (tfile_open, tfile_close, tfile_files_info)
10709         (tfile_get_tracepoint_status, tfile_trace_find)
10710         (tfile_fetch_registers, tfile_xfer_partial)
10711         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10712         Refactor as tfile_target methods.
10713         (tfile_xfer_partial_features): Remove target_ops parameter.
10714         (init_tfile_ops): Delete.
10715         (_initialize_tracefile_tfile): Don't call it.
10716         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10717         (tracefile_has_stack, tracefile_has_registers)
10718         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10719         tracefile_target methods.
10720         (init_tracefile_ops): Delete.
10721         (tracefile_target::tracefile_target): New.
10722         * tracefile.h: Include "target.h".
10723         (tracefile_target): New class.
10724         (init_tracefile_ops): Delete.
10725
10726         * spu-multiarch.c (spu_multiarch_target): New class.
10727         (spu_ops): Now a spu_multiarch_target.
10728         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10729         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10730         (spu_search_memory, spu_mourn_inferior): Refactor as
10731         spu_multiarch_target methods.
10732         (init_spu_ops): Delete.
10733         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10734         complete_target_initialization.
10735
10736         * ravenscar-thread.c (ravenscar_thread_target): New class.
10737         (ravenscar_ops): Now a ravenscar_thread_target.
10738         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10739         (ravenscar_thread_alive, ravenscar_pid_to_str)
10740         (ravenscar_fetch_registers, ravenscar_store_registers)
10741         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10742         (ravenscar_stopped_by_hw_breakpoint)
10743         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10744         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10745         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10746         methods.
10747         (init_ravenscar_thread_ops): Delete.
10748         (_initialize_ravenscar): Remove references to
10749         init_ravenscar_thread_ops and complete_target_initialization.
10750
10751         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10752         (bsd_uthread_target): New class.
10753         (bsd_uthread_ops): Now a bsd_uthread_target.
10754         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10755         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10756         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10757         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10758         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10759         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10760         (bsd_uthread_target): Delete function.
10761         (_initialize_bsd_uthread): Remove reference to
10762         complete_target_initialization.
10763
10764         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10765         (target_bfd): ... this new class.
10766         (target_bfd_xfer_partial, target_bfd_get_section_table)
10767         (target_bfd_close): Refactor as target_bfd methods.
10768         (target_bfd::~target_bfd): New.
10769         (target_bfd_reopen): Adjust.
10770         (target_bfd::close): New.
10771
10772         * record-btrace.c (record_btrace_target): New class.
10773         (record_btrace_ops): Now a record_btrace_target.
10774         (record_btrace_open, record_btrace_stop_recording)
10775         (record_btrace_disconnect, record_btrace_close)
10776         (record_btrace_async, record_btrace_info)
10777         (record_btrace_insn_history, record_btrace_insn_history_range)
10778         (record_btrace_insn_history_from, record_btrace_call_history)
10779         (record_btrace_call_history_range)
10780         (record_btrace_call_history_from, record_btrace_record_method)
10781         (record_btrace_is_replaying, record_btrace_will_replay)
10782         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10783         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10784         (record_btrace_store_registers, record_btrace_prepare_to_store)
10785         (record_btrace_to_get_unwinder)
10786         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10787         (record_btrace_commit_resume, record_btrace_wait)
10788         (record_btrace_stop, record_btrace_can_execute_reverse)
10789         (record_btrace_stopped_by_sw_breakpoint)
10790         (record_btrace_supports_stopped_by_sw_breakpoint)
10791         (record_btrace_stopped_by_hw_breakpoint)
10792         (record_btrace_supports_stopped_by_hw_breakpoint)
10793         (record_btrace_update_thread_list, record_btrace_thread_alive)
10794         (record_btrace_goto_begin, record_btrace_goto_end)
10795         (record_btrace_goto, record_btrace_stop_replaying_all)
10796         (record_btrace_execution_direction)
10797         (record_btrace_prepare_to_generate_core)
10798         (record_btrace_done_generating_core): Refactor as
10799         record_btrace_target methods.
10800         (init_record_btrace_ops): Delete.
10801         (_initialize_record_btrace): Remove reference to
10802         init_record_btrace_ops.
10803         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10804         the execution_direction global.
10805         (record_full_base_target, record_full_target)
10806         (record_full_core_target): New classes.
10807         (record_full_ops): Now a record_full_target.
10808         (record_full_core_ops): Now a record_full_core_target.
10809         (record_full_target::detach, record_full_target::disconnect)
10810         (record_full_core_target::disconnect)
10811         (record_full_target::mourn_inferior, record_full_target::kill):
10812         New.
10813         (record_full_open, record_full_close, record_full_async): Refactor
10814         as methods of the record_full_base_target class.
10815         (record_full_resume, record_full_commit_resume): Refactor
10816         as methods of the record_full_target class.
10817         (record_full_wait, record_full_stopped_by_watchpoint)
10818         (record_full_stopped_data_address)
10819         (record_full_stopped_by_sw_breakpoint)
10820         (record_full_supports_stopped_by_sw_breakpoint)
10821         (record_full_stopped_by_hw_breakpoint)
10822         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10823         methods of the record_full_base_target class.
10824         (record_full_store_registers, record_full_xfer_partial)
10825         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10826         Refactor as methods of the record_full_target class.
10827         (record_full_can_execute_reverse, record_full_get_bookmark)
10828         (record_full_goto_bookmark, record_full_execution_direction)
10829         (record_full_record_method, record_full_info, record_full_delete)
10830         (record_full_is_replaying, record_full_will_replay)
10831         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10832         (record_full_stop_replaying): Refactor as methods of the
10833         record_full_base_target class.
10834         (record_full_core_resume, record_full_core_kill)
10835         (record_full_core_fetch_registers)
10836         (record_full_core_prepare_to_store)
10837         (record_full_core_store_registers, record_full_core_xfer_partial)
10838         (record_full_core_insert_breakpoint)
10839         (record_full_core_remove_breakpoint)
10840         (record_full_core_has_execution): Refactor
10841         as methods of the record_full_core_target class.
10842         (record_full_base_target::supports_delete_record): New.
10843         (init_record_full_ops): Delete.
10844         (init_record_full_core_ops): Delete.
10845         (record_full_save): Refactor as method of the
10846         record_full_base_target class.
10847         (_initialize_record_full): Remove references to
10848         init_record_full_ops and init_record_full_core_ops.
10849
10850         * remote.c (remote_target, extended_remote_target): New classes.
10851         (remote_ops): Now a remote_target.
10852         (extended_remote_ops): Now an extended_remote_target.
10853         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10854         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10855         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10856         (remote_pass_signals, remote_set_syscall_catchpoint)
10857         (remote_program_signals, )
10858         (remote_thread_always_alive): Remove target_ops parameter.
10859         (remote_thread_alive, remote_thread_name)
10860         (remote_update_thread_list, remote_threads_extra_info)
10861         (remote_static_tracepoint_marker_at)
10862         (remote_static_tracepoint_markers_by_strid)
10863         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10864         (remote_open): Refactor as methods of remote_target.
10865         (extended_remote_open, extended_remote_detach)
10866         (extended_remote_attach, extended_remote_post_attach):
10867         (extended_remote_supports_disable_randomization)
10868         (extended_remote_create_inferior): : Refactor as method of
10869         extended_remote_target.
10870         (remote_set_permissions, remote_open_1, remote_detach)
10871         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10872         (remote_resume, remote_commit_resume, remote_stop)
10873         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10874         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10875         (remote_prepare_to_store, remote_store_registers)
10876         (remote_flash_erase, remote_flash_done, remote_files_info)
10877         (remote_kill, remote_mourn, remote_insert_breakpoint)
10878         (remote_remove_breakpoint, remote_insert_watchpoint)
10879         (remote_watchpoint_addr_within_range)
10880         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10881         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10882         (remote_supports_stopped_by_sw_breakpoint)
10883         (remote_stopped_by_hw_breakpoint)
10884         (remote_supports_stopped_by_hw_breakpoint)
10885         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10886         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10887         (remote_verify_memory): Refactor as methods of remote_target.
10888         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10889         parameter.
10890         (remote_xfer_partial, remote_get_memory_xfer_limit)
10891         (remote_search_memory, remote_rcmd, remote_memory_map)
10892         (remote_pid_to_str, remote_get_thread_local_address)
10893         (remote_get_tib_address, remote_read_description): Refactor as
10894         methods of remote_target.
10895         (remote_target::fileio_open, remote_target::fileio_pwrite)
10896         (remote_target::fileio_pread, remote_target::fileio_close): New.
10897         (remote_hostio_readlink, remote_hostio_fstat)
10898         (remote_filesystem_is_local, remote_can_execute_reverse)
10899         (remote_supports_non_stop, remote_supports_disable_randomization)
10900         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10901         (remote_supports_enable_disable_tracepoint)
10902         (remote_supports_string_tracing)
10903         (remote_can_run_breakpoint_commands, remote_trace_init)
10904         (remote_download_tracepoint, remote_can_download_tracepoint)
10905         (remote_download_trace_state_variable, remote_enable_tracepoint)
10906         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10907         (remote_trace_start, remote_get_trace_status)
10908         (remote_get_tracepoint_status, remote_trace_stop)
10909         (remote_trace_find, remote_get_trace_state_variable_value)
10910         (remote_save_trace_data, remote_get_raw_trace_data)
10911         (remote_set_disconnected_tracing, remote_core_of_thread)
10912         (remote_set_circular_trace_buffer, remote_traceframe_info)
10913         (remote_get_min_fast_tracepoint_insn_len)
10914         (remote_set_trace_buffer_size, remote_set_trace_notes)
10915         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10916         (remote_disable_btrace, remote_teardown_btrace)
10917         (remote_read_btrace, remote_btrace_conf)
10918         (remote_augmented_libraries_svr4_read, remote_load)
10919         (remote_pid_to_exec_file, remote_can_do_single_step)
10920         (remote_execution_direction, remote_thread_handle_to_thread_info):
10921         Refactor as methods of remote_target.
10922         (init_remote_ops, init_extended_remote_ops): Delete.
10923         (remote_can_async_p, remote_is_async_p, remote_async)
10924         (remote_thread_events, remote_upload_tracepoints)
10925         (remote_upload_trace_state_variables): Refactor as methods of
10926         remote_target.
10927         (_initialize_remote): Remove references to init_remote_ops and
10928         init_extended_remote_ops.
10929
10930         * remote-sim.c (gdbsim_target): New class.
10931         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10932         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10933         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10934         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10935         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10936         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10937         Refactor as methods of gdbsim_target.
10938         (gdbsim_ops): Now a gdbsim_target.
10939         (init_gdbsim_ops): Delete.
10940         (gdbsim_cntrl_c): Adjust.
10941         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10942
10943         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10944         (the_amd64_linux_nat_target): New.
10945         (amd64_linux_fetch_inferior_registers)
10946         (amd64_linux_store_inferior_registers): Refactor as methods of
10947         amd64_linux_nat_target.
10948         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10949         * i386-linux-nat.c: Don't include "linux-nat.h".
10950         (i386_linux_nat_target): New class.
10951         (the_i386_linux_nat_target): New.
10952         (i386_linux_fetch_inferior_registers)
10953         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10954         as methods of i386_linux_nat_target.
10955         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10956         * inf-child.c (inf_child_ops): Delete.
10957         (inf_child_fetch_inferior_registers)
10958         (inf_child_store_inferior_registers): Delete.
10959         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10960         methods of inf_child_target.
10961         (inf_child_target::supports_terminal_ours)
10962         (inf_child_target::terminal_init)
10963         (inf_child_target::terminal_inferior)
10964         (inf_child_target::terminal_ours_for_output)
10965         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10966         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10967         New.
10968         (inf_child_open, inf_child_disconnect, inf_child_close)
10969         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10970         (inf_child_post_startup_inferior, inf_child_can_run)
10971         (inf_child_pid_to_exec_file): Refactor as methods of
10972         inf_child_target.
10973         (inf_child_follow_fork): Delete.
10974         (inf_child_target::can_create_inferior)
10975         (inf_child_target::can_attach): New.
10976         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10977         (inf_child_target::has_stack, inf_child_target::has_registers)
10978         (inf_child_target::has_execution): New.
10979         (inf_child_fileio_open, inf_child_fileio_pwrite)
10980         (inf_child_fileio_pread, inf_child_fileio_fstat)
10981         (inf_child_fileio_close, inf_child_fileio_unlink)
10982         (inf_child_fileio_readlink, inf_child_use_agent)
10983         (inf_child_can_use_agent): Refactor as methods of
10984         inf_child_target.
10985         (return_zero, inf_child_target): Delete.
10986         (inf_child_target::inf_child_target): New.
10987         * inf-child.h: Include "target.h".
10988         (inf_child_target): Delete function prototype.
10989         (inf_child_target): New class.
10990         (inf_child_open_target, inf_child_mourn_inferior)
10991         (inf_child_maybe_unpush_target): Delete.
10992         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10993         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10994         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10995         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10996         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10997         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10998         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10999         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11000         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11001         methods of inf_ptrace_target.
11002         (inf_ptrace_target): Delete function.
11003         * inf-ptrace.h: Include "inf-child.h".
11004         (inf_ptrace_target): Delete function declaration.
11005         (inf_ptrace_target): New class.
11006         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11007         * linux-nat.c (linux_target): New.
11008         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11009         (linux_nat_target::~linux_nat_target): New.
11010         (linux_child_post_attach, linux_child_post_startup_inferior)
11011         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11012         (linux_child_remove_fork_catchpoint)
11013         (linux_child_insert_vfork_catchpoint)
11014         (linux_child_remove_vfork_catchpoint)
11015         (linux_child_insert_exec_catchpoint)
11016         (linux_child_remove_exec_catchpoint)
11017         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11018         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11019         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11020         (linux_nat_stopped_data_address)
11021         (linux_nat_stopped_by_sw_breakpoint)
11022         (linux_nat_supports_stopped_by_sw_breakpoint)
11023         (linux_nat_stopped_by_hw_breakpoint)
11024         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11025         (linux_nat_kill, linux_nat_mourn_inferior)
11026         (linux_nat_xfer_partial, linux_nat_thread_alive)
11027         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11028         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11029         (linux_child_static_tracepoint_markers_by_strid)
11030         (linux_nat_is_async_p, linux_nat_can_async_p)
11031         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11032         (linux_nat_supports_multi_process)
11033         (linux_nat_supports_disable_randomization, linux_nat_async)
11034         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11035         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11036         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11037         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11038         methods of linux_nat_target.
11039         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11040         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11041         parameter.
11042         (check_stopped_by_watchpoint): Adjust.
11043         (linux_xfer_partial): Delete.
11044         (linux_target_install_ops, linux_target, linux_nat_add_target):
11045         Delete.
11046         (linux_nat_target::linux_nat_target): New.
11047         * linux-nat.h: Include "inf-ptrace.h".
11048         (linux_nat_target): New.
11049         (linux_target, linux_target_install_ops, linux_nat_add_target):
11050         Delete function declarations.
11051         (linux_target): Declare global.
11052         * linux-thread-db.c (thread_db_target): New.
11053         (thread_db_target::thread_db_target): New.
11054         (thread_db_ops): Delete.
11055         (the_thread_db_target): New.
11056         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11057         (thread_db_update_thread_list, thread_db_pid_to_str)
11058         (thread_db_extra_thread_info)
11059         (thread_db_thread_handle_to_thread_info)
11060         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11061         (thread_db_resume): Refactor as methods of thread_db_target.
11062         (init_thread_db_ops): Delete.
11063         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11064         * x86-linux-nat.c: Don't include "linux-nat.h".
11065         (super_post_startup_inferior): Delete.
11066         (x86_linux_nat_target::~x86_linux_nat_target): New.
11067         (x86_linux_child_post_startup_inferior)
11068         (x86_linux_read_description, x86_linux_enable_btrace)
11069         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11070         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11071         methods of x86_linux_nat_target.
11072         (x86_linux_create_target): Delete.  Bits folded ...
11073         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11074         pointer.
11075         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11076         (x86_linux_nat_target): New class.
11077         (x86_linux_create_target): Delete.
11078         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11079         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11080         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11081         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11082         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11083         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11084         make extern.
11085         (x86_use_watchpoints): Delete.
11086         * x86-nat.h: Include "breakpoint.h" and "target.h".
11087         (x86_use_watchpoints): Delete.
11088         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11089         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11090         (x86_insert_watchpoint, x86_remove_watchpoint)
11091         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11092         (x86_stopped_by_hw_breakpoint): New declarations.
11093         (x86_nat_target): New template class.
11094
11095         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11096         (the_ppc_linux_nat_target): New.
11097         (ppc_linux_fetch_inferior_registers)
11098         (ppc_linux_can_use_hw_breakpoint)
11099         (ppc_linux_region_ok_for_hw_watchpoint)
11100         (ppc_linux_ranged_break_num_registers)
11101         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11102         (ppc_linux_insert_mask_watchpoint)
11103         (ppc_linux_remove_mask_watchpoint)
11104         (ppc_linux_can_accel_watchpoint_condition)
11105         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11106         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11107         (ppc_linux_watchpoint_addr_within_range)
11108         (ppc_linux_masked_watch_num_registers)
11109         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11110         (ppc_linux_read_description): Refactor as methods of
11111         ppc_linux_nat_target.
11112         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11113
11114         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11115         (procfs_target): New class.
11116         (the_procfs_target): New.
11117         (procfs_target): Delete function.
11118         (procfs_auxv_parse, procfs_attach, procfs_detach)
11119         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11120         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11121         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11122         (procfs_create_inferior, procfs_update_thread_list)
11123         (procfs_thread_alive, procfs_pid_to_str)
11124         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11125         (procfs_stopped_data_address, procfs_insert_watchpoint)
11126         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11127         (proc_find_memory_regions, procfs_info_proc)
11128         (procfs_make_note_section): Refactor as methods of procfs_target.
11129         (_initialize_procfs): Adjust.
11130         * sol-thread.c (sol_thread_target): New class.
11131         (sol_thread_ops): Now a sol_thread_target.
11132         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11133         (sol_thread_fetch_registers, sol_thread_store_registers)
11134         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11135         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11136         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11137         (init_sol_thread_ops): Delete.
11138         (_initialize_sol_thread): Adjust.  Remove references to
11139         init_sol_thread_ops and complete_target_initialization.
11140
11141         * windows-nat.c (windows_nat_target): New class.
11142         (windows_fetch_inferior_registers)
11143         (windows_store_inferior_registers, windows_resume, windows_wait)
11144         (windows_attach, windows_detach, windows_pid_to_exec_file)
11145         (windows_files_info, windows_create_inferior)
11146         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11147         (windows_close, windows_pid_to_str, windows_xfer_partial)
11148         (windows_get_tib_address, windows_get_ada_task_ptid)
11149         (windows_thread_name, windows_thread_alive): Refactor as
11150         windows_nat_target methods.
11151         (do_initial_windows_stuff): Adjust.
11152         (windows_target): Delete function.
11153         (_initialize_windows_nat): Adjust.
11154
11155         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11156         (darwin_mourn_inferior, darwin_kill_inferior)
11157         (darwin_create_inferior, darwin_attach, darwin_detach)
11158         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11159         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11160         (darwin_supports_multi_process): Refactor as darwin_nat_target
11161         methods.
11162         (darwin_resume_to, darwin_files_info): Delete.
11163         (_initialize_darwin_inferior): Rename to ...
11164         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11165         * darwin-nat.h: Include "inf-child.h".
11166         (darwin_nat_target): New class.
11167         (darwin_complete_target): Delete.
11168         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11169         (darwin_target): New.
11170         (i386_darwin_fetch_inferior_registers)
11171         (i386_darwin_store_inferior_registers): Refactor as methods of
11172         darwin_nat_target.
11173         (darwin_complete_target): Delete, with ...
11174         (_initialize_i386_darwin_nat): ... bits factored out here.
11175
11176         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11177         (the_alpha_linux_nat_target): New.
11178         (alpha_linux_register_u_offset): Refactor as
11179         alpha_linux_nat_target method.
11180         (_initialize_alpha_linux_nat): Adjust.
11181         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11182         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11183         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11184         methods of linux_nat_trad_target.
11185         (linux_trad_target): Delete.
11186         * linux-nat-trad.h (linux_trad_target): Delete function.
11187         (linux_nat_trad_target): New class.
11188         * mips-linux-nat.c (mips_linux_nat_target): New class.
11189         (super_fetch_registers, super_store_registers, super_close):
11190         Delete.
11191         (the_mips_linux_nat_target): New.
11192         (mips64_linux_regsets_fetch_registers)
11193         (mips64_linux_regsets_store_registers)
11194         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11195         (mips_linux_register_u_offset, mips_linux_read_description)
11196         (mips_linux_can_use_hw_breakpoint)
11197         (mips_linux_stopped_by_watchpoint)
11198         (mips_linux_stopped_data_address)
11199         (mips_linux_region_ok_for_hw_watchpoint)
11200         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11201         (mips_linux_close): Refactor as methods of mips_linux_nat.
11202         (_initialize_mips_linux_nat): Adjust to C++ification.
11203
11204         * aix-thread.c (aix_thread_target): New class.
11205         (aix_thread_ops): Now an aix_thread_target.
11206         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11207         (aix_thread_fetch_registers, aix_thread_store_registers)
11208         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11209         (aix_thread_thread_alive, aix_thread_pid_to_str)
11210         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11211         Refactor as methods of aix_thread_target.
11212         (init_aix_thread_ops): Delete.
11213         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11214         and complete_target_initialization.
11215         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11216         (rs6000_nat_target): New class.
11217         (the_rs6000_nat_target): New.
11218         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11219         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11220         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11221         (super_create_inferior): Delete.
11222         (_initialize_rs6000_nat): Adjust to C++ification.
11223
11224         * arm-linux-nat.c (arm_linux_nat_target): New class.
11225         (the_arm_linux_nat_target): New.
11226         (arm_linux_fetch_inferior_registers)
11227         (arm_linux_store_inferior_registers, arm_linux_read_description)
11228         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11229         (arm_linux_remove_hw_breakpoint)
11230         (arm_linux_region_ok_for_hw_watchpoint)
11231         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11232         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11233         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11234         arm_linux_nat_target.
11235         (_initialize_arm_linux_nat): Adjust to C++ification.
11236
11237         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11238         (the_aarch64_linux_nat_target): New.
11239         (aarch64_linux_fetch_inferior_registers)
11240         (aarch64_linux_store_inferior_registers)
11241         (aarch64_linux_child_post_startup_inferior)
11242         (aarch64_linux_read_description)
11243         (aarch64_linux_can_use_hw_breakpoint)
11244         (aarch64_linux_insert_hw_breakpoint)
11245         (aarch64_linux_remove_hw_breakpoint)
11246         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11247         (aarch64_linux_region_ok_for_hw_watchpoint)
11248         (aarch64_linux_stopped_data_address)
11249         (aarch64_linux_stopped_by_watchpoint)
11250         (aarch64_linux_watchpoint_addr_within_range)
11251         (aarch64_linux_can_do_single_step): Refactor as methods of
11252         aarch64_linux_nat_target.
11253         (super_post_startup_inferior): Delete.
11254         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11255
11256         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11257         (the_hppa_linux_nat_target): New.
11258         (hppa_linux_fetch_inferior_registers)
11259         (hppa_linux_store_inferior_registers): Refactor as methods of
11260         hppa_linux_nat_target.
11261         (_initialize_hppa_linux_nat): Adjust to C++ification.
11262
11263         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11264         (the_ia64_linux_nat_target): New.
11265         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11266         (ia64_linux_stopped_data_address)
11267         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11268         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11269         ia64_linux_nat_target methods.
11270         (super_xfer_partial): Delete.
11271         (_initialize_ia64_linux_nat): Adjust to C++ification.
11272
11273         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11274         (the_m32r_linux_nat_target): New.
11275         (m32r_linux_fetch_inferior_registers)
11276         (m32r_linux_store_inferior_registers): Refactor as
11277         m32r_linux_nat_target methods.
11278         (_initialize_m32r_linux_nat): Adjust to C++ification.
11279
11280         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11281         (the_m68k_linux_nat_target): New.
11282         (m68k_linux_fetch_inferior_registers)
11283         (m68k_linux_store_inferior_registers): Refactor as
11284         m68k_linux_nat_target methods.
11285         (_initialize_m68k_linux_nat): Adjust to C++ification.
11286
11287         * s390-linux-nat.c (s390_linux_nat_target): New class.
11288         (the_s390_linux_nat_target): New.
11289         (s390_linux_fetch_inferior_registers)
11290         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11291         (s390_insert_watchpoint, s390_remove_watchpoint)
11292         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11293         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11294         (s390_auxv_parse, s390_read_description): Refactor as methods of
11295         s390_linux_nat_target.
11296         (_initialize_s390_nat): Adjust to C++ification.
11297
11298         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11299         (the_sparc_linux_nat_target): New.
11300         (_initialize_sparc_linux_nat): Adjust to C++ification.
11301         * sparc-nat.c (sparc_fetch_inferior_registers)
11302         (sparc_store_inferior_registers): Remove target_ops parameter.
11303         * sparc-nat.h (sparc_fetch_inferior_registers)
11304         (sparc_store_inferior_registers): Remove target_ops parameter.
11305         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11306         (the_sparc64_linux_nat_target): New.
11307         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11308
11309         * spu-linux-nat.c (spu_linux_nat_target): New class.
11310         (the_spu_linux_nat_target): New.
11311         (spu_child_post_startup_inferior, spu_child_post_attach)
11312         (spu_child_wait, spu_fetch_inferior_registers)
11313         (spu_store_inferior_registers, spu_xfer_partial)
11314         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11315         methods.
11316         (_initialize_spu_nat): Adjust to C++ification.
11317
11318         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11319         (the_tilegx_linux_nat_target): New.
11320         (fetch_inferior_registers, store_inferior_registers):
11321         Refactor as methods.
11322         (_initialize_tile_linux_nat): Adjust to C++ification.
11323
11324         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11325         (the_xtensa_linux_nat_target): New.
11326         (xtensa_linux_fetch_inferior_registers)
11327         (xtensa_linux_store_inferior_registers): Refactor as
11328         xtensa_linux_nat_target methods.
11329         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11330
11331         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11332         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11333         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11334         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11335         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11336         (fbsd_stopped_by_sw_breakpoint)
11337         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11338         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11339         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11340         (fbsd_post_startup_inferior, fbsd_post_attach)
11341         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11342         (fbsd_set_syscall_catchpoint)
11343         (super_xfer_partial, super_resume, super_wait)
11344         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11345         (fbsd_handle_debug_trap): Remove target_ops parameter.
11346         (fbsd_nat_add_target): Delete.
11347         * fbsd-nat.h: Include "inf-ptrace.h".
11348         (fbsd_nat_add_target): Delete.
11349         (USE_SIGTRAP_SIGINFO): Define.
11350         (fbsd_nat_target): New class.
11351
11352         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11353         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11354         (amd64bsd_target): Delete.
11355         * amd64-bsd-nat.h: New file.
11356         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11357         "x86-bsd-nat.h".
11358         (amd64_fbsd_nat_target): New class.
11359         (the_amd64_fbsd_nat_target): New.
11360         (amd64fbsd_read_description): Refactor as method of
11361         amd64_fbsd_nat_target.
11362         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11363         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11364         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11365         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11366         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11367         (i386bsd_target): Delete.
11368         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11369         (i386bsd_fetch_inferior_registers)
11370         (i386bsd_store_inferior_registers): Declare.
11371         (i386_bsd_nat_target): New class.
11372         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11373         (the_i386_fbsd_nat_target): New.
11374         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11375         i386_fbsd_nat_target methods.
11376         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11377         (_initialize_i386fbsd_nat): Adjust to C++ification.
11378         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11379         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11380         (_initialize_x86_bsd_nat): Adjust to C++ification.
11381         * x86-bsd-nat.h: Include "x86-nat.h".
11382         (x86bsd_target): Delete declaration.
11383         (x86bsd_nat_target): New class.
11384
11385         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11386         (the_aarch64_fbsd_nat_target): New.
11387         (aarch64_fbsd_fetch_inferior_registers)
11388         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11389         aarch64_fbsd_nat_target.
11390         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11391         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11392         (the_alpha_bsd_nat_target): New.
11393         (alphabsd_fetch_inferior_registers)
11394         (alphabsd_store_inferior_registers): Refactor as
11395         alpha_bsd_nat_target methods.
11396         (_initialize_alphabsd_nat): Refactor as methods of
11397         alpha_bsd_nat_target.
11398         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11399         (the_amd64_nbsd_nat_target): New.
11400         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11401         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11402         (the_amd64_obsd_nat_target): New.
11403         (_initialize_amd64obsd_nat): Adjust to C++ification.
11404         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11405         (the_arm_fbsd_nat_target): New.
11406         (arm_fbsd_fetch_inferior_registers)
11407         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11408         (_initialize_arm_fbsd_nat): Refactor as methods of
11409         arm_fbsd_nat_target.
11410         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11411         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11412         (the_arm_netbsd_nat_target): New.
11413         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11414         arm_netbsd_nat_target.
11415         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11416         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11417         (the_hppa_nbsd_nat_target): New.
11418         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11419         hppa_nbsd_nat_target methods.
11420         (_initialize_hppanbsd_nat): Adjust to C++ification.
11421         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11422         (the_hppa_obsd_nat_target): New.
11423         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11424         methods of hppa_obsd_nat_target.
11425         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11426         add_target.
11427         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11428         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11429         add_target.
11430         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11431         (_initialize_i386obsd_nat): Use add_target.
11432         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11433         (the_m68k_bsd_nat_target): New.
11434         (m68kbsd_fetch_inferior_registers)
11435         (m68kbsd_store_inferior_registers): Refactor as methods of
11436         m68k_bsd_nat_target.
11437         (_initialize_m68kbsd_nat): Adjust to C++ification.
11438         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11439         (the_mips_fbsd_nat_target): New.
11440         (mips_fbsd_fetch_inferior_registers)
11441         (mips_fbsd_store_inferior_registers): Refactor as methods of
11442         mips_fbsd_nat_target.
11443         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11444         add_target.
11445         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11446         (the_mips_nbsd_nat_target): New.
11447         (mipsnbsd_fetch_inferior_registers)
11448         (mipsnbsd_store_inferior_registers): Refactor as methods of
11449         mips_nbsd_nat_target.
11450         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11451         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11452         (the_mips64_obsd_nat_target): New.
11453         (mips64obsd_fetch_inferior_registers)
11454         (mips64obsd_store_inferior_registers): Refactor as methods of
11455         mips64_obsd_nat_target.
11456         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11457         add_target.
11458         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11459         nbsd_nat_target.
11460         * nbsd-nat.h: Include "inf-ptrace.h".
11461         (nbsd_nat_target): New class.
11462         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11463         (obsd_wait): Refactor as methods of obsd_nat_target.
11464         (obsd_add_target): Delete.
11465         * obsd-nat.h: Include "inf-ptrace.h".
11466         (obsd_nat_target): New class.
11467         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11468         (the_ppc_fbsd_nat_target): New.
11469         (ppcfbsd_fetch_inferior_registers)
11470         (ppcfbsd_store_inferior_registers): Refactor as methods of
11471         ppc_fbsd_nat_target.
11472         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11473         add_target.
11474         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11475         (the_ppc_nbsd_nat_target): New.
11476         (ppcnbsd_fetch_inferior_registers)
11477         (ppcnbsd_store_inferior_registers): Refactor as methods of
11478         ppc_nbsd_nat_target.
11479         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11480         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11481         (the_ppc_obsd_nat_target): New.
11482         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11483         methods of ppc_obsd_nat_target.
11484         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11485         add_target.
11486         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11487         (the_sh_nbsd_nat_target): New.
11488         (shnbsd_fetch_inferior_registers)
11489         (shnbsd_store_inferior_registers): Refactor as methods of
11490         sh_nbsd_nat_target.
11491         (_initialize_shnbsd_nat): Adjust to C++ification.
11492         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11493         (inf_ptrace_xfer_partial): Delete.
11494         (sparc_xfer_partial, sparc_target): Delete.
11495         * sparc-nat.h (sparc_fetch_inferior_registers)
11496         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11497         (sparc_target): Delete function declaration.
11498         (sparc_target): New template class.
11499         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11500         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11501         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11502         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11503         add_target.
11504         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11505         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11506         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11507         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11508         add_target.
11509         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11510         (the_vax_bsd_nat_target): New.
11511         (vaxbsd_fetch_inferior_registers)
11512         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11513         methods.
11514         (_initialize_vaxbsd_nat): Adjust to C++ification.
11515
11516         * bsd-kvm.c (bsd_kvm_target): New class.
11517         (bsd_kvm_ops): Now a bsd_kvm_target.
11518         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11519         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11520         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11521         bsd_kvm_target.
11522         (bsd_kvm_return_one): Delete.
11523         (bsd_kvm_add_target): Adjust to C++ification.
11524
11525         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11526         (nto_procfs_target_procfs): New classes.
11527         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11528         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11529         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11530         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11531         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11532         (procfs_remove_hw_breakpoint, procfs_resume)
11533         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11534         (procfs_kill_inferior, procfs_store_registers)
11535         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11536         as methods of nto_procfs_target.
11537         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11538         (nto_native_ops): Delete.
11539         (procfs_open, procfs_native_open): Delete.
11540         (nto_native_ops): Now an nto_procfs_target_native.
11541         (init_procfs_targets): Adjust to C++ification.
11542         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11543         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11544         Refactor as methods of nto_procfs_target.
11545
11546         * go32-nat.c (go32_nat_target): New class.
11547         (the_go32_nat_target): New.
11548         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11549         (go32_store_registers, go32_xfer_partial, go32_files_info)
11550         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11551         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11552         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11553         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11554         (go32_target): Delete.
11555         (_initialize_go32_nat): Adjust to C++ification.
11556
11557         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11558         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11559         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11560         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11561         gnu_nat_target.
11562         (gnu_target): Delete.
11563         * gnu-nat.h (gnu_target): Delete.
11564         (gnu_nat_target): New class.
11565         * i386-gnu-nat.c (gnu_base_target): New.
11566         (i386_gnu_nat_target): New class.
11567         (the_i386_gnu_nat_target): New.
11568         (_initialize_i386gnu_nat): Adjust to C++ification.
11569
11570 2018-05-02  Pedro Alves  <palves@redhat.com>
11571
11572         * bfd-target.c (target_bfd_xclose): Rename to ...
11573         (target_bfd_close): ... this.
11574         (target_bfd_reopen): Adjust.
11575         * target.c (target_close): Remove references to to_xclose.
11576         * target.h (target_ops::to_xclose): Delete.
11577         (target_ops::to_close): Update comments.
11578
11579 2018-05-02  Pedro Alves  <palves@redhat.com>
11580
11581         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11582         "linux-nat.h".
11583         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11584         * inf-ptrace.c (inf_ptrace_register_u_offset)
11585         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11586         (inf_ptrace_store_register, inf_ptrace_store_registers)
11587         (inf_ptrace_trad_target): Move to ...
11588         * linux-nat-trad.c: ... this new file.
11589         * linux-nat-trad.h: New file.
11590         * linux-nat.c (linux_target_install_ops): Make extern.
11591         (linux_trad_target): Delete.
11592         * linux-nat.h (linux_trad_target): Delete declaration.
11593         (linux_target_install_ops): Declare.
11594         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11595         "linux-nat.h".
11596
11597 2018-05-02  Pedro Alves  <palves@redhat.com>
11598
11599         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11600         procfs_target/add_target here.
11601         * procfs.c (procfs_target): Make static.
11602         (_initialize_procfs): Call add_target here.
11603         * procfs.h (struct target_ops): Remove forward declaration.
11604         (procfs_target): Remove declaration.
11605         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11606
11607 2018-05-02  Pedro Alves  <palves@redhat.com>
11608
11609         * procfs.c (procfs_stopped_by_watchpoint)
11610         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11611         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11612         Forward declare.
11613         (procfs_use_watchpoints): Delete, move contents...
11614         (procfs_target): ... here.
11615         * procfs.h (procfs_use_watchpoints): Delete declaration.
11616         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11617         procfs_use_watchpoints.
11618         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11619         procfs_use_watchpoints.
11620
11621 2018-05-02  Tom Tromey  <tom@tromey.com>
11622
11623         PR python/20084:
11624         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11625         and var_zuinteger_unlimited.
11626         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11627         and PARAM_ZUINTEGER_UNLIMITED.
11628         (set_parameter_value): Handle var_zuinteger and
11629         var_zuinteger_unlimited.
11630         (add_setshow_generic): Likewise.
11631         (parmpy_init): Likewise.
11632
11633 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11634
11635         PR rust/23124
11636         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11637         pointer is not null before dereferencing it.
11638
11639 2018-04-30  Tom Tromey  <tom@tromey.com>
11640
11641         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11642         is_mi_like_p.
11643
11644 2018-04-30  Tom Tromey  <tom@tromey.com>
11645
11646         * breakpoint.c (mention): Remove use of is_mi_like_p.
11647         (print_mention_ranged_breakpoint): Likewise.
11648         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11649         of is_mi_like_p.
11650
11651 2018-04-30  Tom Tromey  <tom@tromey.com>
11652
11653         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11654
11655 2018-04-30  Tom Tromey  <tom@tromey.com>
11656
11657         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11658         (info_spu_event_command): Remove some uses of is_mi_like_p.
11659
11660 2018-04-30  Tom Tromey  <tom@tromey.com>
11661
11662         * python/py-framefilter.c (py_print_single_arg)
11663         (enumerate_locals, py_print_args, py_print_frame): Remove some
11664         uses of is_mi_like_p.
11665
11666 2018-04-30  Tom Tromey  <tom@tromey.com>
11667
11668         * ui-out.c: Update.
11669         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11670         * ui-out.h (ui_out::is_mi_like_p): Now const.
11671         (ui_out::do_is_mi_like_p): Now const.
11672         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11673
11674 2018-04-30  Tom Tromey  <tom@tromey.com>
11675
11676         * varobj.c (varobj_set_visualizer): Use new_reference.
11677         * python/python.c (gdbpy_decode_line): Use new_reference.
11678         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11679         new_reference.
11680
11681 2018-04-30  Tom Tromey  <tom@tromey.com>
11682
11683         * varobj.c (install_new_value): Use new_reference.
11684         * value.h (value_incref): Return void.  Swap intro comment with
11685         value_decref.
11686         * value.c (set_value_parent): Use new_reference.
11687         (value_incref): Return void.  Update intro comment.
11688         (release_value): Use new_reference.
11689         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11690
11691 2018-04-30  Tom Tromey  <tom@tromey.com>
11692
11693         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11694         * gdb_bfd.h (new_bfd_ref): Remove.
11695         (gdb_bfd_open): Update comment.
11696         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11697         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11698         (gdb_bfd_fdopenr): Use new_reference.
11699         * exec.c (exec_file_attach): Use new_reference.
11700
11701 2018-04-30  Tom Tromey  <tom@tromey.com>
11702
11703         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11704         method.
11705
11706 2018-04-30  Tom Tromey  <tom@tromey.com>
11707
11708         * jit.c (jit_read_code_entry): Use type_align.
11709         * i386-tdep.c (i386_gdbarch_init): Don't call
11710         set_gdbarch_long_long_align_bit.
11711         * gdbarch.sh: Remove long_long_align_bit.
11712         * gdbarch.c, gdbarch.h: Rebuild.
11713         * arc-tdep.c (arc_type_align): New function.
11714         (arc_gdbarch_init): Use arc_type_align.  Don't call
11715         set_gdbarch_long_long_align_bit.
11716
11717 2018-04-30  Tom Tromey  <tom@tromey.com>
11718
11719         * rust-lang.c (rust_type_alignment): Remove.
11720         (rust_composite_type): Use type_align.
11721
11722 2018-04-30  Tom Tromey  <tom@tromey.com>
11723
11724         * NEWS: Mention Type.align.
11725         * python/py-type.c (typy_get_alignof): New function.
11726         (type_object_getset): Add "alignof".
11727
11728 2018-04-30  Tom Tromey  <tom@tromey.com>
11729
11730         PR exp/17095:
11731         * NEWS: Update.
11732         * std-operator.def (UNOP_ALIGNOF): New operator.
11733         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11734         New.
11735         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11736         * c-lang.c (c_op_print_tab): Add alignof.
11737         * c-exp.y (ALIGNOF): New token.
11738         (exp): Add "ALIGNOF" production.
11739         (ident_tokens): Add _Alignof and alignof.
11740
11741 2018-04-30  Tom Tromey  <tom@tromey.com>
11742
11743         * i386-tdep.c (i386_type_align): New function.
11744         (i386_gdbarch_init): Update.
11745         * gdbarch.sh (type_align): New method.
11746         * gdbarch.c, gdbarch.h: Rebuild.
11747         * arch-utils.h (default_type_align): Declare.
11748         * arch-utils.c (default_type_align): New function.
11749         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11750         (struct type) <align_log2>: New field.
11751         <instance_flags>: Now a bitfield.
11752         (TYPE_RAW_ALIGN): New macro.
11753         (type_align, type_raw_align, set_type_align): Declare.
11754         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11755         functions.
11756         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11757         (get_alignment, maybe_set_alignment): New functions.
11758         (read_structure_type, read_enumeration_type, read_array_type)
11759         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11760         (read_subrange_type, read_base_type): Set type alignment.
11761
11762 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11763
11764         * dwarf2read.c (read_index_from_section): Use bool.
11765
11766 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11767
11768         PR gdb/22950
11769         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11770         with #ifdef.
11771
11772 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11773
11774         PR build/22873
11775         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11776         last step, and do it atomically.
11777
11778 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11779
11780         * compile/compile-c-types.c (convert_int, convert_float):
11781         Update for C FE v1.
11782
11783 2018-04-27  Tom Tromey  <tom@tromey.com>
11784
11785         PR rust/22545:
11786         * rust-lang.c (rust_inclusive_range_type_p): New function.
11787         (rust_range): Handle inclusive ranges.
11788         (rust_compute_range): Likewise.
11789         * rust-exp.y (struct rust_op) <inclusive>: New field.
11790         (DOTDOTEQ): New constant.
11791         (range_expr): Add "..=" productions.
11792         (operator_tokens): Add "..=" token.
11793         (ast_range): Add "inclusive" parameter.
11794         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11795         ranges.
11796         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11797         bounds values.
11798         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11799         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11800         Update comments.
11801         * expprint.c (print_subexp_standard): Handle new bounds values.
11802         (dump_subexp_body_standard): Likewise.
11803
11804 2018-04-27  Tom Tromey  <tom@tromey.com>
11805
11806         * configure: Rebuild.
11807         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11808         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11809         "OVERRIDE".
11810         (class symbol_needs_eval_context): Likewise.
11811         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11812         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11813         "virtual".
11814         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11815         "override".
11816         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11817         * aarch64-tdep.c (instruction_reader::read): Use "override".
11818         (instruction_reader_test::read): Likewise.
11819         * arm-tdep.c (instruction_reader::read): Use "override".
11820         (instruction_reader_thumb::read): Likewise.
11821
11822 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11823
11824         PR remote/9665
11825         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11826         instead of remote_send.
11827         (remote_send): Remove.
11828
11829 2018-04-26  Pedro Alves  <palves@redhat.com>
11830
11831         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11832         find_function_start_sal instead of find_pc_line.
11833
11834 2018-04-26  Pedro Alves  <palves@redhat.com>
11835
11836         * breakpoint.c (set_breakpoint_location_function): Handle
11837         mst_data_gnu_ifunc.
11838         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11839         * elfread.c (elf_symtab_read): Give data symbols with
11840         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11841         (elf_rel_plt_read): Update comment.
11842         * linespec.c (convert_linespec_to_sals): Handle
11843         mst_data_gnu_ifunc.
11844         (minsym_found): Handle mst_data_gnu_ifunc.
11845         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11846         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11847         * parse.c (find_minsym_type_and_address): Handle
11848         mst_data_gnu_ifunc.
11849         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11850         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11851         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11852         comment.
11853         <mst_data_gnu_ifunc>: New enumerator.
11854
11855 2018-04-26  Pedro Alves  <palves@redhat.com>
11856
11857         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11858         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11859         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11860         Handle it.
11861         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11862         (lookup_minimal_symbol_by_pc): Adjust.
11863         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11864         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11865         * minsyms.h (lookup_msym_prefer): New enum.
11866         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11867         parameter by a lookup_msym_prefer parameter.
11868
11869 2018-04-26  Pedro Alves  <palves@redhat.com>
11870
11871         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11872         ends in "@plt" instead of looking at the symbol's section.
11873
11874 2018-04-26  Pedro Alves  <palves@redhat.com>
11875
11876         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11877         all references.
11878         (find_pc_partial_function_gnu_ifunc): Rename to ...
11879         (find_pc_partial_function): ... this, and remove references to
11880         'is_gnu_ifunc_p'.
11881         (find_pc_partial_function): Delete old implementation.
11882         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11883
11884 2018-04-26  Pedro Alves  <palves@redhat.com>
11885
11886         * linespec.c (struct bound_minimal_symbol_search_key): New.
11887         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11888         skip first line if we found a GNU ifunc minimal symbol by name.
11889         (compare_msymbols): Change parameters to work with a destructured
11890         lhs minsym.
11891         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11892         functions.
11893
11894 2018-04-26  Pedro Alves  <palves@redhat.com>
11895
11896         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11897         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11898         address/name.
11899         (add_location_to_breakpoint): Store the minsym and the objfile in
11900         the breakpoint location.
11901         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11902         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11903         Record the minsym in the sal.
11904         * symtab.h (symtab_and_line) <msymbol>: New field.
11905
11906 2018-04-26  Pedro Alves  <palves@redhat.com>
11907
11908         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11909         unless we actually resolved the ifunc.
11910
11911 2018-04-26  Pedro Alves  <palves@redhat.com>
11912
11913         * c-exp.y (variable production): Prefer ifunc minsyms over
11914         regular function symbols.
11915         * symtab.c (find_gnu_ifunc): New function.
11916         * minsyms.h (lookup_msym_prefer): New enum.
11917         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11918         parameter by a lookup_msym_prefer parameter.
11919         * symtab.h (find_gnu_ifunc): New declaration.
11920
11921 2018-04-26  Pedro Alves  <palves@redhat.com>
11922
11923         * blockframe.c (find_gnu_ifunc_target_type): New function.
11924         (find_function_type): New.
11925         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11926         return a value with a memory address.
11927         (eval_call): For calls to GNU ifunc functions, try to find the
11928         type of the target function from the type that the resolver
11929         returns.
11930         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11931         symbols.
11932         * infcall.c (find_function_return_type): Delete.
11933         (find_function_addr): Add 'function_type' parameter.  For calls to
11934         GNU ifunc functions, try to find the type of the target function
11935         from the type that the resolver returns, and return it via
11936         FUNCTION_TYPE.
11937         (call_function_by_hand_dummy): Adjust to use the function type
11938         returned by find_function_addr.
11939         (find_function_addr): Add 'function_type' parameter and move
11940         description here.
11941         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11942         declarations.
11943
11944 2018-04-26  Pedro Alves  <palves@redhat.com>
11945
11946         * c-exp.y (variable production): Skip finding an alias for ifunc
11947         symbols.
11948
11949 2018-04-26  Pedro Alves  <palves@redhat.com>
11950
11951         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11952
11953 2018-04-25  Pedro Alves  <palves@redhat.com>
11954
11955         * infcmd.c (kill_command): Print the pid as string, not the whole
11956         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11957         message.
11958         * remote.c (remote_detach_1): Print the pid as string, not the
11959         whole thread's ptid.
11960
11961 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11962             Sergio Durigan Junior  <sergiodj@redhat.com>
11963             Pedro Alves  <palves@redhat.com>
11964
11965         * infcmd.c (kill_command): Print message when inferior has
11966         been killed.
11967         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11968         '1'.
11969         (add_inferior): Improve message printed when
11970         'print_inferior_events' is on.
11971         (exit_inferior): Remove message printed when
11972         'print_inferior_events' is on.
11973         (detach_inferior): Improve message printed when
11974         'print_inferior_events' is on.
11975         (initialize_inferiors): Use 'add_inferior_silent' to set
11976         'current_inferior_'.
11977         * inferior.h (print_inferior_events): Declare here as
11978         'extern'.
11979         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11980         '[Detaching...]' messages when 'print_inferior_events' is on.
11981         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11982         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11983         'Detaching after fork from child...', replace it by '... from
11984         parent...'.
11985         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11986         prefix/suffix when printing 'Detaching...' messages.  Print
11987         them when 'print_inferior_events' is on.
11988         * remote.c (remote_detach_1): Print message when detaching
11989         from inferior and '!is_fork_parent'.
11990
11991 2018-04-24  Tom Tromey  <tom@tromey.com>
11992
11993         * cli-out.h: Reindent.
11994
11995 2018-04-24  Tom Tromey  <tom@tromey.com>
11996
11997         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11998         (cli_ui_out::do_field_string): Use fputs_filtered.
11999         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12000
12001 2018-04-23  Tom Tromey  <tom@tromey.com>
12002
12003         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12004         gdb::unique_xmalloc_ptr.
12005
12006 2018-04-23  Tom Tromey  <tom@tromey.com>
12007
12008         * configure: Rebuild.
12009
12010 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12011
12012         PR gdb/23095
12013         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12014         prepare_for_testing.  Set normal_bp to r_debug_state if target
12015         is bsd.
12016
12017 2018-04-21  Pedro Alves  <palves@redhat.com>
12018             Rajendra SY  <rajendra.sy@gmail.com>
12019
12020         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12021         * remote.c (extended_remote_attach): In all-stop mode, mark the
12022         thread as executing.
12023
12024 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12025
12026         * thread.c (thread_apply_all_command): Fix comment.
12027         (thread_command): Fix comment.
12028
12029 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12030
12031         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12032         parameter.
12033         * features/aarch64-core.c (create_feature_aarch64_core):
12034         Regenerate.
12035         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12036         Likewise.
12037         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12038         Likewise.
12039         * features/i386/32bit-avx512.c
12040         (create_feature_i386_32bit_avx512): Likewise.
12041         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12042         Likewise.
12043         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12044         Likewise.
12045         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12046         Likewise.
12047         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12048         Likewise.
12049         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12050         Likewise.
12051         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12052         Likewise.
12053         * features/i386/64bit-avx512.c
12054         (create_feature_i386_64bit_avx512): Likewise.
12055         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12056         Likewise.
12057         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12058         Likewise.
12059         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12060         Likewise.
12061         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12062         Likewise.
12063         * features/i386/64bit-segments.c
12064         (create_feature_i386_64bit_segments): Likewise.
12065         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12066         Likewise.
12067         * features/i386/x32-core.c
12068         (create_feature_i386_x32_core): Likewise.
12069         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12070         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12071         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12072         * target-descriptions.c: In generated code, don't pass xml
12073         filename.
12074
12075 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12076
12077         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12078         (print_xml_feature::visit_post): Likewise.
12079         (print_xml_feature::visit): Likewise.
12080         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12081         (print_xml_feature): Add new class.
12082         * regformats/regdat.sh: Null xmltarget on feature targets.
12083         * target-descriptions.c (struct target_desc): Add xmltarget.
12084         (maintenance_check_tdesc_xml_convert): Add unittest function.
12085         (tdesc_get_features_xml): Add function to get xml.
12086         (maintenance_check_xml_descriptions): Test xml generation.
12087         * xml-tdesc.c (string_read_description_xml): Add function.
12088         * xml-tdesc.h (string_read_description_xml): Add declaration.
12089
12090 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12091
12092         * features/Makefile: Add feature marker to targets with new style
12093         target descriptions.
12094         * regformats/aarch64.dat: Regenerate.
12095         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12096         * regformats/i386/amd64-avx-linux.dat: Likewise.
12097         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12098         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12099         * regformats/i386/amd64-linux.dat: Likewise.
12100         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12101         * regformats/i386/amd64.dat: Likewise.
12102         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12103         * regformats/i386/i386-avx-linux.dat: Likewise.
12104         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12105         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12106         * regformats/i386/i386-linux.dat: Likewise.
12107         * regformats/i386/i386-mmx-linux.dat: Likewise.
12108         * regformats/i386/i386-mpx-linux.dat: Likewise.
12109         * regformats/i386/i386.dat: Likewise.
12110         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12111         * regformats/i386/x32-avx-linux.dat: Likewise.
12112         * regformats/i386/x32-linux.dat: Likewise.
12113         * regformats/tic6x-c62x-linux.dat: Likewise.
12114         * regformats/tic6x-c64x-linux.dat: Likewise.
12115         * regformats/tic6x-c64xp-linux.dat: Likewise.
12116         * regformats/regdat.sh: Parse feature marker.
12117
12118 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12119
12120         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12121         (tdesc_osabi_name): Likewise.
12122         * target-descriptions.c (tdesc_architecture_name): Add new
12123         function.
12124         (tdesc_osabi_name): Likewise.
12125
12126 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12127
12128         * common/tdesc.c (tdesc_predefined_type): Move to here.
12129         (tdesc_named_type): Likewise.
12130         (tdesc_create_vector): Likewise.
12131         (tdesc_create_struct): Likewise.
12132         (tdesc_set_struct_size): Likewise.
12133         (tdesc_create_union): Likewise.
12134         (tdesc_create_flags): Likewise.
12135         (tdesc_create_enum): Likewise.
12136         (tdesc_add_field): Likewise.
12137         (tdesc_add_typed_bitfield): Likewise.
12138         (tdesc_add_bitfield): Likewise.
12139         (tdesc_add_flag): Likewise.
12140         (tdesc_add_enum_value): Likewise.
12141         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12142         (struct tdesc_type_vector): Likewise.
12143         (struct tdesc_type_field): Likewise.
12144         (struct tdesc_type_with_fields): Likewise.
12145         (tdesc_create_enum): Add declaration.
12146         (tdesc_add_typed_bitfield): Likewise.
12147         (tdesc_add_enum_value): Likewise.
12148         * target-descriptions.c (tdesc_type_field): Move from here.
12149         (tdesc_type_builtin): Likewise.
12150         (tdesc_type_vector): Likewise.
12151         (tdesc_type_with_fields): Likewise.
12152         (tdesc_predefined_types): Likewise.
12153         (tdesc_named_type): Likewise.
12154         (tdesc_create_vector): Likewise.
12155         (tdesc_create_struct): Likewise.
12156         (tdesc_set_struct_size): Likewise.
12157         (tdesc_create_union): Likewise.
12158         (tdesc_create_flags): Likewise.
12159         (tdesc_create_enum): Likewise.
12160         (tdesc_add_field): Likewise.
12161         (tdesc_add_typed_bitfield): Likewise.
12162         (tdesc_add_bitfield): Likewise.
12163         (tdesc_add_flag): Likewise.
12164         (tdesc_add_enum_value): Likewise.
12165         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12166         (tdesc_add_typed_bitfield): Likewise.
12167         (tdesc_add_enum_value): Likewise.
12168
12169 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12170
12171         * common/tdesc.c (tdesc_feature::accept): Move to here.
12172         (tdesc_feature::operator==): Likewise.
12173         (tdesc_create_reg): Likewise.
12174         * common/tdesc.h (tdesc_type_kind): Likewise.
12175         (struct tdesc_type): Likewise.
12176         (struct tdesc_feature): Likewise.
12177         * regformats/regdat.sh: Create a feature.
12178         * target-descriptions.c (tdesc_type_kind): Move from here.
12179         (tdesc_type): Likewise.
12180         (tdesc_type_up): Likewise.
12181         (tdesc_feature): Likewise.
12182         (tdesc_create_reg): Likewise.
12183
12184 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12185
12186         * Makefile.in: Add arch/tdesc.c
12187         * common/tdesc.c: New file.
12188         * common/tdesc.h (tdesc_element_visitor): Move to here.
12189         (tdesc_element): Likewise.
12190         (tdesc_reg): Likewise.
12191         (tdesc_reg_up): Likewise.
12192         * regformats/regdef.h (reg): Add offset to constructors.
12193         * target-descriptions.c (tdesc_element_visitor): Move from here.
12194         (tdesc_element): Likewise.
12195         (tdesc_reg): Likewise.
12196         (tdesc_reg_up): Likewise.
12197
12198 2018-04-17  Tom Tromey  <tom@tromey.com>
12199
12200         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12201         discriminant field.
12202
12203 2018-04-17  Tom Tromey  <tom@tromey.com>
12204
12205         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12206
12207 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12208
12209         * symtab.c (print_symbol_info): Skip printing filename and line
12210         number when `last' is NULL.
12211         (symtab_symbol_info): Use empty string instead of NULL for first
12212         invocation of print_symbol_info.
12213         (rbreak_command): Pass NULL to `last' parameter of
12214         print_symbol_info.
12215
12216 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12217
12218         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12219         instead of nullptr.
12220
12221 2018-04-16  Pedro Alves  <palves@redhat.com>
12222
12223         * MAINTAINERS (sh): Remove.
12224         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12225         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12226         (ALLDEPFILES): Remove sh64-tdep.c.
12227         * NEWS: Mentions that support for SH-5/SH64 is removed.
12228         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12229         (sh*-*-openbsd*): Ditto.
12230         (sh64-*-elf*): Remove.
12231         (sh*): Remove.
12232         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12233         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12234         * sh-tdep.c: No longer include "sh64-tdep.h".
12235         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12236         * sh64-tdep.c, sh64-tdep.h: Remove files.
12237
12238 2018-04-16  Pedro Alves  <palves@redhat.com>
12239
12240         * MAINTAINERS: Remove m88k.
12241         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12242         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12243         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12244         * NEWS: Mention that support for m88k was removed.
12245         * configure.host (m88*-*-*): Remove support.
12246         * configure.nat (m88k-*-*): Remove support.
12247         * configure.tgt (m88*-*-openbsd*): Remove.
12248         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12249
12250 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12251
12252         * configure.tgt (x86_tobjs): New variable.
12253         (amd64_tobjs, i386_tobjs): Use it.
12254
12255 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12256
12257         * symtab.c (print_symbol_info): Precede the symbol definition by
12258         the line number when available.
12259         * NEWS: Advertise this enhancement.
12260
12261 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12262
12263         * NEWS (New options): announce set/show record btrace cpu.
12264         * btrace.c: Include record-btrace.h.
12265         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12266         the vendor is unknown.
12267         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12268         Maybe overwrite the btrace configuration's cpu.
12269         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12270         (btrace_fetch): Add cpu parameter.  Update callers.
12271         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12272         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12273         errata workarounds if the vendor is unknown.
12274         * python/py-record-btrace.c: Include record-btrace.h.
12275         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12276         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12277         * record-btrace.c (record_btrace_cpu_state_kind): New.
12278         (record_btrace_cpu): New.
12279         (set_record_btrace_cpu_cmdlist): New.
12280         (record_btrace_get_cpu): New.
12281         (require_btrace_thread, record_btrace_info)
12282         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12283         (cmd_set_record_btrace_cpu_none): New.
12284         (cmd_set_record_btrace_cpu_auto): New.
12285         (cmd_set_record_btrace_cpu): New.
12286         (cmd_show_record_btrace_cpu): New.
12287         (_initialize_record_btrace): Initialize set/show record btrace cpu
12288         commands.
12289         * record-btrace.h (record_btrace_get_cpu): New.
12290
12291 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12292
12293         * record.c (set_record_command): Fix typo in message.
12294
12295 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12296
12297         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12298
12299 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12300
12301         * infrun.c (process_event_stop_test): Call
12302         gdbarch_in_indirect_branch_thunk.
12303         * gdbarch.sh (in_indirect_branch_thunk): New.
12304         * gdbarch.c: Regenerated.
12305         * gdbarch.h: Regenerated.
12306         * x86-tdep.h: New.
12307         * x86-tdep.c: New.
12308         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12309         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12310         (ALLDEPFILES): Add x86-tdep.c.
12311         * arch-utils.h (default_in_indirect_branch_thunk): New.
12312         * arch-utils.c (default_in_indirect_branch_thunk): New.
12313         * i386-tdep: Include x86-tdep.h.
12314         (i386_in_indirect_branch_thunk): New.
12315         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12316         function.
12317         * amd64-tdep: Include x86-tdep.h.
12318         (amd64_in_indirect_branch_thunk): New.
12319         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12320
12321 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12322
12323         PR gdb/23053
12324         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12325         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12326         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12327         regression.
12328
12329 2018-04-12  Tom Tromey  <tom@tromey.com>
12330
12331         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12332         (rust_evaluate_subexp): Likewise.
12333
12334 2018-04-12  Pedro Alves  <palves@redhat.com>
12335
12336         * procfs.c (procfs_detach): Make forward declaration's prototype
12337         match definition's protototype.
12338         (proc_get_LDT_entry): Remove stale do_cleanups call.
12339
12340 2018-04-12  Pedro Alves  <palves@redhat.com>
12341
12342         * target.h (target_ops::to_has_exited): Delete.
12343         (target_has_exited): Delete.
12344         * target-delegates.c: Regenerate.
12345
12346 2018-04-11  Pedro Alves  <palves@redhat.com>
12347
12348         * target.c (fileio_fh_t::t): Add comment.
12349         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12350         (target_fileio_close): Handle a NULL target.
12351         (invalidate_fileio_fh): New.
12352         (target_close): Call it.
12353         * remote.c (remote_hostio_send_command): No longer check whether
12354         remote_desc is open.
12355
12356 2018-04-11  Pedro Alves  <palves@redhat.com>
12357
12358         * target.c (fileio_fh_t): Make it a named struct instead of a
12359         typedef.
12360         (fileio_fh_t::is_closed): New method.
12361         (DEF_VEC_O (fileio_fh_t)): Remove.
12362         (fileio_fhandles): Now a std::vector.
12363         (is_closed_fileio_fh): Delete.
12364         (acquire_fileio_fd): Adjust.  Rename parameters.
12365         (release_fileio_fd): Adjust.
12366         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12367         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12368         (target_fileio_close): Adjust.
12369
12370 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12371
12372         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12373         index.
12374
12375 2018-04-10  Pedro Alves  <palves@redhat.com>
12376
12377         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12378         (scoped_finish_thread_state): New class.
12379         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12380         cleanup.
12381         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12382         (fetch_inferior_event, normal_stop): Likewise.
12383         * thread.c (finish_thread_state_cleanup): Delete.
12384
12385 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12386             Pedro Alves  <palves@redhat.com>
12387
12388         * value.c: Include "selftest.h" and "common/array-view.h".
12389         (struct range) <operator ==>: New.
12390         (test_ranges_contain): New.
12391         (check_ranges_vector): New.
12392         (test_insert_into_bit_range_vector): New.
12393         (_initialize_values): Register selftests.
12394         * common/array-view.h (operator==, operator!=): New.
12395
12396 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12397
12398         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12399         an iterator.
12400         * inline-frame.c: Include <algorithm>.
12401         (struct inline_state): Add constructor.
12402         (inline_state_s): Remove.
12403         (DEF_VEC_O(inline_state_s)): Remove.
12404         (inline_states): Change type to std::vector.
12405         (find_inline_frame_state): Adjust to std::vector.
12406         (allocate_inline_frame_state): Remove.
12407         (clear_inline_frame_state): Adjust to std::vector.
12408         (skip_inline_frames): Adjust to std::vector.
12409
12410 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12411
12412         * tracepoint.h (struct trace_state_variable): Add constructor.
12413         <name>: Change type to std::string.
12414         * tracepoint.c (tsv_s): Remove.
12415         (DEF_VEC_O(tsv_s)): Remove.
12416         (tvariables): Change to std::vector.
12417         (create_trace_state_variable): Adjust to std::vector.
12418         (find_trace_state_variable): Likewise.
12419         (find_trace_state_variable_by_number): Likewise.
12420         (delete_trace_state_variable): Likewise.
12421         (trace_variable_command): Adjust to std::string.
12422         (delete_trace_variable_command): Likewise.
12423         (tvariables_info_1): Adjust to std::vector.
12424         (save_trace_state_variables): Likewise.
12425         (start_tracing): Likewise.
12426         (merge_uploaded_trace_state_variables): Adjust to std::vector
12427         and std::string.
12428         * target.h (struct target_ops)
12429         <to_download_trace_state_variable>: Pass reference to
12430         trace_state_variable.
12431         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12432         * target-delegates.c: Re-generate.
12433         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12434         (mi_tsv_deleted): Likewise.
12435         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12436         * remote.c (remote_download_trace_state_variable): Change
12437         pointer to reference and adjust.
12438         * make-target-delegates (parse_argtypes): Handle references.
12439         (write_function_header): Likewise.
12440         (munge_type): Likewise.
12441
12442 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12443
12444         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12445         string_view-selftests.c.
12446         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12447         testsuite.
12448         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12449         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12450         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12451         * unittests/basic_string_view/element_access/char/1.cc:
12452         Likewise.
12453         * unittests/basic_string_view/element_access/char/empty.cc:
12454         Likewise.
12455         * unittests/basic_string_view/element_access/char/front_back.cc:
12456         Likewise.
12457         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12458         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12459         Likewise.
12460         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12461         Likewise.
12462         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12463         Likewise.
12464         * unittests/basic_string_view/operations/compare/char/1.cc:
12465         Likewise.
12466         * unittests/basic_string_view/operations/compare/char/13650.cc:
12467         Likewise.
12468         * unittests/basic_string_view/operations/copy/char/1.cc:
12469         Likewise.
12470         * unittests/basic_string_view/operations/data/char/1.cc:
12471         Likewise.
12472         * unittests/basic_string_view/operations/find/char/1.cc:
12473         Likewise.
12474         * unittests/basic_string_view/operations/find/char/2.cc:
12475         Likewise.
12476         * unittests/basic_string_view/operations/find/char/3.cc:
12477         Likewise.
12478         * unittests/basic_string_view/operations/find/char/4.cc:
12479         Likewise.
12480         * unittests/basic_string_view/operations/rfind/char/1.cc:
12481         Likewise.
12482         * unittests/basic_string_view/operations/rfind/char/2.cc:
12483         Likewise.
12484         * unittests/basic_string_view/operations/rfind/char/3.cc:
12485         Likewise.
12486         * unittests/basic_string_view/operations/substr/char/1.cc:
12487         Likewise.
12488         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12489         * unittests/string_view-selftests.c: New file.
12490
12491 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12492
12493         * unittests/basic_string_view/capacity/1.cc: New file.
12494         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12495         * unittests/basic_string_view/cons/char/1.cc: New file.
12496         * unittests/basic_string_view/cons/char/2.cc: New file.
12497         * unittests/basic_string_view/cons/char/3.cc: New file.
12498         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12499         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12500         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12501         * unittests/basic_string_view/element_access/char/1.cc: New file.
12502         * unittests/basic_string_view/element_access/char/2.cc: New file.
12503         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12504         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12505         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12506         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12507         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12508         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12509         * unittests/basic_string_view/include.cc: New file.
12510         * unittests/basic_string_view/inserters/char/1.cc: New file.
12511         * unittests/basic_string_view/inserters/char/2.cc: New file.
12512         * unittests/basic_string_view/inserters/char/3.cc: New file.
12513         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12514         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12515         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12516         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12517         * unittests/basic_string_view/literals/types.cc: New file.
12518         * unittests/basic_string_view/literals/values.cc: New file.
12519         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12520         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12521         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12522         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12523         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12524         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12525         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12526         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12527         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12528         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12529         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12530         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12531         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12532         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12533         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12534         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12535         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12536         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12537         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12538         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12539         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12540         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12541         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12542         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12543         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12544         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12545         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12546         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12547         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12548         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12549         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12550         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12551         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12552         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12553         * unittests/basic_string_view/operators/char/2.cc: New file.
12554         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12555         * unittests/basic_string_view/range_access/char/1.cc: New file.
12556         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12557         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12558         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12559         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12560         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12561         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12562         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12563         * unittests/basic_string_view/typedefs.cc: New file.
12564         * unittests/basic_string_view/types/1.cc: New file.
12565
12566 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12567
12568         * common/gdb_string_view.h: Remove libstdc++ implementation
12569         details, adjust to gdb reality.
12570         * common/gdb_string_view.tcc: Likewise.
12571         * cli/cli-script.c (struct string_view): Remove.
12572         (user_args) <m_args>: Change element type to gdb::string_view.
12573         (user_args::insert_args): Adjust.
12574
12575 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12576
12577         * common/gdb_string_view.h: New file.
12578         * common/gdb_string_view.tcc: New file.
12579
12580 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12581
12582         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12583         * configure: Re-generate.
12584
12585 2018-04-09  Pedro Alves  <palves@redhat.com>
12586
12587         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12588         (set_target_gdbarch): Call
12589         gdb::observers::architecture_changed.notify instead of
12590         observer_notify_architecture_changed.
12591
12592 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12593
12594         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12595         (do_restore_current_traceframe_cleanup): Remove.
12596         (restore_current_traceframe_cleanup_dtor): Remove.
12597         (make_cleanup_restore_current_traceframe): Remove.
12598         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12599         New.
12600         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12601         * infrun.c (fetch_inferior_event): Use
12602         scoped_restore_current_traceframe.
12603
12604 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12605
12606         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12607         Remove.
12608         <n_allocated_type_units>: Remove.
12609         <all_type_units>: Change to std::vector.
12610         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12611         to std::vector change.
12612         (dwarf2_per_objfile::get_cutu): Likewise.
12613         (dwarf2_per_objfile::get_tu): Likewise.
12614         (create_signatured_type_table_from_index): Likewise.
12615         (create_signatured_type_table_from_debug_names): Likewise.
12616         (dw2_symtab_iter_next): Likewise.
12617         (dw2_print_stats): Likewise.
12618         (dw2_expand_all_symtabs): Likewise.
12619         (dw2_expand_marked_cus): Likewise.
12620         (dw2_debug_names_iterator::next): Likewise.
12621         (dwarf2_initialize_objfile): Likewise.
12622         (add_signatured_type_cu_to_table): Likewise.
12623         (create_all_type_units): Likewise.
12624         (add_type_unit): Likewise.
12625         (struct tu_abbrev_offset): Add constructor.
12626         (build_type_psymtabs_1): Adjust to std::vector change.
12627         (print_tu_stats): Likewise.
12628         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12629         (write_debug_names): Likewise.
12630
12631 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12632
12633         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12634         Make an std::vector.
12635         <n_comp_units>: Remove.
12636         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12637         to std::vector change.
12638         (dwarf2_per_objfile::get_cutu): Likewise.
12639         (dwarf2_per_objfile::get_cu): Likewise.
12640         (create_cus_from_index): Likewise.
12641         (create_addrmap_from_index): Likewise.
12642         (create_addrmap_from_aranges): Likewise.
12643         (dwarf2_read_index): Likewise.
12644         (dw2_find_last_source_symtab): Likewise.
12645         (dw2_map_symtabs_matching_filename): Likewise.
12646         (dw2_symtab_iter_next): Likewise.
12647         (dw2_print_stats): Likewise.
12648         (dw2_expand_all_symtabs): Likewise.
12649         (dw2_expand_symtabs_with_fullname): Likewise.
12650         (dw2_expand_marked_cus): Likewise.
12651         (dw2_map_symbol_filenames): Likewise.
12652         (create_cus_from_debug_names): Likewise.
12653         (dwarf2_read_debug_names): Likewise.
12654         (dw2_debug_names_iterator::next): Likewise.
12655         (dwarf2_initialize_objfile): Likewise.
12656         (set_partial_user): Likewise.
12657         (dwarf2_build_psymtabs_hard): Likewise.
12658         (read_comp_units_from_section): Remove arguments, adjust to
12659         std::vector change.
12660         (create_all_comp_units): Adjust to std::vector and
12661         read_comp_units_from_section changes.
12662         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12663         change.
12664         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12665         (psyms_seen_size): Likewise.
12666         (write_gdbindex): Likewise.
12667         (write_debug_names): Likewise.
12668
12669 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12670
12671         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12672         with dwarf2_per_objfile.
12673         (create_cus_from_index): Likewise.
12674         (create_signatured_type_table_from_index): Likewise.
12675         (dwarf2_read_index): Likewise.
12676         (dwarf2_initialize_objfile): Likewise.
12677         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12678         per_cu rather than get_dwarf2_per_objfile.
12679
12680 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12681
12682         * dwarf2read.h (struct signatured_type): Forward declare.
12683         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12684         New methods.
12685         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12686         (dw2_get_cutu): ...this.
12687         (dwarf2_per_objfile::get_cu): Rename from...
12688         (dw2_get_cu): ...this.
12689         (dwarf2_per_objfile::get_tu): New.
12690         (create_addrmap_from_index): Adjust.
12691         (create_addrmap_from_aranges): Adjust.
12692         (dw2_find_last_source_symtab): Adjust.
12693         (dw2_map_symtabs_matching_filename): Adjust.
12694         (dw2_symtab_iter_next): Adjust.
12695         (dw2_print_stats): Adjust.
12696         (dw2_expand_all_symtabs): Adjust.
12697         (dw2_expand_symtabs_with_fullname): Adjust.
12698         (dw2_expand_marked_cus): Adjust.
12699         (dw_expand_symtabs_matching_file_matcher): Adjust.
12700         (dw2_map_symbol_filenames): Adjust.
12701         (dw2_debug_names_iterator::next): Adjust.
12702         (dwarf2_initialize_objfile): Adjust.
12703         (set_partial_user): Adjust.
12704         (dwarf2_build_psymtabs_hard): Adjust.
12705
12706 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12707
12708         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12709         Remove unused variables.
12710         (dw2_map_symtabs_matching_filename): Likewise.
12711         (dwarf2_record_block_ranges): Likewise.
12712         (dwarf2_read_addr_index): Likewise.
12713         (follow_die_offset): Likewise.
12714
12715 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12716
12717         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12718         to symbol_file_add_main.
12719
12720 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12721
12722         PR mi/22299
12723         * mi/mi-console.c (do_fputc_async_safe): New.
12724         (mi_console_file::write_async_safe): New.
12725         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12726         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12727         New.
12728         * ui-file.c (ui_file::putstrn): Adjust call to
12729         fputstrn_unfiltered.
12730         * utils.c (printchar): Replace do_fputs and do_fprintf
12731         parameters by do_fputc.
12732         (fputstr_filtered): Adjust call to printchar.
12733         (fputstr_unfiltered): Likewise.
12734         (fputstrn_filtered): Likewise.
12735         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12736         printchar.
12737         * utils.h (do_fputc_ftype): New typedef.
12738         (fputstrn_unfiltered): Add do_fputc parameter.
12739
12740 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12741
12742         * regformats/i386/i386-avx.dat: Remove.
12743
12744 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12745
12746         PR gdb/22979
12747         * amd64-tdep.c (amd64_none_init_abi): New function.
12748         (amd64_x32_none_init_abi): New function.
12749         (_initialize_amd64_tdep): Register handlers for x86-64 and
12750         x64_32 with GDB_OSABI_NONE.
12751         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12752         GDB_OSABI_NONE osabi.
12753
12754 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12755
12756         PR gdb/22980
12757         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12758         GDB_OSABI_NONE.
12759         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12760         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12761
12762 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12763
12764         * common/byte-vector.h (char_vector): New type.
12765         * target.h (target_read_alloc): Return
12766         gdb::optional<byte_vector>.
12767         (target_read_stralloc): Return gdb::optional<char_vector>.
12768         (target_get_osdata): Return gdb::optional<char_vector>.
12769         * target.c (target_read_alloc_1): Templatize.  Replacement
12770         manual memory management with vector.
12771         (target_read_alloc): Change return type, adjust.
12772         (target_read_stralloc): Change return type, adjust.
12773         (target_get_osdata): Change return type, adjust.
12774         * auxv.c (struct auxv_info) <length>: Remove.
12775         <data>: Change type to gdb::optional<byte_vector>.
12776         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12777         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12778         (target_auxv_search): Adjust.
12779         (fprint_target_auxv): Adjust.
12780         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12781         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12782         (linux_make_corefile_notes): Adjust.
12783         * osdata.c (get_osdata): Adjust.
12784         * remote.c (remote_get_threads_with_qxfer): Adjust.
12785         (remote_memory_map): Adjust.
12786         (remote_traceframe_info): Adjust.
12787         (btrace_read_config): Adjust.
12788         (remote_read_btrace): Adjust.
12789         (remote_pid_to_exec_file): Adjust.
12790         * solib-aix.c (solib_aix_get_library_list): Adjust.
12791         * solib-dsbt.c (decode_loadmap): Don't free buf.
12792         (dsbt_get_initial_loadmaps): Adjust.
12793         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12794         * solib-target.c (solib_target_current_sos): Adjust.
12795         * tracepoint.c (sdata_make_value): Adjust.
12796         * xml-support.c (xinclude_start_include): Adjust.
12797         (xml_fetch_content_from_file): Adjust.
12798         * xml-support.h (xml_fetch_another): Change return type.
12799         (xml_fetch_content_from_file): Change return type.
12800         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12801         * xml-tdesc.c (file_read_description_xml): Adjust.
12802         (fetch_available_features_from_target): Change return type.
12803         (target_fetch_description_xml): Adjust.
12804         (target_read_description_xml): Adjust.
12805
12806 2018-04-06  Tom Tromey  <tom@tromey.com>
12807
12808         * value.c (~value): Update.
12809         (struct value) <contents>: Now unique_xmalloc_ptr.
12810         (value_contents_bits_eq, allocate_value_contents)
12811         (value_contents_raw, value_contents_all_raw)
12812         (value_contents_for_printing, value_contents_for_printing_const)
12813         (set_value_enclosing_type): Update.
12814
12815 2018-04-06  Tom Tromey  <tom@tromey.com>
12816
12817         * value.c (range_s): Remove typedef, VEC.
12818         (struct range): Add operator<.
12819         (range_lessthan): Remove.
12820         (ranges_contain): Change type.
12821         (~value): Update.
12822         (struct value) <unavailable, optimized_out>: Now std::vector.
12823         (value_entirely_available)
12824         (value_entirely_covered_by_range_vector)
12825         (value_entirely_unavailable, value_entirely_optimized_out):
12826         Update.
12827         (insert_into_bit_range_vector): Change argument type.
12828         (find_first_range_overlap): Likewise.
12829         (struct ranges_and_idx, value_contents_bits_eq)
12830         (require_not_optimized_out, require_available): Update.
12831         (ranges_copy_adjusted): Change argument types.
12832         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12833
12834 2018-04-06  Tom Tromey  <tom@tromey.com>
12835
12836         * value.c (~value): Update.
12837         (struct value) <parent>: Now a value_ref_ptr.
12838         (value_parent, set_value_parent, value_address, value_copy):
12839         Update.
12840
12841 2018-04-06  Tom Tromey  <tom@tromey.com>
12842
12843         * value.c (struct value): Add constructor, destructor, and member
12844         initializers.
12845         (allocate_value_lazy, value_decref): Update.
12846
12847 2018-04-06  Tom Tromey  <tom@tromey.com>
12848
12849         * value.c (struct value) <released, next>: Remove.
12850         (all_values): Now a std::vector.
12851         (allocate_value_lazy): Update.
12852         (value_next): Remove.
12853         (value_mark, value_free_to_mark, release_value)
12854         (value_release_to_mark): Update.
12855
12856 2018-04-06  Tom Tromey  <tom@tromey.com>
12857
12858         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12859         (free_value_chain): Remove.
12860         * value.c (free_value_chain): Remove.
12861         (value_release_to_mark): Return a std::vector.
12862         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12863         std::vector.
12864         (check_condition): Update.
12865         * eval.c (fetch_subexp_value): Change "val_chain" to a
12866         std::vector.
12867         * breakpoint.c (update_watchpoint): Update.
12868         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12869
12870 2018-04-06  Tom Tromey  <tom@tromey.com>
12871
12872         * value.h (free_all_values): Remove.
12873         * value.c (free_all_values): Remove.
12874
12875 2018-04-06  Tom Tromey  <tom@tromey.com>
12876
12877         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12878         (value_history_chain, value_history_count): Remove.
12879         (value_history): New global.
12880         (record_latest_value, access_value_history, show_values)
12881         (preserve_values): Update.
12882
12883 2018-04-06  Tom Tromey  <tom@tromey.com>
12884
12885         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12886         * varobj.c (varobj_set_display_format, varobj_set_value)
12887         (install_default_visualizer, construct_visualizer)
12888         (install_new_value, ~varobj, varobj_get_value_type)
12889         (my_value_of_variable, varobj_editable_p): Update.
12890         * c-varobj.c (c_describe_child, c_value_of_variable)
12891         (cplus_number_of_children, cplus_describe_child): Update.
12892         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12893         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12894         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12895
12896 2018-04-06  Tom Tromey  <tom@tromey.com>
12897
12898         * printcmd.c (last_examine_address): Change type to
12899         value_ref_ptr.
12900         (do_examine, x_command): Update.
12901
12902 2018-04-06  Tom Tromey  <tom@tromey.com>
12903
12904         * value.c (release_value): Update.
12905         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12906         (struct bpstats) <val>: Now a value_ref_ptr.
12907         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12908         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12909         (~watchpoint, print_it_watchpoint, watch_command_1)
12910         (invalidate_bp_value_on_memory_change): Update.
12911
12912 2018-04-06  Tom Tromey  <tom@tromey.com>
12913
12914         * varobj.c (varobj_clear_saved_item)
12915         (update_dynamic_varobj_children, install_new_value, ~varobj):
12916         Update.
12917         * value.h (value_incref): Move declaration earlier.
12918         (value_decref): Rename from value_free.
12919         (struct value_ref_policy): New.
12920         (value_ref_ptr): New typedef.
12921         (struct value_deleter): Remove.
12922         (gdb_value_up): Remove typedef.
12923         (release_value): Change return type.
12924         (release_value_or_incref): Remove.
12925         * value.c (set_value_parent): Update.
12926         (value_incref): Change return type.
12927         (value_decref): Rename from value_free.
12928         (value_free_to_mark, free_all_values, free_value_chain): Update.
12929         (release_value): Return value_ref_ptr.
12930         (release_value_or_incref): Remove.
12931         (record_latest_value, set_internalvar, clear_internalvar):
12932         Update.
12933         * stack.c (info_frame_command): Don't call value_free.
12934         * python/py-value.c (valpy_dealloc, valpy_new)
12935         (value_to_value_object): Update.
12936         * printcmd.c (do_examine): Update.
12937         * opencl-lang.c (lval_func_free_closure): Update.
12938         * mi/mi-main.c (register_changed_p): Don't call value_free.
12939         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12940         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12941         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12942         value_free.
12943         * guile/scm-value.c (vlscm_free_value_smob)
12944         (vlscm_scm_from_value): Update.
12945         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12946         (frame_unwind_register_unsigned, get_frame_register_bytes)
12947         (put_frame_register_bytes): Don't call value_free.
12948         * findvar.c (address_from_register): Don't call value_free.
12949         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12950         * dwarf2loc.c (entry_data_value_free_closure)
12951         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12952         (dwarf2_evaluate_loc_desc_full): Update.
12953         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12954         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12955         (~watchpoint, watch_command_1)
12956         (invalidate_bp_value_on_memory_change): Update.
12957         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12958
12959 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12960
12961         PR gdb/23022
12962         * warning.m4: Add -Wno-error=deprecated-register.
12963         * configure: Re-generate.
12964
12965 2018-04-05  Tom Tromey  <tom@tromey.com>
12966
12967         * linespec.h: Remove include of "vec.h".
12968
12969 2018-04-05  Tom Tromey  <tom@tromey.com>
12970
12971         * linespec.c (typep): Remove typedef.
12972         (find_methods, find_superclass_methods): Take a std::vector.
12973         (find_method): Use std::vector.
12974
12975 2018-04-05  Tom Tromey  <tom@tromey.com>
12976
12977         * utils.c (compare_strings): Remove.
12978         * utils.h (compare_strings): Remove.
12979         * objc-lang.h (find_imps): Update.
12980         * objc-lang.c (find_methods): Take a std::vector.
12981         (uniquify_strings, find_imps): Likewise.
12982         * linespec.c (find_methods): Take a std::vector.
12983         (decode_objc): Use std::vector.
12984         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12985         a std::vector.
12986         (find_method, find_function_symbols): Use std::vector.
12987
12988 2018-04-05  Tom Tromey  <tom@tromey.com>
12989
12990         * completer.c (completion_tracker::completion_tracker): Remove
12991         cast.
12992         (completion_tracker::discard_completions): Likewise.
12993         * breakpoint.c (ambiguous_names_p): Remove cast.
12994         * ada-lang.c (_initialize_ada_language): Remove cast.
12995         * utils.h (streq): Update.
12996         (streq_hash): Add new declaration.
12997         * utils.c (streq): Return bool.
12998         (streq_hash): New function.
12999
13000 2018-04-05  Tom Tromey  <tom@tromey.com>
13001
13002         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13003         Remove a string copy.
13004
13005 2018-04-05  Tom Tromey  <tom@tromey.com>
13006
13007         * linespec.c (filter_results): Use std::vector.
13008         (decode_line_2, decode_line_full): Update.
13009
13010 2018-04-05  Tom Tromey  <tom@tromey.com>
13011
13012         * linespec.c (canonical_to_fullform): Return std::string.
13013         (filter_results): Update.
13014         (struct decode_line_2_item): Add constructor.
13015         <fullform, displayform>: Now std::string.
13016         (decode_line_2_compare_items): Now a std::sort comparator.
13017         (decode_line_2): Update.
13018
13019 2018-04-05  Tom Tromey  <tom@tromey.com>
13020
13021         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13022         (unexpected_linespec_error): Update.
13023         (linespec_parse_basic, parse_linespec): Update.
13024
13025 2018-04-05  Tom Tromey  <tom@tromey.com>
13026
13027         * linespec.c (linespec_parse_basic): Reindent.
13028
13029 2018-04-05  Tom Tromey  <tom@tromey.com>
13030
13031         * minsyms.h (iterate_over_minimal_symbols): Update.
13032         * minsyms.c (iterate_over_minimal_symbols): Take a
13033         gdb::function_view.
13034         * linespec.c (struct collect_minsyms): Remove.
13035         (compare_msyms): Now a std::sort comparator.
13036         (add_minsym): Add parameters.
13037         (search_minsyms_for_name): Update.  Use std::vector.
13038
13039 2018-04-03  Tom Tromey  <tom@tromey.com>
13040
13041         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13042         gdb::byte_vector.
13043
13044 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13045
13046         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13047
13048 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13049
13050         PR gdb/16959
13051         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13052         printing static type.
13053
13054 2018-04-01  Tom Tromey  <tom@tromey.com>
13055
13056         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13057         (rs6000_xfer_shared_libraries): Update.
13058
13059 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13060
13061         * common/gdb_vecs.h (char_ptr): Remove.
13062         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13063
13064 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13065
13066         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13067         with std::vector.
13068         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13069
13070 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13071
13072         * tracepoint.h (struct uploaded_tp): Initialize fields.
13073         <actions, step_actions, cmd_strings>: Change type to
13074         std::vector<char *>.
13075         * tracepoint.c (get_uploaded_tp): Allocate with new.
13076         (free_uploaded_tps): Free with delete.
13077         (parse_tracepoint_definition): Adjust to std::vector change.
13078         * breakpoint.c (read_uploaded_action): Likewise.
13079         (create_tracepoint_from_upload): Likewise.
13080         * ctf.c (ctf_write_uploaded_tp): Likewise.
13081         (SET_ARRAY_FIELD): Likewise.
13082         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13083
13084 2018-03-30  Tom Tromey  <tom@tromey.com>
13085
13086         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13087         std::unique_ptr.
13088         (svr4_keep_data_in_core): Update.
13089         (svr4_read_so_list): Update.
13090
13091 2018-03-30  Tom Tromey  <tom@tromey.com>
13092
13093         * windows-nat.c (handle_output_debug_string, handle_exception):
13094         Update.
13095         * target.h (target_read_string): Update.
13096         * target.c (target_read_string): Change "string" to
13097         unique_xmalloc_ptr.
13098         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13099         Update.
13100         * solib-frv.c (frv_current_sos): Update.
13101         * solib-dsbt.c (dsbt_current_sos): Update.
13102         * solib-darwin.c (darwin_current_sos): Update.
13103         * linux-thread-db.c (inferior_has_bug): Update.
13104         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13105         Update.  Remove alloca.
13106         * ada-lang.c (ada_main_name): Update.
13107
13108 2018-03-30  Tom Tromey  <tom@tromey.com>
13109
13110         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13111         (struct dwo_file_deleter): New.
13112         (dwo_file_up): New typedef.
13113         (open_and_init_dwo_file): Use dwo_file_up.
13114         (free_dwo_file_cleanup): Remove.
13115
13116 2018-03-30  Tom Tromey  <tom@tromey.com>
13117
13118         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13119         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13120
13121 2018-03-30  Tom Tromey  <tom@tromey.com>
13122
13123         * dwarf2read.c (class free_cached_comp_units): New class.
13124         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13125         (free_cached_comp_units): Remove function.
13126
13127 2018-03-30  Tom Tromey  <tom@tromey.com>
13128
13129         * utils.h (make_cleanup_unpush_target): Remove.
13130         * inf-ptrace.c (struct target_unpusher): New.
13131         (target_unpush_up) New typedef.
13132         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13133         target_unpush_up.
13134         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13135
13136 2018-03-27  Tom Tromey  <tom@tromey.com>
13137
13138         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13139
13140 2018-03-27  Pedro Alves  <palves@redhat.com>
13141             Tom Tromey  <tom@tromey.com>
13142
13143         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13144         destructor.  Now a class.
13145         (gdb_readline_wrapper_cleanup): Remove function.
13146         (gdb_readline_wrapper): Remove cleanups.
13147
13148 2018-03-27  Tom Tromey  <tom@tromey.com>
13149
13150         * typeprint.h (struct type_print_options) <local_typedefs,
13151         global_typedefs>: Remove "struct" keyword.
13152         (class typedef_hash_table): New class.
13153         (recursively_update_typedef_hash, add_template_parameters)
13154         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13155         (find_typedef_in_hash): Don't declare.
13156         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13157         (typedef_hash_table::recursively_update): Rename from
13158         recursively_update_typedef_hash.  Now a member.
13159         (typedef_hash_table::add_template_parameters): Rename from
13160         add_template_parameters.  Now a member.
13161         (typedef_hash_table::typedef_hash_table): Now a constructor;
13162         rename from create_typedef_hash.
13163         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13164         rename from free_typedef_hash.
13165         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13166         (do_free_global_table): Remove.
13167         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13168         from copy_type_recursive.
13169         (create_global_typedef_table): Remove.
13170         (typedef_hash_table::find_global_typedef): Now a member of
13171         typedef_hash_table.
13172         (typedef_hash_table::find_typedef): Rename from
13173         find_typedef_in_hash; now a member.
13174         (whatis_exp): Update.
13175         * extension.h (struct ext_lang_type_printers): Add constructor and
13176         destructor.
13177         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13178         declare.
13179         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13180         Now a constructor; rename from start_ext_lang_type_printers.
13181         (ext_lang_type_printers): Now a destructor; rename from
13182         free_ext_lang_type_printers.
13183         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13184         Update.
13185         (c_type_print_base_struct_union): Update.  Remove cleanups.
13186
13187 2018-03-27  Tom Tromey  <tom@tromey.com>
13188
13189         * dwarf-index-write.c: Include <cmath>.
13190
13191 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13192
13193         * NEWS: Add entry describing new "set|show varsize-limit" command.
13194         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13195         command.
13196         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13197         "set variable".
13198
13199 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13200
13201         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13202         dwarf-index-write.c
13203         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13204         * dwarf-index-common.c: New file.
13205         * dwarf-index-common.h: New file.
13206         * dwarf-index-write.c: New file.
13207         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13208         (struct dwarf2_section_info): Move from here.
13209         (dwarf2_section_info_def): Likewise.
13210         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13211         (offset_type): Likewise.
13212         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13213         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13214         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13215         (byte_swap): Likewise.
13216         (MAYBE_SWAP): Likewise.
13217         (dwarf2_per_cu_ptr): Likewise.
13218         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13219         (struct tu_stats): Likewise.
13220         (struct dwarf2_per_objfile): Likewise.
13221         (struct dwarf2_per_cu_data): Likewise.
13222         (struct signatured_type): Likewise.
13223         (sig_type_ptr): Likewise.
13224         (DEF_VEC_P (sig_type_ptr)): Likewise.
13225         (INDEX4_SUFFIX): Likewise.
13226         (INDEX5_SUFFIX): Likewise.
13227         (DEBUG_STR_SUFFIX): Likewise.
13228         (dwarf2_read_section): Make non-static.
13229         (mapped_index_string_hash): Move from here.
13230         (dwarf5_djb_hash): Likewise.
13231         (file_write): Likewise.
13232         (class data_buf): Likewise.
13233         (struct symtab_index_entry): Likewise.
13234         (struct mapped_symtab): Likewise.
13235         (find_slot): Likewise.
13236         (hash_expand): Likewise.
13237         (add_index_entry): Likewise.
13238         (uniquify_cu_indices): Likewise.
13239         (class c_str_view): Likewise.
13240         (class c_str_view_hasher): Likewise.
13241         (class vector_hasher): Likewise.
13242         (write_hash_table): Likewise.
13243         (psym_index_map): Likewise.
13244         (struct addrmap_index_data): Likewise.
13245         (add_address_entry): Likewise.
13246         (add_address_entry_worker): Likewise.
13247         (write_address_map): Likewise.
13248         (symbol_kind): Likewise.
13249         (write_psymbols): Likewise.
13250         (struct signatured_type_index_data): Likewise.
13251         (write_one_signatured_type): Likewise.
13252         (recursively_count_psymbols): Likewise.
13253         (recursively_write_psymbols): Likewise.
13254         (class debug_names): Likewise.
13255         (check_dwarf64_offsets): Likewise.
13256         (psyms_seen_size): Likewise.
13257         (write_gdbindex): Likewise.
13258         (write_debug_names): Likewise.
13259         (assert_file_size): Likewise.
13260         (write_psymtabs_to_index): Likewise.
13261         (save_gdb_index_command): Likewise.
13262         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13263         command.
13264         * dwarf2read.h: New file.
13265
13266 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13267
13268         PR gdb/22670
13269         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13270         symbol name if the CU's language stores symbol names in linkage
13271         format.
13272         * language.h (struct language_defn)
13273         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13274         all instances of this struct.
13275
13276 2018-03-26  Tom Tromey  <tom@tromey.com>
13277
13278         * stack.c (backtrace_command_1): Remove verbose code.
13279
13280 2018-03-26  Tom Tromey  <tom@tromey.com>
13281
13282         * python/py-framefilter.c (py_print_type): Don't catch
13283         exceptions.  Return void.
13284         (py_print_value): Likewise.
13285         (py_print_single_arg): Likewise.
13286         (enumerate_args): Don't catch exceptions.
13287         (py_print_args): Likewise.
13288         (py_print_frame): Likewise.
13289         (gdbpy_apply_frame_filter): Catch exceptions here.
13290
13291 2018-03-26  Tom Tromey  <tom@tromey.com>
13292
13293         * stack.c (_initialize_stack): Remove trailing newlines from help
13294         text.  Add "Usage" line to "backtrace" help.
13295
13296 2018-03-26  Tom Tromey  <tom@tromey.com>
13297
13298         PR python/16486:
13299         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13300
13301 2018-03-26  Tom Tromey  <tom@tromey.com>
13302
13303         * python/py-framefilter.c (py_print_single_arg): Return
13304         EXT_LANG_BT_ERROR from catch.
13305
13306 2018-03-26  Tom Tromey  <tom@tromey.com>
13307
13308         PR backtrace/15584:
13309         * stack.c (backtrace_command_1): Move some code into no-filters
13310         "if".
13311
13312 2018-03-26  Tom Tromey  <tom@tromey.com>
13313
13314         * python/py-framefilter.c (throw_quit_or_print_exception): New
13315         function.
13316         (gdbpy_apply_frame_filter): Use it.
13317
13318 2018-03-26  Tom Tromey  <tom@tromey.com>
13319
13320         PR cli/17716:
13321         * python/py-framefilter.c (py_print_type, py_print_value)
13322         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13323         RETURN_MASK_ERROR.
13324
13325 2018-03-26  Tom Tromey  <tom@tromey.com>
13326
13327         * python/py-framefilter.c (enumerate_args): Use
13328         gdb::unique_xmalloc_ptr.
13329
13330 2018-03-26  Tom Tromey  <tom@tromey.com>
13331
13332         * python/py-framefilter.c (py_print_frame): Return
13333         EXT_LANG_BT_OK.
13334         (gdbpy_apply_frame_filter): Update comment.
13335         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13336         Remove.
13337         <EXT_LANG_BT_NO_FILTERS>: Change value.
13338
13339 2018-03-26  Tom Tromey  <tom@tromey.com>
13340
13341         PR backtrace/15582:
13342         * stack.c (backtrace_command): Parse "hide" argument.
13343         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13344         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13345         constant.
13346
13347 2018-03-26  Tom Tromey  <tom@tromey.com>
13348
13349         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13350         add "flags".
13351         (backtrace_command): Remove "fulltrace", add "flags".
13352
13353 2018-03-26  Tom Tromey  <tom@tromey.com>
13354
13355         * stack.c (backtrace_command): Rewrite command line parsing.
13356
13357 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13358
13359         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13360
13361 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13362
13363         * filename-seen-cache.h: Add include guard.
13364
13365 2018-03-26  Keith Seitz  <keiths@redhat.com>
13366
13367         * symfile.c (place_section): Remove "struct" from section_addr_info
13368         in comment.
13369         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13370         "struct" keyword from section_addr_info.
13371
13372 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13373
13374         * regformats/regdef.h (reg): Add constructors.
13375
13376 2018-03-25  Pedro Alves  <palves@redhat.com>
13377
13378         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13379         if then/else bodies in var_func_name extraction.
13380
13381 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13382
13383         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13384         lookup_minimal_symbol() to find symbol entry.
13385         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13386
13387 2018-03-23  Keith Seitz  <keiths@redhat.com>
13388
13389         PR c++/22968
13390         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13391         nested type definitions for C++, too.
13392
13393 2018-03-23  Tom Tromey  <tom@tromey.com>
13394
13395         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13396         a typedef.
13397         (macho_register_oso): Remove.
13398         (macho_symtab_read): Take a std::vector.
13399         (oso_el_compare_name): Now a std::sort comparator.
13400         (macho_symfile_read_all_oso): Take a std::vector.
13401         (macho_symfile_read): Use std::vector.  Remove cleanups.
13402
13403 2018-03-22  Tom Tromey  <tom@tromey.com>
13404
13405         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13406         (record_full_goto_bookmark): Use std::string.
13407
13408 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13409
13410         PR tdep/18295
13411         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13412         a single mask.
13413
13414 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13415
13416         * rs6000-tdep.c (store_insn_p): New function.
13417         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13418         and cr_reg to their unshifted values. Use store_insn_p to
13419         match LR saves using either R1 or fdata->alloca_reg. Use
13420         store_insn_p to match CR saves. Set alloca_reg_offset
13421         when alloca_reg and framep are set. Remove lr_reg shift
13422         when assigning to fdata->lr_register.
13423
13424 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13425
13426         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13427         command line args instead of emitting a warning.
13428
13429 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13430
13431         * tracepoint.h (struct static_tracepoint_marker): Initialize
13432         fields, define default constructor, move constructor and move
13433         assignment, disable the rest.
13434         <str_id, extra>: Make std::string.
13435         (release_static_tracepoint_marker): Remove.
13436         (free_current_marker): Remove.
13437         * tracepoint.c (free_current_marker): Remove.
13438         (parse_static_tracepoint_marker_definition): Adjust to
13439         std::string, use new hex2str overload.
13440         (release_static_tracepoint_marker): Remove.
13441         (print_one_static_tracepoint_marker): Get marker by reference
13442         and adjust to std::string.
13443         (info_static_tracepoint_markers_command): Adjust to std::vector
13444         changes
13445         * target.h (static_tracepoint_marker_p): Remove typedef.
13446         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13447         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13448         bool.
13449         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13450         * target-debug.h
13451         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13452         (target_debug_print_std_vector_static_tracepoint_marker): New.
13453         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13454         to...
13455         (target_debug_print_static_tracepoint_marker_p): ... this.
13456         * target-delegates.c: Re-generate.
13457         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13458         Make std::string.
13459         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13460         (decode_static_tracepoint_spec): Adjust to std::vector.
13461         (tracepoint_print_one_detail): Adjust to std::string.
13462         (strace_marker_decode_location): Adjust to std::string.
13463         (update_static_tracepoint): Adjust to std::string, remove call
13464         to release_static_tracepoint_marker.
13465         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13466         Adjust to std::vector.
13467         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13468         (remote_static_tracepoint_markers_by_strid): Adjust to
13469         std::vector.
13470         * common/rsp-low.h (hex2str): New overload with explicit count
13471         of bytes.
13472         * common/rsp-low.c (hex2str): New overload with explicit count
13473         of bytes.
13474         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13475         (_initialize_rsp_low_selftests): Add test_hex2str test.
13476         * unittests/tracepoint-selftests.c
13477         (test_parse_static_tracepoint_marker_definition): Adjust to
13478         std::string.
13479
13480 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13481
13482         * tracepoint.c (parse_static_tracepoint_marker_definition):
13483         Consider case where the definition is followed by more
13484         definitions.
13485         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13486         tracepoint-selftests.c.
13487         * unittests/tracepoint-selftests.c: New.
13488
13489 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13490
13491         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13492         Carvalho.
13493
13494 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13495
13496         * symtab.c (find_pc_sect_line): fixed indentation.
13497
13498 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13499
13500         * symtab.c (find_pc_sect_line): now uses binary search.
13501
13502 2018-03-19  Tom Tromey  <tom@tromey.com>
13503
13504         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13505         "IDENT" production.
13506
13507 2018-03-19  Pedro Alves  <palves@redhat.com>
13508             Tom Tromey  <tom@tromey.com>
13509
13510         * unittests/observable-selftests.c: New file.
13511         * common/observable.h: New file.
13512         * observable.h: New file.
13513         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13514         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13515         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13516         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13517         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13518         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13519         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13520         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13521         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13522         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13523         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13524         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13525         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13526         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13527         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13528         tui/tui-interp.c, valops.c: Update all users.
13529         * tui/tui-hooks.c (tui_bp_created_observer)
13530         (tui_bp_deleted_observer, tui_bp_modified_observer)
13531         (tui_inferior_exit_observer, tui_before_prompt_observer)
13532         (tui_normal_stop_observer, tui_register_changed_observer):
13533         Remove.
13534         (tui_observers_token): New global.
13535         (attach_or_detach, tui_attach_detach_observers): New functions.
13536         (tui_install_hooks, tui_remove_hooks): Use
13537         tui_attach_detach_observers.
13538         * record-btrace.c (record_btrace_thread_observer): Remove.
13539         (record_btrace_thread_observer_token): New global.
13540         * observer.sh: Remove.
13541         * observer.c: Rename to observable.c.
13542         * observable.c (namespace gdb_observers): Define new objects.
13543         (observer_debug): Move into gdb_observers namespace.
13544         (struct observer, struct observer_list, xalloc_observer_list_node)
13545         (xfree_observer_list_node, generic_observer_attach)
13546         (generic_observer_detach, generic_observer_notify): Remove.
13547         (_initialize_observer): Update.
13548         Don't include observer.inc.
13549         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13550         (clean mostlyclean): Likewise.
13551         (observer.h, observer.inc): Remove targets.
13552         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13553         (COMMON_SFILES): Use observable.c, not observer.c.
13554         * .gitignore: Remove observer.h.
13555
13556 2018-03-18  Tom Tromey  <tom@tromey.com>
13557
13558         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13559         gdb::def_vector.
13560         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13561
13562 2018-03-17  Tom Tromey  <tom@tromey.com>
13563
13564         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13565
13566 2018-03-17  Tom Tromey  <tom@tromey.com>
13567
13568         * target.c (class scoped_target_fd): New.
13569         (target_fileio_close_cleanup): Remove.
13570         (target_fileio_read_alloc_1): Use scoped_target_fd.
13571
13572 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13573
13574         * silent-rules.mk: New.
13575         * Makefile.in: Include silent-rules.mk
13576         (srcdir, VPATH, top_srcdir): Move up.
13577         (COMPILE): Add ECHO_CXX.
13578         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13579         (init.c): Add ECHO_INIT_C.
13580         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13581         (version.c): Add ECHO_GEN.
13582         (printcmd.o): Add ECHO_CXX.
13583         (target-float.o): Add ECHO_CXX.
13584         (ada-exp.o): Add ECHO_CXX.
13585         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13586         (insight$(EXEEXT)): Add ECHO_CXXLD.
13587         * gnulib/configure.ac: Add AM_SILENT_RULES.
13588         * gnulib/aclocal.m4: Re-generate.
13589         * gnulib/configure: Re-generate.
13590         * gnulib/import/Makefile.in: Re-generate.
13591
13592 2018-03-16  Tom Tromey  <tom@tromey.com>
13593
13594         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13595         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13596         * utils.c (do_free_section_addr_info)
13597         (make_cleanup_free_section_addr_info): Remove.
13598         * symfile.h (struct other_sections): Add constructor.
13599         (struct section_addr_info): Remove.
13600         (section_addr_info): New typedef.
13601         (struct sym_fns) <sym_offsets>: Change type of parameter.
13602         (build_section_addr_info_from_objfile)
13603         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13604         (default_symfile_offsets, symbol_file_add)
13605         (symbol_file_add_from_bfd)
13606         (build_section_addr_info_from_section_table): Update.
13607         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13608         * symfile.c (alloc_section_addr_info): Remove.
13609         (build_section_addr_info_from_section_table): Change return type.
13610         Update.
13611         (build_section_addr_info_from_bfd)
13612         (build_section_addr_info_from_objfile): Likewise.
13613         (free_section_addr_info): Remove.
13614         (relative_addr_info_to_section_offsets): Change type of "addrs".
13615         (addrs_section_compar): Now a std::sort comparator.
13616         (addrs_section_sort): Change return type.
13617         (addr_info_make_relative): Change type of "addrs".  Update.
13618         (default_symfile_offsets, syms_from_objfile_1)
13619         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13620         (symbol_file_add_separate): Update.
13621         (symbol_file_add): Change type of "addrs".  Update.
13622         (add_symbol_file_command): Update.  Remove cleanups.
13623         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13624         cleanups.
13625         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13626         * solib.c (solib_read_symbols): Update.
13627         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13628         * machoread.c (macho_symfile_offsets): Update.
13629         * jit.c (jit_bfd_try_read_symtab): Update.
13630
13631 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13632
13633         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13634         unittests/utils-selftests.c.
13635         * unittests/utils-selftests.c: New file.
13636
13637 2018-03-14  Tom Tromey  <tom@tromey.com>
13638
13639         PR cli/14977:
13640         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13641         for NULL.
13642
13643 2018-03-14  Tom Tromey  <tom@tromey.com>
13644
13645         PR cli/19918:
13646         * printcmd.c (printf_pointer): Allow "-" in format.
13647
13648 2018-03-14  Tom Tromey  <tom@tromey.com>
13649
13650         * printcmd.c (_initialize_printcmd): Add usage to printf.
13651
13652 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13653
13654         * MAINTAINERS: Update my email address.
13655
13656 2018-03-13  Tom Tromey  <tom@tromey.com>
13657
13658         * machoread.c (macho_check_dsym): Change filenamep to a
13659         std::string*.
13660         (macho_symfile_read): Update.
13661         * symfile.c (load_command): Use std::string.
13662
13663 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13664
13665         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13666         to error message string.
13667         (riscv_register_name): Use xsnprintf instead of sprintf.
13668         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13669         internal_error.
13670         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13671         error.
13672         (riscv_push_dummy_call): Likewise.
13673
13674 2018-03-12  Tom Tromey  <tom@tromey.com>
13675
13676         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13677         Use gdb::byte_vector.
13678         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13679
13680 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13681
13682         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13683         parameter type to readable_regcache.
13684         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13685         the declaration.
13686
13687 2018-03-11  Tom Tromey  <tom@tromey.com>
13688
13689         * dwarf2read.c (struct nextfield): Add initializers.
13690         (struct nextfnfield): Remove.
13691         (struct fnfieldlist): Add initializers.  Remove "length" and
13692         "head", use std::vector.
13693         (struct decl_field_list): Remove.
13694         (struct field_info): Add initializers.
13695         <fields, baseclasses>: Now std::vector.
13696         <nbaseclasses, nfnfields, typedef_field_list_count,
13697         nested_types_list_count>: Remove.
13698         (dwarf2_add_field, dwarf2_add_type_defn)
13699         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13700         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13701         (process_structure_scope): Update.
13702
13703 2018-03-11  Tom Tromey  <tom@tromey.com>
13704
13705         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13706         for use by std::sort.
13707         (build_type_psymtabs_1): Use std::vector.
13708
13709 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13710
13711         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13712         and LIBMPFR in the printed configuration.
13713
13714 2018-03-08  Tom Tromey  <tom@tromey.com>
13715
13716         * source.c (get_filename_and_charpos): Use scoped_fd.
13717         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13718         (procfs_pidlist): Likewise.
13719         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13720         (iterate_over_mappings): Likewise.
13721
13722 2018-03-08  Tom Tromey  <tom@tromey.com>
13723
13724         * infcall.c (struct call_return_meta_info)
13725         <stack_temporaries_enabled>: Remove.
13726         (get_call_return_value, call_function_by_hand_dummy): Update.
13727         * thread.c (disable_thread_stack_temporaries): Remove.
13728         (enable_thread_stack_temporaries): Remove.
13729         (thread_stack_temporaries_enabled_p): Return bool.
13730         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13731         (get_last_thread_stack_temporary): Update.
13732         * eval.c (evaluate_subexp): Update.
13733         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13734         class, not a function.
13735         (value_ptr, value_vec): Remove typedefs.
13736         (class thread_info) <stack_temporaries_enabled>: Now bool.
13737         <stack_temporaries>: Now a std::vector.
13738         (thread_stack_temporaries_enabled_p)
13739         (value_in_thread_stack_temporaries): Return bool.
13740
13741 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13742
13743         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13744         (getpkt_or_notif_sane_1): Likewise.
13745
13746 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13747
13748         * build-id.c (build_id_to_debug_bfd): Use std::string.
13749
13750 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13751
13752         * build-id.c (find_separate_debug_file_by_buildid): Return
13753         std::string.
13754         * build-id.h (find_separate_debug_file_by_buildid): Return
13755         std::string.
13756         * coffread.c (coff_symfile_read): Adjust to std::string.
13757         * elfread.c (elf_symfile_read): Adjust to std::string.
13758         * symfile.c (separate_debug_file_exists): Change parameter to
13759         std::string.
13760         (find_separate_debug_file): Return std::string.
13761         (find_separate_debug_file_by_debuglink): Return std::string.
13762         * symfile.h (find_separate_debug_file_by_debuglink): Return
13763         std::string.
13764
13765 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13766
13767         * common/xml-utils.c (xml_escape_text): Move code to...
13768         (xml_escape_text_append): ... this new function.
13769         * common/xml-utils.h (xml_escape_text_append): New declaration.
13770         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13771         New function.
13772         (_initialize_xml_utils): register test_xml_escape_text_append as
13773         a selftest.
13774
13775 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13776
13777         * defs.h: Remove MAX_REGISTER_SIZE.
13778         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13779         asserts.
13780         * python/py-unwind.c (pyuw_sniffer): Likewise.
13781
13782 2018-03-07  Tom Tromey  <tom@tromey.com>
13783
13784         * linux-tdep.c (linux_info_proc): Update.
13785         * target.h (struct target_ops) <to_fileio_readlink>: Return
13786         optional<string>.
13787         (target_fileio_readlink): Return optional<string>.
13788         * remote.c (remote_hostio_readlink): Return optional<string>.
13789         * inf-child.c (inf_child_fileio_readlink): Return
13790         optional<string>.
13791         * target.c (target_fileio_readlink): Return optional<string>.
13792
13793 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13794
13795         * regcache.c (cooked_read_test): Add riscv to the list of
13796         architectures that have a save_reggroup.
13797
13798 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13799
13800         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13801         value is not a dynamic class object.
13802
13803 2018-03-06  Tom Tromey  <tom@tromey.com>
13804
13805         * rust-exp.y: Formatting fixes.
13806
13807 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13808
13809         * riscv-tdep.c (riscv_register_name): Remove target description
13810         support.
13811         (riscv_gdbarch_init): Remove target description check.
13812
13813 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13814
13815         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13816         comment.
13817         * riscv-tdep.h: Likewise.
13818
13819 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13820
13821         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13822         (riscv_pseudo_register_write): Delete.
13823         (riscv_gdbarch_init): Remove all use of pseudo registers.
13824
13825 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13826
13827         * record-btrace.c (btrace_print_lines): Replace cleanup
13828         parameter with RAII equivalents.
13829         (btrace_insn_history): Replace cleanup with RAII equivalents.
13830         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13831         make_cleanup_ui_out_tuple_begin_end): Remove.
13832         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13833         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13834         make_cleanup_ui_out_list_begin_end): Remove.
13835
13836 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13837
13838         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13839         parameter types to std::vector.  Use bool.
13840         (record_btrace_wait): Replace VEC(tp_t) with
13841         std::vector<thread_info *>.
13842         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13843
13844 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13845
13846         * record-btrace.c (record_btrace_disable_callback): Remove.
13847         (struct scoped_btrace_disable): New.
13848         (record_btrace_open): Use scoped_btrace_disable.
13849
13850 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13851
13852         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13853         reading values from registers.
13854
13855 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13856
13857         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13858         where appropriate.
13859
13860 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13861
13862         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13863         change parameter type.  Use GDB's print functions, and use
13864         core_addr_to_string where appropriate.
13865         (riscv_push_dummy_call): Use core_addr_to_string where
13866         appropriate, update call to riscv_print_arg_location, and reindent
13867         a few lines.
13868         (riscv_return_value): Update call to riscv_print_arg_location.
13869
13870 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13871             Tim Newsome <tim@sifive.com>
13872             Albert Ou <a0u@eecs.berkeley.edu>
13873             Darius Rad <darius@bluespec.com>
13874
13875         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13876         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13877         (ALLDEPFILES): Add riscv-tdep.c
13878         * configure.tgt: Add riscv support.
13879         * riscv-tdep.c: New file.
13880         * riscv-tdep.h: New file.
13881         * NEWS: Mention new target.
13882         * MAINTAINERS: Add entry for riscv.
13883
13884 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13885
13886         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13887         fields within aggregates.
13888
13889 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13890
13891         * record-btrace.c (btrace_print_lines): Change type of flags to
13892         gdb_disassembly_flags.
13893
13894 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13895
13896         * fbsd-nat.c: Include "inf-ptrace.h".
13897         (USE_SIGTRAP_SIGINFO): Conditionally define.
13898         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13899         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13900         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13901         function.
13902         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13903         Likewise.
13904         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13905         Likewise.
13906         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13907         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13908         "supports_stopped_by_hw_breakpoint" target methods.
13909
13910 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13911
13912         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13913         * fbsd-nat.c (debug_fbsd_nat): New variable.
13914         (show_fbsd_nat_debug): New function.
13915         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13916         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13917
13918 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13919
13920         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13921         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13922         prototype.
13923         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13924         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13925         method.
13926
13927 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13928
13929         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13930         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13931
13932 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13933
13934         * charset.c (struct charset_vector): New.
13935         (charsets): Change type to charset_vector.
13936         (find_charset_names): Adjust.
13937         (add_one): Adjust.
13938         (_initialize_charset): Adjust.
13939
13940 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13941
13942         * progspace.h (struct program_space) <deleted_solibs>: Change
13943         type to std::vector<std::string>.
13944         * progspace.c (clear_program_space_solib_cache): Adjust.
13945         * breakpoint.c (print_solib_event): Adjust.
13946         (check_status_catch_solib): Adjust.
13947         * solib.c (update_solib_list): Adjust.
13948         * ui-out.h (class ui_out) <field_string>: New overload.
13949         * ui-out.c (ui_out::field_string): New overload.
13950
13951 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13952
13953         * progspace.h (struct program_space): Add constructor and
13954         destructor, initialize fields.
13955         (add_program_space): Remove.
13956         * progspace.c (add_program_space): Rename to...
13957         (program_space::program_space): ... this.
13958         (release_program_space): Rename to...
13959         (program_space::~program_space): ... this.
13960         (delete_program_space): Use delete to delete program_space.
13961         (initialize_progspace): Use new to allocate program_space.
13962         * inferior.c (add_inferior_with_spaces): Likewise.
13963         (clone_inferior_command): Likewise.
13964         * infrun.c (follow_fork_inferior): Likewise.
13965         (handle_vfork_child_exec_or_exit): Likewise.
13966
13967 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13968
13969         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13970         (delim_string_to_char_ptr_vec): Return std::vector of
13971         gdb::unique_xmalloc_ptr.
13972         (dirnames_to_char_ptr_vec_append): Take std::vector of
13973         gdb::unique_xmalloc_ptr.
13974         (dirnames_to_char_ptr_vec): Return std::vector of
13975         gdb::unique_xmalloc_ptr.
13976         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13977         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13978         (delim_string_to_char_ptr_vec): Return an std::vector of
13979         gdb::unique_xmalloc_ptr, adjust the code.
13980         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13981         gdb::unique_xmalloc_ptr, adjust the code.
13982         (dirnames_to_char_ptr_vec): Return an std::vector of
13983         gdb::unique_xmalloc_ptr, adjust the code.
13984         * auto-load.c (auto_load_safe_path_vec): Change type to
13985         std::vector of gdb::unique_xmalloc_ptr.
13986         (auto_load_expand_dir_vars): Return an std::vector of
13987         gdb::unique_xmalloc_ptr, adjust the code.
13988         (auto_load_safe_path_vec_update): Adjust.
13989         (filename_is_in_auto_load_safe_path_vec): Adjust.
13990         (auto_load_objfile_script_1): Adjust.
13991         * build-id.c (build_id_to_debug_bfd): Adjust.
13992         * linux-thread-db.c (thread_db_load_search): Adjust.
13993         * source.c (add_path): Adjust.
13994         (openp): Adjust.
13995         * symfile.c (find_separate_debug_file): Adjust.
13996         * utils.c (do_free_char_ptr_vec): Remove.
13997         (make_cleanup_free_char_ptr_vec): Remove.
13998
13999 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14000
14001         PR gdb/22907
14002         * common/pathstuff.c: Conditionally include "<windows.h>".
14003
14004 2018-03-01  Georg Sauthoff  <mail@georg.so>
14005
14006         PR gdb/22888
14007         * gcore.in: Quote variables and switch interpreter to bash.
14008
14009 2018-03-01  Tom Tromey  <tom@tromey.com>
14010
14011         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14012         assertion.  Add assertion for discriminant_index.
14013         (quirk_rust_enum): Use correct base type name in univariant case.
14014
14015 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14016
14017         * record.c (get_call_history_modifiers): Return a
14018         record_print_flags.
14019         (cmd_record_call_history): Adjust.
14020         * record-btrace.c (record_btrace_call_history): Adjust.
14021         (record_btrace_call_history_range): Adjust.
14022         (record_btrace_call_history_from): Adjust.
14023         * target-debug.h (target_debug_print_record_print_flags): New.
14024         * target-delegates.c: Re-generate.
14025         * target.c (target_call_history): Change flags type.
14026         (target_call_history_from): Likewise.
14027         (target_call_history_range): Likewise.
14028         * target.h (struct target_ops) <target_call_history>: Likewise.
14029         (target_call_history_from): Likewise.
14030         (target_call_history_range): Likewise.
14031
14032 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14033             Simon Marchi  <simon.marchi@polymtl.ca>
14034
14035         * common/common-utils.c: Include "sys/stat.h".
14036         (is_regular_file): Move here from "source.c"; change return
14037         type to "bool".
14038         * common/common-utils.h (is_regular_file): New prototype.
14039         * common/pathstuff.c (contains_dir_separator): New function.
14040         * common/pathstuff.h (contains_dir_separator): New prototype.
14041         * source.c: Don't include "sys/stat.h".
14042         (is_regular_file): Move to "common/common-utils.c".
14043
14044 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14045
14046         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14047         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14048         * auto-load.c: Include "common/pathstuff.h".
14049         * common/common-def.h (current_directory): Move here.
14050         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14051         function.
14052         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14053         prototype.
14054         * common/pathstuff.c: New file.
14055         * common/pathstuff.h: New file.
14056         * compile/compile.c: Include "common/pathstuff.h".
14057         * defs.h (current_directory): Move to "common/common-defs.h".
14058         * dwarf2read.c: Include "common/pathstuff.h".
14059         * exec.c: Likewise.
14060         * guile/scm-safe-call.c: Likewise.
14061         * linux-thread-db.c: Likewise.
14062         * main.c: Likewise.
14063         * nto-tdep.c: Likewise.
14064         * objfiles.c: Likewise.
14065         * source.c: Likewise.
14066         * symtab.c: Likewise.
14067         * utils.c: Include "common/pathstuff.h".
14068         (gdb_realpath): Move to "common/pathstuff.c".
14069         (gdb_realpath_keepfile): Likewise.
14070         (gdb_abspath): Likewise.
14071         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14072         (gdb_realpath_keepfile): Likewise.
14073         (gdb_abspath): Likewise.
14074
14075 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14076
14077         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14078         wildcard process pid for super_resume for kernels with a
14079         specific bug.
14080
14081 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14082
14083         * compile/compile.c (get_args): Add additional comments
14084         explaining function.
14085
14086 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14087             Tom Tromey  <tom@tromey.com>
14088
14089         * target.h (memory_write_request_s): Remove typedef.  Don't define
14090         VEC.
14091         (target_write_memory_blocks): Change argument to std::vector.
14092         (struct memory_write_request): Add constructor.
14093         * target-memory.c (compare_block_starting_address): Return bool.
14094         Change argument types.
14095         (claim_memory): Change arguments to use std::vector.
14096         (split_regular_and_flash_blocks, blocks_to_erase)
14097         (compute_garbled_blocks): Likewise.
14098         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14099         (target_write_memory_blocks): Change argument to std::vector.
14100         * symfile.c (struct load_section_data): Add constructor and
14101         destructor.  Use std::vector for "requests".
14102         (struct load_progress_data): Add initializers.
14103         (load_section_callback): Update.  Use "new".
14104         (clear_memory_write_data): Remove.
14105         (generic_load): Update.
14106
14107 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14108
14109         * arch/aarch64.h: Use common/tdesc.h.
14110
14111 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14112
14113         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14114         architecture with a 64-bit ABI.
14115
14116 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14117
14118         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14119         ahead of target description loading.
14120
14121 2018-02-26  Tom Tromey  <tom@tromey.com>
14122
14123         * stack.c (backtrace_command_1): Update.
14124         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14125         of "flags".
14126         * python/py-framefilter.c (py_print_frame)
14127         (gdbpy_apply_frame_filter): Change type of "flags".
14128         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14129         of "flags".
14130         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14131         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14132         * extension.h (enum frame_filter_flag): Rename from
14133         frame_filter_flags.
14134         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14135         (apply_ext_lang_frame_filter): Change type of "flags".
14136         * extension.c (apply_ext_lang_frame_filter): Change type of
14137         "flags".
14138         * extension-priv.h (struct extension_language_ops)
14139         <apply_frame_filter>: Change type of "flags".
14140
14141 2018-02-26  Tom Tromey  <tom@tromey.com>
14142
14143         PR python/16497:
14144         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14145         off-by-one in py_end computation.
14146         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14147         PRINT_MORE_FRAMES.
14148         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14149         constant.
14150
14151 2018-02-26  Tom Tromey  <tom@tromey.com>
14152
14153         * dwarf2read.c (struct variant_field): New.
14154         (struct nextfield) <variant>: New field.
14155         (dwarf2_add_field): Handle DW_TAG_variant_part.
14156         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14157         discriminated union.
14158         (read_structure_type): Handle DW_TAG_variant_part.
14159         (handle_struct_member_die): New function, extracted from
14160         process_structure_scope.  Handle DW_TAG_variant.
14161         (process_structure_scope): Handle discriminated unions.  Call
14162         handle_struct_member_die.
14163
14164 2018-02-26  Tom Tromey  <tom@tromey.com>
14165
14166         * rust-lang.h (rust_last_path_segment): Declare.
14167         * rust-lang.c (rust_last_path_segment): Now public.  Change
14168         contract.
14169         (struct disr_info): Remove.
14170         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14171         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14172         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14173         (rust_enum_p, rust_enum_variant): New function.
14174         (rust_underscore_fields): Remove "offset" parameter.
14175         (rust_print_enum): New function.
14176         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14177         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14178         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14179         enums.
14180         (rust_internal_print_type): New function, from rust_print_type.
14181         Remove enum code.
14182         (rust_print_type): Call rust_internal_print_type.
14183         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14184         Update enum handling.
14185         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14186         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14187         (rust_union_quirks): New functions.
14188         (process_full_comp_unit, process_full_type_unit): Call
14189         rust_union_quirks.
14190         (process_structure_scope): Update rust_unions if necessary.
14191
14192 2018-02-26  Tom Tromey  <tom@tromey.com>
14193
14194         * value.h (value_union_variant): Declare.
14195         * valops.c (value_union_variant): New function.
14196         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14197         (struct discriminant_info): New.
14198         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14199         enumerator.
14200         (struct main_type) <flag_discriminated_union>: New field.
14201
14202 2018-02-26  Tom Tromey  <tom@tromey.com>
14203
14204         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14205         unittests/unpack-selftests.c.
14206         * unittests/unpack-selftests.c: New file.
14207         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14208
14209 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14210
14211         * dwarf2read.c (struct partial_die_info) <read>: New method.
14212         (read_partial_die): Remove the declaration.
14213         (load_partial_dies): Update.
14214         (partial_die_info::partial_die_info):
14215         (read_partial_die): Change it to partial_die_info::read.
14216
14217 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14218
14219         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14220         (fixup_partial_die): Remove declaration.
14221         (scan_partial_symbols): Update.
14222         (partial_die_parent_scope): Likewise.
14223         (partial_die_full_name): Likewise.
14224         (fixup_partial_die): Change it to partial_die_info::fixup.
14225
14226 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14227
14228         * dwarf2read.c (read_partial_die): Update the declaration.
14229         (load_partial_dies): Caller update.
14230         (read_partial_die): Remove one argument abbrev_len.
14231
14232 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14233
14234         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14235         assignment operator.
14236         (load_partial_dies): Use ctor and copy ctor.
14237         (read_partial_die): Update.
14238         (dwarf2_cu::find_partial_die): Use ctor.
14239
14240 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14241
14242         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14243         (find_partial_die_in_comp_unit): Change it to
14244         dwarf2_cu::find_partial_die.
14245         (find_partial_die): Update.
14246
14247 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14248
14249         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14250         is NULL.
14251
14252 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14253
14254         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14255
14256 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14257
14258         * arch/amd64.h: Use common/tdesc.h.
14259         * arch/i386.c: Likewise.
14260         * arch/i386.h: Likewise.
14261         * arch/tic6x.c: Likewise.
14262         * arch/tdesc.h: Move file from here...
14263         * common/tdesc.h: ...to here.
14264         * features/aarch64-core.c: Regenerate.
14265         * features/aarch64-fpu.c: Regenerate.
14266         * features/i386/32bit-avx.c: Regenerate.
14267         * features/i386/32bit-avx512.c: Regenerate.
14268         * features/i386/32bit-core.c: Regenerate.
14269         * features/i386/32bit-linux.c: Regenerate.
14270         * features/i386/32bit-mpx.c: Regenerate.
14271         * features/i386/32bit-pkeys.c: Regenerate.
14272         * features/i386/32bit-sse.c: Regenerate.
14273         * features/i386/64bit-avx.c: Regenerate.
14274         * features/i386/64bit-avx512.c: Regenerate.
14275         * features/i386/64bit-core.c: Regenerate.
14276         * features/i386/64bit-linux.c: Regenerate.
14277         * features/i386/64bit-mpx.c: Regenerate.
14278         * features/i386/64bit-pkeys.c: Regenerate.
14279         * features/i386/64bit-segments.c: Regenerate.
14280         * features/i386/64bit-sse.c: Regenerate.
14281         * features/i386/x32-core.c: Regenerate.
14282         * features/tic6x-c6xp.c: Regenerate.
14283         * features/tic6x-core.c: Regenerate.
14284         * features/tic6x-gp.c: Regenerate.
14285         * target-descriptions.c: Use common/tdesc.h.
14286         * target-descriptions.h: Likewise.
14287
14288 2018-02-24  Tom Tromey  <tom@tromey.com>
14289
14290         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14291         (try_thread_db_load_from_dir, thread_db_load_search): Use
14292         std::string.
14293         (info_auto_load_libthread_db_compare): Return bool.  Change
14294         argument types.
14295         (info_auto_load_libthread_db): Use std::vector, std::string.
14296         Remove cleanups.
14297
14298 2018-02-24  Tom Tromey  <tom@tromey.com>
14299
14300         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14301         std::string.
14302         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14303         std::string*.
14304         * gdbarch.c: Rebuild.
14305         * gdbarch.h: Rebuild.
14306         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14307         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14308         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14309         std::string*.
14310
14311 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14312
14313         * gdbtypes.h (sect_offset): Change type to uint64_t.
14314         (sect_offset_str): New function.
14315         * dwarf2read.c (create_addrmap_from_aranges): Use
14316         sect_offset_str.
14317         (error_check_comp_unit_head): Likewise.
14318         (create_debug_type_hash_table): Likewise.
14319         (read_cutu_die_from_dwo): Likewise.
14320         (init_cutu_and_read_dies): Likewise.
14321         (init_cutu_and_read_dies_no_follow): Likewise.
14322         (process_psymtab_comp_unit_reader): Likewise.
14323         (partial_die_parent_scope): Likewise.
14324         (peek_die_abbrev): Likewise.
14325         (process_queue): Likewise.
14326         (dwarf2_physname): Likewise.
14327         (read_namespace_alias): Likewise.
14328         (read_import_statement): Likewise.
14329         (create_dwo_cu_reader): Likewise.
14330         (create_cus_hash_table): Likewise.
14331         (lookup_dwo_cutu): Likewise.
14332         (inherit_abstract_dies): Likewise.
14333         (read_func_scope): Likewise.
14334         (read_call_site_scope): Likewise.
14335         (dwarf2_add_member_fn): Likewise.
14336         (read_common_block): Likewise.
14337         (read_module_type): Likewise.
14338         (read_typedef): Likewise.
14339         (read_subrange_type): Likewise.
14340         (load_partial_dies): Likewise.
14341         (read_partial_die): Likewise.
14342         (find_partial_die): Likewise.
14343         (read_str_index): Likewise.
14344         (dwarf2_string_attr): Likewise.
14345         (build_error_marker_type): Likewise.
14346         (lookup_die_type): Likewise.
14347         (dump_die_shallow): Likewise.
14348         (follow_die_ref): Likewise.
14349         (dwarf2_fetch_die_loc_sect_off): Likewise.
14350         (dwarf2_fetch_constant_bytes): Likewise.
14351         (follow_die_sig): Likewise.
14352         (get_signatured_type): Likewise.
14353         (get_DW_AT_signature_type): Likewise.
14354         (dwarf2_find_containing_comp_unit): Likewise.
14355         (set_die_type): Likewise.
14356
14357 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14358
14359         * arch/aarch64.c: Include "common-defs.h".
14360         * arch/amd64.c: Likewise.
14361         * arch/i386.c: Likewise.
14362
14363 2018-02-21  Tom Tromey  <tom@tromey.com>
14364
14365         * value.h: (extract_field_op): Update.
14366         * eval.c (extract_field_op): Return a const char *.
14367         * expression.h (parse_expression_for_completion): Update.
14368         * completer.c (complete_expression): Update.
14369         (add_struct_fields): Make fieldname const.
14370         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14371         (mark_completion_tag, parse_exp_in_context_1): Update.
14372         (parse_expression_for_completion): Change "name" to
14373         unique_xmalloc_ptr*.
14374
14375 2018-02-21  Tom Tromey  <tom@tromey.com>
14376
14377         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14378
14379 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14380
14381         * avr-tdep.c (avr_read_pc): Change parameter type to
14382         readable_regcache.
14383         * gdbarch.sh (read_pc): Likewise.
14384         * gdbarch.c: Re-generated.
14385         * gdbarch.h: Re-generated.
14386         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14387         readable_regcache.
14388         * ia64-tdep.c (ia64_read_pc): Likewise.
14389         * mips-tdep.c (mips_read_pc): Likewise.
14390         * spu-tdep.c (spu_read_pc): Likewise.
14391
14392 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14393
14394         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14395         * regcache-dump.c: New file.
14396         * regcache.c: Move register_dump to regcache-dump.c.
14397         (maintenance_print_registers): Likewise.
14398         (maintenance_print_raw_registers): Likewise.
14399         (maintenance_print_cooked_registers): Likewise.
14400         (maintenance_print_register_groups): Likewise.
14401         (maintenance_print_remote_registers): Likewise.
14402         (_initialize_regcache): Likewise.
14403         * regcache.h (register_dump): Moved from regcache.c.
14404
14405 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14406
14407         * regcache.c (regcache::regcache): Update.
14408         (regcache::invalidate): Move it to detached_regcache::invalidate.
14409         (get_thread_arch_aspace_regcache): Update.
14410         (regcache::raw_update): Update.
14411         (regcache::cooked_read): Remove some code.
14412         (regcache::cooked_read_value): Likewise.
14413         (regcache::raw_write): Remove assert on m_readonly_p.
14414         (regcache::raw_supply_integer): Move it to
14415         detached_regcache::raw_supply_integer.
14416         (regcache::raw_supply_zeroed): Likewise.
14417         * regcache.h (detached_regcache) <raw_supply_integer>: New
14418         declaration.
14419         <raw_supply_zeroed, invalidate>: Likewise.
14420         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14421         <invalidate>: Likewise.
14422         <m_readonly_p>: Removed.
14423
14424 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14425
14426         * infcmd.c (get_return_value): Let stop_regs point to
14427         get_current_regcache.
14428         * regcache.c (regcache::regcache): Remove.
14429         (register_dump_reg_buffer): New class.
14430         (regcache_print): Adjust.
14431         * regcache.h (regcache): Remove constructors.
14432
14433 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14434
14435         * regcache.c (class register_dump): New class.
14436         (register_dump_regcache, register_dump_none): New class.
14437         (register_dump_remote, register_dump_groups): New class.
14438         (regcache_print): Update.
14439         * regcache.h (regcache_dump_what): Move it to regcache.c.
14440         (regcache) <dump>: Remove.
14441
14442 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14443
14444         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14445          reg_buffer_rw *.
14446         (jit_unwind_reg_set_impl): Call raw_supply.
14447         (jit_frame_sniffer): Use reg_buffer_rw.
14448         * record-full.c (record_full_core_regbuf): Change its type.
14449         (record_full_core_open_1): Use reg_buffer_rw.
14450         (record_full_close): Likewise.
14451         (record_full_core_fetch_registers): Use regcache->raw_supply.
14452         (record_full_core_store_registers): Likewise.
14453         * regcache.c (regcache::get_register_status): Move it to
14454         reg_buffer.
14455         (regcache_raw_set_cached_value): Remove.
14456         (regcache::raw_set_cached_value): Remove.
14457         (regcache::raw_write): Call raw_supply.
14458         (regcache::raw_supply): Move it to reg_buffer_rw.
14459         * regcache.h (regcache_raw_set_cached_value): Remove.
14460         (reg_buffer_rw): New class.
14461
14462 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14463
14464         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14465         readonly_detached_regcache.
14466         (dummy_frame_prev_register): Use regcache->cooked_read.
14467         * frame.c (frame_save_as_regcache): Change return type.
14468         (frame_pop): Update.
14469         * frame.h (frame_save_as_regcache): Update declaration.
14470         * inferior.h (get_infcall_suspend_state_regcache): Update
14471         declaration.
14472         * infrun.c (infcall_suspend_state) <registers>: use
14473         readonly_detached_regcache.
14474         (save_infcall_suspend_state): Don't use regcache_dup.
14475         (get_infcall_suspend_state_regcache): Change return type.
14476         * linux-fork.c (struct fork_info) <savedregs>: Change to
14477         readonly_detached_regcache.
14478         <pc>: New field.
14479         (fork_save_infrun_state): Don't use regcache_dup.
14480         (info_checkpoints_command): Adjust.
14481         * mi/mi-main.c (register_changed_p): Update declaration.
14482         (mi_cmd_data_list_changed_registers): Use
14483         readonly_detached_regcache.
14484         (register_changed_p): Change parameter type to
14485         readonly_detached_regcache.
14486         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14487         readonly_detached_regcache.
14488         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14489         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14490         New.
14491         (regcache::save): Move it to reg_buffer.
14492         (regcache::restore): Change parameter type.
14493         (regcache_dup): Remove.
14494         * regcache.h (reg_buffer) <save>: New method.
14495         (readonly_detached_regcache): New class.
14496         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14497         readonly_detached_regcache.
14498         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14499
14500 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14501
14502         * frame.c (frame_save_as_regcache): Use regcache method save.
14503         (frame_pop): Use regcache method restore.
14504         * infrun.c (restore_infcall_suspend_state): Likewise.
14505         * linux-fork.c (fork_load_infrun_state): Likewise.
14506         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14507         save.
14508         * regcache.c (regcache_save): Remove.
14509         (regcache::restore): More asserts.
14510         (regcache_cpy): Remove.
14511         * regcache.h (regcache_save): Remove the declaration.
14512         (regcache::restore): Move from private to public.
14513         Remove the friend declaration of regcache_cpy.
14514         (regcache_cpy): Remove declaration.
14515
14516 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14517
14518         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14519         parameter type to 'readable_regcache *'.
14520         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14521         * arm-tdep.c (arm_neon_quad_read): Likewise.
14522         (arm_pseudo_read): Likewise.
14523         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14524         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14525         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14526         * gdbarch.c: Re-generated.
14527         * gdbarch.h: Re-generated.
14528         * gdbarch.sh (pseudo_register_read): Change parameter type to
14529         'readable_regcache *'.
14530         (pseudo_register_read_value): Likewise.
14531         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14532         (h8300_pseudo_register_read): Likewise.
14533         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14534         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14535         (i386_pseudo_register_read_into_value): Likewise.
14536         (i386_pseudo_register_read_value): Likewise.
14537         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14538         declaration.
14539         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14540         * m32c-tdep.c (m32c_raw_read): Likewise.
14541         (m32c_read_flg): Likewise.
14542         (m32c_banked_register): Likewise.
14543         (m32c_banked_read): Likewise.
14544         (m32c_sb_read): Likewise.
14545         (m32c_part_read): Likewise.
14546         (m32c_cat_read): Likewise.
14547         (m32c_r3r2r1r0_read): Likewise.
14548         (m32c_pseudo_register_read): Likewise.
14549         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14550         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14551         (mep_pseudo_cr64_read): Likewise.
14552         (mep_pseudo_register_read): Likewise.
14553         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14554         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14555         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14556         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14557         (regcache::cooked_read): Likewise.
14558         (regcache::cooked_read_value): Likewise.
14559         (regcache_cooked_read_signed):
14560         (regcache::cooked_read): Likewise.
14561         * regcache.h (readable_regcache): New class.
14562         (regcache): Inherit readable_regcache.  Move some methods to
14563         readable_regcache.
14564         * rl78-tdep.c (rl78_pseudo_register_read): Change
14565         parameter type to 'readable_regcache *'.
14566         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14567         (e500_pseudo_register_read): Change parameter type to
14568         'readable_regcache *'.
14569         (dfp_pseudo_register_read): Likewise.
14570         (vsx_pseudo_register_read): Likewise.
14571         (efpr_pseudo_register_read): Likewise.
14572         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14573         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14574         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14575         (sh64_pseudo_register_read): Likewise.
14576         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14577         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14578         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14579         (spu_pseudo_register_read): Likewise.
14580         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14581         (xtensa_pseudo_register_read): Likewise.
14582
14583 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14584
14585         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14586         (regcache::arch): Move it to reg_buffer::arch.
14587         (regcache::register_buffer): Likewise.
14588         (regcache::assert_regnum): Likewise.
14589         (regcache::num_raw_registers): Likewise.
14590         * regcache.h (reg_buffer): New class.
14591         (regcache): Inherit reg_buffer.
14592
14593 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14594
14595         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14596         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14597
14598 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14599
14600         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14601
14602 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14603
14604         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14605         (SFILES): Remove common/*.c files.
14606         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14607         * common/common.host: Add common reference.
14608         * configure.ac: Likewise.
14609         * configure: Regenerate.
14610
14611 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14612
14613         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14614         (block_initialize_namespace): Use new.
14615         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14616         (dwarf2_free_objfile): Use delete.
14617         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14618         (copy_type_recursive): Use new.
14619         * gdb_obstack.h (allocate_on_obstack): New.
14620
14621 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14622
14623         PR gdb/22849
14624         * inferior.c (exit_inferior_1): Reset inf->control.
14625
14626 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14627
14628         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14629         declaration.
14630
14631 2018-02-14  Pedro Alves  <palves@redhat.com>
14632
14633         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14634         frame_cleanup_after_sniffer on exception.
14635
14636 2018-02-14  Tom Tromey  <tom@tromey.com>
14637
14638         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14639         const.
14640         (solib_bfd_open): Make pathname const.
14641         * solib.c (solib_bfd_open): Make pathname const.
14642         * solib-spu.c (spu_bfd_fopen): Make name const.
14643         (spu_bfd_open): Make pathname const.
14644         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14645         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14646
14647 2018-02-14  Tom Tromey  <tom@tromey.com>
14648
14649         * symfile.c (symfile_bfd_open): Update.
14650         * source.h (openp, source_full_path_of, find_and_open_source):
14651         Change argument type to unique_xmalloc_ptr.
14652         * source.c (openp): Take a unique_xmalloc_ptr.
14653         (source_full_path_of, find_and_open_source): Likewise.
14654         (open_source_file, symtab_to_fullname): Update.
14655         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14656         unique_xmalloc_ptr.
14657         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14658         (exec_file_find): Update.
14659         * psymtab.c (psymtab_to_fullname): Update.
14660         * nto-tdep.h (nto_find_and_open_solib): Update.
14661         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14662         unique_xmalloc_ptr.
14663         * exec.c (exec_file_attach): Update.
14664         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14665         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14666
14667 2018-02-14  Tom Tromey  <tom@tromey.com>
14668
14669         * solib.c: Include source.h.
14670         * nto-tdep.c: Include source.h.
14671         * mi/mi-cmd-env.c: Include source.h.
14672         * infcmd.c: Include source.h.
14673         * exec.c: Include source.h.
14674         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14675         (add_path, directory_switch, source_path, init_source_path): Move
14676         declarations...
14677         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14678         (add_path, directory_switch, source_path, init_source_path):
14679         ...here.
14680
14681 2018-02-14  Tom Tromey  <tom@tromey.com>
14682
14683         * solist.h (exec_file_find, solib_find): Return
14684         unique_xmalloc_ptr.
14685         (solib_bfd_fopen): Take a const char *.
14686         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14687         (exec_file_find, solib_find): Likewise.
14688         (solib_bfd_fopen): Do not take ownership of "pathname".
14689         (solib_bfd_open): Use unique_xmalloc_ptr.
14690         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14691         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14692         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14693         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14694
14695 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14696
14697         * ada-lang.c (name_match_type_from_name): Remove reference to
14698         ada_name_for_lookup in function's documentation.
14699         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14700
14701 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14702
14703         * defs.h (enum openp_flags): New enum.
14704         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14705         Move to enum openp_flags.
14706         (openp_flags): New enum flags.
14707         (openp): Change parameter type to openp_flags.
14708         * source.c (openp): Change parameter type to openp_flags.
14709         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14710         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14711
14712 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14713
14714         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14715         per-command.
14716
14717 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14718
14719         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14720         into...
14721         (class dwarf2_queue_guard): ...the destructor of this new class.
14722         (dw2_do_instantiate_symtab): Create instance of the new class
14723         dwarf2_queue_guard, remove cleanup.
14724
14725 2018-02-09  Tom Tromey  <tom@tromey.com>
14726
14727         * source.c (find_source_lines): Don't reference past the end of
14728         the vector.
14729
14730 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14731
14732         * remote.c (remote_btrace_maybe_reopen): Change error message.
14733         * btrace.c (btrace_enable): Likewise.
14734         (parse_xml_btrace): Likewise.
14735         (parse_xml_btrace_conf): Likewise.
14736
14737 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14738
14739         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14740         (linux_enable_pt, linux_enable_bts): Call
14741         diagnose_perf_event_open_fail.
14742
14743 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14744
14745         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14746         Remove parameter and change return type.  Update callers.  Move it.
14747         (linux_enable_bts, linux_enable_pt): Improve error message.
14748         (linux_enable_pt): Remove zero buffer size check.
14749         (linux_enable_btrace): Improve error messages.  Remove NULL return
14750         check.
14751
14752 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14753
14754         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14755         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14756         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14757         (linux_supports_pt, linux_supports_btrace): Remove.
14758         (linux_enable_bts): Call cpu_supports_bts.
14759         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14760         * remote.c (remote_supports_btrace): Remove.
14761         (init_remote_ops): Remove remote_supports_btrace.
14762         * target-delegates.c: Regenerated.
14763         * target.c (target_supports_btrace): Remove.
14764         * target.h (target_ops) <to_supports_btrace>: Remove
14765         (target_supports_btrace): Remove.
14766         * x86-linux-nat.c (x86_linux_create_target): Remove
14767         linux_supports_btrace.
14768
14769 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14770
14771         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14772         btrace failed.
14773         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14774         exception and use message in own exception.
14775
14776 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14777
14778         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14779         (perf_event_pt_event_type): Use gdb_file_up.
14780         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14781         scoped_fd, and scoped_mmap.
14782
14783 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14784
14785         * common/scoped_mmap.h: New.
14786         * unittests/scoped_mmap-selftest.c: New.
14787         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14788         unittests/scoped_mmap-selftest.c.
14789
14790 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14791
14792         * common/scoped_fd.h: New.
14793         * unittests/scoped_fd-selftest.c: New.
14794         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14795         unittests/scoped_fd-selftest.c.
14796
14797 2018-02-09  Tom Tromey  <tom@tromey.com>
14798
14799         * auto-load.c (auto_load_section_scripts): Use
14800         gdb::unique_xmalloc_ptr.
14801
14802 2018-02-09  Tom Tromey  <tom@tromey.com>
14803
14804         * auto-load.c (execute_script_contents): Use std::string.
14805
14806 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14807
14808         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14809         Python function, rather than a new command.
14810
14811 2018-02-08  Tom Tromey  <tom@tromey.com>
14812
14813         * solib.c (solib_find_1): Use std::string.
14814         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14815
14816 2018-02-08  Tom Tromey  <tom@tromey.com>
14817
14818         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14819
14820 2018-02-08  Tom Tromey  <tom@tromey.com>
14821
14822         * source.c (find_source_lines): Use gdb::def_vector.
14823
14824 2018-02-08  Tom Tromey  <tom@tromey.com>
14825
14826         * macrocmd.c (struct temporary_macro_definition): New.
14827         (macro_define_command): Use temporary_macro_definition.  Remove
14828         cleanups.
14829         (free_macro_definition_ptr): Remove.
14830
14831 2018-02-08  Tom Tromey  <tom@tromey.com>
14832
14833         * macroexp.c (maybe_expand): Use std::string.
14834
14835 2018-02-08  Tom Tromey  <tom@tromey.com>
14836
14837         * macroexp.c (struct macro_buffer): Add initializers for some
14838         members.
14839         (init_buffer, init_shared_buffer, free_buffer)
14840         (free_buffer_return_text): Remove.
14841         (macro_buffer): New constructors.
14842         (~macro_buffer): New destructor.
14843         (macro_buffer::set_shared): New method.
14844         (macro_buffer::resize_buffer, macro_buffer::appendc)
14845         (macro_buffer::appendmem): Now methods, not free functions.
14846         (set_token, append_tokens_without_splicing, stringify)
14847         (macro_stringify): Update.
14848         (gather_arguments): Change return type.  Remove argc_p argument,
14849         add args_ptr argument.  Use std::vector.
14850         (substitute_args): Remove argc argument.  Accept std::vector.
14851         (expand): Update.  Use std::vector.
14852         (scan, macro_expand, macro_expand_next): Update.
14853
14854 2018-02-08  Tom Tromey  <tom@tromey.com>
14855
14856         * symtab.c (default_collect_symbol_completion_matches_break_on):
14857         Use unique_xmalloc_ptr.
14858         * macroscope.h: (sal_macro_scope, user_macro_scope)
14859         (default_macro_scope): Return unique_xmalloc_ptr.
14860         * macroscope.c (sal_macro_scope, user_macro_scope)
14861         (default_macro_scope): Return unique_xmalloc_ptr.
14862         * macroexp.h (macro_expand, macro_expand_once): Return
14863         unique_xmalloc_ptr.
14864         * macroexp.c (macro_expand, macro_expand_once): Return
14865         unique_xmalloc_ptr.
14866         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14867         (info_macro_command, info_macros_command): Use
14868         unique_xmalloc_ptr.
14869         * compile/compile-c-support.c (write_macro_definitions): Use
14870         unique_xmalloc_ptr.
14871         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14872
14873 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14874
14875         * value.c (value_static_field): Assign field type instead of
14876         containing type when returning an optimized out value.
14877
14878 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14879
14880         * ft32-tdep.c (ft32_read_pc): Remove.
14881         (ft32_write_pc): Remove.
14882         (ft32_gdbarch_init): Update.
14883         * m32r-tdep.c (m32r_read_pc): Remove.
14884         (m32r_gdbarch_init): Update.
14885         * mep-tdep.c (mep_read_pc): Remove.
14886         (mep_gdbarch_init): Update.
14887         * microblaze-tdep.c (microblaze_write_pc): Remove.
14888         (microblaze_gdbarch_init): Update.
14889         * mn10300-tdep.c (mn10300_read_pc): Remove.
14890         (mn10300_write_pc): Remove.
14891         (mn10300_gdbarch_init): Update.
14892         * moxie-tdep.c (moxie_read_pc): Remove.
14893         (moxie_write_pc): Remove.
14894         (moxie_gdbarch_init): Update.
14895
14896 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14897
14898         * expprint.c (print_subexp_standard): Handle
14899         OP_F77_UNDETERMINED_ARGLIST.
14900         (dump_subexp_body_standard): Likewise.
14901
14902 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14903
14904         * target-descriptions.c (tdesc_element_visitor) Add empty
14905         implementations.
14906         (tdesc_type): Move make_gdb_type from here.
14907         (tdesc_type_builtin): Likewise.
14908         (tdesc_type_vector): Likewise.
14909         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14910         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14911         (make_gdb_type_union): Likewise.
14912         (make_gdb_type_flags): Likewise.
14913         (make_gdb_type_enum): Likewise.
14914         (make_gdb_type): New function.
14915         (tdesc_register_type): Use static make_gdb_type.
14916
14917 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14918
14919         * infcmd.c (default_print_one_register_info): Align natural-format
14920         column values consistently one under another.
14921         (pad_to_column): New function.
14922
14923 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14924
14925         * dwarf2read.c (dwarf2_physname): Move commment.
14926
14927 2018-02-01  Leszek Swirski  <leszeks@google.com>
14928
14929         * varobj.c (varobj_formatted_print_options): Allow recursive
14930         pretty printing if pretty printing is enabled.
14931
14932 2018-02-01  Leszek Swirski  <leszeks@google.com>
14933
14934         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14935         names after a structop as a filename.
14936
14937 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14938
14939         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14940         (arm_record_coproc_data_proc): Likewise.
14941
14942 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14943
14944         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14945
14946 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14947
14948         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14949         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14950
14951 2018-01-31  Pedro Alves  <palves@redhat.com>
14952
14953         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14954         * inflow.c (child_terminal_save_inferior): Wrap reference to
14955         tcgetpgrp in HAVE_TERMIOS_H.
14956         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14957         _WIN32.
14958         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14959         always iterate over all inferiors.
14960         (gdbsim_cntrl_c): Adjust.
14961         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14962
14963 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14964
14965         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14966         index type is objfile-owned if the element type is as well.
14967
14968 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14969
14970         GDB 8.1 released.
14971
14972 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14973
14974         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14975         "features/s390x-linux64.c".
14976         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14977         s390_linux32 and s390x_linux64.
14978         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14979         default tdesc.
14980         * s390-tdep.c: Include "features/s390-linux32.c" and
14981         "features/s390x-linux64.c".
14982         (s390_tdesc_valid): Add check for tdesc_has_registers.
14983         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14984         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14985         tdesc_s390x_linux64.
14986         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14987         tdesc_s390x_linux64 to...
14988         * s390-tdep.h: ...here.
14989
14990 2018-01-30  Pedro Alves  <palves@redhat.com>
14991
14992         PR gdb/13211
14993         * config.in, configure: Regenerate.
14994         * configure.ac: Check for getpgid.
14995         * go32-nat.c (go32_pass_ctrlc): New.
14996         (go32_target): Install it.
14997         * inf-child.c (inf_child_target): Install
14998         child_terminal_save_inferior, child_pass_ctrlc and
14999         child_interrupt.
15000         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15001         (inf_ptrace_target): No longer install it.
15002         * infcmd.c (interrupt_target_1): Adjust.
15003         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15004         (child_interrupt): Declare.
15005         (inferior::terminal_state): New.
15006         * inflow.c (struct terminal_info): Update comments.
15007         (inferior_process_group): Delete.
15008         (terminal_is_ours): Delete.
15009         (gdb_tty_state): New.
15010         (child_terminal_init): Adjust.
15011         (is_gdb_terminal, sharing_input_terminal_1)
15012         (sharing_input_terminal): New functions.
15013         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15014         Set the process's actual process group in the foreground if
15015         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15016         mark terminal as the inferior's if not sharing GDB's terminal.
15017         Don't check attach_flag.
15018         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15019         pass down a target_terminal_state.
15020         (child_terminal_save_inferior): New, factored out from ...
15021         (child_terminal_ours_1): ... this.  Handle
15022         target_terminal_state::is_ours_for_output.
15023         (child_interrupt, child_pass_ctrlc): New.
15024         (inflow_inferior_exit): Clear the inferior's terminal_state.
15025         (copy_terminal_info): Copy the inferior's terminal state.
15026         (_initialize_inflow): Remove reference to terminal_is_ours.
15027         * inflow.h (inferior_process_group): Delete.
15028         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15029         * procfs.c (procfs_target): Don't install procfs_interrupt.
15030         (procfs_interrupt): Delete.
15031         * remote.c (remote_serial_quit_handler): Adjust.
15032         (remote_interrupt): Remove ptid parameter.  Adjust.
15033         * target-delegates.c: Regenerate.
15034         * target.c: Include "terminal.h".
15035         (target_terminal::terminal_state): Rename to ...
15036         (target_terminal::m_terminal_state): ... this.
15037         (target_terminal::init): Adjust.
15038         (target_terminal::inferior): Adjust to per-inferior
15039         terminal_state.
15040         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15041         (target_terminal::ours, target_terminal::ours_for_output): Use
15042         target_terminal_is_ours_kind.
15043         (target_interrupt): Remove ptid parameter.  Adjust.
15044         (default_target_pass_ctrlc): Adjust.
15045         * target.h (target_ops::to_terminal_save_inferior): New field.
15046         (target_ops::to_interrupt): Remove ptid_t parameter.
15047         (target_interrupt): Remove ptid_t parameter.  Update comment.
15048         (target_pass_ctrlc): Update comment.
15049         * target/target.h (target_terminal_state): New scoped enum,
15050         factored out of ...
15051         (target_terminal::terminal_state): ... here.
15052         (target_terminal::inferior): Update comments.
15053         (target_terminal::restore_inferior): New.
15054         (target_terminal::is_inferior, target_terminal::is_ours)
15055         (target_terminal::is_ours_for_output): Adjust.
15056         (target_terminal::scoped_restore_terminal_state): Adjust to
15057         rename, and call restore_inferior() instead of inferior().
15058         (target_terminal::scoped_restore_terminal_state::m_state): Change
15059         type.
15060         (target_terminal::terminal_state): Rename to ...
15061         (target_terminal::m_terminal_state): ... this and change type.
15062
15063 2018-01-30  Pedro Alves  <palves@redhat.com>
15064
15065         * linux-nat.c (wait_for_signal): New function.
15066         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15067         directly.
15068         (async_terminal_is_ours)
15069         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15070         (linux_nat_add_target): Don't override
15071         to_terminal_inferior/to_terminal_ours.
15072
15073 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15074
15075         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15076
15077 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15078
15079         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15080         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15081         dwarf2_per_objfile_free here.
15082         (dwarf2_per_objfile_free): Remove.
15083         (_initialize_dwarf2_read): Don't register
15084         dwarf2_per_objfile_free as a registry cleanup.
15085
15086 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15087
15088         Avoid compilation errors in MinGW native builds
15089
15090         The error is triggered by including python-internal.h, and the
15091         error message is:
15092
15093              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15094                       from build-gnulib/import/math.h:27,
15095                       from d:/usr/Python26/include/pyport.h:235,
15096                       from d:/usr/Python26/include/Python.h:58,
15097                       from python/python-internal.h:94,
15098                       from python/py-arch.c:24:
15099              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15100         using ::hypot;
15101                 ^~~~~
15102
15103         This happens because Python headers define 'hypot' to expand t
15104         '_hypot' in the Windows builds.
15105         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15106         'hypoth'.  This avoids a compilation error.
15107
15108 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15109
15110         * MAINTAINERS (Write After Approval): Fix ordering.
15111
15112 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15113
15114         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15115
15116 2018-01-26  Alan Modra  <amodra@gmail.com>
15117
15118         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15119         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15120         Remove nop.  Make const.  Comment.
15121         (powerpc32_plt_stub_so_2): New.
15122         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15123         Correct count.  Update uses.
15124         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15125         Move common code reading PLT entry word.  Correct
15126         powerpc32_plt_stub PLT address calculation.
15127         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15128         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15129         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15130         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15131         (ppc64_standard_linkage8): Likewise.
15132         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15133         Correct insns description.
15134         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15135
15136 2018-01-24  Pedro Alves  <palves@redhat.com>
15137
15138         GCC PR libstdc++/83906
15139         * gdbtypes.c (operator==(const dynamic_prop &,
15140         const dynamic_prop &)): New.
15141         (operator==(const range_bounds &, const range_bounds &)): New.
15142         (check_types_equal): Use them instead of memcmp.
15143         * gdbtypes.h (operator==(const dynamic_prop &,
15144         const dynamic_prop &)): Declare.
15145         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15146         (operator==(const range_bounds &, const range_bounds &)): Declare.
15147         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15148
15149 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15150
15151         * s390-linux-tdep.c (s390_record_address_mask)
15152         (s390_record_calc_disp_common, s390_record_calc_disp)
15153         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15154         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15155         (s390_process_record): Move to s390-tdep.c.
15156         (s390_linux_init_abi_any): Adjust.
15157         * s390-tdep.c (s390_record_address_mask)
15158         (s390_record_calc_disp_common, s390_record_calc_disp)
15159         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15160         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15161         (s390_process_record): Moved from s390-linux-tdep.c
15162         (s390_gdbarch_init): Adjust.
15163
15164 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15165
15166         * s390-linux-nat.c (s390-tdep.h): New include.
15167         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15168         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15169         (ALLDEPFILES): Add s390-tdep.c.
15170         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15171         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15172         * s390-tdep.h: ...this.  New file.
15173         * s390-linux-tdep.c (s390-tdep.h): New include.
15174         (_initialize_s390_tdep): Rename to...
15175         (_initialize_s390_linux_tdep): ...this and adjust.
15176         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15177         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15178         s390-tdep.h.
15179         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15180         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15181         (s390_is_partial_instruction, s390_software_single_step)
15182         (is_non_branch_ril, s390_displaced_step_copy_insn)
15183         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15184         (s390_prologue_data, s390_addr, s390_store, s390_load)
15185         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15186         (s390_register_call_saved, s390_guess_tracepoint_registers)
15187         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15188         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15189         (s390_pseudo_register_name, s390_pseudo_register_type)
15190         (s390_pseudo_register_read, s390_pseudo_register_write)
15191         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15192         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15193         (s390_addr_bits_remove, s390_address_class_type_flags)
15194         (s390_address_class_type_flags_to_name)
15195         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15196         (s390_function_arg_float, s390_function_arg_vector)
15197         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15198         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15199         (s390_frame_align, s390_register_return_value, s390_return_value)
15200         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15201         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15202         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15203         (s390_trad_frame_prev_register, s390_unwind_cache)
15204         (s390_prologue_frame_unwind_cache)
15205         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15206         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15207         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15208         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15209         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15210         (s390_frame_base_address, s390_local_base_address)
15211         (s390_frame_base, s390_gcc_target_options)
15212         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15213         (s390_validate_reg_range, s390_tdesc_valid)
15214         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15215         * s390-tdep.c: ...this.  New file.
15216
15217 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15218
15219         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15220         (s390_process_record, s390_gdbarch_tdep_alloc)
15221         (s390_linux_init_abi_any): Use/set new hook.
15222
15223 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15224
15225         * s390-linux-tdep.c (osabi.h): New include.
15226         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15227         (s390_linux_init_abi_any): New functions.
15228         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15229
15230 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15231
15232         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15233         tdesc_has_registers check
15234
15235 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15236
15237         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15238         (s390_validate_reg_range): New macro.
15239         (s390_gdbarch_init): Adjust.
15240
15241 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15242
15243         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15244         (s390_gdbarch_tdep_alloc): Adjust.
15245         (s390_gdbarch_init): Adjust.
15246
15247 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15248
15249         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15250         <have_tdb>: Change type to bool.
15251         (s390_gdbarch_tdep_alloc): Adjust.
15252         (s390_gdbarch_init): Adjust.
15253
15254 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15255
15256         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15257         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15258         (s390_gdbarch_tdep_alloc): New function.
15259         (s390_gdbarch_init): Allocate tdep at start and use its fields
15260         instead of separate variables.
15261
15262 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15263
15264         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15265         when looking for cached gdbarch and add comment for remaining.
15266
15267 2018-01-22  Pedro Alves  <palves@redhat.com>
15268             Sergio Durigan Junior  <sergiodj@redhat.com>
15269
15270         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15271         case.
15272
15273 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15274
15275         * MAINTAINERS: Update my company e-mail address.
15276
15277 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15278
15279         * regcache.c (cooked_write_test): New function.
15280         (_initialize_regcache): Register the test.
15281
15282 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15283
15284         * ia64-tdep.c (ia64_pseudo_register_read): Call
15285         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15286         * m32c-tdep.c (m32c_cat_read): Likewise.
15287         (m32c_r3r2r1r0_read): Likewise.
15288         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15289         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15290
15291 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15292
15293         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15294         method raw_read instead of regcache_raw_read.
15295         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15296         * arm-tdep.c (arm_neon_quad_read): Likewise.
15297         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15298         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15299         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15300         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15301         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15302         (i386_pseudo_register_read_into_value): Likewise.
15303         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15304         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15305         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15306         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15307         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15308         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15309         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15310         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15311         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15312
15313 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15314
15315         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15316         * configure.tgt: Remove target mt.
15317         * mt-tdep.c: Remove.
15318         * regcache.c (cooked_read_test): Remove the check for mt.
15319
15320 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15321
15322         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15323         instead of gdbarch_pseudo_register_read_value.
15324
15325 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15326
15327         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15328         language is Ada.
15329
15330 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15331
15332         * linespec.c (create_sals_line_offset): Remove code that preserved
15333         the symtab_and_line's line number.
15334
15335 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15336
15337         * varobj.c (varobj_create): Don't set valid_block when creating a
15338         floating varobj.
15339
15340 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15341
15342         * varobj.c (varobj_create): Remove out of date comment.
15343
15344 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15345
15346         PR mi/20395
15347         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15348         updating innermost block.
15349         * parse.c (innermost_block_tracker::update): Take extra type
15350         parameter, and check types match before updating innermost block.
15351         (write_dollar_variable): Update innermost block for registers.
15352         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15353         (innermost_block_tracker::innermost_block_tracker): Initialise
15354         m_types member.
15355         (innermost_block_tracker::reset): Take type parameter.
15356         (innermost_block_tracker::update): Take type parameter, and pass
15357         type through as needed.
15358         (innermost_block_tracker::m_types): New member.
15359         * varobj.c (varobj_create): Pass type when reseting innermost
15360         block.
15361
15362 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15363
15364         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15365         * ada-lang.c (resolve_subexp): Likewise.
15366         * breakpoint.c (set_breakpoint_condition) Likewise.
15367         (watch_command_1) Likewise.
15368         * c-exp.y (variable): Likewise.
15369         * d-exp.y (PrimaryExpression): Likewise.
15370         * f-exp.y (variable): Likewise.
15371         * go-exp.y (variable): Likewise.
15372         * m2-exp.y (variable): Likewise.
15373         * objfiles.c (objfile::~objfile): Likewise.
15374         * p-exp.y (variable): Likewise.
15375         * parse.c (innermost_block): Change type.
15376         * parser-defs.h (class innermost_block_tracker): New.
15377         (innermost_block): Change to innermost_block_tracker.
15378         * printcmd.c (display_command): Switch to innermost_block API.
15379         (do_one_display): Likewise.
15380         * rust-exp.y (do_one_display): Likewise.
15381         * symfile.c (clear_symtab_users): Likewise.
15382         * varobj.c (varobj_create): Switch to innermost_block API, replace
15383         use of innermost_block with block stored on varobj object.
15384
15385 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15386
15387         * expression.h (innermost_block): Remove declaration.
15388         * varobj.c: Add 'parser-defs.h' include.
15389
15390 2018-01-19  Tom Tromey  <tom@tromey.com>
15391
15392         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15393         symbols in the static and global blocks.
15394
15395 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15396
15397         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15398         gdb_ptrace.h, and move including gdb_wait.h ...
15399         * nat/linux-ptrace.h: ... to here.
15400
15401 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15402
15403         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15404         inf_ptrace_detach_success.
15405         (inf_ptrace_detach_success): Add inferior parameter, use it
15406         instead of inferior_ptid, pass it to detach_inferior.
15407         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15408         parameter.
15409         * inferior.c (detach_inferior): Add overload that takes an
15410         inferior object.
15411         * inferior.h (detach_inferior): Likewise.
15412         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15413         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15414         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15415
15416 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15417
15418         * target.h (struct target_ops) <to_detach>: Add inferior
15419         parameter.
15420         (target_detach): Likewise.
15421         * target.c (dispose_inferior): Pass inferior down.
15422         (target_detach): Pass inferior down.  Assert that it is equal to
15423         the current inferior.
15424         * aix-thread.c (aix_thread_detach): Pass inferior down.
15425         * corefile.c (core_file_command): Pass current_inferior() down.
15426         * corelow.c (core_detach): Add inferior parameter.
15427         * darwin-nat.c (darwin_detach): Likewise.
15428         * gnu-nat.c (gnu_detach): Likewise.
15429         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15430         * infcmd.c (detach_command): Pass current_inferior() down to
15431         target_detach.
15432         * infrun.c (follow_fork_inferior): Pass parent_inf to
15433         target_detach.
15434         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15435         target_detach.
15436         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15437         * linux-thread-db.c (thread_db_detach): Likewise.
15438         * nto-procfs.c (procfs_detach): Likewise.
15439         * procfs.c (procfs_detach): Likewise.
15440         * record.c (record_detach): Likewise.
15441         * record.h (struct inferior): Forward-declare.
15442         (record_detach): Add inferior parameter.
15443         * remote-sim.c (gdbsim_detach): Likewise.
15444         * remote.c (remote_detach_1): Likewise.
15445         (remote_detach): Likewise.
15446         (extended_remote_detach): Likewise.
15447         * sol-thread.c (sol_thread_detach): Likewise.
15448         * target-debug.h (target_debug_print_inferior_p): New macro.
15449         * target-delegates.c: Re-generate.
15450         * top.c (kill_or_detach): Pass inferior down to target_detach.
15451         * windows-nat.c (windows_detach): Add inferior parameter.
15452
15453 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15454
15455         * target.h (struct target_ops) <to_detach>: Remove args
15456         parameter.
15457         (target_detach): Likewise.
15458         * target.c (dispose_inferior): Adjust.
15459         (target_detach): Remove args parameter, adjust.
15460         * aix-thread.c (aix_thread_detach): Adjust.
15461         * corefile.c (core_file_command): Adjust.
15462         * corelow.c (core_detach): Adjust.
15463         * darwin-nat.c (darwin_detach): Adjust.
15464         * gnu-nat.c (gnu_detach): Adjust.
15465         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15466         * infcmd.c (detach_command): Adjust
15467         * infrun.c (follow_fork_inferior): Adjust.
15468         (handle_vfork_child_exec_or_exit): Adjust.
15469         * linux-fork.c (linux_fork_detach): Remove args parameter.
15470         * linux-fork.h (linux_fork_detach): Likewise.
15471         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15472         * linux-thread-db.c (thread_db_detach): Likewise.
15473         * nto-procfs.c (procfs_detach): Likewise.
15474         * procfs.c (procfs_detach): Likewise.
15475         (do_detach): Remove signo parameter.
15476         * record.c (record_detach): Remove args parameter.
15477         * record.h (record_detach): Likewise.
15478         * remote-sim.c (gdbsim_detach): Likewise.
15479         * remote.c (remote_detach_1): Likewise.
15480         (remote_detach): Likewise.
15481         (extended_remote_detach): Likewise.
15482         * sol-thread.c (sol_thread_detach): Likewise.
15483         * target-delegates.c: Re-generate.
15484         * top.c (struct qt_args) <args>: Remove field.
15485         (kill_or_detach): Don't pass args.
15486         (quit_force): Don't set args.
15487         * windows-nat.c (windows_detach): Remove args parameter.
15488
15489 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15490
15491         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15492         (arm_linux_init_abi): Install it.
15493
15494 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15495
15496         * osabi.c (gdb_osabi_names): Extend the regexp for
15497         arm-linux-gnueabihf.
15498
15499 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15500
15501         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15502         m_abbrevs.
15503         (abbrev_table::add_abbrev): Update.
15504         (abbrev_table::lookup_abbrev): Update.
15505
15506 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15507
15508         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15509
15510 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15511
15512         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15513         to "std::string".
15514
15515 2018-01-17  Tom Tromey  <tom@tromey.com>
15516
15517         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15518
15519 2018-01-17  Tom Tromey  <tom@tromey.com>
15520
15521         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15522         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15523         (create_array_type_with_stride): Update.
15524         * dwarf2read.c (set_die_type): Update.
15525
15526 2018-01-17  Tom Tromey  <tom@tromey.com>
15527
15528         * dwarf2read.c (delayed_method_info): Remove typedef.
15529         (dwarf2_cu::method_info): Now a std::vector.
15530         (add_to_method_list): Update.
15531         (free_delayed_list): Remove.
15532         (compute_delayed_physnames): Update.
15533         (process_full_comp_unit, process_full_type_unit): Clear the method
15534         list.  Remove cleanups.
15535         (psymtab_include_file_name): Add name_holder parameter.  Use
15536         unique_xmalloc_ptr.
15537         (dwarf_decode_lines): Update.
15538
15539 2018-01-17  Tom Tromey  <tom@tromey.com>
15540             Simon Marchi  <simon.marchi@ericsson.com>
15541
15542         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15543         (dwarf2_per_objfile::free_cached_comp_units)
15544         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15545         (init_cutu_and_read_dies_no_follow): Update.
15546         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15547         (dwarf2_cu::~dwarf2_cu): New.
15548         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15549         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15550
15551 2018-01-17  Tom Tromey  <tom@tromey.com>
15552             Simon Marchi  <simon.marchi@ericsson.com>
15553
15554         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15555         (struct die_reader_specs) <abbrev_table>: New member.
15556         (struct abbrev_table): Add constructor.
15557         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15558         <abbrev_obstack>: Now an auto_obstack.
15559         (abbrev_table_up): New typedef.
15560         (init_cu_die_reader): Add abbrev_table parameter.
15561         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15562         Add result_dwo_abbrev_table.
15563         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15564         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15565         Update.
15566         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15567         parameter.
15568         (skip_children): Update.
15569         (abbrev_table::alloc_abbrev): Rename from
15570         abbrev_table_alloc_abbrev.
15571         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15572         (abbrev_table::lookup_abbrev): Rename from
15573         abbrev_table_lookup_abbrev.
15574         (abbrev_table_read_table): Return abbrev_table_up.
15575         (abbrev_table_free, abbrev_table_free_cleanup)
15576         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15577         (load_partial_dies): Update.
15578
15579 2018-01-17  Tom Tromey  <tom@tromey.com>
15580
15581         * dwarf2read.c (dwarf2_compute_name): Update comment.
15582         (read_func_scope, read_variable): Update.
15583         (new_symbol): Remove.
15584         (new_symbol_full): Rename to new_symbol.
15585
15586 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15587
15588         PR gdb/16577
15589         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15590         a warning instead of throwing an error, set section size to 0 and return
15591         NULL.
15592         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15593
15594 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15595
15596         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15597         std::string.
15598         (linux_ptrace_attach_fail_reason_string): Likewise.
15599         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15600         Likewise.
15601         (linux_ptrace_attach_fail_reason_string): Likewise.
15602         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15603
15604 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15605
15606         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15607
15608 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15609
15610         PR gdb/21559
15611         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15612         checking for fs_base/gs_base fields in struct user_regs_struct.
15613         * configure: Regenerate.
15614
15615 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15616
15617         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15618         function.
15619         (aarch64_linux_init_abi): Install it to gdbarch hook
15620         gcc_target_options.
15621
15622 2018-01-15  Pedro Alves  <palves@redhat.com>
15623
15624         * common/signals-state-save-restore.c
15625         (save_original_signals_state): Fix typos.
15626
15627 2017-01-12  Tom Tromey  <tom@tromey.com>
15628             Sergio Durigan Junior  <sergiodj@redhat.com>
15629
15630         * Makefile.in (install-only): Install gdb-add-index.
15631
15632 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15633
15634         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15635
15636 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15637
15638         * infrun.c (keep_going_pass_signal): Clear step-over info when
15639         insert_breakpoints fails.
15640
15641 2018-01-11  Pedro Alves  <palves@redhat.com>
15642
15643         PR gdb/22583
15644         * infrun.c (resume): Rename to ...
15645         (resume_1): ... this.
15646         (resume): Reimplement as wrapper around resume_1.
15647
15648 2018-01-11  Pedro Alves  <palves@redhat.com>
15649
15650         PR remote/22597
15651         * remote.c (remote_parse_stop_reply): Default to the last-set
15652         general thread instead of to 'magic_null_ptid'.
15653
15654 2018-01-10  Pedro Alves  <palves@redhat.com>
15655
15656         * language.h (language_get_symbol_name_matcher): Rename ...
15657         (get_symbol_name_matcher): ... this.
15658         * language.c (language_get_symbol_name_matcher): Ditto.
15659         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15660         callers adjusted.
15661
15662 2018-01-10  Pedro Alves  <palves@redhat.com>
15663
15664         PR gdb/22670
15665         * dwarf2read.c
15666         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15667         Adjust to use language_get_symbol_name_matcher instead of
15668         language_defn::la_get_symbol_name_matcher.
15669         * language.c (language_get_symbol_name_matcher): If in Ada mode
15670         and the lookup name is a verbatim match, return Ada's matcher.
15671         * language.h (language_get_symbol_name_matcher): Adjust comment.
15672         (ada_lookup_name_info::verbatim_p):: New method.
15673
15674 2018-01-10  Pedro Alves  <palves@redhat.com>
15675
15676         PR gdb/22670
15677         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15678         minsym's language is language_auto or language_cplus, pass down
15679         language_ada instead.
15680         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15681
15682 2018-01-10  Pedro Alves  <palves@redhat.com>
15683
15684         PR gdb/22670
15685         * minsyms.c (linkage_name_str): New function.
15686         (iterate_over_minimal_symbols): Use it.
15687
15688 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15689
15690         * NEWS: Document that 'info proc' now works on FreeBSD.
15691
15692 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15693
15694         * configure.ac: Check for kinfo_getfile in libutil.
15695         * configure: Regenerate.
15696         * config.in: Regenerate.
15697         * fbsd-nat.c: Include "fbsd-tdep.h".
15698         (fbsd_fetch_cmdline): New.
15699         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15700         rather than calling error.
15701         (fbsd_info_proc): New.
15702         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15703         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15704         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15705
15706 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15707
15708         * fbsd-nat.c (struct free_deleter): Remove.
15709         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15710
15711 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15712
15713         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15714         NULL for an empty pathname.
15715
15716 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15717
15718         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15719         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15720         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15721         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15722         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15723         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15724         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15725         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15726         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15727         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15728         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15729         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15730         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15731         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15732         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15733
15734 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15735
15736         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15737         (gnu_xfer_auxv): New function.
15738         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15739         TARGET_OBJECT_AUXV.
15740
15741 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15742             Simon Marchi  <simon.marchi@ericsson.com>
15743
15744         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15745         common/selftest.c.
15746         (COMMON_OBS): Remove selftest.o.
15747         * configure.ac: Append selftest-arch.c and common/selftest.c to
15748         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15749         * configure: Re-generated.
15750         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15751         GDB_SELF_TEST.
15752         (maintenance_info_selftests): Likewise.
15753
15754 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15755
15756         * ada-valprint.c (val_print_packed_array_elements): Use
15757         proper number of elements when printing an array indexed
15758         by an enumeration type.
15759
15760 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15761
15762         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15763         (dw2_get_file_names_reader): Adjust.
15764         (lookup_dwo_signatured_type): Adjust.
15765         (lookup_dwp_signatured_type): Adjust.
15766         (lookup_signatured_type): Adjust.
15767         (create_type_unit_group): Adjust.
15768         (get_type_unit_group): Adjust.
15769         (process_psymtab_comp_unit_reader): Adjust.
15770         (build_type_psymtabs_reader): Adjust.
15771         (scan_partial_symbols): Adjust.
15772         (add_partial_symbol): Adjust.
15773         (add_partial_subprogram): Adjust.
15774         (peek_die_abbrev): Adjust.
15775         (fixup_go_packaging): Adjust.
15776         (process_imported_unit_die): Adjust.
15777         (dwarf2_compute_name): Adjust.
15778         (dwarf2_physname): Adjust.
15779         (read_import_statement): Adjust.
15780         (handle_DW_AT_stmt_list): Adjust.
15781         (read_file_scope): Adjust.
15782         (read_func_scope): Adjust.
15783         (read_lexical_block_scope): Adjust.
15784         (read_call_site_scope): Adjust.
15785         (read_variable): Adjust.
15786         (dwarf2_rnglists_process): Adjust.
15787         (dwarf2_ranges_process): Adjust.
15788         (dwarf2_ranges_read): Adjust.
15789         (dwarf2_get_pc_bounds): Adjust.
15790         (dwarf2_record_block_ranges): Adjust.
15791         (dwarf2_add_field): Adjust.
15792         (dwarf2_add_member_fn): Adjust.
15793         (read_structure_type): Adjust.
15794         (process_structure_scope): Adjust.
15795         (read_enumeration_type): Adjust.
15796         (read_array_type): Adjust.
15797         (mark_common_block_symbol_computed): Adjust.
15798         (read_common_block): Adjust.
15799         (read_namespace_type): Adjust.
15800         (read_namespace): Adjust.
15801         (read_module_type): Adjust.
15802         (read_tag_pointer_type): Adjust.
15803         (read_tag_ptr_to_member_type): Adjust.
15804         (read_tag_string_type): Adjust.
15805         (read_subroutine_type): Adjust.
15806         (read_typedef): Adjust.
15807         (read_base_type): Adjust.
15808         (attr_to_dynamic_prop): Adjust.
15809         (read_subrange_type): Adjust.
15810         (read_unspecified_type): Adjust.
15811         (dwarf2_read_abbrevs): Adjust.
15812         (load_partial_dies): Adjust.
15813         (read_partial_die): Adjust.
15814         (find_partial_die): Adjust.
15815         (guess_partial_die_structure_name): Adjust.
15816         (fixup_partial_die): Adjust.
15817         (read_attribute_value): Adjust.
15818         (read_addr_index): Adjust.
15819         (read_addr_index_from_leb128): Adjust.
15820         (read_str_index): Adjust.
15821         (dwarf2_string_attr): Adjust.
15822         (get_debug_line_section): Adjust.
15823         (dwarf_decode_line_header): Adjust.
15824         (lnp_state_machine::check_line_address): Adjust.
15825         (dwarf_decode_lines_1): Adjust.
15826         (dwarf_decode_lines): Adjust.
15827         (dwarf2_start_symtab): Adjust.
15828         (var_decode_location): Adjust.
15829         (new_symbol_full): Adjust.
15830         (dwarf2_const_value_data): Adjust.
15831         (dwarf2_const_value_attr): Adjust.
15832         (dwarf2_const_value): Adjust.
15833         (die_type): Adjust.
15834         (die_containing_type): Adjust.
15835         (build_error_marker_type): Adjust.
15836         (lookup_die_type): Adjust.
15837         (guess_full_die_structure_name): Adjust.
15838         (anonymous_struct_prefix): Adjust.
15839         (determine_prefix): Adjust.
15840         (dwarf2_name): Adjust.
15841         (follow_die_ref_or_sig): Adjust.
15842         (follow_die_offset): Adjust.
15843         (follow_die_ref): Adjust.
15844         (follow_die_sig_1): Adjust.
15845         (follow_die_sig): Adjust.
15846         (get_signatured_type): Adjust.
15847         (get_DW_AT_signature_type): Adjust.
15848         (decode_locdesc): Adjust.
15849         (dwarf_decode_macros): Adjust.
15850         (cu_debug_loc_section): Adjust.
15851         (fill_in_loclist_baton): Adjust.
15852         (dwarf2_symbol_mark_computed): Adjust.
15853         (init_one_comp_unit): Don't assign
15854         dwarf2_cu::dwarf2_per_objfile.
15855         (set_die_type): Adjust.
15856
15857 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15858
15859         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15860         <dwarf2_per_objfile>: New field.
15861         (dwarf2_per_objfile): Remove global.
15862         (get_dwarf2_per_objfile): New function.
15863         (set_dwarf2_per_objfile): New function.
15864         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15865         dwarf2_per_objfile.
15866         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15867         (read_abbrev_offset): Likewise.
15868         (read_indirect_string): Likewise.
15869         (read_indirect_line_string): Likewise.
15870         (read_indirect_string_at_offset): Likewise.
15871         (read_indirect_string_from_dwz): Likewise.
15872         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15873         dwarf2_per_objfile.
15874         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15875         (create_all_comp_units): Change objfile parameter to
15876         dwarf2_per_objfile.
15877         (create_all_type_units): Likewise.
15878         (process_queue): Add dwarf2_per_objfile parameter.
15879         (read_and_check_comp_unit_head): Likewise.
15880         (lookup_dwo_unit_in_dwp): Likewise.
15881         (get_dwp_file): Likewise.
15882         (process_cu_includes): Likewise.
15883         (struct free_dwo_file_cleanup_data): New struct.
15884         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15885         set_dwarf2_per_objfile.
15886         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15887         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15888         context, adjust calls.
15889         (dw2_instantiate_symtab): Likewise.
15890         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15891         (dw2_get_cu): Likewise.
15892         (create_cu_from_index_list): Change objfile parameter to
15893         dwarf2_per_objfile.
15894         (create_cus_from_index_list): Get dwarf2_per_objfile from
15895         context, adjust calls.
15896         (create_cus_from_index): Likewise.
15897         (create_signatured_type_table_from_index): Change objfile
15898         parameter to dwarf2_per_objfile.
15899         (create_signatured_type_table_from_debug_names): Change objfile
15900         parameter to dwarf2_per_objfile.
15901         (create_addrmap_from_index): Likewise.
15902         (create_addrmap_from_aranges): Likewise.
15903         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15904         (dw2_setup): Remove.
15905         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15906         context.
15907         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15908         get_dwarf2_per_objfile.
15909         (dw2_forget_cached_source_info): Likewise.
15910         (dw2_map_symtabs_matching_filename): Likewise.
15911         (struct dw2_symtab_iterator) <index>: Remove.
15912         <dwarf2_per_objfile>: New field.
15913         (dw2_symtab_iter_init): Replace index parameter with
15914         dwarf2_per_objfile.
15915         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15916         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15917         (dw2_print_stats): Likewise.
15918         (dw2_dump): Likewise.
15919         (dw2_expand_symtabs_for_function): Likewise.
15920         (dw2_expand_all_symtabs): Likewise.
15921         (dw2_expand_symtabs_with_fullname): Likewise.
15922         (dw2_expand_marked_cus): Replace index and objfile parameters
15923         with dwarf2_per_objfile.
15924         (dw_expand_symtabs_matching_file_matcher): Add
15925         dwarf2_per_objfile parameter and adjust calls.
15926         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15927         adjust calls.
15928         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15929         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15930         adjust calls.
15931         (create_cus_from_debug_names_list): Replace objfile parameter
15932         with dwarf2_per_objfile and adjust calls.
15933         (create_cus_from_debug_names): Likewise.
15934         (dwarf2_read_debug_names): Likewise.
15935         (mapped_debug_names::namei_to_name): Adjust call.
15936         (dw2_debug_names_iterator::next): Likewise.
15937         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15938         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15939         (dw2_debug_names_dump): Likewise.
15940         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15941         (dw2_debug_names_expand_symtabs_matching): Likewise.
15942         (dwarf2_initialize_objfile): Likewise.
15943         (dwarf2_build_psymtabs): Likewise.
15944         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15945         this_cu.
15946         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15947         (read_and_check_comp_unit_head): Likewise.
15948         (read_abbrev_offset): Likewise.
15949         (create_debug_type_hash_table): Likewise.
15950         (create_debug_types_hash_table): Likewise.
15951         (create_all_type_units): Replace objfile parameter with
15952         dwarf2_per_objfile.
15953         (add_type_unit): Add dwarf2_per_objfile parameter.
15954         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15955         with dwarf2_per_objfile.
15956         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15957         (lookup_dwp_signatured_type): Likewise.
15958         (lookup_signatured_type): Likewise.
15959         (read_cutu_die_from_dwo): Likewise.
15960         (init_tu_and_read_dwo_dies): Likewise.
15961         (init_cutu_and_read_dies): Likewise.
15962         (init_cutu_and_read_dies_no_follow): Likewise.
15963         (allocate_type_unit_groups_table): Add objfile parameter.
15964         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15965         (get_type_unit_group): Likewise.
15966         (process_psymtab_comp_unit): Update call.
15967         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15968         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15969         (print_tu_stats): Likewise.
15970         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15971         in void* parameter.
15972         (build_type_psymtabs): Change objfile parameter to
15973         dwarf2_per_objfile.
15974         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15975         passed in void* parameter.
15976         (process_skeletonless_type_units): Change objfile parameter to
15977         dwarf2_per_objfile.
15978         (set_partial_user): Likewise.
15979         (dwarf2_build_psymtabs_hard): Likewise.
15980         (read_comp_units_from_section): Likewise.
15981         (create_all_comp_units): Likewise.
15982         (scan_partial_symbols): Update calls.
15983         (add_partial_symbol): Likewise.
15984         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15985         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15986         (process_queue): Add dwarf2_per_objfile parameter.
15987         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15988         (compute_compunit_symtab_includes): Likewise.
15989         (process_cu_includes): Add dwarf2_per_objfile parameter.
15990         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15991         (process_full_type_unit): Likewise.
15992         (process_imported_unit_die): Update call.
15993         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15994         (read_file_scope): Likewise.
15995         (allocate_dwo_file_hash_table): Add objfile parameter.
15996         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15997         (create_cus_hash_table): Likewise.
15998         (create_dwp_hash_table): Likewise.
15999         (create_dwo_unit_in_dwp_v1): Likewise.
16000         (create_dwp_v2_section): Likewise.
16001         (create_dwo_unit_in_dwp_v2): Likewise.
16002         (lookup_dwo_unit_in_dwp): Likewise.
16003         (try_open_dwop_file): Likewise.
16004         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16005         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16006         cleanup to include a reference to dwarf2_per_objfile.
16007         (open_dwp_file): Add dwarf2_per_objfile parameter.
16008         (open_and_init_dwp_file): Likewise.
16009         (get_dwp_file): Likewise.
16010         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16011         (queue_and_load_all_dwo_tus): Update call.
16012         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16013         data.
16014         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16015         (dwarf2_ranges_process): Likewise.
16016         (dwarf2_get_pc_bounds): Likewise.
16017         (mark_common_block_symbol_computed): Likewise.
16018         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16019         (dwarf2_read_abbrevs): Update call.
16020         (read_partial_die): Use dwarf2_per_objfile from cu.
16021         (find_partial_die): Likewise.
16022         (fixup_partial_die): Likewise.
16023         (read_attribute_value): Likewise.
16024         (read_indirect_string_at_offset_from): Add objfile parameter.
16025         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16026         parameter.
16027         (read_indirect_string_from_dwz): Add objfile parameter.
16028         (read_indirect_string): Add objfile parameter.
16029         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16030         (read_addr_index): Use dwarf2_per_objfile from cu.
16031         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16032         call dw2_setup.
16033         (read_str_index): Use dwarf2_per_objfile from cu.
16034         (get_debug_line_section): Likewise.
16035         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16036         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16037         (new_symbol_full): Use dwarf2_per_objfile from cu.
16038         (build_error_marker_type): Likewise.
16039         (lookup_die_type): Likewise.
16040         (determine_prefix): Likewise.
16041         (follow_die_offset): Likewise.
16042         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16043         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16044         (dwarf2_fetch_die_type_sect_off): Likewise.
16045         (dwarf2_get_die_type): Likewise.
16046         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16047         (get_signatured_type): Likewise.
16048         (get_DW_AT_signature_type): Likewise.
16049         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16050         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16051         (cu_debug_loc_section): Likewise.
16052         (fill_in_loclist_baton): Likewise.
16053         (dwarf2_symbol_mark_computed): Likewise.
16054         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16055         dwarf2_per_objfile.
16056         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16057         parameter.
16058         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16059         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16060         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16061         (set_die_type): Use dwarf2_free_objfile from cu.
16062         (get_die_type_at_offset): Likewise.
16063         (dwarf2_per_objfile_free): Don't assign global variable.
16064         (debug_names) <constructor>: Add dwarf2_per_objfile
16065         parameter, update m_debugstrlookup construction.
16066         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16067         parameter.
16068         <m_dwarf2_per_objfile>: New field.
16069         <lookup>: Use m_dwarf2_per_objfile.
16070         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16071         (psyms_seen_size): Likewise.
16072         (write_gdbindex): Replace objfile parameter with
16073         dwarf2_per_objfile.
16074         (write_debug_names): Likewise.
16075         (write_psymtabs_to_index): Likewise.
16076         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16077         calls.
16078
16079 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16080
16081         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16082         <dwarf2_per_objfile>: New field.
16083         (struct dwarf2_per_cu_data) <objfile>: Remove.
16084         <dwarf2_per_objfile>: New field.
16085         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16086         of objfile.
16087         (create_signatured_type_table_from_index): Likewise.
16088         (create_debug_type_hash_table): Likewise.
16089         (fill_in_sig_entry_from_dwo_entry): Likewise.
16090         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16091         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16092         objfile.
16093         (create_partial_symtab): Access objfile through
16094         dwarf2_per_objfile.
16095         (process_psymtab_comp_unit_reader): Likewise.
16096         (read_comp_units_from_section): Likewise.
16097         (scan_partial_symbols): Likewise.
16098         (add_partial_symbol): Likewise.
16099         (add_partial_subprogram): Likewise.
16100         (peek_die_abbrev): Likewise.
16101         (fixup_go_packaging): Likewise.
16102         (process_full_comp_unit): Likewise.
16103         (process_full_type_unit): Likewise.
16104         (process_imported_unit_die): Likewise.
16105         (dwarf2_compute_name): Likewise.
16106         (dwarf2_physname): Likewise.
16107         (read_import_statement): Likewise.
16108         (create_cus_hash_table): Assign dwarf2_physname instead of
16109         objfile.
16110         (read_func_scope): Access objfile through dwarf2_per_objfile.
16111         (read_lexical_block_scope): Likewise.
16112         (read_call_site_scope): Likewise.
16113         (read_variable): Likewise.
16114         (dwarf2_rnglists_process): Likewise.
16115         (dwarf2_ranges_process): Likewise.
16116         (dwarf2_ranges_read): Likewise.
16117         (dwarf2_record_block_ranges): Likewise.
16118         (dwarf2_add_field): Likewise.
16119         (dwarf2_add_member_fn): Likewise.
16120         (read_structure_type): Likewise.
16121         (process_structure_scope): Likewise.
16122         (read_enumeration_type): Likewise.
16123         (read_array_type): Likewise.
16124         (read_common_block): Likewise.
16125         (read_namespace_type): Likewise.
16126         (read_namespace): Likewise.
16127         (read_module_type): Likewise.
16128         (read_tag_pointer_type): Likewise.
16129         (read_tag_ptr_to_member_type): Likewise.
16130         (read_tag_string_type): Likewise.
16131         (read_subroutine_type): Likewise.
16132         (read_typedef): Likewise.
16133         (read_base_type): Likewise.
16134         (attr_to_dynamic_prop): Likewise.
16135         (read_subrange_type): Likewise.
16136         (read_unspecified_type): Likewise.
16137         (load_partial_dies): Likewise.
16138         (read_partial_die): Likewise.
16139         (find_partial_die): Likewise.
16140         (guess_partial_die_structure_name): Likewise.
16141         (fixup_partial_die): Likewise.
16142         (read_attribute_value): Likewise.
16143         (read_addr_index_from_leb128): Likewise.
16144         (dwarf2_read_addr_index): Likewise.
16145         (dwarf2_string_attr): Likewise.
16146         (lnp_state_machine::check_line_address): Likewise.
16147         (dwarf_decode_lines_1): Likewise.
16148         (dwarf_decode_lines): Likewise.
16149         (dwarf2_start_symtab): Likewise.
16150         (var_decode_location): Likewise.
16151         (new_symbol_full): Likewise.
16152         (dwarf2_const_value_data): Likewise.
16153         (dwarf2_const_value_attr): Likewise.
16154         (dwarf2_const_value): Likewise.
16155         (die_type): Likewise.
16156         (die_containing_type): Likewise.
16157         (lookup_die_type): Likewise.
16158         (guess_full_die_structure_name): Likewise.
16159         (anonymous_struct_prefix): Likewise.
16160         (dwarf2_name): Likewise.
16161         (follow_die_ref_or_sig): Likewise.
16162         (follow_die_offset): Likewise.
16163         (follow_die_ref): Likewise.
16164         (dwarf2_fetch_die_loc_sect_off): Likewise.
16165         (dwarf2_fetch_constant_bytes): Likewise.
16166         (dwarf2_fetch_die_type_sect_off): Likewise.
16167         (dwarf2_get_die_type): Likewise.
16168         (follow_die_sig): Likewise.
16169         (decode_locdesc): Likewise.
16170         (dwarf2_per_cu_objfile): Likewise.
16171         (dwarf2_per_cu_text_offset): Likewise.
16172         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16173         objfile.
16174         (set_die_type): Access objfile through
16175         dwarf2_per_objfile.
16176
16177 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16178
16179         * valprint.c (converted_character_d): Remove typedef.
16180         (DEF_VEC_O (converted_character_d)): Remove.
16181         (count_next_character): Use std::vector.
16182         (print_converted_chars_to_obstack): Likewise.
16183         (generic_printstr): Likewise.
16184
16185 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16186
16187         * xml-support.h (struct gdb_xml_value): Add constructor.
16188         <value>: Change type to unique_xmalloc_ptr.
16189         (gdb_xml_value_s): Remove typedef.
16190         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16191         (gdb_xml_element_start_handler): Change parameter type to
16192         std::vector.
16193         (xml_find_attribute): Likewise.
16194         * xml-support.c (xml_find_attribute): Change parameter type to
16195         std::vector and adjust.
16196         (gdb_xml_values_cleanup): Remove.
16197         (gdb_xml_parser::start_element): Adjust to std::vector.
16198         (xinclude_start_include): Change paraeter type to std::vector
16199         and adjust.
16200         * btrace.c (check_xml_btrace_version): Likewise.
16201         (parse_xml_btrace_block): Likewise.
16202         (parse_xml_btrace_pt_config_cpu): Likewise.
16203         (parse_xml_btrace_pt): Likewise.
16204         (parse_xml_btrace_conf_bts): Likewise.
16205         (parse_xml_btrace_conf_pt): Likewise.
16206         * memory-map.c (memory_map_start_memory): Likewise.
16207         (memory_map_start_property): Likewise.
16208         * osdata.c (osdata_start_osdata): Likewise.
16209         (osdata_start_item): Likewise.
16210         (osdata_start_column): Likewise.
16211         * remote.c (start_thread): Likewise.
16212         * solib-aix.c (library_list_start_library): Likewise.
16213         (library_list_start_list): Likewise.
16214         * solib-svr4.c (library_list_start_library): Likewise.
16215         (svr4_library_list_start_list): Likewise.
16216         * solib-target.c (library_list_start_segment): Likewise.
16217         (library_list_start_section): Likewise.
16218         (library_list_start_library): Likewise.
16219         (library_list_start_list): Likewise.
16220         * tracepoint.c (traceframe_info_start_memory): Likewise.
16221         (traceframe_info_start_tvar): Likewise.
16222         * xml-syscall.c (syscall_start_syscall): Likewise.
16223         * xml-tdesc.c (tdesc_start_target): Likewise.
16224         (tdesc_start_feature): Likewise.
16225         (tdesc_start_reg): Likewise.
16226         (tdesc_start_union): Likewise.
16227         (tdesc_start_struct): Likewise.
16228         (tdesc_start_flags): Likewise.
16229         (tdesc_start_enum): Likewise.
16230         (tdesc_start_field): Likewise.
16231         (tdesc_start_enum_value): Likewise.
16232         (tdesc_start_vector): Likewise.
16233
16234 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16235
16236         * extension.h (struct xmethod_worker) <clone>: Remove.
16237         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16238         Remove.
16239         (python_xmethod_worker::clone): Remove.
16240         * valops.c (find_overload_match): Use std::move instead of
16241         clone.
16242
16243 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16244
16245         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16246         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16247         <free_xmethod_worker_data>: Remove.
16248         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16249         <get_xmethod_arg_types>: Remove.
16250         <get_xmethod_result_type>: Remove.
16251         <invoke_xmethod>: Remove.
16252         * extension.c (new_xmethod_worker): Remove.
16253         (clone_xmethod_worker): Remove.
16254         (get_matching_xmethod_workers): Return void, pass std::vector by
16255         pointer.
16256         (get_xmethod_arg_types): Rename to...
16257         (xmethod_worker::get_arg_types): ... this, and adjust.
16258         (get_xmethod_result_type): Rename to...
16259         (xmethod_worker::get_result_type): ... this, and adjust.
16260         (invoke_xmethod): Remove.
16261         (free_xmethod_worker): Remove.
16262         (free_xmethod_worker_vec): Remove.
16263         * extension.h (enum ext_lang_rc): Move here from
16264         extension-priv.h.
16265         (struct xmethod_worker): Add constructor and destructor.
16266         <data>: Remove.
16267         <value>: Remove.
16268         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16269         virtual pure methods.
16270         <get_arg_types, get_result_type>: New methods.
16271         (xmethod_worker_ptr): Remove typedef.
16272         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16273         (xmethod_worker_vec): Remove typedef.
16274         (xmethod_worker_up): New typedef.
16275         (invoke_xmethod): Remove.
16276         (clone_xmethod_worker): Remove.
16277         (free_xmethod_worker): Remove.
16278         (free_xmethod_worker_vec): Remove.
16279         (get_xmethod_arg_types): Remove.
16280         (get_xmethod_result_type): Remove.
16281         * valops.c (find_method_list): Use std::vector, don't use
16282         intermediate vector.
16283         (value_find_oload_method_list): Use std::vector.
16284         (find_overload_match): Use std::vector.
16285         (find_oload_champ): Use std::vector.
16286         * value.c (value_free): Use operator delete.
16287         (value_of_xmethod): Rename to...
16288         (value_from_xmethod): ... this.  Don't assign
16289         xmethod_worker::value, take rvalue-reference.
16290         (result_type_of_xmethod): Adjust.
16291         (call_xmethod): Adjust.
16292         * value.h: Include extension.h.
16293         (struct xmethod_worker): Don't forward-declare.
16294         (value_of_xmethod): Rename to...
16295         (value_from_xmethod): ... this, take rvalue-reference.
16296         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16297         (struct python_xmethod_worker): ... this, add constructor and
16298         destructor.
16299         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16300         (gdbpy_free_xmethod_worker_data): Rename to...
16301         (python_xmethod_worker::~python_xmethod_worker): ... this and
16302         adjust.
16303         (gdbpy_clone_xmethod_worker_data): Rename to...
16304         (python_xmethod_worker::clone): ... this and adjust.
16305         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16306         temporary vector.
16307         (gdbpy_get_xmethod_arg_types): Rename to...
16308         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16309         (gdbpy_get_xmethod_result_type): Rename to...
16310         (python_xmethod_worker::do_get_result_type): ... this and
16311         adjust.
16312         (gdbpy_invoke_xmethod): Rename to...
16313         (python_xmethod_worker::invoke): ... this and adjust.
16314         (new_python_xmethod_worker): Rename to...
16315         (python_xmethod_worker::python_xmethod_worker): ... this and
16316         adjust.
16317         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16318         Remove.
16319         (gdbpy_free_xmethod_worker_data): Remove.
16320         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16321         (gdbpy_get_xmethod_arg_types): Remove.
16322         (gdbpy_get_xmethod_result_type): Remove.
16323         (gdbpy_invoke_xmethod): Remove.
16324         * python/python.c (python_extension_ops): Remove obsolete
16325         callbacks.
16326
16327 2018-01-05  Pedro Alves  <palves@redhat.com>
16328
16329         PR gdb/18653
16330         * common/signals-state-save-restore.c
16331         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16332         find a custom handler preinstalled, instead of internal erroring.
16333         But only warn if !quiet.
16334         * common/signals-state-save-restore.h
16335         (save_original_signals_state): New parameter 'quiet'.
16336         * main.c (captured_main_1): Move save_original_signals_state call
16337         after option handling, and pass QUIET.
16338
16339 2018-01-05  Pedro Alves  <palves@redhat.com>
16340
16341         * spu-tdep.c (spu_catch_start): Pass
16342         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16343
16344 2018-01-05  Pedro Alves  <palves@redhat.com>
16345
16346         PR gdb/22670
16347         * ada-lang.c (literal_symbol_name_matcher): New function.
16348         (ada_get_symbol_name_matcher): Use it for
16349         symbol_name_match_type::SEARCH_NAME.
16350         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16351         it down instead of assuming symbol_name_match_type::FULL.
16352         * block.h (block_lookup_symbol): New parameter 'match_type'.
16353         * c-valprint.c (print_unpacked_pointer): Use
16354         lookup_symbol_search_name instead of lookup_symbol.
16355         * compile/compile-object-load.c (get_out_value_type): Pass down
16356         symbol_name_match_type::SEARCH_NAME.
16357         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16358         symbol_name_match_type::FULL.
16359         * cp-support.c (cp_get_symbol_name_matcher): Handle
16360         symbol_name_match_type::SEARCH_NAME.
16361         * infrun.c (insert_exception_resume_breakpoint): Use
16362         lookup_symbol_search_name.
16363         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16364         * psymtab.c (maintenance_check_psymtabs): Use
16365         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16366         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16367         SYMBOL_SEARCH_NAME.
16368         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16369         if symbol_name_match_type::SEARCH_NAME.
16370         (lookup_symbol_in_language): Pass down
16371         symbol_name_match_type::FULL.
16372         (lookup_symbol_search_name): New.
16373         (lookup_language_this): Pass down
16374         symbol_name_match_type::SEARCH_NAME.
16375         (lookup_symbol_aux, lookup_local_symbol): New parameter
16376         'match_type'.  Pass it down.
16377         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16378         (lookup_symbol_search_name): New declaration.
16379         (lookup_symbol_in_block): New 'match_type' parameter.
16380
16381 2018-01-05  Pedro Alves  <palves@redhat.com>
16382
16383         PR gdb/22670
16384         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16385         ada_lookup_symbol.
16386         (ada_lookup_symbol): Reimplement in terms of
16387         ada_lookup_symbol_list, bits factored out from
16388         ada_lookup_encoded_symbol.
16389
16390 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16391
16392         * ada-exp.y (write_object_renaming): When subscripting an array
16393         using a symbol as the index, pass the block in call to
16394         ada_lookup_encoded_symbol when looking that symbol up.
16395
16396 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16397
16398         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16399         TYPE_INDEX_TYPE.
16400
16401 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16402
16403         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16404         the case where VALUE_LVAL (val0) is not lval_memory.
16405
16406 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16407
16408         * ada-valprint.c (print_optional_low_bound): Handle
16409         character-indexed array printing like boolean-indexed array
16410         printing.
16411
16412 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16413
16414         * NEWS: Create a new section for the next release branch.
16415         Rename the section of the current branch, now that it has
16416         been cut.
16417
16418 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16419
16420         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16421         * version.in: Bump version to 8.1.50.DATE-git.
16422
16423 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16424
16425         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16426         Add field.
16427         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16428         Add field.
16429         (default_exception_support_info) <catch_handlers_sym>: Add field.
16430         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16431         (ada_exception_name_addr_1): Add "catch handlers" handling.
16432         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16433         Update all callers.
16434         (create_excep_cond_exprs) <ex>: Add parameter.
16435         (re_set_exception): Update create_excep_cond_exprs call.
16436         (print_it_exception, print_one_exception, print_mention_exception)
16437         (print_recreate_exception): Add "catch handler" handling.
16438         (allocate_location_catch_handlers, re_set_catch_handlers)
16439         (check_status_catch_handlers, print_it_catch_handlers)
16440         (print_one_catch_handlers, print_mention_catch_handlers)
16441         (print_recreate_catch_handlers): New function.
16442         (catch_handlers_breakpoint_ops): New variable.
16443         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16444         Add parameter.  Add "catch handler" handling.
16445         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16446         Add "catch handler" handling.
16447         (ada_exception_catchpoint_cond_string): Add "catch handler"
16448         handling.
16449         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16450         call.
16451         (catch_ada_handlers_command): New function.
16452         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16453         operations structure.
16454         (_initialize_ada_language): Add "catch handlers" command entry.
16455         * NEWS: Document "catch handlers" feature.
16456
16457 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16458
16459         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16460         account when creating the array type of the slice.
16461         (ada_value_slice): Likewise.
16462
16463 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16464
16465         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16466         New enum value.
16467         (create_array_type_with_stride): Add byte_stride_prop parameter.
16468         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16469         New parameter.  Update all callers in this file.
16470         (array_type_has_dynamic_stride): New function.
16471         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16472         of arrays with dynamic byte strides.
16473         * dwarf2read.c (read_array_type): Add support for dynamic
16474         DW_AT_byte_stride attributes.
16475
16476 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16477
16478         * dwarf2read.c (read_unspecified_type): Treat
16479         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16480
16481 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16482
16483         Update copyright year range in all GDB files.
16484
16485 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16486
16487         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16488         and gdb/testsuite/gdb.base/step-line.c.
16489
16490 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16491
16492         * copyright.py (main): Dump the contents of
16493         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16494         even if BY_HAND is empty.
16495
16496 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16497
16498         * top.c (print_gdb_version): Update Copyright year in version
16499         message.
16500
16501 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16502
16503         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16504
16505 For older changes see ChangeLog-2017.
16506 \f
16507 Local Variables:
16508 mode: change-log
16509 left-margin: 8
16510 fill-column: 74
16511 version-control: never
16512 coding: utf-8
16513 End: