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