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