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