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