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