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