Use counted_command_line everywhere
[binutils-gdb.git] / gdb / ChangeLog
1 2018-05-04 Tom Tromey <tom@tromey.com>
2
3 * tracepoint.c (all_tracepoint_actions): Rename from
4 all_tracepoint_actions_and_cleanup. Change return type.
5 (actions_command, encode_actions_1, encode_actions)
6 (trace_dump_actions, tdump_command): Update.
7 * remote.c (remote_download_command_source): Update.
8 * python/python.c (gdbpy_eval_from_control_command)
9 (python_command, python_interactive_command): Update.
10 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11 * guile/guile.c (guile_command)
12 (gdbscm_eval_from_control_command, guile_command): Update.
13 * compile/compile.c (compile_code_command)
14 (compile_print_command, compile_to_object): Update.
15 * cli/cli-script.h (struct command_lines_deleter): New.
16 (counted_command_line): New typedef.
17 (struct command_line): Add constructor, destructor.
18 <body_list>: Remove.
19 <body_list_0, body_list_1>: New members.
20 (command_line_up): Remove typedef.
21 (read_command_lines, read_command_lines_1, get_command_line):
22 Update.
23 (copy_command_lines): Don't declare.
24 * cli/cli-script.c (build_command_line): Use "new".
25 (get_command_line): Return counted_command_line.
26 (print_command_lines, execute_user_command)
27 (execute_control_command_1, while_command, if_command): Update.
28 (realloc_body_list): Remove.
29 (process_next_line, recurse_read_control_structure): Update.
30 (read_command_lines, read_command_lines_1): Return counted_command_line.
31 (free_command_lines): Use "delete".
32 (copy_command_lines): Remove.
33 (define_command, document_command, show_user_1): Update.
34 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
35 a counted_command_line.
36 * breakpoint.h (counted_command_line): Remove typedef.
37 (breakpoint_set_commands): Update.
38 * breakpoint.c (check_no_tracepoint_commands)
39 (validate_commands_for_breakpoint): Update.
40 (breakpoint_set_commands): Change commands to be a
41 counted_command_line.
42 (commands_command_1, update_dprintf_command_list)
43 (create_tracepoint_from_upload): Update.
44
45 2018-05-04 Tom Tromey <tom@tromey.com>
46
47 * cli/cli-decode.h (cmd_list_element): New constructor.
48 (~cmd_list_element): New destructor.
49 (struct cmd_list_element): Add initializers.
50 * cli/cli-decode.c (do_add_cmd): Use "new".
51 (delete_cmd): Use "delete".
52
53 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
54 Pedro Alves <palves@redhat.com>
55
56 PR breakpoints/19806 and support for PR external/20207.
57 * NEWS: Mention Aarch64 watchpoint improvements.
58 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
59 watchpoints and PR external/20207 watchpoints.
60 * nat/aarch64-linux-hw-point.c
61 (kernel_supports_any_contiguous_range): New.
62 (aarch64_watchpoint_offset): New.
63 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
64 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
65 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
66 (aarch64_align_watchpoint): New parameters aligned_offset_p and
67 next_addr_orig_p. Support PR external/20207 watchpoints.
68 (aarch64_downgrade_regs): New.
69 (aarch64_dr_state_insert_one_point): New parameters offset and
70 addr_orig.
71 (aarch64_dr_state_remove_one_point): Likewise.
72 (aarch64_handle_breakpoint): Update caller.
73 (aarch64_handle_aligned_watchpoint): Likewise.
74 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
75 aligned_offset.
76 (aarch64_linux_set_debug_regs): Remove const from state. Call
77 aarch64_downgrade_regs.
78 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
79 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
80 (DR_CONTROL_MASK): ... this.
81 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
82 (unsigned int aarch64_watchpoint_offset): New prototype.
83 (aarch64_linux_set_debug_regs): Remove const from state.
84 * utils.c (align_up, align_down): Move to ...
85 * common/common-utils.c (align_up, align_down): ... here.
86 * utils.h (align_up, align_down): Move to ...
87 * common/common-utils.h (align_up, align_down): ... here.
88
89 2018-05-04 Joel Brobecker <brobecker@adacore.com>
90
91 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
92 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
93 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
94 Re-implement to match the ABI as summarized in GCC's
95 gcc/config/sparc/sparc.c. All callers updated.
96 (sparc32_store_arguments): Remove assertion.
97
98 2018-05-04 Tom Tromey <tom@tromey.com>
99
100 * printcmd.c: Don't include tui.h.
101 (decode_format): Use skip_spaces.
102
103 2018-05-04 Tom Tromey <tom@tromey.com>
104
105 PR gdb/22619:
106 * printcmd.c (last_count): New global.
107 (x_command): Use saved count when repeating.
108
109 2018-05-04 Tom Tromey <tom@tromey.com>
110
111 * nto-procfs.c (do_closedir_cleanup): Remove.
112 (procfs_pidlist): Use gdb_dir_up.
113 * procfs.c (do_closedir_cleanup): Remove.
114 (proc_update_threads): Use gdb_dir_up.
115 * common/filestuff.h (struct gdb_dir_deleter): New.
116 (gdb_dir_up): New typedef.
117
118 2018-05-04 Tom Tromey <tom@tromey.com>
119
120 * ada-lang.c (print_mention_exception): Use std::string.
121
122 2018-05-04 Tom Tromey <tom@tromey.com>
123
124 * ada-lang.c (create_excep_cond_exprs): Update.
125 (ada_exception_catchpoint_cond_string): Use std::string.
126
127 2018-05-04 Tom Tromey <tom@tromey.com>
128
129 * ada-lang.c (xget_renaming_scope): Return std::string.
130 (old_renaming_is_invisible): Update.
131
132 2018-05-04 Tom Tromey <tom@tromey.com>
133
134 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
135 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
136
137 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
138
139 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
140
141 2018-05-04 Tom Tromey <tom@tromey.com>
142
143 * remote.c (remote_query_supported_append): Change type.
144 (remote_check_symbols): Update.
145
146 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
147
148 PR gdb/11420
149 * configure.ac: Prepend libpython.
150 * python/python-config.py: Likewise.
151 * configure: Regenerate.
152
153 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
154
155 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
156
157 2018-05-03 Pedro Alves <palves@redhat.com>
158
159 * s390-linux-nat.c
160 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
161 override. Write 'true' instead of '1'.
162 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
163 declaration.
164
165 2018-05-02 Pedro Alves <palves@redhat.com>
166
167 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
168 add_inf_child_target.
169 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
170 add_inf_child_target.
171 * aix-thread.c (aix_thread_target_info): New.
172 (aix_thread_target) <shortname, longname, doc>: Delete.
173 <info>: New.
174 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
175 add_inf_child_target.
176 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
177 add_inf_child_target.
178 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
179 add_inf_child_target.
180 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
181 add_inf_child_target.
182 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
183 add_inf_child_target.
184 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
185 add_inf_child_target.
186 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
187 add_inf_child_target.
188 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
189 add_inf_child_target.
190 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
191 add_inf_child_target.
192 * bfd-target.c (target_bfd_target_info): New.
193 (target_bfd) <shortname, longname, doc>: Delete.
194 <info>: New.
195 * bsd-kvm.c (bsd_kvm_target_info): New.
196 (bsd_kvm_target) <shortname, longname, doc>: Delete.
197 <info>: New.
198 (bsd_kvm_target::open): Rename to ...
199 (bsd_kvm_target_open): ... this. Adjust.
200 * bsd-uthread.c (bsd_uthread_target_info): New.
201 (bsd_uthread_target) <shortname, longname, doc>: Delete.
202 <info>: New.
203 * corefile.c (core_file_command): Adjust.
204 * corelow.c (core_target_info): New.
205 (core_target) <shortname, longname, doc>: Delete.
206 <info>: New.
207 (core_target::open): Rename to ...
208 (core_target_open): ... this. Adjust.
209 * ctf.c (ctf_target_info): New.
210 (ctf_target) <shortname, longname, doc>: Delete.
211 <info>: New.
212 (ctf_target::open): Rename to ...
213 (ctf_target_open): ... this.
214 (_initialize_ctf): Adjust.
215 * exec.c (exec_target_info): New.
216 (exec_target) <shortname, longname, doc>: Delete.
217 <info>: New.
218 (exec_target::open): Rename to ...
219 (exec_target_open): ... this.
220 * gdbcore.h (core_target_open): Declare.
221 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
222 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
223 add_inf_child_target.
224 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
225 add_inf_child_target.
226 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
227 add_inf_child_target.
228 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
229 add_inf_child_target.
230 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
231 add_inf_child_target.
232 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
233 add_inf_child_target.
234 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
235 add_inf_child_target.
236 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
237 add_inf_child_target.
238 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
239 add_inf_child_target.
240 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
241 add_inf_child_target.
242 * inf-child.c (inf_child_target_info): New.
243 (inf_child_target::info): New.
244 (inf_child_open_target): Remove 'target' parameter. Use
245 get_native_target instead.
246 (inf_child_target::open): Delete.
247 (add_inf_child_target): New.
248 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
249 Delete.
250 <info>: New.
251 (add_inf_child_target): Declare.
252 (inf_child_open_target): Declare.
253 * linux-thread-db.c (thread_db_target_info): New.
254 (thread_db_target) <shortname, longname, doc>: Delete.
255 <info>: New.
256 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
257 add_inf_child_target.
258 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
259 add_inf_child_target.
260 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
261 add_inf_child_target.
262 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
263 add_inf_child_target.
264 * make-target-delegates (print_class): Adjust.
265 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
266 add_inf_child_target.
267 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
268 add_inf_child_target.
269 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
270 add_inf_child_target.
271 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
272 add_inf_child_target.
273 * nto-procfs.c (nto_native_target_info): New.
274 (nto_procfs_target_native) <shortname, longname, doc>:
275 Delete.
276 <info>: New.
277 (nto_procfs_target_info): New.
278 (nto_procfs_target_procfs) <shortname, longname, doc>:
279 Delete.
280 <info>: New.
281 (init_procfs_targets): Adjust.
282 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
283 add_inf_child_target.
284 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
285 add_inf_child_target.
286 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
287 add_inf_child_target.
288 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
289 add_inf_child_target.
290 * ravenscar-thread.c (ravenscar_target_info): New.
291 (ravenscar_thread_target) <shortname, longname, doc>:
292 Delete.
293 <info>: New.
294 * record-btrace.c (record_btrace_target_info):
295 (record_btrace_target) <shortname, longname, doc>: Delete.
296 <info>: New.
297 (record_btrace_target::open): Rename to ...
298 (record_btrace_target_open): ... this. Adjust.
299 * record-full.c (record_longname, record_doc): New.
300 (record_full_base_target) <shortname, longname, doc>: Delete.
301 <info>: New.
302 (record_full_target_info): New.
303 (record_full_target): <shortname>: Delete.
304 <info>: New.
305 (record_full_core_open_1, record_full_open_1): Update comments.
306 (record_full_base_target::open): Rename to ...
307 (record_full_open): ... this.
308 (cmd_record_full_restore): Update.
309 (_initialize_record_full): Update.
310 * remote-sim.c (remote_sim_target_info): New.
311 (gdbsim_target) <shortname, longname, doc>: Delete.
312 <info>: New.
313 (gdbsim_target::open): Rename to ...
314 (gdbsim_target_open): ... this.
315 (_initialize_remote_sim): Adjust.
316 * remote.c (remote_doc): New.
317 (remote_target_info): New.
318 (remote_target) <shortname, longname, doc>: Delete.
319 <info>: New.
320 (extended_remote_target_info): New.
321 (extended_remote_target) <shortname, longname, doc>: Delete.
322 <info>: New.
323 (remote_target::open_1): Make static. Adjust.
324 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
325 * s390-linux-nat.c (_initialize_s390_nat): Use
326 add_inf_child_target.
327 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
328 add_inf_child_target.
329 * sol-thread.c (thread_db_target_info): New.
330 (sol_thread_target) <shortname, longname, doc>: Delete.
331 <info>: New.
332 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
333 add_inf_child_target.
334 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
335 add_inf_child_target.
336 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
337 add_inf_child_target.
338 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
339 add_inf_child_target.
340 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
341 add_inf_child_target.
342 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
343 add_inf_child_target.
344 * spu-linux-nat.c (_initialize_spu_nat): Use
345 add_inf_child_target.
346 * spu-multiarch.c (spu_multiarch_target_info): New.
347 (spu_multiarch_target) <shortname, longname, doc>: Delete.
348 <info>: New.
349 * target-delegates.c: Regenerate.
350 * target.c: Include <unordered_map>.
351 (target_ops_p): Delete.
352 (DEF_VEC_P(target_ops_p)): Delete.
353 (target_factories): New.
354 (test_target_info): New.
355 (test_target_ops::info): New.
356 (open_target): Adjust to use target_factories.
357 (add_target_with_completer): Rename to ...
358 (add_target): ... this. Change prototype. Register target_info
359 and open callback in target_factories. Register target_info in
360 command context instead of target_ops.
361 (add_target): Delete old implementation.
362 (add_deprecated_target_alias): Change prototype. Adjust.
363 (the_native_target): New.
364 (set_native_target, get_native_target): New.
365 (find_default_run_target): Use the_native_target.
366 (find_attach_target, find_run_target): Simplify.
367 (target_ops::open): Delete.
368 (dummy_target_info): New.
369 (dummy_target::shortname, dummy_target::longname)
370 (dummy_target::doc): Delete.
371 (dummy_target::info): New.
372 (debug_target::shortname, debug_target::longname)
373 (debug_target::doc): Delete.
374 (debug_target::info): New.
375 * target.h (struct target_info): New.
376 (target_ops::~target_ops): Add comment.
377 (target_ops::info): New.
378 (target_ops::shortname, target_ops::longname, target_ops::doc): No
379 longer virtual. Implement in terms of target_info.
380 (set_native_target, get_native_target): Declare.
381 (target_open_ftype): New.
382 (add_target, add_target_with_completer)
383 (add_deprecated_target_alias): Change prototype.
384 (test_target) <shortname, longname, doc>: Delete.
385 <info>: New.
386 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
387 add_inf_child_target.
388 * tracefile-tfile.c (tfile_target_info): New.
389 (tfile_target) <shortname, longname, doc>: Delete.
390 <info>: New.
391 (tfile_target::open): Rename to ...
392 (tfile_target_open): ... this.
393 (_initialize_tracefile_tfile): Adjust.
394 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
395 add_inf_child_target.
396 * windows-nat.c (_initialize_windows_nat): Use
397 add_inf_child_target.
398 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
399 add_inf_child_target.
400
401 2018-05-02 Pedro Alves <palves@redhat.com>
402
403 * linux-nat.h (linux_nat_target) <low_new_thread,
404 low_delete_thread, low_new_fork, low_forget_process,
405 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
406 New virtual methods.
407 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
408 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
409 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
410 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
411 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
412 Delete.
413 * linux-fork.c (delete_fork): Adjust to call low method.
414 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
415 (linux_nat_new_fork, linux_nat_forget_process_hook)
416 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
417 (linux_nat_status_is_event):
418 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
419 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
420 to call low method.
421 (sigtrap_is_event): Rename to ...
422 (linux_nat_target::low_status_is_event): ... this.
423 (linux_nat_set_status_is_event): Delete.
424 (save_stop_reason, linux_nat_wait_1)
425 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
426 low methods.
427 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
428 (linux_nat_set_new_fork, linux_nat_set_forget_process)
429 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
430 (linux_nat_set_prepare_to_resume): Delete.
431 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
432 low virtual methods.
433 * amd64-linux-nat.c: Likewise.
434 * arm-linux-nat.c: Likewise.
435 * i386-linux-nat.c: Likewise.
436 * ia64-linux-nat.c: Likewise.
437 * mips-linux-nat.c: Likewise.
438 * ppc-linux-nat.c: Likewise.
439 * s390-linux-nat.c: Likewise.
440 * sparc64-linux-nat.c: Likewise.
441 * x86-linux-nat.c: Likewise.
442 * x86-linux-nat.h: Include "nat/x86-linux.h".
443 (x86_linux_nat_target) <low_new_fork, low_forget_process,
444 low_prepare_to_resume, low_new_thread, low_delete_thread>:
445 Override methods.
446
447 2018-05-02 Pedro Alves <palves@redhat.com>
448
449 * target.h (target_ops)
450 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
451 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
452 stopped_by_watchpoint, have_continuable_watchpoint,
453 stopped_data_address, watchpoint_addr_within_range,
454 can_accel_watchpoint_condition, can_run, thread_alive,
455 has_all_memory, has_memory, has_stack, has_registers,
456 has_execution, can_async_p, is_async_p, supports_non_stop,
457 always_non_stop_p, can_execute_reverse, supports_multi_process,
458 supports_enable_disable_tracepoint,
459 supports_disable_randomization, supports_string_tracing,
460 supports_evaluation_of_breakpoint_conditions,
461 can_run_breakpoint_commands, filesystem_is_local,
462 can_download_tracepoint, get_trace_state_variable_value,
463 set_trace_notes, get_tib_address, use_agent, can_use_agent,
464 record_is_replaying, record_will_replay,
465 augmented_libraries_svr4_read>: Adjust to return bool.
466 * aarch64-linux-nat.c: All implementations adjusted.
467 * aix-thread.c: All implementations adjusted.
468 * arm-linux-nat.c: All implementations adjusted.
469 * breakpoint.c: All implementations adjusted.
470 * bsd-kvm.c: All implementations adjusted.
471 * bsd-uthread.c: All implementations adjusted.
472 * corelow.c: All implementations adjusted.
473 * ctf.c: All implementations adjusted.
474 * darwin-nat.c: All implementations adjusted.
475 * darwin-nat.h: All implementations adjusted.
476 * exec.c: All implementations adjusted.
477 * fbsd-nat.c: All implementations adjusted.
478 * fbsd-nat.h: All implementations adjusted.
479 * gnu-nat.c: All implementations adjusted.
480 * gnu-nat.h: All implementations adjusted.
481 * go32-nat.c: All implementations adjusted.
482 * ia64-linux-nat.c: All implementations adjusted.
483 * inf-child.c: All implementations adjusted.
484 * inf-child.h: All implementations adjusted.
485 * inf-ptrace.c: All implementations adjusted.
486 * inf-ptrace.h: All implementations adjusted.
487 * linux-nat.c: All implementations adjusted.
488 * linux-nat.h: All implementations adjusted.
489 * mips-linux-nat.c: All implementations adjusted.
490 * nto-procfs.c: All implementations adjusted.
491 * ppc-linux-nat.c: All implementations adjusted.
492 * procfs.c: All implementations adjusted.
493 * ravenscar-thread.c: All implementations adjusted.
494 * record-btrace.c: All implementations adjusted.
495 * record-full.c: All implementations adjusted.
496 * remote-sim.c: All implementations adjusted.
497 * remote.c: All implementations adjusted.
498 * s390-linux-nat.c: All implementations adjusted.
499 * sol-thread.c: All implementations adjusted.
500 * spu-multiarch.c: All implementations adjusted.
501 * target-delegates.c: All implementations adjusted.
502 * target.c: All implementations adjusted.
503 * target.h: All implementations adjusted.
504 * tracefile-tfile.c: All implementations adjusted.
505 * tracefile.c: All implementations adjusted.
506 * tracefile.h: All implementations adjusted.
507 * windows-nat.c: All implementations adjusted.
508 * x86-linux-nat.h: All implementations adjusted.
509 * x86-nat.h: All implementations adjusted.
510
511 2018-05-02 Pedro Alves <palves@redhat.com>
512
513 * make-target-delegates (scan_target_h): Don't trim lines here.
514 Replace sequences of tabs and/or whitespace with a single
515 whitespace.
516 (top level, parsing methods): Trim each line before processing it
517 here.
518
519 2018-05-02 Pedro Alves <palves@redhat.com>
520 John Baldwin <jhb@freebsd.org>
521
522 * target.h (enum strata) <debug_stratum>: New.
523 (struct target_ops) <all delegation methods>: Replace by C++
524 virtual methods, and drop "to_" prefix. All references updated
525 throughout.
526 <to_shortname, to_longname, to_doc, to_data,
527 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
528 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
529 virtual methods. All references updated throughout.
530 <can_attach, supports_terminal_ours, can_create_inferior,
531 get_thread_control_capabilities, attach_no_wait>: New
532 virtual methods.
533 <insert_breakpoint, remove_breakpoint>: Now
534 TARGET_DEFAULT_NORETURN methods.
535 <info_proc>: Now returns bool.
536 <to_magic>: Delete.
537 (OPS_MAGIC): Delete.
538 (current_target): Delete. All references replaced by references
539 to ...
540 (target_stack): ... this. New.
541 (target_shortname, target_longname): Adjust.
542 (target_can_run): Now a function declaration.
543 (default_child_has_all_memory, default_child_has_memory)
544 (default_child_has_stack, default_child_has_registers)
545 (default_child_has_execution): Remove target_ops parameter.
546 (complete_target_initialization): Delete.
547 (memory_breakpoint_target): New template class.
548 (test_target_ops): Refactor as a C++ class with virtual methods.
549 * make-target-delegates (NAME_PART): Tighten.
550 (POINTER_PART, CP_SYMBOL): New.
551 (SIMPLE_RETURN_PART): Reimplement.
552 (VEC_RETURN_PART): Expect less.
553 (RETURN_PART, VIRTUAL_PART): New.
554 (METHOD): Adjust to C++ virtual methods.
555 (scan_target_h): Remove reference to C99.
556 (dname): Output "target_ops::" prefix.
557 (write_function_header): Adjust to output a C++ class method.
558 (write_declaration): New.
559 (write_delegator): Adjust to output a C++ class method.
560 (tdname): Output "dummy_target::" prefix.
561 (write_tdefault, write_debugmethod): Adjust to output a C++ class
562 method.
563 (tdefault_names, debug_names): Delete.
564 (return_types, tdefaults, styles, argtypes_array): New.
565 (top level): All methods are delegators.
566 (print_class): New.
567 (top level): Print dummy_target and debug_target classes.
568 * target-delegates.c: Regenerate.
569 * target-debug.h (target_debug_print_enum_info_proc_what)
570 (target_debug_print_thread_control_capabilities)
571 (target_debug_print_thread_info_p): New.
572 * target.c (dummy_target): Delete.
573 (the_dummy_target, the_debug_target): New.
574 (target_stack): Now extern.
575 (set_targetdebug): Push/unpush debug target.
576 (default_child_has_all_memory, default_child_has_memory)
577 (default_child_has_stack, default_child_has_registers)
578 (default_child_has_execution): Remove target_ops parameter.
579 (complete_target_initialization): Delete.
580 (add_target_with_completer): No longer call
581 complete_target_initialization.
582 (target_supports_terminal_ours): Use regular delegation.
583 (update_current_target): Delete.
584 (push_target): No longer check magic number. Don't call
585 update_current_target.
586 (unpush_target): Don't call update_current_target.
587 (target_is_pushed): No longer check magic number.
588 (target_require_runnable): Skip for all stratums over
589 process_stratum.
590 (target_ops::info_proc): New.
591 (target_info_proc): Use find_target_at and
592 find_default_run_target.
593 (target_supports_disable_randomization): Use regular delegation.
594 (target_get_osdata): Use find_target_at.
595 (target_ops::open, target_ops::close, target_ops::can_attach)
596 (target_ops::attach, target_ops::can_create_inferior)
597 (target_ops::create_inferior, target_ops::can_run)
598 (target_can_run): New.
599 (default_fileio_target): Use regular delegation.
600 (target_ops::fileio_open, target_ops::fileio_pwrite)
601 (target_ops::fileio_pread, target_ops::fileio_fstat)
602 (target_ops::fileio_close, target_ops::fileio_unlink)
603 (target_ops::fileio_readlink): New.
604 (target_fileio_open_1, target_fileio_unlink)
605 (target_fileio_readlink): Always call the target method. Handle
606 FILEIO_ENOSYS.
607 (return_zero, return_zero_has_execution): Delete.
608 (init_dummy_target): Delete.
609 (dummy_target::dummy_target, dummy_target::shortname)
610 (dummy_target::longname, dummy_target::doc)
611 (debug_target::debug_target, debug_target::shortname)
612 (debug_target::longname, debug_target::doc): New.
613 (target_supports_delete_record): Use regular delegation.
614 (setup_target_debug): Delete.
615 (maintenance_print_target_stack): Skip debug_stratum.
616 (initialize_targets): Instantiate the_dummy_target and
617 the_debug_target.
618 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
619 use target_stack.
620 (target_auxv_search, fprint_target_auxv): Adjust.
621 (info_auxv_command): Adjust to use target_stack.
622 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
623 * exceptions.c (print_flush): Handle a NULL target_stack.
624 * regcache.c (target_ops_no_register): Refactor as class with
625 virtual methods.
626
627 * exec.c (exec_target): New class.
628 (exec_ops): Now an exec_target.
629 (exec_open, exec_close_1, exec_get_section_table)
630 (exec_xfer_partial, exec_files_info, exec_has_memory)
631 (exec_make_note_section): Refactor as exec_target methods.
632 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
633 Delete.
634 (exec_target::find_memory_regions): New.
635 (_initialize_exec): Don't call init_exec_ops.
636 * gdbcore.h (exec_file_clear): Delete.
637
638 * corefile.c (core_target): Delete.
639 (core_file_command): Adjust.
640 * corelow.c (core_target): New class.
641 (the_core_target): New.
642 (core_close): Remove target_ops parameter.
643 (core_close_cleanup): Adjust.
644 (core_target::close): New.
645 (core_open, core_detach, get_core_registers, core_files_info)
646 (core_xfer_partial, core_thread_alive, core_read_description)
647 (core_pid_to_str, core_thread_name, core_has_memory)
648 (core_has_stack, core_has_registers, core_info_proc): Rework as
649 core_target methods.
650 (ignore, core_remove_breakpoint, init_core_ops): Delete.
651 (_initialize_corelow): Initialize the_core_target.
652 * gdbcore.h (core_target): Delete.
653 (the_core_target): New.
654
655 * ctf.c: (ctf_target): New class.
656 (ctf_ops): Now a ctf_target.
657 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
658 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
659 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
660 methods.
661 (init_ctf_ops): Delete.
662 (_initialize_ctf): Don't call it.
663 * tracefile-tfile.c (tfile_target): New class.
664 (tfile_ops): Now a tfile_target.
665 (tfile_open, tfile_close, tfile_files_info)
666 (tfile_get_tracepoint_status, tfile_trace_find)
667 (tfile_fetch_registers, tfile_xfer_partial)
668 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
669 Refactor as tfile_target methods.
670 (tfile_xfer_partial_features): Remove target_ops parameter.
671 (init_tfile_ops): Delete.
672 (_initialize_tracefile_tfile): Don't call it.
673 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
674 (tracefile_has_stack, tracefile_has_registers)
675 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
676 tracefile_target methods.
677 (init_tracefile_ops): Delete.
678 (tracefile_target::tracefile_target): New.
679 * tracefile.h: Include "target.h".
680 (tracefile_target): New class.
681 (init_tracefile_ops): Delete.
682
683 * spu-multiarch.c (spu_multiarch_target): New class.
684 (spu_ops): Now a spu_multiarch_target.
685 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
686 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
687 (spu_search_memory, spu_mourn_inferior): Refactor as
688 spu_multiarch_target methods.
689 (init_spu_ops): Delete.
690 (_initialize_spu_multiarch): Remove references to init_spu_ops,
691 complete_target_initialization.
692
693 * ravenscar-thread.c (ravenscar_thread_target): New class.
694 (ravenscar_ops): Now a ravenscar_thread_target.
695 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
696 (ravenscar_thread_alive, ravenscar_pid_to_str)
697 (ravenscar_fetch_registers, ravenscar_store_registers)
698 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
699 (ravenscar_stopped_by_hw_breakpoint)
700 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
701 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
702 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
703 methods.
704 (init_ravenscar_thread_ops): Delete.
705 (_initialize_ravenscar): Remove references to
706 init_ravenscar_thread_ops and complete_target_initialization.
707
708 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
709 (bsd_uthread_target): New class.
710 (bsd_uthread_ops): Now a bsd_uthread_target.
711 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
712 (bsd_uthread_close, bsd_uthread_mourn_inferior)
713 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
714 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
715 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
716 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
717 (bsd_uthread_target): Delete function.
718 (_initialize_bsd_uthread): Remove reference to
719 complete_target_initialization.
720
721 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
722 (target_bfd): ... this new class.
723 (target_bfd_xfer_partial, target_bfd_get_section_table)
724 (target_bfd_close): Refactor as target_bfd methods.
725 (target_bfd::~target_bfd): New.
726 (target_bfd_reopen): Adjust.
727 (target_bfd::close): New.
728
729 * record-btrace.c (record_btrace_target): New class.
730 (record_btrace_ops): Now a record_btrace_target.
731 (record_btrace_open, record_btrace_stop_recording)
732 (record_btrace_disconnect, record_btrace_close)
733 (record_btrace_async, record_btrace_info)
734 (record_btrace_insn_history, record_btrace_insn_history_range)
735 (record_btrace_insn_history_from, record_btrace_call_history)
736 (record_btrace_call_history_range)
737 (record_btrace_call_history_from, record_btrace_record_method)
738 (record_btrace_is_replaying, record_btrace_will_replay)
739 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
740 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
741 (record_btrace_store_registers, record_btrace_prepare_to_store)
742 (record_btrace_to_get_unwinder)
743 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
744 (record_btrace_commit_resume, record_btrace_wait)
745 (record_btrace_stop, record_btrace_can_execute_reverse)
746 (record_btrace_stopped_by_sw_breakpoint)
747 (record_btrace_supports_stopped_by_sw_breakpoint)
748 (record_btrace_stopped_by_hw_breakpoint)
749 (record_btrace_supports_stopped_by_hw_breakpoint)
750 (record_btrace_update_thread_list, record_btrace_thread_alive)
751 (record_btrace_goto_begin, record_btrace_goto_end)
752 (record_btrace_goto, record_btrace_stop_replaying_all)
753 (record_btrace_execution_direction)
754 (record_btrace_prepare_to_generate_core)
755 (record_btrace_done_generating_core): Refactor as
756 record_btrace_target methods.
757 (init_record_btrace_ops): Delete.
758 (_initialize_record_btrace): Remove reference to
759 init_record_btrace_ops.
760 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
761 the execution_direction global.
762 (record_full_base_target, record_full_target)
763 (record_full_core_target): New classes.
764 (record_full_ops): Now a record_full_target.
765 (record_full_core_ops): Now a record_full_core_target.
766 (record_full_target::detach, record_full_target::disconnect)
767 (record_full_core_target::disconnect)
768 (record_full_target::mourn_inferior, record_full_target::kill):
769 New.
770 (record_full_open, record_full_close, record_full_async): Refactor
771 as methods of the record_full_base_target class.
772 (record_full_resume, record_full_commit_resume): Refactor
773 as methods of the record_full_target class.
774 (record_full_wait, record_full_stopped_by_watchpoint)
775 (record_full_stopped_data_address)
776 (record_full_stopped_by_sw_breakpoint)
777 (record_full_supports_stopped_by_sw_breakpoint)
778 (record_full_stopped_by_hw_breakpoint)
779 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
780 methods of the record_full_base_target class.
781 (record_full_store_registers, record_full_xfer_partial)
782 (record_full_insert_breakpoint, record_full_remove_breakpoint):
783 Refactor as methods of the record_full_target class.
784 (record_full_can_execute_reverse, record_full_get_bookmark)
785 (record_full_goto_bookmark, record_full_execution_direction)
786 (record_full_record_method, record_full_info, record_full_delete)
787 (record_full_is_replaying, record_full_will_replay)
788 (record_full_goto_begin, record_full_goto_end, record_full_goto)
789 (record_full_stop_replaying): Refactor as methods of the
790 record_full_base_target class.
791 (record_full_core_resume, record_full_core_kill)
792 (record_full_core_fetch_registers)
793 (record_full_core_prepare_to_store)
794 (record_full_core_store_registers, record_full_core_xfer_partial)
795 (record_full_core_insert_breakpoint)
796 (record_full_core_remove_breakpoint)
797 (record_full_core_has_execution): Refactor
798 as methods of the record_full_core_target class.
799 (record_full_base_target::supports_delete_record): New.
800 (init_record_full_ops): Delete.
801 (init_record_full_core_ops): Delete.
802 (record_full_save): Refactor as method of the
803 record_full_base_target class.
804 (_initialize_record_full): Remove references to
805 init_record_full_ops and init_record_full_core_ops.
806
807 * remote.c (remote_target, extended_remote_target): New classes.
808 (remote_ops): Now a remote_target.
809 (extended_remote_ops): Now an extended_remote_target.
810 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
811 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
812 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
813 (remote_pass_signals, remote_set_syscall_catchpoint)
814 (remote_program_signals, )
815 (remote_thread_always_alive): Remove target_ops parameter.
816 (remote_thread_alive, remote_thread_name)
817 (remote_update_thread_list, remote_threads_extra_info)
818 (remote_static_tracepoint_marker_at)
819 (remote_static_tracepoint_markers_by_strid)
820 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
821 (remote_open): Refactor as methods of remote_target.
822 (extended_remote_open, extended_remote_detach)
823 (extended_remote_attach, extended_remote_post_attach):
824 (extended_remote_supports_disable_randomization)
825 (extended_remote_create_inferior): : Refactor as method of
826 extended_remote_target.
827 (remote_set_permissions, remote_open_1, remote_detach)
828 (remote_follow_fork, remote_follow_exec, remote_disconnect)
829 (remote_resume, remote_commit_resume, remote_stop)
830 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
831 (remote_terminal_ours, remote_wait, remote_fetch_registers)
832 (remote_prepare_to_store, remote_store_registers)
833 (remote_flash_erase, remote_flash_done, remote_files_info)
834 (remote_kill, remote_mourn, remote_insert_breakpoint)
835 (remote_remove_breakpoint, remote_insert_watchpoint)
836 (remote_watchpoint_addr_within_range)
837 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
838 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
839 (remote_supports_stopped_by_sw_breakpoint)
840 (remote_stopped_by_hw_breakpoint)
841 (remote_supports_stopped_by_hw_breakpoint)
842 (remote_stopped_by_watchpoint, remote_stopped_data_address)
843 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
844 (remote_verify_memory): Refactor as methods of remote_target.
845 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
846 parameter.
847 (remote_xfer_partial, remote_get_memory_xfer_limit)
848 (remote_search_memory, remote_rcmd, remote_memory_map)
849 (remote_pid_to_str, remote_get_thread_local_address)
850 (remote_get_tib_address, remote_read_description): Refactor as
851 methods of remote_target.
852 (remote_target::fileio_open, remote_target::fileio_pwrite)
853 (remote_target::fileio_pread, remote_target::fileio_close): New.
854 (remote_hostio_readlink, remote_hostio_fstat)
855 (remote_filesystem_is_local, remote_can_execute_reverse)
856 (remote_supports_non_stop, remote_supports_disable_randomization)
857 (remote_supports_multi_process, remote_supports_cond_breakpoints)
858 (remote_supports_enable_disable_tracepoint)
859 (remote_supports_string_tracing)
860 (remote_can_run_breakpoint_commands, remote_trace_init)
861 (remote_download_tracepoint, remote_can_download_tracepoint)
862 (remote_download_trace_state_variable, remote_enable_tracepoint)
863 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
864 (remote_trace_start, remote_get_trace_status)
865 (remote_get_tracepoint_status, remote_trace_stop)
866 (remote_trace_find, remote_get_trace_state_variable_value)
867 (remote_save_trace_data, remote_get_raw_trace_data)
868 (remote_set_disconnected_tracing, remote_core_of_thread)
869 (remote_set_circular_trace_buffer, remote_traceframe_info)
870 (remote_get_min_fast_tracepoint_insn_len)
871 (remote_set_trace_buffer_size, remote_set_trace_notes)
872 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
873 (remote_disable_btrace, remote_teardown_btrace)
874 (remote_read_btrace, remote_btrace_conf)
875 (remote_augmented_libraries_svr4_read, remote_load)
876 (remote_pid_to_exec_file, remote_can_do_single_step)
877 (remote_execution_direction, remote_thread_handle_to_thread_info):
878 Refactor as methods of remote_target.
879 (init_remote_ops, init_extended_remote_ops): Delete.
880 (remote_can_async_p, remote_is_async_p, remote_async)
881 (remote_thread_events, remote_upload_tracepoints)
882 (remote_upload_trace_state_variables): Refactor as methods of
883 remote_target.
884 (_initialize_remote): Remove references to init_remote_ops and
885 init_extended_remote_ops.
886
887 * remote-sim.c (gdbsim_target): New class.
888 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
889 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
890 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
891 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
892 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
893 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
894 Refactor as methods of gdbsim_target.
895 (gdbsim_ops): Now a gdbsim_target.
896 (init_gdbsim_ops): Delete.
897 (gdbsim_cntrl_c): Adjust.
898 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
899
900 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
901 (the_amd64_linux_nat_target): New.
902 (amd64_linux_fetch_inferior_registers)
903 (amd64_linux_store_inferior_registers): Refactor as methods of
904 amd64_linux_nat_target.
905 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
906 * i386-linux-nat.c: Don't include "linux-nat.h".
907 (i386_linux_nat_target): New class.
908 (the_i386_linux_nat_target): New.
909 (i386_linux_fetch_inferior_registers)
910 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
911 as methods of i386_linux_nat_target.
912 (_initialize_i386_linux_nat): Adjust. Set linux_target.
913 * inf-child.c (inf_child_ops): Delete.
914 (inf_child_fetch_inferior_registers)
915 (inf_child_store_inferior_registers): Delete.
916 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
917 methods of inf_child_target.
918 (inf_child_target::supports_terminal_ours)
919 (inf_child_target::terminal_init)
920 (inf_child_target::terminal_inferior)
921 (inf_child_target::terminal_ours_for_output)
922 (inf_child_target::terminal_ours, inf_child_target::interrupt)
923 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
924 New.
925 (inf_child_open, inf_child_disconnect, inf_child_close)
926 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
927 (inf_child_post_startup_inferior, inf_child_can_run)
928 (inf_child_pid_to_exec_file): Refactor as methods of
929 inf_child_target.
930 (inf_child_follow_fork): Delete.
931 (inf_child_target::can_create_inferior)
932 (inf_child_target::can_attach): New.
933 (inf_child_target::has_all_memory, inf_child_target::has_memory)
934 (inf_child_target::has_stack, inf_child_target::has_registers)
935 (inf_child_target::has_execution): New.
936 (inf_child_fileio_open, inf_child_fileio_pwrite)
937 (inf_child_fileio_pread, inf_child_fileio_fstat)
938 (inf_child_fileio_close, inf_child_fileio_unlink)
939 (inf_child_fileio_readlink, inf_child_use_agent)
940 (inf_child_can_use_agent): Refactor as methods of
941 inf_child_target.
942 (return_zero, inf_child_target): Delete.
943 (inf_child_target::inf_child_target): New.
944 * inf-child.h: Include "target.h".
945 (inf_child_target): Delete function prototype.
946 (inf_child_target): New class.
947 (inf_child_open_target, inf_child_mourn_inferior)
948 (inf_child_maybe_unpush_target): Delete.
949 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
950 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
951 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
952 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
953 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
954 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
955 (inf_ptrace_wait, inf_ptrace_xfer_partial)
956 (inf_ptrace_thread_alive, inf_ptrace_files_info)
957 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
958 methods of inf_ptrace_target.
959 (inf_ptrace_target): Delete function.
960 * inf-ptrace.h: Include "inf-child.h".
961 (inf_ptrace_target): Delete function declaration.
962 (inf_ptrace_target): New class.
963 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
964 * linux-nat.c (linux_target): New.
965 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
966 (linux_nat_target::~linux_nat_target): New.
967 (linux_child_post_attach, linux_child_post_startup_inferior)
968 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
969 (linux_child_remove_fork_catchpoint)
970 (linux_child_insert_vfork_catchpoint)
971 (linux_child_remove_vfork_catchpoint)
972 (linux_child_insert_exec_catchpoint)
973 (linux_child_remove_exec_catchpoint)
974 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
975 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
976 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
977 (linux_nat_stopped_data_address)
978 (linux_nat_stopped_by_sw_breakpoint)
979 (linux_nat_supports_stopped_by_sw_breakpoint)
980 (linux_nat_stopped_by_hw_breakpoint)
981 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
982 (linux_nat_kill, linux_nat_mourn_inferior)
983 (linux_nat_xfer_partial, linux_nat_thread_alive)
984 (linux_nat_update_thread_list, linux_nat_pid_to_str)
985 (linux_nat_thread_name, linux_child_pid_to_exec_file)
986 (linux_child_static_tracepoint_markers_by_strid)
987 (linux_nat_is_async_p, linux_nat_can_async_p)
988 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
989 (linux_nat_supports_multi_process)
990 (linux_nat_supports_disable_randomization, linux_nat_async)
991 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
992 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
993 (linux_nat_fileio_open, linux_nat_fileio_readlink)
994 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
995 methods of linux_nat_target.
996 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
997 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
998 parameter.
999 (check_stopped_by_watchpoint): Adjust.
1000 (linux_xfer_partial): Delete.
1001 (linux_target_install_ops, linux_target, linux_nat_add_target):
1002 Delete.
1003 (linux_nat_target::linux_nat_target): New.
1004 * linux-nat.h: Include "inf-ptrace.h".
1005 (linux_nat_target): New.
1006 (linux_target, linux_target_install_ops, linux_nat_add_target):
1007 Delete function declarations.
1008 (linux_target): Declare global.
1009 * linux-thread-db.c (thread_db_target): New.
1010 (thread_db_target::thread_db_target): New.
1011 (thread_db_ops): Delete.
1012 (the_thread_db_target): New.
1013 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1014 (thread_db_update_thread_list, thread_db_pid_to_str)
1015 (thread_db_extra_thread_info)
1016 (thread_db_thread_handle_to_thread_info)
1017 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1018 (thread_db_resume): Refactor as methods of thread_db_target.
1019 (init_thread_db_ops): Delete.
1020 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1021 * x86-linux-nat.c: Don't include "linux-nat.h".
1022 (super_post_startup_inferior): Delete.
1023 (x86_linux_nat_target::~x86_linux_nat_target): New.
1024 (x86_linux_child_post_startup_inferior)
1025 (x86_linux_read_description, x86_linux_enable_btrace)
1026 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1027 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1028 methods of x86_linux_nat_target.
1029 (x86_linux_create_target): Delete. Bits folded ...
1030 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1031 pointer.
1032 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1033 (x86_linux_nat_target): New class.
1034 (x86_linux_create_target): Delete.
1035 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1036 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1037 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1038 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1039 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1040 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1041 make extern.
1042 (x86_use_watchpoints): Delete.
1043 * x86-nat.h: Include "breakpoint.h" and "target.h".
1044 (x86_use_watchpoints): Delete.
1045 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1046 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1047 (x86_insert_watchpoint, x86_remove_watchpoint)
1048 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1049 (x86_stopped_by_hw_breakpoint): New declarations.
1050 (x86_nat_target): New template class.
1051
1052 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1053 (the_ppc_linux_nat_target): New.
1054 (ppc_linux_fetch_inferior_registers)
1055 (ppc_linux_can_use_hw_breakpoint)
1056 (ppc_linux_region_ok_for_hw_watchpoint)
1057 (ppc_linux_ranged_break_num_registers)
1058 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1059 (ppc_linux_insert_mask_watchpoint)
1060 (ppc_linux_remove_mask_watchpoint)
1061 (ppc_linux_can_accel_watchpoint_condition)
1062 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1063 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1064 (ppc_linux_watchpoint_addr_within_range)
1065 (ppc_linux_masked_watch_num_registers)
1066 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1067 (ppc_linux_read_description): Refactor as methods of
1068 ppc_linux_nat_target.
1069 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1070
1071 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1072 (procfs_target): New class.
1073 (the_procfs_target): New.
1074 (procfs_target): Delete function.
1075 (procfs_auxv_parse, procfs_attach, procfs_detach)
1076 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1077 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1078 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1079 (procfs_create_inferior, procfs_update_thread_list)
1080 (procfs_thread_alive, procfs_pid_to_str)
1081 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1082 (procfs_stopped_data_address, procfs_insert_watchpoint)
1083 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1084 (proc_find_memory_regions, procfs_info_proc)
1085 (procfs_make_note_section): Refactor as methods of procfs_target.
1086 (_initialize_procfs): Adjust.
1087 * sol-thread.c (sol_thread_target): New class.
1088 (sol_thread_ops): Now a sol_thread_target.
1089 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1090 (sol_thread_fetch_registers, sol_thread_store_registers)
1091 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1092 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1093 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1094 (init_sol_thread_ops): Delete.
1095 (_initialize_sol_thread): Adjust. Remove references to
1096 init_sol_thread_ops and complete_target_initialization.
1097
1098 * windows-nat.c (windows_nat_target): New class.
1099 (windows_fetch_inferior_registers)
1100 (windows_store_inferior_registers, windows_resume, windows_wait)
1101 (windows_attach, windows_detach, windows_pid_to_exec_file)
1102 (windows_files_info, windows_create_inferior)
1103 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1104 (windows_close, windows_pid_to_str, windows_xfer_partial)
1105 (windows_get_tib_address, windows_get_ada_task_ptid)
1106 (windows_thread_name, windows_thread_alive): Refactor as
1107 windows_nat_target methods.
1108 (do_initial_windows_stuff): Adjust.
1109 (windows_target): Delete function.
1110 (_initialize_windows_nat): Adjust.
1111
1112 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1113 (darwin_mourn_inferior, darwin_kill_inferior)
1114 (darwin_create_inferior, darwin_attach, darwin_detach)
1115 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1116 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1117 (darwin_supports_multi_process): Refactor as darwin_nat_target
1118 methods.
1119 (darwin_resume_to, darwin_files_info): Delete.
1120 (_initialize_darwin_inferior): Rename to ...
1121 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1122 * darwin-nat.h: Include "inf-child.h".
1123 (darwin_nat_target): New class.
1124 (darwin_complete_target): Delete.
1125 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1126 (darwin_target): New.
1127 (i386_darwin_fetch_inferior_registers)
1128 (i386_darwin_store_inferior_registers): Refactor as methods of
1129 darwin_nat_target.
1130 (darwin_complete_target): Delete, with ...
1131 (_initialize_i386_darwin_nat): ... bits factored out here.
1132
1133 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1134 (the_alpha_linux_nat_target): New.
1135 (alpha_linux_register_u_offset): Refactor as
1136 alpha_linux_nat_target method.
1137 (_initialize_alpha_linux_nat): Adjust.
1138 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1139 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1140 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1141 methods of linux_nat_trad_target.
1142 (linux_trad_target): Delete.
1143 * linux-nat-trad.h (linux_trad_target): Delete function.
1144 (linux_nat_trad_target): New class.
1145 * mips-linux-nat.c (mips_linux_nat_target): New class.
1146 (super_fetch_registers, super_store_registers, super_close):
1147 Delete.
1148 (the_mips_linux_nat_target): New.
1149 (mips64_linux_regsets_fetch_registers)
1150 (mips64_linux_regsets_store_registers)
1151 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1152 (mips_linux_register_u_offset, mips_linux_read_description)
1153 (mips_linux_can_use_hw_breakpoint)
1154 (mips_linux_stopped_by_watchpoint)
1155 (mips_linux_stopped_data_address)
1156 (mips_linux_region_ok_for_hw_watchpoint)
1157 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1158 (mips_linux_close): Refactor as methods of mips_linux_nat.
1159 (_initialize_mips_linux_nat): Adjust to C++ification.
1160
1161 * aix-thread.c (aix_thread_target): New class.
1162 (aix_thread_ops): Now an aix_thread_target.
1163 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1164 (aix_thread_fetch_registers, aix_thread_store_registers)
1165 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1166 (aix_thread_thread_alive, aix_thread_pid_to_str)
1167 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1168 Refactor as methods of aix_thread_target.
1169 (init_aix_thread_ops): Delete.
1170 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1171 and complete_target_initialization.
1172 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1173 (rs6000_nat_target): New class.
1174 (the_rs6000_nat_target): New.
1175 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1176 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1177 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1178 (super_create_inferior): Delete.
1179 (_initialize_rs6000_nat): Adjust to C++ification.
1180
1181 * arm-linux-nat.c (arm_linux_nat_target): New class.
1182 (the_arm_linux_nat_target): New.
1183 (arm_linux_fetch_inferior_registers)
1184 (arm_linux_store_inferior_registers, arm_linux_read_description)
1185 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1186 (arm_linux_remove_hw_breakpoint)
1187 (arm_linux_region_ok_for_hw_watchpoint)
1188 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1189 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1190 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1191 arm_linux_nat_target.
1192 (_initialize_arm_linux_nat): Adjust to C++ification.
1193
1194 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1195 (the_aarch64_linux_nat_target): New.
1196 (aarch64_linux_fetch_inferior_registers)
1197 (aarch64_linux_store_inferior_registers)
1198 (aarch64_linux_child_post_startup_inferior)
1199 (aarch64_linux_read_description)
1200 (aarch64_linux_can_use_hw_breakpoint)
1201 (aarch64_linux_insert_hw_breakpoint)
1202 (aarch64_linux_remove_hw_breakpoint)
1203 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1204 (aarch64_linux_region_ok_for_hw_watchpoint)
1205 (aarch64_linux_stopped_data_address)
1206 (aarch64_linux_stopped_by_watchpoint)
1207 (aarch64_linux_watchpoint_addr_within_range)
1208 (aarch64_linux_can_do_single_step): Refactor as methods of
1209 aarch64_linux_nat_target.
1210 (super_post_startup_inferior): Delete.
1211 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1212
1213 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1214 (the_hppa_linux_nat_target): New.
1215 (hppa_linux_fetch_inferior_registers)
1216 (hppa_linux_store_inferior_registers): Refactor as methods of
1217 hppa_linux_nat_target.
1218 (_initialize_hppa_linux_nat): Adjust to C++ification.
1219
1220 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1221 (the_ia64_linux_nat_target): New.
1222 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1223 (ia64_linux_stopped_data_address)
1224 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1225 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1226 ia64_linux_nat_target methods.
1227 (super_xfer_partial): Delete.
1228 (_initialize_ia64_linux_nat): Adjust to C++ification.
1229
1230 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1231 (the_m32r_linux_nat_target): New.
1232 (m32r_linux_fetch_inferior_registers)
1233 (m32r_linux_store_inferior_registers): Refactor as
1234 m32r_linux_nat_target methods.
1235 (_initialize_m32r_linux_nat): Adjust to C++ification.
1236
1237 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1238 (the_m68k_linux_nat_target): New.
1239 (m68k_linux_fetch_inferior_registers)
1240 (m68k_linux_store_inferior_registers): Refactor as
1241 m68k_linux_nat_target methods.
1242 (_initialize_m68k_linux_nat): Adjust to C++ification.
1243
1244 * s390-linux-nat.c (s390_linux_nat_target): New class.
1245 (the_s390_linux_nat_target): New.
1246 (s390_linux_fetch_inferior_registers)
1247 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1248 (s390_insert_watchpoint, s390_remove_watchpoint)
1249 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1250 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1251 (s390_auxv_parse, s390_read_description): Refactor as methods of
1252 s390_linux_nat_target.
1253 (_initialize_s390_nat): Adjust to C++ification.
1254
1255 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1256 (the_sparc_linux_nat_target): New.
1257 (_initialize_sparc_linux_nat): Adjust to C++ification.
1258 * sparc-nat.c (sparc_fetch_inferior_registers)
1259 (sparc_store_inferior_registers): Remove target_ops parameter.
1260 * sparc-nat.h (sparc_fetch_inferior_registers)
1261 (sparc_store_inferior_registers): Remove target_ops parameter.
1262 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1263 (the_sparc64_linux_nat_target): New.
1264 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1265
1266 * spu-linux-nat.c (spu_linux_nat_target): New class.
1267 (the_spu_linux_nat_target): New.
1268 (spu_child_post_startup_inferior, spu_child_post_attach)
1269 (spu_child_wait, spu_fetch_inferior_registers)
1270 (spu_store_inferior_registers, spu_xfer_partial)
1271 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1272 methods.
1273 (_initialize_spu_nat): Adjust to C++ification.
1274
1275 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1276 (the_tilegx_linux_nat_target): New.
1277 (fetch_inferior_registers, store_inferior_registers):
1278 Refactor as methods.
1279 (_initialize_tile_linux_nat): Adjust to C++ification.
1280
1281 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1282 (the_xtensa_linux_nat_target): New.
1283 (xtensa_linux_fetch_inferior_registers)
1284 (xtensa_linux_store_inferior_registers): Refactor as
1285 xtensa_linux_nat_target methods.
1286 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1287
1288 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1289 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1290 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1291 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1292 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1293 (fbsd_stopped_by_sw_breakpoint)
1294 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1295 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1296 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1297 (fbsd_post_startup_inferior, fbsd_post_attach)
1298 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1299 (fbsd_set_syscall_catchpoint)
1300 (super_xfer_partial, super_resume, super_wait)
1301 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1302 (fbsd_handle_debug_trap): Remove target_ops parameter.
1303 (fbsd_nat_add_target): Delete.
1304 * fbsd-nat.h: Include "inf-ptrace.h".
1305 (fbsd_nat_add_target): Delete.
1306 (USE_SIGTRAP_SIGINFO): Define.
1307 (fbsd_nat_target): New class.
1308
1309 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1310 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1311 (amd64bsd_target): Delete.
1312 * amd64-bsd-nat.h: New file.
1313 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1314 "x86-bsd-nat.h".
1315 (amd64_fbsd_nat_target): New class.
1316 (the_amd64_fbsd_nat_target): New.
1317 (amd64fbsd_read_description): Refactor as method of
1318 amd64_fbsd_nat_target.
1319 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1320 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1321 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1322 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1323 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1324 (i386bsd_target): Delete.
1325 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1326 (i386bsd_fetch_inferior_registers)
1327 (i386bsd_store_inferior_registers): Declare.
1328 (i386_bsd_nat_target): New class.
1329 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1330 (the_i386_fbsd_nat_target): New.
1331 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1332 i386_fbsd_nat_target methods.
1333 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1334 (_initialize_i386fbsd_nat): Adjust to C++ification.
1335 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1336 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1337 (_initialize_x86_bsd_nat): Adjust to C++ification.
1338 * x86-bsd-nat.h: Include "x86-nat.h".
1339 (x86bsd_target): Delete declaration.
1340 (x86bsd_nat_target): New class.
1341
1342 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1343 (the_aarch64_fbsd_nat_target): New.
1344 (aarch64_fbsd_fetch_inferior_registers)
1345 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1346 aarch64_fbsd_nat_target.
1347 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1348 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1349 (the_alpha_bsd_nat_target): New.
1350 (alphabsd_fetch_inferior_registers)
1351 (alphabsd_store_inferior_registers): Refactor as
1352 alpha_bsd_nat_target methods.
1353 (_initialize_alphabsd_nat): Refactor as methods of
1354 alpha_bsd_nat_target.
1355 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1356 (the_amd64_nbsd_nat_target): New.
1357 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1358 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1359 (the_amd64_obsd_nat_target): New.
1360 (_initialize_amd64obsd_nat): Adjust to C++ification.
1361 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1362 (the_arm_fbsd_nat_target): New.
1363 (arm_fbsd_fetch_inferior_registers)
1364 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1365 (_initialize_arm_fbsd_nat): Refactor as methods of
1366 arm_fbsd_nat_target.
1367 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1368 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1369 (the_arm_netbsd_nat_target): New.
1370 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1371 arm_netbsd_nat_target.
1372 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1373 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1374 (the_hppa_nbsd_nat_target): New.
1375 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1376 hppa_nbsd_nat_target methods.
1377 (_initialize_hppanbsd_nat): Adjust to C++ification.
1378 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1379 (the_hppa_obsd_nat_target): New.
1380 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1381 methods of hppa_obsd_nat_target.
1382 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1383 add_target.
1384 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1385 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1386 add_target.
1387 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1388 (_initialize_i386obsd_nat): Use add_target.
1389 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1390 (the_m68k_bsd_nat_target): New.
1391 (m68kbsd_fetch_inferior_registers)
1392 (m68kbsd_store_inferior_registers): Refactor as methods of
1393 m68k_bsd_nat_target.
1394 (_initialize_m68kbsd_nat): Adjust to C++ification.
1395 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1396 (the_mips_fbsd_nat_target): New.
1397 (mips_fbsd_fetch_inferior_registers)
1398 (mips_fbsd_store_inferior_registers): Refactor as methods of
1399 mips_fbsd_nat_target.
1400 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1401 add_target.
1402 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1403 (the_mips_nbsd_nat_target): New.
1404 (mipsnbsd_fetch_inferior_registers)
1405 (mipsnbsd_store_inferior_registers): Refactor as methods of
1406 mips_nbsd_nat_target.
1407 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1408 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1409 (the_mips64_obsd_nat_target): New.
1410 (mips64obsd_fetch_inferior_registers)
1411 (mips64obsd_store_inferior_registers): Refactor as methods of
1412 mips64_obsd_nat_target.
1413 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1414 add_target.
1415 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1416 nbsd_nat_target.
1417 * nbsd-nat.h: Include "inf-ptrace.h".
1418 (nbsd_nat_target): New class.
1419 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1420 (obsd_wait): Refactor as methods of obsd_nat_target.
1421 (obsd_add_target): Delete.
1422 * obsd-nat.h: Include "inf-ptrace.h".
1423 (obsd_nat_target): New class.
1424 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1425 (the_ppc_fbsd_nat_target): New.
1426 (ppcfbsd_fetch_inferior_registers)
1427 (ppcfbsd_store_inferior_registers): Refactor as methods of
1428 ppc_fbsd_nat_target.
1429 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1430 add_target.
1431 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1432 (the_ppc_nbsd_nat_target): New.
1433 (ppcnbsd_fetch_inferior_registers)
1434 (ppcnbsd_store_inferior_registers): Refactor as methods of
1435 ppc_nbsd_nat_target.
1436 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1437 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1438 (the_ppc_obsd_nat_target): New.
1439 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1440 methods of ppc_obsd_nat_target.
1441 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1442 add_target.
1443 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1444 (the_sh_nbsd_nat_target): New.
1445 (shnbsd_fetch_inferior_registers)
1446 (shnbsd_store_inferior_registers): Refactor as methods of
1447 sh_nbsd_nat_target.
1448 (_initialize_shnbsd_nat): Adjust to C++ification.
1449 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1450 (inf_ptrace_xfer_partial): Delete.
1451 (sparc_xfer_partial, sparc_target): Delete.
1452 * sparc-nat.h (sparc_fetch_inferior_registers)
1453 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1454 (sparc_target): Delete function declaration.
1455 (sparc_target): New template class.
1456 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1457 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1458 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1459 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1460 add_target.
1461 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1462 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1463 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1464 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1465 add_target.
1466 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1467 (the_vax_bsd_nat_target): New.
1468 (vaxbsd_fetch_inferior_registers)
1469 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1470 methods.
1471 (_initialize_vaxbsd_nat): Adjust to C++ification.
1472
1473 * bsd-kvm.c (bsd_kvm_target): New class.
1474 (bsd_kvm_ops): Now a bsd_kvm_target.
1475 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1476 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1477 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1478 bsd_kvm_target.
1479 (bsd_kvm_return_one): Delete.
1480 (bsd_kvm_add_target): Adjust to C++ification.
1481
1482 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1483 (nto_procfs_target_procfs): New classes.
1484 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1485 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1486 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1487 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1488 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1489 (procfs_remove_hw_breakpoint, procfs_resume)
1490 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1491 (procfs_kill_inferior, procfs_store_registers)
1492 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1493 as methods of nto_procfs_target.
1494 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1495 (nto_native_ops): Delete.
1496 (procfs_open, procfs_native_open): Delete.
1497 (nto_native_ops): Now an nto_procfs_target_native.
1498 (init_procfs_targets): Adjust to C++ification.
1499 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1500 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1501 Refactor as methods of nto_procfs_target.
1502
1503 * go32-nat.c (go32_nat_target): New class.
1504 (the_go32_nat_target): New.
1505 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1506 (go32_store_registers, go32_xfer_partial, go32_files_info)
1507 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1508 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1509 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1510 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1511 (go32_target): Delete.
1512 (_initialize_go32_nat): Adjust to C++ification.
1513
1514 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1515 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1516 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1517 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1518 gnu_nat_target.
1519 (gnu_target): Delete.
1520 * gnu-nat.h (gnu_target): Delete.
1521 (gnu_nat_target): New class.
1522 * i386-gnu-nat.c (gnu_base_target): New.
1523 (i386_gnu_nat_target): New class.
1524 (the_i386_gnu_nat_target): New.
1525 (_initialize_i386gnu_nat): Adjust to C++ification.
1526
1527 2018-05-02 Pedro Alves <palves@redhat.com>
1528
1529 * bfd-target.c (target_bfd_xclose): Rename to ...
1530 (target_bfd_close): ... this.
1531 (target_bfd_reopen): Adjust.
1532 * target.c (target_close): Remove references to to_xclose.
1533 * target.h (target_ops::to_xclose): Delete.
1534 (target_ops::to_close): Update comments.
1535
1536 2018-05-02 Pedro Alves <palves@redhat.com>
1537
1538 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1539 "linux-nat.h".
1540 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1541 * inf-ptrace.c (inf_ptrace_register_u_offset)
1542 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1543 (inf_ptrace_store_register, inf_ptrace_store_registers)
1544 (inf_ptrace_trad_target): Move to ...
1545 * linux-nat-trad.c: ... this new file.
1546 * linux-nat-trad.h: New file.
1547 * linux-nat.c (linux_target_install_ops): Make extern.
1548 (linux_trad_target): Delete.
1549 * linux-nat.h (linux_trad_target): Delete declaration.
1550 (linux_target_install_ops): Declare.
1551 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1552 "linux-nat.h".
1553
1554 2018-05-02 Pedro Alves <palves@redhat.com>
1555
1556 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1557 procfs_target/add_target here.
1558 * procfs.c (procfs_target): Make static.
1559 (_initialize_procfs): Call add_target here.
1560 * procfs.h (struct target_ops): Remove forward declaration.
1561 (procfs_target): Remove declaration.
1562 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1563
1564 2018-05-02 Pedro Alves <palves@redhat.com>
1565
1566 * procfs.c (procfs_stopped_by_watchpoint)
1567 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1568 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1569 Forward declare.
1570 (procfs_use_watchpoints): Delete, move contents...
1571 (procfs_target): ... here.
1572 * procfs.h (procfs_use_watchpoints): Delete declaration.
1573 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1574 procfs_use_watchpoints.
1575 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1576 procfs_use_watchpoints.
1577
1578 2018-05-02 Tom Tromey <tom@tromey.com>
1579
1580 PR python/20084:
1581 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1582 and var_zuinteger_unlimited.
1583 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1584 and PARAM_ZUINTEGER_UNLIMITED.
1585 (set_parameter_value): Handle var_zuinteger and
1586 var_zuinteger_unlimited.
1587 (add_setshow_generic): Likewise.
1588 (parmpy_init): Likewise.
1589
1590 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1591
1592 PR rust/23124
1593 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1594 pointer is not null before dereferencing it.
1595
1596 2018-04-30 Tom Tromey <tom@tromey.com>
1597
1598 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1599 is_mi_like_p.
1600
1601 2018-04-30 Tom Tromey <tom@tromey.com>
1602
1603 * breakpoint.c (mention): Remove use of is_mi_like_p.
1604 (print_mention_ranged_breakpoint): Likewise.
1605 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1606 of is_mi_like_p.
1607
1608 2018-04-30 Tom Tromey <tom@tromey.com>
1609
1610 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1611
1612 2018-04-30 Tom Tromey <tom@tromey.com>
1613
1614 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1615 (info_spu_event_command): Remove some uses of is_mi_like_p.
1616
1617 2018-04-30 Tom Tromey <tom@tromey.com>
1618
1619 * python/py-framefilter.c (py_print_single_arg)
1620 (enumerate_locals, py_print_args, py_print_frame): Remove some
1621 uses of is_mi_like_p.
1622
1623 2018-04-30 Tom Tromey <tom@tromey.com>
1624
1625 * ui-out.c: Update.
1626 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1627 * ui-out.h (ui_out::is_mi_like_p): Now const.
1628 (ui_out::do_is_mi_like_p): Now const.
1629 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1630
1631 2018-04-30 Tom Tromey <tom@tromey.com>
1632
1633 * varobj.c (varobj_set_visualizer): Use new_reference.
1634 * python/python.c (gdbpy_decode_line): Use new_reference.
1635 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1636 new_reference.
1637
1638 2018-04-30 Tom Tromey <tom@tromey.com>
1639
1640 * varobj.c (install_new_value): Use new_reference.
1641 * value.h (value_incref): Return void. Swap intro comment with
1642 value_decref.
1643 * value.c (set_value_parent): Use new_reference.
1644 (value_incref): Return void. Update intro comment.
1645 (release_value): Use new_reference.
1646 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1647
1648 2018-04-30 Tom Tromey <tom@tromey.com>
1649
1650 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1651 * gdb_bfd.h (new_bfd_ref): Remove.
1652 (gdb_bfd_open): Update comment.
1653 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1654 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1655 (gdb_bfd_fdopenr): Use new_reference.
1656 * exec.c (exec_file_attach): Use new_reference.
1657
1658 2018-04-30 Tom Tromey <tom@tromey.com>
1659
1660 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1661 method.
1662
1663 2018-04-30 Tom Tromey <tom@tromey.com>
1664
1665 * jit.c (jit_read_code_entry): Use type_align.
1666 * i386-tdep.c (i386_gdbarch_init): Don't call
1667 set_gdbarch_long_long_align_bit.
1668 * gdbarch.sh: Remove long_long_align_bit.
1669 * gdbarch.c, gdbarch.h: Rebuild.
1670 * arc-tdep.c (arc_type_align): New function.
1671 (arc_gdbarch_init): Use arc_type_align. Don't call
1672 set_gdbarch_long_long_align_bit.
1673
1674 2018-04-30 Tom Tromey <tom@tromey.com>
1675
1676 * rust-lang.c (rust_type_alignment): Remove.
1677 (rust_composite_type): Use type_align.
1678
1679 2018-04-30 Tom Tromey <tom@tromey.com>
1680
1681 * NEWS: Mention Type.align.
1682 * python/py-type.c (typy_get_alignof): New function.
1683 (type_object_getset): Add "alignof".
1684
1685 2018-04-30 Tom Tromey <tom@tromey.com>
1686
1687 PR exp/17095:
1688 * NEWS: Update.
1689 * std-operator.def (UNOP_ALIGNOF): New operator.
1690 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1691 New.
1692 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1693 * c-lang.c (c_op_print_tab): Add alignof.
1694 * c-exp.y (ALIGNOF): New token.
1695 (exp): Add "ALIGNOF" production.
1696 (ident_tokens): Add _Alignof and alignof.
1697
1698 2018-04-30 Tom Tromey <tom@tromey.com>
1699
1700 * i386-tdep.c (i386_type_align): New function.
1701 (i386_gdbarch_init): Update.
1702 * gdbarch.sh (type_align): New method.
1703 * gdbarch.c, gdbarch.h: Rebuild.
1704 * arch-utils.h (default_type_align): Declare.
1705 * arch-utils.c (default_type_align): New function.
1706 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1707 (struct type) <align_log2>: New field.
1708 <instance_flags>: Now a bitfield.
1709 (TYPE_RAW_ALIGN): New macro.
1710 (type_align, type_raw_align, set_type_align): Declare.
1711 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1712 functions.
1713 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1714 (get_alignment, maybe_set_alignment): New functions.
1715 (read_structure_type, read_enumeration_type, read_array_type)
1716 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1717 (read_subrange_type, read_base_type): Set type alignment.
1718
1719 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * dwarf2read.c (read_index_from_section): Use bool.
1722
1723 2018-04-29 Fabian Groffen <grobian@gentoo.org>
1724
1725 PR gdb/22950
1726 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1727 with #ifdef.
1728
1729 2018-04-29 John Reiser <jreiser@BitWagon.com>
1730
1731 PR build/22873
1732 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1733 last step, and do it atomically.
1734
1735 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
1736
1737 * compile/compile-c-types.c (convert_int, convert_float):
1738 Update for C FE v1.
1739
1740 2018-04-27 Tom Tromey <tom@tromey.com>
1741
1742 PR rust/22545:
1743 * rust-lang.c (rust_inclusive_range_type_p): New function.
1744 (rust_range): Handle inclusive ranges.
1745 (rust_compute_range): Likewise.
1746 * rust-exp.y (struct rust_op) <inclusive>: New field.
1747 (DOTDOTEQ): New constant.
1748 (range_expr): Add "..=" productions.
1749 (operator_tokens): Add "..=" token.
1750 (ast_range): Add "inclusive" parameter.
1751 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1752 ranges.
1753 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1754 bounds values.
1755 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1756 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1757 Update comments.
1758 * expprint.c (print_subexp_standard): Handle new bounds values.
1759 (dump_subexp_body_standard): Likewise.
1760
1761 2018-04-27 Tom Tromey <tom@tromey.com>
1762
1763 * configure: Rebuild.
1764 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1765 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1766 "OVERRIDE".
1767 (class symbol_needs_eval_context): Likewise.
1768 * dwarf2read.c (mock_mapped_index::symbol_name_count)
1769 (mock_mapped_index::symbol_name_at): Use "override". Remove
1770 "virtual".
1771 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1772 "override".
1773 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1774 * aarch64-tdep.c (instruction_reader::read): Use "override".
1775 (instruction_reader_test::read): Likewise.
1776 * arm-tdep.c (instruction_reader::read): Use "override".
1777 (instruction_reader_thumb::read): Likewise.
1778
1779 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
1780
1781 PR remote/9665
1782 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1783 instead of remote_send.
1784 (remote_send): Remove.
1785
1786 2018-04-26 Pedro Alves <palves@redhat.com>
1787
1788 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1789 find_function_start_sal instead of find_pc_line.
1790
1791 2018-04-26 Pedro Alves <palves@redhat.com>
1792
1793 * breakpoint.c (set_breakpoint_location_function): Handle
1794 mst_data_gnu_ifunc.
1795 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1796 * elfread.c (elf_symtab_read): Give data symbols with
1797 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1798 (elf_rel_plt_read): Update comment.
1799 * linespec.c (convert_linespec_to_sals): Handle
1800 mst_data_gnu_ifunc.
1801 (minsym_found): Handle mst_data_gnu_ifunc.
1802 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1803 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1804 * parse.c (find_minsym_type_and_address): Handle
1805 mst_data_gnu_ifunc.
1806 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1807 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1808 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1809 comment.
1810 <mst_data_gnu_ifunc>: New enumerator.
1811
1812 2018-04-26 Pedro Alves <palves@redhat.com>
1813
1814 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1815 (lookup_minimal_symbol_by_pc_section): ... this. Replace
1816 'want_trampoline' parameter by a lookup_msym_prefer parameter.
1817 Handle it.
1818 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1819 (lookup_minimal_symbol_by_pc): Adjust.
1820 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1821 (lookup_solib_trampoline_symbol_by_pc): Adjust.
1822 * minsyms.h (lookup_msym_prefer): New enum.
1823 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1824 parameter by a lookup_msym_prefer parameter.
1825
1826 2018-04-26 Pedro Alves <palves@redhat.com>
1827
1828 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1829 ends in "@plt" instead of looking at the symbol's section.
1830
1831 2018-04-26 Pedro Alves <palves@redhat.com>
1832
1833 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
1834 all references.
1835 (find_pc_partial_function_gnu_ifunc): Rename to ...
1836 (find_pc_partial_function): ... this, and remove references to
1837 'is_gnu_ifunc_p'.
1838 (find_pc_partial_function): Delete old implementation.
1839 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1840
1841 2018-04-26 Pedro Alves <palves@redhat.com>
1842
1843 * linespec.c (struct bound_minimal_symbol_search_key): New.
1844 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
1845 skip first line if we found a GNU ifunc minimal symbol by name.
1846 (compare_msymbols): Change parameters to work with a destructured
1847 lhs minsym.
1848 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1849 functions.
1850
1851 2018-04-26 Pedro Alves <palves@redhat.com>
1852
1853 * breakpoint.c (set_breakpoint_location_function): Don't resolve
1854 ifunc targets here. Instead, if we have an ifunc minsym, use its
1855 address/name.
1856 (add_location_to_breakpoint): Store the minsym and the objfile in
1857 the breakpoint location.
1858 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1859 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1860 Record the minsym in the sal.
1861 * symtab.h (symtab_and_line) <msymbol>: New field.
1862
1863 2018-04-26 Pedro Alves <palves@redhat.com>
1864
1865 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1866 unless we actually resolved the ifunc.
1867
1868 2018-04-26 Pedro Alves <palves@redhat.com>
1869
1870 * c-exp.y (variable production): Prefer ifunc minsyms over
1871 regular function symbols.
1872 * symtab.c (find_gnu_ifunc): New function.
1873 * minsyms.h (lookup_msym_prefer): New enum.
1874 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1875 parameter by a lookup_msym_prefer parameter.
1876 * symtab.h (find_gnu_ifunc): New declaration.
1877
1878 2018-04-26 Pedro Alves <palves@redhat.com>
1879
1880 * blockframe.c (find_gnu_ifunc_target_type): New function.
1881 (find_function_type): New.
1882 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1883 return a value with a memory address.
1884 (eval_call): For calls to GNU ifunc functions, try to find the
1885 type of the target function from the type that the resolver
1886 returns.
1887 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1888 symbols.
1889 * infcall.c (find_function_return_type): Delete.
1890 (find_function_addr): Add 'function_type' parameter. For calls to
1891 GNU ifunc functions, try to find the type of the target function
1892 from the type that the resolver returns, and return it via
1893 FUNCTION_TYPE.
1894 (call_function_by_hand_dummy): Adjust to use the function type
1895 returned by find_function_addr.
1896 (find_function_addr): Add 'function_type' parameter and move
1897 description here.
1898 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
1899 declarations.
1900
1901 2018-04-26 Pedro Alves <palves@redhat.com>
1902
1903 * c-exp.y (variable production): Skip finding an alias for ifunc
1904 symbols.
1905
1906 2018-04-26 Pedro Alves <palves@redhat.com>
1907
1908 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
1909
1910 2018-04-25 Pedro Alves <palves@redhat.com>
1911
1912 * infcmd.c (kill_command): Print the pid as string, not the whole
1913 thread's ptid. Add comment. s/has been killed/killed/ in output
1914 message.
1915 * remote.c (remote_detach_1): Print the pid as string, not the
1916 whole thread's ptid.
1917
1918 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1919 Sergio Durigan Junior <sergiodj@redhat.com>
1920 Pedro Alves <palves@redhat.com>
1921
1922 * infcmd.c (kill_command): Print message when inferior has
1923 been killed.
1924 * inferior.c (print_inferior_events): Remove 'static'. Set as
1925 '1'.
1926 (add_inferior): Improve message printed when
1927 'print_inferior_events' is on.
1928 (exit_inferior): Remove message printed when
1929 'print_inferior_events' is on.
1930 (detach_inferior): Improve message printed when
1931 'print_inferior_events' is on.
1932 (initialize_inferiors): Use 'add_inferior_silent' to set
1933 'current_inferior_'.
1934 * inferior.h (print_inferior_events): Declare here as
1935 'extern'.
1936 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
1937 '[Detaching...]' messages when 'print_inferior_events' is on.
1938 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
1939 as prefix/suffix for messages. Remove periods. Fix erroneous
1940 'Detaching after fork from child...', replace it by '... from
1941 parent...'.
1942 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
1943 prefix/suffix when printing 'Detaching...' messages. Print
1944 them when 'print_inferior_events' is on.
1945 * remote.c (remote_detach_1): Print message when detaching
1946 from inferior and '!is_fork_parent'.
1947
1948 2018-04-24 Tom Tromey <tom@tromey.com>
1949
1950 * cli-out.h: Reindent.
1951
1952 2018-04-24 Tom Tromey <tom@tromey.com>
1953
1954 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
1955 (cli_ui_out::do_field_string): Use fputs_filtered.
1956 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
1957
1958 2018-04-23 Tom Tromey <tom@tromey.com>
1959
1960 * guile/scm-frame.c (gdbscm_frame_read_var): Use
1961 gdb::unique_xmalloc_ptr.
1962
1963 2018-04-23 Tom Tromey <tom@tromey.com>
1964
1965 * configure: Rebuild.
1966
1967 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
1968
1969 PR gdb/23095
1970 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
1971 prepare_for_testing. Set normal_bp to r_debug_state if target
1972 is bsd.
1973
1974 2018-04-21 Pedro Alves <palves@redhat.com>
1975 Rajendra SY <rajendra.sy@gmail.com>
1976
1977 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
1978 * remote.c (extended_remote_attach): In all-stop mode, mark the
1979 thread as executing.
1980
1981 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1982
1983 * thread.c (thread_apply_all_command): Fix comment.
1984 (thread_command): Fix comment.
1985
1986 2018-04-10 Alan Hayward <alan.hayward@arm.com>
1987
1988 * common/tdesc.h (tdesc_create_feature): Remove xml filename
1989 parameter.
1990 * features/aarch64-core.c (create_feature_aarch64_core):
1991 Regenerate.
1992 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
1993 Likewise.
1994 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
1995 Likewise.
1996 * features/i386/32bit-avx512.c
1997 (create_feature_i386_32bit_avx512): Likewise.
1998 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
1999 Likewise.
2000 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2001 Likewise.
2002 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2003 Likewise.
2004 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2005 Likewise.
2006 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2007 Likewise.
2008 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2009 Likewise.
2010 * features/i386/64bit-avx512.c
2011 (create_feature_i386_64bit_avx512): Likewise.
2012 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2013 Likewise.
2014 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2015 Likewise.
2016 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2017 Likewise.
2018 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2019 Likewise.
2020 * features/i386/64bit-segments.c
2021 (create_feature_i386_64bit_segments): Likewise.
2022 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2023 Likewise.
2024 * features/i386/x32-core.c
2025 (create_feature_i386_x32_core): Likewise.
2026 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2027 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2028 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2029 * target-descriptions.c: In generated code, don't pass xml
2030 filename.
2031
2032 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2033
2034 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2035 (print_xml_feature::visit_post): Likewise.
2036 (print_xml_feature::visit): Likewise.
2037 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2038 (print_xml_feature): Add new class.
2039 * regformats/regdat.sh: Null xmltarget on feature targets.
2040 * target-descriptions.c (struct target_desc): Add xmltarget.
2041 (maintenance_check_tdesc_xml_convert): Add unittest function.
2042 (tdesc_get_features_xml): Add function to get xml.
2043 (maintenance_check_xml_descriptions): Test xml generation.
2044 * xml-tdesc.c (string_read_description_xml): Add function.
2045 * xml-tdesc.h (string_read_description_xml): Add declaration.
2046
2047 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2048
2049 * features/Makefile: Add feature marker to targets with new style
2050 target descriptions.
2051 * regformats/aarch64.dat: Regenerate.
2052 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2053 * regformats/i386/amd64-avx-linux.dat: Likewise.
2054 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2055 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2056 * regformats/i386/amd64-linux.dat: Likewise.
2057 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2058 * regformats/i386/amd64.dat: Likewise.
2059 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2060 * regformats/i386/i386-avx-linux.dat: Likewise.
2061 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2062 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2063 * regformats/i386/i386-linux.dat: Likewise.
2064 * regformats/i386/i386-mmx-linux.dat: Likewise.
2065 * regformats/i386/i386-mpx-linux.dat: Likewise.
2066 * regformats/i386/i386.dat: Likewise.
2067 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2068 * regformats/i386/x32-avx-linux.dat: Likewise.
2069 * regformats/i386/x32-linux.dat: Likewise.
2070 * regformats/tic6x-c62x-linux.dat: Likewise.
2071 * regformats/tic6x-c64x-linux.dat: Likewise.
2072 * regformats/tic6x-c64xp-linux.dat: Likewise.
2073 * regformats/regdat.sh: Parse feature marker.
2074
2075 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2076
2077 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2078 (tdesc_osabi_name): Likewise.
2079 * target-descriptions.c (tdesc_architecture_name): Add new
2080 function.
2081 (tdesc_osabi_name): Likewise.
2082
2083 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2084
2085 * common/tdesc.c (tdesc_predefined_type): Move to here.
2086 (tdesc_named_type): Likewise.
2087 (tdesc_create_vector): Likewise.
2088 (tdesc_create_struct): Likewise.
2089 (tdesc_set_struct_size): Likewise.
2090 (tdesc_create_union): Likewise.
2091 (tdesc_create_flags): Likewise.
2092 (tdesc_create_enum): Likewise.
2093 (tdesc_add_field): Likewise.
2094 (tdesc_add_typed_bitfield): Likewise.
2095 (tdesc_add_bitfield): Likewise.
2096 (tdesc_add_flag): Likewise.
2097 (tdesc_add_enum_value): Likewise.
2098 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2099 (struct tdesc_type_vector): Likewise.
2100 (struct tdesc_type_field): Likewise.
2101 (struct tdesc_type_with_fields): Likewise.
2102 (tdesc_create_enum): Add declaration.
2103 (tdesc_add_typed_bitfield): Likewise.
2104 (tdesc_add_enum_value): Likewise.
2105 * target-descriptions.c (tdesc_type_field): Move from here.
2106 (tdesc_type_builtin): Likewise.
2107 (tdesc_type_vector): Likewise.
2108 (tdesc_type_with_fields): Likewise.
2109 (tdesc_predefined_types): Likewise.
2110 (tdesc_named_type): Likewise.
2111 (tdesc_create_vector): Likewise.
2112 (tdesc_create_struct): Likewise.
2113 (tdesc_set_struct_size): Likewise.
2114 (tdesc_create_union): Likewise.
2115 (tdesc_create_flags): Likewise.
2116 (tdesc_create_enum): Likewise.
2117 (tdesc_add_field): Likewise.
2118 (tdesc_add_typed_bitfield): Likewise.
2119 (tdesc_add_bitfield): Likewise.
2120 (tdesc_add_flag): Likewise.
2121 (tdesc_add_enum_value): Likewise.
2122 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2123 (tdesc_add_typed_bitfield): Likewise.
2124 (tdesc_add_enum_value): Likewise.
2125
2126 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2127
2128 * common/tdesc.c (tdesc_feature::accept): Move to here.
2129 (tdesc_feature::operator==): Likewise.
2130 (tdesc_create_reg): Likewise.
2131 * common/tdesc.h (tdesc_type_kind): Likewise.
2132 (struct tdesc_type): Likewise.
2133 (struct tdesc_feature): Likewise.
2134 * regformats/regdat.sh: Create a feature.
2135 * target-descriptions.c (tdesc_type_kind): Move from here.
2136 (tdesc_type): Likewise.
2137 (tdesc_type_up): Likewise.
2138 (tdesc_feature): Likewise.
2139 (tdesc_create_reg): Likewise.
2140
2141 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2142
2143 * Makefile.in: Add arch/tdesc.c
2144 * common/tdesc.c: New file.
2145 * common/tdesc.h (tdesc_element_visitor): Move to here.
2146 (tdesc_element): Likewise.
2147 (tdesc_reg): Likewise.
2148 (tdesc_reg_up): Likewise.
2149 * regformats/regdef.h (reg): Add offset to constructors.
2150 * target-descriptions.c (tdesc_element_visitor): Move from here.
2151 (tdesc_element): Likewise.
2152 (tdesc_reg): Likewise.
2153 (tdesc_reg_up): Likewise.
2154
2155 2018-04-17 Tom Tromey <tom@tromey.com>
2156
2157 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2158 discriminant field.
2159
2160 2018-04-17 Tom Tromey <tom@tromey.com>
2161
2162 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2163
2164 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2165
2166 * symtab.c (print_symbol_info): Skip printing filename and line
2167 number when `last' is NULL.
2168 (symtab_symbol_info): Use empty string instead of NULL for first
2169 invocation of print_symbol_info.
2170 (rbreak_command): Pass NULL to `last' parameter of
2171 print_symbol_info.
2172
2173 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2174
2175 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2176 instead of nullptr.
2177
2178 2018-04-16 Pedro Alves <palves@redhat.com>
2179
2180 * MAINTAINERS (sh): Remove.
2181 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2182 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2183 (ALLDEPFILES): Remove sh64-tdep.c.
2184 * NEWS: Mentions that support for SH-5/SH64 is removed.
2185 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2186 (sh*-*-openbsd*): Ditto.
2187 (sh64-*-elf*): Remove.
2188 (sh*): Remove.
2189 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2190 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2191 * sh-tdep.c: No longer include "sh64-tdep.h".
2192 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2193 * sh64-tdep.c, sh64-tdep.h: Remove files.
2194
2195 2018-04-16 Pedro Alves <palves@redhat.com>
2196
2197 * MAINTAINERS: Remove m88k.
2198 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2199 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2200 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2201 * NEWS: Mention that support for m88k was removed.
2202 * configure.host (m88*-*-*): Remove support.
2203 * configure.nat (m88k-*-*): Remove support.
2204 * configure.tgt (m88*-*-openbsd*): Remove.
2205 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2206
2207 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2208
2209 * configure.tgt (x86_tobjs): New variable.
2210 (amd64_tobjs, i386_tobjs): Use it.
2211
2212 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2213
2214 * symtab.c (print_symbol_info): Precede the symbol definition by
2215 the line number when available.
2216 * NEWS: Advertise this enhancement.
2217
2218 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2219
2220 * NEWS (New options): announce set/show record btrace cpu.
2221 * btrace.c: Include record-btrace.h.
2222 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2223 the vendor is unknown.
2224 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2225 Maybe overwrite the btrace configuration's cpu.
2226 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2227 (btrace_fetch): Add cpu parameter. Update callers.
2228 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2229 Maybe overwrite the btrace configuration's cpu. Skip enabling
2230 errata workarounds if the vendor is unknown.
2231 * python/py-record-btrace.c: Include record-btrace.h.
2232 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2233 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2234 * record-btrace.c (record_btrace_cpu_state_kind): New.
2235 (record_btrace_cpu): New.
2236 (set_record_btrace_cpu_cmdlist): New.
2237 (record_btrace_get_cpu): New.
2238 (require_btrace_thread, record_btrace_info)
2239 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2240 (cmd_set_record_btrace_cpu_none): New.
2241 (cmd_set_record_btrace_cpu_auto): New.
2242 (cmd_set_record_btrace_cpu): New.
2243 (cmd_show_record_btrace_cpu): New.
2244 (_initialize_record_btrace): Initialize set/show record btrace cpu
2245 commands.
2246 * record-btrace.h (record_btrace_get_cpu): New.
2247
2248 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2249
2250 * record.c (set_record_command): Fix typo in message.
2251
2252 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2253
2254 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2255
2256 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2257
2258 * infrun.c (process_event_stop_test): Call
2259 gdbarch_in_indirect_branch_thunk.
2260 * gdbarch.sh (in_indirect_branch_thunk): New.
2261 * gdbarch.c: Regenerated.
2262 * gdbarch.h: Regenerated.
2263 * x86-tdep.h: New.
2264 * x86-tdep.c: New.
2265 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2266 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2267 (ALLDEPFILES): Add x86-tdep.c.
2268 * arch-utils.h (default_in_indirect_branch_thunk): New.
2269 * arch-utils.c (default_in_indirect_branch_thunk): New.
2270 * i386-tdep: Include x86-tdep.h.
2271 (i386_in_indirect_branch_thunk): New.
2272 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2273 function.
2274 * amd64-tdep: Include x86-tdep.h.
2275 (amd64_in_indirect_branch_thunk): New.
2276 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2277
2278 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2279
2280 PR gdb/23053
2281 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2282 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2283 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2284 regression.
2285
2286 2018-04-12 Tom Tromey <tom@tromey.com>
2287
2288 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2289 (rust_evaluate_subexp): Likewise.
2290
2291 2018-04-12 Pedro Alves <palves@redhat.com>
2292
2293 * procfs.c (procfs_detach): Make forward declaration's prototype
2294 match definition's protototype.
2295 (proc_get_LDT_entry): Remove stale do_cleanups call.
2296
2297 2018-04-12 Pedro Alves <palves@redhat.com>
2298
2299 * target.h (target_ops::to_has_exited): Delete.
2300 (target_has_exited): Delete.
2301 * target-delegates.c: Regenerate.
2302
2303 2018-04-11 Pedro Alves <palves@redhat.com>
2304
2305 * target.c (fileio_fh_t::t): Add comment.
2306 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2307 (target_fileio_close): Handle a NULL target.
2308 (invalidate_fileio_fh): New.
2309 (target_close): Call it.
2310 * remote.c (remote_hostio_send_command): No longer check whether
2311 remote_desc is open.
2312
2313 2018-04-11 Pedro Alves <palves@redhat.com>
2314
2315 * target.c (fileio_fh_t): Make it a named struct instead of a
2316 typedef.
2317 (fileio_fh_t::is_closed): New method.
2318 (DEF_VEC_O (fileio_fh_t)): Remove.
2319 (fileio_fhandles): Now a std::vector.
2320 (is_closed_fileio_fh): Delete.
2321 (acquire_fileio_fd): Adjust. Rename parameters.
2322 (release_fileio_fd): Adjust.
2323 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2324 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2325 (target_fileio_close): Adjust.
2326
2327 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2328
2329 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2330 index.
2331
2332 2018-04-10 Pedro Alves <palves@redhat.com>
2333
2334 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2335 (scoped_finish_thread_state): New class.
2336 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2337 cleanup.
2338 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2339 (fetch_inferior_event, normal_stop): Likewise.
2340 * thread.c (finish_thread_state_cleanup): Delete.
2341
2342 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2343 Pedro Alves <palves@redhat.com>
2344
2345 * value.c: Include "selftest.h" and "common/array-view.h".
2346 (struct range) <operator ==>: New.
2347 (test_ranges_contain): New.
2348 (check_ranges_vector): New.
2349 (test_insert_into_bit_range_vector): New.
2350 (_initialize_values): Register selftests.
2351 * common/array-view.h (operator==, operator!=): New.
2352
2353 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2354
2355 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2356 an iterator.
2357 * inline-frame.c: Include <algorithm>.
2358 (struct inline_state): Add constructor.
2359 (inline_state_s): Remove.
2360 (DEF_VEC_O(inline_state_s)): Remove.
2361 (inline_states): Change type to std::vector.
2362 (find_inline_frame_state): Adjust to std::vector.
2363 (allocate_inline_frame_state): Remove.
2364 (clear_inline_frame_state): Adjust to std::vector.
2365 (skip_inline_frames): Adjust to std::vector.
2366
2367 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2368
2369 * tracepoint.h (struct trace_state_variable): Add constructor.
2370 <name>: Change type to std::string.
2371 * tracepoint.c (tsv_s): Remove.
2372 (DEF_VEC_O(tsv_s)): Remove.
2373 (tvariables): Change to std::vector.
2374 (create_trace_state_variable): Adjust to std::vector.
2375 (find_trace_state_variable): Likewise.
2376 (find_trace_state_variable_by_number): Likewise.
2377 (delete_trace_state_variable): Likewise.
2378 (trace_variable_command): Adjust to std::string.
2379 (delete_trace_variable_command): Likewise.
2380 (tvariables_info_1): Adjust to std::vector.
2381 (save_trace_state_variables): Likewise.
2382 (start_tracing): Likewise.
2383 (merge_uploaded_trace_state_variables): Adjust to std::vector
2384 and std::string.
2385 * target.h (struct target_ops)
2386 <to_download_trace_state_variable>: Pass reference to
2387 trace_state_variable.
2388 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2389 * target-delegates.c: Re-generate.
2390 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2391 (mi_tsv_deleted): Likewise.
2392 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2393 * remote.c (remote_download_trace_state_variable): Change
2394 pointer to reference and adjust.
2395 * make-target-delegates (parse_argtypes): Handle references.
2396 (write_function_header): Likewise.
2397 (munge_type): Likewise.
2398
2399 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2402 string_view-selftests.c.
2403 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2404 testsuite.
2405 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2406 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2407 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2408 * unittests/basic_string_view/element_access/char/1.cc:
2409 Likewise.
2410 * unittests/basic_string_view/element_access/char/empty.cc:
2411 Likewise.
2412 * unittests/basic_string_view/element_access/char/front_back.cc:
2413 Likewise.
2414 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2415 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2416 Likewise.
2417 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2418 Likewise.
2419 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2420 Likewise.
2421 * unittests/basic_string_view/operations/compare/char/1.cc:
2422 Likewise.
2423 * unittests/basic_string_view/operations/compare/char/13650.cc:
2424 Likewise.
2425 * unittests/basic_string_view/operations/copy/char/1.cc:
2426 Likewise.
2427 * unittests/basic_string_view/operations/data/char/1.cc:
2428 Likewise.
2429 * unittests/basic_string_view/operations/find/char/1.cc:
2430 Likewise.
2431 * unittests/basic_string_view/operations/find/char/2.cc:
2432 Likewise.
2433 * unittests/basic_string_view/operations/find/char/3.cc:
2434 Likewise.
2435 * unittests/basic_string_view/operations/find/char/4.cc:
2436 Likewise.
2437 * unittests/basic_string_view/operations/rfind/char/1.cc:
2438 Likewise.
2439 * unittests/basic_string_view/operations/rfind/char/2.cc:
2440 Likewise.
2441 * unittests/basic_string_view/operations/rfind/char/3.cc:
2442 Likewise.
2443 * unittests/basic_string_view/operations/substr/char/1.cc:
2444 Likewise.
2445 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2446 * unittests/string_view-selftests.c: New file.
2447
2448 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2449
2450 * unittests/basic_string_view/capacity/1.cc: New file.
2451 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2452 * unittests/basic_string_view/cons/char/1.cc: New file.
2453 * unittests/basic_string_view/cons/char/2.cc: New file.
2454 * unittests/basic_string_view/cons/char/3.cc: New file.
2455 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2456 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2457 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2458 * unittests/basic_string_view/element_access/char/1.cc: New file.
2459 * unittests/basic_string_view/element_access/char/2.cc: New file.
2460 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2461 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2462 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2463 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2464 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2465 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2466 * unittests/basic_string_view/include.cc: New file.
2467 * unittests/basic_string_view/inserters/char/1.cc: New file.
2468 * unittests/basic_string_view/inserters/char/2.cc: New file.
2469 * unittests/basic_string_view/inserters/char/3.cc: New file.
2470 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2471 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2472 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2473 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2474 * unittests/basic_string_view/literals/types.cc: New file.
2475 * unittests/basic_string_view/literals/values.cc: New file.
2476 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2477 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2478 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2479 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2480 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2481 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2482 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2483 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2484 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2485 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2486 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2487 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2488 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2489 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2490 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2491 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2492 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2493 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2494 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2495 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2496 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2497 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2498 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2499 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2500 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2501 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2502 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2503 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2504 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2505 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2506 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2507 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2508 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2509 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2510 * unittests/basic_string_view/operators/char/2.cc: New file.
2511 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2512 * unittests/basic_string_view/range_access/char/1.cc: New file.
2513 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2514 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2515 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2516 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2517 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2518 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2519 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2520 * unittests/basic_string_view/typedefs.cc: New file.
2521 * unittests/basic_string_view/types/1.cc: New file.
2522
2523 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2524
2525 * common/gdb_string_view.h: Remove libstdc++ implementation
2526 details, adjust to gdb reality.
2527 * common/gdb_string_view.tcc: Likewise.
2528 * cli/cli-script.c (struct string_view): Remove.
2529 (user_args) <m_args>: Change element type to gdb::string_view.
2530 (user_args::insert_args): Adjust.
2531
2532 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2533
2534 * common/gdb_string_view.h: New file.
2535 * common/gdb_string_view.tcc: New file.
2536
2537 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2540 * configure: Re-generate.
2541
2542 2018-04-09 Pedro Alves <palves@redhat.com>
2543
2544 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2545 (set_target_gdbarch): Call
2546 gdb::observers::architecture_changed.notify instead of
2547 observer_notify_architecture_changed.
2548
2549 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2552 (do_restore_current_traceframe_cleanup): Remove.
2553 (restore_current_traceframe_cleanup_dtor): Remove.
2554 (make_cleanup_restore_current_traceframe): Remove.
2555 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2556 New.
2557 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2558 * infrun.c (fetch_inferior_event): Use
2559 scoped_restore_current_traceframe.
2560
2561 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2562
2563 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2564 Remove.
2565 <n_allocated_type_units>: Remove.
2566 <all_type_units>: Change to std::vector.
2567 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2568 to std::vector change.
2569 (dwarf2_per_objfile::get_cutu): Likewise.
2570 (dwarf2_per_objfile::get_tu): Likewise.
2571 (create_signatured_type_table_from_index): Likewise.
2572 (create_signatured_type_table_from_debug_names): Likewise.
2573 (dw2_symtab_iter_next): Likewise.
2574 (dw2_print_stats): Likewise.
2575 (dw2_expand_all_symtabs): Likewise.
2576 (dw2_expand_marked_cus): Likewise.
2577 (dw2_debug_names_iterator::next): Likewise.
2578 (dwarf2_initialize_objfile): Likewise.
2579 (add_signatured_type_cu_to_table): Likewise.
2580 (create_all_type_units): Likewise.
2581 (add_type_unit): Likewise.
2582 (struct tu_abbrev_offset): Add constructor.
2583 (build_type_psymtabs_1): Adjust to std::vector change.
2584 (print_tu_stats): Likewise.
2585 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2586 (write_debug_names): Likewise.
2587
2588 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2589
2590 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2591 Make an std::vector.
2592 <n_comp_units>: Remove.
2593 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2594 to std::vector change.
2595 (dwarf2_per_objfile::get_cutu): Likewise.
2596 (dwarf2_per_objfile::get_cu): Likewise.
2597 (create_cus_from_index): Likewise.
2598 (create_addrmap_from_index): Likewise.
2599 (create_addrmap_from_aranges): Likewise.
2600 (dwarf2_read_index): Likewise.
2601 (dw2_find_last_source_symtab): Likewise.
2602 (dw2_map_symtabs_matching_filename): Likewise.
2603 (dw2_symtab_iter_next): Likewise.
2604 (dw2_print_stats): Likewise.
2605 (dw2_expand_all_symtabs): Likewise.
2606 (dw2_expand_symtabs_with_fullname): Likewise.
2607 (dw2_expand_marked_cus): Likewise.
2608 (dw2_map_symbol_filenames): Likewise.
2609 (create_cus_from_debug_names): Likewise.
2610 (dwarf2_read_debug_names): Likewise.
2611 (dw2_debug_names_iterator::next): Likewise.
2612 (dwarf2_initialize_objfile): Likewise.
2613 (set_partial_user): Likewise.
2614 (dwarf2_build_psymtabs_hard): Likewise.
2615 (read_comp_units_from_section): Remove arguments, adjust to
2616 std::vector change.
2617 (create_all_comp_units): Adjust to std::vector and
2618 read_comp_units_from_section changes.
2619 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2620 change.
2621 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2622 (psyms_seen_size): Likewise.
2623 (write_gdbindex): Likewise.
2624 (write_debug_names): Likewise.
2625
2626 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2627
2628 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2629 with dwarf2_per_objfile.
2630 (create_cus_from_index): Likewise.
2631 (create_signatured_type_table_from_index): Likewise.
2632 (dwarf2_read_index): Likewise.
2633 (dwarf2_initialize_objfile): Likewise.
2634 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2635 per_cu rather than get_dwarf2_per_objfile.
2636
2637 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2638
2639 * dwarf2read.h (struct signatured_type): Forward declare.
2640 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2641 New methods.
2642 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2643 (dw2_get_cutu): ...this.
2644 (dwarf2_per_objfile::get_cu): Rename from...
2645 (dw2_get_cu): ...this.
2646 (dwarf2_per_objfile::get_tu): New.
2647 (create_addrmap_from_index): Adjust.
2648 (create_addrmap_from_aranges): Adjust.
2649 (dw2_find_last_source_symtab): Adjust.
2650 (dw2_map_symtabs_matching_filename): Adjust.
2651 (dw2_symtab_iter_next): Adjust.
2652 (dw2_print_stats): Adjust.
2653 (dw2_expand_all_symtabs): Adjust.
2654 (dw2_expand_symtabs_with_fullname): Adjust.
2655 (dw2_expand_marked_cus): Adjust.
2656 (dw_expand_symtabs_matching_file_matcher): Adjust.
2657 (dw2_map_symbol_filenames): Adjust.
2658 (dw2_debug_names_iterator::next): Adjust.
2659 (dwarf2_initialize_objfile): Adjust.
2660 (set_partial_user): Adjust.
2661 (dwarf2_build_psymtabs_hard): Adjust.
2662
2663 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2664
2665 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2666 Remove unused variables.
2667 (dw2_map_symtabs_matching_filename): Likewise.
2668 (dwarf2_record_block_ranges): Likewise.
2669 (dwarf2_read_addr_index): Likewise.
2670 (follow_die_offset): Likewise.
2671
2672 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2673
2674 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2675 to symbol_file_add_main.
2676
2677 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2678
2679 PR mi/22299
2680 * mi/mi-console.c (do_fputc_async_safe): New.
2681 (mi_console_file::write_async_safe): New.
2682 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2683 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2684 New.
2685 * ui-file.c (ui_file::putstrn): Adjust call to
2686 fputstrn_unfiltered.
2687 * utils.c (printchar): Replace do_fputs and do_fprintf
2688 parameters by do_fputc.
2689 (fputstr_filtered): Adjust call to printchar.
2690 (fputstr_unfiltered): Likewise.
2691 (fputstrn_filtered): Likewise.
2692 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2693 printchar.
2694 * utils.h (do_fputc_ftype): New typedef.
2695 (fputstrn_unfiltered): Add do_fputc parameter.
2696
2697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2698
2699 * regformats/i386/i386-avx.dat: Remove.
2700
2701 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 PR gdb/22979
2704 * amd64-tdep.c (amd64_none_init_abi): New function.
2705 (amd64_x32_none_init_abi): New function.
2706 (_initialize_amd64_tdep): Register handlers for x86-64 and
2707 x64_32 with GDB_OSABI_NONE.
2708 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2709 GDB_OSABI_NONE osabi.
2710
2711 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2712
2713 PR gdb/22980
2714 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2715 GDB_OSABI_NONE.
2716 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2717 * osabi.c (gdb_osabi_names): Add "unknown" entry.
2718
2719 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2720
2721 * common/byte-vector.h (char_vector): New type.
2722 * target.h (target_read_alloc): Return
2723 gdb::optional<byte_vector>.
2724 (target_read_stralloc): Return gdb::optional<char_vector>.
2725 (target_get_osdata): Return gdb::optional<char_vector>.
2726 * target.c (target_read_alloc_1): Templatize. Replacement
2727 manual memory management with vector.
2728 (target_read_alloc): Change return type, adjust.
2729 (target_read_stralloc): Change return type, adjust.
2730 (target_get_osdata): Change return type, adjust.
2731 * auxv.c (struct auxv_info) <length>: Remove.
2732 <data>: Change type to gdb::optional<byte_vector>.
2733 (auxv_inferior_data_cleanup): Free auxv_info with delete.
2734 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2735 (target_auxv_search): Adjust.
2736 (fprint_target_auxv): Adjust.
2737 * avr-tdep.c (avr_io_reg_read_command): Adjust.
2738 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2739 (linux_make_corefile_notes): Adjust.
2740 * osdata.c (get_osdata): Adjust.
2741 * remote.c (remote_get_threads_with_qxfer): Adjust.
2742 (remote_memory_map): Adjust.
2743 (remote_traceframe_info): Adjust.
2744 (btrace_read_config): Adjust.
2745 (remote_read_btrace): Adjust.
2746 (remote_pid_to_exec_file): Adjust.
2747 * solib-aix.c (solib_aix_get_library_list): Adjust.
2748 * solib-dsbt.c (decode_loadmap): Don't free buf.
2749 (dsbt_get_initial_loadmaps): Adjust.
2750 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2751 * solib-target.c (solib_target_current_sos): Adjust.
2752 * tracepoint.c (sdata_make_value): Adjust.
2753 * xml-support.c (xinclude_start_include): Adjust.
2754 (xml_fetch_content_from_file): Adjust.
2755 * xml-support.h (xml_fetch_another): Change return type.
2756 (xml_fetch_content_from_file): Change return type.
2757 * xml-syscall.c (xml_init_syscalls_info): Adjust.
2758 * xml-tdesc.c (file_read_description_xml): Adjust.
2759 (fetch_available_features_from_target): Change return type.
2760 (target_fetch_description_xml): Adjust.
2761 (target_read_description_xml): Adjust.
2762
2763 2018-04-06 Tom Tromey <tom@tromey.com>
2764
2765 * value.c (~value): Update.
2766 (struct value) <contents>: Now unique_xmalloc_ptr.
2767 (value_contents_bits_eq, allocate_value_contents)
2768 (value_contents_raw, value_contents_all_raw)
2769 (value_contents_for_printing, value_contents_for_printing_const)
2770 (set_value_enclosing_type): Update.
2771
2772 2018-04-06 Tom Tromey <tom@tromey.com>
2773
2774 * value.c (range_s): Remove typedef, VEC.
2775 (struct range): Add operator<.
2776 (range_lessthan): Remove.
2777 (ranges_contain): Change type.
2778 (~value): Update.
2779 (struct value) <unavailable, optimized_out>: Now std::vector.
2780 (value_entirely_available)
2781 (value_entirely_covered_by_range_vector)
2782 (value_entirely_unavailable, value_entirely_optimized_out):
2783 Update.
2784 (insert_into_bit_range_vector): Change argument type.
2785 (find_first_range_overlap): Likewise.
2786 (struct ranges_and_idx, value_contents_bits_eq)
2787 (require_not_optimized_out, require_available): Update.
2788 (ranges_copy_adjusted): Change argument types.
2789 (value_optimized_out, value_copy, value_fetch_lazy): Update.
2790
2791 2018-04-06 Tom Tromey <tom@tromey.com>
2792
2793 * value.c (~value): Update.
2794 (struct value) <parent>: Now a value_ref_ptr.
2795 (value_parent, set_value_parent, value_address, value_copy):
2796 Update.
2797
2798 2018-04-06 Tom Tromey <tom@tromey.com>
2799
2800 * value.c (struct value): Add constructor, destructor, and member
2801 initializers.
2802 (allocate_value_lazy, value_decref): Update.
2803
2804 2018-04-06 Tom Tromey <tom@tromey.com>
2805
2806 * value.c (struct value) <released, next>: Remove.
2807 (all_values): Now a std::vector.
2808 (allocate_value_lazy): Update.
2809 (value_next): Remove.
2810 (value_mark, value_free_to_mark, release_value)
2811 (value_release_to_mark): Update.
2812
2813 2018-04-06 Tom Tromey <tom@tromey.com>
2814
2815 * value.h (fetch_subexp_value, value_release_to_mark): Update.
2816 (free_value_chain): Remove.
2817 * value.c (free_value_chain): Remove.
2818 (value_release_to_mark): Return a std::vector.
2819 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2820 std::vector.
2821 (check_condition): Update.
2822 * eval.c (fetch_subexp_value): Change "val_chain" to a
2823 std::vector.
2824 * breakpoint.c (update_watchpoint): Update.
2825 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2826
2827 2018-04-06 Tom Tromey <tom@tromey.com>
2828
2829 * value.h (free_all_values): Remove.
2830 * value.c (free_all_values): Remove.
2831
2832 2018-04-06 Tom Tromey <tom@tromey.com>
2833
2834 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2835 (value_history_chain, value_history_count): Remove.
2836 (value_history): New global.
2837 (record_latest_value, access_value_history, show_values)
2838 (preserve_values): Update.
2839
2840 2018-04-06 Tom Tromey <tom@tromey.com>
2841
2842 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2843 * varobj.c (varobj_set_display_format, varobj_set_value)
2844 (install_default_visualizer, construct_visualizer)
2845 (install_new_value, ~varobj, varobj_get_value_type)
2846 (my_value_of_variable, varobj_editable_p): Update.
2847 * c-varobj.c (c_describe_child, c_value_of_variable)
2848 (cplus_number_of_children, cplus_describe_child): Update.
2849 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2850 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2851 (ada_value_of_variable, ada_value_is_changeable_p): Update.
2852
2853 2018-04-06 Tom Tromey <tom@tromey.com>
2854
2855 * printcmd.c (last_examine_address): Change type to
2856 value_ref_ptr.
2857 (do_examine, x_command): Update.
2858
2859 2018-04-06 Tom Tromey <tom@tromey.com>
2860
2861 * value.c (release_value): Update.
2862 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2863 (struct bpstats) <val>: Now a value_ref_ptr.
2864 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2865 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2866 (~watchpoint, print_it_watchpoint, watch_command_1)
2867 (invalidate_bp_value_on_memory_change): Update.
2868
2869 2018-04-06 Tom Tromey <tom@tromey.com>
2870
2871 * varobj.c (varobj_clear_saved_item)
2872 (update_dynamic_varobj_children, install_new_value, ~varobj):
2873 Update.
2874 * value.h (value_incref): Move declaration earlier.
2875 (value_decref): Rename from value_free.
2876 (struct value_ref_policy): New.
2877 (value_ref_ptr): New typedef.
2878 (struct value_deleter): Remove.
2879 (gdb_value_up): Remove typedef.
2880 (release_value): Change return type.
2881 (release_value_or_incref): Remove.
2882 * value.c (set_value_parent): Update.
2883 (value_incref): Change return type.
2884 (value_decref): Rename from value_free.
2885 (value_free_to_mark, free_all_values, free_value_chain): Update.
2886 (release_value): Return value_ref_ptr.
2887 (release_value_or_incref): Remove.
2888 (record_latest_value, set_internalvar, clear_internalvar):
2889 Update.
2890 * stack.c (info_frame_command): Don't call value_free.
2891 * python/py-value.c (valpy_dealloc, valpy_new)
2892 (value_to_value_object): Update.
2893 * printcmd.c (do_examine): Update.
2894 * opencl-lang.c (lval_func_free_closure): Update.
2895 * mi/mi-main.c (register_changed_p): Don't call value_free.
2896 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
2897 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
2898 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
2899 value_free.
2900 * guile/scm-value.c (vlscm_free_value_smob)
2901 (vlscm_scm_from_value): Update.
2902 * frame.c (frame_register_unwind, frame_unwind_register_signed)
2903 (frame_unwind_register_unsigned, get_frame_register_bytes)
2904 (put_frame_register_bytes): Don't call value_free.
2905 * findvar.c (address_from_register): Don't call value_free.
2906 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
2907 * dwarf2loc.c (entry_data_value_free_closure)
2908 (value_of_dwarf_reg_entry, free_pieced_value_closure)
2909 (dwarf2_evaluate_loc_desc_full): Update.
2910 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2911 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2912 (~watchpoint, watch_command_1)
2913 (invalidate_bp_value_on_memory_change): Update.
2914 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
2915
2916 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
2917
2918 PR gdb/23022
2919 * warning.m4: Add -Wno-error=deprecated-register.
2920 * configure: Re-generate.
2921
2922 2018-04-05 Tom Tromey <tom@tromey.com>
2923
2924 * linespec.h: Remove include of "vec.h".
2925
2926 2018-04-05 Tom Tromey <tom@tromey.com>
2927
2928 * linespec.c (typep): Remove typedef.
2929 (find_methods, find_superclass_methods): Take a std::vector.
2930 (find_method): Use std::vector.
2931
2932 2018-04-05 Tom Tromey <tom@tromey.com>
2933
2934 * utils.c (compare_strings): Remove.
2935 * utils.h (compare_strings): Remove.
2936 * objc-lang.h (find_imps): Update.
2937 * objc-lang.c (find_methods): Take a std::vector.
2938 (uniquify_strings, find_imps): Likewise.
2939 * linespec.c (find_methods): Take a std::vector.
2940 (decode_objc): Use std::vector.
2941 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
2942 a std::vector.
2943 (find_method, find_function_symbols): Use std::vector.
2944
2945 2018-04-05 Tom Tromey <tom@tromey.com>
2946
2947 * completer.c (completion_tracker::completion_tracker): Remove
2948 cast.
2949 (completion_tracker::discard_completions): Likewise.
2950 * breakpoint.c (ambiguous_names_p): Remove cast.
2951 * ada-lang.c (_initialize_ada_language): Remove cast.
2952 * utils.h (streq): Update.
2953 (streq_hash): Add new declaration.
2954 * utils.c (streq): Return bool.
2955 (streq_hash): New function.
2956
2957 2018-04-05 Tom Tromey <tom@tromey.com>
2958
2959 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
2960 Remove a string copy.
2961
2962 2018-04-05 Tom Tromey <tom@tromey.com>
2963
2964 * linespec.c (filter_results): Use std::vector.
2965 (decode_line_2, decode_line_full): Update.
2966
2967 2018-04-05 Tom Tromey <tom@tromey.com>
2968
2969 * linespec.c (canonical_to_fullform): Return std::string.
2970 (filter_results): Update.
2971 (struct decode_line_2_item): Add constructor.
2972 <fullform, displayform>: Now std::string.
2973 (decode_line_2_compare_items): Now a std::sort comparator.
2974 (decode_line_2): Update.
2975
2976 2018-04-05 Tom Tromey <tom@tromey.com>
2977
2978 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
2979 (unexpected_linespec_error): Update.
2980 (linespec_parse_basic, parse_linespec): Update.
2981
2982 2018-04-05 Tom Tromey <tom@tromey.com>
2983
2984 * linespec.c (linespec_parse_basic): Reindent.
2985
2986 2018-04-05 Tom Tromey <tom@tromey.com>
2987
2988 * minsyms.h (iterate_over_minimal_symbols): Update.
2989 * minsyms.c (iterate_over_minimal_symbols): Take a
2990 gdb::function_view.
2991 * linespec.c (struct collect_minsyms): Remove.
2992 (compare_msyms): Now a std::sort comparator.
2993 (add_minsym): Add parameters.
2994 (search_minsyms_for_name): Update. Use std::vector.
2995
2996 2018-04-03 Tom Tromey <tom@tromey.com>
2997
2998 * mipsread.c (read_alphacoff_dynamic_symtab): Use
2999 gdb::byte_vector.
3000
3001 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3002
3003 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3004
3005 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3006
3007 PR gdb/16959
3008 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3009 printing static type.
3010
3011 2018-04-01 Tom Tromey <tom@tromey.com>
3012
3013 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3014 (rs6000_xfer_shared_libraries): Update.
3015
3016 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3017
3018 * common/gdb_vecs.h (char_ptr): Remove.
3019 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3020
3021 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3022
3023 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3024 with std::vector.
3025 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3026
3027 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * tracepoint.h (struct uploaded_tp): Initialize fields.
3030 <actions, step_actions, cmd_strings>: Change type to
3031 std::vector<char *>.
3032 * tracepoint.c (get_uploaded_tp): Allocate with new.
3033 (free_uploaded_tps): Free with delete.
3034 (parse_tracepoint_definition): Adjust to std::vector change.
3035 * breakpoint.c (read_uploaded_action): Likewise.
3036 (create_tracepoint_from_upload): Likewise.
3037 * ctf.c (ctf_write_uploaded_tp): Likewise.
3038 (SET_ARRAY_FIELD): Likewise.
3039 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3040
3041 2018-03-30 Tom Tromey <tom@tromey.com>
3042
3043 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3044 std::unique_ptr.
3045 (svr4_keep_data_in_core): Update.
3046 (svr4_read_so_list): Update.
3047
3048 2018-03-30 Tom Tromey <tom@tromey.com>
3049
3050 * windows-nat.c (handle_output_debug_string, handle_exception):
3051 Update.
3052 * target.h (target_read_string): Update.
3053 * target.c (target_read_string): Change "string" to
3054 unique_xmalloc_ptr.
3055 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3056 Update.
3057 * solib-frv.c (frv_current_sos): Update.
3058 * solib-dsbt.c (dsbt_current_sos): Update.
3059 * solib-darwin.c (darwin_current_sos): Update.
3060 * linux-thread-db.c (inferior_has_bug): Update.
3061 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3062 Update. Remove alloca.
3063 * ada-lang.c (ada_main_name): Update.
3064
3065 2018-03-30 Tom Tromey <tom@tromey.com>
3066
3067 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3068 (struct dwo_file_deleter): New.
3069 (dwo_file_up): New typedef.
3070 (open_and_init_dwo_file): Use dwo_file_up.
3071 (free_dwo_file_cleanup): Remove.
3072
3073 2018-03-30 Tom Tromey <tom@tromey.com>
3074
3075 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3076 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3077
3078 2018-03-30 Tom Tromey <tom@tromey.com>
3079
3080 * dwarf2read.c (class free_cached_comp_units): New class.
3081 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3082 (free_cached_comp_units): Remove function.
3083
3084 2018-03-30 Tom Tromey <tom@tromey.com>
3085
3086 * utils.h (make_cleanup_unpush_target): Remove.
3087 * inf-ptrace.c (struct target_unpusher): New.
3088 (target_unpush_up) New typedef.
3089 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3090 target_unpush_up.
3091 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3092
3093 2018-03-27 Tom Tromey <tom@tromey.com>
3094
3095 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3096
3097 2018-03-27 Pedro Alves <palves@redhat.com>
3098 Tom Tromey <tom@tromey.com>
3099
3100 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3101 destructor. Now a class.
3102 (gdb_readline_wrapper_cleanup): Remove function.
3103 (gdb_readline_wrapper): Remove cleanups.
3104
3105 2018-03-27 Tom Tromey <tom@tromey.com>
3106
3107 * typeprint.h (struct type_print_options) <local_typedefs,
3108 global_typedefs>: Remove "struct" keyword.
3109 (class typedef_hash_table): New class.
3110 (recursively_update_typedef_hash, add_template_parameters)
3111 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3112 (find_typedef_in_hash): Don't declare.
3113 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3114 (typedef_hash_table::recursively_update): Rename from
3115 recursively_update_typedef_hash. Now a member.
3116 (typedef_hash_table::add_template_parameters): Rename from
3117 add_template_parameters. Now a member.
3118 (typedef_hash_table::typedef_hash_table): Now a constructor;
3119 rename from create_typedef_hash.
3120 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3121 rename from free_typedef_hash.
3122 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3123 (do_free_global_table): Remove.
3124 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3125 from copy_type_recursive.
3126 (create_global_typedef_table): Remove.
3127 (typedef_hash_table::find_global_typedef): Now a member of
3128 typedef_hash_table.
3129 (typedef_hash_table::find_typedef): Rename from
3130 find_typedef_in_hash; now a member.
3131 (whatis_exp): Update.
3132 * extension.h (struct ext_lang_type_printers): Add constructor and
3133 destructor.
3134 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3135 declare.
3136 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3137 Now a constructor; rename from start_ext_lang_type_printers.
3138 (ext_lang_type_printers): Now a destructor; rename from
3139 free_ext_lang_type_printers.
3140 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3141 Update.
3142 (c_type_print_base_struct_union): Update. Remove cleanups.
3143
3144 2018-03-27 Tom Tromey <tom@tromey.com>
3145
3146 * dwarf-index-write.c: Include <cmath>.
3147
3148 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3149
3150 * NEWS: Add entry describing new "set|show varsize-limit" command.
3151 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3152 command.
3153 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3154 "set variable".
3155
3156 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3157
3158 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3159 dwarf-index-write.c
3160 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3161 * dwarf-index-common.c: New file.
3162 * dwarf-index-common.h: New file.
3163 * dwarf-index-write.c: New file.
3164 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3165 (struct dwarf2_section_info): Move from here.
3166 (dwarf2_section_info_def): Likewise.
3167 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3168 (offset_type): Likewise.
3169 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3170 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3171 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3172 (byte_swap): Likewise.
3173 (MAYBE_SWAP): Likewise.
3174 (dwarf2_per_cu_ptr): Likewise.
3175 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3176 (struct tu_stats): Likewise.
3177 (struct dwarf2_per_objfile): Likewise.
3178 (struct dwarf2_per_cu_data): Likewise.
3179 (struct signatured_type): Likewise.
3180 (sig_type_ptr): Likewise.
3181 (DEF_VEC_P (sig_type_ptr)): Likewise.
3182 (INDEX4_SUFFIX): Likewise.
3183 (INDEX5_SUFFIX): Likewise.
3184 (DEBUG_STR_SUFFIX): Likewise.
3185 (dwarf2_read_section): Make non-static.
3186 (mapped_index_string_hash): Move from here.
3187 (dwarf5_djb_hash): Likewise.
3188 (file_write): Likewise.
3189 (class data_buf): Likewise.
3190 (struct symtab_index_entry): Likewise.
3191 (struct mapped_symtab): Likewise.
3192 (find_slot): Likewise.
3193 (hash_expand): Likewise.
3194 (add_index_entry): Likewise.
3195 (uniquify_cu_indices): Likewise.
3196 (class c_str_view): Likewise.
3197 (class c_str_view_hasher): Likewise.
3198 (class vector_hasher): Likewise.
3199 (write_hash_table): Likewise.
3200 (psym_index_map): Likewise.
3201 (struct addrmap_index_data): Likewise.
3202 (add_address_entry): Likewise.
3203 (add_address_entry_worker): Likewise.
3204 (write_address_map): Likewise.
3205 (symbol_kind): Likewise.
3206 (write_psymbols): Likewise.
3207 (struct signatured_type_index_data): Likewise.
3208 (write_one_signatured_type): Likewise.
3209 (recursively_count_psymbols): Likewise.
3210 (recursively_write_psymbols): Likewise.
3211 (class debug_names): Likewise.
3212 (check_dwarf64_offsets): Likewise.
3213 (psyms_seen_size): Likewise.
3214 (write_gdbindex): Likewise.
3215 (write_debug_names): Likewise.
3216 (assert_file_size): Likewise.
3217 (write_psymtabs_to_index): Likewise.
3218 (save_gdb_index_command): Likewise.
3219 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3220 command.
3221 * dwarf2read.h: New file.
3222
3223 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3224
3225 PR gdb/22670
3226 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3227 symbol name if the CU's language stores symbol names in linkage
3228 format.
3229 * language.h (struct language_defn)
3230 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3231 all instances of this struct.
3232
3233 2018-03-26 Tom Tromey <tom@tromey.com>
3234
3235 * stack.c (backtrace_command_1): Remove verbose code.
3236
3237 2018-03-26 Tom Tromey <tom@tromey.com>
3238
3239 * python/py-framefilter.c (py_print_type): Don't catch
3240 exceptions. Return void.
3241 (py_print_value): Likewise.
3242 (py_print_single_arg): Likewise.
3243 (enumerate_args): Don't catch exceptions.
3244 (py_print_args): Likewise.
3245 (py_print_frame): Likewise.
3246 (gdbpy_apply_frame_filter): Catch exceptions here.
3247
3248 2018-03-26 Tom Tromey <tom@tromey.com>
3249
3250 * stack.c (_initialize_stack): Remove trailing newlines from help
3251 text. Add "Usage" line to "backtrace" help.
3252
3253 2018-03-26 Tom Tromey <tom@tromey.com>
3254
3255 PR python/16486:
3256 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3257
3258 2018-03-26 Tom Tromey <tom@tromey.com>
3259
3260 * python/py-framefilter.c (py_print_single_arg): Return
3261 EXT_LANG_BT_ERROR from catch.
3262
3263 2018-03-26 Tom Tromey <tom@tromey.com>
3264
3265 PR backtrace/15584:
3266 * stack.c (backtrace_command_1): Move some code into no-filters
3267 "if".
3268
3269 2018-03-26 Tom Tromey <tom@tromey.com>
3270
3271 * python/py-framefilter.c (throw_quit_or_print_exception): New
3272 function.
3273 (gdbpy_apply_frame_filter): Use it.
3274
3275 2018-03-26 Tom Tromey <tom@tromey.com>
3276
3277 PR cli/17716:
3278 * python/py-framefilter.c (py_print_type, py_print_value)
3279 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3280 RETURN_MASK_ERROR.
3281
3282 2018-03-26 Tom Tromey <tom@tromey.com>
3283
3284 * python/py-framefilter.c (enumerate_args): Use
3285 gdb::unique_xmalloc_ptr.
3286
3287 2018-03-26 Tom Tromey <tom@tromey.com>
3288
3289 * python/py-framefilter.c (py_print_frame): Return
3290 EXT_LANG_BT_OK.
3291 (gdbpy_apply_frame_filter): Update comment.
3292 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3293 Remove.
3294 <EXT_LANG_BT_NO_FILTERS>: Change value.
3295
3296 2018-03-26 Tom Tromey <tom@tromey.com>
3297
3298 PR backtrace/15582:
3299 * stack.c (backtrace_command): Parse "hide" argument.
3300 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3301 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3302 constant.
3303
3304 2018-03-26 Tom Tromey <tom@tromey.com>
3305
3306 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3307 add "flags".
3308 (backtrace_command): Remove "fulltrace", add "flags".
3309
3310 2018-03-26 Tom Tromey <tom@tromey.com>
3311
3312 * stack.c (backtrace_command): Rewrite command line parsing.
3313
3314 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3315
3316 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3317
3318 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3319
3320 * filename-seen-cache.h: Add include guard.
3321
3322 2018-03-26 Keith Seitz <keiths@redhat.com>
3323
3324 * symfile.c (place_section): Remove "struct" from section_addr_info
3325 in comment.
3326 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3327 "struct" keyword from section_addr_info.
3328
3329 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3330
3331 * regformats/regdef.h (reg): Add constructors.
3332
3333 2018-03-25 Pedro Alves <palves@redhat.com>
3334
3335 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3336 if then/else bodies in var_func_name extraction.
3337
3338 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
3339
3340 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3341 lookup_minimal_symbol() to find symbol entry.
3342 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3343
3344 2018-03-23 Keith Seitz <keiths@redhat.com>
3345
3346 PR c++/22968
3347 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3348 nested type definitions for C++, too.
3349
3350 2018-03-23 Tom Tromey <tom@tromey.com>
3351
3352 * machoread.c (struct oso_el): Add a constructor. Don't define as
3353 a typedef.
3354 (macho_register_oso): Remove.
3355 (macho_symtab_read): Take a std::vector.
3356 (oso_el_compare_name): Now a std::sort comparator.
3357 (macho_symfile_read_all_oso): Take a std::vector.
3358 (macho_symfile_read): Use std::vector. Remove cleanups.
3359
3360 2018-03-22 Tom Tromey <tom@tromey.com>
3361
3362 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3363 (record_full_goto_bookmark): Use std::string.
3364
3365 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3366
3367 PR tdep/18295
3368 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3369 a single mask.
3370
3371 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3372
3373 * rs6000-tdep.c (store_insn_p): New function.
3374 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3375 and cr_reg to their unshifted values. Use store_insn_p to
3376 match LR saves using either R1 or fdata->alloca_reg. Use
3377 store_insn_p to match CR saves. Set alloca_reg_offset
3378 when alloca_reg and framep are set. Remove lr_reg shift
3379 when assigning to fdata->lr_register.
3380
3381 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3382
3383 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3384 command line args instead of emitting a warning.
3385
3386 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3387
3388 * tracepoint.h (struct static_tracepoint_marker): Initialize
3389 fields, define default constructor, move constructor and move
3390 assignment, disable the rest.
3391 <str_id, extra>: Make std::string.
3392 (release_static_tracepoint_marker): Remove.
3393 (free_current_marker): Remove.
3394 * tracepoint.c (free_current_marker): Remove.
3395 (parse_static_tracepoint_marker_definition): Adjust to
3396 std::string, use new hex2str overload.
3397 (release_static_tracepoint_marker): Remove.
3398 (print_one_static_tracepoint_marker): Get marker by reference
3399 and adjust to std::string.
3400 (info_static_tracepoint_markers_command): Adjust to std::vector
3401 changes
3402 * target.h (static_tracepoint_marker_p): Remove typedef.
3403 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3404 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3405 bool.
3406 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3407 * target-debug.h
3408 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3409 (target_debug_print_std_vector_static_tracepoint_marker): New.
3410 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3411 to...
3412 (target_debug_print_static_tracepoint_marker_p): ... this.
3413 * target-delegates.c: Re-generate.
3414 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3415 Make std::string.
3416 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3417 (decode_static_tracepoint_spec): Adjust to std::vector.
3418 (tracepoint_print_one_detail): Adjust to std::string.
3419 (strace_marker_decode_location): Adjust to std::string.
3420 (update_static_tracepoint): Adjust to std::string, remove call
3421 to release_static_tracepoint_marker.
3422 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3423 Adjust to std::vector.
3424 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3425 (remote_static_tracepoint_markers_by_strid): Adjust to
3426 std::vector.
3427 * common/rsp-low.h (hex2str): New overload with explicit count
3428 of bytes.
3429 * common/rsp-low.c (hex2str): New overload with explicit count
3430 of bytes.
3431 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3432 (_initialize_rsp_low_selftests): Add test_hex2str test.
3433 * unittests/tracepoint-selftests.c
3434 (test_parse_static_tracepoint_marker_definition): Adjust to
3435 std::string.
3436
3437 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3438
3439 * tracepoint.c (parse_static_tracepoint_marker_definition):
3440 Consider case where the definition is followed by more
3441 definitions.
3442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3443 tracepoint-selftests.c.
3444 * unittests/tracepoint-selftests.c: New.
3445
3446 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3447
3448 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3449 Carvalho.
3450
3451 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3452
3453 * symtab.c (find_pc_sect_line): fixed indentation.
3454
3455 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3456
3457 * symtab.c (find_pc_sect_line): now uses binary search.
3458
3459 2018-03-19 Tom Tromey <tom@tromey.com>
3460
3461 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3462 "IDENT" production.
3463
3464 2018-03-19 Pedro Alves <palves@redhat.com>
3465 Tom Tromey <tom@tromey.com>
3466
3467 * unittests/observable-selftests.c: New file.
3468 * common/observable.h: New file.
3469 * observable.h: New file.
3470 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3471 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3472 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3473 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3474 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3475 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3476 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3477 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3478 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3479 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3480 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3481 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3482 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3483 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3484 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3485 tui/tui-interp.c, valops.c: Update all users.
3486 * tui/tui-hooks.c (tui_bp_created_observer)
3487 (tui_bp_deleted_observer, tui_bp_modified_observer)
3488 (tui_inferior_exit_observer, tui_before_prompt_observer)
3489 (tui_normal_stop_observer, tui_register_changed_observer):
3490 Remove.
3491 (tui_observers_token): New global.
3492 (attach_or_detach, tui_attach_detach_observers): New functions.
3493 (tui_install_hooks, tui_remove_hooks): Use
3494 tui_attach_detach_observers.
3495 * record-btrace.c (record_btrace_thread_observer): Remove.
3496 (record_btrace_thread_observer_token): New global.
3497 * observer.sh: Remove.
3498 * observer.c: Rename to observable.c.
3499 * observable.c (namespace gdb_observers): Define new objects.
3500 (observer_debug): Move into gdb_observers namespace.
3501 (struct observer, struct observer_list, xalloc_observer_list_node)
3502 (xfree_observer_list_node, generic_observer_attach)
3503 (generic_observer_detach, generic_observer_notify): Remove.
3504 (_initialize_observer): Update.
3505 Don't include observer.inc.
3506 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3507 (clean mostlyclean): Likewise.
3508 (observer.h, observer.inc): Remove targets.
3509 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3510 (COMMON_SFILES): Use observable.c, not observer.c.
3511 * .gitignore: Remove observer.h.
3512
3513 2018-03-18 Tom Tromey <tom@tromey.com>
3514
3515 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3516 gdb::def_vector.
3517 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3518
3519 2018-03-17 Tom Tromey <tom@tromey.com>
3520
3521 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3522
3523 2018-03-17 Tom Tromey <tom@tromey.com>
3524
3525 * target.c (class scoped_target_fd): New.
3526 (target_fileio_close_cleanup): Remove.
3527 (target_fileio_read_alloc_1): Use scoped_target_fd.
3528
3529 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3530
3531 * silent-rules.mk: New.
3532 * Makefile.in: Include silent-rules.mk
3533 (srcdir, VPATH, top_srcdir): Move up.
3534 (COMPILE): Add ECHO_CXX.
3535 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3536 (init.c): Add ECHO_INIT_C.
3537 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3538 (version.c): Add ECHO_GEN.
3539 (printcmd.o): Add ECHO_CXX.
3540 (target-float.o): Add ECHO_CXX.
3541 (ada-exp.o): Add ECHO_CXX.
3542 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3543 (insight$(EXEEXT)): Add ECHO_CXXLD.
3544 * gnulib/configure.ac: Add AM_SILENT_RULES.
3545 * gnulib/aclocal.m4: Re-generate.
3546 * gnulib/configure: Re-generate.
3547 * gnulib/import/Makefile.in: Re-generate.
3548
3549 2018-03-16 Tom Tromey <tom@tromey.com>
3550
3551 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3552 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3553 * utils.c (do_free_section_addr_info)
3554 (make_cleanup_free_section_addr_info): Remove.
3555 * symfile.h (struct other_sections): Add constructor.
3556 (struct section_addr_info): Remove.
3557 (section_addr_info): New typedef.
3558 (struct sym_fns) <sym_offsets>: Change type of parameter.
3559 (build_section_addr_info_from_objfile)
3560 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3561 (default_symfile_offsets, symbol_file_add)
3562 (symbol_file_add_from_bfd)
3563 (build_section_addr_info_from_section_table): Update.
3564 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3565 * symfile.c (alloc_section_addr_info): Remove.
3566 (build_section_addr_info_from_section_table): Change return type.
3567 Update.
3568 (build_section_addr_info_from_bfd)
3569 (build_section_addr_info_from_objfile): Likewise.
3570 (free_section_addr_info): Remove.
3571 (relative_addr_info_to_section_offsets): Change type of "addrs".
3572 (addrs_section_compar): Now a std::sort comparator.
3573 (addrs_section_sort): Change return type.
3574 (addr_info_make_relative): Change type of "addrs". Update.
3575 (default_symfile_offsets, syms_from_objfile_1)
3576 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3577 (symbol_file_add_separate): Update.
3578 (symbol_file_add): Change type of "addrs". Update.
3579 (add_symbol_file_command): Update. Remove cleanups.
3580 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3581 cleanups.
3582 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3583 * solib.c (solib_read_symbols): Update.
3584 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3585 * machoread.c (macho_symfile_offsets): Update.
3586 * jit.c (jit_bfd_try_read_symtab): Update.
3587
3588 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3589
3590 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3591 unittests/utils-selftests.c.
3592 * unittests/utils-selftests.c: New file.
3593
3594 2018-03-14 Tom Tromey <tom@tromey.com>
3595
3596 PR cli/14977:
3597 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3598 for NULL.
3599
3600 2018-03-14 Tom Tromey <tom@tromey.com>
3601
3602 PR cli/19918:
3603 * printcmd.c (printf_pointer): Allow "-" in format.
3604
3605 2018-03-14 Tom Tromey <tom@tromey.com>
3606
3607 * printcmd.c (_initialize_printcmd): Add usage to printf.
3608
3609 2018-03-14 Yao Qi <qiyao@sourceware.org>
3610
3611 * MAINTAINERS: Update my email address.
3612
3613 2018-03-13 Tom Tromey <tom@tromey.com>
3614
3615 * machoread.c (macho_check_dsym): Change filenamep to a
3616 std::string*.
3617 (macho_symfile_read): Update.
3618 * symfile.c (load_command): Use std::string.
3619
3620 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3621
3622 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3623 to error message string.
3624 (riscv_register_name): Use xsnprintf instead of sprintf.
3625 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3626 internal_error.
3627 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3628 error.
3629 (riscv_push_dummy_call): Likewise.
3630
3631 2018-03-12 Tom Tromey <tom@tromey.com>
3632
3633 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3634 Use gdb::byte_vector.
3635 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3636
3637 2018-03-12 Yao Qi <yao.qi@linaro.org>
3638
3639 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3640 parameter type to readable_regcache.
3641 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3642 the declaration.
3643
3644 2018-03-11 Tom Tromey <tom@tromey.com>
3645
3646 * dwarf2read.c (struct nextfield): Add initializers.
3647 (struct nextfnfield): Remove.
3648 (struct fnfieldlist): Add initializers. Remove "length" and
3649 "head", use std::vector.
3650 (struct decl_field_list): Remove.
3651 (struct field_info): Add initializers.
3652 <fields, baseclasses>: Now std::vector.
3653 <nbaseclasses, nfnfields, typedef_field_list_count,
3654 nested_types_list_count>: Remove.
3655 (dwarf2_add_field, dwarf2_add_type_defn)
3656 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3657 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3658 (process_structure_scope): Update.
3659
3660 2018-03-11 Tom Tromey <tom@tromey.com>
3661
3662 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3663 for use by std::sort.
3664 (build_type_psymtabs_1): Use std::vector.
3665
3666 2018-03-09 Eli Zaretskii <eliz@gnu.org>
3667
3668 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3669 and LIBMPFR in the printed configuration.
3670
3671 2018-03-08 Tom Tromey <tom@tromey.com>
3672
3673 * source.c (get_filename_and_charpos): Use scoped_fd.
3674 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3675 (procfs_pidlist): Likewise.
3676 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3677 (iterate_over_mappings): Likewise.
3678
3679 2018-03-08 Tom Tromey <tom@tromey.com>
3680
3681 * infcall.c (struct call_return_meta_info)
3682 <stack_temporaries_enabled>: Remove.
3683 (get_call_return_value, call_function_by_hand_dummy): Update.
3684 * thread.c (disable_thread_stack_temporaries): Remove.
3685 (enable_thread_stack_temporaries): Remove.
3686 (thread_stack_temporaries_enabled_p): Return bool.
3687 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3688 (get_last_thread_stack_temporary): Update.
3689 * eval.c (evaluate_subexp): Update.
3690 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3691 class, not a function.
3692 (value_ptr, value_vec): Remove typedefs.
3693 (class thread_info) <stack_temporaries_enabled>: Now bool.
3694 <stack_temporaries>: Now a std::vector.
3695 (thread_stack_temporaries_enabled_p)
3696 (value_in_thread_stack_temporaries): Return bool.
3697
3698 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3701 (getpkt_or_notif_sane_1): Likewise.
3702
3703 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3704
3705 * build-id.c (build_id_to_debug_bfd): Use std::string.
3706
3707 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3708
3709 * build-id.c (find_separate_debug_file_by_buildid): Return
3710 std::string.
3711 * build-id.h (find_separate_debug_file_by_buildid): Return
3712 std::string.
3713 * coffread.c (coff_symfile_read): Adjust to std::string.
3714 * elfread.c (elf_symfile_read): Adjust to std::string.
3715 * symfile.c (separate_debug_file_exists): Change parameter to
3716 std::string.
3717 (find_separate_debug_file): Return std::string.
3718 (find_separate_debug_file_by_debuglink): Return std::string.
3719 * symfile.h (find_separate_debug_file_by_debuglink): Return
3720 std::string.
3721
3722 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3723
3724 * common/xml-utils.c (xml_escape_text): Move code to...
3725 (xml_escape_text_append): ... this new function.
3726 * common/xml-utils.h (xml_escape_text_append): New declaration.
3727 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3728 New function.
3729 (_initialize_xml_utils): register test_xml_escape_text_append as
3730 a selftest.
3731
3732 2018-03-07 Alan Hayward <alan.hayward@arm.com>
3733
3734 * defs.h: Remove MAX_REGISTER_SIZE.
3735 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3736 asserts.
3737 * python/py-unwind.c (pyuw_sniffer): Likewise.
3738
3739 2018-03-07 Tom Tromey <tom@tromey.com>
3740
3741 * linux-tdep.c (linux_info_proc): Update.
3742 * target.h (struct target_ops) <to_fileio_readlink>: Return
3743 optional<string>.
3744 (target_fileio_readlink): Return optional<string>.
3745 * remote.c (remote_hostio_readlink): Return optional<string>.
3746 * inf-child.c (inf_child_fileio_readlink): Return
3747 optional<string>.
3748 * target.c (target_fileio_readlink): Return optional<string>.
3749
3750 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
3751
3752 * regcache.c (cooked_read_test): Add riscv to the list of
3753 architectures that have a save_reggroup.
3754
3755 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
3756
3757 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3758 value is not a dynamic class object.
3759
3760 2018-03-06 Tom Tromey <tom@tromey.com>
3761
3762 * rust-exp.y: Formatting fixes.
3763
3764 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3765
3766 * riscv-tdep.c (riscv_register_name): Remove target description
3767 support.
3768 (riscv_gdbarch_init): Remove target description check.
3769
3770 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3771
3772 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3773 comment.
3774 * riscv-tdep.h: Likewise.
3775
3776 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3777
3778 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3779 (riscv_pseudo_register_write): Delete.
3780 (riscv_gdbarch_init): Remove all use of pseudo registers.
3781
3782 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3783
3784 * record-btrace.c (btrace_print_lines): Replace cleanup
3785 parameter with RAII equivalents.
3786 (btrace_insn_history): Replace cleanup with RAII equivalents.
3787 * ui-out.h (make_cleanup_ui_out_list_begin_end,
3788 make_cleanup_ui_out_tuple_begin_end): Remove.
3789 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3790 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3791 make_cleanup_ui_out_list_begin_end): Remove.
3792
3793 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3794
3795 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3796 parameter types to std::vector. Use bool.
3797 (record_btrace_wait): Replace VEC(tp_t) with
3798 std::vector<thread_info *>.
3799 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3800
3801 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3802
3803 * record-btrace.c (record_btrace_disable_callback): Remove.
3804 (struct scoped_btrace_disable): New.
3805 (record_btrace_open): Use scoped_btrace_disable.
3806
3807 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3808
3809 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3810 reading values from registers.
3811
3812 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3813
3814 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3815 where appropriate.
3816
3817 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3818
3819 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3820 change parameter type. Use GDB's print functions, and use
3821 core_addr_to_string where appropriate.
3822 (riscv_push_dummy_call): Use core_addr_to_string where
3823 appropriate, update call to riscv_print_arg_location, and reindent
3824 a few lines.
3825 (riscv_return_value): Update call to riscv_print_arg_location.
3826
3827 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3828 Tim Newsome <tim@sifive.com>
3829 Albert Ou <a0u@eecs.berkeley.edu>
3830 Darius Rad <darius@bluespec.com>
3831
3832 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3833 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3834 (ALLDEPFILES): Add riscv-tdep.c
3835 * configure.tgt: Add riscv support.
3836 * riscv-tdep.c: New file.
3837 * riscv-tdep.h: New file.
3838 * NEWS: Mention new target.
3839 * MAINTAINERS: Add entry for riscv.
3840
3841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3842
3843 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3844 fields within aggregates.
3845
3846 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
3847
3848 * record-btrace.c (btrace_print_lines): Change type of flags to
3849 gdb_disassembly_flags.
3850
3851 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3852
3853 * fbsd-nat.c: Include "inf-ptrace.h".
3854 (USE_SIGTRAP_SIGINFO): Conditionally define.
3855 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3856 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3857 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3858 function.
3859 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3860 Likewise.
3861 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3862 Likewise.
3863 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3864 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3865 "supports_stopped_by_hw_breakpoint" target methods.
3866
3867 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3868
3869 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3870 * fbsd-nat.c (debug_fbsd_nat): New variable.
3871 (show_fbsd_nat_debug): New function.
3872 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3873 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3874
3875 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3876
3877 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3878 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3879 prototype.
3880 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3881 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3882 method.
3883
3884 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3885
3886 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3887 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3888
3889 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3890
3891 * charset.c (struct charset_vector): New.
3892 (charsets): Change type to charset_vector.
3893 (find_charset_names): Adjust.
3894 (add_one): Adjust.
3895 (_initialize_charset): Adjust.
3896
3897 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3898
3899 * progspace.h (struct program_space) <deleted_solibs>: Change
3900 type to std::vector<std::string>.
3901 * progspace.c (clear_program_space_solib_cache): Adjust.
3902 * breakpoint.c (print_solib_event): Adjust.
3903 (check_status_catch_solib): Adjust.
3904 * solib.c (update_solib_list): Adjust.
3905 * ui-out.h (class ui_out) <field_string>: New overload.
3906 * ui-out.c (ui_out::field_string): New overload.
3907
3908 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3909
3910 * progspace.h (struct program_space): Add constructor and
3911 destructor, initialize fields.
3912 (add_program_space): Remove.
3913 * progspace.c (add_program_space): Rename to...
3914 (program_space::program_space): ... this.
3915 (release_program_space): Rename to...
3916 (program_space::~program_space): ... this.
3917 (delete_program_space): Use delete to delete program_space.
3918 (initialize_progspace): Use new to allocate program_space.
3919 * inferior.c (add_inferior_with_spaces): Likewise.
3920 (clone_inferior_command): Likewise.
3921 * infrun.c (follow_fork_inferior): Likewise.
3922 (handle_vfork_child_exec_or_exit): Likewise.
3923
3924 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3925
3926 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
3927 (delim_string_to_char_ptr_vec): Return std::vector of
3928 gdb::unique_xmalloc_ptr.
3929 (dirnames_to_char_ptr_vec_append): Take std::vector of
3930 gdb::unique_xmalloc_ptr.
3931 (dirnames_to_char_ptr_vec): Return std::vector of
3932 gdb::unique_xmalloc_ptr.
3933 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
3934 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
3935 (delim_string_to_char_ptr_vec): Return an std::vector of
3936 gdb::unique_xmalloc_ptr, adjust the code.
3937 (dirnames_to_char_ptr_vec_append): Take an std::vector of
3938 gdb::unique_xmalloc_ptr, adjust the code.
3939 (dirnames_to_char_ptr_vec): Return an std::vector of
3940 gdb::unique_xmalloc_ptr, adjust the code.
3941 * auto-load.c (auto_load_safe_path_vec): Change type to
3942 std::vector of gdb::unique_xmalloc_ptr.
3943 (auto_load_expand_dir_vars): Return an std::vector of
3944 gdb::unique_xmalloc_ptr, adjust the code.
3945 (auto_load_safe_path_vec_update): Adjust.
3946 (filename_is_in_auto_load_safe_path_vec): Adjust.
3947 (auto_load_objfile_script_1): Adjust.
3948 * build-id.c (build_id_to_debug_bfd): Adjust.
3949 * linux-thread-db.c (thread_db_load_search): Adjust.
3950 * source.c (add_path): Adjust.
3951 (openp): Adjust.
3952 * symfile.c (find_separate_debug_file): Adjust.
3953 * utils.c (do_free_char_ptr_vec): Remove.
3954 (make_cleanup_free_char_ptr_vec): Remove.
3955
3956 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
3957
3958 PR gdb/22907
3959 * common/pathstuff.c: Conditionally include "<windows.h>".
3960
3961 2018-03-01 Georg Sauthoff <mail@georg.so>
3962
3963 PR gdb/22888
3964 * gcore.in: Quote variables and switch interpreter to bash.
3965
3966 2018-03-01 Tom Tromey <tom@tromey.com>
3967
3968 * dwarf2read.c (alloc_discriminant_info): Fix default_index
3969 assertion. Add assertion for discriminant_index.
3970 (quirk_rust_enum): Use correct base type name in univariant case.
3971
3972 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
3973
3974 * record.c (get_call_history_modifiers): Return a
3975 record_print_flags.
3976 (cmd_record_call_history): Adjust.
3977 * record-btrace.c (record_btrace_call_history): Adjust.
3978 (record_btrace_call_history_range): Adjust.
3979 (record_btrace_call_history_from): Adjust.
3980 * target-debug.h (target_debug_print_record_print_flags): New.
3981 * target-delegates.c: Re-generate.
3982 * target.c (target_call_history): Change flags type.
3983 (target_call_history_from): Likewise.
3984 (target_call_history_range): Likewise.
3985 * target.h (struct target_ops) <target_call_history>: Likewise.
3986 (target_call_history_from): Likewise.
3987 (target_call_history_range): Likewise.
3988
3989 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3990 Simon Marchi <simon.marchi@polymtl.ca>
3991
3992 * common/common-utils.c: Include "sys/stat.h".
3993 (is_regular_file): Move here from "source.c"; change return
3994 type to "bool".
3995 * common/common-utils.h (is_regular_file): New prototype.
3996 * common/pathstuff.c (contains_dir_separator): New function.
3997 * common/pathstuff.h (contains_dir_separator): New prototype.
3998 * source.c: Don't include "sys/stat.h".
3999 (is_regular_file): Move to "common/common-utils.c".
4000
4001 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4002
4003 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4004 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4005 * auto-load.c: Include "common/pathstuff.h".
4006 * common/common-def.h (current_directory): Move here.
4007 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4008 function.
4009 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4010 prototype.
4011 * common/pathstuff.c: New file.
4012 * common/pathstuff.h: New file.
4013 * compile/compile.c: Include "common/pathstuff.h".
4014 * defs.h (current_directory): Move to "common/common-defs.h".
4015 * dwarf2read.c: Include "common/pathstuff.h".
4016 * exec.c: Likewise.
4017 * guile/scm-safe-call.c: Likewise.
4018 * linux-thread-db.c: Likewise.
4019 * main.c: Likewise.
4020 * nto-tdep.c: Likewise.
4021 * objfiles.c: Likewise.
4022 * source.c: Likewise.
4023 * symtab.c: Likewise.
4024 * utils.c: Include "common/pathstuff.h".
4025 (gdb_realpath): Move to "common/pathstuff.c".
4026 (gdb_realpath_keepfile): Likewise.
4027 (gdb_abspath): Likewise.
4028 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4029 (gdb_realpath_keepfile): Likewise.
4030 (gdb_abspath): Likewise.
4031
4032 2018-02-28 John Baldwin <jhb@FreeBSD.org>
4033
4034 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4035 wildcard process pid for super_resume for kernels with a
4036 specific bug.
4037
4038 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4039
4040 * compile/compile.c (get_args): Add additional comments
4041 explaining function.
4042
4043 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4044 Tom Tromey <tom@tromey.com>
4045
4046 * target.h (memory_write_request_s): Remove typedef. Don't define
4047 VEC.
4048 (target_write_memory_blocks): Change argument to std::vector.
4049 (struct memory_write_request): Add constructor.
4050 * target-memory.c (compare_block_starting_address): Return bool.
4051 Change argument types.
4052 (claim_memory): Change arguments to use std::vector.
4053 (split_regular_and_flash_blocks, blocks_to_erase)
4054 (compute_garbled_blocks): Likewise.
4055 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4056 (target_write_memory_blocks): Change argument to std::vector.
4057 * symfile.c (struct load_section_data): Add constructor and
4058 destructor. Use std::vector for "requests".
4059 (struct load_progress_data): Add initializers.
4060 (load_section_callback): Update. Use "new".
4061 (clear_memory_write_data): Remove.
4062 (generic_load): Update.
4063
4064 2018-02-27 Alan Hayward <alan.hayward@arm.com>
4065
4066 * arch/aarch64.h: Use common/tdesc.h.
4067
4068 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4069
4070 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4071 architecture with a 64-bit ABI.
4072
4073 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4074
4075 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4076 ahead of target description loading.
4077
4078 2018-02-26 Tom Tromey <tom@tromey.com>
4079
4080 * stack.c (backtrace_command_1): Update.
4081 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4082 of "flags".
4083 * python/py-framefilter.c (py_print_frame)
4084 (gdbpy_apply_frame_filter): Change type of "flags".
4085 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4086 of "flags".
4087 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4088 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4089 * extension.h (enum frame_filter_flag): Rename from
4090 frame_filter_flags.
4091 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4092 (apply_ext_lang_frame_filter): Change type of "flags".
4093 * extension.c (apply_ext_lang_frame_filter): Change type of
4094 "flags".
4095 * extension-priv.h (struct extension_language_ops)
4096 <apply_frame_filter>: Change type of "flags".
4097
4098 2018-02-26 Tom Tromey <tom@tromey.com>
4099
4100 PR python/16497:
4101 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4102 off-by-one in py_end computation.
4103 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4104 PRINT_MORE_FRAMES.
4105 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4106 constant.
4107
4108 2018-02-26 Tom Tromey <tom@tromey.com>
4109
4110 * dwarf2read.c (struct variant_field): New.
4111 (struct nextfield) <variant>: New field.
4112 (dwarf2_add_field): Handle DW_TAG_variant_part.
4113 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4114 discriminated union.
4115 (read_structure_type): Handle DW_TAG_variant_part.
4116 (handle_struct_member_die): New function, extracted from
4117 process_structure_scope. Handle DW_TAG_variant.
4118 (process_structure_scope): Handle discriminated unions. Call
4119 handle_struct_member_die.
4120
4121 2018-02-26 Tom Tromey <tom@tromey.com>
4122
4123 * rust-lang.h (rust_last_path_segment): Declare.
4124 * rust-lang.c (rust_last_path_segment): Now public. Change
4125 contract.
4126 (struct disr_info): Remove.
4127 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4128 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4129 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4130 (rust_enum_p, rust_enum_variant): New function.
4131 (rust_underscore_fields): Remove "offset" parameter.
4132 (rust_print_enum): New function.
4133 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4134 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4135 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4136 enums.
4137 (rust_internal_print_type): New function, from rust_print_type.
4138 Remove enum code.
4139 (rust_print_type): Call rust_internal_print_type.
4140 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4141 Update enum handling.
4142 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4143 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4144 (rust_union_quirks): New functions.
4145 (process_full_comp_unit, process_full_type_unit): Call
4146 rust_union_quirks.
4147 (process_structure_scope): Update rust_unions if necessary.
4148
4149 2018-02-26 Tom Tromey <tom@tromey.com>
4150
4151 * value.h (value_union_variant): Declare.
4152 * valops.c (value_union_variant): New function.
4153 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4154 (struct discriminant_info): New.
4155 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4156 enumerator.
4157 (struct main_type) <flag_discriminated_union>: New field.
4158
4159 2018-02-26 Tom Tromey <tom@tromey.com>
4160
4161 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4162 unittests/unpack-selftests.c.
4163 * unittests/unpack-selftests.c: New file.
4164 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4165
4166 2018-02-26 Yao Qi <yao.qi@linaro.org>
4167
4168 * dwarf2read.c (struct partial_die_info) <read>: New method.
4169 (read_partial_die): Remove the declaration.
4170 (load_partial_dies): Update.
4171 (partial_die_info::partial_die_info):
4172 (read_partial_die): Change it to partial_die_info::read.
4173
4174 2018-02-26 Yao Qi <yao.qi@linaro.org>
4175
4176 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4177 (fixup_partial_die): Remove declaration.
4178 (scan_partial_symbols): Update.
4179 (partial_die_parent_scope): Likewise.
4180 (partial_die_full_name): Likewise.
4181 (fixup_partial_die): Change it to partial_die_info::fixup.
4182
4183 2018-02-26 Yao Qi <yao.qi@linaro.org>
4184
4185 * dwarf2read.c (read_partial_die): Update the declaration.
4186 (load_partial_dies): Caller update.
4187 (read_partial_die): Remove one argument abbrev_len.
4188
4189 2018-02-26 Yao Qi <yao.qi@linaro.org>
4190
4191 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4192 assignment operator.
4193 (load_partial_dies): Use ctor and copy ctor.
4194 (read_partial_die): Update.
4195 (dwarf2_cu::find_partial_die): Use ctor.
4196
4197 2018-02-26 Yao Qi <yao.qi@linaro.org>
4198
4199 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4200 (find_partial_die_in_comp_unit): Change it to
4201 dwarf2_cu::find_partial_die.
4202 (find_partial_die): Update.
4203
4204 2018-02-26 Yao Qi <yao.qi@linaro.org>
4205
4206 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4207 is NULL.
4208
4209 2018-02-26 Yao Qi <yao.qi@linaro.org>
4210
4211 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4212
4213 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4214
4215 * arch/amd64.h: Use common/tdesc.h.
4216 * arch/i386.c: Likewise.
4217 * arch/i386.h: Likewise.
4218 * arch/tic6x.c: Likewise.
4219 * arch/tdesc.h: Move file from here...
4220 * common/tdesc.h: ...to here.
4221 * features/aarch64-core.c: Regenerate.
4222 * features/aarch64-fpu.c: Regenerate.
4223 * features/i386/32bit-avx.c: Regenerate.
4224 * features/i386/32bit-avx512.c: Regenerate.
4225 * features/i386/32bit-core.c: Regenerate.
4226 * features/i386/32bit-linux.c: Regenerate.
4227 * features/i386/32bit-mpx.c: Regenerate.
4228 * features/i386/32bit-pkeys.c: Regenerate.
4229 * features/i386/32bit-sse.c: Regenerate.
4230 * features/i386/64bit-avx.c: Regenerate.
4231 * features/i386/64bit-avx512.c: Regenerate.
4232 * features/i386/64bit-core.c: Regenerate.
4233 * features/i386/64bit-linux.c: Regenerate.
4234 * features/i386/64bit-mpx.c: Regenerate.
4235 * features/i386/64bit-pkeys.c: Regenerate.
4236 * features/i386/64bit-segments.c: Regenerate.
4237 * features/i386/64bit-sse.c: Regenerate.
4238 * features/i386/x32-core.c: Regenerate.
4239 * features/tic6x-c6xp.c: Regenerate.
4240 * features/tic6x-core.c: Regenerate.
4241 * features/tic6x-gp.c: Regenerate.
4242 * target-descriptions.c: Use common/tdesc.h.
4243 * target-descriptions.h: Likewise.
4244
4245 2018-02-24 Tom Tromey <tom@tromey.com>
4246
4247 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4248 (try_thread_db_load_from_dir, thread_db_load_search): Use
4249 std::string.
4250 (info_auto_load_libthread_db_compare): Return bool. Change
4251 argument types.
4252 (info_auto_load_libthread_db): Use std::vector, std::string.
4253 Remove cleanups.
4254
4255 2018-02-24 Tom Tromey <tom@tromey.com>
4256
4257 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4258 std::string.
4259 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4260 std::string*.
4261 * gdbarch.c: Rebuild.
4262 * gdbarch.h: Rebuild.
4263 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4264 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4265 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4266 std::string*.
4267
4268 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4269
4270 * gdbtypes.h (sect_offset): Change type to uint64_t.
4271 (sect_offset_str): New function.
4272 * dwarf2read.c (create_addrmap_from_aranges): Use
4273 sect_offset_str.
4274 (error_check_comp_unit_head): Likewise.
4275 (create_debug_type_hash_table): Likewise.
4276 (read_cutu_die_from_dwo): Likewise.
4277 (init_cutu_and_read_dies): Likewise.
4278 (init_cutu_and_read_dies_no_follow): Likewise.
4279 (process_psymtab_comp_unit_reader): Likewise.
4280 (partial_die_parent_scope): Likewise.
4281 (peek_die_abbrev): Likewise.
4282 (process_queue): Likewise.
4283 (dwarf2_physname): Likewise.
4284 (read_namespace_alias): Likewise.
4285 (read_import_statement): Likewise.
4286 (create_dwo_cu_reader): Likewise.
4287 (create_cus_hash_table): Likewise.
4288 (lookup_dwo_cutu): Likewise.
4289 (inherit_abstract_dies): Likewise.
4290 (read_func_scope): Likewise.
4291 (read_call_site_scope): Likewise.
4292 (dwarf2_add_member_fn): Likewise.
4293 (read_common_block): Likewise.
4294 (read_module_type): Likewise.
4295 (read_typedef): Likewise.
4296 (read_subrange_type): Likewise.
4297 (load_partial_dies): Likewise.
4298 (read_partial_die): Likewise.
4299 (find_partial_die): Likewise.
4300 (read_str_index): Likewise.
4301 (dwarf2_string_attr): Likewise.
4302 (build_error_marker_type): Likewise.
4303 (lookup_die_type): Likewise.
4304 (dump_die_shallow): Likewise.
4305 (follow_die_ref): Likewise.
4306 (dwarf2_fetch_die_loc_sect_off): Likewise.
4307 (dwarf2_fetch_constant_bytes): Likewise.
4308 (follow_die_sig): Likewise.
4309 (get_signatured_type): Likewise.
4310 (get_DW_AT_signature_type): Likewise.
4311 (dwarf2_find_containing_comp_unit): Likewise.
4312 (set_die_type): Likewise.
4313
4314 2018-02-21 John Baldwin <jhb@FreeBSD.org>
4315
4316 * arch/aarch64.c: Include "common-defs.h".
4317 * arch/amd64.c: Likewise.
4318 * arch/i386.c: Likewise.
4319
4320 2018-02-21 Tom Tromey <tom@tromey.com>
4321
4322 * value.h: (extract_field_op): Update.
4323 * eval.c (extract_field_op): Return a const char *.
4324 * expression.h (parse_expression_for_completion): Update.
4325 * completer.c (complete_expression): Update.
4326 (add_struct_fields): Make fieldname const.
4327 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4328 (mark_completion_tag, parse_exp_in_context_1): Update.
4329 (parse_expression_for_completion): Change "name" to
4330 unique_xmalloc_ptr*.
4331
4332 2018-02-21 Tom Tromey <tom@tromey.com>
4333
4334 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4335
4336 2018-02-21 Yao Qi <yao.qi@linaro.org>
4337
4338 * avr-tdep.c (avr_read_pc): Change parameter type to
4339 readable_regcache.
4340 * gdbarch.sh (read_pc): Likewise.
4341 * gdbarch.c: Re-generated.
4342 * gdbarch.h: Re-generated.
4343 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4344 readable_regcache.
4345 * ia64-tdep.c (ia64_read_pc): Likewise.
4346 * mips-tdep.c (mips_read_pc): Likewise.
4347 * spu-tdep.c (spu_read_pc): Likewise.
4348
4349 2018-02-21 Yao Qi <yao.qi@linaro.org>
4350
4351 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4352 * regcache-dump.c: New file.
4353 * regcache.c: Move register_dump to regcache-dump.c.
4354 (maintenance_print_registers): Likewise.
4355 (maintenance_print_raw_registers): Likewise.
4356 (maintenance_print_cooked_registers): Likewise.
4357 (maintenance_print_register_groups): Likewise.
4358 (maintenance_print_remote_registers): Likewise.
4359 (_initialize_regcache): Likewise.
4360 * regcache.h (register_dump): Moved from regcache.c.
4361
4362 2018-02-21 Yao Qi <yao.qi@linaro.org>
4363
4364 * regcache.c (regcache::regcache): Update.
4365 (regcache::invalidate): Move it to detached_regcache::invalidate.
4366 (get_thread_arch_aspace_regcache): Update.
4367 (regcache::raw_update): Update.
4368 (regcache::cooked_read): Remove some code.
4369 (regcache::cooked_read_value): Likewise.
4370 (regcache::raw_write): Remove assert on m_readonly_p.
4371 (regcache::raw_supply_integer): Move it to
4372 detached_regcache::raw_supply_integer.
4373 (regcache::raw_supply_zeroed): Likewise.
4374 * regcache.h (detached_regcache) <raw_supply_integer>: New
4375 declaration.
4376 <raw_supply_zeroed, invalidate>: Likewise.
4377 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4378 <invalidate>: Likewise.
4379 <m_readonly_p>: Removed.
4380
4381 2018-02-21 Yao Qi <yao.qi@linaro.org>
4382
4383 * infcmd.c (get_return_value): Let stop_regs point to
4384 get_current_regcache.
4385 * regcache.c (regcache::regcache): Remove.
4386 (register_dump_reg_buffer): New class.
4387 (regcache_print): Adjust.
4388 * regcache.h (regcache): Remove constructors.
4389
4390 2018-02-21 Yao Qi <yao.qi@linaro.org>
4391
4392 * regcache.c (class register_dump): New class.
4393 (register_dump_regcache, register_dump_none): New class.
4394 (register_dump_remote, register_dump_groups): New class.
4395 (regcache_print): Update.
4396 * regcache.h (regcache_dump_what): Move it to regcache.c.
4397 (regcache) <dump>: Remove.
4398
4399 2018-02-21 Yao Qi <yao.qi@linaro.org>
4400
4401 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4402 reg_buffer_rw *.
4403 (jit_unwind_reg_set_impl): Call raw_supply.
4404 (jit_frame_sniffer): Use reg_buffer_rw.
4405 * record-full.c (record_full_core_regbuf): Change its type.
4406 (record_full_core_open_1): Use reg_buffer_rw.
4407 (record_full_close): Likewise.
4408 (record_full_core_fetch_registers): Use regcache->raw_supply.
4409 (record_full_core_store_registers): Likewise.
4410 * regcache.c (regcache::get_register_status): Move it to
4411 reg_buffer.
4412 (regcache_raw_set_cached_value): Remove.
4413 (regcache::raw_set_cached_value): Remove.
4414 (regcache::raw_write): Call raw_supply.
4415 (regcache::raw_supply): Move it to reg_buffer_rw.
4416 * regcache.h (regcache_raw_set_cached_value): Remove.
4417 (reg_buffer_rw): New class.
4418
4419 2018-02-21 Yao Qi <yao.qi@linaro.org>
4420
4421 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4422 readonly_detached_regcache.
4423 (dummy_frame_prev_register): Use regcache->cooked_read.
4424 * frame.c (frame_save_as_regcache): Change return type.
4425 (frame_pop): Update.
4426 * frame.h (frame_save_as_regcache): Update declaration.
4427 * inferior.h (get_infcall_suspend_state_regcache): Update
4428 declaration.
4429 * infrun.c (infcall_suspend_state) <registers>: use
4430 readonly_detached_regcache.
4431 (save_infcall_suspend_state): Don't use regcache_dup.
4432 (get_infcall_suspend_state_regcache): Change return type.
4433 * linux-fork.c (struct fork_info) <savedregs>: Change to
4434 readonly_detached_regcache.
4435 <pc>: New field.
4436 (fork_save_infrun_state): Don't use regcache_dup.
4437 (info_checkpoints_command): Adjust.
4438 * mi/mi-main.c (register_changed_p): Update declaration.
4439 (mi_cmd_data_list_changed_registers): Use
4440 readonly_detached_regcache.
4441 (register_changed_p): Change parameter type to
4442 readonly_detached_regcache.
4443 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4444 readonly_detached_regcache.
4445 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4446 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4447 New.
4448 (regcache::save): Move it to reg_buffer.
4449 (regcache::restore): Change parameter type.
4450 (regcache_dup): Remove.
4451 * regcache.h (reg_buffer) <save>: New method.
4452 (readonly_detached_regcache): New class.
4453 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4454 readonly_detached_regcache.
4455 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4456
4457 2018-02-21 Yao Qi <yao.qi@linaro.org>
4458
4459 * frame.c (frame_save_as_regcache): Use regcache method save.
4460 (frame_pop): Use regcache method restore.
4461 * infrun.c (restore_infcall_suspend_state): Likewise.
4462 * linux-fork.c (fork_load_infrun_state): Likewise.
4463 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4464 save.
4465 * regcache.c (regcache_save): Remove.
4466 (regcache::restore): More asserts.
4467 (regcache_cpy): Remove.
4468 * regcache.h (regcache_save): Remove the declaration.
4469 (regcache::restore): Move from private to public.
4470 Remove the friend declaration of regcache_cpy.
4471 (regcache_cpy): Remove declaration.
4472
4473 2018-02-21 Yao Qi <yao.qi@linaro.org>
4474
4475 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4476 parameter type to 'readable_regcache *'.
4477 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4478 * arm-tdep.c (arm_neon_quad_read): Likewise.
4479 (arm_pseudo_read): Likewise.
4480 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4481 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4482 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4483 * gdbarch.c: Re-generated.
4484 * gdbarch.h: Re-generated.
4485 * gdbarch.sh (pseudo_register_read): Change parameter type to
4486 'readable_regcache *'.
4487 (pseudo_register_read_value): Likewise.
4488 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4489 (h8300_pseudo_register_read): Likewise.
4490 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4491 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4492 (i386_pseudo_register_read_into_value): Likewise.
4493 (i386_pseudo_register_read_value): Likewise.
4494 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4495 declaration.
4496 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4497 * m32c-tdep.c (m32c_raw_read): Likewise.
4498 (m32c_read_flg): Likewise.
4499 (m32c_banked_register): Likewise.
4500 (m32c_banked_read): Likewise.
4501 (m32c_sb_read): Likewise.
4502 (m32c_part_read): Likewise.
4503 (m32c_cat_read): Likewise.
4504 (m32c_r3r2r1r0_read): Likewise.
4505 (m32c_pseudo_register_read): Likewise.
4506 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4507 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4508 (mep_pseudo_cr64_read): Likewise.
4509 (mep_pseudo_register_read): Likewise.
4510 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4511 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4512 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4513 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4514 (regcache::cooked_read): Likewise.
4515 (regcache::cooked_read_value): Likewise.
4516 (regcache_cooked_read_signed):
4517 (regcache::cooked_read): Likewise.
4518 * regcache.h (readable_regcache): New class.
4519 (regcache): Inherit readable_regcache. Move some methods to
4520 readable_regcache.
4521 * rl78-tdep.c (rl78_pseudo_register_read): Change
4522 parameter type to 'readable_regcache *'.
4523 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4524 (e500_pseudo_register_read): Change parameter type to
4525 'readable_regcache *'.
4526 (dfp_pseudo_register_read): Likewise.
4527 (vsx_pseudo_register_read): Likewise.
4528 (efpr_pseudo_register_read): Likewise.
4529 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4530 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4531 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4532 (sh64_pseudo_register_read): Likewise.
4533 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4534 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4535 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4536 (spu_pseudo_register_read): Likewise.
4537 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4538 (xtensa_pseudo_register_read): Likewise.
4539
4540 2018-02-21 Yao Qi <yao.qi@linaro.org>
4541
4542 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4543 (regcache::arch): Move it to reg_buffer::arch.
4544 (regcache::register_buffer): Likewise.
4545 (regcache::assert_regnum): Likewise.
4546 (regcache::num_raw_registers): Likewise.
4547 * regcache.h (reg_buffer): New class.
4548 (regcache): Inherit reg_buffer.
4549
4550 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4553 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4554
4555 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4556
4557 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4558
4559 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4560
4561 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4562 (SFILES): Remove common/*.c files.
4563 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4564 * common/common.host: Add common reference.
4565 * configure.ac: Likewise.
4566 * configure: Regenerate.
4567
4568 2018-02-16 Yao Qi <yao.qi@linaro.org>
4569
4570 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4571 (block_initialize_namespace): Use new.
4572 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4573 (dwarf2_free_objfile): Use delete.
4574 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4575 (copy_type_recursive): Use new.
4576 * gdb_obstack.h (allocate_on_obstack): New.
4577
4578 2018-02-15 Yao Qi <yao.qi@linaro.org>
4579
4580 PR gdb/22849
4581 * inferior.c (exit_inferior_1): Reset inf->control.
4582
4583 2018-02-15 Joel Brobecker <brobecker@adacore.com>
4584
4585 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4586 declaration.
4587
4588 2018-02-14 Pedro Alves <palves@redhat.com>
4589
4590 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4591 frame_cleanup_after_sniffer on exception.
4592
4593 2018-02-14 Tom Tromey <tom@tromey.com>
4594
4595 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4596 const.
4597 (solib_bfd_open): Make pathname const.
4598 * solib.c (solib_bfd_open): Make pathname const.
4599 * solib-spu.c (spu_bfd_fopen): Make name const.
4600 (spu_bfd_open): Make pathname const.
4601 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4602 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4603
4604 2018-02-14 Tom Tromey <tom@tromey.com>
4605
4606 * symfile.c (symfile_bfd_open): Update.
4607 * source.h (openp, source_full_path_of, find_and_open_source):
4608 Change argument type to unique_xmalloc_ptr.
4609 * source.c (openp): Take a unique_xmalloc_ptr.
4610 (source_full_path_of, find_and_open_source): Likewise.
4611 (open_source_file, symtab_to_fullname): Update.
4612 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4613 unique_xmalloc_ptr.
4614 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4615 (exec_file_find): Update.
4616 * psymtab.c (psymtab_to_fullname): Update.
4617 * nto-tdep.h (nto_find_and_open_solib): Update.
4618 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4619 unique_xmalloc_ptr.
4620 * exec.c (exec_file_attach): Update.
4621 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4622 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4623
4624 2018-02-14 Tom Tromey <tom@tromey.com>
4625
4626 * solib.c: Include source.h.
4627 * nto-tdep.c: Include source.h.
4628 * mi/mi-cmd-env.c: Include source.h.
4629 * infcmd.c: Include source.h.
4630 * exec.c: Include source.h.
4631 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4632 (add_path, directory_switch, source_path, init_source_path): Move
4633 declarations...
4634 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4635 (add_path, directory_switch, source_path, init_source_path):
4636 ...here.
4637
4638 2018-02-14 Tom Tromey <tom@tromey.com>
4639
4640 * solist.h (exec_file_find, solib_find): Return
4641 unique_xmalloc_ptr.
4642 (solib_bfd_fopen): Take a const char *.
4643 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4644 (exec_file_find, solib_find): Likewise.
4645 (solib_bfd_fopen): Do not take ownership of "pathname".
4646 (solib_bfd_open): Use unique_xmalloc_ptr.
4647 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4648 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4649 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4650 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4651
4652 2018-02-14 Joel Brobecker <brobecker@adacore.com>
4653
4654 * ada-lang.c (name_match_type_from_name): Remove reference to
4655 ada_name_for_lookup in function's documentation.
4656 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4657
4658 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4659
4660 * defs.h (enum openp_flags): New enum.
4661 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4662 Move to enum openp_flags.
4663 (openp_flags): New enum flags.
4664 (openp): Change parameter type to openp_flags.
4665 * source.c (openp): Change parameter type to openp_flags.
4666 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4667 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4668
4669 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4670
4671 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4672 per-command.
4673
4674 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4675
4676 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4677 into...
4678 (class dwarf2_queue_guard): ...the destructor of this new class.
4679 (dw2_do_instantiate_symtab): Create instance of the new class
4680 dwarf2_queue_guard, remove cleanup.
4681
4682 2018-02-09 Tom Tromey <tom@tromey.com>
4683
4684 * source.c (find_source_lines): Don't reference past the end of
4685 the vector.
4686
4687 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4688
4689 * remote.c (remote_btrace_maybe_reopen): Change error message.
4690 * btrace.c (btrace_enable): Likewise.
4691 (parse_xml_btrace): Likewise.
4692 (parse_xml_btrace_conf): Likewise.
4693
4694 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4695
4696 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4697 (linux_enable_pt, linux_enable_bts): Call
4698 diagnose_perf_event_open_fail.
4699
4700 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4701
4702 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4703 Remove parameter and change return type. Update callers. Move it.
4704 (linux_enable_bts, linux_enable_pt): Improve error message.
4705 (linux_enable_pt): Remove zero buffer size check.
4706 (linux_enable_btrace): Improve error messages. Remove NULL return
4707 check.
4708
4709 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4710
4711 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4712 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4713 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4714 (linux_supports_pt, linux_supports_btrace): Remove.
4715 (linux_enable_bts): Call cpu_supports_bts.
4716 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4717 * remote.c (remote_supports_btrace): Remove.
4718 (init_remote_ops): Remove remote_supports_btrace.
4719 * target-delegates.c: Regenerated.
4720 * target.c (target_supports_btrace): Remove.
4721 * target.h (target_ops) <to_supports_btrace>: Remove
4722 (target_supports_btrace): Remove.
4723 * x86-linux-nat.c (x86_linux_create_target): Remove
4724 linux_supports_btrace.
4725
4726 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4727
4728 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4729 btrace failed.
4730 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4731 exception and use message in own exception.
4732
4733 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4734
4735 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4736 (perf_event_pt_event_type): Use gdb_file_up.
4737 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4738 scoped_fd, and scoped_mmap.
4739
4740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4741
4742 * common/scoped_mmap.h: New.
4743 * unittests/scoped_mmap-selftest.c: New.
4744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4745 unittests/scoped_mmap-selftest.c.
4746
4747 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4748
4749 * common/scoped_fd.h: New.
4750 * unittests/scoped_fd-selftest.c: New.
4751 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4752 unittests/scoped_fd-selftest.c.
4753
4754 2018-02-09 Tom Tromey <tom@tromey.com>
4755
4756 * auto-load.c (auto_load_section_scripts): Use
4757 gdb::unique_xmalloc_ptr.
4758
4759 2018-02-09 Tom Tromey <tom@tromey.com>
4760
4761 * auto-load.c (execute_script_contents): Use std::string.
4762
4763 2018-02-09 Joel Brobecker <brobecker@adacore.com>
4764
4765 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4766 Python function, rather than a new command.
4767
4768 2018-02-08 Tom Tromey <tom@tromey.com>
4769
4770 * solib.c (solib_find_1): Use std::string.
4771 (solib_bfd_fopen): Use unique_xmalloc_ptr.
4772
4773 2018-02-08 Tom Tromey <tom@tromey.com>
4774
4775 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4776
4777 2018-02-08 Tom Tromey <tom@tromey.com>
4778
4779 * source.c (find_source_lines): Use gdb::def_vector.
4780
4781 2018-02-08 Tom Tromey <tom@tromey.com>
4782
4783 * macrocmd.c (struct temporary_macro_definition): New.
4784 (macro_define_command): Use temporary_macro_definition. Remove
4785 cleanups.
4786 (free_macro_definition_ptr): Remove.
4787
4788 2018-02-08 Tom Tromey <tom@tromey.com>
4789
4790 * macroexp.c (maybe_expand): Use std::string.
4791
4792 2018-02-08 Tom Tromey <tom@tromey.com>
4793
4794 * macroexp.c (struct macro_buffer): Add initializers for some
4795 members.
4796 (init_buffer, init_shared_buffer, free_buffer)
4797 (free_buffer_return_text): Remove.
4798 (macro_buffer): New constructors.
4799 (~macro_buffer): New destructor.
4800 (macro_buffer::set_shared): New method.
4801 (macro_buffer::resize_buffer, macro_buffer::appendc)
4802 (macro_buffer::appendmem): Now methods, not free functions.
4803 (set_token, append_tokens_without_splicing, stringify)
4804 (macro_stringify): Update.
4805 (gather_arguments): Change return type. Remove argc_p argument,
4806 add args_ptr argument. Use std::vector.
4807 (substitute_args): Remove argc argument. Accept std::vector.
4808 (expand): Update. Use std::vector.
4809 (scan, macro_expand, macro_expand_next): Update.
4810
4811 2018-02-08 Tom Tromey <tom@tromey.com>
4812
4813 * symtab.c (default_collect_symbol_completion_matches_break_on):
4814 Use unique_xmalloc_ptr.
4815 * macroscope.h: (sal_macro_scope, user_macro_scope)
4816 (default_macro_scope): Return unique_xmalloc_ptr.
4817 * macroscope.c (sal_macro_scope, user_macro_scope)
4818 (default_macro_scope): Return unique_xmalloc_ptr.
4819 * macroexp.h (macro_expand, macro_expand_once): Return
4820 unique_xmalloc_ptr.
4821 * macroexp.c (macro_expand, macro_expand_once): Return
4822 unique_xmalloc_ptr.
4823 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4824 (info_macro_command, info_macros_command): Use
4825 unique_xmalloc_ptr.
4826 * compile/compile-c-support.c (write_macro_definitions): Use
4827 unique_xmalloc_ptr.
4828 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4829
4830 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
4831
4832 * value.c (value_static_field): Assign field type instead of
4833 containing type when returning an optimized out value.
4834
4835 2018-02-06 Yao Qi <yao.qi@linaro.org>
4836
4837 * ft32-tdep.c (ft32_read_pc): Remove.
4838 (ft32_write_pc): Remove.
4839 (ft32_gdbarch_init): Update.
4840 * m32r-tdep.c (m32r_read_pc): Remove.
4841 (m32r_gdbarch_init): Update.
4842 * mep-tdep.c (mep_read_pc): Remove.
4843 (mep_gdbarch_init): Update.
4844 * microblaze-tdep.c (microblaze_write_pc): Remove.
4845 (microblaze_gdbarch_init): Update.
4846 * mn10300-tdep.c (mn10300_read_pc): Remove.
4847 (mn10300_write_pc): Remove.
4848 (mn10300_gdbarch_init): Update.
4849 * moxie-tdep.c (moxie_read_pc): Remove.
4850 (moxie_write_pc): Remove.
4851 (moxie_gdbarch_init): Update.
4852
4853 2018-02-06 Yao Qi <yao.qi@linaro.org>
4854
4855 * expprint.c (print_subexp_standard): Handle
4856 OP_F77_UNDETERMINED_ARGLIST.
4857 (dump_subexp_body_standard): Likewise.
4858
4859 2018-02-05 Alan Hayward <alan.hayward@arm.com>
4860
4861 * target-descriptions.c (tdesc_element_visitor) Add empty
4862 implementations.
4863 (tdesc_type): Move make_gdb_type from here.
4864 (tdesc_type_builtin): Likewise.
4865 (tdesc_type_vector): Likewise.
4866 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4867 (make_gdb_type_struct): Move from tdesc_type_with_fields.
4868 (make_gdb_type_union): Likewise.
4869 (make_gdb_type_flags): Likewise.
4870 (make_gdb_type_enum): Likewise.
4871 (make_gdb_type): New function.
4872 (tdesc_register_type): Use static make_gdb_type.
4873
4874 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
4875
4876 * infcmd.c (default_print_one_register_info): Align natural-format
4877 column values consistently one under another.
4878 (pad_to_column): New function.
4879
4880 2018-02-05 Joel Brobecker <brobecker@adacore.com>
4881
4882 * dwarf2read.c (dwarf2_physname): Move commment.
4883
4884 2018-02-01 Leszek Swirski <leszeks@google.com>
4885
4886 * varobj.c (varobj_formatted_print_options): Allow recursive
4887 pretty printing if pretty printing is enabled.
4888
4889 2018-02-01 Leszek Swirski <leszeks@google.com>
4890
4891 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4892 names after a structop as a filename.
4893
4894 2018-02-01 Yao Qi <yao.qi@linaro.org>
4895
4896 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
4897 (arm_record_coproc_data_proc): Likewise.
4898
4899 2018-02-01 Yao Qi <yao.qi@linaro.org>
4900
4901 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
4902
4903 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
4904
4905 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
4906 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
4907
4908 2018-01-31 Pedro Alves <palves@redhat.com>
4909
4910 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
4911 * inflow.c (child_terminal_save_inferior): Wrap reference to
4912 tcgetpgrp in HAVE_TERMIOS_H.
4913 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
4914 _WIN32.
4915 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
4916 always iterate over all inferiors.
4917 (gdbsim_cntrl_c): Adjust.
4918 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
4919
4920 2018-01-31 Joel Brobecker <brobecker@adacore.com>
4921
4922 * gdbtypes.c (lookup_array_range_type): Make sure the array's
4923 index type is objfile-owned if the element type is as well.
4924
4925 2018-01-31 Joel Brobecker <brobecker@adacore.com>
4926
4927 GDB 8.1 released.
4928
4929 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
4930
4931 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
4932 "features/s390x-linux64.c".
4933 (_initialize_s390_linux_tdep): Remove initialization of tdescs
4934 s390_linux32 and s390x_linux64.
4935 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
4936 default tdesc.
4937 * s390-tdep.c: Include "features/s390-linux32.c" and
4938 "features/s390x-linux64.c".
4939 (s390_tdesc_valid): Add check for tdesc_has_registers.
4940 (s390_gdbarch_init): Make sure there is always a valid tdesc.
4941 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
4942 tdesc_s390x_linux64.
4943 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
4944 tdesc_s390x_linux64 to...
4945 * s390-tdep.h: ...here.
4946
4947 2018-01-30 Pedro Alves <palves@redhat.com>
4948
4949 PR gdb/13211
4950 * config.in, configure: Regenerate.
4951 * configure.ac: Check for getpgid.
4952 * go32-nat.c (go32_pass_ctrlc): New.
4953 (go32_target): Install it.
4954 * inf-child.c (inf_child_target): Install
4955 child_terminal_save_inferior, child_pass_ctrlc and
4956 child_interrupt.
4957 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
4958 (inf_ptrace_target): No longer install it.
4959 * infcmd.c (interrupt_target_1): Adjust.
4960 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
4961 (child_interrupt): Declare.
4962 (inferior::terminal_state): New.
4963 * inflow.c (struct terminal_info): Update comments.
4964 (inferior_process_group): Delete.
4965 (terminal_is_ours): Delete.
4966 (gdb_tty_state): New.
4967 (child_terminal_init): Adjust.
4968 (is_gdb_terminal, sharing_input_terminal_1)
4969 (sharing_input_terminal): New functions.
4970 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
4971 Set the process's actual process group in the foreground if
4972 possible. Handle is_ours_for_output/is_ours distinction. Don't
4973 mark terminal as the inferior's if not sharing GDB's terminal.
4974 Don't check attach_flag.
4975 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
4976 pass down a target_terminal_state.
4977 (child_terminal_save_inferior): New, factored out from ...
4978 (child_terminal_ours_1): ... this. Handle
4979 target_terminal_state::is_ours_for_output.
4980 (child_interrupt, child_pass_ctrlc): New.
4981 (inflow_inferior_exit): Clear the inferior's terminal_state.
4982 (copy_terminal_info): Copy the inferior's terminal state.
4983 (_initialize_inflow): Remove reference to terminal_is_ours.
4984 * inflow.h (inferior_process_group): Delete.
4985 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
4986 * procfs.c (procfs_target): Don't install procfs_interrupt.
4987 (procfs_interrupt): Delete.
4988 * remote.c (remote_serial_quit_handler): Adjust.
4989 (remote_interrupt): Remove ptid parameter. Adjust.
4990 * target-delegates.c: Regenerate.
4991 * target.c: Include "terminal.h".
4992 (target_terminal::terminal_state): Rename to ...
4993 (target_terminal::m_terminal_state): ... this.
4994 (target_terminal::init): Adjust.
4995 (target_terminal::inferior): Adjust to per-inferior
4996 terminal_state.
4997 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
4998 (target_terminal::ours, target_terminal::ours_for_output): Use
4999 target_terminal_is_ours_kind.
5000 (target_interrupt): Remove ptid parameter. Adjust.
5001 (default_target_pass_ctrlc): Adjust.
5002 * target.h (target_ops::to_terminal_save_inferior): New field.
5003 (target_ops::to_interrupt): Remove ptid_t parameter.
5004 (target_interrupt): Remove ptid_t parameter. Update comment.
5005 (target_pass_ctrlc): Update comment.
5006 * target/target.h (target_terminal_state): New scoped enum,
5007 factored out of ...
5008 (target_terminal::terminal_state): ... here.
5009 (target_terminal::inferior): Update comments.
5010 (target_terminal::restore_inferior): New.
5011 (target_terminal::is_inferior, target_terminal::is_ours)
5012 (target_terminal::is_ours_for_output): Adjust.
5013 (target_terminal::scoped_restore_terminal_state): Adjust to
5014 rename, and call restore_inferior() instead of inferior().
5015 (target_terminal::scoped_restore_terminal_state::m_state): Change
5016 type.
5017 (target_terminal::terminal_state): Rename to ...
5018 (target_terminal::m_terminal_state): ... this and change type.
5019
5020 2018-01-30 Pedro Alves <palves@redhat.com>
5021
5022 * linux-nat.c (wait_for_signal): New function.
5023 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5024 directly.
5025 (async_terminal_is_ours)
5026 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5027 (linux_nat_add_target): Don't override
5028 to_terminal_inferior/to_terminal_ours.
5029
5030 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5031
5032 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5033
5034 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5035
5036 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5037 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5038 dwarf2_per_objfile_free here.
5039 (dwarf2_per_objfile_free): Remove.
5040 (_initialize_dwarf2_read): Don't register
5041 dwarf2_per_objfile_free as a registry cleanup.
5042
5043 2018-01-27 Eli Zaretskii <eliz@gnu.org>
5044
5045 Avoid compilation errors in MinGW native builds
5046
5047 The error is triggered by including python-internal.h, and the
5048 error message is:
5049
5050 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5051 from build-gnulib/import/math.h:27,
5052 from d:/usr/Python26/include/pyport.h:235,
5053 from d:/usr/Python26/include/Python.h:58,
5054 from python/python-internal.h:94,
5055 from python/py-arch.c:24:
5056 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5057 using ::hypot;
5058 ^~~~~
5059
5060 This happens because Python headers define 'hypot' to expand t
5061 '_hypot' in the Windows builds.
5062 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5063 'hypoth'. This avoids a compilation error.
5064
5065 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5066
5067 * MAINTAINERS (Write After Approval): Fix ordering.
5068
5069 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5070
5071 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5072
5073 2018-01-26 Alan Modra <amodra@gmail.com>
5074
5075 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5076 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5077 Remove nop. Make const. Comment.
5078 (powerpc32_plt_stub_so_2): New.
5079 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5080 Correct count. Update uses.
5081 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5082 Move common code reading PLT entry word. Correct
5083 powerpc32_plt_stub PLT address calculation.
5084 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5085 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5086 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5087 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5088 (ppc64_standard_linkage8): Likewise.
5089 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5090 Correct insns description.
5091 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5092
5093 2018-01-24 Pedro Alves <palves@redhat.com>
5094
5095 GCC PR libstdc++/83906
5096 * gdbtypes.c (operator==(const dynamic_prop &,
5097 const dynamic_prop &)): New.
5098 (operator==(const range_bounds &, const range_bounds &)): New.
5099 (check_types_equal): Use them instead of memcmp.
5100 * gdbtypes.h (operator==(const dynamic_prop &,
5101 const dynamic_prop &)): Declare.
5102 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5103 (operator==(const range_bounds &, const range_bounds &)): Declare.
5104 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5105
5106 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5107
5108 * s390-linux-tdep.c (s390_record_address_mask)
5109 (s390_record_calc_disp_common, s390_record_calc_disp)
5110 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5111 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5112 (s390_process_record): Move to s390-tdep.c.
5113 (s390_linux_init_abi_any): Adjust.
5114 * s390-tdep.c (s390_record_address_mask)
5115 (s390_record_calc_disp_common, s390_record_calc_disp)
5116 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5117 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5118 (s390_process_record): Moved from s390-linux-tdep.c
5119 (s390_gdbarch_init): Adjust.
5120
5121 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5122
5123 * s390-linux-nat.c (s390-tdep.h): New include.
5124 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5125 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5126 (ALLDEPFILES): Add s390-tdep.c.
5127 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5128 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5129 * s390-tdep.h: ...this. New file.
5130 * s390-linux-tdep.c (s390-tdep.h): New include.
5131 (_initialize_s390_tdep): Rename to...
5132 (_initialize_s390_linux_tdep): ...this and adjust.
5133 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5134 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5135 s390-tdep.h.
5136 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5137 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5138 (s390_is_partial_instruction, s390_software_single_step)
5139 (is_non_branch_ril, s390_displaced_step_copy_insn)
5140 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5141 (s390_prologue_data, s390_addr, s390_store, s390_load)
5142 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5143 (s390_register_call_saved, s390_guess_tracepoint_registers)
5144 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5145 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5146 (s390_pseudo_register_name, s390_pseudo_register_type)
5147 (s390_pseudo_register_read, s390_pseudo_register_write)
5148 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5149 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5150 (s390_addr_bits_remove, s390_address_class_type_flags)
5151 (s390_address_class_type_flags_to_name)
5152 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5153 (s390_function_arg_float, s390_function_arg_vector)
5154 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5155 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5156 (s390_frame_align, s390_register_return_value, s390_return_value)
5157 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5158 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5159 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5160 (s390_trad_frame_prev_register, s390_unwind_cache)
5161 (s390_prologue_frame_unwind_cache)
5162 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5163 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5164 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5165 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5166 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5167 (s390_frame_base_address, s390_local_base_address)
5168 (s390_frame_base, s390_gcc_target_options)
5169 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5170 (s390_validate_reg_range, s390_tdesc_valid)
5171 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5172 * s390-tdep.c: ...this. New file.
5173
5174 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5175
5176 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5177 (s390_process_record, s390_gdbarch_tdep_alloc)
5178 (s390_linux_init_abi_any): Use/set new hook.
5179
5180 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5181
5182 * s390-linux-tdep.c (osabi.h): New include.
5183 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5184 (s390_linux_init_abi_any): New functions.
5185 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5186
5187 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5188
5189 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5190 tdesc_has_registers check
5191
5192 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5193
5194 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5195 (s390_validate_reg_range): New macro.
5196 (s390_gdbarch_init): Adjust.
5197
5198 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5199
5200 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5201 (s390_gdbarch_tdep_alloc): Adjust.
5202 (s390_gdbarch_init): Adjust.
5203
5204 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5205
5206 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5207 <have_tdb>: Change type to bool.
5208 (s390_gdbarch_tdep_alloc): Adjust.
5209 (s390_gdbarch_init): Adjust.
5210
5211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5212
5213 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5214 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5215 (s390_gdbarch_tdep_alloc): New function.
5216 (s390_gdbarch_init): Allocate tdep at start and use its fields
5217 instead of separate variables.
5218
5219 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5220
5221 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5222 when looking for cached gdbarch and add comment for remaining.
5223
5224 2018-01-22 Pedro Alves <palves@redhat.com>
5225 Sergio Durigan Junior <sergiodj@redhat.com>
5226
5227 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5228 case.
5229
5230 2018-01-22 Maciej W. Rozycki <macro@mips.com>
5231
5232 * MAINTAINERS: Update my company e-mail address.
5233
5234 2018-01-22 Yao Qi <yao.qi@linaro.org>
5235
5236 * regcache.c (cooked_write_test): New function.
5237 (_initialize_regcache): Register the test.
5238
5239 2018-01-22 Yao Qi <yao.qi@linaro.org>
5240
5241 * ia64-tdep.c (ia64_pseudo_register_read): Call
5242 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5243 * m32c-tdep.c (m32c_cat_read): Likewise.
5244 (m32c_r3r2r1r0_read): Likewise.
5245 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5246 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5247
5248 2018-01-22 Yao Qi <yao.qi@linaro.org>
5249
5250 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5251 method raw_read instead of regcache_raw_read.
5252 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5253 * arm-tdep.c (arm_neon_quad_read): Likewise.
5254 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5255 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5256 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5257 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5258 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5259 (i386_pseudo_register_read_into_value): Likewise.
5260 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5261 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5262 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5263 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5264 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5265 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5266 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5267 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5268 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5269
5270 2018-01-22 Yao Qi <yao.qi@linaro.org>
5271
5272 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5273 * configure.tgt: Remove target mt.
5274 * mt-tdep.c: Remove.
5275 * regcache.c (cooked_read_test): Remove the check for mt.
5276
5277 2018-01-22 Yao Qi <yao.qi@linaro.org>
5278
5279 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5280 instead of gdbarch_pseudo_register_read_value.
5281
5282 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5283
5284 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5285 language is Ada.
5286
5287 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5288
5289 * linespec.c (create_sals_line_offset): Remove code that preserved
5290 the symtab_and_line's line number.
5291
5292 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5293
5294 * varobj.c (varobj_create): Don't set valid_block when creating a
5295 floating varobj.
5296
5297 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5298
5299 * varobj.c (varobj_create): Remove out of date comment.
5300
5301 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5302
5303 PR mi/20395
5304 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5305 updating innermost block.
5306 * parse.c (innermost_block_tracker::update): Take extra type
5307 parameter, and check types match before updating innermost block.
5308 (write_dollar_variable): Update innermost block for registers.
5309 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5310 (innermost_block_tracker::innermost_block_tracker): Initialise
5311 m_types member.
5312 (innermost_block_tracker::reset): Take type parameter.
5313 (innermost_block_tracker::update): Take type parameter, and pass
5314 type through as needed.
5315 (innermost_block_tracker::m_types): New member.
5316 * varobj.c (varobj_create): Pass type when reseting innermost
5317 block.
5318
5319 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5320
5321 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5322 * ada-lang.c (resolve_subexp): Likewise.
5323 * breakpoint.c (set_breakpoint_condition) Likewise.
5324 (watch_command_1) Likewise.
5325 * c-exp.y (variable): Likewise.
5326 * d-exp.y (PrimaryExpression): Likewise.
5327 * f-exp.y (variable): Likewise.
5328 * go-exp.y (variable): Likewise.
5329 * m2-exp.y (variable): Likewise.
5330 * objfiles.c (objfile::~objfile): Likewise.
5331 * p-exp.y (variable): Likewise.
5332 * parse.c (innermost_block): Change type.
5333 * parser-defs.h (class innermost_block_tracker): New.
5334 (innermost_block): Change to innermost_block_tracker.
5335 * printcmd.c (display_command): Switch to innermost_block API.
5336 (do_one_display): Likewise.
5337 * rust-exp.y (do_one_display): Likewise.
5338 * symfile.c (clear_symtab_users): Likewise.
5339 * varobj.c (varobj_create): Switch to innermost_block API, replace
5340 use of innermost_block with block stored on varobj object.
5341
5342 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5343
5344 * expression.h (innermost_block): Remove declaration.
5345 * varobj.c: Add 'parser-defs.h' include.
5346
5347 2018-01-19 Tom Tromey <tom@tromey.com>
5348
5349 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5350 symbols in the static and global blocks.
5351
5352 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5353
5354 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5355 gdb_ptrace.h, and move including gdb_wait.h ...
5356 * nat/linux-ptrace.h: ... to here.
5357
5358 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5359
5360 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5361 inf_ptrace_detach_success.
5362 (inf_ptrace_detach_success): Add inferior parameter, use it
5363 instead of inferior_ptid, pass it to detach_inferior.
5364 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5365 parameter.
5366 * inferior.c (detach_inferior): Add overload that takes an
5367 inferior object.
5368 * inferior.h (detach_inferior): Likewise.
5369 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5370 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5371 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5372
5373 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5374
5375 * target.h (struct target_ops) <to_detach>: Add inferior
5376 parameter.
5377 (target_detach): Likewise.
5378 * target.c (dispose_inferior): Pass inferior down.
5379 (target_detach): Pass inferior down. Assert that it is equal to
5380 the current inferior.
5381 * aix-thread.c (aix_thread_detach): Pass inferior down.
5382 * corefile.c (core_file_command): Pass current_inferior() down.
5383 * corelow.c (core_detach): Add inferior parameter.
5384 * darwin-nat.c (darwin_detach): Likewise.
5385 * gnu-nat.c (gnu_detach): Likewise.
5386 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5387 * infcmd.c (detach_command): Pass current_inferior() down to
5388 target_detach.
5389 * infrun.c (follow_fork_inferior): Pass parent_inf to
5390 target_detach.
5391 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5392 target_detach.
5393 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5394 * linux-thread-db.c (thread_db_detach): Likewise.
5395 * nto-procfs.c (procfs_detach): Likewise.
5396 * procfs.c (procfs_detach): Likewise.
5397 * record.c (record_detach): Likewise.
5398 * record.h (struct inferior): Forward-declare.
5399 (record_detach): Add inferior parameter.
5400 * remote-sim.c (gdbsim_detach): Likewise.
5401 * remote.c (remote_detach_1): Likewise.
5402 (remote_detach): Likewise.
5403 (extended_remote_detach): Likewise.
5404 * sol-thread.c (sol_thread_detach): Likewise.
5405 * target-debug.h (target_debug_print_inferior_p): New macro.
5406 * target-delegates.c: Re-generate.
5407 * top.c (kill_or_detach): Pass inferior down to target_detach.
5408 * windows-nat.c (windows_detach): Add inferior parameter.
5409
5410 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5411
5412 * target.h (struct target_ops) <to_detach>: Remove args
5413 parameter.
5414 (target_detach): Likewise.
5415 * target.c (dispose_inferior): Adjust.
5416 (target_detach): Remove args parameter, adjust.
5417 * aix-thread.c (aix_thread_detach): Adjust.
5418 * corefile.c (core_file_command): Adjust.
5419 * corelow.c (core_detach): Adjust.
5420 * darwin-nat.c (darwin_detach): Adjust.
5421 * gnu-nat.c (gnu_detach): Adjust.
5422 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5423 * infcmd.c (detach_command): Adjust
5424 * infrun.c (follow_fork_inferior): Adjust.
5425 (handle_vfork_child_exec_or_exit): Adjust.
5426 * linux-fork.c (linux_fork_detach): Remove args parameter.
5427 * linux-fork.h (linux_fork_detach): Likewise.
5428 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5429 * linux-thread-db.c (thread_db_detach): Likewise.
5430 * nto-procfs.c (procfs_detach): Likewise.
5431 * procfs.c (procfs_detach): Likewise.
5432 (do_detach): Remove signo parameter.
5433 * record.c (record_detach): Remove args parameter.
5434 * record.h (record_detach): Likewise.
5435 * remote-sim.c (gdbsim_detach): Likewise.
5436 * remote.c (remote_detach_1): Likewise.
5437 (remote_detach): Likewise.
5438 (extended_remote_detach): Likewise.
5439 * sol-thread.c (sol_thread_detach): Likewise.
5440 * target-delegates.c: Re-generate.
5441 * top.c (struct qt_args) <args>: Remove field.
5442 (kill_or_detach): Don't pass args.
5443 (quit_force): Don't set args.
5444 * windows-nat.c (windows_detach): Remove args parameter.
5445
5446 2018-01-19 Yao Qi <yao.qi@linaro.org>
5447
5448 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5449 (arm_linux_init_abi): Install it.
5450
5451 2018-01-19 Yao Qi <yao.qi@linaro.org>
5452
5453 * osabi.c (gdb_osabi_names): Extend the regexp for
5454 arm-linux-gnueabihf.
5455
5456 2018-01-18 Yao Qi <yao.qi@linaro.org>
5457
5458 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5459 m_abbrevs.
5460 (abbrev_table::add_abbrev): Update.
5461 (abbrev_table::lookup_abbrev): Update.
5462
5463 2018-01-18 Yao Qi <yao.qi@linaro.org>
5464
5465 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5466
5467 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5468
5469 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5470 to "std::string".
5471
5472 2018-01-17 Tom Tromey <tom@tromey.com>
5473
5474 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5475
5476 2018-01-17 Tom Tromey <tom@tromey.com>
5477
5478 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5479 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5480 (create_array_type_with_stride): Update.
5481 * dwarf2read.c (set_die_type): Update.
5482
5483 2018-01-17 Tom Tromey <tom@tromey.com>
5484
5485 * dwarf2read.c (delayed_method_info): Remove typedef.
5486 (dwarf2_cu::method_info): Now a std::vector.
5487 (add_to_method_list): Update.
5488 (free_delayed_list): Remove.
5489 (compute_delayed_physnames): Update.
5490 (process_full_comp_unit, process_full_type_unit): Clear the method
5491 list. Remove cleanups.
5492 (psymtab_include_file_name): Add name_holder parameter. Use
5493 unique_xmalloc_ptr.
5494 (dwarf_decode_lines): Update.
5495
5496 2018-01-17 Tom Tromey <tom@tromey.com>
5497 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5500 (dwarf2_per_objfile::free_cached_comp_units)
5501 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5502 (init_cutu_and_read_dies_no_follow): Update.
5503 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5504 (dwarf2_cu::~dwarf2_cu): New.
5505 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5506 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5507
5508 2018-01-17 Tom Tromey <tom@tromey.com>
5509 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5512 (struct die_reader_specs) <abbrev_table>: New member.
5513 (struct abbrev_table): Add constructor.
5514 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5515 <abbrev_obstack>: Now an auto_obstack.
5516 (abbrev_table_up): New typedef.
5517 (init_cu_die_reader): Add abbrev_table parameter.
5518 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5519 Add result_dwo_abbrev_table.
5520 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5521 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5522 Update.
5523 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5524 parameter.
5525 (skip_children): Update.
5526 (abbrev_table::alloc_abbrev): Rename from
5527 abbrev_table_alloc_abbrev.
5528 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5529 (abbrev_table::lookup_abbrev): Rename from
5530 abbrev_table_lookup_abbrev.
5531 (abbrev_table_read_table): Return abbrev_table_up.
5532 (abbrev_table_free, abbrev_table_free_cleanup)
5533 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5534 (load_partial_dies): Update.
5535
5536 2018-01-17 Tom Tromey <tom@tromey.com>
5537
5538 * dwarf2read.c (dwarf2_compute_name): Update comment.
5539 (read_func_scope, read_variable): Update.
5540 (new_symbol): Remove.
5541 (new_symbol_full): Rename to new_symbol.
5542
5543 2018-01-17 Mike Gulick <mgulick@mathworks.com>
5544
5545 PR gdb/16577
5546 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5547 a warning instead of throwing an error, set section size to 0 and return
5548 NULL.
5549 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5550
5551 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5554 std::string.
5555 (linux_ptrace_attach_fail_reason_string): Likewise.
5556 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5557 Likewise.
5558 (linux_ptrace_attach_fail_reason_string): Likewise.
5559 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5560
5561 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5562
5563 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5564
5565 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5566
5567 PR gdb/21559
5568 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5569 checking for fs_base/gs_base fields in struct user_regs_struct.
5570 * configure: Regenerate.
5571
5572 2018-01-17 Yao Qi <yao.qi@linaro.org>
5573
5574 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5575 function.
5576 (aarch64_linux_init_abi): Install it to gdbarch hook
5577 gcc_target_options.
5578
5579 2018-01-15 Pedro Alves <palves@redhat.com>
5580
5581 * common/signals-state-save-restore.c
5582 (save_original_signals_state): Fix typos.
5583
5584 2017-01-12 Tom Tromey <tom@tromey.com>
5585 Sergio Durigan Junior <sergiodj@redhat.com>
5586
5587 * Makefile.in (install-only): Install gdb-add-index.
5588
5589 2018-01-12 John Baldwin <jhb@FreeBSD.org>
5590
5591 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5592
5593 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5594
5595 * infrun.c (keep_going_pass_signal): Clear step-over info when
5596 insert_breakpoints fails.
5597
5598 2018-01-11 Pedro Alves <palves@redhat.com>
5599
5600 PR gdb/22583
5601 * infrun.c (resume): Rename to ...
5602 (resume_1): ... this.
5603 (resume): Reimplement as wrapper around resume_1.
5604
5605 2018-01-11 Pedro Alves <palves@redhat.com>
5606
5607 PR remote/22597
5608 * remote.c (remote_parse_stop_reply): Default to the last-set
5609 general thread instead of to 'magic_null_ptid'.
5610
5611 2018-01-10 Pedro Alves <palves@redhat.com>
5612
5613 * language.h (language_get_symbol_name_matcher): Rename ...
5614 (get_symbol_name_matcher): ... this.
5615 * language.c (language_get_symbol_name_matcher): Ditto.
5616 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5617 callers adjusted.
5618
5619 2018-01-10 Pedro Alves <palves@redhat.com>
5620
5621 PR gdb/22670
5622 * dwarf2read.c
5623 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5624 Adjust to use language_get_symbol_name_matcher instead of
5625 language_defn::la_get_symbol_name_matcher.
5626 * language.c (language_get_symbol_name_matcher): If in Ada mode
5627 and the lookup name is a verbatim match, return Ada's matcher.
5628 * language.h (language_get_symbol_name_matcher): Adjust comment.
5629 (ada_lookup_name_info::verbatim_p):: New method.
5630
5631 2018-01-10 Pedro Alves <palves@redhat.com>
5632
5633 PR gdb/22670
5634 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5635 minsym's language is language_auto or language_cplus, pass down
5636 language_ada instead.
5637 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5638
5639 2018-01-10 Pedro Alves <palves@redhat.com>
5640
5641 PR gdb/22670
5642 * minsyms.c (linkage_name_str): New function.
5643 (iterate_over_minimal_symbols): Use it.
5644
5645 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5646
5647 * NEWS: Document that 'info proc' now works on FreeBSD.
5648
5649 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5650
5651 * configure.ac: Check for kinfo_getfile in libutil.
5652 * configure: Regenerate.
5653 * config.in: Regenerate.
5654 * fbsd-nat.c: Include "fbsd-tdep.h".
5655 (fbsd_fetch_cmdline): New.
5656 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5657 rather than calling error.
5658 (fbsd_info_proc): New.
5659 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5660 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5661 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5662
5663 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5664
5665 * fbsd-nat.c (struct free_deleter): Remove.
5666 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5667
5668 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5669
5670 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5671 NULL for an empty pathname.
5672
5673 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5674
5675 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5676 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5677 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5678 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5679 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5680 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5681 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5682 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5683 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5684 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5685 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5686 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5687 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5688 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5689 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5690
5691 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5692
5693 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5694 (gnu_xfer_auxv): New function.
5695 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5696 TARGET_OBJECT_AUXV.
5697
5698 2018-01-08 Yao Qi <yao.qi@linaro.org>
5699 Simon Marchi <simon.marchi@ericsson.com>
5700
5701 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5702 common/selftest.c.
5703 (COMMON_OBS): Remove selftest.o.
5704 * configure.ac: Append selftest-arch.c and common/selftest.c to
5705 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5706 * configure: Re-generated.
5707 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5708 GDB_SELF_TEST.
5709 (maintenance_info_selftests): Likewise.
5710
5711 2018-01-08 Xavier Roirand <roirand@adacore.com>
5712
5713 * ada-valprint.c (val_print_packed_array_elements): Use
5714 proper number of elements when printing an array indexed
5715 by an enumeration type.
5716
5717 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5718
5719 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5720 (dw2_get_file_names_reader): Adjust.
5721 (lookup_dwo_signatured_type): Adjust.
5722 (lookup_dwp_signatured_type): Adjust.
5723 (lookup_signatured_type): Adjust.
5724 (create_type_unit_group): Adjust.
5725 (get_type_unit_group): Adjust.
5726 (process_psymtab_comp_unit_reader): Adjust.
5727 (build_type_psymtabs_reader): Adjust.
5728 (scan_partial_symbols): Adjust.
5729 (add_partial_symbol): Adjust.
5730 (add_partial_subprogram): Adjust.
5731 (peek_die_abbrev): Adjust.
5732 (fixup_go_packaging): Adjust.
5733 (process_imported_unit_die): Adjust.
5734 (dwarf2_compute_name): Adjust.
5735 (dwarf2_physname): Adjust.
5736 (read_import_statement): Adjust.
5737 (handle_DW_AT_stmt_list): Adjust.
5738 (read_file_scope): Adjust.
5739 (read_func_scope): Adjust.
5740 (read_lexical_block_scope): Adjust.
5741 (read_call_site_scope): Adjust.
5742 (read_variable): Adjust.
5743 (dwarf2_rnglists_process): Adjust.
5744 (dwarf2_ranges_process): Adjust.
5745 (dwarf2_ranges_read): Adjust.
5746 (dwarf2_get_pc_bounds): Adjust.
5747 (dwarf2_record_block_ranges): Adjust.
5748 (dwarf2_add_field): Adjust.
5749 (dwarf2_add_member_fn): Adjust.
5750 (read_structure_type): Adjust.
5751 (process_structure_scope): Adjust.
5752 (read_enumeration_type): Adjust.
5753 (read_array_type): Adjust.
5754 (mark_common_block_symbol_computed): Adjust.
5755 (read_common_block): Adjust.
5756 (read_namespace_type): Adjust.
5757 (read_namespace): Adjust.
5758 (read_module_type): Adjust.
5759 (read_tag_pointer_type): Adjust.
5760 (read_tag_ptr_to_member_type): Adjust.
5761 (read_tag_string_type): Adjust.
5762 (read_subroutine_type): Adjust.
5763 (read_typedef): Adjust.
5764 (read_base_type): Adjust.
5765 (attr_to_dynamic_prop): Adjust.
5766 (read_subrange_type): Adjust.
5767 (read_unspecified_type): Adjust.
5768 (dwarf2_read_abbrevs): Adjust.
5769 (load_partial_dies): Adjust.
5770 (read_partial_die): Adjust.
5771 (find_partial_die): Adjust.
5772 (guess_partial_die_structure_name): Adjust.
5773 (fixup_partial_die): Adjust.
5774 (read_attribute_value): Adjust.
5775 (read_addr_index): Adjust.
5776 (read_addr_index_from_leb128): Adjust.
5777 (read_str_index): Adjust.
5778 (dwarf2_string_attr): Adjust.
5779 (get_debug_line_section): Adjust.
5780 (dwarf_decode_line_header): Adjust.
5781 (lnp_state_machine::check_line_address): Adjust.
5782 (dwarf_decode_lines_1): Adjust.
5783 (dwarf_decode_lines): Adjust.
5784 (dwarf2_start_symtab): Adjust.
5785 (var_decode_location): Adjust.
5786 (new_symbol_full): Adjust.
5787 (dwarf2_const_value_data): Adjust.
5788 (dwarf2_const_value_attr): Adjust.
5789 (dwarf2_const_value): Adjust.
5790 (die_type): Adjust.
5791 (die_containing_type): Adjust.
5792 (build_error_marker_type): Adjust.
5793 (lookup_die_type): Adjust.
5794 (guess_full_die_structure_name): Adjust.
5795 (anonymous_struct_prefix): Adjust.
5796 (determine_prefix): Adjust.
5797 (dwarf2_name): Adjust.
5798 (follow_die_ref_or_sig): Adjust.
5799 (follow_die_offset): Adjust.
5800 (follow_die_ref): Adjust.
5801 (follow_die_sig_1): Adjust.
5802 (follow_die_sig): Adjust.
5803 (get_signatured_type): Adjust.
5804 (get_DW_AT_signature_type): Adjust.
5805 (decode_locdesc): Adjust.
5806 (dwarf_decode_macros): Adjust.
5807 (cu_debug_loc_section): Adjust.
5808 (fill_in_loclist_baton): Adjust.
5809 (dwarf2_symbol_mark_computed): Adjust.
5810 (init_one_comp_unit): Don't assign
5811 dwarf2_cu::dwarf2_per_objfile.
5812 (set_die_type): Adjust.
5813
5814 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5815
5816 * dwarf2read.c (struct mapped_debug_names): Add constructor.
5817 <dwarf2_per_objfile>: New field.
5818 (dwarf2_per_objfile): Remove global.
5819 (get_dwarf2_per_objfile): New function.
5820 (set_dwarf2_per_objfile): New function.
5821 (dwarf2_build_psymtabs_hard): Change objfile parameter to
5822 dwarf2_per_objfile.
5823 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5824 (read_abbrev_offset): Likewise.
5825 (read_indirect_string): Likewise.
5826 (read_indirect_line_string): Likewise.
5827 (read_indirect_string_at_offset): Likewise.
5828 (read_indirect_string_from_dwz): Likewise.
5829 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5830 dwarf2_per_objfile.
5831 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5832 (create_all_comp_units): Change objfile parameter to
5833 dwarf2_per_objfile.
5834 (create_all_type_units): Likewise.
5835 (process_queue): Add dwarf2_per_objfile parameter.
5836 (read_and_check_comp_unit_head): Likewise.
5837 (lookup_dwo_unit_in_dwp): Likewise.
5838 (get_dwp_file): Likewise.
5839 (process_cu_includes): Likewise.
5840 (struct free_dwo_file_cleanup_data): New struct.
5841 (dwarf2_has_info): Use get_dwarf2_per_objfile and
5842 set_dwarf2_per_objfile.
5843 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5844 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5845 context, adjust calls.
5846 (dw2_instantiate_symtab): Likewise.
5847 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5848 (dw2_get_cu): Likewise.
5849 (create_cu_from_index_list): Change objfile parameter to
5850 dwarf2_per_objfile.
5851 (create_cus_from_index_list): Get dwarf2_per_objfile from
5852 context, adjust calls.
5853 (create_cus_from_index): Likewise.
5854 (create_signatured_type_table_from_index): Change objfile
5855 parameter to dwarf2_per_objfile.
5856 (create_signatured_type_table_from_debug_names): Change objfile
5857 parameter to dwarf2_per_objfile.
5858 (create_addrmap_from_index): Likewise.
5859 (create_addrmap_from_aranges): Likewise.
5860 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5861 (dw2_setup): Remove.
5862 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5863 context.
5864 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5865 get_dwarf2_per_objfile.
5866 (dw2_forget_cached_source_info): Likewise.
5867 (dw2_map_symtabs_matching_filename): Likewise.
5868 (struct dw2_symtab_iterator) <index>: Remove.
5869 <dwarf2_per_objfile>: New field.
5870 (dw2_symtab_iter_init): Replace index parameter with
5871 dwarf2_per_objfile.
5872 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5873 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5874 (dw2_print_stats): Likewise.
5875 (dw2_dump): Likewise.
5876 (dw2_expand_symtabs_for_function): Likewise.
5877 (dw2_expand_all_symtabs): Likewise.
5878 (dw2_expand_symtabs_with_fullname): Likewise.
5879 (dw2_expand_marked_cus): Replace index and objfile parameters
5880 with dwarf2_per_objfile.
5881 (dw_expand_symtabs_matching_file_matcher): Add
5882 dwarf2_per_objfile parameter and adjust calls.
5883 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5884 adjust calls.
5885 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5886 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5887 adjust calls.
5888 (create_cus_from_debug_names_list): Replace objfile parameter
5889 with dwarf2_per_objfile and adjust calls.
5890 (create_cus_from_debug_names): Likewise.
5891 (dwarf2_read_debug_names): Likewise.
5892 (mapped_debug_names::namei_to_name): Adjust call.
5893 (dw2_debug_names_iterator::next): Likewise.
5894 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
5895 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
5896 (dw2_debug_names_dump): Likewise.
5897 (dw2_debug_names_expand_symtabs_for_function): Likewise.
5898 (dw2_debug_names_expand_symtabs_matching): Likewise.
5899 (dwarf2_initialize_objfile): Likewise.
5900 (dwarf2_build_psymtabs): Likewise.
5901 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
5902 this_cu.
5903 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
5904 (read_and_check_comp_unit_head): Likewise.
5905 (read_abbrev_offset): Likewise.
5906 (create_debug_type_hash_table): Likewise.
5907 (create_debug_types_hash_table): Likewise.
5908 (create_all_type_units): Replace objfile parameter with
5909 dwarf2_per_objfile.
5910 (add_type_unit): Add dwarf2_per_objfile parameter.
5911 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
5912 with dwarf2_per_objfile.
5913 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
5914 (lookup_dwp_signatured_type): Likewise.
5915 (lookup_signatured_type): Likewise.
5916 (read_cutu_die_from_dwo): Likewise.
5917 (init_tu_and_read_dwo_dies): Likewise.
5918 (init_cutu_and_read_dies): Likewise.
5919 (init_cutu_and_read_dies_no_follow): Likewise.
5920 (allocate_type_unit_groups_table): Add objfile parameter.
5921 (create_type_unit_group): Use dwarf2_per_objfile from cu.
5922 (get_type_unit_group): Likewise.
5923 (process_psymtab_comp_unit): Update call.
5924 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
5925 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
5926 (print_tu_stats): Likewise.
5927 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
5928 in void* parameter.
5929 (build_type_psymtabs): Change objfile parameter to
5930 dwarf2_per_objfile.
5931 (process_skeletonless_type_unit): Use dwarf2_per_objfile
5932 passed in void* parameter.
5933 (process_skeletonless_type_units): Change objfile parameter to
5934 dwarf2_per_objfile.
5935 (set_partial_user): Likewise.
5936 (dwarf2_build_psymtabs_hard): Likewise.
5937 (read_comp_units_from_section): Likewise.
5938 (create_all_comp_units): Likewise.
5939 (scan_partial_symbols): Update calls.
5940 (add_partial_symbol): Likewise.
5941 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
5942 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
5943 (process_queue): Add dwarf2_per_objfile parameter.
5944 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
5945 (compute_compunit_symtab_includes): Likewise.
5946 (process_cu_includes): Add dwarf2_per_objfile parameter.
5947 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
5948 (process_full_type_unit): Likewise.
5949 (process_imported_unit_die): Update call.
5950 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
5951 (read_file_scope): Likewise.
5952 (allocate_dwo_file_hash_table): Add objfile parameter.
5953 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
5954 (create_cus_hash_table): Likewise.
5955 (create_dwp_hash_table): Likewise.
5956 (create_dwo_unit_in_dwp_v1): Likewise.
5957 (create_dwp_v2_section): Likewise.
5958 (create_dwo_unit_in_dwp_v2): Likewise.
5959 (lookup_dwo_unit_in_dwp): Likewise.
5960 (try_open_dwop_file): Likewise.
5961 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
5962 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
5963 cleanup to include a reference to dwarf2_per_objfile.
5964 (open_dwp_file): Add dwarf2_per_objfile parameter.
5965 (open_and_init_dwp_file): Likewise.
5966 (get_dwp_file): Likewise.
5967 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
5968 (queue_and_load_all_dwo_tus): Update call.
5969 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
5970 data.
5971 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
5972 (dwarf2_ranges_process): Likewise.
5973 (dwarf2_get_pc_bounds): Likewise.
5974 (mark_common_block_symbol_computed): Likewise.
5975 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5976 (dwarf2_read_abbrevs): Update call.
5977 (read_partial_die): Use dwarf2_per_objfile from cu.
5978 (find_partial_die): Likewise.
5979 (fixup_partial_die): Likewise.
5980 (read_attribute_value): Likewise.
5981 (read_indirect_string_at_offset_from): Add objfile parameter.
5982 (read_indirect_string_at_offset): Add dwarf2_per_objfile
5983 parameter.
5984 (read_indirect_string_from_dwz): Add objfile parameter.
5985 (read_indirect_string): Add objfile parameter.
5986 (read_addr_index_1): Add dwarf2_per_objfile parameter.
5987 (read_addr_index): Use dwarf2_per_objfile from cu.
5988 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
5989 call dw2_setup.
5990 (read_str_index): Use dwarf2_per_objfile from cu.
5991 (get_debug_line_section): Likewise.
5992 (read_formatted_entries): Add dwarf2_per_objfile parameter.
5993 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
5994 (new_symbol_full): Use dwarf2_per_objfile from cu.
5995 (build_error_marker_type): Likewise.
5996 (lookup_die_type): Likewise.
5997 (determine_prefix): Likewise.
5998 (follow_die_offset): Likewise.
5999 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6000 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6001 (dwarf2_fetch_die_type_sect_off): Likewise.
6002 (dwarf2_get_die_type): Likewise.
6003 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6004 (get_signatured_type): Likewise.
6005 (get_DW_AT_signature_type): Likewise.
6006 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6007 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6008 (cu_debug_loc_section): Likewise.
6009 (fill_in_loclist_baton): Likewise.
6010 (dwarf2_symbol_mark_computed): Likewise.
6011 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6012 dwarf2_per_objfile.
6013 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6014 parameter.
6015 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6016 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6017 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6018 (set_die_type): Use dwarf2_free_objfile from cu.
6019 (get_die_type_at_offset): Likewise.
6020 (dwarf2_per_objfile_free): Don't assign global variable.
6021 (debug_names) <constructor>: Add dwarf2_per_objfile
6022 parameter, update m_debugstrlookup construction.
6023 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6024 parameter.
6025 <m_dwarf2_per_objfile>: New field.
6026 <lookup>: Use m_dwarf2_per_objfile.
6027 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6028 (psyms_seen_size): Likewise.
6029 (write_gdbindex): Replace objfile parameter with
6030 dwarf2_per_objfile.
6031 (write_debug_names): Likewise.
6032 (write_psymtabs_to_index): Likewise.
6033 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6034 calls.
6035
6036 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6037
6038 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6039 <dwarf2_per_objfile>: New field.
6040 (struct dwarf2_per_cu_data) <objfile>: Remove.
6041 <dwarf2_per_objfile>: New field.
6042 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6043 of objfile.
6044 (create_signatured_type_table_from_index): Likewise.
6045 (create_debug_type_hash_table): Likewise.
6046 (fill_in_sig_entry_from_dwo_entry): Likewise.
6047 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6048 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6049 objfile.
6050 (create_partial_symtab): Access objfile through
6051 dwarf2_per_objfile.
6052 (process_psymtab_comp_unit_reader): Likewise.
6053 (read_comp_units_from_section): Likewise.
6054 (scan_partial_symbols): Likewise.
6055 (add_partial_symbol): Likewise.
6056 (add_partial_subprogram): Likewise.
6057 (peek_die_abbrev): Likewise.
6058 (fixup_go_packaging): Likewise.
6059 (process_full_comp_unit): Likewise.
6060 (process_full_type_unit): Likewise.
6061 (process_imported_unit_die): Likewise.
6062 (dwarf2_compute_name): Likewise.
6063 (dwarf2_physname): Likewise.
6064 (read_import_statement): Likewise.
6065 (create_cus_hash_table): Assign dwarf2_physname instead of
6066 objfile.
6067 (read_func_scope): Access objfile through dwarf2_per_objfile.
6068 (read_lexical_block_scope): Likewise.
6069 (read_call_site_scope): Likewise.
6070 (read_variable): Likewise.
6071 (dwarf2_rnglists_process): Likewise.
6072 (dwarf2_ranges_process): Likewise.
6073 (dwarf2_ranges_read): Likewise.
6074 (dwarf2_record_block_ranges): Likewise.
6075 (dwarf2_add_field): Likewise.
6076 (dwarf2_add_member_fn): Likewise.
6077 (read_structure_type): Likewise.
6078 (process_structure_scope): Likewise.
6079 (read_enumeration_type): Likewise.
6080 (read_array_type): Likewise.
6081 (read_common_block): Likewise.
6082 (read_namespace_type): Likewise.
6083 (read_namespace): Likewise.
6084 (read_module_type): Likewise.
6085 (read_tag_pointer_type): Likewise.
6086 (read_tag_ptr_to_member_type): Likewise.
6087 (read_tag_string_type): Likewise.
6088 (read_subroutine_type): Likewise.
6089 (read_typedef): Likewise.
6090 (read_base_type): Likewise.
6091 (attr_to_dynamic_prop): Likewise.
6092 (read_subrange_type): Likewise.
6093 (read_unspecified_type): Likewise.
6094 (load_partial_dies): Likewise.
6095 (read_partial_die): Likewise.
6096 (find_partial_die): Likewise.
6097 (guess_partial_die_structure_name): Likewise.
6098 (fixup_partial_die): Likewise.
6099 (read_attribute_value): Likewise.
6100 (read_addr_index_from_leb128): Likewise.
6101 (dwarf2_read_addr_index): Likewise.
6102 (dwarf2_string_attr): Likewise.
6103 (lnp_state_machine::check_line_address): Likewise.
6104 (dwarf_decode_lines_1): Likewise.
6105 (dwarf_decode_lines): Likewise.
6106 (dwarf2_start_symtab): Likewise.
6107 (var_decode_location): Likewise.
6108 (new_symbol_full): Likewise.
6109 (dwarf2_const_value_data): Likewise.
6110 (dwarf2_const_value_attr): Likewise.
6111 (dwarf2_const_value): Likewise.
6112 (die_type): Likewise.
6113 (die_containing_type): Likewise.
6114 (lookup_die_type): Likewise.
6115 (guess_full_die_structure_name): Likewise.
6116 (anonymous_struct_prefix): Likewise.
6117 (dwarf2_name): Likewise.
6118 (follow_die_ref_or_sig): Likewise.
6119 (follow_die_offset): Likewise.
6120 (follow_die_ref): Likewise.
6121 (dwarf2_fetch_die_loc_sect_off): Likewise.
6122 (dwarf2_fetch_constant_bytes): Likewise.
6123 (dwarf2_fetch_die_type_sect_off): Likewise.
6124 (dwarf2_get_die_type): Likewise.
6125 (follow_die_sig): Likewise.
6126 (decode_locdesc): Likewise.
6127 (dwarf2_per_cu_objfile): Likewise.
6128 (dwarf2_per_cu_text_offset): Likewise.
6129 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6130 objfile.
6131 (set_die_type): Access objfile through
6132 dwarf2_per_objfile.
6133
6134 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * valprint.c (converted_character_d): Remove typedef.
6137 (DEF_VEC_O (converted_character_d)): Remove.
6138 (count_next_character): Use std::vector.
6139 (print_converted_chars_to_obstack): Likewise.
6140 (generic_printstr): Likewise.
6141
6142 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6143
6144 * xml-support.h (struct gdb_xml_value): Add constructor.
6145 <value>: Change type to unique_xmalloc_ptr.
6146 (gdb_xml_value_s): Remove typedef.
6147 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6148 (gdb_xml_element_start_handler): Change parameter type to
6149 std::vector.
6150 (xml_find_attribute): Likewise.
6151 * xml-support.c (xml_find_attribute): Change parameter type to
6152 std::vector and adjust.
6153 (gdb_xml_values_cleanup): Remove.
6154 (gdb_xml_parser::start_element): Adjust to std::vector.
6155 (xinclude_start_include): Change paraeter type to std::vector
6156 and adjust.
6157 * btrace.c (check_xml_btrace_version): Likewise.
6158 (parse_xml_btrace_block): Likewise.
6159 (parse_xml_btrace_pt_config_cpu): Likewise.
6160 (parse_xml_btrace_pt): Likewise.
6161 (parse_xml_btrace_conf_bts): Likewise.
6162 (parse_xml_btrace_conf_pt): Likewise.
6163 * memory-map.c (memory_map_start_memory): Likewise.
6164 (memory_map_start_property): Likewise.
6165 * osdata.c (osdata_start_osdata): Likewise.
6166 (osdata_start_item): Likewise.
6167 (osdata_start_column): Likewise.
6168 * remote.c (start_thread): Likewise.
6169 * solib-aix.c (library_list_start_library): Likewise.
6170 (library_list_start_list): Likewise.
6171 * solib-svr4.c (library_list_start_library): Likewise.
6172 (svr4_library_list_start_list): Likewise.
6173 * solib-target.c (library_list_start_segment): Likewise.
6174 (library_list_start_section): Likewise.
6175 (library_list_start_library): Likewise.
6176 (library_list_start_list): Likewise.
6177 * tracepoint.c (traceframe_info_start_memory): Likewise.
6178 (traceframe_info_start_tvar): Likewise.
6179 * xml-syscall.c (syscall_start_syscall): Likewise.
6180 * xml-tdesc.c (tdesc_start_target): Likewise.
6181 (tdesc_start_feature): Likewise.
6182 (tdesc_start_reg): Likewise.
6183 (tdesc_start_union): Likewise.
6184 (tdesc_start_struct): Likewise.
6185 (tdesc_start_flags): Likewise.
6186 (tdesc_start_enum): Likewise.
6187 (tdesc_start_field): Likewise.
6188 (tdesc_start_enum_value): Likewise.
6189 (tdesc_start_vector): Likewise.
6190
6191 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6192
6193 * extension.h (struct xmethod_worker) <clone>: Remove.
6194 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6195 Remove.
6196 (python_xmethod_worker::clone): Remove.
6197 * valops.c (find_overload_match): Use std::move instead of
6198 clone.
6199
6200 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6201
6202 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6203 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6204 <free_xmethod_worker_data>: Remove.
6205 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6206 <get_xmethod_arg_types>: Remove.
6207 <get_xmethod_result_type>: Remove.
6208 <invoke_xmethod>: Remove.
6209 * extension.c (new_xmethod_worker): Remove.
6210 (clone_xmethod_worker): Remove.
6211 (get_matching_xmethod_workers): Return void, pass std::vector by
6212 pointer.
6213 (get_xmethod_arg_types): Rename to...
6214 (xmethod_worker::get_arg_types): ... this, and adjust.
6215 (get_xmethod_result_type): Rename to...
6216 (xmethod_worker::get_result_type): ... this, and adjust.
6217 (invoke_xmethod): Remove.
6218 (free_xmethod_worker): Remove.
6219 (free_xmethod_worker_vec): Remove.
6220 * extension.h (enum ext_lang_rc): Move here from
6221 extension-priv.h.
6222 (struct xmethod_worker): Add constructor and destructor.
6223 <data>: Remove.
6224 <value>: Remove.
6225 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6226 virtual pure methods.
6227 <get_arg_types, get_result_type>: New methods.
6228 (xmethod_worker_ptr): Remove typedef.
6229 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6230 (xmethod_worker_vec): Remove typedef.
6231 (xmethod_worker_up): New typedef.
6232 (invoke_xmethod): Remove.
6233 (clone_xmethod_worker): Remove.
6234 (free_xmethod_worker): Remove.
6235 (free_xmethod_worker_vec): Remove.
6236 (get_xmethod_arg_types): Remove.
6237 (get_xmethod_result_type): Remove.
6238 * valops.c (find_method_list): Use std::vector, don't use
6239 intermediate vector.
6240 (value_find_oload_method_list): Use std::vector.
6241 (find_overload_match): Use std::vector.
6242 (find_oload_champ): Use std::vector.
6243 * value.c (value_free): Use operator delete.
6244 (value_of_xmethod): Rename to...
6245 (value_from_xmethod): ... this. Don't assign
6246 xmethod_worker::value, take rvalue-reference.
6247 (result_type_of_xmethod): Adjust.
6248 (call_xmethod): Adjust.
6249 * value.h: Include extension.h.
6250 (struct xmethod_worker): Don't forward-declare.
6251 (value_of_xmethod): Rename to...
6252 (value_from_xmethod): ... this, take rvalue-reference.
6253 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6254 (struct python_xmethod_worker): ... this, add constructor and
6255 destructor.
6256 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6257 (gdbpy_free_xmethod_worker_data): Rename to...
6258 (python_xmethod_worker::~python_xmethod_worker): ... this and
6259 adjust.
6260 (gdbpy_clone_xmethod_worker_data): Rename to...
6261 (python_xmethod_worker::clone): ... this and adjust.
6262 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6263 temporary vector.
6264 (gdbpy_get_xmethod_arg_types): Rename to...
6265 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6266 (gdbpy_get_xmethod_result_type): Rename to...
6267 (python_xmethod_worker::do_get_result_type): ... this and
6268 adjust.
6269 (gdbpy_invoke_xmethod): Rename to...
6270 (python_xmethod_worker::invoke): ... this and adjust.
6271 (new_python_xmethod_worker): Rename to...
6272 (python_xmethod_worker::python_xmethod_worker): ... this and
6273 adjust.
6274 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6275 Remove.
6276 (gdbpy_free_xmethod_worker_data): Remove.
6277 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6278 (gdbpy_get_xmethod_arg_types): Remove.
6279 (gdbpy_get_xmethod_result_type): Remove.
6280 (gdbpy_invoke_xmethod): Remove.
6281 * python/python.c (python_extension_ops): Remove obsolete
6282 callbacks.
6283
6284 2018-01-05 Pedro Alves <palves@redhat.com>
6285
6286 PR gdb/18653
6287 * common/signals-state-save-restore.c
6288 (save_original_signals_state): New parameter 'quiet'. Warn if we
6289 find a custom handler preinstalled, instead of internal erroring.
6290 But only warn if !quiet.
6291 * common/signals-state-save-restore.h
6292 (save_original_signals_state): New parameter 'quiet'.
6293 * main.c (captured_main_1): Move save_original_signals_state call
6294 after option handling, and pass QUIET.
6295
6296 2018-01-05 Pedro Alves <palves@redhat.com>
6297
6298 * spu-tdep.c (spu_catch_start): Pass
6299 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6300
6301 2018-01-05 Pedro Alves <palves@redhat.com>
6302
6303 PR gdb/22670
6304 * ada-lang.c (literal_symbol_name_matcher): New function.
6305 (ada_get_symbol_name_matcher): Use it for
6306 symbol_name_match_type::SEARCH_NAME.
6307 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6308 it down instead of assuming symbol_name_match_type::FULL.
6309 * block.h (block_lookup_symbol): New parameter 'match_type'.
6310 * c-valprint.c (print_unpacked_pointer): Use
6311 lookup_symbol_search_name instead of lookup_symbol.
6312 * compile/compile-object-load.c (get_out_value_type): Pass down
6313 symbol_name_match_type::SEARCH_NAME.
6314 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6315 symbol_name_match_type::FULL.
6316 * cp-support.c (cp_get_symbol_name_matcher): Handle
6317 symbol_name_match_type::SEARCH_NAME.
6318 * infrun.c (insert_exception_resume_breakpoint): Use
6319 lookup_symbol_search_name.
6320 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6321 * psymtab.c (maintenance_check_psymtabs): Use
6322 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6323 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6324 SYMBOL_SEARCH_NAME.
6325 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6326 if symbol_name_match_type::SEARCH_NAME.
6327 (lookup_symbol_in_language): Pass down
6328 symbol_name_match_type::FULL.
6329 (lookup_symbol_search_name): New.
6330 (lookup_language_this): Pass down
6331 symbol_name_match_type::SEARCH_NAME.
6332 (lookup_symbol_aux, lookup_local_symbol): New parameter
6333 'match_type'. Pass it down.
6334 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6335 (lookup_symbol_search_name): New declaration.
6336 (lookup_symbol_in_block): New 'match_type' parameter.
6337
6338 2018-01-05 Pedro Alves <palves@redhat.com>
6339
6340 PR gdb/22670
6341 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6342 ada_lookup_symbol.
6343 (ada_lookup_symbol): Reimplement in terms of
6344 ada_lookup_symbol_list, bits factored out from
6345 ada_lookup_encoded_symbol.
6346
6347 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6348
6349 * ada-exp.y (write_object_renaming): When subscripting an array
6350 using a symbol as the index, pass the block in call to
6351 ada_lookup_encoded_symbol when looking that symbol up.
6352
6353 2018-01-05 Jerome Guitton <guitton@adacore.com>
6354
6355 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6356 TYPE_INDEX_TYPE.
6357
6358 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6359
6360 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6361 the case where VALUE_LVAL (val0) is not lval_memory.
6362
6363 2018-01-05 Xavier Roirand <roirand@adacore.com>
6364
6365 * ada-valprint.c (print_optional_low_bound): Handle
6366 character-indexed array printing like boolean-indexed array
6367 printing.
6368
6369 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6370
6371 * NEWS: Create a new section for the next release branch.
6372 Rename the section of the current branch, now that it has
6373 been cut.
6374
6375 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6376
6377 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6378 * version.in: Bump version to 8.1.50.DATE-git.
6379
6380 2018-01-03 Xavier Roirand <roirand@adacore.com>
6381
6382 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6383 Add field.
6384 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6385 Add field.
6386 (default_exception_support_info) <catch_handlers_sym>: Add field.
6387 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6388 (ada_exception_name_addr_1): Add "catch handlers" handling.
6389 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6390 Update all callers.
6391 (create_excep_cond_exprs) <ex>: Add parameter.
6392 (re_set_exception): Update create_excep_cond_exprs call.
6393 (print_it_exception, print_one_exception, print_mention_exception)
6394 (print_recreate_exception): Add "catch handler" handling.
6395 (allocate_location_catch_handlers, re_set_catch_handlers)
6396 (check_status_catch_handlers, print_it_catch_handlers)
6397 (print_one_catch_handlers, print_mention_catch_handlers)
6398 (print_recreate_catch_handlers): New function.
6399 (catch_handlers_breakpoint_ops): New variable.
6400 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6401 Add parameter. Add "catch handler" handling.
6402 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6403 Add "catch handler" handling.
6404 (ada_exception_catchpoint_cond_string): Add "catch handler"
6405 handling.
6406 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6407 call.
6408 (catch_ada_handlers_command): New function.
6409 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6410 operations structure.
6411 (_initialize_ada_language): Add "catch handlers" command entry.
6412 * NEWS: Document "catch handlers" feature.
6413
6414 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6415
6416 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6417 account when creating the array type of the slice.
6418 (ada_value_slice): Likewise.
6419
6420 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6421
6422 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6423 New enum value.
6424 (create_array_type_with_stride): Add byte_stride_prop parameter.
6425 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6426 New parameter. Update all callers in this file.
6427 (array_type_has_dynamic_stride): New function.
6428 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6429 of arrays with dynamic byte strides.
6430 * dwarf2read.c (read_array_type): Add support for dynamic
6431 DW_AT_byte_stride attributes.
6432
6433 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6434
6435 * dwarf2read.c (read_unspecified_type): Treat
6436 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6437
6438 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6439
6440 Update copyright year range in all GDB files.
6441
6442 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6443
6444 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6445 and gdb/testsuite/gdb.base/step-line.c.
6446
6447 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6448
6449 * copyright.py (main): Dump the contents of
6450 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6451 even if BY_HAND is empty.
6452
6453 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6454
6455 * top.c (print_gdb_version): Update Copyright year in version
6456 message.
6457
6458 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6459
6460 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6461
6462 For older changes see ChangeLog-2017.
6463 \f
6464 Local Variables:
6465 mode: change-log
6466 left-margin: 8
6467 fill-column: 74
6468 version-control: never
6469 coding: utf-8
6470 End: