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