Support ptype/o in Rust
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-06-26 Tom Tromey <tom@tromey.com>
2
3 PR rust/22574:
4 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6 Update.
7 (rust_internal_print_type): Add podata parameter.
8 (rust_print_type): Update.
9
10 2018-06-26 Tom Tromey <tom@tromey.com>
11
12 * typeprint.h (struct print_offset_data) <update, finish,
13 maybe_print_hole>: New methods.
14 <indentation>: New constant.
15 * typeprint.c (print_offset_data::indentation): Define.
16 (print_offset_data::maybe_print_hole, print_offset_data::update)
17 (print_offset_data::finish): Move from c-typeprint.c and rename.
18 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
19 (print_spaces_filtered_with_print_options): Update.
20 (c_print_type_union_field_offset, maybe_print_hole)
21 (c_print_type_struct_field_offset): Move to typeprint.c and
22 rename.
23 (c_type_print_base_struct_union): Update.
24
25 2018-06-25 Pedro Alves <palves@redhat.com>
26
27 * gdbthread.h (thread_info_ref, delete_thread)
28 (delete_thread_silent, first_thread_of_inferior)
29 (any_thread_of_inferior, switch_to_thread)
30 (enable_thread_stack_temporaries)
31 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
32 (get_last_thread_stack_temporary)
33 (value_in_thread_stack_temporaries, can_access_registers_thread):
34 Spell out "struct thread_info" instead of just "thread_info".
35 * inferior.h (notice_new_inferior): Likewise.
36
37 2018-06-25 Pedro Alves <palves@redhat.com>
38
39 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
40 pass thread_info pointer to delete_thread.
41 (windows_nat_target::detach): Pass inferior pointer to
42 detach_inferior.
43 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
44 delete_thread.
45 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
46 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
47 and pass a thread_info pointer to delete_thread.
48 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
49 pass thread_info pointer to delete_thread.
50 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
51 delete_thread_silent call.
52 * procfs.c (procfs_target::detach): Pass inferior pointer to
53 detach_inferior.
54 (procfs_target::wait): Pass thread_info pointer to delete_thread.
55 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
56 delete_thread_silent call.
57 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
58 pass thread_info pointer to delete_thread.
59 (windows_nat_target::detach): Pass inferior pointer to
60 delete_inferior.
61
62 2018-06-22 Alan Hayward <alan.hayward@arm.com>
63
64 * regcache.c (readable_regcache::read_part): Fix asserts.
65 (reg_buffer::raw_collect_part): New function.
66 (regcache::write_part): Fix asserts.
67 (reg_buffer::raw_supply_part): New function.
68 (regcache::transfer_regset_register): New helper function.
69 (regcache::transfer_regset): Call new functions.
70 (regcache_supply_regset): Use gdb_byte*.
71 (regcache::supply_regset): Likewise.
72 (regcache_collect_regset): Likewise.
73 (regcache::collect_regset): Likewise.
74 * regcache.h (reg_buffer::raw_collect_part): New declaration.
75 (reg_buffer::raw_supply_part): Likewise.
76 (regcache::transfer_regset_register): Likewise.
77 (regcache::transfer_regset): Use gdb_byte*.
78
79 2018-06-22 Alan Hayward <alan.hayward@arm.com>
80
81 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
82
83 2018-06-21 Pedro Alves <palves@redhat.com>
84
85 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
86 instead of a ptid_t. All callers adjusted.
87 * ada-tasks.c (ada_get_task_number): Likewise. All callers
88 adjusted.
89 (print_ada_task_info, display_current_task_id, task_command_1):
90 Adjust.
91 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
92 inferior_thread.
93 (breakpoint_kind): Adjust.
94 (remove_breakpoints_pid): Rename to ...
95 (remove_breakpoints_inf): ... this. Adjust to take an inferior
96 pointer. All callers adjusted.
97 (bpstat_clear_actions): Use inferior_thread.
98 (get_bpstat_thread): New.
99 (bpstat_do_actions): Use it.
100 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
101 to take a thread_info pointer. All callers adjusted.
102 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
103 (breakpoint_re_set_thread): Use inferior_thread.
104 * breakpoint.h (struct inferior): Forward declare.
105 (bpstat_stop_status): Update.
106 (remove_breakpoints_pid): Delete.
107 (remove_breakpoints_inf): New.
108 * bsd-uthread.c (bsd_uthread_target::wait)
109 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
110 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
111 (maint_btrace_packet_history_cmd)
112 (maint_btrace_clear_packet_history_cmd): Adjust.
113 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
114 inferior_thread.
115 * cli/cli-interp.c: Include "inferior.h".
116 * common/refcounted-object.h (struct
117 refcounted_object_ref_policy): New.
118 * compile/compile-object-load.c: Include gdbthread.h.
119 (store_regs): Use inferior_thread.
120 * corelow.c (core_target::close): Use current_inferior.
121 (core_target_open): Adjust to use first_thread_of_inferior and use
122 the current inferior.
123 * ctf.c (ctf_target::close): Adjust to use current_inferior.
124 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
125 <thread>: ... this new field. All references adjusted.
126 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
127 Take a thread_info pointer instead of a ptid_t.
128 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
129 (dummy_frame_discard, register_dummy_frame_dtor): Take a
130 thread_info pointer instead of a ptid_t.
131 * elfread.c: Include "inferior.h".
132 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
133 Use inferior_thread.
134 * eval.c (evaluate_subexp): Likewise.
135 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
136 inferior_thread.
137 * gdb_proc_service.h (struct thread_info): Forward declare.
138 (struct ps_prochandle) <ptid>: Delete, replaced by ...
139 <thread>: ... this new field. All references adjusted.
140 * gdbarch.h, gdbarch.c: Regenerate.
141 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
142 'thread' parameter. All implementations and callers adjusted.
143 * gdbthread.h (thread_info) <set_running>: New method.
144 (delete_thread, delete_thread_silent): Take a thread_info pointer
145 instead of a ptid.
146 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
147 (first_thread_of_process): Delete, replaced by ...
148 (first_thread_of_inferior): ... this new function. All callers
149 adjusted.
150 (any_live_thread_of_process): Delete, replaced by ...
151 (any_live_thread_of_inferior): ... this new function. All callers
152 adjusted.
153 (switch_to_thread, switch_to_no_thread): Declare.
154 (is_executing): Delete.
155 (enable_thread_stack_temporaries): Update comment.
156 <enable_thread_stack_temporaries>: Take a thread_info pointer
157 instead of a ptid_t. Incref the thread.
158 <~enable_thread_stack_temporaries>: Decref the thread.
159 <m_ptid>: Delete
160 <m_thr>: New.
161 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
162 (get_last_thread_stack_temporary)
163 (value_in_thread_stack_temporaries, can_access_registers_thread):
164 Take a thread_info pointer instead of a ptid_t. All callers
165 adjusted.
166 * infcall.c (get_call_return_value): Use inferior_thread.
167 (run_inferior_call): Work with thread pointers instead of ptid_t.
168 (call_function_by_hand_dummy): Work with thread pointers instead
169 of ptid_t. Use thread_info_ref.
170 * infcmd.c (proceed_thread_callback): Access thread's state
171 directly.
172 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
173 access thread's state directly.
174 (continue_command): Use inferior_thread.
175 (info_program_command): Use find_thread_ptid and access thread
176 state directly.
177 (proceed_after_attach_callback): Use thread state directly.
178 (notice_new_inferior): Take a thread_info pointer instead of a
179 ptid_t. All callers adjusted.
180 (exit_inferior): Take an inferior pointer instead of a pid. All
181 callers adjusted.
182 (exit_inferior_silent): New.
183 (detach_inferior): Delete.
184 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
185 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
186 (detach_inferior_command, kill_inferior_command): Use
187 find_inferior_id instead of valid_gdb_inferior_id and
188 gdb_inferior_id_to_pid.
189 (inferior_command): Use inferior and thread pointers.
190 * inferior.h (struct thread_info): Forward declare.
191 (notice_new_inferior): Take a thread_info pointer instead of a
192 ptid_t. All callers adjusted.
193 (detach_inferior): Delete declaration.
194 (exit_inferior, exit_inferior_silent): Take an inferior pointer
195 instead of a pid. All callers adjusted.
196 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
197 (valid_gdb_inferior_id): Delete.
198 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
199 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
200 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
201 ...
202 <inf>: ... this new field.
203 <step_ptid>: Delete, replaced by ...
204 <step_thread>: ... this new field.
205 (get_displaced_stepping_state): Take an inferior pointer instead
206 of a pid. All callers adjusted.
207 (displaced_step_in_progress_any_inferior): Adjust.
208 (displaced_step_in_progress_thread): Take a thread pointer instead
209 of a ptid_t. All callers adjusted.
210 (displaced_step_in_progress, add_displaced_stepping_state): Take
211 an inferior pointer instead of a pid. All callers adjusted.
212 (get_displaced_step_closure_by_addr): Adjust.
213 (remove_displaced_stepping_state): Take an inferior pointer
214 instead of a pid. All callers adjusted.
215 (displaced_step_prepare_throw, displaced_step_prepare)
216 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
217 All callers adjusted.
218 (start_step_over): Adjust.
219 (infrun_thread_ptid_changed): Remove bit updating ptids in the
220 displaced step queue.
221 (do_target_resume): Adjust.
222 (fetch_inferior_event): Use inferior_thread.
223 (context_switch, get_inferior_stop_soon): Take an
224 execution_control_state pointer instead of a ptid_t. All callers
225 adjusted.
226 (switch_to_thread_cleanup): Delete.
227 (stop_all_threads): Use scoped_restore_current_thread.
228 * inline-frame.c: Include "gdbthread.h".
229 (inline_state) <inline_state>: Take a thread pointer instead of a
230 ptid_t. All callers adjusted.
231 <ptid>: Delete, replaced by ...
232 <thread>: ... this new field.
233 (find_inline_frame_state): Take a thread pointer instead of a
234 ptid_t. All callers adjusted.
235 (skip_inline_frames, step_into_inline_frame)
236 (inline_skipped_frames, inline_skipped_symbol): Take a thread
237 pointer instead of a ptid_t. All callers adjusted.
238 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
239 (inline_skipped_frames, inline_skipped_symbol): Likewise.
240 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
241 pointers directly.
242 * linux-nat.c (get_detach_signal): Likewise.
243 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
244 (thread_db_notice_clone): Adjust.
245 (thread_db_find_new_threads_silently)
246 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
247 a thread pointer instead of a ptid_t. All callers adjusted.
248 * mi/mi-cmd-var.c: Include "inferior.h".
249 (mi_cmd_var_update_iter): Update to use thread pointers.
250 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
251 inferior directly.
252 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
253 out to ...
254 (mi_output_running): ... this new function.
255 (mi_on_resume_1): Adjust to use it.
256 (mi_user_selected_context_changed): Adjust to use inferior_thread.
257 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
258 directly.
259 (interrupt_thread_callback): : Adjust to use thread and inferior
260 pointers.
261 * proc-service.c: Include "gdbthread.h".
262 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
263 * progspace-and-thread.c: Include "inferior.h".
264 * progspace.c: Include "inferior.h".
265 * python/py-exitedevent.c (create_exited_event_object): Adjust to
266 hold a reference to an inferior_object.
267 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
268 inferior_thread.
269 * python/py-inferior.c (struct inferior_object): Give the type a
270 tag name instead of a typedef.
271 (python_on_normal_stop): No need to check if the current thread is
272 listed.
273 (inferior_to_inferior_object): Change return type to
274 inferior_object. All callers adjusted.
275 (find_thread_object): Delete, bits factored out to ...
276 (thread_to_thread_object): ... this new function.
277 * python/py-infthread.c (create_thread_object): Use
278 inferior_to_inferior_object.
279 (thpy_is_stopped): Use thread pointer directly.
280 (gdbpy_selected_thread): Use inferior_thread.
281 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
282 field, replaced with ...
283 <thread>: ... this new field. All users adjusted.
284 (btpy_insn_or_gap_new): Drop const.
285 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
286 callers adjusted.
287 * python/py-record.c: Include "gdbthread.h".
288 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
289 a ptid_t. All callers adjusted.
290 (gdbpy_current_recording): Use inferior_thread.
291 * python/py-record.h (recpy_record_object) <ptid>: Delete
292 field, replaced with ...
293 <thread>: ... this new field. All users adjusted.
294 (recpy_element_object) <ptid>: Delete
295 field, replaced with ...
296 <thread>: ... this new field. All users adjusted.
297 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
298 a ptid_t. All callers adjusted.
299 * python/py-threadevent.c: Include "gdbthread.h".
300 (get_event_thread): Use thread_to_thread_object.
301 * python/python-internal.h (struct inferior_object): Forward
302 declare.
303 (find_thread_object, find_inferior_object): Delete declarations.
304 (thread_to_thread_object, inferior_to_inferior_object): New
305 declarations.
306 * record-btrace.c: Include "inferior.h".
307 (require_btrace_thread): Use inferior_thread.
308 (record_btrace_frame_sniffer)
309 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
310 (get_thread_current_frame): Use scoped_restore_current_thread and
311 switch_to_thread.
312 (get_thread_current_frame): Use thread pointer directly.
313 (record_btrace_replay_at_breakpoint): Use thread's inferior
314 pointer directly.
315 * record-full.c: Include "inferior.h".
316 * regcache.c: Include "gdbthread.h".
317 (get_thread_arch_regcache): Use the inferior's address space
318 directly.
319 (get_thread_regcache, registers_changed_thread): New.
320 * regcache.h (get_thread_regcache(thread_info *thread)): New
321 overload.
322 (registers_changed_thread): New.
323 (remote_target) <remote_detach_1>: Swap order of parameters.
324 (remote_add_thread): <remote_add_thread>: Return the new thread.
325 (get_remote_thread_info(ptid_t)): New overload.
326 (remote_target::remote_notice_new_inferior): Use thread pointers
327 directly.
328 (remote_target::process_initial_stop_replies): Use
329 thread_info::set_running.
330 (remote_target::remote_detach_1, remote_target::detach)
331 (extended_remote_target::detach): Adjust.
332 * stack.c (frame_show_address): Use inferior_thread.
333 * target-debug.h (target_debug_print_thread_info_pp): New.
334 * target-delegates.c: Regenerate.
335 * target.c (default_thread_address_space): Delete.
336 (memory_xfer_partial_1): Use current_inferior.
337 (target_detach): Use current_inferior.
338 (target_thread_address_space): Delete.
339 (generic_mourn_inferior): Use current_inferior.
340 * target.h (struct target_ops) <thread_address_space>: Delete.
341 (target_thread_address_space): Delete.
342 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
343 pointers directly.
344 (delete_thread_1, delete_thread, delete_thread_silent): Take a
345 thread pointer instead of a ptid_t. Adjust all callers.
346 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
347 (first_thread_of_process): Delete, replaced by ...
348 (first_thread_of_inferior): ... this new function. All callers
349 adjusted.
350 (any_thread_of_process): Rename to ...
351 (any_thread_of_inferior): ... this, and take an inferior pointer.
352 (any_live_thread_of_process): Rename to ...
353 (any_live_thread_of_inferior): ... this, and take an inferior
354 pointer.
355 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
356 (value_in_thread_stack_temporaries)
357 (get_last_thread_stack_temporary): Take a thread pointer instead
358 of a ptid_t. Adjust all callers.
359 (thread_info::set_running): New.
360 (validate_registers_access): Use inferior_thread.
361 (can_access_registers_ptid): Rename to ...
362 (can_access_registers_thread): ... this, and take a thread
363 pointer.
364 (print_thread_info_1): Adjust to compare thread pointers instead
365 of ptids.
366 (switch_to_no_thread, switch_to_thread): Make extern.
367 (scoped_restore_current_thread::~scoped_restore_current_thread):
368 Use m_thread pointer directly.
369 (scoped_restore_current_thread::scoped_restore_current_thread):
370 Use inferior_thread.
371 (thread_command): Use thread pointer directly.
372 (thread_num_make_value_helper): Use inferior_thread.
373 * top.c (execute_command): Use inferior_thread.
374 * tui/tui-interp.c: Include "inferior.h".
375 * varobj.c (varobj_create): Use inferior_thread.
376 (value_of_root_1): Use find_thread_global_id instead of
377 global_thread_id_to_ptid.
378
379 2018-06-21 Alan Hayward <alan.hayward@arm.com>
380
381 * regcache.c (readable_regcache::read_part): Avoid memcpy when
382 possible.
383 (regcache::write_part): Likewise.
384 (readable_regcache::cooked_read_part): Update comment.
385 (readable_regcache::cooked_write_part): Likewise.
386 * regcache.h: (readable_regcache::read_part): Likewise.
387 (regcache::write_part): Likewise.
388
389 2018-06-21 Richard Bunt <richard.bunt@arm.com>
390 Dirk Schubert <dirk.schubert@arm.com>
391
392 * aarch64-linux-nat.c (post_attach): New.
393 (aarch64_linux_nat_target::post_attach): Override post_attach to
394 record the number of hardware debug registers.
395
396 2018-06-20 Tom Tromey <tom@tromey.com>
397
398 * python/py-param.c (add_setshow_generic): Make parameters const.
399 (parmpy_init): Update.
400
401 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * regcache.h (regcache_cooked_read_ftype): Rename to...
404 (register_read_ftype): ...this, change type to function_view.
405 (class reg_buffer) <save>: Remove src parameter.
406 (readonly_detached_regcache) <readonly_detached_regcache>: Make
407 parameter non-const in first overload. Remove src parameter in
408 second overload.
409 * regcache.c (do_cooked_read): Remove.
410 (readonly_detached_regcache::readonly_detached_regcache): Make
411 parameter non-const, adjust call to other constructor.
412 (reg_buffer::save): Remove src parameter.
413 * frame.c (do_frame_register_read): Remove.
414 (frame_save_as_regcache): Use lambda function.
415 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
416 parameter to ppu2spu_data *.
417 (ppu2spu_sniffer): Use lambda function.
418
419 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
420
421 * record-full.c (record_full_target::insert_breakpoint): Remove
422 "struct" keyword, add const.
423
424 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
425
426 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
427 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
428 * configure.ac: Remove AC_PREREQ, add missing quoting.
429 * gnulib/configure.ac: Modernize usage of
430 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
431 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
432 (AUTOMAKE_VERSION): Bump to 1.15.1.
433 * configure: Re-generate.
434 * config.in: Re-generate.
435 * aclocal.m4: Re-generate.
436 * gnulib/aclocal.m4: Re-generate.
437 * gnulib/config.in: Re-generate.
438 * gnulib/configure: Re-generate.
439 * gnulib/import/Makefile.in: Re-generate.
440
441 2018-06-19 Pedro Alves <palves@redhat.com>
442
443 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
444 (lookup_minimal_symbol_by_pc_section): ... here with
445 gdb_assert_not_reached added.
446
447 2018-06-19 Pedro Alves <palves@redhat.com>
448
449 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
450 parameter with a block parameter. Compare location's block symbol
451 with the frame's block instead of addresses.
452 (skip_inline_frames): Pass the current block instead of the
453 frame's address. Break out as soon as we determine the frame
454 should not be skipped.
455
456 2018-06-18 Tom Tromey <tom@tromey.com>
457
458 * solib-aix.c (solib_aix_get_section_offsets): Return
459 unique_xmalloc_ptr.
460 (solib_aix_solib_create_inferior_hook): Update.
461
462 2018-06-18 Tom Tromey <tom@tromey.com>
463
464 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
465
466 2018-06-18 Tom Tromey <tom@tromey.com>
467
468 * solib-frv.c (frv_relocate_main_executable): Use
469 unique_xmalloc_ptr.
470 * solib-dsbt.c (dsbt_relocate_main_executable): Use
471 unique_xmalloc_ptr.
472
473 2018-06-18 Tom Tromey <tom@tromey.com>
474
475 * objfiles.h (inhibit_section_map_updates): Update.
476 (resume_section_map_updates, resume_section_map_updates_cleanup):
477 Remove.
478 * solib-svr4.c (svr4_handle_solib_event): Update.
479 * objfiles.c (inhibit_section_map_updates): Return
480 scoped_restore_tmpl<int>.
481 (resume_section_map_updates, resume_section_map_updates_cleanup):
482 Remove.
483
484 2018-06-18 Tom Tromey <tom@tromey.com>
485
486 * valprint.h (read_string): Update.
487 * valprint.c (read_string): Change type of "buffer".
488 (val_print_string): Update.
489 * python/py-value.c (valpy_string): Update.
490 * language.h (struct language_defn) <la_get_string>: Change
491 type of "buffer".
492 (default_get_string, c_get_string): Update.
493 * language.c (default_get_string): Change type of "buffer".
494 * guile/scm-value.c (gdbscm_value_to_string): Update.
495 * c-lang.c (c_get_string): Change type of "buffer".
496
497 2018-06-18 Tom Tromey <tom@tromey.com>
498
499 * ser-mingw.c (struct pipe_state_destroyer): New.
500 (pipe_state_up): New typedef.
501 (cleanup_pipe_state): Remove.
502 (pipe_windows_open): Use pipe_state_up. Don't release argv.
503
504 2018-06-18 Tom Tromey <tom@tromey.com>
505
506 * rust-lang.h (rust_yyerror): Don't declare.
507 * rust-lang.c (rust_language_defn): Update.
508 * rust-exp.y (yyerror): Now static.
509 * parse.c (parse_exp_in_context_1): Update.
510 * p-lang.h (p_yyerror): Don't declare.
511 * p-lang.c (p_language_defn): Update.
512 * p-exp.y (yyerror): Now static.
513 * opencl-lang.c (opencl_language_defn): Update.
514 * objc-lang.c (objc_language_defn): Update.
515 * m2-lang.h (m2_yyerror): Don't declare.
516 * m2-lang.c (m2_language_defn): Update.
517 * m2-exp.y (yyerror): Now static.
518 * language.h (struct language_defn) <la_error>: Remove.
519 * language.c (unk_lang_error): Remove.
520 (unknown_language_defn, auto_language_defn): Remove.
521 * go-lang.h (go_yyerror): Don't declare.
522 * go-lang.c (go_language_defn): Update.
523 * go-exp.y (yyerror): Now static.
524 * f-lang.h (f_yyerror): Don't declare.
525 * f-lang.c (f_language_defn): Update.
526 * f-exp.y (yyerror): Now static.
527 * d-lang.h (d_yyerror): Don't declare.
528 * d-lang.c (d_language_defn): Update.
529 * d-exp.y (yyerror): Now static.
530 * c-lang.h (c_yyerror): Don't declare.
531 * c-lang.c (c_language_defn, cplus_language_defn)
532 (asm_language_defn, minimal_language_defn): Update.
533 * c-exp.y (yyerror): Now static.
534 * ada-lang.h (ada_yyerror): Don't declare.
535 * ada-lang.c (ada_language_defn): Update.
536 * ada-exp.y (yyerror): Now static.
537
538 2018-06-18 Alan Hayward <alan.hayward@arm.com>
539
540 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
541 (store_sveregs_to_thread): Likewise.
542 (aarch64_linux_fetch_inferior_registers): Check for SVE.
543 (aarch64_linux_store_inferior_registers): Likewise.
544 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
545 function.
546 (aarch64_sve_regs_copy_to_regcache): Likewise.
547 (aarch64_sve_regs_copy_from_regcache): Likewise.
548 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
549 declaration.
550 (aarch64_sve_regs_copy_to_regcache): Likewise.
551 (aarch64_sve_regs_copy_from_regcache): Likewise.
552 (sve_context): Structure from Linux headers.
553 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
554 (SVE_SIG_ZREG_SIZE): Likewise.
555 (SVE_SIG_PREG_SIZE): Likewise.
556 (SVE_SIG_FFR_SIZE): Likewise.
557 (SVE_SIG_REGS_OFFSET): Likewise.
558 (SVE_SIG_ZREGS_OFFSET): Likewise.
559 (SVE_SIG_ZREG_OFFSET): Likewise.
560 (SVE_SIG_ZREGS_SIZE): Likewise.
561 (SVE_SIG_PREGS_OFFSET): Likewise.
562 (SVE_SIG_PREG_OFFSET): Likewise.
563 (SVE_SIG_PREGS_SIZE): Likewise.
564 (SVE_SIG_FFR_OFFSET): Likewise.
565 (SVE_SIG_REGS_SIZE): Likewise.
566 (SVE_SIG_CONTEXT_SIZE): Likewise.
567 (SVE_PT_REGS_MASK): Likewise.
568 (SVE_PT_REGS_FPSIMD): Likewise.
569 (SVE_PT_REGS_SVE): Likewise.
570 (SVE_PT_VL_INHERIT): Likewise.
571 (SVE_PT_VL_ONEXEC): Likewise.
572 (SVE_PT_REGS_OFFSET): Likewise.
573 (SVE_PT_FPSIMD_OFFSET): Likewise.
574 (SVE_PT_FPSIMD_SIZE): Likewise.
575 (SVE_PT_SVE_ZREG_SIZE): Likewise.
576 (SVE_PT_SVE_PREG_SIZE): Likewise.
577 (SVE_PT_SVE_FFR_SIZE): Likewise.
578 (SVE_PT_SVE_FPSR_SIZE): Likewise.
579 (SVE_PT_SVE_FPCR_SIZE): Likewise.
580 (__SVE_SIG_TO_PT): Likewise.
581 (SVE_PT_SVE_OFFSET): Likewise.
582 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
583 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
584 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
585 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
586 (SVE_PT_SVE_PREG_OFFSET): Likewise.
587 (SVE_PT_SVE_PREGS_SIZE): Likewise.
588 (SVE_PT_SVE_FFR_OFFSET): Likewise.
589 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
590 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
591 (SVE_PT_SVE_SIZE): Likewise.
592 (SVE_PT_SIZE): Likewise.
593 (HAS_SVE_STATE): New define.
594
595 2018-06-18 Alan Hayward <alan.hayward@arm.com>
596
597 * nat/aarch64-sve-linux-sigcontext.h: New file.
598 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
599 new files.
600 (SVE_VQ_MIN): Likewise.
601 (SVE_VQ_MAX): Likewise.
602 (SVE_VL_MIN): Likewise.
603 (SVE_VL_MAX): Likewise.
604 (SVE_NUM_ZREGS): Likewise.
605 (SVE_NUM_PREGS): Likewise.
606 (sve_vl_valid): Likewise.
607 (struct user_sve_header): Likewise.
608
609 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
610 Richard Bunt <Richard.Bunt@arm.com>
611
612 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
613 was requested by GDB.
614
615 2018-06-15 Tom de Vries <tdevries@suse.de>
616
617 * MAINTAINERS (Write After Approval): Add Tom de Vries.
618
619 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
620
621 * gnulib/update-gnulib.sh: Print expected versions of
622 autoconf/aclocal.
623
624 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
625
626 * arch-utils.c (default_type_align): Use type_length_units.
627 * gdbtypes.c (type_align): Use type_length_units.
628
629 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
630
631 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
632 of 'define' command.
633
634 2018-06-14 Tom de Vries <tdevries@suse.de>
635
636 PR cli/22573
637 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
638 get_no_prettyformat_print_options.
639
640 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
641
642 * sparc-nat.h: Include target.h.
643 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
644 <fetch_registers>: Remove this argument in function call.
645 <store_registers>: Remove this argument in function call, remove
646 extra semicolon.
647 <low_forget_process>: Call sparc64_forget_process instead of
648 sparc_forget_process.
649
650 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
651
652 * procfs.c (_initialize_procfs): Use add_inf_child_target.
653 (procfs_target::make_corefile_notes): Adjust to new
654 target_read_alloc return type.
655
656 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
657 Stephen Roberts <stephen.roberts@arm.com>
658
659 PR gdb/22882
660 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
661 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
662 Move should_notify_stop local into more inner scope.
663
664 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
665 Stephen Roberts <stephen.roberts@arm.com>
666
667 PR gdb/22882
668 * infrun.c (resume_1): Add call to mark_async_event_handler.
669
670 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
671
672 * infrun.c (do_target_wait): Change old version of $pc printed.
673
674 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
675
676 * dwarf2read.c (read_index_from_section): Rename to...
677 (read_gdb_index_from_section): ... this, update all callers.
678 (dwarf2_read_index): Rename to...
679 (dwarf2_read_gdb_index): ... this, update all callers.
680
681 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
682
683 * gdb/hppa-linux-nat.c
684 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
685 hppa_linux_nat_target::fetch_registers.
686
687 2018-06-11 Alan Hayward <alan.hayward@arm.com>
688
689 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
690 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
691 (AARCH64_DWARF_SVE_FFR): Likewise.
692 (AARCH64_DWARF_SVE_P0): Likewise.
693 (AARCH64_DWARF_SVE_Z0): Likewise.
694
695 2018-06-11 Alan Hayward <alan.hayward@arm.com>
696
697 * common/common-regcache.h (raw_compare): New function.
698 * regcache.c (regcache::raw_compare): Likewise.
699 * regcache.h (regcache::raw_compare): New declaration.
700
701 2018-06-11 Alan Hayward <alan.hayward@arm.com>
702
703 * common/common-regcache.h (reg_buffer_common): New structure.
704 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
705 (reg_buffer::raw_supply): Likewise.
706 (reg_buffer::raw_supply_integer): Likewise.
707 (reg_buffer::raw_supply_zeroed): Likewise.
708 (reg_buffer::raw_collect): Likewise.
709 (reg_buffer::raw_collect_integer): Likewise.
710 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
711 (reg_buffer::raw_supply): Likewise.
712 (reg_buffer::raw_supply_integer): Likewise.
713 (reg_buffer::raw_supply_zeroed): Likewise.
714 (reg_buffer::raw_collect): Likewise.
715 (reg_buffer::raw_collect_integer): Likewise.
716
717 2018-06-10 Tom Tromey <tom@tromey.com>
718
719 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
720 (class remote_state) <stop_reply_queue>: Now std::vector.
721 (remote_state::~remote_state)
722 (remote_target::stop_reply_queue_length): Update.
723 (struct queue_iter_param, remove_child_of_pending_fork)
724 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
725 (check_pending_event_prevents_wildcard_vcont_callback)
726 (remove_stop_reply_for_inferior)
727 (remove_stop_reply_of_remote_state)
728 (remote_notif_remove_once_on_match)
729 (stop_reply_match_ptid_and_ws)
730 (remote_kill_child_of_pending_fork): Remove.
731 (remote_target::remove_new_fork_children)
732 (remote_target::check_pending_events_prevent_wildcard_vcont)
733 (remote_target::discard_pending_stop_replies)
734 (remote_target::discard_pending_stop_replies_in_queue)
735 (remote_target::remote_notif_remove_queued_reply)
736 (remote_target::queued_stop_reply)
737 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
738 (remote_target::wait, remote_target::kill_new_fork_children)
739 (remote_target::async): Update.
740
741 2018-06-10 Tom Tromey <tom@tromey.com>
742
743 * record-full.c (record_full_arch_list_cleanups): Remove.
744 (record_full_message): Use try/catch.
745 (record_full_wait_cleanups): Remove.
746 (record_full_wait_1): Use try/catch.
747 (record_full_restore): Likewise.
748
749 2018-06-10 Tom Tromey <tom@tromey.com>
750
751 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
752 declare VEC. Add constructor.
753 <in_target_beneath>: Now bool.
754 (record_full_breakpoints): Now a std::vector, static.
755 (record_full_sync_record_breakpoints)
756 (record_full_init_record_breakpoints)
757 (record_full_target::insert_breakpoint)
758 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
759
760 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * dwarf2read.c (process_cu_includes): Remove struct keyword.
763 * serial.c (serial_interface_lookup): Remove struct keyword.
764
765 2018-06-10 Tom Tromey <tom@tromey.com>
766
767 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
768 method.
769 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
770 a method.
771 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
772 method.
773 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
774 "beneath" as a method.
775 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
776 Use "beneath" as a method.
777
778 2018-06-10 Tom Tromey <tom@tromey.com>
779
780 * tracefile.c (struct trace_file_writer_deleter): New.
781 <operator()>: Rename from trace_file_writer_xfree.
782 (trace_file_writer_up): New typedef.
783 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
784
785 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
786
787 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
788 <m_registers, m_register_status>: Change type to
789 std::unique_ptr.
790 * regcache.c (reg_buffer::reg_buffer): Use new instead of
791 XCNEWVEC.
792
793 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
794
795 * common/common-regcache.h (enum register_status): Add
796 underlying type "signed char".
797 * regcache.h (reg_buffer) <m_register_status>: Change type to
798 register_status *.
799 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
800 register_status instead of signed char.
801 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
802 (reg_buffer::get_register_status): Remove cast.
803 (readable_regcache::raw_read): Remove cast.
804 (readable_regcache::cooked_read): Remove cast.
805
806 2018-06-09 Tom Tromey <tom@tromey.com>
807
808 * source.c (reverse_search_command, forward_search_command): Use
809 scoped_fd.
810
811 2018-06-09 Tom Tromey <tom@tromey.com>
812
813 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
814 (serial_ops_list): Now static, std::vector.
815 (serial_interface_lookup, serial_add_interface): Update.
816
817 2018-06-09 Tom Tromey <tom@tromey.com>
818
819 * dwarf2read.c (process_cu_includes): Update.
820 (process_full_comp_unit): Update.
821 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
822 std::vector.
823
824 2018-06-08 Paul Koning <paul_koning@dell.com>
825
826 PR gdb/23252
827
828 * python/python.c (do_start_initialization):
829 Avoid call to internal Python API.
830 (init__gdb_module): New function.
831
832 2018-06-08 Gary Benson <gbenson@redhat.com>
833
834 * linux-thread-db.c (valprint.h): New include.
835 (struct check_thread_db_info): New structure.
836 (check_thread_db_on_load, tdb_testinfo): New static globals.
837 (check_thread_db, check_thread_db_callback): New functions.
838 (try_thread_db_load_1): Run integrity checks if requested.
839 (maintenance_check_libthread_db): New function.
840 (_initialize_thread_db): Register "maint check libthread-db"
841 and "maint set/show check-libthread-db".
842 * NEWS: Mention the above new commands.
843
844 2018-06-08 Tom Tromey <tom@tromey.com>
845
846 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
847 now a method.
848
849 2018-06-08 Tom Tromey <tom@tromey.com>
850
851 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
852
853 2018-06-08 Tom Tromey <tom@tromey.com>
854
855 * common/btrace-common.h (struct btrace_data): Add constructor,
856 destructor, move assignment operator.
857 <empty, clear, fini>: New methods.
858 <format>: Initialize.
859 (btrace_data_init, btrace_data_fini, btrace_data_clear)
860 (btrace_data_empty): Don't declare.
861 * common/btrace-common.c (btrace_data_init): Remove.
862 (btrace_data::fini): Rename from btrace_data_fini.
863 (btrace_data::empty): Rename from btrace_data_empty.
864 (btrace_data::clear): Rename from btrace_data_clear. Return
865 bool.
866 * btrace.h (make_cleanup_btrace_data): Don't declare.
867 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
868 (parse_xml_btrace): Update.
869 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
870 (maint_btrace_clear_packet_history_cmd): Update.
871
872 2018-06-07 Pedro Alves <palves@redhat.com>
873
874 * target.h (target_ops) <beneath>: Now a method. All references
875 updated.
876 (class target_stack): New.
877 * target.c (g_target_stack): New.
878 (g_current_top_target): Delete.
879 (current_top_target): Get the top target out of g_target_stack.
880 (target_stack::push, target_stack::unpush): New.
881 (push_target, unpush_target): Reimplement.
882 (target_is_pushed): Reimplement in terms of g_target_stack.
883 (target_ops::beneath, target_stack::find_beneath): New.
884
885 2018-06-07 Pedro Alves <palves@redhat.com>
886
887 * target.h (find_target_beneath): Delete declaration.
888 * target.c (find_target_beneath): Delete definition.
889 * aix-thread.c: All callers of find_target_beneath adjusted to
890 call target_ops::beneath instead.
891 * bsd-uthread.c: Likewise.
892 * linux-thread-db.c: Likewise.
893 * ravenscar-thread.c: Likewise.
894 * sol-thread.c: Likewise.
895 * spu-multiarch.c: Likewise.
896
897 2018-06-07 Pedro Alves <palves@redhat.com>
898
899 * target.h (target_ops) <beneath>: Now a method. All references
900 updated.
901 (target_ops) <m_beneath>: New.
902 * target.c (target_ops::beneath): New.
903 * corelow.c: Adjust all references to target_ops::beneath.
904 * linux-thread-db.c: Likewise.
905 * make-target-delegates: Likewise.
906 * record-btrace.c: Likewise.
907 * record-full.c: Likewise.
908 * remote.c: Likewise.
909 * target.c: Likewise.
910 * target-delegates.c: Regenerate.
911
912 2018-06-07 Pedro Alves <palves@redhat.com>
913
914 * target.h (target_stack): Delete.
915 (current_top_target): Declare function.
916 * target.c (target_stack): Delete.
917 (g_current_top_target): New.
918 (current_top_target): New function.
919 * auxv.c: Use current_top_target instead of target_stack
920 throughout.
921 * avr-tdep.c: Likewise.
922 * breakpoint.c: Likewise.
923 * corefile.c: Likewise.
924 * elfread.c: Likewise.
925 * eval.c: Likewise.
926 * exceptions.c: Likewise.
927 * frame.c: Likewise.
928 * gdbarch-selftests.c: Likewise.
929 * gnu-v3-abi.c: Likewise.
930 * ia64-tdep.c: Likewise.
931 * ia64-vms-tdep.c: Likewise.
932 * infcall.c: Likewise.
933 * infcmd.c: Likewise.
934 * infrun.c: Likewise.
935 * linespec.c: Likewise.
936 * linux-tdep.c: Likewise.
937 * minsyms.c: Likewise.
938 * ppc-linux-nat.c: Likewise.
939 * ppc-linux-tdep.c: Likewise.
940 * procfs.c: Likewise.
941 * regcache.c: Likewise.
942 * remote.c: Likewise.
943 * rs6000-tdep.c: Likewise.
944 * s390-linux-nat.c: Likewise.
945 * s390-tdep.c: Likewise.
946 * solib-aix.c: Likewise.
947 * solib-darwin.c: Likewise.
948 * solib-dsbt.c: Likewise.
949 * solib-spu.c: Likewise.
950 * solib-svr4.c: Likewise.
951 * solib-target.c: Likewise.
952 * sparc-tdep.c: Likewise.
953 * sparc64-tdep.c: Likewise.
954 * spu-tdep.c: Likewise.
955 * symfile.c: Likewise.
956 * symtab.c: Likewise.
957 * target-descriptions.c: Likewise.
958 * target-memory.c: Likewise.
959 * target.c: Likewise.
960 * target.h: Likewise.
961 * tracefile-tfile.c: Likewise.
962 * tracepoint.c: Likewise.
963 * valops.c: Likewise.
964 * valprint.c: Likewise.
965 * value.c: Likewise.
966 * windows-tdep.c: Likewise.
967 * mi/mi-main.c: Likewise.
968
969 2018-06-07 Tom Tromey <tom@tromey.com>
970
971 * valprint.h (build_address_symbolic): Declare.
972 * printcmd.c (print_address_symbolic): Update.
973 (build_address_symbolic): Change "name" and "filename" to
974 std::string.
975 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
976 Update.
977 * defs.h (build_address_symbolic): Remove declaration.
978
979 2018-06-07 Alan Hayward <alan.hayward@arm.com>
980
981 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
982 (aarch64_vnv_type): Add function.
983 (aarch64_pseudo_register_name): Add V regs for SVE.
984 (aarch64_pseudo_register_type): Likewise.
985 (aarch64_pseudo_register_reggroup_p): Likewise.
986 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
987 (aarch64_pseudo_read_value): Add V regs for SVE.
988 (aarch64_pseudo_write_2): Use V0 offset for SVE
989 (aarch64_pseudo_write): Add V regs for SVE.
990 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
991
992 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
993
994 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
995 (sve_vl_from_vq): Likewise.
996
997 2018-06-05 Tom Tromey <tom@tromey.com>
998
999 * cli/cli-cmds.c (show_version): Update.
1000 * top.c (print_gdb_version): Add "interactive" parameter.
1001 Update.
1002 * main.c (captured_main_1): Update.
1003 * top.h (print_gdb_version): Add "interactive" parameter and a
1004 comment.
1005
1006 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1007
1008 * common/enum-flags.h: Add trailing semicolon to example in
1009 comment.
1010
1011 2018-06-05 Tom Tromey <tom@tromey.com>
1012
1013 PR cli/12326:
1014 * NEWS: Add entry about pager.
1015 * utils.c (pagination_disabled_for_command): New global.
1016 (prompt_for_continue): Allow "c" response to prompt.
1017 (reinitialize_more_filter): Clear
1018 pagination_disabled_for_command.
1019 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1020
1021 2018-06-04 Tom Tromey <tom@tromey.com>
1022
1023 * ada-lang.h (ada_lookup_symbol_list): Update.
1024 * ada-lang.c (resolve_subexp): Update.
1025 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1026 parameter.
1027 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1028 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1029 results parameter to std::vector.
1030 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1031 Update.
1032 * ada-exp.y (block_lookup): Update.
1033 (select_possible_type_sym): Change type of syms. Remove nsyms
1034 parameter.
1035 (write_var_or_type, write_name_assoc): Update.
1036
1037 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1038
1039 * windows-nat.c (windows_nat_target::xfer_partial): Return
1040 TARGET_XFER_E_IO if we need to delegate to the target beneath
1041 but BENEATH is NULL.
1042
1043 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1044
1045 * Makefile.in (config.status): Add configure.nat as a
1046 dependency.
1047
1048 2018-06-04 Tom Tromey <tom@tromey.com>
1049
1050 * cp-name-parser.y (cpname_state): Add method declarations.
1051 (HANDLE_QUAL): Update.
1052 (cpname_state::d_grab, cpname_state::fill_comp)
1053 (cpname_state::make_operator, cpname_state::make_dtor)
1054 (cpname_state::make_builtin_type, cpname_state::make_name)
1055 (cpname_state::d_qualify, cpname_state::d_int_type)
1056 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1057 (%union): Move earlier.
1058
1059 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1060
1061 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1062
1063 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1064
1065 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1066 (aarch64_pseudo_write_1): Likewise.
1067 (aarch64_pseudo_read_value): Use helper.
1068 (aarch64_pseudo_write): Likewise.
1069
1070 2018-06-04 Pedro Alves <palves@redhat.com>
1071
1072 * darwin-nat.c (darwin_ops): Delete.
1073 (darwin_attach_pid): Use get_native_target.
1074
1075 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1076
1077 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1078 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1079
1080 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1081
1082 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1083 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1084 (aarch64_gdbarch_init): Check for SVE.
1085 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1086
1087 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1088
1089 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1090 * aarch64-tdep.h (aarch64_read_description): Likewise.
1091 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1092 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1093 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1094 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1095 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1096
1097 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1098
1099 * value.c (value_fetch_lazy_bitfield): New.
1100 (value_fetch_lazy_memory): New.
1101 (value_fetch_lazy_register): New.
1102 (value_fetch_lazy): Factor out to smaller functions.
1103
1104 2018-06-01 Tom Tromey <tom@tromey.com>
1105
1106 * cp-name-parser.y (backslashable, represented): Now const.
1107
1108 2018-06-01 Tom Tromey <tom@tromey.com>
1109
1110 * cp-name-parser.y: Include parser-defs.h.
1111 (parser_fprintf): Remove declaration.
1112
1113 2018-06-01 Tom Tromey <tom@tromey.com>
1114
1115 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1116 %parse-param.
1117 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1118 (global_result): Remove globals.
1119 (struct cpname_state): New.
1120 (yyparse): Don't declare.
1121 (yylex, yyerror): Move declarations after %union.
1122 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1123 (make_name): Add state parameter.
1124 Update all callers.
1125 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1126 parameter.
1127 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1128 Update.
1129 (yylex): Add lvalp, state parameters.
1130 (yyerror): Add state parameter.
1131 (cp_demangled_name_to_comp): Update.
1132
1133 2018-06-01 Tom Tromey <tom@tromey.com>
1134
1135 * cp-name-parser.y (parser_fprintf): Declare.
1136 (GDB_YY_REMAP_PREFIX): Define.
1137 Include yy-remap.h. Don't redefine yy* identifiers.
1138
1139 2018-06-01 Tom Tromey <tom@tromey.com>
1140
1141 * python/py-type.c (typy_legacy_template_argument): Update.
1142 * cp-support.h (cp_demangled_name_to_comp): Update.
1143 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1144 parameter to be a "std::string *".
1145 (main): Update.
1146
1147 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 * ada-lex.l: Include "diagnostics.h" instead of
1150 "common/diagnostics.h".
1151 * unittests/environ-selftests.c: Likewise.
1152 * common/diagnostics.h: Moved to ../include.
1153
1154 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1155
1156 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1157 to language_mode_manual while calling breakpoint_re_set_one.
1158
1159 2018-06-01 Tom Tromey <tom@tromey.com>
1160
1161 * valops.c (value_cast_structs, destructor_name_p): Update.
1162 * symtab.c (gdb_mangle_name): Update.
1163 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1164 Update.
1165 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1166 (pascal_object_print_value_fields, pascal_object_print_value):
1167 Update.
1168 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1169 * linespec.c (find_methods): Update.
1170 * gdbtypes.h (type_name_no_tag): Remove.
1171 (type_name_or_error): Rename from type_name_no_tag_or_error.
1172 * gdbtypes.c (type_name_no_tag): Remove.
1173 (type_name_or_error): Rename from type_name_no_tag_or_error.
1174 (lookup_struct_elt_type, check_typedef): Update.
1175 * expprint.c (print_subexp_standard): Update.
1176 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1177 * d-namespace.c (d_lookup_nested_symbol): Update.
1178 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1179 (cp_print_class_member): Update.
1180 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1181 * completer.c (add_struct_fields): Update.
1182 * c-typeprint.c (cp_type_print_derivation_info)
1183 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1184 Update.
1185 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1186 (ada_prefer_type, ada_is_exception_sym): Update.
1187
1188 2018-06-01 Tom Tromey <tom@tromey.com>
1189
1190 * valops.c (enum_constant_from_type, value_namespace_elt)
1191 (value_maybe_namespace_elt): Update.
1192 * valarith.c (find_size_for_pointer_math): Update.
1193 * target-descriptions.c (make_gdb_type): Update.
1194 * symmisc.c (print_symbol): Update.
1195 * stabsread.c (define_symbol, read_type)
1196 (complain_about_struct_wipeout, add_undefined_type)
1197 (cleanup_undefined_types_1): Update.
1198 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1199 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1200 (rust_internal_print_type, rust_composite_type)
1201 (rust_evaluate_funcall, rust_evaluate_subexp)
1202 (rust_inclusive_range_type_p): Update.
1203 * python/py-type.c (typy_get_tag): Update.
1204 * p-typeprint.c (pascal_type_print_base): Update.
1205 * mdebugread.c (parse_symbol, parse_type): Update.
1206 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1207 Update.
1208 * guile/scm-type.c (gdbscm_type_tag): Update.
1209 * go-lang.c (sixg_string_p): Update.
1210 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1211 Update.
1212 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1213 (TYPE_TAG_NAME): Remove.
1214 * gdbtypes.c (type_name_no_tag): Simplify.
1215 (check_typedef, check_types_equal, recursive_dump_type)
1216 (copy_type_recursive, arch_composite_type): Update.
1217 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1218 in summary mode when needed.
1219 * eval.c (evaluate_funcall): Update.
1220 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1221 (process_structure_scope, read_enumeration_type)
1222 (read_namespace_type, read_module_type, determine_prefix): Update.
1223 * cp-support.c (inspect_type): Update.
1224 * coffread.c (process_coff_symbol, decode_base_type): Update.
1225 * c-varobj.c (c_is_path_expr_parent): Update.
1226 * c-typeprint.c (c_type_print_base_struct_union): Update.
1227 (c_type_print_base_1): Update. Print struct/class/union/enum in
1228 summary when using C language.
1229 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1230 (gen_maybe_namespace_elt): Update.
1231 * ada-lang.c (ada_type_name): Simplify.
1232 (empty_record, ada_template_to_fixed_record_type_1)
1233 (template_to_static_fixed_type)
1234 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1235
1236 2018-06-01 Tom Tromey <tom@tromey.com>
1237
1238 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1239 c_print_type.
1240 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1241 (c_print_type): Update.
1242 (c_print_type): New overload.
1243 (c_type_print_varspec_prefix, c_type_print_args)
1244 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1245 (c_type_print_base_struct_union, c_type_print_base_1)
1246 (cp_type_print_method_args): Add "language" parameter.
1247 (c_type_print_base): Update.
1248 * c-lang.h (c_print_type): Add new overload.
1249
1250 2018-06-01 Tom Tromey <tom@tromey.com>
1251
1252 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1253 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1254
1255 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1256
1257 * aarch64-tdep.c (aarch64_sve_register_names): New const
1258 var.
1259 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1260 (AARCH64_SVE_Z_REGS_NUM): New define.
1261 (AARCH64_SVE_P_REGS_NUM): Likewise.
1262 (AARCH64_SVE_NUM_REGS): Likewise.
1263
1264 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1265
1266 * nat/linux-ptrace.h [__alpha__]
1267 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1268 definitions.
1269
1270 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1271
1272 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1273 the endianness selected.
1274 * NEWS: Document `set endian auto' mode operation update.
1275
1276 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1277
1278 * Makefile.in: Add new header.
1279 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1280 (sve_vl_from_vg): Likewise.
1281 (sve_vq_from_vl): Likewise.
1282 (sve_vl_from_vq): Likewise.
1283 (sve_vq_from_vg): Likewise.
1284 (sve_vg_from_vq): Likewise.
1285 * configure.nat: Add new c file.
1286 * nat/aarch64-sve-linux-ptrace.c: New file.
1287 * nat/aarch64-sve-linux-ptrace.h: New file.
1288
1289 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1290
1291 * aarch64-linux-nat.c (aarch64_linux_read_description):
1292 Add parmeter zero.
1293 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1294 Likewise.
1295 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1296 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1297 (aarch64_gdbarch_init): Add parmeter zero.
1298 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1299 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1300 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1301 parmeter.
1302 * doc/gdb.texinfo: Describe SVE feature
1303 * features/aarch64-sve.c: New file.
1304
1305 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1306
1307 PR gdb/23210
1308 * gdbarch.sh (significant_addr_bit): Default to zero when
1309 not set by target architecture.
1310 * gdbarch.c: Re-generated.
1311 * utils.c (address_significant): Update.
1312
1313 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1314
1315 * stack.c (func_command): Remove trailing newline in call to error.
1316
1317 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * regcache.h (regcache_raw_collect): Remove, update callers to
1320 use regcache::raw_collect.
1321 * regcache.c (regcache_raw_collect): Remove.
1322
1323 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1324
1325 * regcache.h (regcache_raw_supply): Remove, update callers to
1326 use detached_regcache::raw_supply.
1327 * regcache.c (regcache_raw_supply): Remove.
1328
1329 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1330
1331 * regcache.h (regcache_cooked_write_part): Remove, update
1332 callers to use regcache::cooked_write_part.
1333 * regcache.c (regcache_cooked_write_part): Remove.
1334
1335 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1336
1337 * regcache.h (regcache_cooked_read_part): Remove, update callers
1338 to use readable_regcache::cooked_read_part.
1339 * regcache.c (regcache_cooked_read_part): Remove.
1340
1341 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * regcache.h (regcache_cooked_read_value): Remove, update
1344 callers to use readable_regcache::cooked_read_value.
1345 * regcache.c (regcache_cooked_read_value): Remove.
1346
1347 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * regcache.h (regcache_cooked_write): Remove, update callers to
1350 use regcache::cooked_write.
1351 * regcache.c (regcache_cooked_write): Remove.
1352
1353 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * regcache.h (regcache_invalidate): Remove, update callers to
1356 use detached_regcache::invalidate instead.
1357 * regcache.c (regcache_invalidate): Remove.
1358
1359 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1360
1361 * regcache.h (regcache_raw_write_part): Remove, update callers
1362 to use regcache::raw_write_part instead.
1363 * regcache.c (regcache_raw_write_part): Remove.
1364
1365 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1366
1367 * regcache.h (regcache_raw_read_part): Remove, update callers to
1368 use readable_regcache::raw_read_part instead.
1369 * regcache.c (regcache_raw_read_part): Remove.
1370
1371 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * regcache.h (regcache_cooked_read): Remove, update callers to
1374 use readable_regcache::cooked_read instead.
1375 * regcache.c (regcache_cooked_read): Remove.
1376
1377 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1378
1379 * regcache.h (regcache_raw_write): Remove, update callers to use
1380 regcache::raw_write instead.
1381 * regcache.c (regcache_raw_write): Remove.
1382
1383 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1384
1385 * regcache.h (regcache_raw_read): Remove, update callers to use
1386 readable_regcache::raw_read instead.
1387 * regcache.c (regcache_raw_read): Remove.
1388
1389 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1390
1391 * regcache.h (regcache_raw_update): Remove, update callers to
1392 use readable_regcache::raw_update instead.
1393 * regcache.c (regcache_raw_update): Remove.
1394
1395 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1396
1397 * regcache.h (regcache_register_status): Remove, update callers
1398 to use reg_buffer::get_register_status directly instead.
1399 * regcache.c (regcache_register_status): Remove.
1400
1401 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * regcache.h (regcache_get_ptid): Remove, update all callers to
1404 call regcache::ptid instead.
1405 * regcache.c (regcache_get_ptid): Remove.
1406
1407 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1410
1411 2018-05-30 Pedro Alves <palves@redhat.com>
1412
1413 * common/common-exceptions.h (exception_rethrow): Use
1414 ATTRIBUTE_NORETURN.
1415
1416 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1417
1418 * breakpoint.c (print_solib_event, check_status_catch_solib):
1419 Remove struct keyword in range-based for loops.
1420 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1421 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1422 Likewise.
1423 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1424 Likewise.
1425 * symfile.c (addr_info_make_relative): Likewise.
1426 * thread.c (value_in_thread_stack_temporaries): Likewise.
1427
1428 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1429
1430 PR gdb/16841
1431 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1432 aggregate type to get its real type before accessing it.
1433
1434 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1435
1436 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1437 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1438 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1439 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1440 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1441 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1442 * printcmd.c (info_address_command): Likewise.
1443
1444 2018-05-29 Tom Tromey <tom@tromey.com>
1445
1446 * windows-nat.c (handle_exception): Update fall-through comment.
1447
1448 2018-05-29 Tom Tromey <tom@tromey.com>
1449
1450 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1451 (struct program_space) <added_solibs>: Now a std::vector.
1452 * breakpoint.c (print_solib_event): Update.
1453 (check_status_catch_solib): Update.
1454 * progspace.c (clear_program_space_solib_cache): Update.
1455 * solib.c (update_solib_list): Update.
1456
1457 2018-05-29 Tom Tromey <tom@tromey.com>
1458
1459 * python/py-type.c (typy_richcompare): Update.
1460 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1461 * gdbtypes.h (types_deeply_equal): Return bool.
1462 (types_equal): Likewise.
1463 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1464 declare VEC.
1465 (check_types_equal): Change worklist to std::vector. Return
1466 bool.
1467 (struct type_equality_entry): Add constructor.
1468 (compare_maybe_null_strings): Return bool.
1469 (check_types_worklist): Return bool. Change worklist to
1470 std::vector.
1471 (types_deeply_equal): Use std::vector.
1472 (types_equal): Return bool.
1473 (compare_maybe_null_strings): Simplify.
1474
1475 2018-05-29 Tom Tromey <tom@tromey.com>
1476
1477 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1478
1479 2018-05-29 Tom Tromey <tom@tromey.com>
1480
1481 * objc-lang.h: Don't include cp-support.h.
1482 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1483 declare VEC.
1484
1485 2018-05-27 Tom Tromey <tom@tromey.com>
1486
1487 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1488
1489 2018-05-25 Tom Tromey <tom@tromey.com>
1490
1491 * value.c (value::location): Initialize.
1492
1493 2018-05-25 Tom Tromey <tom@tromey.com>
1494
1495 * dbxread.c (init_bincl_list): Remove.
1496 (bincl_list): Now a std::vector.
1497 (bincls_allocated, next_bincl): Remove.
1498 (free_bincl_list, do_free_bincl_list_cleanup)
1499 (make_cleanup_free_bincl_list): Remove.
1500 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1501 unique_xmalloc_ptr.
1502 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1503 (struct header_file_location): Add constructor.
1504 (add_bincl_to_list): Remove.
1505
1506 2018-05-25 Tom Tromey <tom@tromey.com>
1507
1508 * tui/tui.c (tui_enable): Update.
1509 * mi/mi-interp.c (mi_interp::init): Update.
1510 * interps.h (class interp) <name>: New method.
1511 <m_name>: Rename from name.
1512 (~scoped_restore_interp): Update.
1513 * interps.c (interp::interp): Update.
1514 (interp_add, interp_set, interp_lookup_existing)
1515 (current_interp_named_p): Update.
1516
1517 2018-05-25 Tom Tromey <tom@tromey.com>
1518
1519 * interps.c (interp_name): Remove.
1520 * mi/mi-interp.c (mi_interp::init): Update.
1521 * interps.h (interp_name): Remove.
1522 (~scoped_restore_interp): Update.
1523 * tui/tui.c (tui_enable): Update.
1524
1525 2018-05-25 Tom Tromey <tom@tromey.com>
1526
1527 * utils.c (fputs_maybe_filtered): Update.
1528 * linespec.c (decode_line_full): Update.
1529 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1530 (mi_print_breakpoint_for_event, mi_solib_loaded)
1531 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1532 (mi_user_selected_context_changed): Update.
1533 * mi/mi-main.c (mi_execute_command): Update.
1534 * cli/cli-script.c (execute_control_command): Update.
1535 * python/python.c (execute_gdb_command): Update.
1536 * solib.c (info_sharedlibrary_command): Update.
1537 * interps.c (interp_ui_out): Remove.
1538 * interps.h (interp_ui_out): Remove.
1539
1540 2018-05-25 Tom Tromey <tom@tromey.com>
1541
1542 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1543 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1544 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1545
1546 2018-05-25 Tom Tromey <tom@tromey.com>
1547
1548 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1549 * interps.c (interp_exec): Use scoped_restore.
1550
1551 2018-05-25 Tom Tromey <tom@tromey.com>
1552
1553 * remote.c (remote_target::remote_file_get): Use
1554 gdb::byte_vector.
1555 (remote_target::remote_file_put): Likewise.
1556
1557 2018-05-25 Tom Tromey <tom@tromey.com>
1558
1559 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1560 a std::string.
1561 (get_pe_section_index, add_pe_exported_sym): Update.
1562 (read_pe_exported_syms): Use gdb::def_vector.
1563
1564 2018-05-25 Tom Tromey <tom@tromey.com>
1565
1566 * frame.c (remove_prev_frame): Remove.
1567 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1568
1569 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1570
1571 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1572 Remove prototypes.
1573 * mips-linux-nat.c (supply_fpregset): Always call
1574 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1575 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1576 `mips_fill_fpregset'.
1577 * mips-linux-tdep.c (mips_supply_fpregset)
1578 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1579 (mips_fill_fpregset_wrapper): Remove functions.
1580 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1581 (mips_linux_fpregset): Remove variable.
1582 (mips_linux_iterate_over_regset_sections): Use
1583 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1584 (mips_linux_o32_sigframe_init): Remove comment.
1585
1586 2018-05-25 Pedro Alves <palves@redhat.com>
1587
1588 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1589 (struct readahead_cache, struct packet_reg, struct
1590 remote_arch_state, class remote_state): Move higher up in the
1591 file.
1592 (remote_target::m_remote_state): Now an object instead of a pointer.
1593 (remote_target::get_remote_state): Adjust.
1594
1595 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1596
1597 * stack.c (select_and_print_frame): Delete.
1598 (struct function_bounds): Move struct within function.
1599 (func_command): Most content moved into new function
1600 find_frame_for_function, use new function, print result, add
1601 function comment.
1602 (find_frame_for_function): New function, now returns a result.
1603
1604 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1605
1606 * stack.c (iterate_over_block_arg_vars): Fix comment.
1607 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1608
1609 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1610
1611 PR gdb/23203
1612 * frame.c
1613 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1614 Define.
1615 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1616 Define.
1617 * frame.h (class scoped_restore_selected_frame): New class.
1618 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1619 of any exception, use scoped_restore_selected_frame to restore the
1620 frame instead.
1621
1622 2018-05-24 Pedro Alves <palves@redhat.com>
1623
1624 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1625 override.
1626
1627 2018-05-23 Tom Tromey <tom@tromey.com>
1628
1629 * complaints.c (struct complaints): Remove.
1630 (symfile_complaint_book): Remove.
1631 (series): New global.
1632 (complaint_internal): Update.
1633 (clear_complaints): Update.
1634
1635 2018-05-23 Tom Tromey <tom@tromey.com>
1636
1637 * complaints.c (counters): New global.
1638 (struct complain): Remove.
1639 (struct complaints) <root>: Remove.
1640 (complaint_sentinel): Remove.
1641 (symfile_complaint_book): Update.
1642 (find_complaint) Remove.
1643 (complaint_internal, clear_complaints): Update.
1644
1645 2018-05-23 Tom Tromey <tom@tromey.com>
1646
1647 * complaints.c (struct complain) <file, line>: Remove.
1648 (find_complaint): Remove file, line parameters.
1649 (complaint_internal): Update.
1650
1651 2018-05-23 Tom Tromey <tom@tromey.com>
1652
1653 * complaints.c (vcomplaint): Remove.
1654 (complaint_internal) Merge in contents of vcomplaint.
1655
1656 2018-05-23 Tom Tromey <tom@tromey.com>
1657
1658 * complaints.c (struct complaints) <explanation>: Remove.
1659 (symfile_explanations): Remove.
1660 (symfile_complaint_book): Update.
1661 (vcomplaint): Update.
1662 (struct explanation): Remove.
1663
1664 2018-05-23 Tom Tromey <tom@tromey.com>
1665
1666 * complaints.c (symfile_complaints): Remove.
1667 (complaint_internal): Remove "complaints" parameter.
1668 (clear_complaints, vcomplaint): Remove "c" parameter.
1669 (get_complaints): Remove.
1670 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1671 (dwarf2_debug_line_missing_file_complaint)
1672 (dwarf2_debug_line_missing_end_sequence_complaint)
1673 (dwarf2_complex_location_expr_complaint)
1674 (dwarf2_const_value_length_mismatch_complaint)
1675 (dwarf2_section_buffer_overflow_complaint)
1676 (dwarf2_macro_malformed_definition_complaint)
1677 (dwarf2_invalid_attrib_class_complaint)
1678 (create_addrmap_from_index, dw2_symtab_iter_next)
1679 (dw2_expand_marked_cus)
1680 (dw2_debug_names_iterator::find_vec_in_debug_names)
1681 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1682 (create_debug_type_hash_table, init_cutu_and_read_dies)
1683 (partial_die_parent_scope, add_partial_enumeration)
1684 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1685 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1686 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1687 (create_cus_hash_table, create_dwp_hash_table)
1688 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1689 (dwarf2_rnglists_process, dwarf2_ranges_process)
1690 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1691 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1692 (handle_struct_member_die, process_structure_scope)
1693 (read_array_type, read_common_block, read_module_type)
1694 (read_tag_pointer_type, read_typedef, read_base_type)
1695 (read_subrange_type, load_partial_dies, partial_die_info::read)
1696 (partial_die_info::read, partial_die_info::read)
1697 (partial_die_info::read, read_checked_initial_length_and_offset)
1698 (dwarf2_string_attr, read_formatted_entries)
1699 (dwarf_decode_line_header)
1700 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1701 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1702 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1703 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1704 (get_signatured_type, get_DW_AT_signature_type)
1705 (decode_locdesc, file_file_name, consume_improper_spaces)
1706 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1707 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1708 (dwarf2_symbol_mark_computed, set_die_type)
1709 (read_attribute_value): Update.
1710 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1711 Update.
1712 * dbxread.c (unknown_symtype_complaint)
1713 (lbrac_mismatch_complaint, repeated_header_complaint)
1714 (set_namestring, function_outside_compilation_unit_complaint)
1715 (read_dbx_symtab, process_one_symbol): Update.
1716 * gdbtypes.c (stub_noname_complaint): Update.
1717 * windows-nat.c (handle_unload_dll): Update.
1718 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1719 (decode_base_type): Update.
1720 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1721 (eb_complaint, record_include_begin, record_include_end)
1722 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1723 (process_xcoff_symbol, read_symbol)
1724 (function_outside_compilation_unit_complaint)
1725 (scan_xcoff_symtab): Update.
1726 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1727 * buildsym.c (finish_block_internal, make_blockvector)
1728 (end_symtab_get_static_block, augment_type_symtab): Update.
1729 * dtrace-probe.c (dtrace_process_dof)
1730 (dtrace_static_probe_ops::get_probes): Update.
1731 * complaints.h (struct complaint): Don't declare.
1732 (symfile_complaints): Remove.
1733 (complaint_internal): Remove "complaints" parameter.
1734 (complaint): Likewise.
1735 (clear_complaints): Likewise.
1736 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1737 (reread_symbols): Update.
1738 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1739 (dwarf2_frame_cache, decode_frame_entry): Update.
1740 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1741 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1742 (info_selectors_command): Update.
1743 * macrotab.c (macro_include, check_for_redefinition)
1744 (macro_undef): Update.
1745 * objfiles.c (filter_overlapping_sections): Update.
1746 * stabsread.c (invalid_cpp_abbrev_complaint)
1747 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1748 (define_symbol, error_type, read_type, rs6000_builtin_type)
1749 (stabs_method_name_from_physname, read_member_functions)
1750 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1751 (attach_fields_to_type, complain_about_struct_wipeout)
1752 (read_range_type, read_args, common_block_start)
1753 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1754 Update.
1755 * mdebugread.c (index_complaint, unknown_ext_complaint)
1756 (basic_type_complaint, bad_tag_guess_complaint)
1757 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1758 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1759 (parse_procedure, parse_lines)
1760 (function_outside_compilation_unit_complaint)
1761 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1762 (bad_tag_guess_complaint, reg_value_complaint): Update.
1763 * cp-support.c (demangled_name_complaint): Update.
1764 * macroscope.c (sal_macro_scope): Update.
1765 * dwarf-index-write.c (class debug_names): Update.
1766
1767 2018-05-23 Tom Tromey <tom@tromey.com>
1768
1769 * complaints.c (clear_complaints): Remove "noisy" parameter.
1770 * complaints.h (clear_complaints): Update.
1771 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1772 (reread_symbols): Update.
1773
1774 2018-05-23 Tom Tromey <tom@tromey.com>
1775
1776 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1777 SUBSEQUENT_MESSAGE.
1778 (vcomplaint, clear_complaints): Update.
1779 (symfile_explanations): Remove some messages.
1780
1781 2018-05-23 Tom Tromey <tom@tromey.com>
1782
1783 * complaints.c (internal_complaint): Remove.
1784 * complaints.h (internal_complaint): Remove.
1785
1786 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1787
1788 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1789
1790 2018-05-22 Pedro Alves <palves@redhat.com>
1791
1792 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1793 (remote_fileio_badfd, remote_fileio_return_errno)
1794 (remote_fileio_return_success, remote_fileio_func_open)
1795 (remote_fileio_func_open, remote_fileio_func_close)
1796 (remote_fileio_func_read, remote_fileio_func_write)
1797 (remote_fileio_func_lseek, remote_fileio_func_rename)
1798 (remote_fileio_func_unlink, remote_fileio_func_stat)
1799 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1800 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1801 remote_target parameter.
1802 (remote_fio_func_map) <func>: Add remote_target parameter.
1803 (do_remote_fileio_request, remote_fileio_request):
1804 * remote-fileio.h (remote_fileio_request):
1805 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1806 remote_target parameter.
1807 (remote_notif_process, handle_notification): Adjust to pass down
1808 the remote.
1809 (remote_notif_state_allocate): Add remote_target parameter. Save
1810 it.
1811 * remote-notif.h (struct remote_target): Forward declare.
1812 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1813 remote_target parameter.
1814 (struct remote_notif_state) <remote>: New field.
1815 (remote_notif_ack, remote_notif_parse): Add remote_target
1816 parameter.
1817 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1818 remote_target parameter.
1819 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1820 (threads_listing_context, rmt_thread_action, protocol_feature)
1821 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1822 (packet_result, struct threads_listing_context, remote_state):
1823 Move definitions and declarations higher up.
1824 (remote_target) <~remote_target>: Declare.
1825 (remote_download_command_source, remote_file_put, remote_file_get)
1826 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1827 (remote_hostio_pread_vFile, remote_hostio_send_command)
1828 (remote_hostio_set_filesystem, remote_hostio_open)
1829 (remote_hostio_close, remote_hostio_unlink, remote_state)
1830 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1831 (get_memory_write_packet_size, get_memory_read_packet_size)
1832 (append_pending_thread_resumptions, remote_detach_1)
1833 (append_resumption, remote_resume_with_vcont)
1834 (add_current_inferior_and_thread, wait_ns, wait_as)
1835 (process_stop_reply, remote_notice_new_inferior)
1836 (process_initial_stop_replies, remote_add_thread)
1837 (btrace_sync_conf, remote_btrace_maybe_reopen)
1838 (remove_new_fork_children, kill_new_fork_children)
1839 (discard_pending_stop_replies, stop_reply_queue_length)
1840 (check_pending_events_prevent_wildcard_vcont)
1841 (discard_pending_stop_replies_in_queue, stop_reply)
1842 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1843 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1844 (remote_interrupt_as, remote_interrupt_ns)
1845 (remote_get_noisy_reply, remote_query_attached)
1846 (remote_add_inferior, remote_current_thread, get_current_thread)
1847 (set_thread, set_general_thread, set_continue_thread)
1848 (set_general_process, write_ptid)
1849 (remote_unpack_thread_info_response, remote_get_threadinfo)
1850 (parse_threadlist_response, remote_get_threadlist)
1851 (remote_threadlist_iterator, remote_get_threads_with_ql)
1852 (remote_get_threads_with_qxfer)
1853 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1854 (get_offsets, remote_check_symbols, remote_supported_packet)
1855 (remote_query_supported, remote_packet_size)
1856 (remote_serial_quit_handler, remote_detach_pid)
1857 (remote_vcont_probe, remote_resume_with_hc)
1858 (send_interrupt_sequence, interrupt_query)
1859 (remote_notif_get_pending_events, fetch_register_using_p)
1860 (send_g_packet, process_g_packet, fetch_registers_using_g)
1861 (store_register_using_P, store_registers_using_G)
1862 (set_remote_traceframe, check_binary_download)
1863 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1864 (remote_xfer_live_readonly_partial, remote_read_bytes)
1865 (remote_send_printf, remote_flash_write, readchar)
1866 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1867 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1868 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1869 (extended_remote_disable_randomization, extended_remote_run)
1870 (send_environment_packet, extended_remote_environment_support)
1871 (extended_remote_set_inferior_cwd, remote_write_qxfer)
1872 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1873 (packet_command): Now methods of ...
1874 (remote_target): ... this class.
1875 (m_remote_state) <remote_target>: New field.
1876 (struct remote_state) <stop_reply_queue,
1877 remote_async_inferior_event_token, wait_forever_enabled_p>: New
1878 fields.
1879 (remote_state::remote_state): Allocate stop_reply_queue.
1880 (remote_state): Delete global.
1881 (get_remote_state_raw): Delete.
1882 (remote_target::get_remote_state): Allocate m_remote_state on
1883 demand.
1884 (get_current_remote_target): New.
1885 (remote_ops, extended_remote_ops): Delete.
1886 (wait_forever_enabled_p, remote_async_inferior_event_token):
1887 Delete, moved to struct remote_state.
1888 (remote_target::close): Delete self. Destruction bits split to
1889 ...
1890 (remote_target::~remote_target): ... this.
1891 (show_memory_packet_size): Adjust to use
1892 get_current_remote_target.
1893 (struct protocol_feature) <func>: Add remote_target parameter.
1894 All callers adjusted.
1895 (curr_quit_handler_target): New.
1896 (remote_serial_quit_handler): Reimplement.
1897 (remote_target::open_1): Adjust to use get_current_remote_target.
1898 Heap-allocate remote_target/extended_remote_target instances.
1899 (vcont_builder::vcont_builder): Add remote_target parameter, and
1900 save it in m_remote. All callers adjusted.
1901 (vcont_builder::m_remote): New field.
1902 (vcont_builder::restart, vcont_builder::flush)
1903 (vcont_builder::push_action): Use it.
1904 (remote_target::commit_resume): Use it.
1905 (struct queue_iter_param) <remote>: New field.
1906 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1907 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1908 (check_pending_event_prevents_wildcard_vcont_callback)
1909 (remote_target::check_pending_events_prevent_wildcard_vcont)
1910 (remote_target::discard_pending_stop_replies)
1911 (remote_target::discard_pending_stop_replies_in_queue)
1912 (remote_target::remote_notif_remove_queued_reply): Fill in
1913 'remote' field.
1914 (remote_notif_get_pending_events): New.
1915 (remote_target::readchar, remote_target::remote_serial_write):
1916 Save/restore curr_quit_handler_target.
1917 (putpkt): New.
1918 (kill_new_fork_children): Fill in 'remote' field.
1919 (packet_command): Use get_current_remote_target, defer to
1920 remote_target method of same name.
1921 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1922 parameter, and save it in m_remote. All callers adjusted.
1923 (scoped_remote_fd::release): Use m_remote.
1924 (scoped_remote_fd::m_remote): New field.
1925 (remote_file_put, remote_file_get, remote_file_delete): Use
1926 get_current_remote_target, defer to remote_target method of same
1927 name.
1928 (remote_btrace_reset): Add remote_state paremeter. Update all
1929 callers.
1930 (remote_async_inferior_event_handler). Pass down 'data'.
1931 (remote_new_objfile): Use get_current_remote_target.
1932 (remote_target::vcont_r_supported): New.
1933 (set_range_stepping): Use get_current_remote_target and
1934 remote_target::vcont_r_supported.
1935 (_initialize_remote): Don't allocate 'remote_state' and
1936 'stop_reply_queue' globals.
1937 * remote.h (struct remote_target): Forward declare.
1938 (getpkt, putpkt, remote_notif_get_pending_events): Add
1939 'remote_target' parameter.
1940
1941 2018-05-22 Pedro Alves <palves@redhat.com>
1942
1943 * remote.c (vcont_builder): Now a class. Make all data members
1944 private.
1945 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1946 Declare methods.
1947 (vcont_builder_restart): Rename to ...
1948 (vcont_builder::restart): ... this.
1949 (vcont_builder_flush): Rename to ...
1950 (vcont_builder::flush): ... this.
1951 (vcont_builder_push_action): Rename to ...
1952 (vcont_builder::push_action): ... this.
1953 (remote_target::commit_resume): Adjust.
1954
1955 2018-05-22 Pedro Alves <palves@redhat.com>
1956
1957 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1958 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1959 (get_fixed_memory_packet_size): New.
1960 (get_memory_packet_size): Use it.
1961 (set_memory_packet_size): Don't override the config size with
1962 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1963 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1964 Don't refer to get_memory_packet_size if not connected to a remote
1965 target. Show "(default)" if configured size is 0.
1966
1967 2018-05-22 Pedro Alves <palves@redhat.com>
1968
1969 * remote.c (remote_target::mourn_inferior): Move
1970 discard_pending_stop_replies call here from ...
1971 (_initialize_remote): ... here.
1972
1973 2018-05-22 Pedro Alves <palves@redhat.com>
1974
1975 * remote.c (compare_section_command): Remove set_general_process
1976 call.
1977
1978 2018-05-22 Pedro Alves <palves@redhat.com>
1979
1980 * remote.c (struct packet_reg, struct remote_arch_state):
1981 Move higher up in the file.
1982 (remote_state) <m_arch_states>: Store remote_arch_state values
1983 instead of remote_arch_state pointers.
1984 (remote_state::get_remote_arch_state): Adjust.
1985
1986 2018-05-22 Pedro Alves <palves@redhat.com>
1987
1988 * remote.c: Include <unordered_map>.
1989 (remote_state): Now a class.
1990 (remote_state) <get_remote_arch_state>: Declare method.
1991 <get_remote_arch_state>: New field.
1992 (remote_arch_state) <remote_arch_state>: Declare ctor.
1993 <regs>: Now a unique_ptr.
1994 (remote_gdbarch_data_handle): Delete.
1995 (get_remote_arch_state): Delete.
1996 (remote_state::get_remote_arch_state): New.
1997 (get_remote_state): Adjust to call remote_state's
1998 get_remote_arch_state method.
1999 (init_remote_state): Delete, bits factored out to ...
2000 (remote_arch_state::remote_arch_state): ... this new method.
2001 (get_remote_packet_size, get_memory_packet_size)
2002 (process_g_packet, remote_target::fetch_registers)
2003 (remote_target::prepare_to_store, store_registers_using_G)
2004 (remote_target::store_registers, remote_target::get_trace_status):
2005 Adjust to call remote_state's method.
2006 (_initialize_remote): Remove reference to
2007 remote_gdbarch_data_handle.
2008
2009 2018-05-22 Pedro Alves <palves@redhat.com>
2010
2011 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2012 pread>: New method declarations.
2013 (remote_target::open_1): Adjust.
2014 (readahead_cache_invalidate): Rename to ...
2015 (readahead_cache::invalidate): ... this, and adjust to be a class
2016 method.
2017 (readahead_cache_invalidate_fd): Rename to ...
2018 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2019 class method.
2020 (remote_hostio_pwrite): Adjust.
2021 (remote_hostio_pread_from_cache): Rename to ...
2022 (readahead_cache::pread): ... this, and adjust to be a class
2023 method.
2024 (remote_hostio_close): Adjust.
2025
2026 2018-05-22 Pedro Alves <palves@redhat.com>
2027
2028 * remote.c (remote_hostio_close_cleanup): Delete.
2029 (class scoped_remote_fd): New.
2030 (remote_file_put, remote_file_get): Use it.
2031
2032 2018-05-22 Pedro Alves <palves@redhat.com>
2033
2034 (struct vCont_action_support): Use bool and initialize all fields.
2035 (struct readahead_cache): Initialize all fields.
2036 (remote_state): Use bool and initialize all fields.
2037 (remote_state::remote_state, remote_state::~remote_state): New.
2038 (new_remote_state): Delete.
2039 (_initialize_remote): Use new to allocate remote_state.
2040
2041 2018-05-22 Pedro Alves <palves@redhat.com>
2042 張俊芝 <zjz@zjz.name>
2043
2044 PR gdb/22973
2045 * c-exp.y: Include "c-support.h".
2046 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2047 of tolower. Use c_ident_is_alpha to scan names.
2048 * c-lang.c: Include "c-support.h".
2049 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2050 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2051 * c-support.h: New file, with bits factored out from ...
2052 * cp-name-parser.y: ... this file.
2053 Include "c-support.h".
2054 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2055 c-support.h and renamed.
2056 (symbol_end, yylex): Adjust.
2057
2058 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2059
2060 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2061 parameter type to CORE_ADDR.
2062 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2063 parameter type in declaration to CORE_ADDR.
2064 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2065 target_auxv_search to get AT_HWCAP and use the result to get the
2066 target description.
2067 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2068 to CORE_ADDR. Remove the cast of the return value to unsigned
2069 long. Fix error predicate of target_auxv_search.
2070 (ppc_linux_nat_target::read_description): Change the type of the
2071 hwcap variable to CORE_ADDR.
2072
2073 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2074
2075 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2076 if the size of fpscr is larger than 32 bits.
2077
2078 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2079
2080 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2081 (ppc32_linux_vsxregmap): New global.
2082 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2083 regcache_supply_regset, and regcache_collect_regset.
2084 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2085 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2086 (fetch_vsx_register, store_vsx_register): Remove.
2087 (fetch_vsx_registers): Add regno parameter. Get regset using
2088 ppc_linux_vsxregset. Use regset to supply registers.
2089 (store_vsx_registers): Add regno parameter. Get regset using
2090 ppc_linux_vsxregset. Use regset to collect registers.
2091 (fetch_register): Call fetch_vsx_registers instead of
2092 fetch_vsx_register.
2093 (store_register): Call store_vsx_registers instead of
2094 store_vsx_register.
2095 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2096 new regno parameter.
2097 (store_ppc_registers): Call store_vsx_registers with -1 for the
2098 new regno parameter.
2099 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2100 (ppc_collect_vsxregset): Remove.
2101
2102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2103
2104 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2105 offset fields.
2106 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2107 for vector register offset fields.
2108 (ppc64_fbsd_reg_offsets): Likewise.
2109 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2110 to vector register offset fields.
2111 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2112 to vector register offset fields.
2113 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2114 vector register offset fields.
2115 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2116 initializers for vector register offset fields.
2117 (rs6000_aix64_reg_offsets): Likewise.
2118 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2119 (ppc_supply_vrregset): Remove.
2120 (ppc_collect_vrregset): Remove.
2121 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2122 (ppc_linux_vrregset) : New function.
2123 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2124 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2125 (ppc32_linux_vrregset): Remove.
2126 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2127 and use result instead of ppc32_linux_vrregset.
2128 (ppc32_linux_reg_offsets): Remove initializers for vector register
2129 offset fields.
2130 (ppc64_linux_reg_offsets): Likewise.
2131 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2132 * ppc-linux-nat.c: Include regset.h.
2133 (gdb_vrregset_t): Adjust comment to account for little-endian
2134 mode.
2135 (supply_vrregset, fill_vrregset): Remove.
2136 (fetch_altivec_register, store_altivec_register): Remove.
2137 (fetch_altivec_registers): Add regno parameter. Get regset using
2138 ppc_linux_vrregset. Use regset to supply registers.
2139 (store_altivec_registers): Add regno parameter. Get regset using
2140 ppc_linux_vrregset. Use regset to collect registers.
2141 (fetch_register): Call fetch_altivec_registers instead of
2142 fetch_altivec_register.
2143 (store_register): Call store_altivec_registers instead of
2144 store_altivec_register.
2145 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2146 the new regno parameter.
2147 (store_ppc_registers): Call store_altivec_registers with -1 for
2148 the new regno parameter.
2149
2150 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2151
2152 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2153 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2154 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2155 (gdb_vrregset_t): Change array type size to
2156 PPC_LINUX_SIZEOF_VRREGSET.
2157 (gdb_vsxregset_t): Change array type size to
2158 PPC_LINUX_SIZEOF_VSXREGSET.
2159 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2160 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2161 PPC_LINUX_SIZEOF_VSXREGSET.
2162
2163 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2164
2165 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2166 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2167 nat/ppc-linux.c.
2168 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2169 ppc_linux_target_wordsize with tid.
2170 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2171 wordsize with tid.
2172 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2173 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2174 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2175 tid parameter. Remove static specifier.
2176 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2177 (ppc_linux_target_wordsize): New declaration.
2178
2179 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2180
2181 * arch/ppc-linux-common.c: New file.
2182 * arch/ppc-linux-common.h: New file.
2183 * arch/ppc-linux-tdesc.h: New file.
2184 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2185 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2186 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2187 arch/ppc-linux-tdesc.h.
2188 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2189 arch/ppc-linux-tdesc.h.
2190 (ppc_linux_nat_target::read_description): Remove target
2191 description matching code. Fill a ppc_linux_features struct and
2192 call ppc_linux_match_description with it. Move comment about ISA
2193 2.05 to ppc-linux-common.c.
2194 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2195 arch/ppc-linux-tdesc.h.
2196 (ppc_linux_core_read_description): Remove target description
2197 matching code. Fill a ppc_linux_features struct and call
2198 ppc_linux_match_description with it.
2199 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2200 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2201 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2202 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2203 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2204 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2205 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2206 (tdesc_powerpc_e500l): Remove.
2207
2208 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2209
2210 * ada-lang.c (catch_assert_command): Pass empty string instead
2211 of NULL for excep_string argument.
2212
2213 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2214
2215 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2216 the width of the requested register exceeds the width of the
2217 `ptrace' data type.
2218
2219 2018-05-21 Tom Tromey <tom@tromey.com>
2220
2221 * printcmd.c (output_command): Remove.
2222 (output_command_const): Rename to output_command.
2223 * valprint.h (output_command): Rename from output_command_const.
2224 * tracepoint.c (trace_dump_actions): Call output_command.
2225
2226 2018-05-21 Tom Tromey <tom@tromey.com>
2227
2228 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2229 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2230 * ada-lang.h (create_ada_exception_catchpoint): Update.
2231 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2232 std::string.
2233 (create_excep_cond_exprs, ~ada_catchpoint)
2234 (should_stop_exception, print_one_exception)
2235 (print_mention_exception, print_recreate_exception): Update.
2236 (ada_get_next_arg): Remove.
2237 (catch_ada_exception_command_split): Use std::string. Change type
2238 of "excep_string", "cond_string".
2239 (catch_ada_exception_command): Update.
2240 (create_ada_exception_catchpoint): Change type of excep_string.
2241 (ada_exception_sal): Remove excep_string parameter.
2242 (~ada_catchpoint): Remove.
2243
2244 2018-05-21 Tom Tromey <tom@tromey.com>
2245
2246 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2247 cleanup.
2248
2249 2018-05-21 Tom Tromey <tom@tromey.com>
2250
2251 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2252 Return unique_xmalloc_ptr.
2253 (print_it_exception): Update.
2254
2255 2018-05-21 Tom Tromey <tom@tromey.com>
2256
2257 * tracepoint.c (trace_dump_actions): Use std::string.
2258
2259 2018-05-21 Tom Tromey <tom@tromey.com>
2260
2261 * symfile.c (reread_symbols): Use std::string for original_name.
2262
2263 2018-05-21 Tom Tromey <tom@tromey.com>
2264
2265 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2266 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2267 constructor.
2268
2269 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2270
2271 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2272 instance to...
2273 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2274 * objfiles.c (get_objfile_bfd_data): Allocate
2275 objfile_per_bfd_storage with obstack_new when allocating on
2276 obstack.
2277
2278 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2281 OBSTACK_ZALLOC.
2282 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2283 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2284 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2285 (add_pending): Likewise.
2286 (parse_symbol): Likewise.
2287 (parse_partial_symbols): Likewise.
2288 (psymtab_to_symtab_1): Likewise.
2289 (new_psymtab): Likewise.
2290 (elfmdebug_build_psymtabs): Likewise.
2291 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2292 * objfiles.c (get_objfile_bfd_data): Likewise.
2293 (objfile_register_static_link): Likewise.
2294 * psymtab.c (allocate_psymtab): Likewise.
2295 * stabsread.c (read_member_functions): Likewise.
2296 * xcoffread.c (xcoff_end_psymtab): Likewise.
2297
2298 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2299
2300 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2301 compiler supports std::is_trivially_constructible.
2302 * common/poison.h: Include obstack.h.
2303 (IsMallocable): Define to is_trivially_constructible if the
2304 compiler supports it, define to true_type otherwise.
2305 (xobnew): New.
2306 (XOBNEW): Redefine.
2307 (xobnewvec): New.
2308 (XOBNEWVEC): Redefine.
2309 * gdb_obstack.h (obstack_zalloc): New.
2310 (OBSTACK_ZALLOC): Redefine.
2311 (obstack_calloc): New.
2312 (OBSTACK_CALLOC): Redefine.
2313 (obstack_new): New.
2314 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2315 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2316 gdbarch.c.
2317 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2318 obstack_calloc/obstack_zalloc.
2319 (gdbarch_obstack_zalloc): Remove.
2320 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2321
2322 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2323
2324 * stack.c (backtrace_command_1): Remove useless variable int i.
2325
2326 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2327
2328 * stack.c (print_frame_info): Fix comment.
2329
2330 2018-05-18 Tom Tromey <tom@tromey.com>
2331
2332 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2333 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2334 (~dwarf2_per_objfile): Update
2335 (dwarf2_get_dwz_file): Use new.
2336 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2337 unique_ptr.
2338
2339 2018-05-18 Tom Tromey <tom@tromey.com>
2340
2341 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2342 unique_ptr.
2343 * dwarf2read.c (struct dwp_file): Add constructor and
2344 initializers.
2345 (open_and_init_dwp_file): Return a unique_ptr.
2346 (dwarf2_per_objfile, create_dwp_hash_table)
2347 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2348 (lookup_dwo_unit_in_dwp): Update.
2349 (open_and_init_dwp_file, get_dwp_file): Update.
2350
2351 2018-05-18 Tom Tromey <tom@tromey.com>
2352
2353 * dwarf2read.c (dwarf2_per_objfile): Update.
2354 (struct mapped_index): Add initializers.
2355 (dwarf2_read_index): Use new.
2356 (dw2_symtab_iter_init): Update.
2357 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2358 unique_ptr.
2359
2360 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * dwarf2read.c (mapped_index) <total_size>: Remove.
2363
2364 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * unittests/format_pieces-selftests.c (test_format_specifier):
2367 Add ARI comments.
2368
2369 2018-05-18 Tom Tromey <tom@tromey.com>
2370
2371 * c-typeprint.c (maybe_print_hole): New function.
2372 (c_print_type_struct_field_offset): Update.
2373 (c_type_print_base_struct_union): Call maybe_print_hole.
2374
2375 2018-05-17 Keith Seitz <keiths@redhat.com>
2376
2377 * breakpoint.c (build_bpstat_chain): New function, moved from
2378 bpstat_stop_status.
2379 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2380 If no stop chain is passed, call build_bpstat_chain to build it.
2381 * breakpoint.h (build_bpstat_chain): Declare.
2382 (bpstat_stop_status): Move documentation here from breakpoint.c.
2383 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2384 build the stop chain and pass it to skip_inline_frames.
2385 Pass this stop chain to bpstat_stop_status.
2386 * inline-frame.c: Include breakpoint.h.
2387 (stopped_by_user_bp_inline_frame): New function.
2388 (skip_inline_frames): Add parameter `stop_chain'.
2389 Move documention to inline-frame.h.
2390 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2391 whether the frame should be elided.
2392 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2393 Add moved documentation and update for new parameter.
2394
2395 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 PR cli/14975
2398 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2399 unittests/format_pieces-selftests.c.
2400 * common/format.h (format_piece) <operator==>: New.
2401 (format_pieces) <operator[]>: Remove.
2402 * common/format.c (format_pieces::format_pieces): Handle \e.
2403 * unittests/format_pieces-selftests.c: New.
2404
2405 2018-05-17 Tom Tromey <tom@tromey.com>
2406
2407 PR symtab/23010:
2408 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2409 (dw2_instantiate_symtab): Add skip_partial parameter.
2410 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2411 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2412 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2413 (dw2_expand_symtabs_matching_one)
2414 (dw2_find_pc_sect_compunit_symtab)
2415 (dw2_debug_names_lookup_symbol)
2416 (dw2_debug_names_expand_symtabs_for_function): Update.
2417 (init_cutu_and_read_dies): Add skip_partial parameter.
2418 (process_psymtab_comp_unit, build_type_psymtabs_1)
2419 (process_skeletonless_type_unit, load_partial_comp_unit)
2420 (psymtab_to_symtab_1): Update.
2421 (load_full_comp_unit): Add skip_partial parameter.
2422 (process_imported_unit_die, dwarf2_read_addr_index)
2423 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2424 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2425 (read_signatured_type): Update.
2426
2427 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * value.c (release_value): Remove unused variable.
2430 (record_latest_value): Likewise.
2431 (access_value_history): Likewise.
2432 (preserve_values): Likewise.
2433
2434 2018-05-17 Tom Tromey <tom@tromey.com>
2435
2436 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2437 Initialize.
2438
2439 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2440
2441 PR gdb/22286
2442 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2443 Also handle registers whose width is not a multiple of
2444 PTRACE_TYPE_RET.
2445 (linux_nat_trad_target::store_register): Likewise.
2446
2447 2018-05-16 Tom Tromey <tom@tromey.com>
2448
2449 * gdbcore.h (core_bfd): Redefine.
2450 * corelow.c (core_target::close): Update.
2451 (core_target_open): Update.
2452 * progspace.h (struct program_space) <cbfd>: Now a
2453 gdb_bfd_ref_ptr.
2454
2455 2018-05-16 Tom Tromey <tom@tromey.com>
2456
2457 PR cli/19551:
2458 * symfile-add-flags.h (enum symfile_add_flags)
2459 <SYMFILE_NOT_FILENAME>: New constant.
2460 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2461 objfile name from BFD.
2462 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2463 * minidebug.c (find_separate_debug_file_in_section): Put
2464 ".gnu_debugdata" into BFD's file name.
2465
2466 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2469 Remove.
2470
2471 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2472
2473 PR binutils/21446
2474 * aarch64-tdep.c (aarch64_analyze_prologue,
2475 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2476 Indicate not interested in errors.
2477
2478 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2479
2480 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2481 Supply the MIPS_ZERO_REGNUM register.
2482
2483 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2484
2485 * mips-tdep.c (mask_address_var): Make variable static.
2486
2487 2018-05-14 Tom Tromey <tom@tromey.com>
2488
2489 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2490
2491 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2492
2493 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2494 FXSAVE_ADDR for the mxcsr register.
2495
2496 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2497
2498 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2499
2500 2018-05-11 Pedro Alves <palves@redhat.com>
2501
2502 * corelow.c (core_target) <core_target>: No longer inline.
2503 Initialize m_core_gdbarch, m_core_vec and build the section table
2504 here.
2505 <~core_target>: New.
2506 <core_gdbarch, get_core_register_section>: New methods.
2507 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2508 factored out from ...
2509 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2510 (core_ops): Delete.
2511 (sniff_core_bfd): Add gdbarch parameter.
2512 (core_close): Delete, merged into ...
2513 (core_target::close): ... here. Delete self.
2514 (core_close_cleanup): Delete.
2515 (core_target_open): Allocate a core_target on the heap. Use a
2516 unique_ptr instead of a cleanup. Bits moved into the core_target
2517 ctor. Adjust to use core_target methods instead of globals.
2518 (get_core_register_section): Rename to ...
2519 (core_target::get_core_register_section): ... this and adjust.
2520 (struct get_core_registers_cb_data): New.
2521 (get_core_registers_cb): Use it. Use bool.
2522 (core_target::fetch_registers, core_target::files_info)
2523 (core_target::xfer_partial, core_target::read_description)
2524 (core_target::pid_to, core_target::thread_name): Adjust to
2525 reference class fields instead of globals.
2526 * target.h (struct target_ops_deleter, target_ops_up): New.
2527
2528 2018-05-11 Pedro Alves <palves@redhat.com>
2529
2530 * corefile.c (core_file_command): Move to corelow.c.
2531 * corelow.c (the_core_target): Delete.
2532 (core_file_command): Moved from corefile.c. Check exec_bfd
2533 instead of the_core_target. Use target_detach instead of calling
2534 into the_core_target directly.
2535 (maybe_say_no_core_file_now): New.
2536 (core_target::detach): Use it.
2537 (_initialize_corelow): Remove references to the_core_target.
2538 * gdbcore.h (the_core_target): Delete.
2539
2540 2018-05-11 Tom Tromey <tromey@redhat.com>
2541 Pedro Alves <palves@redhat.com>
2542
2543 * corefile.c (core_bfd): Remove.
2544 * gdbcore.h (core_bfd): Now a macro.
2545 * progspace.h (struct program_space) <cbfd>: New field.
2546
2547 2018-05-11 Tom Tromey <tom@tromey.com>
2548
2549 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2550 gdb::def_vector.
2551
2552 2018-05-10 Tom Tromey <tom@tromey.com>
2553
2554 * configure: Rebuild.
2555 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2556
2557 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2558
2559 PR server/23158:
2560 * regformats/regdat.sh: Adjust script, following the addition
2561 of the new expedite_regs parameter to init_target_desc.
2562
2563 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2564
2565 PR gdb/23127
2566 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2567 set_gdbarch_significant_addr_bit.
2568 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2569 set_gdbarch_significant_addr_bit.
2570 * utils.c (address_significant): Update to sign extend addr.
2571
2572 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2573
2574 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2575 (xtensa_linux_init_abi): Limit tdep->num_regs by
2576 tdep->num_nopriv_regs.
2577 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2578 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2579 not initialized.
2580
2581 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2582
2583 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2584
2585 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2586
2587 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2588 (I387_MXCSR_INIT_VAL): New constant.
2589 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2590 buffer if it was supplied by the inferior.
2591 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2592 (i387_xsave_get_clear_bv): New function.
2593 (i387_supply_xsave): Only read x87 control registers from the
2594 xsave buffer if the feature is enabled, and the state will have
2595 been written, otherwise, provide a suitable default.
2596 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2597 including x87 control registers. Update control registers if they
2598 have changed from the default value, and mark features as enabled
2599 as required.
2600 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2601
2602 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2603
2604 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2605
2606 2018-05-07 Tom Tromey <tom@tromey.com>
2607
2608 * configure: Rebuild.
2609 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2610
2611 2018-05-07 Tom Tromey <tom@tromey.com>
2612
2613 PR tdep/20362:
2614 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2615 bit. Use correct value for VDIV.
2616
2617 2018-05-04 Tom Tromey <tom@tromey.com>
2618
2619 * configure: Rebuild.
2620 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2621
2622 2018-05-04 Tom Tromey <tom@tromey.com>
2623
2624 * linux-record.c (record_linux_system_call) <case
2625 RECORD_SYS_RECVFROM>: Add "break".
2626
2627 2018-05-04 Tom Tromey <tom@tromey.com>
2628
2629 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2630 Add missing "break".
2631 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2632 Add missing "break".
2633
2634 2018-05-04 Tom Tromey <tom@tromey.com>
2635
2636 * rs6000-tdep.c (ppc_process_record_op4)
2637 (ppc_process_record_op63): Add fall-through comment.
2638
2639 2018-05-04 Tom Tromey <tom@tromey.com>
2640
2641 * i386-tdep.c (i386_process_record): Add fall-through comment.
2642
2643 2018-05-04 Tom Tromey <tom@tromey.com>
2644
2645 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2646 comment.
2647
2648 2018-05-04 Tom Tromey <tom@tromey.com>
2649
2650 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2651 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2652 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2653 comment.
2654 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2655 comment.
2656 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2657 comment.
2658
2659 2018-05-04 Tom Tromey <tom@tromey.com>
2660
2661 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2662
2663 2018-05-04 Tom Tromey <tom@tromey.com>
2664
2665 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2666 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2667 * symfile.c (section_is_mapped): Fix fall-through comment.
2668 * stabsread.c (define_symbol, read_member_functions): Fix
2669 fall-through comment.
2670 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2671 comment.
2672 * remote.c (remote_wait_as): Fix fall-through comment.
2673 * p-exp.y (yylex): Fix fall-through comment.
2674 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2675 comment.
2676 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2677 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2678 * jv-exp.y (yylex): Fix fall-through comment.
2679 * go-exp.y (lex_one_token): Fix fall-through comment.
2680 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2681 fall-through comment.
2682 * f-exp.y (yylex): Fix fall-through comment.
2683 * dwarf2read.c (process_die): Fix fall-through comments.
2684 * dbxread.c (process_one_symbol): Fix fall-through comment.
2685 * d-exp.y (lex_one_token): Fix fall-through comment.
2686 * cp-name-parser.y (yylex): Fix fall-through comment.
2687 * coffread.c (coff_symtab_read): Fix fall-through comment.
2688 * c-exp.y (lex_one_token): Fix fall-through comment.
2689 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2690 comment.
2691 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2692 comment.
2693
2694 2018-05-04 Tom Tromey <tom@tromey.com>
2695
2696 PR python/22730:
2697 * NEWS: Mention gdb.execute change.
2698 * gdbcmd.h (execute_control_command): Don't declare.
2699 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2700 execute_control_commands, execute_control_commands_to_string.
2701 * cli/cli-script.h (execute_control_commands)
2702 (execute_control_commands_to_string): Declare.
2703 (execute_control_command): Add from_tty parameter.
2704 * cli/cli-script.c (execute_control_commands)
2705 (execute_control_commands_to_string): New functions.
2706 (execute_user_command): Use execute_control_commands.
2707 (execute_control_command_1): Add "from_tty" parameter. Update.
2708 (execute_control_command): Likewise.
2709
2710 2018-05-04 Tom Tromey <tom@tromey.com>
2711
2712 PR python/22731:
2713 * NEWS: Mention that breakpoint commands are writable.
2714 * python/py-breakpoint.c (bppy_set_commands): New function.
2715 (breakpoint_object_getset) <"commands">: Use it.
2716
2717 2018-05-04 Tom Tromey <tom@tromey.com>
2718
2719 * tracepoint.c (actions_command): Update.
2720 * mi/mi-cmd-break.c (mi_command_line_array)
2721 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2722 (mi_read_next_line): Remove.
2723 (mi_cmd_break_commands): Update.
2724 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2725 function_view.
2726 * cli/cli-script.c (get_command_line): Update.
2727 (process_next_line): Use function_view. Constify.
2728 (recurse_read_control_structure, read_command_lines)
2729 (read_command_lines_1): Change argument types to function_view.
2730 (do_define_command, document_command): Update.
2731 * breakpoint.h (check_tracepoint_command): Don't declare.
2732 * breakpoint.c (check_tracepoint_command): Remove.
2733 (commands_command_1, create_tracepoint_from_upload): Update.
2734
2735 2018-05-04 Tom Tromey <tom@tromey.com>
2736
2737 PR gdb/11750:
2738 * cli/cli-script.h (enum command_control_type) <define_control>:
2739 New constant.
2740 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2741 (build_command_line, execute_control_command_1)
2742 (process_next_line): Likewise.
2743 (do_define_command): New function, extracted from define_command.
2744 (define_command): Use it.
2745
2746 2018-05-04 Tom Tromey <tom@tromey.com>
2747
2748 * tracepoint.c (actions_command): Update.
2749 * cli/cli-script.h (read_command_lines): Update.
2750 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2751 (MAX_TMPBUF): Remove define.
2752 (define_command): Use string_printf.
2753 (document_command): Likewise.
2754 * breakpoint.c (commands_command_1): Update.
2755
2756 2018-05-04 Tom Tromey <tom@tromey.com>
2757
2758 * top.c (execute_command): Update.
2759 * cli/cli-script.h (print_command_lines): Now varargs.
2760 * cli/cli-script.c (print_command_lines): Now varargs.
2761 (execute_control_command_1) <case while_control, case if_control>:
2762 Update.
2763
2764 2018-05-04 Tom Tromey <tom@tromey.com>
2765
2766 * tracepoint.c (all_tracepoint_actions): Rename from
2767 all_tracepoint_actions_and_cleanup. Change return type.
2768 (actions_command, encode_actions_1, encode_actions)
2769 (trace_dump_actions, tdump_command): Update.
2770 * remote.c (remote_download_command_source): Update.
2771 * python/python.c (gdbpy_eval_from_control_command)
2772 (python_command, python_interactive_command): Update.
2773 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2774 * guile/guile.c (guile_command)
2775 (gdbscm_eval_from_control_command, guile_command): Update.
2776 * compile/compile.c (compile_code_command)
2777 (compile_print_command, compile_to_object): Update.
2778 * cli/cli-script.h (struct command_lines_deleter): New.
2779 (counted_command_line): New typedef.
2780 (struct command_line): Add constructor, destructor.
2781 <body_list>: Remove.
2782 <body_list_0, body_list_1>: New members.
2783 (command_line_up): Remove typedef.
2784 (read_command_lines, read_command_lines_1, get_command_line):
2785 Update.
2786 (copy_command_lines): Don't declare.
2787 * cli/cli-script.c (build_command_line): Use "new".
2788 (get_command_line): Return counted_command_line.
2789 (print_command_lines, execute_user_command)
2790 (execute_control_command_1, while_command, if_command): Update.
2791 (realloc_body_list): Remove.
2792 (process_next_line, recurse_read_control_structure): Update.
2793 (read_command_lines, read_command_lines_1): Return counted_command_line.
2794 (free_command_lines): Use "delete".
2795 (copy_command_lines): Remove.
2796 (define_command, document_command, show_user_1): Update.
2797 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2798 a counted_command_line.
2799 * breakpoint.h (counted_command_line): Remove typedef.
2800 (breakpoint_set_commands): Update.
2801 * breakpoint.c (check_no_tracepoint_commands)
2802 (validate_commands_for_breakpoint): Update.
2803 (breakpoint_set_commands): Change commands to be a
2804 counted_command_line.
2805 (commands_command_1, update_dprintf_command_list)
2806 (create_tracepoint_from_upload): Update.
2807
2808 2018-05-04 Tom Tromey <tom@tromey.com>
2809
2810 * cli/cli-decode.h (cmd_list_element): New constructor.
2811 (~cmd_list_element): New destructor.
2812 (struct cmd_list_element): Add initializers.
2813 * cli/cli-decode.c (do_add_cmd): Use "new".
2814 (delete_cmd): Use "delete".
2815
2816 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2817 Pedro Alves <palves@redhat.com>
2818
2819 PR breakpoints/19806 and support for PR external/20207.
2820 * NEWS: Mention Aarch64 watchpoint improvements.
2821 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2822 watchpoints and PR external/20207 watchpoints.
2823 * nat/aarch64-linux-hw-point.c
2824 (kernel_supports_any_contiguous_range): New.
2825 (aarch64_watchpoint_offset): New.
2826 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2827 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2828 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2829 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2830 next_addr_orig_p. Support PR external/20207 watchpoints.
2831 (aarch64_downgrade_regs): New.
2832 (aarch64_dr_state_insert_one_point): New parameters offset and
2833 addr_orig.
2834 (aarch64_dr_state_remove_one_point): Likewise.
2835 (aarch64_handle_breakpoint): Update caller.
2836 (aarch64_handle_aligned_watchpoint): Likewise.
2837 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2838 aligned_offset.
2839 (aarch64_linux_set_debug_regs): Remove const from state. Call
2840 aarch64_downgrade_regs.
2841 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2842 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2843 (DR_CONTROL_MASK): ... this.
2844 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2845 (unsigned int aarch64_watchpoint_offset): New prototype.
2846 (aarch64_linux_set_debug_regs): Remove const from state.
2847 * utils.c (align_up, align_down): Move to ...
2848 * common/common-utils.c (align_up, align_down): ... here.
2849 * utils.h (align_up, align_down): Move to ...
2850 * common/common-utils.h (align_up, align_down): ... here.
2851
2852 2018-05-04 Joel Brobecker <brobecker@adacore.com>
2853
2854 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2855 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2856 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2857 Re-implement to match the ABI as summarized in GCC's
2858 gcc/config/sparc/sparc.c. All callers updated.
2859 (sparc32_store_arguments): Remove assertion.
2860
2861 2018-05-04 Tom Tromey <tom@tromey.com>
2862
2863 * printcmd.c: Don't include tui.h.
2864 (decode_format): Use skip_spaces.
2865
2866 2018-05-04 Tom Tromey <tom@tromey.com>
2867
2868 PR gdb/22619:
2869 * printcmd.c (last_count): New global.
2870 (x_command): Use saved count when repeating.
2871
2872 2018-05-04 Tom Tromey <tom@tromey.com>
2873
2874 * nto-procfs.c (do_closedir_cleanup): Remove.
2875 (procfs_pidlist): Use gdb_dir_up.
2876 * procfs.c (do_closedir_cleanup): Remove.
2877 (proc_update_threads): Use gdb_dir_up.
2878 * common/filestuff.h (struct gdb_dir_deleter): New.
2879 (gdb_dir_up): New typedef.
2880
2881 2018-05-04 Tom Tromey <tom@tromey.com>
2882
2883 * ada-lang.c (print_mention_exception): Use std::string.
2884
2885 2018-05-04 Tom Tromey <tom@tromey.com>
2886
2887 * ada-lang.c (create_excep_cond_exprs): Update.
2888 (ada_exception_catchpoint_cond_string): Use std::string.
2889
2890 2018-05-04 Tom Tromey <tom@tromey.com>
2891
2892 * ada-lang.c (xget_renaming_scope): Return std::string.
2893 (old_renaming_is_invisible): Update.
2894
2895 2018-05-04 Tom Tromey <tom@tromey.com>
2896
2897 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2898 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2899
2900 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2901
2902 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2903
2904 2018-05-04 Tom Tromey <tom@tromey.com>
2905
2906 * remote.c (remote_query_supported_append): Change type.
2907 (remote_check_symbols): Update.
2908
2909 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2910
2911 PR gdb/11420
2912 * configure.ac: Prepend libpython.
2913 * python/python-config.py: Likewise.
2914 * configure: Regenerate.
2915
2916 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2917
2918 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2919
2920 2018-05-03 Pedro Alves <palves@redhat.com>
2921
2922 * s390-linux-nat.c
2923 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2924 override. Write 'true' instead of '1'.
2925 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2926 declaration.
2927
2928 2018-05-02 Pedro Alves <palves@redhat.com>
2929
2930 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2931 add_inf_child_target.
2932 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2933 add_inf_child_target.
2934 * aix-thread.c (aix_thread_target_info): New.
2935 (aix_thread_target) <shortname, longname, doc>: Delete.
2936 <info>: New.
2937 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2938 add_inf_child_target.
2939 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2940 add_inf_child_target.
2941 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2942 add_inf_child_target.
2943 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2944 add_inf_child_target.
2945 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2946 add_inf_child_target.
2947 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2948 add_inf_child_target.
2949 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2950 add_inf_child_target.
2951 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2952 add_inf_child_target.
2953 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2954 add_inf_child_target.
2955 * bfd-target.c (target_bfd_target_info): New.
2956 (target_bfd) <shortname, longname, doc>: Delete.
2957 <info>: New.
2958 * bsd-kvm.c (bsd_kvm_target_info): New.
2959 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2960 <info>: New.
2961 (bsd_kvm_target::open): Rename to ...
2962 (bsd_kvm_target_open): ... this. Adjust.
2963 * bsd-uthread.c (bsd_uthread_target_info): New.
2964 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2965 <info>: New.
2966 * corefile.c (core_file_command): Adjust.
2967 * corelow.c (core_target_info): New.
2968 (core_target) <shortname, longname, doc>: Delete.
2969 <info>: New.
2970 (core_target::open): Rename to ...
2971 (core_target_open): ... this. Adjust.
2972 * ctf.c (ctf_target_info): New.
2973 (ctf_target) <shortname, longname, doc>: Delete.
2974 <info>: New.
2975 (ctf_target::open): Rename to ...
2976 (ctf_target_open): ... this.
2977 (_initialize_ctf): Adjust.
2978 * exec.c (exec_target_info): New.
2979 (exec_target) <shortname, longname, doc>: Delete.
2980 <info>: New.
2981 (exec_target::open): Rename to ...
2982 (exec_target_open): ... this.
2983 * gdbcore.h (core_target_open): Declare.
2984 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2985 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2986 add_inf_child_target.
2987 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2988 add_inf_child_target.
2989 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2990 add_inf_child_target.
2991 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2992 add_inf_child_target.
2993 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2994 add_inf_child_target.
2995 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2996 add_inf_child_target.
2997 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2998 add_inf_child_target.
2999 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3000 add_inf_child_target.
3001 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3002 add_inf_child_target.
3003 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3004 add_inf_child_target.
3005 * inf-child.c (inf_child_target_info): New.
3006 (inf_child_target::info): New.
3007 (inf_child_open_target): Remove 'target' parameter. Use
3008 get_native_target instead.
3009 (inf_child_target::open): Delete.
3010 (add_inf_child_target): New.
3011 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3012 Delete.
3013 <info>: New.
3014 (add_inf_child_target): Declare.
3015 (inf_child_open_target): Declare.
3016 * linux-thread-db.c (thread_db_target_info): New.
3017 (thread_db_target) <shortname, longname, doc>: Delete.
3018 <info>: New.
3019 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3020 add_inf_child_target.
3021 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3022 add_inf_child_target.
3023 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3024 add_inf_child_target.
3025 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3026 add_inf_child_target.
3027 * make-target-delegates (print_class): Adjust.
3028 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3029 add_inf_child_target.
3030 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3031 add_inf_child_target.
3032 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3033 add_inf_child_target.
3034 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3035 add_inf_child_target.
3036 * nto-procfs.c (nto_native_target_info): New.
3037 (nto_procfs_target_native) <shortname, longname, doc>:
3038 Delete.
3039 <info>: New.
3040 (nto_procfs_target_info): New.
3041 (nto_procfs_target_procfs) <shortname, longname, doc>:
3042 Delete.
3043 <info>: New.
3044 (init_procfs_targets): Adjust.
3045 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3046 add_inf_child_target.
3047 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3048 add_inf_child_target.
3049 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3050 add_inf_child_target.
3051 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3052 add_inf_child_target.
3053 * ravenscar-thread.c (ravenscar_target_info): New.
3054 (ravenscar_thread_target) <shortname, longname, doc>:
3055 Delete.
3056 <info>: New.
3057 * record-btrace.c (record_btrace_target_info):
3058 (record_btrace_target) <shortname, longname, doc>: Delete.
3059 <info>: New.
3060 (record_btrace_target::open): Rename to ...
3061 (record_btrace_target_open): ... this. Adjust.
3062 * record-full.c (record_longname, record_doc): New.
3063 (record_full_base_target) <shortname, longname, doc>: Delete.
3064 <info>: New.
3065 (record_full_target_info): New.
3066 (record_full_target): <shortname>: Delete.
3067 <info>: New.
3068 (record_full_core_open_1, record_full_open_1): Update comments.
3069 (record_full_base_target::open): Rename to ...
3070 (record_full_open): ... this.
3071 (cmd_record_full_restore): Update.
3072 (_initialize_record_full): Update.
3073 * remote-sim.c (remote_sim_target_info): New.
3074 (gdbsim_target) <shortname, longname, doc>: Delete.
3075 <info>: New.
3076 (gdbsim_target::open): Rename to ...
3077 (gdbsim_target_open): ... this.
3078 (_initialize_remote_sim): Adjust.
3079 * remote.c (remote_doc): New.
3080 (remote_target_info): New.
3081 (remote_target) <shortname, longname, doc>: Delete.
3082 <info>: New.
3083 (extended_remote_target_info): New.
3084 (extended_remote_target) <shortname, longname, doc>: Delete.
3085 <info>: New.
3086 (remote_target::open_1): Make static. Adjust.
3087 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3088 * s390-linux-nat.c (_initialize_s390_nat): Use
3089 add_inf_child_target.
3090 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3091 add_inf_child_target.
3092 * sol-thread.c (thread_db_target_info): New.
3093 (sol_thread_target) <shortname, longname, doc>: Delete.
3094 <info>: New.
3095 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3096 add_inf_child_target.
3097 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3098 add_inf_child_target.
3099 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3100 add_inf_child_target.
3101 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3102 add_inf_child_target.
3103 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3104 add_inf_child_target.
3105 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3106 add_inf_child_target.
3107 * spu-linux-nat.c (_initialize_spu_nat): Use
3108 add_inf_child_target.
3109 * spu-multiarch.c (spu_multiarch_target_info): New.
3110 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3111 <info>: New.
3112 * target-delegates.c: Regenerate.
3113 * target.c: Include <unordered_map>.
3114 (target_ops_p): Delete.
3115 (DEF_VEC_P(target_ops_p)): Delete.
3116 (target_factories): New.
3117 (test_target_info): New.
3118 (test_target_ops::info): New.
3119 (open_target): Adjust to use target_factories.
3120 (add_target_with_completer): Rename to ...
3121 (add_target): ... this. Change prototype. Register target_info
3122 and open callback in target_factories. Register target_info in
3123 command context instead of target_ops.
3124 (add_target): Delete old implementation.
3125 (add_deprecated_target_alias): Change prototype. Adjust.
3126 (the_native_target): New.
3127 (set_native_target, get_native_target): New.
3128 (find_default_run_target): Use the_native_target.
3129 (find_attach_target, find_run_target): Simplify.
3130 (target_ops::open): Delete.
3131 (dummy_target_info): New.
3132 (dummy_target::shortname, dummy_target::longname)
3133 (dummy_target::doc): Delete.
3134 (dummy_target::info): New.
3135 (debug_target::shortname, debug_target::longname)
3136 (debug_target::doc): Delete.
3137 (debug_target::info): New.
3138 * target.h (struct target_info): New.
3139 (target_ops::~target_ops): Add comment.
3140 (target_ops::info): New.
3141 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3142 longer virtual. Implement in terms of target_info.
3143 (set_native_target, get_native_target): Declare.
3144 (target_open_ftype): New.
3145 (add_target, add_target_with_completer)
3146 (add_deprecated_target_alias): Change prototype.
3147 (test_target) <shortname, longname, doc>: Delete.
3148 <info>: New.
3149 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3150 add_inf_child_target.
3151 * tracefile-tfile.c (tfile_target_info): New.
3152 (tfile_target) <shortname, longname, doc>: Delete.
3153 <info>: New.
3154 (tfile_target::open): Rename to ...
3155 (tfile_target_open): ... this.
3156 (_initialize_tracefile_tfile): Adjust.
3157 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3158 add_inf_child_target.
3159 * windows-nat.c (_initialize_windows_nat): Use
3160 add_inf_child_target.
3161 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3162 add_inf_child_target.
3163
3164 2018-05-02 Pedro Alves <palves@redhat.com>
3165
3166 * linux-nat.h (linux_nat_target) <low_new_thread,
3167 low_delete_thread, low_new_fork, low_forget_process,
3168 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3169 New virtual methods.
3170 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3171 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3172 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3173 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3174 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3175 Delete.
3176 * linux-fork.c (delete_fork): Adjust to call low method.
3177 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3178 (linux_nat_new_fork, linux_nat_forget_process_hook)
3179 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3180 (linux_nat_status_is_event):
3181 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3182 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3183 to call low method.
3184 (sigtrap_is_event): Rename to ...
3185 (linux_nat_target::low_status_is_event): ... this.
3186 (linux_nat_set_status_is_event): Delete.
3187 (save_stop_reason, linux_nat_wait_1)
3188 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3189 low methods.
3190 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3191 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3192 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3193 (linux_nat_set_prepare_to_resume): Delete.
3194 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3195 low virtual methods.
3196 * amd64-linux-nat.c: Likewise.
3197 * arm-linux-nat.c: Likewise.
3198 * i386-linux-nat.c: Likewise.
3199 * ia64-linux-nat.c: Likewise.
3200 * mips-linux-nat.c: Likewise.
3201 * ppc-linux-nat.c: Likewise.
3202 * s390-linux-nat.c: Likewise.
3203 * sparc64-linux-nat.c: Likewise.
3204 * x86-linux-nat.c: Likewise.
3205 * x86-linux-nat.h: Include "nat/x86-linux.h".
3206 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3207 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3208 Override methods.
3209
3210 2018-05-02 Pedro Alves <palves@redhat.com>
3211
3212 * target.h (target_ops)
3213 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3214 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3215 stopped_by_watchpoint, have_continuable_watchpoint,
3216 stopped_data_address, watchpoint_addr_within_range,
3217 can_accel_watchpoint_condition, can_run, thread_alive,
3218 has_all_memory, has_memory, has_stack, has_registers,
3219 has_execution, can_async_p, is_async_p, supports_non_stop,
3220 always_non_stop_p, can_execute_reverse, supports_multi_process,
3221 supports_enable_disable_tracepoint,
3222 supports_disable_randomization, supports_string_tracing,
3223 supports_evaluation_of_breakpoint_conditions,
3224 can_run_breakpoint_commands, filesystem_is_local,
3225 can_download_tracepoint, get_trace_state_variable_value,
3226 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3227 record_is_replaying, record_will_replay,
3228 augmented_libraries_svr4_read>: Adjust to return bool.
3229 * aarch64-linux-nat.c: All implementations adjusted.
3230 * aix-thread.c: All implementations adjusted.
3231 * arm-linux-nat.c: All implementations adjusted.
3232 * breakpoint.c: All implementations adjusted.
3233 * bsd-kvm.c: All implementations adjusted.
3234 * bsd-uthread.c: All implementations adjusted.
3235 * corelow.c: All implementations adjusted.
3236 * ctf.c: All implementations adjusted.
3237 * darwin-nat.c: All implementations adjusted.
3238 * darwin-nat.h: All implementations adjusted.
3239 * exec.c: All implementations adjusted.
3240 * fbsd-nat.c: All implementations adjusted.
3241 * fbsd-nat.h: All implementations adjusted.
3242 * gnu-nat.c: All implementations adjusted.
3243 * gnu-nat.h: All implementations adjusted.
3244 * go32-nat.c: All implementations adjusted.
3245 * ia64-linux-nat.c: All implementations adjusted.
3246 * inf-child.c: All implementations adjusted.
3247 * inf-child.h: All implementations adjusted.
3248 * inf-ptrace.c: All implementations adjusted.
3249 * inf-ptrace.h: All implementations adjusted.
3250 * linux-nat.c: All implementations adjusted.
3251 * linux-nat.h: All implementations adjusted.
3252 * mips-linux-nat.c: All implementations adjusted.
3253 * nto-procfs.c: All implementations adjusted.
3254 * ppc-linux-nat.c: All implementations adjusted.
3255 * procfs.c: All implementations adjusted.
3256 * ravenscar-thread.c: All implementations adjusted.
3257 * record-btrace.c: All implementations adjusted.
3258 * record-full.c: All implementations adjusted.
3259 * remote-sim.c: All implementations adjusted.
3260 * remote.c: All implementations adjusted.
3261 * s390-linux-nat.c: All implementations adjusted.
3262 * sol-thread.c: All implementations adjusted.
3263 * spu-multiarch.c: All implementations adjusted.
3264 * target-delegates.c: All implementations adjusted.
3265 * target.c: All implementations adjusted.
3266 * target.h: All implementations adjusted.
3267 * tracefile-tfile.c: All implementations adjusted.
3268 * tracefile.c: All implementations adjusted.
3269 * tracefile.h: All implementations adjusted.
3270 * windows-nat.c: All implementations adjusted.
3271 * x86-linux-nat.h: All implementations adjusted.
3272 * x86-nat.h: All implementations adjusted.
3273
3274 2018-05-02 Pedro Alves <palves@redhat.com>
3275
3276 * make-target-delegates (scan_target_h): Don't trim lines here.
3277 Replace sequences of tabs and/or whitespace with a single
3278 whitespace.
3279 (top level, parsing methods): Trim each line before processing it
3280 here.
3281
3282 2018-05-02 Pedro Alves <palves@redhat.com>
3283 John Baldwin <jhb@freebsd.org>
3284
3285 * target.h (enum strata) <debug_stratum>: New.
3286 (struct target_ops) <all delegation methods>: Replace by C++
3287 virtual methods, and drop "to_" prefix. All references updated
3288 throughout.
3289 <to_shortname, to_longname, to_doc, to_data,
3290 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3291 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3292 virtual methods. All references updated throughout.
3293 <can_attach, supports_terminal_ours, can_create_inferior,
3294 get_thread_control_capabilities, attach_no_wait>: New
3295 virtual methods.
3296 <insert_breakpoint, remove_breakpoint>: Now
3297 TARGET_DEFAULT_NORETURN methods.
3298 <info_proc>: Now returns bool.
3299 <to_magic>: Delete.
3300 (OPS_MAGIC): Delete.
3301 (current_target): Delete. All references replaced by references
3302 to ...
3303 (target_stack): ... this. New.
3304 (target_shortname, target_longname): Adjust.
3305 (target_can_run): Now a function declaration.
3306 (default_child_has_all_memory, default_child_has_memory)
3307 (default_child_has_stack, default_child_has_registers)
3308 (default_child_has_execution): Remove target_ops parameter.
3309 (complete_target_initialization): Delete.
3310 (memory_breakpoint_target): New template class.
3311 (test_target_ops): Refactor as a C++ class with virtual methods.
3312 * make-target-delegates (NAME_PART): Tighten.
3313 (POINTER_PART, CP_SYMBOL): New.
3314 (SIMPLE_RETURN_PART): Reimplement.
3315 (VEC_RETURN_PART): Expect less.
3316 (RETURN_PART, VIRTUAL_PART): New.
3317 (METHOD): Adjust to C++ virtual methods.
3318 (scan_target_h): Remove reference to C99.
3319 (dname): Output "target_ops::" prefix.
3320 (write_function_header): Adjust to output a C++ class method.
3321 (write_declaration): New.
3322 (write_delegator): Adjust to output a C++ class method.
3323 (tdname): Output "dummy_target::" prefix.
3324 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3325 method.
3326 (tdefault_names, debug_names): Delete.
3327 (return_types, tdefaults, styles, argtypes_array): New.
3328 (top level): All methods are delegators.
3329 (print_class): New.
3330 (top level): Print dummy_target and debug_target classes.
3331 * target-delegates.c: Regenerate.
3332 * target-debug.h (target_debug_print_enum_info_proc_what)
3333 (target_debug_print_thread_control_capabilities)
3334 (target_debug_print_thread_info_p): New.
3335 * target.c (dummy_target): Delete.
3336 (the_dummy_target, the_debug_target): New.
3337 (target_stack): Now extern.
3338 (set_targetdebug): Push/unpush debug target.
3339 (default_child_has_all_memory, default_child_has_memory)
3340 (default_child_has_stack, default_child_has_registers)
3341 (default_child_has_execution): Remove target_ops parameter.
3342 (complete_target_initialization): Delete.
3343 (add_target_with_completer): No longer call
3344 complete_target_initialization.
3345 (target_supports_terminal_ours): Use regular delegation.
3346 (update_current_target): Delete.
3347 (push_target): No longer check magic number. Don't call
3348 update_current_target.
3349 (unpush_target): Don't call update_current_target.
3350 (target_is_pushed): No longer check magic number.
3351 (target_require_runnable): Skip for all stratums over
3352 process_stratum.
3353 (target_ops::info_proc): New.
3354 (target_info_proc): Use find_target_at and
3355 find_default_run_target.
3356 (target_supports_disable_randomization): Use regular delegation.
3357 (target_get_osdata): Use find_target_at.
3358 (target_ops::open, target_ops::close, target_ops::can_attach)
3359 (target_ops::attach, target_ops::can_create_inferior)
3360 (target_ops::create_inferior, target_ops::can_run)
3361 (target_can_run): New.
3362 (default_fileio_target): Use regular delegation.
3363 (target_ops::fileio_open, target_ops::fileio_pwrite)
3364 (target_ops::fileio_pread, target_ops::fileio_fstat)
3365 (target_ops::fileio_close, target_ops::fileio_unlink)
3366 (target_ops::fileio_readlink): New.
3367 (target_fileio_open_1, target_fileio_unlink)
3368 (target_fileio_readlink): Always call the target method. Handle
3369 FILEIO_ENOSYS.
3370 (return_zero, return_zero_has_execution): Delete.
3371 (init_dummy_target): Delete.
3372 (dummy_target::dummy_target, dummy_target::shortname)
3373 (dummy_target::longname, dummy_target::doc)
3374 (debug_target::debug_target, debug_target::shortname)
3375 (debug_target::longname, debug_target::doc): New.
3376 (target_supports_delete_record): Use regular delegation.
3377 (setup_target_debug): Delete.
3378 (maintenance_print_target_stack): Skip debug_stratum.
3379 (initialize_targets): Instantiate the_dummy_target and
3380 the_debug_target.
3381 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3382 use target_stack.
3383 (target_auxv_search, fprint_target_auxv): Adjust.
3384 (info_auxv_command): Adjust to use target_stack.
3385 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3386 * exceptions.c (print_flush): Handle a NULL target_stack.
3387 * regcache.c (target_ops_no_register): Refactor as class with
3388 virtual methods.
3389
3390 * exec.c (exec_target): New class.
3391 (exec_ops): Now an exec_target.
3392 (exec_open, exec_close_1, exec_get_section_table)
3393 (exec_xfer_partial, exec_files_info, exec_has_memory)
3394 (exec_make_note_section): Refactor as exec_target methods.
3395 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3396 Delete.
3397 (exec_target::find_memory_regions): New.
3398 (_initialize_exec): Don't call init_exec_ops.
3399 * gdbcore.h (exec_file_clear): Delete.
3400
3401 * corefile.c (core_target): Delete.
3402 (core_file_command): Adjust.
3403 * corelow.c (core_target): New class.
3404 (the_core_target): New.
3405 (core_close): Remove target_ops parameter.
3406 (core_close_cleanup): Adjust.
3407 (core_target::close): New.
3408 (core_open, core_detach, get_core_registers, core_files_info)
3409 (core_xfer_partial, core_thread_alive, core_read_description)
3410 (core_pid_to_str, core_thread_name, core_has_memory)
3411 (core_has_stack, core_has_registers, core_info_proc): Rework as
3412 core_target methods.
3413 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3414 (_initialize_corelow): Initialize the_core_target.
3415 * gdbcore.h (core_target): Delete.
3416 (the_core_target): New.
3417
3418 * ctf.c: (ctf_target): New class.
3419 (ctf_ops): Now a ctf_target.
3420 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3421 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3422 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3423 methods.
3424 (init_ctf_ops): Delete.
3425 (_initialize_ctf): Don't call it.
3426 * tracefile-tfile.c (tfile_target): New class.
3427 (tfile_ops): Now a tfile_target.
3428 (tfile_open, tfile_close, tfile_files_info)
3429 (tfile_get_tracepoint_status, tfile_trace_find)
3430 (tfile_fetch_registers, tfile_xfer_partial)
3431 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3432 Refactor as tfile_target methods.
3433 (tfile_xfer_partial_features): Remove target_ops parameter.
3434 (init_tfile_ops): Delete.
3435 (_initialize_tracefile_tfile): Don't call it.
3436 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3437 (tracefile_has_stack, tracefile_has_registers)
3438 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3439 tracefile_target methods.
3440 (init_tracefile_ops): Delete.
3441 (tracefile_target::tracefile_target): New.
3442 * tracefile.h: Include "target.h".
3443 (tracefile_target): New class.
3444 (init_tracefile_ops): Delete.
3445
3446 * spu-multiarch.c (spu_multiarch_target): New class.
3447 (spu_ops): Now a spu_multiarch_target.
3448 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3449 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3450 (spu_search_memory, spu_mourn_inferior): Refactor as
3451 spu_multiarch_target methods.
3452 (init_spu_ops): Delete.
3453 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3454 complete_target_initialization.
3455
3456 * ravenscar-thread.c (ravenscar_thread_target): New class.
3457 (ravenscar_ops): Now a ravenscar_thread_target.
3458 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3459 (ravenscar_thread_alive, ravenscar_pid_to_str)
3460 (ravenscar_fetch_registers, ravenscar_store_registers)
3461 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3462 (ravenscar_stopped_by_hw_breakpoint)
3463 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3464 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3465 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3466 methods.
3467 (init_ravenscar_thread_ops): Delete.
3468 (_initialize_ravenscar): Remove references to
3469 init_ravenscar_thread_ops and complete_target_initialization.
3470
3471 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3472 (bsd_uthread_target): New class.
3473 (bsd_uthread_ops): Now a bsd_uthread_target.
3474 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3475 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3476 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3477 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3478 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3479 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3480 (bsd_uthread_target): Delete function.
3481 (_initialize_bsd_uthread): Remove reference to
3482 complete_target_initialization.
3483
3484 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3485 (target_bfd): ... this new class.
3486 (target_bfd_xfer_partial, target_bfd_get_section_table)
3487 (target_bfd_close): Refactor as target_bfd methods.
3488 (target_bfd::~target_bfd): New.
3489 (target_bfd_reopen): Adjust.
3490 (target_bfd::close): New.
3491
3492 * record-btrace.c (record_btrace_target): New class.
3493 (record_btrace_ops): Now a record_btrace_target.
3494 (record_btrace_open, record_btrace_stop_recording)
3495 (record_btrace_disconnect, record_btrace_close)
3496 (record_btrace_async, record_btrace_info)
3497 (record_btrace_insn_history, record_btrace_insn_history_range)
3498 (record_btrace_insn_history_from, record_btrace_call_history)
3499 (record_btrace_call_history_range)
3500 (record_btrace_call_history_from, record_btrace_record_method)
3501 (record_btrace_is_replaying, record_btrace_will_replay)
3502 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3503 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3504 (record_btrace_store_registers, record_btrace_prepare_to_store)
3505 (record_btrace_to_get_unwinder)
3506 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3507 (record_btrace_commit_resume, record_btrace_wait)
3508 (record_btrace_stop, record_btrace_can_execute_reverse)
3509 (record_btrace_stopped_by_sw_breakpoint)
3510 (record_btrace_supports_stopped_by_sw_breakpoint)
3511 (record_btrace_stopped_by_hw_breakpoint)
3512 (record_btrace_supports_stopped_by_hw_breakpoint)
3513 (record_btrace_update_thread_list, record_btrace_thread_alive)
3514 (record_btrace_goto_begin, record_btrace_goto_end)
3515 (record_btrace_goto, record_btrace_stop_replaying_all)
3516 (record_btrace_execution_direction)
3517 (record_btrace_prepare_to_generate_core)
3518 (record_btrace_done_generating_core): Refactor as
3519 record_btrace_target methods.
3520 (init_record_btrace_ops): Delete.
3521 (_initialize_record_btrace): Remove reference to
3522 init_record_btrace_ops.
3523 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3524 the execution_direction global.
3525 (record_full_base_target, record_full_target)
3526 (record_full_core_target): New classes.
3527 (record_full_ops): Now a record_full_target.
3528 (record_full_core_ops): Now a record_full_core_target.
3529 (record_full_target::detach, record_full_target::disconnect)
3530 (record_full_core_target::disconnect)
3531 (record_full_target::mourn_inferior, record_full_target::kill):
3532 New.
3533 (record_full_open, record_full_close, record_full_async): Refactor
3534 as methods of the record_full_base_target class.
3535 (record_full_resume, record_full_commit_resume): Refactor
3536 as methods of the record_full_target class.
3537 (record_full_wait, record_full_stopped_by_watchpoint)
3538 (record_full_stopped_data_address)
3539 (record_full_stopped_by_sw_breakpoint)
3540 (record_full_supports_stopped_by_sw_breakpoint)
3541 (record_full_stopped_by_hw_breakpoint)
3542 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3543 methods of the record_full_base_target class.
3544 (record_full_store_registers, record_full_xfer_partial)
3545 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3546 Refactor as methods of the record_full_target class.
3547 (record_full_can_execute_reverse, record_full_get_bookmark)
3548 (record_full_goto_bookmark, record_full_execution_direction)
3549 (record_full_record_method, record_full_info, record_full_delete)
3550 (record_full_is_replaying, record_full_will_replay)
3551 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3552 (record_full_stop_replaying): Refactor as methods of the
3553 record_full_base_target class.
3554 (record_full_core_resume, record_full_core_kill)
3555 (record_full_core_fetch_registers)
3556 (record_full_core_prepare_to_store)
3557 (record_full_core_store_registers, record_full_core_xfer_partial)
3558 (record_full_core_insert_breakpoint)
3559 (record_full_core_remove_breakpoint)
3560 (record_full_core_has_execution): Refactor
3561 as methods of the record_full_core_target class.
3562 (record_full_base_target::supports_delete_record): New.
3563 (init_record_full_ops): Delete.
3564 (init_record_full_core_ops): Delete.
3565 (record_full_save): Refactor as method of the
3566 record_full_base_target class.
3567 (_initialize_record_full): Remove references to
3568 init_record_full_ops and init_record_full_core_ops.
3569
3570 * remote.c (remote_target, extended_remote_target): New classes.
3571 (remote_ops): Now a remote_target.
3572 (extended_remote_ops): Now an extended_remote_target.
3573 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3574 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3575 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3576 (remote_pass_signals, remote_set_syscall_catchpoint)
3577 (remote_program_signals, )
3578 (remote_thread_always_alive): Remove target_ops parameter.
3579 (remote_thread_alive, remote_thread_name)
3580 (remote_update_thread_list, remote_threads_extra_info)
3581 (remote_static_tracepoint_marker_at)
3582 (remote_static_tracepoint_markers_by_strid)
3583 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3584 (remote_open): Refactor as methods of remote_target.
3585 (extended_remote_open, extended_remote_detach)
3586 (extended_remote_attach, extended_remote_post_attach):
3587 (extended_remote_supports_disable_randomization)
3588 (extended_remote_create_inferior): : Refactor as method of
3589 extended_remote_target.
3590 (remote_set_permissions, remote_open_1, remote_detach)
3591 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3592 (remote_resume, remote_commit_resume, remote_stop)
3593 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3594 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3595 (remote_prepare_to_store, remote_store_registers)
3596 (remote_flash_erase, remote_flash_done, remote_files_info)
3597 (remote_kill, remote_mourn, remote_insert_breakpoint)
3598 (remote_remove_breakpoint, remote_insert_watchpoint)
3599 (remote_watchpoint_addr_within_range)
3600 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3601 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3602 (remote_supports_stopped_by_sw_breakpoint)
3603 (remote_stopped_by_hw_breakpoint)
3604 (remote_supports_stopped_by_hw_breakpoint)
3605 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3606 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3607 (remote_verify_memory): Refactor as methods of remote_target.
3608 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3609 parameter.
3610 (remote_xfer_partial, remote_get_memory_xfer_limit)
3611 (remote_search_memory, remote_rcmd, remote_memory_map)
3612 (remote_pid_to_str, remote_get_thread_local_address)
3613 (remote_get_tib_address, remote_read_description): Refactor as
3614 methods of remote_target.
3615 (remote_target::fileio_open, remote_target::fileio_pwrite)
3616 (remote_target::fileio_pread, remote_target::fileio_close): New.
3617 (remote_hostio_readlink, remote_hostio_fstat)
3618 (remote_filesystem_is_local, remote_can_execute_reverse)
3619 (remote_supports_non_stop, remote_supports_disable_randomization)
3620 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3621 (remote_supports_enable_disable_tracepoint)
3622 (remote_supports_string_tracing)
3623 (remote_can_run_breakpoint_commands, remote_trace_init)
3624 (remote_download_tracepoint, remote_can_download_tracepoint)
3625 (remote_download_trace_state_variable, remote_enable_tracepoint)
3626 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3627 (remote_trace_start, remote_get_trace_status)
3628 (remote_get_tracepoint_status, remote_trace_stop)
3629 (remote_trace_find, remote_get_trace_state_variable_value)
3630 (remote_save_trace_data, remote_get_raw_trace_data)
3631 (remote_set_disconnected_tracing, remote_core_of_thread)
3632 (remote_set_circular_trace_buffer, remote_traceframe_info)
3633 (remote_get_min_fast_tracepoint_insn_len)
3634 (remote_set_trace_buffer_size, remote_set_trace_notes)
3635 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3636 (remote_disable_btrace, remote_teardown_btrace)
3637 (remote_read_btrace, remote_btrace_conf)
3638 (remote_augmented_libraries_svr4_read, remote_load)
3639 (remote_pid_to_exec_file, remote_can_do_single_step)
3640 (remote_execution_direction, remote_thread_handle_to_thread_info):
3641 Refactor as methods of remote_target.
3642 (init_remote_ops, init_extended_remote_ops): Delete.
3643 (remote_can_async_p, remote_is_async_p, remote_async)
3644 (remote_thread_events, remote_upload_tracepoints)
3645 (remote_upload_trace_state_variables): Refactor as methods of
3646 remote_target.
3647 (_initialize_remote): Remove references to init_remote_ops and
3648 init_extended_remote_ops.
3649
3650 * remote-sim.c (gdbsim_target): New class.
3651 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3652 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3653 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3654 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3655 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3656 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3657 Refactor as methods of gdbsim_target.
3658 (gdbsim_ops): Now a gdbsim_target.
3659 (init_gdbsim_ops): Delete.
3660 (gdbsim_cntrl_c): Adjust.
3661 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3662
3663 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3664 (the_amd64_linux_nat_target): New.
3665 (amd64_linux_fetch_inferior_registers)
3666 (amd64_linux_store_inferior_registers): Refactor as methods of
3667 amd64_linux_nat_target.
3668 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3669 * i386-linux-nat.c: Don't include "linux-nat.h".
3670 (i386_linux_nat_target): New class.
3671 (the_i386_linux_nat_target): New.
3672 (i386_linux_fetch_inferior_registers)
3673 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3674 as methods of i386_linux_nat_target.
3675 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3676 * inf-child.c (inf_child_ops): Delete.
3677 (inf_child_fetch_inferior_registers)
3678 (inf_child_store_inferior_registers): Delete.
3679 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3680 methods of inf_child_target.
3681 (inf_child_target::supports_terminal_ours)
3682 (inf_child_target::terminal_init)
3683 (inf_child_target::terminal_inferior)
3684 (inf_child_target::terminal_ours_for_output)
3685 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3686 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3687 New.
3688 (inf_child_open, inf_child_disconnect, inf_child_close)
3689 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3690 (inf_child_post_startup_inferior, inf_child_can_run)
3691 (inf_child_pid_to_exec_file): Refactor as methods of
3692 inf_child_target.
3693 (inf_child_follow_fork): Delete.
3694 (inf_child_target::can_create_inferior)
3695 (inf_child_target::can_attach): New.
3696 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3697 (inf_child_target::has_stack, inf_child_target::has_registers)
3698 (inf_child_target::has_execution): New.
3699 (inf_child_fileio_open, inf_child_fileio_pwrite)
3700 (inf_child_fileio_pread, inf_child_fileio_fstat)
3701 (inf_child_fileio_close, inf_child_fileio_unlink)
3702 (inf_child_fileio_readlink, inf_child_use_agent)
3703 (inf_child_can_use_agent): Refactor as methods of
3704 inf_child_target.
3705 (return_zero, inf_child_target): Delete.
3706 (inf_child_target::inf_child_target): New.
3707 * inf-child.h: Include "target.h".
3708 (inf_child_target): Delete function prototype.
3709 (inf_child_target): New class.
3710 (inf_child_open_target, inf_child_mourn_inferior)
3711 (inf_child_maybe_unpush_target): Delete.
3712 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3713 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3714 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3715 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3716 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3717 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3718 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3719 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3720 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3721 methods of inf_ptrace_target.
3722 (inf_ptrace_target): Delete function.
3723 * inf-ptrace.h: Include "inf-child.h".
3724 (inf_ptrace_target): Delete function declaration.
3725 (inf_ptrace_target): New class.
3726 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3727 * linux-nat.c (linux_target): New.
3728 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3729 (linux_nat_target::~linux_nat_target): New.
3730 (linux_child_post_attach, linux_child_post_startup_inferior)
3731 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3732 (linux_child_remove_fork_catchpoint)
3733 (linux_child_insert_vfork_catchpoint)
3734 (linux_child_remove_vfork_catchpoint)
3735 (linux_child_insert_exec_catchpoint)
3736 (linux_child_remove_exec_catchpoint)
3737 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3738 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3739 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3740 (linux_nat_stopped_data_address)
3741 (linux_nat_stopped_by_sw_breakpoint)
3742 (linux_nat_supports_stopped_by_sw_breakpoint)
3743 (linux_nat_stopped_by_hw_breakpoint)
3744 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3745 (linux_nat_kill, linux_nat_mourn_inferior)
3746 (linux_nat_xfer_partial, linux_nat_thread_alive)
3747 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3748 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3749 (linux_child_static_tracepoint_markers_by_strid)
3750 (linux_nat_is_async_p, linux_nat_can_async_p)
3751 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3752 (linux_nat_supports_multi_process)
3753 (linux_nat_supports_disable_randomization, linux_nat_async)
3754 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3755 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3756 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3757 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3758 methods of linux_nat_target.
3759 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3760 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3761 parameter.
3762 (check_stopped_by_watchpoint): Adjust.
3763 (linux_xfer_partial): Delete.
3764 (linux_target_install_ops, linux_target, linux_nat_add_target):
3765 Delete.
3766 (linux_nat_target::linux_nat_target): New.
3767 * linux-nat.h: Include "inf-ptrace.h".
3768 (linux_nat_target): New.
3769 (linux_target, linux_target_install_ops, linux_nat_add_target):
3770 Delete function declarations.
3771 (linux_target): Declare global.
3772 * linux-thread-db.c (thread_db_target): New.
3773 (thread_db_target::thread_db_target): New.
3774 (thread_db_ops): Delete.
3775 (the_thread_db_target): New.
3776 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3777 (thread_db_update_thread_list, thread_db_pid_to_str)
3778 (thread_db_extra_thread_info)
3779 (thread_db_thread_handle_to_thread_info)
3780 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3781 (thread_db_resume): Refactor as methods of thread_db_target.
3782 (init_thread_db_ops): Delete.
3783 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3784 * x86-linux-nat.c: Don't include "linux-nat.h".
3785 (super_post_startup_inferior): Delete.
3786 (x86_linux_nat_target::~x86_linux_nat_target): New.
3787 (x86_linux_child_post_startup_inferior)
3788 (x86_linux_read_description, x86_linux_enable_btrace)
3789 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3790 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3791 methods of x86_linux_nat_target.
3792 (x86_linux_create_target): Delete. Bits folded ...
3793 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3794 pointer.
3795 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3796 (x86_linux_nat_target): New class.
3797 (x86_linux_create_target): Delete.
3798 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3799 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3800 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3801 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3802 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3803 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3804 make extern.
3805 (x86_use_watchpoints): Delete.
3806 * x86-nat.h: Include "breakpoint.h" and "target.h".
3807 (x86_use_watchpoints): Delete.
3808 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3809 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3810 (x86_insert_watchpoint, x86_remove_watchpoint)
3811 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3812 (x86_stopped_by_hw_breakpoint): New declarations.
3813 (x86_nat_target): New template class.
3814
3815 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3816 (the_ppc_linux_nat_target): New.
3817 (ppc_linux_fetch_inferior_registers)
3818 (ppc_linux_can_use_hw_breakpoint)
3819 (ppc_linux_region_ok_for_hw_watchpoint)
3820 (ppc_linux_ranged_break_num_registers)
3821 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3822 (ppc_linux_insert_mask_watchpoint)
3823 (ppc_linux_remove_mask_watchpoint)
3824 (ppc_linux_can_accel_watchpoint_condition)
3825 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3826 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3827 (ppc_linux_watchpoint_addr_within_range)
3828 (ppc_linux_masked_watch_num_registers)
3829 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3830 (ppc_linux_read_description): Refactor as methods of
3831 ppc_linux_nat_target.
3832 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3833
3834 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3835 (procfs_target): New class.
3836 (the_procfs_target): New.
3837 (procfs_target): Delete function.
3838 (procfs_auxv_parse, procfs_attach, procfs_detach)
3839 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3840 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3841 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3842 (procfs_create_inferior, procfs_update_thread_list)
3843 (procfs_thread_alive, procfs_pid_to_str)
3844 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3845 (procfs_stopped_data_address, procfs_insert_watchpoint)
3846 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3847 (proc_find_memory_regions, procfs_info_proc)
3848 (procfs_make_note_section): Refactor as methods of procfs_target.
3849 (_initialize_procfs): Adjust.
3850 * sol-thread.c (sol_thread_target): New class.
3851 (sol_thread_ops): Now a sol_thread_target.
3852 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3853 (sol_thread_fetch_registers, sol_thread_store_registers)
3854 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3855 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3856 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3857 (init_sol_thread_ops): Delete.
3858 (_initialize_sol_thread): Adjust. Remove references to
3859 init_sol_thread_ops and complete_target_initialization.
3860
3861 * windows-nat.c (windows_nat_target): New class.
3862 (windows_fetch_inferior_registers)
3863 (windows_store_inferior_registers, windows_resume, windows_wait)
3864 (windows_attach, windows_detach, windows_pid_to_exec_file)
3865 (windows_files_info, windows_create_inferior)
3866 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3867 (windows_close, windows_pid_to_str, windows_xfer_partial)
3868 (windows_get_tib_address, windows_get_ada_task_ptid)
3869 (windows_thread_name, windows_thread_alive): Refactor as
3870 windows_nat_target methods.
3871 (do_initial_windows_stuff): Adjust.
3872 (windows_target): Delete function.
3873 (_initialize_windows_nat): Adjust.
3874
3875 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3876 (darwin_mourn_inferior, darwin_kill_inferior)
3877 (darwin_create_inferior, darwin_attach, darwin_detach)
3878 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3879 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3880 (darwin_supports_multi_process): Refactor as darwin_nat_target
3881 methods.
3882 (darwin_resume_to, darwin_files_info): Delete.
3883 (_initialize_darwin_inferior): Rename to ...
3884 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3885 * darwin-nat.h: Include "inf-child.h".
3886 (darwin_nat_target): New class.
3887 (darwin_complete_target): Delete.
3888 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3889 (darwin_target): New.
3890 (i386_darwin_fetch_inferior_registers)
3891 (i386_darwin_store_inferior_registers): Refactor as methods of
3892 darwin_nat_target.
3893 (darwin_complete_target): Delete, with ...
3894 (_initialize_i386_darwin_nat): ... bits factored out here.
3895
3896 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3897 (the_alpha_linux_nat_target): New.
3898 (alpha_linux_register_u_offset): Refactor as
3899 alpha_linux_nat_target method.
3900 (_initialize_alpha_linux_nat): Adjust.
3901 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3902 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3903 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3904 methods of linux_nat_trad_target.
3905 (linux_trad_target): Delete.
3906 * linux-nat-trad.h (linux_trad_target): Delete function.
3907 (linux_nat_trad_target): New class.
3908 * mips-linux-nat.c (mips_linux_nat_target): New class.
3909 (super_fetch_registers, super_store_registers, super_close):
3910 Delete.
3911 (the_mips_linux_nat_target): New.
3912 (mips64_linux_regsets_fetch_registers)
3913 (mips64_linux_regsets_store_registers)
3914 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3915 (mips_linux_register_u_offset, mips_linux_read_description)
3916 (mips_linux_can_use_hw_breakpoint)
3917 (mips_linux_stopped_by_watchpoint)
3918 (mips_linux_stopped_data_address)
3919 (mips_linux_region_ok_for_hw_watchpoint)
3920 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3921 (mips_linux_close): Refactor as methods of mips_linux_nat.
3922 (_initialize_mips_linux_nat): Adjust to C++ification.
3923
3924 * aix-thread.c (aix_thread_target): New class.
3925 (aix_thread_ops): Now an aix_thread_target.
3926 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3927 (aix_thread_fetch_registers, aix_thread_store_registers)
3928 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3929 (aix_thread_thread_alive, aix_thread_pid_to_str)
3930 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3931 Refactor as methods of aix_thread_target.
3932 (init_aix_thread_ops): Delete.
3933 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3934 and complete_target_initialization.
3935 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3936 (rs6000_nat_target): New class.
3937 (the_rs6000_nat_target): New.
3938 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3939 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3940 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3941 (super_create_inferior): Delete.
3942 (_initialize_rs6000_nat): Adjust to C++ification.
3943
3944 * arm-linux-nat.c (arm_linux_nat_target): New class.
3945 (the_arm_linux_nat_target): New.
3946 (arm_linux_fetch_inferior_registers)
3947 (arm_linux_store_inferior_registers, arm_linux_read_description)
3948 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3949 (arm_linux_remove_hw_breakpoint)
3950 (arm_linux_region_ok_for_hw_watchpoint)
3951 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3952 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3953 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3954 arm_linux_nat_target.
3955 (_initialize_arm_linux_nat): Adjust to C++ification.
3956
3957 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3958 (the_aarch64_linux_nat_target): New.
3959 (aarch64_linux_fetch_inferior_registers)
3960 (aarch64_linux_store_inferior_registers)
3961 (aarch64_linux_child_post_startup_inferior)
3962 (aarch64_linux_read_description)
3963 (aarch64_linux_can_use_hw_breakpoint)
3964 (aarch64_linux_insert_hw_breakpoint)
3965 (aarch64_linux_remove_hw_breakpoint)
3966 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3967 (aarch64_linux_region_ok_for_hw_watchpoint)
3968 (aarch64_linux_stopped_data_address)
3969 (aarch64_linux_stopped_by_watchpoint)
3970 (aarch64_linux_watchpoint_addr_within_range)
3971 (aarch64_linux_can_do_single_step): Refactor as methods of
3972 aarch64_linux_nat_target.
3973 (super_post_startup_inferior): Delete.
3974 (_initialize_aarch64_linux_nat): Adjust to C++ification.
3975
3976 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3977 (the_hppa_linux_nat_target): New.
3978 (hppa_linux_fetch_inferior_registers)
3979 (hppa_linux_store_inferior_registers): Refactor as methods of
3980 hppa_linux_nat_target.
3981 (_initialize_hppa_linux_nat): Adjust to C++ification.
3982
3983 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3984 (the_ia64_linux_nat_target): New.
3985 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3986 (ia64_linux_stopped_data_address)
3987 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3988 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3989 ia64_linux_nat_target methods.
3990 (super_xfer_partial): Delete.
3991 (_initialize_ia64_linux_nat): Adjust to C++ification.
3992
3993 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3994 (the_m32r_linux_nat_target): New.
3995 (m32r_linux_fetch_inferior_registers)
3996 (m32r_linux_store_inferior_registers): Refactor as
3997 m32r_linux_nat_target methods.
3998 (_initialize_m32r_linux_nat): Adjust to C++ification.
3999
4000 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4001 (the_m68k_linux_nat_target): New.
4002 (m68k_linux_fetch_inferior_registers)
4003 (m68k_linux_store_inferior_registers): Refactor as
4004 m68k_linux_nat_target methods.
4005 (_initialize_m68k_linux_nat): Adjust to C++ification.
4006
4007 * s390-linux-nat.c (s390_linux_nat_target): New class.
4008 (the_s390_linux_nat_target): New.
4009 (s390_linux_fetch_inferior_registers)
4010 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4011 (s390_insert_watchpoint, s390_remove_watchpoint)
4012 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4013 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4014 (s390_auxv_parse, s390_read_description): Refactor as methods of
4015 s390_linux_nat_target.
4016 (_initialize_s390_nat): Adjust to C++ification.
4017
4018 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4019 (the_sparc_linux_nat_target): New.
4020 (_initialize_sparc_linux_nat): Adjust to C++ification.
4021 * sparc-nat.c (sparc_fetch_inferior_registers)
4022 (sparc_store_inferior_registers): Remove target_ops parameter.
4023 * sparc-nat.h (sparc_fetch_inferior_registers)
4024 (sparc_store_inferior_registers): Remove target_ops parameter.
4025 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4026 (the_sparc64_linux_nat_target): New.
4027 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4028
4029 * spu-linux-nat.c (spu_linux_nat_target): New class.
4030 (the_spu_linux_nat_target): New.
4031 (spu_child_post_startup_inferior, spu_child_post_attach)
4032 (spu_child_wait, spu_fetch_inferior_registers)
4033 (spu_store_inferior_registers, spu_xfer_partial)
4034 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4035 methods.
4036 (_initialize_spu_nat): Adjust to C++ification.
4037
4038 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4039 (the_tilegx_linux_nat_target): New.
4040 (fetch_inferior_registers, store_inferior_registers):
4041 Refactor as methods.
4042 (_initialize_tile_linux_nat): Adjust to C++ification.
4043
4044 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4045 (the_xtensa_linux_nat_target): New.
4046 (xtensa_linux_fetch_inferior_registers)
4047 (xtensa_linux_store_inferior_registers): Refactor as
4048 xtensa_linux_nat_target methods.
4049 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4050
4051 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4052 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4053 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4054 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4055 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4056 (fbsd_stopped_by_sw_breakpoint)
4057 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4058 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4059 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4060 (fbsd_post_startup_inferior, fbsd_post_attach)
4061 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4062 (fbsd_set_syscall_catchpoint)
4063 (super_xfer_partial, super_resume, super_wait)
4064 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4065 (fbsd_handle_debug_trap): Remove target_ops parameter.
4066 (fbsd_nat_add_target): Delete.
4067 * fbsd-nat.h: Include "inf-ptrace.h".
4068 (fbsd_nat_add_target): Delete.
4069 (USE_SIGTRAP_SIGINFO): Define.
4070 (fbsd_nat_target): New class.
4071
4072 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4073 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4074 (amd64bsd_target): Delete.
4075 * amd64-bsd-nat.h: New file.
4076 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4077 "x86-bsd-nat.h".
4078 (amd64_fbsd_nat_target): New class.
4079 (the_amd64_fbsd_nat_target): New.
4080 (amd64fbsd_read_description): Refactor as method of
4081 amd64_fbsd_nat_target.
4082 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4083 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4084 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4085 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4086 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4087 (i386bsd_target): Delete.
4088 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4089 (i386bsd_fetch_inferior_registers)
4090 (i386bsd_store_inferior_registers): Declare.
4091 (i386_bsd_nat_target): New class.
4092 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4093 (the_i386_fbsd_nat_target): New.
4094 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4095 i386_fbsd_nat_target methods.
4096 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4097 (_initialize_i386fbsd_nat): Adjust to C++ification.
4098 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4099 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4100 (_initialize_x86_bsd_nat): Adjust to C++ification.
4101 * x86-bsd-nat.h: Include "x86-nat.h".
4102 (x86bsd_target): Delete declaration.
4103 (x86bsd_nat_target): New class.
4104
4105 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4106 (the_aarch64_fbsd_nat_target): New.
4107 (aarch64_fbsd_fetch_inferior_registers)
4108 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4109 aarch64_fbsd_nat_target.
4110 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4111 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4112 (the_alpha_bsd_nat_target): New.
4113 (alphabsd_fetch_inferior_registers)
4114 (alphabsd_store_inferior_registers): Refactor as
4115 alpha_bsd_nat_target methods.
4116 (_initialize_alphabsd_nat): Refactor as methods of
4117 alpha_bsd_nat_target.
4118 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4119 (the_amd64_nbsd_nat_target): New.
4120 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4121 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4122 (the_amd64_obsd_nat_target): New.
4123 (_initialize_amd64obsd_nat): Adjust to C++ification.
4124 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4125 (the_arm_fbsd_nat_target): New.
4126 (arm_fbsd_fetch_inferior_registers)
4127 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4128 (_initialize_arm_fbsd_nat): Refactor as methods of
4129 arm_fbsd_nat_target.
4130 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4131 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4132 (the_arm_netbsd_nat_target): New.
4133 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4134 arm_netbsd_nat_target.
4135 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4136 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4137 (the_hppa_nbsd_nat_target): New.
4138 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4139 hppa_nbsd_nat_target methods.
4140 (_initialize_hppanbsd_nat): Adjust to C++ification.
4141 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4142 (the_hppa_obsd_nat_target): New.
4143 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4144 methods of hppa_obsd_nat_target.
4145 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4146 add_target.
4147 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4148 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4149 add_target.
4150 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4151 (_initialize_i386obsd_nat): Use add_target.
4152 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4153 (the_m68k_bsd_nat_target): New.
4154 (m68kbsd_fetch_inferior_registers)
4155 (m68kbsd_store_inferior_registers): Refactor as methods of
4156 m68k_bsd_nat_target.
4157 (_initialize_m68kbsd_nat): Adjust to C++ification.
4158 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4159 (the_mips_fbsd_nat_target): New.
4160 (mips_fbsd_fetch_inferior_registers)
4161 (mips_fbsd_store_inferior_registers): Refactor as methods of
4162 mips_fbsd_nat_target.
4163 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4164 add_target.
4165 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4166 (the_mips_nbsd_nat_target): New.
4167 (mipsnbsd_fetch_inferior_registers)
4168 (mipsnbsd_store_inferior_registers): Refactor as methods of
4169 mips_nbsd_nat_target.
4170 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4171 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4172 (the_mips64_obsd_nat_target): New.
4173 (mips64obsd_fetch_inferior_registers)
4174 (mips64obsd_store_inferior_registers): Refactor as methods of
4175 mips64_obsd_nat_target.
4176 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4177 add_target.
4178 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4179 nbsd_nat_target.
4180 * nbsd-nat.h: Include "inf-ptrace.h".
4181 (nbsd_nat_target): New class.
4182 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4183 (obsd_wait): Refactor as methods of obsd_nat_target.
4184 (obsd_add_target): Delete.
4185 * obsd-nat.h: Include "inf-ptrace.h".
4186 (obsd_nat_target): New class.
4187 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4188 (the_ppc_fbsd_nat_target): New.
4189 (ppcfbsd_fetch_inferior_registers)
4190 (ppcfbsd_store_inferior_registers): Refactor as methods of
4191 ppc_fbsd_nat_target.
4192 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4193 add_target.
4194 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4195 (the_ppc_nbsd_nat_target): New.
4196 (ppcnbsd_fetch_inferior_registers)
4197 (ppcnbsd_store_inferior_registers): Refactor as methods of
4198 ppc_nbsd_nat_target.
4199 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4200 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4201 (the_ppc_obsd_nat_target): New.
4202 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4203 methods of ppc_obsd_nat_target.
4204 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4205 add_target.
4206 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4207 (the_sh_nbsd_nat_target): New.
4208 (shnbsd_fetch_inferior_registers)
4209 (shnbsd_store_inferior_registers): Refactor as methods of
4210 sh_nbsd_nat_target.
4211 (_initialize_shnbsd_nat): Adjust to C++ification.
4212 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4213 (inf_ptrace_xfer_partial): Delete.
4214 (sparc_xfer_partial, sparc_target): Delete.
4215 * sparc-nat.h (sparc_fetch_inferior_registers)
4216 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4217 (sparc_target): Delete function declaration.
4218 (sparc_target): New template class.
4219 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4220 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4221 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4222 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4223 add_target.
4224 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4225 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4226 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4227 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4228 add_target.
4229 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4230 (the_vax_bsd_nat_target): New.
4231 (vaxbsd_fetch_inferior_registers)
4232 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4233 methods.
4234 (_initialize_vaxbsd_nat): Adjust to C++ification.
4235
4236 * bsd-kvm.c (bsd_kvm_target): New class.
4237 (bsd_kvm_ops): Now a bsd_kvm_target.
4238 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4239 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4240 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4241 bsd_kvm_target.
4242 (bsd_kvm_return_one): Delete.
4243 (bsd_kvm_add_target): Adjust to C++ification.
4244
4245 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4246 (nto_procfs_target_procfs): New classes.
4247 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4248 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4249 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4250 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4251 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4252 (procfs_remove_hw_breakpoint, procfs_resume)
4253 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4254 (procfs_kill_inferior, procfs_store_registers)
4255 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4256 as methods of nto_procfs_target.
4257 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4258 (nto_native_ops): Delete.
4259 (procfs_open, procfs_native_open): Delete.
4260 (nto_native_ops): Now an nto_procfs_target_native.
4261 (init_procfs_targets): Adjust to C++ification.
4262 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4263 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4264 Refactor as methods of nto_procfs_target.
4265
4266 * go32-nat.c (go32_nat_target): New class.
4267 (the_go32_nat_target): New.
4268 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4269 (go32_store_registers, go32_xfer_partial, go32_files_info)
4270 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4271 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4272 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4273 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4274 (go32_target): Delete.
4275 (_initialize_go32_nat): Adjust to C++ification.
4276
4277 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4278 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4279 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4280 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4281 gnu_nat_target.
4282 (gnu_target): Delete.
4283 * gnu-nat.h (gnu_target): Delete.
4284 (gnu_nat_target): New class.
4285 * i386-gnu-nat.c (gnu_base_target): New.
4286 (i386_gnu_nat_target): New class.
4287 (the_i386_gnu_nat_target): New.
4288 (_initialize_i386gnu_nat): Adjust to C++ification.
4289
4290 2018-05-02 Pedro Alves <palves@redhat.com>
4291
4292 * bfd-target.c (target_bfd_xclose): Rename to ...
4293 (target_bfd_close): ... this.
4294 (target_bfd_reopen): Adjust.
4295 * target.c (target_close): Remove references to to_xclose.
4296 * target.h (target_ops::to_xclose): Delete.
4297 (target_ops::to_close): Update comments.
4298
4299 2018-05-02 Pedro Alves <palves@redhat.com>
4300
4301 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4302 "linux-nat.h".
4303 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4304 * inf-ptrace.c (inf_ptrace_register_u_offset)
4305 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4306 (inf_ptrace_store_register, inf_ptrace_store_registers)
4307 (inf_ptrace_trad_target): Move to ...
4308 * linux-nat-trad.c: ... this new file.
4309 * linux-nat-trad.h: New file.
4310 * linux-nat.c (linux_target_install_ops): Make extern.
4311 (linux_trad_target): Delete.
4312 * linux-nat.h (linux_trad_target): Delete declaration.
4313 (linux_target_install_ops): Declare.
4314 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4315 "linux-nat.h".
4316
4317 2018-05-02 Pedro Alves <palves@redhat.com>
4318
4319 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4320 procfs_target/add_target here.
4321 * procfs.c (procfs_target): Make static.
4322 (_initialize_procfs): Call add_target here.
4323 * procfs.h (struct target_ops): Remove forward declaration.
4324 (procfs_target): Remove declaration.
4325 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4326
4327 2018-05-02 Pedro Alves <palves@redhat.com>
4328
4329 * procfs.c (procfs_stopped_by_watchpoint)
4330 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4331 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4332 Forward declare.
4333 (procfs_use_watchpoints): Delete, move contents...
4334 (procfs_target): ... here.
4335 * procfs.h (procfs_use_watchpoints): Delete declaration.
4336 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4337 procfs_use_watchpoints.
4338 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4339 procfs_use_watchpoints.
4340
4341 2018-05-02 Tom Tromey <tom@tromey.com>
4342
4343 PR python/20084:
4344 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4345 and var_zuinteger_unlimited.
4346 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4347 and PARAM_ZUINTEGER_UNLIMITED.
4348 (set_parameter_value): Handle var_zuinteger and
4349 var_zuinteger_unlimited.
4350 (add_setshow_generic): Likewise.
4351 (parmpy_init): Likewise.
4352
4353 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4354
4355 PR rust/23124
4356 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4357 pointer is not null before dereferencing it.
4358
4359 2018-04-30 Tom Tromey <tom@tromey.com>
4360
4361 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4362 is_mi_like_p.
4363
4364 2018-04-30 Tom Tromey <tom@tromey.com>
4365
4366 * breakpoint.c (mention): Remove use of is_mi_like_p.
4367 (print_mention_ranged_breakpoint): Likewise.
4368 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4369 of is_mi_like_p.
4370
4371 2018-04-30 Tom Tromey <tom@tromey.com>
4372
4373 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4374
4375 2018-04-30 Tom Tromey <tom@tromey.com>
4376
4377 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4378 (info_spu_event_command): Remove some uses of is_mi_like_p.
4379
4380 2018-04-30 Tom Tromey <tom@tromey.com>
4381
4382 * python/py-framefilter.c (py_print_single_arg)
4383 (enumerate_locals, py_print_args, py_print_frame): Remove some
4384 uses of is_mi_like_p.
4385
4386 2018-04-30 Tom Tromey <tom@tromey.com>
4387
4388 * ui-out.c: Update.
4389 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4390 * ui-out.h (ui_out::is_mi_like_p): Now const.
4391 (ui_out::do_is_mi_like_p): Now const.
4392 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4393
4394 2018-04-30 Tom Tromey <tom@tromey.com>
4395
4396 * varobj.c (varobj_set_visualizer): Use new_reference.
4397 * python/python.c (gdbpy_decode_line): Use new_reference.
4398 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4399 new_reference.
4400
4401 2018-04-30 Tom Tromey <tom@tromey.com>
4402
4403 * varobj.c (install_new_value): Use new_reference.
4404 * value.h (value_incref): Return void. Swap intro comment with
4405 value_decref.
4406 * value.c (set_value_parent): Use new_reference.
4407 (value_incref): Return void. Update intro comment.
4408 (release_value): Use new_reference.
4409 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4410
4411 2018-04-30 Tom Tromey <tom@tromey.com>
4412
4413 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4414 * gdb_bfd.h (new_bfd_ref): Remove.
4415 (gdb_bfd_open): Update comment.
4416 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4417 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4418 (gdb_bfd_fdopenr): Use new_reference.
4419 * exec.c (exec_file_attach): Use new_reference.
4420
4421 2018-04-30 Tom Tromey <tom@tromey.com>
4422
4423 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4424 method.
4425
4426 2018-04-30 Tom Tromey <tom@tromey.com>
4427
4428 * jit.c (jit_read_code_entry): Use type_align.
4429 * i386-tdep.c (i386_gdbarch_init): Don't call
4430 set_gdbarch_long_long_align_bit.
4431 * gdbarch.sh: Remove long_long_align_bit.
4432 * gdbarch.c, gdbarch.h: Rebuild.
4433 * arc-tdep.c (arc_type_align): New function.
4434 (arc_gdbarch_init): Use arc_type_align. Don't call
4435 set_gdbarch_long_long_align_bit.
4436
4437 2018-04-30 Tom Tromey <tom@tromey.com>
4438
4439 * rust-lang.c (rust_type_alignment): Remove.
4440 (rust_composite_type): Use type_align.
4441
4442 2018-04-30 Tom Tromey <tom@tromey.com>
4443
4444 * NEWS: Mention Type.align.
4445 * python/py-type.c (typy_get_alignof): New function.
4446 (type_object_getset): Add "alignof".
4447
4448 2018-04-30 Tom Tromey <tom@tromey.com>
4449
4450 PR exp/17095:
4451 * NEWS: Update.
4452 * std-operator.def (UNOP_ALIGNOF): New operator.
4453 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4454 New.
4455 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4456 * c-lang.c (c_op_print_tab): Add alignof.
4457 * c-exp.y (ALIGNOF): New token.
4458 (exp): Add "ALIGNOF" production.
4459 (ident_tokens): Add _Alignof and alignof.
4460
4461 2018-04-30 Tom Tromey <tom@tromey.com>
4462
4463 * i386-tdep.c (i386_type_align): New function.
4464 (i386_gdbarch_init): Update.
4465 * gdbarch.sh (type_align): New method.
4466 * gdbarch.c, gdbarch.h: Rebuild.
4467 * arch-utils.h (default_type_align): Declare.
4468 * arch-utils.c (default_type_align): New function.
4469 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4470 (struct type) <align_log2>: New field.
4471 <instance_flags>: Now a bitfield.
4472 (TYPE_RAW_ALIGN): New macro.
4473 (type_align, type_raw_align, set_type_align): Declare.
4474 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4475 functions.
4476 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4477 (get_alignment, maybe_set_alignment): New functions.
4478 (read_structure_type, read_enumeration_type, read_array_type)
4479 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4480 (read_subrange_type, read_base_type): Set type alignment.
4481
4482 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4483
4484 * dwarf2read.c (read_index_from_section): Use bool.
4485
4486 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4487
4488 PR gdb/22950
4489 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4490 with #ifdef.
4491
4492 2018-04-29 John Reiser <jreiser@BitWagon.com>
4493
4494 PR build/22873
4495 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4496 last step, and do it atomically.
4497
4498 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4499
4500 * compile/compile-c-types.c (convert_int, convert_float):
4501 Update for C FE v1.
4502
4503 2018-04-27 Tom Tromey <tom@tromey.com>
4504
4505 PR rust/22545:
4506 * rust-lang.c (rust_inclusive_range_type_p): New function.
4507 (rust_range): Handle inclusive ranges.
4508 (rust_compute_range): Likewise.
4509 * rust-exp.y (struct rust_op) <inclusive>: New field.
4510 (DOTDOTEQ): New constant.
4511 (range_expr): Add "..=" productions.
4512 (operator_tokens): Add "..=" token.
4513 (ast_range): Add "inclusive" parameter.
4514 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4515 ranges.
4516 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4517 bounds values.
4518 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4519 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4520 Update comments.
4521 * expprint.c (print_subexp_standard): Handle new bounds values.
4522 (dump_subexp_body_standard): Likewise.
4523
4524 2018-04-27 Tom Tromey <tom@tromey.com>
4525
4526 * configure: Rebuild.
4527 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4528 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4529 "OVERRIDE".
4530 (class symbol_needs_eval_context): Likewise.
4531 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4532 (mock_mapped_index::symbol_name_at): Use "override". Remove
4533 "virtual".
4534 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4535 "override".
4536 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4537 * aarch64-tdep.c (instruction_reader::read): Use "override".
4538 (instruction_reader_test::read): Likewise.
4539 * arm-tdep.c (instruction_reader::read): Use "override".
4540 (instruction_reader_thumb::read): Likewise.
4541
4542 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4543
4544 PR remote/9665
4545 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4546 instead of remote_send.
4547 (remote_send): Remove.
4548
4549 2018-04-26 Pedro Alves <palves@redhat.com>
4550
4551 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4552 find_function_start_sal instead of find_pc_line.
4553
4554 2018-04-26 Pedro Alves <palves@redhat.com>
4555
4556 * breakpoint.c (set_breakpoint_location_function): Handle
4557 mst_data_gnu_ifunc.
4558 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4559 * elfread.c (elf_symtab_read): Give data symbols with
4560 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4561 (elf_rel_plt_read): Update comment.
4562 * linespec.c (convert_linespec_to_sals): Handle
4563 mst_data_gnu_ifunc.
4564 (minsym_found): Handle mst_data_gnu_ifunc.
4565 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4566 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4567 * parse.c (find_minsym_type_and_address): Handle
4568 mst_data_gnu_ifunc.
4569 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4570 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4571 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4572 comment.
4573 <mst_data_gnu_ifunc>: New enumerator.
4574
4575 2018-04-26 Pedro Alves <palves@redhat.com>
4576
4577 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4578 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4579 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4580 Handle it.
4581 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4582 (lookup_minimal_symbol_by_pc): Adjust.
4583 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4584 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4585 * minsyms.h (lookup_msym_prefer): New enum.
4586 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4587 parameter by a lookup_msym_prefer parameter.
4588
4589 2018-04-26 Pedro Alves <palves@redhat.com>
4590
4591 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4592 ends in "@plt" instead of looking at the symbol's section.
4593
4594 2018-04-26 Pedro Alves <palves@redhat.com>
4595
4596 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4597 all references.
4598 (find_pc_partial_function_gnu_ifunc): Rename to ...
4599 (find_pc_partial_function): ... this, and remove references to
4600 'is_gnu_ifunc_p'.
4601 (find_pc_partial_function): Delete old implementation.
4602 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4603
4604 2018-04-26 Pedro Alves <palves@redhat.com>
4605
4606 * linespec.c (struct bound_minimal_symbol_search_key): New.
4607 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4608 skip first line if we found a GNU ifunc minimal symbol by name.
4609 (compare_msymbols): Change parameters to work with a destructured
4610 lhs minsym.
4611 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4612 functions.
4613
4614 2018-04-26 Pedro Alves <palves@redhat.com>
4615
4616 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4617 ifunc targets here. Instead, if we have an ifunc minsym, use its
4618 address/name.
4619 (add_location_to_breakpoint): Store the minsym and the objfile in
4620 the breakpoint location.
4621 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4622 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4623 Record the minsym in the sal.
4624 * symtab.h (symtab_and_line) <msymbol>: New field.
4625
4626 2018-04-26 Pedro Alves <palves@redhat.com>
4627
4628 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4629 unless we actually resolved the ifunc.
4630
4631 2018-04-26 Pedro Alves <palves@redhat.com>
4632
4633 * c-exp.y (variable production): Prefer ifunc minsyms over
4634 regular function symbols.
4635 * symtab.c (find_gnu_ifunc): New function.
4636 * minsyms.h (lookup_msym_prefer): New enum.
4637 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4638 parameter by a lookup_msym_prefer parameter.
4639 * symtab.h (find_gnu_ifunc): New declaration.
4640
4641 2018-04-26 Pedro Alves <palves@redhat.com>
4642
4643 * blockframe.c (find_gnu_ifunc_target_type): New function.
4644 (find_function_type): New.
4645 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4646 return a value with a memory address.
4647 (eval_call): For calls to GNU ifunc functions, try to find the
4648 type of the target function from the type that the resolver
4649 returns.
4650 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4651 symbols.
4652 * infcall.c (find_function_return_type): Delete.
4653 (find_function_addr): Add 'function_type' parameter. For calls to
4654 GNU ifunc functions, try to find the type of the target function
4655 from the type that the resolver returns, and return it via
4656 FUNCTION_TYPE.
4657 (call_function_by_hand_dummy): Adjust to use the function type
4658 returned by find_function_addr.
4659 (find_function_addr): Add 'function_type' parameter and move
4660 description here.
4661 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4662 declarations.
4663
4664 2018-04-26 Pedro Alves <palves@redhat.com>
4665
4666 * c-exp.y (variable production): Skip finding an alias for ifunc
4667 symbols.
4668
4669 2018-04-26 Pedro Alves <palves@redhat.com>
4670
4671 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4672
4673 2018-04-25 Pedro Alves <palves@redhat.com>
4674
4675 * infcmd.c (kill_command): Print the pid as string, not the whole
4676 thread's ptid. Add comment. s/has been killed/killed/ in output
4677 message.
4678 * remote.c (remote_detach_1): Print the pid as string, not the
4679 whole thread's ptid.
4680
4681 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4682 Sergio Durigan Junior <sergiodj@redhat.com>
4683 Pedro Alves <palves@redhat.com>
4684
4685 * infcmd.c (kill_command): Print message when inferior has
4686 been killed.
4687 * inferior.c (print_inferior_events): Remove 'static'. Set as
4688 '1'.
4689 (add_inferior): Improve message printed when
4690 'print_inferior_events' is on.
4691 (exit_inferior): Remove message printed when
4692 'print_inferior_events' is on.
4693 (detach_inferior): Improve message printed when
4694 'print_inferior_events' is on.
4695 (initialize_inferiors): Use 'add_inferior_silent' to set
4696 'current_inferior_'.
4697 * inferior.h (print_inferior_events): Declare here as
4698 'extern'.
4699 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4700 '[Detaching...]' messages when 'print_inferior_events' is on.
4701 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4702 as prefix/suffix for messages. Remove periods. Fix erroneous
4703 'Detaching after fork from child...', replace it by '... from
4704 parent...'.
4705 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4706 prefix/suffix when printing 'Detaching...' messages. Print
4707 them when 'print_inferior_events' is on.
4708 * remote.c (remote_detach_1): Print message when detaching
4709 from inferior and '!is_fork_parent'.
4710
4711 2018-04-24 Tom Tromey <tom@tromey.com>
4712
4713 * cli-out.h: Reindent.
4714
4715 2018-04-24 Tom Tromey <tom@tromey.com>
4716
4717 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4718 (cli_ui_out::do_field_string): Use fputs_filtered.
4719 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4720
4721 2018-04-23 Tom Tromey <tom@tromey.com>
4722
4723 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4724 gdb::unique_xmalloc_ptr.
4725
4726 2018-04-23 Tom Tromey <tom@tromey.com>
4727
4728 * configure: Rebuild.
4729
4730 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4731
4732 PR gdb/23095
4733 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4734 prepare_for_testing. Set normal_bp to r_debug_state if target
4735 is bsd.
4736
4737 2018-04-21 Pedro Alves <palves@redhat.com>
4738 Rajendra SY <rajendra.sy@gmail.com>
4739
4740 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4741 * remote.c (extended_remote_attach): In all-stop mode, mark the
4742 thread as executing.
4743
4744 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4745
4746 * thread.c (thread_apply_all_command): Fix comment.
4747 (thread_command): Fix comment.
4748
4749 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4750
4751 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4752 parameter.
4753 * features/aarch64-core.c (create_feature_aarch64_core):
4754 Regenerate.
4755 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4756 Likewise.
4757 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4758 Likewise.
4759 * features/i386/32bit-avx512.c
4760 (create_feature_i386_32bit_avx512): Likewise.
4761 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4762 Likewise.
4763 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4764 Likewise.
4765 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4766 Likewise.
4767 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4768 Likewise.
4769 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4770 Likewise.
4771 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4772 Likewise.
4773 * features/i386/64bit-avx512.c
4774 (create_feature_i386_64bit_avx512): Likewise.
4775 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4776 Likewise.
4777 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4778 Likewise.
4779 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4780 Likewise.
4781 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4782 Likewise.
4783 * features/i386/64bit-segments.c
4784 (create_feature_i386_64bit_segments): Likewise.
4785 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4786 Likewise.
4787 * features/i386/x32-core.c
4788 (create_feature_i386_x32_core): Likewise.
4789 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4790 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4791 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4792 * target-descriptions.c: In generated code, don't pass xml
4793 filename.
4794
4795 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4796
4797 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4798 (print_xml_feature::visit_post): Likewise.
4799 (print_xml_feature::visit): Likewise.
4800 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4801 (print_xml_feature): Add new class.
4802 * regformats/regdat.sh: Null xmltarget on feature targets.
4803 * target-descriptions.c (struct target_desc): Add xmltarget.
4804 (maintenance_check_tdesc_xml_convert): Add unittest function.
4805 (tdesc_get_features_xml): Add function to get xml.
4806 (maintenance_check_xml_descriptions): Test xml generation.
4807 * xml-tdesc.c (string_read_description_xml): Add function.
4808 * xml-tdesc.h (string_read_description_xml): Add declaration.
4809
4810 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4811
4812 * features/Makefile: Add feature marker to targets with new style
4813 target descriptions.
4814 * regformats/aarch64.dat: Regenerate.
4815 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4816 * regformats/i386/amd64-avx-linux.dat: Likewise.
4817 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4818 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4819 * regformats/i386/amd64-linux.dat: Likewise.
4820 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4821 * regformats/i386/amd64.dat: Likewise.
4822 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4823 * regformats/i386/i386-avx-linux.dat: Likewise.
4824 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4825 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4826 * regformats/i386/i386-linux.dat: Likewise.
4827 * regformats/i386/i386-mmx-linux.dat: Likewise.
4828 * regformats/i386/i386-mpx-linux.dat: Likewise.
4829 * regformats/i386/i386.dat: Likewise.
4830 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4831 * regformats/i386/x32-avx-linux.dat: Likewise.
4832 * regformats/i386/x32-linux.dat: Likewise.
4833 * regformats/tic6x-c62x-linux.dat: Likewise.
4834 * regformats/tic6x-c64x-linux.dat: Likewise.
4835 * regformats/tic6x-c64xp-linux.dat: Likewise.
4836 * regformats/regdat.sh: Parse feature marker.
4837
4838 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4839
4840 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4841 (tdesc_osabi_name): Likewise.
4842 * target-descriptions.c (tdesc_architecture_name): Add new
4843 function.
4844 (tdesc_osabi_name): Likewise.
4845
4846 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4847
4848 * common/tdesc.c (tdesc_predefined_type): Move to here.
4849 (tdesc_named_type): Likewise.
4850 (tdesc_create_vector): Likewise.
4851 (tdesc_create_struct): Likewise.
4852 (tdesc_set_struct_size): Likewise.
4853 (tdesc_create_union): Likewise.
4854 (tdesc_create_flags): Likewise.
4855 (tdesc_create_enum): Likewise.
4856 (tdesc_add_field): Likewise.
4857 (tdesc_add_typed_bitfield): Likewise.
4858 (tdesc_add_bitfield): Likewise.
4859 (tdesc_add_flag): Likewise.
4860 (tdesc_add_enum_value): Likewise.
4861 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4862 (struct tdesc_type_vector): Likewise.
4863 (struct tdesc_type_field): Likewise.
4864 (struct tdesc_type_with_fields): Likewise.
4865 (tdesc_create_enum): Add declaration.
4866 (tdesc_add_typed_bitfield): Likewise.
4867 (tdesc_add_enum_value): Likewise.
4868 * target-descriptions.c (tdesc_type_field): Move from here.
4869 (tdesc_type_builtin): Likewise.
4870 (tdesc_type_vector): Likewise.
4871 (tdesc_type_with_fields): Likewise.
4872 (tdesc_predefined_types): Likewise.
4873 (tdesc_named_type): Likewise.
4874 (tdesc_create_vector): Likewise.
4875 (tdesc_create_struct): Likewise.
4876 (tdesc_set_struct_size): Likewise.
4877 (tdesc_create_union): Likewise.
4878 (tdesc_create_flags): Likewise.
4879 (tdesc_create_enum): Likewise.
4880 (tdesc_add_field): Likewise.
4881 (tdesc_add_typed_bitfield): Likewise.
4882 (tdesc_add_bitfield): Likewise.
4883 (tdesc_add_flag): Likewise.
4884 (tdesc_add_enum_value): Likewise.
4885 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4886 (tdesc_add_typed_bitfield): Likewise.
4887 (tdesc_add_enum_value): Likewise.
4888
4889 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4890
4891 * common/tdesc.c (tdesc_feature::accept): Move to here.
4892 (tdesc_feature::operator==): Likewise.
4893 (tdesc_create_reg): Likewise.
4894 * common/tdesc.h (tdesc_type_kind): Likewise.
4895 (struct tdesc_type): Likewise.
4896 (struct tdesc_feature): Likewise.
4897 * regformats/regdat.sh: Create a feature.
4898 * target-descriptions.c (tdesc_type_kind): Move from here.
4899 (tdesc_type): Likewise.
4900 (tdesc_type_up): Likewise.
4901 (tdesc_feature): Likewise.
4902 (tdesc_create_reg): Likewise.
4903
4904 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4905
4906 * Makefile.in: Add arch/tdesc.c
4907 * common/tdesc.c: New file.
4908 * common/tdesc.h (tdesc_element_visitor): Move to here.
4909 (tdesc_element): Likewise.
4910 (tdesc_reg): Likewise.
4911 (tdesc_reg_up): Likewise.
4912 * regformats/regdef.h (reg): Add offset to constructors.
4913 * target-descriptions.c (tdesc_element_visitor): Move from here.
4914 (tdesc_element): Likewise.
4915 (tdesc_reg): Likewise.
4916 (tdesc_reg_up): Likewise.
4917
4918 2018-04-17 Tom Tromey <tom@tromey.com>
4919
4920 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4921 discriminant field.
4922
4923 2018-04-17 Tom Tromey <tom@tromey.com>
4924
4925 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4926
4927 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4928
4929 * symtab.c (print_symbol_info): Skip printing filename and line
4930 number when `last' is NULL.
4931 (symtab_symbol_info): Use empty string instead of NULL for first
4932 invocation of print_symbol_info.
4933 (rbreak_command): Pass NULL to `last' parameter of
4934 print_symbol_info.
4935
4936 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4937
4938 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4939 instead of nullptr.
4940
4941 2018-04-16 Pedro Alves <palves@redhat.com>
4942
4943 * MAINTAINERS (sh): Remove.
4944 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4945 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4946 (ALLDEPFILES): Remove sh64-tdep.c.
4947 * NEWS: Mentions that support for SH-5/SH64 is removed.
4948 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4949 (sh*-*-openbsd*): Ditto.
4950 (sh64-*-elf*): Remove.
4951 (sh*): Remove.
4952 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4953 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4954 * sh-tdep.c: No longer include "sh64-tdep.h".
4955 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4956 * sh64-tdep.c, sh64-tdep.h: Remove files.
4957
4958 2018-04-16 Pedro Alves <palves@redhat.com>
4959
4960 * MAINTAINERS: Remove m88k.
4961 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4962 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4963 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4964 * NEWS: Mention that support for m88k was removed.
4965 * configure.host (m88*-*-*): Remove support.
4966 * configure.nat (m88k-*-*): Remove support.
4967 * configure.tgt (m88*-*-openbsd*): Remove.
4968 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4969
4970 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
4971
4972 * configure.tgt (x86_tobjs): New variable.
4973 (amd64_tobjs, i386_tobjs): Use it.
4974
4975 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4976
4977 * symtab.c (print_symbol_info): Precede the symbol definition by
4978 the line number when available.
4979 * NEWS: Advertise this enhancement.
4980
4981 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4982
4983 * NEWS (New options): announce set/show record btrace cpu.
4984 * btrace.c: Include record-btrace.h.
4985 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4986 the vendor is unknown.
4987 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4988 Maybe overwrite the btrace configuration's cpu.
4989 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4990 (btrace_fetch): Add cpu parameter. Update callers.
4991 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4992 Maybe overwrite the btrace configuration's cpu. Skip enabling
4993 errata workarounds if the vendor is unknown.
4994 * python/py-record-btrace.c: Include record-btrace.h.
4995 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4996 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4997 * record-btrace.c (record_btrace_cpu_state_kind): New.
4998 (record_btrace_cpu): New.
4999 (set_record_btrace_cpu_cmdlist): New.
5000 (record_btrace_get_cpu): New.
5001 (require_btrace_thread, record_btrace_info)
5002 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5003 (cmd_set_record_btrace_cpu_none): New.
5004 (cmd_set_record_btrace_cpu_auto): New.
5005 (cmd_set_record_btrace_cpu): New.
5006 (cmd_show_record_btrace_cpu): New.
5007 (_initialize_record_btrace): Initialize set/show record btrace cpu
5008 commands.
5009 * record-btrace.h (record_btrace_get_cpu): New.
5010
5011 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5012
5013 * record.c (set_record_command): Fix typo in message.
5014
5015 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5016
5017 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5018
5019 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5020
5021 * infrun.c (process_event_stop_test): Call
5022 gdbarch_in_indirect_branch_thunk.
5023 * gdbarch.sh (in_indirect_branch_thunk): New.
5024 * gdbarch.c: Regenerated.
5025 * gdbarch.h: Regenerated.
5026 * x86-tdep.h: New.
5027 * x86-tdep.c: New.
5028 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5029 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5030 (ALLDEPFILES): Add x86-tdep.c.
5031 * arch-utils.h (default_in_indirect_branch_thunk): New.
5032 * arch-utils.c (default_in_indirect_branch_thunk): New.
5033 * i386-tdep: Include x86-tdep.h.
5034 (i386_in_indirect_branch_thunk): New.
5035 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5036 function.
5037 * amd64-tdep: Include x86-tdep.h.
5038 (amd64_in_indirect_branch_thunk): New.
5039 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5040
5041 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5042
5043 PR gdb/23053
5044 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5045 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5046 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5047 regression.
5048
5049 2018-04-12 Tom Tromey <tom@tromey.com>
5050
5051 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5052 (rust_evaluate_subexp): Likewise.
5053
5054 2018-04-12 Pedro Alves <palves@redhat.com>
5055
5056 * procfs.c (procfs_detach): Make forward declaration's prototype
5057 match definition's protototype.
5058 (proc_get_LDT_entry): Remove stale do_cleanups call.
5059
5060 2018-04-12 Pedro Alves <palves@redhat.com>
5061
5062 * target.h (target_ops::to_has_exited): Delete.
5063 (target_has_exited): Delete.
5064 * target-delegates.c: Regenerate.
5065
5066 2018-04-11 Pedro Alves <palves@redhat.com>
5067
5068 * target.c (fileio_fh_t::t): Add comment.
5069 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5070 (target_fileio_close): Handle a NULL target.
5071 (invalidate_fileio_fh): New.
5072 (target_close): Call it.
5073 * remote.c (remote_hostio_send_command): No longer check whether
5074 remote_desc is open.
5075
5076 2018-04-11 Pedro Alves <palves@redhat.com>
5077
5078 * target.c (fileio_fh_t): Make it a named struct instead of a
5079 typedef.
5080 (fileio_fh_t::is_closed): New method.
5081 (DEF_VEC_O (fileio_fh_t)): Remove.
5082 (fileio_fhandles): Now a std::vector.
5083 (is_closed_fileio_fh): Delete.
5084 (acquire_fileio_fd): Adjust. Rename parameters.
5085 (release_fileio_fd): Adjust.
5086 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5087 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5088 (target_fileio_close): Adjust.
5089
5090 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5091
5092 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5093 index.
5094
5095 2018-04-10 Pedro Alves <palves@redhat.com>
5096
5097 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5098 (scoped_finish_thread_state): New class.
5099 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5100 cleanup.
5101 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5102 (fetch_inferior_event, normal_stop): Likewise.
5103 * thread.c (finish_thread_state_cleanup): Delete.
5104
5105 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5106 Pedro Alves <palves@redhat.com>
5107
5108 * value.c: Include "selftest.h" and "common/array-view.h".
5109 (struct range) <operator ==>: New.
5110 (test_ranges_contain): New.
5111 (check_ranges_vector): New.
5112 (test_insert_into_bit_range_vector): New.
5113 (_initialize_values): Register selftests.
5114 * common/array-view.h (operator==, operator!=): New.
5115
5116 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5117
5118 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5119 an iterator.
5120 * inline-frame.c: Include <algorithm>.
5121 (struct inline_state): Add constructor.
5122 (inline_state_s): Remove.
5123 (DEF_VEC_O(inline_state_s)): Remove.
5124 (inline_states): Change type to std::vector.
5125 (find_inline_frame_state): Adjust to std::vector.
5126 (allocate_inline_frame_state): Remove.
5127 (clear_inline_frame_state): Adjust to std::vector.
5128 (skip_inline_frames): Adjust to std::vector.
5129
5130 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * tracepoint.h (struct trace_state_variable): Add constructor.
5133 <name>: Change type to std::string.
5134 * tracepoint.c (tsv_s): Remove.
5135 (DEF_VEC_O(tsv_s)): Remove.
5136 (tvariables): Change to std::vector.
5137 (create_trace_state_variable): Adjust to std::vector.
5138 (find_trace_state_variable): Likewise.
5139 (find_trace_state_variable_by_number): Likewise.
5140 (delete_trace_state_variable): Likewise.
5141 (trace_variable_command): Adjust to std::string.
5142 (delete_trace_variable_command): Likewise.
5143 (tvariables_info_1): Adjust to std::vector.
5144 (save_trace_state_variables): Likewise.
5145 (start_tracing): Likewise.
5146 (merge_uploaded_trace_state_variables): Adjust to std::vector
5147 and std::string.
5148 * target.h (struct target_ops)
5149 <to_download_trace_state_variable>: Pass reference to
5150 trace_state_variable.
5151 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5152 * target-delegates.c: Re-generate.
5153 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5154 (mi_tsv_deleted): Likewise.
5155 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5156 * remote.c (remote_download_trace_state_variable): Change
5157 pointer to reference and adjust.
5158 * make-target-delegates (parse_argtypes): Handle references.
5159 (write_function_header): Likewise.
5160 (munge_type): Likewise.
5161
5162 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5163
5164 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5165 string_view-selftests.c.
5166 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5167 testsuite.
5168 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5169 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5170 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5171 * unittests/basic_string_view/element_access/char/1.cc:
5172 Likewise.
5173 * unittests/basic_string_view/element_access/char/empty.cc:
5174 Likewise.
5175 * unittests/basic_string_view/element_access/char/front_back.cc:
5176 Likewise.
5177 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5178 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5179 Likewise.
5180 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5181 Likewise.
5182 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5183 Likewise.
5184 * unittests/basic_string_view/operations/compare/char/1.cc:
5185 Likewise.
5186 * unittests/basic_string_view/operations/compare/char/13650.cc:
5187 Likewise.
5188 * unittests/basic_string_view/operations/copy/char/1.cc:
5189 Likewise.
5190 * unittests/basic_string_view/operations/data/char/1.cc:
5191 Likewise.
5192 * unittests/basic_string_view/operations/find/char/1.cc:
5193 Likewise.
5194 * unittests/basic_string_view/operations/find/char/2.cc:
5195 Likewise.
5196 * unittests/basic_string_view/operations/find/char/3.cc:
5197 Likewise.
5198 * unittests/basic_string_view/operations/find/char/4.cc:
5199 Likewise.
5200 * unittests/basic_string_view/operations/rfind/char/1.cc:
5201 Likewise.
5202 * unittests/basic_string_view/operations/rfind/char/2.cc:
5203 Likewise.
5204 * unittests/basic_string_view/operations/rfind/char/3.cc:
5205 Likewise.
5206 * unittests/basic_string_view/operations/substr/char/1.cc:
5207 Likewise.
5208 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5209 * unittests/string_view-selftests.c: New file.
5210
5211 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5212
5213 * unittests/basic_string_view/capacity/1.cc: New file.
5214 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5215 * unittests/basic_string_view/cons/char/1.cc: New file.
5216 * unittests/basic_string_view/cons/char/2.cc: New file.
5217 * unittests/basic_string_view/cons/char/3.cc: New file.
5218 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5219 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5220 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5221 * unittests/basic_string_view/element_access/char/1.cc: New file.
5222 * unittests/basic_string_view/element_access/char/2.cc: New file.
5223 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5224 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5225 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5226 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5227 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5228 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5229 * unittests/basic_string_view/include.cc: New file.
5230 * unittests/basic_string_view/inserters/char/1.cc: New file.
5231 * unittests/basic_string_view/inserters/char/2.cc: New file.
5232 * unittests/basic_string_view/inserters/char/3.cc: New file.
5233 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5234 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5235 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5236 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5237 * unittests/basic_string_view/literals/types.cc: New file.
5238 * unittests/basic_string_view/literals/values.cc: New file.
5239 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5240 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5241 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5242 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5243 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5244 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5245 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5246 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5247 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5248 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5249 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5250 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5251 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5252 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5253 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5254 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5255 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5256 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5257 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5258 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5259 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5260 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5261 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5262 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5263 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5264 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5265 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5266 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5267 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5268 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5269 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5270 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5271 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5272 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5273 * unittests/basic_string_view/operators/char/2.cc: New file.
5274 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5275 * unittests/basic_string_view/range_access/char/1.cc: New file.
5276 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5277 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5278 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5279 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5280 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5281 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5282 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5283 * unittests/basic_string_view/typedefs.cc: New file.
5284 * unittests/basic_string_view/types/1.cc: New file.
5285
5286 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5287
5288 * common/gdb_string_view.h: Remove libstdc++ implementation
5289 details, adjust to gdb reality.
5290 * common/gdb_string_view.tcc: Likewise.
5291 * cli/cli-script.c (struct string_view): Remove.
5292 (user_args) <m_args>: Change element type to gdb::string_view.
5293 (user_args::insert_args): Adjust.
5294
5295 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5296
5297 * common/gdb_string_view.h: New file.
5298 * common/gdb_string_view.tcc: New file.
5299
5300 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5301
5302 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5303 * configure: Re-generate.
5304
5305 2018-04-09 Pedro Alves <palves@redhat.com>
5306
5307 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5308 (set_target_gdbarch): Call
5309 gdb::observers::architecture_changed.notify instead of
5310 observer_notify_architecture_changed.
5311
5312 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5313
5314 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5315 (do_restore_current_traceframe_cleanup): Remove.
5316 (restore_current_traceframe_cleanup_dtor): Remove.
5317 (make_cleanup_restore_current_traceframe): Remove.
5318 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5319 New.
5320 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5321 * infrun.c (fetch_inferior_event): Use
5322 scoped_restore_current_traceframe.
5323
5324 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5325
5326 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5327 Remove.
5328 <n_allocated_type_units>: Remove.
5329 <all_type_units>: Change to std::vector.
5330 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5331 to std::vector change.
5332 (dwarf2_per_objfile::get_cutu): Likewise.
5333 (dwarf2_per_objfile::get_tu): Likewise.
5334 (create_signatured_type_table_from_index): Likewise.
5335 (create_signatured_type_table_from_debug_names): Likewise.
5336 (dw2_symtab_iter_next): Likewise.
5337 (dw2_print_stats): Likewise.
5338 (dw2_expand_all_symtabs): Likewise.
5339 (dw2_expand_marked_cus): Likewise.
5340 (dw2_debug_names_iterator::next): Likewise.
5341 (dwarf2_initialize_objfile): Likewise.
5342 (add_signatured_type_cu_to_table): Likewise.
5343 (create_all_type_units): Likewise.
5344 (add_type_unit): Likewise.
5345 (struct tu_abbrev_offset): Add constructor.
5346 (build_type_psymtabs_1): Adjust to std::vector change.
5347 (print_tu_stats): Likewise.
5348 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5349 (write_debug_names): Likewise.
5350
5351 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5352
5353 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5354 Make an std::vector.
5355 <n_comp_units>: Remove.
5356 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5357 to std::vector change.
5358 (dwarf2_per_objfile::get_cutu): Likewise.
5359 (dwarf2_per_objfile::get_cu): Likewise.
5360 (create_cus_from_index): Likewise.
5361 (create_addrmap_from_index): Likewise.
5362 (create_addrmap_from_aranges): Likewise.
5363 (dwarf2_read_index): Likewise.
5364 (dw2_find_last_source_symtab): Likewise.
5365 (dw2_map_symtabs_matching_filename): Likewise.
5366 (dw2_symtab_iter_next): Likewise.
5367 (dw2_print_stats): Likewise.
5368 (dw2_expand_all_symtabs): Likewise.
5369 (dw2_expand_symtabs_with_fullname): Likewise.
5370 (dw2_expand_marked_cus): Likewise.
5371 (dw2_map_symbol_filenames): Likewise.
5372 (create_cus_from_debug_names): Likewise.
5373 (dwarf2_read_debug_names): Likewise.
5374 (dw2_debug_names_iterator::next): Likewise.
5375 (dwarf2_initialize_objfile): Likewise.
5376 (set_partial_user): Likewise.
5377 (dwarf2_build_psymtabs_hard): Likewise.
5378 (read_comp_units_from_section): Remove arguments, adjust to
5379 std::vector change.
5380 (create_all_comp_units): Adjust to std::vector and
5381 read_comp_units_from_section changes.
5382 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5383 change.
5384 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5385 (psyms_seen_size): Likewise.
5386 (write_gdbindex): Likewise.
5387 (write_debug_names): Likewise.
5388
5389 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5390
5391 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5392 with dwarf2_per_objfile.
5393 (create_cus_from_index): Likewise.
5394 (create_signatured_type_table_from_index): Likewise.
5395 (dwarf2_read_index): Likewise.
5396 (dwarf2_initialize_objfile): Likewise.
5397 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5398 per_cu rather than get_dwarf2_per_objfile.
5399
5400 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5401
5402 * dwarf2read.h (struct signatured_type): Forward declare.
5403 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5404 New methods.
5405 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5406 (dw2_get_cutu): ...this.
5407 (dwarf2_per_objfile::get_cu): Rename from...
5408 (dw2_get_cu): ...this.
5409 (dwarf2_per_objfile::get_tu): New.
5410 (create_addrmap_from_index): Adjust.
5411 (create_addrmap_from_aranges): Adjust.
5412 (dw2_find_last_source_symtab): Adjust.
5413 (dw2_map_symtabs_matching_filename): Adjust.
5414 (dw2_symtab_iter_next): Adjust.
5415 (dw2_print_stats): Adjust.
5416 (dw2_expand_all_symtabs): Adjust.
5417 (dw2_expand_symtabs_with_fullname): Adjust.
5418 (dw2_expand_marked_cus): Adjust.
5419 (dw_expand_symtabs_matching_file_matcher): Adjust.
5420 (dw2_map_symbol_filenames): Adjust.
5421 (dw2_debug_names_iterator::next): Adjust.
5422 (dwarf2_initialize_objfile): Adjust.
5423 (set_partial_user): Adjust.
5424 (dwarf2_build_psymtabs_hard): Adjust.
5425
5426 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5427
5428 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5429 Remove unused variables.
5430 (dw2_map_symtabs_matching_filename): Likewise.
5431 (dwarf2_record_block_ranges): Likewise.
5432 (dwarf2_read_addr_index): Likewise.
5433 (follow_die_offset): Likewise.
5434
5435 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5436
5437 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5438 to symbol_file_add_main.
5439
5440 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5441
5442 PR mi/22299
5443 * mi/mi-console.c (do_fputc_async_safe): New.
5444 (mi_console_file::write_async_safe): New.
5445 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5446 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5447 New.
5448 * ui-file.c (ui_file::putstrn): Adjust call to
5449 fputstrn_unfiltered.
5450 * utils.c (printchar): Replace do_fputs and do_fprintf
5451 parameters by do_fputc.
5452 (fputstr_filtered): Adjust call to printchar.
5453 (fputstr_unfiltered): Likewise.
5454 (fputstrn_filtered): Likewise.
5455 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5456 printchar.
5457 * utils.h (do_fputc_ftype): New typedef.
5458 (fputstrn_unfiltered): Add do_fputc parameter.
5459
5460 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5461
5462 * regformats/i386/i386-avx.dat: Remove.
5463
5464 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5465
5466 PR gdb/22979
5467 * amd64-tdep.c (amd64_none_init_abi): New function.
5468 (amd64_x32_none_init_abi): New function.
5469 (_initialize_amd64_tdep): Register handlers for x86-64 and
5470 x64_32 with GDB_OSABI_NONE.
5471 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5472 GDB_OSABI_NONE osabi.
5473
5474 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5475
5476 PR gdb/22980
5477 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5478 GDB_OSABI_NONE.
5479 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5480 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5481
5482 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5483
5484 * common/byte-vector.h (char_vector): New type.
5485 * target.h (target_read_alloc): Return
5486 gdb::optional<byte_vector>.
5487 (target_read_stralloc): Return gdb::optional<char_vector>.
5488 (target_get_osdata): Return gdb::optional<char_vector>.
5489 * target.c (target_read_alloc_1): Templatize. Replacement
5490 manual memory management with vector.
5491 (target_read_alloc): Change return type, adjust.
5492 (target_read_stralloc): Change return type, adjust.
5493 (target_get_osdata): Change return type, adjust.
5494 * auxv.c (struct auxv_info) <length>: Remove.
5495 <data>: Change type to gdb::optional<byte_vector>.
5496 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5497 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5498 (target_auxv_search): Adjust.
5499 (fprint_target_auxv): Adjust.
5500 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5501 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5502 (linux_make_corefile_notes): Adjust.
5503 * osdata.c (get_osdata): Adjust.
5504 * remote.c (remote_get_threads_with_qxfer): Adjust.
5505 (remote_memory_map): Adjust.
5506 (remote_traceframe_info): Adjust.
5507 (btrace_read_config): Adjust.
5508 (remote_read_btrace): Adjust.
5509 (remote_pid_to_exec_file): Adjust.
5510 * solib-aix.c (solib_aix_get_library_list): Adjust.
5511 * solib-dsbt.c (decode_loadmap): Don't free buf.
5512 (dsbt_get_initial_loadmaps): Adjust.
5513 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5514 * solib-target.c (solib_target_current_sos): Adjust.
5515 * tracepoint.c (sdata_make_value): Adjust.
5516 * xml-support.c (xinclude_start_include): Adjust.
5517 (xml_fetch_content_from_file): Adjust.
5518 * xml-support.h (xml_fetch_another): Change return type.
5519 (xml_fetch_content_from_file): Change return type.
5520 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5521 * xml-tdesc.c (file_read_description_xml): Adjust.
5522 (fetch_available_features_from_target): Change return type.
5523 (target_fetch_description_xml): Adjust.
5524 (target_read_description_xml): Adjust.
5525
5526 2018-04-06 Tom Tromey <tom@tromey.com>
5527
5528 * value.c (~value): Update.
5529 (struct value) <contents>: Now unique_xmalloc_ptr.
5530 (value_contents_bits_eq, allocate_value_contents)
5531 (value_contents_raw, value_contents_all_raw)
5532 (value_contents_for_printing, value_contents_for_printing_const)
5533 (set_value_enclosing_type): Update.
5534
5535 2018-04-06 Tom Tromey <tom@tromey.com>
5536
5537 * value.c (range_s): Remove typedef, VEC.
5538 (struct range): Add operator<.
5539 (range_lessthan): Remove.
5540 (ranges_contain): Change type.
5541 (~value): Update.
5542 (struct value) <unavailable, optimized_out>: Now std::vector.
5543 (value_entirely_available)
5544 (value_entirely_covered_by_range_vector)
5545 (value_entirely_unavailable, value_entirely_optimized_out):
5546 Update.
5547 (insert_into_bit_range_vector): Change argument type.
5548 (find_first_range_overlap): Likewise.
5549 (struct ranges_and_idx, value_contents_bits_eq)
5550 (require_not_optimized_out, require_available): Update.
5551 (ranges_copy_adjusted): Change argument types.
5552 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5553
5554 2018-04-06 Tom Tromey <tom@tromey.com>
5555
5556 * value.c (~value): Update.
5557 (struct value) <parent>: Now a value_ref_ptr.
5558 (value_parent, set_value_parent, value_address, value_copy):
5559 Update.
5560
5561 2018-04-06 Tom Tromey <tom@tromey.com>
5562
5563 * value.c (struct value): Add constructor, destructor, and member
5564 initializers.
5565 (allocate_value_lazy, value_decref): Update.
5566
5567 2018-04-06 Tom Tromey <tom@tromey.com>
5568
5569 * value.c (struct value) <released, next>: Remove.
5570 (all_values): Now a std::vector.
5571 (allocate_value_lazy): Update.
5572 (value_next): Remove.
5573 (value_mark, value_free_to_mark, release_value)
5574 (value_release_to_mark): Update.
5575
5576 2018-04-06 Tom Tromey <tom@tromey.com>
5577
5578 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5579 (free_value_chain): Remove.
5580 * value.c (free_value_chain): Remove.
5581 (value_release_to_mark): Return a std::vector.
5582 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5583 std::vector.
5584 (check_condition): Update.
5585 * eval.c (fetch_subexp_value): Change "val_chain" to a
5586 std::vector.
5587 * breakpoint.c (update_watchpoint): Update.
5588 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5589
5590 2018-04-06 Tom Tromey <tom@tromey.com>
5591
5592 * value.h (free_all_values): Remove.
5593 * value.c (free_all_values): Remove.
5594
5595 2018-04-06 Tom Tromey <tom@tromey.com>
5596
5597 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5598 (value_history_chain, value_history_count): Remove.
5599 (value_history): New global.
5600 (record_latest_value, access_value_history, show_values)
5601 (preserve_values): Update.
5602
5603 2018-04-06 Tom Tromey <tom@tromey.com>
5604
5605 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5606 * varobj.c (varobj_set_display_format, varobj_set_value)
5607 (install_default_visualizer, construct_visualizer)
5608 (install_new_value, ~varobj, varobj_get_value_type)
5609 (my_value_of_variable, varobj_editable_p): Update.
5610 * c-varobj.c (c_describe_child, c_value_of_variable)
5611 (cplus_number_of_children, cplus_describe_child): Update.
5612 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5613 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5614 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5615
5616 2018-04-06 Tom Tromey <tom@tromey.com>
5617
5618 * printcmd.c (last_examine_address): Change type to
5619 value_ref_ptr.
5620 (do_examine, x_command): Update.
5621
5622 2018-04-06 Tom Tromey <tom@tromey.com>
5623
5624 * value.c (release_value): Update.
5625 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5626 (struct bpstats) <val>: Now a value_ref_ptr.
5627 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5628 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5629 (~watchpoint, print_it_watchpoint, watch_command_1)
5630 (invalidate_bp_value_on_memory_change): Update.
5631
5632 2018-04-06 Tom Tromey <tom@tromey.com>
5633
5634 * varobj.c (varobj_clear_saved_item)
5635 (update_dynamic_varobj_children, install_new_value, ~varobj):
5636 Update.
5637 * value.h (value_incref): Move declaration earlier.
5638 (value_decref): Rename from value_free.
5639 (struct value_ref_policy): New.
5640 (value_ref_ptr): New typedef.
5641 (struct value_deleter): Remove.
5642 (gdb_value_up): Remove typedef.
5643 (release_value): Change return type.
5644 (release_value_or_incref): Remove.
5645 * value.c (set_value_parent): Update.
5646 (value_incref): Change return type.
5647 (value_decref): Rename from value_free.
5648 (value_free_to_mark, free_all_values, free_value_chain): Update.
5649 (release_value): Return value_ref_ptr.
5650 (release_value_or_incref): Remove.
5651 (record_latest_value, set_internalvar, clear_internalvar):
5652 Update.
5653 * stack.c (info_frame_command): Don't call value_free.
5654 * python/py-value.c (valpy_dealloc, valpy_new)
5655 (value_to_value_object): Update.
5656 * printcmd.c (do_examine): Update.
5657 * opencl-lang.c (lval_func_free_closure): Update.
5658 * mi/mi-main.c (register_changed_p): Don't call value_free.
5659 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5660 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5661 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5662 value_free.
5663 * guile/scm-value.c (vlscm_free_value_smob)
5664 (vlscm_scm_from_value): Update.
5665 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5666 (frame_unwind_register_unsigned, get_frame_register_bytes)
5667 (put_frame_register_bytes): Don't call value_free.
5668 * findvar.c (address_from_register): Don't call value_free.
5669 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5670 * dwarf2loc.c (entry_data_value_free_closure)
5671 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5672 (dwarf2_evaluate_loc_desc_full): Update.
5673 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5674 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5675 (~watchpoint, watch_command_1)
5676 (invalidate_bp_value_on_memory_change): Update.
5677 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5678
5679 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5680
5681 PR gdb/23022
5682 * warning.m4: Add -Wno-error=deprecated-register.
5683 * configure: Re-generate.
5684
5685 2018-04-05 Tom Tromey <tom@tromey.com>
5686
5687 * linespec.h: Remove include of "vec.h".
5688
5689 2018-04-05 Tom Tromey <tom@tromey.com>
5690
5691 * linespec.c (typep): Remove typedef.
5692 (find_methods, find_superclass_methods): Take a std::vector.
5693 (find_method): Use std::vector.
5694
5695 2018-04-05 Tom Tromey <tom@tromey.com>
5696
5697 * utils.c (compare_strings): Remove.
5698 * utils.h (compare_strings): Remove.
5699 * objc-lang.h (find_imps): Update.
5700 * objc-lang.c (find_methods): Take a std::vector.
5701 (uniquify_strings, find_imps): Likewise.
5702 * linespec.c (find_methods): Take a std::vector.
5703 (decode_objc): Use std::vector.
5704 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5705 a std::vector.
5706 (find_method, find_function_symbols): Use std::vector.
5707
5708 2018-04-05 Tom Tromey <tom@tromey.com>
5709
5710 * completer.c (completion_tracker::completion_tracker): Remove
5711 cast.
5712 (completion_tracker::discard_completions): Likewise.
5713 * breakpoint.c (ambiguous_names_p): Remove cast.
5714 * ada-lang.c (_initialize_ada_language): Remove cast.
5715 * utils.h (streq): Update.
5716 (streq_hash): Add new declaration.
5717 * utils.c (streq): Return bool.
5718 (streq_hash): New function.
5719
5720 2018-04-05 Tom Tromey <tom@tromey.com>
5721
5722 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5723 Remove a string copy.
5724
5725 2018-04-05 Tom Tromey <tom@tromey.com>
5726
5727 * linespec.c (filter_results): Use std::vector.
5728 (decode_line_2, decode_line_full): Update.
5729
5730 2018-04-05 Tom Tromey <tom@tromey.com>
5731
5732 * linespec.c (canonical_to_fullform): Return std::string.
5733 (filter_results): Update.
5734 (struct decode_line_2_item): Add constructor.
5735 <fullform, displayform>: Now std::string.
5736 (decode_line_2_compare_items): Now a std::sort comparator.
5737 (decode_line_2): Update.
5738
5739 2018-04-05 Tom Tromey <tom@tromey.com>
5740
5741 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5742 (unexpected_linespec_error): Update.
5743 (linespec_parse_basic, parse_linespec): Update.
5744
5745 2018-04-05 Tom Tromey <tom@tromey.com>
5746
5747 * linespec.c (linespec_parse_basic): Reindent.
5748
5749 2018-04-05 Tom Tromey <tom@tromey.com>
5750
5751 * minsyms.h (iterate_over_minimal_symbols): Update.
5752 * minsyms.c (iterate_over_minimal_symbols): Take a
5753 gdb::function_view.
5754 * linespec.c (struct collect_minsyms): Remove.
5755 (compare_msyms): Now a std::sort comparator.
5756 (add_minsym): Add parameters.
5757 (search_minsyms_for_name): Update. Use std::vector.
5758
5759 2018-04-03 Tom Tromey <tom@tromey.com>
5760
5761 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5762 gdb::byte_vector.
5763
5764 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5765
5766 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5767
5768 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5769
5770 PR gdb/16959
5771 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5772 printing static type.
5773
5774 2018-04-01 Tom Tromey <tom@tromey.com>
5775
5776 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5777 (rs6000_xfer_shared_libraries): Update.
5778
5779 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5780
5781 * common/gdb_vecs.h (char_ptr): Remove.
5782 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5783
5784 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5785
5786 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5787 with std::vector.
5788 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5789
5790 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5791
5792 * tracepoint.h (struct uploaded_tp): Initialize fields.
5793 <actions, step_actions, cmd_strings>: Change type to
5794 std::vector<char *>.
5795 * tracepoint.c (get_uploaded_tp): Allocate with new.
5796 (free_uploaded_tps): Free with delete.
5797 (parse_tracepoint_definition): Adjust to std::vector change.
5798 * breakpoint.c (read_uploaded_action): Likewise.
5799 (create_tracepoint_from_upload): Likewise.
5800 * ctf.c (ctf_write_uploaded_tp): Likewise.
5801 (SET_ARRAY_FIELD): Likewise.
5802 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5803
5804 2018-03-30 Tom Tromey <tom@tromey.com>
5805
5806 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5807 std::unique_ptr.
5808 (svr4_keep_data_in_core): Update.
5809 (svr4_read_so_list): Update.
5810
5811 2018-03-30 Tom Tromey <tom@tromey.com>
5812
5813 * windows-nat.c (handle_output_debug_string, handle_exception):
5814 Update.
5815 * target.h (target_read_string): Update.
5816 * target.c (target_read_string): Change "string" to
5817 unique_xmalloc_ptr.
5818 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5819 Update.
5820 * solib-frv.c (frv_current_sos): Update.
5821 * solib-dsbt.c (dsbt_current_sos): Update.
5822 * solib-darwin.c (darwin_current_sos): Update.
5823 * linux-thread-db.c (inferior_has_bug): Update.
5824 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5825 Update. Remove alloca.
5826 * ada-lang.c (ada_main_name): Update.
5827
5828 2018-03-30 Tom Tromey <tom@tromey.com>
5829
5830 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5831 (struct dwo_file_deleter): New.
5832 (dwo_file_up): New typedef.
5833 (open_and_init_dwo_file): Use dwo_file_up.
5834 (free_dwo_file_cleanup): Remove.
5835
5836 2018-03-30 Tom Tromey <tom@tromey.com>
5837
5838 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5839 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5840
5841 2018-03-30 Tom Tromey <tom@tromey.com>
5842
5843 * dwarf2read.c (class free_cached_comp_units): New class.
5844 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5845 (free_cached_comp_units): Remove function.
5846
5847 2018-03-30 Tom Tromey <tom@tromey.com>
5848
5849 * utils.h (make_cleanup_unpush_target): Remove.
5850 * inf-ptrace.c (struct target_unpusher): New.
5851 (target_unpush_up) New typedef.
5852 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5853 target_unpush_up.
5854 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5855
5856 2018-03-27 Tom Tromey <tom@tromey.com>
5857
5858 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5859
5860 2018-03-27 Pedro Alves <palves@redhat.com>
5861 Tom Tromey <tom@tromey.com>
5862
5863 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5864 destructor. Now a class.
5865 (gdb_readline_wrapper_cleanup): Remove function.
5866 (gdb_readline_wrapper): Remove cleanups.
5867
5868 2018-03-27 Tom Tromey <tom@tromey.com>
5869
5870 * typeprint.h (struct type_print_options) <local_typedefs,
5871 global_typedefs>: Remove "struct" keyword.
5872 (class typedef_hash_table): New class.
5873 (recursively_update_typedef_hash, add_template_parameters)
5874 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5875 (find_typedef_in_hash): Don't declare.
5876 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5877 (typedef_hash_table::recursively_update): Rename from
5878 recursively_update_typedef_hash. Now a member.
5879 (typedef_hash_table::add_template_parameters): Rename from
5880 add_template_parameters. Now a member.
5881 (typedef_hash_table::typedef_hash_table): Now a constructor;
5882 rename from create_typedef_hash.
5883 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5884 rename from free_typedef_hash.
5885 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5886 (do_free_global_table): Remove.
5887 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5888 from copy_type_recursive.
5889 (create_global_typedef_table): Remove.
5890 (typedef_hash_table::find_global_typedef): Now a member of
5891 typedef_hash_table.
5892 (typedef_hash_table::find_typedef): Rename from
5893 find_typedef_in_hash; now a member.
5894 (whatis_exp): Update.
5895 * extension.h (struct ext_lang_type_printers): Add constructor and
5896 destructor.
5897 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5898 declare.
5899 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5900 Now a constructor; rename from start_ext_lang_type_printers.
5901 (ext_lang_type_printers): Now a destructor; rename from
5902 free_ext_lang_type_printers.
5903 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5904 Update.
5905 (c_type_print_base_struct_union): Update. Remove cleanups.
5906
5907 2018-03-27 Tom Tromey <tom@tromey.com>
5908
5909 * dwarf-index-write.c: Include <cmath>.
5910
5911 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5912
5913 * NEWS: Add entry describing new "set|show varsize-limit" command.
5914 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5915 command.
5916 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5917 "set variable".
5918
5919 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5920
5921 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5922 dwarf-index-write.c
5923 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5924 * dwarf-index-common.c: New file.
5925 * dwarf-index-common.h: New file.
5926 * dwarf-index-write.c: New file.
5927 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5928 (struct dwarf2_section_info): Move from here.
5929 (dwarf2_section_info_def): Likewise.
5930 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5931 (offset_type): Likewise.
5932 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5933 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5934 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5935 (byte_swap): Likewise.
5936 (MAYBE_SWAP): Likewise.
5937 (dwarf2_per_cu_ptr): Likewise.
5938 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5939 (struct tu_stats): Likewise.
5940 (struct dwarf2_per_objfile): Likewise.
5941 (struct dwarf2_per_cu_data): Likewise.
5942 (struct signatured_type): Likewise.
5943 (sig_type_ptr): Likewise.
5944 (DEF_VEC_P (sig_type_ptr)): Likewise.
5945 (INDEX4_SUFFIX): Likewise.
5946 (INDEX5_SUFFIX): Likewise.
5947 (DEBUG_STR_SUFFIX): Likewise.
5948 (dwarf2_read_section): Make non-static.
5949 (mapped_index_string_hash): Move from here.
5950 (dwarf5_djb_hash): Likewise.
5951 (file_write): Likewise.
5952 (class data_buf): Likewise.
5953 (struct symtab_index_entry): Likewise.
5954 (struct mapped_symtab): Likewise.
5955 (find_slot): Likewise.
5956 (hash_expand): Likewise.
5957 (add_index_entry): Likewise.
5958 (uniquify_cu_indices): Likewise.
5959 (class c_str_view): Likewise.
5960 (class c_str_view_hasher): Likewise.
5961 (class vector_hasher): Likewise.
5962 (write_hash_table): Likewise.
5963 (psym_index_map): Likewise.
5964 (struct addrmap_index_data): Likewise.
5965 (add_address_entry): Likewise.
5966 (add_address_entry_worker): Likewise.
5967 (write_address_map): Likewise.
5968 (symbol_kind): Likewise.
5969 (write_psymbols): Likewise.
5970 (struct signatured_type_index_data): Likewise.
5971 (write_one_signatured_type): Likewise.
5972 (recursively_count_psymbols): Likewise.
5973 (recursively_write_psymbols): Likewise.
5974 (class debug_names): Likewise.
5975 (check_dwarf64_offsets): Likewise.
5976 (psyms_seen_size): Likewise.
5977 (write_gdbindex): Likewise.
5978 (write_debug_names): Likewise.
5979 (assert_file_size): Likewise.
5980 (write_psymtabs_to_index): Likewise.
5981 (save_gdb_index_command): Likewise.
5982 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5983 command.
5984 * dwarf2read.h: New file.
5985
5986 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5987
5988 PR gdb/22670
5989 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5990 symbol name if the CU's language stores symbol names in linkage
5991 format.
5992 * language.h (struct language_defn)
5993 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5994 all instances of this struct.
5995
5996 2018-03-26 Tom Tromey <tom@tromey.com>
5997
5998 * stack.c (backtrace_command_1): Remove verbose code.
5999
6000 2018-03-26 Tom Tromey <tom@tromey.com>
6001
6002 * python/py-framefilter.c (py_print_type): Don't catch
6003 exceptions. Return void.
6004 (py_print_value): Likewise.
6005 (py_print_single_arg): Likewise.
6006 (enumerate_args): Don't catch exceptions.
6007 (py_print_args): Likewise.
6008 (py_print_frame): Likewise.
6009 (gdbpy_apply_frame_filter): Catch exceptions here.
6010
6011 2018-03-26 Tom Tromey <tom@tromey.com>
6012
6013 * stack.c (_initialize_stack): Remove trailing newlines from help
6014 text. Add "Usage" line to "backtrace" help.
6015
6016 2018-03-26 Tom Tromey <tom@tromey.com>
6017
6018 PR python/16486:
6019 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6020
6021 2018-03-26 Tom Tromey <tom@tromey.com>
6022
6023 * python/py-framefilter.c (py_print_single_arg): Return
6024 EXT_LANG_BT_ERROR from catch.
6025
6026 2018-03-26 Tom Tromey <tom@tromey.com>
6027
6028 PR backtrace/15584:
6029 * stack.c (backtrace_command_1): Move some code into no-filters
6030 "if".
6031
6032 2018-03-26 Tom Tromey <tom@tromey.com>
6033
6034 * python/py-framefilter.c (throw_quit_or_print_exception): New
6035 function.
6036 (gdbpy_apply_frame_filter): Use it.
6037
6038 2018-03-26 Tom Tromey <tom@tromey.com>
6039
6040 PR cli/17716:
6041 * python/py-framefilter.c (py_print_type, py_print_value)
6042 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6043 RETURN_MASK_ERROR.
6044
6045 2018-03-26 Tom Tromey <tom@tromey.com>
6046
6047 * python/py-framefilter.c (enumerate_args): Use
6048 gdb::unique_xmalloc_ptr.
6049
6050 2018-03-26 Tom Tromey <tom@tromey.com>
6051
6052 * python/py-framefilter.c (py_print_frame): Return
6053 EXT_LANG_BT_OK.
6054 (gdbpy_apply_frame_filter): Update comment.
6055 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6056 Remove.
6057 <EXT_LANG_BT_NO_FILTERS>: Change value.
6058
6059 2018-03-26 Tom Tromey <tom@tromey.com>
6060
6061 PR backtrace/15582:
6062 * stack.c (backtrace_command): Parse "hide" argument.
6063 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6064 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6065 constant.
6066
6067 2018-03-26 Tom Tromey <tom@tromey.com>
6068
6069 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6070 add "flags".
6071 (backtrace_command): Remove "fulltrace", add "flags".
6072
6073 2018-03-26 Tom Tromey <tom@tromey.com>
6074
6075 * stack.c (backtrace_command): Rewrite command line parsing.
6076
6077 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6078
6079 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6080
6081 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6082
6083 * filename-seen-cache.h: Add include guard.
6084
6085 2018-03-26 Keith Seitz <keiths@redhat.com>
6086
6087 * symfile.c (place_section): Remove "struct" from section_addr_info
6088 in comment.
6089 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6090 "struct" keyword from section_addr_info.
6091
6092 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6093
6094 * regformats/regdef.h (reg): Add constructors.
6095
6096 2018-03-25 Pedro Alves <palves@redhat.com>
6097
6098 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6099 if then/else bodies in var_func_name extraction.
6100
6101 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6102
6103 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6104 lookup_minimal_symbol() to find symbol entry.
6105 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6106
6107 2018-03-23 Keith Seitz <keiths@redhat.com>
6108
6109 PR c++/22968
6110 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6111 nested type definitions for C++, too.
6112
6113 2018-03-23 Tom Tromey <tom@tromey.com>
6114
6115 * machoread.c (struct oso_el): Add a constructor. Don't define as
6116 a typedef.
6117 (macho_register_oso): Remove.
6118 (macho_symtab_read): Take a std::vector.
6119 (oso_el_compare_name): Now a std::sort comparator.
6120 (macho_symfile_read_all_oso): Take a std::vector.
6121 (macho_symfile_read): Use std::vector. Remove cleanups.
6122
6123 2018-03-22 Tom Tromey <tom@tromey.com>
6124
6125 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6126 (record_full_goto_bookmark): Use std::string.
6127
6128 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6129
6130 PR tdep/18295
6131 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6132 a single mask.
6133
6134 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6135
6136 * rs6000-tdep.c (store_insn_p): New function.
6137 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6138 and cr_reg to their unshifted values. Use store_insn_p to
6139 match LR saves using either R1 or fdata->alloca_reg. Use
6140 store_insn_p to match CR saves. Set alloca_reg_offset
6141 when alloca_reg and framep are set. Remove lr_reg shift
6142 when assigning to fdata->lr_register.
6143
6144 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6145
6146 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6147 command line args instead of emitting a warning.
6148
6149 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6150
6151 * tracepoint.h (struct static_tracepoint_marker): Initialize
6152 fields, define default constructor, move constructor and move
6153 assignment, disable the rest.
6154 <str_id, extra>: Make std::string.
6155 (release_static_tracepoint_marker): Remove.
6156 (free_current_marker): Remove.
6157 * tracepoint.c (free_current_marker): Remove.
6158 (parse_static_tracepoint_marker_definition): Adjust to
6159 std::string, use new hex2str overload.
6160 (release_static_tracepoint_marker): Remove.
6161 (print_one_static_tracepoint_marker): Get marker by reference
6162 and adjust to std::string.
6163 (info_static_tracepoint_markers_command): Adjust to std::vector
6164 changes
6165 * target.h (static_tracepoint_marker_p): Remove typedef.
6166 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6167 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6168 bool.
6169 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6170 * target-debug.h
6171 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6172 (target_debug_print_std_vector_static_tracepoint_marker): New.
6173 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6174 to...
6175 (target_debug_print_static_tracepoint_marker_p): ... this.
6176 * target-delegates.c: Re-generate.
6177 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6178 Make std::string.
6179 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6180 (decode_static_tracepoint_spec): Adjust to std::vector.
6181 (tracepoint_print_one_detail): Adjust to std::string.
6182 (strace_marker_decode_location): Adjust to std::string.
6183 (update_static_tracepoint): Adjust to std::string, remove call
6184 to release_static_tracepoint_marker.
6185 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6186 Adjust to std::vector.
6187 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6188 (remote_static_tracepoint_markers_by_strid): Adjust to
6189 std::vector.
6190 * common/rsp-low.h (hex2str): New overload with explicit count
6191 of bytes.
6192 * common/rsp-low.c (hex2str): New overload with explicit count
6193 of bytes.
6194 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6195 (_initialize_rsp_low_selftests): Add test_hex2str test.
6196 * unittests/tracepoint-selftests.c
6197 (test_parse_static_tracepoint_marker_definition): Adjust to
6198 std::string.
6199
6200 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6201
6202 * tracepoint.c (parse_static_tracepoint_marker_definition):
6203 Consider case where the definition is followed by more
6204 definitions.
6205 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6206 tracepoint-selftests.c.
6207 * unittests/tracepoint-selftests.c: New.
6208
6209 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6210
6211 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6212 Carvalho.
6213
6214 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6215
6216 * symtab.c (find_pc_sect_line): fixed indentation.
6217
6218 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6219
6220 * symtab.c (find_pc_sect_line): now uses binary search.
6221
6222 2018-03-19 Tom Tromey <tom@tromey.com>
6223
6224 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6225 "IDENT" production.
6226
6227 2018-03-19 Pedro Alves <palves@redhat.com>
6228 Tom Tromey <tom@tromey.com>
6229
6230 * unittests/observable-selftests.c: New file.
6231 * common/observable.h: New file.
6232 * observable.h: New file.
6233 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6234 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6235 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6236 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6237 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6238 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6239 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6240 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6241 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6242 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6243 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6244 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6245 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6246 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6247 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6248 tui/tui-interp.c, valops.c: Update all users.
6249 * tui/tui-hooks.c (tui_bp_created_observer)
6250 (tui_bp_deleted_observer, tui_bp_modified_observer)
6251 (tui_inferior_exit_observer, tui_before_prompt_observer)
6252 (tui_normal_stop_observer, tui_register_changed_observer):
6253 Remove.
6254 (tui_observers_token): New global.
6255 (attach_or_detach, tui_attach_detach_observers): New functions.
6256 (tui_install_hooks, tui_remove_hooks): Use
6257 tui_attach_detach_observers.
6258 * record-btrace.c (record_btrace_thread_observer): Remove.
6259 (record_btrace_thread_observer_token): New global.
6260 * observer.sh: Remove.
6261 * observer.c: Rename to observable.c.
6262 * observable.c (namespace gdb_observers): Define new objects.
6263 (observer_debug): Move into gdb_observers namespace.
6264 (struct observer, struct observer_list, xalloc_observer_list_node)
6265 (xfree_observer_list_node, generic_observer_attach)
6266 (generic_observer_detach, generic_observer_notify): Remove.
6267 (_initialize_observer): Update.
6268 Don't include observer.inc.
6269 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6270 (clean mostlyclean): Likewise.
6271 (observer.h, observer.inc): Remove targets.
6272 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6273 (COMMON_SFILES): Use observable.c, not observer.c.
6274 * .gitignore: Remove observer.h.
6275
6276 2018-03-18 Tom Tromey <tom@tromey.com>
6277
6278 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6279 gdb::def_vector.
6280 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6281
6282 2018-03-17 Tom Tromey <tom@tromey.com>
6283
6284 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6285
6286 2018-03-17 Tom Tromey <tom@tromey.com>
6287
6288 * target.c (class scoped_target_fd): New.
6289 (target_fileio_close_cleanup): Remove.
6290 (target_fileio_read_alloc_1): Use scoped_target_fd.
6291
6292 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6293
6294 * silent-rules.mk: New.
6295 * Makefile.in: Include silent-rules.mk
6296 (srcdir, VPATH, top_srcdir): Move up.
6297 (COMPILE): Add ECHO_CXX.
6298 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6299 (init.c): Add ECHO_INIT_C.
6300 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6301 (version.c): Add ECHO_GEN.
6302 (printcmd.o): Add ECHO_CXX.
6303 (target-float.o): Add ECHO_CXX.
6304 (ada-exp.o): Add ECHO_CXX.
6305 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6306 (insight$(EXEEXT)): Add ECHO_CXXLD.
6307 * gnulib/configure.ac: Add AM_SILENT_RULES.
6308 * gnulib/aclocal.m4: Re-generate.
6309 * gnulib/configure: Re-generate.
6310 * gnulib/import/Makefile.in: Re-generate.
6311
6312 2018-03-16 Tom Tromey <tom@tromey.com>
6313
6314 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6315 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6316 * utils.c (do_free_section_addr_info)
6317 (make_cleanup_free_section_addr_info): Remove.
6318 * symfile.h (struct other_sections): Add constructor.
6319 (struct section_addr_info): Remove.
6320 (section_addr_info): New typedef.
6321 (struct sym_fns) <sym_offsets>: Change type of parameter.
6322 (build_section_addr_info_from_objfile)
6323 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6324 (default_symfile_offsets, symbol_file_add)
6325 (symbol_file_add_from_bfd)
6326 (build_section_addr_info_from_section_table): Update.
6327 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6328 * symfile.c (alloc_section_addr_info): Remove.
6329 (build_section_addr_info_from_section_table): Change return type.
6330 Update.
6331 (build_section_addr_info_from_bfd)
6332 (build_section_addr_info_from_objfile): Likewise.
6333 (free_section_addr_info): Remove.
6334 (relative_addr_info_to_section_offsets): Change type of "addrs".
6335 (addrs_section_compar): Now a std::sort comparator.
6336 (addrs_section_sort): Change return type.
6337 (addr_info_make_relative): Change type of "addrs". Update.
6338 (default_symfile_offsets, syms_from_objfile_1)
6339 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6340 (symbol_file_add_separate): Update.
6341 (symbol_file_add): Change type of "addrs". Update.
6342 (add_symbol_file_command): Update. Remove cleanups.
6343 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6344 cleanups.
6345 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6346 * solib.c (solib_read_symbols): Update.
6347 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6348 * machoread.c (macho_symfile_offsets): Update.
6349 * jit.c (jit_bfd_try_read_symtab): Update.
6350
6351 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6352
6353 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6354 unittests/utils-selftests.c.
6355 * unittests/utils-selftests.c: New file.
6356
6357 2018-03-14 Tom Tromey <tom@tromey.com>
6358
6359 PR cli/14977:
6360 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6361 for NULL.
6362
6363 2018-03-14 Tom Tromey <tom@tromey.com>
6364
6365 PR cli/19918:
6366 * printcmd.c (printf_pointer): Allow "-" in format.
6367
6368 2018-03-14 Tom Tromey <tom@tromey.com>
6369
6370 * printcmd.c (_initialize_printcmd): Add usage to printf.
6371
6372 2018-03-14 Yao Qi <qiyao@sourceware.org>
6373
6374 * MAINTAINERS: Update my email address.
6375
6376 2018-03-13 Tom Tromey <tom@tromey.com>
6377
6378 * machoread.c (macho_check_dsym): Change filenamep to a
6379 std::string*.
6380 (macho_symfile_read): Update.
6381 * symfile.c (load_command): Use std::string.
6382
6383 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6384
6385 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6386 to error message string.
6387 (riscv_register_name): Use xsnprintf instead of sprintf.
6388 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6389 internal_error.
6390 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6391 error.
6392 (riscv_push_dummy_call): Likewise.
6393
6394 2018-03-12 Tom Tromey <tom@tromey.com>
6395
6396 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6397 Use gdb::byte_vector.
6398 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6399
6400 2018-03-12 Yao Qi <yao.qi@linaro.org>
6401
6402 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6403 parameter type to readable_regcache.
6404 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6405 the declaration.
6406
6407 2018-03-11 Tom Tromey <tom@tromey.com>
6408
6409 * dwarf2read.c (struct nextfield): Add initializers.
6410 (struct nextfnfield): Remove.
6411 (struct fnfieldlist): Add initializers. Remove "length" and
6412 "head", use std::vector.
6413 (struct decl_field_list): Remove.
6414 (struct field_info): Add initializers.
6415 <fields, baseclasses>: Now std::vector.
6416 <nbaseclasses, nfnfields, typedef_field_list_count,
6417 nested_types_list_count>: Remove.
6418 (dwarf2_add_field, dwarf2_add_type_defn)
6419 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6420 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6421 (process_structure_scope): Update.
6422
6423 2018-03-11 Tom Tromey <tom@tromey.com>
6424
6425 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6426 for use by std::sort.
6427 (build_type_psymtabs_1): Use std::vector.
6428
6429 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6430
6431 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6432 and LIBMPFR in the printed configuration.
6433
6434 2018-03-08 Tom Tromey <tom@tromey.com>
6435
6436 * source.c (get_filename_and_charpos): Use scoped_fd.
6437 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6438 (procfs_pidlist): Likewise.
6439 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6440 (iterate_over_mappings): Likewise.
6441
6442 2018-03-08 Tom Tromey <tom@tromey.com>
6443
6444 * infcall.c (struct call_return_meta_info)
6445 <stack_temporaries_enabled>: Remove.
6446 (get_call_return_value, call_function_by_hand_dummy): Update.
6447 * thread.c (disable_thread_stack_temporaries): Remove.
6448 (enable_thread_stack_temporaries): Remove.
6449 (thread_stack_temporaries_enabled_p): Return bool.
6450 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6451 (get_last_thread_stack_temporary): Update.
6452 * eval.c (evaluate_subexp): Update.
6453 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6454 class, not a function.
6455 (value_ptr, value_vec): Remove typedefs.
6456 (class thread_info) <stack_temporaries_enabled>: Now bool.
6457 <stack_temporaries>: Now a std::vector.
6458 (thread_stack_temporaries_enabled_p)
6459 (value_in_thread_stack_temporaries): Return bool.
6460
6461 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6462
6463 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6464 (getpkt_or_notif_sane_1): Likewise.
6465
6466 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6467
6468 * build-id.c (build_id_to_debug_bfd): Use std::string.
6469
6470 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6471
6472 * build-id.c (find_separate_debug_file_by_buildid): Return
6473 std::string.
6474 * build-id.h (find_separate_debug_file_by_buildid): Return
6475 std::string.
6476 * coffread.c (coff_symfile_read): Adjust to std::string.
6477 * elfread.c (elf_symfile_read): Adjust to std::string.
6478 * symfile.c (separate_debug_file_exists): Change parameter to
6479 std::string.
6480 (find_separate_debug_file): Return std::string.
6481 (find_separate_debug_file_by_debuglink): Return std::string.
6482 * symfile.h (find_separate_debug_file_by_debuglink): Return
6483 std::string.
6484
6485 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6486
6487 * common/xml-utils.c (xml_escape_text): Move code to...
6488 (xml_escape_text_append): ... this new function.
6489 * common/xml-utils.h (xml_escape_text_append): New declaration.
6490 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6491 New function.
6492 (_initialize_xml_utils): register test_xml_escape_text_append as
6493 a selftest.
6494
6495 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6496
6497 * defs.h: Remove MAX_REGISTER_SIZE.
6498 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6499 asserts.
6500 * python/py-unwind.c (pyuw_sniffer): Likewise.
6501
6502 2018-03-07 Tom Tromey <tom@tromey.com>
6503
6504 * linux-tdep.c (linux_info_proc): Update.
6505 * target.h (struct target_ops) <to_fileio_readlink>: Return
6506 optional<string>.
6507 (target_fileio_readlink): Return optional<string>.
6508 * remote.c (remote_hostio_readlink): Return optional<string>.
6509 * inf-child.c (inf_child_fileio_readlink): Return
6510 optional<string>.
6511 * target.c (target_fileio_readlink): Return optional<string>.
6512
6513 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6514
6515 * regcache.c (cooked_read_test): Add riscv to the list of
6516 architectures that have a save_reggroup.
6517
6518 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6519
6520 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6521 value is not a dynamic class object.
6522
6523 2018-03-06 Tom Tromey <tom@tromey.com>
6524
6525 * rust-exp.y: Formatting fixes.
6526
6527 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6528
6529 * riscv-tdep.c (riscv_register_name): Remove target description
6530 support.
6531 (riscv_gdbarch_init): Remove target description check.
6532
6533 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6534
6535 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6536 comment.
6537 * riscv-tdep.h: Likewise.
6538
6539 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6540
6541 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6542 (riscv_pseudo_register_write): Delete.
6543 (riscv_gdbarch_init): Remove all use of pseudo registers.
6544
6545 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6546
6547 * record-btrace.c (btrace_print_lines): Replace cleanup
6548 parameter with RAII equivalents.
6549 (btrace_insn_history): Replace cleanup with RAII equivalents.
6550 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6551 make_cleanup_ui_out_tuple_begin_end): Remove.
6552 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6553 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6554 make_cleanup_ui_out_list_begin_end): Remove.
6555
6556 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6557
6558 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6559 parameter types to std::vector. Use bool.
6560 (record_btrace_wait): Replace VEC(tp_t) with
6561 std::vector<thread_info *>.
6562 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6563
6564 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6565
6566 * record-btrace.c (record_btrace_disable_callback): Remove.
6567 (struct scoped_btrace_disable): New.
6568 (record_btrace_open): Use scoped_btrace_disable.
6569
6570 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6571
6572 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6573 reading values from registers.
6574
6575 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6576
6577 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6578 where appropriate.
6579
6580 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6581
6582 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6583 change parameter type. Use GDB's print functions, and use
6584 core_addr_to_string where appropriate.
6585 (riscv_push_dummy_call): Use core_addr_to_string where
6586 appropriate, update call to riscv_print_arg_location, and reindent
6587 a few lines.
6588 (riscv_return_value): Update call to riscv_print_arg_location.
6589
6590 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6591 Tim Newsome <tim@sifive.com>
6592 Albert Ou <a0u@eecs.berkeley.edu>
6593 Darius Rad <darius@bluespec.com>
6594
6595 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6596 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6597 (ALLDEPFILES): Add riscv-tdep.c
6598 * configure.tgt: Add riscv support.
6599 * riscv-tdep.c: New file.
6600 * riscv-tdep.h: New file.
6601 * NEWS: Mention new target.
6602 * MAINTAINERS: Add entry for riscv.
6603
6604 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6605
6606 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6607 fields within aggregates.
6608
6609 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6610
6611 * record-btrace.c (btrace_print_lines): Change type of flags to
6612 gdb_disassembly_flags.
6613
6614 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6615
6616 * fbsd-nat.c: Include "inf-ptrace.h".
6617 (USE_SIGTRAP_SIGINFO): Conditionally define.
6618 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6619 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6620 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6621 function.
6622 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6623 Likewise.
6624 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6625 Likewise.
6626 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6627 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6628 "supports_stopped_by_hw_breakpoint" target methods.
6629
6630 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6631
6632 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6633 * fbsd-nat.c (debug_fbsd_nat): New variable.
6634 (show_fbsd_nat_debug): New function.
6635 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6636 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6637
6638 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6639
6640 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6641 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6642 prototype.
6643 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6644 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6645 method.
6646
6647 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6648
6649 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6650 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6651
6652 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6653
6654 * charset.c (struct charset_vector): New.
6655 (charsets): Change type to charset_vector.
6656 (find_charset_names): Adjust.
6657 (add_one): Adjust.
6658 (_initialize_charset): Adjust.
6659
6660 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6661
6662 * progspace.h (struct program_space) <deleted_solibs>: Change
6663 type to std::vector<std::string>.
6664 * progspace.c (clear_program_space_solib_cache): Adjust.
6665 * breakpoint.c (print_solib_event): Adjust.
6666 (check_status_catch_solib): Adjust.
6667 * solib.c (update_solib_list): Adjust.
6668 * ui-out.h (class ui_out) <field_string>: New overload.
6669 * ui-out.c (ui_out::field_string): New overload.
6670
6671 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6672
6673 * progspace.h (struct program_space): Add constructor and
6674 destructor, initialize fields.
6675 (add_program_space): Remove.
6676 * progspace.c (add_program_space): Rename to...
6677 (program_space::program_space): ... this.
6678 (release_program_space): Rename to...
6679 (program_space::~program_space): ... this.
6680 (delete_program_space): Use delete to delete program_space.
6681 (initialize_progspace): Use new to allocate program_space.
6682 * inferior.c (add_inferior_with_spaces): Likewise.
6683 (clone_inferior_command): Likewise.
6684 * infrun.c (follow_fork_inferior): Likewise.
6685 (handle_vfork_child_exec_or_exit): Likewise.
6686
6687 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6688
6689 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6690 (delim_string_to_char_ptr_vec): Return std::vector of
6691 gdb::unique_xmalloc_ptr.
6692 (dirnames_to_char_ptr_vec_append): Take std::vector of
6693 gdb::unique_xmalloc_ptr.
6694 (dirnames_to_char_ptr_vec): Return std::vector of
6695 gdb::unique_xmalloc_ptr.
6696 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6697 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6698 (delim_string_to_char_ptr_vec): Return an std::vector of
6699 gdb::unique_xmalloc_ptr, adjust the code.
6700 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6701 gdb::unique_xmalloc_ptr, adjust the code.
6702 (dirnames_to_char_ptr_vec): Return an std::vector of
6703 gdb::unique_xmalloc_ptr, adjust the code.
6704 * auto-load.c (auto_load_safe_path_vec): Change type to
6705 std::vector of gdb::unique_xmalloc_ptr.
6706 (auto_load_expand_dir_vars): Return an std::vector of
6707 gdb::unique_xmalloc_ptr, adjust the code.
6708 (auto_load_safe_path_vec_update): Adjust.
6709 (filename_is_in_auto_load_safe_path_vec): Adjust.
6710 (auto_load_objfile_script_1): Adjust.
6711 * build-id.c (build_id_to_debug_bfd): Adjust.
6712 * linux-thread-db.c (thread_db_load_search): Adjust.
6713 * source.c (add_path): Adjust.
6714 (openp): Adjust.
6715 * symfile.c (find_separate_debug_file): Adjust.
6716 * utils.c (do_free_char_ptr_vec): Remove.
6717 (make_cleanup_free_char_ptr_vec): Remove.
6718
6719 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6720
6721 PR gdb/22907
6722 * common/pathstuff.c: Conditionally include "<windows.h>".
6723
6724 2018-03-01 Georg Sauthoff <mail@georg.so>
6725
6726 PR gdb/22888
6727 * gcore.in: Quote variables and switch interpreter to bash.
6728
6729 2018-03-01 Tom Tromey <tom@tromey.com>
6730
6731 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6732 assertion. Add assertion for discriminant_index.
6733 (quirk_rust_enum): Use correct base type name in univariant case.
6734
6735 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6736
6737 * record.c (get_call_history_modifiers): Return a
6738 record_print_flags.
6739 (cmd_record_call_history): Adjust.
6740 * record-btrace.c (record_btrace_call_history): Adjust.
6741 (record_btrace_call_history_range): Adjust.
6742 (record_btrace_call_history_from): Adjust.
6743 * target-debug.h (target_debug_print_record_print_flags): New.
6744 * target-delegates.c: Re-generate.
6745 * target.c (target_call_history): Change flags type.
6746 (target_call_history_from): Likewise.
6747 (target_call_history_range): Likewise.
6748 * target.h (struct target_ops) <target_call_history>: Likewise.
6749 (target_call_history_from): Likewise.
6750 (target_call_history_range): Likewise.
6751
6752 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6753 Simon Marchi <simon.marchi@polymtl.ca>
6754
6755 * common/common-utils.c: Include "sys/stat.h".
6756 (is_regular_file): Move here from "source.c"; change return
6757 type to "bool".
6758 * common/common-utils.h (is_regular_file): New prototype.
6759 * common/pathstuff.c (contains_dir_separator): New function.
6760 * common/pathstuff.h (contains_dir_separator): New prototype.
6761 * source.c: Don't include "sys/stat.h".
6762 (is_regular_file): Move to "common/common-utils.c".
6763
6764 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6765
6766 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6767 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6768 * auto-load.c: Include "common/pathstuff.h".
6769 * common/common-def.h (current_directory): Move here.
6770 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6771 function.
6772 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6773 prototype.
6774 * common/pathstuff.c: New file.
6775 * common/pathstuff.h: New file.
6776 * compile/compile.c: Include "common/pathstuff.h".
6777 * defs.h (current_directory): Move to "common/common-defs.h".
6778 * dwarf2read.c: Include "common/pathstuff.h".
6779 * exec.c: Likewise.
6780 * guile/scm-safe-call.c: Likewise.
6781 * linux-thread-db.c: Likewise.
6782 * main.c: Likewise.
6783 * nto-tdep.c: Likewise.
6784 * objfiles.c: Likewise.
6785 * source.c: Likewise.
6786 * symtab.c: Likewise.
6787 * utils.c: Include "common/pathstuff.h".
6788 (gdb_realpath): Move to "common/pathstuff.c".
6789 (gdb_realpath_keepfile): Likewise.
6790 (gdb_abspath): Likewise.
6791 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6792 (gdb_realpath_keepfile): Likewise.
6793 (gdb_abspath): Likewise.
6794
6795 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6796
6797 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6798 wildcard process pid for super_resume for kernels with a
6799 specific bug.
6800
6801 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6802
6803 * compile/compile.c (get_args): Add additional comments
6804 explaining function.
6805
6806 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6807 Tom Tromey <tom@tromey.com>
6808
6809 * target.h (memory_write_request_s): Remove typedef. Don't define
6810 VEC.
6811 (target_write_memory_blocks): Change argument to std::vector.
6812 (struct memory_write_request): Add constructor.
6813 * target-memory.c (compare_block_starting_address): Return bool.
6814 Change argument types.
6815 (claim_memory): Change arguments to use std::vector.
6816 (split_regular_and_flash_blocks, blocks_to_erase)
6817 (compute_garbled_blocks): Likewise.
6818 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6819 (target_write_memory_blocks): Change argument to std::vector.
6820 * symfile.c (struct load_section_data): Add constructor and
6821 destructor. Use std::vector for "requests".
6822 (struct load_progress_data): Add initializers.
6823 (load_section_callback): Update. Use "new".
6824 (clear_memory_write_data): Remove.
6825 (generic_load): Update.
6826
6827 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6828
6829 * arch/aarch64.h: Use common/tdesc.h.
6830
6831 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6832
6833 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6834 architecture with a 64-bit ABI.
6835
6836 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6837
6838 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6839 ahead of target description loading.
6840
6841 2018-02-26 Tom Tromey <tom@tromey.com>
6842
6843 * stack.c (backtrace_command_1): Update.
6844 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6845 of "flags".
6846 * python/py-framefilter.c (py_print_frame)
6847 (gdbpy_apply_frame_filter): Change type of "flags".
6848 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6849 of "flags".
6850 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6851 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6852 * extension.h (enum frame_filter_flag): Rename from
6853 frame_filter_flags.
6854 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6855 (apply_ext_lang_frame_filter): Change type of "flags".
6856 * extension.c (apply_ext_lang_frame_filter): Change type of
6857 "flags".
6858 * extension-priv.h (struct extension_language_ops)
6859 <apply_frame_filter>: Change type of "flags".
6860
6861 2018-02-26 Tom Tromey <tom@tromey.com>
6862
6863 PR python/16497:
6864 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
6865 off-by-one in py_end computation.
6866 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6867 PRINT_MORE_FRAMES.
6868 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6869 constant.
6870
6871 2018-02-26 Tom Tromey <tom@tromey.com>
6872
6873 * dwarf2read.c (struct variant_field): New.
6874 (struct nextfield) <variant>: New field.
6875 (dwarf2_add_field): Handle DW_TAG_variant_part.
6876 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6877 discriminated union.
6878 (read_structure_type): Handle DW_TAG_variant_part.
6879 (handle_struct_member_die): New function, extracted from
6880 process_structure_scope. Handle DW_TAG_variant.
6881 (process_structure_scope): Handle discriminated unions. Call
6882 handle_struct_member_die.
6883
6884 2018-02-26 Tom Tromey <tom@tromey.com>
6885
6886 * rust-lang.h (rust_last_path_segment): Declare.
6887 * rust-lang.c (rust_last_path_segment): Now public. Change
6888 contract.
6889 (struct disr_info): Remove.
6890 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6891 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6892 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6893 (rust_enum_p, rust_enum_variant): New function.
6894 (rust_underscore_fields): Remove "offset" parameter.
6895 (rust_print_enum): New function.
6896 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6897 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6898 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6899 enums.
6900 (rust_internal_print_type): New function, from rust_print_type.
6901 Remove enum code.
6902 (rust_print_type): Call rust_internal_print_type.
6903 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6904 Update enum handling.
6905 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6906 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6907 (rust_union_quirks): New functions.
6908 (process_full_comp_unit, process_full_type_unit): Call
6909 rust_union_quirks.
6910 (process_structure_scope): Update rust_unions if necessary.
6911
6912 2018-02-26 Tom Tromey <tom@tromey.com>
6913
6914 * value.h (value_union_variant): Declare.
6915 * valops.c (value_union_variant): New function.
6916 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6917 (struct discriminant_info): New.
6918 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6919 enumerator.
6920 (struct main_type) <flag_discriminated_union>: New field.
6921
6922 2018-02-26 Tom Tromey <tom@tromey.com>
6923
6924 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6925 unittests/unpack-selftests.c.
6926 * unittests/unpack-selftests.c: New file.
6927 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6928
6929 2018-02-26 Yao Qi <yao.qi@linaro.org>
6930
6931 * dwarf2read.c (struct partial_die_info) <read>: New method.
6932 (read_partial_die): Remove the declaration.
6933 (load_partial_dies): Update.
6934 (partial_die_info::partial_die_info):
6935 (read_partial_die): Change it to partial_die_info::read.
6936
6937 2018-02-26 Yao Qi <yao.qi@linaro.org>
6938
6939 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6940 (fixup_partial_die): Remove declaration.
6941 (scan_partial_symbols): Update.
6942 (partial_die_parent_scope): Likewise.
6943 (partial_die_full_name): Likewise.
6944 (fixup_partial_die): Change it to partial_die_info::fixup.
6945
6946 2018-02-26 Yao Qi <yao.qi@linaro.org>
6947
6948 * dwarf2read.c (read_partial_die): Update the declaration.
6949 (load_partial_dies): Caller update.
6950 (read_partial_die): Remove one argument abbrev_len.
6951
6952 2018-02-26 Yao Qi <yao.qi@linaro.org>
6953
6954 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6955 assignment operator.
6956 (load_partial_dies): Use ctor and copy ctor.
6957 (read_partial_die): Update.
6958 (dwarf2_cu::find_partial_die): Use ctor.
6959
6960 2018-02-26 Yao Qi <yao.qi@linaro.org>
6961
6962 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6963 (find_partial_die_in_comp_unit): Change it to
6964 dwarf2_cu::find_partial_die.
6965 (find_partial_die): Update.
6966
6967 2018-02-26 Yao Qi <yao.qi@linaro.org>
6968
6969 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6970 is NULL.
6971
6972 2018-02-26 Yao Qi <yao.qi@linaro.org>
6973
6974 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6975
6976 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6977
6978 * arch/amd64.h: Use common/tdesc.h.
6979 * arch/i386.c: Likewise.
6980 * arch/i386.h: Likewise.
6981 * arch/tic6x.c: Likewise.
6982 * arch/tdesc.h: Move file from here...
6983 * common/tdesc.h: ...to here.
6984 * features/aarch64-core.c: Regenerate.
6985 * features/aarch64-fpu.c: Regenerate.
6986 * features/i386/32bit-avx.c: Regenerate.
6987 * features/i386/32bit-avx512.c: Regenerate.
6988 * features/i386/32bit-core.c: Regenerate.
6989 * features/i386/32bit-linux.c: Regenerate.
6990 * features/i386/32bit-mpx.c: Regenerate.
6991 * features/i386/32bit-pkeys.c: Regenerate.
6992 * features/i386/32bit-sse.c: Regenerate.
6993 * features/i386/64bit-avx.c: Regenerate.
6994 * features/i386/64bit-avx512.c: Regenerate.
6995 * features/i386/64bit-core.c: Regenerate.
6996 * features/i386/64bit-linux.c: Regenerate.
6997 * features/i386/64bit-mpx.c: Regenerate.
6998 * features/i386/64bit-pkeys.c: Regenerate.
6999 * features/i386/64bit-segments.c: Regenerate.
7000 * features/i386/64bit-sse.c: Regenerate.
7001 * features/i386/x32-core.c: Regenerate.
7002 * features/tic6x-c6xp.c: Regenerate.
7003 * features/tic6x-core.c: Regenerate.
7004 * features/tic6x-gp.c: Regenerate.
7005 * target-descriptions.c: Use common/tdesc.h.
7006 * target-descriptions.h: Likewise.
7007
7008 2018-02-24 Tom Tromey <tom@tromey.com>
7009
7010 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7011 (try_thread_db_load_from_dir, thread_db_load_search): Use
7012 std::string.
7013 (info_auto_load_libthread_db_compare): Return bool. Change
7014 argument types.
7015 (info_auto_load_libthread_db): Use std::vector, std::string.
7016 Remove cleanups.
7017
7018 2018-02-24 Tom Tromey <tom@tromey.com>
7019
7020 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7021 std::string.
7022 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7023 std::string*.
7024 * gdbarch.c: Rebuild.
7025 * gdbarch.h: Rebuild.
7026 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7027 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7028 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7029 std::string*.
7030
7031 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7032
7033 * gdbtypes.h (sect_offset): Change type to uint64_t.
7034 (sect_offset_str): New function.
7035 * dwarf2read.c (create_addrmap_from_aranges): Use
7036 sect_offset_str.
7037 (error_check_comp_unit_head): Likewise.
7038 (create_debug_type_hash_table): Likewise.
7039 (read_cutu_die_from_dwo): Likewise.
7040 (init_cutu_and_read_dies): Likewise.
7041 (init_cutu_and_read_dies_no_follow): Likewise.
7042 (process_psymtab_comp_unit_reader): Likewise.
7043 (partial_die_parent_scope): Likewise.
7044 (peek_die_abbrev): Likewise.
7045 (process_queue): Likewise.
7046 (dwarf2_physname): Likewise.
7047 (read_namespace_alias): Likewise.
7048 (read_import_statement): Likewise.
7049 (create_dwo_cu_reader): Likewise.
7050 (create_cus_hash_table): Likewise.
7051 (lookup_dwo_cutu): Likewise.
7052 (inherit_abstract_dies): Likewise.
7053 (read_func_scope): Likewise.
7054 (read_call_site_scope): Likewise.
7055 (dwarf2_add_member_fn): Likewise.
7056 (read_common_block): Likewise.
7057 (read_module_type): Likewise.
7058 (read_typedef): Likewise.
7059 (read_subrange_type): Likewise.
7060 (load_partial_dies): Likewise.
7061 (read_partial_die): Likewise.
7062 (find_partial_die): Likewise.
7063 (read_str_index): Likewise.
7064 (dwarf2_string_attr): Likewise.
7065 (build_error_marker_type): Likewise.
7066 (lookup_die_type): Likewise.
7067 (dump_die_shallow): Likewise.
7068 (follow_die_ref): Likewise.
7069 (dwarf2_fetch_die_loc_sect_off): Likewise.
7070 (dwarf2_fetch_constant_bytes): Likewise.
7071 (follow_die_sig): Likewise.
7072 (get_signatured_type): Likewise.
7073 (get_DW_AT_signature_type): Likewise.
7074 (dwarf2_find_containing_comp_unit): Likewise.
7075 (set_die_type): Likewise.
7076
7077 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7078
7079 * arch/aarch64.c: Include "common-defs.h".
7080 * arch/amd64.c: Likewise.
7081 * arch/i386.c: Likewise.
7082
7083 2018-02-21 Tom Tromey <tom@tromey.com>
7084
7085 * value.h: (extract_field_op): Update.
7086 * eval.c (extract_field_op): Return a const char *.
7087 * expression.h (parse_expression_for_completion): Update.
7088 * completer.c (complete_expression): Update.
7089 (add_struct_fields): Make fieldname const.
7090 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7091 (mark_completion_tag, parse_exp_in_context_1): Update.
7092 (parse_expression_for_completion): Change "name" to
7093 unique_xmalloc_ptr*.
7094
7095 2018-02-21 Tom Tromey <tom@tromey.com>
7096
7097 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7098
7099 2018-02-21 Yao Qi <yao.qi@linaro.org>
7100
7101 * avr-tdep.c (avr_read_pc): Change parameter type to
7102 readable_regcache.
7103 * gdbarch.sh (read_pc): Likewise.
7104 * gdbarch.c: Re-generated.
7105 * gdbarch.h: Re-generated.
7106 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7107 readable_regcache.
7108 * ia64-tdep.c (ia64_read_pc): Likewise.
7109 * mips-tdep.c (mips_read_pc): Likewise.
7110 * spu-tdep.c (spu_read_pc): Likewise.
7111
7112 2018-02-21 Yao Qi <yao.qi@linaro.org>
7113
7114 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7115 * regcache-dump.c: New file.
7116 * regcache.c: Move register_dump to regcache-dump.c.
7117 (maintenance_print_registers): Likewise.
7118 (maintenance_print_raw_registers): Likewise.
7119 (maintenance_print_cooked_registers): Likewise.
7120 (maintenance_print_register_groups): Likewise.
7121 (maintenance_print_remote_registers): Likewise.
7122 (_initialize_regcache): Likewise.
7123 * regcache.h (register_dump): Moved from regcache.c.
7124
7125 2018-02-21 Yao Qi <yao.qi@linaro.org>
7126
7127 * regcache.c (regcache::regcache): Update.
7128 (regcache::invalidate): Move it to detached_regcache::invalidate.
7129 (get_thread_arch_aspace_regcache): Update.
7130 (regcache::raw_update): Update.
7131 (regcache::cooked_read): Remove some code.
7132 (regcache::cooked_read_value): Likewise.
7133 (regcache::raw_write): Remove assert on m_readonly_p.
7134 (regcache::raw_supply_integer): Move it to
7135 detached_regcache::raw_supply_integer.
7136 (regcache::raw_supply_zeroed): Likewise.
7137 * regcache.h (detached_regcache) <raw_supply_integer>: New
7138 declaration.
7139 <raw_supply_zeroed, invalidate>: Likewise.
7140 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7141 <invalidate>: Likewise.
7142 <m_readonly_p>: Removed.
7143
7144 2018-02-21 Yao Qi <yao.qi@linaro.org>
7145
7146 * infcmd.c (get_return_value): Let stop_regs point to
7147 get_current_regcache.
7148 * regcache.c (regcache::regcache): Remove.
7149 (register_dump_reg_buffer): New class.
7150 (regcache_print): Adjust.
7151 * regcache.h (regcache): Remove constructors.
7152
7153 2018-02-21 Yao Qi <yao.qi@linaro.org>
7154
7155 * regcache.c (class register_dump): New class.
7156 (register_dump_regcache, register_dump_none): New class.
7157 (register_dump_remote, register_dump_groups): New class.
7158 (regcache_print): Update.
7159 * regcache.h (regcache_dump_what): Move it to regcache.c.
7160 (regcache) <dump>: Remove.
7161
7162 2018-02-21 Yao Qi <yao.qi@linaro.org>
7163
7164 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7165 reg_buffer_rw *.
7166 (jit_unwind_reg_set_impl): Call raw_supply.
7167 (jit_frame_sniffer): Use reg_buffer_rw.
7168 * record-full.c (record_full_core_regbuf): Change its type.
7169 (record_full_core_open_1): Use reg_buffer_rw.
7170 (record_full_close): Likewise.
7171 (record_full_core_fetch_registers): Use regcache->raw_supply.
7172 (record_full_core_store_registers): Likewise.
7173 * regcache.c (regcache::get_register_status): Move it to
7174 reg_buffer.
7175 (regcache_raw_set_cached_value): Remove.
7176 (regcache::raw_set_cached_value): Remove.
7177 (regcache::raw_write): Call raw_supply.
7178 (regcache::raw_supply): Move it to reg_buffer_rw.
7179 * regcache.h (regcache_raw_set_cached_value): Remove.
7180 (reg_buffer_rw): New class.
7181
7182 2018-02-21 Yao Qi <yao.qi@linaro.org>
7183
7184 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7185 readonly_detached_regcache.
7186 (dummy_frame_prev_register): Use regcache->cooked_read.
7187 * frame.c (frame_save_as_regcache): Change return type.
7188 (frame_pop): Update.
7189 * frame.h (frame_save_as_regcache): Update declaration.
7190 * inferior.h (get_infcall_suspend_state_regcache): Update
7191 declaration.
7192 * infrun.c (infcall_suspend_state) <registers>: use
7193 readonly_detached_regcache.
7194 (save_infcall_suspend_state): Don't use regcache_dup.
7195 (get_infcall_suspend_state_regcache): Change return type.
7196 * linux-fork.c (struct fork_info) <savedregs>: Change to
7197 readonly_detached_regcache.
7198 <pc>: New field.
7199 (fork_save_infrun_state): Don't use regcache_dup.
7200 (info_checkpoints_command): Adjust.
7201 * mi/mi-main.c (register_changed_p): Update declaration.
7202 (mi_cmd_data_list_changed_registers): Use
7203 readonly_detached_regcache.
7204 (register_changed_p): Change parameter type to
7205 readonly_detached_regcache.
7206 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7207 readonly_detached_regcache.
7208 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7209 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7210 New.
7211 (regcache::save): Move it to reg_buffer.
7212 (regcache::restore): Change parameter type.
7213 (regcache_dup): Remove.
7214 * regcache.h (reg_buffer) <save>: New method.
7215 (readonly_detached_regcache): New class.
7216 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7217 readonly_detached_regcache.
7218 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7219
7220 2018-02-21 Yao Qi <yao.qi@linaro.org>
7221
7222 * frame.c (frame_save_as_regcache): Use regcache method save.
7223 (frame_pop): Use regcache method restore.
7224 * infrun.c (restore_infcall_suspend_state): Likewise.
7225 * linux-fork.c (fork_load_infrun_state): Likewise.
7226 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7227 save.
7228 * regcache.c (regcache_save): Remove.
7229 (regcache::restore): More asserts.
7230 (regcache_cpy): Remove.
7231 * regcache.h (regcache_save): Remove the declaration.
7232 (regcache::restore): Move from private to public.
7233 Remove the friend declaration of regcache_cpy.
7234 (regcache_cpy): Remove declaration.
7235
7236 2018-02-21 Yao Qi <yao.qi@linaro.org>
7237
7238 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7239 parameter type to 'readable_regcache *'.
7240 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7241 * arm-tdep.c (arm_neon_quad_read): Likewise.
7242 (arm_pseudo_read): Likewise.
7243 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7244 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7245 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7246 * gdbarch.c: Re-generated.
7247 * gdbarch.h: Re-generated.
7248 * gdbarch.sh (pseudo_register_read): Change parameter type to
7249 'readable_regcache *'.
7250 (pseudo_register_read_value): Likewise.
7251 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7252 (h8300_pseudo_register_read): Likewise.
7253 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7254 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7255 (i386_pseudo_register_read_into_value): Likewise.
7256 (i386_pseudo_register_read_value): Likewise.
7257 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7258 declaration.
7259 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7260 * m32c-tdep.c (m32c_raw_read): Likewise.
7261 (m32c_read_flg): Likewise.
7262 (m32c_banked_register): Likewise.
7263 (m32c_banked_read): Likewise.
7264 (m32c_sb_read): Likewise.
7265 (m32c_part_read): Likewise.
7266 (m32c_cat_read): Likewise.
7267 (m32c_r3r2r1r0_read): Likewise.
7268 (m32c_pseudo_register_read): Likewise.
7269 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7270 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7271 (mep_pseudo_cr64_read): Likewise.
7272 (mep_pseudo_register_read): Likewise.
7273 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7274 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7275 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7276 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7277 (regcache::cooked_read): Likewise.
7278 (regcache::cooked_read_value): Likewise.
7279 (regcache_cooked_read_signed):
7280 (regcache::cooked_read): Likewise.
7281 * regcache.h (readable_regcache): New class.
7282 (regcache): Inherit readable_regcache. Move some methods to
7283 readable_regcache.
7284 * rl78-tdep.c (rl78_pseudo_register_read): Change
7285 parameter type to 'readable_regcache *'.
7286 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7287 (e500_pseudo_register_read): Change parameter type to
7288 'readable_regcache *'.
7289 (dfp_pseudo_register_read): Likewise.
7290 (vsx_pseudo_register_read): Likewise.
7291 (efpr_pseudo_register_read): Likewise.
7292 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7293 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7294 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7295 (sh64_pseudo_register_read): Likewise.
7296 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7297 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7298 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7299 (spu_pseudo_register_read): Likewise.
7300 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7301 (xtensa_pseudo_register_read): Likewise.
7302
7303 2018-02-21 Yao Qi <yao.qi@linaro.org>
7304
7305 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7306 (regcache::arch): Move it to reg_buffer::arch.
7307 (regcache::register_buffer): Likewise.
7308 (regcache::assert_regnum): Likewise.
7309 (regcache::num_raw_registers): Likewise.
7310 * regcache.h (reg_buffer): New class.
7311 (regcache): Inherit reg_buffer.
7312
7313 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7314
7315 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7316 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7317
7318 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7319
7320 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7321
7322 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7323
7324 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7325 (SFILES): Remove common/*.c files.
7326 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7327 * common/common.host: Add common reference.
7328 * configure.ac: Likewise.
7329 * configure: Regenerate.
7330
7331 2018-02-16 Yao Qi <yao.qi@linaro.org>
7332
7333 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7334 (block_initialize_namespace): Use new.
7335 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7336 (dwarf2_free_objfile): Use delete.
7337 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7338 (copy_type_recursive): Use new.
7339 * gdb_obstack.h (allocate_on_obstack): New.
7340
7341 2018-02-15 Yao Qi <yao.qi@linaro.org>
7342
7343 PR gdb/22849
7344 * inferior.c (exit_inferior_1): Reset inf->control.
7345
7346 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7347
7348 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7349 declaration.
7350
7351 2018-02-14 Pedro Alves <palves@redhat.com>
7352
7353 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7354 frame_cleanup_after_sniffer on exception.
7355
7356 2018-02-14 Tom Tromey <tom@tromey.com>
7357
7358 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7359 const.
7360 (solib_bfd_open): Make pathname const.
7361 * solib.c (solib_bfd_open): Make pathname const.
7362 * solib-spu.c (spu_bfd_fopen): Make name const.
7363 (spu_bfd_open): Make pathname const.
7364 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7365 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7366
7367 2018-02-14 Tom Tromey <tom@tromey.com>
7368
7369 * symfile.c (symfile_bfd_open): Update.
7370 * source.h (openp, source_full_path_of, find_and_open_source):
7371 Change argument type to unique_xmalloc_ptr.
7372 * source.c (openp): Take a unique_xmalloc_ptr.
7373 (source_full_path_of, find_and_open_source): Likewise.
7374 (open_source_file, symtab_to_fullname): Update.
7375 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7376 unique_xmalloc_ptr.
7377 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7378 (exec_file_find): Update.
7379 * psymtab.c (psymtab_to_fullname): Update.
7380 * nto-tdep.h (nto_find_and_open_solib): Update.
7381 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7382 unique_xmalloc_ptr.
7383 * exec.c (exec_file_attach): Update.
7384 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7385 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7386
7387 2018-02-14 Tom Tromey <tom@tromey.com>
7388
7389 * solib.c: Include source.h.
7390 * nto-tdep.c: Include source.h.
7391 * mi/mi-cmd-env.c: Include source.h.
7392 * infcmd.c: Include source.h.
7393 * exec.c: Include source.h.
7394 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7395 (add_path, directory_switch, source_path, init_source_path): Move
7396 declarations...
7397 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7398 (add_path, directory_switch, source_path, init_source_path):
7399 ...here.
7400
7401 2018-02-14 Tom Tromey <tom@tromey.com>
7402
7403 * solist.h (exec_file_find, solib_find): Return
7404 unique_xmalloc_ptr.
7405 (solib_bfd_fopen): Take a const char *.
7406 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7407 (exec_file_find, solib_find): Likewise.
7408 (solib_bfd_fopen): Do not take ownership of "pathname".
7409 (solib_bfd_open): Use unique_xmalloc_ptr.
7410 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7411 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7412 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7413 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7414
7415 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7416
7417 * ada-lang.c (name_match_type_from_name): Remove reference to
7418 ada_name_for_lookup in function's documentation.
7419 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7420
7421 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7422
7423 * defs.h (enum openp_flags): New enum.
7424 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7425 Move to enum openp_flags.
7426 (openp_flags): New enum flags.
7427 (openp): Change parameter type to openp_flags.
7428 * source.c (openp): Change parameter type to openp_flags.
7429 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7430 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7431
7432 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7433
7434 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7435 per-command.
7436
7437 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7438
7439 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7440 into...
7441 (class dwarf2_queue_guard): ...the destructor of this new class.
7442 (dw2_do_instantiate_symtab): Create instance of the new class
7443 dwarf2_queue_guard, remove cleanup.
7444
7445 2018-02-09 Tom Tromey <tom@tromey.com>
7446
7447 * source.c (find_source_lines): Don't reference past the end of
7448 the vector.
7449
7450 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7451
7452 * remote.c (remote_btrace_maybe_reopen): Change error message.
7453 * btrace.c (btrace_enable): Likewise.
7454 (parse_xml_btrace): Likewise.
7455 (parse_xml_btrace_conf): Likewise.
7456
7457 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7458
7459 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7460 (linux_enable_pt, linux_enable_bts): Call
7461 diagnose_perf_event_open_fail.
7462
7463 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7464
7465 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7466 Remove parameter and change return type. Update callers. Move it.
7467 (linux_enable_bts, linux_enable_pt): Improve error message.
7468 (linux_enable_pt): Remove zero buffer size check.
7469 (linux_enable_btrace): Improve error messages. Remove NULL return
7470 check.
7471
7472 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7473
7474 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7475 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7476 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7477 (linux_supports_pt, linux_supports_btrace): Remove.
7478 (linux_enable_bts): Call cpu_supports_bts.
7479 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7480 * remote.c (remote_supports_btrace): Remove.
7481 (init_remote_ops): Remove remote_supports_btrace.
7482 * target-delegates.c: Regenerated.
7483 * target.c (target_supports_btrace): Remove.
7484 * target.h (target_ops) <to_supports_btrace>: Remove
7485 (target_supports_btrace): Remove.
7486 * x86-linux-nat.c (x86_linux_create_target): Remove
7487 linux_supports_btrace.
7488
7489 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7490
7491 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7492 btrace failed.
7493 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7494 exception and use message in own exception.
7495
7496 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7497
7498 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7499 (perf_event_pt_event_type): Use gdb_file_up.
7500 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7501 scoped_fd, and scoped_mmap.
7502
7503 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7504
7505 * common/scoped_mmap.h: New.
7506 * unittests/scoped_mmap-selftest.c: New.
7507 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7508 unittests/scoped_mmap-selftest.c.
7509
7510 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7511
7512 * common/scoped_fd.h: New.
7513 * unittests/scoped_fd-selftest.c: New.
7514 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7515 unittests/scoped_fd-selftest.c.
7516
7517 2018-02-09 Tom Tromey <tom@tromey.com>
7518
7519 * auto-load.c (auto_load_section_scripts): Use
7520 gdb::unique_xmalloc_ptr.
7521
7522 2018-02-09 Tom Tromey <tom@tromey.com>
7523
7524 * auto-load.c (execute_script_contents): Use std::string.
7525
7526 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7527
7528 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7529 Python function, rather than a new command.
7530
7531 2018-02-08 Tom Tromey <tom@tromey.com>
7532
7533 * solib.c (solib_find_1): Use std::string.
7534 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7535
7536 2018-02-08 Tom Tromey <tom@tromey.com>
7537
7538 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7539
7540 2018-02-08 Tom Tromey <tom@tromey.com>
7541
7542 * source.c (find_source_lines): Use gdb::def_vector.
7543
7544 2018-02-08 Tom Tromey <tom@tromey.com>
7545
7546 * macrocmd.c (struct temporary_macro_definition): New.
7547 (macro_define_command): Use temporary_macro_definition. Remove
7548 cleanups.
7549 (free_macro_definition_ptr): Remove.
7550
7551 2018-02-08 Tom Tromey <tom@tromey.com>
7552
7553 * macroexp.c (maybe_expand): Use std::string.
7554
7555 2018-02-08 Tom Tromey <tom@tromey.com>
7556
7557 * macroexp.c (struct macro_buffer): Add initializers for some
7558 members.
7559 (init_buffer, init_shared_buffer, free_buffer)
7560 (free_buffer_return_text): Remove.
7561 (macro_buffer): New constructors.
7562 (~macro_buffer): New destructor.
7563 (macro_buffer::set_shared): New method.
7564 (macro_buffer::resize_buffer, macro_buffer::appendc)
7565 (macro_buffer::appendmem): Now methods, not free functions.
7566 (set_token, append_tokens_without_splicing, stringify)
7567 (macro_stringify): Update.
7568 (gather_arguments): Change return type. Remove argc_p argument,
7569 add args_ptr argument. Use std::vector.
7570 (substitute_args): Remove argc argument. Accept std::vector.
7571 (expand): Update. Use std::vector.
7572 (scan, macro_expand, macro_expand_next): Update.
7573
7574 2018-02-08 Tom Tromey <tom@tromey.com>
7575
7576 * symtab.c (default_collect_symbol_completion_matches_break_on):
7577 Use unique_xmalloc_ptr.
7578 * macroscope.h: (sal_macro_scope, user_macro_scope)
7579 (default_macro_scope): Return unique_xmalloc_ptr.
7580 * macroscope.c (sal_macro_scope, user_macro_scope)
7581 (default_macro_scope): Return unique_xmalloc_ptr.
7582 * macroexp.h (macro_expand, macro_expand_once): Return
7583 unique_xmalloc_ptr.
7584 * macroexp.c (macro_expand, macro_expand_once): Return
7585 unique_xmalloc_ptr.
7586 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7587 (info_macro_command, info_macros_command): Use
7588 unique_xmalloc_ptr.
7589 * compile/compile-c-support.c (write_macro_definitions): Use
7590 unique_xmalloc_ptr.
7591 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7592
7593 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7594
7595 * value.c (value_static_field): Assign field type instead of
7596 containing type when returning an optimized out value.
7597
7598 2018-02-06 Yao Qi <yao.qi@linaro.org>
7599
7600 * ft32-tdep.c (ft32_read_pc): Remove.
7601 (ft32_write_pc): Remove.
7602 (ft32_gdbarch_init): Update.
7603 * m32r-tdep.c (m32r_read_pc): Remove.
7604 (m32r_gdbarch_init): Update.
7605 * mep-tdep.c (mep_read_pc): Remove.
7606 (mep_gdbarch_init): Update.
7607 * microblaze-tdep.c (microblaze_write_pc): Remove.
7608 (microblaze_gdbarch_init): Update.
7609 * mn10300-tdep.c (mn10300_read_pc): Remove.
7610 (mn10300_write_pc): Remove.
7611 (mn10300_gdbarch_init): Update.
7612 * moxie-tdep.c (moxie_read_pc): Remove.
7613 (moxie_write_pc): Remove.
7614 (moxie_gdbarch_init): Update.
7615
7616 2018-02-06 Yao Qi <yao.qi@linaro.org>
7617
7618 * expprint.c (print_subexp_standard): Handle
7619 OP_F77_UNDETERMINED_ARGLIST.
7620 (dump_subexp_body_standard): Likewise.
7621
7622 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7623
7624 * target-descriptions.c (tdesc_element_visitor) Add empty
7625 implementations.
7626 (tdesc_type): Move make_gdb_type from here.
7627 (tdesc_type_builtin): Likewise.
7628 (tdesc_type_vector): Likewise.
7629 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7630 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7631 (make_gdb_type_union): Likewise.
7632 (make_gdb_type_flags): Likewise.
7633 (make_gdb_type_enum): Likewise.
7634 (make_gdb_type): New function.
7635 (tdesc_register_type): Use static make_gdb_type.
7636
7637 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7638
7639 * infcmd.c (default_print_one_register_info): Align natural-format
7640 column values consistently one under another.
7641 (pad_to_column): New function.
7642
7643 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7644
7645 * dwarf2read.c (dwarf2_physname): Move commment.
7646
7647 2018-02-01 Leszek Swirski <leszeks@google.com>
7648
7649 * varobj.c (varobj_formatted_print_options): Allow recursive
7650 pretty printing if pretty printing is enabled.
7651
7652 2018-02-01 Leszek Swirski <leszeks@google.com>
7653
7654 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7655 names after a structop as a filename.
7656
7657 2018-02-01 Yao Qi <yao.qi@linaro.org>
7658
7659 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7660 (arm_record_coproc_data_proc): Likewise.
7661
7662 2018-02-01 Yao Qi <yao.qi@linaro.org>
7663
7664 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7665
7666 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7667
7668 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7669 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7670
7671 2018-01-31 Pedro Alves <palves@redhat.com>
7672
7673 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7674 * inflow.c (child_terminal_save_inferior): Wrap reference to
7675 tcgetpgrp in HAVE_TERMIOS_H.
7676 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7677 _WIN32.
7678 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7679 always iterate over all inferiors.
7680 (gdbsim_cntrl_c): Adjust.
7681 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7682
7683 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7684
7685 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7686 index type is objfile-owned if the element type is as well.
7687
7688 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7689
7690 GDB 8.1 released.
7691
7692 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7693
7694 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7695 "features/s390x-linux64.c".
7696 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7697 s390_linux32 and s390x_linux64.
7698 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7699 default tdesc.
7700 * s390-tdep.c: Include "features/s390-linux32.c" and
7701 "features/s390x-linux64.c".
7702 (s390_tdesc_valid): Add check for tdesc_has_registers.
7703 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7704 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7705 tdesc_s390x_linux64.
7706 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7707 tdesc_s390x_linux64 to...
7708 * s390-tdep.h: ...here.
7709
7710 2018-01-30 Pedro Alves <palves@redhat.com>
7711
7712 PR gdb/13211
7713 * config.in, configure: Regenerate.
7714 * configure.ac: Check for getpgid.
7715 * go32-nat.c (go32_pass_ctrlc): New.
7716 (go32_target): Install it.
7717 * inf-child.c (inf_child_target): Install
7718 child_terminal_save_inferior, child_pass_ctrlc and
7719 child_interrupt.
7720 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7721 (inf_ptrace_target): No longer install it.
7722 * infcmd.c (interrupt_target_1): Adjust.
7723 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7724 (child_interrupt): Declare.
7725 (inferior::terminal_state): New.
7726 * inflow.c (struct terminal_info): Update comments.
7727 (inferior_process_group): Delete.
7728 (terminal_is_ours): Delete.
7729 (gdb_tty_state): New.
7730 (child_terminal_init): Adjust.
7731 (is_gdb_terminal, sharing_input_terminal_1)
7732 (sharing_input_terminal): New functions.
7733 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7734 Set the process's actual process group in the foreground if
7735 possible. Handle is_ours_for_output/is_ours distinction. Don't
7736 mark terminal as the inferior's if not sharing GDB's terminal.
7737 Don't check attach_flag.
7738 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7739 pass down a target_terminal_state.
7740 (child_terminal_save_inferior): New, factored out from ...
7741 (child_terminal_ours_1): ... this. Handle
7742 target_terminal_state::is_ours_for_output.
7743 (child_interrupt, child_pass_ctrlc): New.
7744 (inflow_inferior_exit): Clear the inferior's terminal_state.
7745 (copy_terminal_info): Copy the inferior's terminal state.
7746 (_initialize_inflow): Remove reference to terminal_is_ours.
7747 * inflow.h (inferior_process_group): Delete.
7748 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7749 * procfs.c (procfs_target): Don't install procfs_interrupt.
7750 (procfs_interrupt): Delete.
7751 * remote.c (remote_serial_quit_handler): Adjust.
7752 (remote_interrupt): Remove ptid parameter. Adjust.
7753 * target-delegates.c: Regenerate.
7754 * target.c: Include "terminal.h".
7755 (target_terminal::terminal_state): Rename to ...
7756 (target_terminal::m_terminal_state): ... this.
7757 (target_terminal::init): Adjust.
7758 (target_terminal::inferior): Adjust to per-inferior
7759 terminal_state.
7760 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7761 (target_terminal::ours, target_terminal::ours_for_output): Use
7762 target_terminal_is_ours_kind.
7763 (target_interrupt): Remove ptid parameter. Adjust.
7764 (default_target_pass_ctrlc): Adjust.
7765 * target.h (target_ops::to_terminal_save_inferior): New field.
7766 (target_ops::to_interrupt): Remove ptid_t parameter.
7767 (target_interrupt): Remove ptid_t parameter. Update comment.
7768 (target_pass_ctrlc): Update comment.
7769 * target/target.h (target_terminal_state): New scoped enum,
7770 factored out of ...
7771 (target_terminal::terminal_state): ... here.
7772 (target_terminal::inferior): Update comments.
7773 (target_terminal::restore_inferior): New.
7774 (target_terminal::is_inferior, target_terminal::is_ours)
7775 (target_terminal::is_ours_for_output): Adjust.
7776 (target_terminal::scoped_restore_terminal_state): Adjust to
7777 rename, and call restore_inferior() instead of inferior().
7778 (target_terminal::scoped_restore_terminal_state::m_state): Change
7779 type.
7780 (target_terminal::terminal_state): Rename to ...
7781 (target_terminal::m_terminal_state): ... this and change type.
7782
7783 2018-01-30 Pedro Alves <palves@redhat.com>
7784
7785 * linux-nat.c (wait_for_signal): New function.
7786 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7787 directly.
7788 (async_terminal_is_ours)
7789 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7790 (linux_nat_add_target): Don't override
7791 to_terminal_inferior/to_terminal_ours.
7792
7793 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7794
7795 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7796
7797 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7798
7799 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7800 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7801 dwarf2_per_objfile_free here.
7802 (dwarf2_per_objfile_free): Remove.
7803 (_initialize_dwarf2_read): Don't register
7804 dwarf2_per_objfile_free as a registry cleanup.
7805
7806 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7807
7808 Avoid compilation errors in MinGW native builds
7809
7810 The error is triggered by including python-internal.h, and the
7811 error message is:
7812
7813 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7814 from build-gnulib/import/math.h:27,
7815 from d:/usr/Python26/include/pyport.h:235,
7816 from d:/usr/Python26/include/Python.h:58,
7817 from python/python-internal.h:94,
7818 from python/py-arch.c:24:
7819 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7820 using ::hypot;
7821 ^~~~~
7822
7823 This happens because Python headers define 'hypot' to expand t
7824 '_hypot' in the Windows builds.
7825 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7826 'hypoth'. This avoids a compilation error.
7827
7828 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7829
7830 * MAINTAINERS (Write After Approval): Fix ordering.
7831
7832 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7833
7834 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7835
7836 2018-01-26 Alan Modra <amodra@gmail.com>
7837
7838 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7839 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7840 Remove nop. Make const. Comment.
7841 (powerpc32_plt_stub_so_2): New.
7842 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7843 Correct count. Update uses.
7844 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7845 Move common code reading PLT entry word. Correct
7846 powerpc32_plt_stub PLT address calculation.
7847 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7848 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7849 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7850 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7851 (ppc64_standard_linkage8): Likewise.
7852 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7853 Correct insns description.
7854 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7855
7856 2018-01-24 Pedro Alves <palves@redhat.com>
7857
7858 GCC PR libstdc++/83906
7859 * gdbtypes.c (operator==(const dynamic_prop &,
7860 const dynamic_prop &)): New.
7861 (operator==(const range_bounds &, const range_bounds &)): New.
7862 (check_types_equal): Use them instead of memcmp.
7863 * gdbtypes.h (operator==(const dynamic_prop &,
7864 const dynamic_prop &)): Declare.
7865 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7866 (operator==(const range_bounds &, const range_bounds &)): Declare.
7867 (operator!=(const range_bounds &, const range_bounds &)): Declare.
7868
7869 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7870
7871 * s390-linux-tdep.c (s390_record_address_mask)
7872 (s390_record_calc_disp_common, s390_record_calc_disp)
7873 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7874 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7875 (s390_process_record): Move to s390-tdep.c.
7876 (s390_linux_init_abi_any): Adjust.
7877 * s390-tdep.c (s390_record_address_mask)
7878 (s390_record_calc_disp_common, s390_record_calc_disp)
7879 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7880 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7881 (s390_process_record): Moved from s390-linux-tdep.c
7882 (s390_gdbarch_init): Adjust.
7883
7884 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7885
7886 * s390-linux-nat.c (s390-tdep.h): New include.
7887 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7888 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7889 (ALLDEPFILES): Add s390-tdep.c.
7890 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7891 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7892 * s390-tdep.h: ...this. New file.
7893 * s390-linux-tdep.c (s390-tdep.h): New include.
7894 (_initialize_s390_tdep): Rename to...
7895 (_initialize_s390_linux_tdep): ...this and adjust.
7896 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7897 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7898 s390-tdep.h.
7899 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7900 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7901 (s390_is_partial_instruction, s390_software_single_step)
7902 (is_non_branch_ril, s390_displaced_step_copy_insn)
7903 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7904 (s390_prologue_data, s390_addr, s390_store, s390_load)
7905 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7906 (s390_register_call_saved, s390_guess_tracepoint_registers)
7907 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7908 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7909 (s390_pseudo_register_name, s390_pseudo_register_type)
7910 (s390_pseudo_register_read, s390_pseudo_register_write)
7911 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7912 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7913 (s390_addr_bits_remove, s390_address_class_type_flags)
7914 (s390_address_class_type_flags_to_name)
7915 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7916 (s390_function_arg_float, s390_function_arg_vector)
7917 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7918 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7919 (s390_frame_align, s390_register_return_value, s390_return_value)
7920 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7921 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7922 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7923 (s390_trad_frame_prev_register, s390_unwind_cache)
7924 (s390_prologue_frame_unwind_cache)
7925 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7926 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7927 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7928 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7929 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7930 (s390_frame_base_address, s390_local_base_address)
7931 (s390_frame_base, s390_gcc_target_options)
7932 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7933 (s390_validate_reg_range, s390_tdesc_valid)
7934 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7935 * s390-tdep.c: ...this. New file.
7936
7937 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7938
7939 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7940 (s390_process_record, s390_gdbarch_tdep_alloc)
7941 (s390_linux_init_abi_any): Use/set new hook.
7942
7943 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7944
7945 * s390-linux-tdep.c (osabi.h): New include.
7946 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7947 (s390_linux_init_abi_any): New functions.
7948 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7949
7950 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7951
7952 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7953 tdesc_has_registers check
7954
7955 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7956
7957 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7958 (s390_validate_reg_range): New macro.
7959 (s390_gdbarch_init): Adjust.
7960
7961 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7962
7963 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7964 (s390_gdbarch_tdep_alloc): Adjust.
7965 (s390_gdbarch_init): Adjust.
7966
7967 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7968
7969 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7970 <have_tdb>: Change type to bool.
7971 (s390_gdbarch_tdep_alloc): Adjust.
7972 (s390_gdbarch_init): Adjust.
7973
7974 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7975
7976 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7977 (gdbarch_tdep) <have_upper, have_vx>: New fields.
7978 (s390_gdbarch_tdep_alloc): New function.
7979 (s390_gdbarch_init): Allocate tdep at start and use its fields
7980 instead of separate variables.
7981
7982 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7983
7984 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7985 when looking for cached gdbarch and add comment for remaining.
7986
7987 2018-01-22 Pedro Alves <palves@redhat.com>
7988 Sergio Durigan Junior <sergiodj@redhat.com>
7989
7990 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7991 case.
7992
7993 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7994
7995 * MAINTAINERS: Update my company e-mail address.
7996
7997 2018-01-22 Yao Qi <yao.qi@linaro.org>
7998
7999 * regcache.c (cooked_write_test): New function.
8000 (_initialize_regcache): Register the test.
8001
8002 2018-01-22 Yao Qi <yao.qi@linaro.org>
8003
8004 * ia64-tdep.c (ia64_pseudo_register_read): Call
8005 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8006 * m32c-tdep.c (m32c_cat_read): Likewise.
8007 (m32c_r3r2r1r0_read): Likewise.
8008 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8009 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8010
8011 2018-01-22 Yao Qi <yao.qi@linaro.org>
8012
8013 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8014 method raw_read instead of regcache_raw_read.
8015 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8016 * arm-tdep.c (arm_neon_quad_read): Likewise.
8017 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8018 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8019 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8020 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8021 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8022 (i386_pseudo_register_read_into_value): Likewise.
8023 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8024 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8025 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8026 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8027 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8028 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8029 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8030 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8031 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8032
8033 2018-01-22 Yao Qi <yao.qi@linaro.org>
8034
8035 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8036 * configure.tgt: Remove target mt.
8037 * mt-tdep.c: Remove.
8038 * regcache.c (cooked_read_test): Remove the check for mt.
8039
8040 2018-01-22 Yao Qi <yao.qi@linaro.org>
8041
8042 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8043 instead of gdbarch_pseudo_register_read_value.
8044
8045 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8046
8047 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8048 language is Ada.
8049
8050 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8051
8052 * linespec.c (create_sals_line_offset): Remove code that preserved
8053 the symtab_and_line's line number.
8054
8055 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8056
8057 * varobj.c (varobj_create): Don't set valid_block when creating a
8058 floating varobj.
8059
8060 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8061
8062 * varobj.c (varobj_create): Remove out of date comment.
8063
8064 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8065
8066 PR mi/20395
8067 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8068 updating innermost block.
8069 * parse.c (innermost_block_tracker::update): Take extra type
8070 parameter, and check types match before updating innermost block.
8071 (write_dollar_variable): Update innermost block for registers.
8072 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8073 (innermost_block_tracker::innermost_block_tracker): Initialise
8074 m_types member.
8075 (innermost_block_tracker::reset): Take type parameter.
8076 (innermost_block_tracker::update): Take type parameter, and pass
8077 type through as needed.
8078 (innermost_block_tracker::m_types): New member.
8079 * varobj.c (varobj_create): Pass type when reseting innermost
8080 block.
8081
8082 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8083
8084 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8085 * ada-lang.c (resolve_subexp): Likewise.
8086 * breakpoint.c (set_breakpoint_condition) Likewise.
8087 (watch_command_1) Likewise.
8088 * c-exp.y (variable): Likewise.
8089 * d-exp.y (PrimaryExpression): Likewise.
8090 * f-exp.y (variable): Likewise.
8091 * go-exp.y (variable): Likewise.
8092 * m2-exp.y (variable): Likewise.
8093 * objfiles.c (objfile::~objfile): Likewise.
8094 * p-exp.y (variable): Likewise.
8095 * parse.c (innermost_block): Change type.
8096 * parser-defs.h (class innermost_block_tracker): New.
8097 (innermost_block): Change to innermost_block_tracker.
8098 * printcmd.c (display_command): Switch to innermost_block API.
8099 (do_one_display): Likewise.
8100 * rust-exp.y (do_one_display): Likewise.
8101 * symfile.c (clear_symtab_users): Likewise.
8102 * varobj.c (varobj_create): Switch to innermost_block API, replace
8103 use of innermost_block with block stored on varobj object.
8104
8105 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8106
8107 * expression.h (innermost_block): Remove declaration.
8108 * varobj.c: Add 'parser-defs.h' include.
8109
8110 2018-01-19 Tom Tromey <tom@tromey.com>
8111
8112 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8113 symbols in the static and global blocks.
8114
8115 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8116
8117 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8118 gdb_ptrace.h, and move including gdb_wait.h ...
8119 * nat/linux-ptrace.h: ... to here.
8120
8121 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8122
8123 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8124 inf_ptrace_detach_success.
8125 (inf_ptrace_detach_success): Add inferior parameter, use it
8126 instead of inferior_ptid, pass it to detach_inferior.
8127 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8128 parameter.
8129 * inferior.c (detach_inferior): Add overload that takes an
8130 inferior object.
8131 * inferior.h (detach_inferior): Likewise.
8132 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8133 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8134 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8135
8136 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8137
8138 * target.h (struct target_ops) <to_detach>: Add inferior
8139 parameter.
8140 (target_detach): Likewise.
8141 * target.c (dispose_inferior): Pass inferior down.
8142 (target_detach): Pass inferior down. Assert that it is equal to
8143 the current inferior.
8144 * aix-thread.c (aix_thread_detach): Pass inferior down.
8145 * corefile.c (core_file_command): Pass current_inferior() down.
8146 * corelow.c (core_detach): Add inferior parameter.
8147 * darwin-nat.c (darwin_detach): Likewise.
8148 * gnu-nat.c (gnu_detach): Likewise.
8149 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8150 * infcmd.c (detach_command): Pass current_inferior() down to
8151 target_detach.
8152 * infrun.c (follow_fork_inferior): Pass parent_inf to
8153 target_detach.
8154 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8155 target_detach.
8156 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8157 * linux-thread-db.c (thread_db_detach): Likewise.
8158 * nto-procfs.c (procfs_detach): Likewise.
8159 * procfs.c (procfs_detach): Likewise.
8160 * record.c (record_detach): Likewise.
8161 * record.h (struct inferior): Forward-declare.
8162 (record_detach): Add inferior parameter.
8163 * remote-sim.c (gdbsim_detach): Likewise.
8164 * remote.c (remote_detach_1): Likewise.
8165 (remote_detach): Likewise.
8166 (extended_remote_detach): Likewise.
8167 * sol-thread.c (sol_thread_detach): Likewise.
8168 * target-debug.h (target_debug_print_inferior_p): New macro.
8169 * target-delegates.c: Re-generate.
8170 * top.c (kill_or_detach): Pass inferior down to target_detach.
8171 * windows-nat.c (windows_detach): Add inferior parameter.
8172
8173 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8174
8175 * target.h (struct target_ops) <to_detach>: Remove args
8176 parameter.
8177 (target_detach): Likewise.
8178 * target.c (dispose_inferior): Adjust.
8179 (target_detach): Remove args parameter, adjust.
8180 * aix-thread.c (aix_thread_detach): Adjust.
8181 * corefile.c (core_file_command): Adjust.
8182 * corelow.c (core_detach): Adjust.
8183 * darwin-nat.c (darwin_detach): Adjust.
8184 * gnu-nat.c (gnu_detach): Adjust.
8185 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8186 * infcmd.c (detach_command): Adjust
8187 * infrun.c (follow_fork_inferior): Adjust.
8188 (handle_vfork_child_exec_or_exit): Adjust.
8189 * linux-fork.c (linux_fork_detach): Remove args parameter.
8190 * linux-fork.h (linux_fork_detach): Likewise.
8191 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8192 * linux-thread-db.c (thread_db_detach): Likewise.
8193 * nto-procfs.c (procfs_detach): Likewise.
8194 * procfs.c (procfs_detach): Likewise.
8195 (do_detach): Remove signo parameter.
8196 * record.c (record_detach): Remove args parameter.
8197 * record.h (record_detach): Likewise.
8198 * remote-sim.c (gdbsim_detach): Likewise.
8199 * remote.c (remote_detach_1): Likewise.
8200 (remote_detach): Likewise.
8201 (extended_remote_detach): Likewise.
8202 * sol-thread.c (sol_thread_detach): Likewise.
8203 * target-delegates.c: Re-generate.
8204 * top.c (struct qt_args) <args>: Remove field.
8205 (kill_or_detach): Don't pass args.
8206 (quit_force): Don't set args.
8207 * windows-nat.c (windows_detach): Remove args parameter.
8208
8209 2018-01-19 Yao Qi <yao.qi@linaro.org>
8210
8211 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8212 (arm_linux_init_abi): Install it.
8213
8214 2018-01-19 Yao Qi <yao.qi@linaro.org>
8215
8216 * osabi.c (gdb_osabi_names): Extend the regexp for
8217 arm-linux-gnueabihf.
8218
8219 2018-01-18 Yao Qi <yao.qi@linaro.org>
8220
8221 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8222 m_abbrevs.
8223 (abbrev_table::add_abbrev): Update.
8224 (abbrev_table::lookup_abbrev): Update.
8225
8226 2018-01-18 Yao Qi <yao.qi@linaro.org>
8227
8228 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8229
8230 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8231
8232 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8233 to "std::string".
8234
8235 2018-01-17 Tom Tromey <tom@tromey.com>
8236
8237 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8238
8239 2018-01-17 Tom Tromey <tom@tromey.com>
8240
8241 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8242 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8243 (create_array_type_with_stride): Update.
8244 * dwarf2read.c (set_die_type): Update.
8245
8246 2018-01-17 Tom Tromey <tom@tromey.com>
8247
8248 * dwarf2read.c (delayed_method_info): Remove typedef.
8249 (dwarf2_cu::method_info): Now a std::vector.
8250 (add_to_method_list): Update.
8251 (free_delayed_list): Remove.
8252 (compute_delayed_physnames): Update.
8253 (process_full_comp_unit, process_full_type_unit): Clear the method
8254 list. Remove cleanups.
8255 (psymtab_include_file_name): Add name_holder parameter. Use
8256 unique_xmalloc_ptr.
8257 (dwarf_decode_lines): Update.
8258
8259 2018-01-17 Tom Tromey <tom@tromey.com>
8260 Simon Marchi <simon.marchi@ericsson.com>
8261
8262 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8263 (dwarf2_per_objfile::free_cached_comp_units)
8264 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8265 (init_cutu_and_read_dies_no_follow): Update.
8266 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8267 (dwarf2_cu::~dwarf2_cu): New.
8268 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8269 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8270
8271 2018-01-17 Tom Tromey <tom@tromey.com>
8272 Simon Marchi <simon.marchi@ericsson.com>
8273
8274 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8275 (struct die_reader_specs) <abbrev_table>: New member.
8276 (struct abbrev_table): Add constructor.
8277 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8278 <abbrev_obstack>: Now an auto_obstack.
8279 (abbrev_table_up): New typedef.
8280 (init_cu_die_reader): Add abbrev_table parameter.
8281 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8282 Add result_dwo_abbrev_table.
8283 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8284 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8285 Update.
8286 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8287 parameter.
8288 (skip_children): Update.
8289 (abbrev_table::alloc_abbrev): Rename from
8290 abbrev_table_alloc_abbrev.
8291 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8292 (abbrev_table::lookup_abbrev): Rename from
8293 abbrev_table_lookup_abbrev.
8294 (abbrev_table_read_table): Return abbrev_table_up.
8295 (abbrev_table_free, abbrev_table_free_cleanup)
8296 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8297 (load_partial_dies): Update.
8298
8299 2018-01-17 Tom Tromey <tom@tromey.com>
8300
8301 * dwarf2read.c (dwarf2_compute_name): Update comment.
8302 (read_func_scope, read_variable): Update.
8303 (new_symbol): Remove.
8304 (new_symbol_full): Rename to new_symbol.
8305
8306 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8307
8308 PR gdb/16577
8309 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8310 a warning instead of throwing an error, set section size to 0 and return
8311 NULL.
8312 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8313
8314 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8315
8316 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8317 std::string.
8318 (linux_ptrace_attach_fail_reason_string): Likewise.
8319 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8320 Likewise.
8321 (linux_ptrace_attach_fail_reason_string): Likewise.
8322 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8323
8324 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8325
8326 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8327
8328 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8329
8330 PR gdb/21559
8331 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8332 checking for fs_base/gs_base fields in struct user_regs_struct.
8333 * configure: Regenerate.
8334
8335 2018-01-17 Yao Qi <yao.qi@linaro.org>
8336
8337 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8338 function.
8339 (aarch64_linux_init_abi): Install it to gdbarch hook
8340 gcc_target_options.
8341
8342 2018-01-15 Pedro Alves <palves@redhat.com>
8343
8344 * common/signals-state-save-restore.c
8345 (save_original_signals_state): Fix typos.
8346
8347 2017-01-12 Tom Tromey <tom@tromey.com>
8348 Sergio Durigan Junior <sergiodj@redhat.com>
8349
8350 * Makefile.in (install-only): Install gdb-add-index.
8351
8352 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8353
8354 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8355
8356 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8357
8358 * infrun.c (keep_going_pass_signal): Clear step-over info when
8359 insert_breakpoints fails.
8360
8361 2018-01-11 Pedro Alves <palves@redhat.com>
8362
8363 PR gdb/22583
8364 * infrun.c (resume): Rename to ...
8365 (resume_1): ... this.
8366 (resume): Reimplement as wrapper around resume_1.
8367
8368 2018-01-11 Pedro Alves <palves@redhat.com>
8369
8370 PR remote/22597
8371 * remote.c (remote_parse_stop_reply): Default to the last-set
8372 general thread instead of to 'magic_null_ptid'.
8373
8374 2018-01-10 Pedro Alves <palves@redhat.com>
8375
8376 * language.h (language_get_symbol_name_matcher): Rename ...
8377 (get_symbol_name_matcher): ... this.
8378 * language.c (language_get_symbol_name_matcher): Ditto.
8379 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8380 callers adjusted.
8381
8382 2018-01-10 Pedro Alves <palves@redhat.com>
8383
8384 PR gdb/22670
8385 * dwarf2read.c
8386 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8387 Adjust to use language_get_symbol_name_matcher instead of
8388 language_defn::la_get_symbol_name_matcher.
8389 * language.c (language_get_symbol_name_matcher): If in Ada mode
8390 and the lookup name is a verbatim match, return Ada's matcher.
8391 * language.h (language_get_symbol_name_matcher): Adjust comment.
8392 (ada_lookup_name_info::verbatim_p):: New method.
8393
8394 2018-01-10 Pedro Alves <palves@redhat.com>
8395
8396 PR gdb/22670
8397 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8398 minsym's language is language_auto or language_cplus, pass down
8399 language_ada instead.
8400 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8401
8402 2018-01-10 Pedro Alves <palves@redhat.com>
8403
8404 PR gdb/22670
8405 * minsyms.c (linkage_name_str): New function.
8406 (iterate_over_minimal_symbols): Use it.
8407
8408 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8409
8410 * NEWS: Document that 'info proc' now works on FreeBSD.
8411
8412 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8413
8414 * configure.ac: Check for kinfo_getfile in libutil.
8415 * configure: Regenerate.
8416 * config.in: Regenerate.
8417 * fbsd-nat.c: Include "fbsd-tdep.h".
8418 (fbsd_fetch_cmdline): New.
8419 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8420 rather than calling error.
8421 (fbsd_info_proc): New.
8422 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8423 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8424 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8425
8426 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8427
8428 * fbsd-nat.c (struct free_deleter): Remove.
8429 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8430
8431 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8432
8433 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8434 NULL for an empty pathname.
8435
8436 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8437
8438 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8439 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8440 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8441 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8442 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8443 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8444 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8445 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8446 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8447 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8448 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8449 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8450 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8451 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8452 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8453
8454 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8455
8456 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8457 (gnu_xfer_auxv): New function.
8458 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8459 TARGET_OBJECT_AUXV.
8460
8461 2018-01-08 Yao Qi <yao.qi@linaro.org>
8462 Simon Marchi <simon.marchi@ericsson.com>
8463
8464 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8465 common/selftest.c.
8466 (COMMON_OBS): Remove selftest.o.
8467 * configure.ac: Append selftest-arch.c and common/selftest.c to
8468 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8469 * configure: Re-generated.
8470 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8471 GDB_SELF_TEST.
8472 (maintenance_info_selftests): Likewise.
8473
8474 2018-01-08 Xavier Roirand <roirand@adacore.com>
8475
8476 * ada-valprint.c (val_print_packed_array_elements): Use
8477 proper number of elements when printing an array indexed
8478 by an enumeration type.
8479
8480 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8481
8482 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8483 (dw2_get_file_names_reader): Adjust.
8484 (lookup_dwo_signatured_type): Adjust.
8485 (lookup_dwp_signatured_type): Adjust.
8486 (lookup_signatured_type): Adjust.
8487 (create_type_unit_group): Adjust.
8488 (get_type_unit_group): Adjust.
8489 (process_psymtab_comp_unit_reader): Adjust.
8490 (build_type_psymtabs_reader): Adjust.
8491 (scan_partial_symbols): Adjust.
8492 (add_partial_symbol): Adjust.
8493 (add_partial_subprogram): Adjust.
8494 (peek_die_abbrev): Adjust.
8495 (fixup_go_packaging): Adjust.
8496 (process_imported_unit_die): Adjust.
8497 (dwarf2_compute_name): Adjust.
8498 (dwarf2_physname): Adjust.
8499 (read_import_statement): Adjust.
8500 (handle_DW_AT_stmt_list): Adjust.
8501 (read_file_scope): Adjust.
8502 (read_func_scope): Adjust.
8503 (read_lexical_block_scope): Adjust.
8504 (read_call_site_scope): Adjust.
8505 (read_variable): Adjust.
8506 (dwarf2_rnglists_process): Adjust.
8507 (dwarf2_ranges_process): Adjust.
8508 (dwarf2_ranges_read): Adjust.
8509 (dwarf2_get_pc_bounds): Adjust.
8510 (dwarf2_record_block_ranges): Adjust.
8511 (dwarf2_add_field): Adjust.
8512 (dwarf2_add_member_fn): Adjust.
8513 (read_structure_type): Adjust.
8514 (process_structure_scope): Adjust.
8515 (read_enumeration_type): Adjust.
8516 (read_array_type): Adjust.
8517 (mark_common_block_symbol_computed): Adjust.
8518 (read_common_block): Adjust.
8519 (read_namespace_type): Adjust.
8520 (read_namespace): Adjust.
8521 (read_module_type): Adjust.
8522 (read_tag_pointer_type): Adjust.
8523 (read_tag_ptr_to_member_type): Adjust.
8524 (read_tag_string_type): Adjust.
8525 (read_subroutine_type): Adjust.
8526 (read_typedef): Adjust.
8527 (read_base_type): Adjust.
8528 (attr_to_dynamic_prop): Adjust.
8529 (read_subrange_type): Adjust.
8530 (read_unspecified_type): Adjust.
8531 (dwarf2_read_abbrevs): Adjust.
8532 (load_partial_dies): Adjust.
8533 (read_partial_die): Adjust.
8534 (find_partial_die): Adjust.
8535 (guess_partial_die_structure_name): Adjust.
8536 (fixup_partial_die): Adjust.
8537 (read_attribute_value): Adjust.
8538 (read_addr_index): Adjust.
8539 (read_addr_index_from_leb128): Adjust.
8540 (read_str_index): Adjust.
8541 (dwarf2_string_attr): Adjust.
8542 (get_debug_line_section): Adjust.
8543 (dwarf_decode_line_header): Adjust.
8544 (lnp_state_machine::check_line_address): Adjust.
8545 (dwarf_decode_lines_1): Adjust.
8546 (dwarf_decode_lines): Adjust.
8547 (dwarf2_start_symtab): Adjust.
8548 (var_decode_location): Adjust.
8549 (new_symbol_full): Adjust.
8550 (dwarf2_const_value_data): Adjust.
8551 (dwarf2_const_value_attr): Adjust.
8552 (dwarf2_const_value): Adjust.
8553 (die_type): Adjust.
8554 (die_containing_type): Adjust.
8555 (build_error_marker_type): Adjust.
8556 (lookup_die_type): Adjust.
8557 (guess_full_die_structure_name): Adjust.
8558 (anonymous_struct_prefix): Adjust.
8559 (determine_prefix): Adjust.
8560 (dwarf2_name): Adjust.
8561 (follow_die_ref_or_sig): Adjust.
8562 (follow_die_offset): Adjust.
8563 (follow_die_ref): Adjust.
8564 (follow_die_sig_1): Adjust.
8565 (follow_die_sig): Adjust.
8566 (get_signatured_type): Adjust.
8567 (get_DW_AT_signature_type): Adjust.
8568 (decode_locdesc): Adjust.
8569 (dwarf_decode_macros): Adjust.
8570 (cu_debug_loc_section): Adjust.
8571 (fill_in_loclist_baton): Adjust.
8572 (dwarf2_symbol_mark_computed): Adjust.
8573 (init_one_comp_unit): Don't assign
8574 dwarf2_cu::dwarf2_per_objfile.
8575 (set_die_type): Adjust.
8576
8577 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8578
8579 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8580 <dwarf2_per_objfile>: New field.
8581 (dwarf2_per_objfile): Remove global.
8582 (get_dwarf2_per_objfile): New function.
8583 (set_dwarf2_per_objfile): New function.
8584 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8585 dwarf2_per_objfile.
8586 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8587 (read_abbrev_offset): Likewise.
8588 (read_indirect_string): Likewise.
8589 (read_indirect_line_string): Likewise.
8590 (read_indirect_string_at_offset): Likewise.
8591 (read_indirect_string_from_dwz): Likewise.
8592 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8593 dwarf2_per_objfile.
8594 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8595 (create_all_comp_units): Change objfile parameter to
8596 dwarf2_per_objfile.
8597 (create_all_type_units): Likewise.
8598 (process_queue): Add dwarf2_per_objfile parameter.
8599 (read_and_check_comp_unit_head): Likewise.
8600 (lookup_dwo_unit_in_dwp): Likewise.
8601 (get_dwp_file): Likewise.
8602 (process_cu_includes): Likewise.
8603 (struct free_dwo_file_cleanup_data): New struct.
8604 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8605 set_dwarf2_per_objfile.
8606 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8607 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8608 context, adjust calls.
8609 (dw2_instantiate_symtab): Likewise.
8610 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8611 (dw2_get_cu): Likewise.
8612 (create_cu_from_index_list): Change objfile parameter to
8613 dwarf2_per_objfile.
8614 (create_cus_from_index_list): Get dwarf2_per_objfile from
8615 context, adjust calls.
8616 (create_cus_from_index): Likewise.
8617 (create_signatured_type_table_from_index): Change objfile
8618 parameter to dwarf2_per_objfile.
8619 (create_signatured_type_table_from_debug_names): Change objfile
8620 parameter to dwarf2_per_objfile.
8621 (create_addrmap_from_index): Likewise.
8622 (create_addrmap_from_aranges): Likewise.
8623 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8624 (dw2_setup): Remove.
8625 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8626 context.
8627 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8628 get_dwarf2_per_objfile.
8629 (dw2_forget_cached_source_info): Likewise.
8630 (dw2_map_symtabs_matching_filename): Likewise.
8631 (struct dw2_symtab_iterator) <index>: Remove.
8632 <dwarf2_per_objfile>: New field.
8633 (dw2_symtab_iter_init): Replace index parameter with
8634 dwarf2_per_objfile.
8635 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8636 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8637 (dw2_print_stats): Likewise.
8638 (dw2_dump): Likewise.
8639 (dw2_expand_symtabs_for_function): Likewise.
8640 (dw2_expand_all_symtabs): Likewise.
8641 (dw2_expand_symtabs_with_fullname): Likewise.
8642 (dw2_expand_marked_cus): Replace index and objfile parameters
8643 with dwarf2_per_objfile.
8644 (dw_expand_symtabs_matching_file_matcher): Add
8645 dwarf2_per_objfile parameter and adjust calls.
8646 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8647 adjust calls.
8648 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8649 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8650 adjust calls.
8651 (create_cus_from_debug_names_list): Replace objfile parameter
8652 with dwarf2_per_objfile and adjust calls.
8653 (create_cus_from_debug_names): Likewise.
8654 (dwarf2_read_debug_names): Likewise.
8655 (mapped_debug_names::namei_to_name): Adjust call.
8656 (dw2_debug_names_iterator::next): Likewise.
8657 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8658 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8659 (dw2_debug_names_dump): Likewise.
8660 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8661 (dw2_debug_names_expand_symtabs_matching): Likewise.
8662 (dwarf2_initialize_objfile): Likewise.
8663 (dwarf2_build_psymtabs): Likewise.
8664 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8665 this_cu.
8666 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8667 (read_and_check_comp_unit_head): Likewise.
8668 (read_abbrev_offset): Likewise.
8669 (create_debug_type_hash_table): Likewise.
8670 (create_debug_types_hash_table): Likewise.
8671 (create_all_type_units): Replace objfile parameter with
8672 dwarf2_per_objfile.
8673 (add_type_unit): Add dwarf2_per_objfile parameter.
8674 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8675 with dwarf2_per_objfile.
8676 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8677 (lookup_dwp_signatured_type): Likewise.
8678 (lookup_signatured_type): Likewise.
8679 (read_cutu_die_from_dwo): Likewise.
8680 (init_tu_and_read_dwo_dies): Likewise.
8681 (init_cutu_and_read_dies): Likewise.
8682 (init_cutu_and_read_dies_no_follow): Likewise.
8683 (allocate_type_unit_groups_table): Add objfile parameter.
8684 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8685 (get_type_unit_group): Likewise.
8686 (process_psymtab_comp_unit): Update call.
8687 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8688 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8689 (print_tu_stats): Likewise.
8690 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8691 in void* parameter.
8692 (build_type_psymtabs): Change objfile parameter to
8693 dwarf2_per_objfile.
8694 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8695 passed in void* parameter.
8696 (process_skeletonless_type_units): Change objfile parameter to
8697 dwarf2_per_objfile.
8698 (set_partial_user): Likewise.
8699 (dwarf2_build_psymtabs_hard): Likewise.
8700 (read_comp_units_from_section): Likewise.
8701 (create_all_comp_units): Likewise.
8702 (scan_partial_symbols): Update calls.
8703 (add_partial_symbol): Likewise.
8704 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8705 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8706 (process_queue): Add dwarf2_per_objfile parameter.
8707 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8708 (compute_compunit_symtab_includes): Likewise.
8709 (process_cu_includes): Add dwarf2_per_objfile parameter.
8710 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8711 (process_full_type_unit): Likewise.
8712 (process_imported_unit_die): Update call.
8713 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8714 (read_file_scope): Likewise.
8715 (allocate_dwo_file_hash_table): Add objfile parameter.
8716 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8717 (create_cus_hash_table): Likewise.
8718 (create_dwp_hash_table): Likewise.
8719 (create_dwo_unit_in_dwp_v1): Likewise.
8720 (create_dwp_v2_section): Likewise.
8721 (create_dwo_unit_in_dwp_v2): Likewise.
8722 (lookup_dwo_unit_in_dwp): Likewise.
8723 (try_open_dwop_file): Likewise.
8724 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8725 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8726 cleanup to include a reference to dwarf2_per_objfile.
8727 (open_dwp_file): Add dwarf2_per_objfile parameter.
8728 (open_and_init_dwp_file): Likewise.
8729 (get_dwp_file): Likewise.
8730 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8731 (queue_and_load_all_dwo_tus): Update call.
8732 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8733 data.
8734 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8735 (dwarf2_ranges_process): Likewise.
8736 (dwarf2_get_pc_bounds): Likewise.
8737 (mark_common_block_symbol_computed): Likewise.
8738 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8739 (dwarf2_read_abbrevs): Update call.
8740 (read_partial_die): Use dwarf2_per_objfile from cu.
8741 (find_partial_die): Likewise.
8742 (fixup_partial_die): Likewise.
8743 (read_attribute_value): Likewise.
8744 (read_indirect_string_at_offset_from): Add objfile parameter.
8745 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8746 parameter.
8747 (read_indirect_string_from_dwz): Add objfile parameter.
8748 (read_indirect_string): Add objfile parameter.
8749 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8750 (read_addr_index): Use dwarf2_per_objfile from cu.
8751 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8752 call dw2_setup.
8753 (read_str_index): Use dwarf2_per_objfile from cu.
8754 (get_debug_line_section): Likewise.
8755 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8756 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8757 (new_symbol_full): Use dwarf2_per_objfile from cu.
8758 (build_error_marker_type): Likewise.
8759 (lookup_die_type): Likewise.
8760 (determine_prefix): Likewise.
8761 (follow_die_offset): Likewise.
8762 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8763 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8764 (dwarf2_fetch_die_type_sect_off): Likewise.
8765 (dwarf2_get_die_type): Likewise.
8766 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8767 (get_signatured_type): Likewise.
8768 (get_DW_AT_signature_type): Likewise.
8769 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8770 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8771 (cu_debug_loc_section): Likewise.
8772 (fill_in_loclist_baton): Likewise.
8773 (dwarf2_symbol_mark_computed): Likewise.
8774 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8775 dwarf2_per_objfile.
8776 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8777 parameter.
8778 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8779 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8780 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8781 (set_die_type): Use dwarf2_free_objfile from cu.
8782 (get_die_type_at_offset): Likewise.
8783 (dwarf2_per_objfile_free): Don't assign global variable.
8784 (debug_names) <constructor>: Add dwarf2_per_objfile
8785 parameter, update m_debugstrlookup construction.
8786 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8787 parameter.
8788 <m_dwarf2_per_objfile>: New field.
8789 <lookup>: Use m_dwarf2_per_objfile.
8790 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8791 (psyms_seen_size): Likewise.
8792 (write_gdbindex): Replace objfile parameter with
8793 dwarf2_per_objfile.
8794 (write_debug_names): Likewise.
8795 (write_psymtabs_to_index): Likewise.
8796 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8797 calls.
8798
8799 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8800
8801 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8802 <dwarf2_per_objfile>: New field.
8803 (struct dwarf2_per_cu_data) <objfile>: Remove.
8804 <dwarf2_per_objfile>: New field.
8805 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8806 of objfile.
8807 (create_signatured_type_table_from_index): Likewise.
8808 (create_debug_type_hash_table): Likewise.
8809 (fill_in_sig_entry_from_dwo_entry): Likewise.
8810 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8811 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8812 objfile.
8813 (create_partial_symtab): Access objfile through
8814 dwarf2_per_objfile.
8815 (process_psymtab_comp_unit_reader): Likewise.
8816 (read_comp_units_from_section): Likewise.
8817 (scan_partial_symbols): Likewise.
8818 (add_partial_symbol): Likewise.
8819 (add_partial_subprogram): Likewise.
8820 (peek_die_abbrev): Likewise.
8821 (fixup_go_packaging): Likewise.
8822 (process_full_comp_unit): Likewise.
8823 (process_full_type_unit): Likewise.
8824 (process_imported_unit_die): Likewise.
8825 (dwarf2_compute_name): Likewise.
8826 (dwarf2_physname): Likewise.
8827 (read_import_statement): Likewise.
8828 (create_cus_hash_table): Assign dwarf2_physname instead of
8829 objfile.
8830 (read_func_scope): Access objfile through dwarf2_per_objfile.
8831 (read_lexical_block_scope): Likewise.
8832 (read_call_site_scope): Likewise.
8833 (read_variable): Likewise.
8834 (dwarf2_rnglists_process): Likewise.
8835 (dwarf2_ranges_process): Likewise.
8836 (dwarf2_ranges_read): Likewise.
8837 (dwarf2_record_block_ranges): Likewise.
8838 (dwarf2_add_field): Likewise.
8839 (dwarf2_add_member_fn): Likewise.
8840 (read_structure_type): Likewise.
8841 (process_structure_scope): Likewise.
8842 (read_enumeration_type): Likewise.
8843 (read_array_type): Likewise.
8844 (read_common_block): Likewise.
8845 (read_namespace_type): Likewise.
8846 (read_namespace): Likewise.
8847 (read_module_type): Likewise.
8848 (read_tag_pointer_type): Likewise.
8849 (read_tag_ptr_to_member_type): Likewise.
8850 (read_tag_string_type): Likewise.
8851 (read_subroutine_type): Likewise.
8852 (read_typedef): Likewise.
8853 (read_base_type): Likewise.
8854 (attr_to_dynamic_prop): Likewise.
8855 (read_subrange_type): Likewise.
8856 (read_unspecified_type): Likewise.
8857 (load_partial_dies): Likewise.
8858 (read_partial_die): Likewise.
8859 (find_partial_die): Likewise.
8860 (guess_partial_die_structure_name): Likewise.
8861 (fixup_partial_die): Likewise.
8862 (read_attribute_value): Likewise.
8863 (read_addr_index_from_leb128): Likewise.
8864 (dwarf2_read_addr_index): Likewise.
8865 (dwarf2_string_attr): Likewise.
8866 (lnp_state_machine::check_line_address): Likewise.
8867 (dwarf_decode_lines_1): Likewise.
8868 (dwarf_decode_lines): Likewise.
8869 (dwarf2_start_symtab): Likewise.
8870 (var_decode_location): Likewise.
8871 (new_symbol_full): Likewise.
8872 (dwarf2_const_value_data): Likewise.
8873 (dwarf2_const_value_attr): Likewise.
8874 (dwarf2_const_value): Likewise.
8875 (die_type): Likewise.
8876 (die_containing_type): Likewise.
8877 (lookup_die_type): Likewise.
8878 (guess_full_die_structure_name): Likewise.
8879 (anonymous_struct_prefix): Likewise.
8880 (dwarf2_name): Likewise.
8881 (follow_die_ref_or_sig): Likewise.
8882 (follow_die_offset): Likewise.
8883 (follow_die_ref): Likewise.
8884 (dwarf2_fetch_die_loc_sect_off): Likewise.
8885 (dwarf2_fetch_constant_bytes): Likewise.
8886 (dwarf2_fetch_die_type_sect_off): Likewise.
8887 (dwarf2_get_die_type): Likewise.
8888 (follow_die_sig): Likewise.
8889 (decode_locdesc): Likewise.
8890 (dwarf2_per_cu_objfile): Likewise.
8891 (dwarf2_per_cu_text_offset): Likewise.
8892 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8893 objfile.
8894 (set_die_type): Access objfile through
8895 dwarf2_per_objfile.
8896
8897 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8898
8899 * valprint.c (converted_character_d): Remove typedef.
8900 (DEF_VEC_O (converted_character_d)): Remove.
8901 (count_next_character): Use std::vector.
8902 (print_converted_chars_to_obstack): Likewise.
8903 (generic_printstr): Likewise.
8904
8905 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8906
8907 * xml-support.h (struct gdb_xml_value): Add constructor.
8908 <value>: Change type to unique_xmalloc_ptr.
8909 (gdb_xml_value_s): Remove typedef.
8910 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8911 (gdb_xml_element_start_handler): Change parameter type to
8912 std::vector.
8913 (xml_find_attribute): Likewise.
8914 * xml-support.c (xml_find_attribute): Change parameter type to
8915 std::vector and adjust.
8916 (gdb_xml_values_cleanup): Remove.
8917 (gdb_xml_parser::start_element): Adjust to std::vector.
8918 (xinclude_start_include): Change paraeter type to std::vector
8919 and adjust.
8920 * btrace.c (check_xml_btrace_version): Likewise.
8921 (parse_xml_btrace_block): Likewise.
8922 (parse_xml_btrace_pt_config_cpu): Likewise.
8923 (parse_xml_btrace_pt): Likewise.
8924 (parse_xml_btrace_conf_bts): Likewise.
8925 (parse_xml_btrace_conf_pt): Likewise.
8926 * memory-map.c (memory_map_start_memory): Likewise.
8927 (memory_map_start_property): Likewise.
8928 * osdata.c (osdata_start_osdata): Likewise.
8929 (osdata_start_item): Likewise.
8930 (osdata_start_column): Likewise.
8931 * remote.c (start_thread): Likewise.
8932 * solib-aix.c (library_list_start_library): Likewise.
8933 (library_list_start_list): Likewise.
8934 * solib-svr4.c (library_list_start_library): Likewise.
8935 (svr4_library_list_start_list): Likewise.
8936 * solib-target.c (library_list_start_segment): Likewise.
8937 (library_list_start_section): Likewise.
8938 (library_list_start_library): Likewise.
8939 (library_list_start_list): Likewise.
8940 * tracepoint.c (traceframe_info_start_memory): Likewise.
8941 (traceframe_info_start_tvar): Likewise.
8942 * xml-syscall.c (syscall_start_syscall): Likewise.
8943 * xml-tdesc.c (tdesc_start_target): Likewise.
8944 (tdesc_start_feature): Likewise.
8945 (tdesc_start_reg): Likewise.
8946 (tdesc_start_union): Likewise.
8947 (tdesc_start_struct): Likewise.
8948 (tdesc_start_flags): Likewise.
8949 (tdesc_start_enum): Likewise.
8950 (tdesc_start_field): Likewise.
8951 (tdesc_start_enum_value): Likewise.
8952 (tdesc_start_vector): Likewise.
8953
8954 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8955
8956 * extension.h (struct xmethod_worker) <clone>: Remove.
8957 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8958 Remove.
8959 (python_xmethod_worker::clone): Remove.
8960 * valops.c (find_overload_match): Use std::move instead of
8961 clone.
8962
8963 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8964
8965 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8966 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8967 <free_xmethod_worker_data>: Remove.
8968 <get_matching_xmethod_workers>: Chance VEC to std::vector.
8969 <get_xmethod_arg_types>: Remove.
8970 <get_xmethod_result_type>: Remove.
8971 <invoke_xmethod>: Remove.
8972 * extension.c (new_xmethod_worker): Remove.
8973 (clone_xmethod_worker): Remove.
8974 (get_matching_xmethod_workers): Return void, pass std::vector by
8975 pointer.
8976 (get_xmethod_arg_types): Rename to...
8977 (xmethod_worker::get_arg_types): ... this, and adjust.
8978 (get_xmethod_result_type): Rename to...
8979 (xmethod_worker::get_result_type): ... this, and adjust.
8980 (invoke_xmethod): Remove.
8981 (free_xmethod_worker): Remove.
8982 (free_xmethod_worker_vec): Remove.
8983 * extension.h (enum ext_lang_rc): Move here from
8984 extension-priv.h.
8985 (struct xmethod_worker): Add constructor and destructor.
8986 <data>: Remove.
8987 <value>: Remove.
8988 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8989 virtual pure methods.
8990 <get_arg_types, get_result_type>: New methods.
8991 (xmethod_worker_ptr): Remove typedef.
8992 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8993 (xmethod_worker_vec): Remove typedef.
8994 (xmethod_worker_up): New typedef.
8995 (invoke_xmethod): Remove.
8996 (clone_xmethod_worker): Remove.
8997 (free_xmethod_worker): Remove.
8998 (free_xmethod_worker_vec): Remove.
8999 (get_xmethod_arg_types): Remove.
9000 (get_xmethod_result_type): Remove.
9001 * valops.c (find_method_list): Use std::vector, don't use
9002 intermediate vector.
9003 (value_find_oload_method_list): Use std::vector.
9004 (find_overload_match): Use std::vector.
9005 (find_oload_champ): Use std::vector.
9006 * value.c (value_free): Use operator delete.
9007 (value_of_xmethod): Rename to...
9008 (value_from_xmethod): ... this. Don't assign
9009 xmethod_worker::value, take rvalue-reference.
9010 (result_type_of_xmethod): Adjust.
9011 (call_xmethod): Adjust.
9012 * value.h: Include extension.h.
9013 (struct xmethod_worker): Don't forward-declare.
9014 (value_of_xmethod): Rename to...
9015 (value_from_xmethod): ... this, take rvalue-reference.
9016 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9017 (struct python_xmethod_worker): ... this, add constructor and
9018 destructor.
9019 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9020 (gdbpy_free_xmethod_worker_data): Rename to...
9021 (python_xmethod_worker::~python_xmethod_worker): ... this and
9022 adjust.
9023 (gdbpy_clone_xmethod_worker_data): Rename to...
9024 (python_xmethod_worker::clone): ... this and adjust.
9025 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9026 temporary vector.
9027 (gdbpy_get_xmethod_arg_types): Rename to...
9028 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9029 (gdbpy_get_xmethod_result_type): Rename to...
9030 (python_xmethod_worker::do_get_result_type): ... this and
9031 adjust.
9032 (gdbpy_invoke_xmethod): Rename to...
9033 (python_xmethod_worker::invoke): ... this and adjust.
9034 (new_python_xmethod_worker): Rename to...
9035 (python_xmethod_worker::python_xmethod_worker): ... this and
9036 adjust.
9037 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9038 Remove.
9039 (gdbpy_free_xmethod_worker_data): Remove.
9040 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9041 (gdbpy_get_xmethod_arg_types): Remove.
9042 (gdbpy_get_xmethod_result_type): Remove.
9043 (gdbpy_invoke_xmethod): Remove.
9044 * python/python.c (python_extension_ops): Remove obsolete
9045 callbacks.
9046
9047 2018-01-05 Pedro Alves <palves@redhat.com>
9048
9049 PR gdb/18653
9050 * common/signals-state-save-restore.c
9051 (save_original_signals_state): New parameter 'quiet'. Warn if we
9052 find a custom handler preinstalled, instead of internal erroring.
9053 But only warn if !quiet.
9054 * common/signals-state-save-restore.h
9055 (save_original_signals_state): New parameter 'quiet'.
9056 * main.c (captured_main_1): Move save_original_signals_state call
9057 after option handling, and pass QUIET.
9058
9059 2018-01-05 Pedro Alves <palves@redhat.com>
9060
9061 * spu-tdep.c (spu_catch_start): Pass
9062 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9063
9064 2018-01-05 Pedro Alves <palves@redhat.com>
9065
9066 PR gdb/22670
9067 * ada-lang.c (literal_symbol_name_matcher): New function.
9068 (ada_get_symbol_name_matcher): Use it for
9069 symbol_name_match_type::SEARCH_NAME.
9070 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9071 it down instead of assuming symbol_name_match_type::FULL.
9072 * block.h (block_lookup_symbol): New parameter 'match_type'.
9073 * c-valprint.c (print_unpacked_pointer): Use
9074 lookup_symbol_search_name instead of lookup_symbol.
9075 * compile/compile-object-load.c (get_out_value_type): Pass down
9076 symbol_name_match_type::SEARCH_NAME.
9077 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9078 symbol_name_match_type::FULL.
9079 * cp-support.c (cp_get_symbol_name_matcher): Handle
9080 symbol_name_match_type::SEARCH_NAME.
9081 * infrun.c (insert_exception_resume_breakpoint): Use
9082 lookup_symbol_search_name.
9083 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9084 * psymtab.c (maintenance_check_psymtabs): Use
9085 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9086 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9087 SYMBOL_SEARCH_NAME.
9088 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9089 if symbol_name_match_type::SEARCH_NAME.
9090 (lookup_symbol_in_language): Pass down
9091 symbol_name_match_type::FULL.
9092 (lookup_symbol_search_name): New.
9093 (lookup_language_this): Pass down
9094 symbol_name_match_type::SEARCH_NAME.
9095 (lookup_symbol_aux, lookup_local_symbol): New parameter
9096 'match_type'. Pass it down.
9097 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9098 (lookup_symbol_search_name): New declaration.
9099 (lookup_symbol_in_block): New 'match_type' parameter.
9100
9101 2018-01-05 Pedro Alves <palves@redhat.com>
9102
9103 PR gdb/22670
9104 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9105 ada_lookup_symbol.
9106 (ada_lookup_symbol): Reimplement in terms of
9107 ada_lookup_symbol_list, bits factored out from
9108 ada_lookup_encoded_symbol.
9109
9110 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9111
9112 * ada-exp.y (write_object_renaming): When subscripting an array
9113 using a symbol as the index, pass the block in call to
9114 ada_lookup_encoded_symbol when looking that symbol up.
9115
9116 2018-01-05 Jerome Guitton <guitton@adacore.com>
9117
9118 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9119 TYPE_INDEX_TYPE.
9120
9121 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9122
9123 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9124 the case where VALUE_LVAL (val0) is not lval_memory.
9125
9126 2018-01-05 Xavier Roirand <roirand@adacore.com>
9127
9128 * ada-valprint.c (print_optional_low_bound): Handle
9129 character-indexed array printing like boolean-indexed array
9130 printing.
9131
9132 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9133
9134 * NEWS: Create a new section for the next release branch.
9135 Rename the section of the current branch, now that it has
9136 been cut.
9137
9138 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9139
9140 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9141 * version.in: Bump version to 8.1.50.DATE-git.
9142
9143 2018-01-03 Xavier Roirand <roirand@adacore.com>
9144
9145 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9146 Add field.
9147 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9148 Add field.
9149 (default_exception_support_info) <catch_handlers_sym>: Add field.
9150 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9151 (ada_exception_name_addr_1): Add "catch handlers" handling.
9152 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9153 Update all callers.
9154 (create_excep_cond_exprs) <ex>: Add parameter.
9155 (re_set_exception): Update create_excep_cond_exprs call.
9156 (print_it_exception, print_one_exception, print_mention_exception)
9157 (print_recreate_exception): Add "catch handler" handling.
9158 (allocate_location_catch_handlers, re_set_catch_handlers)
9159 (check_status_catch_handlers, print_it_catch_handlers)
9160 (print_one_catch_handlers, print_mention_catch_handlers)
9161 (print_recreate_catch_handlers): New function.
9162 (catch_handlers_breakpoint_ops): New variable.
9163 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9164 Add parameter. Add "catch handler" handling.
9165 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9166 Add "catch handler" handling.
9167 (ada_exception_catchpoint_cond_string): Add "catch handler"
9168 handling.
9169 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9170 call.
9171 (catch_ada_handlers_command): New function.
9172 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9173 operations structure.
9174 (_initialize_ada_language): Add "catch handlers" command entry.
9175 * NEWS: Document "catch handlers" feature.
9176
9177 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9178
9179 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9180 account when creating the array type of the slice.
9181 (ada_value_slice): Likewise.
9182
9183 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9184
9185 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9186 New enum value.
9187 (create_array_type_with_stride): Add byte_stride_prop parameter.
9188 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9189 New parameter. Update all callers in this file.
9190 (array_type_has_dynamic_stride): New function.
9191 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9192 of arrays with dynamic byte strides.
9193 * dwarf2read.c (read_array_type): Add support for dynamic
9194 DW_AT_byte_stride attributes.
9195
9196 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9197
9198 * dwarf2read.c (read_unspecified_type): Treat
9199 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9200
9201 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9202
9203 Update copyright year range in all GDB files.
9204
9205 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9206
9207 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9208 and gdb/testsuite/gdb.base/step-line.c.
9209
9210 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9211
9212 * copyright.py (main): Dump the contents of
9213 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9214 even if BY_HAND is empty.
9215
9216 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9217
9218 * top.c (print_gdb_version): Update Copyright year in version
9219 message.
9220
9221 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9222
9223 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9224
9225 For older changes see ChangeLog-2017.
9226 \f
9227 Local Variables:
9228 mode: change-log
9229 left-margin: 8
9230 fill-column: 74
9231 version-control: never
9232 coding: utf-8
9233 End:
This page took 0.30089 seconds and 4 git commands to generate.