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