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