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