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