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