target_ops::to_stratum -> target_ops::stratum() virtual method
[external/binutils.git] / gdb / ChangeLog
1 2018-11-30  Pedro Alves  <palves@redhat.com>
2
3         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
4         <stratum>: New override.
5         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
6         <stratum>: New override.
7         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
8         <stratum>: New override.
9         * exec.c (exec_target) <exec_target>: Delete.
10         <stratum>: New override.
11         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
12         stratum method instead of the to_stratum field.
13         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
14         <stratum>: New override.
15         (thread_db_target::thread_db_target): Delete.
16         * make-target-delegates (print_class): Don't print a ctor
17         declaration.  Print a stratum method override declaration.
18         * process-stratum-target.h (process_stratum_target)
19         <process_stratum_target>: Delete.
20         <stratum>: New override.
21         * ravenscar-thread.c (ravenscar_thread_target)
22         <ravenscar_thread_target>: Delete.
23         <stratum>: New override.
24         * record-btrace.c (record_btrace_target)
25         <record_btrace_target>: Delete.
26         <stratum>: New override.
27         * record-full.c (record_full_base_target)
28         <record_full_base_target>: Delete.
29         <stratum>: New override.
30         * record.c (record_disconnect, record_detach)
31         (record_mourn_inferior, record_kill): Adjust to use the stratum
32         method instead of the to_stratum field.
33         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
34         * sol-thread.c (sol_thread_target)
35         <sol_thread_target>: Delete.
36         <stratum>: New override.
37         * spu-multiarch.c (spu_multiarch_target)
38         <spu_multiarch_target>: Delete.
39         <stratum>: New override.
40         * target-delegates.c: Regenerate.
41         * target.c (target_stack::push, target_stack::unpush)
42         (pop_all_targets_above, pop_all_targets_at_and_above)
43         (info_target_command, target_require_runnable)
44         (target_stack::find_beneath): Adjust to use the stratum method
45         instead of the to_stratum field.
46         (dummy_target::dummy_target): Delete.
47         (dummy_target::stratum): New.
48         (debug_target::debug_target): Delete.
49         (debug_target::stratum): New.
50         (maintenance_print_target_stack): Adjust to use the stratum method
51         instead of the to_stratum field.
52         * target.h (struct target_ops) <stratum>: New method.
53         <to_stratum>: Delete.
54         <is_pushed>: Adjust to use the stratum method
55         instead of the to_stratum field.
56
57 2018-11-30  Pedro Alves  <palves@redhat.com>
58
59         * corelow.c (core_target) <has_all_memory, has_execution>: New
60         overrides.
61         * inf-child.c (inf_child_target::has_all_memory)
62         (inf_child_target::has_memory, inf_child_target::has_stack)
63         (inf_child_target::has_registers)
64         (inf_child_target::has_execution): Delete.
65         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
66         has_stack, has_registers, has_execution>: Delete.
67         * process-stratum-target.c
68         (process_stratum_target::has_all_memory)
69         (process_stratum_target::has_memory)
70         (process_stratum_target::has_stack)
71         (process_stratum_target::has_registers)
72         (process_stratum_target::has_execution): New.
73         * process-stratum-target.h (process_stratum_target)
74         <has_all_memory, has_memory, has_stack, has_registers,
75         has_execution>: New method overrides.
76         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
77         has_memory, has_stack, has_registers, has_execution>: Delete.
78         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
79         has_execution>: Delete.
80         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
81         has_registers, has_execution>: Delete.
82         * target.c (default_child_has_all_memory)
83         (default_child_has_memory, default_child_has_stack)
84         (default_child_has_registers, default_child_has_execution):
85         Delete.
86         * target.h (default_child_has_all_memory)
87         (default_child_has_memory, default_child_has_stack)
88         (default_child_has_registers, default_child_has_execution):
89         Delete.
90         * tracefile.h (tracefile_target) <has_execution>: New override.
91
92 2018-11-30  Pedro Alves  <palves@redhat.com>
93
94         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
95         * bsd-kvm.c: Include "process-stratum-target.h".
96         (bsd_kvm_target): Now inherits from process_stratum_target.
97         (bsd_kvm_target::bsd_kvm_target): Default it.
98         * corelow.c: Include "process-stratum-target.h".
99         (core_target): Now inherits from process_stratum_target.
100         (core_target::core_target): Don't set to_stratum here.
101         * inf-child.c (inf_child_target::inf_child_target): Delete.
102         * inf-child.h: Include "process-stratum-target.h".
103         (inf_child_target): Inherit from process_stratum_target.
104         (inf_child_target) <inf_child_target>: Default it.
105         <can_async_p, supports_non_stop, supports_disable_randomization>:
106         Delete overrides.
107         * process-stratum-target.c: New file.
108         * process-stratum-target.h: New file.
109         * remote-sim.c: Include "process-stratum-target.h".
110         (gdbsim_target): Inherit from process_stratum_target.
111         <gdbsim_target>: Default it.
112         * remote.c: Include "process-stratum-target.h".
113         (remote_target): Inherit from process_stratum_target.
114         <remote_target>: Default it.
115         * target.c (default_thread_address_space)
116         (default_thread_architecture): Delete.
117         * target.h (target_ops) <thread_architecture>: Now returns NULL by
118         default.
119         <thread_address_space>: Ditto.
120         * test-target.h: Include "process-stratum-target.h" instead of
121         "target.h".
122         (test_target_ops): Inherit from process_stratum_target.
123         <test_target_ops>: Default it.
124         * tracefile.c (tracefile_target::tracefile_target): Delete.
125         * tracefile.h: Include "process-stratum-target.h".
126         (tracefile_target): Inherit from process_stratum_target.
127         <tracefile_target>: Default it.
128         * target-delegates.c: Regenerate.
129
130 2018-11-30  Pedro Alves  <palves@redhat.com>
131
132         * Makefile.in (COMMON_SFILES): Add test-target.c.
133         * gdbarch-selftests.c: Include "test-target.h".
134         * regcache.c: Include "test-target.h".
135         * target.c (test_target_info, test_target_ops::info): Move to ...
136         * test-target.c: ... this new file.
137         * target.h (test_target_ops): Move to ...
138         * test-target.h: ... this new file.
139
140 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
141
142         * source.c (forward_search_command): Fix leak by using
143         xrealloc even for the first allocation in the loop, as buf
144         is static.
145
146 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
147
148         PR gdb/23093
149         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
150         (fbsd_gdb_signal_to_target): New.
151         (fbsd_init_abi): Install gdbarch "signal_from_target" and
152         "signal_to_target" methods.
153
154 2018-11-29  Tom Tromey  <tom@tromey.com>
155
156         * valarith.c (value_x_unop): Don't set argvec[3].
157
158 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
159
160         PR gdb/23917
161         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
162         semicolon.
163
164 2018-11-26  Pedro Alves  <palves@redhat.com>
165
166         * procfs.c (procfs_notice_thread): Replace uses of
167         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
168         * sol-thread.c (sol_thread_target::wait)
169         (sol_update_thread_list_callback): Likewise.
170
171 2018-11-25  Tom Tromey  <tom@tromey.com>
172
173         * ui-out.c (ui_out::field_fmt): Remove comment.
174         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
175         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
176
177 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
178
179         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
180         leak in open_source_file' has been partially undone by '2179fbc36d23
181         Return scoped_fd from open_source_file'. Re-add the transfer of
182         current s->fullname to the unique_xmalloc_ptr fullname given
183         to find_and_open_source.
184
185 2018-11-23  Pedro Alves  <palves@redhat.com>
186
187         * gdbthread.h (enum thread_state): Move comments here.
188         (is_running, is_stopped, is_exited): Remove declarations.
189
190 2018-11-22  Pedro Alves  <palves@redhat.com>
191
192         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
193         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
194         ALL_NON_EXITED_THREADS with all_non_exited_threads.
195         (print_one_breakpoint_location): Replace ALL_INFERIORS with
196         all_inferiors.
197         * bsd-kvm.c: Include inferior.h.
198         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
199         with all_non_exited_threads.
200         * common/filtered-iterator.h: New.
201         * common/safe-iterator.h: New.
202         * corelow.c (core_target_open): Don't call init_thread_list here.
203         * darwin-nat.c (thread_info_from_private_thread_info): Replace
204         ALL_THREADS with all_threads.
205         * fbsd-nat.c (fbsd_nat_target::resume): Replace
206         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
207         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
208         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
209         * fork-child.c (postfork_hook): Don't call init_thread_list here.
210         * gdbarch-selftests.c (register_to_value_test): Adjust.
211         * gdbthread.h: Don't include "inferior.h" here.
212         (struct inferior): Forward declare.
213         (enum step_over_calls_kind): Moved here from inferior.h.
214         (thread_info::deletable): Definition moved to thread.c.
215         (find_thread_ptid (inferior *, ptid_t)): Declare.
216         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
217         Include "thread-iter.h".
218         (all_threads, all_non_exited_threads, all_threads_safe): New.
219         (any_thread_p): Declare.
220         (thread_list): Delete.
221         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
222         all_non_exited_threads.
223         (proceed_after_attach_callback): Delete.
224         (proceed_after_attach): Take an inferior pointer instead of an
225         integer PID.  Adjust to use range-for.
226         (attach_post_wait): Pass down inferior pointer instead of pid.
227         Use range-for instead of ALL_NON_EXITED_THREADS.
228         (detach_command): Remove init_thread_list call.
229         * inferior-iter.h: New.
230         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
231         (delete_thread_of_inferior): Delete.
232         (delete_inferior, exit_inferior_1): Use range-for with
233         inf->threads_safe() instead of iterate_over_threads.
234         (inferior_appeared): Call init_thread_list here.
235         (discard_all_inferiors): Use all_non_exited_inferiors.
236         (find_inferior_id, find_inferior_pid): Use all_inferiors.
237         (iterate_over_inferiors): Use all_inferiors_safe.
238         (have_inferiors, number_of_live_inferiors): Use
239         all_non_exited_inferiors.
240         (number_of_inferiors): Use all_inferiors and std::distance.
241         (print_inferior): Use all_inferiors.
242         * inferior.h: Include gdbthread.h.
243         (enum step_over_calls_kind): Moved to gdbthread.h.
244         (struct inferior) <thread_list>: New field.
245         <threads, non_exited_threads, threads_safe>: New methods.
246         (ALL_INFERIORS): Delete.
247         Include "inferior-iter.h".
248         (ALL_NON_EXITED_INFERIORS): Delete.
249         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
250         functions.
251         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
252         ALL_NON_EXITED_THREADS with all_non_exited_threads.
253         * infrun.c (follow_exec): Use all_threads_safe.
254         (clear_proceed_status, proceed): Use all_non_exited_threads.
255         (init_wait_for_inferior): Don't clear inline frame state here.
256         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
257         all_threads instead of ALL_NON_EXITED_THREADS.
258         (random_pending_event_thread): Use all_non_exited_threads instead
259         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
260         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
261         instead of ALL_NON_EXITED_THREADS.
262         (handle_no_resumed): Use all_non_exited_threads instead of
263         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
264         ALL_INFERIORS.
265         (restart_threads, switch_back_to_stepped_thread): Use
266         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
267         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
268         all_inferiors.
269         (kill_unfollowed_fork_children): Use inf->non_exited_threads
270         instead of ALL_NON_EXITED_THREADS.
271         * linux-tdep.c (linux_make_corefile_notes): Use
272         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
273         * linux-thread-db.c (thread_db_target::update_thread_list):
274         Replace ALL_INFERIORS with all_inferiors.
275         (thread_db_target::thread_handle_to_thread_info): Use
276         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
277         * mi/mi-interp.c (multiple_inferiors_p): New.
278         (mi_on_resume_1): Simplify using all_non_exited_threads and
279         multiple_inferiors_p.
280         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
281         instead of ALL_NON_EXITED_THREADS.
282         * nto-procfs.c (nto_procfs_target::open): Don't call
283         init_thread_list here.
284         * record-btrace.c (record_btrace_target_open)
285         (record_btrace_target::stop_recording)
286         (record_btrace_target::close)
287         (record_btrace_target::record_is_replaying)
288         (record_btrace_target::resume, record_btrace_target::wait)
289         (record_btrace_target::record_stop_replaying): Use
290         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
291         * record-full.c (record_full_wait_1): Use all_non_exited_threads
292         instead of ALL_NON_EXITED_THREADS.
293         * regcache.c (cooked_read_test): Remove reference to global
294         thread_list.
295         * remote-sim.c (gdbsim_target::create_inferior): Don't call
296         init_thread_list here.
297         * remote.c (remote_target::update_thread_list): Use
298         all_threads_safe instead of ALL_NON_EXITED_THREADS.
299         (remote_target::process_initial_stop_replies): Replace
300         ALL_INFERIORS with all_non_exited_inferiors and use
301         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
302         (remote_target::open_1): Don't call init_thread_list here.
303         (remote_target::append_pending_thread_resumptions)
304         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
305         instead of ALL_NON_EXITED_THREADS.
306         (remote_target::commit_resume)
307         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
308         with all_non_exited_inferiors and use all_non_exited_threads
309         instead of ALL_NON_EXITED_THREADS.
310         (remote_target::kill_new_fork_children): Use
311         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
312         init_thread_list and init_wait_for_inferior calls.
313         (remote_target::remote_btrace_maybe_reopen)
314         (remote_target::thread_handle_to_thread_info): Use
315         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
316         * target.c (target_terminal::restore_inferior)
317         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
318         all_non_exited_inferiors.
319         * thread-iter.c: New file.
320         * thread-iter.h: New file.
321         * thread.c: Include "inline-frame.h".
322         (thread_list): Delete.
323         (clear_thread_inferior_resources): Call clear_inline_frame_state.
324         (init_thread_list): Use all_threads_safe instead of
325         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
326         (new_thread): Adjust to per-inferior thread lists.
327         (add_thread_silent): Pass inferior to find_thread_ptid.
328         (thread_info::deletable): New, moved from the header.
329         (delete_thread_1): Adjust to per-inferior thread lists.
330         (find_thread_global_id): Use inf->threads().
331         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
332         find_thread_ptid.
333         (find_thread_ptid(inferior*, ptid_t)): New overload.
334         (iterate_over_threads): Use all_threads_safe.
335         (any_thread_p): New.
336         (thread_count): Use all_threads and std::distance.
337         (live_threads_count): Use all_non_exited_threads and
338         std::distance.
339         (valid_global_thread_id): Use all_threads.
340         (in_thread_list): Use find_thread_ptid.
341         (first_thread_of_inferior): Adjust to per-inferior thread lists.
342         (any_thread_of_inferior, any_live_thread_of_inferior): Use
343         inf->non_exited_threads().
344         (prune_threads, delete_exited_threads): Use all_threads_safe.
345         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
346         (set_resumed, set_running): Use all_non_exited_threads.
347         (is_thread_state, is_stopped, is_exited, is_running)
348         (is_executing): Delete.
349         (set_executing, set_stop_requested, finish_thread_state): Use
350         all_non_exited_threads.
351         (print_thread_info_1): Use all_inferiors and all_threads.
352         (thread_apply_all_command): Use all_non_exited_threads.
353         (thread_find_command): Use all_threads.
354         (update_threads_executing): Use all_non_exited_threads.
355         * tid-parse.c (parse_thread_id): Use inf->threads.
356         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
357
358 2018-11-22  Pedro Alves  <palves@redhat.com>
359
360         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
361         switch to it before calling into try_open_exec_file.
362
363 2018-11-22  Pedro Alves  <palves@redhat.com>
364
365         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
366         inferior_thread instead of find_thread_ptid, and only when
367         inferior_ptid is not null_ptid.
368         * inferior.c (add_inferior): Don't include target_pid_to_str
369         output when the inferior is not started.
370         * python/py-inferior.c (python_on_normal_stop): Don't use
371         find_thread_ptid.
372         (tui_on_user_selected_context_changed): Use inferior_thread
373         instead of find_thread_ptid, and only when inferior_ptid is not
374         null_ptid.
375
376 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
377
378         PR python/23714
379         * gdb/python/python.c (execute_gdb_command): Call
380         prevent_dont_repeat earlier to avoid affecting dont_repeat.
381
382 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
383
384         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
385         (HFILES_NO_SRCDIR): Add arch/riscv.h.
386         * arch/riscv.c: New file.
387         * arch/riscv.h: New file.
388         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
389         this list, and add arch/riscv.o.
390         * features/Makefile: Add riscv features.
391         * features/riscv/32bit-cpu.c: New file.
392         * features/riscv/32bit-cpu.xml: New file.
393         * features/riscv/32bit-csr.c: New file.
394         * features/riscv/32bit-csr.xml: New file.
395         * features/riscv/32bit-fpu.c: New file.
396         * features/riscv/32bit-fpu.xml: New file.
397         * features/riscv/64bit-cpu.c: New file.
398         * features/riscv/64bit-cpu.xml: New file.
399         * features/riscv/64bit-csr.c: New file.
400         * features/riscv/64bit-csr.xml: New file.
401         * features/riscv/64bit-fpu.c: New file.
402         * features/riscv/64bit-fpu.xml: New file.
403         * features/riscv/rebuild-csr-xml.sh: New file.
404         * riscv-tdep.c: Add 'arch/riscv.h' include.
405         (riscv_gdb_reg_names): Delete.
406         (csr_reggroup): New global.
407         (struct riscv_register_alias): Delete.
408         (struct riscv_register_feature): New structure.
409         (riscv_register_aliases): Delete.
410         (riscv_xreg_feature): New global.
411         (riscv_freg_feature): New global.
412         (riscv_virtual_feature): New global.
413         (riscv_csr_feature): New global.
414         (riscv_create_csr_aliases): New function.
415         (riscv_read_misa_reg): Delete.
416         (riscv_has_feature): Delete.
417         (riscv_isa_xlen): Simplify, just return cached xlen.
418         (riscv_isa_flen): Simplify, just return cached flen.
419         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
420         (riscv_register_name): Update to make use of tdesc_register_name.
421         Look up xreg and freg names in the new globals riscv_xreg_feature
422         and riscv_freg_feature.  Don't supply csr aliases here.
423         (riscv_fpreg_q_type): Delete.
424         (riscv_register_type): Use tdesc_register_type in almost all
425         cases, override the returned type in a few specific cases only.
426         (riscv_print_one_register_info): Handle errors reading registers.
427         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
428         registers that are otherwise unknown to GDB.  Also check the
429         csr_reggroup.
430         (riscv_print_registers_info): Remove assert about upper register
431         number, and use gdbarch_register_reggroup_p instead of
432         short-cutting.
433         (riscv_find_default_target_description): New function.
434         (riscv_check_tdesc_feature): New function.
435         (riscv_add_reggroups): New function.
436         (riscv_setup_register_aliases): New function.
437         (riscv_init_reggroups): New function.
438         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
439         setup register groups.  Register new riscv debug variable.
440         * riscv-tdep.h: Add 'arch/riscv.h' include.
441         (struct gdbarch_tdep): Remove abi union, and add
442         riscv_gdbarch_features field.  Remove cached quad floating point
443         type, and provide initialisation for double type field.
444         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
445         the list of targets using the feature based target descriptions.
446         * NEWS: Mention target description support.
447
448 2018-11-21  Pedro Alves  <palves@redhat.com>
449
450         * valops.c (find_method_list, value_find_oload_method_list)
451         (find_overload_match, find_oload_champ): Rename parameters and
452         locals.
453
454 2018-11-21  Pedro Alves  <palves@redhat.com>
455
456         * valops.c (find_method_list): Replace pointer and length
457         parameters with an gdb::array_view.  Adjust.
458         (value_find_oload_method_list): Likewise.
459         (find_overload_match): Use gdb::array_view for methods list.
460         Adjust to find_oload_champ interface change.
461         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
462         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
463
464 2018-11-21  Pedro Alves  <palves@redhat.com>
465
466         * gdbtypes.c (compare_badness): Change type of parameters to const
467         reference.  Adjust to badness_vector being a std::vector now.
468         (rank_function): Adjust to badness_vector being a std::vector now.
469         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
470         (LENGTH_MATCH): Delete.
471         (compare_badness): Change type of parameters to const reference.
472         (rank_function): Return a badness_vector by value now.
473         (find_overload_match): Adjust to badness_vector being a
474         std::vector now.  Remove cleanups.
475         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
476         badness_vector pointer.
477         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
478         a badness_vector pointer.  Adjust to badness_vector being a
479         std::vector now.  Remove cleanups.
480         (find_oload_champ): 'oload_champ_bv' parameter now
481         a badness_vector pointer.  Adjust to badness_vector being a
482         std::vector now.  Remove cleanups.
483
484 2018-11-21  Pedro Alves  <palves@redhat.com>
485
486         * cp-support.c (sym_return_val_size, sym_return_val_index)
487         (sym_return_val): Delete.
488         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
489         add to the vector.
490         (make_symbol_overload_list): Adjust to return a std::vector
491         instead of maintaining a global open coded vector.
492         (make_symbol_overload_list_block): Add std::vector parameter.
493         (make_symbol_overload_list_block): Rename to ...
494         (add_symbol_overload_list_block): ... this and add std::vector
495         parameter.
496         (make_symbol_overload_list_namespace): Rename to ...
497         (add_symbol_overload_list_namespace): ... this and add std::vector
498         parameter.
499         (make_symbol_overload_list_adl_namespace): Rename to ...
500         (add_symbol_overload_list_adl_namespace): ... this and add
501         std::vector parameter.
502         (make_symbol_overload_list_adl): Delete.
503         (add_symbol_overload_list_adl): New.
504         (make_symbol_overload_list_using): Rename to ...
505         (add_symbol_overload_list_using): ... this and add std::vector
506         parameter.
507         (make_symbol_overload_list_qualified): Rename to ...
508         (add_symbol_overload_list_qualified): ... this and add std::vector
509         parameter.
510         * cp-support.h: Include "common/array-view.h" and <vector>.
511         (make_symbol_overload_list): Change return type to std::vector.
512         (make_symbol_overload_list_adl): Delete declaration.
513         (add_symbol_overload_list_adl): New declaration.
514         * valops.c (find_overload_match): Local 'oload_syms' now a
515         std::vector.
516         (find_oload_champ_namespace): 'oload_syms' parameter now a
517         std::vector pointer.
518         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
519         std::vector pointer.  Adjust to new make_symbol_overload_list
520         interface.
521
522 2018-11-21  Pedro Alves  <palves@redhat.com>
523
524         * common/array-view.h (array_view::splice(size_type, size_t)): New.
525         (array_view::splice(size_type)): New.
526         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
527         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
528         std::vector.
529         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
530         * extension.h: Include "common/array-view.h".
531         (xmethod_worker::invoke): Adjust to use gdb::array_view.
532         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
533         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
534         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
535         (xmethod_worker::do_get_result_type): Adjust to use
536         gdb::array_view.
537         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
538         * gdbtypes.h: Include "common/array-view.h".
539         (rank_function): Adjust to use gdb::array_view.
540         * python/py-xmethods.c (python_xmethod_worker::invoke)
541         (python_xmethod_worker::do_get_arg_types)
542         (python_xmethod_worker::do_get_result_type)
543         (python_xmethod_worker::invoke): Adjust to new interfaces.
544         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
545         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
546         * valops.c (find_overload_match, find_oload_champ_namespace)
547         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
548         gdb:array_view and the new xmethod_worker interfaces.
549         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
550         gdb::array_view.
551         * value.h (find_overload_match, result_type_of_xmethod)
552         (call_xmethod): Adjust to use gdb::array_view.
553         * unittests/array-view-selftests.c: Add slicing tests.
554
555 2018-11-21  Pedro Alves  <palves@redhat.com>
556
557         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
558         * common/array-view.h (make_array_view): New.
559         * compile/compile-object-run.c (compile_object_run): Adjust to
560         pass an array_view.
561         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
562         * eval.c (eval_call): Adjust to pass an array_view.
563         (evaluate_subexp_standard): Adjust to pass an array_view.
564         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
565         * guile/scm-value.c (gdbscm_value_call): Likewise.
566         * infcall.c (push_dummy_code): Replace pointer + size parameters
567         with an array_view parameter.
568         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
569         adjust.
570         * infcall.h: Include "common/array-view.h".
571         (call_function_by_hand, call_function_by_hand_dummy): Replace
572         pointer + size parameters with an array_view parameter.
573         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
574         * linux-tdep.c (linux_infcall_mmap): Likewise.
575         * objc-lang.c (lookup_objc_class, lookup_child_selector)
576         (value_nsstring, print_object_command): Likewise.
577         * python/py-value.c (valpy_call): Likewise.
578         * rust-lang.c (rust_evaluate_funcall): Likewise.
579         * spu-tdep.c (flush_ea_cache): Likewise.
580         * valarith.c (value_x_binop, value_x_unop): Likewise.
581         * valops.c (value_allocate_space_in_inferior): Likewise.
582         * unittests/array-view-selftests.c (run_tests): Add
583         gdb::make_array_view test.
584
585 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
586
587         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
588         than a fixed size buffer.
589
590 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
591
592         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
593         and remove insertion of extra spaces in GDB's output.
594         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
595         Layout field into a temporary buffer, and then output it as a
596         string field.
597
598 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
599
600         * NEWS: Document the language choice done by
601         'info [types|functions|variables]|rbreak'.
602
603 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
604
605         * symtab.c (treg_matches_sym_type_name): Use
606         scoped_switch_to_sym_language_if_auto instead of local logic.
607         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
608         to switch to SYM language when language mode is auto.
609
610 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
611
612         * language.h (scoped_switch_to_sym_language_if_auto): New class.
613
614 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
615
616         * symtab.c (search_symbols): Properly check absence of type regexp
617         before entering the loop scanning the minimal symbols.
618
619 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
620
621         * s12z-tdep.c (s12z_extract_return_value): New function.
622         (inv_reg_perm) New array.
623         (s12z_return_value): Populate readbuf if non-null.
624
625 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
626
627         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
628         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
629         to MinGW fixed by Gnulib.
630         (O_NOINHERIT): Define if not defined.
631
632 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
633
634         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
635
636 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
637
638         * infrun.c (displaced_step_inferior_state) <next>: Remove.
639
640 2018-11-19  Tom Tromey  <tom@tromey.com>
641
642         * source.c (get_filename_and_charpos): Return void.
643
644 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
645
646         * skip.c (_initialize_step_skip): Fix "info skip" help.
647
648 2018-11-16  Tom Tromey  <tom@tromey.com>
649
650         PR rust/23625:
651         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
652
653 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
654
655         * infrun.c (displaced_step_inferior_states): Change type to
656         std::forward_list.
657         (get_displaced_stepping_state): Adjust.
658         (displaced_step_in_progress_any_inferior): Adjust.
659         (add_displaced_stepping_state): Adjust.
660         (remove_displaced_stepping_state): Adjust.
661
662 2018-11-18  Tom Tromey  <tom@tromey.com>
663
664         PR build/23814:
665         * target-delegates.c: Rebuild.
666         * ia64-linux-nat.c (class ia64_linux_nat_target)
667         <have_steppable_watchpoint>: Use override.  Return true, not 1.
668         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
669         "self" argument.
670         (ia64_linux_nat_target::low_new_thread): Rename.
671         (class ia64_linux_nat_target) <read_description>: Don't declare.
672         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
673         bool.
674
675 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
676
677         PR gdb/22736:
678         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
679         lang_struct_return code.
680
681 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
682
683         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
684         return_method.
685         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
686         * amd64-tdep.c (amd64_push_arguments): Likewise.
687         (amd64_push_dummy_call): Likewise.
688         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
689         * arc-tdep.c (arc_push_dummy_call): Likewise.
690         * arm-tdep.c (arm_push_dummy_call): Likewise.
691         * avr-tdep.c (avr_push_dummy_call): Likewise.
692         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
693         * cris-tdep.c (cris_push_dummy_call): Likewise.
694         * csky-tdep.c (csky_push_dummy_call): Likewise.
695         * frv-tdep.c (frv_push_dummy_call): Likewise.
696         * gdbarch.c: Regenerate.
697         * gdbarch.h: Regenerate.
698         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
699         return_method.
700         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
701         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
702         (hppa64_push_dummy_call): Likewise.
703         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
704         * i386-tdep.c (i386_push_dummy_call): Likewise.
705         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
706         * infcall.c (call_function_by_hand_dummy): Likewise.
707         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
708         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
709         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
710         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
711         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
712         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
713         * mep-tdep.c (mep_push_dummy_call): Likewise.
714         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
715         (mips_n32n64_push_dummy_call): Likewise.
716         (mips_o32_push_dummy_call): Likewise.
717         (mips_o64_push_dummy_call): Likewise.
718         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
719         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
720         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
721         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
722         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
723         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
724         (ppc64_sysv_abi_push_dummy_call): Likewise.
725         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
726         (ppc64_sysv_abi_push_dummy_call): Likewise.
727         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
728         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
729         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
730         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
731         * rx-tdep.c (rx_push_dummy_call): Likewise.
732         * s390-tdep.c (s390_push_dummy_call): Likewise.
733         * score-tdep.c (score_push_dummy_call): Likewise.
734         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
735         (sh_push_dummy_call_nofpu): Likewise.
736         * sparc-tdep.c (sparc32_store_arguments): Likewise.
737         (sparc32_push_dummy_call): Likewise.
738         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
739         (sparc64_push_dummy_call): Likewise.
740         * spu-tdep.c (spu_push_dummy_call): Likewise.
741         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
742         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
743         * v850-tdep.c (v850_push_dummy_call): Likewise.
744         * vax-tdep.c (vax_push_dummy_call): Likewise.
745         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
746         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
747
748 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
749
750         * gdbarch.sh (enum function_call_return_method): Add enum.
751         * gdbarch.h: Regenerate.
752         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
753
754 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
755
756         * unittests/copy_bitwise-selftests.c: New file.
757         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
758         (selftests::copy_bitwise_tests): Delete, moving this code to
759         unittests/copy_bitwise-selftests.c instead.
760         (_initialize_utils): Do not register copy_bitwise tests.
761         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
762         unittests/copy_bitwise-selftests.c.
763
764 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
765
766         * ada-lang.c (move_bits): Delete. Update all callers to use
767         copy_bitwise instead.
768         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
769         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
770         Move from here to utils.c.
771         (_initialize_dwarf2loc): Remove call to register copy_bitwise
772         selftests.
773         * utils.h (copy_bitwise): Add declaration.
774         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
775         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
776         Moved here from dwarf2loc.c.
777         (_initialize_utils): Register copy_bitwise selftests.
778
779 2018-11-14  Jim Wilson  <jimw@sifive.com>
780
781         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
782         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
783         then increment next_regnum if odd.
784         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
785         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
786         function type.  Pass new arg to riscv_arg_location based on function
787         type.
788         (riscv_return_value): Pass new arg to riscv_arg_location.
789
790         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
791         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
792         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
793
794         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
795         setting len.  New local align, set to max of arg align and xlen,
796         and pass to first riscv_assign_stack_location call.
797
798 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
799
800         * skip.c (complete_skip_number): New function.
801         (_initialize_step_skip): Add completers to some skip commands.
802
803 2018-11-09  Tom Tromey  <tom@tromey.com>
804
805         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
806         (struct remote_g_packet_data): Derive from allocate_on_obstack.
807         <guesses>: Now a std::vector.
808         (remote_g_packet_data_init, register_remote_g_packet_guess):
809         Update.
810         (remote_read_description_p): Update.  Return bool.
811         (remote_target::read_description): Update.
812         (struct remote_g_packet_guess): Add constructor.
813
814 2018-11-09  Tom Tromey  <tom@tromey.com>
815
816         * common/scoped_fd.h (class scoped_fd): Add move constructor and
817         move assignment operator.
818         * psymtab.c (psymtab_to_fullname): Update.
819         * source.h (open_source_file): Return scoped_fd.
820         (find_and_open_source): Likewise.
821         * source.c (open_source_file): Return scoped_fd.
822         (get_filename_and_charpos): Update.
823         (print_source_lines_base): Update.  Use scoped_fd::to_file.
824         (forward_search_command): Likewise.
825         (reverse_search_command): Likewise.
826         (find_and_open_source): Return scoped_fd.
827         * tui/tui-source.c (tui_set_source_content): Update.  Use
828         gdb_file_up.
829
830 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
831
832         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
833         overflow.
834
835 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
836
837         * configure: Regenerate.
838
839 2018-11-09  Tom de Vries  <tdevries@suse.de>
840
841         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
842         unconditionally, to set the language of the symbol.  Manage freeing
843         returned pointer using gdb::unique_xmalloc_ptr.
844
845 2018-11-08  Tom Tromey  <tom@tromey.com>
846
847         * record.c (require_record_target): Upper-case "<TAB>".
848
849 2018-11-08  Tom Tromey  <tom@tromey.com>
850
851         * python/lib/gdb/command/pretty_printers.py
852         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
853
854 2018-11-08  Tom Tromey  <tom@tromey.com>
855
856         PR gdb/23555:
857         PR gdb/23838:
858         * target.h (target_supports_terminal_ours): Return bool.
859         * target.c (target_supports_terminal_ours): Handle case where
860         current_top_target returns nullptr.  Return bool.
861
862 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
863
864         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
865         return the correct count for potential HFAs.
866
867 2018-11-08  Jan Beulich  <jbeulich@suse.com>
868
869         * i387-tdep.c (i387_supply_xsave): Split handling of
870         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
871         (i387_collect_xsave): Likewise.
872
873 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
874
875         * riscv-tdep.c (riscv_insn::decode): Update header comment.
876         (riscv_frame_this_id): Catch errors thrown while building the
877         frame cache, leave the frame id as the default, which is the outer
878         frame id.
879
880 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
881
882         * ada-lang.c (read_atcb): Only set task_info->called_task if
883         task_info->state == Entry_Caller_Sleep.
884         (print_ada_task_info): Do not check task_info->state before
885         checking task_info->called_task.
886         (info_task): Likewise.
887
888 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
889
890         * ada-tasks.c (read_atcb): Clear task_info before computing
891         the value of each of its fields.
892
893 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
894
895         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
896         NULL before dereferencing it.
897
898 2018-11-06  Tom de Vries  <tdevries@suse.de>
899
900         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
901         program headers.
902
903 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
904
905         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
906         so that it applies to uclinux as well.
907
908 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
909
910         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
911         when on AAPCS.
912
913 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
914
915         * riscv-fbsd-nat.c (getregs_supplies): Return true for
916         RISCV_CSR_SSTATUS_REGNUM.
917
918 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
919
920         * source.c (open_source_file): Fix leak by transferring the
921         current s->fullname to the unique_xmalloc_ptr fullname given
922         to find_and_open_source.
923
924 2018-11-04  Tom Tromey  <tom@tromey.com>
925
926         * varobj.c (install_default_visualizer): Update.
927         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
928         Return gdbpy_ref.
929         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
930         (find_pretty_printer_from_progspace)
931         (find_pretty_printer_from_gdb, find_pretty_printer)
932         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
933         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
934         Update.
935
936 2018-11-04  Tom Tromey  <tom@tromey.com>
937
938         * python/python.c (gdbpy_parameter_value): Update.
939         * python/python-internal.h (python_string_to_unicode)
940         (python_string_to_target_python_string)
941         (host_string_to_python_string): Return gdbpy_ref.
942         * python/py-utils.c (python_string_to_unicode)
943         (unicode_to_encoded_python_string)
944         (unicode_to_target_python_string)
945         (python_string_to_target_string)
946         (python_string_to_target_python_string): Return gdbpy_ref.
947         (python_string_to_host_string): Update.
948         (host_string_to_python_string): Return gdbpy_ref.
949         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
950         (stpy_fullname): Update.
951         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
952         Update.
953         * python/py-prettyprint.c (print_string_repr): Update.
954         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
955         (objfpy_get_build_id): Update.
956         * python/py-breakpoint.c (bppy_get_location)
957         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
958         Update.
959
960 2018-11-04  Tom Tromey  <tom@tromey.com>
961
962         * python/python-internal.h (gdb_py_object_from_longest)
963         (gdb_py_object_from_ulongest): Return gdbpy_ref.
964         * python/py-value.c (valpy_int): Update.
965         * python/py-utils.c (gdb_py_object_from_longest): Return
966         gdbpy_ref.
967         (gdb_py_object_from_ulongest): Likewise.
968         * python/py-type.c (typy_get_alignof): Update.
969         * python/py-linetable.c (ltpy_get_all_source_lines)
970         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
971         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
972
973 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
974
975         * ada-lang.c (_initialize_ada_language): Fix typo.
976
977 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
978
979         * language.c (type): Remove.
980         (_initialize_language): Remove assignment to type.
981
982 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
983
984         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
985         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
986         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
987         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
988         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
989         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
990         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
991         and aarch64-ravenscar-thread.o.
992         * NEWS: Add entry documenting Ravenscar tasking support
993         on AArch64 ELF.
994
995 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
996
997         * symtab.c (info_functions_command): Initialize quiet flag.
998         * stack.c (info_args_command): Likewise.
999
1000 2018-11-01  Jim Wilson  <jimw@sifive.com>
1001
1002         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1003         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1004         debugging messages.
1005
1006 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1007
1008         * ada-lang.c (ada_watch_location_expression): New function.
1009         (ada_language_defn): Set la_watch_location_expression to
1010         ada_watch_location_expression.
1011
1012 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1013
1014         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1015
1016 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1017
1018         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1019         shifting.
1020
1021 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1022             Joel Brobecker  <brobecker@adacore.com>
1023
1024         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1025         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1026         * arm-pikeos-tdep.c: New file.
1027         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1028         embedded system.
1029         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1030
1031 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1032
1033         * common/pathstuff.c (get_standard_temp_dir): New.
1034         * common/pathstuff.h (get_standard_temp_dir): New.
1035         * config.in: Re-generate.
1036         * configure: Re-generate.
1037         * configure.ac: Don't check for mkdtemp.
1038         * gnulib/aclocal-m4-deps.mk: Re-generate.
1039         * gnulib/aclocal.m4: Re-generate.
1040         * gnulib/config.in: Re-generate.
1041         * gnulib/configure: Re-generate.
1042         * gnulib/import/Makefile.am: Re-generate.
1043         * gnulib/import/Makefile.in: Re-generate.
1044         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1045         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1046         * gnulib/import/m4/mkdtemp.m4: New file.
1047         * gnulib/import/mkdtemp.c: New file.
1048         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1049         Add mkdtemp module.
1050         * unittests/mkdir-recursive-selftests.c (test): Use
1051         get_standard_temp_dir.
1052         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1053         ifdef.
1054         * compile/compile.c (get_compile_file_tempdir): Likewise.
1055
1056 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1057
1058         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1059         (SIG_FRAME_LR_OFFSET64): New define.
1060         (SIG_FRAME_FP_OFFSET64): New define.
1061         (aix_sighandle_frame_cache): New Function.
1062         (aix_sighandle_frame_this_id): New Function.
1063         (aix_sighandle_frame_prev_register): New Function.
1064         (aix_sighandle_frame_sniffer): New Function.
1065         (aix_sighandle_frame_unwind): New global variable.
1066         (rs6000_aix_init_osabi): Install new frame unwinder.
1067
1068 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1069
1070         PR gdb/23835
1071         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1072         already defined.
1073
1074 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1075
1076         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1077
1078 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1079
1080         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1081         (producer_is_icc): New function.
1082         (check_producer): Set producer_is_icc field on dwarf2_cu.
1083         (dwarf2_init_integer_type): New function.
1084         (read_base_type): Call dwarf2_init_integer_type instead of
1085         init_integer_type in all cases.
1086         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1087         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1088         LEN is greater than 0.
1089
1090 2018-10-30  Tom Tromey  <tom@tromey.com>
1091
1092         * main.c (captured_main_1): Check return value of bfd_init.
1093
1094 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1095
1096         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1097         Adjust comments.
1098
1099 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1100
1101         * procfs.c: Include common/pathstuff.h.
1102
1103 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1104
1105         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1106         Add missing braces.  No functional change.
1107
1108 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1109
1110         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1111         to report a bad option and fix indentation.
1112         * demangle.c (demangle_command): Use report_unrecognized_option_error
1113         to report a bad option and correctly report the bad option.
1114
1115 2018-10-27  Tom Tromey  <tom@tromey.com>
1116
1117         PR cli/23364:
1118         * darwin-nat.c (copied_shell): New global.
1119         (may_have_sip): Rename from should_disable_startup_with_shell.
1120         (copy_shell_to_cache, maybe_cache_shell): New functions.
1121         (darwin_nat_target::create_inferior): Update.  Use
1122         copied_shell.
1123
1124 2018-10-27  Tom Tromey  <tom@tromey.com>
1125
1126         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1127         (run_tests): Call test_to_file.
1128         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1129         temporary files.
1130         * common/scoped_fd.h (scoped_fd::to_file): New method.
1131
1132 2018-10-27  Tom Tromey  <tom@tromey.com>
1133
1134         * unittests/scoped_mmap-selftests.c (test_normal): Use
1135         gdb_mkostemp_cloexec.
1136         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1137         Use gdb_mkostemp_cloexec.
1138         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1139         gnulib/config.in, gnulib/configure,
1140         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1141         gnulib/import/m4/gnulib-cache.m4,
1142         gnulib/import/m4/gnulib-comp.m4: Update.
1143         * gnulib/import/m4/mkostemp.m4: New file.
1144         * gnulib/import/m4/mkstemp.m4: Remove.
1145         * gnulib/import/mkostemp.c: New file.
1146         * gnulib/import/mkstemp.m4: Remove.
1147         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1148         mkstemp, add mkostemp.  Apply new patch.
1149         * gnulib/import/stdlib.in.h: Apply patch.
1150         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1151         New file.
1152         * dwarf-index-write.c (write_psymtabs_to_index): Use
1153         gdb_mkostemp_cloexec.
1154         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1155
1156 2018-10-27  Tom Tromey  <tom@tromey.com>
1157
1158         * unittests/mkdir-recursive-selftests.c: New file.
1159         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1160         unittests/mkdir-recursive-selftests.c.
1161         * dwarf-index-cache.c (mkdir_recursive): Move to
1162         common/filestuff.c.
1163         (index_cache::store): Check return value of mkdir_recursive.
1164         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1165         (_initialize_index_cache): Don't register test.
1166         * common/filestuff.h (mkdir_recursive): Declare.
1167         * common/filestuff.c (mkdir_recursive): Move from
1168         dwarf-index-cache.c.  Return bool.
1169
1170 2018-10-27  Tom Tromey  <tom@tromey.com>
1171
1172         * dwarf-index-write.c (write_psymtabs_to_index): Move
1173         make_temp_filename to common/pathstuff.c.
1174         * common/pathstuff.h (make_temp_filename): Declare.
1175         * common/pathstuff.c (make_temp_filename): New function, moved
1176         from dwarf-index-write.c.
1177
1178 2018-10-27  Tom Tromey  <tom@tromey.com>
1179
1180         * procfs.c (procfs_target::create_inferior): Use get_shell.
1181         * cli/cli-cmds.c (shell_escape): Use get_shell.
1182         * windows-nat.c (windows_nat_target::create_inferior): Use
1183         get_shell.
1184         * common/pathstuff.c (get_shell): New function.
1185         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1186         (fork_inferior): Use get_shell.
1187         * common/pathstuff.h (get_shell): Declare.
1188
1189 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1190
1191         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1192
1193 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1194
1195         * stack.c (print_variable_and_value_data): Add preg and treg.
1196         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1197         and update callers.
1198         (print_frame_arg_vars): Likewise.
1199         (prepare_reg): New function.
1200         (info_locals_command): Extract info print args and use them.
1201         (info_args_command): Likewise.
1202         (_initialize_stack): Modify on-line help.
1203         * symtab.c (treg_matches_sym_type_name): New function.
1204         (search_symbols): New arg t_regexp.
1205         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1206         (info_variables_command): Extract info print args and use them.
1207         (info_functions_command): Likewise.
1208         (info_types_command): Update call to symtab_symbol_info.
1209         (_initialize_symtab): Modify on-line help.
1210         * symtab.h (treg_matches_sym_type_name): New function.
1211         (search_symbols): New t_regexp arg.
1212
1213 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1214
1215         * cli-utils.c (extract_arg_maybe_quoted): New function.
1216         (extract_info_print_args): New function.
1217         (info_print_args_help): New function.
1218         (report_unrecognized_option_error): New function.
1219         * cli-utils.h (extract_arg_maybe_quoted): New function.
1220         (extract_info_print_args): New function.
1221         (info_print_args_help): New function.
1222         (report_unrecognized_option_error): New function.
1223
1224 2018-10-26  Tom Tromey  <tom@tromey.com>
1225
1226         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1227         (compute_compunit_symtab_includes): Update.
1228         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1229         (compunit_symtab_ptr): Likewise.
1230
1231 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1232
1233         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1234         default_print_auxv_entry for specific tag values.
1235
1236 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1237
1238         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1239
1240 2018-10-26  Jim Wilson  <jimw@sifive.com>
1241
1242         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1243         (riscv_linux_sigframe_init): Declare.
1244         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1245         (riscv_linux_sigframe): New.
1246         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1247         (riscv_linux_sigframe_init): Define.
1248         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1249
1250         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1251         (riscv_isa_flen): Likewise.  Drop static.
1252         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1253         (riscv_isa_flen): Likewise.  Declare.
1254
1255 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1256             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1257
1258         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1259         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1260         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1261         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1262         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1263         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1264         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1265         Define.
1266         (struct ppc_linux_features) <htm>: New field.
1267         (ppc_linux_no_features): Add initializer for htm field.
1268         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1269         new tdescs.
1270         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1271         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1272         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1273         Define if not already defined.
1274         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1275         and rs6000/powerpc-isa207-htm-vsx64l.
1276         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1277         rs6000/powerpc-isa207-htm-vsx64l.xml.
1278         * features/rs6000/power-htm-spr.xml: New file.
1279         * features/rs6000/power-htm-core.xml: New file.
1280         * features/rs6000/power64-htm-core.xml: New file.
1281         * features/rs6000/power-htm-fpu.xml: New file.
1282         * features/rs6000/power-htm-altivec.xml: New file.
1283         * features/rs6000/power-htm-vsx.xml: New file.
1284         * features/rs6000/power-htm-ppr.xml: New file.
1285         * features/rs6000/power-htm-dscr.xml: New file.
1286         * features/rs6000/power-htm-tar.xml: New file.
1287         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1288         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1289         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1290         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1291         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1292         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1293         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1294         fetch_regset with HTM regsets.
1295         (store_register, store_ppc_registers): Call store_regset with HTM
1296         regsets.
1297         (ppc_linux_nat_target::read_description): Set htm field in the
1298         features struct if needed.
1299         * ppc-linux-tdep.c: Include
1300         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1301         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1302         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1303         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1304         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1305         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1306         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1307         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1308         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1309         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1310         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1311         (ppc32_linux_ctarregset): New globals.
1312         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1313         (ppc_linux_collect_core_cpgrregset): New function.
1314         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1315         regsets.
1316         (ppc_linux_core_read_description): Check if the tm spr section is
1317         present and set htm in the features struct.
1318         (_initialize_ppc_linux_tdep): Call
1319         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1320         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1321         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1322         Declare.
1323         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1324         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1325         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1326         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1327         New fields.
1328         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1329         Likewise.
1330         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1331         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1332         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1333         New enum fields.
1334         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1335         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1336         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1337         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1338         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1339         <PPC_CTAR_REGNUM>: Likewise.
1340         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1341         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1342         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1343         (IS_CEFP_PSEUDOREG): Define.
1344         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1345         registers.  Return names for the checkpointed DFP, VSX, and EFP
1346         pseudo registers.
1347         (rs6000_pseudo_register_type): Remove initial assert and raise an
1348         internal error in the else clause instead.  Return types for the
1349         checkpointed DFP, VSX, and EFP pseudo registers.
1350         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1351         checkpointed DFP pseudo registers.
1352         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1353         checkpointed VSX pseudo registers.
1354         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1355         from efpr_pseudo_register_read and
1356         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1357         registers.
1358         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1359         Handle checkpointed DFP, VSX, and EFP registers.
1360         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1361         (efp_ax_pseudo_register_collect): New functions.
1362         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1363         register logic to new functions.  Handle checkpointed DFP, VSX,
1364         and EFP pseudo registers.
1365         (rs6000_gdbarch_init): Look for and validate the htm features.
1366         Include checkpointed DFP, VSX and EFP pseudo-registers.
1367         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1368         HTM registers.
1369
1370 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1371
1372         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1373         without altivec or fpu.
1374
1375 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1376             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1377
1378         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1379         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1380         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1381         Define if not already defined.
1382         * features/rs6000/power-ebb.xml: New file.
1383         * features/rs6000/power-linux-pmu.xml: New file.
1384         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1385         features.
1386         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1387         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1388         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1389         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1390         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1391         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1392         fetch_regset with ebb and pmu regsets.
1393         (store_register, store_ppc_registers): Call store_regset with ebb
1394         and pmu regsets.
1395         (ppc_linux_nat_target::read_description): Set isa207 field in the
1396         features struct if ebb and pmu are avaiable.
1397         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1398         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1399         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1400         and pmu regsets.
1401         (ppc_linux_core_read_description): Check if the pmu section is
1402         present and set isa207 in the features struct.
1403         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1404         (ppc32_linux_pmuregset): Declare.
1405         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1406         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1407         <ppc_sier_regnum>: New field.
1408         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1409         New enum values.
1410         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1411         values.
1412         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1413         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1414         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1415         ebb and pmu features.
1416
1417 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1418             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1419
1420         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1421         (tdesc_powerpc_isa207_vsx64l): Declare.
1422         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1423         (struct ppc_linux_features) <isa207>: New field.
1424         (ppc_linux_no_features): Add initializer for isa207 field.
1425         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1426         new tdescs.
1427         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1428         (NT_PPC_TAR): Define if not already defined.
1429         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1430         rs6000/powerpc-isa207-vsx64l.
1431         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1432         rs6000/powerpc-isa207-vsx64l.xml.
1433         * features/rs6000/power-tar.xml: New file.
1434         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1435         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1436         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1437         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1438         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1439         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1440         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1441         fetch_regset with the TAR regset.
1442         (store_register, store_ppc_registers): Call store_regset with the
1443         TAR regset.
1444         (ppc_linux_nat_target::read_description): Set isa207 field in the
1445         features struct if needed.
1446         * ppc-linux-tdep.c: Include
1447         features/rs6000/powerpc-isa207-vsx32l.c and
1448         features/rs6000/powerpc-isa207-vsx64l.c.
1449         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1450         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1451         regset.
1452         (ppc_linux_core_read_description): Check if the tar section is
1453         present and set isa207 in the features struct.
1454         (_initialize_ppc_linux_tdep): Call
1455         initialize_tdesc_powerpc_isa207_vsx32l and
1456         initialize_tdesc_powerpc_isa207_vsx64l.
1457         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1458         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1459         (enum) <PPC_TAR_REGNUM>: New enum value.
1460         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1461         feature.
1462         (ppc_process_record_op31): Record changes to TAR.
1463
1464 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1465             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1466
1467         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1468         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1469         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1470         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1471         (struct ppc_linux_features) <ppr_dscr>: New field.
1472         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1473         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1474         new tdescs.
1475         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1476         Define if not already defined.
1477         * features/Makefile (WHICH): Add
1478         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1479         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1480         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1481         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1482         * features/rs6000/power-dscr.xml: New file.
1483         * features/rs6000/power-ppr.xml: New file.
1484         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1485         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1486         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1487         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1488         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1489         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1490         * ppc-linux-nat.c: Include <sys/uio.h>.
1491         (fetch_regset, store_regset, check_regset): New functions.
1492         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1493         DSCR and PPR regsets.
1494         (store_register, store_ppc_registers): Call store_regset with
1495         DSCR and PPR regsets.
1496         (ppc_linux_get_hwcap2): New function.
1497         (ppc_linux_nat_target::read_description): Call
1498         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1499         features struct if needed.
1500         * ppc-linux-tdep.c: Include
1501         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1502         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1503         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1504         (ppc32_linux_dscrregset): New globals.
1505         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1506         and dscr regsets.
1507         (ppc_linux_core_read_description): Check if the ppr and dscr
1508         sections are present and set ppr_dscr in the features struct.
1509         (_initialize_ppc_linux_tdep): Call
1510         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1511         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1512         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1513         (ppc32_linux_dscrregset): Declare.
1514         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1515         <ppc_dscr_regnum>: New field.
1516         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1517         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1518         and dscr features.
1519         (ppc_process_record_op31): Record changes to PPR and DSCR.
1520
1521 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1522
1523         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1524         second initializer line for the have_* variables.  Initialize
1525         have_fpu to 0 instead of 1.
1526
1527 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1528
1529         * arch/ppc-linux-common.c (ppc_linux_match_description):
1530         Parenthesize tdesc assignements and indent them properly.
1531
1532 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1533
1534         * ppc-linux-nat.c (fetch_register): Change if statement to else
1535         if.
1536         (store_register): Likewise.
1537
1538 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1539
1540         * rs6000-tdep.c: Remove reggroups.h include.
1541         (rs6000_pseudo_register_reggroup_p): Remove.
1542         (rs6000_gdbarch_init): Remove call to
1543         set_tdesc_pseudo_register_reggroup_p.
1544
1545 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1546
1547         * reggroups.c (default_register_reggroup_p): Return true for
1548         decfloat registers and float_reggroup.
1549
1550 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1551
1552         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1553         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1554         ppc_linux_collect_vrregset by regcache_collect_regset.
1555
1556 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1557
1558         * linux-tdep.c (linux_collect_regset_section_cb): Use
1559         std::vector<gdb_byte> instead of char * and malloc for buf.
1560         Remove xfree.
1561
1562 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1563
1564         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1565         symtab_start instead of always using language_unknown.
1566
1567 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1568
1569         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1570         READ_P parameter, catch and ignore register access errors from
1571         either the old or new MISA location.
1572         (riscv_has_feature): Update call to riscv_read_misa_reg.
1573
1574 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1575
1576         * python/py-function.c (convert_values_to_python): Return
1577         gdbpy_ref<>.  Add header comment.
1578         (fnpy_call): Adjust.
1579
1580 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1581
1582         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1583         (cmdpy_completer_handle_brkchars): Adjust.
1584         (cmdpy_completer): Adjust.
1585
1586 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1587
1588         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1589         Pass correct regnum to raw_supply_zeroed.
1590
1591 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1592
1593         * regcache.c (cooked_read_test): Add CSKY to the list of
1594         architectures with a save_reggroup
1595
1596 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1597
1598         PR gdb/23368
1599         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1600         transfer terminal state from old new new inferior.
1601         * terminal.h (swap_terminal_info): New function.
1602         * inflow.c (swap_terminal_info): New function.
1603
1604 2018-10-23  Tom Tromey  <tom@tromey.com>
1605
1606         * record-btrace.c (get_thread_current_frame_id): Rename from
1607         get_thread_current_frame.  Return a frame_id.
1608         (record_btrace_start_replaying): Update.
1609
1610 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1611
1612         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1613         for CSRs.
1614
1615 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1616
1617         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1618         have_nonsteppable_watchpoint attribute to 1.
1619
1620 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1621
1622         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1623         register names.
1624         (struct register_alias): Rename to...
1625         (struct riscv_register_alias): ...this, and update comment.
1626         (riscv_register_aliases): Update type, and alias names.  Remove
1627         CSR names from this list.
1628         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1629         register names.  Add an extra assertion.
1630         (riscv_is_regnum_a_named_csr): New function.
1631         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1632
1633 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1634
1635         * configure.tgt: Add configuration for s12z.
1636         * s12z-tdep.c:  New file.
1637         * NEWS: Mention new target.
1638
1639 2018-10-22  Jim Wilson  <jimw@sifive.com>
1640
1641         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1642         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1643
1644         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1645         (riscv_register_type): Use them.
1646         (riscv_print_one_register_info): Handle union of floats same as float.
1647         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1648         riscv_fpreg_q_type fields.
1649
1650 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1651
1652         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1653         * gdbarch.h: Re-generate.
1654         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1655         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1656         * eval.c (evaluate_subexp_standard): Likewise.
1657         * findvar.c (value_of_register): Likewise.
1658         (value_of_register_lazy): Likewise.
1659         (address_from_register): Likewise.
1660         * frame.c (get_frame_register_bytes): Likewise.
1661         * gdbarch-selftests.c (register_to_value_test): Likewise.
1662         * h8300-tdep.c (h8300_register_type): Likewise.
1663         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1664         (i386_svr4_reg_to_regnum): Likewise.
1665         * infcmd.c (default_print_registers_info): Likewise.
1666         (registers_info): Likewise.
1667         (print_vector_info): Likewise.
1668         (default_print_float_info): Likewise.
1669         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1670         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1671         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1672         (mi_cmd_data_list_changed_registers): Likewise.
1673         (mi_cmd_data_list_register_values): Likewise.
1674         (mi_cmd_data_write_register_values): Likewise.
1675         (mi_cmd_trace_frame_collected): Likewise.
1676         * mips-tdep.c (print_gp_register_row): Likewise.
1677         (mips_print_registers_info): Likewise.
1678         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1679         * regcache.c (init_regcache_descr): Likewise.
1680         (register_size): Likewise.
1681         (register_dump::dump): Likewise.
1682         (cooked_read_test): Likewise.
1683         (cooked_write_test): Likewise.
1684         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1685         (rs6000_gdbarch_init): Likewise.
1686         * stabsread.c (stab_reg_to_regnum): Likewise.
1687         * stack.c (info_frame_command): Likewise.
1688         * target-descriptions.c (tdesc_register_name): Likewise.
1689         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1690         * tui/tui-regs.c (tui_show_register_group): Likewise.
1691         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1692         (user_reg_map_regnum_to_name): Likewise.
1693         (value_of_user_reg): Likewise.
1694         (maintenance_print_user_registers): Likewise.
1695         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1696         (xtensa_register_name): Likewise.
1697         (xtensa_register_type): Likewise.
1698         (xtensa_reg_to_regnum): Likewise.
1699         (xtensa_pseudo_register_read): Likewise.
1700         (xtensa_pseudo_register_write): Likewise.
1701
1702 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1703
1704         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1705         correctly-sized buffer with raw_read.
1706         (amd64_pseudo_register_write): Use correctly-sized buffer for
1707         raw_read/raw_write.
1708
1709 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1710
1711         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1712         in add_prefix_cmd of set print type.
1713
1714 2018-10-19  Tom Tromey  <tom@tromey.com>
1715
1716         PR tui/18388:
1717         * NEWS: Mention tabset deprecation.
1718         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1719         (update_tab_width): New function.
1720         (tui_set_tab_width, tui_show_tab_width): New functions.
1721         (tui_set_tab_width_command): Use update_tab_width.
1722         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1723         Add new "set tui tab-width" command.
1724         * tui/tui-source.c (tui_set_source_content): Update.
1725         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1726         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1727         Don't declare.
1728         (tui_tab_width): Declare.
1729         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1730         (tui_set_default_tab_len): Remove.
1731
1732 2018-10-19  Tom Tromey  <tom@tromey.com>
1733
1734         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1735         (key_is_backspace, tui_getc): Don't declare.
1736         * tui/tui-io.c (key_is_start_sequence): Now static.
1737         (key_is_end_sequence, key_is_backspace): Remove.
1738         (tui_getc): Now static.
1739
1740 2018-10-19  Tom Tromey  <tom@tromey.com>
1741
1742         * symfile.c (reread_symbols): Clear "static_links".
1743
1744 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1745
1746         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1747         define.
1748         (aarch64_linux_sigframe_init): Extra boundary checks.
1749
1750 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1751
1752         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1753         the possibly non-existent tdesc type 'vec128', but the type of raw
1754         register v16 instead.
1755
1756 2018-10-19  Gary Benson <gbenson@redhat.com>
1757
1758         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1759
1760 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1761
1762         PR cli/23785
1763         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1764         NULL.
1765
1766 2018-10-17  Paul Koning  <paul_koning@dell.com>
1767
1768         * charset.c (convert_between_encodings): Fix unsigned overflow.
1769
1770 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1771
1772         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1773         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1774         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1775         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1776         New functions.
1777         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1778         and fbsd_info_proc_mappings_header.
1779         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1780         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1781         New.
1782
1783 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1784
1785         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1786         Solaris Maintainer.
1787
1788 2018-10-15  Tom Tromey  <tom@tromey.com>
1789
1790         * tui/tui.c (strcat_to_buf): Remove casts.
1791         * tui/tui-winsource.c (tui_show_source_line)
1792         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1793         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1794         * tui/tui-windata.c (tui_first_data_item_displayed)
1795         (tui_delete_data_content_windows, tui_erase_data_content)
1796         (tui_display_all_data, tui_display_data_from)
1797         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1798         * tui/tui-win.c (tui_set_win_height)
1799         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1800         casts.
1801         * tui/tui-win.c (tui_resize_all): Remove casts.
1802         (tui_scroll_backward_command, tui_set_focus)
1803         (tui_set_tab_width_command): Likewise.
1804         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1805         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1806         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1807         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1808         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1809         Remove casts.
1810
1811 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1812
1813         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1814         AArch64/ARM maintainer.
1815
1816 2018-10-11  Gary Benson <gbenson@redhat.com>
1817
1818         * interps.h (interp::m_name): Make private and mutable.
1819         * interps.c (interp::~interp): Free m_name.
1820
1821 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1822             Simon Marchi <simark@simark.ca>
1823
1824         * README (`configure' options): Add documentation for new
1825         "--enable-unit-tests" option.
1826         * acinclude.m4: Include "selftest.m4".
1827         * configure: Regenerate.
1828         * configure.ac: Use "GDB_AC_SELFTEST".
1829         * maint.c (maintenance_selftest): Update message informing
1830         that selftests have been disabled.
1831         (maintenance_info_selftests): Likewise.
1832         * selftest.m4: New file.
1833
1834 2018-10-10  Gary Benson <gbenson@redhat.com>
1835
1836         * remote.c (remote_target::remote_send_printf): Add
1837         missing va_end found by Coverity.
1838
1839 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1840
1841         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1842
1843 2018-10-09  Tom Tromey  <tom@tromey.com>
1844
1845         * configure: Rebuild.
1846         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1847         * NEWS: Update --enable-ubsan documentation.
1848
1849 2018-10-09  Gary Benson <gbenson@redhat.com>
1850
1851         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1852         found by Coverity.
1853
1854 2018-10-08  Tom Tromey  <tom@tromey.com>
1855
1856         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1857         variable.
1858         (riscv_fbsd_init_abi): Likewise.
1859
1860 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1861         * valops.c (value_struct_elt_for_reference): Rename local variable
1862         to work around the shadowing a previous local warning.
1863
1864 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1865
1866         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1867         * NEWS: Mention new FreeBSD/riscv native configuration.
1868         * configure.host: Add riscv*-*-freebsd*.
1869         * configure.nat: Likewise.
1870         * riscv-fbsd-nat.c: New file.
1871
1872 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1873
1874         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1875         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1876         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1877         * NEWS: Mention new FreeBSD/riscv target.
1878         * configure.tgt: Add riscv*-*-freebsd*.
1879         * riscv-fbsd-tdep.c: New file.
1880         * riscv-fbsd-tdep.h: New file.
1881
1882 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1883
1884         * regcache.h (struct regcache_map_entry): Note that this type can
1885         be used with traditional frame caches.
1886         * trad-frame.c (trad_frame_set_reg_regmap): New.
1887         * trad-frame.h (trad_frame_set_reg_regmap): New.
1888
1889 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1890
1891         PR c++/16841
1892         * valops.c (get_virtual_base_offset): New function.
1893         (value_struct_elt_for_reference): Use it to get virtual base offset
1894         and add it in calculating class member address.
1895
1896 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1897
1898         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1899         (check_producer): Check if the producer is codewarrior.
1900         (producer_is_codewarrior): New function.
1901         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1902         produced by codewarrior.
1903         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1904
1905 2018-10-06  Tom Tromey  <tom@tromey.com>
1906
1907         PR python/19399:
1908         * python/py-inferior.c: Add "architecture" entry.
1909         (infpy_architecture): New function.
1910
1911 2018-10-06  Tom Tromey  <tom@tromey.com>
1912
1913         PR python/21765:
1914         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1915         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1916         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1917         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1918
1919 2018-10-06  Tom Tromey  <tom@tromey.com>
1920
1921         PR build/17077:
1922         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1923         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1924         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1925         #include.
1926
1927 2018-10-06  Tom Tromey  <tom@tromey.com>
1928
1929         * python/py-breakpoint.c (bppy_get_location): Handle a
1930         bp_breakpoint without a location.
1931
1932 2018-10-06  Tom Tromey  <tom@tromey.com>
1933
1934         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1935         (_RegEx): Reformat help text.
1936         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1937         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1938         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1939         text.
1940         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1941         (EnableXMethod, DisableXMethod): Remove help indentation.
1942         Capitalize meta-syntactic variables.
1943         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1944         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1945         Capitalize meta-syntactic variables.
1946         * python/lib/gdb/command/explore.py (ExploreCommand)
1947         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1948         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1949         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1950         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1951         Remove help indentation.
1952         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1953         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1954         (DisableFrameFilter, SetFrameFilterPriority)
1955         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1956
1957 2018-10-06  Tom Tromey  <tom@tromey.com>
1958
1959         PR tui/28819:
1960         * tui/tui-io.c (gdb_wgetch): New function.
1961         (tui_mld_getc, tui_getc): Use it.
1962
1963 2018-10-05  Tom Tromey  <tom@tromey.com>
1964
1965         * sol-thread.c (sol_thread_target::wait): Rename inner
1966         "save_ptid".
1967
1968 2018-10-04  Tom Tromey  <tom@tromey.com>
1969
1970         * configure: Rebuild.
1971         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1972
1973 2018-10-04  Tom Tromey  <tom@tromey.com>
1974
1975         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1976         declaration of "block".
1977
1978 2018-10-04  Tom Tromey  <tom@tromey.com>
1979
1980         * common/filestuff.c (fdwalk): Remove inner declaration of
1981         "result".
1982
1983 2018-10-04  Tom Tromey  <tom@tromey.com>
1984
1985         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1986         "structs_addr" and hoist declaration.
1987
1988 2018-10-04  Tom Tromey  <tom@tromey.com>
1989
1990         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1991         variable "size".
1992
1993 2018-10-04  Tom Tromey  <tom@tromey.com>
1994
1995         * mdebugread.c (parse_partial_symbols): Use std::string.
1996
1997 2018-10-04  Tom Tromey  <tom@tromey.com>
1998
1999         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2000         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2001         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2002         header.
2003         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2004         more inner scope.
2005         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2006         * varobj.c (varobj_update): Rename inner "newobj",
2007         "type_changed".
2008         * valprint.c (generic_emit_char): Rename inner "buf".
2009         * valops.c (find_overload_match): Rename inner "temp".
2010         (value_struct_elt_for_reference): Declare "v" in more inner
2011         scope.
2012         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2013         * unittests/array-view-selftests.c (run_tests): Rename inner
2014         "vec".
2015         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2016         header.
2017         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2018         "tsv" in more inner scope.
2019         (print_one_static_tracepoint_marker): Rename inner
2020         "tuple_emitter".
2021         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2022         (tic6x_push_dummy_call): Don't redeclare "addr".
2023         * target-float.c: Declare "dto" lower.
2024         * symtab.c (lookup_local_symbol): Rename inner "sym".
2025         (find_pc_sect_line): Rename inner "pc".
2026         * stack.c (print_frame): Don't redeclare "gdbarch".
2027         (return_command): Rename inner "gdbarch".
2028         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2029         "sp".
2030         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2031         header.
2032         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2033         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2034         scope.
2035         * remote.c (remote_target::update_thread_list): Don't redeclare
2036         "tp".
2037         (remote_target::process_initial_stop_replies): Rename inner
2038         "thread".
2039         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2040         (remote_target::wait_as): Don't redeclare "stop_reply".
2041         (remote_target::get_thread_local_address): Rename inner
2042         "result".
2043         (remote_target::get_tib_address): Likewise.
2044
2045         * regcache.c (cooked_read_test): Rename "regnum".
2046         * record-btrace.c (cmd_record_btrace_start): Rename inner
2047         "exception".
2048         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2049         loop header.
2050         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2051         header.
2052         (ppu2spu_sniffer): Rename inner "buf".
2053         * parse.c (operator_check_standard): Rename inner "type",
2054         "objfile".
2055         * p-valprint.c (pascal_val_print): Introduce new scope for
2056         "low_bound", "high_bound".
2057         * p-exp.y (yylex): Declare "i" in loop header.
2058         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2059         Lower declaration of "s".
2060         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2061         header.
2062         (nios2_push_dummy_call): Rename "len".
2063         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2064         "buf".
2065         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2066         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2067         (linux_xfer_osdata_modules): Likewise.
2068         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2069         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2070         (mips_o64_push_dummy_call): Likewise.
2071         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2072         "op".
2073         * mi/mi-main.c (list_available_thread_groups): Rename inner
2074         "tuple_emitter".
2075         (mi_cmd_data_read_memory): Rename inner "opts".
2076         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2077         "tuple_emitter".
2078         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2079         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2080         more inner scope.
2081         (parse_partial_symbols): Rename inner "pst", "p", "name"
2082         * main.c (captured_main_1): Rename inner "i"s.
2083         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2084         "oso2".
2085         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2086         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2087         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2088         (handle_signal_stop): Rename inner "gdbarch".
2089         (handle_command): Declare "signum" in loop header.
2090         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2091         "status".
2092         (examine_prologue): Rename inner "sol" and "sof".
2093         (ia64_extract_return_value): Rename inner "val".  Declare another
2094         "val" in a more inner scope.
2095         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2096         inner scope.
2097         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2098         "except".
2099         * findvar.c (default_read_var_value): Don't redeclare "addr".
2100         * f-exp.y (yylex): Declare "i" in loop header.
2101         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2102         Rename inner "type", "expect_type".
2103         (evaluate_subexp_for_sizeof): Rename inner "pc".
2104         * elfread.c (elf_symfile_read): Rename inner "abfd".
2105         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2106         "bytes_read".
2107         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2108         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2109         (dwarf_decode_line_header): Rename inner "lh".
2110         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2111         "offset".  Declare "i" in loop header.
2112         (disassemble_dwarf_expression): Rename inner "addr_size".
2113         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2114         inner "result".
2115         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2116         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2117         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2118         "inner_list_emitter".
2119         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2120         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2121         declaration in a block.
2122         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2123         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2124         "obstack_final_size".
2125         * cp-support.c (inspect_type): Declare "i" in loop header.
2126         * compile/compile.c (compile_instance::insert_symbol_error):
2127         Rename inner "e".
2128         * common/agent.c (agent_run_command): Remove inner "ret"
2129         declaration.
2130         * coffread.c (coff_symfile_read): Rename inner "name".
2131         (coff_symfile_read): Rename inner "abfd".
2132         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2133         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2134         "high".
2135         * c-exp.y (lex_one_token): Move "len" declaration lower.
2136         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2137         "gdbarch".
2138         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2139         "b".
2140         (watch_command_1): Declare "mark" later.
2141         (clear_command): Don't shadow "a" or "b".
2142         (delete_command): Rename inner "b".
2143         (delete_trace_command): Likewise.
2144         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2145         "op".
2146         (arm_gdbarch_init): Remove inner "e_flags".
2147         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2148         "offset" in inner blocks.
2149
2150 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2151
2152         * dwarf-index-write.c (file_write): Don't write if the vector is
2153         empty.
2154
2155 2018-10-05  Tom de Vries  <tdevries@suse.de>
2156
2157         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2158         PyArg_ParseTuple call.
2159
2160 2018-10-05  Tom de Vries  <tdevries@suse.de>
2161
2162         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2163         PyArg_ParseTuple call.
2164
2165 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2166
2167         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2168         to avoid exceeding 80 characters per line limit.
2169
2170 2018-10-04  Tom Tromey  <tom@tromey.com>
2171
2172         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2173         (reread_symbols): Update.
2174         * complaints.h (clear_complaints): Remove argument.
2175         * complaints.c (enum complaint_series): Remove.
2176         (series): Remove global.
2177         (complaint_internal): Update.
2178         (clear_complaints): Remove argument.
2179
2180 2018-10-04  Tom Tromey  <tom@tromey.com>
2181
2182         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2183         debugging symbols" message if there is a separate debug objfile.
2184
2185 2018-10-04  Tom Tromey  <tom@tromey.com>
2186
2187         PR cli/19551:
2188         * symfile.c (symbol_file_add_with_addrs): Update output.
2189         * psymtab.c (require_partial_symbols): Update output.
2190
2191 2018-10-04  Tom Tromey  <tom@tromey.com>
2192
2193         PR cli/22234:
2194         * complaints.c: Emit \n.
2195
2196 2018-10-04  Tom Tromey  <tom@tromey.com>
2197
2198         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2199         (separate_debug_file_exists, find_separate_debug_file)
2200         (add_symbol_file_command, reread_symbols, allocate_symtab)
2201         (allocate_compunit_symtab): Use filtered printing, not
2202         unfiltered.
2203         * psymtab.c (require_partial_symbols, dump_psymtab)
2204         (allocate_psymtab): Use filtered printing, not unfiltered.
2205
2206 2018-10-04  Tom Tromey  <tom@tromey.com>
2207
2208         * complaints.c (complaint_internal): Correctly check complaint
2209         count.
2210
2211 2018-10-04  Tom Tromey  <tom@tromey.com>
2212
2213         * complaints.h (struct complaints): Remove declaration.
2214         * complaints.c (clear_complaints): Remove an unused variable.
2215
2216 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2217
2218         * MAINTAINERS (Write After Approval): Add self.
2219
2220 2018-10-03  Tom Tromey  <tom@tromey.com>
2221
2222         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2223         "buffer_contents".
2224         * coffread.c (coff_symtab_read): Initialize "newobj".
2225
2226 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2227
2228         * dwarf2read.c (read_func_scope): Remove struct keyword in
2229         range-based for.
2230
2231 2018-10-03  Tom Tromey  <tom@tromey.com>
2232
2233         * README: Mention --enable-ubsan.
2234         * NEWS: Mention --enable-ubsan.
2235         * acinclude.m4: Include sanitize.m4.
2236         * configure: Rebuild.
2237         * configure.ac: Call AM_GDB_UBSAN.
2238         * sanitize.m4: New file.
2239
2240 2018-10-03  Tom Tromey  <tom@tromey.com>
2241
2242         * expression.h (enum exp_opcode): Use uint8_t as base type.
2243         * expprint.c (op_name): Handle invalid opcodes.
2244
2245 2018-10-03  Tom Tromey  <tom@tromey.com>
2246
2247         * parse.c (prefixify_expression): Add assert.
2248         (parse_exp_in_context_1): Throw exception if the expression is
2249         empty.
2250
2251 2018-10-03  Tom Tromey  <tom@tromey.com>
2252
2253         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2254
2255 2018-10-03  Tom Tromey  <tom@tromey.com>
2256
2257         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2258
2259 2018-10-03  Tom Tromey  <tom@tromey.com>
2260
2261         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2262         unsigned.
2263
2264 2018-10-03  Tom Tromey  <tom@tromey.com>
2265
2266         * findvar.c (extract_integer): Do work in an unsigned type.
2267
2268 2018-10-03  Tom Tromey  <tom@tromey.com>
2269
2270         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2271         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2272         base type.
2273         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2274         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2275         type.
2276         * c-lang.h (enum c_string_type_values): Use unsigned as base
2277         type.
2278         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2279
2280 2018-10-03  Tom Tromey  <tom@tromey.com>
2281
2282         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2283         <~dwarf2_frame_state_reg_info>: Update.
2284         <dwarf2_frame_state_reg_info>: Update.
2285         <alloc_regs>: Add assertion.  Update.
2286         <reg>: Now a std::vector.
2287         <num_regs>: Remove.
2288         <swap>: Update.
2289         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2290         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2291
2292 2018-10-03  Tom Tromey  <tom@tromey.com>
2293
2294         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2295
2296 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2297
2298         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2299
2300 2018-10-02  Tom Tromey  <tom@tromey.com>
2301
2302         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2303
2304 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2305
2306         * NEWS: Mention changed commands.
2307         * ser-uds.c: New file.
2308         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2309         * configure: Regenerate.
2310         * Makefile.in: Add new file.
2311         * serial.c (serial_open): Check if filename is a socket
2312         and lookup the appropriate interface accordingly.
2313
2314 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2315
2316         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2317         define.
2318         (AARCH64_EXTRA_MAGIC): Likewise.
2319         (AARCH64_FPSIMD_MAGIC): Likewise.
2320         (AARCH64_SVE_MAGIC): Likewise.
2321         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2322         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2323         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2324         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2325         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2326         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2327         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2328         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2329         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2330         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2331         (read_aarch64_ctx): Add function.
2332         (aarch64_linux_sigframe_init): Detect FP registers.
2333
2334 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2335
2336         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2337         (AARCH64_D0_REGNUM): Likewise.
2338         (AARCH64_S0_REGNUM): Likewise.
2339         (AARCH64_H0_REGNUM): Likewise.
2340         (AARCH64_B0_REGNUM): Likewise.
2341         (AARCH64_SVE_V0_REGNUM): Likewise.
2342         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2343         (AARCH64_D0_REGNUM): Likewise.
2344         (AARCH64_S0_REGNUM): Likewise.
2345         (AARCH64_H0_REGNUM): Likewise.
2346         (AARCH64_B0_REGNUM): Likewise.
2347         (AARCH64_SVE_V0_REGNUM): Likewise.
2348
2349 2018-10-01  Gary Benson <gbenson@redhat.com>
2350
2351         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2352         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2353         prfpregset_t instead of gdb_prfpregset_t.
2354         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2355         * configure, config.in: Rebuild.
2356
2357 2018-10-01  Gary Benson <gbenson@redhat.com>
2358
2359         * common/gdb_proc_service.h: New file, factored out from...
2360         * gdb_proc_service.h: Moved common code to the above file.
2361         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2362
2363 2018-10-01  Gary Benson <gbenson@redhat.com>
2364
2365         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2366         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2367
2368 2018-10-01  Gary Benson <gbenson@redhat.com>
2369
2370         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2371         (AC_CHECK_HEADERS): Check for linux/elf.h.
2372         * configure, config.in: Rebuild.
2373         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2374         doesn't define elf_fpregset_t.
2375
2376 2018-10-01  Gary Benson <gbenson@redhat.com>
2377
2378         * gdb_proc_service.h: Whitespace change.
2379
2380 2018-10-01  Tom Tromey  <tom@tromey.com>
2381
2382         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2383         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2384         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2385
2386 2018-10-01  Tom Tromey  <tom@tromey.com>
2387
2388         * README: Minor change.
2389
2390 2018-09-30  Pedro Alves  <palves@redhat.com>
2391
2392         * darwin-nat-info.c (darwin_debug_regions_recurse)
2393         (info_mach_exceptions_command): Remove unused local variables.
2394         * darwin-nat.c (darwin_decode_notify_message)
2395         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2396         (darwin_stop_inferior, darwin_setup_exceptions)
2397         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2398         (darwin_nat_target::attach, darwin_nat_target::detach)
2399         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2400         local variables.
2401         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2402         variables.
2403
2404 2018-09-29  Tom Tromey  <tom@tromey.com>
2405
2406         * README: Remove some leftover text.
2407
2408 2018-09-29  Tom Tromey  <tom@tromey.com>
2409
2410         * PROBLEMS: Rewrite.
2411         * README: Update.
2412
2413 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2414
2415         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2416         case with explicit breakpoint kind.
2417         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2418         'additional_info' and related logic.
2419         (riscv_debug_breakpoints): New variable.
2420         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2421         instruction to determine the breakpoint kind.
2422         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2423         flag.  Update description of 'set/show riscv
2424         use-compressed-breakpoints' flag.
2425
2426 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2427
2428         (NEWS): Mention changes to frame related commands.
2429         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2430         (add_prefix_cmd_suppress_notification): New function.
2431         (add_com_suppress_notification): Call
2432         add_cmd_suppress_notification.
2433         * command.h (add_cmd_suppress_notification): Declare.
2434         (add_prefix_cmd_suppress_notification): Declare.
2435         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2436         (parse_frame_specification): Moved from stack.c, with
2437         simplification to handle a single argument.
2438         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2439         switch to the selected frame.  Add a header comment.
2440         * stack.c: Remove 'safe-ctype.h' include.
2441         (find_frame_for_function): Add declaration.
2442         (find_frame_for_address): New function.
2443         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2444         (frame_selection_by_function_completer): New function.
2445         (info_frame_command): Rename to...
2446         (info_frame_command_core): ...this, and update parameter types.
2447         (select_frame_command): Rename to...
2448         (select_frame_command_core): ...this, and update parameter types.
2449         (frame_command): Rename to...
2450         (frame_command_core): ...this, and update parameter types.
2451         (class frame_command_helper): New class to wrap implementations of
2452         frame related sub-commands.
2453         (frame_apply_cmd_list): New static global.
2454         (frame_cmd_list): Make static.
2455         (select_frame_cmd_list): New global for sub-commands.
2456         (info_frame_cmd_list): New global for sub-commands.
2457         (_initialize_stack): Register sub-commands for 'frame',
2458         'select-frame', and 'info frame'.  Update 'frame apply' commands
2459         to use frame_apply_cmd_list.  Move function local static
2460         frame_apply_list to file static frame_apply_cmd_list for
2461         consistency.
2462         * stack.h (select_frame_command): Delete declarationn.
2463         (select_frame_for_mi): Declare new function.
2464
2465 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2466
2467         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2468         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2469         and NOP.
2470
2471 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2472
2473         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2474
2475 2018-09-26  Tom Tromey  <tom@tromey.com>
2476
2477         * valops.c (auto_abandon): Remove dead code.
2478
2479 2018-09-26  Tom Tromey  <tom@tromey.com>
2480
2481         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2482
2483 2018-09-24  Tom Tromey  <tom@tromey.com>
2484
2485         * common/pathstuff.c (get_standard_cache_dir): Make
2486         "xdg_cache_home" and "home" const.
2487         * top.c (init_history): Make "tmpenv" const.
2488         * main.c (get_init_files): Make "homedir" const.
2489
2490 2018-09-23  Tom Tromey  <tom@tromey.com>
2491
2492         PR python/18852:
2493         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2494
2495 2018-09-23  Tom Tromey  <tom@tromey.com>
2496
2497         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2498         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2499         * python/python-internal.h (gdbpy_handle_exception): Declare.
2500         * python/py-utils.c (gdbpy_handle_exception): New function.
2501
2502 2018-09-23  Tom Tromey  <tom@tromey.com>
2503
2504         PR python/17284:
2505         * python/py-type.c (typy_template_argument): Check for negative
2506         argument number.
2507
2508 2018-09-23  Tom Tromey  <tom@tromey.com>
2509
2510         PR python/14062:
2511         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2512
2513 2018-09-23  Tom Tromey  <tom@tromey.com>
2514
2515         PR python/18170:
2516         * python/py-value.c (valpy_int): Allow conversion from pointer
2517         type.
2518
2519 2018-09-23  Tom Tromey  <tom@tromey.com>
2520
2521         PR python/20126:
2522         * python/py-value.c (valpy_int): Respect type sign.
2523
2524 2018-09-23  Tom Tromey  <tom@tromey.com>
2525
2526         PR python/18352;
2527         * python/py-value.c (valpy_float): Allow conversions from int or
2528         char.
2529         (valpy_int, valpy_long): Allow conversions from float.
2530
2531 2018-09-23  Tom Tromey  <tom@tromey.com>
2532
2533         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2534         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2535
2536 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2537
2538         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2539         __sighndlr.
2540         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2541
2542 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2543
2544         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2545         target_terminal::ours().
2546
2547 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2548
2549         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2550         of vl to ULONGEST.
2551
2552 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2553
2554         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2555         redundant condition.
2556
2557 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2558
2559         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2560
2561         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2562         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2563         * sol-thread.c (ps_pdmodel): Don't guard definition.
2564
2565         * procfs.c: Fix formatting.
2566
2567         * procfs.c (sysset_t_alloc): Remove.
2568         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2569         (procfs_debug_inferior): Likewise.
2570         (procfs_set_exec_trap): Likewise.
2571         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2572         (proc_set_traced_sysexit): Likewise.
2573
2574         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2575         (dead_procinfo): Likewise.
2576         (proc_warn): Likewise.
2577         (proc_error): Likewise.
2578         (proc_get_LDT_entry): Likewise.
2579         (do_attach): Likewise.
2580         (procfs_target::pid_to_str): Likewise.
2581         (iterate_over_mappings): Likewise.
2582
2583         * procfs.c (create_procinfo): Fix ARI warning.
2584         (proc_get_status): Likewise.
2585         (proc_stop_process): Likewise.
2586         (proc_run_process): Likewise.
2587         (proc_kill): Likewise.
2588         (proc_get_LDT_entry): Likewise.
2589         (procfs_find_LDT_entry): Likewise.
2590         (proc_update_threads): Likewise.
2591         (proc_iterate_over_threads): Likewise.
2592         (do_attach): Likewise.
2593         (procfs_xfer_memory): Likewise.
2594         (invalidate_cache): Likewise.
2595         (procfs_target::resume): Likewise.
2596         (procfs_init_inferior): Likewise.
2597         (procfs_set_exec_trap): Likewise.
2598         (procfs_target::thread_alive): Likewise.
2599         (procfs_target::pid_to_exec_file): Likewise.
2600         (iterate_over_mappings): Likewise.
2601         (procfs_target::make_corefile_notes): Likewise.
2602         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2603
2604         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2605         (procfs_find_LDT_entry): Likewise.
2606         * sol-thread.c (ps_lgetLDT): Likewise.
2607
2608 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2609
2610         PR tdep/17903
2611         * procfs.c (procfs_target): Declare pid_to_exec_file.
2612         (procfs_target::pid_to_exec_file): New.
2613
2614 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2615
2616         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2617         renaming.
2618         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2619         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2620
2621 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2622
2623         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2624         (supply_fpregset, fill_fpregset): Move ...
2625         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2626         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2627         Remove references to ioctl-based procfs.
2628         Include <sys/reg.h>.
2629         Remove PR_MODEL_NATIVE guards.
2630         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2631         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2632
2633 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2634
2635         PR gdb/20981:
2636         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2637         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2638         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2639
2640 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2641
2642         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2643         (fbsd_print_sockaddr_in6): Likewise.
2644
2645 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2646             Chris January  <chris.january@arm.com>
2647
2648         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2649         (evaluate_subexp_standard): Return a dummy type when
2650         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2651         OP_F77_UNDETERMINED_ARGLIST case.
2652         * expression.h (enum noside): Update comment.
2653
2654 2018-09-19  George Vasick <george.vasick@oracle.com>
2655
2656         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2657
2658 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2659             April Chin <april.chin@oracle.com>
2660             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2661
2662         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2663         uint_t lwpid_t.
2664         (create_procinfo): Print pids in /proc without leading zeros.
2665
2666 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2667
2668         * nios2-tdep.c (nios2_gcc_target_options): New.
2669         (nios2_gdb_arch_init): Install new hook.
2670
2671 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2672
2673         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2674         New file.
2675         * update-gnulib.sh: Apply patch.
2676         * configure: Re-generate.
2677
2678 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2679
2680         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2681         description.  Make "info proc" command descriptions more
2682         consistent.
2683
2684 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2685
2686         * NEWS: Mention 'info proc files' command.
2687
2688 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2689
2690         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2691         descriptors for IP_FILES and IP_ALL.
2692
2693 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2694
2695         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2696         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2697         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2698         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2699         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2700         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2701         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2702         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2703         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2704         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2705         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2706         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2707         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2708         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2709         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2710         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2711         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2712         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2713         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2714         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2715         (struct fbsd_sockaddr_un): New types.
2716         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2717         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2718         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2719         (fbsd_core_info_proc_files): New functions.
2720         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2721         IP_ALL.
2722         * fbsd-tdep.h (fbsd_info_proc_files_header)
2723         (fbsd_info_proc_files_entry): New.
2724
2725 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2726
2727         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2728         * infcmd.c (info_proc_cmd_files): New function.
2729         (_initialize_infcmd): Register 'info proc files' command.
2730
2731 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2732
2733         * gnulib/aclocal-m4-deps.mk: Re-generate.
2734         * gnulib/aclocal.m4: Re-generate.
2735         * gnulib/config.in: Re-generate.
2736         * gnulib/configure: Re-generate.
2737         * gnulib/import/Makefile.am: Re-generate.
2738         * gnulib/import/Makefile.in: Re-generate.
2739         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2740         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2741         * gnulib/import/arpa_inet.in.h: New file.
2742         * gnulib/import/inet_ntop.c: New file.
2743         * gnulib/import/m4/arpa_inet_h.m4: New file.
2744         * gnulib/import/m4/inet_ntop.m4: New file.
2745         * gnulib/import/m4/netinet_in_h.m4: New file.
2746         * gnulib/import/m4/socklen.m4: New file.
2747         * gnulib/import/m4/sockpfaf.m4: New file.
2748         * gnulib/import/m4/stdalign.m4: New file.
2749         * gnulib/import/m4/sys_uio_h.m4: New file.
2750         * gnulib/import/netinet_in.in.h: New file.
2751         * gnulib/import/stdalign.in.h: New file.
2752         * gnulib/import/sys_socket.c: New file.
2753         * gnulib/import/sys_socket.in.h: New file.
2754         * gnulib/import/sys_uio.in.h: New file.
2755         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2756         module.
2757
2758 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2759
2760         * gnulib/aclocal-m4-deps.mk: New file.
2761         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2762         deterministically.
2763
2764 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2765
2766         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2767         KVE_PATH.
2768
2769 2018-09-18  Tom Tromey  <tom@tromey.com>
2770
2771         * compile/compile-object-load.c (struct
2772         link_hash_table_cleanup_data): Add constructor and destructor.
2773         Use DISABLE_COPY_AND_ASSIGN.
2774         (~link_hash_table_cleanup_data): Rename from
2775         link_hash_table_free.  Now a destructor.
2776         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2777
2778 2018-09-18  Tom Tromey  <tom@tromey.com>
2779
2780         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2781         * compile/compile-object-load.c (struct munmap_list): Move to
2782         header file.
2783         (munmap_list::add): Rename from munmap_list_add; rewrite.
2784         (munmap_list::~munmap_list): Rename from munmap_list_free.
2785         (munmap_listp_free_cleanup): Remove.
2786         (compile_object_load): Update.
2787         * compile/compile-object-load.h (struct munmap_list): Move from
2788         compile-object-load.c.  Rewrite.
2789
2790 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2791
2792         * aarch64-tdep.c (pass_in_v): Use register size.
2793         (aarch64_extract_return_value): Likewise.
2794         (aarch64_store_return_value): Likewise.
2795
2796 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2797
2798         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2799         rlim_t.
2800
2801 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2802
2803         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2804         Fix short help line.
2805
2806 2018-09-17  Tom Tromey  <tom@tromey.com>
2807
2808         PR python/20445:
2809         * configure: Rebuild.
2810         * configure.ac: Conditionally use -DNDEBUG for Python.
2811
2812 2018-09-17  Tom Tromey  <tom@tromey.com>
2813
2814         * configure: Rebuild.
2815         * configure.ac: Use gmp as a library dependency when checking for
2816         mpfr.
2817
2818 2018-09-17  Pedro Alves  <palves@redhat.com>
2819
2820         * python/py-inferior.c (find_inferior_object): Delete.
2821
2822 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2823
2824         * compile/compile-cplus-types.c
2825         (compile_cplus_instance::enter_scope): Don't use new_scope after
2826         std::move.
2827
2828 2018-09-17  Tom Tromey  <tom@tromey.com>
2829
2830         * common/pathstuff.c (get_standard_cache_dir): Use
2831         ~/Library/Caches on macOS.
2832         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2833
2834 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2835
2836         PR python/23669
2837         * breakpoint.c (commands_cmd_element): New.
2838         (_initialize_breakpoint): Assign commands_cmd_element.
2839         * breakpoint.h (commands_cmd_element): New.
2840         * cli/cli-script.c (while_cmd_element, if_command,
2841         define_cmd_element): New.
2842         (command_name_equals): Remove.
2843         (process_next_line): Compare commands by pointer, not by name.
2844         (_initialize_cli_script): Assign the various cmd_list_element
2845         variables.
2846         * compile/compile.c (compile_cmd_element): New.
2847         (_initialize_compile): Assign compile_cmd_element.
2848         * compile/compile.h (compile_cmd_element): New.
2849         * guile/guile.c (guile_cmd_element): New.
2850         (install_gdb_commands): Assign guile_cmd_element.
2851         * guile/guile.h (guile_cmd_element): New.
2852         * python/python.c (python_cmd_element): New.
2853         (_initialize_python): Assign python_cmd_element.
2854         * python/python.h (python_cmd_element): New.
2855         * tracepoint.c (while_stepping_cmd_element): New.
2856         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2857         * tracepoint.h (while_stepping_cmd_element): New.
2858
2859 2018-09-17  Tom Tromey  <tom@tromey.com>
2860
2861         * infrun.c (save_infcall_suspend_state): Return
2862         infcall_suspend_state_up.
2863         (save_infcall_control_state): Return infcall_control_state_up.
2864         * inferior.h (save_infcall_suspend_state)
2865         (save_infcall_control_state): Declare later.  Return unique
2866         pointers.
2867
2868 2018-09-17  Tom Tromey  <tom@tromey.com>
2869
2870         * infrun.c (struct stop_context): Declare constructor,
2871         destructor, "changed" method.
2872         (stop_context::stop_context): Rename from save_stop_context.
2873         (stop_context::~stop_context): Rename from
2874         release_stop_context_cleanup.
2875         (normal_stop): Update.
2876         (stop_context::changed): Rename from stop_context_changed.  Return
2877         bool.
2878
2879 2018-09-17  Tom Tromey  <tom@tromey.com>
2880
2881         * inferior.h (struct infcall_suspend_state_deleter): New.
2882         (infcall_suspend_state_up): New typedef.
2883         (struct infcall_control_state_deleter): New.
2884         (infcall_control_state_up): New typedef.
2885         (make_cleanup_restore_infcall_suspend_state)
2886         (make_cleanup_restore_infcall_control_state): Don't declare.
2887         * infcall.c (call_function_by_hand_dummy): Update.
2888         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2889         (make_cleanup_restore_infcall_suspend_state): Remove.
2890         (do_restore_infcall_control_state_cleanup)
2891         (make_cleanup_restore_infcall_control_state): Remove.
2892
2893 2018-09-17  Tom Tromey  <tom@tromey.com>
2894
2895         * gdbthread.h (struct thread_control_state): Add initializer.
2896         (class thread_info) <control>: Remove initializer.
2897         * inferior.h (struct inferior_control_state): Add initializer.
2898         (class inferior) <control>: Remove initializer.
2899         (exit_inferior_1): Update.
2900         * infrun.c (struct infcall_control_state): Add constructors.
2901         (save_infcall_control_state): Use new.
2902         (restore_infcall_control_state, discard_infcall_control_state):
2903         Use delete.
2904
2905 2018-09-17  Tom Tromey  <tom@tromey.com>
2906
2907         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2908         unique_ptr.
2909         <siginfo_data>: Now a unique_xmalloc_ptr.
2910         (save_infcall_suspend_state, restore_infcall_suspend_state)
2911         (discard_infcall_suspend_state)
2912         (get_infcall_suspend_state_regcache): Update.
2913
2914 2018-09-17  Tom Tromey  <tom@tromey.com>
2915
2916         * gdbthread.h (struct thread_suspend_state): Add initializers.
2917         (class thread_info) <suspend>: Remove initializer.
2918         * infrun.c (struct infcall_suspend_state): Add initializers.
2919         (save_infcall_suspend_state): Use new.
2920         (discard_infcall_suspend_state): Use delete.
2921
2922 2018-09-16  Tom Tromey  <tom@tromey.com>
2923
2924         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2925         Remove.
2926         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2927         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2928         (py_varobj_iter_new): Likewise.
2929         (py_varobj_get_iterator): Use gdbpy_ref.
2930
2931 2018-09-16  Tom Tromey  <tom@tromey.com>
2932
2933         * python/py-threadevent.c (py_get_event_thread): Simplify.
2934         * python/py-inferior.c (infpy_thread_from_thread_handle):
2935         Return immediately after calling thread_to_thread_object.  Use
2936         Py_RETURN_NONE.
2937         (thread_to_thread_object): Set the exception on a NULL return.
2938
2939 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2940
2941         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2942
2943 2018-09-16  Tom Tromey  <tom@tromey.com>
2944
2945         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2946         Remove.
2947
2948 2018-09-16  Tom Tromey  <tom@tromey.com>
2949
2950         * python/python-internal.h (thread_to_thread_object): Change
2951         return type.
2952         * python/py-inferior.c (thread_to_thread_object): Return a new
2953         reference.
2954         (infpy_thread_from_thread_handle): Update.
2955         * python/py-infthread.c (gdbpy_selected_thread): Update.
2956         * python/py-stopevent.c (create_stop_event_object): Update.
2957         * python/py-threadevent.c (py_get_event_thread): Return a new
2958         reference.
2959         (py_get_event_thread): Update.
2960         * python/py-event.h (py_get_event_thread): Change return type.
2961         * python/py-continueevent.c (create_continue_event_object):
2962         Update.
2963
2964 2018-09-16  Tom Tromey  <tom@tromey.com>
2965
2966         * python/py-progspace.c (pspy_get_objfiles): Update.
2967         * python/python-internal.h (objfile_to_objfile_object): Change
2968         return type.
2969         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2970         Update.
2971         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2972         Update.
2973         * python/python.c (gdbpy_get_current_objfile): Update.
2974         (gdbpy_objfiles): Update.
2975         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2976         Update.
2977         (objfile_to_objfile_object): Return a new reference.
2978         * python/py-symtab.c (stpy_get_objfile): Update.
2979         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2980         Update.
2981
2982 2018-09-16  Tom Tromey  <tom@tromey.com>
2983
2984         * python/py-inferior.c (infpy_get_progspace): Update.
2985         * python/python-internal.h (pspace_to_pspace_object): Change
2986         return type.
2987         * python/py-newobjfileevent.c
2988         (create_clear_objfiles_event_object): Update.
2989         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2990         Update.
2991         * python/python.c (gdbpy_get_current_progspace): Update.
2992         (gdbpy_progspaces): Update.
2993         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2994         reference.
2995         * python/py-objfile.c (objfpy_get_progspace): Update.
2996         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2997         Update.
2998
2999 2018-09-16  Tom Tromey  <tom@tromey.com>
3000
3001         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3002         (solib_name, block_for_pc, find_pc_line): New functions.
3003         (execute_unwinders): Update.
3004         * python/py-block.c (gdbpy_block_for_pc): Remove.
3005         * python/py-inferior.c (infpy_get_progspace): New function.
3006         (inferior_object_getset) <progspace>: Add.
3007         * python/py-progspace.c (pspy_objfiles): Rewrite.
3008         (pspy_solib_name, pspy_block_for_pc)
3009         (pspy_find_pc_line, pspy_is_valid): New functions.
3010         (progspace_object_methods): Add entries for solib_name,
3011         block_for_pc, find_pc_line, is_valid.
3012         * python/python-internal.h (gdbpy_block_for_pc)
3013         (build_objfiles_list): Don't declare.
3014         * python/python.c: Don't include solib.h.
3015         (gdbpy_solib_name, gdbpy_find_pc_line)
3016         (gdbpy_get_current_progspace, build_objfiles_list)
3017         (gdbpy_objfiles): Remove.
3018         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3019         solib_name, find_pc_line>: Remove entries.
3020
3021 2018-09-16  Tom Tromey  <tom@tromey.com>
3022
3023         * top.c (new_ui_command): Use GNU style for metasyntactic
3024         variables.
3025         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3026         variables.
3027         * maint.c (maintenance_translate_address): Remove "<>" around
3028         text.
3029         * interps.c (interpreter_exec_cmd): Use GNU style for
3030         metasyntactic variables.
3031         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3032         metasyntactic variables.
3033         * tracepoint.c (tfind_range_command): Use GNU style for
3034         metasyntactic variables.
3035         (tfind_outside_command): Likewise.
3036         (_initialize_tracepoint): Likewise.
3037         * remote.c (extended_remote_target::create_inferior): Use GNU
3038         style for metasyntactic variables.
3039         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3040         metasyntactic variables.
3041         (adi_assign_command): Likewise.
3042
3043 2018-09-16  Tom Tromey  <tom@tromey.com>
3044
3045         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3046         metasyntactic variables.  Print message if no disassembler options
3047         are available.
3048
3049 2018-09-15  Tom Tromey  <tom@tromey.com>
3050
3051         * infcmd.c (get_inferior_args): Return const char *.
3052         * inferior.h (get_inferior_args): Return type now const.
3053         * linux-tdep.c (linux_fill_prpsinfo): Update.
3054         * procfs.c (procfs_target::make_corefile_notes): Update.
3055
3056 2018-09-07  Tom Tromey  <tom@tromey.com>
3057
3058         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3059         inside the TRY.
3060
3061 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3062
3063         * nios2-tdep.c (nios2_type_align): New.
3064         (nios2_gdb_arch_init): Install type_align hook.
3065
3066 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3067
3068         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3069         type that is neither object file owned, nor gdbarch owned.
3070         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3071         gdbarch is non-NULL.
3072         (alloc_type_instance): Allocate non-objfile owned types on the
3073         gdbarch obstack.
3074         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3075         using TYPE_ALLOC to ensure memory is allocated on the correct
3076         obstack.
3077         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3078         obstack, or the gdbarch obstack.
3079         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3080
3081 2018-09-14  Tom Tromey  <tom@tromey.com>
3082
3083         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3084         block.
3085
3086 2018-09-14  Tom Tromey  <tom@tromey.com>
3087
3088         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3089
3090 2018-09-13  Tom Tromey  <tom@tromey.com>
3091
3092         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3093         static.
3094
3095 2018-09-13  Tom Tromey  <tom@tromey.com>
3096
3097         * exec.c (try_open_exec_file): Use std::string.
3098
3099 2018-09-13  Tom Tromey  <tom@tromey.com>
3100
3101         * utils.h (gdb_bfd_errmsg): Return std::string.
3102         * exec.c (exec_file_attach): Update.
3103         * compile/compile-object-load.c (compile_object_load): Update.
3104         * utils.c (gdb_bfd_errmsg): Return std::string.
3105
3106 2018-09-13  Tom Tromey  <tom@tromey.com>
3107
3108         * procfs.c (struct procinfo_deleter): New.
3109         (procinfo_up): New typedef.
3110         (do_destroy_procinfo_cleanup): Remove.
3111         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3112
3113 2018-09-13  Tom Tromey  <tom@tromey.com>
3114
3115         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3116
3117 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3118 2018-09-13  Tom Tromey  <tom@tromey.com>
3119
3120         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3121         (pspy_get_objfiles): New function.
3122         (progspace_object_methods): New.
3123         (pspace_object_type): Add tp_methods callback.
3124         * python/python-internal.h (build_objfiles_list): New
3125         declaration.
3126         * python/python.c (build_objfiles_list): New function.
3127         (gdbpy_objfiles): Implement using build_objfiles_list.
3128         * NEWS: Mention the Progspace.objfiles method.
3129
3130 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3131
3132         * python/py-inferior.c (infpy_get_progspace): New function.
3133         (inferior_object_getset): Add progspace property.
3134         * NEWS: Mention the new property.
3135
3136 2018-09-13  Tom Tromey  <tom@tromey.com>
3137
3138         PR rust/23650:
3139         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3140
3141 2018-09-13  Tom Tromey  <tom@tromey.com>
3142
3143         PR rust/23626:
3144         * rust-lang.c (rust_enum_variant): Now static.
3145         (rust_empty_enum_p): New function.
3146         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3147         Handle empty enum.
3148
3149 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3150
3151         * python/py-inferior.c (infpy_repr): New.
3152         (inferior_object_type): Register infpy_repr.
3153         * python/py-objfile.c (objfpy_repr): New.
3154         (objfile_object_type): Register objfpy_repr.
3155
3156 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3157
3158         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3159
3160 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3161
3162         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3163         typo.
3164
3165 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3166
3167         * common/common-utils.c: Don't include '<sys/stat.h>'.
3168         (is_regular_file): Move to...
3169         * common/filestuff.c (is_regular_file): ... here.
3170         * common/common-utils.h (is_regular_file): Move to...
3171         * common/filestuff.h (is_regular_file): ... here.
3172
3173 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3174
3175         * skip.c (debug_skip): New variable.
3176         (skiplist_entry::do_skip_file_p): Add debug output.
3177         (skiplist_entry::do_skip_gfile_p): Likewise.
3178         (skiplist_entry::skip_function_p): Likewise.
3179         (_initialize_step_skip): Create debug command.
3180         * NEWS: Mention set/show debug skip.
3181
3182 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3183
3184         * darwin-nat.c (should_disable_startup_with_shell):
3185         New function.
3186         (darwin_nat_target::create_inferior): Add call.
3187
3188 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3189
3190         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3191         inf_port, msg_state>: Initialize.
3192         (struct darwin_thread_info) <signaled, single_step>: Change
3193         type and initialize.
3194         (struct darwin_thread_info) <event>: Initialize.
3195
3196 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3197
3198         PR gdb/23555
3199         PR gdb/23558
3200         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3201         guesses.
3202
3203 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3204
3205         Revert:
3206         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3207
3208         PR gdb/23555
3209         PR gdb/23558
3210         * gnulib/aclocal.m4: Regenerate.
3211         * gnulib/config.in: Regenerate.
3212         * gnulib/configure: Regenerate.
3213         * gnulib/import/Makefile.am: Update.
3214         * gnulib/import/Makefile.in: Update.
3215         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3216         * gnulib/import/_Noreturn.h: ... this.
3217         * gnulib/import/alloca.in.h: Update.
3218         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3219         * gnulib/import/arg-nonnull.h: ... this.
3220         * gnulib/import/assure.h: Update.
3221         * gnulib/import/at-func.c: Update.
3222         * gnulib/import/basename-lgpl.c: Update.
3223         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3224         * gnulib/import/c++defs.h: ... this.
3225         * gnulib/import/canonicalize-lgpl.c: Update.
3226         * gnulib/import/cdefs.h: Update.
3227         * gnulib/import/chdir-long.c: Update.
3228         * gnulib/import/chdir-long.h: Update.
3229         * gnulib/import/cloexec.c: Update.
3230         * gnulib/import/cloexec.h: Update.
3231         * gnulib/import/close.c: Update.
3232         * gnulib/import/closedir.c: Update.
3233         * gnulib/import/config.charset: Update.
3234         * gnulib/import/dirent-private.h: Update.
3235         * gnulib/import/dirent.in.h: Update.
3236         * gnulib/import/dirfd.c: Update.
3237         * gnulib/import/dirname-lgpl.c: Update.
3238         * gnulib/import/dirname.h: Update.
3239         * gnulib/import/dosname.h: Update.
3240         * gnulib/import/dup-safer-flag.c: Update.
3241         * gnulib/import/dup-safer.c: Update.
3242         * gnulib/import/dup.c: Update.
3243         * gnulib/import/dup2.c: Update.
3244         * gnulib/import/errno.in.h: Update.
3245         * gnulib/import/error.c: Update.
3246         * gnulib/import/error.h: Update.
3247         * gnulib/import/exitfail.c: Update.
3248         * gnulib/import/exitfail.h: Update.
3249         * gnulib/import/extra/update-copyright: Update.
3250         * gnulib/import/fchdir.c: Update.
3251         * gnulib/import/fcntl.c: Update.
3252         * gnulib/import/fcntl.in.h: Update.
3253         * gnulib/import/fd-hook.c: Update.
3254         * gnulib/import/fd-hook.h: Update.
3255         * gnulib/import/fd-safer-flag.c: Update.
3256         * gnulib/import/fd-safer.c: Update.
3257         * gnulib/import/fdopendir.c: Update.
3258         * gnulib/import/filename.h: Update.
3259         * gnulib/import/filenamecat-lgpl.c: Update.
3260         * gnulib/import/filenamecat.h: Update.
3261         * gnulib/import/flexmember.h: Update.
3262         * gnulib/import/float+.h: Update.
3263         * gnulib/import/float.c: Update.
3264         * gnulib/import/float.in.h: Update.
3265         * gnulib/import/fnmatch.c: Update.
3266         * gnulib/import/fnmatch.in.h: Update.
3267         * gnulib/import/fnmatch_loop.c: Update.
3268         * gnulib/import/fpucw.h: Update.
3269         * gnulib/import/frexp.c: Update.
3270         * gnulib/import/frexpl.c: Update.
3271         * gnulib/import/fstat.c: Update.
3272         * gnulib/import/fstatat.c: Update.
3273         * gnulib/import/getcwd-lgpl.c: Update.
3274         * gnulib/import/getcwd.c: Update.
3275         * gnulib/import/getdtablesize.c: Update.
3276         * gnulib/import/getlogin_r.c: Update.
3277         * gnulib/import/getprogname.c: Update.
3278         * gnulib/import/getprogname.h: Update.
3279         * gnulib/import/gettext.h: Update.
3280         * gnulib/import/gettimeofday.c: Update.
3281         * gnulib/import/glob-libc.h: Update.
3282         * gnulib/import/glob.c: Update.
3283         * gnulib/import/glob.in.h: Update.
3284         * gnulib/import/glob_internal.h: Update.
3285         * gnulib/import/glob_pattern_p.c: Update.
3286         * gnulib/import/globfree.c: Update.
3287         * gnulib/import/hard-locale.c: Update.
3288         * gnulib/import/hard-locale.h: Update.
3289         * gnulib/import/intprops.h: Update.
3290         * gnulib/import/inttypes.in.h: Update.
3291         * gnulib/import/isnan.c: Update.
3292         * gnulib/import/isnand-nolibm.h: Update.
3293         * gnulib/import/isnand.c: Update.
3294         * gnulib/import/isnanl-nolibm.h: Update.
3295         * gnulib/import/isnanl.c: Update.
3296         * gnulib/import/itold.c: Update.
3297         * gnulib/import/libc-config.h: Update.
3298         * gnulib/import/limits.in.h: Update.
3299         * gnulib/import/localcharset.c: Update.
3300         * gnulib/import/localcharset.h: Update.
3301         * gnulib/import/localtime-buffer.c: Update.
3302         * gnulib/import/localtime-buffer.h: Update.
3303         * gnulib/import/lstat.c: Update.
3304         * gnulib/import/m4/00gnulib.m4: Update.
3305         * gnulib/import/m4/__inline.m4: Update.
3306         * gnulib/import/m4/absolute-header.m4: Update.
3307         * gnulib/import/m4/alloca.m4: Update.
3308         * gnulib/import/m4/builtin-expect.m4: Update.
3309         * gnulib/import/m4/canonicalize.m4: Update.
3310         * gnulib/import/m4/chdir-long.m4: Update.
3311         * gnulib/import/m4/close.m4: Update.
3312         * gnulib/import/m4/closedir.m4: Update.
3313         * gnulib/import/m4/configmake.m4: Update.
3314         * gnulib/import/m4/d-ino.m4: Update.
3315         * gnulib/import/m4/d-type.m4: Update.
3316         * gnulib/import/m4/dirent_h.m4: Update.
3317         * gnulib/import/m4/dirfd.m4: Update.
3318         * gnulib/import/m4/dirname.m4: Update.
3319         * gnulib/import/m4/double-slash-root.m4: Update.
3320         * gnulib/import/m4/dup.m4: Update.
3321         * gnulib/import/m4/dup2.m4: Update.
3322         * gnulib/import/m4/eealloc.m4: Update.
3323         * gnulib/import/m4/environ.m4: Update.
3324         * gnulib/import/m4/errno_h.m4: Update.
3325         * gnulib/import/m4/error.m4: Update.
3326         * gnulib/import/m4/exponentd.m4: Update.
3327         * gnulib/import/m4/exponentl.m4: Update.
3328         * gnulib/import/m4/extensions.m4: Update.
3329         * gnulib/import/m4/extern-inline.m4: Update.
3330         * gnulib/import/m4/fchdir.m4: Update.
3331         * gnulib/import/m4/fcntl-o.m4: Update.
3332         * gnulib/import/m4/fcntl.m4: Update.
3333         * gnulib/import/m4/fcntl_h.m4: Update.
3334         * gnulib/import/m4/fdopendir.m4: Update.
3335         * gnulib/import/m4/filenamecat.m4: Update.
3336         * gnulib/import/m4/flexmember.m4: Update.
3337         * gnulib/import/m4/float_h.m4: Update.
3338         * gnulib/import/m4/fnmatch.m4: Update.
3339         * gnulib/import/m4/fnmatch_h.m4: Update.
3340         * gnulib/import/m4/fpieee.m4: Update.
3341         * gnulib/import/m4/frexp.m4: Update.
3342         * gnulib/import/m4/frexpl.m4: Update.
3343         * gnulib/import/m4/fstat.m4: Update.
3344         * gnulib/import/m4/fstatat.m4: Update.
3345         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3346         * gnulib/import/m4/getcwd-path-max.m4: Update.
3347         * gnulib/import/m4/getcwd.m4: Update.
3348         * gnulib/import/m4/getdtablesize.m4: Update.
3349         * gnulib/import/m4/getlogin.m4: Update.
3350         * gnulib/import/m4/getlogin_r.m4: Update.
3351         * gnulib/import/m4/getpagesize.m4: Update.
3352         * gnulib/import/m4/getprogname.m4: Update.
3353         * gnulib/import/m4/gettimeofday.m4: Update.
3354         * gnulib/import/m4/glibc21.m4: Update.
3355         * gnulib/import/m4/glob.m4: Update.
3356         * gnulib/import/m4/glob_h.m4: Update.
3357         * gnulib/import/m4/gnulib-cache.m4: Update.
3358         * gnulib/import/m4/gnulib-common.m4: Update.
3359         * gnulib/import/m4/gnulib-comp.m4: Update.
3360         * gnulib/import/m4/gnulib-tool.m4: Update.
3361         * gnulib/import/m4/hard-locale.m4: Update.
3362         * gnulib/import/m4/include_next.m4: Update.
3363         * gnulib/import/m4/inttypes-pri.m4: Update.
3364         * gnulib/import/m4/inttypes.m4: Update.
3365         * gnulib/import/m4/isnand.m4: Update.
3366         * gnulib/import/m4/isnanl.m4: Update.
3367         * gnulib/import/m4/largefile.m4: Update.
3368         * gnulib/import/m4/limits-h.m4: Update.
3369         * gnulib/import/m4/localcharset.m4: Update.
3370         * gnulib/import/m4/locale-fr.m4: Update.
3371         * gnulib/import/m4/locale-ja.m4: Update.
3372         * gnulib/import/m4/locale-zh.m4: Update.
3373         * gnulib/import/m4/localtime-buffer.m4: Update.
3374         * gnulib/import/m4/longlong.m4: Update.
3375         * gnulib/import/m4/lstat.m4: Update.
3376         * gnulib/import/m4/malloc.m4: Update.
3377         * gnulib/import/m4/malloca.m4: Update.
3378         * gnulib/import/m4/math_h.m4: Update.
3379         * gnulib/import/m4/mbrtowc.m4: Update.
3380         * gnulib/import/m4/mbsinit.m4: Update.
3381         * gnulib/import/m4/mbsrtowcs.m4: Update.
3382         * gnulib/import/m4/mbstate_t.m4: Update.
3383         * gnulib/import/m4/memchr.m4: Update.
3384         * gnulib/import/m4/memmem.m4: Update.
3385         * gnulib/import/m4/mempcpy.m4: Update.
3386         * gnulib/import/m4/memrchr.m4: Update.
3387         * gnulib/import/m4/mkdir.m4: Update.
3388         * gnulib/import/m4/mkstemp.m4: Update.
3389         * gnulib/import/m4/mmap-anon.m4: Update.
3390         * gnulib/import/m4/mode_t.m4: Update.
3391         * gnulib/import/m4/msvc-inval.m4: Update.
3392         * gnulib/import/m4/msvc-nothrow.m4: Update.
3393         * gnulib/import/m4/multiarch.m4: Update.
3394         * gnulib/import/m4/nocrash.m4: Update.
3395         * gnulib/import/m4/off_t.m4: Update.
3396         * gnulib/import/m4/onceonly.m4: Update.
3397         * gnulib/import/m4/open-cloexec.m4: Update.
3398         * gnulib/import/m4/open.m4: Update.
3399         * gnulib/import/m4/openat.m4: Update.
3400         * gnulib/import/m4/opendir.m4: Update.
3401         * gnulib/import/m4/pathmax.m4: Update.
3402         * gnulib/import/m4/rawmemchr.m4: Update.
3403         * gnulib/import/m4/readdir.m4: Update.
3404         * gnulib/import/m4/readlink.m4: Update.
3405         * gnulib/import/m4/realloc.m4: Update.
3406         * gnulib/import/m4/rename.m4: Update.
3407         * gnulib/import/m4/rewinddir.m4: Update.
3408         * gnulib/import/m4/rmdir.m4: Update.
3409         * gnulib/import/m4/save-cwd.m4: Update.
3410         * gnulib/import/m4/secure_getenv.m4: Update.
3411         * gnulib/import/m4/setenv.m4: Update.
3412         * gnulib/import/m4/signal_h.m4: Update.
3413         * gnulib/import/m4/ssize_t.m4: Update.
3414         * gnulib/import/m4/stat-time.m4: Update.
3415         * gnulib/import/m4/stat.m4: Update.
3416         * gnulib/import/m4/std-gnu11.m4: Update.
3417         * gnulib/import/m4/stdbool.m4: Update.
3418         * gnulib/import/m4/stddef_h.m4: Update.
3419         * gnulib/import/m4/stdint.m4: Update.
3420         * gnulib/import/m4/stdio_h.m4: Update.
3421         * gnulib/import/m4/stdlib_h.m4: Update.
3422         * gnulib/import/m4/strchrnul.m4: Update.
3423         * gnulib/import/m4/strdup.m4: Update.
3424         * gnulib/import/m4/strerror.m4: Update.
3425         * gnulib/import/m4/string_h.m4: Update.
3426         * gnulib/import/m4/strstr.m4: Update.
3427         * gnulib/import/m4/strtok_r.m4: Update.
3428         * gnulib/import/m4/sys_socket_h.m4: Update.
3429         * gnulib/import/m4/sys_stat_h.m4: Update.
3430         * gnulib/import/m4/sys_time_h.m4: Update.
3431         * gnulib/import/m4/sys_types_h.m4: Update.
3432         * gnulib/import/m4/tempname.m4: Update.
3433         * gnulib/import/m4/time_h.m4: Update.
3434         * gnulib/import/m4/unistd-safer.m4: Update.
3435         * gnulib/import/m4/unistd_h.m4: Update.
3436         * gnulib/import/m4/warn-on-use.m4: Update.
3437         * gnulib/import/m4/wchar_h.m4: Update.
3438         * gnulib/import/m4/wchar_t.m4: Update.
3439         * gnulib/import/m4/wctype_h.m4: Update.
3440         * gnulib/import/m4/wint_t.m4: Update.
3441         * gnulib/import/malloc.c: Update.
3442         * gnulib/import/malloc/scratch_buffer.h: Update.
3443         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3444         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3445         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3446         * gnulib/import/malloca.c: Update.
3447         * gnulib/import/malloca.h: Update.
3448         * gnulib/import/malloca.valgrind: Update.
3449         * gnulib/import/math.in.h: Update.
3450         * gnulib/import/mbrtowc.c: Update.
3451         * gnulib/import/mbsinit.c: Update.
3452         * gnulib/import/mbsrtowcs-impl.h: Update.
3453         * gnulib/import/mbsrtowcs-state.c: Update.
3454         * gnulib/import/mbsrtowcs.c: Update.
3455         * gnulib/import/memchr.c: Update.
3456         * gnulib/import/memmem.c: Update.
3457         * gnulib/import/mempcpy.c: Update.
3458         * gnulib/import/memrchr.c: Update.
3459         * gnulib/import/mkdir.c: Update.
3460         * gnulib/import/mkstemp.c: Update.
3461         * gnulib/import/msvc-inval.c: Update.
3462         * gnulib/import/msvc-inval.h: Update.
3463         * gnulib/import/msvc-nothrow.c: Update.
3464         * gnulib/import/msvc-nothrow.h: Update.
3465         * gnulib/import/open.c: Update.
3466         * gnulib/import/openat-die.c: Update.
3467         * gnulib/import/openat-priv.h: Update.
3468         * gnulib/import/openat-proc.c: Update.
3469         * gnulib/import/openat.c: Update.
3470         * gnulib/import/openat.h: Update.
3471         * gnulib/import/opendir.c: Update.
3472         * gnulib/import/pathmax.h: Update.
3473         * gnulib/import/pipe-safer.c: Update.
3474         * gnulib/import/rawmemchr.c: Update.
3475         * gnulib/import/readdir.c: Update.
3476         * gnulib/import/readlink.c: Update.
3477         * gnulib/import/realloc.c: Update.
3478         * gnulib/import/ref-add.sin: Update.
3479         * gnulib/import/ref-del.sin: Update.
3480         * gnulib/import/rename.c: Update.
3481         * gnulib/import/rewinddir.c: Update.
3482         * gnulib/import/rmdir.c: Update.
3483         * gnulib/import/same-inode.h: Update.
3484         * gnulib/import/save-cwd.c: Update.
3485         * gnulib/import/save-cwd.h: Update.
3486         * gnulib/import/scratch_buffer.h: Update.
3487         * gnulib/import/secure_getenv.c: Update.
3488         * gnulib/import/setenv.c: Update.
3489         * gnulib/import/signal.in.h: Update.
3490         * gnulib/import/stat-time.c: Update.
3491         * gnulib/import/stat-time.h: Update.
3492         * gnulib/import/stat-w32.c: Update.
3493         * gnulib/import/stat-w32.h: Update.
3494         * gnulib/import/stat.c: Update.
3495         * gnulib/import/stdbool.in.h: Update.
3496         * gnulib/import/stddef.in.h: Update.
3497         * gnulib/import/stdint.in.h: Update.
3498         * gnulib/import/stdio.in.h: Update.
3499         * gnulib/import/stdlib.in.h: Update.
3500         * gnulib/import/str-two-way.h: Update.
3501         * gnulib/import/strchrnul.c: Update.
3502         * gnulib/import/strdup.c: Update.
3503         * gnulib/import/streq.h: Update.
3504         * gnulib/import/strerror-override.c: Update.
3505         * gnulib/import/strerror-override.h: Update.
3506         * gnulib/import/strerror.c: Update.
3507         * gnulib/import/string.in.h: Update.
3508         * gnulib/import/stripslash.c: Update.
3509         * gnulib/import/strnlen1.c: Update.
3510         * gnulib/import/strnlen1.h: Update.
3511         * gnulib/import/strstr.c: Update.
3512         * gnulib/import/strtok_r.c: Update.
3513         * gnulib/import/sys_stat.in.h: Update.
3514         * gnulib/import/sys_time.in.h: Update.
3515         * gnulib/import/sys_types.in.h: Update.
3516         * gnulib/import/tempname.c: Update.
3517         * gnulib/import/tempname.h: Update.
3518         * gnulib/import/time.in.h: Update.
3519         * gnulib/import/unistd--.h: Update.
3520         * gnulib/import/unistd-safer.h: Update.
3521         * gnulib/import/unistd.in.h: Update.
3522         * gnulib/import/unsetenv.c: Update.
3523         * gnulib/import/verify.h: Update.
3524         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3525         * gnulib/import/wchar.in.h: Update.
3526         * gnulib/import/wctype.in.h: Update.
3527         * gnulib/import/xalloc-oversized.h: Update.
3528         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3529         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3530
3531 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3532
3533         * record-btrace.c (get_thread_current_frame): Remove
3534         old_inferior_ptid.
3535
3536 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3537
3538         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3539         with check_tag to 1 if and only if the type is tagged and the
3540         component being searched cannot been found in the current
3541         view. Otherwise, always call ada_to_fixed_type with
3542         check_tag to 0.
3543
3544 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3545
3546         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3547         declaration.
3548         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3549         * ada-varobj.c (ada_varobj_get_number_of_children,
3550         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3551
3552 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3553
3554         * ada-valprint.c (ada_value_print): Use type instead of
3555         enclosing type.
3556
3557 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3558
3559         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3560         an array of access to unconstrained array.
3561
3562 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3563
3564         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3565         (ada_check_typedef): Use it.
3566
3567 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3568
3569         * ada-varobj.c (ada_varobj_describe_struct_child)
3570         (ada_varobj_describe_child): Handle union case like struct one.
3571
3572 2018-09-10  Tom Tromey  <tom@tromey.com>
3573
3574         PR python/18380:
3575         * python/python.c (_initialize_python): Make example in "python"
3576         help work in Python 3.
3577
3578 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3579
3580         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3581         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3582         $(EXEEXT) to the script, as it is not a program.
3583
3584 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3585
3586         * python/py-prettyprint.c (pretty_print_one_value): Return
3587         gdbpy_ref<>.
3588         (print_string_repr): Adjust.
3589         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3590         * python/python-internal.h (apply_varobj_pretty_printer): Return
3591         gdbpy_ref<>.
3592         * varobj.c (varobj_value_get_print_value): Adjust.
3593
3594 2018-09-08  Tom Tromey  <tom@tromey.com>
3595
3596         PR python/16047:
3597         * python/py-prettyprint.c (pretty_print_one_value): Check for
3598         to_string method.
3599
3600 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3601
3602         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3603         replace_operator_with_call.
3604
3605 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3606
3607         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3608
3609 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3610
3611         * ada-typeprint.c (print_range): Print the bounds using TYPE
3612         rather than its TYPE_TARGET_TYPE.
3613
3614 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3615
3616         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3617         call to ada_to_fixed_value_create.
3618
3619 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3620
3621         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3622
3623 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3624
3625         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3626         by calls to error.
3627
3628 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3629
3630         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3631         Move update of loop variable "fi".
3632
3633 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3634
3635         * ada-lang.c (value_assign_to_component): In the case of
3636         big-endian targets, extract the bits of the given VAL
3637         using an src_offset of zero if container is not a scalar.
3638
3639 2018-09-06  Simon Ser  <contact@emersion.fr>
3640
3641         PR gdb/23105
3642         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3643         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3644         * fbsd-tdep.c (fbsd_make_note_desc): New.
3645         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3646         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3647         * target.h (enum target_object) Add FreeBSD-specific
3648         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3649
3650 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3651
3652         * compile/compile-c.h (generate_c_for_variable_locations):
3653         Change reference to pointer.
3654         * compile/compile-c-support.c (compile_program) <compute>:
3655         Likewise.
3656         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3657         (generate_c_for_for_one_variable): Likewise
3658         (generate_c_for_variable_locations): Likewise
3659         * compile/compile-c-types.c (compile_c_instance::convert_type):
3660         Likewise
3661         * compile/compile-cplus-symbols.c (convert_one_symbol):
3662         std::move the scope passed to enter_scope.
3663         * compile/compile-cplus-types.c
3664         (compile_cplus_instance::enter_scope): Make parameter
3665         rvalue-reference.
3666         (compile_cplus_instance::new_scope): Change reference to
3667         pointer.
3668         (compile_cplus_instance::convert_type): Likewise
3669         (compile_cplus_convert_typedef): std::move the scope passed to
3670         enter_scope.
3671         (compile_cplus_convert_struct_or_union): Likewise.
3672         (compile_cplus_convert_enum): Likewise.
3673         (compile_cplus_convert_namespace): Likewise.
3674         * compile/compile-cplus.h (compile_cplus_instance)
3675         <enter_scope>: Make parameter rvalue-reference.
3676         * compile/compile-internal.h (compile_instance)
3677         <get_cached_type>: Likewise
3678         * compile/compile-loc2c.c (push): Likewise
3679         (pushf): Likewise
3680         (unary): Likewise
3681         (binary): Likewise
3682         (print_label): Likewise
3683         (pushf_register_address): Likewise
3684         (pushf_register): Likewise
3685         (do_compile_dwarf_expr_to_c): Likewise
3686         (compile_dwarf_expr_to_c): Likewise
3687         (compile_dwarf_bounds_to_c): Likewise
3688         * compile/compile.c (compile_instance::get_cached_type):
3689         Likewise
3690         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3691         (compile_dwarf_bounds_to_c): Likewise
3692         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3693         (dwarf2_compile_property_to_c): Likewise
3694         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3695         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3696         Likewise
3697
3698 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3699
3700         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3701         * tui/tui-data.c (init_content_element): Don't initialize it.
3702
3703 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3704
3705         * tui/tui-data.h (struct tui_win_info)
3706         <detail::opaque>: Remove.
3707         * tui/tui-data.c (init_win_info): Remove assignment.
3708
3709 2018-09-05  Tom Tromey  <tom@tromey.com>
3710
3711         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3712         -Wformat-nonliteral.
3713         * target-float.c (host_float_ops<T>::to_string)
3714         (host_float_ops<T>::from_string): Use
3715         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3716         * configure: Rebuild.
3717
3718 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3719
3720         * printcmd.c (printf_c_string): Use
3721         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3722         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3723
3724 2018-09-05  Tom Tromey  <tom@tromey.com>
3725
3726         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3727
3728 2018-09-05  Tom de Vries  <tdevries@suse.de>
3729
3730         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3731         with resolve_abstract_p == true.
3732         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3733         defaulting to false. Propagate resolve_abstract_p to
3734         dwarf2_fetch_die_loc_sect_off.
3735         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3736         parameter, defaulting to false.
3737         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3738         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3739         parameter.
3740         * dwarf2read.h (struct die_info): Forward-declare.
3741         (die_info_ptr): New typedef.
3742         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3743
3744 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3745
3746         GDB 8.2 released.
3747
3748 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3749             Pedro Alves  <palves@redhat.com>
3750
3751         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3752         "aclocal-m4-deps.mk".  Include file here.
3753         $(srcdir)/aclocal.m4: Add "configure.ac".
3754         * gnulib/aclocal-m4-deps.mk: New file.
3755         * gnulib/update-gnulib.sh: Automatically update
3756         "aclocal-m4-deps.mk".
3757
3758 2018-09-04  Tom Tromey  <tom@tromey.com>
3759
3760         * configure: Rebuild.
3761         * configure.ac: Remove multi-ice code.
3762
3763 2018-09-04  Tom Tromey  <tom@tromey.com>
3764
3765         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3766         (ada-exp.o): Update.
3767
3768 2018-09-04  Tom Tromey  <tom@tromey.com>
3769
3770         * Makefile.in (printcmd.o, target-float.o): Remove.
3771         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3772
3773 2018-09-04  Tom Tromey  <tom@tromey.com>
3774
3775         * gnulib/Makefile.in: Remove obsolete comment.
3776         * Makefile.in: Remove obsolete comment.
3777
3778 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3779
3780         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3781         line with '+'.
3782
3783 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3784
3785         * riscv-tdep.c: Add 'prologue-value.h' include.
3786         (struct riscv_unwind_cache): New struct.
3787         (riscv_debug_unwinder): New global.
3788         (riscv_scan_prologue): Update arguments, capture register details
3789         from prologue scan.
3790         (riscv_skip_prologue): Reformat arguments line, move end of
3791         prologue calculation into riscv_scan_prologue.
3792         (riscv_frame_cache): Update return type, create
3793         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3794         details.
3795         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3796         (riscv_frame_prev_register): Use the trad_frame within the
3797         riscv_unwind_cache.
3798         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3799         flag.
3800
3801 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3802
3803         * trad-frame.h (trad_frame_set_realreg): Declare.
3804         (trad_frame_set_addr): Declare.
3805         * trad-frame.c (trad_frame_set_realreg): Define new function.
3806         (trad_frame_set_addr): Define new function.
3807         (trad_frame_set_reg_realreg): Use new function.
3808         (trad_frame_set_reg_addr): Use new function.
3809
3810 2018-09-01  Keith Seitz  <keiths@redhat.com>
3811
3812         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3813         pulongest instead of "%lld".
3814         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3815         ATTRIBUTE_UNUSED.
3816
3817 2018-08-31  Tom Tromey  <tom@tromey.com>
3818
3819         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3820         variant part type.
3821
3822 2018-08-31  Pedro Alves  <palves@redhat.com>
3823
3824         * gdbarch.h: Regenerate.
3825
3826 2018-08-31  Pedro Alves  <palves@redhat.com>
3827
3828         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3829         * target.h (Hardware watchpoint interfaces): Describe
3830         continuable/steppable/non-steppable watchpoints.
3831         * gdbarch.h, gdbarch.c: Regenerate.
3832
3833 2018-08-31  Pedro Alves  <palves@redhat.com>
3834
3835         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3836         Delete.
3837         * s390-linux-nat.c
3838         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3839         * target.h (target_ops::have_continuable_watchpoint): Delete.
3840         (target_have_continuable_watchpoint): Delete.
3841         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3842         * target-delegates.c: Regenerate.
3843
3844 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3845
3846         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3847         the files present in "gnulib/import/m4/".
3848
3849 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3850
3851         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3852         c.sw, c.swsp, and c.sdsp.
3853
3854 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3855
3856         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3857         (riscv_read_misa_reg): Don't cache value read into inferior data.
3858         (riscv_new_inferior_data): Delete.
3859         (riscv_inferior_data_cleanup): Delete.
3860         (riscv_inferior_data): Delete.
3861         (riscv_invalidate_inferior_data): Delete.
3862         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3863
3864 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3865
3866         * compile/compile-cplus-types.c
3867         (compile_cplus_instance::leave_scope): Take the address of scope
3868         object.
3869         (compile_cplus_instance::convert_qualified_base): Compare quals
3870         to 0.
3871
3872 2018-08-30  Keith Seitz  <keiths@redhat.com>
3873
3874         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3875         Use "%s" and host_address_to_string instead of "%p" in printf.
3876
3877 2018-08-29  Keith Seitz  <keiths@redhat.com>
3878
3879         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3880         and compile-cplus-types.c.
3881         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3882         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3883         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3884         Declare.
3885         * compile/compile-c-support.c: Include compile-cplus.h.
3886         (load_libcompile): Templatize.
3887         (get_compile_context): "New" function.
3888         (c_get_compile_context): Use get_compile_context.
3889         (cplus_get_compile_context): New function.
3890         (cplus_push_user_expression, cplus_pop_user_expression)
3891         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3892         (cplus_compute_program): Define new structs/functions.
3893         * compile/compile-cplus-symmbols.c: New file.
3894         * compile/compile-cplus-types.c: New file.
3895         * compile/compile-cplus.h: New file.
3896         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3897         Declare.
3898         * compile/compile-object-load.c (get_out_value_type): Use
3899         strncmp_iw when comparing symbol names.
3900         (compile_object_load): Add mst_bss and mst_data.
3901         * compile/compile.c (_initialize_compile): Remove
3902         -Wno-implicit-function-declaration from `compile_args'.
3903         * compile/gcc-cp-plugin.h: New file.
3904         * NEWS: Mention C++ compile support and new debug options.
3905
3906 2018-08-29  Keith Seitz  <keiths@redhat.com>
3907
3908         * linespec.c (collect_info::add_symbol): Make virtual.
3909         (struct symbol_searcher_collect_info): New struct.
3910         (symbol_searcher::find_all_symbols): New method.
3911         * symtab.h (class symbol_searcher): New class.
3912
3913 2018-08-29  Keith Seitz  <keiths@redhat.com>
3914
3915         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3916         Change to vector of block_symbol.  Update all users.
3917         (struct collect_info) <symbols>: Likewise.
3918         (collect_info::add_symbol): Take block_symbol as argument.
3919         Update all callers.
3920         (decode_compound_collector) <m_symbols>: Change type to vector
3921         of block_symbol.  Update all users.
3922         (decode_compound_collector::operator ()): Change parameter type
3923         to block_symbol.
3924         (find_method, find_function_symbols, find_linespec_symbols)
3925         (find_label_symbols_in_block, find_label_symbols): Change symbol
3926         vectors to block_symbol vectors.
3927         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3928         block_symbol.
3929
3930 2018-08-29  Keith Seitz  <keiths@redhat.com>
3931
3932         * linespec.c (symbolp): Remove typedef and VEC definitions.
3933         (bound_minimal_symbol_d): Likewise.
3934
3935 2018-08-29  Keith Seitz  <keiths@redhat.com>
3936
3937         * linespec.c (decode_compound_collector::decode_compound_collector):
3938         Remove initialization for `m_symtabs'.
3939         (decode_compound_collector::release_symbols): Change return type
3940         to std::vector.  Update all callers.
3941         (class decode_compound_collector) <m_symbols>: Change type to
3942         std::vector.
3943         (lookup_prefix_sym): Change return type to std::vector.  Update all
3944         callers.
3945         (compare_symbols): Remove.
3946         (std_compare_symbols): Rename to `compare_symbols'.
3947         (find_method): Change `sym_classes' parameter to std::vector.
3948         Update all callers.  Use std::sort to sort sym_classes.
3949         (find_linespec_symbols): Remove cleanup.
3950
3951 2018-08-29  Keith Seitz  <keiths@redhat.com>
3952
3953         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3954         std::vector.  Update all users.
3955         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3956         (struct collect_info) <minimal_symbols>: Likewise.
3957         (compare_msymbols): Return bool.  Change parameters to const
3958         bound_minimal_symbol references.
3959         (find_method, find_function_symbols, find_linespec_symbols): Change
3960         `minsyms' parameter to std::vector.  Update all callers.
3961
3962 2018-08-29  Keith Seitz  <keiths@redhat.com>
3963
3964         * linespec.c (struct linespec) <label_symbols>: Change type to
3965         std::vector.  Update all users.
3966         (find_label_symbols_in_block): Change `result' parameter to
3967         std::vector.  Update all callers.
3968         (find_label_symbols): Return std::vector.  Update all callers.
3969
3970 2018-08-29  Keith Seitz  <keiths@redhat.com>
3971
3972         * linespec.c (struct linespec) <function_symbols>: Change type to
3973         std::vector.  Update all users.
3974         (struct collect_info) <function_symbols>: Likewise.
3975         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3976         (std_compare_symbols): New function.
3977         (find_method, find_function_symbols, find_linespec_symbols)
3978         (find_label_symbols_in_block): Change `symbols' parameter to
3979         std::vector.  Update all callers.
3980         (find_label_symbols): Likewise for `function_symbols' and
3981         `label_funcs_ret'.
3982
3983 2018-08-29  Keith Seitz  <keiths@redhat.com>
3984
3985         * linespec.c (symtab_vector_up): Define.
3986         (struct linespec) <file_symtabs>: Change type to std::vector *.
3987         Update all uses.
3988         (struct collect_info) <file_symtabs>: Likewise.
3989         (collect_symtabs_from_filename): Return symtab_vector_up.
3990         Update all callers.
3991         (decode_objc): Remove cleanup.
3992         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3993         (symtab_collector::release_symtabs): Return symtab_vector_up.
3994         Update all callers.
3995         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3996         Update all users.
3997         (collect_symtabs_from_filename, symtabs_from_filename): Return
3998         symtab_vector_up.  Update all callers.
3999
4000 2018-08-29  Tom Tromey  <tom@tromey.com>
4001
4002         * csky-tdep.c (csky_analyze_prologue): Use
4003         core_addr_to_string_nz.
4004
4005 2018-08-29  Tom Tromey  <tom@tromey.com>
4006
4007         * windows-nat.c (struct xlate_exception) <them>: Change type to
4008         DWORD.
4009         (xlate): Fix formatting.  Remove last entry.
4010         (struct xlate_exception, xlate): Comment out.
4011         (windows_nat_target::resume): Use ranged for.
4012
4013 2018-08-29  Jim Wilson  <jimw@sifive.com>
4014
4015         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4016         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4017         of NT_PRFPREG.
4018         (riscv_linux_nat_target::store_registers): Likewise.
4019
4020 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4021
4022         PR gdb/23555
4023         PR gdb/23558
4024         * gnulib/aclocal.m4: Regenerate.
4025         * gnulib/config.in: Regenerate.
4026         * gnulib/configure: Regenerate.
4027         * gnulib/import/Makefile.am: Update.
4028         * gnulib/import/Makefile.in: Update.
4029         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4030         * gnulib/import/_Noreturn.h: ... this.
4031         * gnulib/import/alloca.in.h: Update.
4032         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4033         * gnulib/import/arg-nonnull.h: ... this.
4034         * gnulib/import/assure.h: Update.
4035         * gnulib/import/at-func.c: Update.
4036         * gnulib/import/basename-lgpl.c: Update.
4037         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4038         * gnulib/import/c++defs.h: ... this.
4039         * gnulib/import/canonicalize-lgpl.c: Update.
4040         * gnulib/import/cdefs.h: Update.
4041         * gnulib/import/chdir-long.c: Update.
4042         * gnulib/import/chdir-long.h: Update.
4043         * gnulib/import/cloexec.c: Update.
4044         * gnulib/import/cloexec.h: Update.
4045         * gnulib/import/close.c: Update.
4046         * gnulib/import/closedir.c: Update.
4047         * gnulib/import/config.charset: Update.
4048         * gnulib/import/dirent-private.h: Update.
4049         * gnulib/import/dirent.in.h: Update.
4050         * gnulib/import/dirfd.c: Update.
4051         * gnulib/import/dirname-lgpl.c: Update.
4052         * gnulib/import/dirname.h: Update.
4053         * gnulib/import/dosname.h: Update.
4054         * gnulib/import/dup-safer-flag.c: Update.
4055         * gnulib/import/dup-safer.c: Update.
4056         * gnulib/import/dup.c: Update.
4057         * gnulib/import/dup2.c: Update.
4058         * gnulib/import/errno.in.h: Update.
4059         * gnulib/import/error.c: Update.
4060         * gnulib/import/error.h: Update.
4061         * gnulib/import/exitfail.c: Update.
4062         * gnulib/import/exitfail.h: Update.
4063         * gnulib/import/extra/update-copyright: Update.
4064         * gnulib/import/fchdir.c: Update.
4065         * gnulib/import/fcntl.c: Update.
4066         * gnulib/import/fcntl.in.h: Update.
4067         * gnulib/import/fd-hook.c: Update.
4068         * gnulib/import/fd-hook.h: Update.
4069         * gnulib/import/fd-safer-flag.c: Update.
4070         * gnulib/import/fd-safer.c: Update.
4071         * gnulib/import/fdopendir.c: Update.
4072         * gnulib/import/filename.h: Update.
4073         * gnulib/import/filenamecat-lgpl.c: Update.
4074         * gnulib/import/filenamecat.h: Update.
4075         * gnulib/import/flexmember.h: Update.
4076         * gnulib/import/float+.h: Update.
4077         * gnulib/import/float.c: Update.
4078         * gnulib/import/float.in.h: Update.
4079         * gnulib/import/fnmatch.c: Update.
4080         * gnulib/import/fnmatch.in.h: Update.
4081         * gnulib/import/fnmatch_loop.c: Update.
4082         * gnulib/import/fpucw.h: Update.
4083         * gnulib/import/frexp.c: Update.
4084         * gnulib/import/frexpl.c: Update.
4085         * gnulib/import/fstat.c: Update.
4086         * gnulib/import/fstatat.c: Update.
4087         * gnulib/import/getcwd-lgpl.c: Update.
4088         * gnulib/import/getcwd.c: Update.
4089         * gnulib/import/getdtablesize.c: Update.
4090         * gnulib/import/getlogin_r.c: Update.
4091         * gnulib/import/getprogname.c: Update.
4092         * gnulib/import/getprogname.h: Update.
4093         * gnulib/import/gettext.h: Update.
4094         * gnulib/import/gettimeofday.c: Update.
4095         * gnulib/import/glob-libc.h: Update.
4096         * gnulib/import/glob.c: Update.
4097         * gnulib/import/glob.in.h: Update.
4098         * gnulib/import/glob_internal.h: Update.
4099         * gnulib/import/glob_pattern_p.c: Update.
4100         * gnulib/import/globfree.c: Update.
4101         * gnulib/import/hard-locale.c: Update.
4102         * gnulib/import/hard-locale.h: Update.
4103         * gnulib/import/intprops.h: Update.
4104         * gnulib/import/inttypes.in.h: Update.
4105         * gnulib/import/isnan.c: Update.
4106         * gnulib/import/isnand-nolibm.h: Update.
4107         * gnulib/import/isnand.c: Update.
4108         * gnulib/import/isnanl-nolibm.h: Update.
4109         * gnulib/import/isnanl.c: Update.
4110         * gnulib/import/itold.c: Update.
4111         * gnulib/import/libc-config.h: Update.
4112         * gnulib/import/limits.in.h: Update.
4113         * gnulib/import/localcharset.c: Update.
4114         * gnulib/import/localcharset.h: Update.
4115         * gnulib/import/localtime-buffer.c: Update.
4116         * gnulib/import/localtime-buffer.h: Update.
4117         * gnulib/import/lstat.c: Update.
4118         * gnulib/import/m4/00gnulib.m4: Update.
4119         * gnulib/import/m4/__inline.m4: Update.
4120         * gnulib/import/m4/absolute-header.m4: Update.
4121         * gnulib/import/m4/alloca.m4: Update.
4122         * gnulib/import/m4/builtin-expect.m4: Update.
4123         * gnulib/import/m4/canonicalize.m4: Update.
4124         * gnulib/import/m4/chdir-long.m4: Update.
4125         * gnulib/import/m4/close.m4: Update.
4126         * gnulib/import/m4/closedir.m4: Update.
4127         * gnulib/import/m4/configmake.m4: Update.
4128         * gnulib/import/m4/d-ino.m4: Update.
4129         * gnulib/import/m4/d-type.m4: Update.
4130         * gnulib/import/m4/dirent_h.m4: Update.
4131         * gnulib/import/m4/dirfd.m4: Update.
4132         * gnulib/import/m4/dirname.m4: Update.
4133         * gnulib/import/m4/double-slash-root.m4: Update.
4134         * gnulib/import/m4/dup.m4: Update.
4135         * gnulib/import/m4/dup2.m4: Update.
4136         * gnulib/import/m4/eealloc.m4: Update.
4137         * gnulib/import/m4/environ.m4: Update.
4138         * gnulib/import/m4/errno_h.m4: Update.
4139         * gnulib/import/m4/error.m4: Update.
4140         * gnulib/import/m4/exponentd.m4: Update.
4141         * gnulib/import/m4/exponentl.m4: Update.
4142         * gnulib/import/m4/extensions.m4: Update.
4143         * gnulib/import/m4/extern-inline.m4: Update.
4144         * gnulib/import/m4/fchdir.m4: Update.
4145         * gnulib/import/m4/fcntl-o.m4: Update.
4146         * gnulib/import/m4/fcntl.m4: Update.
4147         * gnulib/import/m4/fcntl_h.m4: Update.
4148         * gnulib/import/m4/fdopendir.m4: Update.
4149         * gnulib/import/m4/filenamecat.m4: Update.
4150         * gnulib/import/m4/flexmember.m4: Update.
4151         * gnulib/import/m4/float_h.m4: Update.
4152         * gnulib/import/m4/fnmatch.m4: Update.
4153         * gnulib/import/m4/fnmatch_h.m4: Update.
4154         * gnulib/import/m4/fpieee.m4: Update.
4155         * gnulib/import/m4/frexp.m4: Update.
4156         * gnulib/import/m4/frexpl.m4: Update.
4157         * gnulib/import/m4/fstat.m4: Update.
4158         * gnulib/import/m4/fstatat.m4: Update.
4159         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4160         * gnulib/import/m4/getcwd-path-max.m4: Update.
4161         * gnulib/import/m4/getcwd.m4: Update.
4162         * gnulib/import/m4/getdtablesize.m4: Update.
4163         * gnulib/import/m4/getlogin.m4: Update.
4164         * gnulib/import/m4/getlogin_r.m4: Update.
4165         * gnulib/import/m4/getpagesize.m4: Update.
4166         * gnulib/import/m4/getprogname.m4: Update.
4167         * gnulib/import/m4/gettimeofday.m4: Update.
4168         * gnulib/import/m4/glibc21.m4: Update.
4169         * gnulib/import/m4/glob.m4: Update.
4170         * gnulib/import/m4/glob_h.m4: Update.
4171         * gnulib/import/m4/gnulib-cache.m4: Update.
4172         * gnulib/import/m4/gnulib-common.m4: Update.
4173         * gnulib/import/m4/gnulib-comp.m4: Update.
4174         * gnulib/import/m4/gnulib-tool.m4: Update.
4175         * gnulib/import/m4/hard-locale.m4: Update.
4176         * gnulib/import/m4/include_next.m4: Update.
4177         * gnulib/import/m4/inttypes-pri.m4: Update.
4178         * gnulib/import/m4/inttypes.m4: Update.
4179         * gnulib/import/m4/isnand.m4: Update.
4180         * gnulib/import/m4/isnanl.m4: Update.
4181         * gnulib/import/m4/largefile.m4: Update.
4182         * gnulib/import/m4/limits-h.m4: Update.
4183         * gnulib/import/m4/localcharset.m4: Update.
4184         * gnulib/import/m4/locale-fr.m4: Update.
4185         * gnulib/import/m4/locale-ja.m4: Update.
4186         * gnulib/import/m4/locale-zh.m4: Update.
4187         * gnulib/import/m4/localtime-buffer.m4: Update.
4188         * gnulib/import/m4/longlong.m4: Update.
4189         * gnulib/import/m4/lstat.m4: Update.
4190         * gnulib/import/m4/malloc.m4: Update.
4191         * gnulib/import/m4/malloca.m4: Update.
4192         * gnulib/import/m4/math_h.m4: Update.
4193         * gnulib/import/m4/mbrtowc.m4: Update.
4194         * gnulib/import/m4/mbsinit.m4: Update.
4195         * gnulib/import/m4/mbsrtowcs.m4: Update.
4196         * gnulib/import/m4/mbstate_t.m4: Update.
4197         * gnulib/import/m4/memchr.m4: Update.
4198         * gnulib/import/m4/memmem.m4: Update.
4199         * gnulib/import/m4/mempcpy.m4: Update.
4200         * gnulib/import/m4/memrchr.m4: Update.
4201         * gnulib/import/m4/mkdir.m4: Update.
4202         * gnulib/import/m4/mkstemp.m4: Update.
4203         * gnulib/import/m4/mmap-anon.m4: Update.
4204         * gnulib/import/m4/mode_t.m4: Update.
4205         * gnulib/import/m4/msvc-inval.m4: Update.
4206         * gnulib/import/m4/msvc-nothrow.m4: Update.
4207         * gnulib/import/m4/multiarch.m4: Update.
4208         * gnulib/import/m4/nocrash.m4: Update.
4209         * gnulib/import/m4/off_t.m4: Update.
4210         * gnulib/import/m4/onceonly.m4: Update.
4211         * gnulib/import/m4/open-cloexec.m4: Update.
4212         * gnulib/import/m4/open.m4: Update.
4213         * gnulib/import/m4/openat.m4: Update.
4214         * gnulib/import/m4/opendir.m4: Update.
4215         * gnulib/import/m4/pathmax.m4: Update.
4216         * gnulib/import/m4/rawmemchr.m4: Update.
4217         * gnulib/import/m4/readdir.m4: Update.
4218         * gnulib/import/m4/readlink.m4: Update.
4219         * gnulib/import/m4/realloc.m4: Update.
4220         * gnulib/import/m4/rename.m4: Update.
4221         * gnulib/import/m4/rewinddir.m4: Update.
4222         * gnulib/import/m4/rmdir.m4: Update.
4223         * gnulib/import/m4/save-cwd.m4: Update.
4224         * gnulib/import/m4/secure_getenv.m4: Update.
4225         * gnulib/import/m4/setenv.m4: Update.
4226         * gnulib/import/m4/signal_h.m4: Update.
4227         * gnulib/import/m4/ssize_t.m4: Update.
4228         * gnulib/import/m4/stat-time.m4: Update.
4229         * gnulib/import/m4/stat.m4: Update.
4230         * gnulib/import/m4/std-gnu11.m4: Update.
4231         * gnulib/import/m4/stdbool.m4: Update.
4232         * gnulib/import/m4/stddef_h.m4: Update.
4233         * gnulib/import/m4/stdint.m4: Update.
4234         * gnulib/import/m4/stdio_h.m4: Update.
4235         * gnulib/import/m4/stdlib_h.m4: Update.
4236         * gnulib/import/m4/strchrnul.m4: Update.
4237         * gnulib/import/m4/strdup.m4: Update.
4238         * gnulib/import/m4/strerror.m4: Update.
4239         * gnulib/import/m4/string_h.m4: Update.
4240         * gnulib/import/m4/strstr.m4: Update.
4241         * gnulib/import/m4/strtok_r.m4: Update.
4242         * gnulib/import/m4/sys_socket_h.m4: Update.
4243         * gnulib/import/m4/sys_stat_h.m4: Update.
4244         * gnulib/import/m4/sys_time_h.m4: Update.
4245         * gnulib/import/m4/sys_types_h.m4: Update.
4246         * gnulib/import/m4/tempname.m4: Update.
4247         * gnulib/import/m4/time_h.m4: Update.
4248         * gnulib/import/m4/unistd-safer.m4: Update.
4249         * gnulib/import/m4/unistd_h.m4: Update.
4250         * gnulib/import/m4/warn-on-use.m4: Update.
4251         * gnulib/import/m4/wchar_h.m4: Update.
4252         * gnulib/import/m4/wchar_t.m4: Update.
4253         * gnulib/import/m4/wctype_h.m4: Update.
4254         * gnulib/import/m4/wint_t.m4: Update.
4255         * gnulib/import/malloc.c: Update.
4256         * gnulib/import/malloc/scratch_buffer.h: Update.
4257         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4258         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4259         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4260         * gnulib/import/malloca.c: Update.
4261         * gnulib/import/malloca.h: Update.
4262         * gnulib/import/malloca.valgrind: Update.
4263         * gnulib/import/math.in.h: Update.
4264         * gnulib/import/mbrtowc.c: Update.
4265         * gnulib/import/mbsinit.c: Update.
4266         * gnulib/import/mbsrtowcs-impl.h: Update.
4267         * gnulib/import/mbsrtowcs-state.c: Update.
4268         * gnulib/import/mbsrtowcs.c: Update.
4269         * gnulib/import/memchr.c: Update.
4270         * gnulib/import/memmem.c: Update.
4271         * gnulib/import/mempcpy.c: Update.
4272         * gnulib/import/memrchr.c: Update.
4273         * gnulib/import/mkdir.c: Update.
4274         * gnulib/import/mkstemp.c: Update.
4275         * gnulib/import/msvc-inval.c: Update.
4276         * gnulib/import/msvc-inval.h: Update.
4277         * gnulib/import/msvc-nothrow.c: Update.
4278         * gnulib/import/msvc-nothrow.h: Update.
4279         * gnulib/import/open.c: Update.
4280         * gnulib/import/openat-die.c: Update.
4281         * gnulib/import/openat-priv.h: Update.
4282         * gnulib/import/openat-proc.c: Update.
4283         * gnulib/import/openat.c: Update.
4284         * gnulib/import/openat.h: Update.
4285         * gnulib/import/opendir.c: Update.
4286         * gnulib/import/pathmax.h: Update.
4287         * gnulib/import/pipe-safer.c: Update.
4288         * gnulib/import/rawmemchr.c: Update.
4289         * gnulib/import/readdir.c: Update.
4290         * gnulib/import/readlink.c: Update.
4291         * gnulib/import/realloc.c: Update.
4292         * gnulib/import/ref-add.sin: Update.
4293         * gnulib/import/ref-del.sin: Update.
4294         * gnulib/import/rename.c: Update.
4295         * gnulib/import/rewinddir.c: Update.
4296         * gnulib/import/rmdir.c: Update.
4297         * gnulib/import/same-inode.h: Update.
4298         * gnulib/import/save-cwd.c: Update.
4299         * gnulib/import/save-cwd.h: Update.
4300         * gnulib/import/scratch_buffer.h: Update.
4301         * gnulib/import/secure_getenv.c: Update.
4302         * gnulib/import/setenv.c: Update.
4303         * gnulib/import/signal.in.h: Update.
4304         * gnulib/import/stat-time.c: Update.
4305         * gnulib/import/stat-time.h: Update.
4306         * gnulib/import/stat-w32.c: Update.
4307         * gnulib/import/stat-w32.h: Update.
4308         * gnulib/import/stat.c: Update.
4309         * gnulib/import/stdbool.in.h: Update.
4310         * gnulib/import/stddef.in.h: Update.
4311         * gnulib/import/stdint.in.h: Update.
4312         * gnulib/import/stdio.in.h: Update.
4313         * gnulib/import/stdlib.in.h: Update.
4314         * gnulib/import/str-two-way.h: Update.
4315         * gnulib/import/strchrnul.c: Update.
4316         * gnulib/import/strdup.c: Update.
4317         * gnulib/import/streq.h: Update.
4318         * gnulib/import/strerror-override.c: Update.
4319         * gnulib/import/strerror-override.h: Update.
4320         * gnulib/import/strerror.c: Update.
4321         * gnulib/import/string.in.h: Update.
4322         * gnulib/import/stripslash.c: Update.
4323         * gnulib/import/strnlen1.c: Update.
4324         * gnulib/import/strnlen1.h: Update.
4325         * gnulib/import/strstr.c: Update.
4326         * gnulib/import/strtok_r.c: Update.
4327         * gnulib/import/sys_stat.in.h: Update.
4328         * gnulib/import/sys_time.in.h: Update.
4329         * gnulib/import/sys_types.in.h: Update.
4330         * gnulib/import/tempname.c: Update.
4331         * gnulib/import/tempname.h: Update.
4332         * gnulib/import/time.in.h: Update.
4333         * gnulib/import/unistd--.h: Update.
4334         * gnulib/import/unistd-safer.h: Update.
4335         * gnulib/import/unistd.in.h: Update.
4336         * gnulib/import/unsetenv.c: Update.
4337         * gnulib/import/verify.h: Update.
4338         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4339         * gnulib/import/wchar.in.h: Update.
4340         * gnulib/import/wctype.in.h: Update.
4341         * gnulib/import/xalloc-oversized.h: Update.
4342         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4343         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4344
4345 2018-08-16  Gary Benson <gbenson@redhat.com>
4346
4347         PR gdb/13000:
4348         * gdb/main.c (captured_main_1): Exit with nonzero status
4349         in batch mode if the last command to be executed failed.
4350         * NEWS: Mention the above.
4351
4352 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4355         end of warning message.
4356
4357 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4358
4359         PR gdb/22943:
4360         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4361         (aarch64_extract_return_value): Use
4362         aapcs_is_vfp_call_or_return_candidate.
4363         (aarch64_return_in_memory): Likewise.
4364         (aarch64_store_return_value): Likewise.
4365
4366 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4367
4368         * aarch64-tdep.c
4369         (aapcs_is_vfp_call_or_return_candidate): Make static
4370         (pass_in_v_or_stack): Remove function.
4371         (pass_in_v_vfp_candidate): New function.
4372         (aarch64_push_dummy_call): Check for float register candidates.
4373
4374 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4375
4376         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4377         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4378         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4379
4380 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4381
4382         PR build/23399
4383         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4384         (struct ipa_sym_addresses): Rename to...
4385         (struct ipa_sym_addresses_common): ... this.
4386         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4387
4388 2018-08-28  Tom Tromey  <tom@tromey.com>
4389
4390         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4391         (token_fifo): Now a std::vector.
4392         (yylex, c_parse): Update.
4393         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4394         (token_fifo): Now a std::vector.
4395         (yylex, d_parse): Update.
4396         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4397         (token_fifo): Now a std::vector.
4398         (yylex, go_parse): Update.
4399
4400 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4401
4402         * parser-defs.h (struct type_stack) <elements>: Change type to
4403         std::vector<union type_stack_elt>.
4404         <depth, size>: Remove.
4405         * parse.c (parse_exp_in_context_1): Adjust.
4406         (type_stack_reserve): Remove.
4407         (check_type_stack_depth): Remove.
4408         (insert_into_type_stack): Adjust to std::vector.
4409         (insert_type): Likewise.
4410         (push_type): Likewise.
4411         (push_type_int): Likewise.
4412         (insert_type_address_space): Likewise.
4413         (pop_type): Likewise.
4414         (pop_type_int): Likewise.
4415         (pop_typelist): Likewise.
4416         (pop_type_stack): Likewise.
4417         (append_type_stack): Likewise.
4418         (push_type_stack): Likewise.
4419         (get_type_stack): Likewise.
4420         (type_stack_cleanup): Likewise.
4421         (push_typelist): Likewise.
4422         (follow_types): Likewise.
4423         (_initialize_parse): Likewise.
4424
4425 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4426
4427         * NEWS: Mention csky target.
4428
4429 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4430             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4431             Don Breazeal  <donb@codesourcery.com>
4432
4433         * csky-linux-tdep.c: New file.
4434         * csky-tdep.c: Likewise.
4435         * csky-tdep.h: Likewise.
4436         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4437         csky-tdep.o.
4438         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4439         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4440         * configure.tgt: Add csky support.
4441
4442 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4443
4444         * python/py-framefilter.c (py_print_frame): Print frame architecture
4445         when printing on an MI output.
4446
4447 2018-08-27  Tom Tromey  <tom@tromey.com>
4448
4449         PR build/23087:
4450         * configure: Rebuild.
4451         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4452
4453 2018-08-27  Tom Tromey  <tom@tromey.com>
4454
4455         * aarch64-linux-tdep.c
4456         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4457         casts to int.
4458
4459 2018-08-27  Tom Tromey  <tom@tromey.com>
4460
4461         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4462         unsigned.
4463         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4464         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4465         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4466         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4467         unsigned.
4468
4469 2018-08-27  Tom Tromey  <tom@tromey.com>
4470
4471         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4472         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4473
4474 2018-08-27  Tom Tromey  <tom@tromey.com>
4475
4476         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4477         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4478         ULONGEST_MAX.
4479         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4480         ULONGEST_MAX.
4481         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4482         ULONGEST_MAX.
4483         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4484         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4485         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4486         ULONGEST_MAX.
4487         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4488         (ppc64_linux_sigaction_tramp_frame)
4489         (ppc32_linux_sighandler_tramp_frame)
4490         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4491         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4492         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4493         * mn10300-linux-tdep.c (am33_linux_sigframe)
4494         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4495         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4496         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4497         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4498         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4499         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4500         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4501         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4502         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4503         * microblaze-linux-tdep.c
4504         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4505         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4506         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4507         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4508         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4509         * common/common-types.h (ULONGEST_MAX): New define.
4510         (CORE_ADDR_MAX): Fix formatting.
4511         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4512         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4513         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4514         (arm_linux_rt_sigreturn_tramp_frame)
4515         (arm_eabi_linux_sigreturn_tramp_frame)
4516         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4517         (thumb2_eabi_linux_sigreturn_tramp_frame)
4518         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4519         (arm_linux_restart_syscall_tramp_frame)
4520         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4521         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4522         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4523         ULONGEST_MAX.
4524         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4525
4526 2018-08-27  Tom Tromey  <tom@tromey.com>
4527
4528         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4529         CORE_ADDR_MAX.
4530         * mips-tdep.c (mips_deal_with_atomic_sequence)
4531         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4532         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4533         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4534         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4535         CORE_ADDR_MAX.
4536         * aarch64-tdep.c (aarch64_software_single_step): Use
4537         CORE_ADDR_MAX.
4538
4539 2018-08-27  Tom Tromey  <tom@tromey.com>
4540
4541         * linespec.c (complete_linespec_component): Add cast to "char".
4542         * completer.c (completion_tracker::build_completion_result): Add
4543         cast to "char".
4544
4545 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4546
4547         * solist.h (struct solist, struct target_so_ops): Fix
4548         indentation.
4549
4550 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4551
4552         * ada-tasks.c (ada_task_info_s): Remove typedef.
4553         (DEF_VEC_O(ada_task_info_s)): Remove.
4554         (struct ada_tasks_inferior_data): Initialize fields.
4555         <task_list>: Make an std::vector.
4556         (get_ada_tasks_inferior_data): Allocate with new.
4557         (ada_get_task_number): Adjust.
4558         (get_task_number_from_id): Likewise.
4559         (valid_task_id): Likewise.
4560         (ada_get_task_info_from_ptid): Likewise.
4561         (iterate_over_live_ada_tasks): Likewise.
4562         (add_ada_task): Likewise.
4563         (read_known_tasks): Likewise.
4564         (ada_build_task_list): Likewise.
4565         (print_ada_task_info): Likewise.
4566         (info_task): Likewise.
4567         (task_command_1): Likewise.
4568
4569 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4570
4571         * ada-lang.c (add_angle_brackets): Return std::string.
4572
4573 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4574
4575         * python/py-threadevent.c (py_get_event_thread): Initialize
4576         pythread.
4577
4578 2018-08-24  Pedro Alves  <palves@redhat.com>
4579
4580         * python/py-bpevent.c (create_breakpoint_event_object): Use
4581         copy-initialization.
4582         * python/py-continueevent.c (emit_continue_event): Use
4583         copy-initialization.
4584         * python/py-exitedevent.c (create_exited_event_object): Return a
4585         gdbpy_ref<>.
4586         (emit_exited_event): Use copy-initialization.
4587         * python/py-inferior.c (python_new_inferior)
4588         (python_inferior_deleted, add_thread_object): Use
4589         copy-initialization.
4590         * python/py-infevents.c (create_inferior_call_event_object)
4591         (create_register_changed_event_object)
4592         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4593         (emit_inferior_call_event, emit_memory_changed_event)
4594         (emit_register_changed_event): Use copy-initialization.
4595         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4596         Return a gdbpy_ref<>.
4597         (emit_new_objfile_event): Use copy-initialization.
4598         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4599         (emit_clear_objfiles_event): Use copy-initialization.
4600         * python/py-signalevent.c (create_signal_event_object): Use
4601         copy-initialization.
4602         * python/py-threadevent.c (create_thread_event_object): Use
4603         copy-initialization.
4604
4605 2018-08-24  Pedro Alves  <palves@redhat.com>
4606             Simon Marchi  <simon.marchi@ericsson.com>
4607
4608         PR gdb/23379
4609         * python/py-continueevent.c: Include "gdbthread.h".
4610         (create_continue_event_object): Add intro comment.  Add 'ptid'
4611         parameter.  Use it to find thread to pass to
4612         create_thread_event_object.
4613         (emit_continue_event): Pass PTID down to
4614         create_continue_event_object.
4615         * python/py-event.h (py_get_event_thread): Declare.
4616         (create_thread_event_object): Remove default from 'thread'
4617         parameter.
4618         * python/py-stopevent.c (create_stop_event_object): Use
4619         py_get_event_thread.
4620         * python/py-threadevent.c (get_event_thread): Rename to ...
4621         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4622         and use it to find the thread.
4623         (create_thread_event_object): Assert that THREAD isn't null.
4624         Don't find the event thread here.
4625
4626 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4627
4628         * block.h (blockrange, blockranges): New struct declarations.
4629         (struct block): Add new field named `ranges'.
4630         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4631         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4632         macros for accessing ranges in struct block.
4633         (make_blockranges): New declaration.
4634         block.c (make_blockranges): New function.
4635         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4636         for block.
4637         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4638         * blockframe.c (cache_pc_function_block): New static global.
4639         (clear_pc_function_cache): Clear cache_pc_function_block.
4640         (find_pc_partial_function): Move comment to symtab.h.  Add
4641         support for non-contiguous blocks.
4642         * cli/cli-cmds.c (block.h): Include.
4643         (print_disassembly): Handle printing of non-contiguous blocks.
4644         (disassemble_current_function): Likewise.
4645         (disassemble_command): Likewise.
4646
4647         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4648         BLOCK_START.
4649         * blockframe.c (get_pc_function_start): Likewise.
4650         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4651         (gcc_symbol_address): Likewise.
4652         * compile/compile-object-run.c (compile_object_run): Likewise.
4653         * compile/compile.c (get_expr_block_and_pc): Likewise.
4654         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4655         (func_addr_to_tail_call_list): Likewise.
4656         * findvar.c (default_read_var_value): Likewise.
4657         * inline-frame.c (inline_frame_this_id): Likewise.
4658         (skip-inline_frames): Likewise.
4659         * infcmd.c (until_next_command): Likewise.
4660         * linespec.c (convert_linespec_to_sals): Likewise.
4661         * parse.c (parse_exp_in_context_1): Likewise.
4662         * printcmd.c (build_address_symbolic): likewise.
4663         (info_address_command): Likewise.
4664         symtab.c (find_function_start_sal): Likewise.
4665         (skip_prologue_sal): Likewise.
4666         (find_function_alias_target): Likewise.
4667         (find_gnu_ifunc): Likewise.
4668         * stack.c (find_frame_funname): Likewise.
4669         * symtab.c (fixup_symbol_section): Likewise.
4670         (find_function_start_sal): Likewise.
4671         (skip_prologue_sal): Likewsie.
4672         (find_function_alias_target): Likewise.
4673         (find_gnu_ifunc): Likewise.
4674         * tracepoint.c (info_scope_command): Likewise.
4675         * value.c (value_fn_field): Likewise.
4676
4677         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4678         in place of find_pc_partial_function.
4679         * blockframe.c (find_function_entry_range_from_pc): New function.
4680         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4681         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4682         for each range in a block.
4683
4684
4685 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4686
4687         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4688         incrementation.
4689
4690 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4691
4692         * solib-svr4.c (read_program_headers_from_bfd): Return
4693         gdb::optional<gdb::byte_vector>.
4694         (svr4_exec_displacement): Adjust.
4695
4696 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4697
4698         * solib-svr4.c (read_program_header): Return
4699         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4700         (find_program_interpreter): Return
4701         gdb::optional<gdb::byte_vector>.
4702         (scan_dyntag_auxv): Adjust.
4703         (enable_break): Adjust.
4704         (svr4_exec_displacement): Adjust.
4705
4706 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4707
4708         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4709         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4710
4711 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4712
4713         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4714         string_vprintf.
4715         * guile/scm-utils.c (gdbscm_printf): Likewise.
4716         * serial.c (serial_printf): Likewise.
4717         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4718
4719 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4720
4721         * stack.c (print_frame): Print frame architecture when printing on
4722         an MI output.
4723         * NEWS: Mention new "arch" attribute in frame output.
4724
4725 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4726
4727         * arch/aarch64.h (aarch64_regnum): Update comment.
4728
4729 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4730
4731         * NEWS: Add SVE to 8.2 section.
4732
4733 2018-08-21  Pedro Alves  <palves@redhat.com>
4734
4735         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4736         out from gdbscm_parse_function_args.
4737         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4738         gdbscm_parse_function_args_1.
4739
4740 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4741
4742         PR gdb/17816
4743         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4744         operator.
4745
4746 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4747
4748         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4749
4750 2018-08-19  Michael Spang  <spang@google.com>
4751
4752         PR gdb/11786
4753         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4754         for PT_TLS segments.
4755
4756 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4757
4758         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4759         dwarf_variable_value.
4760         * dwarf2-frame.c (class dwarf_expr_executor):
4761         Add override for dwarf_variable_value.
4762         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4763         (class symbol_needs_eval_context): Likewise.
4764         (indirect_synthetic_pointer): Add forward declaration.
4765         (sect_variable_value): New function.
4766         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4767         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4768         for DW_OP_GNU_variable_value.
4769
4770 2018-08-16  Tom Tromey  <tom@tromey.com>
4771
4772         * top.c (read_command_file): Update.
4773         (command_line_input): Remove "repeat" argument.
4774         * ada-lang.c (get_selections): Update.
4775         * linespec.c (decode_line_2): Update.
4776         * defs.h (command_line_input): Remove argument.
4777         * cli/cli-script.c (read_next_line): Update.
4778         * python/py-gdb-readline.c: Update.
4779
4780 2018-08-17  Tom Tromey  <tom@tromey.com>
4781
4782         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4783         command_line_input.
4784
4785 2018-08-15  Tom Tromey  <tom@tromey.com>
4786
4787         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4788
4789 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4790
4791         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4792         If used, use find_pc_partial_function to find address range
4793         to disassemble.
4794         * mi/mi-main.c (mi_cmd_list_features): Report
4795         "data-disassemble-a-option" feature.
4796         * NEWS: Mention new -data-disassemble option -a.
4797
4798 2018-08-13  Tom Tromey  <tom@tromey.com>
4799
4800         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4801
4802 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4803
4804         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4805         (aarch64_linux_collect_sve_regset): Likewise.
4806         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4807         * regcache.h (regcache_map_entry_size): New function.
4808
4809 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4810
4811         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4812         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4813         (SVE_HEADER_VL_LENGTH): Likewise.
4814         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4815         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4816         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4817         (SVE_HEADER_SIZE_OFFSET): Likewise.
4818         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4819         (SVE_HEADER_VL_OFFSET): Likewise.
4820         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4821         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4822         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4823         (SVE_HEADER_SIZE): Likewise.
4824         (aarch64_linux_core_read_vq): Add function.
4825         (aarch64_linux_core_read_description): Check for SVE section.
4826
4827 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4828
4829         * aarch64-fbsd-tdep.c
4830         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4831         collect_size.
4832         * aarch64-linux-tdep.c
4833         (aarch64_linux_iterate_over_regset_sections): Likewise.
4834         * alpha-linux-tdep.c
4835         (alpha_linux_iterate_over_regset_sections):
4836         * alpha-nbsd-tdep.c
4837         (alphanbsd_iterate_over_regset_sections): Likewise.
4838         * amd64-fbsd-tdep.c
4839         (amd64fbsd_iterate_over_regset_sections): Likewise.
4840         * amd64-linux-tdep.c
4841         (amd64_linux_iterate_over_regset_sections): Likewise.
4842         * arm-bsd-tdep.c
4843         (armbsd_iterate_over_regset_sections): Likewise.
4844         * arm-fbsd-tdep.c
4845         (arm_fbsd_iterate_over_regset_sections): Likewise.
4846         * arm-linux-tdep.c
4847         (arm_linux_iterate_over_regset_sections): Likewise.
4848         * corelow.c (get_core_registers_cb): Likewise.
4849         (core_target::fetch_registers): Likewise.
4850         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4851         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4852         * gdbarch.h (void): Regenerate.
4853         * gdbarch.sh: Add supply_size and collect_size.
4854         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4855         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4856         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4857         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4858         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4859         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4860         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4861         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4862         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4863         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4864         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4865         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4866         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4867         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4868         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4869         Likewise.
4870         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4871         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4872         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4873         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4874         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4875         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4876         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4877         Likewise.
4878         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4879         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4880         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4881         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4882         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4883         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4884         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4885         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4886
4887 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4888
4889         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4890         with string_printf.
4891
4892 2018-08-10  Keith Seitz  <keiths@redhat.com>
4893
4894         * compile/compile-c-support.c (add_code_header, add_code_footer):
4895         Move into policy class.
4896         (c_push_user_expression, pop_user_expression_nop)
4897         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4898         (compile_program): New host class.
4899         (c_compile_program): New typedef.
4900         (c_compute_porgram): Use c_compile_program.
4901
4902 2018-08-10  Keith Seitz  <keiths@redhat.com>
4903
4904         * compile/compile-internal.h (compile_instance::~compile_instance):
4905         Remove calls to htab_delete.
4906         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4907         * compile.c (compile_instance::compile_instance): Initialize
4908         htab unique pointers.
4909         (compile_instance::get_cached_type, compile_instance::insert_type)
4910         (compile_instance::error_symbol_once): Update for unique_ptr.
4911
4912 2018-08-10  Keith Seitz  <keiths@redhat.com>
4913
4914         * compile/compile-c-symbols.c (struct symbol_error)
4915         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4916         (compile_instance::insert_symbol_error)
4917         (compile_instance::error_symbol_once): Move to ...
4918         * compile/compile.c: ... here.
4919
4920 2018-08-10  Keith Seitz  <keiths@redhat.com>
4921
4922         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4923         instead of `new_compile_instance'.
4924         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4925         Update description.
4926         If the symbol error map is not initialized, create it.
4927         (generate_c_for_for_one_symbol): Do not check/initialize
4928         the symbol error map.
4929         * compile/compile-c-types.c (compile_c_instance): Make a class.
4930         Update all callers.
4931         (compile_instance::compile_instance): Initialize the type cache.
4932         (get_cached_type): New function.
4933         (insert_type): Update description.
4934         (compile_c_instance::m_default_cflags): Define.
4935         (convert_type): Update description.  Use get_cached_type.
4936         (delete_instance): Moved to destructor.
4937         (new_compile_instance): Moved to constructor.
4938         * compile/compile-c.h (compile_c_instance): Make class inheriting
4939         from compile_instance.
4940         <base>: Remove field.
4941         <type_map, symbol_err_map>: Move to base class.
4942         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4943         * compile/compile-internal.h (compile_instance): Make class.
4944         <type_map_t, symbol_err_map_t>: Define.
4945         <fe>: Rename to `m_gcc_fe'.
4946         <scope, block, gcc_target_options>: Add `m_' prefix.
4947         <m_type_map, m_symbol_err_map>: New fields, moved from
4948         compile_c_instance.
4949         <destroy>: Remove.
4950         (convert_type, new_compile_instance): Remove.
4951         * compile/compile.c (cleanup_compile_instance): Remove.
4952         (compile_to_object): Use unique_ptr to eliminate cleanups.
4953         (compile_instance::set_print_callback, compile_instance::version)
4954         (compile_instance::set_verbose)
4955         (compile_instance::set_driver_filename)
4956         (compile_instance::set_triplet_regexp)
4957         (compile_instance::set_arguments)
4958         (compile_instance::set_source_file)
4959         (compile_instance::compile): Define.
4960
4961 2018-08-10  Keith Seitz  <keiths@redhat.com>
4962
4963         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4964         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4965         gcc-c-fe.def to define C plugin.
4966         (delete_instance): Delete `c_plugin'.
4967         (new_compile_instance): Initialize `c_plugin'.
4968         * compile/compile-c.h: Include gcc_c_plugin.h.
4969         (struct compile_c_instance) <c_plugin>: New member.
4970         * gcc-c-plugin.h: New file.
4971         Update all callers with API change.
4972
4973 2018-08-10  Keith Seitz  <keiths@redhat.com>
4974
4975         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4976         (HFILES_NO_SRCDIR): ... to here.
4977         Add compile-internal.h and compile-c.h.
4978         * compile/compile-c-support.c: Include compile-c.h.
4979         * compile/compile-c-symbols.c: Include compile-c.h.
4980         (generate_c_for_variable_locations): Update comment.
4981         * compile/compile-c-types.c: Include compile-c.h.
4982         * compile/compile-c.h: New file -- moved C language declarations
4983         from other files here.
4984         * compile/compile-internal.h: Do not include hashtab.h or
4985         common/enum-flags.h.
4986         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4987         (gcc_convert_symbol, gcc_symbol_address)
4988         (generate_c_for_variable_locations, c_get_mode_for_size)
4989         (c_get_range_decl_name): Definitions moved to compile-c.h.
4990         * compile/compile-loc2c.c: Include compile-c.h.
4991
4992 2018-08-10  Keith Seitz  <keiths@redhat.com>
4993
4994         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4995         (c_symbol_substitution_name): ... this.
4996         Update all callers.
4997
4998 2018-08-10  Keith Seitz  <keiths@redhat.com>
4999
5000         * compile/compile-c-support.c (c_compute_program): Use
5001         unique_xmalloc_ptr to eliminate cleanup.
5002         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5003         Return a unique_xmalloc_ptr and eliminate cleanup.
5004         * compile/compile-internal.h (generate_c_for_variable_locations):
5005         Return unique_xmalloc_ptr and update description.
5006
5007 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5008
5009         * corelow.c (core_target::get_core_register_section): Rename
5010         min_size to section_min_size.
5011
5012 2018-08-09  Jim Wilson  <jimw@sifive.com>
5013
5014         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5015         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5016         * NEWS: Mention new GNU/Linux RISC-V target.
5017         * configure.host: Add riscv*-*-linux*.
5018         * configure.nat: Add riscv*.
5019         * configure.tgt: Add riscv*-*-linux*.
5020         * riscv-linux-nat.c: New file.
5021         * riscv-linux-tdep.c: New file.
5022
5023 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5024
5025         * infrun.c (resume): Make static, add forward declaration.
5026         (proceed): Update header comment.
5027         * infrun.h (resume): Delete declaration.
5028
5029 2018-08-09  Tom Tromey  <tom@tromey.com>
5030
5031         * riscv-tdep.h: Minor formatting fixes.
5032
5033 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5034
5035         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5036         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5037         (test_mkdir_recursive): Likewise.
5038         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5039
5040 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5041
5042         * valarith.c (value_subscripted_rvalue): If an array is not in
5043         memory, and we don't know the upper bound, then we can't know that
5044         the requested element exists or not.
5045
5046 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5047
5048         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5049         (target_options_to_string): Add comment.
5050
5051 2018-08-08  Tom Tromey  <tom@tromey.com>
5052
5053         * unittests/scoped_mmap-selftests.c: Check result of "write".
5054
5055 2018-08-08  Jim Wilson  <jimw@sifive.com>
5056
5057         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5058         (decode_register_index_short): New.
5059         (decode_j_type_insn, decode_cj_type_insn): New.
5060         (decode_b_type_insn, decode_cb_type_insn): New.
5061         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5062         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5063         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5064         is_c_sw_insn instead of is_sw_insn.
5065         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5066         (riscv_software_single_step): New.
5067         * riscv-tdep.h (riscv_software_single_step): Declare.
5068
5069         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5070         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5071
5072 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5073
5074         PR gdb/18050:
5075         * target.c (dispose_inferior): Don't dispose of inferiors that are
5076         already killed.
5077
5078 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5079
5080         * remote.c (remote_target::download_tracepoint): Change char* to
5081         const char*.
5082
5083 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5084
5085         * target.h (target_options_to_string): Return an std::string.
5086         * target.c (str_comma_list_concat_elem): Return void, use
5087         std::string.
5088         (do_option): Likewise.
5089         (target_options_to_string): Return an std::string.
5090         * linux-nat.c (linux_nat_target::wait): Adjust.
5091         * target-debug.h (target_debug_print_options): Adjust.
5092
5093 2018-08-07  Tom Tromey  <tom@tromey.com>
5094
5095         * Makefile.in (CPPFLAGS): New variable.
5096         (INTERNAL_CPPFLAGS): Use it.
5097
5098 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5099
5100         * NEWS: Mention the index cache.
5101
5102 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5103
5104         * common/pathstuff.h (get_standard_cache_dir): New.
5105         * common/pathstuff.c (get_standard_cache_dir): New.
5106         * build-id.h (build_id_to_string): New.
5107         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5108         DEBUG_STR_SUFFIX): Move to here.
5109         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5110         DEBUG_STR_SUFFIX): Move from there.
5111         (write_psymtabs_to_index): Make non-static, add basename
5112         parameter.  Write to temporary files, rename when done.
5113         (save_gdb_index_command): Adjust call to
5114         write_psymtabs_to_index.
5115         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5116         field.
5117         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5118         (get_gdb_index_contents_from_cache): New.
5119         (get_gdb_index_contents_from_cache_dwz): New.
5120         (dwarf2_initialize_objfile): Read index from cache.
5121         (dwarf2_build_psymtabs): Save to index.
5122         * dwarf-index-cache.h: New file.
5123         * dwarf-index-cache.c: New file.
5124         * dwarf-index-write.h: New file.
5125
5126 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5127
5128         * gnulib/aclocal.m4: Re-generate.
5129         * gnulib/config.in: Re-generate.
5130         * gnulib/configure: Re-generate.
5131         * gnulib/import/Makefile.am: Re-generate.
5132         * gnulib/import/Makefile.in: Re-generate.
5133         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5134         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5135         * gnulib/import/m4/mkdir.m4: New file.
5136         * gnulib/import/mkdir.c: New file.
5137         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5138         module.
5139
5140 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5141
5142         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5143         * common/scoped_mmap.c: New file.
5144         * common/scoped_mmap.h (destroy): New method.
5145         (~scoped_mmap, reset): Use destroy.
5146         (scoped_mmap): New move constructor.
5147         (mmap_file): New declaration.
5148         * unittests/scoped_mmap-selftests.c (test_normal,
5149         test_invalid_filename, run_tests): New functions.
5150         (_initialize_scoped_mmap_selftests): Register selftest.
5151
5152 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5153
5154         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5155         (read_gdb_index_from_buffer): ... this.  Remove section
5156         parameter, add buffer parameter.
5157         (get_gdb_index_contents_ftype,
5158         get_gdb_index_contents_dwz_ftype): New typedefs.
5159         (dwarf2_read_gdb_index): Add callback parameters to get the
5160         index contents.
5161         (get_gdb_index_contents_from_section): New.
5162         (dwarf2_initialize_objfile): Update call to
5163         dwarf2_read_gdb_index.
5164
5165 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5166
5167         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5168         (gdb_open_cloexec): Likewise.
5169         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5170         (commandline_from_pid): Likewise.
5171         (linux_xfer_osdata_threads): Likewise.
5172         (linux_xfer_osdata_fds): Likewise.
5173         * ada-lang.c (is_package_name): Likewise.
5174         * auxv.c (procfs_xfer_auxv): Likewise.
5175         * breakpoint.c (print_one_breakpoint_location): Use
5176         uiout::field_fmt.
5177         (print_one_catch_solib): Use string_printf.
5178         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5179         (add_pe_forwarded_sym): Likewise.
5180         * dwarf2read.c (create_type_unit_group): Likewise.
5181         (build_error_marker_type): Likewise.
5182         * infcall.c (get_function_name): Likewise.
5183         * valprint.c (print_converted_chars_to_obstack): Likewise.
5184         * xtensa-tdep.c (xtensa_register_type): Likewise.
5185
5186 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5187
5188         * remote.c (remote_target::download_tracepoint): Fix format
5189         string errors.
5190
5191 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5192
5193         * tracefile.c: Include common/byte-vector.h.
5194         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5195         with trace_regblock_size if needed.  Update uses of buf.
5196
5197 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5198
5199         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5200         std::vector<unsigned char>.
5201         * tracepoint.c (collection_list::collection_list): Remove
5202         m_regs_mask initializer from initializer list.  Resize
5203         m_regs_mask using the largest remote register number.
5204         (collection_list::add_remote_register): Remove size check on
5205         m_regs_mask.  Use at to access element.
5206         (collection_list::stringify): Change type of temp_buf to
5207         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5208         stringify the register mask.  Use pack_hex_byte for the register
5209         mask.
5210
5211 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5212
5213         * tracepoint.h (class collection_list) <add_register>: Remove.
5214         <add_remote_register, add_ax_registers, add_local_register>:
5215         Declare.
5216         <add_memrange>: Add scope parameter.
5217         * tracepoint.c (encode_actions_1): Likewise.
5218         (collection_list::add_register): Rename to ...
5219         (collection_list::add_remote_register): ... this.  Update
5220         comment.
5221         (collection_list::add_ax_registers, add_local_register): New
5222         methods.
5223         (collection_list::add_memrange): Add scope parameter.  Call
5224         add_local_register instead of add_register.
5225         (finalize_tracepoint_aexpr): New function.
5226         (collection_list::collect_symbol): Update calls to add_memrange.
5227         Call add_local_register instead of add_register.  Call
5228         add_ax_registers.  Call finalize_tracepoint_aexpr.
5229         (encode_actions_1): Get remote regnos for $reg action.  Call
5230         add_remote_register, add_ax_registers, and add_local_register.
5231         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5232         (validate_actionline): Call finalize_tracepoint_aexpr.
5233
5234 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5235
5236         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5237         Replace array buf with gdb::char_vector buf, of size
5238         get_remote_packet_size ().  Replace references to buf and
5239         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5240         and xsnprintf with snprintf.  Raise errors if the buffer is too
5241         small.
5242
5243 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5244
5245         * remote.c (remote_target::download_tracepoint): Fix the has_more
5246         predicate in the QTDP action list iteration.
5247
5248 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5249
5250         * remote.c (remote_target::download_tracepoint): Fix indentation
5251         in for block.
5252
5253 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5254
5255         * proc-api.c (_initialize_proc_api): Remove c, unused.
5256         * procfs.c (procfs_init_inferior): Remove signals, unused.
5257         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5258         unused.
5259
5260 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5261             Andrew Burgess  <andrew.burgess@embecosm.com>
5262
5263         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5264         'W_STOPCODE (0)' as this could be ambiguous.
5265
5266 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5267
5268         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5269         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5270         "ai_socktype").
5271
5272 2018-08-02  Tom Tromey  <tom@tromey.com>
5273
5274         PR symtab/16842.
5275         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5276         symbols.
5277         (process_structure_scope): Likewise.
5278
5279 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5280
5281         PR gdb/22629:
5282         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5283         kill inferior.
5284
5285 2018-08-02  Tom Tromey  <tom@tromey.com>
5286
5287         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5288         (darwin_suspend_inferior, darwin_resume_inferior)
5289         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5290         (darwin_check_new_threads): Check result of get_darwin_inferior.
5291
5292 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5293
5294         GDB 8.1.1 released.
5295
5296 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5297
5298         * varobj.c (varobj_get_path_expr_parent): Report an error if
5299         parent is a dynamic varobj.
5300
5301 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5302
5303         * gnulib/aclocal.m4: Re-generate.
5304         * gnulib/config.in: Re-generate.
5305         * gnulib/configure: Re-generate.
5306         * gnulib/import/Makefile.in: Re-generate.
5307         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5308         * gnulib/import/m4/onceonly.m4: Re-generate.
5309
5310 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5311
5312         * target-descriptions.c (struct xml_test_tdesc): New.
5313         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5314         (record_xml_tdesc): Update.
5315         (maintenance_check_xml_descriptions): Update.
5316         * target-descriptions.h (record_xml_tdesc): Update comment.
5317
5318 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5319
5320         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5321         checking array bounds are defined.
5322
5323 2018-07-30  Tom Tromey  <tom@tromey.com>
5324
5325         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5326         irreflexivity violation.
5327
5328 2018-07-30  Tom Tromey  <tom@tromey.com>
5329
5330         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5331         * value.c (unpack_long): Remove lint code.
5332         * valops.c (value_ind): Remove lint code.
5333         * valarith.c (value_x_binop, value_x_unop, value_equal)
5334         (value_pos): Remove lint code.
5335
5336 2018-07-28  Tom de Vries  <tdevries@suse.de>
5337
5338         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5339         with undefined upper bound as <optimized out>.
5340
5341 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5342
5343         * gcore.in: Rename variable "name" to "prefix".  Expand
5344         "usage" text.
5345
5346 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5347
5348         * windows-nat.c (windows_nat_target::create_inferior): Update to
5349         call close() in global namespace.
5350
5351 2018-07-26  Tom Tromey  <tom@tromey.com>
5352
5353         * dwarf-index-write.c (add_address_entry): Don't add objfile
5354         offsets.
5355         * dbxread.c (find_stab_function): Rename from
5356         find_stab_function_addr.  Return a bound_minimal_symbol.
5357         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5358         Don't add objfile offsets.
5359         (end_psymtab): Use raw_text_low, raw_text_high,
5360         MSYMBOL_VALUE_RAW_ADDRESS.
5361         (read_ofile_symtab): Update.
5362         (process_one_symbol): Update.
5363         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5364         offsets.
5365         (dw2_relocate): Remove.
5366         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5367         searching addrmap.
5368         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5369         Update.
5370         (process_psymtab_comp_unit_reader, add_partial_symbol)
5371         (add_partial_subprogram, dwarf2_ranges_read): Update.
5372         (load_partial_dies): Update.
5373         (add_address_entry): Don't add objfile offsets.
5374         (dwarf2_build_include_psymtabs): Update.
5375         (create_addrmap_from_aranges): Don't add objfile offsets.
5376         (dw2_find_pc_sect_compunit_symtab): Update.
5377         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5378         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5379         Update.
5380         (parse_partial_symbols): Don't add objfile offsets.  Use
5381         raw_text_low, raw_text_high.  Update.
5382         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5383         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5384         or call 'relocate' quick function.  Clear psymbol_map.
5385         * psympriv.h (struct partial_symbol) <address>: Add section
5386         offset.
5387         <set_unrelocated_address>: Rename from set_address.
5388         <raw_text_low, raw_text_high>: New methods.
5389         <text_low, text_high>: Add objfile parameter.
5390         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5391         set_unrelocated_address.
5392         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5393         (find_pc_psymbol): Update.
5394         (fixup_psymbol_section, relocate_psymtabs): Remove.
5395         (dump_psymtab, psym_functions): Update.
5396         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5397         parameter.
5398         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5399         (start_psymtab_common): Update.
5400         * symfile-debug.c (debug_qf_relocate): Remove.
5401         (debug_sym_quick_functions): Update.
5402         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5403         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5404         Update.
5405
5406 2018-07-26  Tom Tromey  <tromey@redhat.com>
5407
5408         * dbxread.c (end_psymtab): Use text_high_valid and
5409         text_low_valid.
5410         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5411         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5412         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5413         Update comment.
5414         <text_low_valid, text_high_valid>: New fields.
5415         <set_text_low, set_text_high>: Update.
5416         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5417
5418 2018-07-26  Tom Tromey  <tom@tromey.com>
5419
5420         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5421         Update.
5422         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5423         textlow and texthigh fields.
5424         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5425         Update.
5426         * mdebugread.c (parse_lines, parse_partial_symbols)
5427         (psymtab_to_symtab_1): Update.
5428         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5429         Rename fields.  Update comment.  Now private.
5430         <text_low, text_high, set_text_low, set_text_high>: New methods.
5431         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5432         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5433         (start_psymtab_common, maintenance_info_psymtabs)
5434         (maintenance_check_psymtabs): Update.
5435         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5436         texthigh fields.
5437         (scan_xcoff_symtab): Update.
5438
5439 2018-07-26  Tom Tromey  <tromey@redhat.com>
5440
5441         * psympriv.h (struct partial_symbol) <unrelocated_address,
5442         address, set_address>: New methods.
5443         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5444         (fixup_psymbol_section, relocate_psymtabs): Update.
5445         (print_partial_symbols): Add 'objfile' parameter.  Update.
5446         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5447         Update.
5448
5449 2018-07-26  Tom Tromey  <tom@tromey.com>
5450
5451         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5452         (debug_names::write_psymbols): Update.
5453         * psympriv.h (struct partial_symbol): Derive from
5454         general_symbol_info.
5455         <obj_section>: New method.
5456         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5457         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5458         (find_pc_sect_psymbol, fixup_psymbol_section)
5459         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5460         (print_partial_symbols, recursively_search_psymtabs)
5461         (compare_psymbols, psymbol_hash, psymbol_compare)
5462         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5463         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5464
5465 2018-07-26  Tom Tromey  <tromey@redhat.com>
5466
5467         * dbxread.c (end_psymtab): Remove dead code.
5468
5469 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5470
5471         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5472         DWARF unwinders are disabled.
5473         * dwarf2-frame.c: Add dwarf2read.h include.
5474         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5475         disabled.
5476         (dwarf2_frame_unwinders_enabled_p): Define.
5477         (show_dwarf_unwinders_enabled_p): New function.
5478         (_initialize_dwarf2_frame): Register switch to control DWARF
5479         unwinder use.
5480         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5481         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5482         (show_dwarf_cmdlist): Remove static keyword.
5483         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5484         (show_dwarf_cmdlist): Declare.
5485         * NEWS: Document new feature.
5486
5487 2018-07-26  Tom de Vries  <tdevries@suse.de>
5488
5489         PR breakpoints/23366
5490         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5491
5492 2018-07-26  Tom de Vries  <tdevries@suse.de>
5493
5494         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5495         DW_AT_count can't be translated to a dynamic prop.
5496
5497 2018-07-25  Tom de Vries  <tdevries@suse.de>
5498
5499         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5500         try/catch.
5501
5502 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5503
5504         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5505
5506 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5507
5508         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5509
5510 2018-07-24  Keith Seitz  <keiths@redhat.comt
5511
5512         PR symtab/23010
5513         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5514         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5515         instead of add_symbol_to_list.
5516         (read_file_scope): Call prepare_one_comp_unit before reading
5517         any other DIEs.
5518
5519 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5520
5521         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5522
5523 2018-07-24  Tom Tromey  <tom@tromey.com>
5524
5525         * utils.c (malloc, realloc, free): Don't declare.
5526         * configure, config.in: Rebuild.
5527         * configure.ac: Don't check for declarations of free, malloc, or
5528         realloc.
5529
5530 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5531
5532         * aarch64-linux-nat.c
5533         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5534         variable.
5535         * arm-linux-nat.c (fetch_regs): Likewise.
5536         (store_regs): Likewise.
5537         (fetch_vfp_regs): Likewise.
5538         (store_vfp_regs): Likewise.
5539         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5540         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5541         (arm_linux_nat_target::insert_watchpoint): Likewise.
5542         (arm_linux_nat_target::remove_watchpoint): Likewise.
5543         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5544         Likewise.
5545         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5546         Likewise.
5547         * ppc-linux-nat.c (fetch_register): Likewise.
5548         (fetch_all_gp_regs): Likewise.
5549         (fetch_ppc_registers): Likewise.
5550         (store_all_gp_regs): Likewise.
5551         (store_ppc_registers): Likewise.
5552         (hwdebug_insert_point): Likewise.
5553         (can_use_watchpoint_cond_accel): Likewise.
5554         * remote-sim.c (gdb_os_write_stdout): Likewise.
5555
5556 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5557             Tom Tromey  <tom@tromey.com>
5558
5559         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5560         test for it.
5561         * configure: Rebuild.
5562
5563 2018-07-22  Tom Tromey  <tom@tromey.com>
5564
5565         * regformats/regdat.sh: Define xmltarget_${name} inside
5566         #ifndef IN_PROCESS_AGENT.
5567
5568 2018-07-22  Tom Tromey  <tom@tromey.com>
5569
5570         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5571
5572 2018-07-22  Tom Tromey  <tom@tromey.com>
5573
5574         * symfile.c (reread_symbols): Notify iter, not objfile.
5575
5576 2018-07-22  Tom Tromey  <tom@tromey.com>
5577
5578         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5579         Use arch_ops.
5580         (ravenscar_thread_target::prepare_to_store): Likewise.
5581
5582 2018-07-22  Tom Tromey  <tom@tromey.com>
5583
5584         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5585         unused variable.  Call value_fetch_lazy when needed.
5586         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5587         Remove unused variable.  Call value_fetch_lazy when needed.
5588
5589 2018-07-22  Tom Tromey  <tom@tromey.com>
5590
5591         * m32c-tdep.c (mark_dma): Return void.
5592         (make_regs): Remove unused declarations.
5593
5594 2018-07-22  Tom Tromey  <tom@tromey.com>
5595
5596         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5597         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5598         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5599         bkscm_get_valid_block_smob_arg_unsafe for effect.
5600
5601 2018-07-22  Tom Tromey  <tom@tromey.com>
5602
5603         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5604         value_type.
5605
5606 2018-07-22  Tom Tromey  <tom@tromey.com>
5607
5608         * windows-nat.c (saved_context): Conditionally define.
5609         * remote.c (remote_target::remote_btrace_maybe_reopen):
5610         Conditionally declare "warned".
5611         * inflow.c (sigquit_ours): Conditionally define.
5612         (new_tty): Move "tty" declaration inside #if.
5613         * guile/guile.c (guile_datadir): Conditionally define.
5614         * charset.c (set_be_le_names): Move some declarations inside #if.
5615         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5616         #if.
5617         (parse_xml_btrace_conf): Likewise.
5618
5619 2018-07-22  Tom Tromey  <tom@tromey.com>
5620
5621         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5622
5623 2018-07-22  Tom Tromey  <tom@tromey.com>
5624
5625         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5626         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5627         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5628         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5629         * stack.c (frame_apply_level_command): Remove unused variable.
5630         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5631         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5632         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5633         unused variable.
5634         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5635         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5636         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5637         variable.
5638         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5639         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5640         variable.
5641         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5642         Remove unused variable.
5643         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5644         variable.
5645         * common/tdesc.c (print_xml_feature::visit): Remove unused
5646         variable.
5647         * compile/compile-object-load.c (store_regs): Remove unused
5648         variables.
5649         * complaints.c (clear_complaints): Remove unused variable.
5650         * corelow.c (core_target_open): Remove unused variable.
5651         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5652         variable.
5653         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5654         variable.
5655         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5656         variable.
5657         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5658         variable.
5659         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5660         variable.
5661         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5662         variable.
5663         * ia64-tdep.c (examine_prologue): Remove unused variable.
5664         * infcall.c (run_inferior_call): Remove unused variable.
5665         * inferior.c (exit_inferior): Remove unused variable.
5666         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5667         * linespec.c (decode_line_2): Remove unused variable.
5668         * linux-nat.c (super_close): Remove.
5669         * linux-tdep.c (linux_info_proc): Remove unused variable.
5670         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5671         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5672         Remove unused variable.
5673         * parse.c (find_minsym_type_and_address): Remove unused variable.
5674         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5675         variable.
5676         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5677         variable.
5678         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5679         variables.
5680         * record-btrace.c (record_btrace_target::store_registers): Remove
5681         unused variable.
5682         (cmd_show_record_btrace_cpu): Remove unused variable.
5683         * riscv-tdep.c (riscv_register_reggroup_p)
5684         (riscv_push_dummy_call, riscv_return_value): Remove unused
5685         variable.
5686         * rust-exp.y (literal): Remove unused variable.
5687         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5688         unused variable.
5689         <STRUCTOP_ANONYMOUS>: Likewise.
5690         * s390-linux-tdep.c (s390_linux_init_abi_31)
5691         (s390_linux_init_abi_64): Remove unused variable.
5692         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5693         (file_select_thread, net_windows_open, _initialize_ser_windows):
5694         Remove unused variables.
5695         * symtab.c (find_pc_sect_line): Remove unused variable.
5696         * target-memory.c (compute_garbled_blocks): Remove unused
5697         variable.
5698         (target_write_memory_blocks): Remove unused variable.
5699         * target.c (target_stack::unpush): Remove unused variables.
5700         * tracepoint.c (start_tracing, all_tracepoint_actions)
5701         (merge_uploaded_trace_state_variables)
5702         (print_one_static_tracepoint_marker): Remove unused variable.
5703         * unittests/basic_string_view/element_access/char/1.cc (test01):
5704         Remove unused variable.
5705         * windows-nat.c (windows_continue, windows_add_all_dlls)
5706         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5707         Remove unused variables.
5708
5709 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5710
5711         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5712         attr_profile in HAVE_ELF.
5713         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5714         HAVE_ELF.
5715
5716 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5717
5718         * frame.c (frame_register_unwind): Change parameter name.
5719         (frame_unwind_register): Likewise.
5720         (frame_unwind_register_value): Likewise.
5721         (frame_unwind_register_signed): Likewise.
5722         (frame_unwind_register_unsigned): Likewise.
5723         * frame.h (frame_register_unwind): Likewise.
5724         (frame_unwind_register): Likewise.
5725         (frame_unwind_register_value): Likewise.
5726         (frame_unwind_register_signed): Likewise.
5727         (frame_unwind_register_unsigned): Likewise.
5728         (frame_unwind_arch): Likewise.
5729
5730 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5731
5732         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5733         ISA maintenance.
5734
5735 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5736
5737         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5738         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5739         hand.
5740
5741 2018-07-20  Keith Seitz  <keiths@redhat.com>
5742
5743         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5744         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5745         m_compunit_symtab, m_language>: Add "m_" prefix.
5746         Update all uses.
5747         * buildsym.c: Update all uses.
5748
5749 2018-07-20  Tom Tromey  <tom@tromey.com>
5750
5751         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5752         * buildsym.h (record_line_ftype): Remove typedef.
5753
5754 2018-07-20  Tom Tromey  <tom@tromey.com>
5755
5756         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5757         (end_expandable_symtab): Likewise.
5758         (end_symtab_get_static_block): Likewise.
5759         (end_symtab_from_static_block): Likewise.
5760         * buildsym-legacy.c (augment_type_symtab): Remove.
5761         (end_expandable_symtab): Remove.
5762         (end_symtab_get_static_block): Remove.
5763         (end_symtab_from_static_block): Remove.
5764
5765 2018-07-20  Tom Tromey  <tom@tromey.com>
5766
5767         * dwarf2read.c: Include buildsym.h.
5768         (struct dwarf2_cu) <builder>: New method.
5769         (fixup_go_packaging): Update.
5770         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5771         use scoped_free_pendings.
5772         (using_directives): Add "cu" parameter, remove "language".
5773         (read_import_statement, setup_type_unit_groups, )
5774         (read_func_scope, read_lexical_block_scope)
5775         (dwarf2_record_block_ranges, read_namespace): Update.
5776         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5777         (lnp_state_machine::handle_end_sequence): Update.
5778         (class lnp_state_machine) <m_cu>: New member.
5779         <m_record_line_callback>: Remove.
5780         <m_currently_recording_lines>: New member.
5781         (lnp_state_machine::handle_set_file): Update.
5782         (noop_record_line): Remove.
5783         (dwarf_record_line_p): Add cu parameter.
5784         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5785         (lnp_state_machine::record_line)
5786         (lnp_state_machine::lnp_state_machine)
5787         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5788         (dwarf_decode_lines): Update.
5789         (dwarf2_start_subfile): Add cu parameter.
5790         (dwarf2_start_symtab, new_symbol): Update.
5791         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5792         Remove dwarf2_per_objfile parameter.
5793         (dwarf_decode_macros): Update.
5794
5795 2018-07-20  Tom Tromey  <tom@tromey.com>
5796
5797         * stabsread.c (define_symbol): Update.
5798         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5799         * dwarf2read.c (new_symbol): Update.
5800         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5801         * cp-namespace.c: Include buildsym.h.
5802         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5803         * buildsym-legacy.c (get_buildsym_compunit): New function.
5804
5805 2018-07-20  Tom Tromey  <tom@tromey.com>
5806
5807         * xcoffread.c: Include buildsym-legacy.h.
5808         * windows-nat.c: Include buildsym-legacy.h.
5809         * stabsread.c: Include buildsym-legacy.h.
5810         * mdebugread.c: Include buildsym-legacy.h.
5811         * buildsym-legacy.h: New file.
5812         * buildsym-legacy.c: New file, from buildsym.c.
5813         * go32-nat.c: Include buildsym-legacy.h.
5814         * dwarf2read.c: Include buildsym-legacy.h.
5815         * dbxread.c: Include buildsym-legacy.h.
5816         * cp-namespace.c: Include buildsym-legacy.h.
5817         * coffread.c: Include buildsym-legacy.h.
5818         * buildsym.h: Move some contents to buildsym-legacy.h.
5819         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5820         buildsym-legacy.c.
5821         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5822
5823 2018-07-20  Tom Tromey  <tom@tromey.com>
5824
5825         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5826         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5827         (buildsym_compunit::buildsym_compunit)
5828         (buildsym_compunit::~buildsym_compunit)
5829         (buildsym_compunit::get_macro_table): Define.
5830
5831 2018-07-20  Tom Tromey  <tom@tromey.com>
5832
5833         * buildsym.c (reset_symtab_globals): Remove.
5834         (buildsym_compunit::end_symtab_from_static_block): Update.
5835         (buildsym_compunit::augment_type_symtab): Update.
5836         (end_symtab_from_static_block): Call free_buildsym_compunit.
5837         (augment_type_symtab, end_symtab, end_expandable_symtab):
5838         Likewise.
5839
5840 2018-07-20  Tom Tromey  <tom@tromey.com>
5841
5842         * arch-utils.c: Do not include buildsym.h.
5843         * mipsread.c: Do not include buildsym.h.
5844         * machoread.c: Do not include buildsym.h.
5845         * elfread.c: Do not include buildsym.h.
5846
5847 2018-07-20  Tom Tromey  <tom@tromey.com>
5848
5849         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5850         initialization.
5851         (buildsym_compunit): Add new constructor.
5852         (struct buildsym_compunit) <get_last_source_file, finish_block,
5853         record_block_range, start_subfile, patch_subfile_names,
5854         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5855         set_last_source_start_addr, get_last_source_start_addr,
5856         get_local_using_directives, set_local_using_directives,
5857         get_global_using_directives, outermost_context_p,
5858         get_current_context_stack, get_context_stack_depth,
5859         get_current_subfile, get_local_symbols, get_file_symbols,
5860         get_global_symbols, record_debugformat, record_producer,
5861         push_context, pop_context, end_symtab_get_static_block,
5862         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5863         New public methods.
5864         <record_pending_block, finish_block_internal, make_blockvector,
5865         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5866         private methods.
5867         Update all users.
5868
5869 2018-05-22  Tom Tromey  <tom@tromey.com>
5870
5871         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5872         parameter.
5873         (finish_block_internal): Update.
5874
5875 2018-07-20  Tom Tromey  <tom@tromey.com>
5876
5877         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5878         parameter.
5879         (finish_block_internal): Update.
5880
5881 2018-07-20  Tom Tromey  <tom@tromey.com>
5882
5883         * buildsym.h (EXTERN): Don't define or undef.
5884         * buildsym.c (EXTERN): Don't define.
5885
5886 2018-07-20  Tom Tromey  <tom@tromey.com>
5887
5888         * buildsym.c: Remove TODO comment.
5889
5890 2018-07-20  Tom Tromey  <tom@tromey.com>
5891
5892         * coffread.c (coff_symtab_read): Update.
5893         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5894         (xcoff_new_init): Update.
5895         * mipsread.c (mipscoff_new_init): Update.
5896         * mdebugread.c (mdebug_build_psymtabs): Update.
5897         * elfread.c (elf_new_init): Update.
5898         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5899         Update.
5900         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5901         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5902         (stabsect_build_psymtabs): Update.
5903         * buildsym.h (buildsym_init): Don't declare.
5904         * buildsym.c: Update comment.
5905         (prepare_for_building): Remove.
5906         (start_symtab, restart_symtab): Update.
5907         (reset_symtab_globals): Update comment.
5908         (buildsym_init): Remove.
5909
5910 2018-07-20  Tom Tromey  <tom@tromey.com>
5911
5912         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5913         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5914         (read_enum_type, common_block_start, common_block_end)
5915         (cleanup_undefined_types_1, finish_global_stabs): Update.
5916         * mdebugread.c (psymtab_to_symtab_1): Update.
5917         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5918         (read_lexical_block_scope, new_symbol): Update.
5919         * dbxread.c (process_one_symbol): Update.
5920         * coffread.c (coff_symtab_read, process_coff_symbol)
5921         (coff_read_enum_type): Update.
5922         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5923         declare.
5924         (get_local_symbols, get_file_symbols, get_global_symbols): New
5925         functions.
5926         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5927         m_global_symbols.
5928         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5929         (~scoped_free_pendings): Update.
5930         (finish_block, prepare_for_building, reset_symtab_globals)
5931         (end_symtab_get_static_block, end_symtab_with_blockvector)
5932         (augment_type_symtab, push_context): Update.
5933         (get_local_symbols, get_file_symbols, get_global_symbols): New
5934         functions.
5935         (buildsym_init): Update.
5936
5937 2018-07-20  Tom Tromey  <tom@tromey.com>
5938
5939         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5940         (process_full_type_unit): Likewise.
5941         (dwarf2_start_symtab): Set list_in_scope.
5942
5943 2018-07-20  Tom Tromey  <tom@tromey.com>
5944
5945         * dwarf2read.c (process_psymtab_comp_unit_reader)
5946         (build_type_psymtabs_reader): Do not set list_in_scope.
5947
5948 2018-07-20  Tom Tromey  <tom@tromey.com>
5949
5950         * buildsym.c (free_pendings): Remove.
5951         (add_symbol_to_list, scoped_free_pendings)
5952         (finish_block_internal, buildsym_init): Update.
5953
5954 2018-07-20  Tom Tromey  <tom@tromey.com>
5955
5956         * xcoffread.c (read_xcoff_symtab): Update.
5957         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5958         Update.
5959         * dbxread.c (process_one_symbol): Update.
5960         * coffread.c (coff_symtab_read): Update.
5961         * buildsym.h (finish_block): Update.
5962         * buildsym.c (finish_block): Remove "listhead" argument.
5963         (end_symtab_get_static_block): Update.
5964
5965 2018-07-20  Tom Tromey  <tom@tromey.com>
5966
5967         * buildsym.h (class scoped_free_pendings): Remove constructor.
5968         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5969         method.
5970         <m_pending_block_obstack, m_pending_blocks>: New members.
5971         (pending_block_obstack, pending_blocks): Remove.
5972         (scoped_free_pendings::scoped_free_pendings): Default.
5973         (~scoped_free_pendings): Update.
5974         (free_pending_blocks): Remove.
5975         (finish_block_internal, record_pending_block, make_blockvector)
5976         (end_symtab_get_static_block, augment_type_symtab, push_context)
5977         (buildsym_init): Update.
5978
5979 2018-07-20  Tom Tromey  <tom@tromey.com>
5980
5981         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5982         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5983         members.
5984         (pending_addrmap, pending_addrmap_obstack)
5985         (pending_addrmap_interesting): Remove.
5986         (scoped_free_pendings, record_block_range, make_blockvector)
5987         (prepare_for_building, reset_symtab_globals, buildsym_init):
5988         Update.
5989
5990 2018-07-20  Tom Tromey  <tom@tromey.com>
5991
5992         * xcoffread.c (process_linenos): Update.
5993         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5994         * mdebugread.c (psymtab_to_symtab_1): Update.
5995         * dwarf2read.c (setup_type_unit_groups)
5996         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5997         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5998         * dbxread.c (process_one_symbol): Update.
5999         * coffread.c (coff_symtab_read, enter_linenos)
6000         (process_coff_symbol): Update.
6001         * buildsym.h (current_subfile): Don't declare.
6002         (get_current_subfile): Declare.
6003         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6004         member.
6005         (start_subfile, free_buildsym_compunit, push_subfile)
6006         (prepare_for_building, start_symtab): Update.
6007         (get_current_subfile): New function.
6008
6009 2018-07-20  Tom Tromey  <tom@tromey.com>
6010
6011         * coffread.c (coff_symtab_read): Update.
6012         * xcoffread.c (read_xcoff_symtab): Update.
6013         * dwarf2read.c (new_symbol): Update.
6014         (read_func_scope, read_lexical_block_scope): Update.
6015         * dbxread.c (process_one_symbol): Update.
6016         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6017         (outermost_context_p): Remove macro.
6018         (outermost_context_p, get_current_context_stack)
6019         (get_context_stack_depth): Declare.
6020         (pop_context): Return struct context_stack.
6021         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6022         member.
6023         (context_stack_size): Remove.
6024         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6025         (prepare_for_building, end_symtab_get_static_block)
6026         (augment_type_symtab, push_context): Update.
6027         (pop_context): Return struct context_stack.
6028         (outermost_context_p, get_current_context_stack)
6029         (get_context_stack_depth): New functions.
6030         (buildsym_init): Update.
6031
6032 2018-07-20  Tom Tromey  <tom@tromey.com>
6033
6034         * rust-exp.y: Now a pure parser.  Update all rules.
6035         (%union): Move earlier.
6036         (current_parser, work_obstack): Remove globals.
6037         (rust_parser, ~rust_parser): Update.
6038         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6039         lex_character, lex_number, lex_string, lex_identifier,
6040         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6041         convert_name, convert_params_to_expression,
6042         convert_ast_to_expression, ast_basic_type, ast_operation,
6043         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6044         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6045         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6046         ast_array_type, ast_slice_type, ast_reference_type,
6047         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6048         (rust_parse): Update.
6049         (rustyyerror, rustyylex): Add parser parameter.
6050         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6051         (rust_lex_stringish_test, rust_lex_test_sequence)
6052         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6053         (rust_lex_test_push_back, rust_lex_tests): Update.
6054
6055 2018-07-19  Pedro Alves  <palves@redhat.com>
6056
6057         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6058         gdb::unique_xmalloc_ptr.
6059         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6060         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6061         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6062         copy-initialization.
6063         * guile/scm-pretty-print.c (ppscm_print_children): Use
6064         gdb::unique_xmalloc_ptr instead of cleanups.
6065         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6066         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6067         gdb::unique_xmalloc_ptr.
6068         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6069         Adjust to use gdb::unique_xmalloc_ptr.
6070         * guile/scm-utils.c (extract_arg): Adjust.
6071         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6072         gdb::unique_xmalloc_ptr instead of a cleanup.
6073
6074 2018-07-19  Tom Tromey  <tom@tromey.com>
6075
6076         * utils.c (do_value_free_to_mark)
6077         (make_cleanup_value_free_to_mark): Remove.
6078         * utils.h (make_cleanup_value_free_to_mark): Remove.
6079
6080 2018-07-19  Pedro Alves  <palves@redhat.com>
6081
6082         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6083         forwarding reference.
6084
6085 2018-07-18  Pedro Alves  <palves@redhat.com>
6086
6087         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6088         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6089         cleanup.
6090
6091 2018-07-18  Pedro Alves  <palves@redhat.com>
6092
6093         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6094         exceptions.
6095         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6096         (gdbscm_wrap): New.
6097         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6098         directly instead of a cleanup.
6099         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6100         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6101         (vlscm_binop_gdbthrow): New, factored out from ...
6102         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6103         (vlscm_rich_compare): Use gdbscm_wrap.
6104         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6105         instead of a cleanup.
6106         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6107         cleanup.
6108         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6109         Use xfree directly instead of a cleanup.
6110         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6111         Adjust to use gdbscm_wrap and scoped_value_mark.
6112         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6113         (gdbscm_value_address, gdbscm_value_dereference)
6114         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6115         scoped_value_mark.
6116         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6117         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6118         scoped_value_mark.
6119         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6120         gdbscm_wrap and scoped_value_mark.
6121         (gdbscm_value_to_string): Use xfree directly instead of a
6122         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6123         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6124         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6125         scoped_value_mark.
6126         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6127         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6128         scoped_value_mark.
6129         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6130         gdbscm_wrap.
6131
6132 2018-07-18  Tom de Vries  <tdevries@suse.de>
6133
6134         * findvar.c (default_read_var_value): Also resolve dynamic type for
6135         LOC_OPTIMIZED_OUT vars.
6136
6137 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6138
6139         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6140         decoding.
6141
6142 2018-07-17  Tom Tromey  <tom@tromey.com>
6143
6144         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6145         (compute_enum_list, pascm_set_param_value_x)
6146         (gdbscm_parameter_value): Update.
6147         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6148         (gdbscm_scm_to_host_string): Update.
6149         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6150         Update.
6151         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6152         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6153         * guile/scm-string.c (gdbscm_scm_to_string): Return
6154         unique_xmalloc_ptr.
6155         (gdbscm_scm_to_host_string): Likewise.
6156
6157 2018-07-17  Tom Tromey  <tom@tromey.com>
6158
6159         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6160         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6161         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6162         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6163         unique_xmalloc_ptr.
6164
6165 2018-07-17  Tom Tromey  <tom@tromey.com>
6166
6167         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6168         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6169         Update.
6170         * guile/scm-cmd.c (cmdscm_function): Update.
6171         * guile/scm-pretty-print.c
6172         (ppscm_print_exception_unless_memory_error): Update.
6173         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6174         Return unique_xmalloc_ptr.
6175
6176 2018-07-17  Tom Tromey  <tom@tromey.com>
6177
6178         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6179         Use string_printf.
6180
6181 2018-07-17  Jim Wilson  <jimw@sifive.com>
6182
6183         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6184         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6185         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6186         unecessary braces after EF_RISCV_RVC test.  Delete call to
6187         set_gdbarch_decr_pc_after_break.
6188
6189         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6190         RISCV_LAST_FP_REGNUM + 1.
6191         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6192
6193 2018-07-17  Tom Tromey  <tom@tromey.com>
6194
6195         * configure.ac: Remove --disable-gdbcli.
6196         * configure: Rebuild.
6197         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6198         (SUBDIR_CLI_CFLAGS): Remove.
6199         (SFILES): Use SUBDIR_CLI_SRCS.
6200         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6201
6202 2018-07-17  Tom Tromey  <tom@tromey.com>
6203
6204         PR gdb/18624:
6205         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6206
6207 2018-07-16  Jim Wilson  <jimw@sifive.com>
6208
6209         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6210
6211 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6212
6213         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6214         variable.
6215         (libunwind_frame_sniffer): Likewise.
6216         (libunwind_frame_prev_register): Likewise.
6217         (libunwind_sigtramp_frame_sniffer): Likewise.
6218         * ia64-tdep.c (ia64_access_reg): Likewise.
6219         (ia64_access_rse_reg): Likewise.
6220         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6221         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6222
6223 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6224
6225         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6226
6227 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6228
6229         * remote-sim.c (gdbsim_target::close,
6230         gdbsim_target::mourn_inferior): Remove unused variables.
6231
6232 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6233
6234         * ia64-tdep.c (ktab_buf): New global.
6235         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6236         (get_kernel_table): Adjust.
6237
6238 2018-07-16  Tom Tromey  <tom@tromey.com>
6239
6240         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6241         * dwarf2read.c (using_directives, new_symbol): Use
6242         outermost_context_p.
6243         * dbxread.c (process_one_symbol): Use outermost_context_p.
6244         * coffread.c (coff_symtab_read): Use outermost_context_p.
6245
6246 2018-07-16  Tom Tromey  <tom@tromey.com>
6247
6248         * dwarf2read.c (using_directives, read_func_scope)
6249         (read_lexical_block_scope): Update.
6250         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6251         * buildsym.h (local_using_directives, global_using_directives):
6252         Don't declare.
6253         (get_local_using_directives, set_local_using_directives)
6254         (get_global_using_directives): Declare.
6255         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6256         m_global_using_directives>: New members.
6257         (finish_block_internal, prepare_for_building)
6258         (reset_symtab_globals, end_symtab_get_static_block)
6259         (push_context): Update.
6260         (get_local_using_directives, set_local_using_directives)
6261         (get_global_using_directives): New functions.
6262         (buildsym_init): Update.
6263
6264 2018-07-16  Tom Tromey  <tom@tromey.com>
6265
6266         * xcoffread.c (xcoff_initial_scan): Don't call
6267         free_pending_blocks.
6268         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6269         * buildsym.h (class scoped_free_pendings): Add constructor.
6270         (free_pending_blocks): Don't declare.
6271         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6272         (free_pending_blocks): Now static.
6273
6274 2018-07-16  Tom Tromey  <tom@tromey.com>
6275
6276         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6277         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6278         member.
6279         (struct subfile_stack): Remove.
6280         (subfile_stack): Remove.
6281         (push_subfile, pop_subfile, buildsym_init): Update.
6282
6283 2018-07-16  Tom Tromey  <tom@tromey.com>
6284
6285         * buildsym.c (push_subfile): Use gdb_assert.
6286         (pop_subfile): Use gdb_assert.
6287
6288 2018-07-16  Tom Tromey  <tom@tromey.com>
6289
6290         * buildsym.h (merge_symbol_lists): Remove.
6291         * buildsym.c (merge_symbol_lists): Remove.
6292
6293 2018-07-16  Tom Tromey  <tom@tromey.com>
6294
6295         * stabsread.c (scan_file_globals): Update comment.
6296         * stabsread.h (scan_file_globals): Move from buildsym.h.
6297         * buildsym.h (scan_file_globals): Move to stabsread.h.
6298
6299 2018-07-16  Tom Tromey  <tom@tromey.com>
6300
6301         * xcoffread.c (xcoff_new_init): Update.
6302         * mipsread.c (mipscoff_new_init): Update.
6303         * mdebugread.c (mdebug_build_psymtabs): Update.
6304         * elfread.c (elf_new_init): Update.
6305         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6306         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6307         * buildsym.h (buildsym_new_init): Don't declare.
6308         * buildsym.c (buildsym_new_init): Remove.
6309
6310 2018-07-16  Tom Tromey  <tom@tromey.com>
6311
6312         * stabsread.h (within_function): Move from buildsym.h.
6313         * stabsread.c (start_stabs): Clear within_function.
6314         * coffread.c (coff_start_symtab): Clear within_function.
6315         * buildsym.h (within_function): Move to stabsread.h.
6316         * buildsym.c (prepare_for_building): Update.
6317
6318 2018-07-16  Tom Tromey  <tom@tromey.com>
6319
6320         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6321         * dwarf2read.c (dwarf2_start_symtab): Don't set
6322         processing_gcc_compilation.
6323         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6324
6325 2018-07-16  Tom Tromey  <tom@tromey.com>
6326
6327         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6328         (next_symbol_text_func): Move from buildsym.h.
6329         * stabsread.c (hashname): Move from buildsym.c.
6330         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6331         (next_symbol_text_func, hashname): Move to stabsread.h.
6332         * buildsym.c: Don't include bcache.h
6333         (hashname): Move to stasbread.c.
6334
6335 2018-07-16  Tom Tromey  <tom@tromey.com>
6336
6337         * buildsym.h (context_stack_size): Don't declare.
6338         * buildsym.c (context_stack_size): New global.
6339
6340 2018-07-16  Tom Tromey  <tom@tromey.com>
6341
6342         * dbxread.c (processing_acc_compilation): New global.
6343         * buildsym.h (processing_acc_compilation): Don't declare.
6344
6345 2018-07-16  Tom Tromey  <tom@tromey.com>
6346
6347         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6348         * dbxread.c (read_ofile_symtab): Update.
6349         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6350         * buildsym.h (last_source_start_addr): Remove.
6351         (set_last_source_start_addr, get_last_source_start_addr):
6352         Declare.
6353         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6354         parameter.
6355         (struct buildsym_compunit) <m_last_source_start_addr>: New
6356         member.
6357         (prepare_for_building): Remove start_addr parameter.
6358         (start_symtab, restart_symtab, end_symtab_get_static_block)
6359         (end_symtab_with_blockvector): Update.
6360         (set_last_source_start_addr, get_last_source_start_addr): New
6361         functions.
6362
6363 2018-07-16  Tom Tromey  <tom@tromey.com>
6364
6365         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6366         member.
6367         (have_line_numbers): Remove.
6368         (record_line, prepare_for_building, end_symtab_get_static_block)
6369         (augment_type_symtab): Update.
6370
6371 2018-07-16  Tom Tromey  <tom@tromey.com>
6372
6373         * buildsym.c (~buildsym_compunit): Free the macro table.
6374         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6375         methods.
6376         <m_pending_macros>: New member.
6377         (pending_macros): Remove.
6378         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6379         (reset_symtab_globals, end_symtab_get_static_block)
6380         (end_symtab_with_blockvector, augment_type_symtab)
6381         (buildsym_init): Update.
6382
6383 2018-07-16  Tom Tromey  <tom@tromey.com>
6384
6385         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6386         parameter.
6387         (buildsym_compunit::set_last_source_file): New method.
6388         <m_last_source_file>: New member.
6389         (prepare_for_building): Remove "name" parameter.
6390         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6391         (last_source_file): Remove.
6392         (set_last_source_file, get_last_source_file): Update.
6393
6394 2018-07-16  Tom Tromey  <tom@tromey.com>
6395
6396         * buildsym.c (prepare_for_building): Add assert.
6397
6398 2018-07-16  Tom Tromey  <tom@tromey.com>
6399
6400         * buildsym.c (~buildsym_compunit): Update.
6401         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6402         (start_subfile, patch_subfile_names)
6403         (end_symtab_with_blockvector): Update.
6404
6405 2018-07-16  Tom Tromey  <tom@tromey.com>
6406
6407         * buildsym.c (struct buildsym_compunit): Add constructor,
6408         destructor, initializers.
6409         (start_buildsym_compunit): Remove.
6410         (free_buildsym_compunit): Use "delete".
6411         (start_symtab, restart_symtab): Use "new".
6412
6413 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6414
6415         * symfile.c (set_objfile_default_section_offset): Remove struct
6416         keyword.
6417
6418 2018-07-14  Stafford Horne  <shorne@gmail.com>
6419
6420         * (Responsible Maintainers): Add myself as or1k maintainer.
6421
6422 2018-07-13  Tom Tromey  <tom@tromey.com>
6423
6424         * symfile.c (set_objfile_default_section_offset): Use extra braces
6425         around initializer.
6426
6427 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6428
6429         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6430         non-branching basr.
6431
6432 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6433
6434         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6435         unittests/cli-utils-selftests.c
6436         * unittests/cli-utils-selftests.c: New file.
6437
6438 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6439
6440         * NEWS: Mention new commands. Mention change to 'thread apply'.
6441
6442 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6443
6444         * thread.c (thr_try_catch_cmd): New function.
6445         (thread_apply_all_command): Handle qcs flags.
6446         (thread_apply_command): Handle qcs flags.
6447         (taas_command): New function.
6448         (tfaas_command): New function.
6449         (_initialize_thread): Update to setup the new commands 'taas
6450         and 'tfaas'. Change doc string for 'thread apply'.
6451
6452 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6453
6454         * stack.c: (trailing_outermost_frame): New function, mostly
6455         extracted from backtrace_command_1.
6456         (leading_innermost_frame): New function.
6457         (backtrace_command_1): Update to call trailing_outermost_frame.
6458         (frame_apply_command_count): New function.
6459         (frame_apply_level_command): New function.
6460         (frame_apply_all_command): New function.
6461         (frame_apply_command): New function.
6462         (faas_command): New function.
6463         (frame_cmd_list): New variable.
6464         (_initialize_stack): Update to setup the new commands 'frame apply'
6465         and 'faas'.
6466
6467 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6468
6469         * cli-utils.c (number_or_range_parser::get_number): Only handle
6470         numbers or convenience var as numbers.
6471         (parse_flags): New function.
6472         (parse_flags_qcs): New function.
6473         (number_or_range_parser::finished): Ensure parsing end is detected
6474         before end of string.
6475         * cli-utils.h (parse_flags): New function.
6476         (parse_flags_qcs): New function.
6477         (number_or_range_parser): Remove m_finished bool.
6478         (number_or_range_parser::skip_range): Set m_in_range to false.
6479
6480 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6481
6482         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6483         on Windows.
6484
6485 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6486             Jan Kratochvil  <jan.kratochvil@redhat.com>
6487             Paul Fertser  <fercerpav@gmail.com>
6488             Tsutomu Seki  <sekiriki@gmail.com>
6489             Pedro Alves  <palves@redhat.com>
6490
6491         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6492         'unittests/parse-connection-spec-selftests.c'.
6493         (COMMON_SFILES): Add 'common/netstuff.c'.
6494         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6495         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6496         * common/netstuff.c: New file.
6497         * common/netstuff.h: New file.
6498         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6499         (wait_for_connect): Update comment.  New parameter
6500         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6501         Use 'sock' directly instead of 'scb->fd'.
6502         (try_connect): New function, with code from 'net_open'.
6503         (net_open): Rewrite main loop to deal with multiple
6504         sockets/addresses.  Handle IPv6-style hostnames; implement
6505         support for IPv6 connections.
6506         * unittests/parse-connection-spec-selftests.c: New file.
6507
6508 2018-07-11  Pedro Alves  <palves@redhat.com>
6509
6510         PR gdb/23377
6511         * remote.c (remote_target::remote_detach_pid): Call
6512         set_current_process.
6513
6514 2018-07-11  Pedro Alves  <palves@redhat.com>
6515
6516         * h8300-tdep.c (h8300_gdbarch_init): Remove
6517         set_gdbarch_ecoff_reg_to_regnum calls.
6518
6519 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6520
6521         PR c++/23373
6522         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6523         offsets/sizes for static members of a class/struct.
6524
6525 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6526
6527         * target-descriptions.c (tdesc_register_bitsize): Rename.
6528         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6529         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6530         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6531
6532 2018-07-10  Tom Tromey  <tom@tromey.com>
6533
6534         * breakpoint.c (moribund_locations): Now static and a
6535         std::vector.
6536         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6537         (build_bpstat_chain, update_global_location_list)
6538         (breakpoint_retire_moribund): Update.
6539         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6540         VEC.
6541
6542 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6543
6544         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6545         (riscv_register_reggroup_p): Use new function, remove unneeded
6546         parenthesis.
6547         (riscv_push_dummy_call): Extend assert to compare against xlen or
6548         flen based on register type.
6549
6550 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6551
6552         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6553
6554 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6555
6556         * remote.c (show_hardware_watchpoint_limit): New function.
6557         (show_hardware_watchpoint_length_limit): New function.
6558         (show_hardware_breakpoint_limit): New function.
6559         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6560         where appropriate, update help text.
6561
6562 2018-07-09  Tom Tromey  <tom@tromey.com>
6563
6564         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6565         (CLIBS): Don't mention NAT_CLIBS.
6566
6567 2018-07-09  Tom Tromey  <tom@tromey.com>
6568
6569         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6570         (LIBGDB_OBS, clean mostlyclean): Update.
6571         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6572
6573 2018-07-09  Tom Tromey  <tom@tromey.com>
6574
6575         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6576         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6577         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6578
6579 2018-07-09  Tom Tromey  <tom@tromey.com>
6580
6581         * Makefile.in (ALLDEPFILES): Remove exec.c.
6582         (COMMON_OBS): Remove exec.o.
6583         (COMMON_SFILES): Add exec.c.
6584
6585 2018-07-09  Tom Tromey  <tom@tromey.com>
6586
6587         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6588
6589 2018-07-09  Tom Tromey  <tom@tromey.com>
6590
6591         * Makefile.in (clean mostlyclean): Remove stamp-version.
6592         (version.c): Depend on stamp-version.
6593         (stamp-version): New rule, from version.c rule.
6594
6595 2018-07-09  Tom Tromey  <tom@tromey.com>
6596
6597         * Makefile.in (init.c): Depend on stamp-init.
6598         (stamp-init): New rule, from init.c rule.
6599         (clean mostlyclean): Remove stamp-init.
6600
6601 2018-07-09  Tom Tromey  <tom@tromey.com>
6602
6603         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6604         SUBDIR_GCC_COMPILE_SRCS.
6605
6606 2018-07-09  Tom Tromey  <tom@tromey.com>
6607
6608         * Makefile.in (init.c): Remove some unused sed rules.
6609
6610 2018-07-09  Tom Tromey  <tom@tromey.com>
6611
6612         * Makefile.in (TSOBS): Remove.
6613         (INIT_FILES): Update.
6614         (LIBGDB_OBS): Update.
6615         (COMMON_SFILES): Add inflow.c.
6616         (SFILES): Remove inflow.c.
6617
6618 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6619
6620         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6621
6622 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6623
6624         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6625         get_saveloc_name, is_signal_frame_name, step_name,
6626         init_remote_name, create_addr_space_name,
6627         destroy_addr_space_name, search_unwind_table_name,
6628         find_dyn_list_name): Constify.
6629
6630 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6631
6632         * darwin-nat.c (darwin_pthread_kill): New function.
6633         (darwin_resume_thread): Use darwin_pthread_kill.
6634
6635 2018-07-05  Tom de Vries  <tdevries@suse.de>
6636
6637         * macroexp.c (macro_buffer) <operator=>: New member function.
6638
6639 2018-07-04  Tom Tromey  <tom@tromey.com>
6640
6641         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6642
6643 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6644
6645         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6646         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6647         * maint.c: Likewise.
6648         * top.c: Likewise.
6649
6650 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6651
6652         * NEWS: Create a new section for the next release branch.
6653         Rename the section of the current branch, now that it has
6654         been cut.
6655
6656 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6657
6658         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6659         * version.in: Bump version to 8.2.50.DATE-git.
6660
6661 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6662             Pedro Alves  <palves@redhat.com>
6663
6664         * linux-nat.c (linux_init_ptrace): Rename to ...
6665         (linux_init_ptrace_procfs): ... this.  Call
6666         linux_proc_init_warnings.
6667         (linux_nat_target::post_attach)
6668         (linux_nat_target::post_startup_inferior): Adjust.
6669         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6670         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6671
6672 2018-07-04  Tom de Vries  <tdevries@suse.de>
6673
6674         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6675         check ...
6676         (read_comp_unit_head): ... here.
6677
6678 2018-07-03  Tom Tromey  <tom@tromey.com>
6679
6680         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6681         (stop_tracing, tstatus_command)
6682         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6683         (print_one_static_tracepoint_marker): Update.
6684         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6685         std::vector.
6686         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6687         VEC.
6688         (all_tracepoints, static_tracepoints_here): Return std::vector.
6689
6690 2018-07-03  Tom Tromey  <tom@tromey.com>
6691
6692         * common/ptid.c (ptid_equal): Remove.
6693         * common/ptid.h (ptid_equal): Don't declare.
6694         * ada-tasks.c: Update.
6695         * breakpoint.c: Update.
6696         * common/agent.c: Update.
6697         * corelow.c: Update.
6698         * darwin-nat-info.c: Update.
6699         * darwin-nat.c: Update.
6700         * dcache.c: Update.
6701         * dtrace-probe.c: Update.
6702         * dummy-frame.c: Update.
6703         * fbsd-nat.c: Update.
6704         * frame.c: Update.
6705         * gdbthread.h: Update.
6706         * gnu-nat.c: Update.
6707         * go32-nat.c: Update.
6708         * inf-loop.c: Update.
6709         * inf-ptrace.c: Update.
6710         * infcall.c: Update.
6711         * infcmd.c: Update.
6712         * inflow.c: Update.
6713         * infrun.c: Update.
6714         * linux-fork.c: Update.
6715         * linux-nat.c: Update.
6716         * linux-thread-db.c: Update.
6717         * mi/mi-cmd-var.c: Update.
6718         * mi/mi-interp.c: Update.
6719         * mi/mi-main.c: Update.
6720         * nto-procfs.c: Update.
6721         * ppc-linux-tdep.c: Update.
6722         * procfs.c: Update.
6723         * python/py-inferior.c: Update.
6724         * python/py-record-btrace.c: Update.
6725         * python/py-record.c: Update.
6726         * ravenscar-thread.c: Update.
6727         * regcache.c: Update.
6728         * remote-sim.c: Update.
6729         * remote.c: Update.
6730         * sol-thread.c: Update.
6731         * solib.c: Update.
6732         * target.c: Update.
6733         * tui/tui-stack.c: Update.
6734         * varobj.c: Update.
6735         * windows-nat.c: Update.
6736         * windows-tdep.c: Update.
6737
6738 2018-07-03  Tom Tromey  <tom@tromey.com>
6739
6740         * common/ptid.c (ptid_match): Remove.
6741         * common/ptid.h (ptid_match): Don't declare.
6742         * fbsd-nat.c: Update.
6743         * infcmd.c: Update.
6744         * infrun.c: Update.
6745         * linux-nat.c: Update.
6746         * record-btrace.c: Update.
6747         * regcache.c: Update.
6748         * remote.c: Update.
6749
6750 2018-07-03  Tom Tromey  <tom@tromey.com>
6751
6752         * common/ptid.c (ptid_tid_p): Remove.
6753         * common/ptid.h (ptid_tid_p): Don't declare.
6754         * sol-thread.c: Update.
6755
6756 2018-07-03  Tom Tromey  <tom@tromey.com>
6757
6758         * common/ptid.c (ptid_lwp_p): Remove.
6759         * common/ptid.h (ptid_lwp_p): Don't declare.
6760         * fbsd-nat.c: Update.
6761         * linux-nat.c: Update.
6762         * nat/linux-procfs.c: Update.
6763         * nat/x86-linux-dregs.c: Update.
6764         * sol-thread.c: Update.
6765
6766 2018-07-03  Tom Tromey  <tom@tromey.com>
6767
6768         * common/ptid.c (ptid_is_pid): Remove.
6769         * common/ptid.h (ptid_is_pid): Don't declare.
6770         * infrun.c: Update.
6771         * linux-nat.c: Update.
6772         * mi/mi-interp.c: Update.
6773         * remote.c: Update.
6774         * thread.c: Update.
6775
6776 2018-07-03  Tom Tromey  <tom@tromey.com>
6777
6778         * common/ptid.c (ptid_get_tid): Remove.
6779         * common/ptid.h (ptid_get_tid): Don't declare.
6780         * ada-tasks.c: Update.
6781         * aix-thread.c: Update.
6782         * bsd-uthread.c: Update.
6783         * darwin-nat.c: Update.
6784         * fbsd-nat.c: Update.
6785         * i386-darwin-nat.c: Update.
6786         * infrun.c: Update.
6787         * linux-tdep.c: Update.
6788         * nto-procfs.c: Update.
6789         * ppc-ravenscar-thread.c: Update.
6790         * python/py-infthread.c: Update.
6791         * ravenscar-thread.c: Update.
6792         * sol-thread.c: Update.
6793         * sparc-ravenscar-thread.c: Update.
6794         * windows-nat.c: Update.
6795
6796 2018-07-03  Tom Tromey  <tom@tromey.com>
6797
6798         * common/ptid.c (ptid_get_lwp): Remove.
6799         * common/ptid.h (ptid_get_lwp): Don't declare.
6800         * aarch64-linux-nat.c: Update.
6801         * ada-tasks.c: Update.
6802         * aix-thread.c: Update.
6803         * amd64-linux-nat.c: Update.
6804         * arm-linux-nat.c: Update.
6805         * corelow.c: Update.
6806         * fbsd-nat.c: Update.
6807         * fbsd-tdep.c: Update.
6808         * gnu-nat.c: Update.
6809         * i386-cygwin-tdep.c: Update.
6810         * i386-gnu-nat.c: Update.
6811         * i386-linux-nat.c: Update.
6812         * ia64-linux-nat.c: Update.
6813         * inf-ptrace.c: Update.
6814         * infrun.c: Update.
6815         * linux-fork.c: Update.
6816         * linux-nat.c: Update.
6817         * linux-tdep.c: Update.
6818         * linux-thread-db.c: Update.
6819         * mips-linux-nat.c: Update.
6820         * nat/aarch64-linux-hw-point.c: Update.
6821         * nat/aarch64-linux.c: Update.
6822         * nat/linux-btrace.c: Update.
6823         * nat/linux-osdata.c: Update.
6824         * nat/linux-procfs.c: Update.
6825         * nat/x86-linux-dregs.c: Update.
6826         * obsd-nat.c: Update.
6827         * ppc-fbsd-nat.c: Update.
6828         * ppc-linux-nat.c: Update.
6829         * procfs.c: Update.
6830         * python/py-infthread.c: Update.
6831         * ravenscar-thread.c: Update.
6832         * remote.c: Update.
6833         * s390-linux-nat.c: Update.
6834         * sol-thread.c: Update.
6835         * sol2-tdep.c: Update.
6836         * spu-linux-nat.c: Update.
6837         * x86-linux-nat.c: Update.
6838         * xtensa-linux-nat.c: Update.
6839
6840 2018-07-03  Tom Tromey  <tom@tromey.com>
6841
6842         * common/ptid.c (ptid_get_pid): Remove.
6843         * common/ptid.h (ptid_get_pid): Don't declare.
6844         * aarch64-linux-nat.c: Update.
6845         * ada-lang.c: Update.
6846         * aix-thread.c: Update.
6847         * alpha-bsd-nat.c: Update.
6848         * amd64-fbsd-nat.c: Update.
6849         * amd64-linux-nat.c: Update.
6850         * arm-linux-nat.c: Update.
6851         * arm-nbsd-nat.c: Update.
6852         * auxv.c: Update.
6853         * break-catch-syscall.c: Update.
6854         * breakpoint.c: Update.
6855         * bsd-uthread.c: Update.
6856         * corelow.c: Update.
6857         * ctf.c: Update.
6858         * darwin-nat.c: Update.
6859         * fbsd-nat.c: Update.
6860         * fbsd-tdep.c: Update.
6861         * gcore.c: Update.
6862         * gnu-nat.c: Update.
6863         * hppa-nbsd-nat.c: Update.
6864         * hppa-obsd-nat.c: Update.
6865         * i386-fbsd-nat.c: Update.
6866         * ia64-linux-nat.c: Update.
6867         * inf-ptrace.c: Update.
6868         * infcmd.c: Update.
6869         * inferior.c: Update.
6870         * inferior.h: Update.
6871         * inflow.c: Update.
6872         * infrun.c: Update.
6873         * linux-fork.c: Update.
6874         * linux-nat.c: Update.
6875         * linux-tdep.c: Update.
6876         * linux-thread-db.c: Update.
6877         * m68k-bsd-nat.c: Update.
6878         * mi/mi-interp.c: Update.
6879         * mi/mi-main.c: Update.
6880         * mips-linux-nat.c: Update.
6881         * mips-nbsd-nat.c: Update.
6882         * mips64-obsd-nat.c: Update.
6883         * nat/aarch64-linux-hw-point.c: Update.
6884         * nat/aarch64-linux.c: Update.
6885         * nat/linux-btrace.c: Update.
6886         * nat/linux-osdata.c: Update.
6887         * nat/linux-procfs.c: Update.
6888         * nat/x86-linux-dregs.c: Update.
6889         * nto-procfs.c: Update.
6890         * obsd-nat.c: Update.
6891         * ppc-linux-nat.c: Update.
6892         * ppc-nbsd-nat.c: Update.
6893         * ppc-obsd-nat.c: Update.
6894         * proc-service.c: Update.
6895         * procfs.c: Update.
6896         * python/py-inferior.c: Update.
6897         * python/py-infthread.c: Update.
6898         * ravenscar-thread.c: Update.
6899         * record.c: Update.
6900         * remote-sim.c: Update.
6901         * remote.c: Update.
6902         * rs6000-nat.c: Update.
6903         * s390-linux-nat.c: Update.
6904         * sh-nbsd-nat.c: Update.
6905         * sol-thread.c: Update.
6906         * sparc-nat.c: Update.
6907         * sparc64-tdep.c: Update.
6908         * spu-linux-nat.c: Update.
6909         * spu-tdep.c: Update.
6910         * target-debug.h: Update.
6911         * target.c: Update.
6912         * thread.c: Update.
6913         * tid-parse.c: Update.
6914         * tracefile-tfile.c: Update.
6915         * vax-bsd-nat.c: Update.
6916         * windows-nat.c: Update.
6917         * x86-linux-nat.c: Update.
6918         * x86-nat.c: Update.
6919
6920 2018-07-03  Tom Tromey  <tom@tromey.com>
6921
6922         * common/ptid.c (pid_to_ptid): Remove.
6923         * common/ptid.h (pid_to_ptid): Don't declare.
6924         * aix-thread.c: Update.
6925         * arm-linux-nat.c: Update.
6926         * common/ptid.c: Update.
6927         * common/ptid.h: Update.
6928         * corelow.c: Update.
6929         * ctf.c: Update.
6930         * darwin-nat.c: Update.
6931         * fbsd-nat.c: Update.
6932         * fork-child.c: Update.
6933         * gnu-nat.c: Update.
6934         * go32-nat.c: Update.
6935         * inf-ptrace.c: Update.
6936         * infcmd.c: Update.
6937         * inferior.c: Update.
6938         * infrun.c: Update.
6939         * linux-fork.c: Update.
6940         * linux-nat.c: Update.
6941         * nat/aarch64-linux-hw-point.c: Update.
6942         * nat/fork-inferior.c: Update.
6943         * nat/x86-linux-dregs.c: Update.
6944         * nto-procfs.c: Update.
6945         * obsd-nat.c: Update.
6946         * procfs.c: Update.
6947         * progspace.c: Update.
6948         * remote.c: Update.
6949         * rs6000-nat.c: Update.
6950         * s390-linux-nat.c: Update.
6951         * sol-thread.c: Update.
6952         * spu-linux-nat.c: Update.
6953         * target.c: Update.
6954         * top.c: Update.
6955         * tracefile-tfile.c: Update.
6956         * windows-nat.c: Update.
6957
6958 2018-07-03  Tom Tromey  <tom@tromey.com>
6959
6960         * common/ptid.h (ptid_build): Don't declare.
6961         * common/ptid.c (ptid_build): Remove.
6962         * aix-thread.c: Update.
6963         * bsd-kvm.c: Update.
6964         * bsd-uthread.c: Update.
6965         * common/agent.c: Update.
6966         * common/ptid.c: Update.
6967         * common/ptid.h: Update.
6968         * corelow.c: Update.
6969         * darwin-nat.c: Update.
6970         * fbsd-nat.c: Update.
6971         * gnu-nat.c: Update.
6972         * linux-fork.c: Update.
6973         * linux-nat.c: Update.
6974         * linux-thread-db.c: Update.
6975         * nat/linux-osdata.c: Update.
6976         * nat/linux-procfs.c: Update.
6977         * nto-procfs.c: Update.
6978         * obsd-nat.c: Update.
6979         * proc-service.c: Update.
6980         * procfs.c: Update.
6981         * ravenscar-thread.c: Update.
6982         * remote-sim.c: Update.
6983         * remote.c: Update.
6984         * sol-thread.c: Update.
6985         * target.c: Update.
6986         * windows-nat.c: Update.
6987
6988 2018-07-03  Tom Tromey  <tom@tromey.com>
6989
6990         * infrun.c (follow_exec): Use exit_inferior_silent.
6991         * inferior.c (exit_inferior_num_silent): Remove.
6992         * inferior.h (exit_inferior_num_silent): Don't declare.
6993
6994 2018-07-03  Tom Tromey  <tom@tromey.com>
6995
6996         PR cli/23340:
6997         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6998         inferior_ptid on error.
6999
7000 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7001             Simon Marchi  <simon.marchi@polymtl.ca>
7002
7003         PR tdep/8282
7004         * disasm.h (gdb_disassembler): Add
7005         `m_disassembler_options_holder'. member
7006         * disasm.c (get_all_disassembler_options): New function.
7007         (gdb_disassembler::gdb_disassembler): Use it.
7008         (gdb_buffered_insn_length_init_dis): Likewise.
7009         (gdb_buffered_insn_length): Adjust accordingly.
7010         (set_disassembler_options): Handle options with arguments.
7011         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7012         line if showing options with descriptions.
7013         (disassembler_options_completer): Adapt to using the
7014         `disasm_options_and_args_t' structure.
7015         * mips-tdep.c (mips_disassembler_options): New variable.
7016         (mips_disassembler_options_o32): Likewise.
7017         (mips_disassembler_options_n32): Likewise.
7018         (mips_disassembler_options_n64): Likewise.
7019         (gdb_print_insn_mips): Don't set `disassembler_options'.
7020         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7021         functions.
7022         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7023         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7024         `gdbarch_disassembler_options_implicit' and
7025         `gdbarch_valid_disassembler_options'.
7026         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7027         `disasm_options_and_args_t' structure.
7028         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7029         method.
7030         (valid_disassembler_options): Switch from `disasm_options_t' to
7031         the `disasm_options_and_args_t' structure.
7032         * NEWS: Document `set disassembler-options' support for the MIPS
7033         target.
7034         * gdbarch.h: Regenerate.
7035         * gdbarch.c: Regenerate.
7036
7037 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7038
7039         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7040
7041 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7042
7043         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7044         parameter in call to amd64_target_description.
7045         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7046         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7047         (amd64fbsd_init_abi): Likewise.
7048         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7049         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7050         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7051         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7052
7053 2018-06-29  Pedro Alves  <palves@redhat.com>
7054
7055         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7056         "segments" parameter.
7057         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7058         (_initialize_amd64_tdep): Update call to
7059         amd64_create_target_description.
7060         (amd64_target_description): Add "segments" parameter.  Adjust
7061         the implementation to use it.
7062         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7063         call to amd64_create_target_description.
7064         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7065         * gdb/arch/amd64.h (amd64_create_target_description): Add
7066         "segments" register.
7067         * gdb/arch/amd64.c (amd64_create_target_description): Add
7068         "segments" parameter.  Call create_feature_i386_64bit_segments
7069         only if SEGMENTS is true.
7070         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7071         call to amd64_create_target_description.
7072
7073 2018-06-29  Pedro Alves  <palves@redhat.com>
7074
7075         * thread.c (thread_target_id_str): New, factored out from ...
7076         (print_thread_info_1): ... here.  Use it to compute the max
7077         "Target Id" column width.
7078
7079 2018-06-29  Pedro Alves  <palves@redhat.com>
7080
7081         * remote.c (remote_target::extra_thread_info): Delete
7082         'display_buf' and 'n' locals.  from the cache, regardless of
7083         packet mechanims is in use.  Use cache for qThreadExtra and qP
7084         methods too.
7085
7086 2018-06-29  Pedro Alves  <palves@redhat.com>
7087
7088         * blockframe.c (find_pc_sect_containing_function): New function.
7089         * breakpoint.c (print_breakpoint_location): Don't call
7090         find_pc_sect_function.
7091         * linespec.c (create_sals_line_offset): Record the location's
7092         symbol in the sal.
7093         * linespec.c (convert_address_location_to_sals): Fill in sal's
7094         symbol with find_pc_sect_containing_function.
7095         * symtab.c (find_function_start_sal): Rename to ...
7096         (find_function_start_sal_1): ... this.
7097         (find_function_start_sal): Reimplement as wrapper around
7098         find_function_start_sal_1, and use
7099         find_pc_sect_containing_function to fill in the sal's symbol.
7100         (find_function_start_sal(symbol*, bool)): Adjust.
7101         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7102         comments.
7103         (find_pc_sect_containing_function): Declare.
7104
7105 2018-06-29  Pedro Alves  <palves@redhat.com>
7106
7107         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7108         true if the the location has no symbol.
7109
7110 2018-06-28  Tom Tromey  <tom@tromey.com>
7111
7112         * NEWS: Mention --enable-codesign.
7113         * silent-rules.mk (ECHO_SIGN): New variable.
7114         * configure.ac: Add --enable-codesign.
7115         * configure: Rebuild.
7116         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7117         (gdb$(EXEEXT)): Optionally invoke codesign.
7118
7119 2018-06-28  Pedro Alves  <palves@redhat.com>
7120
7121         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7122         comments.
7123         (switch_to_thread_no_regs): Adjust comment.
7124         * infcmd.c (stop_pc): Delete.
7125         (post_create_inferior, info_program_command): Replace references
7126         to stop_pc with references to thread_info->suspend.stop_pc.
7127         * inferior.h (stop_pc): Delete declaration.
7128         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7129         (handle_inferior_event_1, handle_signal_stop)
7130         (process_event_stop_test, keep_going_stepped_thread)
7131         (handle_step_into_function, handle_step_into_function_backward)
7132         (print_stop_location): Replace references to stop_pc with
7133         references to thread_info->suspend.stop_pc.
7134         (struct infcall_suspend_state) <stop_pc>: Delete field.
7135         (save_infcall_suspend_state, restore_infcall_suspend_state):
7136         Remove references to inf_stat->stop_pc.
7137         * linux-fork.c (fork_load_infrun_state): Likewise.
7138         * record-btrace.c (record_btrace_set_replay): Likewise.
7139         * record-full.c (record_full_goto_entry): Likewise.
7140         * remote.c (print_one_stopped_thread): Likewise.
7141         * target.c (target_resume): Extend comment.
7142         * thread.c (set_executing_thread): New.
7143         (set_executing): Use it.
7144         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7145         Remove references to stop_pc.
7146
7147 2018-06-28  Pedro Alves  <palves@redhat.com>
7148
7149         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7150         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7151
7152 2018-06-28  Tom Tromey  <tom@tromey.com>
7153
7154         * coffread.c (coff_symfile_finish): Update.
7155         * xcoffread.c (xcoff_symfile_finish): Update.
7156         * elfread.c (elf_symfile_finish): Update.
7157         * symfile.h (dwarf2_free_objfile): Don't declare.
7158         * dwarf2read.c (_initialize_dwarf2_read): Use
7159         register_objfile_data_with_cleanup.
7160         (dwarf2_free_objfile): Now static.  Change signature.
7161
7162 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7163
7164         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7165         option "-o" to add-symbol-file-load to add an offset to each
7166         section's load address.
7167         * symfile.c (set_objfile_default_section_offset): New function.
7168
7169 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7170
7171         * symfile.c (add_symbol_file_command): Make sure that sections
7172         with the same name are sorted in the same order.
7173
7174 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7175
7176         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7177         require the second argument.  If omitted, load sections at the
7178         addresses specified in the file.
7179
7180 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7181
7182         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7183         (_initialize_symfile): Add option "-o" to symbol-file to add an
7184         offset to each section of the symbol file.
7185
7186 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7187
7188         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7189
7190 2018-06-27  Tom Tromey  <tom@tromey.com>
7191
7192         * stack.c (_initialize_stack): Update "func" help text.
7193
7194 2018-06-27  Tom Tromey  <tom@tromey.com>
7195
7196         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7197         std::vector.
7198         (unwind_infopy_str, pyuw_create_unwind_info)
7199         (unwind_infopy_add_saved_register, pyuw_sniffer)
7200         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7201         Update.
7202         (struct saved_reg): Add constructor.
7203         <value>: Now a gdbpy_ref<>.
7204
7205 2018-06-27  Tom Tromey  <tom@tromey.com>
7206
7207         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7208
7209 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7210
7211         * gdb-gdb.py.in: Format using autopep8.
7212
7213 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7214
7215         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7216         (type_lookup_function): Recognize CORE_ADDR values.
7217
7218 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7219
7220         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7221         print tag_name.
7222
7223 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7224
7225         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7226         <__lt__>: Add.
7227
7228 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7229
7230         * gdb-gdb.py: Move to...
7231         * gdb-gdb.py.in: ... here.
7232         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7233         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7234         dependencies.
7235         (distclean): Remove gdb-gdb.py when cleaning.
7236         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7237         * configure: Re-generate.
7238
7239 2018-06-27  Pedro Alves  <palves@redhat.com>
7240
7241         * proc-service.c (get_ps_regcache): New.
7242         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7243         (ps_lsetfpregs): Use it.
7244
7245 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7246
7247         PR gdb/21695
7248         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7249         declaration.
7250         (dwarf_decode_lines_1): Adjust.
7251
7252 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7253
7254         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7255         override.
7256         <info_proc>: Likewise.
7257
7258 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7259
7260         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7261         to windows_fetch_one_register, and only handle the case of
7262         fetching one register.  Move the code that reloads the context
7263         and iterates over all registers if R is negative to...
7264         (windows_nat_target::fetch_registers): ... here.
7265         (do_windows_store_inferior_registers): Rename to
7266         windows_store_one_register, and only handle the case of storing
7267         one register.  Move the code that handles the case where r is
7268         negative to...
7269         (windows_nat_target::store_registers) ... here.
7270
7271 2018-06-26  Tom Tromey  <tom@tromey.com>
7272
7273         PR rust/22574:
7274         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7275         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7276         Update.
7277         (rust_internal_print_type): Add podata parameter.
7278         (rust_print_type): Update.
7279
7280 2018-06-26  Tom Tromey  <tom@tromey.com>
7281
7282         * typeprint.h (struct print_offset_data) <update, finish,
7283         maybe_print_hole>: New methods.
7284         <indentation>: New constant.
7285         * typeprint.c (print_offset_data::indentation): Define.
7286         (print_offset_data::maybe_print_hole, print_offset_data::update)
7287         (print_offset_data::finish): Move from c-typeprint.c and rename.
7288         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7289         (print_spaces_filtered_with_print_options): Update.
7290         (c_print_type_union_field_offset, maybe_print_hole)
7291         (c_print_type_struct_field_offset): Move to typeprint.c and
7292         rename.
7293         (c_type_print_base_struct_union): Update.
7294
7295 2018-06-25  Pedro Alves  <palves@redhat.com>
7296
7297         * gdbthread.h (thread_info_ref, delete_thread)
7298         (delete_thread_silent, first_thread_of_inferior)
7299         (any_thread_of_inferior, switch_to_thread)
7300         (enable_thread_stack_temporaries)
7301         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7302         (get_last_thread_stack_temporary)
7303         (value_in_thread_stack_temporaries, can_access_registers_thread):
7304         Spell out "struct thread_info" instead of just "thread_info".
7305         * inferior.h (notice_new_inferior): Likewise.
7306
7307 2018-06-25  Pedro Alves  <palves@redhat.com>
7308
7309         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7310         pass thread_info pointer to delete_thread.
7311         (windows_nat_target::detach): Pass inferior pointer to
7312         detach_inferior.
7313         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7314         delete_thread.
7315         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7316         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7317         and pass a thread_info pointer to delete_thread.
7318         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7319         pass thread_info pointer to delete_thread.
7320         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7321         delete_thread_silent call.
7322         * procfs.c (procfs_target::detach): Pass inferior pointer to
7323         detach_inferior.
7324         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7325         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7326         delete_thread_silent call.
7327         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7328         pass thread_info pointer to delete_thread.
7329         (windows_nat_target::detach): Pass inferior pointer to
7330         delete_inferior.
7331
7332 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7333
7334         * regcache.c (readable_regcache::read_part): Fix asserts.
7335         (reg_buffer::raw_collect_part): New function.
7336         (regcache::write_part): Fix asserts.
7337         (reg_buffer::raw_supply_part): New function.
7338         (regcache::transfer_regset_register): New helper function.
7339         (regcache::transfer_regset): Call new functions.
7340         (regcache_supply_regset): Use gdb_byte*.
7341         (regcache::supply_regset): Likewise.
7342         (regcache_collect_regset): Likewise.
7343         (regcache::collect_regset): Likewise.
7344         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7345         (reg_buffer::raw_supply_part): Likewise.
7346         (regcache::transfer_regset_register): Likewise.
7347         (regcache::transfer_regset): Use gdb_byte*.
7348
7349 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7350
7351         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7352
7353 2018-06-21  Pedro Alves  <palves@redhat.com>
7354
7355         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7356         instead of a ptid_t.  All callers adjusted.
7357         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7358         adjusted.
7359         (print_ada_task_info, display_current_task_id, task_command_1):
7360         Adjust.
7361         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7362         inferior_thread.
7363         (breakpoint_kind): Adjust.
7364         (remove_breakpoints_pid): Rename to ...
7365         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7366         pointer.  All callers adjusted.
7367         (bpstat_clear_actions): Use inferior_thread.
7368         (get_bpstat_thread): New.
7369         (bpstat_do_actions): Use it.
7370         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7371         to take a thread_info pointer.  All callers adjusted.
7372         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7373         (breakpoint_re_set_thread): Use inferior_thread.
7374         * breakpoint.h (struct inferior): Forward declare.
7375         (bpstat_stop_status): Update.
7376         (remove_breakpoints_pid): Delete.
7377         (remove_breakpoints_inf): New.
7378         * bsd-uthread.c (bsd_uthread_target::wait)
7379         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7380         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7381         (maint_btrace_packet_history_cmd)
7382         (maint_btrace_clear_packet_history_cmd): Adjust.
7383         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7384         inferior_thread.
7385         * cli/cli-interp.c: Include "inferior.h".
7386         * common/refcounted-object.h (struct
7387         refcounted_object_ref_policy): New.
7388         * compile/compile-object-load.c: Include gdbthread.h.
7389         (store_regs): Use inferior_thread.
7390         * corelow.c (core_target::close): Use current_inferior.
7391         (core_target_open): Adjust to use first_thread_of_inferior and use
7392         the current inferior.
7393         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7394         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7395         <thread>: ... this new field.  All references adjusted.
7396         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7397         Take a thread_info pointer instead of a ptid_t.
7398         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7399         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7400         thread_info pointer instead of a ptid_t.
7401         * elfread.c: Include "inferior.h".
7402         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7403         Use inferior_thread.
7404         * eval.c (evaluate_subexp): Likewise.
7405         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7406         inferior_thread.
7407         * gdb_proc_service.h (struct thread_info): Forward declare.
7408         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7409         <thread>: ... this new field.  All references adjusted.
7410         * gdbarch.h, gdbarch.c: Regenerate.
7411         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7412         'thread' parameter.  All implementations and callers adjusted.
7413         * gdbthread.h (thread_info) <set_running>: New method.
7414         (delete_thread, delete_thread_silent): Take a thread_info pointer
7415         instead of a ptid.
7416         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7417         (first_thread_of_process): Delete, replaced by ...
7418         (first_thread_of_inferior): ... this new function.  All callers
7419         adjusted.
7420         (any_live_thread_of_process): Delete, replaced by ...
7421         (any_live_thread_of_inferior): ... this new function.  All callers
7422         adjusted.
7423         (switch_to_thread, switch_to_no_thread): Declare.
7424         (is_executing): Delete.
7425         (enable_thread_stack_temporaries): Update comment.
7426         <enable_thread_stack_temporaries>: Take a thread_info pointer
7427         instead of a ptid_t.  Incref the thread.
7428         <~enable_thread_stack_temporaries>: Decref the thread.
7429         <m_ptid>: Delete
7430         <m_thr>: New.
7431         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7432         (get_last_thread_stack_temporary)
7433         (value_in_thread_stack_temporaries, can_access_registers_thread):
7434         Take a thread_info pointer instead of a ptid_t.  All callers
7435         adjusted.
7436         * infcall.c (get_call_return_value): Use inferior_thread.
7437         (run_inferior_call): Work with thread pointers instead of ptid_t.
7438         (call_function_by_hand_dummy): Work with thread pointers instead
7439         of ptid_t.  Use thread_info_ref.
7440         * infcmd.c (proceed_thread_callback): Access thread's state
7441         directly.
7442         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7443         access thread's state directly.
7444         (continue_command): Use inferior_thread.
7445         (info_program_command): Use find_thread_ptid and access thread
7446         state directly.
7447         (proceed_after_attach_callback): Use thread state directly.
7448         (notice_new_inferior): Take a thread_info pointer instead of a
7449         ptid_t.  All callers adjusted.
7450         (exit_inferior): Take an inferior pointer instead of a pid.  All
7451         callers adjusted.
7452         (exit_inferior_silent): New.
7453         (detach_inferior): Delete.
7454         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7455         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7456         (detach_inferior_command, kill_inferior_command): Use
7457         find_inferior_id instead of valid_gdb_inferior_id and
7458         gdb_inferior_id_to_pid.
7459         (inferior_command): Use inferior and thread pointers.
7460         * inferior.h (struct thread_info): Forward declare.
7461         (notice_new_inferior): Take a thread_info pointer instead of a
7462         ptid_t.  All callers adjusted.
7463         (detach_inferior): Delete declaration.
7464         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7465         instead of a pid.  All callers adjusted.
7466         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7467         (valid_gdb_inferior_id): Delete.
7468         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7469         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7470         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7471         ...
7472         <inf>: ... this new field.
7473         <step_ptid>: Delete, replaced by ...
7474         <step_thread>: ... this new field.
7475         (get_displaced_stepping_state): Take an inferior pointer instead
7476         of a pid.  All callers adjusted.
7477         (displaced_step_in_progress_any_inferior): Adjust.
7478         (displaced_step_in_progress_thread): Take a thread pointer instead
7479         of a ptid_t.  All callers adjusted.
7480         (displaced_step_in_progress, add_displaced_stepping_state): Take
7481         an inferior pointer instead of a pid.  All callers adjusted.
7482         (get_displaced_step_closure_by_addr): Adjust.
7483         (remove_displaced_stepping_state): Take an inferior pointer
7484         instead of a pid.  All callers adjusted.
7485         (displaced_step_prepare_throw, displaced_step_prepare)
7486         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7487         All callers adjusted.
7488         (start_step_over): Adjust.
7489         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7490         displaced step queue.
7491         (do_target_resume): Adjust.
7492         (fetch_inferior_event): Use inferior_thread.
7493         (context_switch, get_inferior_stop_soon): Take an
7494         execution_control_state pointer instead of a ptid_t.  All callers
7495         adjusted.
7496         (switch_to_thread_cleanup): Delete.
7497         (stop_all_threads): Use scoped_restore_current_thread.
7498         * inline-frame.c: Include "gdbthread.h".
7499         (inline_state) <inline_state>: Take a thread pointer instead of a
7500         ptid_t.  All callers adjusted.
7501         <ptid>: Delete, replaced by ...
7502         <thread>: ... this new field.
7503         (find_inline_frame_state): Take a thread pointer instead of a
7504         ptid_t.  All callers adjusted.
7505         (skip_inline_frames, step_into_inline_frame)
7506         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7507         pointer instead of a ptid_t.  All callers adjusted.
7508         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7509         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7510         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7511         pointers directly.
7512         * linux-nat.c (get_detach_signal): Likewise.
7513         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7514         (thread_db_notice_clone): Adjust.
7515         (thread_db_find_new_threads_silently)
7516         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7517         a thread pointer instead of a ptid_t.  All callers adjusted.
7518         * mi/mi-cmd-var.c: Include "inferior.h".
7519         (mi_cmd_var_update_iter): Update to use thread pointers.
7520         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7521         inferior directly.
7522         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7523         out to ...
7524         (mi_output_running): ... this new function.
7525         (mi_on_resume_1): Adjust to use it.
7526         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7527         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7528         directly.
7529         (interrupt_thread_callback): : Adjust to use thread and inferior
7530         pointers.
7531         * proc-service.c: Include "gdbthread.h".
7532         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7533         * progspace-and-thread.c: Include "inferior.h".
7534         * progspace.c: Include "inferior.h".
7535         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7536         hold a reference to an inferior_object.
7537         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7538         inferior_thread.
7539         * python/py-inferior.c (struct inferior_object): Give the type a
7540         tag name instead of a typedef.
7541         (python_on_normal_stop): No need to check if the current thread is
7542         listed.
7543         (inferior_to_inferior_object): Change return type to
7544         inferior_object.  All callers adjusted.
7545         (find_thread_object): Delete, bits factored out to ...
7546         (thread_to_thread_object): ... this new function.
7547         * python/py-infthread.c (create_thread_object): Use
7548         inferior_to_inferior_object.
7549         (thpy_is_stopped): Use thread pointer directly.
7550         (gdbpy_selected_thread): Use inferior_thread.
7551         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7552         field, replaced with ...
7553         <thread>: ... this new field.  All users adjusted.
7554         (btpy_insn_or_gap_new): Drop const.
7555         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7556         callers adjusted.
7557         * python/py-record.c: Include "gdbthread.h".
7558         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7559         a ptid_t.  All callers adjusted.
7560         (gdbpy_current_recording): Use inferior_thread.
7561         * python/py-record.h (recpy_record_object) <ptid>: Delete
7562         field, replaced with ...
7563         <thread>: ... this new field.  All users adjusted.
7564         (recpy_element_object) <ptid>: Delete
7565         field, replaced with ...
7566         <thread>: ... this new field.  All users adjusted.
7567         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7568         a ptid_t.  All callers adjusted.
7569         * python/py-threadevent.c: Include "gdbthread.h".
7570         (get_event_thread): Use thread_to_thread_object.
7571         * python/python-internal.h (struct inferior_object): Forward
7572         declare.
7573         (find_thread_object, find_inferior_object): Delete declarations.
7574         (thread_to_thread_object, inferior_to_inferior_object): New
7575         declarations.
7576         * record-btrace.c: Include "inferior.h".
7577         (require_btrace_thread): Use inferior_thread.
7578         (record_btrace_frame_sniffer)
7579         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7580         (get_thread_current_frame): Use scoped_restore_current_thread and
7581         switch_to_thread.
7582         (get_thread_current_frame): Use thread pointer directly.
7583         (record_btrace_replay_at_breakpoint): Use thread's inferior
7584         pointer directly.
7585         * record-full.c: Include "inferior.h".
7586         * regcache.c: Include "gdbthread.h".
7587         (get_thread_arch_regcache): Use the inferior's address space
7588         directly.
7589         (get_thread_regcache, registers_changed_thread): New.
7590         * regcache.h (get_thread_regcache(thread_info *thread)): New
7591         overload.
7592         (registers_changed_thread): New.
7593         (remote_target) <remote_detach_1>: Swap order of parameters.
7594         (remote_add_thread): <remote_add_thread>: Return the new thread.
7595         (get_remote_thread_info(ptid_t)): New overload.
7596         (remote_target::remote_notice_new_inferior): Use thread pointers
7597         directly.
7598         (remote_target::process_initial_stop_replies): Use
7599         thread_info::set_running.
7600         (remote_target::remote_detach_1, remote_target::detach)
7601         (extended_remote_target::detach): Adjust.
7602         * stack.c (frame_show_address): Use inferior_thread.
7603         * target-debug.h (target_debug_print_thread_info_pp): New.
7604         * target-delegates.c: Regenerate.
7605         * target.c (default_thread_address_space): Delete.
7606         (memory_xfer_partial_1): Use current_inferior.
7607         (target_detach): Use current_inferior.
7608         (target_thread_address_space): Delete.
7609         (generic_mourn_inferior): Use current_inferior.
7610         * target.h (struct target_ops) <thread_address_space>: Delete.
7611         (target_thread_address_space): Delete.
7612         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7613         pointers directly.
7614         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7615         thread pointer instead of a ptid_t.  Adjust all callers.
7616         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7617         (first_thread_of_process): Delete, replaced by ...
7618         (first_thread_of_inferior): ... this new function.  All callers
7619         adjusted.
7620         (any_thread_of_process): Rename to ...
7621         (any_thread_of_inferior): ... this, and take an inferior pointer.
7622         (any_live_thread_of_process): Rename to ...
7623         (any_live_thread_of_inferior): ... this, and take an inferior
7624         pointer.
7625         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7626         (value_in_thread_stack_temporaries)
7627         (get_last_thread_stack_temporary): Take a thread pointer instead
7628         of a ptid_t.  Adjust all callers.
7629         (thread_info::set_running): New.
7630         (validate_registers_access): Use inferior_thread.
7631         (can_access_registers_ptid): Rename to ...
7632         (can_access_registers_thread): ... this, and take a thread
7633         pointer.
7634         (print_thread_info_1): Adjust to compare thread pointers instead
7635         of ptids.
7636         (switch_to_no_thread, switch_to_thread): Make extern.
7637         (scoped_restore_current_thread::~scoped_restore_current_thread):
7638         Use m_thread pointer directly.
7639         (scoped_restore_current_thread::scoped_restore_current_thread):
7640         Use inferior_thread.
7641         (thread_command): Use thread pointer directly.
7642         (thread_num_make_value_helper): Use inferior_thread.
7643         * top.c (execute_command): Use inferior_thread.
7644         * tui/tui-interp.c: Include "inferior.h".
7645         * varobj.c (varobj_create): Use inferior_thread.
7646         (value_of_root_1): Use find_thread_global_id instead of
7647         global_thread_id_to_ptid.
7648
7649 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7650
7651         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7652         possible.
7653         (regcache::write_part): Likewise.
7654         (readable_regcache::cooked_read_part): Update comment.
7655         (readable_regcache::cooked_write_part): Likewise.
7656         * regcache.h: (readable_regcache::read_part): Likewise.
7657         (regcache::write_part): Likewise.
7658
7659 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7660             Dirk Schubert  <dirk.schubert@arm.com>
7661
7662         * aarch64-linux-nat.c (post_attach): New.
7663         (aarch64_linux_nat_target::post_attach): Override post_attach to
7664         record the number of hardware debug registers.
7665
7666 2018-06-20  Tom Tromey  <tom@tromey.com>
7667
7668         * python/py-param.c (add_setshow_generic): Make parameters const.
7669         (parmpy_init): Update.
7670
7671 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7672
7673         * regcache.h (regcache_cooked_read_ftype): Rename to...
7674         (register_read_ftype): ...this, change type to function_view.
7675         (class reg_buffer) <save>: Remove src parameter.
7676         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7677         parameter non-const in first overload.  Remove src parameter in
7678         second overload.
7679         * regcache.c (do_cooked_read): Remove.
7680         (readonly_detached_regcache::readonly_detached_regcache): Make
7681         parameter non-const, adjust call to other constructor.
7682         (reg_buffer::save): Remove src parameter.
7683         * frame.c (do_frame_register_read): Remove.
7684         (frame_save_as_regcache): Use lambda function.
7685         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7686         parameter to ppu2spu_data *.
7687         (ppu2spu_sniffer): Use lambda function.
7688
7689 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7690
7691         * record-full.c (record_full_target::insert_breakpoint): Remove
7692         "struct" keyword, add const.
7693
7694 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7695
7696         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7697         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7698         * configure.ac: Remove AC_PREREQ, add missing quoting.
7699         * gnulib/configure.ac: Modernize usage of
7700         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7701         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7702         (AUTOMAKE_VERSION): Bump to 1.15.1.
7703         * configure: Re-generate.
7704         * config.in: Re-generate.
7705         * aclocal.m4: Re-generate.
7706         * gnulib/aclocal.m4: Re-generate.
7707         * gnulib/config.in: Re-generate.
7708         * gnulib/configure: Re-generate.
7709         * gnulib/import/Makefile.in: Re-generate.
7710
7711 2018-06-19  Pedro Alves  <palves@redhat.com>
7712
7713         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7714         (lookup_minimal_symbol_by_pc_section): ... here with
7715         gdb_assert_not_reached added.
7716
7717 2018-06-19  Pedro Alves  <palves@redhat.com>
7718
7719         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7720         parameter with a block parameter.  Compare location's block symbol
7721         with the frame's block instead of addresses.
7722         (skip_inline_frames): Pass the current block instead of the
7723         frame's address.  Break out as soon as we determine the frame
7724         should not be skipped.
7725
7726 2018-06-18  Tom Tromey  <tom@tromey.com>
7727
7728         * solib-aix.c (solib_aix_get_section_offsets): Return
7729         unique_xmalloc_ptr.
7730         (solib_aix_solib_create_inferior_hook): Update.
7731
7732 2018-06-18  Tom Tromey  <tom@tromey.com>
7733
7734         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7735
7736 2018-06-18  Tom Tromey  <tom@tromey.com>
7737
7738         * solib-frv.c (frv_relocate_main_executable): Use
7739         unique_xmalloc_ptr.
7740         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7741         unique_xmalloc_ptr.
7742
7743 2018-06-18  Tom Tromey  <tom@tromey.com>
7744
7745         * objfiles.h (inhibit_section_map_updates): Update.
7746         (resume_section_map_updates, resume_section_map_updates_cleanup):
7747         Remove.
7748         * solib-svr4.c (svr4_handle_solib_event): Update.
7749         * objfiles.c (inhibit_section_map_updates): Return
7750         scoped_restore_tmpl<int>.
7751         (resume_section_map_updates, resume_section_map_updates_cleanup):
7752         Remove.
7753
7754 2018-06-18  Tom Tromey  <tom@tromey.com>
7755
7756         * valprint.h (read_string): Update.
7757         * valprint.c (read_string): Change type of "buffer".
7758         (val_print_string): Update.
7759         * python/py-value.c (valpy_string): Update.
7760         * language.h (struct language_defn) <la_get_string>: Change
7761         type of "buffer".
7762         (default_get_string, c_get_string): Update.
7763         * language.c (default_get_string): Change type of "buffer".
7764         * guile/scm-value.c (gdbscm_value_to_string): Update.
7765         * c-lang.c (c_get_string): Change type of "buffer".
7766
7767 2018-06-18  Tom Tromey  <tom@tromey.com>
7768
7769         * ser-mingw.c (struct pipe_state_destroyer): New.
7770         (pipe_state_up): New typedef.
7771         (cleanup_pipe_state): Remove.
7772         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7773
7774 2018-06-18  Tom Tromey  <tom@tromey.com>
7775
7776         * rust-lang.h (rust_yyerror): Don't declare.
7777         * rust-lang.c (rust_language_defn): Update.
7778         * rust-exp.y (yyerror): Now static.
7779         * parse.c (parse_exp_in_context_1): Update.
7780         * p-lang.h (p_yyerror): Don't declare.
7781         * p-lang.c (p_language_defn): Update.
7782         * p-exp.y (yyerror): Now static.
7783         * opencl-lang.c (opencl_language_defn): Update.
7784         * objc-lang.c (objc_language_defn): Update.
7785         * m2-lang.h (m2_yyerror): Don't declare.
7786         * m2-lang.c (m2_language_defn): Update.
7787         * m2-exp.y (yyerror): Now static.
7788         * language.h (struct language_defn) <la_error>: Remove.
7789         * language.c (unk_lang_error): Remove.
7790         (unknown_language_defn, auto_language_defn): Remove.
7791         * go-lang.h (go_yyerror): Don't declare.
7792         * go-lang.c (go_language_defn): Update.
7793         * go-exp.y (yyerror): Now static.
7794         * f-lang.h (f_yyerror): Don't declare.
7795         * f-lang.c (f_language_defn): Update.
7796         * f-exp.y (yyerror): Now static.
7797         * d-lang.h (d_yyerror): Don't declare.
7798         * d-lang.c (d_language_defn): Update.
7799         * d-exp.y (yyerror): Now static.
7800         * c-lang.h (c_yyerror): Don't declare.
7801         * c-lang.c (c_language_defn, cplus_language_defn)
7802         (asm_language_defn, minimal_language_defn): Update.
7803         * c-exp.y (yyerror): Now static.
7804         * ada-lang.h (ada_yyerror): Don't declare.
7805         * ada-lang.c (ada_language_defn): Update.
7806         * ada-exp.y (yyerror): Now static.
7807
7808 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7809
7810         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7811         (store_sveregs_to_thread): Likewise.
7812         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7813         (aarch64_linux_store_inferior_registers): Likewise.
7814         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7815         function.
7816         (aarch64_sve_regs_copy_to_regcache): Likewise.
7817         (aarch64_sve_regs_copy_from_regcache): Likewise.
7818         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7819         declaration.
7820         (aarch64_sve_regs_copy_to_regcache): Likewise.
7821         (aarch64_sve_regs_copy_from_regcache): Likewise.
7822         (sve_context): Structure from Linux headers.
7823         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7824         (SVE_SIG_ZREG_SIZE): Likewise.
7825         (SVE_SIG_PREG_SIZE): Likewise.
7826         (SVE_SIG_FFR_SIZE): Likewise.
7827         (SVE_SIG_REGS_OFFSET): Likewise.
7828         (SVE_SIG_ZREGS_OFFSET): Likewise.
7829         (SVE_SIG_ZREG_OFFSET): Likewise.
7830         (SVE_SIG_ZREGS_SIZE): Likewise.
7831         (SVE_SIG_PREGS_OFFSET): Likewise.
7832         (SVE_SIG_PREG_OFFSET): Likewise.
7833         (SVE_SIG_PREGS_SIZE): Likewise.
7834         (SVE_SIG_FFR_OFFSET): Likewise.
7835         (SVE_SIG_REGS_SIZE): Likewise.
7836         (SVE_SIG_CONTEXT_SIZE): Likewise.
7837         (SVE_PT_REGS_MASK): Likewise.
7838         (SVE_PT_REGS_FPSIMD): Likewise.
7839         (SVE_PT_REGS_SVE): Likewise.
7840         (SVE_PT_VL_INHERIT): Likewise.
7841         (SVE_PT_VL_ONEXEC): Likewise.
7842         (SVE_PT_REGS_OFFSET): Likewise.
7843         (SVE_PT_FPSIMD_OFFSET): Likewise.
7844         (SVE_PT_FPSIMD_SIZE): Likewise.
7845         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7846         (SVE_PT_SVE_PREG_SIZE): Likewise.
7847         (SVE_PT_SVE_FFR_SIZE): Likewise.
7848         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7849         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7850         (__SVE_SIG_TO_PT): Likewise.
7851         (SVE_PT_SVE_OFFSET): Likewise.
7852         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7853         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7854         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7855         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7856         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7857         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7858         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7859         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7860         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7861         (SVE_PT_SVE_SIZE): Likewise.
7862         (SVE_PT_SIZE): Likewise.
7863         (HAS_SVE_STATE): New define.
7864
7865 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7866
7867         * nat/aarch64-sve-linux-sigcontext.h: New file.
7868         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7869         new files.
7870         (SVE_VQ_MIN): Likewise.
7871         (SVE_VQ_MAX): Likewise.
7872         (SVE_VL_MIN): Likewise.
7873         (SVE_VL_MAX): Likewise.
7874         (SVE_NUM_ZREGS): Likewise.
7875         (SVE_NUM_PREGS): Likewise.
7876         (sve_vl_valid): Likewise.
7877         (struct user_sve_header): Likewise.
7878
7879 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7880             Richard Bunt <Richard.Bunt@arm.com>
7881
7882         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7883         was requested by GDB.
7884
7885 2018-06-15  Tom de Vries  <tdevries@suse.de>
7886
7887         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7888
7889 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7890
7891         * gnulib/update-gnulib.sh: Print expected versions of
7892         autoconf/aclocal.
7893
7894 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7895
7896         * arch-utils.c (default_type_align): Use type_length_units.
7897         * gdbtypes.c (type_align): Use type_length_units.
7898
7899 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7900
7901         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7902         of 'define' command.
7903
7904 2018-06-14  Tom de Vries  <tdevries@suse.de>
7905
7906         PR cli/22573
7907         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7908         get_no_prettyformat_print_options.
7909
7910 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7911
7912         * sparc-nat.h: Include target.h.
7913         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7914         <fetch_registers>: Remove this argument in function call.
7915         <store_registers>: Remove this argument in function call, remove
7916         extra semicolon.
7917         <low_forget_process>: Call sparc64_forget_process instead of
7918         sparc_forget_process.
7919
7920 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7921
7922         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7923         (procfs_target::make_corefile_notes): Adjust to new
7924         target_read_alloc return type.
7925
7926 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7927             Stephen Roberts  <stephen.roberts@arm.com>
7928
7929         PR gdb/22882
7930         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7931         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7932         Move should_notify_stop local into more inner scope.
7933
7934 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7935             Stephen Roberts  <stephen.roberts@arm.com>
7936
7937         PR gdb/22882
7938         * infrun.c (resume_1): Add call to mark_async_event_handler.
7939
7940 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7941
7942         * infrun.c (do_target_wait): Change old version of $pc printed.
7943
7944 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7945
7946         * dwarf2read.c (read_index_from_section): Rename to...
7947         (read_gdb_index_from_section): ... this, update all callers.
7948         (dwarf2_read_index): Rename to...
7949         (dwarf2_read_gdb_index): ... this, update all callers.
7950
7951 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7952
7953         * hppa-linux-nat.c
7954         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7955         hppa_linux_nat_target::fetch_registers.
7956
7957 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7958
7959         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7960         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7961         (AARCH64_DWARF_SVE_FFR): Likewise.
7962         (AARCH64_DWARF_SVE_P0): Likewise.
7963         (AARCH64_DWARF_SVE_Z0): Likewise.
7964
7965 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7966
7967         * common/common-regcache.h (raw_compare): New function.
7968         * regcache.c (regcache::raw_compare): Likewise.
7969         * regcache.h (regcache::raw_compare): New declaration.
7970
7971 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7972
7973         * common/common-regcache.h (reg_buffer_common): New structure.
7974         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7975         (reg_buffer::raw_supply): Likewise.
7976         (reg_buffer::raw_supply_integer): Likewise.
7977         (reg_buffer::raw_supply_zeroed): Likewise.
7978         (reg_buffer::raw_collect): Likewise.
7979         (reg_buffer::raw_collect_integer): Likewise.
7980         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7981         (reg_buffer::raw_supply): Likewise.
7982         (reg_buffer::raw_supply_integer): Likewise.
7983         (reg_buffer::raw_supply_zeroed): Likewise.
7984         (reg_buffer::raw_collect): Likewise.
7985         (reg_buffer::raw_collect_integer): Likewise.
7986
7987 2018-06-10  Tom Tromey  <tom@tromey.com>
7988
7989         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7990         (class remote_state) <stop_reply_queue>: Now std::vector.
7991         (remote_state::~remote_state)
7992         (remote_target::stop_reply_queue_length): Update.
7993         (struct queue_iter_param, remove_child_of_pending_fork)
7994         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7995         (check_pending_event_prevents_wildcard_vcont_callback)
7996         (remove_stop_reply_for_inferior)
7997         (remove_stop_reply_of_remote_state)
7998         (remote_notif_remove_once_on_match)
7999         (stop_reply_match_ptid_and_ws)
8000         (remote_kill_child_of_pending_fork): Remove.
8001         (remote_target::remove_new_fork_children)
8002         (remote_target::check_pending_events_prevent_wildcard_vcont)
8003         (remote_target::discard_pending_stop_replies)
8004         (remote_target::discard_pending_stop_replies_in_queue)
8005         (remote_target::remote_notif_remove_queued_reply)
8006         (remote_target::queued_stop_reply)
8007         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8008         (remote_target::wait, remote_target::kill_new_fork_children)
8009         (remote_target::async): Update.
8010
8011 2018-06-10  Tom Tromey  <tom@tromey.com>
8012
8013         * record-full.c (record_full_arch_list_cleanups): Remove.
8014         (record_full_message): Use try/catch.
8015         (record_full_wait_cleanups): Remove.
8016         (record_full_wait_1): Use try/catch.
8017         (record_full_restore): Likewise.
8018
8019 2018-06-10  Tom Tromey  <tom@tromey.com>
8020
8021         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8022         declare VEC.  Add constructor.
8023         <in_target_beneath>: Now bool.
8024         (record_full_breakpoints): Now a std::vector, static.
8025         (record_full_sync_record_breakpoints)
8026         (record_full_init_record_breakpoints)
8027         (record_full_target::insert_breakpoint)
8028         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8029
8030 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8031
8032         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8033         * serial.c (serial_interface_lookup): Remove struct keyword.
8034
8035 2018-06-10  Tom Tromey  <tom@tromey.com>
8036
8037         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8038         method.
8039         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8040         a method.
8041         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8042         method.
8043         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8044         "beneath" as a method.
8045         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8046         Use "beneath" as a method.
8047
8048 2018-06-10  Tom Tromey  <tom@tromey.com>
8049
8050         * tracefile.c (struct trace_file_writer_deleter): New.
8051         <operator()>: Rename from trace_file_writer_xfree.
8052         (trace_file_writer_up): New typedef.
8053         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8054
8055 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8056
8057         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8058         <m_registers, m_register_status>: Change type to
8059         std::unique_ptr.
8060         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8061         XCNEWVEC.
8062
8063 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8064
8065         * common/common-regcache.h (enum register_status): Add
8066         underlying type "signed char".
8067         * regcache.h (reg_buffer) <m_register_status>: Change type to
8068         register_status *.
8069         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8070         register_status instead of signed char.
8071         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8072         (reg_buffer::get_register_status): Remove cast.
8073         (readable_regcache::raw_read): Remove cast.
8074         (readable_regcache::cooked_read): Remove cast.
8075
8076 2018-06-09  Tom Tromey  <tom@tromey.com>
8077
8078         * source.c (reverse_search_command, forward_search_command): Use
8079         scoped_fd.
8080
8081 2018-06-09  Tom Tromey  <tom@tromey.com>
8082
8083         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8084         (serial_ops_list): Now static, std::vector.
8085         (serial_interface_lookup, serial_add_interface): Update.
8086
8087 2018-06-09  Tom Tromey  <tom@tromey.com>
8088
8089         * dwarf2read.c (process_cu_includes): Update.
8090         (process_full_comp_unit): Update.
8091         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8092         std::vector.
8093
8094 2018-06-08  Paul Koning  <paul_koning@dell.com>
8095
8096         PR gdb/23252
8097
8098         * python/python.c (do_start_initialization):
8099         Avoid call to internal Python API.
8100         (init__gdb_module): New function.
8101
8102 2018-06-08  Gary Benson <gbenson@redhat.com>
8103
8104         * linux-thread-db.c (valprint.h): New include.
8105         (struct check_thread_db_info): New structure.
8106         (check_thread_db_on_load, tdb_testinfo): New static globals.
8107         (check_thread_db, check_thread_db_callback): New functions.
8108         (try_thread_db_load_1): Run integrity checks if requested.
8109         (maintenance_check_libthread_db): New function.
8110         (_initialize_thread_db): Register "maint check libthread-db"
8111         and "maint set/show check-libthread-db".
8112         * NEWS: Mention the above new commands.
8113
8114 2018-06-08  Tom Tromey  <tom@tromey.com>
8115
8116         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8117         now a method.
8118
8119 2018-06-08  Tom Tromey  <tom@tromey.com>
8120
8121         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8122
8123 2018-06-08  Tom Tromey  <tom@tromey.com>
8124
8125         * common/btrace-common.h (struct btrace_data): Add constructor,
8126         destructor, move assignment operator.
8127         <empty, clear, fini>: New methods.
8128         <format>: Initialize.
8129         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8130         (btrace_data_empty): Don't declare.
8131         * common/btrace-common.c (btrace_data_init): Remove.
8132         (btrace_data::fini): Rename from btrace_data_fini.
8133         (btrace_data::empty): Rename from btrace_data_empty.
8134         (btrace_data::clear): Rename from btrace_data_clear.  Return
8135         bool.
8136         * btrace.h (make_cleanup_btrace_data): Don't declare.
8137         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8138         (parse_xml_btrace): Update.
8139         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8140         (maint_btrace_clear_packet_history_cmd): Update.
8141
8142 2018-06-07  Pedro Alves  <palves@redhat.com>
8143
8144         * target.h (target_ops) <beneath>: Now a method.  All references
8145         updated.
8146         (class target_stack): New.
8147         * target.c (g_target_stack): New.
8148         (g_current_top_target): Delete.
8149         (current_top_target): Get the top target out of g_target_stack.
8150         (target_stack::push, target_stack::unpush): New.
8151         (push_target, unpush_target): Reimplement.
8152         (target_is_pushed): Reimplement in terms of g_target_stack.
8153         (target_ops::beneath, target_stack::find_beneath): New.
8154
8155 2018-06-07  Pedro Alves  <palves@redhat.com>
8156
8157         * target.h (find_target_beneath): Delete declaration.
8158         * target.c (find_target_beneath): Delete definition.
8159         * aix-thread.c: All callers of find_target_beneath adjusted to
8160         call target_ops::beneath instead.
8161         * bsd-uthread.c: Likewise.
8162         * linux-thread-db.c: Likewise.
8163         * ravenscar-thread.c: Likewise.
8164         * sol-thread.c: Likewise.
8165         * spu-multiarch.c: Likewise.
8166
8167 2018-06-07  Pedro Alves  <palves@redhat.com>
8168
8169         * target.h (target_ops) <beneath>: Now a method.  All references
8170         updated.
8171         (target_ops) <m_beneath>: New.
8172         * target.c (target_ops::beneath): New.
8173         * corelow.c: Adjust all references to target_ops::beneath.
8174         * linux-thread-db.c: Likewise.
8175         * make-target-delegates: Likewise.
8176         * record-btrace.c: Likewise.
8177         * record-full.c: Likewise.
8178         * remote.c: Likewise.
8179         * target.c: Likewise.
8180         * target-delegates.c: Regenerate.
8181
8182 2018-06-07  Pedro Alves  <palves@redhat.com>
8183
8184         * target.h (target_stack): Delete.
8185         (current_top_target): Declare function.
8186         * target.c (target_stack): Delete.
8187         (g_current_top_target): New.
8188         (current_top_target): New function.
8189         * auxv.c: Use current_top_target instead of target_stack
8190         throughout.
8191         * avr-tdep.c: Likewise.
8192         * breakpoint.c: Likewise.
8193         * corefile.c: Likewise.
8194         * elfread.c: Likewise.
8195         * eval.c: Likewise.
8196         * exceptions.c: Likewise.
8197         * frame.c: Likewise.
8198         * gdbarch-selftests.c: Likewise.
8199         * gnu-v3-abi.c: Likewise.
8200         * ia64-tdep.c: Likewise.
8201         * ia64-vms-tdep.c: Likewise.
8202         * infcall.c: Likewise.
8203         * infcmd.c: Likewise.
8204         * infrun.c: Likewise.
8205         * linespec.c: Likewise.
8206         * linux-tdep.c: Likewise.
8207         * minsyms.c: Likewise.
8208         * ppc-linux-nat.c: Likewise.
8209         * ppc-linux-tdep.c: Likewise.
8210         * procfs.c: Likewise.
8211         * regcache.c: Likewise.
8212         * remote.c: Likewise.
8213         * rs6000-tdep.c: Likewise.
8214         * s390-linux-nat.c: Likewise.
8215         * s390-tdep.c: Likewise.
8216         * solib-aix.c: Likewise.
8217         * solib-darwin.c: Likewise.
8218         * solib-dsbt.c: Likewise.
8219         * solib-spu.c: Likewise.
8220         * solib-svr4.c: Likewise.
8221         * solib-target.c: Likewise.
8222         * sparc-tdep.c: Likewise.
8223         * sparc64-tdep.c: Likewise.
8224         * spu-tdep.c: Likewise.
8225         * symfile.c: Likewise.
8226         * symtab.c: Likewise.
8227         * target-descriptions.c: Likewise.
8228         * target-memory.c: Likewise.
8229         * target.c: Likewise.
8230         * target.h: Likewise.
8231         * tracefile-tfile.c: Likewise.
8232         * tracepoint.c: Likewise.
8233         * valops.c: Likewise.
8234         * valprint.c: Likewise.
8235         * value.c: Likewise.
8236         * windows-tdep.c: Likewise.
8237         * mi/mi-main.c: Likewise.
8238
8239 2018-06-07  Tom Tromey  <tom@tromey.com>
8240
8241         * valprint.h (build_address_symbolic): Declare.
8242         * printcmd.c (print_address_symbolic): Update.
8243         (build_address_symbolic): Change "name" and "filename" to
8244         std::string.
8245         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8246         Update.
8247         * defs.h (build_address_symbolic): Remove declaration.
8248
8249 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8250
8251         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8252         (aarch64_vnv_type): Add function.
8253         (aarch64_pseudo_register_name): Add V regs for SVE.
8254         (aarch64_pseudo_register_type): Likewise.
8255         (aarch64_pseudo_register_reggroup_p): Likewise.
8256         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8257         (aarch64_pseudo_read_value): Add V regs for SVE.
8258         (aarch64_pseudo_write_2): Use V0 offset for SVE
8259         (aarch64_pseudo_write): Add V regs for SVE.
8260         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8261
8262 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8263
8264         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8265         (sve_vl_from_vq): Likewise.
8266
8267 2018-06-05  Tom Tromey  <tom@tromey.com>
8268
8269         * cli/cli-cmds.c (show_version): Update.
8270         * top.c (print_gdb_version): Add "interactive" parameter.
8271         Update.
8272         * main.c (captured_main_1): Update.
8273         * top.h (print_gdb_version): Add "interactive" parameter and a
8274         comment.
8275
8276 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8277
8278         * common/enum-flags.h: Add trailing semicolon to example in
8279         comment.
8280
8281 2018-06-05  Tom Tromey  <tom@tromey.com>
8282
8283         PR cli/12326:
8284         * NEWS: Add entry about pager.
8285         * utils.c (pagination_disabled_for_command): New global.
8286         (prompt_for_continue): Allow "c" response to prompt.
8287         (reinitialize_more_filter): Clear
8288         pagination_disabled_for_command.
8289         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8290
8291 2018-06-04  Tom Tromey  <tom@tromey.com>
8292
8293         * ada-lang.h (ada_lookup_symbol_list): Update.
8294         * ada-lang.c (resolve_subexp): Update.
8295         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8296         parameter.
8297         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8298         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8299         results parameter to std::vector.
8300         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8301         Update.
8302         * ada-exp.y (block_lookup): Update.
8303         (select_possible_type_sym): Change type of syms.  Remove nsyms
8304         parameter.
8305         (write_var_or_type, write_name_assoc): Update.
8306
8307 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8308
8309         * windows-nat.c (windows_nat_target::xfer_partial): Return
8310         TARGET_XFER_E_IO if we need to delegate to the target beneath
8311         but BENEATH is NULL.
8312
8313 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8314
8315         * Makefile.in (config.status): Add configure.nat as a
8316         dependency.
8317
8318 2018-06-04  Tom Tromey  <tom@tromey.com>
8319
8320         * cp-name-parser.y (cpname_state): Add method declarations.
8321         (HANDLE_QUAL): Update.
8322         (cpname_state::d_grab, cpname_state::fill_comp)
8323         (cpname_state::make_operator, cpname_state::make_dtor)
8324         (cpname_state::make_builtin_type, cpname_state::make_name)
8325         (cpname_state::d_qualify, cpname_state::d_int_type)
8326         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8327         (%union): Move earlier.
8328
8329 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8330
8331         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8332
8333 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8334
8335         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8336         (aarch64_pseudo_write_1): Likewise.
8337         (aarch64_pseudo_read_value): Use helper.
8338         (aarch64_pseudo_write): Likewise.
8339
8340 2018-06-04  Pedro Alves  <palves@redhat.com>
8341
8342         * darwin-nat.c (darwin_ops): Delete.
8343         (darwin_attach_pid): Use get_native_target.
8344
8345 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8346
8347         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8348         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8349
8350 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8351
8352         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8353         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8354         (aarch64_gdbarch_init): Check for SVE.
8355         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8356
8357 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8358
8359         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8360         * aarch64-tdep.h (aarch64_read_description): Likewise.
8361         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8362         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8363         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8364         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8365         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8366
8367 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8368
8369         * value.c (value_fetch_lazy_bitfield): New.
8370         (value_fetch_lazy_memory): New.
8371         (value_fetch_lazy_register): New.
8372         (value_fetch_lazy): Factor out to smaller functions.
8373
8374 2018-06-01  Tom Tromey  <tom@tromey.com>
8375
8376         * cp-name-parser.y (backslashable, represented): Now const.
8377
8378 2018-06-01  Tom Tromey  <tom@tromey.com>
8379
8380         * cp-name-parser.y: Include parser-defs.h.
8381         (parser_fprintf): Remove declaration.
8382
8383 2018-06-01  Tom Tromey  <tom@tromey.com>
8384
8385         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8386         %parse-param.
8387         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8388         (global_result): Remove globals.
8389         (struct cpname_state): New.
8390         (yyparse): Don't declare.
8391         (yylex, yyerror): Move declarations after %union.
8392         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8393         (make_name): Add state parameter.
8394         Update all callers.
8395         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8396         parameter.
8397         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8398         Update.
8399         (yylex): Add lvalp, state parameters.
8400         (yyerror): Add state parameter.
8401         (cp_demangled_name_to_comp): Update.
8402
8403 2018-06-01  Tom Tromey  <tom@tromey.com>
8404
8405         * cp-name-parser.y (parser_fprintf): Declare.
8406         (GDB_YY_REMAP_PREFIX): Define.
8407         Include yy-remap.h.  Don't redefine yy* identifiers.
8408
8409 2018-06-01  Tom Tromey  <tom@tromey.com>
8410
8411         * python/py-type.c (typy_legacy_template_argument): Update.
8412         * cp-support.h (cp_demangled_name_to_comp): Update.
8413         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8414         parameter to be a "std::string *".
8415         (main): Update.
8416
8417 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8418
8419         * ada-lex.l: Include "diagnostics.h" instead of
8420         "common/diagnostics.h".
8421         * unittests/environ-selftests.c: Likewise.
8422         * common/diagnostics.h: Moved to ../include.
8423
8424 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8425
8426         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8427         to language_mode_manual while calling breakpoint_re_set_one.
8428
8429 2018-06-01  Tom Tromey  <tom@tromey.com>
8430
8431         * valops.c (value_cast_structs, destructor_name_p): Update.
8432         * symtab.c (gdb_mangle_name): Update.
8433         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8434         Update.
8435         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8436         (pascal_object_print_value_fields, pascal_object_print_value):
8437         Update.
8438         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8439         * linespec.c (find_methods): Update.
8440         * gdbtypes.h (type_name_no_tag): Remove.
8441         (type_name_or_error): Rename from type_name_no_tag_or_error.
8442         * gdbtypes.c (type_name_no_tag): Remove.
8443         (type_name_or_error): Rename from type_name_no_tag_or_error.
8444         (lookup_struct_elt_type, check_typedef): Update.
8445         * expprint.c (print_subexp_standard): Update.
8446         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8447         * d-namespace.c (d_lookup_nested_symbol): Update.
8448         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8449         (cp_print_class_member): Update.
8450         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8451         * completer.c (add_struct_fields): Update.
8452         * c-typeprint.c (cp_type_print_derivation_info)
8453         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8454         Update.
8455         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8456         (ada_prefer_type, ada_is_exception_sym): Update.
8457
8458 2018-06-01  Tom Tromey  <tom@tromey.com>
8459
8460         * valops.c (enum_constant_from_type, value_namespace_elt)
8461         (value_maybe_namespace_elt): Update.
8462         * valarith.c (find_size_for_pointer_math): Update.
8463         * target-descriptions.c (make_gdb_type): Update.
8464         * symmisc.c (print_symbol): Update.
8465         * stabsread.c (define_symbol, read_type)
8466         (complain_about_struct_wipeout, add_undefined_type)
8467         (cleanup_undefined_types_1): Update.
8468         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8469         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8470         (rust_internal_print_type, rust_composite_type)
8471         (rust_evaluate_funcall, rust_evaluate_subexp)
8472         (rust_inclusive_range_type_p): Update.
8473         * python/py-type.c (typy_get_tag): Update.
8474         * p-typeprint.c (pascal_type_print_base): Update.
8475         * mdebugread.c (parse_symbol, parse_type): Update.
8476         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8477         Update.
8478         * guile/scm-type.c (gdbscm_type_tag): Update.
8479         * go-lang.c (sixg_string_p): Update.
8480         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8481         Update.
8482         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8483         (TYPE_TAG_NAME): Remove.
8484         * gdbtypes.c (type_name_no_tag): Simplify.
8485         (check_typedef, check_types_equal, recursive_dump_type)
8486         (copy_type_recursive, arch_composite_type): Update.
8487         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8488         in summary mode when needed.
8489         * eval.c (evaluate_funcall): Update.
8490         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8491         (process_structure_scope, read_enumeration_type)
8492         (read_namespace_type, read_module_type, determine_prefix): Update.
8493         * cp-support.c (inspect_type): Update.
8494         * coffread.c (process_coff_symbol, decode_base_type): Update.
8495         * c-varobj.c (c_is_path_expr_parent): Update.
8496         * c-typeprint.c (c_type_print_base_struct_union): Update.
8497         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8498         summary when using C language.
8499         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8500         (gen_maybe_namespace_elt): Update.
8501         * ada-lang.c (ada_type_name): Simplify.
8502         (empty_record, ada_template_to_fixed_record_type_1)
8503         (template_to_static_fixed_type)
8504         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8505
8506 2018-06-01  Tom Tromey  <tom@tromey.com>
8507
8508         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8509         c_print_type.
8510         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8511         (c_print_type): Update.
8512         (c_print_type): New overload.
8513         (c_type_print_varspec_prefix, c_type_print_args)
8514         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8515         (c_type_print_base_struct_union, c_type_print_base_1)
8516         (cp_type_print_method_args): Add "language" parameter.
8517         (c_type_print_base): Update.
8518         * c-lang.h (c_print_type): Add new overload.
8519
8520 2018-06-01  Tom Tromey  <tom@tromey.com>
8521
8522         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8523         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8524
8525 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8526
8527         * aarch64-tdep.c (aarch64_sve_register_names): New const
8528         var.
8529         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8530         (AARCH64_SVE_Z_REGS_NUM): New define.
8531         (AARCH64_SVE_P_REGS_NUM): Likewise.
8532         (AARCH64_SVE_NUM_REGS): Likewise.
8533
8534 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8535
8536         * nat/linux-ptrace.h [__alpha__]
8537         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8538         definitions.
8539
8540 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8541
8542         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8543         the endianness selected.
8544         * NEWS: Document `set endian auto' mode operation update.
8545
8546 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8547
8548         * Makefile.in: Add new header.
8549         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8550         (sve_vl_from_vg): Likewise.
8551         (sve_vq_from_vl): Likewise.
8552         (sve_vl_from_vq): Likewise.
8553         (sve_vq_from_vg): Likewise.
8554         (sve_vg_from_vq): Likewise.
8555         * configure.nat: Add new c file.
8556         * nat/aarch64-sve-linux-ptrace.c: New file.
8557         * nat/aarch64-sve-linux-ptrace.h: New file.
8558
8559 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8560
8561         * aarch64-linux-nat.c (aarch64_linux_read_description):
8562         Add parmeter zero.
8563         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8564         Likewise.
8565         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8566         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8567         (aarch64_gdbarch_init): Add parmeter zero.
8568         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8569         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8570         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8571         parmeter.
8572         * doc/gdb.texinfo: Describe SVE feature
8573         * features/aarch64-sve.c: New file.
8574
8575 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8576
8577         PR gdb/23210
8578         * gdbarch.sh (significant_addr_bit): Default to zero when
8579         not set by target architecture.
8580         * gdbarch.c: Re-generated.
8581         * utils.c (address_significant): Update.
8582
8583 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8584
8585         * stack.c (func_command): Remove trailing newline in call to error.
8586
8587 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8588
8589         * regcache.h (regcache_raw_collect): Remove, update callers to
8590         use regcache::raw_collect.
8591         * regcache.c (regcache_raw_collect): Remove.
8592
8593 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8594
8595         * regcache.h (regcache_raw_supply): Remove, update callers to
8596         use detached_regcache::raw_supply.
8597         * regcache.c (regcache_raw_supply): Remove.
8598
8599 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8600
8601         * regcache.h (regcache_cooked_write_part): Remove, update
8602         callers to use regcache::cooked_write_part.
8603         * regcache.c (regcache_cooked_write_part): Remove.
8604
8605 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8606
8607         * regcache.h (regcache_cooked_read_part): Remove, update callers
8608         to use readable_regcache::cooked_read_part.
8609         * regcache.c (regcache_cooked_read_part): Remove.
8610
8611 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8612
8613         * regcache.h (regcache_cooked_read_value): Remove, update
8614         callers to use readable_regcache::cooked_read_value.
8615         * regcache.c (regcache_cooked_read_value): Remove.
8616
8617 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8618
8619         * regcache.h (regcache_cooked_write): Remove, update callers to
8620         use regcache::cooked_write.
8621         * regcache.c (regcache_cooked_write): Remove.
8622
8623 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8624
8625         * regcache.h (regcache_invalidate): Remove, update callers to
8626         use detached_regcache::invalidate instead.
8627         * regcache.c (regcache_invalidate): Remove.
8628
8629 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8630
8631         * regcache.h (regcache_raw_write_part): Remove, update callers
8632         to use regcache::raw_write_part instead.
8633         * regcache.c (regcache_raw_write_part): Remove.
8634
8635 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8636
8637         * regcache.h (regcache_raw_read_part): Remove, update callers to
8638         use readable_regcache::raw_read_part instead.
8639         * regcache.c (regcache_raw_read_part): Remove.
8640
8641 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8642
8643         * regcache.h (regcache_cooked_read): Remove, update callers to
8644         use readable_regcache::cooked_read instead.
8645         * regcache.c (regcache_cooked_read): Remove.
8646
8647 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8648
8649         * regcache.h (regcache_raw_write): Remove, update callers to use
8650         regcache::raw_write instead.
8651         * regcache.c (regcache_raw_write): Remove.
8652
8653 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8654
8655         * regcache.h (regcache_raw_read): Remove, update callers to use
8656         readable_regcache::raw_read instead.
8657         * regcache.c (regcache_raw_read): Remove.
8658
8659 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8660
8661         * regcache.h (regcache_raw_update): Remove, update callers to
8662         use readable_regcache::raw_update instead.
8663         * regcache.c (regcache_raw_update): Remove.
8664
8665 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8666
8667         * regcache.h (regcache_register_status): Remove, update callers
8668         to use reg_buffer::get_register_status directly instead.
8669         * regcache.c (regcache_register_status): Remove.
8670
8671 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8672
8673         * regcache.h (regcache_get_ptid): Remove, update all callers to
8674         call regcache::ptid instead.
8675         * regcache.c (regcache_get_ptid): Remove.
8676
8677 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8678
8679         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8680
8681 2018-05-30  Pedro Alves  <palves@redhat.com>
8682
8683         * common/common-exceptions.h (exception_rethrow): Use
8684         ATTRIBUTE_NORETURN.
8685
8686 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8687
8688         * breakpoint.c (print_solib_event, check_status_catch_solib):
8689         Remove struct keyword in range-based for loops.
8690         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8691         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8692         Likewise.
8693         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8694         Likewise.
8695         * symfile.c (addr_info_make_relative): Likewise.
8696         * thread.c (value_in_thread_stack_temporaries): Likewise.
8697
8698 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8699
8700         PR gdb/16841
8701         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8702         aggregate type to get its real type before accessing it.
8703
8704 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8705
8706         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8707         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8708         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8709         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8710         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8711         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8712         * printcmd.c (info_address_command): Likewise.
8713
8714 2018-05-29  Tom Tromey  <tom@tromey.com>
8715
8716         * windows-nat.c (handle_exception): Update fall-through comment.
8717
8718 2018-05-29  Tom Tromey  <tom@tromey.com>
8719
8720         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8721         (struct program_space) <added_solibs>: Now a std::vector.
8722         * breakpoint.c (print_solib_event): Update.
8723         (check_status_catch_solib): Update.
8724         * progspace.c (clear_program_space_solib_cache): Update.
8725         * solib.c (update_solib_list): Update.
8726
8727 2018-05-29  Tom Tromey  <tom@tromey.com>
8728
8729         * python/py-type.c (typy_richcompare): Update.
8730         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8731         * gdbtypes.h (types_deeply_equal): Return bool.
8732         (types_equal): Likewise.
8733         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8734         declare VEC.
8735         (check_types_equal): Change worklist to std::vector.  Return
8736         bool.
8737         (struct type_equality_entry): Add constructor.
8738         (compare_maybe_null_strings): Return bool.
8739         (check_types_worklist): Return bool.  Change worklist to
8740         std::vector.
8741         (types_deeply_equal): Use std::vector.
8742         (types_equal): Return bool.
8743         (compare_maybe_null_strings): Simplify.
8744
8745 2018-05-29  Tom Tromey  <tom@tromey.com>
8746
8747         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8748
8749 2018-05-29  Tom Tromey  <tom@tromey.com>
8750
8751         * objc-lang.h: Don't include cp-support.h.
8752         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8753         declare VEC.
8754
8755 2018-05-27  Tom Tromey  <tom@tromey.com>
8756
8757         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8758
8759 2018-05-25  Tom Tromey  <tom@tromey.com>
8760
8761         * value.c (value::location): Initialize.
8762
8763 2018-05-25  Tom Tromey  <tom@tromey.com>
8764
8765         * dbxread.c (init_bincl_list): Remove.
8766         (bincl_list): Now a std::vector.
8767         (bincls_allocated, next_bincl): Remove.
8768         (free_bincl_list, do_free_bincl_list_cleanup)
8769         (make_cleanup_free_bincl_list): Remove.
8770         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8771         unique_xmalloc_ptr.
8772         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8773         (struct header_file_location): Add constructor.
8774         (add_bincl_to_list): Remove.
8775
8776 2018-05-25  Tom Tromey  <tom@tromey.com>
8777
8778         * tui/tui.c (tui_enable): Update.
8779         * mi/mi-interp.c (mi_interp::init): Update.
8780         * interps.h (class interp) <name>: New method.
8781         <m_name>: Rename from name.
8782         (~scoped_restore_interp): Update.
8783         * interps.c (interp::interp): Update.
8784         (interp_add, interp_set, interp_lookup_existing)
8785         (current_interp_named_p): Update.
8786
8787 2018-05-25  Tom Tromey  <tom@tromey.com>
8788
8789         * interps.c (interp_name): Remove.
8790         * mi/mi-interp.c (mi_interp::init): Update.
8791         * interps.h (interp_name): Remove.
8792         (~scoped_restore_interp): Update.
8793         * tui/tui.c (tui_enable): Update.
8794
8795 2018-05-25  Tom Tromey  <tom@tromey.com>
8796
8797         * utils.c (fputs_maybe_filtered): Update.
8798         * linespec.c (decode_line_full): Update.
8799         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8800         (mi_print_breakpoint_for_event, mi_solib_loaded)
8801         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8802         (mi_user_selected_context_changed): Update.
8803         * mi/mi-main.c (mi_execute_command): Update.
8804         * cli/cli-script.c (execute_control_command): Update.
8805         * python/python.c (execute_gdb_command): Update.
8806         * solib.c (info_sharedlibrary_command): Update.
8807         * interps.c (interp_ui_out): Remove.
8808         * interps.h (interp_ui_out): Remove.
8809
8810 2018-05-25  Tom Tromey  <tom@tromey.com>
8811
8812         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8813         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8814         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8815
8816 2018-05-25  Tom Tromey  <tom@tromey.com>
8817
8818         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8819         * interps.c (interp_exec): Use scoped_restore.
8820
8821 2018-05-25  Tom Tromey  <tom@tromey.com>
8822
8823         * remote.c (remote_target::remote_file_get): Use
8824         gdb::byte_vector.
8825         (remote_target::remote_file_put): Likewise.
8826
8827 2018-05-25  Tom Tromey  <tom@tromey.com>
8828
8829         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8830         a std::string.
8831         (get_pe_section_index, add_pe_exported_sym): Update.
8832         (read_pe_exported_syms): Use gdb::def_vector.
8833
8834 2018-05-25  Tom Tromey  <tom@tromey.com>
8835
8836         * frame.c (remove_prev_frame): Remove.
8837         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8838
8839 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8840
8841         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8842         Remove prototypes.
8843         * mips-linux-nat.c (supply_fpregset): Always call
8844         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8845         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8846         `mips_fill_fpregset'.
8847         * mips-linux-tdep.c (mips_supply_fpregset)
8848         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8849         (mips_fill_fpregset_wrapper): Remove functions.
8850         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8851         (mips_linux_fpregset): Remove variable.
8852         (mips_linux_iterate_over_regset_sections): Use
8853         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8854         (mips_linux_o32_sigframe_init): Remove comment.
8855
8856 2018-05-25  Pedro Alves  <palves@redhat.com>
8857
8858         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8859         (struct readahead_cache, struct packet_reg, struct
8860         remote_arch_state, class remote_state): Move higher up in the
8861         file.
8862         (remote_target::m_remote_state): Now an object instead of a pointer.
8863         (remote_target::get_remote_state): Adjust.
8864
8865 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8866
8867         * stack.c (select_and_print_frame): Delete.
8868         (struct function_bounds): Move struct within function.
8869         (func_command): Most content moved into new function
8870         find_frame_for_function, use new function, print result, add
8871         function comment.
8872         (find_frame_for_function): New function, now returns a result.
8873
8874 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8875
8876         * stack.c (iterate_over_block_arg_vars): Fix comment.
8877         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8878
8879 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8880
8881         PR gdb/23203
8882         * frame.c
8883         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8884         Define.
8885         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8886         Define.
8887         * frame.h (class scoped_restore_selected_frame): New class.
8888         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8889         of any exception, use scoped_restore_selected_frame to restore the
8890         frame instead.
8891
8892 2018-05-24  Pedro Alves  <palves@redhat.com>
8893
8894         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8895         override.
8896
8897 2018-05-23  Tom Tromey  <tom@tromey.com>
8898
8899         * complaints.c (struct complaints): Remove.
8900         (symfile_complaint_book): Remove.
8901         (series): New global.
8902         (complaint_internal): Update.
8903         (clear_complaints): Update.
8904
8905 2018-05-23  Tom Tromey  <tom@tromey.com>
8906
8907         * complaints.c (counters): New global.
8908         (struct complain): Remove.
8909         (struct complaints) <root>: Remove.
8910         (complaint_sentinel): Remove.
8911         (symfile_complaint_book): Update.
8912         (find_complaint) Remove.
8913         (complaint_internal, clear_complaints): Update.
8914
8915 2018-05-23  Tom Tromey  <tom@tromey.com>
8916
8917         * complaints.c (struct complain) <file, line>: Remove.
8918         (find_complaint): Remove file, line parameters.
8919         (complaint_internal): Update.
8920
8921 2018-05-23  Tom Tromey  <tom@tromey.com>
8922
8923         * complaints.c (vcomplaint): Remove.
8924         (complaint_internal) Merge in contents of vcomplaint.
8925
8926 2018-05-23  Tom Tromey  <tom@tromey.com>
8927
8928         * complaints.c (struct complaints) <explanation>: Remove.
8929         (symfile_explanations): Remove.
8930         (symfile_complaint_book): Update.
8931         (vcomplaint): Update.
8932         (struct explanation): Remove.
8933
8934 2018-05-23  Tom Tromey  <tom@tromey.com>
8935
8936         * complaints.c (symfile_complaints): Remove.
8937         (complaint_internal): Remove "complaints" parameter.
8938         (clear_complaints, vcomplaint): Remove "c" parameter.
8939         (get_complaints): Remove.
8940         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8941         (dwarf2_debug_line_missing_file_complaint)
8942         (dwarf2_debug_line_missing_end_sequence_complaint)
8943         (dwarf2_complex_location_expr_complaint)
8944         (dwarf2_const_value_length_mismatch_complaint)
8945         (dwarf2_section_buffer_overflow_complaint)
8946         (dwarf2_macro_malformed_definition_complaint)
8947         (dwarf2_invalid_attrib_class_complaint)
8948         (create_addrmap_from_index, dw2_symtab_iter_next)
8949         (dw2_expand_marked_cus)
8950         (dw2_debug_names_iterator::find_vec_in_debug_names)
8951         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8952         (create_debug_type_hash_table, init_cutu_and_read_dies)
8953         (partial_die_parent_scope, add_partial_enumeration)
8954         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8955         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8956         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8957         (create_cus_hash_table, create_dwp_hash_table)
8958         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8959         (dwarf2_rnglists_process, dwarf2_ranges_process)
8960         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8961         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8962         (handle_struct_member_die, process_structure_scope)
8963         (read_array_type, read_common_block, read_module_type)
8964         (read_tag_pointer_type, read_typedef, read_base_type)
8965         (read_subrange_type, load_partial_dies, partial_die_info::read)
8966         (partial_die_info::read, partial_die_info::read)
8967         (partial_die_info::read, read_checked_initial_length_and_offset)
8968         (dwarf2_string_attr, read_formatted_entries)
8969         (dwarf_decode_line_header)
8970         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8971         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8972         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8973         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8974         (get_signatured_type, get_DW_AT_signature_type)
8975         (decode_locdesc, file_file_name, consume_improper_spaces)
8976         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8977         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8978         (dwarf2_symbol_mark_computed, set_die_type)
8979         (read_attribute_value): Update.
8980         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8981         Update.
8982         * dbxread.c (unknown_symtype_complaint)
8983         (lbrac_mismatch_complaint, repeated_header_complaint)
8984         (set_namestring, function_outside_compilation_unit_complaint)
8985         (read_dbx_symtab, process_one_symbol): Update.
8986         * gdbtypes.c (stub_noname_complaint): Update.
8987         * windows-nat.c (handle_unload_dll): Update.
8988         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8989         (decode_base_type): Update.
8990         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8991         (eb_complaint, record_include_begin, record_include_end)
8992         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8993         (process_xcoff_symbol, read_symbol)
8994         (function_outside_compilation_unit_complaint)
8995         (scan_xcoff_symtab): Update.
8996         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8997         * buildsym.c (finish_block_internal, make_blockvector)
8998         (end_symtab_get_static_block, augment_type_symtab): Update.
8999         * dtrace-probe.c (dtrace_process_dof)
9000         (dtrace_static_probe_ops::get_probes): Update.
9001         * complaints.h (struct complaint): Don't declare.
9002         (symfile_complaints): Remove.
9003         (complaint_internal): Remove "complaints" parameter.
9004         (complaint): Likewise.
9005         (clear_complaints): Likewise.
9006         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9007         (reread_symbols): Update.
9008         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9009         (dwarf2_frame_cache, decode_frame_entry): Update.
9010         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9011         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9012         (info_selectors_command): Update.
9013         * macrotab.c (macro_include, check_for_redefinition)
9014         (macro_undef): Update.
9015         * objfiles.c (filter_overlapping_sections): Update.
9016         * stabsread.c (invalid_cpp_abbrev_complaint)
9017         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9018         (define_symbol, error_type, read_type, rs6000_builtin_type)
9019         (stabs_method_name_from_physname, read_member_functions)
9020         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9021         (attach_fields_to_type, complain_about_struct_wipeout)
9022         (read_range_type, read_args, common_block_start)
9023         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9024         Update.
9025         * mdebugread.c (index_complaint, unknown_ext_complaint)
9026         (basic_type_complaint, bad_tag_guess_complaint)
9027         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9028         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9029         (parse_procedure, parse_lines)
9030         (function_outside_compilation_unit_complaint)
9031         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9032         (bad_tag_guess_complaint, reg_value_complaint): Update.
9033         * cp-support.c (demangled_name_complaint): Update.
9034         * macroscope.c (sal_macro_scope): Update.
9035         * dwarf-index-write.c (class debug_names): Update.
9036
9037 2018-05-23  Tom Tromey  <tom@tromey.com>
9038
9039         * complaints.c (clear_complaints): Remove "noisy" parameter.
9040         * complaints.h (clear_complaints): Update.
9041         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9042         (reread_symbols): Update.
9043
9044 2018-05-23  Tom Tromey  <tom@tromey.com>
9045
9046         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9047         SUBSEQUENT_MESSAGE.
9048         (vcomplaint, clear_complaints): Update.
9049         (symfile_explanations): Remove some messages.
9050
9051 2018-05-23  Tom Tromey  <tom@tromey.com>
9052
9053         * complaints.c (internal_complaint): Remove.
9054         * complaints.h (internal_complaint): Remove.
9055
9056 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9057
9058         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9059
9060 2018-05-22  Pedro Alves  <palves@redhat.com>
9061
9062         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9063         (remote_fileio_badfd, remote_fileio_return_errno)
9064         (remote_fileio_return_success, remote_fileio_func_open)
9065         (remote_fileio_func_open, remote_fileio_func_close)
9066         (remote_fileio_func_read, remote_fileio_func_write)
9067         (remote_fileio_func_lseek, remote_fileio_func_rename)
9068         (remote_fileio_func_unlink, remote_fileio_func_stat)
9069         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9070         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9071         remote_target parameter.
9072         (remote_fio_func_map) <func>: Add remote_target parameter.
9073         (do_remote_fileio_request, remote_fileio_request):
9074         * remote-fileio.h (remote_fileio_request):
9075         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9076         remote_target parameter.
9077         (remote_notif_process, handle_notification): Adjust to pass down
9078         the remote.
9079         (remote_notif_state_allocate): Add remote_target parameter.  Save
9080         it.
9081         * remote-notif.h (struct remote_target): Forward declare.
9082         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9083         remote_target parameter.
9084         (struct remote_notif_state) <remote>: New field.
9085         (remote_notif_ack, remote_notif_parse): Add remote_target
9086         parameter.
9087         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9088         remote_target parameter.
9089         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9090         (threads_listing_context, rmt_thread_action, protocol_feature)
9091         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9092         (packet_result, struct threads_listing_context, remote_state):
9093         Move definitions and declarations higher up.
9094         (remote_target) <~remote_target>: Declare.
9095         (remote_download_command_source, remote_file_put, remote_file_get)
9096         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9097         (remote_hostio_pread_vFile, remote_hostio_send_command)
9098         (remote_hostio_set_filesystem, remote_hostio_open)
9099         (remote_hostio_close, remote_hostio_unlink, remote_state)
9100         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9101         (get_memory_write_packet_size, get_memory_read_packet_size)
9102         (append_pending_thread_resumptions, remote_detach_1)
9103         (append_resumption, remote_resume_with_vcont)
9104         (add_current_inferior_and_thread, wait_ns, wait_as)
9105         (process_stop_reply, remote_notice_new_inferior)
9106         (process_initial_stop_replies, remote_add_thread)
9107         (btrace_sync_conf, remote_btrace_maybe_reopen)
9108         (remove_new_fork_children, kill_new_fork_children)
9109         (discard_pending_stop_replies, stop_reply_queue_length)
9110         (check_pending_events_prevent_wildcard_vcont)
9111         (discard_pending_stop_replies_in_queue, stop_reply)
9112         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9113         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9114         (remote_interrupt_as, remote_interrupt_ns)
9115         (remote_get_noisy_reply, remote_query_attached)
9116         (remote_add_inferior, remote_current_thread, get_current_thread)
9117         (set_thread, set_general_thread, set_continue_thread)
9118         (set_general_process, write_ptid)
9119         (remote_unpack_thread_info_response, remote_get_threadinfo)
9120         (parse_threadlist_response, remote_get_threadlist)
9121         (remote_threadlist_iterator, remote_get_threads_with_ql)
9122         (remote_get_threads_with_qxfer)
9123         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9124         (get_offsets, remote_check_symbols, remote_supported_packet)
9125         (remote_query_supported, remote_packet_size)
9126         (remote_serial_quit_handler, remote_detach_pid)
9127         (remote_vcont_probe, remote_resume_with_hc)
9128         (send_interrupt_sequence, interrupt_query)
9129         (remote_notif_get_pending_events, fetch_register_using_p)
9130         (send_g_packet, process_g_packet, fetch_registers_using_g)
9131         (store_register_using_P, store_registers_using_G)
9132         (set_remote_traceframe, check_binary_download)
9133         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9134         (remote_xfer_live_readonly_partial, remote_read_bytes)
9135         (remote_send_printf, remote_flash_write, readchar)
9136         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9137         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9138         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9139         (extended_remote_disable_randomization, extended_remote_run)
9140         (send_environment_packet, extended_remote_environment_support)
9141         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9142         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9143         (packet_command): Now methods of ...
9144         (remote_target): ... this class.
9145         (m_remote_state) <remote_target>: New field.
9146         (struct remote_state) <stop_reply_queue,
9147         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9148         fields.
9149         (remote_state::remote_state): Allocate stop_reply_queue.
9150         (remote_state): Delete global.
9151         (get_remote_state_raw): Delete.
9152         (remote_target::get_remote_state): Allocate m_remote_state on
9153         demand.
9154         (get_current_remote_target): New.
9155         (remote_ops, extended_remote_ops): Delete.
9156         (wait_forever_enabled_p, remote_async_inferior_event_token):
9157         Delete, moved to struct remote_state.
9158         (remote_target::close): Delete self.  Destruction bits split to
9159         ...
9160         (remote_target::~remote_target): ... this.
9161         (show_memory_packet_size): Adjust to use
9162         get_current_remote_target.
9163         (struct protocol_feature) <func>: Add remote_target parameter.
9164         All callers adjusted.
9165         (curr_quit_handler_target): New.
9166         (remote_serial_quit_handler): Reimplement.
9167         (remote_target::open_1): Adjust to use get_current_remote_target.
9168         Heap-allocate remote_target/extended_remote_target instances.
9169         (vcont_builder::vcont_builder): Add remote_target parameter, and
9170         save it in m_remote.  All callers adjusted.
9171         (vcont_builder::m_remote): New field.
9172         (vcont_builder::restart, vcont_builder::flush)
9173         (vcont_builder::push_action): Use it.
9174         (remote_target::commit_resume): Use it.
9175         (struct queue_iter_param) <remote>: New field.
9176         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9177         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9178         (check_pending_event_prevents_wildcard_vcont_callback)
9179         (remote_target::check_pending_events_prevent_wildcard_vcont)
9180         (remote_target::discard_pending_stop_replies)
9181         (remote_target::discard_pending_stop_replies_in_queue)
9182         (remote_target::remote_notif_remove_queued_reply): Fill in
9183         'remote' field.
9184         (remote_notif_get_pending_events): New.
9185         (remote_target::readchar, remote_target::remote_serial_write):
9186         Save/restore curr_quit_handler_target.
9187         (putpkt): New.
9188         (kill_new_fork_children): Fill in 'remote' field.
9189         (packet_command): Use get_current_remote_target, defer to
9190         remote_target method of same name.
9191         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9192         parameter, and save it in m_remote.  All callers adjusted.
9193         (scoped_remote_fd::release): Use m_remote.
9194         (scoped_remote_fd::m_remote): New field.
9195         (remote_file_put, remote_file_get, remote_file_delete): Use
9196         get_current_remote_target, defer to remote_target method of same
9197         name.
9198         (remote_btrace_reset): Add remote_state paremeter.  Update all
9199         callers.
9200         (remote_async_inferior_event_handler). Pass down 'data'.
9201         (remote_new_objfile): Use get_current_remote_target.
9202         (remote_target::vcont_r_supported): New.
9203         (set_range_stepping): Use get_current_remote_target and
9204         remote_target::vcont_r_supported.
9205         (_initialize_remote): Don't allocate 'remote_state' and
9206         'stop_reply_queue' globals.
9207         * remote.h (struct remote_target): Forward declare.
9208         (getpkt, putpkt, remote_notif_get_pending_events): Add
9209         'remote_target' parameter.
9210
9211 2018-05-22  Pedro Alves  <palves@redhat.com>
9212
9213         * remote.c (vcont_builder): Now a class.  Make all data members
9214         private.
9215         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9216         Declare methods.
9217         (vcont_builder_restart): Rename to ...
9218         (vcont_builder::restart): ... this.
9219         (vcont_builder_flush): Rename to ...
9220         (vcont_builder::flush): ... this.
9221         (vcont_builder_push_action): Rename to ...
9222         (vcont_builder::push_action): ... this.
9223         (remote_target::commit_resume): Adjust.
9224
9225 2018-05-22  Pedro Alves  <palves@redhat.com>
9226
9227         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9228         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9229         (get_fixed_memory_packet_size): New.
9230         (get_memory_packet_size): Use it.
9231         (set_memory_packet_size): Don't override the config size with
9232         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9233         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9234         Don't refer to get_memory_packet_size if not connected to a remote
9235         target.  Show "(default)" if configured size is 0.
9236
9237 2018-05-22  Pedro Alves  <palves@redhat.com>
9238
9239         * remote.c (remote_target::mourn_inferior): Move
9240         discard_pending_stop_replies call here from ...
9241         (_initialize_remote): ... here.
9242
9243 2018-05-22  Pedro Alves  <palves@redhat.com>
9244
9245         * remote.c (compare_section_command): Remove set_general_process
9246         call.
9247
9248 2018-05-22  Pedro Alves  <palves@redhat.com>
9249
9250         * remote.c (struct packet_reg, struct remote_arch_state):
9251         Move higher up in the file.
9252         (remote_state) <m_arch_states>: Store remote_arch_state values
9253         instead of remote_arch_state pointers.
9254         (remote_state::get_remote_arch_state): Adjust.
9255
9256 2018-05-22  Pedro Alves  <palves@redhat.com>
9257
9258         * remote.c: Include <unordered_map>.
9259         (remote_state): Now a class.
9260         (remote_state) <get_remote_arch_state>: Declare method.
9261         <get_remote_arch_state>: New field.
9262         (remote_arch_state) <remote_arch_state>: Declare ctor.
9263         <regs>: Now a unique_ptr.
9264         (remote_gdbarch_data_handle): Delete.
9265         (get_remote_arch_state): Delete.
9266         (remote_state::get_remote_arch_state): New.
9267         (get_remote_state): Adjust to call remote_state's
9268         get_remote_arch_state method.
9269         (init_remote_state): Delete, bits factored out to ...
9270         (remote_arch_state::remote_arch_state): ... this new method.
9271         (get_remote_packet_size, get_memory_packet_size)
9272         (process_g_packet, remote_target::fetch_registers)
9273         (remote_target::prepare_to_store, store_registers_using_G)
9274         (remote_target::store_registers, remote_target::get_trace_status):
9275         Adjust to call remote_state's method.
9276         (_initialize_remote): Remove reference to
9277         remote_gdbarch_data_handle.
9278
9279 2018-05-22  Pedro Alves  <palves@redhat.com>
9280
9281         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9282         pread>: New method declarations.
9283         (remote_target::open_1): Adjust.
9284         (readahead_cache_invalidate): Rename to ...
9285         (readahead_cache::invalidate): ... this, and adjust to be a class
9286         method.
9287         (readahead_cache_invalidate_fd): Rename to ...
9288         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9289         class method.
9290         (remote_hostio_pwrite): Adjust.
9291         (remote_hostio_pread_from_cache): Rename to ...
9292         (readahead_cache::pread): ... this, and adjust to be a class
9293         method.
9294         (remote_hostio_close): Adjust.
9295
9296 2018-05-22  Pedro Alves  <palves@redhat.com>
9297
9298         * remote.c (remote_hostio_close_cleanup): Delete.
9299         (class scoped_remote_fd): New.
9300         (remote_file_put, remote_file_get): Use it.
9301
9302 2018-05-22  Pedro Alves  <palves@redhat.com>
9303
9304         (struct vCont_action_support): Use bool and initialize all fields.
9305         (struct readahead_cache): Initialize all fields.
9306         (remote_state): Use bool and initialize all fields.
9307         (remote_state::remote_state, remote_state::~remote_state): New.
9308         (new_remote_state): Delete.
9309         (_initialize_remote): Use new to allocate remote_state.
9310
9311 2018-05-22  Pedro Alves  <palves@redhat.com>
9312             張俊芝  <zjz@zjz.name>
9313
9314         PR gdb/22973
9315         * c-exp.y: Include "c-support.h".
9316         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9317         of tolower.  Use c_ident_is_alpha to scan names.
9318         * c-lang.c: Include "c-support.h".
9319         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9320         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9321         * c-support.h: New file, with bits factored out from ...
9322         * cp-name-parser.y: ... this file.
9323         Include "c-support.h".
9324         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9325         c-support.h and renamed.
9326         (symbol_end, yylex): Adjust.
9327
9328 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9329
9330         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9331         parameter type to CORE_ADDR.
9332         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9333         parameter type in declaration to CORE_ADDR.
9334         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9335         target_auxv_search to get AT_HWCAP and use the result to get the
9336         target description.
9337         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9338         to CORE_ADDR. Remove the cast of the return value to unsigned
9339         long. Fix error predicate of target_auxv_search.
9340         (ppc_linux_nat_target::read_description): Change the type of the
9341         hwcap variable to CORE_ADDR.
9342
9343 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9344
9345         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9346         if the size of fpscr is larger than 32 bits.
9347
9348 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9349
9350         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9351         (ppc32_linux_vsxregmap): New global.
9352         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9353         regcache_supply_regset, and regcache_collect_regset.
9354         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9355         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9356         (fetch_vsx_register, store_vsx_register): Remove.
9357         (fetch_vsx_registers): Add regno parameter. Get regset using
9358         ppc_linux_vsxregset. Use regset to supply registers.
9359         (store_vsx_registers): Add regno parameter. Get regset using
9360         ppc_linux_vsxregset. Use regset to collect registers.
9361         (fetch_register): Call fetch_vsx_registers instead of
9362         fetch_vsx_register.
9363         (store_register): Call store_vsx_registers instead of
9364         store_vsx_register.
9365         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9366         new regno parameter.
9367         (store_ppc_registers): Call store_vsx_registers with -1 for the
9368         new regno parameter.
9369         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9370         (ppc_collect_vsxregset): Remove.
9371
9372 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9373
9374         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9375         offset fields.
9376         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9377         for vector register offset fields.
9378         (ppc64_fbsd_reg_offsets): Likewise.
9379         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9380         to vector register offset fields.
9381         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9382         to vector register offset fields.
9383         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9384         vector register offset fields.
9385         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9386         initializers for vector register offset fields.
9387         (rs6000_aix64_reg_offsets): Likewise.
9388         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9389         (ppc_supply_vrregset): Remove.
9390         (ppc_collect_vrregset): Remove.
9391         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9392         (ppc_linux_vrregset) : New function.
9393         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9394         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9395         (ppc32_linux_vrregset): Remove.
9396         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9397         and use result instead of ppc32_linux_vrregset.
9398         (ppc32_linux_reg_offsets): Remove initializers for vector register
9399         offset fields.
9400         (ppc64_linux_reg_offsets): Likewise.
9401         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9402         * ppc-linux-nat.c: Include regset.h.
9403         (gdb_vrregset_t): Adjust comment to account for little-endian
9404         mode.
9405         (supply_vrregset, fill_vrregset): Remove.
9406         (fetch_altivec_register, store_altivec_register): Remove.
9407         (fetch_altivec_registers): Add regno parameter. Get regset using
9408         ppc_linux_vrregset. Use regset to supply registers.
9409         (store_altivec_registers): Add regno parameter. Get regset using
9410         ppc_linux_vrregset. Use regset to collect registers.
9411         (fetch_register): Call fetch_altivec_registers instead of
9412         fetch_altivec_register.
9413         (store_register): Call store_altivec_registers instead of
9414         store_altivec_register.
9415         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9416         the new regno parameter.
9417         (store_ppc_registers): Call store_altivec_registers with -1 for
9418         the new regno parameter.
9419
9420 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9421
9422         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9423         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9424         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9425         (gdb_vrregset_t): Change array type size to
9426         PPC_LINUX_SIZEOF_VRREGSET.
9427         (gdb_vsxregset_t): Change array type size to
9428         PPC_LINUX_SIZEOF_VSXREGSET.
9429         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9430         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9431         PPC_LINUX_SIZEOF_VSXREGSET.
9432
9433 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9434
9435         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9436         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9437         nat/ppc-linux.c.
9438         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9439         ppc_linux_target_wordsize with tid.
9440         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9441         wordsize with tid.
9442         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9443         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9444         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9445         tid parameter. Remove static specifier.
9446         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9447         (ppc_linux_target_wordsize): New declaration.
9448
9449 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9450
9451         * arch/ppc-linux-common.c: New file.
9452         * arch/ppc-linux-common.h: New file.
9453         * arch/ppc-linux-tdesc.h: New file.
9454         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9455         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9456         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9457         arch/ppc-linux-tdesc.h.
9458         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9459         arch/ppc-linux-tdesc.h.
9460         (ppc_linux_nat_target::read_description): Remove target
9461         description matching code. Fill a ppc_linux_features struct and
9462         call ppc_linux_match_description with it. Move comment about ISA
9463         2.05 to ppc-linux-common.c.
9464         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9465         arch/ppc-linux-tdesc.h.
9466         (ppc_linux_core_read_description): Remove target description
9467         matching code. Fill a ppc_linux_features struct and call
9468         ppc_linux_match_description with it.
9469         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9470         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9471         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9472         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9473         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9474         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9475         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9476         (tdesc_powerpc_e500l): Remove.
9477
9478 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9479
9480         * ada-lang.c (catch_assert_command): Pass empty string instead
9481         of NULL for excep_string argument.
9482
9483 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9484
9485         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9486         the width of the requested register exceeds the width of the
9487         `ptrace' data type.
9488
9489 2018-05-21  Tom Tromey  <tom@tromey.com>
9490
9491         * printcmd.c (output_command): Remove.
9492         (output_command_const): Rename to output_command.
9493         * valprint.h (output_command): Rename from output_command_const.
9494         * tracepoint.c (trace_dump_actions): Call output_command.
9495
9496 2018-05-21  Tom Tromey  <tom@tromey.com>
9497
9498         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9499         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9500         * ada-lang.h (create_ada_exception_catchpoint): Update.
9501         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9502         std::string.
9503         (create_excep_cond_exprs, ~ada_catchpoint)
9504         (should_stop_exception, print_one_exception)
9505         (print_mention_exception, print_recreate_exception): Update.
9506         (ada_get_next_arg): Remove.
9507         (catch_ada_exception_command_split): Use std::string.  Change type
9508         of "excep_string", "cond_string".
9509         (catch_ada_exception_command): Update.
9510         (create_ada_exception_catchpoint): Change type of excep_string.
9511         (ada_exception_sal): Remove excep_string parameter.
9512         (~ada_catchpoint): Remove.
9513
9514 2018-05-21  Tom Tromey  <tom@tromey.com>
9515
9516         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9517         cleanup.
9518
9519 2018-05-21  Tom Tromey  <tom@tromey.com>
9520
9521         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9522         Return unique_xmalloc_ptr.
9523         (print_it_exception): Update.
9524
9525 2018-05-21  Tom Tromey  <tom@tromey.com>
9526
9527         * tracepoint.c (trace_dump_actions): Use std::string.
9528
9529 2018-05-21  Tom Tromey  <tom@tromey.com>
9530
9531         * symfile.c (reread_symbols): Use std::string for original_name.
9532
9533 2018-05-21  Tom Tromey  <tom@tromey.com>
9534
9535         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9536         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9537         constructor.
9538
9539 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9540
9541         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9542         instance to...
9543         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9544         * objfiles.c (get_objfile_bfd_data): Allocate
9545         objfile_per_bfd_storage with obstack_new when allocating on
9546         obstack.
9547
9548 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9549
9550         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9551         OBSTACK_ZALLOC.
9552         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9553         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9554         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9555         (add_pending): Likewise.
9556         (parse_symbol): Likewise.
9557         (parse_partial_symbols): Likewise.
9558         (psymtab_to_symtab_1): Likewise.
9559         (new_psymtab): Likewise.
9560         (elfmdebug_build_psymtabs): Likewise.
9561         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9562         * objfiles.c (get_objfile_bfd_data): Likewise.
9563         (objfile_register_static_link): Likewise.
9564         * psymtab.c (allocate_psymtab): Likewise.
9565         * stabsread.c (read_member_functions): Likewise.
9566         * xcoffread.c (xcoff_end_psymtab): Likewise.
9567
9568 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9569
9570         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9571         compiler supports std::is_trivially_constructible.
9572         * common/poison.h: Include obstack.h.
9573         (IsMallocable): Define to is_trivially_constructible if the
9574         compiler supports it, define to true_type otherwise.
9575         (xobnew): New.
9576         (XOBNEW): Redefine.
9577         (xobnewvec): New.
9578         (XOBNEWVEC): Redefine.
9579         * gdb_obstack.h (obstack_zalloc): New.
9580         (OBSTACK_ZALLOC): Redefine.
9581         (obstack_calloc): New.
9582         (OBSTACK_CALLOC): Redefine.
9583         (obstack_new): New.
9584         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9585         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9586         gdbarch.c.
9587         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9588         obstack_calloc/obstack_zalloc.
9589         (gdbarch_obstack_zalloc): Remove.
9590         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9591
9592 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9593
9594         * stack.c (backtrace_command_1): Remove useless variable int i.
9595
9596 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9597
9598         * stack.c (print_frame_info): Fix comment.
9599
9600 2018-05-18  Tom Tromey  <tom@tromey.com>
9601
9602         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9603         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9604         (~dwarf2_per_objfile): Update
9605         (dwarf2_get_dwz_file): Use new.
9606         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9607         unique_ptr.
9608
9609 2018-05-18  Tom Tromey  <tom@tromey.com>
9610
9611         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9612         unique_ptr.
9613         * dwarf2read.c (struct dwp_file): Add constructor and
9614         initializers.
9615         (open_and_init_dwp_file): Return a unique_ptr.
9616         (dwarf2_per_objfile, create_dwp_hash_table)
9617         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9618         (lookup_dwo_unit_in_dwp): Update.
9619         (open_and_init_dwp_file, get_dwp_file): Update.
9620
9621 2018-05-18  Tom Tromey  <tom@tromey.com>
9622
9623         * dwarf2read.c (dwarf2_per_objfile): Update.
9624         (struct mapped_index): Add initializers.
9625         (dwarf2_read_index): Use new.
9626         (dw2_symtab_iter_init): Update.
9627         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9628         unique_ptr.
9629
9630 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9631
9632         * dwarf2read.c (mapped_index) <total_size>: Remove.
9633
9634 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9635
9636         * unittests/format_pieces-selftests.c (test_format_specifier):
9637         Add ARI comments.
9638
9639 2018-05-18  Tom Tromey  <tom@tromey.com>
9640
9641         * c-typeprint.c (maybe_print_hole): New function.
9642         (c_print_type_struct_field_offset): Update.
9643         (c_type_print_base_struct_union): Call maybe_print_hole.
9644
9645 2018-05-17  Keith Seitz  <keiths@redhat.com>
9646
9647         * breakpoint.c (build_bpstat_chain): New function, moved from
9648         bpstat_stop_status.
9649         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9650         If no stop chain is passed, call build_bpstat_chain to build it.
9651         * breakpoint.h (build_bpstat_chain): Declare.
9652         (bpstat_stop_status): Move documentation here from breakpoint.c.
9653         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9654         build the stop chain and pass it to skip_inline_frames.
9655         Pass this stop chain to bpstat_stop_status.
9656         * inline-frame.c: Include breakpoint.h.
9657         (stopped_by_user_bp_inline_frame): New function.
9658         (skip_inline_frames): Add parameter `stop_chain'.
9659         Move documention to inline-frame.h.
9660         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9661         whether the frame should be elided.
9662         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9663         Add moved documentation and update for new parameter.
9664
9665 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9666
9667         PR cli/14975
9668         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9669         unittests/format_pieces-selftests.c.
9670         * common/format.h (format_piece) <operator==>: New.
9671         (format_pieces) <operator[]>: Remove.
9672         * common/format.c (format_pieces::format_pieces): Handle \e.
9673         * unittests/format_pieces-selftests.c: New.
9674
9675 2018-05-17  Tom Tromey  <tom@tromey.com>
9676
9677         PR symtab/23010:
9678         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9679         (dw2_instantiate_symtab): Add skip_partial parameter.
9680         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9681         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9682         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9683         (dw2_expand_symtabs_matching_one)
9684         (dw2_find_pc_sect_compunit_symtab)
9685         (dw2_debug_names_lookup_symbol)
9686         (dw2_debug_names_expand_symtabs_for_function): Update.
9687         (init_cutu_and_read_dies): Add skip_partial parameter.
9688         (process_psymtab_comp_unit, build_type_psymtabs_1)
9689         (process_skeletonless_type_unit, load_partial_comp_unit)
9690         (psymtab_to_symtab_1): Update.
9691         (load_full_comp_unit): Add skip_partial parameter.
9692         (process_imported_unit_die, dwarf2_read_addr_index)
9693         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9694         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9695         (read_signatured_type): Update.
9696
9697 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9698
9699         * value.c (release_value): Remove unused variable.
9700         (record_latest_value): Likewise.
9701         (access_value_history): Likewise.
9702         (preserve_values): Likewise.
9703
9704 2018-05-17  Tom Tromey  <tom@tromey.com>
9705
9706         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9707         Initialize.
9708
9709 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9710
9711         PR gdb/22286
9712         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9713         Also handle registers whose width is not a multiple of
9714         PTRACE_TYPE_RET.
9715         (linux_nat_trad_target::store_register): Likewise.
9716
9717 2018-05-16  Tom Tromey  <tom@tromey.com>
9718
9719         * gdbcore.h (core_bfd): Redefine.
9720         * corelow.c (core_target::close): Update.
9721         (core_target_open): Update.
9722         * progspace.h (struct program_space) <cbfd>: Now a
9723         gdb_bfd_ref_ptr.
9724
9725 2018-05-16  Tom Tromey  <tom@tromey.com>
9726
9727         PR cli/19551:
9728         * symfile-add-flags.h (enum symfile_add_flags)
9729         <SYMFILE_NOT_FILENAME>: New constant.
9730         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9731         objfile name from BFD.
9732         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9733         * minidebug.c (find_separate_debug_file_in_section): Put
9734         ".gnu_debugdata" into BFD's file name.
9735
9736 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9737
9738         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9739         Remove.
9740
9741 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9742
9743         PR binutils/21446
9744         * aarch64-tdep.c (aarch64_analyze_prologue,
9745         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9746         Indicate not interested in errors.
9747
9748 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9749
9750         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9751         Supply the MIPS_ZERO_REGNUM register.
9752
9753 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9754
9755         * mips-tdep.c (mask_address_var): Make variable static.
9756
9757 2018-05-14  Tom Tromey  <tom@tromey.com>
9758
9759         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9760
9761 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9762
9763         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9764         FXSAVE_ADDR for the mxcsr register.
9765
9766 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9767
9768         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9769
9770 2018-05-11  Pedro Alves  <palves@redhat.com>
9771
9772         * corelow.c (core_target) <core_target>: No longer inline.
9773         Initialize m_core_gdbarch, m_core_vec and build the section table
9774         here.
9775         <~core_target>: New.
9776         <core_gdbarch, get_core_register_section>: New methods.
9777         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9778         factored out from ...
9779         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9780         (core_ops): Delete.
9781         (sniff_core_bfd): Add gdbarch parameter.
9782         (core_close): Delete, merged into ...
9783         (core_target::close): ... here.  Delete self.
9784         (core_close_cleanup): Delete.
9785         (core_target_open): Allocate a core_target on the heap.  Use a
9786         unique_ptr instead of a cleanup.  Bits moved into the core_target
9787         ctor.  Adjust to use core_target methods instead of globals.
9788         (get_core_register_section): Rename to ...
9789         (core_target::get_core_register_section): ... this and adjust.
9790         (struct get_core_registers_cb_data): New.
9791         (get_core_registers_cb): Use it.  Use bool.
9792         (core_target::fetch_registers, core_target::files_info)
9793         (core_target::xfer_partial, core_target::read_description)
9794         (core_target::pid_to, core_target::thread_name): Adjust to
9795         reference class fields instead of globals.
9796         * target.h (struct target_ops_deleter, target_ops_up): New.
9797
9798 2018-05-11  Pedro Alves  <palves@redhat.com>
9799
9800         * corefile.c (core_file_command): Move to corelow.c.
9801         * corelow.c (the_core_target): Delete.
9802         (core_file_command): Moved from corefile.c.  Check exec_bfd
9803         instead of the_core_target.  Use target_detach instead of calling
9804         into the_core_target directly.
9805         (maybe_say_no_core_file_now): New.
9806         (core_target::detach): Use it.
9807         (_initialize_corelow): Remove references to the_core_target.
9808         * gdbcore.h (the_core_target): Delete.
9809
9810 2018-05-11  Tom Tromey  <tromey@redhat.com>
9811             Pedro Alves  <palves@redhat.com>
9812
9813         * corefile.c (core_bfd): Remove.
9814         * gdbcore.h (core_bfd): Now a macro.
9815         * progspace.h (struct program_space) <cbfd>: New field.
9816
9817 2018-05-11  Tom Tromey  <tom@tromey.com>
9818
9819         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9820         gdb::def_vector.
9821
9822 2018-05-10  Tom Tromey  <tom@tromey.com>
9823
9824         * configure: Rebuild.
9825         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9826
9827 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9828
9829         PR server/23158:
9830         * regformats/regdat.sh: Adjust script, following the addition
9831         of the new expedite_regs parameter to init_target_desc.
9832
9833 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9834     
9835         PR gdb/23127
9836         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9837         set_gdbarch_significant_addr_bit.
9838         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9839         set_gdbarch_significant_addr_bit.
9840         * utils.c (address_significant): Update to sign extend addr.
9841
9842 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9843
9844         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9845         (xtensa_linux_init_abi): Limit tdep->num_regs by
9846         tdep->num_nopriv_regs.
9847         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9848         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9849         not initialized.
9850
9851 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9852
9853         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9854
9855 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9856
9857         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9858         (I387_MXCSR_INIT_VAL): New constant.
9859         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9860         buffer if it was supplied by the inferior.
9861         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9862         (i387_xsave_get_clear_bv): New function.
9863         (i387_supply_xsave): Only read x87 control registers from the
9864         xsave buffer if the feature is enabled, and the state will have
9865         been written, otherwise, provide a suitable default.
9866         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9867         including x87 control registers.  Update control registers if they
9868         have changed from the default value, and mark features as enabled
9869         as required.
9870         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9871
9872 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9873
9874         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9875
9876 2018-05-07  Tom Tromey  <tom@tromey.com>
9877
9878         * configure: Rebuild.
9879         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9880
9881 2018-05-07  Tom Tromey  <tom@tromey.com>
9882
9883         PR tdep/20362:
9884         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9885         bit.  Use correct value for VDIV.
9886
9887 2018-05-04  Tom Tromey  <tom@tromey.com>
9888
9889         * configure: Rebuild.
9890         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9891
9892 2018-05-04  Tom Tromey  <tom@tromey.com>
9893
9894         * linux-record.c (record_linux_system_call) <case
9895         RECORD_SYS_RECVFROM>: Add "break".
9896
9897 2018-05-04  Tom Tromey  <tom@tromey.com>
9898
9899         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9900         Add missing "break".
9901         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9902         Add missing "break".
9903
9904 2018-05-04  Tom Tromey  <tom@tromey.com>
9905
9906         * rs6000-tdep.c (ppc_process_record_op4)
9907         (ppc_process_record_op63): Add fall-through comment.
9908
9909 2018-05-04  Tom Tromey  <tom@tromey.com>
9910
9911         * i386-tdep.c (i386_process_record): Add fall-through comment.
9912
9913 2018-05-04  Tom Tromey  <tom@tromey.com>
9914
9915         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9916         comment.
9917
9918 2018-05-04  Tom Tromey  <tom@tromey.com>
9919
9920         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9921         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9922         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9923         comment.
9924         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9925         comment.
9926         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9927         comment.
9928
9929 2018-05-04  Tom Tromey  <tom@tromey.com>
9930
9931         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9932
9933 2018-05-04  Tom Tromey  <tom@tromey.com>
9934
9935         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9936         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9937         * symfile.c (section_is_mapped): Fix fall-through comment.
9938         * stabsread.c (define_symbol, read_member_functions): Fix
9939         fall-through comment.
9940         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9941         comment.
9942         * remote.c (remote_wait_as): Fix fall-through comment.
9943         * p-exp.y (yylex): Fix fall-through comment.
9944         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9945         comment.
9946         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9947         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9948         * jv-exp.y (yylex): Fix fall-through comment.
9949         * go-exp.y (lex_one_token): Fix fall-through comment.
9950         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9951         fall-through comment.
9952         * f-exp.y (yylex): Fix fall-through comment.
9953         * dwarf2read.c (process_die): Fix fall-through comments.
9954         * dbxread.c (process_one_symbol): Fix fall-through comment.
9955         * d-exp.y (lex_one_token): Fix fall-through comment.
9956         * cp-name-parser.y (yylex): Fix fall-through comment.
9957         * coffread.c (coff_symtab_read): Fix fall-through comment.
9958         * c-exp.y (lex_one_token): Fix fall-through comment.
9959         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9960         comment.
9961         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9962         comment.
9963
9964 2018-05-04  Tom Tromey  <tom@tromey.com>
9965
9966         PR python/22730:
9967         * NEWS: Mention gdb.execute change.
9968         * gdbcmd.h (execute_control_command): Don't declare.
9969         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9970         execute_control_commands, execute_control_commands_to_string.
9971         * cli/cli-script.h (execute_control_commands)
9972         (execute_control_commands_to_string): Declare.
9973         (execute_control_command): Add from_tty parameter.
9974         * cli/cli-script.c (execute_control_commands)
9975         (execute_control_commands_to_string): New functions.
9976         (execute_user_command): Use execute_control_commands.
9977         (execute_control_command_1): Add "from_tty" parameter.  Update.
9978         (execute_control_command): Likewise.
9979
9980 2018-05-04  Tom Tromey  <tom@tromey.com>
9981
9982         PR python/22731:
9983         * NEWS: Mention that breakpoint commands are writable.
9984         * python/py-breakpoint.c (bppy_set_commands): New function.
9985         (breakpoint_object_getset) <"commands">: Use it.
9986
9987 2018-05-04  Tom Tromey  <tom@tromey.com>
9988
9989         * tracepoint.c (actions_command): Update.
9990         * mi/mi-cmd-break.c (mi_command_line_array)
9991         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9992         (mi_read_next_line): Remove.
9993         (mi_cmd_break_commands): Update.
9994         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9995         function_view.
9996         * cli/cli-script.c (get_command_line): Update.
9997         (process_next_line): Use function_view.  Constify.
9998         (recurse_read_control_structure, read_command_lines)
9999         (read_command_lines_1): Change argument types to function_view.
10000         (do_define_command, document_command): Update.
10001         * breakpoint.h (check_tracepoint_command): Don't declare.
10002         * breakpoint.c (check_tracepoint_command): Remove.
10003         (commands_command_1, create_tracepoint_from_upload): Update.
10004
10005 2018-05-04  Tom Tromey  <tom@tromey.com>
10006
10007         PR gdb/11750:
10008         * cli/cli-script.h (enum command_control_type) <define_control>:
10009         New constant.
10010         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10011         (build_command_line, execute_control_command_1)
10012         (process_next_line): Likewise.
10013         (do_define_command): New function, extracted from define_command.
10014         (define_command): Use it.
10015
10016 2018-05-04  Tom Tromey  <tom@tromey.com>
10017
10018         * tracepoint.c (actions_command): Update.
10019         * cli/cli-script.h (read_command_lines): Update.
10020         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10021         (MAX_TMPBUF): Remove define.
10022         (define_command): Use string_printf.
10023         (document_command): Likewise.
10024         * breakpoint.c (commands_command_1): Update.
10025
10026 2018-05-04  Tom Tromey  <tom@tromey.com>
10027
10028         * top.c (execute_command): Update.
10029         * cli/cli-script.h (print_command_lines): Now varargs.
10030         * cli/cli-script.c (print_command_lines): Now varargs.
10031         (execute_control_command_1) <case while_control, case if_control>:
10032         Update.
10033
10034 2018-05-04  Tom Tromey  <tom@tromey.com>
10035
10036         * tracepoint.c (all_tracepoint_actions): Rename from
10037         all_tracepoint_actions_and_cleanup.  Change return type.
10038         (actions_command, encode_actions_1, encode_actions)
10039         (trace_dump_actions, tdump_command): Update.
10040         * remote.c (remote_download_command_source): Update.
10041         * python/python.c (gdbpy_eval_from_control_command)
10042         (python_command, python_interactive_command): Update.
10043         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10044         * guile/guile.c (guile_command)
10045         (gdbscm_eval_from_control_command, guile_command): Update.
10046         * compile/compile.c (compile_code_command)
10047         (compile_print_command, compile_to_object): Update.
10048         * cli/cli-script.h (struct command_lines_deleter): New.
10049         (counted_command_line): New typedef.
10050         (struct command_line): Add constructor, destructor.
10051         <body_list>: Remove.
10052         <body_list_0, body_list_1>: New members.
10053         (command_line_up): Remove typedef.
10054         (read_command_lines, read_command_lines_1, get_command_line):
10055         Update.
10056         (copy_command_lines): Don't declare.
10057         * cli/cli-script.c (build_command_line): Use "new".
10058         (get_command_line): Return counted_command_line.
10059         (print_command_lines, execute_user_command)
10060         (execute_control_command_1, while_command, if_command): Update.
10061         (realloc_body_list): Remove.
10062         (process_next_line, recurse_read_control_structure): Update.
10063         (read_command_lines, read_command_lines_1): Return counted_command_line.
10064         (free_command_lines): Use "delete".
10065         (copy_command_lines): Remove.
10066         (define_command, document_command, show_user_1): Update.
10067         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10068         a counted_command_line.
10069         * breakpoint.h (counted_command_line): Remove typedef.
10070         (breakpoint_set_commands): Update.
10071         * breakpoint.c (check_no_tracepoint_commands)
10072         (validate_commands_for_breakpoint): Update.
10073         (breakpoint_set_commands): Change commands to be a
10074         counted_command_line.
10075         (commands_command_1, update_dprintf_command_list)
10076         (create_tracepoint_from_upload): Update.
10077
10078 2018-05-04  Tom Tromey  <tom@tromey.com>
10079
10080         * cli/cli-decode.h (cmd_list_element): New constructor.
10081         (~cmd_list_element): New destructor.
10082         (struct cmd_list_element): Add initializers.
10083         * cli/cli-decode.c (do_add_cmd): Use "new".
10084         (delete_cmd): Use "delete".
10085
10086 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10087             Pedro Alves <palves@redhat.com>
10088
10089         PR breakpoints/19806 and support for PR external/20207.
10090         * NEWS: Mention Aarch64 watchpoint improvements.
10091         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10092         watchpoints and PR external/20207 watchpoints.
10093         * nat/aarch64-linux-hw-point.c
10094         (kernel_supports_any_contiguous_range): New.
10095         (aarch64_watchpoint_offset): New.
10096         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10097         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10098         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10099         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10100         next_addr_orig_p.  Support PR external/20207 watchpoints.
10101         (aarch64_downgrade_regs): New.
10102         (aarch64_dr_state_insert_one_point): New parameters offset and
10103         addr_orig.
10104         (aarch64_dr_state_remove_one_point): Likewise.
10105         (aarch64_handle_breakpoint): Update caller.
10106         (aarch64_handle_aligned_watchpoint): Likewise.
10107         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10108         aligned_offset.
10109         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10110         aarch64_downgrade_regs.
10111         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10112         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10113         (DR_CONTROL_MASK): ... this.
10114         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10115         (unsigned int aarch64_watchpoint_offset): New prototype.
10116         (aarch64_linux_set_debug_regs): Remove const from state.
10117         * utils.c (align_up, align_down): Move to ...
10118         * common/common-utils.c (align_up, align_down): ... here.
10119         * utils.h (align_up, align_down): Move to ...
10120         * common/common-utils.h (align_up, align_down): ... here.
10121
10122 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10123
10124         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10125         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10126         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10127         Re-implement to match the ABI as summarized in GCC's
10128         gcc/config/sparc/sparc.c.  All callers updated.
10129         (sparc32_store_arguments): Remove assertion.
10130
10131 2018-05-04  Tom Tromey  <tom@tromey.com>
10132
10133         * printcmd.c: Don't include tui.h.
10134         (decode_format): Use skip_spaces.
10135
10136 2018-05-04  Tom Tromey  <tom@tromey.com>
10137
10138         PR gdb/22619:
10139         * printcmd.c (last_count): New global.
10140         (x_command): Use saved count when repeating.
10141
10142 2018-05-04  Tom Tromey  <tom@tromey.com>
10143
10144         * nto-procfs.c (do_closedir_cleanup): Remove.
10145         (procfs_pidlist): Use gdb_dir_up.
10146         * procfs.c (do_closedir_cleanup): Remove.
10147         (proc_update_threads): Use gdb_dir_up.
10148         * common/filestuff.h (struct gdb_dir_deleter): New.
10149         (gdb_dir_up): New typedef.
10150
10151 2018-05-04  Tom Tromey  <tom@tromey.com>
10152
10153         * ada-lang.c (print_mention_exception): Use std::string.
10154
10155 2018-05-04  Tom Tromey  <tom@tromey.com>
10156
10157         * ada-lang.c (create_excep_cond_exprs): Update.
10158         (ada_exception_catchpoint_cond_string): Use std::string.
10159
10160 2018-05-04  Tom Tromey  <tom@tromey.com>
10161
10162         * ada-lang.c (xget_renaming_scope): Return std::string.
10163         (old_renaming_is_invisible): Update.
10164
10165 2018-05-04  Tom Tromey  <tom@tromey.com>
10166
10167         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10168         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10169
10170 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10171
10172         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10173
10174 2018-05-04  Tom Tromey  <tom@tromey.com>
10175
10176         * remote.c (remote_query_supported_append): Change type.
10177         (remote_check_symbols): Update.
10178
10179 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10180
10181         PR gdb/11420
10182         * configure.ac: Prepend libpython.
10183         * python/python-config.py: Likewise.
10184         * configure: Regenerate.
10185
10186 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10187
10188         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10189
10190 2018-05-03  Pedro Alves  <palves@redhat.com>
10191
10192         * s390-linux-nat.c
10193         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10194         override.  Write 'true' instead of '1'.
10195         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10196         declaration.
10197
10198 2018-05-02  Pedro Alves  <palves@redhat.com>
10199
10200         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10201         add_inf_child_target.
10202         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10203         add_inf_child_target.
10204         * aix-thread.c (aix_thread_target_info): New.
10205         (aix_thread_target) <shortname, longname, doc>: Delete.
10206         <info>: New.
10207         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10208         add_inf_child_target.
10209         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10210         add_inf_child_target.
10211         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10212         add_inf_child_target.
10213         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10214         add_inf_child_target.
10215         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10216         add_inf_child_target.
10217         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10218         add_inf_child_target.
10219         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10220         add_inf_child_target.
10221         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10222         add_inf_child_target.
10223         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10224         add_inf_child_target.
10225         * bfd-target.c (target_bfd_target_info): New.
10226         (target_bfd) <shortname, longname, doc>: Delete.
10227         <info>: New.
10228         * bsd-kvm.c (bsd_kvm_target_info): New.
10229         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10230         <info>: New.
10231         (bsd_kvm_target::open): Rename to ...
10232         (bsd_kvm_target_open): ... this.  Adjust.
10233         * bsd-uthread.c (bsd_uthread_target_info): New.
10234         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10235         <info>: New.
10236         * corefile.c (core_file_command): Adjust.
10237         * corelow.c (core_target_info): New.
10238         (core_target) <shortname, longname, doc>: Delete.
10239         <info>: New.
10240         (core_target::open): Rename to ...
10241         (core_target_open): ... this.  Adjust.
10242         * ctf.c (ctf_target_info): New.
10243         (ctf_target) <shortname, longname, doc>: Delete.
10244         <info>: New.
10245         (ctf_target::open): Rename to ...
10246         (ctf_target_open): ... this.
10247         (_initialize_ctf): Adjust.
10248         * exec.c (exec_target_info): New.
10249         (exec_target) <shortname, longname, doc>: Delete.
10250         <info>: New.
10251         (exec_target::open): Rename to ...
10252         (exec_target_open): ... this.
10253         * gdbcore.h (core_target_open): Declare.
10254         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10255         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10256         add_inf_child_target.
10257         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10258         add_inf_child_target.
10259         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10260         add_inf_child_target.
10261         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10262         add_inf_child_target.
10263         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10264         add_inf_child_target.
10265         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10266         add_inf_child_target.
10267         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10268         add_inf_child_target.
10269         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10270         add_inf_child_target.
10271         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10272         add_inf_child_target.
10273         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10274         add_inf_child_target.
10275         * inf-child.c (inf_child_target_info): New.
10276         (inf_child_target::info): New.
10277         (inf_child_open_target): Remove 'target' parameter.  Use
10278         get_native_target instead.
10279         (inf_child_target::open): Delete.
10280         (add_inf_child_target): New.
10281         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10282         Delete.
10283         <info>: New.
10284         (add_inf_child_target): Declare.
10285         (inf_child_open_target): Declare.
10286         * linux-thread-db.c (thread_db_target_info): New.
10287         (thread_db_target) <shortname, longname, doc>: Delete.
10288         <info>: New.
10289         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10290         add_inf_child_target.
10291         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10292         add_inf_child_target.
10293         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10294         add_inf_child_target.
10295         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10296         add_inf_child_target.
10297         * make-target-delegates (print_class): Adjust.
10298         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10299         add_inf_child_target.
10300         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10301         add_inf_child_target.
10302         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10303         add_inf_child_target.
10304         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10305         add_inf_child_target.
10306         * nto-procfs.c (nto_native_target_info): New.
10307         (nto_procfs_target_native) <shortname, longname, doc>:
10308         Delete.
10309         <info>: New.
10310         (nto_procfs_target_info): New.
10311         (nto_procfs_target_procfs) <shortname, longname, doc>:
10312         Delete.
10313         <info>: New.
10314         (init_procfs_targets): Adjust.
10315         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10316         add_inf_child_target.
10317         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10318         add_inf_child_target.
10319         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10320         add_inf_child_target.
10321         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10322         add_inf_child_target.
10323         * ravenscar-thread.c (ravenscar_target_info): New.
10324         (ravenscar_thread_target) <shortname, longname, doc>:
10325         Delete.
10326         <info>: New.
10327         * record-btrace.c (record_btrace_target_info):
10328         (record_btrace_target) <shortname, longname, doc>: Delete.
10329         <info>: New.
10330         (record_btrace_target::open): Rename to ...
10331         (record_btrace_target_open): ... this.  Adjust.
10332         * record-full.c (record_longname, record_doc): New.
10333         (record_full_base_target) <shortname, longname, doc>: Delete.
10334         <info>: New.
10335         (record_full_target_info): New.
10336         (record_full_target): <shortname>: Delete.
10337         <info>: New.
10338         (record_full_core_open_1, record_full_open_1): Update comments.
10339         (record_full_base_target::open): Rename to ...
10340         (record_full_open): ... this.
10341         (cmd_record_full_restore): Update.
10342         (_initialize_record_full): Update.
10343         * remote-sim.c (remote_sim_target_info): New.
10344         (gdbsim_target) <shortname, longname, doc>: Delete.
10345         <info>: New.
10346         (gdbsim_target::open): Rename to ...
10347         (gdbsim_target_open): ... this.
10348         (_initialize_remote_sim): Adjust.
10349         * remote.c (remote_doc): New.
10350         (remote_target_info): New.
10351         (remote_target) <shortname, longname, doc>: Delete.
10352         <info>: New.
10353         (extended_remote_target_info): New.
10354         (extended_remote_target) <shortname, longname, doc>: Delete.
10355         <info>: New.
10356         (remote_target::open_1): Make static.  Adjust.
10357         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10358         * s390-linux-nat.c (_initialize_s390_nat): Use
10359         add_inf_child_target.
10360         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10361         add_inf_child_target.
10362         * sol-thread.c (thread_db_target_info): New.
10363         (sol_thread_target) <shortname, longname, doc>: Delete.
10364         <info>: New.
10365         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10366         add_inf_child_target.
10367         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10368         add_inf_child_target.
10369         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10370         add_inf_child_target.
10371         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10372         add_inf_child_target.
10373         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10374         add_inf_child_target.
10375         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10376         add_inf_child_target.
10377         * spu-linux-nat.c (_initialize_spu_nat): Use
10378         add_inf_child_target.
10379         * spu-multiarch.c (spu_multiarch_target_info): New.
10380         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10381         <info>: New.
10382         * target-delegates.c: Regenerate.
10383         * target.c: Include <unordered_map>.
10384         (target_ops_p): Delete.
10385         (DEF_VEC_P(target_ops_p)): Delete.
10386         (target_factories): New.
10387         (test_target_info): New.
10388         (test_target_ops::info): New.
10389         (open_target): Adjust to use target_factories.
10390         (add_target_with_completer): Rename to ...
10391         (add_target): ... this.  Change prototype.  Register target_info
10392         and open callback in target_factories.  Register target_info in
10393         command context instead of target_ops.
10394         (add_target): Delete old implementation.
10395         (add_deprecated_target_alias): Change prototype.  Adjust.
10396         (the_native_target): New.
10397         (set_native_target, get_native_target): New.
10398         (find_default_run_target): Use the_native_target.
10399         (find_attach_target, find_run_target): Simplify.
10400         (target_ops::open): Delete.
10401         (dummy_target_info): New.
10402         (dummy_target::shortname, dummy_target::longname)
10403         (dummy_target::doc): Delete.
10404         (dummy_target::info): New.
10405         (debug_target::shortname, debug_target::longname)
10406         (debug_target::doc): Delete.
10407         (debug_target::info): New.
10408         * target.h (struct target_info): New.
10409         (target_ops::~target_ops): Add comment.
10410         (target_ops::info): New.
10411         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10412         longer virtual.  Implement in terms of target_info.
10413         (set_native_target, get_native_target): Declare.
10414         (target_open_ftype): New.
10415         (add_target, add_target_with_completer)
10416         (add_deprecated_target_alias): Change prototype.
10417         (test_target) <shortname, longname, doc>: Delete.
10418         <info>: New.
10419         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10420         add_inf_child_target.
10421         * tracefile-tfile.c (tfile_target_info): New.
10422         (tfile_target) <shortname, longname, doc>: Delete.
10423         <info>: New.
10424         (tfile_target::open): Rename to ...
10425         (tfile_target_open): ... this.
10426         (_initialize_tracefile_tfile): Adjust.
10427         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10428         add_inf_child_target.
10429         * windows-nat.c (_initialize_windows_nat): Use
10430         add_inf_child_target.
10431         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10432         add_inf_child_target.
10433
10434 2018-05-02  Pedro Alves  <palves@redhat.com>
10435
10436         * linux-nat.h (linux_nat_target) <low_new_thread,
10437         low_delete_thread, low_new_fork, low_forget_process,
10438         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10439         New virtual methods.
10440         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10441         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10442         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10443         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10444         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10445         Delete.
10446         * linux-fork.c (delete_fork): Adjust to call low method.
10447         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10448         (linux_nat_new_fork, linux_nat_forget_process_hook)
10449         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10450         (linux_nat_status_is_event):
10451         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10452         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10453         to call low method.
10454         (sigtrap_is_event): Rename to ...
10455         (linux_nat_target::low_status_is_event): ... this.
10456         (linux_nat_set_status_is_event): Delete.
10457         (save_stop_reason, linux_nat_wait_1)
10458         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10459         low methods.
10460         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10461         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10462         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10463         (linux_nat_set_prepare_to_resume): Delete.
10464         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10465         low virtual methods.
10466         * amd64-linux-nat.c: Likewise.
10467         * arm-linux-nat.c: Likewise.
10468         * i386-linux-nat.c: Likewise.
10469         * ia64-linux-nat.c: Likewise.
10470         * mips-linux-nat.c: Likewise.
10471         * ppc-linux-nat.c: Likewise.
10472         * s390-linux-nat.c: Likewise.
10473         * sparc64-linux-nat.c: Likewise.
10474         * x86-linux-nat.c: Likewise.
10475         * x86-linux-nat.h: Include "nat/x86-linux.h".
10476         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10477         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10478         Override methods.
10479
10480 2018-05-02  Pedro Alves  <palves@redhat.com>
10481
10482         * target.h (target_ops)
10483         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10484         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10485         stopped_by_watchpoint, have_continuable_watchpoint,
10486         stopped_data_address, watchpoint_addr_within_range,
10487         can_accel_watchpoint_condition, can_run, thread_alive,
10488         has_all_memory, has_memory, has_stack, has_registers,
10489         has_execution, can_async_p, is_async_p, supports_non_stop,
10490         always_non_stop_p, can_execute_reverse, supports_multi_process,
10491         supports_enable_disable_tracepoint,
10492         supports_disable_randomization, supports_string_tracing,
10493         supports_evaluation_of_breakpoint_conditions,
10494         can_run_breakpoint_commands, filesystem_is_local,
10495         can_download_tracepoint, get_trace_state_variable_value,
10496         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10497         record_is_replaying, record_will_replay,
10498         augmented_libraries_svr4_read>: Adjust to return bool.
10499         * aarch64-linux-nat.c: All implementations adjusted.
10500         * aix-thread.c: All implementations adjusted.
10501         * arm-linux-nat.c: All implementations adjusted.
10502         * breakpoint.c: All implementations adjusted.
10503         * bsd-kvm.c: All implementations adjusted.
10504         * bsd-uthread.c: All implementations adjusted.
10505         * corelow.c: All implementations adjusted.
10506         * ctf.c: All implementations adjusted.
10507         * darwin-nat.c: All implementations adjusted.
10508         * darwin-nat.h: All implementations adjusted.
10509         * exec.c: All implementations adjusted.
10510         * fbsd-nat.c: All implementations adjusted.
10511         * fbsd-nat.h: All implementations adjusted.
10512         * gnu-nat.c: All implementations adjusted.
10513         * gnu-nat.h: All implementations adjusted.
10514         * go32-nat.c: All implementations adjusted.
10515         * ia64-linux-nat.c: All implementations adjusted.
10516         * inf-child.c: All implementations adjusted.
10517         * inf-child.h: All implementations adjusted.
10518         * inf-ptrace.c: All implementations adjusted.
10519         * inf-ptrace.h: All implementations adjusted.
10520         * linux-nat.c: All implementations adjusted.
10521         * linux-nat.h: All implementations adjusted.
10522         * mips-linux-nat.c: All implementations adjusted.
10523         * nto-procfs.c: All implementations adjusted.
10524         * ppc-linux-nat.c: All implementations adjusted.
10525         * procfs.c: All implementations adjusted.
10526         * ravenscar-thread.c: All implementations adjusted.
10527         * record-btrace.c: All implementations adjusted.
10528         * record-full.c: All implementations adjusted.
10529         * remote-sim.c: All implementations adjusted.
10530         * remote.c: All implementations adjusted.
10531         * s390-linux-nat.c: All implementations adjusted.
10532         * sol-thread.c: All implementations adjusted.
10533         * spu-multiarch.c: All implementations adjusted.
10534         * target-delegates.c: All implementations adjusted.
10535         * target.c: All implementations adjusted.
10536         * target.h: All implementations adjusted.
10537         * tracefile-tfile.c: All implementations adjusted.
10538         * tracefile.c: All implementations adjusted.
10539         * tracefile.h: All implementations adjusted.
10540         * windows-nat.c: All implementations adjusted.
10541         * x86-linux-nat.h: All implementations adjusted.
10542         * x86-nat.h: All implementations adjusted.
10543
10544 2018-05-02  Pedro Alves  <palves@redhat.com>
10545
10546         * make-target-delegates (scan_target_h): Don't trim lines here.
10547         Replace sequences of tabs and/or whitespace with a single
10548         whitespace.
10549         (top level, parsing methods): Trim each line before processing it
10550         here.
10551
10552 2018-05-02  Pedro Alves  <palves@redhat.com>
10553             John Baldwin  <jhb@freebsd.org>
10554
10555         * target.h (enum strata) <debug_stratum>: New.
10556         (struct target_ops) <all delegation methods>: Replace by C++
10557         virtual methods, and drop "to_" prefix.  All references updated
10558         throughout.
10559         <to_shortname, to_longname, to_doc, to_data,
10560         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10561         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10562         virtual methods.  All references updated throughout.
10563         <can_attach, supports_terminal_ours, can_create_inferior,
10564         get_thread_control_capabilities, attach_no_wait>: New
10565         virtual methods.
10566         <insert_breakpoint, remove_breakpoint>: Now
10567         TARGET_DEFAULT_NORETURN methods.
10568         <info_proc>: Now returns bool.
10569         <to_magic>: Delete.
10570         (OPS_MAGIC): Delete.
10571         (current_target): Delete.  All references replaced by references
10572         to ...
10573         (target_stack): ... this.  New.
10574         (target_shortname, target_longname): Adjust.
10575         (target_can_run): Now a function declaration.
10576         (default_child_has_all_memory, default_child_has_memory)
10577         (default_child_has_stack, default_child_has_registers)
10578         (default_child_has_execution): Remove target_ops parameter.
10579         (complete_target_initialization): Delete.
10580         (memory_breakpoint_target): New template class.
10581         (test_target_ops): Refactor as a C++ class with virtual methods.
10582         * make-target-delegates (NAME_PART): Tighten.
10583         (POINTER_PART, CP_SYMBOL): New.
10584         (SIMPLE_RETURN_PART): Reimplement.
10585         (VEC_RETURN_PART): Expect less.
10586         (RETURN_PART, VIRTUAL_PART): New.
10587         (METHOD): Adjust to C++ virtual methods.
10588         (scan_target_h): Remove reference to C99.
10589         (dname): Output "target_ops::" prefix.
10590         (write_function_header): Adjust to output a C++ class method.
10591         (write_declaration): New.
10592         (write_delegator): Adjust to output a C++ class method.
10593         (tdname): Output "dummy_target::" prefix.
10594         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10595         method.
10596         (tdefault_names, debug_names): Delete.
10597         (return_types, tdefaults, styles, argtypes_array): New.
10598         (top level): All methods are delegators.
10599         (print_class): New.
10600         (top level): Print dummy_target and debug_target classes.
10601         * target-delegates.c: Regenerate.
10602         * target-debug.h (target_debug_print_enum_info_proc_what)
10603         (target_debug_print_thread_control_capabilities)
10604         (target_debug_print_thread_info_p): New.
10605         * target.c (dummy_target): Delete.
10606         (the_dummy_target, the_debug_target): New.
10607         (target_stack): Now extern.
10608         (set_targetdebug): Push/unpush debug target.
10609         (default_child_has_all_memory, default_child_has_memory)
10610         (default_child_has_stack, default_child_has_registers)
10611         (default_child_has_execution): Remove target_ops parameter.
10612         (complete_target_initialization): Delete.
10613         (add_target_with_completer): No longer call
10614         complete_target_initialization.
10615         (target_supports_terminal_ours): Use regular delegation.
10616         (update_current_target): Delete.
10617         (push_target): No longer check magic number.  Don't call
10618         update_current_target.
10619         (unpush_target): Don't call update_current_target.
10620         (target_is_pushed): No longer check magic number.
10621         (target_require_runnable): Skip for all stratums over
10622         process_stratum.
10623         (target_ops::info_proc): New.
10624         (target_info_proc): Use find_target_at and
10625         find_default_run_target.
10626         (target_supports_disable_randomization): Use regular delegation.
10627         (target_get_osdata): Use find_target_at.
10628         (target_ops::open, target_ops::close, target_ops::can_attach)
10629         (target_ops::attach, target_ops::can_create_inferior)
10630         (target_ops::create_inferior, target_ops::can_run)
10631         (target_can_run): New.
10632         (default_fileio_target): Use regular delegation.
10633         (target_ops::fileio_open, target_ops::fileio_pwrite)
10634         (target_ops::fileio_pread, target_ops::fileio_fstat)
10635         (target_ops::fileio_close, target_ops::fileio_unlink)
10636         (target_ops::fileio_readlink): New.
10637         (target_fileio_open_1, target_fileio_unlink)
10638         (target_fileio_readlink): Always call the target method.  Handle
10639         FILEIO_ENOSYS.
10640         (return_zero, return_zero_has_execution): Delete.
10641         (init_dummy_target): Delete.
10642         (dummy_target::dummy_target, dummy_target::shortname)
10643         (dummy_target::longname, dummy_target::doc)
10644         (debug_target::debug_target, debug_target::shortname)
10645         (debug_target::longname, debug_target::doc): New.
10646         (target_supports_delete_record): Use regular delegation.
10647         (setup_target_debug): Delete.
10648         (maintenance_print_target_stack): Skip debug_stratum.
10649         (initialize_targets): Instantiate the_dummy_target and
10650         the_debug_target.
10651         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10652         use target_stack.
10653         (target_auxv_search, fprint_target_auxv): Adjust.
10654         (info_auxv_command): Adjust to use target_stack.
10655         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10656         * exceptions.c (print_flush): Handle a NULL target_stack.
10657         * regcache.c (target_ops_no_register): Refactor as class with
10658         virtual methods.
10659
10660         * exec.c (exec_target): New class.
10661         (exec_ops): Now an exec_target.
10662         (exec_open, exec_close_1, exec_get_section_table)
10663         (exec_xfer_partial, exec_files_info, exec_has_memory)
10664         (exec_make_note_section): Refactor as exec_target methods.
10665         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10666         Delete.
10667         (exec_target::find_memory_regions): New.
10668         (_initialize_exec): Don't call init_exec_ops.
10669         * gdbcore.h (exec_file_clear): Delete.
10670
10671         * corefile.c (core_target): Delete.
10672         (core_file_command): Adjust.
10673         * corelow.c (core_target): New class.
10674         (the_core_target): New.
10675         (core_close): Remove target_ops parameter.
10676         (core_close_cleanup): Adjust.
10677         (core_target::close): New.
10678         (core_open, core_detach, get_core_registers, core_files_info)
10679         (core_xfer_partial, core_thread_alive, core_read_description)
10680         (core_pid_to_str, core_thread_name, core_has_memory)
10681         (core_has_stack, core_has_registers, core_info_proc): Rework as
10682         core_target methods.
10683         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10684         (_initialize_corelow): Initialize the_core_target.
10685         * gdbcore.h (core_target): Delete.
10686         (the_core_target): New.
10687
10688         * ctf.c: (ctf_target): New class.
10689         (ctf_ops): Now a ctf_target.
10690         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10691         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10692         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10693         methods.
10694         (init_ctf_ops): Delete.
10695         (_initialize_ctf): Don't call it.
10696         * tracefile-tfile.c (tfile_target): New class.
10697         (tfile_ops): Now a tfile_target.
10698         (tfile_open, tfile_close, tfile_files_info)
10699         (tfile_get_tracepoint_status, tfile_trace_find)
10700         (tfile_fetch_registers, tfile_xfer_partial)
10701         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10702         Refactor as tfile_target methods.
10703         (tfile_xfer_partial_features): Remove target_ops parameter.
10704         (init_tfile_ops): Delete.
10705         (_initialize_tracefile_tfile): Don't call it.
10706         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10707         (tracefile_has_stack, tracefile_has_registers)
10708         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10709         tracefile_target methods.
10710         (init_tracefile_ops): Delete.
10711         (tracefile_target::tracefile_target): New.
10712         * tracefile.h: Include "target.h".
10713         (tracefile_target): New class.
10714         (init_tracefile_ops): Delete.
10715
10716         * spu-multiarch.c (spu_multiarch_target): New class.
10717         (spu_ops): Now a spu_multiarch_target.
10718         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10719         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10720         (spu_search_memory, spu_mourn_inferior): Refactor as
10721         spu_multiarch_target methods.
10722         (init_spu_ops): Delete.
10723         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10724         complete_target_initialization.
10725
10726         * ravenscar-thread.c (ravenscar_thread_target): New class.
10727         (ravenscar_ops): Now a ravenscar_thread_target.
10728         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10729         (ravenscar_thread_alive, ravenscar_pid_to_str)
10730         (ravenscar_fetch_registers, ravenscar_store_registers)
10731         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10732         (ravenscar_stopped_by_hw_breakpoint)
10733         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10734         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10735         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10736         methods.
10737         (init_ravenscar_thread_ops): Delete.
10738         (_initialize_ravenscar): Remove references to
10739         init_ravenscar_thread_ops and complete_target_initialization.
10740
10741         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10742         (bsd_uthread_target): New class.
10743         (bsd_uthread_ops): Now a bsd_uthread_target.
10744         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10745         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10746         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10747         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10748         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10749         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10750         (bsd_uthread_target): Delete function.
10751         (_initialize_bsd_uthread): Remove reference to
10752         complete_target_initialization.
10753
10754         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10755         (target_bfd): ... this new class.
10756         (target_bfd_xfer_partial, target_bfd_get_section_table)
10757         (target_bfd_close): Refactor as target_bfd methods.
10758         (target_bfd::~target_bfd): New.
10759         (target_bfd_reopen): Adjust.
10760         (target_bfd::close): New.
10761
10762         * record-btrace.c (record_btrace_target): New class.
10763         (record_btrace_ops): Now a record_btrace_target.
10764         (record_btrace_open, record_btrace_stop_recording)
10765         (record_btrace_disconnect, record_btrace_close)
10766         (record_btrace_async, record_btrace_info)
10767         (record_btrace_insn_history, record_btrace_insn_history_range)
10768         (record_btrace_insn_history_from, record_btrace_call_history)
10769         (record_btrace_call_history_range)
10770         (record_btrace_call_history_from, record_btrace_record_method)
10771         (record_btrace_is_replaying, record_btrace_will_replay)
10772         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10773         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10774         (record_btrace_store_registers, record_btrace_prepare_to_store)
10775         (record_btrace_to_get_unwinder)
10776         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10777         (record_btrace_commit_resume, record_btrace_wait)
10778         (record_btrace_stop, record_btrace_can_execute_reverse)
10779         (record_btrace_stopped_by_sw_breakpoint)
10780         (record_btrace_supports_stopped_by_sw_breakpoint)
10781         (record_btrace_stopped_by_hw_breakpoint)
10782         (record_btrace_supports_stopped_by_hw_breakpoint)
10783         (record_btrace_update_thread_list, record_btrace_thread_alive)
10784         (record_btrace_goto_begin, record_btrace_goto_end)
10785         (record_btrace_goto, record_btrace_stop_replaying_all)
10786         (record_btrace_execution_direction)
10787         (record_btrace_prepare_to_generate_core)
10788         (record_btrace_done_generating_core): Refactor as
10789         record_btrace_target methods.
10790         (init_record_btrace_ops): Delete.
10791         (_initialize_record_btrace): Remove reference to
10792         init_record_btrace_ops.
10793         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10794         the execution_direction global.
10795         (record_full_base_target, record_full_target)
10796         (record_full_core_target): New classes.
10797         (record_full_ops): Now a record_full_target.
10798         (record_full_core_ops): Now a record_full_core_target.
10799         (record_full_target::detach, record_full_target::disconnect)
10800         (record_full_core_target::disconnect)
10801         (record_full_target::mourn_inferior, record_full_target::kill):
10802         New.
10803         (record_full_open, record_full_close, record_full_async): Refactor
10804         as methods of the record_full_base_target class.
10805         (record_full_resume, record_full_commit_resume): Refactor
10806         as methods of the record_full_target class.
10807         (record_full_wait, record_full_stopped_by_watchpoint)
10808         (record_full_stopped_data_address)
10809         (record_full_stopped_by_sw_breakpoint)
10810         (record_full_supports_stopped_by_sw_breakpoint)
10811         (record_full_stopped_by_hw_breakpoint)
10812         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10813         methods of the record_full_base_target class.
10814         (record_full_store_registers, record_full_xfer_partial)
10815         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10816         Refactor as methods of the record_full_target class.
10817         (record_full_can_execute_reverse, record_full_get_bookmark)
10818         (record_full_goto_bookmark, record_full_execution_direction)
10819         (record_full_record_method, record_full_info, record_full_delete)
10820         (record_full_is_replaying, record_full_will_replay)
10821         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10822         (record_full_stop_replaying): Refactor as methods of the
10823         record_full_base_target class.
10824         (record_full_core_resume, record_full_core_kill)
10825         (record_full_core_fetch_registers)
10826         (record_full_core_prepare_to_store)
10827         (record_full_core_store_registers, record_full_core_xfer_partial)
10828         (record_full_core_insert_breakpoint)
10829         (record_full_core_remove_breakpoint)
10830         (record_full_core_has_execution): Refactor
10831         as methods of the record_full_core_target class.
10832         (record_full_base_target::supports_delete_record): New.
10833         (init_record_full_ops): Delete.
10834         (init_record_full_core_ops): Delete.
10835         (record_full_save): Refactor as method of the
10836         record_full_base_target class.
10837         (_initialize_record_full): Remove references to
10838         init_record_full_ops and init_record_full_core_ops.
10839
10840         * remote.c (remote_target, extended_remote_target): New classes.
10841         (remote_ops): Now a remote_target.
10842         (extended_remote_ops): Now an extended_remote_target.
10843         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10844         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10845         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10846         (remote_pass_signals, remote_set_syscall_catchpoint)
10847         (remote_program_signals, )
10848         (remote_thread_always_alive): Remove target_ops parameter.
10849         (remote_thread_alive, remote_thread_name)
10850         (remote_update_thread_list, remote_threads_extra_info)
10851         (remote_static_tracepoint_marker_at)
10852         (remote_static_tracepoint_markers_by_strid)
10853         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10854         (remote_open): Refactor as methods of remote_target.
10855         (extended_remote_open, extended_remote_detach)
10856         (extended_remote_attach, extended_remote_post_attach):
10857         (extended_remote_supports_disable_randomization)
10858         (extended_remote_create_inferior): : Refactor as method of
10859         extended_remote_target.
10860         (remote_set_permissions, remote_open_1, remote_detach)
10861         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10862         (remote_resume, remote_commit_resume, remote_stop)
10863         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10864         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10865         (remote_prepare_to_store, remote_store_registers)
10866         (remote_flash_erase, remote_flash_done, remote_files_info)
10867         (remote_kill, remote_mourn, remote_insert_breakpoint)
10868         (remote_remove_breakpoint, remote_insert_watchpoint)
10869         (remote_watchpoint_addr_within_range)
10870         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10871         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10872         (remote_supports_stopped_by_sw_breakpoint)
10873         (remote_stopped_by_hw_breakpoint)
10874         (remote_supports_stopped_by_hw_breakpoint)
10875         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10876         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10877         (remote_verify_memory): Refactor as methods of remote_target.
10878         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10879         parameter.
10880         (remote_xfer_partial, remote_get_memory_xfer_limit)
10881         (remote_search_memory, remote_rcmd, remote_memory_map)
10882         (remote_pid_to_str, remote_get_thread_local_address)
10883         (remote_get_tib_address, remote_read_description): Refactor as
10884         methods of remote_target.
10885         (remote_target::fileio_open, remote_target::fileio_pwrite)
10886         (remote_target::fileio_pread, remote_target::fileio_close): New.
10887         (remote_hostio_readlink, remote_hostio_fstat)
10888         (remote_filesystem_is_local, remote_can_execute_reverse)
10889         (remote_supports_non_stop, remote_supports_disable_randomization)
10890         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10891         (remote_supports_enable_disable_tracepoint)
10892         (remote_supports_string_tracing)
10893         (remote_can_run_breakpoint_commands, remote_trace_init)
10894         (remote_download_tracepoint, remote_can_download_tracepoint)
10895         (remote_download_trace_state_variable, remote_enable_tracepoint)
10896         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10897         (remote_trace_start, remote_get_trace_status)
10898         (remote_get_tracepoint_status, remote_trace_stop)
10899         (remote_trace_find, remote_get_trace_state_variable_value)
10900         (remote_save_trace_data, remote_get_raw_trace_data)
10901         (remote_set_disconnected_tracing, remote_core_of_thread)
10902         (remote_set_circular_trace_buffer, remote_traceframe_info)
10903         (remote_get_min_fast_tracepoint_insn_len)
10904         (remote_set_trace_buffer_size, remote_set_trace_notes)
10905         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10906         (remote_disable_btrace, remote_teardown_btrace)
10907         (remote_read_btrace, remote_btrace_conf)
10908         (remote_augmented_libraries_svr4_read, remote_load)
10909         (remote_pid_to_exec_file, remote_can_do_single_step)
10910         (remote_execution_direction, remote_thread_handle_to_thread_info):
10911         Refactor as methods of remote_target.
10912         (init_remote_ops, init_extended_remote_ops): Delete.
10913         (remote_can_async_p, remote_is_async_p, remote_async)
10914         (remote_thread_events, remote_upload_tracepoints)
10915         (remote_upload_trace_state_variables): Refactor as methods of
10916         remote_target.
10917         (_initialize_remote): Remove references to init_remote_ops and
10918         init_extended_remote_ops.
10919
10920         * remote-sim.c (gdbsim_target): New class.
10921         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10922         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10923         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10924         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10925         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10926         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10927         Refactor as methods of gdbsim_target.
10928         (gdbsim_ops): Now a gdbsim_target.
10929         (init_gdbsim_ops): Delete.
10930         (gdbsim_cntrl_c): Adjust.
10931         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10932
10933         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10934         (the_amd64_linux_nat_target): New.
10935         (amd64_linux_fetch_inferior_registers)
10936         (amd64_linux_store_inferior_registers): Refactor as methods of
10937         amd64_linux_nat_target.
10938         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10939         * i386-linux-nat.c: Don't include "linux-nat.h".
10940         (i386_linux_nat_target): New class.
10941         (the_i386_linux_nat_target): New.
10942         (i386_linux_fetch_inferior_registers)
10943         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10944         as methods of i386_linux_nat_target.
10945         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10946         * inf-child.c (inf_child_ops): Delete.
10947         (inf_child_fetch_inferior_registers)
10948         (inf_child_store_inferior_registers): Delete.
10949         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10950         methods of inf_child_target.
10951         (inf_child_target::supports_terminal_ours)
10952         (inf_child_target::terminal_init)
10953         (inf_child_target::terminal_inferior)
10954         (inf_child_target::terminal_ours_for_output)
10955         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10956         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10957         New.
10958         (inf_child_open, inf_child_disconnect, inf_child_close)
10959         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10960         (inf_child_post_startup_inferior, inf_child_can_run)
10961         (inf_child_pid_to_exec_file): Refactor as methods of
10962         inf_child_target.
10963         (inf_child_follow_fork): Delete.
10964         (inf_child_target::can_create_inferior)
10965         (inf_child_target::can_attach): New.
10966         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10967         (inf_child_target::has_stack, inf_child_target::has_registers)
10968         (inf_child_target::has_execution): New.
10969         (inf_child_fileio_open, inf_child_fileio_pwrite)
10970         (inf_child_fileio_pread, inf_child_fileio_fstat)
10971         (inf_child_fileio_close, inf_child_fileio_unlink)
10972         (inf_child_fileio_readlink, inf_child_use_agent)
10973         (inf_child_can_use_agent): Refactor as methods of
10974         inf_child_target.
10975         (return_zero, inf_child_target): Delete.
10976         (inf_child_target::inf_child_target): New.
10977         * inf-child.h: Include "target.h".
10978         (inf_child_target): Delete function prototype.
10979         (inf_child_target): New class.
10980         (inf_child_open_target, inf_child_mourn_inferior)
10981         (inf_child_maybe_unpush_target): Delete.
10982         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10983         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10984         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10985         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10986         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10987         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10988         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10989         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10990         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10991         methods of inf_ptrace_target.
10992         (inf_ptrace_target): Delete function.
10993         * inf-ptrace.h: Include "inf-child.h".
10994         (inf_ptrace_target): Delete function declaration.
10995         (inf_ptrace_target): New class.
10996         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10997         * linux-nat.c (linux_target): New.
10998         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10999         (linux_nat_target::~linux_nat_target): New.
11000         (linux_child_post_attach, linux_child_post_startup_inferior)
11001         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11002         (linux_child_remove_fork_catchpoint)
11003         (linux_child_insert_vfork_catchpoint)
11004         (linux_child_remove_vfork_catchpoint)
11005         (linux_child_insert_exec_catchpoint)
11006         (linux_child_remove_exec_catchpoint)
11007         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11008         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11009         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11010         (linux_nat_stopped_data_address)
11011         (linux_nat_stopped_by_sw_breakpoint)
11012         (linux_nat_supports_stopped_by_sw_breakpoint)
11013         (linux_nat_stopped_by_hw_breakpoint)
11014         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11015         (linux_nat_kill, linux_nat_mourn_inferior)
11016         (linux_nat_xfer_partial, linux_nat_thread_alive)
11017         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11018         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11019         (linux_child_static_tracepoint_markers_by_strid)
11020         (linux_nat_is_async_p, linux_nat_can_async_p)
11021         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11022         (linux_nat_supports_multi_process)
11023         (linux_nat_supports_disable_randomization, linux_nat_async)
11024         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11025         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11026         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11027         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11028         methods of linux_nat_target.
11029         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11030         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11031         parameter.
11032         (check_stopped_by_watchpoint): Adjust.
11033         (linux_xfer_partial): Delete.
11034         (linux_target_install_ops, linux_target, linux_nat_add_target):
11035         Delete.
11036         (linux_nat_target::linux_nat_target): New.
11037         * linux-nat.h: Include "inf-ptrace.h".
11038         (linux_nat_target): New.
11039         (linux_target, linux_target_install_ops, linux_nat_add_target):
11040         Delete function declarations.
11041         (linux_target): Declare global.
11042         * linux-thread-db.c (thread_db_target): New.
11043         (thread_db_target::thread_db_target): New.
11044         (thread_db_ops): Delete.
11045         (the_thread_db_target): New.
11046         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11047         (thread_db_update_thread_list, thread_db_pid_to_str)
11048         (thread_db_extra_thread_info)
11049         (thread_db_thread_handle_to_thread_info)
11050         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11051         (thread_db_resume): Refactor as methods of thread_db_target.
11052         (init_thread_db_ops): Delete.
11053         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11054         * x86-linux-nat.c: Don't include "linux-nat.h".
11055         (super_post_startup_inferior): Delete.
11056         (x86_linux_nat_target::~x86_linux_nat_target): New.
11057         (x86_linux_child_post_startup_inferior)
11058         (x86_linux_read_description, x86_linux_enable_btrace)
11059         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11060         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11061         methods of x86_linux_nat_target.
11062         (x86_linux_create_target): Delete.  Bits folded ...
11063         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11064         pointer.
11065         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11066         (x86_linux_nat_target): New class.
11067         (x86_linux_create_target): Delete.
11068         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11069         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11070         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11071         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11072         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11073         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11074         make extern.
11075         (x86_use_watchpoints): Delete.
11076         * x86-nat.h: Include "breakpoint.h" and "target.h".
11077         (x86_use_watchpoints): Delete.
11078         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11079         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11080         (x86_insert_watchpoint, x86_remove_watchpoint)
11081         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11082         (x86_stopped_by_hw_breakpoint): New declarations.
11083         (x86_nat_target): New template class.
11084
11085         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11086         (the_ppc_linux_nat_target): New.
11087         (ppc_linux_fetch_inferior_registers)
11088         (ppc_linux_can_use_hw_breakpoint)
11089         (ppc_linux_region_ok_for_hw_watchpoint)
11090         (ppc_linux_ranged_break_num_registers)
11091         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11092         (ppc_linux_insert_mask_watchpoint)
11093         (ppc_linux_remove_mask_watchpoint)
11094         (ppc_linux_can_accel_watchpoint_condition)
11095         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11096         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11097         (ppc_linux_watchpoint_addr_within_range)
11098         (ppc_linux_masked_watch_num_registers)
11099         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11100         (ppc_linux_read_description): Refactor as methods of
11101         ppc_linux_nat_target.
11102         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11103
11104         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11105         (procfs_target): New class.
11106         (the_procfs_target): New.
11107         (procfs_target): Delete function.
11108         (procfs_auxv_parse, procfs_attach, procfs_detach)
11109         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11110         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11111         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11112         (procfs_create_inferior, procfs_update_thread_list)
11113         (procfs_thread_alive, procfs_pid_to_str)
11114         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11115         (procfs_stopped_data_address, procfs_insert_watchpoint)
11116         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11117         (proc_find_memory_regions, procfs_info_proc)
11118         (procfs_make_note_section): Refactor as methods of procfs_target.
11119         (_initialize_procfs): Adjust.
11120         * sol-thread.c (sol_thread_target): New class.
11121         (sol_thread_ops): Now a sol_thread_target.
11122         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11123         (sol_thread_fetch_registers, sol_thread_store_registers)
11124         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11125         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11126         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11127         (init_sol_thread_ops): Delete.
11128         (_initialize_sol_thread): Adjust.  Remove references to
11129         init_sol_thread_ops and complete_target_initialization.
11130
11131         * windows-nat.c (windows_nat_target): New class.
11132         (windows_fetch_inferior_registers)
11133         (windows_store_inferior_registers, windows_resume, windows_wait)
11134         (windows_attach, windows_detach, windows_pid_to_exec_file)
11135         (windows_files_info, windows_create_inferior)
11136         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11137         (windows_close, windows_pid_to_str, windows_xfer_partial)
11138         (windows_get_tib_address, windows_get_ada_task_ptid)
11139         (windows_thread_name, windows_thread_alive): Refactor as
11140         windows_nat_target methods.
11141         (do_initial_windows_stuff): Adjust.
11142         (windows_target): Delete function.
11143         (_initialize_windows_nat): Adjust.
11144
11145         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11146         (darwin_mourn_inferior, darwin_kill_inferior)
11147         (darwin_create_inferior, darwin_attach, darwin_detach)
11148         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11149         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11150         (darwin_supports_multi_process): Refactor as darwin_nat_target
11151         methods.
11152         (darwin_resume_to, darwin_files_info): Delete.
11153         (_initialize_darwin_inferior): Rename to ...
11154         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11155         * darwin-nat.h: Include "inf-child.h".
11156         (darwin_nat_target): New class.
11157         (darwin_complete_target): Delete.
11158         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11159         (darwin_target): New.
11160         (i386_darwin_fetch_inferior_registers)
11161         (i386_darwin_store_inferior_registers): Refactor as methods of
11162         darwin_nat_target.
11163         (darwin_complete_target): Delete, with ...
11164         (_initialize_i386_darwin_nat): ... bits factored out here.
11165
11166         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11167         (the_alpha_linux_nat_target): New.
11168         (alpha_linux_register_u_offset): Refactor as
11169         alpha_linux_nat_target method.
11170         (_initialize_alpha_linux_nat): Adjust.
11171         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11172         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11173         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11174         methods of linux_nat_trad_target.
11175         (linux_trad_target): Delete.
11176         * linux-nat-trad.h (linux_trad_target): Delete function.
11177         (linux_nat_trad_target): New class.
11178         * mips-linux-nat.c (mips_linux_nat_target): New class.
11179         (super_fetch_registers, super_store_registers, super_close):
11180         Delete.
11181         (the_mips_linux_nat_target): New.
11182         (mips64_linux_regsets_fetch_registers)
11183         (mips64_linux_regsets_store_registers)
11184         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11185         (mips_linux_register_u_offset, mips_linux_read_description)
11186         (mips_linux_can_use_hw_breakpoint)
11187         (mips_linux_stopped_by_watchpoint)
11188         (mips_linux_stopped_data_address)
11189         (mips_linux_region_ok_for_hw_watchpoint)
11190         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11191         (mips_linux_close): Refactor as methods of mips_linux_nat.
11192         (_initialize_mips_linux_nat): Adjust to C++ification.
11193
11194         * aix-thread.c (aix_thread_target): New class.
11195         (aix_thread_ops): Now an aix_thread_target.
11196         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11197         (aix_thread_fetch_registers, aix_thread_store_registers)
11198         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11199         (aix_thread_thread_alive, aix_thread_pid_to_str)
11200         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11201         Refactor as methods of aix_thread_target.
11202         (init_aix_thread_ops): Delete.
11203         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11204         and complete_target_initialization.
11205         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11206         (rs6000_nat_target): New class.
11207         (the_rs6000_nat_target): New.
11208         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11209         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11210         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11211         (super_create_inferior): Delete.
11212         (_initialize_rs6000_nat): Adjust to C++ification.
11213
11214         * arm-linux-nat.c (arm_linux_nat_target): New class.
11215         (the_arm_linux_nat_target): New.
11216         (arm_linux_fetch_inferior_registers)
11217         (arm_linux_store_inferior_registers, arm_linux_read_description)
11218         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11219         (arm_linux_remove_hw_breakpoint)
11220         (arm_linux_region_ok_for_hw_watchpoint)
11221         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11222         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11223         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11224         arm_linux_nat_target.
11225         (_initialize_arm_linux_nat): Adjust to C++ification.
11226
11227         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11228         (the_aarch64_linux_nat_target): New.
11229         (aarch64_linux_fetch_inferior_registers)
11230         (aarch64_linux_store_inferior_registers)
11231         (aarch64_linux_child_post_startup_inferior)
11232         (aarch64_linux_read_description)
11233         (aarch64_linux_can_use_hw_breakpoint)
11234         (aarch64_linux_insert_hw_breakpoint)
11235         (aarch64_linux_remove_hw_breakpoint)
11236         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11237         (aarch64_linux_region_ok_for_hw_watchpoint)
11238         (aarch64_linux_stopped_data_address)
11239         (aarch64_linux_stopped_by_watchpoint)
11240         (aarch64_linux_watchpoint_addr_within_range)
11241         (aarch64_linux_can_do_single_step): Refactor as methods of
11242         aarch64_linux_nat_target.
11243         (super_post_startup_inferior): Delete.
11244         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11245
11246         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11247         (the_hppa_linux_nat_target): New.
11248         (hppa_linux_fetch_inferior_registers)
11249         (hppa_linux_store_inferior_registers): Refactor as methods of
11250         hppa_linux_nat_target.
11251         (_initialize_hppa_linux_nat): Adjust to C++ification.
11252
11253         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11254         (the_ia64_linux_nat_target): New.
11255         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11256         (ia64_linux_stopped_data_address)
11257         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11258         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11259         ia64_linux_nat_target methods.
11260         (super_xfer_partial): Delete.
11261         (_initialize_ia64_linux_nat): Adjust to C++ification.
11262
11263         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11264         (the_m32r_linux_nat_target): New.
11265         (m32r_linux_fetch_inferior_registers)
11266         (m32r_linux_store_inferior_registers): Refactor as
11267         m32r_linux_nat_target methods.
11268         (_initialize_m32r_linux_nat): Adjust to C++ification.
11269
11270         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11271         (the_m68k_linux_nat_target): New.
11272         (m68k_linux_fetch_inferior_registers)
11273         (m68k_linux_store_inferior_registers): Refactor as
11274         m68k_linux_nat_target methods.
11275         (_initialize_m68k_linux_nat): Adjust to C++ification.
11276
11277         * s390-linux-nat.c (s390_linux_nat_target): New class.
11278         (the_s390_linux_nat_target): New.
11279         (s390_linux_fetch_inferior_registers)
11280         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11281         (s390_insert_watchpoint, s390_remove_watchpoint)
11282         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11283         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11284         (s390_auxv_parse, s390_read_description): Refactor as methods of
11285         s390_linux_nat_target.
11286         (_initialize_s390_nat): Adjust to C++ification.
11287
11288         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11289         (the_sparc_linux_nat_target): New.
11290         (_initialize_sparc_linux_nat): Adjust to C++ification.
11291         * sparc-nat.c (sparc_fetch_inferior_registers)
11292         (sparc_store_inferior_registers): Remove target_ops parameter.
11293         * sparc-nat.h (sparc_fetch_inferior_registers)
11294         (sparc_store_inferior_registers): Remove target_ops parameter.
11295         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11296         (the_sparc64_linux_nat_target): New.
11297         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11298
11299         * spu-linux-nat.c (spu_linux_nat_target): New class.
11300         (the_spu_linux_nat_target): New.
11301         (spu_child_post_startup_inferior, spu_child_post_attach)
11302         (spu_child_wait, spu_fetch_inferior_registers)
11303         (spu_store_inferior_registers, spu_xfer_partial)
11304         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11305         methods.
11306         (_initialize_spu_nat): Adjust to C++ification.
11307
11308         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11309         (the_tilegx_linux_nat_target): New.
11310         (fetch_inferior_registers, store_inferior_registers):
11311         Refactor as methods.
11312         (_initialize_tile_linux_nat): Adjust to C++ification.
11313
11314         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11315         (the_xtensa_linux_nat_target): New.
11316         (xtensa_linux_fetch_inferior_registers)
11317         (xtensa_linux_store_inferior_registers): Refactor as
11318         xtensa_linux_nat_target methods.
11319         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11320
11321         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11322         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11323         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11324         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11325         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11326         (fbsd_stopped_by_sw_breakpoint)
11327         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11328         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11329         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11330         (fbsd_post_startup_inferior, fbsd_post_attach)
11331         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11332         (fbsd_set_syscall_catchpoint)
11333         (super_xfer_partial, super_resume, super_wait)
11334         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11335         (fbsd_handle_debug_trap): Remove target_ops parameter.
11336         (fbsd_nat_add_target): Delete.
11337         * fbsd-nat.h: Include "inf-ptrace.h".
11338         (fbsd_nat_add_target): Delete.
11339         (USE_SIGTRAP_SIGINFO): Define.
11340         (fbsd_nat_target): New class.
11341
11342         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11343         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11344         (amd64bsd_target): Delete.
11345         * amd64-bsd-nat.h: New file.
11346         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11347         "x86-bsd-nat.h".
11348         (amd64_fbsd_nat_target): New class.
11349         (the_amd64_fbsd_nat_target): New.
11350         (amd64fbsd_read_description): Refactor as method of
11351         amd64_fbsd_nat_target.
11352         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11353         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11354         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11355         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11356         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11357         (i386bsd_target): Delete.
11358         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11359         (i386bsd_fetch_inferior_registers)
11360         (i386bsd_store_inferior_registers): Declare.
11361         (i386_bsd_nat_target): New class.
11362         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11363         (the_i386_fbsd_nat_target): New.
11364         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11365         i386_fbsd_nat_target methods.
11366         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11367         (_initialize_i386fbsd_nat): Adjust to C++ification.
11368         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11369         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11370         (_initialize_x86_bsd_nat): Adjust to C++ification.
11371         * x86-bsd-nat.h: Include "x86-nat.h".
11372         (x86bsd_target): Delete declaration.
11373         (x86bsd_nat_target): New class.
11374
11375         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11376         (the_aarch64_fbsd_nat_target): New.
11377         (aarch64_fbsd_fetch_inferior_registers)
11378         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11379         aarch64_fbsd_nat_target.
11380         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11381         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11382         (the_alpha_bsd_nat_target): New.
11383         (alphabsd_fetch_inferior_registers)
11384         (alphabsd_store_inferior_registers): Refactor as
11385         alpha_bsd_nat_target methods.
11386         (_initialize_alphabsd_nat): Refactor as methods of
11387         alpha_bsd_nat_target.
11388         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11389         (the_amd64_nbsd_nat_target): New.
11390         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11391         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11392         (the_amd64_obsd_nat_target): New.
11393         (_initialize_amd64obsd_nat): Adjust to C++ification.
11394         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11395         (the_arm_fbsd_nat_target): New.
11396         (arm_fbsd_fetch_inferior_registers)
11397         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11398         (_initialize_arm_fbsd_nat): Refactor as methods of
11399         arm_fbsd_nat_target.
11400         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11401         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11402         (the_arm_netbsd_nat_target): New.
11403         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11404         arm_netbsd_nat_target.
11405         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11406         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11407         (the_hppa_nbsd_nat_target): New.
11408         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11409         hppa_nbsd_nat_target methods.
11410         (_initialize_hppanbsd_nat): Adjust to C++ification.
11411         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11412         (the_hppa_obsd_nat_target): New.
11413         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11414         methods of hppa_obsd_nat_target.
11415         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11416         add_target.
11417         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11418         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11419         add_target.
11420         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11421         (_initialize_i386obsd_nat): Use add_target.
11422         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11423         (the_m68k_bsd_nat_target): New.
11424         (m68kbsd_fetch_inferior_registers)
11425         (m68kbsd_store_inferior_registers): Refactor as methods of
11426         m68k_bsd_nat_target.
11427         (_initialize_m68kbsd_nat): Adjust to C++ification.
11428         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11429         (the_mips_fbsd_nat_target): New.
11430         (mips_fbsd_fetch_inferior_registers)
11431         (mips_fbsd_store_inferior_registers): Refactor as methods of
11432         mips_fbsd_nat_target.
11433         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11434         add_target.
11435         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11436         (the_mips_nbsd_nat_target): New.
11437         (mipsnbsd_fetch_inferior_registers)
11438         (mipsnbsd_store_inferior_registers): Refactor as methods of
11439         mips_nbsd_nat_target.
11440         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11441         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11442         (the_mips64_obsd_nat_target): New.
11443         (mips64obsd_fetch_inferior_registers)
11444         (mips64obsd_store_inferior_registers): Refactor as methods of
11445         mips64_obsd_nat_target.
11446         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11447         add_target.
11448         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11449         nbsd_nat_target.
11450         * nbsd-nat.h: Include "inf-ptrace.h".
11451         (nbsd_nat_target): New class.
11452         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11453         (obsd_wait): Refactor as methods of obsd_nat_target.
11454         (obsd_add_target): Delete.
11455         * obsd-nat.h: Include "inf-ptrace.h".
11456         (obsd_nat_target): New class.
11457         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11458         (the_ppc_fbsd_nat_target): New.
11459         (ppcfbsd_fetch_inferior_registers)
11460         (ppcfbsd_store_inferior_registers): Refactor as methods of
11461         ppc_fbsd_nat_target.
11462         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11463         add_target.
11464         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11465         (the_ppc_nbsd_nat_target): New.
11466         (ppcnbsd_fetch_inferior_registers)
11467         (ppcnbsd_store_inferior_registers): Refactor as methods of
11468         ppc_nbsd_nat_target.
11469         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11470         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11471         (the_ppc_obsd_nat_target): New.
11472         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11473         methods of ppc_obsd_nat_target.
11474         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11475         add_target.
11476         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11477         (the_sh_nbsd_nat_target): New.
11478         (shnbsd_fetch_inferior_registers)
11479         (shnbsd_store_inferior_registers): Refactor as methods of
11480         sh_nbsd_nat_target.
11481         (_initialize_shnbsd_nat): Adjust to C++ification.
11482         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11483         (inf_ptrace_xfer_partial): Delete.
11484         (sparc_xfer_partial, sparc_target): Delete.
11485         * sparc-nat.h (sparc_fetch_inferior_registers)
11486         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11487         (sparc_target): Delete function declaration.
11488         (sparc_target): New template class.
11489         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11490         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11491         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11492         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11493         add_target.
11494         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11495         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11496         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11497         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11498         add_target.
11499         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11500         (the_vax_bsd_nat_target): New.
11501         (vaxbsd_fetch_inferior_registers)
11502         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11503         methods.
11504         (_initialize_vaxbsd_nat): Adjust to C++ification.
11505
11506         * bsd-kvm.c (bsd_kvm_target): New class.
11507         (bsd_kvm_ops): Now a bsd_kvm_target.
11508         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11509         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11510         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11511         bsd_kvm_target.
11512         (bsd_kvm_return_one): Delete.
11513         (bsd_kvm_add_target): Adjust to C++ification.
11514
11515         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11516         (nto_procfs_target_procfs): New classes.
11517         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11518         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11519         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11520         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11521         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11522         (procfs_remove_hw_breakpoint, procfs_resume)
11523         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11524         (procfs_kill_inferior, procfs_store_registers)
11525         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11526         as methods of nto_procfs_target.
11527         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11528         (nto_native_ops): Delete.
11529         (procfs_open, procfs_native_open): Delete.
11530         (nto_native_ops): Now an nto_procfs_target_native.
11531         (init_procfs_targets): Adjust to C++ification.
11532         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11533         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11534         Refactor as methods of nto_procfs_target.
11535
11536         * go32-nat.c (go32_nat_target): New class.
11537         (the_go32_nat_target): New.
11538         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11539         (go32_store_registers, go32_xfer_partial, go32_files_info)
11540         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11541         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11542         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11543         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11544         (go32_target): Delete.
11545         (_initialize_go32_nat): Adjust to C++ification.
11546
11547         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11548         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11549         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11550         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11551         gnu_nat_target.
11552         (gnu_target): Delete.
11553         * gnu-nat.h (gnu_target): Delete.
11554         (gnu_nat_target): New class.
11555         * i386-gnu-nat.c (gnu_base_target): New.
11556         (i386_gnu_nat_target): New class.
11557         (the_i386_gnu_nat_target): New.
11558         (_initialize_i386gnu_nat): Adjust to C++ification.
11559
11560 2018-05-02  Pedro Alves  <palves@redhat.com>
11561
11562         * bfd-target.c (target_bfd_xclose): Rename to ...
11563         (target_bfd_close): ... this.
11564         (target_bfd_reopen): Adjust.
11565         * target.c (target_close): Remove references to to_xclose.
11566         * target.h (target_ops::to_xclose): Delete.
11567         (target_ops::to_close): Update comments.
11568
11569 2018-05-02  Pedro Alves  <palves@redhat.com>
11570
11571         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11572         "linux-nat.h".
11573         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11574         * inf-ptrace.c (inf_ptrace_register_u_offset)
11575         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11576         (inf_ptrace_store_register, inf_ptrace_store_registers)
11577         (inf_ptrace_trad_target): Move to ...
11578         * linux-nat-trad.c: ... this new file.
11579         * linux-nat-trad.h: New file.
11580         * linux-nat.c (linux_target_install_ops): Make extern.
11581         (linux_trad_target): Delete.
11582         * linux-nat.h (linux_trad_target): Delete declaration.
11583         (linux_target_install_ops): Declare.
11584         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11585         "linux-nat.h".
11586
11587 2018-05-02  Pedro Alves  <palves@redhat.com>
11588
11589         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11590         procfs_target/add_target here.
11591         * procfs.c (procfs_target): Make static.
11592         (_initialize_procfs): Call add_target here.
11593         * procfs.h (struct target_ops): Remove forward declaration.
11594         (procfs_target): Remove declaration.
11595         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11596
11597 2018-05-02  Pedro Alves  <palves@redhat.com>
11598
11599         * procfs.c (procfs_stopped_by_watchpoint)
11600         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11601         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11602         Forward declare.
11603         (procfs_use_watchpoints): Delete, move contents...
11604         (procfs_target): ... here.
11605         * procfs.h (procfs_use_watchpoints): Delete declaration.
11606         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11607         procfs_use_watchpoints.
11608         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11609         procfs_use_watchpoints.
11610
11611 2018-05-02  Tom Tromey  <tom@tromey.com>
11612
11613         PR python/20084:
11614         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11615         and var_zuinteger_unlimited.
11616         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11617         and PARAM_ZUINTEGER_UNLIMITED.
11618         (set_parameter_value): Handle var_zuinteger and
11619         var_zuinteger_unlimited.
11620         (add_setshow_generic): Likewise.
11621         (parmpy_init): Likewise.
11622
11623 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11624
11625         PR rust/23124
11626         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11627         pointer is not null before dereferencing it.
11628
11629 2018-04-30  Tom Tromey  <tom@tromey.com>
11630
11631         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11632         is_mi_like_p.
11633
11634 2018-04-30  Tom Tromey  <tom@tromey.com>
11635
11636         * breakpoint.c (mention): Remove use of is_mi_like_p.
11637         (print_mention_ranged_breakpoint): Likewise.
11638         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11639         of is_mi_like_p.
11640
11641 2018-04-30  Tom Tromey  <tom@tromey.com>
11642
11643         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11644
11645 2018-04-30  Tom Tromey  <tom@tromey.com>
11646
11647         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11648         (info_spu_event_command): Remove some uses of is_mi_like_p.
11649
11650 2018-04-30  Tom Tromey  <tom@tromey.com>
11651
11652         * python/py-framefilter.c (py_print_single_arg)
11653         (enumerate_locals, py_print_args, py_print_frame): Remove some
11654         uses of is_mi_like_p.
11655
11656 2018-04-30  Tom Tromey  <tom@tromey.com>
11657
11658         * ui-out.c: Update.
11659         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11660         * ui-out.h (ui_out::is_mi_like_p): Now const.
11661         (ui_out::do_is_mi_like_p): Now const.
11662         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11663
11664 2018-04-30  Tom Tromey  <tom@tromey.com>
11665
11666         * varobj.c (varobj_set_visualizer): Use new_reference.
11667         * python/python.c (gdbpy_decode_line): Use new_reference.
11668         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11669         new_reference.
11670
11671 2018-04-30  Tom Tromey  <tom@tromey.com>
11672
11673         * varobj.c (install_new_value): Use new_reference.
11674         * value.h (value_incref): Return void.  Swap intro comment with
11675         value_decref.
11676         * value.c (set_value_parent): Use new_reference.
11677         (value_incref): Return void.  Update intro comment.
11678         (release_value): Use new_reference.
11679         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11680
11681 2018-04-30  Tom Tromey  <tom@tromey.com>
11682
11683         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11684         * gdb_bfd.h (new_bfd_ref): Remove.
11685         (gdb_bfd_open): Update comment.
11686         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11687         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11688         (gdb_bfd_fdopenr): Use new_reference.
11689         * exec.c (exec_file_attach): Use new_reference.
11690
11691 2018-04-30  Tom Tromey  <tom@tromey.com>
11692
11693         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11694         method.
11695
11696 2018-04-30  Tom Tromey  <tom@tromey.com>
11697
11698         * jit.c (jit_read_code_entry): Use type_align.
11699         * i386-tdep.c (i386_gdbarch_init): Don't call
11700         set_gdbarch_long_long_align_bit.
11701         * gdbarch.sh: Remove long_long_align_bit.
11702         * gdbarch.c, gdbarch.h: Rebuild.
11703         * arc-tdep.c (arc_type_align): New function.
11704         (arc_gdbarch_init): Use arc_type_align.  Don't call
11705         set_gdbarch_long_long_align_bit.
11706
11707 2018-04-30  Tom Tromey  <tom@tromey.com>
11708
11709         * rust-lang.c (rust_type_alignment): Remove.
11710         (rust_composite_type): Use type_align.
11711
11712 2018-04-30  Tom Tromey  <tom@tromey.com>
11713
11714         * NEWS: Mention Type.align.
11715         * python/py-type.c (typy_get_alignof): New function.
11716         (type_object_getset): Add "alignof".
11717
11718 2018-04-30  Tom Tromey  <tom@tromey.com>
11719
11720         PR exp/17095:
11721         * NEWS: Update.
11722         * std-operator.def (UNOP_ALIGNOF): New operator.
11723         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11724         New.
11725         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11726         * c-lang.c (c_op_print_tab): Add alignof.
11727         * c-exp.y (ALIGNOF): New token.
11728         (exp): Add "ALIGNOF" production.
11729         (ident_tokens): Add _Alignof and alignof.
11730
11731 2018-04-30  Tom Tromey  <tom@tromey.com>
11732
11733         * i386-tdep.c (i386_type_align): New function.
11734         (i386_gdbarch_init): Update.
11735         * gdbarch.sh (type_align): New method.
11736         * gdbarch.c, gdbarch.h: Rebuild.
11737         * arch-utils.h (default_type_align): Declare.
11738         * arch-utils.c (default_type_align): New function.
11739         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11740         (struct type) <align_log2>: New field.
11741         <instance_flags>: Now a bitfield.
11742         (TYPE_RAW_ALIGN): New macro.
11743         (type_align, type_raw_align, set_type_align): Declare.
11744         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11745         functions.
11746         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11747         (get_alignment, maybe_set_alignment): New functions.
11748         (read_structure_type, read_enumeration_type, read_array_type)
11749         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11750         (read_subrange_type, read_base_type): Set type alignment.
11751
11752 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11753
11754         * dwarf2read.c (read_index_from_section): Use bool.
11755
11756 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11757
11758         PR gdb/22950
11759         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11760         with #ifdef.
11761
11762 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11763
11764         PR build/22873
11765         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11766         last step, and do it atomically.
11767
11768 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11769
11770         * compile/compile-c-types.c (convert_int, convert_float):
11771         Update for C FE v1.
11772
11773 2018-04-27  Tom Tromey  <tom@tromey.com>
11774
11775         PR rust/22545:
11776         * rust-lang.c (rust_inclusive_range_type_p): New function.
11777         (rust_range): Handle inclusive ranges.
11778         (rust_compute_range): Likewise.
11779         * rust-exp.y (struct rust_op) <inclusive>: New field.
11780         (DOTDOTEQ): New constant.
11781         (range_expr): Add "..=" productions.
11782         (operator_tokens): Add "..=" token.
11783         (ast_range): Add "inclusive" parameter.
11784         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11785         ranges.
11786         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11787         bounds values.
11788         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11789         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11790         Update comments.
11791         * expprint.c (print_subexp_standard): Handle new bounds values.
11792         (dump_subexp_body_standard): Likewise.
11793
11794 2018-04-27  Tom Tromey  <tom@tromey.com>
11795
11796         * configure: Rebuild.
11797         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11798         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11799         "OVERRIDE".
11800         (class symbol_needs_eval_context): Likewise.
11801         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11802         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11803         "virtual".
11804         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11805         "override".
11806         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11807         * aarch64-tdep.c (instruction_reader::read): Use "override".
11808         (instruction_reader_test::read): Likewise.
11809         * arm-tdep.c (instruction_reader::read): Use "override".
11810         (instruction_reader_thumb::read): Likewise.
11811
11812 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11813
11814         PR remote/9665
11815         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11816         instead of remote_send.
11817         (remote_send): Remove.
11818
11819 2018-04-26  Pedro Alves  <palves@redhat.com>
11820
11821         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11822         find_function_start_sal instead of find_pc_line.
11823
11824 2018-04-26  Pedro Alves  <palves@redhat.com>
11825
11826         * breakpoint.c (set_breakpoint_location_function): Handle
11827         mst_data_gnu_ifunc.
11828         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11829         * elfread.c (elf_symtab_read): Give data symbols with
11830         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11831         (elf_rel_plt_read): Update comment.
11832         * linespec.c (convert_linespec_to_sals): Handle
11833         mst_data_gnu_ifunc.
11834         (minsym_found): Handle mst_data_gnu_ifunc.
11835         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11836         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11837         * parse.c (find_minsym_type_and_address): Handle
11838         mst_data_gnu_ifunc.
11839         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11840         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11841         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11842         comment.
11843         <mst_data_gnu_ifunc>: New enumerator.
11844
11845 2018-04-26  Pedro Alves  <palves@redhat.com>
11846
11847         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11848         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11849         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11850         Handle it.
11851         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11852         (lookup_minimal_symbol_by_pc): Adjust.
11853         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11854         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11855         * minsyms.h (lookup_msym_prefer): New enum.
11856         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11857         parameter by a lookup_msym_prefer parameter.
11858
11859 2018-04-26  Pedro Alves  <palves@redhat.com>
11860
11861         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11862         ends in "@plt" instead of looking at the symbol's section.
11863
11864 2018-04-26  Pedro Alves  <palves@redhat.com>
11865
11866         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11867         all references.
11868         (find_pc_partial_function_gnu_ifunc): Rename to ...
11869         (find_pc_partial_function): ... this, and remove references to
11870         'is_gnu_ifunc_p'.
11871         (find_pc_partial_function): Delete old implementation.
11872         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11873
11874 2018-04-26  Pedro Alves  <palves@redhat.com>
11875
11876         * linespec.c (struct bound_minimal_symbol_search_key): New.
11877         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11878         skip first line if we found a GNU ifunc minimal symbol by name.
11879         (compare_msymbols): Change parameters to work with a destructured
11880         lhs minsym.
11881         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11882         functions.
11883
11884 2018-04-26  Pedro Alves  <palves@redhat.com>
11885
11886         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11887         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11888         address/name.
11889         (add_location_to_breakpoint): Store the minsym and the objfile in
11890         the breakpoint location.
11891         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11892         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11893         Record the minsym in the sal.
11894         * symtab.h (symtab_and_line) <msymbol>: New field.
11895
11896 2018-04-26  Pedro Alves  <palves@redhat.com>
11897
11898         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11899         unless we actually resolved the ifunc.
11900
11901 2018-04-26  Pedro Alves  <palves@redhat.com>
11902
11903         * c-exp.y (variable production): Prefer ifunc minsyms over
11904         regular function symbols.
11905         * symtab.c (find_gnu_ifunc): New function.
11906         * minsyms.h (lookup_msym_prefer): New enum.
11907         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11908         parameter by a lookup_msym_prefer parameter.
11909         * symtab.h (find_gnu_ifunc): New declaration.
11910
11911 2018-04-26  Pedro Alves  <palves@redhat.com>
11912
11913         * blockframe.c (find_gnu_ifunc_target_type): New function.
11914         (find_function_type): New.
11915         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11916         return a value with a memory address.
11917         (eval_call): For calls to GNU ifunc functions, try to find the
11918         type of the target function from the type that the resolver
11919         returns.
11920         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11921         symbols.
11922         * infcall.c (find_function_return_type): Delete.
11923         (find_function_addr): Add 'function_type' parameter.  For calls to
11924         GNU ifunc functions, try to find the type of the target function
11925         from the type that the resolver returns, and return it via
11926         FUNCTION_TYPE.
11927         (call_function_by_hand_dummy): Adjust to use the function type
11928         returned by find_function_addr.
11929         (find_function_addr): Add 'function_type' parameter and move
11930         description here.
11931         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11932         declarations.
11933
11934 2018-04-26  Pedro Alves  <palves@redhat.com>
11935
11936         * c-exp.y (variable production): Skip finding an alias for ifunc
11937         symbols.
11938
11939 2018-04-26  Pedro Alves  <palves@redhat.com>
11940
11941         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11942
11943 2018-04-25  Pedro Alves  <palves@redhat.com>
11944
11945         * infcmd.c (kill_command): Print the pid as string, not the whole
11946         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11947         message.
11948         * remote.c (remote_detach_1): Print the pid as string, not the
11949         whole thread's ptid.
11950
11951 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11952             Sergio Durigan Junior  <sergiodj@redhat.com>
11953             Pedro Alves  <palves@redhat.com>
11954
11955         * infcmd.c (kill_command): Print message when inferior has
11956         been killed.
11957         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11958         '1'.
11959         (add_inferior): Improve message printed when
11960         'print_inferior_events' is on.
11961         (exit_inferior): Remove message printed when
11962         'print_inferior_events' is on.
11963         (detach_inferior): Improve message printed when
11964         'print_inferior_events' is on.
11965         (initialize_inferiors): Use 'add_inferior_silent' to set
11966         'current_inferior_'.
11967         * inferior.h (print_inferior_events): Declare here as
11968         'extern'.
11969         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11970         '[Detaching...]' messages when 'print_inferior_events' is on.
11971         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11972         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11973         'Detaching after fork from child...', replace it by '... from
11974         parent...'.
11975         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11976         prefix/suffix when printing 'Detaching...' messages.  Print
11977         them when 'print_inferior_events' is on.
11978         * remote.c (remote_detach_1): Print message when detaching
11979         from inferior and '!is_fork_parent'.
11980
11981 2018-04-24  Tom Tromey  <tom@tromey.com>
11982
11983         * cli-out.h: Reindent.
11984
11985 2018-04-24  Tom Tromey  <tom@tromey.com>
11986
11987         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11988         (cli_ui_out::do_field_string): Use fputs_filtered.
11989         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11990
11991 2018-04-23  Tom Tromey  <tom@tromey.com>
11992
11993         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11994         gdb::unique_xmalloc_ptr.
11995
11996 2018-04-23  Tom Tromey  <tom@tromey.com>
11997
11998         * configure: Rebuild.
11999
12000 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12001
12002         PR gdb/23095
12003         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12004         prepare_for_testing.  Set normal_bp to r_debug_state if target
12005         is bsd.
12006
12007 2018-04-21  Pedro Alves  <palves@redhat.com>
12008             Rajendra SY  <rajendra.sy@gmail.com>
12009
12010         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12011         * remote.c (extended_remote_attach): In all-stop mode, mark the
12012         thread as executing.
12013
12014 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12015
12016         * thread.c (thread_apply_all_command): Fix comment.
12017         (thread_command): Fix comment.
12018
12019 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12020
12021         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12022         parameter.
12023         * features/aarch64-core.c (create_feature_aarch64_core):
12024         Regenerate.
12025         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12026         Likewise.
12027         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12028         Likewise.
12029         * features/i386/32bit-avx512.c
12030         (create_feature_i386_32bit_avx512): Likewise.
12031         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12032         Likewise.
12033         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12034         Likewise.
12035         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12036         Likewise.
12037         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12038         Likewise.
12039         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12040         Likewise.
12041         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12042         Likewise.
12043         * features/i386/64bit-avx512.c
12044         (create_feature_i386_64bit_avx512): Likewise.
12045         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12046         Likewise.
12047         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12048         Likewise.
12049         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12050         Likewise.
12051         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12052         Likewise.
12053         * features/i386/64bit-segments.c
12054         (create_feature_i386_64bit_segments): Likewise.
12055         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12056         Likewise.
12057         * features/i386/x32-core.c
12058         (create_feature_i386_x32_core): Likewise.
12059         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12060         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12061         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12062         * target-descriptions.c: In generated code, don't pass xml
12063         filename.
12064
12065 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12066
12067         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12068         (print_xml_feature::visit_post): Likewise.
12069         (print_xml_feature::visit): Likewise.
12070         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12071         (print_xml_feature): Add new class.
12072         * regformats/regdat.sh: Null xmltarget on feature targets.
12073         * target-descriptions.c (struct target_desc): Add xmltarget.
12074         (maintenance_check_tdesc_xml_convert): Add unittest function.
12075         (tdesc_get_features_xml): Add function to get xml.
12076         (maintenance_check_xml_descriptions): Test xml generation.
12077         * xml-tdesc.c (string_read_description_xml): Add function.
12078         * xml-tdesc.h (string_read_description_xml): Add declaration.
12079
12080 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12081
12082         * features/Makefile: Add feature marker to targets with new style
12083         target descriptions.
12084         * regformats/aarch64.dat: Regenerate.
12085         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12086         * regformats/i386/amd64-avx-linux.dat: Likewise.
12087         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12088         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12089         * regformats/i386/amd64-linux.dat: Likewise.
12090         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12091         * regformats/i386/amd64.dat: Likewise.
12092         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12093         * regformats/i386/i386-avx-linux.dat: Likewise.
12094         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12095         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12096         * regformats/i386/i386-linux.dat: Likewise.
12097         * regformats/i386/i386-mmx-linux.dat: Likewise.
12098         * regformats/i386/i386-mpx-linux.dat: Likewise.
12099         * regformats/i386/i386.dat: Likewise.
12100         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12101         * regformats/i386/x32-avx-linux.dat: Likewise.
12102         * regformats/i386/x32-linux.dat: Likewise.
12103         * regformats/tic6x-c62x-linux.dat: Likewise.
12104         * regformats/tic6x-c64x-linux.dat: Likewise.
12105         * regformats/tic6x-c64xp-linux.dat: Likewise.
12106         * regformats/regdat.sh: Parse feature marker.
12107
12108 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12109
12110         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12111         (tdesc_osabi_name): Likewise.
12112         * target-descriptions.c (tdesc_architecture_name): Add new
12113         function.
12114         (tdesc_osabi_name): Likewise.
12115
12116 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12117
12118         * common/tdesc.c (tdesc_predefined_type): Move to here.
12119         (tdesc_named_type): Likewise.
12120         (tdesc_create_vector): Likewise.
12121         (tdesc_create_struct): Likewise.
12122         (tdesc_set_struct_size): Likewise.
12123         (tdesc_create_union): Likewise.
12124         (tdesc_create_flags): Likewise.
12125         (tdesc_create_enum): Likewise.
12126         (tdesc_add_field): Likewise.
12127         (tdesc_add_typed_bitfield): Likewise.
12128         (tdesc_add_bitfield): Likewise.
12129         (tdesc_add_flag): Likewise.
12130         (tdesc_add_enum_value): Likewise.
12131         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12132         (struct tdesc_type_vector): Likewise.
12133         (struct tdesc_type_field): Likewise.
12134         (struct tdesc_type_with_fields): Likewise.
12135         (tdesc_create_enum): Add declaration.
12136         (tdesc_add_typed_bitfield): Likewise.
12137         (tdesc_add_enum_value): Likewise.
12138         * target-descriptions.c (tdesc_type_field): Move from here.
12139         (tdesc_type_builtin): Likewise.
12140         (tdesc_type_vector): Likewise.
12141         (tdesc_type_with_fields): Likewise.
12142         (tdesc_predefined_types): Likewise.
12143         (tdesc_named_type): Likewise.
12144         (tdesc_create_vector): Likewise.
12145         (tdesc_create_struct): Likewise.
12146         (tdesc_set_struct_size): Likewise.
12147         (tdesc_create_union): Likewise.
12148         (tdesc_create_flags): Likewise.
12149         (tdesc_create_enum): Likewise.
12150         (tdesc_add_field): Likewise.
12151         (tdesc_add_typed_bitfield): Likewise.
12152         (tdesc_add_bitfield): Likewise.
12153         (tdesc_add_flag): Likewise.
12154         (tdesc_add_enum_value): Likewise.
12155         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12156         (tdesc_add_typed_bitfield): Likewise.
12157         (tdesc_add_enum_value): Likewise.
12158
12159 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12160
12161         * common/tdesc.c (tdesc_feature::accept): Move to here.
12162         (tdesc_feature::operator==): Likewise.
12163         (tdesc_create_reg): Likewise.
12164         * common/tdesc.h (tdesc_type_kind): Likewise.
12165         (struct tdesc_type): Likewise.
12166         (struct tdesc_feature): Likewise.
12167         * regformats/regdat.sh: Create a feature.
12168         * target-descriptions.c (tdesc_type_kind): Move from here.
12169         (tdesc_type): Likewise.
12170         (tdesc_type_up): Likewise.
12171         (tdesc_feature): Likewise.
12172         (tdesc_create_reg): Likewise.
12173
12174 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12175
12176         * Makefile.in: Add arch/tdesc.c
12177         * common/tdesc.c: New file.
12178         * common/tdesc.h (tdesc_element_visitor): Move to here.
12179         (tdesc_element): Likewise.
12180         (tdesc_reg): Likewise.
12181         (tdesc_reg_up): Likewise.
12182         * regformats/regdef.h (reg): Add offset to constructors.
12183         * target-descriptions.c (tdesc_element_visitor): Move from here.
12184         (tdesc_element): Likewise.
12185         (tdesc_reg): Likewise.
12186         (tdesc_reg_up): Likewise.
12187
12188 2018-04-17  Tom Tromey  <tom@tromey.com>
12189
12190         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12191         discriminant field.
12192
12193 2018-04-17  Tom Tromey  <tom@tromey.com>
12194
12195         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12196
12197 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12198
12199         * symtab.c (print_symbol_info): Skip printing filename and line
12200         number when `last' is NULL.
12201         (symtab_symbol_info): Use empty string instead of NULL for first
12202         invocation of print_symbol_info.
12203         (rbreak_command): Pass NULL to `last' parameter of
12204         print_symbol_info.
12205
12206 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12209         instead of nullptr.
12210
12211 2018-04-16  Pedro Alves  <palves@redhat.com>
12212
12213         * MAINTAINERS (sh): Remove.
12214         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12215         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12216         (ALLDEPFILES): Remove sh64-tdep.c.
12217         * NEWS: Mentions that support for SH-5/SH64 is removed.
12218         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12219         (sh*-*-openbsd*): Ditto.
12220         (sh64-*-elf*): Remove.
12221         (sh*): Remove.
12222         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12223         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12224         * sh-tdep.c: No longer include "sh64-tdep.h".
12225         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12226         * sh64-tdep.c, sh64-tdep.h: Remove files.
12227
12228 2018-04-16  Pedro Alves  <palves@redhat.com>
12229
12230         * MAINTAINERS: Remove m88k.
12231         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12232         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12233         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12234         * NEWS: Mention that support for m88k was removed.
12235         * configure.host (m88*-*-*): Remove support.
12236         * configure.nat (m88k-*-*): Remove support.
12237         * configure.tgt (m88*-*-openbsd*): Remove.
12238         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12239
12240 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12241
12242         * configure.tgt (x86_tobjs): New variable.
12243         (amd64_tobjs, i386_tobjs): Use it.
12244
12245 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12246
12247         * symtab.c (print_symbol_info): Precede the symbol definition by
12248         the line number when available.
12249         * NEWS: Advertise this enhancement.
12250
12251 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12252
12253         * NEWS (New options): announce set/show record btrace cpu.
12254         * btrace.c: Include record-btrace.h.
12255         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12256         the vendor is unknown.
12257         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12258         Maybe overwrite the btrace configuration's cpu.
12259         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12260         (btrace_fetch): Add cpu parameter.  Update callers.
12261         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12262         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12263         errata workarounds if the vendor is unknown.
12264         * python/py-record-btrace.c: Include record-btrace.h.
12265         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12266         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12267         * record-btrace.c (record_btrace_cpu_state_kind): New.
12268         (record_btrace_cpu): New.
12269         (set_record_btrace_cpu_cmdlist): New.
12270         (record_btrace_get_cpu): New.
12271         (require_btrace_thread, record_btrace_info)
12272         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12273         (cmd_set_record_btrace_cpu_none): New.
12274         (cmd_set_record_btrace_cpu_auto): New.
12275         (cmd_set_record_btrace_cpu): New.
12276         (cmd_show_record_btrace_cpu): New.
12277         (_initialize_record_btrace): Initialize set/show record btrace cpu
12278         commands.
12279         * record-btrace.h (record_btrace_get_cpu): New.
12280
12281 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12282
12283         * record.c (set_record_command): Fix typo in message.
12284
12285 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12286
12287         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12288
12289 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12290
12291         * infrun.c (process_event_stop_test): Call
12292         gdbarch_in_indirect_branch_thunk.
12293         * gdbarch.sh (in_indirect_branch_thunk): New.
12294         * gdbarch.c: Regenerated.
12295         * gdbarch.h: Regenerated.
12296         * x86-tdep.h: New.
12297         * x86-tdep.c: New.
12298         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12299         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12300         (ALLDEPFILES): Add x86-tdep.c.
12301         * arch-utils.h (default_in_indirect_branch_thunk): New.
12302         * arch-utils.c (default_in_indirect_branch_thunk): New.
12303         * i386-tdep: Include x86-tdep.h.
12304         (i386_in_indirect_branch_thunk): New.
12305         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12306         function.
12307         * amd64-tdep: Include x86-tdep.h.
12308         (amd64_in_indirect_branch_thunk): New.
12309         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12310
12311 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12312
12313         PR gdb/23053
12314         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12315         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12316         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12317         regression.
12318
12319 2018-04-12  Tom Tromey  <tom@tromey.com>
12320
12321         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12322         (rust_evaluate_subexp): Likewise.
12323
12324 2018-04-12  Pedro Alves  <palves@redhat.com>
12325
12326         * procfs.c (procfs_detach): Make forward declaration's prototype
12327         match definition's protototype.
12328         (proc_get_LDT_entry): Remove stale do_cleanups call.
12329
12330 2018-04-12  Pedro Alves  <palves@redhat.com>
12331
12332         * target.h (target_ops::to_has_exited): Delete.
12333         (target_has_exited): Delete.
12334         * target-delegates.c: Regenerate.
12335
12336 2018-04-11  Pedro Alves  <palves@redhat.com>
12337
12338         * target.c (fileio_fh_t::t): Add comment.
12339         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12340         (target_fileio_close): Handle a NULL target.
12341         (invalidate_fileio_fh): New.
12342         (target_close): Call it.
12343         * remote.c (remote_hostio_send_command): No longer check whether
12344         remote_desc is open.
12345
12346 2018-04-11  Pedro Alves  <palves@redhat.com>
12347
12348         * target.c (fileio_fh_t): Make it a named struct instead of a
12349         typedef.
12350         (fileio_fh_t::is_closed): New method.
12351         (DEF_VEC_O (fileio_fh_t)): Remove.
12352         (fileio_fhandles): Now a std::vector.
12353         (is_closed_fileio_fh): Delete.
12354         (acquire_fileio_fd): Adjust.  Rename parameters.
12355         (release_fileio_fd): Adjust.
12356         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12357         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12358         (target_fileio_close): Adjust.
12359
12360 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12361
12362         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12363         index.
12364
12365 2018-04-10  Pedro Alves  <palves@redhat.com>
12366
12367         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12368         (scoped_finish_thread_state): New class.
12369         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12370         cleanup.
12371         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12372         (fetch_inferior_event, normal_stop): Likewise.
12373         * thread.c (finish_thread_state_cleanup): Delete.
12374
12375 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12376             Pedro Alves  <palves@redhat.com>
12377
12378         * value.c: Include "selftest.h" and "common/array-view.h".
12379         (struct range) <operator ==>: New.
12380         (test_ranges_contain): New.
12381         (check_ranges_vector): New.
12382         (test_insert_into_bit_range_vector): New.
12383         (_initialize_values): Register selftests.
12384         * common/array-view.h (operator==, operator!=): New.
12385
12386 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12387
12388         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12389         an iterator.
12390         * inline-frame.c: Include <algorithm>.
12391         (struct inline_state): Add constructor.
12392         (inline_state_s): Remove.
12393         (DEF_VEC_O(inline_state_s)): Remove.
12394         (inline_states): Change type to std::vector.
12395         (find_inline_frame_state): Adjust to std::vector.
12396         (allocate_inline_frame_state): Remove.
12397         (clear_inline_frame_state): Adjust to std::vector.
12398         (skip_inline_frames): Adjust to std::vector.
12399
12400 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12401
12402         * tracepoint.h (struct trace_state_variable): Add constructor.
12403         <name>: Change type to std::string.
12404         * tracepoint.c (tsv_s): Remove.
12405         (DEF_VEC_O(tsv_s)): Remove.
12406         (tvariables): Change to std::vector.
12407         (create_trace_state_variable): Adjust to std::vector.
12408         (find_trace_state_variable): Likewise.
12409         (find_trace_state_variable_by_number): Likewise.
12410         (delete_trace_state_variable): Likewise.
12411         (trace_variable_command): Adjust to std::string.
12412         (delete_trace_variable_command): Likewise.
12413         (tvariables_info_1): Adjust to std::vector.
12414         (save_trace_state_variables): Likewise.
12415         (start_tracing): Likewise.
12416         (merge_uploaded_trace_state_variables): Adjust to std::vector
12417         and std::string.
12418         * target.h (struct target_ops)
12419         <to_download_trace_state_variable>: Pass reference to
12420         trace_state_variable.
12421         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12422         * target-delegates.c: Re-generate.
12423         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12424         (mi_tsv_deleted): Likewise.
12425         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12426         * remote.c (remote_download_trace_state_variable): Change
12427         pointer to reference and adjust.
12428         * make-target-delegates (parse_argtypes): Handle references.
12429         (write_function_header): Likewise.
12430         (munge_type): Likewise.
12431
12432 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12433
12434         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12435         string_view-selftests.c.
12436         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12437         testsuite.
12438         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12439         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12440         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12441         * unittests/basic_string_view/element_access/char/1.cc:
12442         Likewise.
12443         * unittests/basic_string_view/element_access/char/empty.cc:
12444         Likewise.
12445         * unittests/basic_string_view/element_access/char/front_back.cc:
12446         Likewise.
12447         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12448         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12449         Likewise.
12450         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12451         Likewise.
12452         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12453         Likewise.
12454         * unittests/basic_string_view/operations/compare/char/1.cc:
12455         Likewise.
12456         * unittests/basic_string_view/operations/compare/char/13650.cc:
12457         Likewise.
12458         * unittests/basic_string_view/operations/copy/char/1.cc:
12459         Likewise.
12460         * unittests/basic_string_view/operations/data/char/1.cc:
12461         Likewise.
12462         * unittests/basic_string_view/operations/find/char/1.cc:
12463         Likewise.
12464         * unittests/basic_string_view/operations/find/char/2.cc:
12465         Likewise.
12466         * unittests/basic_string_view/operations/find/char/3.cc:
12467         Likewise.
12468         * unittests/basic_string_view/operations/find/char/4.cc:
12469         Likewise.
12470         * unittests/basic_string_view/operations/rfind/char/1.cc:
12471         Likewise.
12472         * unittests/basic_string_view/operations/rfind/char/2.cc:
12473         Likewise.
12474         * unittests/basic_string_view/operations/rfind/char/3.cc:
12475         Likewise.
12476         * unittests/basic_string_view/operations/substr/char/1.cc:
12477         Likewise.
12478         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12479         * unittests/string_view-selftests.c: New file.
12480
12481 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12482
12483         * unittests/basic_string_view/capacity/1.cc: New file.
12484         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12485         * unittests/basic_string_view/cons/char/1.cc: New file.
12486         * unittests/basic_string_view/cons/char/2.cc: New file.
12487         * unittests/basic_string_view/cons/char/3.cc: New file.
12488         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12489         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12490         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12491         * unittests/basic_string_view/element_access/char/1.cc: New file.
12492         * unittests/basic_string_view/element_access/char/2.cc: New file.
12493         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12494         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12495         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12496         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12497         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12498         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12499         * unittests/basic_string_view/include.cc: New file.
12500         * unittests/basic_string_view/inserters/char/1.cc: New file.
12501         * unittests/basic_string_view/inserters/char/2.cc: New file.
12502         * unittests/basic_string_view/inserters/char/3.cc: New file.
12503         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12504         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12505         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12506         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12507         * unittests/basic_string_view/literals/types.cc: New file.
12508         * unittests/basic_string_view/literals/values.cc: New file.
12509         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12510         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12511         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12512         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12513         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12514         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12515         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12516         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12517         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12518         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12519         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12520         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12521         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12522         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12523         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12524         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12525         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12526         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12527         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12528         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12529         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12530         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12531         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12532         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12533         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12534         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12535         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12536         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12537         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12538         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12539         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12540         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12541         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12542         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12543         * unittests/basic_string_view/operators/char/2.cc: New file.
12544         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12545         * unittests/basic_string_view/range_access/char/1.cc: New file.
12546         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12547         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12548         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12549         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12550         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12551         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12552         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12553         * unittests/basic_string_view/typedefs.cc: New file.
12554         * unittests/basic_string_view/types/1.cc: New file.
12555
12556 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12557
12558         * common/gdb_string_view.h: Remove libstdc++ implementation
12559         details, adjust to gdb reality.
12560         * common/gdb_string_view.tcc: Likewise.
12561         * cli/cli-script.c (struct string_view): Remove.
12562         (user_args) <m_args>: Change element type to gdb::string_view.
12563         (user_args::insert_args): Adjust.
12564
12565 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12566
12567         * common/gdb_string_view.h: New file.
12568         * common/gdb_string_view.tcc: New file.
12569
12570 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12571
12572         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12573         * configure: Re-generate.
12574
12575 2018-04-09  Pedro Alves  <palves@redhat.com>
12576
12577         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12578         (set_target_gdbarch): Call
12579         gdb::observers::architecture_changed.notify instead of
12580         observer_notify_architecture_changed.
12581
12582 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12583
12584         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12585         (do_restore_current_traceframe_cleanup): Remove.
12586         (restore_current_traceframe_cleanup_dtor): Remove.
12587         (make_cleanup_restore_current_traceframe): Remove.
12588         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12589         New.
12590         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12591         * infrun.c (fetch_inferior_event): Use
12592         scoped_restore_current_traceframe.
12593
12594 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12595
12596         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12597         Remove.
12598         <n_allocated_type_units>: Remove.
12599         <all_type_units>: Change to std::vector.
12600         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12601         to std::vector change.
12602         (dwarf2_per_objfile::get_cutu): Likewise.
12603         (dwarf2_per_objfile::get_tu): Likewise.
12604         (create_signatured_type_table_from_index): Likewise.
12605         (create_signatured_type_table_from_debug_names): Likewise.
12606         (dw2_symtab_iter_next): Likewise.
12607         (dw2_print_stats): Likewise.
12608         (dw2_expand_all_symtabs): Likewise.
12609         (dw2_expand_marked_cus): Likewise.
12610         (dw2_debug_names_iterator::next): Likewise.
12611         (dwarf2_initialize_objfile): Likewise.
12612         (add_signatured_type_cu_to_table): Likewise.
12613         (create_all_type_units): Likewise.
12614         (add_type_unit): Likewise.
12615         (struct tu_abbrev_offset): Add constructor.
12616         (build_type_psymtabs_1): Adjust to std::vector change.
12617         (print_tu_stats): Likewise.
12618         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12619         (write_debug_names): Likewise.
12620
12621 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12622
12623         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12624         Make an std::vector.
12625         <n_comp_units>: Remove.
12626         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12627         to std::vector change.
12628         (dwarf2_per_objfile::get_cutu): Likewise.
12629         (dwarf2_per_objfile::get_cu): Likewise.
12630         (create_cus_from_index): Likewise.
12631         (create_addrmap_from_index): Likewise.
12632         (create_addrmap_from_aranges): Likewise.
12633         (dwarf2_read_index): Likewise.
12634         (dw2_find_last_source_symtab): Likewise.
12635         (dw2_map_symtabs_matching_filename): Likewise.
12636         (dw2_symtab_iter_next): Likewise.
12637         (dw2_print_stats): Likewise.
12638         (dw2_expand_all_symtabs): Likewise.
12639         (dw2_expand_symtabs_with_fullname): Likewise.
12640         (dw2_expand_marked_cus): Likewise.
12641         (dw2_map_symbol_filenames): Likewise.
12642         (create_cus_from_debug_names): Likewise.
12643         (dwarf2_read_debug_names): Likewise.
12644         (dw2_debug_names_iterator::next): Likewise.
12645         (dwarf2_initialize_objfile): Likewise.
12646         (set_partial_user): Likewise.
12647         (dwarf2_build_psymtabs_hard): Likewise.
12648         (read_comp_units_from_section): Remove arguments, adjust to
12649         std::vector change.
12650         (create_all_comp_units): Adjust to std::vector and
12651         read_comp_units_from_section changes.
12652         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12653         change.
12654         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12655         (psyms_seen_size): Likewise.
12656         (write_gdbindex): Likewise.
12657         (write_debug_names): Likewise.
12658
12659 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12660
12661         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12662         with dwarf2_per_objfile.
12663         (create_cus_from_index): Likewise.
12664         (create_signatured_type_table_from_index): Likewise.
12665         (dwarf2_read_index): Likewise.
12666         (dwarf2_initialize_objfile): Likewise.
12667         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12668         per_cu rather than get_dwarf2_per_objfile.
12669
12670 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12671
12672         * dwarf2read.h (struct signatured_type): Forward declare.
12673         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12674         New methods.
12675         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12676         (dw2_get_cutu): ...this.
12677         (dwarf2_per_objfile::get_cu): Rename from...
12678         (dw2_get_cu): ...this.
12679         (dwarf2_per_objfile::get_tu): New.
12680         (create_addrmap_from_index): Adjust.
12681         (create_addrmap_from_aranges): Adjust.
12682         (dw2_find_last_source_symtab): Adjust.
12683         (dw2_map_symtabs_matching_filename): Adjust.
12684         (dw2_symtab_iter_next): Adjust.
12685         (dw2_print_stats): Adjust.
12686         (dw2_expand_all_symtabs): Adjust.
12687         (dw2_expand_symtabs_with_fullname): Adjust.
12688         (dw2_expand_marked_cus): Adjust.
12689         (dw_expand_symtabs_matching_file_matcher): Adjust.
12690         (dw2_map_symbol_filenames): Adjust.
12691         (dw2_debug_names_iterator::next): Adjust.
12692         (dwarf2_initialize_objfile): Adjust.
12693         (set_partial_user): Adjust.
12694         (dwarf2_build_psymtabs_hard): Adjust.
12695
12696 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12697
12698         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12699         Remove unused variables.
12700         (dw2_map_symtabs_matching_filename): Likewise.
12701         (dwarf2_record_block_ranges): Likewise.
12702         (dwarf2_read_addr_index): Likewise.
12703         (follow_die_offset): Likewise.
12704
12705 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12706
12707         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12708         to symbol_file_add_main.
12709
12710 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12711
12712         PR mi/22299
12713         * mi/mi-console.c (do_fputc_async_safe): New.
12714         (mi_console_file::write_async_safe): New.
12715         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12716         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12717         New.
12718         * ui-file.c (ui_file::putstrn): Adjust call to
12719         fputstrn_unfiltered.
12720         * utils.c (printchar): Replace do_fputs and do_fprintf
12721         parameters by do_fputc.
12722         (fputstr_filtered): Adjust call to printchar.
12723         (fputstr_unfiltered): Likewise.
12724         (fputstrn_filtered): Likewise.
12725         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12726         printchar.
12727         * utils.h (do_fputc_ftype): New typedef.
12728         (fputstrn_unfiltered): Add do_fputc parameter.
12729
12730 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12731
12732         * regformats/i386/i386-avx.dat: Remove.
12733
12734 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12735
12736         PR gdb/22979
12737         * amd64-tdep.c (amd64_none_init_abi): New function.
12738         (amd64_x32_none_init_abi): New function.
12739         (_initialize_amd64_tdep): Register handlers for x86-64 and
12740         x64_32 with GDB_OSABI_NONE.
12741         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12742         GDB_OSABI_NONE osabi.
12743
12744 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12745
12746         PR gdb/22980
12747         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12748         GDB_OSABI_NONE.
12749         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12750         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12751
12752 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12753
12754         * common/byte-vector.h (char_vector): New type.
12755         * target.h (target_read_alloc): Return
12756         gdb::optional<byte_vector>.
12757         (target_read_stralloc): Return gdb::optional<char_vector>.
12758         (target_get_osdata): Return gdb::optional<char_vector>.
12759         * target.c (target_read_alloc_1): Templatize.  Replacement
12760         manual memory management with vector.
12761         (target_read_alloc): Change return type, adjust.
12762         (target_read_stralloc): Change return type, adjust.
12763         (target_get_osdata): Change return type, adjust.
12764         * auxv.c (struct auxv_info) <length>: Remove.
12765         <data>: Change type to gdb::optional<byte_vector>.
12766         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12767         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12768         (target_auxv_search): Adjust.
12769         (fprint_target_auxv): Adjust.
12770         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12771         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12772         (linux_make_corefile_notes): Adjust.
12773         * osdata.c (get_osdata): Adjust.
12774         * remote.c (remote_get_threads_with_qxfer): Adjust.
12775         (remote_memory_map): Adjust.
12776         (remote_traceframe_info): Adjust.
12777         (btrace_read_config): Adjust.
12778         (remote_read_btrace): Adjust.
12779         (remote_pid_to_exec_file): Adjust.
12780         * solib-aix.c (solib_aix_get_library_list): Adjust.
12781         * solib-dsbt.c (decode_loadmap): Don't free buf.
12782         (dsbt_get_initial_loadmaps): Adjust.
12783         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12784         * solib-target.c (solib_target_current_sos): Adjust.
12785         * tracepoint.c (sdata_make_value): Adjust.
12786         * xml-support.c (xinclude_start_include): Adjust.
12787         (xml_fetch_content_from_file): Adjust.
12788         * xml-support.h (xml_fetch_another): Change return type.
12789         (xml_fetch_content_from_file): Change return type.
12790         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12791         * xml-tdesc.c (file_read_description_xml): Adjust.
12792         (fetch_available_features_from_target): Change return type.
12793         (target_fetch_description_xml): Adjust.
12794         (target_read_description_xml): Adjust.
12795
12796 2018-04-06  Tom Tromey  <tom@tromey.com>
12797
12798         * value.c (~value): Update.
12799         (struct value) <contents>: Now unique_xmalloc_ptr.
12800         (value_contents_bits_eq, allocate_value_contents)
12801         (value_contents_raw, value_contents_all_raw)
12802         (value_contents_for_printing, value_contents_for_printing_const)
12803         (set_value_enclosing_type): Update.
12804
12805 2018-04-06  Tom Tromey  <tom@tromey.com>
12806
12807         * value.c (range_s): Remove typedef, VEC.
12808         (struct range): Add operator<.
12809         (range_lessthan): Remove.
12810         (ranges_contain): Change type.
12811         (~value): Update.
12812         (struct value) <unavailable, optimized_out>: Now std::vector.
12813         (value_entirely_available)
12814         (value_entirely_covered_by_range_vector)
12815         (value_entirely_unavailable, value_entirely_optimized_out):
12816         Update.
12817         (insert_into_bit_range_vector): Change argument type.
12818         (find_first_range_overlap): Likewise.
12819         (struct ranges_and_idx, value_contents_bits_eq)
12820         (require_not_optimized_out, require_available): Update.
12821         (ranges_copy_adjusted): Change argument types.
12822         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12823
12824 2018-04-06  Tom Tromey  <tom@tromey.com>
12825
12826         * value.c (~value): Update.
12827         (struct value) <parent>: Now a value_ref_ptr.
12828         (value_parent, set_value_parent, value_address, value_copy):
12829         Update.
12830
12831 2018-04-06  Tom Tromey  <tom@tromey.com>
12832
12833         * value.c (struct value): Add constructor, destructor, and member
12834         initializers.
12835         (allocate_value_lazy, value_decref): Update.
12836
12837 2018-04-06  Tom Tromey  <tom@tromey.com>
12838
12839         * value.c (struct value) <released, next>: Remove.
12840         (all_values): Now a std::vector.
12841         (allocate_value_lazy): Update.
12842         (value_next): Remove.
12843         (value_mark, value_free_to_mark, release_value)
12844         (value_release_to_mark): Update.
12845
12846 2018-04-06  Tom Tromey  <tom@tromey.com>
12847
12848         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12849         (free_value_chain): Remove.
12850         * value.c (free_value_chain): Remove.
12851         (value_release_to_mark): Return a std::vector.
12852         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12853         std::vector.
12854         (check_condition): Update.
12855         * eval.c (fetch_subexp_value): Change "val_chain" to a
12856         std::vector.
12857         * breakpoint.c (update_watchpoint): Update.
12858         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12859
12860 2018-04-06  Tom Tromey  <tom@tromey.com>
12861
12862         * value.h (free_all_values): Remove.
12863         * value.c (free_all_values): Remove.
12864
12865 2018-04-06  Tom Tromey  <tom@tromey.com>
12866
12867         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12868         (value_history_chain, value_history_count): Remove.
12869         (value_history): New global.
12870         (record_latest_value, access_value_history, show_values)
12871         (preserve_values): Update.
12872
12873 2018-04-06  Tom Tromey  <tom@tromey.com>
12874
12875         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12876         * varobj.c (varobj_set_display_format, varobj_set_value)
12877         (install_default_visualizer, construct_visualizer)
12878         (install_new_value, ~varobj, varobj_get_value_type)
12879         (my_value_of_variable, varobj_editable_p): Update.
12880         * c-varobj.c (c_describe_child, c_value_of_variable)
12881         (cplus_number_of_children, cplus_describe_child): Update.
12882         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12883         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12884         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12885
12886 2018-04-06  Tom Tromey  <tom@tromey.com>
12887
12888         * printcmd.c (last_examine_address): Change type to
12889         value_ref_ptr.
12890         (do_examine, x_command): Update.
12891
12892 2018-04-06  Tom Tromey  <tom@tromey.com>
12893
12894         * value.c (release_value): Update.
12895         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12896         (struct bpstats) <val>: Now a value_ref_ptr.
12897         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12898         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12899         (~watchpoint, print_it_watchpoint, watch_command_1)
12900         (invalidate_bp_value_on_memory_change): Update.
12901
12902 2018-04-06  Tom Tromey  <tom@tromey.com>
12903
12904         * varobj.c (varobj_clear_saved_item)
12905         (update_dynamic_varobj_children, install_new_value, ~varobj):
12906         Update.
12907         * value.h (value_incref): Move declaration earlier.
12908         (value_decref): Rename from value_free.
12909         (struct value_ref_policy): New.
12910         (value_ref_ptr): New typedef.
12911         (struct value_deleter): Remove.
12912         (gdb_value_up): Remove typedef.
12913         (release_value): Change return type.
12914         (release_value_or_incref): Remove.
12915         * value.c (set_value_parent): Update.
12916         (value_incref): Change return type.
12917         (value_decref): Rename from value_free.
12918         (value_free_to_mark, free_all_values, free_value_chain): Update.
12919         (release_value): Return value_ref_ptr.
12920         (release_value_or_incref): Remove.
12921         (record_latest_value, set_internalvar, clear_internalvar):
12922         Update.
12923         * stack.c (info_frame_command): Don't call value_free.
12924         * python/py-value.c (valpy_dealloc, valpy_new)
12925         (value_to_value_object): Update.
12926         * printcmd.c (do_examine): Update.
12927         * opencl-lang.c (lval_func_free_closure): Update.
12928         * mi/mi-main.c (register_changed_p): Don't call value_free.
12929         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12930         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12931         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12932         value_free.
12933         * guile/scm-value.c (vlscm_free_value_smob)
12934         (vlscm_scm_from_value): Update.
12935         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12936         (frame_unwind_register_unsigned, get_frame_register_bytes)
12937         (put_frame_register_bytes): Don't call value_free.
12938         * findvar.c (address_from_register): Don't call value_free.
12939         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12940         * dwarf2loc.c (entry_data_value_free_closure)
12941         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12942         (dwarf2_evaluate_loc_desc_full): Update.
12943         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12944         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12945         (~watchpoint, watch_command_1)
12946         (invalidate_bp_value_on_memory_change): Update.
12947         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12948
12949 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12950
12951         PR gdb/23022
12952         * warning.m4: Add -Wno-error=deprecated-register.
12953         * configure: Re-generate.
12954
12955 2018-04-05  Tom Tromey  <tom@tromey.com>
12956
12957         * linespec.h: Remove include of "vec.h".
12958
12959 2018-04-05  Tom Tromey  <tom@tromey.com>
12960
12961         * linespec.c (typep): Remove typedef.
12962         (find_methods, find_superclass_methods): Take a std::vector.
12963         (find_method): Use std::vector.
12964
12965 2018-04-05  Tom Tromey  <tom@tromey.com>
12966
12967         * utils.c (compare_strings): Remove.
12968         * utils.h (compare_strings): Remove.
12969         * objc-lang.h (find_imps): Update.
12970         * objc-lang.c (find_methods): Take a std::vector.
12971         (uniquify_strings, find_imps): Likewise.
12972         * linespec.c (find_methods): Take a std::vector.
12973         (decode_objc): Use std::vector.
12974         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12975         a std::vector.
12976         (find_method, find_function_symbols): Use std::vector.
12977
12978 2018-04-05  Tom Tromey  <tom@tromey.com>
12979
12980         * completer.c (completion_tracker::completion_tracker): Remove
12981         cast.
12982         (completion_tracker::discard_completions): Likewise.
12983         * breakpoint.c (ambiguous_names_p): Remove cast.
12984         * ada-lang.c (_initialize_ada_language): Remove cast.
12985         * utils.h (streq): Update.
12986         (streq_hash): Add new declaration.
12987         * utils.c (streq): Return bool.
12988         (streq_hash): New function.
12989
12990 2018-04-05  Tom Tromey  <tom@tromey.com>
12991
12992         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12993         Remove a string copy.
12994
12995 2018-04-05  Tom Tromey  <tom@tromey.com>
12996
12997         * linespec.c (filter_results): Use std::vector.
12998         (decode_line_2, decode_line_full): Update.
12999
13000 2018-04-05  Tom Tromey  <tom@tromey.com>
13001
13002         * linespec.c (canonical_to_fullform): Return std::string.
13003         (filter_results): Update.
13004         (struct decode_line_2_item): Add constructor.
13005         <fullform, displayform>: Now std::string.
13006         (decode_line_2_compare_items): Now a std::sort comparator.
13007         (decode_line_2): Update.
13008
13009 2018-04-05  Tom Tromey  <tom@tromey.com>
13010
13011         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13012         (unexpected_linespec_error): Update.
13013         (linespec_parse_basic, parse_linespec): Update.
13014
13015 2018-04-05  Tom Tromey  <tom@tromey.com>
13016
13017         * linespec.c (linespec_parse_basic): Reindent.
13018
13019 2018-04-05  Tom Tromey  <tom@tromey.com>
13020
13021         * minsyms.h (iterate_over_minimal_symbols): Update.
13022         * minsyms.c (iterate_over_minimal_symbols): Take a
13023         gdb::function_view.
13024         * linespec.c (struct collect_minsyms): Remove.
13025         (compare_msyms): Now a std::sort comparator.
13026         (add_minsym): Add parameters.
13027         (search_minsyms_for_name): Update.  Use std::vector.
13028
13029 2018-04-03  Tom Tromey  <tom@tromey.com>
13030
13031         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13032         gdb::byte_vector.
13033
13034 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13035
13036         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13037
13038 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13039
13040         PR gdb/16959
13041         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13042         printing static type.
13043
13044 2018-04-01  Tom Tromey  <tom@tromey.com>
13045
13046         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13047         (rs6000_xfer_shared_libraries): Update.
13048
13049 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13050
13051         * common/gdb_vecs.h (char_ptr): Remove.
13052         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13053
13054 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13055
13056         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13057         with std::vector.
13058         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13059
13060 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13061
13062         * tracepoint.h (struct uploaded_tp): Initialize fields.
13063         <actions, step_actions, cmd_strings>: Change type to
13064         std::vector<char *>.
13065         * tracepoint.c (get_uploaded_tp): Allocate with new.
13066         (free_uploaded_tps): Free with delete.
13067         (parse_tracepoint_definition): Adjust to std::vector change.
13068         * breakpoint.c (read_uploaded_action): Likewise.
13069         (create_tracepoint_from_upload): Likewise.
13070         * ctf.c (ctf_write_uploaded_tp): Likewise.
13071         (SET_ARRAY_FIELD): Likewise.
13072         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13073
13074 2018-03-30  Tom Tromey  <tom@tromey.com>
13075
13076         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13077         std::unique_ptr.
13078         (svr4_keep_data_in_core): Update.
13079         (svr4_read_so_list): Update.
13080
13081 2018-03-30  Tom Tromey  <tom@tromey.com>
13082
13083         * windows-nat.c (handle_output_debug_string, handle_exception):
13084         Update.
13085         * target.h (target_read_string): Update.
13086         * target.c (target_read_string): Change "string" to
13087         unique_xmalloc_ptr.
13088         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13089         Update.
13090         * solib-frv.c (frv_current_sos): Update.
13091         * solib-dsbt.c (dsbt_current_sos): Update.
13092         * solib-darwin.c (darwin_current_sos): Update.
13093         * linux-thread-db.c (inferior_has_bug): Update.
13094         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13095         Update.  Remove alloca.
13096         * ada-lang.c (ada_main_name): Update.
13097
13098 2018-03-30  Tom Tromey  <tom@tromey.com>
13099
13100         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13101         (struct dwo_file_deleter): New.
13102         (dwo_file_up): New typedef.
13103         (open_and_init_dwo_file): Use dwo_file_up.
13104         (free_dwo_file_cleanup): Remove.
13105
13106 2018-03-30  Tom Tromey  <tom@tromey.com>
13107
13108         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13109         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13110
13111 2018-03-30  Tom Tromey  <tom@tromey.com>
13112
13113         * dwarf2read.c (class free_cached_comp_units): New class.
13114         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13115         (free_cached_comp_units): Remove function.
13116
13117 2018-03-30  Tom Tromey  <tom@tromey.com>
13118
13119         * utils.h (make_cleanup_unpush_target): Remove.
13120         * inf-ptrace.c (struct target_unpusher): New.
13121         (target_unpush_up) New typedef.
13122         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13123         target_unpush_up.
13124         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13125
13126 2018-03-27  Tom Tromey  <tom@tromey.com>
13127
13128         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13129
13130 2018-03-27  Pedro Alves  <palves@redhat.com>
13131             Tom Tromey  <tom@tromey.com>
13132
13133         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13134         destructor.  Now a class.
13135         (gdb_readline_wrapper_cleanup): Remove function.
13136         (gdb_readline_wrapper): Remove cleanups.
13137
13138 2018-03-27  Tom Tromey  <tom@tromey.com>
13139
13140         * typeprint.h (struct type_print_options) <local_typedefs,
13141         global_typedefs>: Remove "struct" keyword.
13142         (class typedef_hash_table): New class.
13143         (recursively_update_typedef_hash, add_template_parameters)
13144         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13145         (find_typedef_in_hash): Don't declare.
13146         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13147         (typedef_hash_table::recursively_update): Rename from
13148         recursively_update_typedef_hash.  Now a member.
13149         (typedef_hash_table::add_template_parameters): Rename from
13150         add_template_parameters.  Now a member.
13151         (typedef_hash_table::typedef_hash_table): Now a constructor;
13152         rename from create_typedef_hash.
13153         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13154         rename from free_typedef_hash.
13155         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13156         (do_free_global_table): Remove.
13157         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13158         from copy_type_recursive.
13159         (create_global_typedef_table): Remove.
13160         (typedef_hash_table::find_global_typedef): Now a member of
13161         typedef_hash_table.
13162         (typedef_hash_table::find_typedef): Rename from
13163         find_typedef_in_hash; now a member.
13164         (whatis_exp): Update.
13165         * extension.h (struct ext_lang_type_printers): Add constructor and
13166         destructor.
13167         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13168         declare.
13169         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13170         Now a constructor; rename from start_ext_lang_type_printers.
13171         (ext_lang_type_printers): Now a destructor; rename from
13172         free_ext_lang_type_printers.
13173         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13174         Update.
13175         (c_type_print_base_struct_union): Update.  Remove cleanups.
13176
13177 2018-03-27  Tom Tromey  <tom@tromey.com>
13178
13179         * dwarf-index-write.c: Include <cmath>.
13180
13181 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13182
13183         * NEWS: Add entry describing new "set|show varsize-limit" command.
13184         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13185         command.
13186         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13187         "set variable".
13188
13189 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13190
13191         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13192         dwarf-index-write.c
13193         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13194         * dwarf-index-common.c: New file.
13195         * dwarf-index-common.h: New file.
13196         * dwarf-index-write.c: New file.
13197         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13198         (struct dwarf2_section_info): Move from here.
13199         (dwarf2_section_info_def): Likewise.
13200         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13201         (offset_type): Likewise.
13202         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13203         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13204         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13205         (byte_swap): Likewise.
13206         (MAYBE_SWAP): Likewise.
13207         (dwarf2_per_cu_ptr): Likewise.
13208         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13209         (struct tu_stats): Likewise.
13210         (struct dwarf2_per_objfile): Likewise.
13211         (struct dwarf2_per_cu_data): Likewise.
13212         (struct signatured_type): Likewise.
13213         (sig_type_ptr): Likewise.
13214         (DEF_VEC_P (sig_type_ptr)): Likewise.
13215         (INDEX4_SUFFIX): Likewise.
13216         (INDEX5_SUFFIX): Likewise.
13217         (DEBUG_STR_SUFFIX): Likewise.
13218         (dwarf2_read_section): Make non-static.
13219         (mapped_index_string_hash): Move from here.
13220         (dwarf5_djb_hash): Likewise.
13221         (file_write): Likewise.
13222         (class data_buf): Likewise.
13223         (struct symtab_index_entry): Likewise.
13224         (struct mapped_symtab): Likewise.
13225         (find_slot): Likewise.
13226         (hash_expand): Likewise.
13227         (add_index_entry): Likewise.
13228         (uniquify_cu_indices): Likewise.
13229         (class c_str_view): Likewise.
13230         (class c_str_view_hasher): Likewise.
13231         (class vector_hasher): Likewise.
13232         (write_hash_table): Likewise.
13233         (psym_index_map): Likewise.
13234         (struct addrmap_index_data): Likewise.
13235         (add_address_entry): Likewise.
13236         (add_address_entry_worker): Likewise.
13237         (write_address_map): Likewise.
13238         (symbol_kind): Likewise.
13239         (write_psymbols): Likewise.
13240         (struct signatured_type_index_data): Likewise.
13241         (write_one_signatured_type): Likewise.
13242         (recursively_count_psymbols): Likewise.
13243         (recursively_write_psymbols): Likewise.
13244         (class debug_names): Likewise.
13245         (check_dwarf64_offsets): Likewise.
13246         (psyms_seen_size): Likewise.
13247         (write_gdbindex): Likewise.
13248         (write_debug_names): Likewise.
13249         (assert_file_size): Likewise.
13250         (write_psymtabs_to_index): Likewise.
13251         (save_gdb_index_command): Likewise.
13252         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13253         command.
13254         * dwarf2read.h: New file.
13255
13256 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13257
13258         PR gdb/22670
13259         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13260         symbol name if the CU's language stores symbol names in linkage
13261         format.
13262         * language.h (struct language_defn)
13263         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13264         all instances of this struct.
13265
13266 2018-03-26  Tom Tromey  <tom@tromey.com>
13267
13268         * stack.c (backtrace_command_1): Remove verbose code.
13269
13270 2018-03-26  Tom Tromey  <tom@tromey.com>
13271
13272         * python/py-framefilter.c (py_print_type): Don't catch
13273         exceptions.  Return void.
13274         (py_print_value): Likewise.
13275         (py_print_single_arg): Likewise.
13276         (enumerate_args): Don't catch exceptions.
13277         (py_print_args): Likewise.
13278         (py_print_frame): Likewise.
13279         (gdbpy_apply_frame_filter): Catch exceptions here.
13280
13281 2018-03-26  Tom Tromey  <tom@tromey.com>
13282
13283         * stack.c (_initialize_stack): Remove trailing newlines from help
13284         text.  Add "Usage" line to "backtrace" help.
13285
13286 2018-03-26  Tom Tromey  <tom@tromey.com>
13287
13288         PR python/16486:
13289         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13290
13291 2018-03-26  Tom Tromey  <tom@tromey.com>
13292
13293         * python/py-framefilter.c (py_print_single_arg): Return
13294         EXT_LANG_BT_ERROR from catch.
13295
13296 2018-03-26  Tom Tromey  <tom@tromey.com>
13297
13298         PR backtrace/15584:
13299         * stack.c (backtrace_command_1): Move some code into no-filters
13300         "if".
13301
13302 2018-03-26  Tom Tromey  <tom@tromey.com>
13303
13304         * python/py-framefilter.c (throw_quit_or_print_exception): New
13305         function.
13306         (gdbpy_apply_frame_filter): Use it.
13307
13308 2018-03-26  Tom Tromey  <tom@tromey.com>
13309
13310         PR cli/17716:
13311         * python/py-framefilter.c (py_print_type, py_print_value)
13312         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13313         RETURN_MASK_ERROR.
13314
13315 2018-03-26  Tom Tromey  <tom@tromey.com>
13316
13317         * python/py-framefilter.c (enumerate_args): Use
13318         gdb::unique_xmalloc_ptr.
13319
13320 2018-03-26  Tom Tromey  <tom@tromey.com>
13321
13322         * python/py-framefilter.c (py_print_frame): Return
13323         EXT_LANG_BT_OK.
13324         (gdbpy_apply_frame_filter): Update comment.
13325         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13326         Remove.
13327         <EXT_LANG_BT_NO_FILTERS>: Change value.
13328
13329 2018-03-26  Tom Tromey  <tom@tromey.com>
13330
13331         PR backtrace/15582:
13332         * stack.c (backtrace_command): Parse "hide" argument.
13333         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13334         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13335         constant.
13336
13337 2018-03-26  Tom Tromey  <tom@tromey.com>
13338
13339         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13340         add "flags".
13341         (backtrace_command): Remove "fulltrace", add "flags".
13342
13343 2018-03-26  Tom Tromey  <tom@tromey.com>
13344
13345         * stack.c (backtrace_command): Rewrite command line parsing.
13346
13347 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13348
13349         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13350
13351 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13352
13353         * filename-seen-cache.h: Add include guard.
13354
13355 2018-03-26  Keith Seitz  <keiths@redhat.com>
13356
13357         * symfile.c (place_section): Remove "struct" from section_addr_info
13358         in comment.
13359         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13360         "struct" keyword from section_addr_info.
13361
13362 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13363
13364         * regformats/regdef.h (reg): Add constructors.
13365
13366 2018-03-25  Pedro Alves  <palves@redhat.com>
13367
13368         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13369         if then/else bodies in var_func_name extraction.
13370
13371 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13372
13373         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13374         lookup_minimal_symbol() to find symbol entry.
13375         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13376
13377 2018-03-23  Keith Seitz  <keiths@redhat.com>
13378
13379         PR c++/22968
13380         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13381         nested type definitions for C++, too.
13382
13383 2018-03-23  Tom Tromey  <tom@tromey.com>
13384
13385         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13386         a typedef.
13387         (macho_register_oso): Remove.
13388         (macho_symtab_read): Take a std::vector.
13389         (oso_el_compare_name): Now a std::sort comparator.
13390         (macho_symfile_read_all_oso): Take a std::vector.
13391         (macho_symfile_read): Use std::vector.  Remove cleanups.
13392
13393 2018-03-22  Tom Tromey  <tom@tromey.com>
13394
13395         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13396         (record_full_goto_bookmark): Use std::string.
13397
13398 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13399
13400         PR tdep/18295
13401         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13402         a single mask.
13403
13404 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13405
13406         * rs6000-tdep.c (store_insn_p): New function.
13407         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13408         and cr_reg to their unshifted values. Use store_insn_p to
13409         match LR saves using either R1 or fdata->alloca_reg. Use
13410         store_insn_p to match CR saves. Set alloca_reg_offset
13411         when alloca_reg and framep are set. Remove lr_reg shift
13412         when assigning to fdata->lr_register.
13413
13414 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13415
13416         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13417         command line args instead of emitting a warning.
13418
13419 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13420
13421         * tracepoint.h (struct static_tracepoint_marker): Initialize
13422         fields, define default constructor, move constructor and move
13423         assignment, disable the rest.
13424         <str_id, extra>: Make std::string.
13425         (release_static_tracepoint_marker): Remove.
13426         (free_current_marker): Remove.
13427         * tracepoint.c (free_current_marker): Remove.
13428         (parse_static_tracepoint_marker_definition): Adjust to
13429         std::string, use new hex2str overload.
13430         (release_static_tracepoint_marker): Remove.
13431         (print_one_static_tracepoint_marker): Get marker by reference
13432         and adjust to std::string.
13433         (info_static_tracepoint_markers_command): Adjust to std::vector
13434         changes
13435         * target.h (static_tracepoint_marker_p): Remove typedef.
13436         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13437         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13438         bool.
13439         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13440         * target-debug.h
13441         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13442         (target_debug_print_std_vector_static_tracepoint_marker): New.
13443         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13444         to...
13445         (target_debug_print_static_tracepoint_marker_p): ... this.
13446         * target-delegates.c: Re-generate.
13447         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13448         Make std::string.
13449         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13450         (decode_static_tracepoint_spec): Adjust to std::vector.
13451         (tracepoint_print_one_detail): Adjust to std::string.
13452         (strace_marker_decode_location): Adjust to std::string.
13453         (update_static_tracepoint): Adjust to std::string, remove call
13454         to release_static_tracepoint_marker.
13455         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13456         Adjust to std::vector.
13457         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13458         (remote_static_tracepoint_markers_by_strid): Adjust to
13459         std::vector.
13460         * common/rsp-low.h (hex2str): New overload with explicit count
13461         of bytes.
13462         * common/rsp-low.c (hex2str): New overload with explicit count
13463         of bytes.
13464         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13465         (_initialize_rsp_low_selftests): Add test_hex2str test.
13466         * unittests/tracepoint-selftests.c
13467         (test_parse_static_tracepoint_marker_definition): Adjust to
13468         std::string.
13469
13470 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13471
13472         * tracepoint.c (parse_static_tracepoint_marker_definition):
13473         Consider case where the definition is followed by more
13474         definitions.
13475         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13476         tracepoint-selftests.c.
13477         * unittests/tracepoint-selftests.c: New.
13478
13479 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13480
13481         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13482         Carvalho.
13483
13484 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13485
13486         * symtab.c (find_pc_sect_line): fixed indentation.
13487
13488 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13489
13490         * symtab.c (find_pc_sect_line): now uses binary search.
13491
13492 2018-03-19  Tom Tromey  <tom@tromey.com>
13493
13494         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13495         "IDENT" production.
13496
13497 2018-03-19  Pedro Alves  <palves@redhat.com>
13498             Tom Tromey  <tom@tromey.com>
13499
13500         * unittests/observable-selftests.c: New file.
13501         * common/observable.h: New file.
13502         * observable.h: New file.
13503         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13504         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13505         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13506         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13507         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13508         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13509         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13510         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13511         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13512         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13513         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13514         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13515         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13516         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13517         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13518         tui/tui-interp.c, valops.c: Update all users.
13519         * tui/tui-hooks.c (tui_bp_created_observer)
13520         (tui_bp_deleted_observer, tui_bp_modified_observer)
13521         (tui_inferior_exit_observer, tui_before_prompt_observer)
13522         (tui_normal_stop_observer, tui_register_changed_observer):
13523         Remove.
13524         (tui_observers_token): New global.
13525         (attach_or_detach, tui_attach_detach_observers): New functions.
13526         (tui_install_hooks, tui_remove_hooks): Use
13527         tui_attach_detach_observers.
13528         * record-btrace.c (record_btrace_thread_observer): Remove.
13529         (record_btrace_thread_observer_token): New global.
13530         * observer.sh: Remove.
13531         * observer.c: Rename to observable.c.
13532         * observable.c (namespace gdb_observers): Define new objects.
13533         (observer_debug): Move into gdb_observers namespace.
13534         (struct observer, struct observer_list, xalloc_observer_list_node)
13535         (xfree_observer_list_node, generic_observer_attach)
13536         (generic_observer_detach, generic_observer_notify): Remove.
13537         (_initialize_observer): Update.
13538         Don't include observer.inc.
13539         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13540         (clean mostlyclean): Likewise.
13541         (observer.h, observer.inc): Remove targets.
13542         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13543         (COMMON_SFILES): Use observable.c, not observer.c.
13544         * .gitignore: Remove observer.h.
13545
13546 2018-03-18  Tom Tromey  <tom@tromey.com>
13547
13548         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13549         gdb::def_vector.
13550         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13551
13552 2018-03-17  Tom Tromey  <tom@tromey.com>
13553
13554         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13555
13556 2018-03-17  Tom Tromey  <tom@tromey.com>
13557
13558         * target.c (class scoped_target_fd): New.
13559         (target_fileio_close_cleanup): Remove.
13560         (target_fileio_read_alloc_1): Use scoped_target_fd.
13561
13562 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13563
13564         * silent-rules.mk: New.
13565         * Makefile.in: Include silent-rules.mk
13566         (srcdir, VPATH, top_srcdir): Move up.
13567         (COMPILE): Add ECHO_CXX.
13568         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13569         (init.c): Add ECHO_INIT_C.
13570         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13571         (version.c): Add ECHO_GEN.
13572         (printcmd.o): Add ECHO_CXX.
13573         (target-float.o): Add ECHO_CXX.
13574         (ada-exp.o): Add ECHO_CXX.
13575         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13576         (insight$(EXEEXT)): Add ECHO_CXXLD.
13577         * gnulib/configure.ac: Add AM_SILENT_RULES.
13578         * gnulib/aclocal.m4: Re-generate.
13579         * gnulib/configure: Re-generate.
13580         * gnulib/import/Makefile.in: Re-generate.
13581
13582 2018-03-16  Tom Tromey  <tom@tromey.com>
13583
13584         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13585         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13586         * utils.c (do_free_section_addr_info)
13587         (make_cleanup_free_section_addr_info): Remove.
13588         * symfile.h (struct other_sections): Add constructor.
13589         (struct section_addr_info): Remove.
13590         (section_addr_info): New typedef.
13591         (struct sym_fns) <sym_offsets>: Change type of parameter.
13592         (build_section_addr_info_from_objfile)
13593         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13594         (default_symfile_offsets, symbol_file_add)
13595         (symbol_file_add_from_bfd)
13596         (build_section_addr_info_from_section_table): Update.
13597         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13598         * symfile.c (alloc_section_addr_info): Remove.
13599         (build_section_addr_info_from_section_table): Change return type.
13600         Update.
13601         (build_section_addr_info_from_bfd)
13602         (build_section_addr_info_from_objfile): Likewise.
13603         (free_section_addr_info): Remove.
13604         (relative_addr_info_to_section_offsets): Change type of "addrs".
13605         (addrs_section_compar): Now a std::sort comparator.
13606         (addrs_section_sort): Change return type.
13607         (addr_info_make_relative): Change type of "addrs".  Update.
13608         (default_symfile_offsets, syms_from_objfile_1)
13609         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13610         (symbol_file_add_separate): Update.
13611         (symbol_file_add): Change type of "addrs".  Update.
13612         (add_symbol_file_command): Update.  Remove cleanups.
13613         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13614         cleanups.
13615         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13616         * solib.c (solib_read_symbols): Update.
13617         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13618         * machoread.c (macho_symfile_offsets): Update.
13619         * jit.c (jit_bfd_try_read_symtab): Update.
13620
13621 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13622
13623         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13624         unittests/utils-selftests.c.
13625         * unittests/utils-selftests.c: New file.
13626
13627 2018-03-14  Tom Tromey  <tom@tromey.com>
13628
13629         PR cli/14977:
13630         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13631         for NULL.
13632
13633 2018-03-14  Tom Tromey  <tom@tromey.com>
13634
13635         PR cli/19918:
13636         * printcmd.c (printf_pointer): Allow "-" in format.
13637
13638 2018-03-14  Tom Tromey  <tom@tromey.com>
13639
13640         * printcmd.c (_initialize_printcmd): Add usage to printf.
13641
13642 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13643
13644         * MAINTAINERS: Update my email address.
13645
13646 2018-03-13  Tom Tromey  <tom@tromey.com>
13647
13648         * machoread.c (macho_check_dsym): Change filenamep to a
13649         std::string*.
13650         (macho_symfile_read): Update.
13651         * symfile.c (load_command): Use std::string.
13652
13653 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13654
13655         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13656         to error message string.
13657         (riscv_register_name): Use xsnprintf instead of sprintf.
13658         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13659         internal_error.
13660         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13661         error.
13662         (riscv_push_dummy_call): Likewise.
13663
13664 2018-03-12  Tom Tromey  <tom@tromey.com>
13665
13666         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13667         Use gdb::byte_vector.
13668         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13669
13670 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13671
13672         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13673         parameter type to readable_regcache.
13674         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13675         the declaration.
13676
13677 2018-03-11  Tom Tromey  <tom@tromey.com>
13678
13679         * dwarf2read.c (struct nextfield): Add initializers.
13680         (struct nextfnfield): Remove.
13681         (struct fnfieldlist): Add initializers.  Remove "length" and
13682         "head", use std::vector.
13683         (struct decl_field_list): Remove.
13684         (struct field_info): Add initializers.
13685         <fields, baseclasses>: Now std::vector.
13686         <nbaseclasses, nfnfields, typedef_field_list_count,
13687         nested_types_list_count>: Remove.
13688         (dwarf2_add_field, dwarf2_add_type_defn)
13689         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13690         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13691         (process_structure_scope): Update.
13692
13693 2018-03-11  Tom Tromey  <tom@tromey.com>
13694
13695         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13696         for use by std::sort.
13697         (build_type_psymtabs_1): Use std::vector.
13698
13699 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13700
13701         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13702         and LIBMPFR in the printed configuration.
13703
13704 2018-03-08  Tom Tromey  <tom@tromey.com>
13705
13706         * source.c (get_filename_and_charpos): Use scoped_fd.
13707         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13708         (procfs_pidlist): Likewise.
13709         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13710         (iterate_over_mappings): Likewise.
13711
13712 2018-03-08  Tom Tromey  <tom@tromey.com>
13713
13714         * infcall.c (struct call_return_meta_info)
13715         <stack_temporaries_enabled>: Remove.
13716         (get_call_return_value, call_function_by_hand_dummy): Update.
13717         * thread.c (disable_thread_stack_temporaries): Remove.
13718         (enable_thread_stack_temporaries): Remove.
13719         (thread_stack_temporaries_enabled_p): Return bool.
13720         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13721         (get_last_thread_stack_temporary): Update.
13722         * eval.c (evaluate_subexp): Update.
13723         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13724         class, not a function.
13725         (value_ptr, value_vec): Remove typedefs.
13726         (class thread_info) <stack_temporaries_enabled>: Now bool.
13727         <stack_temporaries>: Now a std::vector.
13728         (thread_stack_temporaries_enabled_p)
13729         (value_in_thread_stack_temporaries): Return bool.
13730
13731 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13732
13733         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13734         (getpkt_or_notif_sane_1): Likewise.
13735
13736 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13737
13738         * build-id.c (build_id_to_debug_bfd): Use std::string.
13739
13740 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13741
13742         * build-id.c (find_separate_debug_file_by_buildid): Return
13743         std::string.
13744         * build-id.h (find_separate_debug_file_by_buildid): Return
13745         std::string.
13746         * coffread.c (coff_symfile_read): Adjust to std::string.
13747         * elfread.c (elf_symfile_read): Adjust to std::string.
13748         * symfile.c (separate_debug_file_exists): Change parameter to
13749         std::string.
13750         (find_separate_debug_file): Return std::string.
13751         (find_separate_debug_file_by_debuglink): Return std::string.
13752         * symfile.h (find_separate_debug_file_by_debuglink): Return
13753         std::string.
13754
13755 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13756
13757         * common/xml-utils.c (xml_escape_text): Move code to...
13758         (xml_escape_text_append): ... this new function.
13759         * common/xml-utils.h (xml_escape_text_append): New declaration.
13760         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13761         New function.
13762         (_initialize_xml_utils): register test_xml_escape_text_append as
13763         a selftest.
13764
13765 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13766
13767         * defs.h: Remove MAX_REGISTER_SIZE.
13768         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13769         asserts.
13770         * python/py-unwind.c (pyuw_sniffer): Likewise.
13771
13772 2018-03-07  Tom Tromey  <tom@tromey.com>
13773
13774         * linux-tdep.c (linux_info_proc): Update.
13775         * target.h (struct target_ops) <to_fileio_readlink>: Return
13776         optional<string>.
13777         (target_fileio_readlink): Return optional<string>.
13778         * remote.c (remote_hostio_readlink): Return optional<string>.
13779         * inf-child.c (inf_child_fileio_readlink): Return
13780         optional<string>.
13781         * target.c (target_fileio_readlink): Return optional<string>.
13782
13783 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13784
13785         * regcache.c (cooked_read_test): Add riscv to the list of
13786         architectures that have a save_reggroup.
13787
13788 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13789
13790         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13791         value is not a dynamic class object.
13792
13793 2018-03-06  Tom Tromey  <tom@tromey.com>
13794
13795         * rust-exp.y: Formatting fixes.
13796
13797 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13798
13799         * riscv-tdep.c (riscv_register_name): Remove target description
13800         support.
13801         (riscv_gdbarch_init): Remove target description check.
13802
13803 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13804
13805         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13806         comment.
13807         * riscv-tdep.h: Likewise.
13808
13809 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13810
13811         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13812         (riscv_pseudo_register_write): Delete.
13813         (riscv_gdbarch_init): Remove all use of pseudo registers.
13814
13815 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13816
13817         * record-btrace.c (btrace_print_lines): Replace cleanup
13818         parameter with RAII equivalents.
13819         (btrace_insn_history): Replace cleanup with RAII equivalents.
13820         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13821         make_cleanup_ui_out_tuple_begin_end): Remove.
13822         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13823         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13824         make_cleanup_ui_out_list_begin_end): Remove.
13825
13826 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13827
13828         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13829         parameter types to std::vector.  Use bool.
13830         (record_btrace_wait): Replace VEC(tp_t) with
13831         std::vector<thread_info *>.
13832         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13833
13834 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13835
13836         * record-btrace.c (record_btrace_disable_callback): Remove.
13837         (struct scoped_btrace_disable): New.
13838         (record_btrace_open): Use scoped_btrace_disable.
13839
13840 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13841
13842         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13843         reading values from registers.
13844
13845 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13846
13847         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13848         where appropriate.
13849
13850 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13851
13852         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13853         change parameter type.  Use GDB's print functions, and use
13854         core_addr_to_string where appropriate.
13855         (riscv_push_dummy_call): Use core_addr_to_string where
13856         appropriate, update call to riscv_print_arg_location, and reindent
13857         a few lines.
13858         (riscv_return_value): Update call to riscv_print_arg_location.
13859
13860 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13861             Tim Newsome <tim@sifive.com>
13862             Albert Ou <a0u@eecs.berkeley.edu>
13863             Darius Rad <darius@bluespec.com>
13864
13865         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13866         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13867         (ALLDEPFILES): Add riscv-tdep.c
13868         * configure.tgt: Add riscv support.
13869         * riscv-tdep.c: New file.
13870         * riscv-tdep.h: New file.
13871         * NEWS: Mention new target.
13872         * MAINTAINERS: Add entry for riscv.
13873
13874 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13875
13876         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13877         fields within aggregates.
13878
13879 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13880
13881         * record-btrace.c (btrace_print_lines): Change type of flags to
13882         gdb_disassembly_flags.
13883
13884 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13885
13886         * fbsd-nat.c: Include "inf-ptrace.h".
13887         (USE_SIGTRAP_SIGINFO): Conditionally define.
13888         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13889         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13890         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13891         function.
13892         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13893         Likewise.
13894         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13895         Likewise.
13896         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13897         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13898         "supports_stopped_by_hw_breakpoint" target methods.
13899
13900 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13901
13902         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13903         * fbsd-nat.c (debug_fbsd_nat): New variable.
13904         (show_fbsd_nat_debug): New function.
13905         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13906         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13907
13908 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13909
13910         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13911         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13912         prototype.
13913         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13914         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13915         method.
13916
13917 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13918
13919         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13920         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13921
13922 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13923
13924         * charset.c (struct charset_vector): New.
13925         (charsets): Change type to charset_vector.
13926         (find_charset_names): Adjust.
13927         (add_one): Adjust.
13928         (_initialize_charset): Adjust.
13929
13930 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13931
13932         * progspace.h (struct program_space) <deleted_solibs>: Change
13933         type to std::vector<std::string>.
13934         * progspace.c (clear_program_space_solib_cache): Adjust.
13935         * breakpoint.c (print_solib_event): Adjust.
13936         (check_status_catch_solib): Adjust.
13937         * solib.c (update_solib_list): Adjust.
13938         * ui-out.h (class ui_out) <field_string>: New overload.
13939         * ui-out.c (ui_out::field_string): New overload.
13940
13941 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13942
13943         * progspace.h (struct program_space): Add constructor and
13944         destructor, initialize fields.
13945         (add_program_space): Remove.
13946         * progspace.c (add_program_space): Rename to...
13947         (program_space::program_space): ... this.
13948         (release_program_space): Rename to...
13949         (program_space::~program_space): ... this.
13950         (delete_program_space): Use delete to delete program_space.
13951         (initialize_progspace): Use new to allocate program_space.
13952         * inferior.c (add_inferior_with_spaces): Likewise.
13953         (clone_inferior_command): Likewise.
13954         * infrun.c (follow_fork_inferior): Likewise.
13955         (handle_vfork_child_exec_or_exit): Likewise.
13956
13957 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13958
13959         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13960         (delim_string_to_char_ptr_vec): Return std::vector of
13961         gdb::unique_xmalloc_ptr.
13962         (dirnames_to_char_ptr_vec_append): Take std::vector of
13963         gdb::unique_xmalloc_ptr.
13964         (dirnames_to_char_ptr_vec): Return std::vector of
13965         gdb::unique_xmalloc_ptr.
13966         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13967         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13968         (delim_string_to_char_ptr_vec): Return an std::vector of
13969         gdb::unique_xmalloc_ptr, adjust the code.
13970         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13971         gdb::unique_xmalloc_ptr, adjust the code.
13972         (dirnames_to_char_ptr_vec): Return an std::vector of
13973         gdb::unique_xmalloc_ptr, adjust the code.
13974         * auto-load.c (auto_load_safe_path_vec): Change type to
13975         std::vector of gdb::unique_xmalloc_ptr.
13976         (auto_load_expand_dir_vars): Return an std::vector of
13977         gdb::unique_xmalloc_ptr, adjust the code.
13978         (auto_load_safe_path_vec_update): Adjust.
13979         (filename_is_in_auto_load_safe_path_vec): Adjust.
13980         (auto_load_objfile_script_1): Adjust.
13981         * build-id.c (build_id_to_debug_bfd): Adjust.
13982         * linux-thread-db.c (thread_db_load_search): Adjust.
13983         * source.c (add_path): Adjust.
13984         (openp): Adjust.
13985         * symfile.c (find_separate_debug_file): Adjust.
13986         * utils.c (do_free_char_ptr_vec): Remove.
13987         (make_cleanup_free_char_ptr_vec): Remove.
13988
13989 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13990
13991         PR gdb/22907
13992         * common/pathstuff.c: Conditionally include "<windows.h>".
13993
13994 2018-03-01  Georg Sauthoff  <mail@georg.so>
13995
13996         PR gdb/22888
13997         * gcore.in: Quote variables and switch interpreter to bash.
13998
13999 2018-03-01  Tom Tromey  <tom@tromey.com>
14000
14001         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14002         assertion.  Add assertion for discriminant_index.
14003         (quirk_rust_enum): Use correct base type name in univariant case.
14004
14005 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14006
14007         * record.c (get_call_history_modifiers): Return a
14008         record_print_flags.
14009         (cmd_record_call_history): Adjust.
14010         * record-btrace.c (record_btrace_call_history): Adjust.
14011         (record_btrace_call_history_range): Adjust.
14012         (record_btrace_call_history_from): Adjust.
14013         * target-debug.h (target_debug_print_record_print_flags): New.
14014         * target-delegates.c: Re-generate.
14015         * target.c (target_call_history): Change flags type.
14016         (target_call_history_from): Likewise.
14017         (target_call_history_range): Likewise.
14018         * target.h (struct target_ops) <target_call_history>: Likewise.
14019         (target_call_history_from): Likewise.
14020         (target_call_history_range): Likewise.
14021
14022 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14023             Simon Marchi  <simon.marchi@polymtl.ca>
14024
14025         * common/common-utils.c: Include "sys/stat.h".
14026         (is_regular_file): Move here from "source.c"; change return
14027         type to "bool".
14028         * common/common-utils.h (is_regular_file): New prototype.
14029         * common/pathstuff.c (contains_dir_separator): New function.
14030         * common/pathstuff.h (contains_dir_separator): New prototype.
14031         * source.c: Don't include "sys/stat.h".
14032         (is_regular_file): Move to "common/common-utils.c".
14033
14034 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14035
14036         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14037         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14038         * auto-load.c: Include "common/pathstuff.h".
14039         * common/common-def.h (current_directory): Move here.
14040         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14041         function.
14042         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14043         prototype.
14044         * common/pathstuff.c: New file.
14045         * common/pathstuff.h: New file.
14046         * compile/compile.c: Include "common/pathstuff.h".
14047         * defs.h (current_directory): Move to "common/common-defs.h".
14048         * dwarf2read.c: Include "common/pathstuff.h".
14049         * exec.c: Likewise.
14050         * guile/scm-safe-call.c: Likewise.
14051         * linux-thread-db.c: Likewise.
14052         * main.c: Likewise.
14053         * nto-tdep.c: Likewise.
14054         * objfiles.c: Likewise.
14055         * source.c: Likewise.
14056         * symtab.c: Likewise.
14057         * utils.c: Include "common/pathstuff.h".
14058         (gdb_realpath): Move to "common/pathstuff.c".
14059         (gdb_realpath_keepfile): Likewise.
14060         (gdb_abspath): Likewise.
14061         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14062         (gdb_realpath_keepfile): Likewise.
14063         (gdb_abspath): Likewise.
14064
14065 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14066
14067         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14068         wildcard process pid for super_resume for kernels with a
14069         specific bug.
14070
14071 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14072
14073         * compile/compile.c (get_args): Add additional comments
14074         explaining function.
14075
14076 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14077             Tom Tromey  <tom@tromey.com>
14078
14079         * target.h (memory_write_request_s): Remove typedef.  Don't define
14080         VEC.
14081         (target_write_memory_blocks): Change argument to std::vector.
14082         (struct memory_write_request): Add constructor.
14083         * target-memory.c (compare_block_starting_address): Return bool.
14084         Change argument types.
14085         (claim_memory): Change arguments to use std::vector.
14086         (split_regular_and_flash_blocks, blocks_to_erase)
14087         (compute_garbled_blocks): Likewise.
14088         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14089         (target_write_memory_blocks): Change argument to std::vector.
14090         * symfile.c (struct load_section_data): Add constructor and
14091         destructor.  Use std::vector for "requests".
14092         (struct load_progress_data): Add initializers.
14093         (load_section_callback): Update.  Use "new".
14094         (clear_memory_write_data): Remove.
14095         (generic_load): Update.
14096
14097 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14098
14099         * arch/aarch64.h: Use common/tdesc.h.
14100
14101 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14102
14103         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14104         architecture with a 64-bit ABI.
14105
14106 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14107
14108         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14109         ahead of target description loading.
14110
14111 2018-02-26  Tom Tromey  <tom@tromey.com>
14112
14113         * stack.c (backtrace_command_1): Update.
14114         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14115         of "flags".
14116         * python/py-framefilter.c (py_print_frame)
14117         (gdbpy_apply_frame_filter): Change type of "flags".
14118         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14119         of "flags".
14120         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14121         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14122         * extension.h (enum frame_filter_flag): Rename from
14123         frame_filter_flags.
14124         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14125         (apply_ext_lang_frame_filter): Change type of "flags".
14126         * extension.c (apply_ext_lang_frame_filter): Change type of
14127         "flags".
14128         * extension-priv.h (struct extension_language_ops)
14129         <apply_frame_filter>: Change type of "flags".
14130
14131 2018-02-26  Tom Tromey  <tom@tromey.com>
14132
14133         PR python/16497:
14134         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14135         off-by-one in py_end computation.
14136         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14137         PRINT_MORE_FRAMES.
14138         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14139         constant.
14140
14141 2018-02-26  Tom Tromey  <tom@tromey.com>
14142
14143         * dwarf2read.c (struct variant_field): New.
14144         (struct nextfield) <variant>: New field.
14145         (dwarf2_add_field): Handle DW_TAG_variant_part.
14146         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14147         discriminated union.
14148         (read_structure_type): Handle DW_TAG_variant_part.
14149         (handle_struct_member_die): New function, extracted from
14150         process_structure_scope.  Handle DW_TAG_variant.
14151         (process_structure_scope): Handle discriminated unions.  Call
14152         handle_struct_member_die.
14153
14154 2018-02-26  Tom Tromey  <tom@tromey.com>
14155
14156         * rust-lang.h (rust_last_path_segment): Declare.
14157         * rust-lang.c (rust_last_path_segment): Now public.  Change
14158         contract.
14159         (struct disr_info): Remove.
14160         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14161         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14162         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14163         (rust_enum_p, rust_enum_variant): New function.
14164         (rust_underscore_fields): Remove "offset" parameter.
14165         (rust_print_enum): New function.
14166         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14167         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14168         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14169         enums.
14170         (rust_internal_print_type): New function, from rust_print_type.
14171         Remove enum code.
14172         (rust_print_type): Call rust_internal_print_type.
14173         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14174         Update enum handling.
14175         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14176         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14177         (rust_union_quirks): New functions.
14178         (process_full_comp_unit, process_full_type_unit): Call
14179         rust_union_quirks.
14180         (process_structure_scope): Update rust_unions if necessary.
14181
14182 2018-02-26  Tom Tromey  <tom@tromey.com>
14183
14184         * value.h (value_union_variant): Declare.
14185         * valops.c (value_union_variant): New function.
14186         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14187         (struct discriminant_info): New.
14188         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14189         enumerator.
14190         (struct main_type) <flag_discriminated_union>: New field.
14191
14192 2018-02-26  Tom Tromey  <tom@tromey.com>
14193
14194         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14195         unittests/unpack-selftests.c.
14196         * unittests/unpack-selftests.c: New file.
14197         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14198
14199 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14200
14201         * dwarf2read.c (struct partial_die_info) <read>: New method.
14202         (read_partial_die): Remove the declaration.
14203         (load_partial_dies): Update.
14204         (partial_die_info::partial_die_info):
14205         (read_partial_die): Change it to partial_die_info::read.
14206
14207 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14208
14209         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14210         (fixup_partial_die): Remove declaration.
14211         (scan_partial_symbols): Update.
14212         (partial_die_parent_scope): Likewise.
14213         (partial_die_full_name): Likewise.
14214         (fixup_partial_die): Change it to partial_die_info::fixup.
14215
14216 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14217
14218         * dwarf2read.c (read_partial_die): Update the declaration.
14219         (load_partial_dies): Caller update.
14220         (read_partial_die): Remove one argument abbrev_len.
14221
14222 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14223
14224         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14225         assignment operator.
14226         (load_partial_dies): Use ctor and copy ctor.
14227         (read_partial_die): Update.
14228         (dwarf2_cu::find_partial_die): Use ctor.
14229
14230 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14231
14232         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14233         (find_partial_die_in_comp_unit): Change it to
14234         dwarf2_cu::find_partial_die.
14235         (find_partial_die): Update.
14236
14237 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14238
14239         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14240         is NULL.
14241
14242 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14243
14244         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14245
14246 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14247
14248         * arch/amd64.h: Use common/tdesc.h.
14249         * arch/i386.c: Likewise.
14250         * arch/i386.h: Likewise.
14251         * arch/tic6x.c: Likewise.
14252         * arch/tdesc.h: Move file from here...
14253         * common/tdesc.h: ...to here.
14254         * features/aarch64-core.c: Regenerate.
14255         * features/aarch64-fpu.c: Regenerate.
14256         * features/i386/32bit-avx.c: Regenerate.
14257         * features/i386/32bit-avx512.c: Regenerate.
14258         * features/i386/32bit-core.c: Regenerate.
14259         * features/i386/32bit-linux.c: Regenerate.
14260         * features/i386/32bit-mpx.c: Regenerate.
14261         * features/i386/32bit-pkeys.c: Regenerate.
14262         * features/i386/32bit-sse.c: Regenerate.
14263         * features/i386/64bit-avx.c: Regenerate.
14264         * features/i386/64bit-avx512.c: Regenerate.
14265         * features/i386/64bit-core.c: Regenerate.
14266         * features/i386/64bit-linux.c: Regenerate.
14267         * features/i386/64bit-mpx.c: Regenerate.
14268         * features/i386/64bit-pkeys.c: Regenerate.
14269         * features/i386/64bit-segments.c: Regenerate.
14270         * features/i386/64bit-sse.c: Regenerate.
14271         * features/i386/x32-core.c: Regenerate.
14272         * features/tic6x-c6xp.c: Regenerate.
14273         * features/tic6x-core.c: Regenerate.
14274         * features/tic6x-gp.c: Regenerate.
14275         * target-descriptions.c: Use common/tdesc.h.
14276         * target-descriptions.h: Likewise.
14277
14278 2018-02-24  Tom Tromey  <tom@tromey.com>
14279
14280         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14281         (try_thread_db_load_from_dir, thread_db_load_search): Use
14282         std::string.
14283         (info_auto_load_libthread_db_compare): Return bool.  Change
14284         argument types.
14285         (info_auto_load_libthread_db): Use std::vector, std::string.
14286         Remove cleanups.
14287
14288 2018-02-24  Tom Tromey  <tom@tromey.com>
14289
14290         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14291         std::string.
14292         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14293         std::string*.
14294         * gdbarch.c: Rebuild.
14295         * gdbarch.h: Rebuild.
14296         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14297         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14298         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14299         std::string*.
14300
14301 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14302
14303         * gdbtypes.h (sect_offset): Change type to uint64_t.
14304         (sect_offset_str): New function.
14305         * dwarf2read.c (create_addrmap_from_aranges): Use
14306         sect_offset_str.
14307         (error_check_comp_unit_head): Likewise.
14308         (create_debug_type_hash_table): Likewise.
14309         (read_cutu_die_from_dwo): Likewise.
14310         (init_cutu_and_read_dies): Likewise.
14311         (init_cutu_and_read_dies_no_follow): Likewise.
14312         (process_psymtab_comp_unit_reader): Likewise.
14313         (partial_die_parent_scope): Likewise.
14314         (peek_die_abbrev): Likewise.
14315         (process_queue): Likewise.
14316         (dwarf2_physname): Likewise.
14317         (read_namespace_alias): Likewise.
14318         (read_import_statement): Likewise.
14319         (create_dwo_cu_reader): Likewise.
14320         (create_cus_hash_table): Likewise.
14321         (lookup_dwo_cutu): Likewise.
14322         (inherit_abstract_dies): Likewise.
14323         (read_func_scope): Likewise.
14324         (read_call_site_scope): Likewise.
14325         (dwarf2_add_member_fn): Likewise.
14326         (read_common_block): Likewise.
14327         (read_module_type): Likewise.
14328         (read_typedef): Likewise.
14329         (read_subrange_type): Likewise.
14330         (load_partial_dies): Likewise.
14331         (read_partial_die): Likewise.
14332         (find_partial_die): Likewise.
14333         (read_str_index): Likewise.
14334         (dwarf2_string_attr): Likewise.
14335         (build_error_marker_type): Likewise.
14336         (lookup_die_type): Likewise.
14337         (dump_die_shallow): Likewise.
14338         (follow_die_ref): Likewise.
14339         (dwarf2_fetch_die_loc_sect_off): Likewise.
14340         (dwarf2_fetch_constant_bytes): Likewise.
14341         (follow_die_sig): Likewise.
14342         (get_signatured_type): Likewise.
14343         (get_DW_AT_signature_type): Likewise.
14344         (dwarf2_find_containing_comp_unit): Likewise.
14345         (set_die_type): Likewise.
14346
14347 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14348
14349         * arch/aarch64.c: Include "common-defs.h".
14350         * arch/amd64.c: Likewise.
14351         * arch/i386.c: Likewise.
14352
14353 2018-02-21  Tom Tromey  <tom@tromey.com>
14354
14355         * value.h: (extract_field_op): Update.
14356         * eval.c (extract_field_op): Return a const char *.
14357         * expression.h (parse_expression_for_completion): Update.
14358         * completer.c (complete_expression): Update.
14359         (add_struct_fields): Make fieldname const.
14360         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14361         (mark_completion_tag, parse_exp_in_context_1): Update.
14362         (parse_expression_for_completion): Change "name" to
14363         unique_xmalloc_ptr*.
14364
14365 2018-02-21  Tom Tromey  <tom@tromey.com>
14366
14367         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14368
14369 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14370
14371         * avr-tdep.c (avr_read_pc): Change parameter type to
14372         readable_regcache.
14373         * gdbarch.sh (read_pc): Likewise.
14374         * gdbarch.c: Re-generated.
14375         * gdbarch.h: Re-generated.
14376         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14377         readable_regcache.
14378         * ia64-tdep.c (ia64_read_pc): Likewise.
14379         * mips-tdep.c (mips_read_pc): Likewise.
14380         * spu-tdep.c (spu_read_pc): Likewise.
14381
14382 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14383
14384         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14385         * regcache-dump.c: New file.
14386         * regcache.c: Move register_dump to regcache-dump.c.
14387         (maintenance_print_registers): Likewise.
14388         (maintenance_print_raw_registers): Likewise.
14389         (maintenance_print_cooked_registers): Likewise.
14390         (maintenance_print_register_groups): Likewise.
14391         (maintenance_print_remote_registers): Likewise.
14392         (_initialize_regcache): Likewise.
14393         * regcache.h (register_dump): Moved from regcache.c.
14394
14395 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14396
14397         * regcache.c (regcache::regcache): Update.
14398         (regcache::invalidate): Move it to detached_regcache::invalidate.
14399         (get_thread_arch_aspace_regcache): Update.
14400         (regcache::raw_update): Update.
14401         (regcache::cooked_read): Remove some code.
14402         (regcache::cooked_read_value): Likewise.
14403         (regcache::raw_write): Remove assert on m_readonly_p.
14404         (regcache::raw_supply_integer): Move it to
14405         detached_regcache::raw_supply_integer.
14406         (regcache::raw_supply_zeroed): Likewise.
14407         * regcache.h (detached_regcache) <raw_supply_integer>: New
14408         declaration.
14409         <raw_supply_zeroed, invalidate>: Likewise.
14410         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14411         <invalidate>: Likewise.
14412         <m_readonly_p>: Removed.
14413
14414 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14415
14416         * infcmd.c (get_return_value): Let stop_regs point to
14417         get_current_regcache.
14418         * regcache.c (regcache::regcache): Remove.
14419         (register_dump_reg_buffer): New class.
14420         (regcache_print): Adjust.
14421         * regcache.h (regcache): Remove constructors.
14422
14423 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14424
14425         * regcache.c (class register_dump): New class.
14426         (register_dump_regcache, register_dump_none): New class.
14427         (register_dump_remote, register_dump_groups): New class.
14428         (regcache_print): Update.
14429         * regcache.h (regcache_dump_what): Move it to regcache.c.
14430         (regcache) <dump>: Remove.
14431
14432 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14433
14434         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14435          reg_buffer_rw *.
14436         (jit_unwind_reg_set_impl): Call raw_supply.
14437         (jit_frame_sniffer): Use reg_buffer_rw.
14438         * record-full.c (record_full_core_regbuf): Change its type.
14439         (record_full_core_open_1): Use reg_buffer_rw.
14440         (record_full_close): Likewise.
14441         (record_full_core_fetch_registers): Use regcache->raw_supply.
14442         (record_full_core_store_registers): Likewise.
14443         * regcache.c (regcache::get_register_status): Move it to
14444         reg_buffer.
14445         (regcache_raw_set_cached_value): Remove.
14446         (regcache::raw_set_cached_value): Remove.
14447         (regcache::raw_write): Call raw_supply.
14448         (regcache::raw_supply): Move it to reg_buffer_rw.
14449         * regcache.h (regcache_raw_set_cached_value): Remove.
14450         (reg_buffer_rw): New class.
14451
14452 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14453
14454         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14455         readonly_detached_regcache.
14456         (dummy_frame_prev_register): Use regcache->cooked_read.
14457         * frame.c (frame_save_as_regcache): Change return type.
14458         (frame_pop): Update.
14459         * frame.h (frame_save_as_regcache): Update declaration.
14460         * inferior.h (get_infcall_suspend_state_regcache): Update
14461         declaration.
14462         * infrun.c (infcall_suspend_state) <registers>: use
14463         readonly_detached_regcache.
14464         (save_infcall_suspend_state): Don't use regcache_dup.
14465         (get_infcall_suspend_state_regcache): Change return type.
14466         * linux-fork.c (struct fork_info) <savedregs>: Change to
14467         readonly_detached_regcache.
14468         <pc>: New field.
14469         (fork_save_infrun_state): Don't use regcache_dup.
14470         (info_checkpoints_command): Adjust.
14471         * mi/mi-main.c (register_changed_p): Update declaration.
14472         (mi_cmd_data_list_changed_registers): Use
14473         readonly_detached_regcache.
14474         (register_changed_p): Change parameter type to
14475         readonly_detached_regcache.
14476         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14477         readonly_detached_regcache.
14478         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14479         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14480         New.
14481         (regcache::save): Move it to reg_buffer.
14482         (regcache::restore): Change parameter type.
14483         (regcache_dup): Remove.
14484         * regcache.h (reg_buffer) <save>: New method.
14485         (readonly_detached_regcache): New class.
14486         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14487         readonly_detached_regcache.
14488         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14489
14490 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14491
14492         * frame.c (frame_save_as_regcache): Use regcache method save.
14493         (frame_pop): Use regcache method restore.
14494         * infrun.c (restore_infcall_suspend_state): Likewise.
14495         * linux-fork.c (fork_load_infrun_state): Likewise.
14496         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14497         save.
14498         * regcache.c (regcache_save): Remove.
14499         (regcache::restore): More asserts.
14500         (regcache_cpy): Remove.
14501         * regcache.h (regcache_save): Remove the declaration.
14502         (regcache::restore): Move from private to public.
14503         Remove the friend declaration of regcache_cpy.
14504         (regcache_cpy): Remove declaration.
14505
14506 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14507
14508         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14509         parameter type to 'readable_regcache *'.
14510         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14511         * arm-tdep.c (arm_neon_quad_read): Likewise.
14512         (arm_pseudo_read): Likewise.
14513         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14514         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14515         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14516         * gdbarch.c: Re-generated.
14517         * gdbarch.h: Re-generated.
14518         * gdbarch.sh (pseudo_register_read): Change parameter type to
14519         'readable_regcache *'.
14520         (pseudo_register_read_value): Likewise.
14521         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14522         (h8300_pseudo_register_read): Likewise.
14523         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14524         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14525         (i386_pseudo_register_read_into_value): Likewise.
14526         (i386_pseudo_register_read_value): Likewise.
14527         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14528         declaration.
14529         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14530         * m32c-tdep.c (m32c_raw_read): Likewise.
14531         (m32c_read_flg): Likewise.
14532         (m32c_banked_register): Likewise.
14533         (m32c_banked_read): Likewise.
14534         (m32c_sb_read): Likewise.
14535         (m32c_part_read): Likewise.
14536         (m32c_cat_read): Likewise.
14537         (m32c_r3r2r1r0_read): Likewise.
14538         (m32c_pseudo_register_read): Likewise.
14539         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14540         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14541         (mep_pseudo_cr64_read): Likewise.
14542         (mep_pseudo_register_read): Likewise.
14543         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14544         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14545         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14546         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14547         (regcache::cooked_read): Likewise.
14548         (regcache::cooked_read_value): Likewise.
14549         (regcache_cooked_read_signed):
14550         (regcache::cooked_read): Likewise.
14551         * regcache.h (readable_regcache): New class.
14552         (regcache): Inherit readable_regcache.  Move some methods to
14553         readable_regcache.
14554         * rl78-tdep.c (rl78_pseudo_register_read): Change
14555         parameter type to 'readable_regcache *'.
14556         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14557         (e500_pseudo_register_read): Change parameter type to
14558         'readable_regcache *'.
14559         (dfp_pseudo_register_read): Likewise.
14560         (vsx_pseudo_register_read): Likewise.
14561         (efpr_pseudo_register_read): Likewise.
14562         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14563         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14564         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14565         (sh64_pseudo_register_read): Likewise.
14566         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14567         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14568         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14569         (spu_pseudo_register_read): Likewise.
14570         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14571         (xtensa_pseudo_register_read): Likewise.
14572
14573 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14574
14575         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14576         (regcache::arch): Move it to reg_buffer::arch.
14577         (regcache::register_buffer): Likewise.
14578         (regcache::assert_regnum): Likewise.
14579         (regcache::num_raw_registers): Likewise.
14580         * regcache.h (reg_buffer): New class.
14581         (regcache): Inherit reg_buffer.
14582
14583 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14584
14585         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14586         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14587
14588 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14589
14590         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14591
14592 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14593
14594         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14595         (SFILES): Remove common/*.c files.
14596         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14597         * common/common.host: Add common reference.
14598         * configure.ac: Likewise.
14599         * configure: Regenerate.
14600
14601 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14602
14603         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14604         (block_initialize_namespace): Use new.
14605         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14606         (dwarf2_free_objfile): Use delete.
14607         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14608         (copy_type_recursive): Use new.
14609         * gdb_obstack.h (allocate_on_obstack): New.
14610
14611 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14612
14613         PR gdb/22849
14614         * inferior.c (exit_inferior_1): Reset inf->control.
14615
14616 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14617
14618         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14619         declaration.
14620
14621 2018-02-14  Pedro Alves  <palves@redhat.com>
14622
14623         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14624         frame_cleanup_after_sniffer on exception.
14625
14626 2018-02-14  Tom Tromey  <tom@tromey.com>
14627
14628         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14629         const.
14630         (solib_bfd_open): Make pathname const.
14631         * solib.c (solib_bfd_open): Make pathname const.
14632         * solib-spu.c (spu_bfd_fopen): Make name const.
14633         (spu_bfd_open): Make pathname const.
14634         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14635         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14636
14637 2018-02-14  Tom Tromey  <tom@tromey.com>
14638
14639         * symfile.c (symfile_bfd_open): Update.
14640         * source.h (openp, source_full_path_of, find_and_open_source):
14641         Change argument type to unique_xmalloc_ptr.
14642         * source.c (openp): Take a unique_xmalloc_ptr.
14643         (source_full_path_of, find_and_open_source): Likewise.
14644         (open_source_file, symtab_to_fullname): Update.
14645         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14646         unique_xmalloc_ptr.
14647         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14648         (exec_file_find): Update.
14649         * psymtab.c (psymtab_to_fullname): Update.
14650         * nto-tdep.h (nto_find_and_open_solib): Update.
14651         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14652         unique_xmalloc_ptr.
14653         * exec.c (exec_file_attach): Update.
14654         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14655         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14656
14657 2018-02-14  Tom Tromey  <tom@tromey.com>
14658
14659         * solib.c: Include source.h.
14660         * nto-tdep.c: Include source.h.
14661         * mi/mi-cmd-env.c: Include source.h.
14662         * infcmd.c: Include source.h.
14663         * exec.c: Include source.h.
14664         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14665         (add_path, directory_switch, source_path, init_source_path): Move
14666         declarations...
14667         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14668         (add_path, directory_switch, source_path, init_source_path):
14669         ...here.
14670
14671 2018-02-14  Tom Tromey  <tom@tromey.com>
14672
14673         * solist.h (exec_file_find, solib_find): Return
14674         unique_xmalloc_ptr.
14675         (solib_bfd_fopen): Take a const char *.
14676         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14677         (exec_file_find, solib_find): Likewise.
14678         (solib_bfd_fopen): Do not take ownership of "pathname".
14679         (solib_bfd_open): Use unique_xmalloc_ptr.
14680         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14681         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14682         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14683         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14684
14685 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14686
14687         * ada-lang.c (name_match_type_from_name): Remove reference to
14688         ada_name_for_lookup in function's documentation.
14689         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14690
14691 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14692
14693         * defs.h (enum openp_flags): New enum.
14694         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14695         Move to enum openp_flags.
14696         (openp_flags): New enum flags.
14697         (openp): Change parameter type to openp_flags.
14698         * source.c (openp): Change parameter type to openp_flags.
14699         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14700         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14701
14702 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14703
14704         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14705         per-command.
14706
14707 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14708
14709         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14710         into...
14711         (class dwarf2_queue_guard): ...the destructor of this new class.
14712         (dw2_do_instantiate_symtab): Create instance of the new class
14713         dwarf2_queue_guard, remove cleanup.
14714
14715 2018-02-09  Tom Tromey  <tom@tromey.com>
14716
14717         * source.c (find_source_lines): Don't reference past the end of
14718         the vector.
14719
14720 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14721
14722         * remote.c (remote_btrace_maybe_reopen): Change error message.
14723         * btrace.c (btrace_enable): Likewise.
14724         (parse_xml_btrace): Likewise.
14725         (parse_xml_btrace_conf): Likewise.
14726
14727 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14728
14729         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14730         (linux_enable_pt, linux_enable_bts): Call
14731         diagnose_perf_event_open_fail.
14732
14733 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14734
14735         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14736         Remove parameter and change return type.  Update callers.  Move it.
14737         (linux_enable_bts, linux_enable_pt): Improve error message.
14738         (linux_enable_pt): Remove zero buffer size check.
14739         (linux_enable_btrace): Improve error messages.  Remove NULL return
14740         check.
14741
14742 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14743
14744         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14745         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14746         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14747         (linux_supports_pt, linux_supports_btrace): Remove.
14748         (linux_enable_bts): Call cpu_supports_bts.
14749         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14750         * remote.c (remote_supports_btrace): Remove.
14751         (init_remote_ops): Remove remote_supports_btrace.
14752         * target-delegates.c: Regenerated.
14753         * target.c (target_supports_btrace): Remove.
14754         * target.h (target_ops) <to_supports_btrace>: Remove
14755         (target_supports_btrace): Remove.
14756         * x86-linux-nat.c (x86_linux_create_target): Remove
14757         linux_supports_btrace.
14758
14759 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14760
14761         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14762         btrace failed.
14763         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14764         exception and use message in own exception.
14765
14766 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14767
14768         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14769         (perf_event_pt_event_type): Use gdb_file_up.
14770         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14771         scoped_fd, and scoped_mmap.
14772
14773 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14774
14775         * common/scoped_mmap.h: New.
14776         * unittests/scoped_mmap-selftest.c: New.
14777         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14778         unittests/scoped_mmap-selftest.c.
14779
14780 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14781
14782         * common/scoped_fd.h: New.
14783         * unittests/scoped_fd-selftest.c: New.
14784         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14785         unittests/scoped_fd-selftest.c.
14786
14787 2018-02-09  Tom Tromey  <tom@tromey.com>
14788
14789         * auto-load.c (auto_load_section_scripts): Use
14790         gdb::unique_xmalloc_ptr.
14791
14792 2018-02-09  Tom Tromey  <tom@tromey.com>
14793
14794         * auto-load.c (execute_script_contents): Use std::string.
14795
14796 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14797
14798         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14799         Python function, rather than a new command.
14800
14801 2018-02-08  Tom Tromey  <tom@tromey.com>
14802
14803         * solib.c (solib_find_1): Use std::string.
14804         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14805
14806 2018-02-08  Tom Tromey  <tom@tromey.com>
14807
14808         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14809
14810 2018-02-08  Tom Tromey  <tom@tromey.com>
14811
14812         * source.c (find_source_lines): Use gdb::def_vector.
14813
14814 2018-02-08  Tom Tromey  <tom@tromey.com>
14815
14816         * macrocmd.c (struct temporary_macro_definition): New.
14817         (macro_define_command): Use temporary_macro_definition.  Remove
14818         cleanups.
14819         (free_macro_definition_ptr): Remove.
14820
14821 2018-02-08  Tom Tromey  <tom@tromey.com>
14822
14823         * macroexp.c (maybe_expand): Use std::string.
14824
14825 2018-02-08  Tom Tromey  <tom@tromey.com>
14826
14827         * macroexp.c (struct macro_buffer): Add initializers for some
14828         members.
14829         (init_buffer, init_shared_buffer, free_buffer)
14830         (free_buffer_return_text): Remove.
14831         (macro_buffer): New constructors.
14832         (~macro_buffer): New destructor.
14833         (macro_buffer::set_shared): New method.
14834         (macro_buffer::resize_buffer, macro_buffer::appendc)
14835         (macro_buffer::appendmem): Now methods, not free functions.
14836         (set_token, append_tokens_without_splicing, stringify)
14837         (macro_stringify): Update.
14838         (gather_arguments): Change return type.  Remove argc_p argument,
14839         add args_ptr argument.  Use std::vector.
14840         (substitute_args): Remove argc argument.  Accept std::vector.
14841         (expand): Update.  Use std::vector.
14842         (scan, macro_expand, macro_expand_next): Update.
14843
14844 2018-02-08  Tom Tromey  <tom@tromey.com>
14845
14846         * symtab.c (default_collect_symbol_completion_matches_break_on):
14847         Use unique_xmalloc_ptr.
14848         * macroscope.h: (sal_macro_scope, user_macro_scope)
14849         (default_macro_scope): Return unique_xmalloc_ptr.
14850         * macroscope.c (sal_macro_scope, user_macro_scope)
14851         (default_macro_scope): Return unique_xmalloc_ptr.
14852         * macroexp.h (macro_expand, macro_expand_once): Return
14853         unique_xmalloc_ptr.
14854         * macroexp.c (macro_expand, macro_expand_once): Return
14855         unique_xmalloc_ptr.
14856         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14857         (info_macro_command, info_macros_command): Use
14858         unique_xmalloc_ptr.
14859         * compile/compile-c-support.c (write_macro_definitions): Use
14860         unique_xmalloc_ptr.
14861         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14862
14863 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14864
14865         * value.c (value_static_field): Assign field type instead of
14866         containing type when returning an optimized out value.
14867
14868 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14869
14870         * ft32-tdep.c (ft32_read_pc): Remove.
14871         (ft32_write_pc): Remove.
14872         (ft32_gdbarch_init): Update.
14873         * m32r-tdep.c (m32r_read_pc): Remove.
14874         (m32r_gdbarch_init): Update.
14875         * mep-tdep.c (mep_read_pc): Remove.
14876         (mep_gdbarch_init): Update.
14877         * microblaze-tdep.c (microblaze_write_pc): Remove.
14878         (microblaze_gdbarch_init): Update.
14879         * mn10300-tdep.c (mn10300_read_pc): Remove.
14880         (mn10300_write_pc): Remove.
14881         (mn10300_gdbarch_init): Update.
14882         * moxie-tdep.c (moxie_read_pc): Remove.
14883         (moxie_write_pc): Remove.
14884         (moxie_gdbarch_init): Update.
14885
14886 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14887
14888         * expprint.c (print_subexp_standard): Handle
14889         OP_F77_UNDETERMINED_ARGLIST.
14890         (dump_subexp_body_standard): Likewise.
14891
14892 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14893
14894         * target-descriptions.c (tdesc_element_visitor) Add empty
14895         implementations.
14896         (tdesc_type): Move make_gdb_type from here.
14897         (tdesc_type_builtin): Likewise.
14898         (tdesc_type_vector): Likewise.
14899         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14900         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14901         (make_gdb_type_union): Likewise.
14902         (make_gdb_type_flags): Likewise.
14903         (make_gdb_type_enum): Likewise.
14904         (make_gdb_type): New function.
14905         (tdesc_register_type): Use static make_gdb_type.
14906
14907 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14908
14909         * infcmd.c (default_print_one_register_info): Align natural-format
14910         column values consistently one under another.
14911         (pad_to_column): New function.
14912
14913 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14914
14915         * dwarf2read.c (dwarf2_physname): Move commment.
14916
14917 2018-02-01  Leszek Swirski  <leszeks@google.com>
14918
14919         * varobj.c (varobj_formatted_print_options): Allow recursive
14920         pretty printing if pretty printing is enabled.
14921
14922 2018-02-01  Leszek Swirski  <leszeks@google.com>
14923
14924         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14925         names after a structop as a filename.
14926
14927 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14928
14929         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14930         (arm_record_coproc_data_proc): Likewise.
14931
14932 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14933
14934         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14935
14936 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14937
14938         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14939         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14940
14941 2018-01-31  Pedro Alves  <palves@redhat.com>
14942
14943         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14944         * inflow.c (child_terminal_save_inferior): Wrap reference to
14945         tcgetpgrp in HAVE_TERMIOS_H.
14946         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14947         _WIN32.
14948         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14949         always iterate over all inferiors.
14950         (gdbsim_cntrl_c): Adjust.
14951         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14952
14953 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14954
14955         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14956         index type is objfile-owned if the element type is as well.
14957
14958 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14959
14960         GDB 8.1 released.
14961
14962 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14963
14964         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14965         "features/s390x-linux64.c".
14966         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14967         s390_linux32 and s390x_linux64.
14968         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14969         default tdesc.
14970         * s390-tdep.c: Include "features/s390-linux32.c" and
14971         "features/s390x-linux64.c".
14972         (s390_tdesc_valid): Add check for tdesc_has_registers.
14973         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14974         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14975         tdesc_s390x_linux64.
14976         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14977         tdesc_s390x_linux64 to...
14978         * s390-tdep.h: ...here.
14979
14980 2018-01-30  Pedro Alves  <palves@redhat.com>
14981
14982         PR gdb/13211
14983         * config.in, configure: Regenerate.
14984         * configure.ac: Check for getpgid.
14985         * go32-nat.c (go32_pass_ctrlc): New.
14986         (go32_target): Install it.
14987         * inf-child.c (inf_child_target): Install
14988         child_terminal_save_inferior, child_pass_ctrlc and
14989         child_interrupt.
14990         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14991         (inf_ptrace_target): No longer install it.
14992         * infcmd.c (interrupt_target_1): Adjust.
14993         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14994         (child_interrupt): Declare.
14995         (inferior::terminal_state): New.
14996         * inflow.c (struct terminal_info): Update comments.
14997         (inferior_process_group): Delete.
14998         (terminal_is_ours): Delete.
14999         (gdb_tty_state): New.
15000         (child_terminal_init): Adjust.
15001         (is_gdb_terminal, sharing_input_terminal_1)
15002         (sharing_input_terminal): New functions.
15003         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15004         Set the process's actual process group in the foreground if
15005         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15006         mark terminal as the inferior's if not sharing GDB's terminal.
15007         Don't check attach_flag.
15008         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15009         pass down a target_terminal_state.
15010         (child_terminal_save_inferior): New, factored out from ...
15011         (child_terminal_ours_1): ... this.  Handle
15012         target_terminal_state::is_ours_for_output.
15013         (child_interrupt, child_pass_ctrlc): New.
15014         (inflow_inferior_exit): Clear the inferior's terminal_state.
15015         (copy_terminal_info): Copy the inferior's terminal state.
15016         (_initialize_inflow): Remove reference to terminal_is_ours.
15017         * inflow.h (inferior_process_group): Delete.
15018         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15019         * procfs.c (procfs_target): Don't install procfs_interrupt.
15020         (procfs_interrupt): Delete.
15021         * remote.c (remote_serial_quit_handler): Adjust.
15022         (remote_interrupt): Remove ptid parameter.  Adjust.
15023         * target-delegates.c: Regenerate.
15024         * target.c: Include "terminal.h".
15025         (target_terminal::terminal_state): Rename to ...
15026         (target_terminal::m_terminal_state): ... this.
15027         (target_terminal::init): Adjust.
15028         (target_terminal::inferior): Adjust to per-inferior
15029         terminal_state.
15030         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15031         (target_terminal::ours, target_terminal::ours_for_output): Use
15032         target_terminal_is_ours_kind.
15033         (target_interrupt): Remove ptid parameter.  Adjust.
15034         (default_target_pass_ctrlc): Adjust.
15035         * target.h (target_ops::to_terminal_save_inferior): New field.
15036         (target_ops::to_interrupt): Remove ptid_t parameter.
15037         (target_interrupt): Remove ptid_t parameter.  Update comment.
15038         (target_pass_ctrlc): Update comment.
15039         * target/target.h (target_terminal_state): New scoped enum,
15040         factored out of ...
15041         (target_terminal::terminal_state): ... here.
15042         (target_terminal::inferior): Update comments.
15043         (target_terminal::restore_inferior): New.
15044         (target_terminal::is_inferior, target_terminal::is_ours)
15045         (target_terminal::is_ours_for_output): Adjust.
15046         (target_terminal::scoped_restore_terminal_state): Adjust to
15047         rename, and call restore_inferior() instead of inferior().
15048         (target_terminal::scoped_restore_terminal_state::m_state): Change
15049         type.
15050         (target_terminal::terminal_state): Rename to ...
15051         (target_terminal::m_terminal_state): ... this and change type.
15052
15053 2018-01-30  Pedro Alves  <palves@redhat.com>
15054
15055         * linux-nat.c (wait_for_signal): New function.
15056         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15057         directly.
15058         (async_terminal_is_ours)
15059         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15060         (linux_nat_add_target): Don't override
15061         to_terminal_inferior/to_terminal_ours.
15062
15063 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15064
15065         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15066
15067 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15068
15069         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15070         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15071         dwarf2_per_objfile_free here.
15072         (dwarf2_per_objfile_free): Remove.
15073         (_initialize_dwarf2_read): Don't register
15074         dwarf2_per_objfile_free as a registry cleanup.
15075
15076 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15077
15078         Avoid compilation errors in MinGW native builds
15079
15080         The error is triggered by including python-internal.h, and the
15081         error message is:
15082
15083              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15084                       from build-gnulib/import/math.h:27,
15085                       from d:/usr/Python26/include/pyport.h:235,
15086                       from d:/usr/Python26/include/Python.h:58,
15087                       from python/python-internal.h:94,
15088                       from python/py-arch.c:24:
15089              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15090         using ::hypot;
15091                 ^~~~~
15092
15093         This happens because Python headers define 'hypot' to expand t
15094         '_hypot' in the Windows builds.
15095         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15096         'hypoth'.  This avoids a compilation error.
15097
15098 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15099
15100         * MAINTAINERS (Write After Approval): Fix ordering.
15101
15102 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15103
15104         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15105
15106 2018-01-26  Alan Modra  <amodra@gmail.com>
15107
15108         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15109         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15110         Remove nop.  Make const.  Comment.
15111         (powerpc32_plt_stub_so_2): New.
15112         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15113         Correct count.  Update uses.
15114         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15115         Move common code reading PLT entry word.  Correct
15116         powerpc32_plt_stub PLT address calculation.
15117         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15118         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15119         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15120         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15121         (ppc64_standard_linkage8): Likewise.
15122         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15123         Correct insns description.
15124         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15125
15126 2018-01-24  Pedro Alves  <palves@redhat.com>
15127
15128         GCC PR libstdc++/83906
15129         * gdbtypes.c (operator==(const dynamic_prop &,
15130         const dynamic_prop &)): New.
15131         (operator==(const range_bounds &, const range_bounds &)): New.
15132         (check_types_equal): Use them instead of memcmp.
15133         * gdbtypes.h (operator==(const dynamic_prop &,
15134         const dynamic_prop &)): Declare.
15135         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15136         (operator==(const range_bounds &, const range_bounds &)): Declare.
15137         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15138
15139 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15140
15141         * s390-linux-tdep.c (s390_record_address_mask)
15142         (s390_record_calc_disp_common, s390_record_calc_disp)
15143         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15144         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15145         (s390_process_record): Move to s390-tdep.c.
15146         (s390_linux_init_abi_any): Adjust.
15147         * s390-tdep.c (s390_record_address_mask)
15148         (s390_record_calc_disp_common, s390_record_calc_disp)
15149         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15150         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15151         (s390_process_record): Moved from s390-linux-tdep.c
15152         (s390_gdbarch_init): Adjust.
15153
15154 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15155
15156         * s390-linux-nat.c (s390-tdep.h): New include.
15157         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15158         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15159         (ALLDEPFILES): Add s390-tdep.c.
15160         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15161         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15162         * s390-tdep.h: ...this.  New file.
15163         * s390-linux-tdep.c (s390-tdep.h): New include.
15164         (_initialize_s390_tdep): Rename to...
15165         (_initialize_s390_linux_tdep): ...this and adjust.
15166         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15167         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15168         s390-tdep.h.
15169         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15170         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15171         (s390_is_partial_instruction, s390_software_single_step)
15172         (is_non_branch_ril, s390_displaced_step_copy_insn)
15173         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15174         (s390_prologue_data, s390_addr, s390_store, s390_load)
15175         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15176         (s390_register_call_saved, s390_guess_tracepoint_registers)
15177         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15178         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15179         (s390_pseudo_register_name, s390_pseudo_register_type)
15180         (s390_pseudo_register_read, s390_pseudo_register_write)
15181         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15182         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15183         (s390_addr_bits_remove, s390_address_class_type_flags)
15184         (s390_address_class_type_flags_to_name)
15185         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15186         (s390_function_arg_float, s390_function_arg_vector)
15187         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15188         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15189         (s390_frame_align, s390_register_return_value, s390_return_value)
15190         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15191         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15192         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15193         (s390_trad_frame_prev_register, s390_unwind_cache)
15194         (s390_prologue_frame_unwind_cache)
15195         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15196         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15197         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15198         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15199         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15200         (s390_frame_base_address, s390_local_base_address)
15201         (s390_frame_base, s390_gcc_target_options)
15202         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15203         (s390_validate_reg_range, s390_tdesc_valid)
15204         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15205         * s390-tdep.c: ...this.  New file.
15206
15207 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15208
15209         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15210         (s390_process_record, s390_gdbarch_tdep_alloc)
15211         (s390_linux_init_abi_any): Use/set new hook.
15212
15213 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15214
15215         * s390-linux-tdep.c (osabi.h): New include.
15216         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15217         (s390_linux_init_abi_any): New functions.
15218         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15219
15220 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15221
15222         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15223         tdesc_has_registers check
15224
15225 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15226
15227         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15228         (s390_validate_reg_range): New macro.
15229         (s390_gdbarch_init): Adjust.
15230
15231 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15232
15233         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15234         (s390_gdbarch_tdep_alloc): Adjust.
15235         (s390_gdbarch_init): Adjust.
15236
15237 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15238
15239         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15240         <have_tdb>: Change type to bool.
15241         (s390_gdbarch_tdep_alloc): Adjust.
15242         (s390_gdbarch_init): Adjust.
15243
15244 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15245
15246         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15247         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15248         (s390_gdbarch_tdep_alloc): New function.
15249         (s390_gdbarch_init): Allocate tdep at start and use its fields
15250         instead of separate variables.
15251
15252 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15253
15254         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15255         when looking for cached gdbarch and add comment for remaining.
15256
15257 2018-01-22  Pedro Alves  <palves@redhat.com>
15258             Sergio Durigan Junior  <sergiodj@redhat.com>
15259
15260         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15261         case.
15262
15263 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15264
15265         * MAINTAINERS: Update my company e-mail address.
15266
15267 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15268
15269         * regcache.c (cooked_write_test): New function.
15270         (_initialize_regcache): Register the test.
15271
15272 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15273
15274         * ia64-tdep.c (ia64_pseudo_register_read): Call
15275         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15276         * m32c-tdep.c (m32c_cat_read): Likewise.
15277         (m32c_r3r2r1r0_read): Likewise.
15278         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15279         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15280
15281 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15282
15283         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15284         method raw_read instead of regcache_raw_read.
15285         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15286         * arm-tdep.c (arm_neon_quad_read): Likewise.
15287         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15288         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15289         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15290         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15291         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15292         (i386_pseudo_register_read_into_value): Likewise.
15293         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15294         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15295         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15296         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15297         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15298         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15299         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15300         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15301         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15302
15303 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15304
15305         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15306         * configure.tgt: Remove target mt.
15307         * mt-tdep.c: Remove.
15308         * regcache.c (cooked_read_test): Remove the check for mt.
15309
15310 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15311
15312         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15313         instead of gdbarch_pseudo_register_read_value.
15314
15315 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15316
15317         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15318         language is Ada.
15319
15320 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15321
15322         * linespec.c (create_sals_line_offset): Remove code that preserved
15323         the symtab_and_line's line number.
15324
15325 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15326
15327         * varobj.c (varobj_create): Don't set valid_block when creating a
15328         floating varobj.
15329
15330 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15331
15332         * varobj.c (varobj_create): Remove out of date comment.
15333
15334 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15335
15336         PR mi/20395
15337         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15338         updating innermost block.
15339         * parse.c (innermost_block_tracker::update): Take extra type
15340         parameter, and check types match before updating innermost block.
15341         (write_dollar_variable): Update innermost block for registers.
15342         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15343         (innermost_block_tracker::innermost_block_tracker): Initialise
15344         m_types member.
15345         (innermost_block_tracker::reset): Take type parameter.
15346         (innermost_block_tracker::update): Take type parameter, and pass
15347         type through as needed.
15348         (innermost_block_tracker::m_types): New member.
15349         * varobj.c (varobj_create): Pass type when reseting innermost
15350         block.
15351
15352 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15353
15354         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15355         * ada-lang.c (resolve_subexp): Likewise.
15356         * breakpoint.c (set_breakpoint_condition) Likewise.
15357         (watch_command_1) Likewise.
15358         * c-exp.y (variable): Likewise.
15359         * d-exp.y (PrimaryExpression): Likewise.
15360         * f-exp.y (variable): Likewise.
15361         * go-exp.y (variable): Likewise.
15362         * m2-exp.y (variable): Likewise.
15363         * objfiles.c (objfile::~objfile): Likewise.
15364         * p-exp.y (variable): Likewise.
15365         * parse.c (innermost_block): Change type.
15366         * parser-defs.h (class innermost_block_tracker): New.
15367         (innermost_block): Change to innermost_block_tracker.
15368         * printcmd.c (display_command): Switch to innermost_block API.
15369         (do_one_display): Likewise.
15370         * rust-exp.y (do_one_display): Likewise.
15371         * symfile.c (clear_symtab_users): Likewise.
15372         * varobj.c (varobj_create): Switch to innermost_block API, replace
15373         use of innermost_block with block stored on varobj object.
15374
15375 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15376
15377         * expression.h (innermost_block): Remove declaration.
15378         * varobj.c: Add 'parser-defs.h' include.
15379
15380 2018-01-19  Tom Tromey  <tom@tromey.com>
15381
15382         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15383         symbols in the static and global blocks.
15384
15385 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15386
15387         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15388         gdb_ptrace.h, and move including gdb_wait.h ...
15389         * nat/linux-ptrace.h: ... to here.
15390
15391 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15392
15393         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15394         inf_ptrace_detach_success.
15395         (inf_ptrace_detach_success): Add inferior parameter, use it
15396         instead of inferior_ptid, pass it to detach_inferior.
15397         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15398         parameter.
15399         * inferior.c (detach_inferior): Add overload that takes an
15400         inferior object.
15401         * inferior.h (detach_inferior): Likewise.
15402         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15403         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15404         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15405
15406 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15407
15408         * target.h (struct target_ops) <to_detach>: Add inferior
15409         parameter.
15410         (target_detach): Likewise.
15411         * target.c (dispose_inferior): Pass inferior down.
15412         (target_detach): Pass inferior down.  Assert that it is equal to
15413         the current inferior.
15414         * aix-thread.c (aix_thread_detach): Pass inferior down.
15415         * corefile.c (core_file_command): Pass current_inferior() down.
15416         * corelow.c (core_detach): Add inferior parameter.
15417         * darwin-nat.c (darwin_detach): Likewise.
15418         * gnu-nat.c (gnu_detach): Likewise.
15419         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15420         * infcmd.c (detach_command): Pass current_inferior() down to
15421         target_detach.
15422         * infrun.c (follow_fork_inferior): Pass parent_inf to
15423         target_detach.
15424         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15425         target_detach.
15426         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15427         * linux-thread-db.c (thread_db_detach): Likewise.
15428         * nto-procfs.c (procfs_detach): Likewise.
15429         * procfs.c (procfs_detach): Likewise.
15430         * record.c (record_detach): Likewise.
15431         * record.h (struct inferior): Forward-declare.
15432         (record_detach): Add inferior parameter.
15433         * remote-sim.c (gdbsim_detach): Likewise.
15434         * remote.c (remote_detach_1): Likewise.
15435         (remote_detach): Likewise.
15436         (extended_remote_detach): Likewise.
15437         * sol-thread.c (sol_thread_detach): Likewise.
15438         * target-debug.h (target_debug_print_inferior_p): New macro.
15439         * target-delegates.c: Re-generate.
15440         * top.c (kill_or_detach): Pass inferior down to target_detach.
15441         * windows-nat.c (windows_detach): Add inferior parameter.
15442
15443 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15444
15445         * target.h (struct target_ops) <to_detach>: Remove args
15446         parameter.
15447         (target_detach): Likewise.
15448         * target.c (dispose_inferior): Adjust.
15449         (target_detach): Remove args parameter, adjust.
15450         * aix-thread.c (aix_thread_detach): Adjust.
15451         * corefile.c (core_file_command): Adjust.
15452         * corelow.c (core_detach): Adjust.
15453         * darwin-nat.c (darwin_detach): Adjust.
15454         * gnu-nat.c (gnu_detach): Adjust.
15455         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15456         * infcmd.c (detach_command): Adjust
15457         * infrun.c (follow_fork_inferior): Adjust.
15458         (handle_vfork_child_exec_or_exit): Adjust.
15459         * linux-fork.c (linux_fork_detach): Remove args parameter.
15460         * linux-fork.h (linux_fork_detach): Likewise.
15461         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15462         * linux-thread-db.c (thread_db_detach): Likewise.
15463         * nto-procfs.c (procfs_detach): Likewise.
15464         * procfs.c (procfs_detach): Likewise.
15465         (do_detach): Remove signo parameter.
15466         * record.c (record_detach): Remove args parameter.
15467         * record.h (record_detach): Likewise.
15468         * remote-sim.c (gdbsim_detach): Likewise.
15469         * remote.c (remote_detach_1): Likewise.
15470         (remote_detach): Likewise.
15471         (extended_remote_detach): Likewise.
15472         * sol-thread.c (sol_thread_detach): Likewise.
15473         * target-delegates.c: Re-generate.
15474         * top.c (struct qt_args) <args>: Remove field.
15475         (kill_or_detach): Don't pass args.
15476         (quit_force): Don't set args.
15477         * windows-nat.c (windows_detach): Remove args parameter.
15478
15479 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15480
15481         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15482         (arm_linux_init_abi): Install it.
15483
15484 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15485
15486         * osabi.c (gdb_osabi_names): Extend the regexp for
15487         arm-linux-gnueabihf.
15488
15489 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15490
15491         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15492         m_abbrevs.
15493         (abbrev_table::add_abbrev): Update.
15494         (abbrev_table::lookup_abbrev): Update.
15495
15496 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15497
15498         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15499
15500 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15501
15502         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15503         to "std::string".
15504
15505 2018-01-17  Tom Tromey  <tom@tromey.com>
15506
15507         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15508
15509 2018-01-17  Tom Tromey  <tom@tromey.com>
15510
15511         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15512         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15513         (create_array_type_with_stride): Update.
15514         * dwarf2read.c (set_die_type): Update.
15515
15516 2018-01-17  Tom Tromey  <tom@tromey.com>
15517
15518         * dwarf2read.c (delayed_method_info): Remove typedef.
15519         (dwarf2_cu::method_info): Now a std::vector.
15520         (add_to_method_list): Update.
15521         (free_delayed_list): Remove.
15522         (compute_delayed_physnames): Update.
15523         (process_full_comp_unit, process_full_type_unit): Clear the method
15524         list.  Remove cleanups.
15525         (psymtab_include_file_name): Add name_holder parameter.  Use
15526         unique_xmalloc_ptr.
15527         (dwarf_decode_lines): Update.
15528
15529 2018-01-17  Tom Tromey  <tom@tromey.com>
15530             Simon Marchi  <simon.marchi@ericsson.com>
15531
15532         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15533         (dwarf2_per_objfile::free_cached_comp_units)
15534         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15535         (init_cutu_and_read_dies_no_follow): Update.
15536         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15537         (dwarf2_cu::~dwarf2_cu): New.
15538         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15539         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15540
15541 2018-01-17  Tom Tromey  <tom@tromey.com>
15542             Simon Marchi  <simon.marchi@ericsson.com>
15543
15544         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15545         (struct die_reader_specs) <abbrev_table>: New member.
15546         (struct abbrev_table): Add constructor.
15547         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15548         <abbrev_obstack>: Now an auto_obstack.
15549         (abbrev_table_up): New typedef.
15550         (init_cu_die_reader): Add abbrev_table parameter.
15551         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15552         Add result_dwo_abbrev_table.
15553         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15554         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15555         Update.
15556         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15557         parameter.
15558         (skip_children): Update.
15559         (abbrev_table::alloc_abbrev): Rename from
15560         abbrev_table_alloc_abbrev.
15561         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15562         (abbrev_table::lookup_abbrev): Rename from
15563         abbrev_table_lookup_abbrev.
15564         (abbrev_table_read_table): Return abbrev_table_up.
15565         (abbrev_table_free, abbrev_table_free_cleanup)
15566         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15567         (load_partial_dies): Update.
15568
15569 2018-01-17  Tom Tromey  <tom@tromey.com>
15570
15571         * dwarf2read.c (dwarf2_compute_name): Update comment.
15572         (read_func_scope, read_variable): Update.
15573         (new_symbol): Remove.
15574         (new_symbol_full): Rename to new_symbol.
15575
15576 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15577
15578         PR gdb/16577
15579         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15580         a warning instead of throwing an error, set section size to 0 and return
15581         NULL.
15582         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15583
15584 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15585
15586         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15587         std::string.
15588         (linux_ptrace_attach_fail_reason_string): Likewise.
15589         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15590         Likewise.
15591         (linux_ptrace_attach_fail_reason_string): Likewise.
15592         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15593
15594 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15595
15596         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15597
15598 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15599
15600         PR gdb/21559
15601         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15602         checking for fs_base/gs_base fields in struct user_regs_struct.
15603         * configure: Regenerate.
15604
15605 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15606
15607         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15608         function.
15609         (aarch64_linux_init_abi): Install it to gdbarch hook
15610         gcc_target_options.
15611
15612 2018-01-15  Pedro Alves  <palves@redhat.com>
15613
15614         * common/signals-state-save-restore.c
15615         (save_original_signals_state): Fix typos.
15616
15617 2017-01-12  Tom Tromey  <tom@tromey.com>
15618             Sergio Durigan Junior  <sergiodj@redhat.com>
15619
15620         * Makefile.in (install-only): Install gdb-add-index.
15621
15622 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15623
15624         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15625
15626 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15627
15628         * infrun.c (keep_going_pass_signal): Clear step-over info when
15629         insert_breakpoints fails.
15630
15631 2018-01-11  Pedro Alves  <palves@redhat.com>
15632
15633         PR gdb/22583
15634         * infrun.c (resume): Rename to ...
15635         (resume_1): ... this.
15636         (resume): Reimplement as wrapper around resume_1.
15637
15638 2018-01-11  Pedro Alves  <palves@redhat.com>
15639
15640         PR remote/22597
15641         * remote.c (remote_parse_stop_reply): Default to the last-set
15642         general thread instead of to 'magic_null_ptid'.
15643
15644 2018-01-10  Pedro Alves  <palves@redhat.com>
15645
15646         * language.h (language_get_symbol_name_matcher): Rename ...
15647         (get_symbol_name_matcher): ... this.
15648         * language.c (language_get_symbol_name_matcher): Ditto.
15649         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15650         callers adjusted.
15651
15652 2018-01-10  Pedro Alves  <palves@redhat.com>
15653
15654         PR gdb/22670
15655         * dwarf2read.c
15656         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15657         Adjust to use language_get_symbol_name_matcher instead of
15658         language_defn::la_get_symbol_name_matcher.
15659         * language.c (language_get_symbol_name_matcher): If in Ada mode
15660         and the lookup name is a verbatim match, return Ada's matcher.
15661         * language.h (language_get_symbol_name_matcher): Adjust comment.
15662         (ada_lookup_name_info::verbatim_p):: New method.
15663
15664 2018-01-10  Pedro Alves  <palves@redhat.com>
15665
15666         PR gdb/22670
15667         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15668         minsym's language is language_auto or language_cplus, pass down
15669         language_ada instead.
15670         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15671
15672 2018-01-10  Pedro Alves  <palves@redhat.com>
15673
15674         PR gdb/22670
15675         * minsyms.c (linkage_name_str): New function.
15676         (iterate_over_minimal_symbols): Use it.
15677
15678 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15679
15680         * NEWS: Document that 'info proc' now works on FreeBSD.
15681
15682 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15683
15684         * configure.ac: Check for kinfo_getfile in libutil.
15685         * configure: Regenerate.
15686         * config.in: Regenerate.
15687         * fbsd-nat.c: Include "fbsd-tdep.h".
15688         (fbsd_fetch_cmdline): New.
15689         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15690         rather than calling error.
15691         (fbsd_info_proc): New.
15692         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15693         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15694         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15695
15696 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15697
15698         * fbsd-nat.c (struct free_deleter): Remove.
15699         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15700
15701 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15702
15703         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15704         NULL for an empty pathname.
15705
15706 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15707
15708         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15709         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15710         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15711         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15712         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15713         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15714         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15715         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15716         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15717         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15718         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15719         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15720         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15721         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15722         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15723
15724 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15725
15726         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15727         (gnu_xfer_auxv): New function.
15728         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15729         TARGET_OBJECT_AUXV.
15730
15731 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15732             Simon Marchi  <simon.marchi@ericsson.com>
15733
15734         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15735         common/selftest.c.
15736         (COMMON_OBS): Remove selftest.o.
15737         * configure.ac: Append selftest-arch.c and common/selftest.c to
15738         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15739         * configure: Re-generated.
15740         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15741         GDB_SELF_TEST.
15742         (maintenance_info_selftests): Likewise.
15743
15744 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15745
15746         * ada-valprint.c (val_print_packed_array_elements): Use
15747         proper number of elements when printing an array indexed
15748         by an enumeration type.
15749
15750 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15751
15752         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15753         (dw2_get_file_names_reader): Adjust.
15754         (lookup_dwo_signatured_type): Adjust.
15755         (lookup_dwp_signatured_type): Adjust.
15756         (lookup_signatured_type): Adjust.
15757         (create_type_unit_group): Adjust.
15758         (get_type_unit_group): Adjust.
15759         (process_psymtab_comp_unit_reader): Adjust.
15760         (build_type_psymtabs_reader): Adjust.
15761         (scan_partial_symbols): Adjust.
15762         (add_partial_symbol): Adjust.
15763         (add_partial_subprogram): Adjust.
15764         (peek_die_abbrev): Adjust.
15765         (fixup_go_packaging): Adjust.
15766         (process_imported_unit_die): Adjust.
15767         (dwarf2_compute_name): Adjust.
15768         (dwarf2_physname): Adjust.
15769         (read_import_statement): Adjust.
15770         (handle_DW_AT_stmt_list): Adjust.
15771         (read_file_scope): Adjust.
15772         (read_func_scope): Adjust.
15773         (read_lexical_block_scope): Adjust.
15774         (read_call_site_scope): Adjust.
15775         (read_variable): Adjust.
15776         (dwarf2_rnglists_process): Adjust.
15777         (dwarf2_ranges_process): Adjust.
15778         (dwarf2_ranges_read): Adjust.
15779         (dwarf2_get_pc_bounds): Adjust.
15780         (dwarf2_record_block_ranges): Adjust.
15781         (dwarf2_add_field): Adjust.
15782         (dwarf2_add_member_fn): Adjust.
15783         (read_structure_type): Adjust.
15784         (process_structure_scope): Adjust.
15785         (read_enumeration_type): Adjust.
15786         (read_array_type): Adjust.
15787         (mark_common_block_symbol_computed): Adjust.
15788         (read_common_block): Adjust.
15789         (read_namespace_type): Adjust.
15790         (read_namespace): Adjust.
15791         (read_module_type): Adjust.
15792         (read_tag_pointer_type): Adjust.
15793         (read_tag_ptr_to_member_type): Adjust.
15794         (read_tag_string_type): Adjust.
15795         (read_subroutine_type): Adjust.
15796         (read_typedef): Adjust.
15797         (read_base_type): Adjust.
15798         (attr_to_dynamic_prop): Adjust.
15799         (read_subrange_type): Adjust.
15800         (read_unspecified_type): Adjust.
15801         (dwarf2_read_abbrevs): Adjust.
15802         (load_partial_dies): Adjust.
15803         (read_partial_die): Adjust.
15804         (find_partial_die): Adjust.
15805         (guess_partial_die_structure_name): Adjust.
15806         (fixup_partial_die): Adjust.
15807         (read_attribute_value): Adjust.
15808         (read_addr_index): Adjust.
15809         (read_addr_index_from_leb128): Adjust.
15810         (read_str_index): Adjust.
15811         (dwarf2_string_attr): Adjust.
15812         (get_debug_line_section): Adjust.
15813         (dwarf_decode_line_header): Adjust.
15814         (lnp_state_machine::check_line_address): Adjust.
15815         (dwarf_decode_lines_1): Adjust.
15816         (dwarf_decode_lines): Adjust.
15817         (dwarf2_start_symtab): Adjust.
15818         (var_decode_location): Adjust.
15819         (new_symbol_full): Adjust.
15820         (dwarf2_const_value_data): Adjust.
15821         (dwarf2_const_value_attr): Adjust.
15822         (dwarf2_const_value): Adjust.
15823         (die_type): Adjust.
15824         (die_containing_type): Adjust.
15825         (build_error_marker_type): Adjust.
15826         (lookup_die_type): Adjust.
15827         (guess_full_die_structure_name): Adjust.
15828         (anonymous_struct_prefix): Adjust.
15829         (determine_prefix): Adjust.
15830         (dwarf2_name): Adjust.
15831         (follow_die_ref_or_sig): Adjust.
15832         (follow_die_offset): Adjust.
15833         (follow_die_ref): Adjust.
15834         (follow_die_sig_1): Adjust.
15835         (follow_die_sig): Adjust.
15836         (get_signatured_type): Adjust.
15837         (get_DW_AT_signature_type): Adjust.
15838         (decode_locdesc): Adjust.
15839         (dwarf_decode_macros): Adjust.
15840         (cu_debug_loc_section): Adjust.
15841         (fill_in_loclist_baton): Adjust.
15842         (dwarf2_symbol_mark_computed): Adjust.
15843         (init_one_comp_unit): Don't assign
15844         dwarf2_cu::dwarf2_per_objfile.
15845         (set_die_type): Adjust.
15846
15847 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15848
15849         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15850         <dwarf2_per_objfile>: New field.
15851         (dwarf2_per_objfile): Remove global.
15852         (get_dwarf2_per_objfile): New function.
15853         (set_dwarf2_per_objfile): New function.
15854         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15855         dwarf2_per_objfile.
15856         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15857         (read_abbrev_offset): Likewise.
15858         (read_indirect_string): Likewise.
15859         (read_indirect_line_string): Likewise.
15860         (read_indirect_string_at_offset): Likewise.
15861         (read_indirect_string_from_dwz): Likewise.
15862         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15863         dwarf2_per_objfile.
15864         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15865         (create_all_comp_units): Change objfile parameter to
15866         dwarf2_per_objfile.
15867         (create_all_type_units): Likewise.
15868         (process_queue): Add dwarf2_per_objfile parameter.
15869         (read_and_check_comp_unit_head): Likewise.
15870         (lookup_dwo_unit_in_dwp): Likewise.
15871         (get_dwp_file): Likewise.
15872         (process_cu_includes): Likewise.
15873         (struct free_dwo_file_cleanup_data): New struct.
15874         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15875         set_dwarf2_per_objfile.
15876         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15877         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15878         context, adjust calls.
15879         (dw2_instantiate_symtab): Likewise.
15880         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15881         (dw2_get_cu): Likewise.
15882         (create_cu_from_index_list): Change objfile parameter to
15883         dwarf2_per_objfile.
15884         (create_cus_from_index_list): Get dwarf2_per_objfile from
15885         context, adjust calls.
15886         (create_cus_from_index): Likewise.
15887         (create_signatured_type_table_from_index): Change objfile
15888         parameter to dwarf2_per_objfile.
15889         (create_signatured_type_table_from_debug_names): Change objfile
15890         parameter to dwarf2_per_objfile.
15891         (create_addrmap_from_index): Likewise.
15892         (create_addrmap_from_aranges): Likewise.
15893         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15894         (dw2_setup): Remove.
15895         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15896         context.
15897         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15898         get_dwarf2_per_objfile.
15899         (dw2_forget_cached_source_info): Likewise.
15900         (dw2_map_symtabs_matching_filename): Likewise.
15901         (struct dw2_symtab_iterator) <index>: Remove.
15902         <dwarf2_per_objfile>: New field.
15903         (dw2_symtab_iter_init): Replace index parameter with
15904         dwarf2_per_objfile.
15905         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15906         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15907         (dw2_print_stats): Likewise.
15908         (dw2_dump): Likewise.
15909         (dw2_expand_symtabs_for_function): Likewise.
15910         (dw2_expand_all_symtabs): Likewise.
15911         (dw2_expand_symtabs_with_fullname): Likewise.
15912         (dw2_expand_marked_cus): Replace index and objfile parameters
15913         with dwarf2_per_objfile.
15914         (dw_expand_symtabs_matching_file_matcher): Add
15915         dwarf2_per_objfile parameter and adjust calls.
15916         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15917         adjust calls.
15918         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15919         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15920         adjust calls.
15921         (create_cus_from_debug_names_list): Replace objfile parameter
15922         with dwarf2_per_objfile and adjust calls.
15923         (create_cus_from_debug_names): Likewise.
15924         (dwarf2_read_debug_names): Likewise.
15925         (mapped_debug_names::namei_to_name): Adjust call.
15926         (dw2_debug_names_iterator::next): Likewise.
15927         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15928         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15929         (dw2_debug_names_dump): Likewise.
15930         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15931         (dw2_debug_names_expand_symtabs_matching): Likewise.
15932         (dwarf2_initialize_objfile): Likewise.
15933         (dwarf2_build_psymtabs): Likewise.
15934         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15935         this_cu.
15936         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15937         (read_and_check_comp_unit_head): Likewise.
15938         (read_abbrev_offset): Likewise.
15939         (create_debug_type_hash_table): Likewise.
15940         (create_debug_types_hash_table): Likewise.
15941         (create_all_type_units): Replace objfile parameter with
15942         dwarf2_per_objfile.
15943         (add_type_unit): Add dwarf2_per_objfile parameter.
15944         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15945         with dwarf2_per_objfile.
15946         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15947         (lookup_dwp_signatured_type): Likewise.
15948         (lookup_signatured_type): Likewise.
15949         (read_cutu_die_from_dwo): Likewise.
15950         (init_tu_and_read_dwo_dies): Likewise.
15951         (init_cutu_and_read_dies): Likewise.
15952         (init_cutu_and_read_dies_no_follow): Likewise.
15953         (allocate_type_unit_groups_table): Add objfile parameter.
15954         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15955         (get_type_unit_group): Likewise.
15956         (process_psymtab_comp_unit): Update call.
15957         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15958         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15959         (print_tu_stats): Likewise.
15960         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15961         in void* parameter.
15962         (build_type_psymtabs): Change objfile parameter to
15963         dwarf2_per_objfile.
15964         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15965         passed in void* parameter.
15966         (process_skeletonless_type_units): Change objfile parameter to
15967         dwarf2_per_objfile.
15968         (set_partial_user): Likewise.
15969         (dwarf2_build_psymtabs_hard): Likewise.
15970         (read_comp_units_from_section): Likewise.
15971         (create_all_comp_units): Likewise.
15972         (scan_partial_symbols): Update calls.
15973         (add_partial_symbol): Likewise.
15974         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15975         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15976         (process_queue): Add dwarf2_per_objfile parameter.
15977         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15978         (compute_compunit_symtab_includes): Likewise.
15979         (process_cu_includes): Add dwarf2_per_objfile parameter.
15980         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15981         (process_full_type_unit): Likewise.
15982         (process_imported_unit_die): Update call.
15983         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15984         (read_file_scope): Likewise.
15985         (allocate_dwo_file_hash_table): Add objfile parameter.
15986         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15987         (create_cus_hash_table): Likewise.
15988         (create_dwp_hash_table): Likewise.
15989         (create_dwo_unit_in_dwp_v1): Likewise.
15990         (create_dwp_v2_section): Likewise.
15991         (create_dwo_unit_in_dwp_v2): Likewise.
15992         (lookup_dwo_unit_in_dwp): Likewise.
15993         (try_open_dwop_file): Likewise.
15994         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15995         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15996         cleanup to include a reference to dwarf2_per_objfile.
15997         (open_dwp_file): Add dwarf2_per_objfile parameter.
15998         (open_and_init_dwp_file): Likewise.
15999         (get_dwp_file): Likewise.
16000         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16001         (queue_and_load_all_dwo_tus): Update call.
16002         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16003         data.
16004         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16005         (dwarf2_ranges_process): Likewise.
16006         (dwarf2_get_pc_bounds): Likewise.
16007         (mark_common_block_symbol_computed): Likewise.
16008         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16009         (dwarf2_read_abbrevs): Update call.
16010         (read_partial_die): Use dwarf2_per_objfile from cu.
16011         (find_partial_die): Likewise.
16012         (fixup_partial_die): Likewise.
16013         (read_attribute_value): Likewise.
16014         (read_indirect_string_at_offset_from): Add objfile parameter.
16015         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16016         parameter.
16017         (read_indirect_string_from_dwz): Add objfile parameter.
16018         (read_indirect_string): Add objfile parameter.
16019         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16020         (read_addr_index): Use dwarf2_per_objfile from cu.
16021         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16022         call dw2_setup.
16023         (read_str_index): Use dwarf2_per_objfile from cu.
16024         (get_debug_line_section): Likewise.
16025         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16026         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16027         (new_symbol_full): Use dwarf2_per_objfile from cu.
16028         (build_error_marker_type): Likewise.
16029         (lookup_die_type): Likewise.
16030         (determine_prefix): Likewise.
16031         (follow_die_offset): Likewise.
16032         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16033         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16034         (dwarf2_fetch_die_type_sect_off): Likewise.
16035         (dwarf2_get_die_type): Likewise.
16036         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16037         (get_signatured_type): Likewise.
16038         (get_DW_AT_signature_type): Likewise.
16039         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16040         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16041         (cu_debug_loc_section): Likewise.
16042         (fill_in_loclist_baton): Likewise.
16043         (dwarf2_symbol_mark_computed): Likewise.
16044         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16045         dwarf2_per_objfile.
16046         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16047         parameter.
16048         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16049         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16050         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16051         (set_die_type): Use dwarf2_free_objfile from cu.
16052         (get_die_type_at_offset): Likewise.
16053         (dwarf2_per_objfile_free): Don't assign global variable.
16054         (debug_names) <constructor>: Add dwarf2_per_objfile
16055         parameter, update m_debugstrlookup construction.
16056         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16057         parameter.
16058         <m_dwarf2_per_objfile>: New field.
16059         <lookup>: Use m_dwarf2_per_objfile.
16060         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16061         (psyms_seen_size): Likewise.
16062         (write_gdbindex): Replace objfile parameter with
16063         dwarf2_per_objfile.
16064         (write_debug_names): Likewise.
16065         (write_psymtabs_to_index): Likewise.
16066         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16067         calls.
16068
16069 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16070
16071         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16072         <dwarf2_per_objfile>: New field.
16073         (struct dwarf2_per_cu_data) <objfile>: Remove.
16074         <dwarf2_per_objfile>: New field.
16075         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16076         of objfile.
16077         (create_signatured_type_table_from_index): Likewise.
16078         (create_debug_type_hash_table): Likewise.
16079         (fill_in_sig_entry_from_dwo_entry): Likewise.
16080         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16081         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16082         objfile.
16083         (create_partial_symtab): Access objfile through
16084         dwarf2_per_objfile.
16085         (process_psymtab_comp_unit_reader): Likewise.
16086         (read_comp_units_from_section): Likewise.
16087         (scan_partial_symbols): Likewise.
16088         (add_partial_symbol): Likewise.
16089         (add_partial_subprogram): Likewise.
16090         (peek_die_abbrev): Likewise.
16091         (fixup_go_packaging): Likewise.
16092         (process_full_comp_unit): Likewise.
16093         (process_full_type_unit): Likewise.
16094         (process_imported_unit_die): Likewise.
16095         (dwarf2_compute_name): Likewise.
16096         (dwarf2_physname): Likewise.
16097         (read_import_statement): Likewise.
16098         (create_cus_hash_table): Assign dwarf2_physname instead of
16099         objfile.
16100         (read_func_scope): Access objfile through dwarf2_per_objfile.
16101         (read_lexical_block_scope): Likewise.
16102         (read_call_site_scope): Likewise.
16103         (read_variable): Likewise.
16104         (dwarf2_rnglists_process): Likewise.
16105         (dwarf2_ranges_process): Likewise.
16106         (dwarf2_ranges_read): Likewise.
16107         (dwarf2_record_block_ranges): Likewise.
16108         (dwarf2_add_field): Likewise.
16109         (dwarf2_add_member_fn): Likewise.
16110         (read_structure_type): Likewise.
16111         (process_structure_scope): Likewise.
16112         (read_enumeration_type): Likewise.
16113         (read_array_type): Likewise.
16114         (read_common_block): Likewise.
16115         (read_namespace_type): Likewise.
16116         (read_namespace): Likewise.
16117         (read_module_type): Likewise.
16118         (read_tag_pointer_type): Likewise.
16119         (read_tag_ptr_to_member_type): Likewise.
16120         (read_tag_string_type): Likewise.
16121         (read_subroutine_type): Likewise.
16122         (read_typedef): Likewise.
16123         (read_base_type): Likewise.
16124         (attr_to_dynamic_prop): Likewise.
16125         (read_subrange_type): Likewise.
16126         (read_unspecified_type): Likewise.
16127         (load_partial_dies): Likewise.
16128         (read_partial_die): Likewise.
16129         (find_partial_die): Likewise.
16130         (guess_partial_die_structure_name): Likewise.
16131         (fixup_partial_die): Likewise.
16132         (read_attribute_value): Likewise.
16133         (read_addr_index_from_leb128): Likewise.
16134         (dwarf2_read_addr_index): Likewise.
16135         (dwarf2_string_attr): Likewise.
16136         (lnp_state_machine::check_line_address): Likewise.
16137         (dwarf_decode_lines_1): Likewise.
16138         (dwarf_decode_lines): Likewise.
16139         (dwarf2_start_symtab): Likewise.
16140         (var_decode_location): Likewise.
16141         (new_symbol_full): Likewise.
16142         (dwarf2_const_value_data): Likewise.
16143         (dwarf2_const_value_attr): Likewise.
16144         (dwarf2_const_value): Likewise.
16145         (die_type): Likewise.
16146         (die_containing_type): Likewise.
16147         (lookup_die_type): Likewise.
16148         (guess_full_die_structure_name): Likewise.
16149         (anonymous_struct_prefix): Likewise.
16150         (dwarf2_name): Likewise.
16151         (follow_die_ref_or_sig): Likewise.
16152         (follow_die_offset): Likewise.
16153         (follow_die_ref): Likewise.
16154         (dwarf2_fetch_die_loc_sect_off): Likewise.
16155         (dwarf2_fetch_constant_bytes): Likewise.
16156         (dwarf2_fetch_die_type_sect_off): Likewise.
16157         (dwarf2_get_die_type): Likewise.
16158         (follow_die_sig): Likewise.
16159         (decode_locdesc): Likewise.
16160         (dwarf2_per_cu_objfile): Likewise.
16161         (dwarf2_per_cu_text_offset): Likewise.
16162         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16163         objfile.
16164         (set_die_type): Access objfile through
16165         dwarf2_per_objfile.
16166
16167 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16168
16169         * valprint.c (converted_character_d): Remove typedef.
16170         (DEF_VEC_O (converted_character_d)): Remove.
16171         (count_next_character): Use std::vector.
16172         (print_converted_chars_to_obstack): Likewise.
16173         (generic_printstr): Likewise.
16174
16175 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16176
16177         * xml-support.h (struct gdb_xml_value): Add constructor.
16178         <value>: Change type to unique_xmalloc_ptr.
16179         (gdb_xml_value_s): Remove typedef.
16180         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16181         (gdb_xml_element_start_handler): Change parameter type to
16182         std::vector.
16183         (xml_find_attribute): Likewise.
16184         * xml-support.c (xml_find_attribute): Change parameter type to
16185         std::vector and adjust.
16186         (gdb_xml_values_cleanup): Remove.
16187         (gdb_xml_parser::start_element): Adjust to std::vector.
16188         (xinclude_start_include): Change paraeter type to std::vector
16189         and adjust.
16190         * btrace.c (check_xml_btrace_version): Likewise.
16191         (parse_xml_btrace_block): Likewise.
16192         (parse_xml_btrace_pt_config_cpu): Likewise.
16193         (parse_xml_btrace_pt): Likewise.
16194         (parse_xml_btrace_conf_bts): Likewise.
16195         (parse_xml_btrace_conf_pt): Likewise.
16196         * memory-map.c (memory_map_start_memory): Likewise.
16197         (memory_map_start_property): Likewise.
16198         * osdata.c (osdata_start_osdata): Likewise.
16199         (osdata_start_item): Likewise.
16200         (osdata_start_column): Likewise.
16201         * remote.c (start_thread): Likewise.
16202         * solib-aix.c (library_list_start_library): Likewise.
16203         (library_list_start_list): Likewise.
16204         * solib-svr4.c (library_list_start_library): Likewise.
16205         (svr4_library_list_start_list): Likewise.
16206         * solib-target.c (library_list_start_segment): Likewise.
16207         (library_list_start_section): Likewise.
16208         (library_list_start_library): Likewise.
16209         (library_list_start_list): Likewise.
16210         * tracepoint.c (traceframe_info_start_memory): Likewise.
16211         (traceframe_info_start_tvar): Likewise.
16212         * xml-syscall.c (syscall_start_syscall): Likewise.
16213         * xml-tdesc.c (tdesc_start_target): Likewise.
16214         (tdesc_start_feature): Likewise.
16215         (tdesc_start_reg): Likewise.
16216         (tdesc_start_union): Likewise.
16217         (tdesc_start_struct): Likewise.
16218         (tdesc_start_flags): Likewise.
16219         (tdesc_start_enum): Likewise.
16220         (tdesc_start_field): Likewise.
16221         (tdesc_start_enum_value): Likewise.
16222         (tdesc_start_vector): Likewise.
16223
16224 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16225
16226         * extension.h (struct xmethod_worker) <clone>: Remove.
16227         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16228         Remove.
16229         (python_xmethod_worker::clone): Remove.
16230         * valops.c (find_overload_match): Use std::move instead of
16231         clone.
16232
16233 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16234
16235         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16236         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16237         <free_xmethod_worker_data>: Remove.
16238         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16239         <get_xmethod_arg_types>: Remove.
16240         <get_xmethod_result_type>: Remove.
16241         <invoke_xmethod>: Remove.
16242         * extension.c (new_xmethod_worker): Remove.
16243         (clone_xmethod_worker): Remove.
16244         (get_matching_xmethod_workers): Return void, pass std::vector by
16245         pointer.
16246         (get_xmethod_arg_types): Rename to...
16247         (xmethod_worker::get_arg_types): ... this, and adjust.
16248         (get_xmethod_result_type): Rename to...
16249         (xmethod_worker::get_result_type): ... this, and adjust.
16250         (invoke_xmethod): Remove.
16251         (free_xmethod_worker): Remove.
16252         (free_xmethod_worker_vec): Remove.
16253         * extension.h (enum ext_lang_rc): Move here from
16254         extension-priv.h.
16255         (struct xmethod_worker): Add constructor and destructor.
16256         <data>: Remove.
16257         <value>: Remove.
16258         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16259         virtual pure methods.
16260         <get_arg_types, get_result_type>: New methods.
16261         (xmethod_worker_ptr): Remove typedef.
16262         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16263         (xmethod_worker_vec): Remove typedef.
16264         (xmethod_worker_up): New typedef.
16265         (invoke_xmethod): Remove.
16266         (clone_xmethod_worker): Remove.
16267         (free_xmethod_worker): Remove.
16268         (free_xmethod_worker_vec): Remove.
16269         (get_xmethod_arg_types): Remove.
16270         (get_xmethod_result_type): Remove.
16271         * valops.c (find_method_list): Use std::vector, don't use
16272         intermediate vector.
16273         (value_find_oload_method_list): Use std::vector.
16274         (find_overload_match): Use std::vector.
16275         (find_oload_champ): Use std::vector.
16276         * value.c (value_free): Use operator delete.
16277         (value_of_xmethod): Rename to...
16278         (value_from_xmethod): ... this.  Don't assign
16279         xmethod_worker::value, take rvalue-reference.
16280         (result_type_of_xmethod): Adjust.
16281         (call_xmethod): Adjust.
16282         * value.h: Include extension.h.
16283         (struct xmethod_worker): Don't forward-declare.
16284         (value_of_xmethod): Rename to...
16285         (value_from_xmethod): ... this, take rvalue-reference.
16286         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16287         (struct python_xmethod_worker): ... this, add constructor and
16288         destructor.
16289         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16290         (gdbpy_free_xmethod_worker_data): Rename to...
16291         (python_xmethod_worker::~python_xmethod_worker): ... this and
16292         adjust.
16293         (gdbpy_clone_xmethod_worker_data): Rename to...
16294         (python_xmethod_worker::clone): ... this and adjust.
16295         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16296         temporary vector.
16297         (gdbpy_get_xmethod_arg_types): Rename to...
16298         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16299         (gdbpy_get_xmethod_result_type): Rename to...
16300         (python_xmethod_worker::do_get_result_type): ... this and
16301         adjust.
16302         (gdbpy_invoke_xmethod): Rename to...
16303         (python_xmethod_worker::invoke): ... this and adjust.
16304         (new_python_xmethod_worker): Rename to...
16305         (python_xmethod_worker::python_xmethod_worker): ... this and
16306         adjust.
16307         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16308         Remove.
16309         (gdbpy_free_xmethod_worker_data): Remove.
16310         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16311         (gdbpy_get_xmethod_arg_types): Remove.
16312         (gdbpy_get_xmethod_result_type): Remove.
16313         (gdbpy_invoke_xmethod): Remove.
16314         * python/python.c (python_extension_ops): Remove obsolete
16315         callbacks.
16316
16317 2018-01-05  Pedro Alves  <palves@redhat.com>
16318
16319         PR gdb/18653
16320         * common/signals-state-save-restore.c
16321         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16322         find a custom handler preinstalled, instead of internal erroring.
16323         But only warn if !quiet.
16324         * common/signals-state-save-restore.h
16325         (save_original_signals_state): New parameter 'quiet'.
16326         * main.c (captured_main_1): Move save_original_signals_state call
16327         after option handling, and pass QUIET.
16328
16329 2018-01-05  Pedro Alves  <palves@redhat.com>
16330
16331         * spu-tdep.c (spu_catch_start): Pass
16332         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16333
16334 2018-01-05  Pedro Alves  <palves@redhat.com>
16335
16336         PR gdb/22670
16337         * ada-lang.c (literal_symbol_name_matcher): New function.
16338         (ada_get_symbol_name_matcher): Use it for
16339         symbol_name_match_type::SEARCH_NAME.
16340         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16341         it down instead of assuming symbol_name_match_type::FULL.
16342         * block.h (block_lookup_symbol): New parameter 'match_type'.
16343         * c-valprint.c (print_unpacked_pointer): Use
16344         lookup_symbol_search_name instead of lookup_symbol.
16345         * compile/compile-object-load.c (get_out_value_type): Pass down
16346         symbol_name_match_type::SEARCH_NAME.
16347         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16348         symbol_name_match_type::FULL.
16349         * cp-support.c (cp_get_symbol_name_matcher): Handle
16350         symbol_name_match_type::SEARCH_NAME.
16351         * infrun.c (insert_exception_resume_breakpoint): Use
16352         lookup_symbol_search_name.
16353         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16354         * psymtab.c (maintenance_check_psymtabs): Use
16355         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16356         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16357         SYMBOL_SEARCH_NAME.
16358         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16359         if symbol_name_match_type::SEARCH_NAME.
16360         (lookup_symbol_in_language): Pass down
16361         symbol_name_match_type::FULL.
16362         (lookup_symbol_search_name): New.
16363         (lookup_language_this): Pass down
16364         symbol_name_match_type::SEARCH_NAME.
16365         (lookup_symbol_aux, lookup_local_symbol): New parameter
16366         'match_type'.  Pass it down.
16367         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16368         (lookup_symbol_search_name): New declaration.
16369         (lookup_symbol_in_block): New 'match_type' parameter.
16370
16371 2018-01-05  Pedro Alves  <palves@redhat.com>
16372
16373         PR gdb/22670
16374         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16375         ada_lookup_symbol.
16376         (ada_lookup_symbol): Reimplement in terms of
16377         ada_lookup_symbol_list, bits factored out from
16378         ada_lookup_encoded_symbol.
16379
16380 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16381
16382         * ada-exp.y (write_object_renaming): When subscripting an array
16383         using a symbol as the index, pass the block in call to
16384         ada_lookup_encoded_symbol when looking that symbol up.
16385
16386 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16387
16388         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16389         TYPE_INDEX_TYPE.
16390
16391 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16392
16393         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16394         the case where VALUE_LVAL (val0) is not lval_memory.
16395
16396 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16397
16398         * ada-valprint.c (print_optional_low_bound): Handle
16399         character-indexed array printing like boolean-indexed array
16400         printing.
16401
16402 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16403
16404         * NEWS: Create a new section for the next release branch.
16405         Rename the section of the current branch, now that it has
16406         been cut.
16407
16408 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16409
16410         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16411         * version.in: Bump version to 8.1.50.DATE-git.
16412
16413 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16414
16415         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16416         Add field.
16417         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16418         Add field.
16419         (default_exception_support_info) <catch_handlers_sym>: Add field.
16420         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16421         (ada_exception_name_addr_1): Add "catch handlers" handling.
16422         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16423         Update all callers.
16424         (create_excep_cond_exprs) <ex>: Add parameter.
16425         (re_set_exception): Update create_excep_cond_exprs call.
16426         (print_it_exception, print_one_exception, print_mention_exception)
16427         (print_recreate_exception): Add "catch handler" handling.
16428         (allocate_location_catch_handlers, re_set_catch_handlers)
16429         (check_status_catch_handlers, print_it_catch_handlers)
16430         (print_one_catch_handlers, print_mention_catch_handlers)
16431         (print_recreate_catch_handlers): New function.
16432         (catch_handlers_breakpoint_ops): New variable.
16433         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16434         Add parameter.  Add "catch handler" handling.
16435         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16436         Add "catch handler" handling.
16437         (ada_exception_catchpoint_cond_string): Add "catch handler"
16438         handling.
16439         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16440         call.
16441         (catch_ada_handlers_command): New function.
16442         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16443         operations structure.
16444         (_initialize_ada_language): Add "catch handlers" command entry.
16445         * NEWS: Document "catch handlers" feature.
16446
16447 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16448
16449         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16450         account when creating the array type of the slice.
16451         (ada_value_slice): Likewise.
16452
16453 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16454
16455         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16456         New enum value.
16457         (create_array_type_with_stride): Add byte_stride_prop parameter.
16458         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16459         New parameter.  Update all callers in this file.
16460         (array_type_has_dynamic_stride): New function.
16461         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16462         of arrays with dynamic byte strides.
16463         * dwarf2read.c (read_array_type): Add support for dynamic
16464         DW_AT_byte_stride attributes.
16465
16466 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16467
16468         * dwarf2read.c (read_unspecified_type): Treat
16469         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16470
16471 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16472
16473         Update copyright year range in all GDB files.
16474
16475 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16476
16477         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16478         and gdb/testsuite/gdb.base/step-line.c.
16479
16480 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16481
16482         * copyright.py (main): Dump the contents of
16483         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16484         even if BY_HAND is empty.
16485
16486 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16487
16488         * top.c (print_gdb_version): Update Copyright year in version
16489         message.
16490
16491 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16492
16493         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16494
16495 For older changes see ChangeLog-2017.
16496 \f
16497 Local Variables:
16498 mode: change-log
16499 left-margin: 8
16500 fill-column: 74
16501 version-control: never
16502 coding: utf-8
16503 End: