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