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