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