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