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