5cbe1ae48394ae71fac88fbc5f4fe28cc7255f9b
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-07-03 Tom Tromey <tom@tromey.com>
2
3 * common/ptid.c (ptid_is_pid): Remove.
4 * common/ptid.h (ptid_is_pid): Don't declare.
5 * infrun.c: Update.
6 * linux-nat.c: Update.
7 * mi/mi-interp.c: Update.
8 * remote.c: Update.
9 * thread.c: Update.
10
11 2018-07-03 Tom Tromey <tom@tromey.com>
12
13 * common/ptid.c (ptid_get_tid): Remove.
14 * common/ptid.h (ptid_get_tid): Don't declare.
15 * ada-tasks.c: Update.
16 * aix-thread.c: Update.
17 * bsd-uthread.c: Update.
18 * darwin-nat.c: Update.
19 * fbsd-nat.c: Update.
20 * i386-darwin-nat.c: Update.
21 * infrun.c: Update.
22 * linux-tdep.c: Update.
23 * nto-procfs.c: Update.
24 * ppc-ravenscar-thread.c: Update.
25 * python/py-infthread.c: Update.
26 * ravenscar-thread.c: Update.
27 * sol-thread.c: Update.
28 * sparc-ravenscar-thread.c: Update.
29 * windows-nat.c: Update.
30
31 2018-07-03 Tom Tromey <tom@tromey.com>
32
33 * common/ptid.c (ptid_get_lwp): Remove.
34 * common/ptid.h (ptid_get_lwp): Don't declare.
35 * aarch64-linux-nat.c: Update.
36 * ada-tasks.c: Update.
37 * aix-thread.c: Update.
38 * amd64-linux-nat.c: Update.
39 * arm-linux-nat.c: Update.
40 * corelow.c: Update.
41 * fbsd-nat.c: Update.
42 * fbsd-tdep.c: Update.
43 * gnu-nat.c: Update.
44 * i386-cygwin-tdep.c: Update.
45 * i386-gnu-nat.c: Update.
46 * i386-linux-nat.c: Update.
47 * ia64-linux-nat.c: Update.
48 * inf-ptrace.c: Update.
49 * infrun.c: Update.
50 * linux-fork.c: Update.
51 * linux-nat.c: Update.
52 * linux-tdep.c: Update.
53 * linux-thread-db.c: Update.
54 * mips-linux-nat.c: Update.
55 * nat/aarch64-linux-hw-point.c: Update.
56 * nat/aarch64-linux.c: Update.
57 * nat/linux-btrace.c: Update.
58 * nat/linux-osdata.c: Update.
59 * nat/linux-procfs.c: Update.
60 * nat/x86-linux-dregs.c: Update.
61 * obsd-nat.c: Update.
62 * ppc-fbsd-nat.c: Update.
63 * ppc-linux-nat.c: Update.
64 * procfs.c: Update.
65 * python/py-infthread.c: Update.
66 * ravenscar-thread.c: Update.
67 * remote.c: Update.
68 * s390-linux-nat.c: Update.
69 * sol-thread.c: Update.
70 * sol2-tdep.c: Update.
71 * spu-linux-nat.c: Update.
72 * x86-linux-nat.c: Update.
73 * xtensa-linux-nat.c: Update.
74
75 2018-07-03 Tom Tromey <tom@tromey.com>
76
77 * common/ptid.c (ptid_get_pid): Remove.
78 * common/ptid.h (ptid_get_pid): Don't declare.
79 * aarch64-linux-nat.c: Update.
80 * ada-lang.c: Update.
81 * aix-thread.c: Update.
82 * alpha-bsd-nat.c: Update.
83 * amd64-fbsd-nat.c: Update.
84 * amd64-linux-nat.c: Update.
85 * arm-linux-nat.c: Update.
86 * arm-nbsd-nat.c: Update.
87 * auxv.c: Update.
88 * break-catch-syscall.c: Update.
89 * breakpoint.c: Update.
90 * bsd-uthread.c: Update.
91 * corelow.c: Update.
92 * ctf.c: Update.
93 * darwin-nat.c: Update.
94 * fbsd-nat.c: Update.
95 * fbsd-tdep.c: Update.
96 * gcore.c: Update.
97 * gnu-nat.c: Update.
98 * hppa-nbsd-nat.c: Update.
99 * hppa-obsd-nat.c: Update.
100 * i386-fbsd-nat.c: Update.
101 * ia64-linux-nat.c: Update.
102 * inf-ptrace.c: Update.
103 * infcmd.c: Update.
104 * inferior.c: Update.
105 * inferior.h: Update.
106 * inflow.c: Update.
107 * infrun.c: Update.
108 * linux-fork.c: Update.
109 * linux-nat.c: Update.
110 * linux-tdep.c: Update.
111 * linux-thread-db.c: Update.
112 * m68k-bsd-nat.c: Update.
113 * mi/mi-interp.c: Update.
114 * mi/mi-main.c: Update.
115 * mips-linux-nat.c: Update.
116 * mips-nbsd-nat.c: Update.
117 * mips64-obsd-nat.c: Update.
118 * nat/aarch64-linux-hw-point.c: Update.
119 * nat/aarch64-linux.c: Update.
120 * nat/linux-btrace.c: Update.
121 * nat/linux-osdata.c: Update.
122 * nat/linux-procfs.c: Update.
123 * nat/x86-linux-dregs.c: Update.
124 * nto-procfs.c: Update.
125 * obsd-nat.c: Update.
126 * ppc-linux-nat.c: Update.
127 * ppc-nbsd-nat.c: Update.
128 * ppc-obsd-nat.c: Update.
129 * proc-service.c: Update.
130 * procfs.c: Update.
131 * python/py-inferior.c: Update.
132 * python/py-infthread.c: Update.
133 * ravenscar-thread.c: Update.
134 * record.c: Update.
135 * remote-sim.c: Update.
136 * remote.c: Update.
137 * rs6000-nat.c: Update.
138 * s390-linux-nat.c: Update.
139 * sh-nbsd-nat.c: Update.
140 * sol-thread.c: Update.
141 * sparc-nat.c: Update.
142 * sparc64-tdep.c: Update.
143 * spu-linux-nat.c: Update.
144 * spu-tdep.c: Update.
145 * target-debug.h: Update.
146 * target.c: Update.
147 * thread.c: Update.
148 * tid-parse.c: Update.
149 * tracefile-tfile.c: Update.
150 * vax-bsd-nat.c: Update.
151 * windows-nat.c: Update.
152 * x86-linux-nat.c: Update.
153 * x86-nat.c: Update.
154
155 2018-07-03 Tom Tromey <tom@tromey.com>
156
157 * common/ptid.c (pid_to_ptid): Remove.
158 * common/ptid.h (pid_to_ptid): Don't declare.
159 * aix-thread.c: Update.
160 * arm-linux-nat.c: Update.
161 * common/ptid.c: Update.
162 * common/ptid.h: Update.
163 * corelow.c: Update.
164 * ctf.c: Update.
165 * darwin-nat.c: Update.
166 * fbsd-nat.c: Update.
167 * fork-child.c: Update.
168 * gnu-nat.c: Update.
169 * go32-nat.c: Update.
170 * inf-ptrace.c: Update.
171 * infcmd.c: Update.
172 * inferior.c: Update.
173 * infrun.c: Update.
174 * linux-fork.c: Update.
175 * linux-nat.c: Update.
176 * nat/aarch64-linux-hw-point.c: Update.
177 * nat/fork-inferior.c: Update.
178 * nat/x86-linux-dregs.c: Update.
179 * nto-procfs.c: Update.
180 * obsd-nat.c: Update.
181 * procfs.c: Update.
182 * progspace.c: Update.
183 * remote.c: Update.
184 * rs6000-nat.c: Update.
185 * s390-linux-nat.c: Update.
186 * sol-thread.c: Update.
187 * spu-linux-nat.c: Update.
188 * target.c: Update.
189 * top.c: Update.
190 * tracefile-tfile.c: Update.
191 * windows-nat.c: Update.
192
193 2018-07-03 Tom Tromey <tom@tromey.com>
194
195 * common/ptid.h (ptid_build): Don't declare.
196 * common/ptid.c (ptid_build): Remove.
197 * aix-thread.c: Update.
198 * bsd-kvm.c: Update.
199 * bsd-uthread.c: Update.
200 * common/agent.c: Update.
201 * common/ptid.c: Update.
202 * common/ptid.h: Update.
203 * corelow.c: Update.
204 * darwin-nat.c: Update.
205 * fbsd-nat.c: Update.
206 * gnu-nat.c: Update.
207 * linux-fork.c: Update.
208 * linux-nat.c: Update.
209 * linux-thread-db.c: Update.
210 * nat/linux-osdata.c: Update.
211 * nat/linux-procfs.c: Update.
212 * nto-procfs.c: Update.
213 * obsd-nat.c: Update.
214 * proc-service.c: Update.
215 * procfs.c: Update.
216 * ravenscar-thread.c: Update.
217 * remote-sim.c: Update.
218 * remote.c: Update.
219 * sol-thread.c: Update.
220 * target.c: Update.
221 * windows-nat.c: Update.
222
223 2018-07-03 Tom Tromey <tom@tromey.com>
224
225 * infrun.c (follow_exec): Use exit_inferior_silent.
226 * inferior.c (exit_inferior_num_silent): Remove.
227 * inferior.h (exit_inferior_num_silent): Don't declare.
228
229 2018-07-03 Tom Tromey <tom@tromey.com>
230
231 PR cli/23340:
232 * darwin-nat.c (darwin_attach_pid): Reset inferior and
233 inferior_ptid on error.
234
235 2018-07-02 Maciej W. Rozycki <macro@mips.com>
236 Simon Marchi <simon.marchi@polymtl.ca>
237
238 PR tdep/8282
239 * disasm.h (gdb_disassembler): Add
240 `m_disassembler_options_holder'. member
241 * disasm.c (get_all_disassembler_options): New function.
242 (gdb_disassembler::gdb_disassembler): Use it.
243 (gdb_buffered_insn_length_init_dis): Likewise.
244 (gdb_buffered_insn_length): Adjust accordingly.
245 (set_disassembler_options): Handle options with arguments.
246 (show_disassembler_options_sfunc): Likewise. Add a leading new
247 line if showing options with descriptions.
248 (disassembler_options_completer): Adapt to using the
249 `disasm_options_and_args_t' structure.
250 * mips-tdep.c (mips_disassembler_options): New variable.
251 (mips_disassembler_options_o32): Likewise.
252 (mips_disassembler_options_n32): Likewise.
253 (mips_disassembler_options_n64): Likewise.
254 (gdb_print_insn_mips): Don't set `disassembler_options'.
255 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
256 functions.
257 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
258 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
259 `gdbarch_disassembler_options_implicit' and
260 `gdbarch_valid_disassembler_options'.
261 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
262 `disasm_options_and_args_t' structure.
263 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
264 method.
265 (valid_disassembler_options): Switch from `disasm_options_t' to
266 the `disasm_options_and_args_t' structure.
267 * NEWS: Document `set disassembler-options' support for the MIPS
268 target.
269 * gdbarch.h: Regenerate.
270 * gdbarch.c: Regenerate.
271
272 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
273
274 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
275
276 2018-06-29 Joel Brobecker <brobecker@adacore.com>
277
278 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
279 parameter in call to amd64_target_description.
280 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
281 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
282 (amd64fbsd_init_abi): Likewise.
283 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
284 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
285 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
286 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
287
288 2018-06-29 Pedro Alves <palves@redhat.com>
289
290 * gdb/amd64-tdep.h (amd64_create_target_description): Add
291 "segments" parameter.
292 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
293 (_initialize_amd64_tdep): Update call to
294 amd64_create_target_description.
295 (amd64_target_description): Add "segments" parameter. Adjust
296 the implementation to use it.
297 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
298 call to amd64_create_target_description.
299 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
300 * gdb/arch/amd64.h (amd64_create_target_description): Add
301 "segments" register.
302 * gdb/arch/amd64.c (amd64_create_target_description): Add
303 "segments" parameter. Call create_feature_i386_64bit_segments
304 only if SEGMENTS is true.
305 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
306 call to amd64_create_target_description.
307
308 2018-06-29 Pedro Alves <palves@redhat.com>
309
310 * thread.c (thread_target_id_str): New, factored out from ...
311 (print_thread_info_1): ... here. Use it to compute the max
312 "Target Id" column width.
313
314 2018-06-29 Pedro Alves <palves@redhat.com>
315
316 * remote.c (remote_target::extra_thread_info): Delete
317 'display_buf' and 'n' locals. from the cache, regardless of
318 packet mechanims is in use. Use cache for qThreadExtra and qP
319 methods too.
320
321 2018-06-29 Pedro Alves <palves@redhat.com>
322
323 * blockframe.c (find_pc_sect_containing_function): New function.
324 * breakpoint.c (print_breakpoint_location): Don't call
325 find_pc_sect_function.
326 * linespec.c (create_sals_line_offset): Record the location's
327 symbol in the sal.
328 * linespec.c (convert_address_location_to_sals): Fill in sal's
329 symbol with find_pc_sect_containing_function.
330 * symtab.c (find_function_start_sal): Rename to ...
331 (find_function_start_sal_1): ... this.
332 (find_function_start_sal): Reimplement as wrapper around
333 find_function_start_sal_1, and use
334 find_pc_sect_containing_function to fill in the sal's symbol.
335 (find_function_start_sal(symbol*, bool)): Adjust.
336 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
337 comments.
338 (find_pc_sect_containing_function): Declare.
339
340 2018-06-29 Pedro Alves <palves@redhat.com>
341
342 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
343 true if the the location has no symbol.
344
345 2018-06-28 Tom Tromey <tom@tromey.com>
346
347 * NEWS: Mention --enable-codesign.
348 * silent-rules.mk (ECHO_SIGN): New variable.
349 * configure.ac: Add --enable-codesign.
350 * configure: Rebuild.
351 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
352 (gdb$(EXEEXT)): Optionally invoke codesign.
353
354 2018-06-28 Pedro Alves <palves@redhat.com>
355
356 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
357 comments.
358 (switch_to_thread_no_regs): Adjust comment.
359 * infcmd.c (stop_pc): Delete.
360 (post_create_inferior, info_program_command): Replace references
361 to stop_pc with references to thread_info->suspend.stop_pc.
362 * inferior.h (stop_pc): Delete declaration.
363 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
364 (handle_inferior_event_1, handle_signal_stop)
365 (process_event_stop_test, keep_going_stepped_thread)
366 (handle_step_into_function, handle_step_into_function_backward)
367 (print_stop_location): Replace references to stop_pc with
368 references to thread_info->suspend.stop_pc.
369 (struct infcall_suspend_state) <stop_pc>: Delete field.
370 (save_infcall_suspend_state, restore_infcall_suspend_state):
371 Remove references to inf_stat->stop_pc.
372 * linux-fork.c (fork_load_infrun_state): Likewise.
373 * record-btrace.c (record_btrace_set_replay): Likewise.
374 * record-full.c (record_full_goto_entry): Likewise.
375 * remote.c (print_one_stopped_thread): Likewise.
376 * target.c (target_resume): Extend comment.
377 * thread.c (set_executing_thread): New.
378 (set_executing): Use it.
379 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
380 Remove references to stop_pc.
381
382 2018-06-28 Pedro Alves <palves@redhat.com>
383
384 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
385 Moving fetching stop_pc until after ecs->event_thread is refreshed.
386
387 2018-06-28 Tom Tromey <tom@tromey.com>
388
389 * coffread.c (coff_symfile_finish): Update.
390 * xcoffread.c (xcoff_symfile_finish): Update.
391 * elfread.c (elf_symfile_finish): Update.
392 * symfile.h (dwarf2_free_objfile): Don't declare.
393 * dwarf2read.c (_initialize_dwarf2_read): Use
394 register_objfile_data_with_cleanup.
395 (dwarf2_free_objfile): Now static. Change signature.
396
397 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
398
399 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
400 option "-o" to add-symbol-file-load to add an offset to each
401 section's load address.
402 * symfile.c (set_objfile_default_section_offset): New function.
403
404 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
405
406 * symfile.c (add_symbol_file_command): Make sure that sections
407 with the same name are sorted in the same order.
408
409 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
410
411 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
412 require the second argument. If omitted, load sections at the
413 addresses specified in the file.
414
415 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
416
417 * symfile.c (symbol_file_command, symbol_file_add_main_1)
418 (_initialize_symfile): Add option "-o" to symbol-file to add an
419 offset to each section of the symbol file.
420
421 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
422
423 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
424
425 2018-06-27 Tom Tromey <tom@tromey.com>
426
427 * stack.c (_initialize_stack): Update "func" help text.
428
429 2018-06-27 Tom Tromey <tom@tromey.com>
430
431 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
432 std::vector.
433 (unwind_infopy_str, pyuw_create_unwind_info)
434 (unwind_infopy_add_saved_register, pyuw_sniffer)
435 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
436 Update.
437 (struct saved_reg): Add constructor.
438 <value>: Now a gdbpy_ref<>.
439
440 2018-06-27 Tom Tromey <tom@tromey.com>
441
442 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
443
444 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
445
446 * gdb-gdb.py.in: Format using autopep8.
447
448 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
449
450 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
451 (type_lookup_function): Recognize CORE_ADDR values.
452
453 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
454
455 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
456 print tag_name.
457
458 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
459
460 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
461 <__lt__>: Add.
462
463 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
464
465 * gdb-gdb.py: Move to...
466 * gdb-gdb.py.in: ... here.
467 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
468 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
469 dependencies.
470 (distclean): Remove gdb-gdb.py when cleaning.
471 (gdb-gdb.py, gdb-gdb.gdb): New rules.
472 * configure: Re-generate.
473
474 2018-06-27 Pedro Alves <palves@redhat.com>
475
476 * proc-service.c (get_ps_regcache): New.
477 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
478 (ps_lsetfpregs): Use it.
479
480 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
481
482 PR gdb/21695
483 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
484 (dwarf_decode_lines_1): Adjust.
485
486 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
487
488 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
489 override.
490 <info_proc>: Likewise.
491
492 2018-06-26 Joel Brobecker <brobecker@adacore.com>
493
494 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
495 to windows_fetch_one_register, and only handle the case of
496 fetching one register. Move the code that reloads the context
497 and iterates over all registers if R is negative to...
498 (windows_nat_target::fetch_registers): ... here.
499 (do_windows_store_inferior_registers): Rename to
500 windows_store_one_register, and only handle the case of storing
501 one register. Move the code that handles the case where r is
502 negative to...
503 (windows_nat_target::store_registers) ... here.
504
505 2018-06-26 Tom Tromey <tom@tromey.com>
506
507 PR rust/22574:
508 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
509 * rust-lang.c (rust_print_struct_def): Add podata parameter.
510 Update.
511 (rust_internal_print_type): Add podata parameter.
512 (rust_print_type): Update.
513
514 2018-06-26 Tom Tromey <tom@tromey.com>
515
516 * typeprint.h (struct print_offset_data) <update, finish,
517 maybe_print_hole>: New methods.
518 <indentation>: New constant.
519 * typeprint.c (print_offset_data::indentation): Define.
520 (print_offset_data::maybe_print_hole, print_offset_data::update)
521 (print_offset_data::finish): Move from c-typeprint.c and rename.
522 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
523 (print_spaces_filtered_with_print_options): Update.
524 (c_print_type_union_field_offset, maybe_print_hole)
525 (c_print_type_struct_field_offset): Move to typeprint.c and
526 rename.
527 (c_type_print_base_struct_union): Update.
528
529 2018-06-25 Pedro Alves <palves@redhat.com>
530
531 * gdbthread.h (thread_info_ref, delete_thread)
532 (delete_thread_silent, first_thread_of_inferior)
533 (any_thread_of_inferior, switch_to_thread)
534 (enable_thread_stack_temporaries)
535 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
536 (get_last_thread_stack_temporary)
537 (value_in_thread_stack_temporaries, can_access_registers_thread):
538 Spell out "struct thread_info" instead of just "thread_info".
539 * inferior.h (notice_new_inferior): Likewise.
540
541 2018-06-25 Pedro Alves <palves@redhat.com>
542
543 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
544 pass thread_info pointer to delete_thread.
545 (windows_nat_target::detach): Pass inferior pointer to
546 detach_inferior.
547 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
548 delete_thread.
549 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
550 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
551 and pass a thread_info pointer to delete_thread.
552 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
553 pass thread_info pointer to delete_thread.
554 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
555 delete_thread_silent call.
556 * procfs.c (procfs_target::detach): Pass inferior pointer to
557 detach_inferior.
558 (procfs_target::wait): Pass thread_info pointer to delete_thread.
559 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
560 delete_thread_silent call.
561 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
562 pass thread_info pointer to delete_thread.
563 (windows_nat_target::detach): Pass inferior pointer to
564 delete_inferior.
565
566 2018-06-22 Alan Hayward <alan.hayward@arm.com>
567
568 * regcache.c (readable_regcache::read_part): Fix asserts.
569 (reg_buffer::raw_collect_part): New function.
570 (regcache::write_part): Fix asserts.
571 (reg_buffer::raw_supply_part): New function.
572 (regcache::transfer_regset_register): New helper function.
573 (regcache::transfer_regset): Call new functions.
574 (regcache_supply_regset): Use gdb_byte*.
575 (regcache::supply_regset): Likewise.
576 (regcache_collect_regset): Likewise.
577 (regcache::collect_regset): Likewise.
578 * regcache.h (reg_buffer::raw_collect_part): New declaration.
579 (reg_buffer::raw_supply_part): Likewise.
580 (regcache::transfer_regset_register): Likewise.
581 (regcache::transfer_regset): Use gdb_byte*.
582
583 2018-06-22 Alan Hayward <alan.hayward@arm.com>
584
585 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
586
587 2018-06-21 Pedro Alves <palves@redhat.com>
588
589 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
590 instead of a ptid_t. All callers adjusted.
591 * ada-tasks.c (ada_get_task_number): Likewise. All callers
592 adjusted.
593 (print_ada_task_info, display_current_task_id, task_command_1):
594 Adjust.
595 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
596 inferior_thread.
597 (breakpoint_kind): Adjust.
598 (remove_breakpoints_pid): Rename to ...
599 (remove_breakpoints_inf): ... this. Adjust to take an inferior
600 pointer. All callers adjusted.
601 (bpstat_clear_actions): Use inferior_thread.
602 (get_bpstat_thread): New.
603 (bpstat_do_actions): Use it.
604 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
605 to take a thread_info pointer. All callers adjusted.
606 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
607 (breakpoint_re_set_thread): Use inferior_thread.
608 * breakpoint.h (struct inferior): Forward declare.
609 (bpstat_stop_status): Update.
610 (remove_breakpoints_pid): Delete.
611 (remove_breakpoints_inf): New.
612 * bsd-uthread.c (bsd_uthread_target::wait)
613 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
614 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
615 (maint_btrace_packet_history_cmd)
616 (maint_btrace_clear_packet_history_cmd): Adjust.
617 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
618 inferior_thread.
619 * cli/cli-interp.c: Include "inferior.h".
620 * common/refcounted-object.h (struct
621 refcounted_object_ref_policy): New.
622 * compile/compile-object-load.c: Include gdbthread.h.
623 (store_regs): Use inferior_thread.
624 * corelow.c (core_target::close): Use current_inferior.
625 (core_target_open): Adjust to use first_thread_of_inferior and use
626 the current inferior.
627 * ctf.c (ctf_target::close): Adjust to use current_inferior.
628 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
629 <thread>: ... this new field. All references adjusted.
630 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
631 Take a thread_info pointer instead of a ptid_t.
632 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
633 (dummy_frame_discard, register_dummy_frame_dtor): Take a
634 thread_info pointer instead of a ptid_t.
635 * elfread.c: Include "inferior.h".
636 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
637 Use inferior_thread.
638 * eval.c (evaluate_subexp): Likewise.
639 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
640 inferior_thread.
641 * gdb_proc_service.h (struct thread_info): Forward declare.
642 (struct ps_prochandle) <ptid>: Delete, replaced by ...
643 <thread>: ... this new field. All references adjusted.
644 * gdbarch.h, gdbarch.c: Regenerate.
645 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
646 'thread' parameter. All implementations and callers adjusted.
647 * gdbthread.h (thread_info) <set_running>: New method.
648 (delete_thread, delete_thread_silent): Take a thread_info pointer
649 instead of a ptid.
650 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
651 (first_thread_of_process): Delete, replaced by ...
652 (first_thread_of_inferior): ... this new function. All callers
653 adjusted.
654 (any_live_thread_of_process): Delete, replaced by ...
655 (any_live_thread_of_inferior): ... this new function. All callers
656 adjusted.
657 (switch_to_thread, switch_to_no_thread): Declare.
658 (is_executing): Delete.
659 (enable_thread_stack_temporaries): Update comment.
660 <enable_thread_stack_temporaries>: Take a thread_info pointer
661 instead of a ptid_t. Incref the thread.
662 <~enable_thread_stack_temporaries>: Decref the thread.
663 <m_ptid>: Delete
664 <m_thr>: New.
665 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
666 (get_last_thread_stack_temporary)
667 (value_in_thread_stack_temporaries, can_access_registers_thread):
668 Take a thread_info pointer instead of a ptid_t. All callers
669 adjusted.
670 * infcall.c (get_call_return_value): Use inferior_thread.
671 (run_inferior_call): Work with thread pointers instead of ptid_t.
672 (call_function_by_hand_dummy): Work with thread pointers instead
673 of ptid_t. Use thread_info_ref.
674 * infcmd.c (proceed_thread_callback): Access thread's state
675 directly.
676 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
677 access thread's state directly.
678 (continue_command): Use inferior_thread.
679 (info_program_command): Use find_thread_ptid and access thread
680 state directly.
681 (proceed_after_attach_callback): Use thread state directly.
682 (notice_new_inferior): Take a thread_info pointer instead of a
683 ptid_t. All callers adjusted.
684 (exit_inferior): Take an inferior pointer instead of a pid. All
685 callers adjusted.
686 (exit_inferior_silent): New.
687 (detach_inferior): Delete.
688 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
689 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
690 (detach_inferior_command, kill_inferior_command): Use
691 find_inferior_id instead of valid_gdb_inferior_id and
692 gdb_inferior_id_to_pid.
693 (inferior_command): Use inferior and thread pointers.
694 * inferior.h (struct thread_info): Forward declare.
695 (notice_new_inferior): Take a thread_info pointer instead of a
696 ptid_t. All callers adjusted.
697 (detach_inferior): Delete declaration.
698 (exit_inferior, exit_inferior_silent): Take an inferior pointer
699 instead of a pid. All callers adjusted.
700 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
701 (valid_gdb_inferior_id): Delete.
702 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
703 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
704 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
705 ...
706 <inf>: ... this new field.
707 <step_ptid>: Delete, replaced by ...
708 <step_thread>: ... this new field.
709 (get_displaced_stepping_state): Take an inferior pointer instead
710 of a pid. All callers adjusted.
711 (displaced_step_in_progress_any_inferior): Adjust.
712 (displaced_step_in_progress_thread): Take a thread pointer instead
713 of a ptid_t. All callers adjusted.
714 (displaced_step_in_progress, add_displaced_stepping_state): Take
715 an inferior pointer instead of a pid. All callers adjusted.
716 (get_displaced_step_closure_by_addr): Adjust.
717 (remove_displaced_stepping_state): Take an inferior pointer
718 instead of a pid. All callers adjusted.
719 (displaced_step_prepare_throw, displaced_step_prepare)
720 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
721 All callers adjusted.
722 (start_step_over): Adjust.
723 (infrun_thread_ptid_changed): Remove bit updating ptids in the
724 displaced step queue.
725 (do_target_resume): Adjust.
726 (fetch_inferior_event): Use inferior_thread.
727 (context_switch, get_inferior_stop_soon): Take an
728 execution_control_state pointer instead of a ptid_t. All callers
729 adjusted.
730 (switch_to_thread_cleanup): Delete.
731 (stop_all_threads): Use scoped_restore_current_thread.
732 * inline-frame.c: Include "gdbthread.h".
733 (inline_state) <inline_state>: Take a thread pointer instead of a
734 ptid_t. All callers adjusted.
735 <ptid>: Delete, replaced by ...
736 <thread>: ... this new field.
737 (find_inline_frame_state): Take a thread pointer instead of a
738 ptid_t. All callers adjusted.
739 (skip_inline_frames, step_into_inline_frame)
740 (inline_skipped_frames, inline_skipped_symbol): Take a thread
741 pointer instead of a ptid_t. All callers adjusted.
742 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
743 (inline_skipped_frames, inline_skipped_symbol): Likewise.
744 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
745 pointers directly.
746 * linux-nat.c (get_detach_signal): Likewise.
747 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
748 (thread_db_notice_clone): Adjust.
749 (thread_db_find_new_threads_silently)
750 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
751 a thread pointer instead of a ptid_t. All callers adjusted.
752 * mi/mi-cmd-var.c: Include "inferior.h".
753 (mi_cmd_var_update_iter): Update to use thread pointers.
754 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
755 inferior directly.
756 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
757 out to ...
758 (mi_output_running): ... this new function.
759 (mi_on_resume_1): Adjust to use it.
760 (mi_user_selected_context_changed): Adjust to use inferior_thread.
761 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
762 directly.
763 (interrupt_thread_callback): : Adjust to use thread and inferior
764 pointers.
765 * proc-service.c: Include "gdbthread.h".
766 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
767 * progspace-and-thread.c: Include "inferior.h".
768 * progspace.c: Include "inferior.h".
769 * python/py-exitedevent.c (create_exited_event_object): Adjust to
770 hold a reference to an inferior_object.
771 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
772 inferior_thread.
773 * python/py-inferior.c (struct inferior_object): Give the type a
774 tag name instead of a typedef.
775 (python_on_normal_stop): No need to check if the current thread is
776 listed.
777 (inferior_to_inferior_object): Change return type to
778 inferior_object. All callers adjusted.
779 (find_thread_object): Delete, bits factored out to ...
780 (thread_to_thread_object): ... this new function.
781 * python/py-infthread.c (create_thread_object): Use
782 inferior_to_inferior_object.
783 (thpy_is_stopped): Use thread pointer directly.
784 (gdbpy_selected_thread): Use inferior_thread.
785 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
786 field, replaced with ...
787 <thread>: ... this new field. All users adjusted.
788 (btpy_insn_or_gap_new): Drop const.
789 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
790 callers adjusted.
791 * python/py-record.c: Include "gdbthread.h".
792 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
793 a ptid_t. All callers adjusted.
794 (gdbpy_current_recording): Use inferior_thread.
795 * python/py-record.h (recpy_record_object) <ptid>: Delete
796 field, replaced with ...
797 <thread>: ... this new field. All users adjusted.
798 (recpy_element_object) <ptid>: Delete
799 field, replaced with ...
800 <thread>: ... this new field. All users adjusted.
801 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
802 a ptid_t. All callers adjusted.
803 * python/py-threadevent.c: Include "gdbthread.h".
804 (get_event_thread): Use thread_to_thread_object.
805 * python/python-internal.h (struct inferior_object): Forward
806 declare.
807 (find_thread_object, find_inferior_object): Delete declarations.
808 (thread_to_thread_object, inferior_to_inferior_object): New
809 declarations.
810 * record-btrace.c: Include "inferior.h".
811 (require_btrace_thread): Use inferior_thread.
812 (record_btrace_frame_sniffer)
813 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
814 (get_thread_current_frame): Use scoped_restore_current_thread and
815 switch_to_thread.
816 (get_thread_current_frame): Use thread pointer directly.
817 (record_btrace_replay_at_breakpoint): Use thread's inferior
818 pointer directly.
819 * record-full.c: Include "inferior.h".
820 * regcache.c: Include "gdbthread.h".
821 (get_thread_arch_regcache): Use the inferior's address space
822 directly.
823 (get_thread_regcache, registers_changed_thread): New.
824 * regcache.h (get_thread_regcache(thread_info *thread)): New
825 overload.
826 (registers_changed_thread): New.
827 (remote_target) <remote_detach_1>: Swap order of parameters.
828 (remote_add_thread): <remote_add_thread>: Return the new thread.
829 (get_remote_thread_info(ptid_t)): New overload.
830 (remote_target::remote_notice_new_inferior): Use thread pointers
831 directly.
832 (remote_target::process_initial_stop_replies): Use
833 thread_info::set_running.
834 (remote_target::remote_detach_1, remote_target::detach)
835 (extended_remote_target::detach): Adjust.
836 * stack.c (frame_show_address): Use inferior_thread.
837 * target-debug.h (target_debug_print_thread_info_pp): New.
838 * target-delegates.c: Regenerate.
839 * target.c (default_thread_address_space): Delete.
840 (memory_xfer_partial_1): Use current_inferior.
841 (target_detach): Use current_inferior.
842 (target_thread_address_space): Delete.
843 (generic_mourn_inferior): Use current_inferior.
844 * target.h (struct target_ops) <thread_address_space>: Delete.
845 (target_thread_address_space): Delete.
846 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
847 pointers directly.
848 (delete_thread_1, delete_thread, delete_thread_silent): Take a
849 thread pointer instead of a ptid_t. Adjust all callers.
850 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
851 (first_thread_of_process): Delete, replaced by ...
852 (first_thread_of_inferior): ... this new function. All callers
853 adjusted.
854 (any_thread_of_process): Rename to ...
855 (any_thread_of_inferior): ... this, and take an inferior pointer.
856 (any_live_thread_of_process): Rename to ...
857 (any_live_thread_of_inferior): ... this, and take an inferior
858 pointer.
859 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
860 (value_in_thread_stack_temporaries)
861 (get_last_thread_stack_temporary): Take a thread pointer instead
862 of a ptid_t. Adjust all callers.
863 (thread_info::set_running): New.
864 (validate_registers_access): Use inferior_thread.
865 (can_access_registers_ptid): Rename to ...
866 (can_access_registers_thread): ... this, and take a thread
867 pointer.
868 (print_thread_info_1): Adjust to compare thread pointers instead
869 of ptids.
870 (switch_to_no_thread, switch_to_thread): Make extern.
871 (scoped_restore_current_thread::~scoped_restore_current_thread):
872 Use m_thread pointer directly.
873 (scoped_restore_current_thread::scoped_restore_current_thread):
874 Use inferior_thread.
875 (thread_command): Use thread pointer directly.
876 (thread_num_make_value_helper): Use inferior_thread.
877 * top.c (execute_command): Use inferior_thread.
878 * tui/tui-interp.c: Include "inferior.h".
879 * varobj.c (varobj_create): Use inferior_thread.
880 (value_of_root_1): Use find_thread_global_id instead of
881 global_thread_id_to_ptid.
882
883 2018-06-21 Alan Hayward <alan.hayward@arm.com>
884
885 * regcache.c (readable_regcache::read_part): Avoid memcpy when
886 possible.
887 (regcache::write_part): Likewise.
888 (readable_regcache::cooked_read_part): Update comment.
889 (readable_regcache::cooked_write_part): Likewise.
890 * regcache.h: (readable_regcache::read_part): Likewise.
891 (regcache::write_part): Likewise.
892
893 2018-06-21 Richard Bunt <richard.bunt@arm.com>
894 Dirk Schubert <dirk.schubert@arm.com>
895
896 * aarch64-linux-nat.c (post_attach): New.
897 (aarch64_linux_nat_target::post_attach): Override post_attach to
898 record the number of hardware debug registers.
899
900 2018-06-20 Tom Tromey <tom@tromey.com>
901
902 * python/py-param.c (add_setshow_generic): Make parameters const.
903 (parmpy_init): Update.
904
905 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
906
907 * regcache.h (regcache_cooked_read_ftype): Rename to...
908 (register_read_ftype): ...this, change type to function_view.
909 (class reg_buffer) <save>: Remove src parameter.
910 (readonly_detached_regcache) <readonly_detached_regcache>: Make
911 parameter non-const in first overload. Remove src parameter in
912 second overload.
913 * regcache.c (do_cooked_read): Remove.
914 (readonly_detached_regcache::readonly_detached_regcache): Make
915 parameter non-const, adjust call to other constructor.
916 (reg_buffer::save): Remove src parameter.
917 * frame.c (do_frame_register_read): Remove.
918 (frame_save_as_regcache): Use lambda function.
919 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
920 parameter to ppu2spu_data *.
921 (ppu2spu_sniffer): Use lambda function.
922
923 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
924
925 * record-full.c (record_full_target::insert_breakpoint): Remove
926 "struct" keyword, add const.
927
928 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
929
930 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
931 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
932 * configure.ac: Remove AC_PREREQ, add missing quoting.
933 * gnulib/configure.ac: Modernize usage of
934 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
935 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
936 (AUTOMAKE_VERSION): Bump to 1.15.1.
937 * configure: Re-generate.
938 * config.in: Re-generate.
939 * aclocal.m4: Re-generate.
940 * gnulib/aclocal.m4: Re-generate.
941 * gnulib/config.in: Re-generate.
942 * gnulib/configure: Re-generate.
943 * gnulib/import/Makefile.in: Re-generate.
944
945 2018-06-19 Pedro Alves <palves@redhat.com>
946
947 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
948 (lookup_minimal_symbol_by_pc_section): ... here with
949 gdb_assert_not_reached added.
950
951 2018-06-19 Pedro Alves <palves@redhat.com>
952
953 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
954 parameter with a block parameter. Compare location's block symbol
955 with the frame's block instead of addresses.
956 (skip_inline_frames): Pass the current block instead of the
957 frame's address. Break out as soon as we determine the frame
958 should not be skipped.
959
960 2018-06-18 Tom Tromey <tom@tromey.com>
961
962 * solib-aix.c (solib_aix_get_section_offsets): Return
963 unique_xmalloc_ptr.
964 (solib_aix_solib_create_inferior_hook): Update.
965
966 2018-06-18 Tom Tromey <tom@tromey.com>
967
968 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
969
970 2018-06-18 Tom Tromey <tom@tromey.com>
971
972 * solib-frv.c (frv_relocate_main_executable): Use
973 unique_xmalloc_ptr.
974 * solib-dsbt.c (dsbt_relocate_main_executable): Use
975 unique_xmalloc_ptr.
976
977 2018-06-18 Tom Tromey <tom@tromey.com>
978
979 * objfiles.h (inhibit_section_map_updates): Update.
980 (resume_section_map_updates, resume_section_map_updates_cleanup):
981 Remove.
982 * solib-svr4.c (svr4_handle_solib_event): Update.
983 * objfiles.c (inhibit_section_map_updates): Return
984 scoped_restore_tmpl<int>.
985 (resume_section_map_updates, resume_section_map_updates_cleanup):
986 Remove.
987
988 2018-06-18 Tom Tromey <tom@tromey.com>
989
990 * valprint.h (read_string): Update.
991 * valprint.c (read_string): Change type of "buffer".
992 (val_print_string): Update.
993 * python/py-value.c (valpy_string): Update.
994 * language.h (struct language_defn) <la_get_string>: Change
995 type of "buffer".
996 (default_get_string, c_get_string): Update.
997 * language.c (default_get_string): Change type of "buffer".
998 * guile/scm-value.c (gdbscm_value_to_string): Update.
999 * c-lang.c (c_get_string): Change type of "buffer".
1000
1001 2018-06-18 Tom Tromey <tom@tromey.com>
1002
1003 * ser-mingw.c (struct pipe_state_destroyer): New.
1004 (pipe_state_up): New typedef.
1005 (cleanup_pipe_state): Remove.
1006 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1007
1008 2018-06-18 Tom Tromey <tom@tromey.com>
1009
1010 * rust-lang.h (rust_yyerror): Don't declare.
1011 * rust-lang.c (rust_language_defn): Update.
1012 * rust-exp.y (yyerror): Now static.
1013 * parse.c (parse_exp_in_context_1): Update.
1014 * p-lang.h (p_yyerror): Don't declare.
1015 * p-lang.c (p_language_defn): Update.
1016 * p-exp.y (yyerror): Now static.
1017 * opencl-lang.c (opencl_language_defn): Update.
1018 * objc-lang.c (objc_language_defn): Update.
1019 * m2-lang.h (m2_yyerror): Don't declare.
1020 * m2-lang.c (m2_language_defn): Update.
1021 * m2-exp.y (yyerror): Now static.
1022 * language.h (struct language_defn) <la_error>: Remove.
1023 * language.c (unk_lang_error): Remove.
1024 (unknown_language_defn, auto_language_defn): Remove.
1025 * go-lang.h (go_yyerror): Don't declare.
1026 * go-lang.c (go_language_defn): Update.
1027 * go-exp.y (yyerror): Now static.
1028 * f-lang.h (f_yyerror): Don't declare.
1029 * f-lang.c (f_language_defn): Update.
1030 * f-exp.y (yyerror): Now static.
1031 * d-lang.h (d_yyerror): Don't declare.
1032 * d-lang.c (d_language_defn): Update.
1033 * d-exp.y (yyerror): Now static.
1034 * c-lang.h (c_yyerror): Don't declare.
1035 * c-lang.c (c_language_defn, cplus_language_defn)
1036 (asm_language_defn, minimal_language_defn): Update.
1037 * c-exp.y (yyerror): Now static.
1038 * ada-lang.h (ada_yyerror): Don't declare.
1039 * ada-lang.c (ada_language_defn): Update.
1040 * ada-exp.y (yyerror): Now static.
1041
1042 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1043
1044 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1045 (store_sveregs_to_thread): Likewise.
1046 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1047 (aarch64_linux_store_inferior_registers): Likewise.
1048 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1049 function.
1050 (aarch64_sve_regs_copy_to_regcache): Likewise.
1051 (aarch64_sve_regs_copy_from_regcache): Likewise.
1052 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1053 declaration.
1054 (aarch64_sve_regs_copy_to_regcache): Likewise.
1055 (aarch64_sve_regs_copy_from_regcache): Likewise.
1056 (sve_context): Structure from Linux headers.
1057 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1058 (SVE_SIG_ZREG_SIZE): Likewise.
1059 (SVE_SIG_PREG_SIZE): Likewise.
1060 (SVE_SIG_FFR_SIZE): Likewise.
1061 (SVE_SIG_REGS_OFFSET): Likewise.
1062 (SVE_SIG_ZREGS_OFFSET): Likewise.
1063 (SVE_SIG_ZREG_OFFSET): Likewise.
1064 (SVE_SIG_ZREGS_SIZE): Likewise.
1065 (SVE_SIG_PREGS_OFFSET): Likewise.
1066 (SVE_SIG_PREG_OFFSET): Likewise.
1067 (SVE_SIG_PREGS_SIZE): Likewise.
1068 (SVE_SIG_FFR_OFFSET): Likewise.
1069 (SVE_SIG_REGS_SIZE): Likewise.
1070 (SVE_SIG_CONTEXT_SIZE): Likewise.
1071 (SVE_PT_REGS_MASK): Likewise.
1072 (SVE_PT_REGS_FPSIMD): Likewise.
1073 (SVE_PT_REGS_SVE): Likewise.
1074 (SVE_PT_VL_INHERIT): Likewise.
1075 (SVE_PT_VL_ONEXEC): Likewise.
1076 (SVE_PT_REGS_OFFSET): Likewise.
1077 (SVE_PT_FPSIMD_OFFSET): Likewise.
1078 (SVE_PT_FPSIMD_SIZE): Likewise.
1079 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1080 (SVE_PT_SVE_PREG_SIZE): Likewise.
1081 (SVE_PT_SVE_FFR_SIZE): Likewise.
1082 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1083 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1084 (__SVE_SIG_TO_PT): Likewise.
1085 (SVE_PT_SVE_OFFSET): Likewise.
1086 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1087 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1088 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1089 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1090 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1091 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1092 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1093 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1094 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1095 (SVE_PT_SVE_SIZE): Likewise.
1096 (SVE_PT_SIZE): Likewise.
1097 (HAS_SVE_STATE): New define.
1098
1099 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1100
1101 * nat/aarch64-sve-linux-sigcontext.h: New file.
1102 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1103 new files.
1104 (SVE_VQ_MIN): Likewise.
1105 (SVE_VQ_MAX): Likewise.
1106 (SVE_VL_MIN): Likewise.
1107 (SVE_VL_MAX): Likewise.
1108 (SVE_NUM_ZREGS): Likewise.
1109 (SVE_NUM_PREGS): Likewise.
1110 (sve_vl_valid): Likewise.
1111 (struct user_sve_header): Likewise.
1112
1113 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1114 Richard Bunt <Richard.Bunt@arm.com>
1115
1116 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1117 was requested by GDB.
1118
1119 2018-06-15 Tom de Vries <tdevries@suse.de>
1120
1121 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1122
1123 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1124
1125 * gnulib/update-gnulib.sh: Print expected versions of
1126 autoconf/aclocal.
1127
1128 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1129
1130 * arch-utils.c (default_type_align): Use type_length_units.
1131 * gdbtypes.c (type_align): Use type_length_units.
1132
1133 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1134
1135 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1136 of 'define' command.
1137
1138 2018-06-14 Tom de Vries <tdevries@suse.de>
1139
1140 PR cli/22573
1141 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1142 get_no_prettyformat_print_options.
1143
1144 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * sparc-nat.h: Include target.h.
1147 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1148 <fetch_registers>: Remove this argument in function call.
1149 <store_registers>: Remove this argument in function call, remove
1150 extra semicolon.
1151 <low_forget_process>: Call sparc64_forget_process instead of
1152 sparc_forget_process.
1153
1154 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1155
1156 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1157 (procfs_target::make_corefile_notes): Adjust to new
1158 target_read_alloc return type.
1159
1160 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1161 Stephen Roberts <stephen.roberts@arm.com>
1162
1163 PR gdb/22882
1164 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1165 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1166 Move should_notify_stop local into more inner scope.
1167
1168 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1169 Stephen Roberts <stephen.roberts@arm.com>
1170
1171 PR gdb/22882
1172 * infrun.c (resume_1): Add call to mark_async_event_handler.
1173
1174 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1175
1176 * infrun.c (do_target_wait): Change old version of $pc printed.
1177
1178 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1179
1180 * dwarf2read.c (read_index_from_section): Rename to...
1181 (read_gdb_index_from_section): ... this, update all callers.
1182 (dwarf2_read_index): Rename to...
1183 (dwarf2_read_gdb_index): ... this, update all callers.
1184
1185 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1186
1187 * gdb/hppa-linux-nat.c
1188 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1189 hppa_linux_nat_target::fetch_registers.
1190
1191 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1192
1193 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1194 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1195 (AARCH64_DWARF_SVE_FFR): Likewise.
1196 (AARCH64_DWARF_SVE_P0): Likewise.
1197 (AARCH64_DWARF_SVE_Z0): Likewise.
1198
1199 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1200
1201 * common/common-regcache.h (raw_compare): New function.
1202 * regcache.c (regcache::raw_compare): Likewise.
1203 * regcache.h (regcache::raw_compare): New declaration.
1204
1205 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1206
1207 * common/common-regcache.h (reg_buffer_common): New structure.
1208 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1209 (reg_buffer::raw_supply): Likewise.
1210 (reg_buffer::raw_supply_integer): Likewise.
1211 (reg_buffer::raw_supply_zeroed): Likewise.
1212 (reg_buffer::raw_collect): Likewise.
1213 (reg_buffer::raw_collect_integer): Likewise.
1214 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1215 (reg_buffer::raw_supply): Likewise.
1216 (reg_buffer::raw_supply_integer): Likewise.
1217 (reg_buffer::raw_supply_zeroed): Likewise.
1218 (reg_buffer::raw_collect): Likewise.
1219 (reg_buffer::raw_collect_integer): Likewise.
1220
1221 2018-06-10 Tom Tromey <tom@tromey.com>
1222
1223 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1224 (class remote_state) <stop_reply_queue>: Now std::vector.
1225 (remote_state::~remote_state)
1226 (remote_target::stop_reply_queue_length): Update.
1227 (struct queue_iter_param, remove_child_of_pending_fork)
1228 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1229 (check_pending_event_prevents_wildcard_vcont_callback)
1230 (remove_stop_reply_for_inferior)
1231 (remove_stop_reply_of_remote_state)
1232 (remote_notif_remove_once_on_match)
1233 (stop_reply_match_ptid_and_ws)
1234 (remote_kill_child_of_pending_fork): Remove.
1235 (remote_target::remove_new_fork_children)
1236 (remote_target::check_pending_events_prevent_wildcard_vcont)
1237 (remote_target::discard_pending_stop_replies)
1238 (remote_target::discard_pending_stop_replies_in_queue)
1239 (remote_target::remote_notif_remove_queued_reply)
1240 (remote_target::queued_stop_reply)
1241 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1242 (remote_target::wait, remote_target::kill_new_fork_children)
1243 (remote_target::async): Update.
1244
1245 2018-06-10 Tom Tromey <tom@tromey.com>
1246
1247 * record-full.c (record_full_arch_list_cleanups): Remove.
1248 (record_full_message): Use try/catch.
1249 (record_full_wait_cleanups): Remove.
1250 (record_full_wait_1): Use try/catch.
1251 (record_full_restore): Likewise.
1252
1253 2018-06-10 Tom Tromey <tom@tromey.com>
1254
1255 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1256 declare VEC. Add constructor.
1257 <in_target_beneath>: Now bool.
1258 (record_full_breakpoints): Now a std::vector, static.
1259 (record_full_sync_record_breakpoints)
1260 (record_full_init_record_breakpoints)
1261 (record_full_target::insert_breakpoint)
1262 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1263
1264 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1265
1266 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1267 * serial.c (serial_interface_lookup): Remove struct keyword.
1268
1269 2018-06-10 Tom Tromey <tom@tromey.com>
1270
1271 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1272 method.
1273 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1274 a method.
1275 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1276 method.
1277 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1278 "beneath" as a method.
1279 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1280 Use "beneath" as a method.
1281
1282 2018-06-10 Tom Tromey <tom@tromey.com>
1283
1284 * tracefile.c (struct trace_file_writer_deleter): New.
1285 <operator()>: Rename from trace_file_writer_xfree.
1286 (trace_file_writer_up): New typedef.
1287 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1288
1289 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1290
1291 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1292 <m_registers, m_register_status>: Change type to
1293 std::unique_ptr.
1294 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1295 XCNEWVEC.
1296
1297 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1298
1299 * common/common-regcache.h (enum register_status): Add
1300 underlying type "signed char".
1301 * regcache.h (reg_buffer) <m_register_status>: Change type to
1302 register_status *.
1303 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1304 register_status instead of signed char.
1305 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1306 (reg_buffer::get_register_status): Remove cast.
1307 (readable_regcache::raw_read): Remove cast.
1308 (readable_regcache::cooked_read): Remove cast.
1309
1310 2018-06-09 Tom Tromey <tom@tromey.com>
1311
1312 * source.c (reverse_search_command, forward_search_command): Use
1313 scoped_fd.
1314
1315 2018-06-09 Tom Tromey <tom@tromey.com>
1316
1317 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1318 (serial_ops_list): Now static, std::vector.
1319 (serial_interface_lookup, serial_add_interface): Update.
1320
1321 2018-06-09 Tom Tromey <tom@tromey.com>
1322
1323 * dwarf2read.c (process_cu_includes): Update.
1324 (process_full_comp_unit): Update.
1325 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1326 std::vector.
1327
1328 2018-06-08 Paul Koning <paul_koning@dell.com>
1329
1330 PR gdb/23252
1331
1332 * python/python.c (do_start_initialization):
1333 Avoid call to internal Python API.
1334 (init__gdb_module): New function.
1335
1336 2018-06-08 Gary Benson <gbenson@redhat.com>
1337
1338 * linux-thread-db.c (valprint.h): New include.
1339 (struct check_thread_db_info): New structure.
1340 (check_thread_db_on_load, tdb_testinfo): New static globals.
1341 (check_thread_db, check_thread_db_callback): New functions.
1342 (try_thread_db_load_1): Run integrity checks if requested.
1343 (maintenance_check_libthread_db): New function.
1344 (_initialize_thread_db): Register "maint check libthread-db"
1345 and "maint set/show check-libthread-db".
1346 * NEWS: Mention the above new commands.
1347
1348 2018-06-08 Tom Tromey <tom@tromey.com>
1349
1350 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1351 now a method.
1352
1353 2018-06-08 Tom Tromey <tom@tromey.com>
1354
1355 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1356
1357 2018-06-08 Tom Tromey <tom@tromey.com>
1358
1359 * common/btrace-common.h (struct btrace_data): Add constructor,
1360 destructor, move assignment operator.
1361 <empty, clear, fini>: New methods.
1362 <format>: Initialize.
1363 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1364 (btrace_data_empty): Don't declare.
1365 * common/btrace-common.c (btrace_data_init): Remove.
1366 (btrace_data::fini): Rename from btrace_data_fini.
1367 (btrace_data::empty): Rename from btrace_data_empty.
1368 (btrace_data::clear): Rename from btrace_data_clear. Return
1369 bool.
1370 * btrace.h (make_cleanup_btrace_data): Don't declare.
1371 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1372 (parse_xml_btrace): Update.
1373 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1374 (maint_btrace_clear_packet_history_cmd): Update.
1375
1376 2018-06-07 Pedro Alves <palves@redhat.com>
1377
1378 * target.h (target_ops) <beneath>: Now a method. All references
1379 updated.
1380 (class target_stack): New.
1381 * target.c (g_target_stack): New.
1382 (g_current_top_target): Delete.
1383 (current_top_target): Get the top target out of g_target_stack.
1384 (target_stack::push, target_stack::unpush): New.
1385 (push_target, unpush_target): Reimplement.
1386 (target_is_pushed): Reimplement in terms of g_target_stack.
1387 (target_ops::beneath, target_stack::find_beneath): New.
1388
1389 2018-06-07 Pedro Alves <palves@redhat.com>
1390
1391 * target.h (find_target_beneath): Delete declaration.
1392 * target.c (find_target_beneath): Delete definition.
1393 * aix-thread.c: All callers of find_target_beneath adjusted to
1394 call target_ops::beneath instead.
1395 * bsd-uthread.c: Likewise.
1396 * linux-thread-db.c: Likewise.
1397 * ravenscar-thread.c: Likewise.
1398 * sol-thread.c: Likewise.
1399 * spu-multiarch.c: Likewise.
1400
1401 2018-06-07 Pedro Alves <palves@redhat.com>
1402
1403 * target.h (target_ops) <beneath>: Now a method. All references
1404 updated.
1405 (target_ops) <m_beneath>: New.
1406 * target.c (target_ops::beneath): New.
1407 * corelow.c: Adjust all references to target_ops::beneath.
1408 * linux-thread-db.c: Likewise.
1409 * make-target-delegates: Likewise.
1410 * record-btrace.c: Likewise.
1411 * record-full.c: Likewise.
1412 * remote.c: Likewise.
1413 * target.c: Likewise.
1414 * target-delegates.c: Regenerate.
1415
1416 2018-06-07 Pedro Alves <palves@redhat.com>
1417
1418 * target.h (target_stack): Delete.
1419 (current_top_target): Declare function.
1420 * target.c (target_stack): Delete.
1421 (g_current_top_target): New.
1422 (current_top_target): New function.
1423 * auxv.c: Use current_top_target instead of target_stack
1424 throughout.
1425 * avr-tdep.c: Likewise.
1426 * breakpoint.c: Likewise.
1427 * corefile.c: Likewise.
1428 * elfread.c: Likewise.
1429 * eval.c: Likewise.
1430 * exceptions.c: Likewise.
1431 * frame.c: Likewise.
1432 * gdbarch-selftests.c: Likewise.
1433 * gnu-v3-abi.c: Likewise.
1434 * ia64-tdep.c: Likewise.
1435 * ia64-vms-tdep.c: Likewise.
1436 * infcall.c: Likewise.
1437 * infcmd.c: Likewise.
1438 * infrun.c: Likewise.
1439 * linespec.c: Likewise.
1440 * linux-tdep.c: Likewise.
1441 * minsyms.c: Likewise.
1442 * ppc-linux-nat.c: Likewise.
1443 * ppc-linux-tdep.c: Likewise.
1444 * procfs.c: Likewise.
1445 * regcache.c: Likewise.
1446 * remote.c: Likewise.
1447 * rs6000-tdep.c: Likewise.
1448 * s390-linux-nat.c: Likewise.
1449 * s390-tdep.c: Likewise.
1450 * solib-aix.c: Likewise.
1451 * solib-darwin.c: Likewise.
1452 * solib-dsbt.c: Likewise.
1453 * solib-spu.c: Likewise.
1454 * solib-svr4.c: Likewise.
1455 * solib-target.c: Likewise.
1456 * sparc-tdep.c: Likewise.
1457 * sparc64-tdep.c: Likewise.
1458 * spu-tdep.c: Likewise.
1459 * symfile.c: Likewise.
1460 * symtab.c: Likewise.
1461 * target-descriptions.c: Likewise.
1462 * target-memory.c: Likewise.
1463 * target.c: Likewise.
1464 * target.h: Likewise.
1465 * tracefile-tfile.c: Likewise.
1466 * tracepoint.c: Likewise.
1467 * valops.c: Likewise.
1468 * valprint.c: Likewise.
1469 * value.c: Likewise.
1470 * windows-tdep.c: Likewise.
1471 * mi/mi-main.c: Likewise.
1472
1473 2018-06-07 Tom Tromey <tom@tromey.com>
1474
1475 * valprint.h (build_address_symbolic): Declare.
1476 * printcmd.c (print_address_symbolic): Update.
1477 (build_address_symbolic): Change "name" and "filename" to
1478 std::string.
1479 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1480 Update.
1481 * defs.h (build_address_symbolic): Remove declaration.
1482
1483 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1484
1485 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1486 (aarch64_vnv_type): Add function.
1487 (aarch64_pseudo_register_name): Add V regs for SVE.
1488 (aarch64_pseudo_register_type): Likewise.
1489 (aarch64_pseudo_register_reggroup_p): Likewise.
1490 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1491 (aarch64_pseudo_read_value): Add V regs for SVE.
1492 (aarch64_pseudo_write_2): Use V0 offset for SVE
1493 (aarch64_pseudo_write): Add V regs for SVE.
1494 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1495
1496 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1497
1498 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1499 (sve_vl_from_vq): Likewise.
1500
1501 2018-06-05 Tom Tromey <tom@tromey.com>
1502
1503 * cli/cli-cmds.c (show_version): Update.
1504 * top.c (print_gdb_version): Add "interactive" parameter.
1505 Update.
1506 * main.c (captured_main_1): Update.
1507 * top.h (print_gdb_version): Add "interactive" parameter and a
1508 comment.
1509
1510 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1511
1512 * common/enum-flags.h: Add trailing semicolon to example in
1513 comment.
1514
1515 2018-06-05 Tom Tromey <tom@tromey.com>
1516
1517 PR cli/12326:
1518 * NEWS: Add entry about pager.
1519 * utils.c (pagination_disabled_for_command): New global.
1520 (prompt_for_continue): Allow "c" response to prompt.
1521 (reinitialize_more_filter): Clear
1522 pagination_disabled_for_command.
1523 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1524
1525 2018-06-04 Tom Tromey <tom@tromey.com>
1526
1527 * ada-lang.h (ada_lookup_symbol_list): Update.
1528 * ada-lang.c (resolve_subexp): Update.
1529 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1530 parameter.
1531 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1532 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1533 results parameter to std::vector.
1534 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1535 Update.
1536 * ada-exp.y (block_lookup): Update.
1537 (select_possible_type_sym): Change type of syms. Remove nsyms
1538 parameter.
1539 (write_var_or_type, write_name_assoc): Update.
1540
1541 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1542
1543 * windows-nat.c (windows_nat_target::xfer_partial): Return
1544 TARGET_XFER_E_IO if we need to delegate to the target beneath
1545 but BENEATH is NULL.
1546
1547 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1548
1549 * Makefile.in (config.status): Add configure.nat as a
1550 dependency.
1551
1552 2018-06-04 Tom Tromey <tom@tromey.com>
1553
1554 * cp-name-parser.y (cpname_state): Add method declarations.
1555 (HANDLE_QUAL): Update.
1556 (cpname_state::d_grab, cpname_state::fill_comp)
1557 (cpname_state::make_operator, cpname_state::make_dtor)
1558 (cpname_state::make_builtin_type, cpname_state::make_name)
1559 (cpname_state::d_qualify, cpname_state::d_int_type)
1560 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1561 (%union): Move earlier.
1562
1563 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1564
1565 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1566
1567 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1568
1569 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1570 (aarch64_pseudo_write_1): Likewise.
1571 (aarch64_pseudo_read_value): Use helper.
1572 (aarch64_pseudo_write): Likewise.
1573
1574 2018-06-04 Pedro Alves <palves@redhat.com>
1575
1576 * darwin-nat.c (darwin_ops): Delete.
1577 (darwin_attach_pid): Use get_native_target.
1578
1579 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1580
1581 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1582 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1583
1584 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1585
1586 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1587 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1588 (aarch64_gdbarch_init): Check for SVE.
1589 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1590
1591 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1592
1593 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1594 * aarch64-tdep.h (aarch64_read_description): Likewise.
1595 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1596 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1597 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1598 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1599 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1600
1601 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * value.c (value_fetch_lazy_bitfield): New.
1604 (value_fetch_lazy_memory): New.
1605 (value_fetch_lazy_register): New.
1606 (value_fetch_lazy): Factor out to smaller functions.
1607
1608 2018-06-01 Tom Tromey <tom@tromey.com>
1609
1610 * cp-name-parser.y (backslashable, represented): Now const.
1611
1612 2018-06-01 Tom Tromey <tom@tromey.com>
1613
1614 * cp-name-parser.y: Include parser-defs.h.
1615 (parser_fprintf): Remove declaration.
1616
1617 2018-06-01 Tom Tromey <tom@tromey.com>
1618
1619 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1620 %parse-param.
1621 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1622 (global_result): Remove globals.
1623 (struct cpname_state): New.
1624 (yyparse): Don't declare.
1625 (yylex, yyerror): Move declarations after %union.
1626 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1627 (make_name): Add state parameter.
1628 Update all callers.
1629 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1630 parameter.
1631 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1632 Update.
1633 (yylex): Add lvalp, state parameters.
1634 (yyerror): Add state parameter.
1635 (cp_demangled_name_to_comp): Update.
1636
1637 2018-06-01 Tom Tromey <tom@tromey.com>
1638
1639 * cp-name-parser.y (parser_fprintf): Declare.
1640 (GDB_YY_REMAP_PREFIX): Define.
1641 Include yy-remap.h. Don't redefine yy* identifiers.
1642
1643 2018-06-01 Tom Tromey <tom@tromey.com>
1644
1645 * python/py-type.c (typy_legacy_template_argument): Update.
1646 * cp-support.h (cp_demangled_name_to_comp): Update.
1647 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1648 parameter to be a "std::string *".
1649 (main): Update.
1650
1651 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1652
1653 * ada-lex.l: Include "diagnostics.h" instead of
1654 "common/diagnostics.h".
1655 * unittests/environ-selftests.c: Likewise.
1656 * common/diagnostics.h: Moved to ../include.
1657
1658 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1659
1660 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1661 to language_mode_manual while calling breakpoint_re_set_one.
1662
1663 2018-06-01 Tom Tromey <tom@tromey.com>
1664
1665 * valops.c (value_cast_structs, destructor_name_p): Update.
1666 * symtab.c (gdb_mangle_name): Update.
1667 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1668 Update.
1669 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1670 (pascal_object_print_value_fields, pascal_object_print_value):
1671 Update.
1672 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1673 * linespec.c (find_methods): Update.
1674 * gdbtypes.h (type_name_no_tag): Remove.
1675 (type_name_or_error): Rename from type_name_no_tag_or_error.
1676 * gdbtypes.c (type_name_no_tag): Remove.
1677 (type_name_or_error): Rename from type_name_no_tag_or_error.
1678 (lookup_struct_elt_type, check_typedef): Update.
1679 * expprint.c (print_subexp_standard): Update.
1680 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1681 * d-namespace.c (d_lookup_nested_symbol): Update.
1682 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1683 (cp_print_class_member): Update.
1684 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1685 * completer.c (add_struct_fields): Update.
1686 * c-typeprint.c (cp_type_print_derivation_info)
1687 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1688 Update.
1689 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1690 (ada_prefer_type, ada_is_exception_sym): Update.
1691
1692 2018-06-01 Tom Tromey <tom@tromey.com>
1693
1694 * valops.c (enum_constant_from_type, value_namespace_elt)
1695 (value_maybe_namespace_elt): Update.
1696 * valarith.c (find_size_for_pointer_math): Update.
1697 * target-descriptions.c (make_gdb_type): Update.
1698 * symmisc.c (print_symbol): Update.
1699 * stabsread.c (define_symbol, read_type)
1700 (complain_about_struct_wipeout, add_undefined_type)
1701 (cleanup_undefined_types_1): Update.
1702 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1703 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1704 (rust_internal_print_type, rust_composite_type)
1705 (rust_evaluate_funcall, rust_evaluate_subexp)
1706 (rust_inclusive_range_type_p): Update.
1707 * python/py-type.c (typy_get_tag): Update.
1708 * p-typeprint.c (pascal_type_print_base): Update.
1709 * mdebugread.c (parse_symbol, parse_type): Update.
1710 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1711 Update.
1712 * guile/scm-type.c (gdbscm_type_tag): Update.
1713 * go-lang.c (sixg_string_p): Update.
1714 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1715 Update.
1716 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1717 (TYPE_TAG_NAME): Remove.
1718 * gdbtypes.c (type_name_no_tag): Simplify.
1719 (check_typedef, check_types_equal, recursive_dump_type)
1720 (copy_type_recursive, arch_composite_type): Update.
1721 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1722 in summary mode when needed.
1723 * eval.c (evaluate_funcall): Update.
1724 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1725 (process_structure_scope, read_enumeration_type)
1726 (read_namespace_type, read_module_type, determine_prefix): Update.
1727 * cp-support.c (inspect_type): Update.
1728 * coffread.c (process_coff_symbol, decode_base_type): Update.
1729 * c-varobj.c (c_is_path_expr_parent): Update.
1730 * c-typeprint.c (c_type_print_base_struct_union): Update.
1731 (c_type_print_base_1): Update. Print struct/class/union/enum in
1732 summary when using C language.
1733 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1734 (gen_maybe_namespace_elt): Update.
1735 * ada-lang.c (ada_type_name): Simplify.
1736 (empty_record, ada_template_to_fixed_record_type_1)
1737 (template_to_static_fixed_type)
1738 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1739
1740 2018-06-01 Tom Tromey <tom@tromey.com>
1741
1742 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1743 c_print_type.
1744 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1745 (c_print_type): Update.
1746 (c_print_type): New overload.
1747 (c_type_print_varspec_prefix, c_type_print_args)
1748 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1749 (c_type_print_base_struct_union, c_type_print_base_1)
1750 (cp_type_print_method_args): Add "language" parameter.
1751 (c_type_print_base): Update.
1752 * c-lang.h (c_print_type): Add new overload.
1753
1754 2018-06-01 Tom Tromey <tom@tromey.com>
1755
1756 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1757 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1758
1759 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1760
1761 * aarch64-tdep.c (aarch64_sve_register_names): New const
1762 var.
1763 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1764 (AARCH64_SVE_Z_REGS_NUM): New define.
1765 (AARCH64_SVE_P_REGS_NUM): Likewise.
1766 (AARCH64_SVE_NUM_REGS): Likewise.
1767
1768 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1769
1770 * nat/linux-ptrace.h [__alpha__]
1771 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1772 definitions.
1773
1774 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1775
1776 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1777 the endianness selected.
1778 * NEWS: Document `set endian auto' mode operation update.
1779
1780 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1781
1782 * Makefile.in: Add new header.
1783 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1784 (sve_vl_from_vg): Likewise.
1785 (sve_vq_from_vl): Likewise.
1786 (sve_vl_from_vq): Likewise.
1787 (sve_vq_from_vg): Likewise.
1788 (sve_vg_from_vq): Likewise.
1789 * configure.nat: Add new c file.
1790 * nat/aarch64-sve-linux-ptrace.c: New file.
1791 * nat/aarch64-sve-linux-ptrace.h: New file.
1792
1793 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1794
1795 * aarch64-linux-nat.c (aarch64_linux_read_description):
1796 Add parmeter zero.
1797 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1798 Likewise.
1799 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1800 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1801 (aarch64_gdbarch_init): Add parmeter zero.
1802 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1803 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1804 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1805 parmeter.
1806 * doc/gdb.texinfo: Describe SVE feature
1807 * features/aarch64-sve.c: New file.
1808
1809 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1810
1811 PR gdb/23210
1812 * gdbarch.sh (significant_addr_bit): Default to zero when
1813 not set by target architecture.
1814 * gdbarch.c: Re-generated.
1815 * utils.c (address_significant): Update.
1816
1817 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1818
1819 * stack.c (func_command): Remove trailing newline in call to error.
1820
1821 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1822
1823 * regcache.h (regcache_raw_collect): Remove, update callers to
1824 use regcache::raw_collect.
1825 * regcache.c (regcache_raw_collect): Remove.
1826
1827 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1828
1829 * regcache.h (regcache_raw_supply): Remove, update callers to
1830 use detached_regcache::raw_supply.
1831 * regcache.c (regcache_raw_supply): Remove.
1832
1833 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1834
1835 * regcache.h (regcache_cooked_write_part): Remove, update
1836 callers to use regcache::cooked_write_part.
1837 * regcache.c (regcache_cooked_write_part): Remove.
1838
1839 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1840
1841 * regcache.h (regcache_cooked_read_part): Remove, update callers
1842 to use readable_regcache::cooked_read_part.
1843 * regcache.c (regcache_cooked_read_part): Remove.
1844
1845 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1846
1847 * regcache.h (regcache_cooked_read_value): Remove, update
1848 callers to use readable_regcache::cooked_read_value.
1849 * regcache.c (regcache_cooked_read_value): Remove.
1850
1851 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1852
1853 * regcache.h (regcache_cooked_write): Remove, update callers to
1854 use regcache::cooked_write.
1855 * regcache.c (regcache_cooked_write): Remove.
1856
1857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1858
1859 * regcache.h (regcache_invalidate): Remove, update callers to
1860 use detached_regcache::invalidate instead.
1861 * regcache.c (regcache_invalidate): Remove.
1862
1863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1864
1865 * regcache.h (regcache_raw_write_part): Remove, update callers
1866 to use regcache::raw_write_part instead.
1867 * regcache.c (regcache_raw_write_part): Remove.
1868
1869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1870
1871 * regcache.h (regcache_raw_read_part): Remove, update callers to
1872 use readable_regcache::raw_read_part instead.
1873 * regcache.c (regcache_raw_read_part): Remove.
1874
1875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1876
1877 * regcache.h (regcache_cooked_read): Remove, update callers to
1878 use readable_regcache::cooked_read instead.
1879 * regcache.c (regcache_cooked_read): Remove.
1880
1881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1882
1883 * regcache.h (regcache_raw_write): Remove, update callers to use
1884 regcache::raw_write instead.
1885 * regcache.c (regcache_raw_write): Remove.
1886
1887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * regcache.h (regcache_raw_read): Remove, update callers to use
1890 readable_regcache::raw_read instead.
1891 * regcache.c (regcache_raw_read): Remove.
1892
1893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * regcache.h (regcache_raw_update): Remove, update callers to
1896 use readable_regcache::raw_update instead.
1897 * regcache.c (regcache_raw_update): Remove.
1898
1899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1900
1901 * regcache.h (regcache_register_status): Remove, update callers
1902 to use reg_buffer::get_register_status directly instead.
1903 * regcache.c (regcache_register_status): Remove.
1904
1905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1906
1907 * regcache.h (regcache_get_ptid): Remove, update all callers to
1908 call regcache::ptid instead.
1909 * regcache.c (regcache_get_ptid): Remove.
1910
1911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1914
1915 2018-05-30 Pedro Alves <palves@redhat.com>
1916
1917 * common/common-exceptions.h (exception_rethrow): Use
1918 ATTRIBUTE_NORETURN.
1919
1920 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1921
1922 * breakpoint.c (print_solib_event, check_status_catch_solib):
1923 Remove struct keyword in range-based for loops.
1924 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1925 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1926 Likewise.
1927 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1928 Likewise.
1929 * symfile.c (addr_info_make_relative): Likewise.
1930 * thread.c (value_in_thread_stack_temporaries): Likewise.
1931
1932 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1933
1934 PR gdb/16841
1935 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1936 aggregate type to get its real type before accessing it.
1937
1938 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1939
1940 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1941 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1942 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1943 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1944 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1945 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1946 * printcmd.c (info_address_command): Likewise.
1947
1948 2018-05-29 Tom Tromey <tom@tromey.com>
1949
1950 * windows-nat.c (handle_exception): Update fall-through comment.
1951
1952 2018-05-29 Tom Tromey <tom@tromey.com>
1953
1954 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1955 (struct program_space) <added_solibs>: Now a std::vector.
1956 * breakpoint.c (print_solib_event): Update.
1957 (check_status_catch_solib): Update.
1958 * progspace.c (clear_program_space_solib_cache): Update.
1959 * solib.c (update_solib_list): Update.
1960
1961 2018-05-29 Tom Tromey <tom@tromey.com>
1962
1963 * python/py-type.c (typy_richcompare): Update.
1964 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1965 * gdbtypes.h (types_deeply_equal): Return bool.
1966 (types_equal): Likewise.
1967 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1968 declare VEC.
1969 (check_types_equal): Change worklist to std::vector. Return
1970 bool.
1971 (struct type_equality_entry): Add constructor.
1972 (compare_maybe_null_strings): Return bool.
1973 (check_types_worklist): Return bool. Change worklist to
1974 std::vector.
1975 (types_deeply_equal): Use std::vector.
1976 (types_equal): Return bool.
1977 (compare_maybe_null_strings): Simplify.
1978
1979 2018-05-29 Tom Tromey <tom@tromey.com>
1980
1981 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1982
1983 2018-05-29 Tom Tromey <tom@tromey.com>
1984
1985 * objc-lang.h: Don't include cp-support.h.
1986 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1987 declare VEC.
1988
1989 2018-05-27 Tom Tromey <tom@tromey.com>
1990
1991 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1992
1993 2018-05-25 Tom Tromey <tom@tromey.com>
1994
1995 * value.c (value::location): Initialize.
1996
1997 2018-05-25 Tom Tromey <tom@tromey.com>
1998
1999 * dbxread.c (init_bincl_list): Remove.
2000 (bincl_list): Now a std::vector.
2001 (bincls_allocated, next_bincl): Remove.
2002 (free_bincl_list, do_free_bincl_list_cleanup)
2003 (make_cleanup_free_bincl_list): Remove.
2004 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2005 unique_xmalloc_ptr.
2006 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2007 (struct header_file_location): Add constructor.
2008 (add_bincl_to_list): Remove.
2009
2010 2018-05-25 Tom Tromey <tom@tromey.com>
2011
2012 * tui/tui.c (tui_enable): Update.
2013 * mi/mi-interp.c (mi_interp::init): Update.
2014 * interps.h (class interp) <name>: New method.
2015 <m_name>: Rename from name.
2016 (~scoped_restore_interp): Update.
2017 * interps.c (interp::interp): Update.
2018 (interp_add, interp_set, interp_lookup_existing)
2019 (current_interp_named_p): Update.
2020
2021 2018-05-25 Tom Tromey <tom@tromey.com>
2022
2023 * interps.c (interp_name): Remove.
2024 * mi/mi-interp.c (mi_interp::init): Update.
2025 * interps.h (interp_name): Remove.
2026 (~scoped_restore_interp): Update.
2027 * tui/tui.c (tui_enable): Update.
2028
2029 2018-05-25 Tom Tromey <tom@tromey.com>
2030
2031 * utils.c (fputs_maybe_filtered): Update.
2032 * linespec.c (decode_line_full): Update.
2033 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2034 (mi_print_breakpoint_for_event, mi_solib_loaded)
2035 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2036 (mi_user_selected_context_changed): Update.
2037 * mi/mi-main.c (mi_execute_command): Update.
2038 * cli/cli-script.c (execute_control_command): Update.
2039 * python/python.c (execute_gdb_command): Update.
2040 * solib.c (info_sharedlibrary_command): Update.
2041 * interps.c (interp_ui_out): Remove.
2042 * interps.h (interp_ui_out): Remove.
2043
2044 2018-05-25 Tom Tromey <tom@tromey.com>
2045
2046 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2047 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2048 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2049
2050 2018-05-25 Tom Tromey <tom@tromey.com>
2051
2052 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2053 * interps.c (interp_exec): Use scoped_restore.
2054
2055 2018-05-25 Tom Tromey <tom@tromey.com>
2056
2057 * remote.c (remote_target::remote_file_get): Use
2058 gdb::byte_vector.
2059 (remote_target::remote_file_put): Likewise.
2060
2061 2018-05-25 Tom Tromey <tom@tromey.com>
2062
2063 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2064 a std::string.
2065 (get_pe_section_index, add_pe_exported_sym): Update.
2066 (read_pe_exported_syms): Use gdb::def_vector.
2067
2068 2018-05-25 Tom Tromey <tom@tromey.com>
2069
2070 * frame.c (remove_prev_frame): Remove.
2071 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2072
2073 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2074
2075 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2076 Remove prototypes.
2077 * mips-linux-nat.c (supply_fpregset): Always call
2078 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2079 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2080 `mips_fill_fpregset'.
2081 * mips-linux-tdep.c (mips_supply_fpregset)
2082 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2083 (mips_fill_fpregset_wrapper): Remove functions.
2084 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2085 (mips_linux_fpregset): Remove variable.
2086 (mips_linux_iterate_over_regset_sections): Use
2087 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2088 (mips_linux_o32_sigframe_init): Remove comment.
2089
2090 2018-05-25 Pedro Alves <palves@redhat.com>
2091
2092 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2093 (struct readahead_cache, struct packet_reg, struct
2094 remote_arch_state, class remote_state): Move higher up in the
2095 file.
2096 (remote_target::m_remote_state): Now an object instead of a pointer.
2097 (remote_target::get_remote_state): Adjust.
2098
2099 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2100
2101 * stack.c (select_and_print_frame): Delete.
2102 (struct function_bounds): Move struct within function.
2103 (func_command): Most content moved into new function
2104 find_frame_for_function, use new function, print result, add
2105 function comment.
2106 (find_frame_for_function): New function, now returns a result.
2107
2108 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2109
2110 * stack.c (iterate_over_block_arg_vars): Fix comment.
2111 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2112
2113 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2114
2115 PR gdb/23203
2116 * frame.c
2117 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2118 Define.
2119 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2120 Define.
2121 * frame.h (class scoped_restore_selected_frame): New class.
2122 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2123 of any exception, use scoped_restore_selected_frame to restore the
2124 frame instead.
2125
2126 2018-05-24 Pedro Alves <palves@redhat.com>
2127
2128 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2129 override.
2130
2131 2018-05-23 Tom Tromey <tom@tromey.com>
2132
2133 * complaints.c (struct complaints): Remove.
2134 (symfile_complaint_book): Remove.
2135 (series): New global.
2136 (complaint_internal): Update.
2137 (clear_complaints): Update.
2138
2139 2018-05-23 Tom Tromey <tom@tromey.com>
2140
2141 * complaints.c (counters): New global.
2142 (struct complain): Remove.
2143 (struct complaints) <root>: Remove.
2144 (complaint_sentinel): Remove.
2145 (symfile_complaint_book): Update.
2146 (find_complaint) Remove.
2147 (complaint_internal, clear_complaints): Update.
2148
2149 2018-05-23 Tom Tromey <tom@tromey.com>
2150
2151 * complaints.c (struct complain) <file, line>: Remove.
2152 (find_complaint): Remove file, line parameters.
2153 (complaint_internal): Update.
2154
2155 2018-05-23 Tom Tromey <tom@tromey.com>
2156
2157 * complaints.c (vcomplaint): Remove.
2158 (complaint_internal) Merge in contents of vcomplaint.
2159
2160 2018-05-23 Tom Tromey <tom@tromey.com>
2161
2162 * complaints.c (struct complaints) <explanation>: Remove.
2163 (symfile_explanations): Remove.
2164 (symfile_complaint_book): Update.
2165 (vcomplaint): Update.
2166 (struct explanation): Remove.
2167
2168 2018-05-23 Tom Tromey <tom@tromey.com>
2169
2170 * complaints.c (symfile_complaints): Remove.
2171 (complaint_internal): Remove "complaints" parameter.
2172 (clear_complaints, vcomplaint): Remove "c" parameter.
2173 (get_complaints): Remove.
2174 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2175 (dwarf2_debug_line_missing_file_complaint)
2176 (dwarf2_debug_line_missing_end_sequence_complaint)
2177 (dwarf2_complex_location_expr_complaint)
2178 (dwarf2_const_value_length_mismatch_complaint)
2179 (dwarf2_section_buffer_overflow_complaint)
2180 (dwarf2_macro_malformed_definition_complaint)
2181 (dwarf2_invalid_attrib_class_complaint)
2182 (create_addrmap_from_index, dw2_symtab_iter_next)
2183 (dw2_expand_marked_cus)
2184 (dw2_debug_names_iterator::find_vec_in_debug_names)
2185 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2186 (create_debug_type_hash_table, init_cutu_and_read_dies)
2187 (partial_die_parent_scope, add_partial_enumeration)
2188 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2189 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2190 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2191 (create_cus_hash_table, create_dwp_hash_table)
2192 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2193 (dwarf2_rnglists_process, dwarf2_ranges_process)
2194 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2195 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2196 (handle_struct_member_die, process_structure_scope)
2197 (read_array_type, read_common_block, read_module_type)
2198 (read_tag_pointer_type, read_typedef, read_base_type)
2199 (read_subrange_type, load_partial_dies, partial_die_info::read)
2200 (partial_die_info::read, partial_die_info::read)
2201 (partial_die_info::read, read_checked_initial_length_and_offset)
2202 (dwarf2_string_attr, read_formatted_entries)
2203 (dwarf_decode_line_header)
2204 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2205 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2206 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2207 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2208 (get_signatured_type, get_DW_AT_signature_type)
2209 (decode_locdesc, file_file_name, consume_improper_spaces)
2210 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2211 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2212 (dwarf2_symbol_mark_computed, set_die_type)
2213 (read_attribute_value): Update.
2214 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2215 Update.
2216 * dbxread.c (unknown_symtype_complaint)
2217 (lbrac_mismatch_complaint, repeated_header_complaint)
2218 (set_namestring, function_outside_compilation_unit_complaint)
2219 (read_dbx_symtab, process_one_symbol): Update.
2220 * gdbtypes.c (stub_noname_complaint): Update.
2221 * windows-nat.c (handle_unload_dll): Update.
2222 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2223 (decode_base_type): Update.
2224 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2225 (eb_complaint, record_include_begin, record_include_end)
2226 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2227 (process_xcoff_symbol, read_symbol)
2228 (function_outside_compilation_unit_complaint)
2229 (scan_xcoff_symtab): Update.
2230 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2231 * buildsym.c (finish_block_internal, make_blockvector)
2232 (end_symtab_get_static_block, augment_type_symtab): Update.
2233 * dtrace-probe.c (dtrace_process_dof)
2234 (dtrace_static_probe_ops::get_probes): Update.
2235 * complaints.h (struct complaint): Don't declare.
2236 (symfile_complaints): Remove.
2237 (complaint_internal): Remove "complaints" parameter.
2238 (complaint): Likewise.
2239 (clear_complaints): Likewise.
2240 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2241 (reread_symbols): Update.
2242 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2243 (dwarf2_frame_cache, decode_frame_entry): Update.
2244 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2245 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2246 (info_selectors_command): Update.
2247 * macrotab.c (macro_include, check_for_redefinition)
2248 (macro_undef): Update.
2249 * objfiles.c (filter_overlapping_sections): Update.
2250 * stabsread.c (invalid_cpp_abbrev_complaint)
2251 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2252 (define_symbol, error_type, read_type, rs6000_builtin_type)
2253 (stabs_method_name_from_physname, read_member_functions)
2254 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2255 (attach_fields_to_type, complain_about_struct_wipeout)
2256 (read_range_type, read_args, common_block_start)
2257 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2258 Update.
2259 * mdebugread.c (index_complaint, unknown_ext_complaint)
2260 (basic_type_complaint, bad_tag_guess_complaint)
2261 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2262 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2263 (parse_procedure, parse_lines)
2264 (function_outside_compilation_unit_complaint)
2265 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2266 (bad_tag_guess_complaint, reg_value_complaint): Update.
2267 * cp-support.c (demangled_name_complaint): Update.
2268 * macroscope.c (sal_macro_scope): Update.
2269 * dwarf-index-write.c (class debug_names): Update.
2270
2271 2018-05-23 Tom Tromey <tom@tromey.com>
2272
2273 * complaints.c (clear_complaints): Remove "noisy" parameter.
2274 * complaints.h (clear_complaints): Update.
2275 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2276 (reread_symbols): Update.
2277
2278 2018-05-23 Tom Tromey <tom@tromey.com>
2279
2280 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2281 SUBSEQUENT_MESSAGE.
2282 (vcomplaint, clear_complaints): Update.
2283 (symfile_explanations): Remove some messages.
2284
2285 2018-05-23 Tom Tromey <tom@tromey.com>
2286
2287 * complaints.c (internal_complaint): Remove.
2288 * complaints.h (internal_complaint): Remove.
2289
2290 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2291
2292 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2293
2294 2018-05-22 Pedro Alves <palves@redhat.com>
2295
2296 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2297 (remote_fileio_badfd, remote_fileio_return_errno)
2298 (remote_fileio_return_success, remote_fileio_func_open)
2299 (remote_fileio_func_open, remote_fileio_func_close)
2300 (remote_fileio_func_read, remote_fileio_func_write)
2301 (remote_fileio_func_lseek, remote_fileio_func_rename)
2302 (remote_fileio_func_unlink, remote_fileio_func_stat)
2303 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2304 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2305 remote_target parameter.
2306 (remote_fio_func_map) <func>: Add remote_target parameter.
2307 (do_remote_fileio_request, remote_fileio_request):
2308 * remote-fileio.h (remote_fileio_request):
2309 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2310 remote_target parameter.
2311 (remote_notif_process, handle_notification): Adjust to pass down
2312 the remote.
2313 (remote_notif_state_allocate): Add remote_target parameter. Save
2314 it.
2315 * remote-notif.h (struct remote_target): Forward declare.
2316 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2317 remote_target parameter.
2318 (struct remote_notif_state) <remote>: New field.
2319 (remote_notif_ack, remote_notif_parse): Add remote_target
2320 parameter.
2321 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2322 remote_target parameter.
2323 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2324 (threads_listing_context, rmt_thread_action, protocol_feature)
2325 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2326 (packet_result, struct threads_listing_context, remote_state):
2327 Move definitions and declarations higher up.
2328 (remote_target) <~remote_target>: Declare.
2329 (remote_download_command_source, remote_file_put, remote_file_get)
2330 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2331 (remote_hostio_pread_vFile, remote_hostio_send_command)
2332 (remote_hostio_set_filesystem, remote_hostio_open)
2333 (remote_hostio_close, remote_hostio_unlink, remote_state)
2334 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2335 (get_memory_write_packet_size, get_memory_read_packet_size)
2336 (append_pending_thread_resumptions, remote_detach_1)
2337 (append_resumption, remote_resume_with_vcont)
2338 (add_current_inferior_and_thread, wait_ns, wait_as)
2339 (process_stop_reply, remote_notice_new_inferior)
2340 (process_initial_stop_replies, remote_add_thread)
2341 (btrace_sync_conf, remote_btrace_maybe_reopen)
2342 (remove_new_fork_children, kill_new_fork_children)
2343 (discard_pending_stop_replies, stop_reply_queue_length)
2344 (check_pending_events_prevent_wildcard_vcont)
2345 (discard_pending_stop_replies_in_queue, stop_reply)
2346 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2347 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2348 (remote_interrupt_as, remote_interrupt_ns)
2349 (remote_get_noisy_reply, remote_query_attached)
2350 (remote_add_inferior, remote_current_thread, get_current_thread)
2351 (set_thread, set_general_thread, set_continue_thread)
2352 (set_general_process, write_ptid)
2353 (remote_unpack_thread_info_response, remote_get_threadinfo)
2354 (parse_threadlist_response, remote_get_threadlist)
2355 (remote_threadlist_iterator, remote_get_threads_with_ql)
2356 (remote_get_threads_with_qxfer)
2357 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2358 (get_offsets, remote_check_symbols, remote_supported_packet)
2359 (remote_query_supported, remote_packet_size)
2360 (remote_serial_quit_handler, remote_detach_pid)
2361 (remote_vcont_probe, remote_resume_with_hc)
2362 (send_interrupt_sequence, interrupt_query)
2363 (remote_notif_get_pending_events, fetch_register_using_p)
2364 (send_g_packet, process_g_packet, fetch_registers_using_g)
2365 (store_register_using_P, store_registers_using_G)
2366 (set_remote_traceframe, check_binary_download)
2367 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2368 (remote_xfer_live_readonly_partial, remote_read_bytes)
2369 (remote_send_printf, remote_flash_write, readchar)
2370 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2371 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2372 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2373 (extended_remote_disable_randomization, extended_remote_run)
2374 (send_environment_packet, extended_remote_environment_support)
2375 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2376 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2377 (packet_command): Now methods of ...
2378 (remote_target): ... this class.
2379 (m_remote_state) <remote_target>: New field.
2380 (struct remote_state) <stop_reply_queue,
2381 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2382 fields.
2383 (remote_state::remote_state): Allocate stop_reply_queue.
2384 (remote_state): Delete global.
2385 (get_remote_state_raw): Delete.
2386 (remote_target::get_remote_state): Allocate m_remote_state on
2387 demand.
2388 (get_current_remote_target): New.
2389 (remote_ops, extended_remote_ops): Delete.
2390 (wait_forever_enabled_p, remote_async_inferior_event_token):
2391 Delete, moved to struct remote_state.
2392 (remote_target::close): Delete self. Destruction bits split to
2393 ...
2394 (remote_target::~remote_target): ... this.
2395 (show_memory_packet_size): Adjust to use
2396 get_current_remote_target.
2397 (struct protocol_feature) <func>: Add remote_target parameter.
2398 All callers adjusted.
2399 (curr_quit_handler_target): New.
2400 (remote_serial_quit_handler): Reimplement.
2401 (remote_target::open_1): Adjust to use get_current_remote_target.
2402 Heap-allocate remote_target/extended_remote_target instances.
2403 (vcont_builder::vcont_builder): Add remote_target parameter, and
2404 save it in m_remote. All callers adjusted.
2405 (vcont_builder::m_remote): New field.
2406 (vcont_builder::restart, vcont_builder::flush)
2407 (vcont_builder::push_action): Use it.
2408 (remote_target::commit_resume): Use it.
2409 (struct queue_iter_param) <remote>: New field.
2410 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2411 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2412 (check_pending_event_prevents_wildcard_vcont_callback)
2413 (remote_target::check_pending_events_prevent_wildcard_vcont)
2414 (remote_target::discard_pending_stop_replies)
2415 (remote_target::discard_pending_stop_replies_in_queue)
2416 (remote_target::remote_notif_remove_queued_reply): Fill in
2417 'remote' field.
2418 (remote_notif_get_pending_events): New.
2419 (remote_target::readchar, remote_target::remote_serial_write):
2420 Save/restore curr_quit_handler_target.
2421 (putpkt): New.
2422 (kill_new_fork_children): Fill in 'remote' field.
2423 (packet_command): Use get_current_remote_target, defer to
2424 remote_target method of same name.
2425 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2426 parameter, and save it in m_remote. All callers adjusted.
2427 (scoped_remote_fd::release): Use m_remote.
2428 (scoped_remote_fd::m_remote): New field.
2429 (remote_file_put, remote_file_get, remote_file_delete): Use
2430 get_current_remote_target, defer to remote_target method of same
2431 name.
2432 (remote_btrace_reset): Add remote_state paremeter. Update all
2433 callers.
2434 (remote_async_inferior_event_handler). Pass down 'data'.
2435 (remote_new_objfile): Use get_current_remote_target.
2436 (remote_target::vcont_r_supported): New.
2437 (set_range_stepping): Use get_current_remote_target and
2438 remote_target::vcont_r_supported.
2439 (_initialize_remote): Don't allocate 'remote_state' and
2440 'stop_reply_queue' globals.
2441 * remote.h (struct remote_target): Forward declare.
2442 (getpkt, putpkt, remote_notif_get_pending_events): Add
2443 'remote_target' parameter.
2444
2445 2018-05-22 Pedro Alves <palves@redhat.com>
2446
2447 * remote.c (vcont_builder): Now a class. Make all data members
2448 private.
2449 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2450 Declare methods.
2451 (vcont_builder_restart): Rename to ...
2452 (vcont_builder::restart): ... this.
2453 (vcont_builder_flush): Rename to ...
2454 (vcont_builder::flush): ... this.
2455 (vcont_builder_push_action): Rename to ...
2456 (vcont_builder::push_action): ... this.
2457 (remote_target::commit_resume): Adjust.
2458
2459 2018-05-22 Pedro Alves <palves@redhat.com>
2460
2461 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2462 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2463 (get_fixed_memory_packet_size): New.
2464 (get_memory_packet_size): Use it.
2465 (set_memory_packet_size): Don't override the config size with
2466 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2467 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2468 Don't refer to get_memory_packet_size if not connected to a remote
2469 target. Show "(default)" if configured size is 0.
2470
2471 2018-05-22 Pedro Alves <palves@redhat.com>
2472
2473 * remote.c (remote_target::mourn_inferior): Move
2474 discard_pending_stop_replies call here from ...
2475 (_initialize_remote): ... here.
2476
2477 2018-05-22 Pedro Alves <palves@redhat.com>
2478
2479 * remote.c (compare_section_command): Remove set_general_process
2480 call.
2481
2482 2018-05-22 Pedro Alves <palves@redhat.com>
2483
2484 * remote.c (struct packet_reg, struct remote_arch_state):
2485 Move higher up in the file.
2486 (remote_state) <m_arch_states>: Store remote_arch_state values
2487 instead of remote_arch_state pointers.
2488 (remote_state::get_remote_arch_state): Adjust.
2489
2490 2018-05-22 Pedro Alves <palves@redhat.com>
2491
2492 * remote.c: Include <unordered_map>.
2493 (remote_state): Now a class.
2494 (remote_state) <get_remote_arch_state>: Declare method.
2495 <get_remote_arch_state>: New field.
2496 (remote_arch_state) <remote_arch_state>: Declare ctor.
2497 <regs>: Now a unique_ptr.
2498 (remote_gdbarch_data_handle): Delete.
2499 (get_remote_arch_state): Delete.
2500 (remote_state::get_remote_arch_state): New.
2501 (get_remote_state): Adjust to call remote_state's
2502 get_remote_arch_state method.
2503 (init_remote_state): Delete, bits factored out to ...
2504 (remote_arch_state::remote_arch_state): ... this new method.
2505 (get_remote_packet_size, get_memory_packet_size)
2506 (process_g_packet, remote_target::fetch_registers)
2507 (remote_target::prepare_to_store, store_registers_using_G)
2508 (remote_target::store_registers, remote_target::get_trace_status):
2509 Adjust to call remote_state's method.
2510 (_initialize_remote): Remove reference to
2511 remote_gdbarch_data_handle.
2512
2513 2018-05-22 Pedro Alves <palves@redhat.com>
2514
2515 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2516 pread>: New method declarations.
2517 (remote_target::open_1): Adjust.
2518 (readahead_cache_invalidate): Rename to ...
2519 (readahead_cache::invalidate): ... this, and adjust to be a class
2520 method.
2521 (readahead_cache_invalidate_fd): Rename to ...
2522 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2523 class method.
2524 (remote_hostio_pwrite): Adjust.
2525 (remote_hostio_pread_from_cache): Rename to ...
2526 (readahead_cache::pread): ... this, and adjust to be a class
2527 method.
2528 (remote_hostio_close): Adjust.
2529
2530 2018-05-22 Pedro Alves <palves@redhat.com>
2531
2532 * remote.c (remote_hostio_close_cleanup): Delete.
2533 (class scoped_remote_fd): New.
2534 (remote_file_put, remote_file_get): Use it.
2535
2536 2018-05-22 Pedro Alves <palves@redhat.com>
2537
2538 (struct vCont_action_support): Use bool and initialize all fields.
2539 (struct readahead_cache): Initialize all fields.
2540 (remote_state): Use bool and initialize all fields.
2541 (remote_state::remote_state, remote_state::~remote_state): New.
2542 (new_remote_state): Delete.
2543 (_initialize_remote): Use new to allocate remote_state.
2544
2545 2018-05-22 Pedro Alves <palves@redhat.com>
2546 張俊芝 <zjz@zjz.name>
2547
2548 PR gdb/22973
2549 * c-exp.y: Include "c-support.h".
2550 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2551 of tolower. Use c_ident_is_alpha to scan names.
2552 * c-lang.c: Include "c-support.h".
2553 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2554 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2555 * c-support.h: New file, with bits factored out from ...
2556 * cp-name-parser.y: ... this file.
2557 Include "c-support.h".
2558 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2559 c-support.h and renamed.
2560 (symbol_end, yylex): Adjust.
2561
2562 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2563
2564 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2565 parameter type to CORE_ADDR.
2566 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2567 parameter type in declaration to CORE_ADDR.
2568 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2569 target_auxv_search to get AT_HWCAP and use the result to get the
2570 target description.
2571 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2572 to CORE_ADDR. Remove the cast of the return value to unsigned
2573 long. Fix error predicate of target_auxv_search.
2574 (ppc_linux_nat_target::read_description): Change the type of the
2575 hwcap variable to CORE_ADDR.
2576
2577 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2578
2579 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2580 if the size of fpscr is larger than 32 bits.
2581
2582 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2583
2584 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2585 (ppc32_linux_vsxregmap): New global.
2586 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2587 regcache_supply_regset, and regcache_collect_regset.
2588 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2589 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2590 (fetch_vsx_register, store_vsx_register): Remove.
2591 (fetch_vsx_registers): Add regno parameter. Get regset using
2592 ppc_linux_vsxregset. Use regset to supply registers.
2593 (store_vsx_registers): Add regno parameter. Get regset using
2594 ppc_linux_vsxregset. Use regset to collect registers.
2595 (fetch_register): Call fetch_vsx_registers instead of
2596 fetch_vsx_register.
2597 (store_register): Call store_vsx_registers instead of
2598 store_vsx_register.
2599 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2600 new regno parameter.
2601 (store_ppc_registers): Call store_vsx_registers with -1 for the
2602 new regno parameter.
2603 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2604 (ppc_collect_vsxregset): Remove.
2605
2606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2607
2608 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2609 offset fields.
2610 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2611 for vector register offset fields.
2612 (ppc64_fbsd_reg_offsets): Likewise.
2613 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2614 to vector register offset fields.
2615 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2616 to vector register offset fields.
2617 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2618 vector register offset fields.
2619 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2620 initializers for vector register offset fields.
2621 (rs6000_aix64_reg_offsets): Likewise.
2622 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2623 (ppc_supply_vrregset): Remove.
2624 (ppc_collect_vrregset): Remove.
2625 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2626 (ppc_linux_vrregset) : New function.
2627 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2628 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2629 (ppc32_linux_vrregset): Remove.
2630 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2631 and use result instead of ppc32_linux_vrregset.
2632 (ppc32_linux_reg_offsets): Remove initializers for vector register
2633 offset fields.
2634 (ppc64_linux_reg_offsets): Likewise.
2635 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2636 * ppc-linux-nat.c: Include regset.h.
2637 (gdb_vrregset_t): Adjust comment to account for little-endian
2638 mode.
2639 (supply_vrregset, fill_vrregset): Remove.
2640 (fetch_altivec_register, store_altivec_register): Remove.
2641 (fetch_altivec_registers): Add regno parameter. Get regset using
2642 ppc_linux_vrregset. Use regset to supply registers.
2643 (store_altivec_registers): Add regno parameter. Get regset using
2644 ppc_linux_vrregset. Use regset to collect registers.
2645 (fetch_register): Call fetch_altivec_registers instead of
2646 fetch_altivec_register.
2647 (store_register): Call store_altivec_registers instead of
2648 store_altivec_register.
2649 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2650 the new regno parameter.
2651 (store_ppc_registers): Call store_altivec_registers with -1 for
2652 the new regno parameter.
2653
2654 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2655
2656 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2657 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2658 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2659 (gdb_vrregset_t): Change array type size to
2660 PPC_LINUX_SIZEOF_VRREGSET.
2661 (gdb_vsxregset_t): Change array type size to
2662 PPC_LINUX_SIZEOF_VSXREGSET.
2663 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2664 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2665 PPC_LINUX_SIZEOF_VSXREGSET.
2666
2667 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2668
2669 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2670 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2671 nat/ppc-linux.c.
2672 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2673 ppc_linux_target_wordsize with tid.
2674 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2675 wordsize with tid.
2676 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2677 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2678 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2679 tid parameter. Remove static specifier.
2680 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2681 (ppc_linux_target_wordsize): New declaration.
2682
2683 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2684
2685 * arch/ppc-linux-common.c: New file.
2686 * arch/ppc-linux-common.h: New file.
2687 * arch/ppc-linux-tdesc.h: New file.
2688 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2689 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2690 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2691 arch/ppc-linux-tdesc.h.
2692 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2693 arch/ppc-linux-tdesc.h.
2694 (ppc_linux_nat_target::read_description): Remove target
2695 description matching code. Fill a ppc_linux_features struct and
2696 call ppc_linux_match_description with it. Move comment about ISA
2697 2.05 to ppc-linux-common.c.
2698 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2699 arch/ppc-linux-tdesc.h.
2700 (ppc_linux_core_read_description): Remove target description
2701 matching code. Fill a ppc_linux_features struct and call
2702 ppc_linux_match_description with it.
2703 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2704 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2705 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2706 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2707 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2708 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2709 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2710 (tdesc_powerpc_e500l): Remove.
2711
2712 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2713
2714 * ada-lang.c (catch_assert_command): Pass empty string instead
2715 of NULL for excep_string argument.
2716
2717 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2718
2719 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2720 the width of the requested register exceeds the width of the
2721 `ptrace' data type.
2722
2723 2018-05-21 Tom Tromey <tom@tromey.com>
2724
2725 * printcmd.c (output_command): Remove.
2726 (output_command_const): Rename to output_command.
2727 * valprint.h (output_command): Rename from output_command_const.
2728 * tracepoint.c (trace_dump_actions): Call output_command.
2729
2730 2018-05-21 Tom Tromey <tom@tromey.com>
2731
2732 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2733 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2734 * ada-lang.h (create_ada_exception_catchpoint): Update.
2735 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2736 std::string.
2737 (create_excep_cond_exprs, ~ada_catchpoint)
2738 (should_stop_exception, print_one_exception)
2739 (print_mention_exception, print_recreate_exception): Update.
2740 (ada_get_next_arg): Remove.
2741 (catch_ada_exception_command_split): Use std::string. Change type
2742 of "excep_string", "cond_string".
2743 (catch_ada_exception_command): Update.
2744 (create_ada_exception_catchpoint): Change type of excep_string.
2745 (ada_exception_sal): Remove excep_string parameter.
2746 (~ada_catchpoint): Remove.
2747
2748 2018-05-21 Tom Tromey <tom@tromey.com>
2749
2750 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2751 cleanup.
2752
2753 2018-05-21 Tom Tromey <tom@tromey.com>
2754
2755 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2756 Return unique_xmalloc_ptr.
2757 (print_it_exception): Update.
2758
2759 2018-05-21 Tom Tromey <tom@tromey.com>
2760
2761 * tracepoint.c (trace_dump_actions): Use std::string.
2762
2763 2018-05-21 Tom Tromey <tom@tromey.com>
2764
2765 * symfile.c (reread_symbols): Use std::string for original_name.
2766
2767 2018-05-21 Tom Tromey <tom@tromey.com>
2768
2769 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2770 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2771 constructor.
2772
2773 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2774
2775 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2776 instance to...
2777 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2778 * objfiles.c (get_objfile_bfd_data): Allocate
2779 objfile_per_bfd_storage with obstack_new when allocating on
2780 obstack.
2781
2782 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2783
2784 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2785 OBSTACK_ZALLOC.
2786 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2787 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2788 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2789 (add_pending): Likewise.
2790 (parse_symbol): Likewise.
2791 (parse_partial_symbols): Likewise.
2792 (psymtab_to_symtab_1): Likewise.
2793 (new_psymtab): Likewise.
2794 (elfmdebug_build_psymtabs): Likewise.
2795 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2796 * objfiles.c (get_objfile_bfd_data): Likewise.
2797 (objfile_register_static_link): Likewise.
2798 * psymtab.c (allocate_psymtab): Likewise.
2799 * stabsread.c (read_member_functions): Likewise.
2800 * xcoffread.c (xcoff_end_psymtab): Likewise.
2801
2802 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2803
2804 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2805 compiler supports std::is_trivially_constructible.
2806 * common/poison.h: Include obstack.h.
2807 (IsMallocable): Define to is_trivially_constructible if the
2808 compiler supports it, define to true_type otherwise.
2809 (xobnew): New.
2810 (XOBNEW): Redefine.
2811 (xobnewvec): New.
2812 (XOBNEWVEC): Redefine.
2813 * gdb_obstack.h (obstack_zalloc): New.
2814 (OBSTACK_ZALLOC): Redefine.
2815 (obstack_calloc): New.
2816 (OBSTACK_CALLOC): Redefine.
2817 (obstack_new): New.
2818 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2819 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2820 gdbarch.c.
2821 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2822 obstack_calloc/obstack_zalloc.
2823 (gdbarch_obstack_zalloc): Remove.
2824 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2825
2826 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2827
2828 * stack.c (backtrace_command_1): Remove useless variable int i.
2829
2830 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2831
2832 * stack.c (print_frame_info): Fix comment.
2833
2834 2018-05-18 Tom Tromey <tom@tromey.com>
2835
2836 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2837 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2838 (~dwarf2_per_objfile): Update
2839 (dwarf2_get_dwz_file): Use new.
2840 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2841 unique_ptr.
2842
2843 2018-05-18 Tom Tromey <tom@tromey.com>
2844
2845 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2846 unique_ptr.
2847 * dwarf2read.c (struct dwp_file): Add constructor and
2848 initializers.
2849 (open_and_init_dwp_file): Return a unique_ptr.
2850 (dwarf2_per_objfile, create_dwp_hash_table)
2851 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2852 (lookup_dwo_unit_in_dwp): Update.
2853 (open_and_init_dwp_file, get_dwp_file): Update.
2854
2855 2018-05-18 Tom Tromey <tom@tromey.com>
2856
2857 * dwarf2read.c (dwarf2_per_objfile): Update.
2858 (struct mapped_index): Add initializers.
2859 (dwarf2_read_index): Use new.
2860 (dw2_symtab_iter_init): Update.
2861 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2862 unique_ptr.
2863
2864 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2865
2866 * dwarf2read.c (mapped_index) <total_size>: Remove.
2867
2868 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2869
2870 * unittests/format_pieces-selftests.c (test_format_specifier):
2871 Add ARI comments.
2872
2873 2018-05-18 Tom Tromey <tom@tromey.com>
2874
2875 * c-typeprint.c (maybe_print_hole): New function.
2876 (c_print_type_struct_field_offset): Update.
2877 (c_type_print_base_struct_union): Call maybe_print_hole.
2878
2879 2018-05-17 Keith Seitz <keiths@redhat.com>
2880
2881 * breakpoint.c (build_bpstat_chain): New function, moved from
2882 bpstat_stop_status.
2883 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2884 If no stop chain is passed, call build_bpstat_chain to build it.
2885 * breakpoint.h (build_bpstat_chain): Declare.
2886 (bpstat_stop_status): Move documentation here from breakpoint.c.
2887 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2888 build the stop chain and pass it to skip_inline_frames.
2889 Pass this stop chain to bpstat_stop_status.
2890 * inline-frame.c: Include breakpoint.h.
2891 (stopped_by_user_bp_inline_frame): New function.
2892 (skip_inline_frames): Add parameter `stop_chain'.
2893 Move documention to inline-frame.h.
2894 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2895 whether the frame should be elided.
2896 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2897 Add moved documentation and update for new parameter.
2898
2899 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 PR cli/14975
2902 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2903 unittests/format_pieces-selftests.c.
2904 * common/format.h (format_piece) <operator==>: New.
2905 (format_pieces) <operator[]>: Remove.
2906 * common/format.c (format_pieces::format_pieces): Handle \e.
2907 * unittests/format_pieces-selftests.c: New.
2908
2909 2018-05-17 Tom Tromey <tom@tromey.com>
2910
2911 PR symtab/23010:
2912 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2913 (dw2_instantiate_symtab): Add skip_partial parameter.
2914 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2915 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2916 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2917 (dw2_expand_symtabs_matching_one)
2918 (dw2_find_pc_sect_compunit_symtab)
2919 (dw2_debug_names_lookup_symbol)
2920 (dw2_debug_names_expand_symtabs_for_function): Update.
2921 (init_cutu_and_read_dies): Add skip_partial parameter.
2922 (process_psymtab_comp_unit, build_type_psymtabs_1)
2923 (process_skeletonless_type_unit, load_partial_comp_unit)
2924 (psymtab_to_symtab_1): Update.
2925 (load_full_comp_unit): Add skip_partial parameter.
2926 (process_imported_unit_die, dwarf2_read_addr_index)
2927 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2928 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2929 (read_signatured_type): Update.
2930
2931 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2932
2933 * value.c (release_value): Remove unused variable.
2934 (record_latest_value): Likewise.
2935 (access_value_history): Likewise.
2936 (preserve_values): Likewise.
2937
2938 2018-05-17 Tom Tromey <tom@tromey.com>
2939
2940 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2941 Initialize.
2942
2943 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2944
2945 PR gdb/22286
2946 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2947 Also handle registers whose width is not a multiple of
2948 PTRACE_TYPE_RET.
2949 (linux_nat_trad_target::store_register): Likewise.
2950
2951 2018-05-16 Tom Tromey <tom@tromey.com>
2952
2953 * gdbcore.h (core_bfd): Redefine.
2954 * corelow.c (core_target::close): Update.
2955 (core_target_open): Update.
2956 * progspace.h (struct program_space) <cbfd>: Now a
2957 gdb_bfd_ref_ptr.
2958
2959 2018-05-16 Tom Tromey <tom@tromey.com>
2960
2961 PR cli/19551:
2962 * symfile-add-flags.h (enum symfile_add_flags)
2963 <SYMFILE_NOT_FILENAME>: New constant.
2964 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2965 objfile name from BFD.
2966 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2967 * minidebug.c (find_separate_debug_file_in_section): Put
2968 ".gnu_debugdata" into BFD's file name.
2969
2970 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2973 Remove.
2974
2975 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2976
2977 PR binutils/21446
2978 * aarch64-tdep.c (aarch64_analyze_prologue,
2979 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2980 Indicate not interested in errors.
2981
2982 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2983
2984 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2985 Supply the MIPS_ZERO_REGNUM register.
2986
2987 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2988
2989 * mips-tdep.c (mask_address_var): Make variable static.
2990
2991 2018-05-14 Tom Tromey <tom@tromey.com>
2992
2993 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2994
2995 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2996
2997 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2998 FXSAVE_ADDR for the mxcsr register.
2999
3000 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3001
3002 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3003
3004 2018-05-11 Pedro Alves <palves@redhat.com>
3005
3006 * corelow.c (core_target) <core_target>: No longer inline.
3007 Initialize m_core_gdbarch, m_core_vec and build the section table
3008 here.
3009 <~core_target>: New.
3010 <core_gdbarch, get_core_register_section>: New methods.
3011 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3012 factored out from ...
3013 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3014 (core_ops): Delete.
3015 (sniff_core_bfd): Add gdbarch parameter.
3016 (core_close): Delete, merged into ...
3017 (core_target::close): ... here. Delete self.
3018 (core_close_cleanup): Delete.
3019 (core_target_open): Allocate a core_target on the heap. Use a
3020 unique_ptr instead of a cleanup. Bits moved into the core_target
3021 ctor. Adjust to use core_target methods instead of globals.
3022 (get_core_register_section): Rename to ...
3023 (core_target::get_core_register_section): ... this and adjust.
3024 (struct get_core_registers_cb_data): New.
3025 (get_core_registers_cb): Use it. Use bool.
3026 (core_target::fetch_registers, core_target::files_info)
3027 (core_target::xfer_partial, core_target::read_description)
3028 (core_target::pid_to, core_target::thread_name): Adjust to
3029 reference class fields instead of globals.
3030 * target.h (struct target_ops_deleter, target_ops_up): New.
3031
3032 2018-05-11 Pedro Alves <palves@redhat.com>
3033
3034 * corefile.c (core_file_command): Move to corelow.c.
3035 * corelow.c (the_core_target): Delete.
3036 (core_file_command): Moved from corefile.c. Check exec_bfd
3037 instead of the_core_target. Use target_detach instead of calling
3038 into the_core_target directly.
3039 (maybe_say_no_core_file_now): New.
3040 (core_target::detach): Use it.
3041 (_initialize_corelow): Remove references to the_core_target.
3042 * gdbcore.h (the_core_target): Delete.
3043
3044 2018-05-11 Tom Tromey <tromey@redhat.com>
3045 Pedro Alves <palves@redhat.com>
3046
3047 * corefile.c (core_bfd): Remove.
3048 * gdbcore.h (core_bfd): Now a macro.
3049 * progspace.h (struct program_space) <cbfd>: New field.
3050
3051 2018-05-11 Tom Tromey <tom@tromey.com>
3052
3053 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3054 gdb::def_vector.
3055
3056 2018-05-10 Tom Tromey <tom@tromey.com>
3057
3058 * configure: Rebuild.
3059 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3060
3061 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3062
3063 PR server/23158:
3064 * regformats/regdat.sh: Adjust script, following the addition
3065 of the new expedite_regs parameter to init_target_desc.
3066
3067 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3068
3069 PR gdb/23127
3070 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3071 set_gdbarch_significant_addr_bit.
3072 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3073 set_gdbarch_significant_addr_bit.
3074 * utils.c (address_significant): Update to sign extend addr.
3075
3076 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3077
3078 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3079 (xtensa_linux_init_abi): Limit tdep->num_regs by
3080 tdep->num_nopriv_regs.
3081 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3082 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3083 not initialized.
3084
3085 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3086
3087 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3088
3089 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3090
3091 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3092 (I387_MXCSR_INIT_VAL): New constant.
3093 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3094 buffer if it was supplied by the inferior.
3095 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3096 (i387_xsave_get_clear_bv): New function.
3097 (i387_supply_xsave): Only read x87 control registers from the
3098 xsave buffer if the feature is enabled, and the state will have
3099 been written, otherwise, provide a suitable default.
3100 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3101 including x87 control registers. Update control registers if they
3102 have changed from the default value, and mark features as enabled
3103 as required.
3104 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3105
3106 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3107
3108 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3109
3110 2018-05-07 Tom Tromey <tom@tromey.com>
3111
3112 * configure: Rebuild.
3113 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3114
3115 2018-05-07 Tom Tromey <tom@tromey.com>
3116
3117 PR tdep/20362:
3118 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3119 bit. Use correct value for VDIV.
3120
3121 2018-05-04 Tom Tromey <tom@tromey.com>
3122
3123 * configure: Rebuild.
3124 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3125
3126 2018-05-04 Tom Tromey <tom@tromey.com>
3127
3128 * linux-record.c (record_linux_system_call) <case
3129 RECORD_SYS_RECVFROM>: Add "break".
3130
3131 2018-05-04 Tom Tromey <tom@tromey.com>
3132
3133 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3134 Add missing "break".
3135 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3136 Add missing "break".
3137
3138 2018-05-04 Tom Tromey <tom@tromey.com>
3139
3140 * rs6000-tdep.c (ppc_process_record_op4)
3141 (ppc_process_record_op63): Add fall-through comment.
3142
3143 2018-05-04 Tom Tromey <tom@tromey.com>
3144
3145 * i386-tdep.c (i386_process_record): Add fall-through comment.
3146
3147 2018-05-04 Tom Tromey <tom@tromey.com>
3148
3149 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3150 comment.
3151
3152 2018-05-04 Tom Tromey <tom@tromey.com>
3153
3154 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3155 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3156 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3157 comment.
3158 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3159 comment.
3160 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3161 comment.
3162
3163 2018-05-04 Tom Tromey <tom@tromey.com>
3164
3165 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3166
3167 2018-05-04 Tom Tromey <tom@tromey.com>
3168
3169 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3170 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3171 * symfile.c (section_is_mapped): Fix fall-through comment.
3172 * stabsread.c (define_symbol, read_member_functions): Fix
3173 fall-through comment.
3174 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3175 comment.
3176 * remote.c (remote_wait_as): Fix fall-through comment.
3177 * p-exp.y (yylex): Fix fall-through comment.
3178 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3179 comment.
3180 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3181 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3182 * jv-exp.y (yylex): Fix fall-through comment.
3183 * go-exp.y (lex_one_token): Fix fall-through comment.
3184 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3185 fall-through comment.
3186 * f-exp.y (yylex): Fix fall-through comment.
3187 * dwarf2read.c (process_die): Fix fall-through comments.
3188 * dbxread.c (process_one_symbol): Fix fall-through comment.
3189 * d-exp.y (lex_one_token): Fix fall-through comment.
3190 * cp-name-parser.y (yylex): Fix fall-through comment.
3191 * coffread.c (coff_symtab_read): Fix fall-through comment.
3192 * c-exp.y (lex_one_token): Fix fall-through comment.
3193 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3194 comment.
3195 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3196 comment.
3197
3198 2018-05-04 Tom Tromey <tom@tromey.com>
3199
3200 PR python/22730:
3201 * NEWS: Mention gdb.execute change.
3202 * gdbcmd.h (execute_control_command): Don't declare.
3203 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3204 execute_control_commands, execute_control_commands_to_string.
3205 * cli/cli-script.h (execute_control_commands)
3206 (execute_control_commands_to_string): Declare.
3207 (execute_control_command): Add from_tty parameter.
3208 * cli/cli-script.c (execute_control_commands)
3209 (execute_control_commands_to_string): New functions.
3210 (execute_user_command): Use execute_control_commands.
3211 (execute_control_command_1): Add "from_tty" parameter. Update.
3212 (execute_control_command): Likewise.
3213
3214 2018-05-04 Tom Tromey <tom@tromey.com>
3215
3216 PR python/22731:
3217 * NEWS: Mention that breakpoint commands are writable.
3218 * python/py-breakpoint.c (bppy_set_commands): New function.
3219 (breakpoint_object_getset) <"commands">: Use it.
3220
3221 2018-05-04 Tom Tromey <tom@tromey.com>
3222
3223 * tracepoint.c (actions_command): Update.
3224 * mi/mi-cmd-break.c (mi_command_line_array)
3225 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3226 (mi_read_next_line): Remove.
3227 (mi_cmd_break_commands): Update.
3228 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3229 function_view.
3230 * cli/cli-script.c (get_command_line): Update.
3231 (process_next_line): Use function_view. Constify.
3232 (recurse_read_control_structure, read_command_lines)
3233 (read_command_lines_1): Change argument types to function_view.
3234 (do_define_command, document_command): Update.
3235 * breakpoint.h (check_tracepoint_command): Don't declare.
3236 * breakpoint.c (check_tracepoint_command): Remove.
3237 (commands_command_1, create_tracepoint_from_upload): Update.
3238
3239 2018-05-04 Tom Tromey <tom@tromey.com>
3240
3241 PR gdb/11750:
3242 * cli/cli-script.h (enum command_control_type) <define_control>:
3243 New constant.
3244 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3245 (build_command_line, execute_control_command_1)
3246 (process_next_line): Likewise.
3247 (do_define_command): New function, extracted from define_command.
3248 (define_command): Use it.
3249
3250 2018-05-04 Tom Tromey <tom@tromey.com>
3251
3252 * tracepoint.c (actions_command): Update.
3253 * cli/cli-script.h (read_command_lines): Update.
3254 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3255 (MAX_TMPBUF): Remove define.
3256 (define_command): Use string_printf.
3257 (document_command): Likewise.
3258 * breakpoint.c (commands_command_1): Update.
3259
3260 2018-05-04 Tom Tromey <tom@tromey.com>
3261
3262 * top.c (execute_command): Update.
3263 * cli/cli-script.h (print_command_lines): Now varargs.
3264 * cli/cli-script.c (print_command_lines): Now varargs.
3265 (execute_control_command_1) <case while_control, case if_control>:
3266 Update.
3267
3268 2018-05-04 Tom Tromey <tom@tromey.com>
3269
3270 * tracepoint.c (all_tracepoint_actions): Rename from
3271 all_tracepoint_actions_and_cleanup. Change return type.
3272 (actions_command, encode_actions_1, encode_actions)
3273 (trace_dump_actions, tdump_command): Update.
3274 * remote.c (remote_download_command_source): Update.
3275 * python/python.c (gdbpy_eval_from_control_command)
3276 (python_command, python_interactive_command): Update.
3277 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3278 * guile/guile.c (guile_command)
3279 (gdbscm_eval_from_control_command, guile_command): Update.
3280 * compile/compile.c (compile_code_command)
3281 (compile_print_command, compile_to_object): Update.
3282 * cli/cli-script.h (struct command_lines_deleter): New.
3283 (counted_command_line): New typedef.
3284 (struct command_line): Add constructor, destructor.
3285 <body_list>: Remove.
3286 <body_list_0, body_list_1>: New members.
3287 (command_line_up): Remove typedef.
3288 (read_command_lines, read_command_lines_1, get_command_line):
3289 Update.
3290 (copy_command_lines): Don't declare.
3291 * cli/cli-script.c (build_command_line): Use "new".
3292 (get_command_line): Return counted_command_line.
3293 (print_command_lines, execute_user_command)
3294 (execute_control_command_1, while_command, if_command): Update.
3295 (realloc_body_list): Remove.
3296 (process_next_line, recurse_read_control_structure): Update.
3297 (read_command_lines, read_command_lines_1): Return counted_command_line.
3298 (free_command_lines): Use "delete".
3299 (copy_command_lines): Remove.
3300 (define_command, document_command, show_user_1): Update.
3301 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3302 a counted_command_line.
3303 * breakpoint.h (counted_command_line): Remove typedef.
3304 (breakpoint_set_commands): Update.
3305 * breakpoint.c (check_no_tracepoint_commands)
3306 (validate_commands_for_breakpoint): Update.
3307 (breakpoint_set_commands): Change commands to be a
3308 counted_command_line.
3309 (commands_command_1, update_dprintf_command_list)
3310 (create_tracepoint_from_upload): Update.
3311
3312 2018-05-04 Tom Tromey <tom@tromey.com>
3313
3314 * cli/cli-decode.h (cmd_list_element): New constructor.
3315 (~cmd_list_element): New destructor.
3316 (struct cmd_list_element): Add initializers.
3317 * cli/cli-decode.c (do_add_cmd): Use "new".
3318 (delete_cmd): Use "delete".
3319
3320 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3321 Pedro Alves <palves@redhat.com>
3322
3323 PR breakpoints/19806 and support for PR external/20207.
3324 * NEWS: Mention Aarch64 watchpoint improvements.
3325 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3326 watchpoints and PR external/20207 watchpoints.
3327 * nat/aarch64-linux-hw-point.c
3328 (kernel_supports_any_contiguous_range): New.
3329 (aarch64_watchpoint_offset): New.
3330 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3331 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3332 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3333 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3334 next_addr_orig_p. Support PR external/20207 watchpoints.
3335 (aarch64_downgrade_regs): New.
3336 (aarch64_dr_state_insert_one_point): New parameters offset and
3337 addr_orig.
3338 (aarch64_dr_state_remove_one_point): Likewise.
3339 (aarch64_handle_breakpoint): Update caller.
3340 (aarch64_handle_aligned_watchpoint): Likewise.
3341 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3342 aligned_offset.
3343 (aarch64_linux_set_debug_regs): Remove const from state. Call
3344 aarch64_downgrade_regs.
3345 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3346 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3347 (DR_CONTROL_MASK): ... this.
3348 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3349 (unsigned int aarch64_watchpoint_offset): New prototype.
3350 (aarch64_linux_set_debug_regs): Remove const from state.
3351 * utils.c (align_up, align_down): Move to ...
3352 * common/common-utils.c (align_up, align_down): ... here.
3353 * utils.h (align_up, align_down): Move to ...
3354 * common/common-utils.h (align_up, align_down): ... here.
3355
3356 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3357
3358 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3359 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3360 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3361 Re-implement to match the ABI as summarized in GCC's
3362 gcc/config/sparc/sparc.c. All callers updated.
3363 (sparc32_store_arguments): Remove assertion.
3364
3365 2018-05-04 Tom Tromey <tom@tromey.com>
3366
3367 * printcmd.c: Don't include tui.h.
3368 (decode_format): Use skip_spaces.
3369
3370 2018-05-04 Tom Tromey <tom@tromey.com>
3371
3372 PR gdb/22619:
3373 * printcmd.c (last_count): New global.
3374 (x_command): Use saved count when repeating.
3375
3376 2018-05-04 Tom Tromey <tom@tromey.com>
3377
3378 * nto-procfs.c (do_closedir_cleanup): Remove.
3379 (procfs_pidlist): Use gdb_dir_up.
3380 * procfs.c (do_closedir_cleanup): Remove.
3381 (proc_update_threads): Use gdb_dir_up.
3382 * common/filestuff.h (struct gdb_dir_deleter): New.
3383 (gdb_dir_up): New typedef.
3384
3385 2018-05-04 Tom Tromey <tom@tromey.com>
3386
3387 * ada-lang.c (print_mention_exception): Use std::string.
3388
3389 2018-05-04 Tom Tromey <tom@tromey.com>
3390
3391 * ada-lang.c (create_excep_cond_exprs): Update.
3392 (ada_exception_catchpoint_cond_string): Use std::string.
3393
3394 2018-05-04 Tom Tromey <tom@tromey.com>
3395
3396 * ada-lang.c (xget_renaming_scope): Return std::string.
3397 (old_renaming_is_invisible): Update.
3398
3399 2018-05-04 Tom Tromey <tom@tromey.com>
3400
3401 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3402 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3403
3404 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3405
3406 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3407
3408 2018-05-04 Tom Tromey <tom@tromey.com>
3409
3410 * remote.c (remote_query_supported_append): Change type.
3411 (remote_check_symbols): Update.
3412
3413 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3414
3415 PR gdb/11420
3416 * configure.ac: Prepend libpython.
3417 * python/python-config.py: Likewise.
3418 * configure: Regenerate.
3419
3420 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3421
3422 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3423
3424 2018-05-03 Pedro Alves <palves@redhat.com>
3425
3426 * s390-linux-nat.c
3427 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3428 override. Write 'true' instead of '1'.
3429 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3430 declaration.
3431
3432 2018-05-02 Pedro Alves <palves@redhat.com>
3433
3434 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3435 add_inf_child_target.
3436 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3437 add_inf_child_target.
3438 * aix-thread.c (aix_thread_target_info): New.
3439 (aix_thread_target) <shortname, longname, doc>: Delete.
3440 <info>: New.
3441 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3442 add_inf_child_target.
3443 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3444 add_inf_child_target.
3445 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3446 add_inf_child_target.
3447 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3448 add_inf_child_target.
3449 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3450 add_inf_child_target.
3451 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3452 add_inf_child_target.
3453 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3454 add_inf_child_target.
3455 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3456 add_inf_child_target.
3457 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3458 add_inf_child_target.
3459 * bfd-target.c (target_bfd_target_info): New.
3460 (target_bfd) <shortname, longname, doc>: Delete.
3461 <info>: New.
3462 * bsd-kvm.c (bsd_kvm_target_info): New.
3463 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3464 <info>: New.
3465 (bsd_kvm_target::open): Rename to ...
3466 (bsd_kvm_target_open): ... this. Adjust.
3467 * bsd-uthread.c (bsd_uthread_target_info): New.
3468 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3469 <info>: New.
3470 * corefile.c (core_file_command): Adjust.
3471 * corelow.c (core_target_info): New.
3472 (core_target) <shortname, longname, doc>: Delete.
3473 <info>: New.
3474 (core_target::open): Rename to ...
3475 (core_target_open): ... this. Adjust.
3476 * ctf.c (ctf_target_info): New.
3477 (ctf_target) <shortname, longname, doc>: Delete.
3478 <info>: New.
3479 (ctf_target::open): Rename to ...
3480 (ctf_target_open): ... this.
3481 (_initialize_ctf): Adjust.
3482 * exec.c (exec_target_info): New.
3483 (exec_target) <shortname, longname, doc>: Delete.
3484 <info>: New.
3485 (exec_target::open): Rename to ...
3486 (exec_target_open): ... this.
3487 * gdbcore.h (core_target_open): Declare.
3488 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3489 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3490 add_inf_child_target.
3491 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3492 add_inf_child_target.
3493 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3494 add_inf_child_target.
3495 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3496 add_inf_child_target.
3497 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3498 add_inf_child_target.
3499 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3500 add_inf_child_target.
3501 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3502 add_inf_child_target.
3503 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3504 add_inf_child_target.
3505 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3506 add_inf_child_target.
3507 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3508 add_inf_child_target.
3509 * inf-child.c (inf_child_target_info): New.
3510 (inf_child_target::info): New.
3511 (inf_child_open_target): Remove 'target' parameter. Use
3512 get_native_target instead.
3513 (inf_child_target::open): Delete.
3514 (add_inf_child_target): New.
3515 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3516 Delete.
3517 <info>: New.
3518 (add_inf_child_target): Declare.
3519 (inf_child_open_target): Declare.
3520 * linux-thread-db.c (thread_db_target_info): New.
3521 (thread_db_target) <shortname, longname, doc>: Delete.
3522 <info>: New.
3523 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3524 add_inf_child_target.
3525 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3526 add_inf_child_target.
3527 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3528 add_inf_child_target.
3529 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3530 add_inf_child_target.
3531 * make-target-delegates (print_class): Adjust.
3532 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3533 add_inf_child_target.
3534 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3535 add_inf_child_target.
3536 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3537 add_inf_child_target.
3538 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3539 add_inf_child_target.
3540 * nto-procfs.c (nto_native_target_info): New.
3541 (nto_procfs_target_native) <shortname, longname, doc>:
3542 Delete.
3543 <info>: New.
3544 (nto_procfs_target_info): New.
3545 (nto_procfs_target_procfs) <shortname, longname, doc>:
3546 Delete.
3547 <info>: New.
3548 (init_procfs_targets): Adjust.
3549 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3550 add_inf_child_target.
3551 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3552 add_inf_child_target.
3553 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3554 add_inf_child_target.
3555 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3556 add_inf_child_target.
3557 * ravenscar-thread.c (ravenscar_target_info): New.
3558 (ravenscar_thread_target) <shortname, longname, doc>:
3559 Delete.
3560 <info>: New.
3561 * record-btrace.c (record_btrace_target_info):
3562 (record_btrace_target) <shortname, longname, doc>: Delete.
3563 <info>: New.
3564 (record_btrace_target::open): Rename to ...
3565 (record_btrace_target_open): ... this. Adjust.
3566 * record-full.c (record_longname, record_doc): New.
3567 (record_full_base_target) <shortname, longname, doc>: Delete.
3568 <info>: New.
3569 (record_full_target_info): New.
3570 (record_full_target): <shortname>: Delete.
3571 <info>: New.
3572 (record_full_core_open_1, record_full_open_1): Update comments.
3573 (record_full_base_target::open): Rename to ...
3574 (record_full_open): ... this.
3575 (cmd_record_full_restore): Update.
3576 (_initialize_record_full): Update.
3577 * remote-sim.c (remote_sim_target_info): New.
3578 (gdbsim_target) <shortname, longname, doc>: Delete.
3579 <info>: New.
3580 (gdbsim_target::open): Rename to ...
3581 (gdbsim_target_open): ... this.
3582 (_initialize_remote_sim): Adjust.
3583 * remote.c (remote_doc): New.
3584 (remote_target_info): New.
3585 (remote_target) <shortname, longname, doc>: Delete.
3586 <info>: New.
3587 (extended_remote_target_info): New.
3588 (extended_remote_target) <shortname, longname, doc>: Delete.
3589 <info>: New.
3590 (remote_target::open_1): Make static. Adjust.
3591 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3592 * s390-linux-nat.c (_initialize_s390_nat): Use
3593 add_inf_child_target.
3594 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3595 add_inf_child_target.
3596 * sol-thread.c (thread_db_target_info): New.
3597 (sol_thread_target) <shortname, longname, doc>: Delete.
3598 <info>: New.
3599 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3600 add_inf_child_target.
3601 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3602 add_inf_child_target.
3603 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3604 add_inf_child_target.
3605 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3606 add_inf_child_target.
3607 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3608 add_inf_child_target.
3609 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3610 add_inf_child_target.
3611 * spu-linux-nat.c (_initialize_spu_nat): Use
3612 add_inf_child_target.
3613 * spu-multiarch.c (spu_multiarch_target_info): New.
3614 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3615 <info>: New.
3616 * target-delegates.c: Regenerate.
3617 * target.c: Include <unordered_map>.
3618 (target_ops_p): Delete.
3619 (DEF_VEC_P(target_ops_p)): Delete.
3620 (target_factories): New.
3621 (test_target_info): New.
3622 (test_target_ops::info): New.
3623 (open_target): Adjust to use target_factories.
3624 (add_target_with_completer): Rename to ...
3625 (add_target): ... this. Change prototype. Register target_info
3626 and open callback in target_factories. Register target_info in
3627 command context instead of target_ops.
3628 (add_target): Delete old implementation.
3629 (add_deprecated_target_alias): Change prototype. Adjust.
3630 (the_native_target): New.
3631 (set_native_target, get_native_target): New.
3632 (find_default_run_target): Use the_native_target.
3633 (find_attach_target, find_run_target): Simplify.
3634 (target_ops::open): Delete.
3635 (dummy_target_info): New.
3636 (dummy_target::shortname, dummy_target::longname)
3637 (dummy_target::doc): Delete.
3638 (dummy_target::info): New.
3639 (debug_target::shortname, debug_target::longname)
3640 (debug_target::doc): Delete.
3641 (debug_target::info): New.
3642 * target.h (struct target_info): New.
3643 (target_ops::~target_ops): Add comment.
3644 (target_ops::info): New.
3645 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3646 longer virtual. Implement in terms of target_info.
3647 (set_native_target, get_native_target): Declare.
3648 (target_open_ftype): New.
3649 (add_target, add_target_with_completer)
3650 (add_deprecated_target_alias): Change prototype.
3651 (test_target) <shortname, longname, doc>: Delete.
3652 <info>: New.
3653 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3654 add_inf_child_target.
3655 * tracefile-tfile.c (tfile_target_info): New.
3656 (tfile_target) <shortname, longname, doc>: Delete.
3657 <info>: New.
3658 (tfile_target::open): Rename to ...
3659 (tfile_target_open): ... this.
3660 (_initialize_tracefile_tfile): Adjust.
3661 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3662 add_inf_child_target.
3663 * windows-nat.c (_initialize_windows_nat): Use
3664 add_inf_child_target.
3665 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3666 add_inf_child_target.
3667
3668 2018-05-02 Pedro Alves <palves@redhat.com>
3669
3670 * linux-nat.h (linux_nat_target) <low_new_thread,
3671 low_delete_thread, low_new_fork, low_forget_process,
3672 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3673 New virtual methods.
3674 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3675 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3676 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3677 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3678 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3679 Delete.
3680 * linux-fork.c (delete_fork): Adjust to call low method.
3681 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3682 (linux_nat_new_fork, linux_nat_forget_process_hook)
3683 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3684 (linux_nat_status_is_event):
3685 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3686 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3687 to call low method.
3688 (sigtrap_is_event): Rename to ...
3689 (linux_nat_target::low_status_is_event): ... this.
3690 (linux_nat_set_status_is_event): Delete.
3691 (save_stop_reason, linux_nat_wait_1)
3692 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3693 low methods.
3694 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3695 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3696 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3697 (linux_nat_set_prepare_to_resume): Delete.
3698 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3699 low virtual methods.
3700 * amd64-linux-nat.c: Likewise.
3701 * arm-linux-nat.c: Likewise.
3702 * i386-linux-nat.c: Likewise.
3703 * ia64-linux-nat.c: Likewise.
3704 * mips-linux-nat.c: Likewise.
3705 * ppc-linux-nat.c: Likewise.
3706 * s390-linux-nat.c: Likewise.
3707 * sparc64-linux-nat.c: Likewise.
3708 * x86-linux-nat.c: Likewise.
3709 * x86-linux-nat.h: Include "nat/x86-linux.h".
3710 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3711 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3712 Override methods.
3713
3714 2018-05-02 Pedro Alves <palves@redhat.com>
3715
3716 * target.h (target_ops)
3717 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3718 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3719 stopped_by_watchpoint, have_continuable_watchpoint,
3720 stopped_data_address, watchpoint_addr_within_range,
3721 can_accel_watchpoint_condition, can_run, thread_alive,
3722 has_all_memory, has_memory, has_stack, has_registers,
3723 has_execution, can_async_p, is_async_p, supports_non_stop,
3724 always_non_stop_p, can_execute_reverse, supports_multi_process,
3725 supports_enable_disable_tracepoint,
3726 supports_disable_randomization, supports_string_tracing,
3727 supports_evaluation_of_breakpoint_conditions,
3728 can_run_breakpoint_commands, filesystem_is_local,
3729 can_download_tracepoint, get_trace_state_variable_value,
3730 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3731 record_is_replaying, record_will_replay,
3732 augmented_libraries_svr4_read>: Adjust to return bool.
3733 * aarch64-linux-nat.c: All implementations adjusted.
3734 * aix-thread.c: All implementations adjusted.
3735 * arm-linux-nat.c: All implementations adjusted.
3736 * breakpoint.c: All implementations adjusted.
3737 * bsd-kvm.c: All implementations adjusted.
3738 * bsd-uthread.c: All implementations adjusted.
3739 * corelow.c: All implementations adjusted.
3740 * ctf.c: All implementations adjusted.
3741 * darwin-nat.c: All implementations adjusted.
3742 * darwin-nat.h: All implementations adjusted.
3743 * exec.c: All implementations adjusted.
3744 * fbsd-nat.c: All implementations adjusted.
3745 * fbsd-nat.h: All implementations adjusted.
3746 * gnu-nat.c: All implementations adjusted.
3747 * gnu-nat.h: All implementations adjusted.
3748 * go32-nat.c: All implementations adjusted.
3749 * ia64-linux-nat.c: All implementations adjusted.
3750 * inf-child.c: All implementations adjusted.
3751 * inf-child.h: All implementations adjusted.
3752 * inf-ptrace.c: All implementations adjusted.
3753 * inf-ptrace.h: All implementations adjusted.
3754 * linux-nat.c: All implementations adjusted.
3755 * linux-nat.h: All implementations adjusted.
3756 * mips-linux-nat.c: All implementations adjusted.
3757 * nto-procfs.c: All implementations adjusted.
3758 * ppc-linux-nat.c: All implementations adjusted.
3759 * procfs.c: All implementations adjusted.
3760 * ravenscar-thread.c: All implementations adjusted.
3761 * record-btrace.c: All implementations adjusted.
3762 * record-full.c: All implementations adjusted.
3763 * remote-sim.c: All implementations adjusted.
3764 * remote.c: All implementations adjusted.
3765 * s390-linux-nat.c: All implementations adjusted.
3766 * sol-thread.c: All implementations adjusted.
3767 * spu-multiarch.c: All implementations adjusted.
3768 * target-delegates.c: All implementations adjusted.
3769 * target.c: All implementations adjusted.
3770 * target.h: All implementations adjusted.
3771 * tracefile-tfile.c: All implementations adjusted.
3772 * tracefile.c: All implementations adjusted.
3773 * tracefile.h: All implementations adjusted.
3774 * windows-nat.c: All implementations adjusted.
3775 * x86-linux-nat.h: All implementations adjusted.
3776 * x86-nat.h: All implementations adjusted.
3777
3778 2018-05-02 Pedro Alves <palves@redhat.com>
3779
3780 * make-target-delegates (scan_target_h): Don't trim lines here.
3781 Replace sequences of tabs and/or whitespace with a single
3782 whitespace.
3783 (top level, parsing methods): Trim each line before processing it
3784 here.
3785
3786 2018-05-02 Pedro Alves <palves@redhat.com>
3787 John Baldwin <jhb@freebsd.org>
3788
3789 * target.h (enum strata) <debug_stratum>: New.
3790 (struct target_ops) <all delegation methods>: Replace by C++
3791 virtual methods, and drop "to_" prefix. All references updated
3792 throughout.
3793 <to_shortname, to_longname, to_doc, to_data,
3794 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3795 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3796 virtual methods. All references updated throughout.
3797 <can_attach, supports_terminal_ours, can_create_inferior,
3798 get_thread_control_capabilities, attach_no_wait>: New
3799 virtual methods.
3800 <insert_breakpoint, remove_breakpoint>: Now
3801 TARGET_DEFAULT_NORETURN methods.
3802 <info_proc>: Now returns bool.
3803 <to_magic>: Delete.
3804 (OPS_MAGIC): Delete.
3805 (current_target): Delete. All references replaced by references
3806 to ...
3807 (target_stack): ... this. New.
3808 (target_shortname, target_longname): Adjust.
3809 (target_can_run): Now a function declaration.
3810 (default_child_has_all_memory, default_child_has_memory)
3811 (default_child_has_stack, default_child_has_registers)
3812 (default_child_has_execution): Remove target_ops parameter.
3813 (complete_target_initialization): Delete.
3814 (memory_breakpoint_target): New template class.
3815 (test_target_ops): Refactor as a C++ class with virtual methods.
3816 * make-target-delegates (NAME_PART): Tighten.
3817 (POINTER_PART, CP_SYMBOL): New.
3818 (SIMPLE_RETURN_PART): Reimplement.
3819 (VEC_RETURN_PART): Expect less.
3820 (RETURN_PART, VIRTUAL_PART): New.
3821 (METHOD): Adjust to C++ virtual methods.
3822 (scan_target_h): Remove reference to C99.
3823 (dname): Output "target_ops::" prefix.
3824 (write_function_header): Adjust to output a C++ class method.
3825 (write_declaration): New.
3826 (write_delegator): Adjust to output a C++ class method.
3827 (tdname): Output "dummy_target::" prefix.
3828 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3829 method.
3830 (tdefault_names, debug_names): Delete.
3831 (return_types, tdefaults, styles, argtypes_array): New.
3832 (top level): All methods are delegators.
3833 (print_class): New.
3834 (top level): Print dummy_target and debug_target classes.
3835 * target-delegates.c: Regenerate.
3836 * target-debug.h (target_debug_print_enum_info_proc_what)
3837 (target_debug_print_thread_control_capabilities)
3838 (target_debug_print_thread_info_p): New.
3839 * target.c (dummy_target): Delete.
3840 (the_dummy_target, the_debug_target): New.
3841 (target_stack): Now extern.
3842 (set_targetdebug): Push/unpush debug target.
3843 (default_child_has_all_memory, default_child_has_memory)
3844 (default_child_has_stack, default_child_has_registers)
3845 (default_child_has_execution): Remove target_ops parameter.
3846 (complete_target_initialization): Delete.
3847 (add_target_with_completer): No longer call
3848 complete_target_initialization.
3849 (target_supports_terminal_ours): Use regular delegation.
3850 (update_current_target): Delete.
3851 (push_target): No longer check magic number. Don't call
3852 update_current_target.
3853 (unpush_target): Don't call update_current_target.
3854 (target_is_pushed): No longer check magic number.
3855 (target_require_runnable): Skip for all stratums over
3856 process_stratum.
3857 (target_ops::info_proc): New.
3858 (target_info_proc): Use find_target_at and
3859 find_default_run_target.
3860 (target_supports_disable_randomization): Use regular delegation.
3861 (target_get_osdata): Use find_target_at.
3862 (target_ops::open, target_ops::close, target_ops::can_attach)
3863 (target_ops::attach, target_ops::can_create_inferior)
3864 (target_ops::create_inferior, target_ops::can_run)
3865 (target_can_run): New.
3866 (default_fileio_target): Use regular delegation.
3867 (target_ops::fileio_open, target_ops::fileio_pwrite)
3868 (target_ops::fileio_pread, target_ops::fileio_fstat)
3869 (target_ops::fileio_close, target_ops::fileio_unlink)
3870 (target_ops::fileio_readlink): New.
3871 (target_fileio_open_1, target_fileio_unlink)
3872 (target_fileio_readlink): Always call the target method. Handle
3873 FILEIO_ENOSYS.
3874 (return_zero, return_zero_has_execution): Delete.
3875 (init_dummy_target): Delete.
3876 (dummy_target::dummy_target, dummy_target::shortname)
3877 (dummy_target::longname, dummy_target::doc)
3878 (debug_target::debug_target, debug_target::shortname)
3879 (debug_target::longname, debug_target::doc): New.
3880 (target_supports_delete_record): Use regular delegation.
3881 (setup_target_debug): Delete.
3882 (maintenance_print_target_stack): Skip debug_stratum.
3883 (initialize_targets): Instantiate the_dummy_target and
3884 the_debug_target.
3885 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3886 use target_stack.
3887 (target_auxv_search, fprint_target_auxv): Adjust.
3888 (info_auxv_command): Adjust to use target_stack.
3889 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3890 * exceptions.c (print_flush): Handle a NULL target_stack.
3891 * regcache.c (target_ops_no_register): Refactor as class with
3892 virtual methods.
3893
3894 * exec.c (exec_target): New class.
3895 (exec_ops): Now an exec_target.
3896 (exec_open, exec_close_1, exec_get_section_table)
3897 (exec_xfer_partial, exec_files_info, exec_has_memory)
3898 (exec_make_note_section): Refactor as exec_target methods.
3899 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3900 Delete.
3901 (exec_target::find_memory_regions): New.
3902 (_initialize_exec): Don't call init_exec_ops.
3903 * gdbcore.h (exec_file_clear): Delete.
3904
3905 * corefile.c (core_target): Delete.
3906 (core_file_command): Adjust.
3907 * corelow.c (core_target): New class.
3908 (the_core_target): New.
3909 (core_close): Remove target_ops parameter.
3910 (core_close_cleanup): Adjust.
3911 (core_target::close): New.
3912 (core_open, core_detach, get_core_registers, core_files_info)
3913 (core_xfer_partial, core_thread_alive, core_read_description)
3914 (core_pid_to_str, core_thread_name, core_has_memory)
3915 (core_has_stack, core_has_registers, core_info_proc): Rework as
3916 core_target methods.
3917 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3918 (_initialize_corelow): Initialize the_core_target.
3919 * gdbcore.h (core_target): Delete.
3920 (the_core_target): New.
3921
3922 * ctf.c: (ctf_target): New class.
3923 (ctf_ops): Now a ctf_target.
3924 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3925 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3926 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3927 methods.
3928 (init_ctf_ops): Delete.
3929 (_initialize_ctf): Don't call it.
3930 * tracefile-tfile.c (tfile_target): New class.
3931 (tfile_ops): Now a tfile_target.
3932 (tfile_open, tfile_close, tfile_files_info)
3933 (tfile_get_tracepoint_status, tfile_trace_find)
3934 (tfile_fetch_registers, tfile_xfer_partial)
3935 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3936 Refactor as tfile_target methods.
3937 (tfile_xfer_partial_features): Remove target_ops parameter.
3938 (init_tfile_ops): Delete.
3939 (_initialize_tracefile_tfile): Don't call it.
3940 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3941 (tracefile_has_stack, tracefile_has_registers)
3942 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3943 tracefile_target methods.
3944 (init_tracefile_ops): Delete.
3945 (tracefile_target::tracefile_target): New.
3946 * tracefile.h: Include "target.h".
3947 (tracefile_target): New class.
3948 (init_tracefile_ops): Delete.
3949
3950 * spu-multiarch.c (spu_multiarch_target): New class.
3951 (spu_ops): Now a spu_multiarch_target.
3952 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3953 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3954 (spu_search_memory, spu_mourn_inferior): Refactor as
3955 spu_multiarch_target methods.
3956 (init_spu_ops): Delete.
3957 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3958 complete_target_initialization.
3959
3960 * ravenscar-thread.c (ravenscar_thread_target): New class.
3961 (ravenscar_ops): Now a ravenscar_thread_target.
3962 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3963 (ravenscar_thread_alive, ravenscar_pid_to_str)
3964 (ravenscar_fetch_registers, ravenscar_store_registers)
3965 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3966 (ravenscar_stopped_by_hw_breakpoint)
3967 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3968 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3969 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3970 methods.
3971 (init_ravenscar_thread_ops): Delete.
3972 (_initialize_ravenscar): Remove references to
3973 init_ravenscar_thread_ops and complete_target_initialization.
3974
3975 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3976 (bsd_uthread_target): New class.
3977 (bsd_uthread_ops): Now a bsd_uthread_target.
3978 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3979 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3980 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3981 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3982 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3983 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3984 (bsd_uthread_target): Delete function.
3985 (_initialize_bsd_uthread): Remove reference to
3986 complete_target_initialization.
3987
3988 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3989 (target_bfd): ... this new class.
3990 (target_bfd_xfer_partial, target_bfd_get_section_table)
3991 (target_bfd_close): Refactor as target_bfd methods.
3992 (target_bfd::~target_bfd): New.
3993 (target_bfd_reopen): Adjust.
3994 (target_bfd::close): New.
3995
3996 * record-btrace.c (record_btrace_target): New class.
3997 (record_btrace_ops): Now a record_btrace_target.
3998 (record_btrace_open, record_btrace_stop_recording)
3999 (record_btrace_disconnect, record_btrace_close)
4000 (record_btrace_async, record_btrace_info)
4001 (record_btrace_insn_history, record_btrace_insn_history_range)
4002 (record_btrace_insn_history_from, record_btrace_call_history)
4003 (record_btrace_call_history_range)
4004 (record_btrace_call_history_from, record_btrace_record_method)
4005 (record_btrace_is_replaying, record_btrace_will_replay)
4006 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4007 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4008 (record_btrace_store_registers, record_btrace_prepare_to_store)
4009 (record_btrace_to_get_unwinder)
4010 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4011 (record_btrace_commit_resume, record_btrace_wait)
4012 (record_btrace_stop, record_btrace_can_execute_reverse)
4013 (record_btrace_stopped_by_sw_breakpoint)
4014 (record_btrace_supports_stopped_by_sw_breakpoint)
4015 (record_btrace_stopped_by_hw_breakpoint)
4016 (record_btrace_supports_stopped_by_hw_breakpoint)
4017 (record_btrace_update_thread_list, record_btrace_thread_alive)
4018 (record_btrace_goto_begin, record_btrace_goto_end)
4019 (record_btrace_goto, record_btrace_stop_replaying_all)
4020 (record_btrace_execution_direction)
4021 (record_btrace_prepare_to_generate_core)
4022 (record_btrace_done_generating_core): Refactor as
4023 record_btrace_target methods.
4024 (init_record_btrace_ops): Delete.
4025 (_initialize_record_btrace): Remove reference to
4026 init_record_btrace_ops.
4027 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4028 the execution_direction global.
4029 (record_full_base_target, record_full_target)
4030 (record_full_core_target): New classes.
4031 (record_full_ops): Now a record_full_target.
4032 (record_full_core_ops): Now a record_full_core_target.
4033 (record_full_target::detach, record_full_target::disconnect)
4034 (record_full_core_target::disconnect)
4035 (record_full_target::mourn_inferior, record_full_target::kill):
4036 New.
4037 (record_full_open, record_full_close, record_full_async): Refactor
4038 as methods of the record_full_base_target class.
4039 (record_full_resume, record_full_commit_resume): Refactor
4040 as methods of the record_full_target class.
4041 (record_full_wait, record_full_stopped_by_watchpoint)
4042 (record_full_stopped_data_address)
4043 (record_full_stopped_by_sw_breakpoint)
4044 (record_full_supports_stopped_by_sw_breakpoint)
4045 (record_full_stopped_by_hw_breakpoint)
4046 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4047 methods of the record_full_base_target class.
4048 (record_full_store_registers, record_full_xfer_partial)
4049 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4050 Refactor as methods of the record_full_target class.
4051 (record_full_can_execute_reverse, record_full_get_bookmark)
4052 (record_full_goto_bookmark, record_full_execution_direction)
4053 (record_full_record_method, record_full_info, record_full_delete)
4054 (record_full_is_replaying, record_full_will_replay)
4055 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4056 (record_full_stop_replaying): Refactor as methods of the
4057 record_full_base_target class.
4058 (record_full_core_resume, record_full_core_kill)
4059 (record_full_core_fetch_registers)
4060 (record_full_core_prepare_to_store)
4061 (record_full_core_store_registers, record_full_core_xfer_partial)
4062 (record_full_core_insert_breakpoint)
4063 (record_full_core_remove_breakpoint)
4064 (record_full_core_has_execution): Refactor
4065 as methods of the record_full_core_target class.
4066 (record_full_base_target::supports_delete_record): New.
4067 (init_record_full_ops): Delete.
4068 (init_record_full_core_ops): Delete.
4069 (record_full_save): Refactor as method of the
4070 record_full_base_target class.
4071 (_initialize_record_full): Remove references to
4072 init_record_full_ops and init_record_full_core_ops.
4073
4074 * remote.c (remote_target, extended_remote_target): New classes.
4075 (remote_ops): Now a remote_target.
4076 (extended_remote_ops): Now an extended_remote_target.
4077 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4078 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4079 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4080 (remote_pass_signals, remote_set_syscall_catchpoint)
4081 (remote_program_signals, )
4082 (remote_thread_always_alive): Remove target_ops parameter.
4083 (remote_thread_alive, remote_thread_name)
4084 (remote_update_thread_list, remote_threads_extra_info)
4085 (remote_static_tracepoint_marker_at)
4086 (remote_static_tracepoint_markers_by_strid)
4087 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4088 (remote_open): Refactor as methods of remote_target.
4089 (extended_remote_open, extended_remote_detach)
4090 (extended_remote_attach, extended_remote_post_attach):
4091 (extended_remote_supports_disable_randomization)
4092 (extended_remote_create_inferior): : Refactor as method of
4093 extended_remote_target.
4094 (remote_set_permissions, remote_open_1, remote_detach)
4095 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4096 (remote_resume, remote_commit_resume, remote_stop)
4097 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4098 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4099 (remote_prepare_to_store, remote_store_registers)
4100 (remote_flash_erase, remote_flash_done, remote_files_info)
4101 (remote_kill, remote_mourn, remote_insert_breakpoint)
4102 (remote_remove_breakpoint, remote_insert_watchpoint)
4103 (remote_watchpoint_addr_within_range)
4104 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4105 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4106 (remote_supports_stopped_by_sw_breakpoint)
4107 (remote_stopped_by_hw_breakpoint)
4108 (remote_supports_stopped_by_hw_breakpoint)
4109 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4110 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4111 (remote_verify_memory): Refactor as methods of remote_target.
4112 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4113 parameter.
4114 (remote_xfer_partial, remote_get_memory_xfer_limit)
4115 (remote_search_memory, remote_rcmd, remote_memory_map)
4116 (remote_pid_to_str, remote_get_thread_local_address)
4117 (remote_get_tib_address, remote_read_description): Refactor as
4118 methods of remote_target.
4119 (remote_target::fileio_open, remote_target::fileio_pwrite)
4120 (remote_target::fileio_pread, remote_target::fileio_close): New.
4121 (remote_hostio_readlink, remote_hostio_fstat)
4122 (remote_filesystem_is_local, remote_can_execute_reverse)
4123 (remote_supports_non_stop, remote_supports_disable_randomization)
4124 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4125 (remote_supports_enable_disable_tracepoint)
4126 (remote_supports_string_tracing)
4127 (remote_can_run_breakpoint_commands, remote_trace_init)
4128 (remote_download_tracepoint, remote_can_download_tracepoint)
4129 (remote_download_trace_state_variable, remote_enable_tracepoint)
4130 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4131 (remote_trace_start, remote_get_trace_status)
4132 (remote_get_tracepoint_status, remote_trace_stop)
4133 (remote_trace_find, remote_get_trace_state_variable_value)
4134 (remote_save_trace_data, remote_get_raw_trace_data)
4135 (remote_set_disconnected_tracing, remote_core_of_thread)
4136 (remote_set_circular_trace_buffer, remote_traceframe_info)
4137 (remote_get_min_fast_tracepoint_insn_len)
4138 (remote_set_trace_buffer_size, remote_set_trace_notes)
4139 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4140 (remote_disable_btrace, remote_teardown_btrace)
4141 (remote_read_btrace, remote_btrace_conf)
4142 (remote_augmented_libraries_svr4_read, remote_load)
4143 (remote_pid_to_exec_file, remote_can_do_single_step)
4144 (remote_execution_direction, remote_thread_handle_to_thread_info):
4145 Refactor as methods of remote_target.
4146 (init_remote_ops, init_extended_remote_ops): Delete.
4147 (remote_can_async_p, remote_is_async_p, remote_async)
4148 (remote_thread_events, remote_upload_tracepoints)
4149 (remote_upload_trace_state_variables): Refactor as methods of
4150 remote_target.
4151 (_initialize_remote): Remove references to init_remote_ops and
4152 init_extended_remote_ops.
4153
4154 * remote-sim.c (gdbsim_target): New class.
4155 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4156 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4157 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4158 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4159 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4160 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4161 Refactor as methods of gdbsim_target.
4162 (gdbsim_ops): Now a gdbsim_target.
4163 (init_gdbsim_ops): Delete.
4164 (gdbsim_cntrl_c): Adjust.
4165 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4166
4167 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4168 (the_amd64_linux_nat_target): New.
4169 (amd64_linux_fetch_inferior_registers)
4170 (amd64_linux_store_inferior_registers): Refactor as methods of
4171 amd64_linux_nat_target.
4172 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4173 * i386-linux-nat.c: Don't include "linux-nat.h".
4174 (i386_linux_nat_target): New class.
4175 (the_i386_linux_nat_target): New.
4176 (i386_linux_fetch_inferior_registers)
4177 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4178 as methods of i386_linux_nat_target.
4179 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4180 * inf-child.c (inf_child_ops): Delete.
4181 (inf_child_fetch_inferior_registers)
4182 (inf_child_store_inferior_registers): Delete.
4183 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4184 methods of inf_child_target.
4185 (inf_child_target::supports_terminal_ours)
4186 (inf_child_target::terminal_init)
4187 (inf_child_target::terminal_inferior)
4188 (inf_child_target::terminal_ours_for_output)
4189 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4190 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4191 New.
4192 (inf_child_open, inf_child_disconnect, inf_child_close)
4193 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4194 (inf_child_post_startup_inferior, inf_child_can_run)
4195 (inf_child_pid_to_exec_file): Refactor as methods of
4196 inf_child_target.
4197 (inf_child_follow_fork): Delete.
4198 (inf_child_target::can_create_inferior)
4199 (inf_child_target::can_attach): New.
4200 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4201 (inf_child_target::has_stack, inf_child_target::has_registers)
4202 (inf_child_target::has_execution): New.
4203 (inf_child_fileio_open, inf_child_fileio_pwrite)
4204 (inf_child_fileio_pread, inf_child_fileio_fstat)
4205 (inf_child_fileio_close, inf_child_fileio_unlink)
4206 (inf_child_fileio_readlink, inf_child_use_agent)
4207 (inf_child_can_use_agent): Refactor as methods of
4208 inf_child_target.
4209 (return_zero, inf_child_target): Delete.
4210 (inf_child_target::inf_child_target): New.
4211 * inf-child.h: Include "target.h".
4212 (inf_child_target): Delete function prototype.
4213 (inf_child_target): New class.
4214 (inf_child_open_target, inf_child_mourn_inferior)
4215 (inf_child_maybe_unpush_target): Delete.
4216 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4217 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4218 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4219 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4220 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4221 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4222 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4223 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4224 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4225 methods of inf_ptrace_target.
4226 (inf_ptrace_target): Delete function.
4227 * inf-ptrace.h: Include "inf-child.h".
4228 (inf_ptrace_target): Delete function declaration.
4229 (inf_ptrace_target): New class.
4230 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4231 * linux-nat.c (linux_target): New.
4232 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4233 (linux_nat_target::~linux_nat_target): New.
4234 (linux_child_post_attach, linux_child_post_startup_inferior)
4235 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4236 (linux_child_remove_fork_catchpoint)
4237 (linux_child_insert_vfork_catchpoint)
4238 (linux_child_remove_vfork_catchpoint)
4239 (linux_child_insert_exec_catchpoint)
4240 (linux_child_remove_exec_catchpoint)
4241 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4242 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4243 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4244 (linux_nat_stopped_data_address)
4245 (linux_nat_stopped_by_sw_breakpoint)
4246 (linux_nat_supports_stopped_by_sw_breakpoint)
4247 (linux_nat_stopped_by_hw_breakpoint)
4248 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4249 (linux_nat_kill, linux_nat_mourn_inferior)
4250 (linux_nat_xfer_partial, linux_nat_thread_alive)
4251 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4252 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4253 (linux_child_static_tracepoint_markers_by_strid)
4254 (linux_nat_is_async_p, linux_nat_can_async_p)
4255 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4256 (linux_nat_supports_multi_process)
4257 (linux_nat_supports_disable_randomization, linux_nat_async)
4258 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4259 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4260 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4261 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4262 methods of linux_nat_target.
4263 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4264 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4265 parameter.
4266 (check_stopped_by_watchpoint): Adjust.
4267 (linux_xfer_partial): Delete.
4268 (linux_target_install_ops, linux_target, linux_nat_add_target):
4269 Delete.
4270 (linux_nat_target::linux_nat_target): New.
4271 * linux-nat.h: Include "inf-ptrace.h".
4272 (linux_nat_target): New.
4273 (linux_target, linux_target_install_ops, linux_nat_add_target):
4274 Delete function declarations.
4275 (linux_target): Declare global.
4276 * linux-thread-db.c (thread_db_target): New.
4277 (thread_db_target::thread_db_target): New.
4278 (thread_db_ops): Delete.
4279 (the_thread_db_target): New.
4280 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4281 (thread_db_update_thread_list, thread_db_pid_to_str)
4282 (thread_db_extra_thread_info)
4283 (thread_db_thread_handle_to_thread_info)
4284 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4285 (thread_db_resume): Refactor as methods of thread_db_target.
4286 (init_thread_db_ops): Delete.
4287 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4288 * x86-linux-nat.c: Don't include "linux-nat.h".
4289 (super_post_startup_inferior): Delete.
4290 (x86_linux_nat_target::~x86_linux_nat_target): New.
4291 (x86_linux_child_post_startup_inferior)
4292 (x86_linux_read_description, x86_linux_enable_btrace)
4293 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4294 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4295 methods of x86_linux_nat_target.
4296 (x86_linux_create_target): Delete. Bits folded ...
4297 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4298 pointer.
4299 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4300 (x86_linux_nat_target): New class.
4301 (x86_linux_create_target): Delete.
4302 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4303 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4304 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4305 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4306 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4307 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4308 make extern.
4309 (x86_use_watchpoints): Delete.
4310 * x86-nat.h: Include "breakpoint.h" and "target.h".
4311 (x86_use_watchpoints): Delete.
4312 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4313 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4314 (x86_insert_watchpoint, x86_remove_watchpoint)
4315 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4316 (x86_stopped_by_hw_breakpoint): New declarations.
4317 (x86_nat_target): New template class.
4318
4319 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4320 (the_ppc_linux_nat_target): New.
4321 (ppc_linux_fetch_inferior_registers)
4322 (ppc_linux_can_use_hw_breakpoint)
4323 (ppc_linux_region_ok_for_hw_watchpoint)
4324 (ppc_linux_ranged_break_num_registers)
4325 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4326 (ppc_linux_insert_mask_watchpoint)
4327 (ppc_linux_remove_mask_watchpoint)
4328 (ppc_linux_can_accel_watchpoint_condition)
4329 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4330 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4331 (ppc_linux_watchpoint_addr_within_range)
4332 (ppc_linux_masked_watch_num_registers)
4333 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4334 (ppc_linux_read_description): Refactor as methods of
4335 ppc_linux_nat_target.
4336 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4337
4338 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4339 (procfs_target): New class.
4340 (the_procfs_target): New.
4341 (procfs_target): Delete function.
4342 (procfs_auxv_parse, procfs_attach, procfs_detach)
4343 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4344 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4345 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4346 (procfs_create_inferior, procfs_update_thread_list)
4347 (procfs_thread_alive, procfs_pid_to_str)
4348 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4349 (procfs_stopped_data_address, procfs_insert_watchpoint)
4350 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4351 (proc_find_memory_regions, procfs_info_proc)
4352 (procfs_make_note_section): Refactor as methods of procfs_target.
4353 (_initialize_procfs): Adjust.
4354 * sol-thread.c (sol_thread_target): New class.
4355 (sol_thread_ops): Now a sol_thread_target.
4356 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4357 (sol_thread_fetch_registers, sol_thread_store_registers)
4358 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4359 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4360 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4361 (init_sol_thread_ops): Delete.
4362 (_initialize_sol_thread): Adjust. Remove references to
4363 init_sol_thread_ops and complete_target_initialization.
4364
4365 * windows-nat.c (windows_nat_target): New class.
4366 (windows_fetch_inferior_registers)
4367 (windows_store_inferior_registers, windows_resume, windows_wait)
4368 (windows_attach, windows_detach, windows_pid_to_exec_file)
4369 (windows_files_info, windows_create_inferior)
4370 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4371 (windows_close, windows_pid_to_str, windows_xfer_partial)
4372 (windows_get_tib_address, windows_get_ada_task_ptid)
4373 (windows_thread_name, windows_thread_alive): Refactor as
4374 windows_nat_target methods.
4375 (do_initial_windows_stuff): Adjust.
4376 (windows_target): Delete function.
4377 (_initialize_windows_nat): Adjust.
4378
4379 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4380 (darwin_mourn_inferior, darwin_kill_inferior)
4381 (darwin_create_inferior, darwin_attach, darwin_detach)
4382 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4383 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4384 (darwin_supports_multi_process): Refactor as darwin_nat_target
4385 methods.
4386 (darwin_resume_to, darwin_files_info): Delete.
4387 (_initialize_darwin_inferior): Rename to ...
4388 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4389 * darwin-nat.h: Include "inf-child.h".
4390 (darwin_nat_target): New class.
4391 (darwin_complete_target): Delete.
4392 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4393 (darwin_target): New.
4394 (i386_darwin_fetch_inferior_registers)
4395 (i386_darwin_store_inferior_registers): Refactor as methods of
4396 darwin_nat_target.
4397 (darwin_complete_target): Delete, with ...
4398 (_initialize_i386_darwin_nat): ... bits factored out here.
4399
4400 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4401 (the_alpha_linux_nat_target): New.
4402 (alpha_linux_register_u_offset): Refactor as
4403 alpha_linux_nat_target method.
4404 (_initialize_alpha_linux_nat): Adjust.
4405 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4406 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4407 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4408 methods of linux_nat_trad_target.
4409 (linux_trad_target): Delete.
4410 * linux-nat-trad.h (linux_trad_target): Delete function.
4411 (linux_nat_trad_target): New class.
4412 * mips-linux-nat.c (mips_linux_nat_target): New class.
4413 (super_fetch_registers, super_store_registers, super_close):
4414 Delete.
4415 (the_mips_linux_nat_target): New.
4416 (mips64_linux_regsets_fetch_registers)
4417 (mips64_linux_regsets_store_registers)
4418 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4419 (mips_linux_register_u_offset, mips_linux_read_description)
4420 (mips_linux_can_use_hw_breakpoint)
4421 (mips_linux_stopped_by_watchpoint)
4422 (mips_linux_stopped_data_address)
4423 (mips_linux_region_ok_for_hw_watchpoint)
4424 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4425 (mips_linux_close): Refactor as methods of mips_linux_nat.
4426 (_initialize_mips_linux_nat): Adjust to C++ification.
4427
4428 * aix-thread.c (aix_thread_target): New class.
4429 (aix_thread_ops): Now an aix_thread_target.
4430 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4431 (aix_thread_fetch_registers, aix_thread_store_registers)
4432 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4433 (aix_thread_thread_alive, aix_thread_pid_to_str)
4434 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4435 Refactor as methods of aix_thread_target.
4436 (init_aix_thread_ops): Delete.
4437 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4438 and complete_target_initialization.
4439 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4440 (rs6000_nat_target): New class.
4441 (the_rs6000_nat_target): New.
4442 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4443 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4444 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4445 (super_create_inferior): Delete.
4446 (_initialize_rs6000_nat): Adjust to C++ification.
4447
4448 * arm-linux-nat.c (arm_linux_nat_target): New class.
4449 (the_arm_linux_nat_target): New.
4450 (arm_linux_fetch_inferior_registers)
4451 (arm_linux_store_inferior_registers, arm_linux_read_description)
4452 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4453 (arm_linux_remove_hw_breakpoint)
4454 (arm_linux_region_ok_for_hw_watchpoint)
4455 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4456 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4457 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4458 arm_linux_nat_target.
4459 (_initialize_arm_linux_nat): Adjust to C++ification.
4460
4461 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4462 (the_aarch64_linux_nat_target): New.
4463 (aarch64_linux_fetch_inferior_registers)
4464 (aarch64_linux_store_inferior_registers)
4465 (aarch64_linux_child_post_startup_inferior)
4466 (aarch64_linux_read_description)
4467 (aarch64_linux_can_use_hw_breakpoint)
4468 (aarch64_linux_insert_hw_breakpoint)
4469 (aarch64_linux_remove_hw_breakpoint)
4470 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4471 (aarch64_linux_region_ok_for_hw_watchpoint)
4472 (aarch64_linux_stopped_data_address)
4473 (aarch64_linux_stopped_by_watchpoint)
4474 (aarch64_linux_watchpoint_addr_within_range)
4475 (aarch64_linux_can_do_single_step): Refactor as methods of
4476 aarch64_linux_nat_target.
4477 (super_post_startup_inferior): Delete.
4478 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4479
4480 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4481 (the_hppa_linux_nat_target): New.
4482 (hppa_linux_fetch_inferior_registers)
4483 (hppa_linux_store_inferior_registers): Refactor as methods of
4484 hppa_linux_nat_target.
4485 (_initialize_hppa_linux_nat): Adjust to C++ification.
4486
4487 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4488 (the_ia64_linux_nat_target): New.
4489 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4490 (ia64_linux_stopped_data_address)
4491 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4492 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4493 ia64_linux_nat_target methods.
4494 (super_xfer_partial): Delete.
4495 (_initialize_ia64_linux_nat): Adjust to C++ification.
4496
4497 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4498 (the_m32r_linux_nat_target): New.
4499 (m32r_linux_fetch_inferior_registers)
4500 (m32r_linux_store_inferior_registers): Refactor as
4501 m32r_linux_nat_target methods.
4502 (_initialize_m32r_linux_nat): Adjust to C++ification.
4503
4504 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4505 (the_m68k_linux_nat_target): New.
4506 (m68k_linux_fetch_inferior_registers)
4507 (m68k_linux_store_inferior_registers): Refactor as
4508 m68k_linux_nat_target methods.
4509 (_initialize_m68k_linux_nat): Adjust to C++ification.
4510
4511 * s390-linux-nat.c (s390_linux_nat_target): New class.
4512 (the_s390_linux_nat_target): New.
4513 (s390_linux_fetch_inferior_registers)
4514 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4515 (s390_insert_watchpoint, s390_remove_watchpoint)
4516 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4517 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4518 (s390_auxv_parse, s390_read_description): Refactor as methods of
4519 s390_linux_nat_target.
4520 (_initialize_s390_nat): Adjust to C++ification.
4521
4522 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4523 (the_sparc_linux_nat_target): New.
4524 (_initialize_sparc_linux_nat): Adjust to C++ification.
4525 * sparc-nat.c (sparc_fetch_inferior_registers)
4526 (sparc_store_inferior_registers): Remove target_ops parameter.
4527 * sparc-nat.h (sparc_fetch_inferior_registers)
4528 (sparc_store_inferior_registers): Remove target_ops parameter.
4529 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4530 (the_sparc64_linux_nat_target): New.
4531 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4532
4533 * spu-linux-nat.c (spu_linux_nat_target): New class.
4534 (the_spu_linux_nat_target): New.
4535 (spu_child_post_startup_inferior, spu_child_post_attach)
4536 (spu_child_wait, spu_fetch_inferior_registers)
4537 (spu_store_inferior_registers, spu_xfer_partial)
4538 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4539 methods.
4540 (_initialize_spu_nat): Adjust to C++ification.
4541
4542 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4543 (the_tilegx_linux_nat_target): New.
4544 (fetch_inferior_registers, store_inferior_registers):
4545 Refactor as methods.
4546 (_initialize_tile_linux_nat): Adjust to C++ification.
4547
4548 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4549 (the_xtensa_linux_nat_target): New.
4550 (xtensa_linux_fetch_inferior_registers)
4551 (xtensa_linux_store_inferior_registers): Refactor as
4552 xtensa_linux_nat_target methods.
4553 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4554
4555 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4556 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4557 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4558 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4559 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4560 (fbsd_stopped_by_sw_breakpoint)
4561 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4562 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4563 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4564 (fbsd_post_startup_inferior, fbsd_post_attach)
4565 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4566 (fbsd_set_syscall_catchpoint)
4567 (super_xfer_partial, super_resume, super_wait)
4568 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4569 (fbsd_handle_debug_trap): Remove target_ops parameter.
4570 (fbsd_nat_add_target): Delete.
4571 * fbsd-nat.h: Include "inf-ptrace.h".
4572 (fbsd_nat_add_target): Delete.
4573 (USE_SIGTRAP_SIGINFO): Define.
4574 (fbsd_nat_target): New class.
4575
4576 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4577 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4578 (amd64bsd_target): Delete.
4579 * amd64-bsd-nat.h: New file.
4580 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4581 "x86-bsd-nat.h".
4582 (amd64_fbsd_nat_target): New class.
4583 (the_amd64_fbsd_nat_target): New.
4584 (amd64fbsd_read_description): Refactor as method of
4585 amd64_fbsd_nat_target.
4586 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4587 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4588 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4589 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4590 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4591 (i386bsd_target): Delete.
4592 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4593 (i386bsd_fetch_inferior_registers)
4594 (i386bsd_store_inferior_registers): Declare.
4595 (i386_bsd_nat_target): New class.
4596 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4597 (the_i386_fbsd_nat_target): New.
4598 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4599 i386_fbsd_nat_target methods.
4600 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4601 (_initialize_i386fbsd_nat): Adjust to C++ification.
4602 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4603 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4604 (_initialize_x86_bsd_nat): Adjust to C++ification.
4605 * x86-bsd-nat.h: Include "x86-nat.h".
4606 (x86bsd_target): Delete declaration.
4607 (x86bsd_nat_target): New class.
4608
4609 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4610 (the_aarch64_fbsd_nat_target): New.
4611 (aarch64_fbsd_fetch_inferior_registers)
4612 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4613 aarch64_fbsd_nat_target.
4614 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4615 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4616 (the_alpha_bsd_nat_target): New.
4617 (alphabsd_fetch_inferior_registers)
4618 (alphabsd_store_inferior_registers): Refactor as
4619 alpha_bsd_nat_target methods.
4620 (_initialize_alphabsd_nat): Refactor as methods of
4621 alpha_bsd_nat_target.
4622 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4623 (the_amd64_nbsd_nat_target): New.
4624 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4625 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4626 (the_amd64_obsd_nat_target): New.
4627 (_initialize_amd64obsd_nat): Adjust to C++ification.
4628 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4629 (the_arm_fbsd_nat_target): New.
4630 (arm_fbsd_fetch_inferior_registers)
4631 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4632 (_initialize_arm_fbsd_nat): Refactor as methods of
4633 arm_fbsd_nat_target.
4634 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4635 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4636 (the_arm_netbsd_nat_target): New.
4637 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4638 arm_netbsd_nat_target.
4639 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4640 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4641 (the_hppa_nbsd_nat_target): New.
4642 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4643 hppa_nbsd_nat_target methods.
4644 (_initialize_hppanbsd_nat): Adjust to C++ification.
4645 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4646 (the_hppa_obsd_nat_target): New.
4647 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4648 methods of hppa_obsd_nat_target.
4649 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4650 add_target.
4651 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4652 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4653 add_target.
4654 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4655 (_initialize_i386obsd_nat): Use add_target.
4656 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4657 (the_m68k_bsd_nat_target): New.
4658 (m68kbsd_fetch_inferior_registers)
4659 (m68kbsd_store_inferior_registers): Refactor as methods of
4660 m68k_bsd_nat_target.
4661 (_initialize_m68kbsd_nat): Adjust to C++ification.
4662 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4663 (the_mips_fbsd_nat_target): New.
4664 (mips_fbsd_fetch_inferior_registers)
4665 (mips_fbsd_store_inferior_registers): Refactor as methods of
4666 mips_fbsd_nat_target.
4667 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4668 add_target.
4669 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4670 (the_mips_nbsd_nat_target): New.
4671 (mipsnbsd_fetch_inferior_registers)
4672 (mipsnbsd_store_inferior_registers): Refactor as methods of
4673 mips_nbsd_nat_target.
4674 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4675 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4676 (the_mips64_obsd_nat_target): New.
4677 (mips64obsd_fetch_inferior_registers)
4678 (mips64obsd_store_inferior_registers): Refactor as methods of
4679 mips64_obsd_nat_target.
4680 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4681 add_target.
4682 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4683 nbsd_nat_target.
4684 * nbsd-nat.h: Include "inf-ptrace.h".
4685 (nbsd_nat_target): New class.
4686 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4687 (obsd_wait): Refactor as methods of obsd_nat_target.
4688 (obsd_add_target): Delete.
4689 * obsd-nat.h: Include "inf-ptrace.h".
4690 (obsd_nat_target): New class.
4691 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4692 (the_ppc_fbsd_nat_target): New.
4693 (ppcfbsd_fetch_inferior_registers)
4694 (ppcfbsd_store_inferior_registers): Refactor as methods of
4695 ppc_fbsd_nat_target.
4696 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4697 add_target.
4698 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4699 (the_ppc_nbsd_nat_target): New.
4700 (ppcnbsd_fetch_inferior_registers)
4701 (ppcnbsd_store_inferior_registers): Refactor as methods of
4702 ppc_nbsd_nat_target.
4703 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4704 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4705 (the_ppc_obsd_nat_target): New.
4706 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4707 methods of ppc_obsd_nat_target.
4708 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4709 add_target.
4710 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4711 (the_sh_nbsd_nat_target): New.
4712 (shnbsd_fetch_inferior_registers)
4713 (shnbsd_store_inferior_registers): Refactor as methods of
4714 sh_nbsd_nat_target.
4715 (_initialize_shnbsd_nat): Adjust to C++ification.
4716 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4717 (inf_ptrace_xfer_partial): Delete.
4718 (sparc_xfer_partial, sparc_target): Delete.
4719 * sparc-nat.h (sparc_fetch_inferior_registers)
4720 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4721 (sparc_target): Delete function declaration.
4722 (sparc_target): New template class.
4723 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4724 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4725 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4726 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4727 add_target.
4728 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4729 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4730 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4731 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4732 add_target.
4733 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4734 (the_vax_bsd_nat_target): New.
4735 (vaxbsd_fetch_inferior_registers)
4736 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4737 methods.
4738 (_initialize_vaxbsd_nat): Adjust to C++ification.
4739
4740 * bsd-kvm.c (bsd_kvm_target): New class.
4741 (bsd_kvm_ops): Now a bsd_kvm_target.
4742 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4743 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4744 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4745 bsd_kvm_target.
4746 (bsd_kvm_return_one): Delete.
4747 (bsd_kvm_add_target): Adjust to C++ification.
4748
4749 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4750 (nto_procfs_target_procfs): New classes.
4751 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4752 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4753 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4754 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4755 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4756 (procfs_remove_hw_breakpoint, procfs_resume)
4757 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4758 (procfs_kill_inferior, procfs_store_registers)
4759 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4760 as methods of nto_procfs_target.
4761 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4762 (nto_native_ops): Delete.
4763 (procfs_open, procfs_native_open): Delete.
4764 (nto_native_ops): Now an nto_procfs_target_native.
4765 (init_procfs_targets): Adjust to C++ification.
4766 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4767 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4768 Refactor as methods of nto_procfs_target.
4769
4770 * go32-nat.c (go32_nat_target): New class.
4771 (the_go32_nat_target): New.
4772 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4773 (go32_store_registers, go32_xfer_partial, go32_files_info)
4774 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4775 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4776 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4777 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4778 (go32_target): Delete.
4779 (_initialize_go32_nat): Adjust to C++ification.
4780
4781 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4782 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4783 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4784 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4785 gnu_nat_target.
4786 (gnu_target): Delete.
4787 * gnu-nat.h (gnu_target): Delete.
4788 (gnu_nat_target): New class.
4789 * i386-gnu-nat.c (gnu_base_target): New.
4790 (i386_gnu_nat_target): New class.
4791 (the_i386_gnu_nat_target): New.
4792 (_initialize_i386gnu_nat): Adjust to C++ification.
4793
4794 2018-05-02 Pedro Alves <palves@redhat.com>
4795
4796 * bfd-target.c (target_bfd_xclose): Rename to ...
4797 (target_bfd_close): ... this.
4798 (target_bfd_reopen): Adjust.
4799 * target.c (target_close): Remove references to to_xclose.
4800 * target.h (target_ops::to_xclose): Delete.
4801 (target_ops::to_close): Update comments.
4802
4803 2018-05-02 Pedro Alves <palves@redhat.com>
4804
4805 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4806 "linux-nat.h".
4807 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4808 * inf-ptrace.c (inf_ptrace_register_u_offset)
4809 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4810 (inf_ptrace_store_register, inf_ptrace_store_registers)
4811 (inf_ptrace_trad_target): Move to ...
4812 * linux-nat-trad.c: ... this new file.
4813 * linux-nat-trad.h: New file.
4814 * linux-nat.c (linux_target_install_ops): Make extern.
4815 (linux_trad_target): Delete.
4816 * linux-nat.h (linux_trad_target): Delete declaration.
4817 (linux_target_install_ops): Declare.
4818 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4819 "linux-nat.h".
4820
4821 2018-05-02 Pedro Alves <palves@redhat.com>
4822
4823 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4824 procfs_target/add_target here.
4825 * procfs.c (procfs_target): Make static.
4826 (_initialize_procfs): Call add_target here.
4827 * procfs.h (struct target_ops): Remove forward declaration.
4828 (procfs_target): Remove declaration.
4829 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4830
4831 2018-05-02 Pedro Alves <palves@redhat.com>
4832
4833 * procfs.c (procfs_stopped_by_watchpoint)
4834 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4835 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4836 Forward declare.
4837 (procfs_use_watchpoints): Delete, move contents...
4838 (procfs_target): ... here.
4839 * procfs.h (procfs_use_watchpoints): Delete declaration.
4840 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4841 procfs_use_watchpoints.
4842 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4843 procfs_use_watchpoints.
4844
4845 2018-05-02 Tom Tromey <tom@tromey.com>
4846
4847 PR python/20084:
4848 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4849 and var_zuinteger_unlimited.
4850 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4851 and PARAM_ZUINTEGER_UNLIMITED.
4852 (set_parameter_value): Handle var_zuinteger and
4853 var_zuinteger_unlimited.
4854 (add_setshow_generic): Likewise.
4855 (parmpy_init): Likewise.
4856
4857 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4858
4859 PR rust/23124
4860 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4861 pointer is not null before dereferencing it.
4862
4863 2018-04-30 Tom Tromey <tom@tromey.com>
4864
4865 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4866 is_mi_like_p.
4867
4868 2018-04-30 Tom Tromey <tom@tromey.com>
4869
4870 * breakpoint.c (mention): Remove use of is_mi_like_p.
4871 (print_mention_ranged_breakpoint): Likewise.
4872 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4873 of is_mi_like_p.
4874
4875 2018-04-30 Tom Tromey <tom@tromey.com>
4876
4877 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4878
4879 2018-04-30 Tom Tromey <tom@tromey.com>
4880
4881 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4882 (info_spu_event_command): Remove some uses of is_mi_like_p.
4883
4884 2018-04-30 Tom Tromey <tom@tromey.com>
4885
4886 * python/py-framefilter.c (py_print_single_arg)
4887 (enumerate_locals, py_print_args, py_print_frame): Remove some
4888 uses of is_mi_like_p.
4889
4890 2018-04-30 Tom Tromey <tom@tromey.com>
4891
4892 * ui-out.c: Update.
4893 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4894 * ui-out.h (ui_out::is_mi_like_p): Now const.
4895 (ui_out::do_is_mi_like_p): Now const.
4896 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4897
4898 2018-04-30 Tom Tromey <tom@tromey.com>
4899
4900 * varobj.c (varobj_set_visualizer): Use new_reference.
4901 * python/python.c (gdbpy_decode_line): Use new_reference.
4902 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4903 new_reference.
4904
4905 2018-04-30 Tom Tromey <tom@tromey.com>
4906
4907 * varobj.c (install_new_value): Use new_reference.
4908 * value.h (value_incref): Return void. Swap intro comment with
4909 value_decref.
4910 * value.c (set_value_parent): Use new_reference.
4911 (value_incref): Return void. Update intro comment.
4912 (release_value): Use new_reference.
4913 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4914
4915 2018-04-30 Tom Tromey <tom@tromey.com>
4916
4917 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4918 * gdb_bfd.h (new_bfd_ref): Remove.
4919 (gdb_bfd_open): Update comment.
4920 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4921 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4922 (gdb_bfd_fdopenr): Use new_reference.
4923 * exec.c (exec_file_attach): Use new_reference.
4924
4925 2018-04-30 Tom Tromey <tom@tromey.com>
4926
4927 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4928 method.
4929
4930 2018-04-30 Tom Tromey <tom@tromey.com>
4931
4932 * jit.c (jit_read_code_entry): Use type_align.
4933 * i386-tdep.c (i386_gdbarch_init): Don't call
4934 set_gdbarch_long_long_align_bit.
4935 * gdbarch.sh: Remove long_long_align_bit.
4936 * gdbarch.c, gdbarch.h: Rebuild.
4937 * arc-tdep.c (arc_type_align): New function.
4938 (arc_gdbarch_init): Use arc_type_align. Don't call
4939 set_gdbarch_long_long_align_bit.
4940
4941 2018-04-30 Tom Tromey <tom@tromey.com>
4942
4943 * rust-lang.c (rust_type_alignment): Remove.
4944 (rust_composite_type): Use type_align.
4945
4946 2018-04-30 Tom Tromey <tom@tromey.com>
4947
4948 * NEWS: Mention Type.align.
4949 * python/py-type.c (typy_get_alignof): New function.
4950 (type_object_getset): Add "alignof".
4951
4952 2018-04-30 Tom Tromey <tom@tromey.com>
4953
4954 PR exp/17095:
4955 * NEWS: Update.
4956 * std-operator.def (UNOP_ALIGNOF): New operator.
4957 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4958 New.
4959 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4960 * c-lang.c (c_op_print_tab): Add alignof.
4961 * c-exp.y (ALIGNOF): New token.
4962 (exp): Add "ALIGNOF" production.
4963 (ident_tokens): Add _Alignof and alignof.
4964
4965 2018-04-30 Tom Tromey <tom@tromey.com>
4966
4967 * i386-tdep.c (i386_type_align): New function.
4968 (i386_gdbarch_init): Update.
4969 * gdbarch.sh (type_align): New method.
4970 * gdbarch.c, gdbarch.h: Rebuild.
4971 * arch-utils.h (default_type_align): Declare.
4972 * arch-utils.c (default_type_align): New function.
4973 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4974 (struct type) <align_log2>: New field.
4975 <instance_flags>: Now a bitfield.
4976 (TYPE_RAW_ALIGN): New macro.
4977 (type_align, type_raw_align, set_type_align): Declare.
4978 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4979 functions.
4980 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4981 (get_alignment, maybe_set_alignment): New functions.
4982 (read_structure_type, read_enumeration_type, read_array_type)
4983 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4984 (read_subrange_type, read_base_type): Set type alignment.
4985
4986 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4987
4988 * dwarf2read.c (read_index_from_section): Use bool.
4989
4990 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4991
4992 PR gdb/22950
4993 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4994 with #ifdef.
4995
4996 2018-04-29 John Reiser <jreiser@BitWagon.com>
4997
4998 PR build/22873
4999 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5000 last step, and do it atomically.
5001
5002 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5003
5004 * compile/compile-c-types.c (convert_int, convert_float):
5005 Update for C FE v1.
5006
5007 2018-04-27 Tom Tromey <tom@tromey.com>
5008
5009 PR rust/22545:
5010 * rust-lang.c (rust_inclusive_range_type_p): New function.
5011 (rust_range): Handle inclusive ranges.
5012 (rust_compute_range): Likewise.
5013 * rust-exp.y (struct rust_op) <inclusive>: New field.
5014 (DOTDOTEQ): New constant.
5015 (range_expr): Add "..=" productions.
5016 (operator_tokens): Add "..=" token.
5017 (ast_range): Add "inclusive" parameter.
5018 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5019 ranges.
5020 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5021 bounds values.
5022 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5023 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5024 Update comments.
5025 * expprint.c (print_subexp_standard): Handle new bounds values.
5026 (dump_subexp_body_standard): Likewise.
5027
5028 2018-04-27 Tom Tromey <tom@tromey.com>
5029
5030 * configure: Rebuild.
5031 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5032 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5033 "OVERRIDE".
5034 (class symbol_needs_eval_context): Likewise.
5035 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5036 (mock_mapped_index::symbol_name_at): Use "override". Remove
5037 "virtual".
5038 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5039 "override".
5040 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5041 * aarch64-tdep.c (instruction_reader::read): Use "override".
5042 (instruction_reader_test::read): Likewise.
5043 * arm-tdep.c (instruction_reader::read): Use "override".
5044 (instruction_reader_thumb::read): Likewise.
5045
5046 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5047
5048 PR remote/9665
5049 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5050 instead of remote_send.
5051 (remote_send): Remove.
5052
5053 2018-04-26 Pedro Alves <palves@redhat.com>
5054
5055 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5056 find_function_start_sal instead of find_pc_line.
5057
5058 2018-04-26 Pedro Alves <palves@redhat.com>
5059
5060 * breakpoint.c (set_breakpoint_location_function): Handle
5061 mst_data_gnu_ifunc.
5062 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5063 * elfread.c (elf_symtab_read): Give data symbols with
5064 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5065 (elf_rel_plt_read): Update comment.
5066 * linespec.c (convert_linespec_to_sals): Handle
5067 mst_data_gnu_ifunc.
5068 (minsym_found): Handle mst_data_gnu_ifunc.
5069 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5070 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5071 * parse.c (find_minsym_type_and_address): Handle
5072 mst_data_gnu_ifunc.
5073 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5074 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5075 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5076 comment.
5077 <mst_data_gnu_ifunc>: New enumerator.
5078
5079 2018-04-26 Pedro Alves <palves@redhat.com>
5080
5081 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5082 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5083 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5084 Handle it.
5085 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5086 (lookup_minimal_symbol_by_pc): Adjust.
5087 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5088 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5089 * minsyms.h (lookup_msym_prefer): New enum.
5090 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5091 parameter by a lookup_msym_prefer parameter.
5092
5093 2018-04-26 Pedro Alves <palves@redhat.com>
5094
5095 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5096 ends in "@plt" instead of looking at the symbol's section.
5097
5098 2018-04-26 Pedro Alves <palves@redhat.com>
5099
5100 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5101 all references.
5102 (find_pc_partial_function_gnu_ifunc): Rename to ...
5103 (find_pc_partial_function): ... this, and remove references to
5104 'is_gnu_ifunc_p'.
5105 (find_pc_partial_function): Delete old implementation.
5106 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5107
5108 2018-04-26 Pedro Alves <palves@redhat.com>
5109
5110 * linespec.c (struct bound_minimal_symbol_search_key): New.
5111 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5112 skip first line if we found a GNU ifunc minimal symbol by name.
5113 (compare_msymbols): Change parameters to work with a destructured
5114 lhs minsym.
5115 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5116 functions.
5117
5118 2018-04-26 Pedro Alves <palves@redhat.com>
5119
5120 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5121 ifunc targets here. Instead, if we have an ifunc minsym, use its
5122 address/name.
5123 (add_location_to_breakpoint): Store the minsym and the objfile in
5124 the breakpoint location.
5125 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5126 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5127 Record the minsym in the sal.
5128 * symtab.h (symtab_and_line) <msymbol>: New field.
5129
5130 2018-04-26 Pedro Alves <palves@redhat.com>
5131
5132 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5133 unless we actually resolved the ifunc.
5134
5135 2018-04-26 Pedro Alves <palves@redhat.com>
5136
5137 * c-exp.y (variable production): Prefer ifunc minsyms over
5138 regular function symbols.
5139 * symtab.c (find_gnu_ifunc): New function.
5140 * minsyms.h (lookup_msym_prefer): New enum.
5141 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5142 parameter by a lookup_msym_prefer parameter.
5143 * symtab.h (find_gnu_ifunc): New declaration.
5144
5145 2018-04-26 Pedro Alves <palves@redhat.com>
5146
5147 * blockframe.c (find_gnu_ifunc_target_type): New function.
5148 (find_function_type): New.
5149 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5150 return a value with a memory address.
5151 (eval_call): For calls to GNU ifunc functions, try to find the
5152 type of the target function from the type that the resolver
5153 returns.
5154 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5155 symbols.
5156 * infcall.c (find_function_return_type): Delete.
5157 (find_function_addr): Add 'function_type' parameter. For calls to
5158 GNU ifunc functions, try to find the type of the target function
5159 from the type that the resolver returns, and return it via
5160 FUNCTION_TYPE.
5161 (call_function_by_hand_dummy): Adjust to use the function type
5162 returned by find_function_addr.
5163 (find_function_addr): Add 'function_type' parameter and move
5164 description here.
5165 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5166 declarations.
5167
5168 2018-04-26 Pedro Alves <palves@redhat.com>
5169
5170 * c-exp.y (variable production): Skip finding an alias for ifunc
5171 symbols.
5172
5173 2018-04-26 Pedro Alves <palves@redhat.com>
5174
5175 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5176
5177 2018-04-25 Pedro Alves <palves@redhat.com>
5178
5179 * infcmd.c (kill_command): Print the pid as string, not the whole
5180 thread's ptid. Add comment. s/has been killed/killed/ in output
5181 message.
5182 * remote.c (remote_detach_1): Print the pid as string, not the
5183 whole thread's ptid.
5184
5185 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5186 Sergio Durigan Junior <sergiodj@redhat.com>
5187 Pedro Alves <palves@redhat.com>
5188
5189 * infcmd.c (kill_command): Print message when inferior has
5190 been killed.
5191 * inferior.c (print_inferior_events): Remove 'static'. Set as
5192 '1'.
5193 (add_inferior): Improve message printed when
5194 'print_inferior_events' is on.
5195 (exit_inferior): Remove message printed when
5196 'print_inferior_events' is on.
5197 (detach_inferior): Improve message printed when
5198 'print_inferior_events' is on.
5199 (initialize_inferiors): Use 'add_inferior_silent' to set
5200 'current_inferior_'.
5201 * inferior.h (print_inferior_events): Declare here as
5202 'extern'.
5203 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5204 '[Detaching...]' messages when 'print_inferior_events' is on.
5205 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5206 as prefix/suffix for messages. Remove periods. Fix erroneous
5207 'Detaching after fork from child...', replace it by '... from
5208 parent...'.
5209 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5210 prefix/suffix when printing 'Detaching...' messages. Print
5211 them when 'print_inferior_events' is on.
5212 * remote.c (remote_detach_1): Print message when detaching
5213 from inferior and '!is_fork_parent'.
5214
5215 2018-04-24 Tom Tromey <tom@tromey.com>
5216
5217 * cli-out.h: Reindent.
5218
5219 2018-04-24 Tom Tromey <tom@tromey.com>
5220
5221 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5222 (cli_ui_out::do_field_string): Use fputs_filtered.
5223 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5224
5225 2018-04-23 Tom Tromey <tom@tromey.com>
5226
5227 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5228 gdb::unique_xmalloc_ptr.
5229
5230 2018-04-23 Tom Tromey <tom@tromey.com>
5231
5232 * configure: Rebuild.
5233
5234 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5235
5236 PR gdb/23095
5237 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5238 prepare_for_testing. Set normal_bp to r_debug_state if target
5239 is bsd.
5240
5241 2018-04-21 Pedro Alves <palves@redhat.com>
5242 Rajendra SY <rajendra.sy@gmail.com>
5243
5244 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5245 * remote.c (extended_remote_attach): In all-stop mode, mark the
5246 thread as executing.
5247
5248 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5249
5250 * thread.c (thread_apply_all_command): Fix comment.
5251 (thread_command): Fix comment.
5252
5253 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5254
5255 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5256 parameter.
5257 * features/aarch64-core.c (create_feature_aarch64_core):
5258 Regenerate.
5259 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5260 Likewise.
5261 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5262 Likewise.
5263 * features/i386/32bit-avx512.c
5264 (create_feature_i386_32bit_avx512): Likewise.
5265 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5266 Likewise.
5267 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5268 Likewise.
5269 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5270 Likewise.
5271 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5272 Likewise.
5273 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5274 Likewise.
5275 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5276 Likewise.
5277 * features/i386/64bit-avx512.c
5278 (create_feature_i386_64bit_avx512): Likewise.
5279 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5280 Likewise.
5281 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5282 Likewise.
5283 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5284 Likewise.
5285 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5286 Likewise.
5287 * features/i386/64bit-segments.c
5288 (create_feature_i386_64bit_segments): Likewise.
5289 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5290 Likewise.
5291 * features/i386/x32-core.c
5292 (create_feature_i386_x32_core): Likewise.
5293 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5294 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5295 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5296 * target-descriptions.c: In generated code, don't pass xml
5297 filename.
5298
5299 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5300
5301 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5302 (print_xml_feature::visit_post): Likewise.
5303 (print_xml_feature::visit): Likewise.
5304 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5305 (print_xml_feature): Add new class.
5306 * regformats/regdat.sh: Null xmltarget on feature targets.
5307 * target-descriptions.c (struct target_desc): Add xmltarget.
5308 (maintenance_check_tdesc_xml_convert): Add unittest function.
5309 (tdesc_get_features_xml): Add function to get xml.
5310 (maintenance_check_xml_descriptions): Test xml generation.
5311 * xml-tdesc.c (string_read_description_xml): Add function.
5312 * xml-tdesc.h (string_read_description_xml): Add declaration.
5313
5314 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5315
5316 * features/Makefile: Add feature marker to targets with new style
5317 target descriptions.
5318 * regformats/aarch64.dat: Regenerate.
5319 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5320 * regformats/i386/amd64-avx-linux.dat: Likewise.
5321 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5322 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5323 * regformats/i386/amd64-linux.dat: Likewise.
5324 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5325 * regformats/i386/amd64.dat: Likewise.
5326 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5327 * regformats/i386/i386-avx-linux.dat: Likewise.
5328 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5329 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5330 * regformats/i386/i386-linux.dat: Likewise.
5331 * regformats/i386/i386-mmx-linux.dat: Likewise.
5332 * regformats/i386/i386-mpx-linux.dat: Likewise.
5333 * regformats/i386/i386.dat: Likewise.
5334 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5335 * regformats/i386/x32-avx-linux.dat: Likewise.
5336 * regformats/i386/x32-linux.dat: Likewise.
5337 * regformats/tic6x-c62x-linux.dat: Likewise.
5338 * regformats/tic6x-c64x-linux.dat: Likewise.
5339 * regformats/tic6x-c64xp-linux.dat: Likewise.
5340 * regformats/regdat.sh: Parse feature marker.
5341
5342 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5343
5344 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5345 (tdesc_osabi_name): Likewise.
5346 * target-descriptions.c (tdesc_architecture_name): Add new
5347 function.
5348 (tdesc_osabi_name): Likewise.
5349
5350 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5351
5352 * common/tdesc.c (tdesc_predefined_type): Move to here.
5353 (tdesc_named_type): Likewise.
5354 (tdesc_create_vector): Likewise.
5355 (tdesc_create_struct): Likewise.
5356 (tdesc_set_struct_size): Likewise.
5357 (tdesc_create_union): Likewise.
5358 (tdesc_create_flags): Likewise.
5359 (tdesc_create_enum): Likewise.
5360 (tdesc_add_field): Likewise.
5361 (tdesc_add_typed_bitfield): Likewise.
5362 (tdesc_add_bitfield): Likewise.
5363 (tdesc_add_flag): Likewise.
5364 (tdesc_add_enum_value): Likewise.
5365 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5366 (struct tdesc_type_vector): Likewise.
5367 (struct tdesc_type_field): Likewise.
5368 (struct tdesc_type_with_fields): Likewise.
5369 (tdesc_create_enum): Add declaration.
5370 (tdesc_add_typed_bitfield): Likewise.
5371 (tdesc_add_enum_value): Likewise.
5372 * target-descriptions.c (tdesc_type_field): Move from here.
5373 (tdesc_type_builtin): Likewise.
5374 (tdesc_type_vector): Likewise.
5375 (tdesc_type_with_fields): Likewise.
5376 (tdesc_predefined_types): Likewise.
5377 (tdesc_named_type): Likewise.
5378 (tdesc_create_vector): Likewise.
5379 (tdesc_create_struct): Likewise.
5380 (tdesc_set_struct_size): Likewise.
5381 (tdesc_create_union): Likewise.
5382 (tdesc_create_flags): Likewise.
5383 (tdesc_create_enum): Likewise.
5384 (tdesc_add_field): Likewise.
5385 (tdesc_add_typed_bitfield): Likewise.
5386 (tdesc_add_bitfield): Likewise.
5387 (tdesc_add_flag): Likewise.
5388 (tdesc_add_enum_value): Likewise.
5389 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5390 (tdesc_add_typed_bitfield): Likewise.
5391 (tdesc_add_enum_value): Likewise.
5392
5393 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5394
5395 * common/tdesc.c (tdesc_feature::accept): Move to here.
5396 (tdesc_feature::operator==): Likewise.
5397 (tdesc_create_reg): Likewise.
5398 * common/tdesc.h (tdesc_type_kind): Likewise.
5399 (struct tdesc_type): Likewise.
5400 (struct tdesc_feature): Likewise.
5401 * regformats/regdat.sh: Create a feature.
5402 * target-descriptions.c (tdesc_type_kind): Move from here.
5403 (tdesc_type): Likewise.
5404 (tdesc_type_up): Likewise.
5405 (tdesc_feature): Likewise.
5406 (tdesc_create_reg): Likewise.
5407
5408 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5409
5410 * Makefile.in: Add arch/tdesc.c
5411 * common/tdesc.c: New file.
5412 * common/tdesc.h (tdesc_element_visitor): Move to here.
5413 (tdesc_element): Likewise.
5414 (tdesc_reg): Likewise.
5415 (tdesc_reg_up): Likewise.
5416 * regformats/regdef.h (reg): Add offset to constructors.
5417 * target-descriptions.c (tdesc_element_visitor): Move from here.
5418 (tdesc_element): Likewise.
5419 (tdesc_reg): Likewise.
5420 (tdesc_reg_up): Likewise.
5421
5422 2018-04-17 Tom Tromey <tom@tromey.com>
5423
5424 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5425 discriminant field.
5426
5427 2018-04-17 Tom Tromey <tom@tromey.com>
5428
5429 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5430
5431 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5432
5433 * symtab.c (print_symbol_info): Skip printing filename and line
5434 number when `last' is NULL.
5435 (symtab_symbol_info): Use empty string instead of NULL for first
5436 invocation of print_symbol_info.
5437 (rbreak_command): Pass NULL to `last' parameter of
5438 print_symbol_info.
5439
5440 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5441
5442 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5443 instead of nullptr.
5444
5445 2018-04-16 Pedro Alves <palves@redhat.com>
5446
5447 * MAINTAINERS (sh): Remove.
5448 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5449 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5450 (ALLDEPFILES): Remove sh64-tdep.c.
5451 * NEWS: Mentions that support for SH-5/SH64 is removed.
5452 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5453 (sh*-*-openbsd*): Ditto.
5454 (sh64-*-elf*): Remove.
5455 (sh*): Remove.
5456 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5457 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5458 * sh-tdep.c: No longer include "sh64-tdep.h".
5459 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5460 * sh64-tdep.c, sh64-tdep.h: Remove files.
5461
5462 2018-04-16 Pedro Alves <palves@redhat.com>
5463
5464 * MAINTAINERS: Remove m88k.
5465 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5466 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5467 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5468 * NEWS: Mention that support for m88k was removed.
5469 * configure.host (m88*-*-*): Remove support.
5470 * configure.nat (m88k-*-*): Remove support.
5471 * configure.tgt (m88*-*-openbsd*): Remove.
5472 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5473
5474 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5475
5476 * configure.tgt (x86_tobjs): New variable.
5477 (amd64_tobjs, i386_tobjs): Use it.
5478
5479 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5480
5481 * symtab.c (print_symbol_info): Precede the symbol definition by
5482 the line number when available.
5483 * NEWS: Advertise this enhancement.
5484
5485 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5486
5487 * NEWS (New options): announce set/show record btrace cpu.
5488 * btrace.c: Include record-btrace.h.
5489 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5490 the vendor is unknown.
5491 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5492 Maybe overwrite the btrace configuration's cpu.
5493 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5494 (btrace_fetch): Add cpu parameter. Update callers.
5495 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5496 Maybe overwrite the btrace configuration's cpu. Skip enabling
5497 errata workarounds if the vendor is unknown.
5498 * python/py-record-btrace.c: Include record-btrace.h.
5499 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5500 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5501 * record-btrace.c (record_btrace_cpu_state_kind): New.
5502 (record_btrace_cpu): New.
5503 (set_record_btrace_cpu_cmdlist): New.
5504 (record_btrace_get_cpu): New.
5505 (require_btrace_thread, record_btrace_info)
5506 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5507 (cmd_set_record_btrace_cpu_none): New.
5508 (cmd_set_record_btrace_cpu_auto): New.
5509 (cmd_set_record_btrace_cpu): New.
5510 (cmd_show_record_btrace_cpu): New.
5511 (_initialize_record_btrace): Initialize set/show record btrace cpu
5512 commands.
5513 * record-btrace.h (record_btrace_get_cpu): New.
5514
5515 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5516
5517 * record.c (set_record_command): Fix typo in message.
5518
5519 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5520
5521 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5522
5523 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5524
5525 * infrun.c (process_event_stop_test): Call
5526 gdbarch_in_indirect_branch_thunk.
5527 * gdbarch.sh (in_indirect_branch_thunk): New.
5528 * gdbarch.c: Regenerated.
5529 * gdbarch.h: Regenerated.
5530 * x86-tdep.h: New.
5531 * x86-tdep.c: New.
5532 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5533 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5534 (ALLDEPFILES): Add x86-tdep.c.
5535 * arch-utils.h (default_in_indirect_branch_thunk): New.
5536 * arch-utils.c (default_in_indirect_branch_thunk): New.
5537 * i386-tdep: Include x86-tdep.h.
5538 (i386_in_indirect_branch_thunk): New.
5539 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5540 function.
5541 * amd64-tdep: Include x86-tdep.h.
5542 (amd64_in_indirect_branch_thunk): New.
5543 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5544
5545 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5546
5547 PR gdb/23053
5548 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5549 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5550 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5551 regression.
5552
5553 2018-04-12 Tom Tromey <tom@tromey.com>
5554
5555 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5556 (rust_evaluate_subexp): Likewise.
5557
5558 2018-04-12 Pedro Alves <palves@redhat.com>
5559
5560 * procfs.c (procfs_detach): Make forward declaration's prototype
5561 match definition's protototype.
5562 (proc_get_LDT_entry): Remove stale do_cleanups call.
5563
5564 2018-04-12 Pedro Alves <palves@redhat.com>
5565
5566 * target.h (target_ops::to_has_exited): Delete.
5567 (target_has_exited): Delete.
5568 * target-delegates.c: Regenerate.
5569
5570 2018-04-11 Pedro Alves <palves@redhat.com>
5571
5572 * target.c (fileio_fh_t::t): Add comment.
5573 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5574 (target_fileio_close): Handle a NULL target.
5575 (invalidate_fileio_fh): New.
5576 (target_close): Call it.
5577 * remote.c (remote_hostio_send_command): No longer check whether
5578 remote_desc is open.
5579
5580 2018-04-11 Pedro Alves <palves@redhat.com>
5581
5582 * target.c (fileio_fh_t): Make it a named struct instead of a
5583 typedef.
5584 (fileio_fh_t::is_closed): New method.
5585 (DEF_VEC_O (fileio_fh_t)): Remove.
5586 (fileio_fhandles): Now a std::vector.
5587 (is_closed_fileio_fh): Delete.
5588 (acquire_fileio_fd): Adjust. Rename parameters.
5589 (release_fileio_fd): Adjust.
5590 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5591 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5592 (target_fileio_close): Adjust.
5593
5594 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5595
5596 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5597 index.
5598
5599 2018-04-10 Pedro Alves <palves@redhat.com>
5600
5601 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5602 (scoped_finish_thread_state): New class.
5603 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5604 cleanup.
5605 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5606 (fetch_inferior_event, normal_stop): Likewise.
5607 * thread.c (finish_thread_state_cleanup): Delete.
5608
5609 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5610 Pedro Alves <palves@redhat.com>
5611
5612 * value.c: Include "selftest.h" and "common/array-view.h".
5613 (struct range) <operator ==>: New.
5614 (test_ranges_contain): New.
5615 (check_ranges_vector): New.
5616 (test_insert_into_bit_range_vector): New.
5617 (_initialize_values): Register selftests.
5618 * common/array-view.h (operator==, operator!=): New.
5619
5620 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5621
5622 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5623 an iterator.
5624 * inline-frame.c: Include <algorithm>.
5625 (struct inline_state): Add constructor.
5626 (inline_state_s): Remove.
5627 (DEF_VEC_O(inline_state_s)): Remove.
5628 (inline_states): Change type to std::vector.
5629 (find_inline_frame_state): Adjust to std::vector.
5630 (allocate_inline_frame_state): Remove.
5631 (clear_inline_frame_state): Adjust to std::vector.
5632 (skip_inline_frames): Adjust to std::vector.
5633
5634 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5635
5636 * tracepoint.h (struct trace_state_variable): Add constructor.
5637 <name>: Change type to std::string.
5638 * tracepoint.c (tsv_s): Remove.
5639 (DEF_VEC_O(tsv_s)): Remove.
5640 (tvariables): Change to std::vector.
5641 (create_trace_state_variable): Adjust to std::vector.
5642 (find_trace_state_variable): Likewise.
5643 (find_trace_state_variable_by_number): Likewise.
5644 (delete_trace_state_variable): Likewise.
5645 (trace_variable_command): Adjust to std::string.
5646 (delete_trace_variable_command): Likewise.
5647 (tvariables_info_1): Adjust to std::vector.
5648 (save_trace_state_variables): Likewise.
5649 (start_tracing): Likewise.
5650 (merge_uploaded_trace_state_variables): Adjust to std::vector
5651 and std::string.
5652 * target.h (struct target_ops)
5653 <to_download_trace_state_variable>: Pass reference to
5654 trace_state_variable.
5655 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5656 * target-delegates.c: Re-generate.
5657 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5658 (mi_tsv_deleted): Likewise.
5659 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5660 * remote.c (remote_download_trace_state_variable): Change
5661 pointer to reference and adjust.
5662 * make-target-delegates (parse_argtypes): Handle references.
5663 (write_function_header): Likewise.
5664 (munge_type): Likewise.
5665
5666 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5667
5668 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5669 string_view-selftests.c.
5670 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5671 testsuite.
5672 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5673 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5674 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5675 * unittests/basic_string_view/element_access/char/1.cc:
5676 Likewise.
5677 * unittests/basic_string_view/element_access/char/empty.cc:
5678 Likewise.
5679 * unittests/basic_string_view/element_access/char/front_back.cc:
5680 Likewise.
5681 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5682 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5683 Likewise.
5684 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5685 Likewise.
5686 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5687 Likewise.
5688 * unittests/basic_string_view/operations/compare/char/1.cc:
5689 Likewise.
5690 * unittests/basic_string_view/operations/compare/char/13650.cc:
5691 Likewise.
5692 * unittests/basic_string_view/operations/copy/char/1.cc:
5693 Likewise.
5694 * unittests/basic_string_view/operations/data/char/1.cc:
5695 Likewise.
5696 * unittests/basic_string_view/operations/find/char/1.cc:
5697 Likewise.
5698 * unittests/basic_string_view/operations/find/char/2.cc:
5699 Likewise.
5700 * unittests/basic_string_view/operations/find/char/3.cc:
5701 Likewise.
5702 * unittests/basic_string_view/operations/find/char/4.cc:
5703 Likewise.
5704 * unittests/basic_string_view/operations/rfind/char/1.cc:
5705 Likewise.
5706 * unittests/basic_string_view/operations/rfind/char/2.cc:
5707 Likewise.
5708 * unittests/basic_string_view/operations/rfind/char/3.cc:
5709 Likewise.
5710 * unittests/basic_string_view/operations/substr/char/1.cc:
5711 Likewise.
5712 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5713 * unittests/string_view-selftests.c: New file.
5714
5715 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5716
5717 * unittests/basic_string_view/capacity/1.cc: New file.
5718 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5719 * unittests/basic_string_view/cons/char/1.cc: New file.
5720 * unittests/basic_string_view/cons/char/2.cc: New file.
5721 * unittests/basic_string_view/cons/char/3.cc: New file.
5722 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5723 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5724 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5725 * unittests/basic_string_view/element_access/char/1.cc: New file.
5726 * unittests/basic_string_view/element_access/char/2.cc: New file.
5727 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5728 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5729 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5730 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5731 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5732 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5733 * unittests/basic_string_view/include.cc: New file.
5734 * unittests/basic_string_view/inserters/char/1.cc: New file.
5735 * unittests/basic_string_view/inserters/char/2.cc: New file.
5736 * unittests/basic_string_view/inserters/char/3.cc: New file.
5737 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5738 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5739 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5740 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5741 * unittests/basic_string_view/literals/types.cc: New file.
5742 * unittests/basic_string_view/literals/values.cc: New file.
5743 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5744 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5745 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5746 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5747 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5748 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5749 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5750 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5751 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5752 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5753 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5754 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5755 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5756 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5757 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5758 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5759 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5760 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5761 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5762 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5763 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5764 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5765 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5766 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5767 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5768 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5769 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5770 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5771 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5772 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5773 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5774 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5775 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5776 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5777 * unittests/basic_string_view/operators/char/2.cc: New file.
5778 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5779 * unittests/basic_string_view/range_access/char/1.cc: New file.
5780 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5781 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5782 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5783 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5784 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5785 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5786 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5787 * unittests/basic_string_view/typedefs.cc: New file.
5788 * unittests/basic_string_view/types/1.cc: New file.
5789
5790 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5791
5792 * common/gdb_string_view.h: Remove libstdc++ implementation
5793 details, adjust to gdb reality.
5794 * common/gdb_string_view.tcc: Likewise.
5795 * cli/cli-script.c (struct string_view): Remove.
5796 (user_args) <m_args>: Change element type to gdb::string_view.
5797 (user_args::insert_args): Adjust.
5798
5799 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5800
5801 * common/gdb_string_view.h: New file.
5802 * common/gdb_string_view.tcc: New file.
5803
5804 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5805
5806 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5807 * configure: Re-generate.
5808
5809 2018-04-09 Pedro Alves <palves@redhat.com>
5810
5811 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5812 (set_target_gdbarch): Call
5813 gdb::observers::architecture_changed.notify instead of
5814 observer_notify_architecture_changed.
5815
5816 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5817
5818 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5819 (do_restore_current_traceframe_cleanup): Remove.
5820 (restore_current_traceframe_cleanup_dtor): Remove.
5821 (make_cleanup_restore_current_traceframe): Remove.
5822 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5823 New.
5824 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5825 * infrun.c (fetch_inferior_event): Use
5826 scoped_restore_current_traceframe.
5827
5828 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5829
5830 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5831 Remove.
5832 <n_allocated_type_units>: Remove.
5833 <all_type_units>: Change to std::vector.
5834 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5835 to std::vector change.
5836 (dwarf2_per_objfile::get_cutu): Likewise.
5837 (dwarf2_per_objfile::get_tu): Likewise.
5838 (create_signatured_type_table_from_index): Likewise.
5839 (create_signatured_type_table_from_debug_names): Likewise.
5840 (dw2_symtab_iter_next): Likewise.
5841 (dw2_print_stats): Likewise.
5842 (dw2_expand_all_symtabs): Likewise.
5843 (dw2_expand_marked_cus): Likewise.
5844 (dw2_debug_names_iterator::next): Likewise.
5845 (dwarf2_initialize_objfile): Likewise.
5846 (add_signatured_type_cu_to_table): Likewise.
5847 (create_all_type_units): Likewise.
5848 (add_type_unit): Likewise.
5849 (struct tu_abbrev_offset): Add constructor.
5850 (build_type_psymtabs_1): Adjust to std::vector change.
5851 (print_tu_stats): Likewise.
5852 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5853 (write_debug_names): Likewise.
5854
5855 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5856
5857 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5858 Make an std::vector.
5859 <n_comp_units>: Remove.
5860 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5861 to std::vector change.
5862 (dwarf2_per_objfile::get_cutu): Likewise.
5863 (dwarf2_per_objfile::get_cu): Likewise.
5864 (create_cus_from_index): Likewise.
5865 (create_addrmap_from_index): Likewise.
5866 (create_addrmap_from_aranges): Likewise.
5867 (dwarf2_read_index): Likewise.
5868 (dw2_find_last_source_symtab): Likewise.
5869 (dw2_map_symtabs_matching_filename): Likewise.
5870 (dw2_symtab_iter_next): Likewise.
5871 (dw2_print_stats): Likewise.
5872 (dw2_expand_all_symtabs): Likewise.
5873 (dw2_expand_symtabs_with_fullname): Likewise.
5874 (dw2_expand_marked_cus): Likewise.
5875 (dw2_map_symbol_filenames): Likewise.
5876 (create_cus_from_debug_names): Likewise.
5877 (dwarf2_read_debug_names): Likewise.
5878 (dw2_debug_names_iterator::next): Likewise.
5879 (dwarf2_initialize_objfile): Likewise.
5880 (set_partial_user): Likewise.
5881 (dwarf2_build_psymtabs_hard): Likewise.
5882 (read_comp_units_from_section): Remove arguments, adjust to
5883 std::vector change.
5884 (create_all_comp_units): Adjust to std::vector and
5885 read_comp_units_from_section changes.
5886 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5887 change.
5888 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5889 (psyms_seen_size): Likewise.
5890 (write_gdbindex): Likewise.
5891 (write_debug_names): Likewise.
5892
5893 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5894
5895 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5896 with dwarf2_per_objfile.
5897 (create_cus_from_index): Likewise.
5898 (create_signatured_type_table_from_index): Likewise.
5899 (dwarf2_read_index): Likewise.
5900 (dwarf2_initialize_objfile): Likewise.
5901 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5902 per_cu rather than get_dwarf2_per_objfile.
5903
5904 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5905
5906 * dwarf2read.h (struct signatured_type): Forward declare.
5907 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5908 New methods.
5909 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5910 (dw2_get_cutu): ...this.
5911 (dwarf2_per_objfile::get_cu): Rename from...
5912 (dw2_get_cu): ...this.
5913 (dwarf2_per_objfile::get_tu): New.
5914 (create_addrmap_from_index): Adjust.
5915 (create_addrmap_from_aranges): Adjust.
5916 (dw2_find_last_source_symtab): Adjust.
5917 (dw2_map_symtabs_matching_filename): Adjust.
5918 (dw2_symtab_iter_next): Adjust.
5919 (dw2_print_stats): Adjust.
5920 (dw2_expand_all_symtabs): Adjust.
5921 (dw2_expand_symtabs_with_fullname): Adjust.
5922 (dw2_expand_marked_cus): Adjust.
5923 (dw_expand_symtabs_matching_file_matcher): Adjust.
5924 (dw2_map_symbol_filenames): Adjust.
5925 (dw2_debug_names_iterator::next): Adjust.
5926 (dwarf2_initialize_objfile): Adjust.
5927 (set_partial_user): Adjust.
5928 (dwarf2_build_psymtabs_hard): Adjust.
5929
5930 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5931
5932 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5933 Remove unused variables.
5934 (dw2_map_symtabs_matching_filename): Likewise.
5935 (dwarf2_record_block_ranges): Likewise.
5936 (dwarf2_read_addr_index): Likewise.
5937 (follow_die_offset): Likewise.
5938
5939 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5940
5941 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5942 to symbol_file_add_main.
5943
5944 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5945
5946 PR mi/22299
5947 * mi/mi-console.c (do_fputc_async_safe): New.
5948 (mi_console_file::write_async_safe): New.
5949 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5950 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5951 New.
5952 * ui-file.c (ui_file::putstrn): Adjust call to
5953 fputstrn_unfiltered.
5954 * utils.c (printchar): Replace do_fputs and do_fprintf
5955 parameters by do_fputc.
5956 (fputstr_filtered): Adjust call to printchar.
5957 (fputstr_unfiltered): Likewise.
5958 (fputstrn_filtered): Likewise.
5959 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5960 printchar.
5961 * utils.h (do_fputc_ftype): New typedef.
5962 (fputstrn_unfiltered): Add do_fputc parameter.
5963
5964 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5965
5966 * regformats/i386/i386-avx.dat: Remove.
5967
5968 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5969
5970 PR gdb/22979
5971 * amd64-tdep.c (amd64_none_init_abi): New function.
5972 (amd64_x32_none_init_abi): New function.
5973 (_initialize_amd64_tdep): Register handlers for x86-64 and
5974 x64_32 with GDB_OSABI_NONE.
5975 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5976 GDB_OSABI_NONE osabi.
5977
5978 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5979
5980 PR gdb/22980
5981 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5982 GDB_OSABI_NONE.
5983 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5984 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5985
5986 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5987
5988 * common/byte-vector.h (char_vector): New type.
5989 * target.h (target_read_alloc): Return
5990 gdb::optional<byte_vector>.
5991 (target_read_stralloc): Return gdb::optional<char_vector>.
5992 (target_get_osdata): Return gdb::optional<char_vector>.
5993 * target.c (target_read_alloc_1): Templatize. Replacement
5994 manual memory management with vector.
5995 (target_read_alloc): Change return type, adjust.
5996 (target_read_stralloc): Change return type, adjust.
5997 (target_get_osdata): Change return type, adjust.
5998 * auxv.c (struct auxv_info) <length>: Remove.
5999 <data>: Change type to gdb::optional<byte_vector>.
6000 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6001 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6002 (target_auxv_search): Adjust.
6003 (fprint_target_auxv): Adjust.
6004 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6005 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6006 (linux_make_corefile_notes): Adjust.
6007 * osdata.c (get_osdata): Adjust.
6008 * remote.c (remote_get_threads_with_qxfer): Adjust.
6009 (remote_memory_map): Adjust.
6010 (remote_traceframe_info): Adjust.
6011 (btrace_read_config): Adjust.
6012 (remote_read_btrace): Adjust.
6013 (remote_pid_to_exec_file): Adjust.
6014 * solib-aix.c (solib_aix_get_library_list): Adjust.
6015 * solib-dsbt.c (decode_loadmap): Don't free buf.
6016 (dsbt_get_initial_loadmaps): Adjust.
6017 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6018 * solib-target.c (solib_target_current_sos): Adjust.
6019 * tracepoint.c (sdata_make_value): Adjust.
6020 * xml-support.c (xinclude_start_include): Adjust.
6021 (xml_fetch_content_from_file): Adjust.
6022 * xml-support.h (xml_fetch_another): Change return type.
6023 (xml_fetch_content_from_file): Change return type.
6024 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6025 * xml-tdesc.c (file_read_description_xml): Adjust.
6026 (fetch_available_features_from_target): Change return type.
6027 (target_fetch_description_xml): Adjust.
6028 (target_read_description_xml): Adjust.
6029
6030 2018-04-06 Tom Tromey <tom@tromey.com>
6031
6032 * value.c (~value): Update.
6033 (struct value) <contents>: Now unique_xmalloc_ptr.
6034 (value_contents_bits_eq, allocate_value_contents)
6035 (value_contents_raw, value_contents_all_raw)
6036 (value_contents_for_printing, value_contents_for_printing_const)
6037 (set_value_enclosing_type): Update.
6038
6039 2018-04-06 Tom Tromey <tom@tromey.com>
6040
6041 * value.c (range_s): Remove typedef, VEC.
6042 (struct range): Add operator<.
6043 (range_lessthan): Remove.
6044 (ranges_contain): Change type.
6045 (~value): Update.
6046 (struct value) <unavailable, optimized_out>: Now std::vector.
6047 (value_entirely_available)
6048 (value_entirely_covered_by_range_vector)
6049 (value_entirely_unavailable, value_entirely_optimized_out):
6050 Update.
6051 (insert_into_bit_range_vector): Change argument type.
6052 (find_first_range_overlap): Likewise.
6053 (struct ranges_and_idx, value_contents_bits_eq)
6054 (require_not_optimized_out, require_available): Update.
6055 (ranges_copy_adjusted): Change argument types.
6056 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6057
6058 2018-04-06 Tom Tromey <tom@tromey.com>
6059
6060 * value.c (~value): Update.
6061 (struct value) <parent>: Now a value_ref_ptr.
6062 (value_parent, set_value_parent, value_address, value_copy):
6063 Update.
6064
6065 2018-04-06 Tom Tromey <tom@tromey.com>
6066
6067 * value.c (struct value): Add constructor, destructor, and member
6068 initializers.
6069 (allocate_value_lazy, value_decref): Update.
6070
6071 2018-04-06 Tom Tromey <tom@tromey.com>
6072
6073 * value.c (struct value) <released, next>: Remove.
6074 (all_values): Now a std::vector.
6075 (allocate_value_lazy): Update.
6076 (value_next): Remove.
6077 (value_mark, value_free_to_mark, release_value)
6078 (value_release_to_mark): Update.
6079
6080 2018-04-06 Tom Tromey <tom@tromey.com>
6081
6082 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6083 (free_value_chain): Remove.
6084 * value.c (free_value_chain): Remove.
6085 (value_release_to_mark): Return a std::vector.
6086 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6087 std::vector.
6088 (check_condition): Update.
6089 * eval.c (fetch_subexp_value): Change "val_chain" to a
6090 std::vector.
6091 * breakpoint.c (update_watchpoint): Update.
6092 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6093
6094 2018-04-06 Tom Tromey <tom@tromey.com>
6095
6096 * value.h (free_all_values): Remove.
6097 * value.c (free_all_values): Remove.
6098
6099 2018-04-06 Tom Tromey <tom@tromey.com>
6100
6101 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6102 (value_history_chain, value_history_count): Remove.
6103 (value_history): New global.
6104 (record_latest_value, access_value_history, show_values)
6105 (preserve_values): Update.
6106
6107 2018-04-06 Tom Tromey <tom@tromey.com>
6108
6109 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6110 * varobj.c (varobj_set_display_format, varobj_set_value)
6111 (install_default_visualizer, construct_visualizer)
6112 (install_new_value, ~varobj, varobj_get_value_type)
6113 (my_value_of_variable, varobj_editable_p): Update.
6114 * c-varobj.c (c_describe_child, c_value_of_variable)
6115 (cplus_number_of_children, cplus_describe_child): Update.
6116 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6117 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6118 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6119
6120 2018-04-06 Tom Tromey <tom@tromey.com>
6121
6122 * printcmd.c (last_examine_address): Change type to
6123 value_ref_ptr.
6124 (do_examine, x_command): Update.
6125
6126 2018-04-06 Tom Tromey <tom@tromey.com>
6127
6128 * value.c (release_value): Update.
6129 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6130 (struct bpstats) <val>: Now a value_ref_ptr.
6131 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6132 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6133 (~watchpoint, print_it_watchpoint, watch_command_1)
6134 (invalidate_bp_value_on_memory_change): Update.
6135
6136 2018-04-06 Tom Tromey <tom@tromey.com>
6137
6138 * varobj.c (varobj_clear_saved_item)
6139 (update_dynamic_varobj_children, install_new_value, ~varobj):
6140 Update.
6141 * value.h (value_incref): Move declaration earlier.
6142 (value_decref): Rename from value_free.
6143 (struct value_ref_policy): New.
6144 (value_ref_ptr): New typedef.
6145 (struct value_deleter): Remove.
6146 (gdb_value_up): Remove typedef.
6147 (release_value): Change return type.
6148 (release_value_or_incref): Remove.
6149 * value.c (set_value_parent): Update.
6150 (value_incref): Change return type.
6151 (value_decref): Rename from value_free.
6152 (value_free_to_mark, free_all_values, free_value_chain): Update.
6153 (release_value): Return value_ref_ptr.
6154 (release_value_or_incref): Remove.
6155 (record_latest_value, set_internalvar, clear_internalvar):
6156 Update.
6157 * stack.c (info_frame_command): Don't call value_free.
6158 * python/py-value.c (valpy_dealloc, valpy_new)
6159 (value_to_value_object): Update.
6160 * printcmd.c (do_examine): Update.
6161 * opencl-lang.c (lval_func_free_closure): Update.
6162 * mi/mi-main.c (register_changed_p): Don't call value_free.
6163 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6164 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6165 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6166 value_free.
6167 * guile/scm-value.c (vlscm_free_value_smob)
6168 (vlscm_scm_from_value): Update.
6169 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6170 (frame_unwind_register_unsigned, get_frame_register_bytes)
6171 (put_frame_register_bytes): Don't call value_free.
6172 * findvar.c (address_from_register): Don't call value_free.
6173 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6174 * dwarf2loc.c (entry_data_value_free_closure)
6175 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6176 (dwarf2_evaluate_loc_desc_full): Update.
6177 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6178 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6179 (~watchpoint, watch_command_1)
6180 (invalidate_bp_value_on_memory_change): Update.
6181 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6182
6183 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6184
6185 PR gdb/23022
6186 * warning.m4: Add -Wno-error=deprecated-register.
6187 * configure: Re-generate.
6188
6189 2018-04-05 Tom Tromey <tom@tromey.com>
6190
6191 * linespec.h: Remove include of "vec.h".
6192
6193 2018-04-05 Tom Tromey <tom@tromey.com>
6194
6195 * linespec.c (typep): Remove typedef.
6196 (find_methods, find_superclass_methods): Take a std::vector.
6197 (find_method): Use std::vector.
6198
6199 2018-04-05 Tom Tromey <tom@tromey.com>
6200
6201 * utils.c (compare_strings): Remove.
6202 * utils.h (compare_strings): Remove.
6203 * objc-lang.h (find_imps): Update.
6204 * objc-lang.c (find_methods): Take a std::vector.
6205 (uniquify_strings, find_imps): Likewise.
6206 * linespec.c (find_methods): Take a std::vector.
6207 (decode_objc): Use std::vector.
6208 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6209 a std::vector.
6210 (find_method, find_function_symbols): Use std::vector.
6211
6212 2018-04-05 Tom Tromey <tom@tromey.com>
6213
6214 * completer.c (completion_tracker::completion_tracker): Remove
6215 cast.
6216 (completion_tracker::discard_completions): Likewise.
6217 * breakpoint.c (ambiguous_names_p): Remove cast.
6218 * ada-lang.c (_initialize_ada_language): Remove cast.
6219 * utils.h (streq): Update.
6220 (streq_hash): Add new declaration.
6221 * utils.c (streq): Return bool.
6222 (streq_hash): New function.
6223
6224 2018-04-05 Tom Tromey <tom@tromey.com>
6225
6226 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6227 Remove a string copy.
6228
6229 2018-04-05 Tom Tromey <tom@tromey.com>
6230
6231 * linespec.c (filter_results): Use std::vector.
6232 (decode_line_2, decode_line_full): Update.
6233
6234 2018-04-05 Tom Tromey <tom@tromey.com>
6235
6236 * linespec.c (canonical_to_fullform): Return std::string.
6237 (filter_results): Update.
6238 (struct decode_line_2_item): Add constructor.
6239 <fullform, displayform>: Now std::string.
6240 (decode_line_2_compare_items): Now a std::sort comparator.
6241 (decode_line_2): Update.
6242
6243 2018-04-05 Tom Tromey <tom@tromey.com>
6244
6245 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6246 (unexpected_linespec_error): Update.
6247 (linespec_parse_basic, parse_linespec): Update.
6248
6249 2018-04-05 Tom Tromey <tom@tromey.com>
6250
6251 * linespec.c (linespec_parse_basic): Reindent.
6252
6253 2018-04-05 Tom Tromey <tom@tromey.com>
6254
6255 * minsyms.h (iterate_over_minimal_symbols): Update.
6256 * minsyms.c (iterate_over_minimal_symbols): Take a
6257 gdb::function_view.
6258 * linespec.c (struct collect_minsyms): Remove.
6259 (compare_msyms): Now a std::sort comparator.
6260 (add_minsym): Add parameters.
6261 (search_minsyms_for_name): Update. Use std::vector.
6262
6263 2018-04-03 Tom Tromey <tom@tromey.com>
6264
6265 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6266 gdb::byte_vector.
6267
6268 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6269
6270 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6271
6272 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6273
6274 PR gdb/16959
6275 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6276 printing static type.
6277
6278 2018-04-01 Tom Tromey <tom@tromey.com>
6279
6280 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6281 (rs6000_xfer_shared_libraries): Update.
6282
6283 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6284
6285 * common/gdb_vecs.h (char_ptr): Remove.
6286 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6287
6288 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6289
6290 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6291 with std::vector.
6292 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6293
6294 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6295
6296 * tracepoint.h (struct uploaded_tp): Initialize fields.
6297 <actions, step_actions, cmd_strings>: Change type to
6298 std::vector<char *>.
6299 * tracepoint.c (get_uploaded_tp): Allocate with new.
6300 (free_uploaded_tps): Free with delete.
6301 (parse_tracepoint_definition): Adjust to std::vector change.
6302 * breakpoint.c (read_uploaded_action): Likewise.
6303 (create_tracepoint_from_upload): Likewise.
6304 * ctf.c (ctf_write_uploaded_tp): Likewise.
6305 (SET_ARRAY_FIELD): Likewise.
6306 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6307
6308 2018-03-30 Tom Tromey <tom@tromey.com>
6309
6310 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6311 std::unique_ptr.
6312 (svr4_keep_data_in_core): Update.
6313 (svr4_read_so_list): Update.
6314
6315 2018-03-30 Tom Tromey <tom@tromey.com>
6316
6317 * windows-nat.c (handle_output_debug_string, handle_exception):
6318 Update.
6319 * target.h (target_read_string): Update.
6320 * target.c (target_read_string): Change "string" to
6321 unique_xmalloc_ptr.
6322 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6323 Update.
6324 * solib-frv.c (frv_current_sos): Update.
6325 * solib-dsbt.c (dsbt_current_sos): Update.
6326 * solib-darwin.c (darwin_current_sos): Update.
6327 * linux-thread-db.c (inferior_has_bug): Update.
6328 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6329 Update. Remove alloca.
6330 * ada-lang.c (ada_main_name): Update.
6331
6332 2018-03-30 Tom Tromey <tom@tromey.com>
6333
6334 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6335 (struct dwo_file_deleter): New.
6336 (dwo_file_up): New typedef.
6337 (open_and_init_dwo_file): Use dwo_file_up.
6338 (free_dwo_file_cleanup): Remove.
6339
6340 2018-03-30 Tom Tromey <tom@tromey.com>
6341
6342 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6343 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6344
6345 2018-03-30 Tom Tromey <tom@tromey.com>
6346
6347 * dwarf2read.c (class free_cached_comp_units): New class.
6348 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6349 (free_cached_comp_units): Remove function.
6350
6351 2018-03-30 Tom Tromey <tom@tromey.com>
6352
6353 * utils.h (make_cleanup_unpush_target): Remove.
6354 * inf-ptrace.c (struct target_unpusher): New.
6355 (target_unpush_up) New typedef.
6356 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6357 target_unpush_up.
6358 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6359
6360 2018-03-27 Tom Tromey <tom@tromey.com>
6361
6362 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6363
6364 2018-03-27 Pedro Alves <palves@redhat.com>
6365 Tom Tromey <tom@tromey.com>
6366
6367 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6368 destructor. Now a class.
6369 (gdb_readline_wrapper_cleanup): Remove function.
6370 (gdb_readline_wrapper): Remove cleanups.
6371
6372 2018-03-27 Tom Tromey <tom@tromey.com>
6373
6374 * typeprint.h (struct type_print_options) <local_typedefs,
6375 global_typedefs>: Remove "struct" keyword.
6376 (class typedef_hash_table): New class.
6377 (recursively_update_typedef_hash, add_template_parameters)
6378 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6379 (find_typedef_in_hash): Don't declare.
6380 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6381 (typedef_hash_table::recursively_update): Rename from
6382 recursively_update_typedef_hash. Now a member.
6383 (typedef_hash_table::add_template_parameters): Rename from
6384 add_template_parameters. Now a member.
6385 (typedef_hash_table::typedef_hash_table): Now a constructor;
6386 rename from create_typedef_hash.
6387 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6388 rename from free_typedef_hash.
6389 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6390 (do_free_global_table): Remove.
6391 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6392 from copy_type_recursive.
6393 (create_global_typedef_table): Remove.
6394 (typedef_hash_table::find_global_typedef): Now a member of
6395 typedef_hash_table.
6396 (typedef_hash_table::find_typedef): Rename from
6397 find_typedef_in_hash; now a member.
6398 (whatis_exp): Update.
6399 * extension.h (struct ext_lang_type_printers): Add constructor and
6400 destructor.
6401 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6402 declare.
6403 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6404 Now a constructor; rename from start_ext_lang_type_printers.
6405 (ext_lang_type_printers): Now a destructor; rename from
6406 free_ext_lang_type_printers.
6407 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6408 Update.
6409 (c_type_print_base_struct_union): Update. Remove cleanups.
6410
6411 2018-03-27 Tom Tromey <tom@tromey.com>
6412
6413 * dwarf-index-write.c: Include <cmath>.
6414
6415 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6416
6417 * NEWS: Add entry describing new "set|show varsize-limit" command.
6418 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6419 command.
6420 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6421 "set variable".
6422
6423 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6424
6425 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6426 dwarf-index-write.c
6427 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6428 * dwarf-index-common.c: New file.
6429 * dwarf-index-common.h: New file.
6430 * dwarf-index-write.c: New file.
6431 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6432 (struct dwarf2_section_info): Move from here.
6433 (dwarf2_section_info_def): Likewise.
6434 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6435 (offset_type): Likewise.
6436 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6437 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6438 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6439 (byte_swap): Likewise.
6440 (MAYBE_SWAP): Likewise.
6441 (dwarf2_per_cu_ptr): Likewise.
6442 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6443 (struct tu_stats): Likewise.
6444 (struct dwarf2_per_objfile): Likewise.
6445 (struct dwarf2_per_cu_data): Likewise.
6446 (struct signatured_type): Likewise.
6447 (sig_type_ptr): Likewise.
6448 (DEF_VEC_P (sig_type_ptr)): Likewise.
6449 (INDEX4_SUFFIX): Likewise.
6450 (INDEX5_SUFFIX): Likewise.
6451 (DEBUG_STR_SUFFIX): Likewise.
6452 (dwarf2_read_section): Make non-static.
6453 (mapped_index_string_hash): Move from here.
6454 (dwarf5_djb_hash): Likewise.
6455 (file_write): Likewise.
6456 (class data_buf): Likewise.
6457 (struct symtab_index_entry): Likewise.
6458 (struct mapped_symtab): Likewise.
6459 (find_slot): Likewise.
6460 (hash_expand): Likewise.
6461 (add_index_entry): Likewise.
6462 (uniquify_cu_indices): Likewise.
6463 (class c_str_view): Likewise.
6464 (class c_str_view_hasher): Likewise.
6465 (class vector_hasher): Likewise.
6466 (write_hash_table): Likewise.
6467 (psym_index_map): Likewise.
6468 (struct addrmap_index_data): Likewise.
6469 (add_address_entry): Likewise.
6470 (add_address_entry_worker): Likewise.
6471 (write_address_map): Likewise.
6472 (symbol_kind): Likewise.
6473 (write_psymbols): Likewise.
6474 (struct signatured_type_index_data): Likewise.
6475 (write_one_signatured_type): Likewise.
6476 (recursively_count_psymbols): Likewise.
6477 (recursively_write_psymbols): Likewise.
6478 (class debug_names): Likewise.
6479 (check_dwarf64_offsets): Likewise.
6480 (psyms_seen_size): Likewise.
6481 (write_gdbindex): Likewise.
6482 (write_debug_names): Likewise.
6483 (assert_file_size): Likewise.
6484 (write_psymtabs_to_index): Likewise.
6485 (save_gdb_index_command): Likewise.
6486 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6487 command.
6488 * dwarf2read.h: New file.
6489
6490 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6491
6492 PR gdb/22670
6493 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6494 symbol name if the CU's language stores symbol names in linkage
6495 format.
6496 * language.h (struct language_defn)
6497 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6498 all instances of this struct.
6499
6500 2018-03-26 Tom Tromey <tom@tromey.com>
6501
6502 * stack.c (backtrace_command_1): Remove verbose code.
6503
6504 2018-03-26 Tom Tromey <tom@tromey.com>
6505
6506 * python/py-framefilter.c (py_print_type): Don't catch
6507 exceptions. Return void.
6508 (py_print_value): Likewise.
6509 (py_print_single_arg): Likewise.
6510 (enumerate_args): Don't catch exceptions.
6511 (py_print_args): Likewise.
6512 (py_print_frame): Likewise.
6513 (gdbpy_apply_frame_filter): Catch exceptions here.
6514
6515 2018-03-26 Tom Tromey <tom@tromey.com>
6516
6517 * stack.c (_initialize_stack): Remove trailing newlines from help
6518 text. Add "Usage" line to "backtrace" help.
6519
6520 2018-03-26 Tom Tromey <tom@tromey.com>
6521
6522 PR python/16486:
6523 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6524
6525 2018-03-26 Tom Tromey <tom@tromey.com>
6526
6527 * python/py-framefilter.c (py_print_single_arg): Return
6528 EXT_LANG_BT_ERROR from catch.
6529
6530 2018-03-26 Tom Tromey <tom@tromey.com>
6531
6532 PR backtrace/15584:
6533 * stack.c (backtrace_command_1): Move some code into no-filters
6534 "if".
6535
6536 2018-03-26 Tom Tromey <tom@tromey.com>
6537
6538 * python/py-framefilter.c (throw_quit_or_print_exception): New
6539 function.
6540 (gdbpy_apply_frame_filter): Use it.
6541
6542 2018-03-26 Tom Tromey <tom@tromey.com>
6543
6544 PR cli/17716:
6545 * python/py-framefilter.c (py_print_type, py_print_value)
6546 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6547 RETURN_MASK_ERROR.
6548
6549 2018-03-26 Tom Tromey <tom@tromey.com>
6550
6551 * python/py-framefilter.c (enumerate_args): Use
6552 gdb::unique_xmalloc_ptr.
6553
6554 2018-03-26 Tom Tromey <tom@tromey.com>
6555
6556 * python/py-framefilter.c (py_print_frame): Return
6557 EXT_LANG_BT_OK.
6558 (gdbpy_apply_frame_filter): Update comment.
6559 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6560 Remove.
6561 <EXT_LANG_BT_NO_FILTERS>: Change value.
6562
6563 2018-03-26 Tom Tromey <tom@tromey.com>
6564
6565 PR backtrace/15582:
6566 * stack.c (backtrace_command): Parse "hide" argument.
6567 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6568 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6569 constant.
6570
6571 2018-03-26 Tom Tromey <tom@tromey.com>
6572
6573 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6574 add "flags".
6575 (backtrace_command): Remove "fulltrace", add "flags".
6576
6577 2018-03-26 Tom Tromey <tom@tromey.com>
6578
6579 * stack.c (backtrace_command): Rewrite command line parsing.
6580
6581 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6582
6583 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6584
6585 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6586
6587 * filename-seen-cache.h: Add include guard.
6588
6589 2018-03-26 Keith Seitz <keiths@redhat.com>
6590
6591 * symfile.c (place_section): Remove "struct" from section_addr_info
6592 in comment.
6593 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6594 "struct" keyword from section_addr_info.
6595
6596 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6597
6598 * regformats/regdef.h (reg): Add constructors.
6599
6600 2018-03-25 Pedro Alves <palves@redhat.com>
6601
6602 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6603 if then/else bodies in var_func_name extraction.
6604
6605 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6606
6607 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6608 lookup_minimal_symbol() to find symbol entry.
6609 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6610
6611 2018-03-23 Keith Seitz <keiths@redhat.com>
6612
6613 PR c++/22968
6614 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6615 nested type definitions for C++, too.
6616
6617 2018-03-23 Tom Tromey <tom@tromey.com>
6618
6619 * machoread.c (struct oso_el): Add a constructor. Don't define as
6620 a typedef.
6621 (macho_register_oso): Remove.
6622 (macho_symtab_read): Take a std::vector.
6623 (oso_el_compare_name): Now a std::sort comparator.
6624 (macho_symfile_read_all_oso): Take a std::vector.
6625 (macho_symfile_read): Use std::vector. Remove cleanups.
6626
6627 2018-03-22 Tom Tromey <tom@tromey.com>
6628
6629 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6630 (record_full_goto_bookmark): Use std::string.
6631
6632 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6633
6634 PR tdep/18295
6635 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6636 a single mask.
6637
6638 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6639
6640 * rs6000-tdep.c (store_insn_p): New function.
6641 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6642 and cr_reg to their unshifted values. Use store_insn_p to
6643 match LR saves using either R1 or fdata->alloca_reg. Use
6644 store_insn_p to match CR saves. Set alloca_reg_offset
6645 when alloca_reg and framep are set. Remove lr_reg shift
6646 when assigning to fdata->lr_register.
6647
6648 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6649
6650 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6651 command line args instead of emitting a warning.
6652
6653 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6654
6655 * tracepoint.h (struct static_tracepoint_marker): Initialize
6656 fields, define default constructor, move constructor and move
6657 assignment, disable the rest.
6658 <str_id, extra>: Make std::string.
6659 (release_static_tracepoint_marker): Remove.
6660 (free_current_marker): Remove.
6661 * tracepoint.c (free_current_marker): Remove.
6662 (parse_static_tracepoint_marker_definition): Adjust to
6663 std::string, use new hex2str overload.
6664 (release_static_tracepoint_marker): Remove.
6665 (print_one_static_tracepoint_marker): Get marker by reference
6666 and adjust to std::string.
6667 (info_static_tracepoint_markers_command): Adjust to std::vector
6668 changes
6669 * target.h (static_tracepoint_marker_p): Remove typedef.
6670 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6671 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6672 bool.
6673 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6674 * target-debug.h
6675 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6676 (target_debug_print_std_vector_static_tracepoint_marker): New.
6677 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6678 to...
6679 (target_debug_print_static_tracepoint_marker_p): ... this.
6680 * target-delegates.c: Re-generate.
6681 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6682 Make std::string.
6683 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6684 (decode_static_tracepoint_spec): Adjust to std::vector.
6685 (tracepoint_print_one_detail): Adjust to std::string.
6686 (strace_marker_decode_location): Adjust to std::string.
6687 (update_static_tracepoint): Adjust to std::string, remove call
6688 to release_static_tracepoint_marker.
6689 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6690 Adjust to std::vector.
6691 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6692 (remote_static_tracepoint_markers_by_strid): Adjust to
6693 std::vector.
6694 * common/rsp-low.h (hex2str): New overload with explicit count
6695 of bytes.
6696 * common/rsp-low.c (hex2str): New overload with explicit count
6697 of bytes.
6698 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6699 (_initialize_rsp_low_selftests): Add test_hex2str test.
6700 * unittests/tracepoint-selftests.c
6701 (test_parse_static_tracepoint_marker_definition): Adjust to
6702 std::string.
6703
6704 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6705
6706 * tracepoint.c (parse_static_tracepoint_marker_definition):
6707 Consider case where the definition is followed by more
6708 definitions.
6709 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6710 tracepoint-selftests.c.
6711 * unittests/tracepoint-selftests.c: New.
6712
6713 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6714
6715 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6716 Carvalho.
6717
6718 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6719
6720 * symtab.c (find_pc_sect_line): fixed indentation.
6721
6722 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6723
6724 * symtab.c (find_pc_sect_line): now uses binary search.
6725
6726 2018-03-19 Tom Tromey <tom@tromey.com>
6727
6728 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6729 "IDENT" production.
6730
6731 2018-03-19 Pedro Alves <palves@redhat.com>
6732 Tom Tromey <tom@tromey.com>
6733
6734 * unittests/observable-selftests.c: New file.
6735 * common/observable.h: New file.
6736 * observable.h: New file.
6737 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6738 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6739 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6740 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6741 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6742 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6743 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6744 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6745 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6746 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6747 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6748 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6749 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6750 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6751 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6752 tui/tui-interp.c, valops.c: Update all users.
6753 * tui/tui-hooks.c (tui_bp_created_observer)
6754 (tui_bp_deleted_observer, tui_bp_modified_observer)
6755 (tui_inferior_exit_observer, tui_before_prompt_observer)
6756 (tui_normal_stop_observer, tui_register_changed_observer):
6757 Remove.
6758 (tui_observers_token): New global.
6759 (attach_or_detach, tui_attach_detach_observers): New functions.
6760 (tui_install_hooks, tui_remove_hooks): Use
6761 tui_attach_detach_observers.
6762 * record-btrace.c (record_btrace_thread_observer): Remove.
6763 (record_btrace_thread_observer_token): New global.
6764 * observer.sh: Remove.
6765 * observer.c: Rename to observable.c.
6766 * observable.c (namespace gdb_observers): Define new objects.
6767 (observer_debug): Move into gdb_observers namespace.
6768 (struct observer, struct observer_list, xalloc_observer_list_node)
6769 (xfree_observer_list_node, generic_observer_attach)
6770 (generic_observer_detach, generic_observer_notify): Remove.
6771 (_initialize_observer): Update.
6772 Don't include observer.inc.
6773 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6774 (clean mostlyclean): Likewise.
6775 (observer.h, observer.inc): Remove targets.
6776 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6777 (COMMON_SFILES): Use observable.c, not observer.c.
6778 * .gitignore: Remove observer.h.
6779
6780 2018-03-18 Tom Tromey <tom@tromey.com>
6781
6782 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6783 gdb::def_vector.
6784 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6785
6786 2018-03-17 Tom Tromey <tom@tromey.com>
6787
6788 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6789
6790 2018-03-17 Tom Tromey <tom@tromey.com>
6791
6792 * target.c (class scoped_target_fd): New.
6793 (target_fileio_close_cleanup): Remove.
6794 (target_fileio_read_alloc_1): Use scoped_target_fd.
6795
6796 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6797
6798 * silent-rules.mk: New.
6799 * Makefile.in: Include silent-rules.mk
6800 (srcdir, VPATH, top_srcdir): Move up.
6801 (COMPILE): Add ECHO_CXX.
6802 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6803 (init.c): Add ECHO_INIT_C.
6804 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6805 (version.c): Add ECHO_GEN.
6806 (printcmd.o): Add ECHO_CXX.
6807 (target-float.o): Add ECHO_CXX.
6808 (ada-exp.o): Add ECHO_CXX.
6809 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6810 (insight$(EXEEXT)): Add ECHO_CXXLD.
6811 * gnulib/configure.ac: Add AM_SILENT_RULES.
6812 * gnulib/aclocal.m4: Re-generate.
6813 * gnulib/configure: Re-generate.
6814 * gnulib/import/Makefile.in: Re-generate.
6815
6816 2018-03-16 Tom Tromey <tom@tromey.com>
6817
6818 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6819 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6820 * utils.c (do_free_section_addr_info)
6821 (make_cleanup_free_section_addr_info): Remove.
6822 * symfile.h (struct other_sections): Add constructor.
6823 (struct section_addr_info): Remove.
6824 (section_addr_info): New typedef.
6825 (struct sym_fns) <sym_offsets>: Change type of parameter.
6826 (build_section_addr_info_from_objfile)
6827 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6828 (default_symfile_offsets, symbol_file_add)
6829 (symbol_file_add_from_bfd)
6830 (build_section_addr_info_from_section_table): Update.
6831 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6832 * symfile.c (alloc_section_addr_info): Remove.
6833 (build_section_addr_info_from_section_table): Change return type.
6834 Update.
6835 (build_section_addr_info_from_bfd)
6836 (build_section_addr_info_from_objfile): Likewise.
6837 (free_section_addr_info): Remove.
6838 (relative_addr_info_to_section_offsets): Change type of "addrs".
6839 (addrs_section_compar): Now a std::sort comparator.
6840 (addrs_section_sort): Change return type.
6841 (addr_info_make_relative): Change type of "addrs". Update.
6842 (default_symfile_offsets, syms_from_objfile_1)
6843 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6844 (symbol_file_add_separate): Update.
6845 (symbol_file_add): Change type of "addrs". Update.
6846 (add_symbol_file_command): Update. Remove cleanups.
6847 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6848 cleanups.
6849 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6850 * solib.c (solib_read_symbols): Update.
6851 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6852 * machoread.c (macho_symfile_offsets): Update.
6853 * jit.c (jit_bfd_try_read_symtab): Update.
6854
6855 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6856
6857 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6858 unittests/utils-selftests.c.
6859 * unittests/utils-selftests.c: New file.
6860
6861 2018-03-14 Tom Tromey <tom@tromey.com>
6862
6863 PR cli/14977:
6864 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6865 for NULL.
6866
6867 2018-03-14 Tom Tromey <tom@tromey.com>
6868
6869 PR cli/19918:
6870 * printcmd.c (printf_pointer): Allow "-" in format.
6871
6872 2018-03-14 Tom Tromey <tom@tromey.com>
6873
6874 * printcmd.c (_initialize_printcmd): Add usage to printf.
6875
6876 2018-03-14 Yao Qi <qiyao@sourceware.org>
6877
6878 * MAINTAINERS: Update my email address.
6879
6880 2018-03-13 Tom Tromey <tom@tromey.com>
6881
6882 * machoread.c (macho_check_dsym): Change filenamep to a
6883 std::string*.
6884 (macho_symfile_read): Update.
6885 * symfile.c (load_command): Use std::string.
6886
6887 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6888
6889 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6890 to error message string.
6891 (riscv_register_name): Use xsnprintf instead of sprintf.
6892 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6893 internal_error.
6894 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6895 error.
6896 (riscv_push_dummy_call): Likewise.
6897
6898 2018-03-12 Tom Tromey <tom@tromey.com>
6899
6900 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6901 Use gdb::byte_vector.
6902 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6903
6904 2018-03-12 Yao Qi <yao.qi@linaro.org>
6905
6906 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6907 parameter type to readable_regcache.
6908 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6909 the declaration.
6910
6911 2018-03-11 Tom Tromey <tom@tromey.com>
6912
6913 * dwarf2read.c (struct nextfield): Add initializers.
6914 (struct nextfnfield): Remove.
6915 (struct fnfieldlist): Add initializers. Remove "length" and
6916 "head", use std::vector.
6917 (struct decl_field_list): Remove.
6918 (struct field_info): Add initializers.
6919 <fields, baseclasses>: Now std::vector.
6920 <nbaseclasses, nfnfields, typedef_field_list_count,
6921 nested_types_list_count>: Remove.
6922 (dwarf2_add_field, dwarf2_add_type_defn)
6923 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6924 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6925 (process_structure_scope): Update.
6926
6927 2018-03-11 Tom Tromey <tom@tromey.com>
6928
6929 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6930 for use by std::sort.
6931 (build_type_psymtabs_1): Use std::vector.
6932
6933 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6934
6935 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6936 and LIBMPFR in the printed configuration.
6937
6938 2018-03-08 Tom Tromey <tom@tromey.com>
6939
6940 * source.c (get_filename_and_charpos): Use scoped_fd.
6941 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6942 (procfs_pidlist): Likewise.
6943 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6944 (iterate_over_mappings): Likewise.
6945
6946 2018-03-08 Tom Tromey <tom@tromey.com>
6947
6948 * infcall.c (struct call_return_meta_info)
6949 <stack_temporaries_enabled>: Remove.
6950 (get_call_return_value, call_function_by_hand_dummy): Update.
6951 * thread.c (disable_thread_stack_temporaries): Remove.
6952 (enable_thread_stack_temporaries): Remove.
6953 (thread_stack_temporaries_enabled_p): Return bool.
6954 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6955 (get_last_thread_stack_temporary): Update.
6956 * eval.c (evaluate_subexp): Update.
6957 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6958 class, not a function.
6959 (value_ptr, value_vec): Remove typedefs.
6960 (class thread_info) <stack_temporaries_enabled>: Now bool.
6961 <stack_temporaries>: Now a std::vector.
6962 (thread_stack_temporaries_enabled_p)
6963 (value_in_thread_stack_temporaries): Return bool.
6964
6965 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6968 (getpkt_or_notif_sane_1): Likewise.
6969
6970 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6971
6972 * build-id.c (build_id_to_debug_bfd): Use std::string.
6973
6974 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6975
6976 * build-id.c (find_separate_debug_file_by_buildid): Return
6977 std::string.
6978 * build-id.h (find_separate_debug_file_by_buildid): Return
6979 std::string.
6980 * coffread.c (coff_symfile_read): Adjust to std::string.
6981 * elfread.c (elf_symfile_read): Adjust to std::string.
6982 * symfile.c (separate_debug_file_exists): Change parameter to
6983 std::string.
6984 (find_separate_debug_file): Return std::string.
6985 (find_separate_debug_file_by_debuglink): Return std::string.
6986 * symfile.h (find_separate_debug_file_by_debuglink): Return
6987 std::string.
6988
6989 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6990
6991 * common/xml-utils.c (xml_escape_text): Move code to...
6992 (xml_escape_text_append): ... this new function.
6993 * common/xml-utils.h (xml_escape_text_append): New declaration.
6994 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6995 New function.
6996 (_initialize_xml_utils): register test_xml_escape_text_append as
6997 a selftest.
6998
6999 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7000
7001 * defs.h: Remove MAX_REGISTER_SIZE.
7002 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7003 asserts.
7004 * python/py-unwind.c (pyuw_sniffer): Likewise.
7005
7006 2018-03-07 Tom Tromey <tom@tromey.com>
7007
7008 * linux-tdep.c (linux_info_proc): Update.
7009 * target.h (struct target_ops) <to_fileio_readlink>: Return
7010 optional<string>.
7011 (target_fileio_readlink): Return optional<string>.
7012 * remote.c (remote_hostio_readlink): Return optional<string>.
7013 * inf-child.c (inf_child_fileio_readlink): Return
7014 optional<string>.
7015 * target.c (target_fileio_readlink): Return optional<string>.
7016
7017 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7018
7019 * regcache.c (cooked_read_test): Add riscv to the list of
7020 architectures that have a save_reggroup.
7021
7022 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7023
7024 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7025 value is not a dynamic class object.
7026
7027 2018-03-06 Tom Tromey <tom@tromey.com>
7028
7029 * rust-exp.y: Formatting fixes.
7030
7031 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7032
7033 * riscv-tdep.c (riscv_register_name): Remove target description
7034 support.
7035 (riscv_gdbarch_init): Remove target description check.
7036
7037 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7038
7039 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7040 comment.
7041 * riscv-tdep.h: Likewise.
7042
7043 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7044
7045 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7046 (riscv_pseudo_register_write): Delete.
7047 (riscv_gdbarch_init): Remove all use of pseudo registers.
7048
7049 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7050
7051 * record-btrace.c (btrace_print_lines): Replace cleanup
7052 parameter with RAII equivalents.
7053 (btrace_insn_history): Replace cleanup with RAII equivalents.
7054 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7055 make_cleanup_ui_out_tuple_begin_end): Remove.
7056 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7057 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7058 make_cleanup_ui_out_list_begin_end): Remove.
7059
7060 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7061
7062 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7063 parameter types to std::vector. Use bool.
7064 (record_btrace_wait): Replace VEC(tp_t) with
7065 std::vector<thread_info *>.
7066 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7067
7068 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7069
7070 * record-btrace.c (record_btrace_disable_callback): Remove.
7071 (struct scoped_btrace_disable): New.
7072 (record_btrace_open): Use scoped_btrace_disable.
7073
7074 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7075
7076 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7077 reading values from registers.
7078
7079 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7080
7081 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7082 where appropriate.
7083
7084 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7085
7086 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7087 change parameter type. Use GDB's print functions, and use
7088 core_addr_to_string where appropriate.
7089 (riscv_push_dummy_call): Use core_addr_to_string where
7090 appropriate, update call to riscv_print_arg_location, and reindent
7091 a few lines.
7092 (riscv_return_value): Update call to riscv_print_arg_location.
7093
7094 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7095 Tim Newsome <tim@sifive.com>
7096 Albert Ou <a0u@eecs.berkeley.edu>
7097 Darius Rad <darius@bluespec.com>
7098
7099 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7100 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7101 (ALLDEPFILES): Add riscv-tdep.c
7102 * configure.tgt: Add riscv support.
7103 * riscv-tdep.c: New file.
7104 * riscv-tdep.h: New file.
7105 * NEWS: Mention new target.
7106 * MAINTAINERS: Add entry for riscv.
7107
7108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7109
7110 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7111 fields within aggregates.
7112
7113 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7114
7115 * record-btrace.c (btrace_print_lines): Change type of flags to
7116 gdb_disassembly_flags.
7117
7118 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7119
7120 * fbsd-nat.c: Include "inf-ptrace.h".
7121 (USE_SIGTRAP_SIGINFO): Conditionally define.
7122 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7123 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7124 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7125 function.
7126 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7127 Likewise.
7128 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7129 Likewise.
7130 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7131 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7132 "supports_stopped_by_hw_breakpoint" target methods.
7133
7134 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7135
7136 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7137 * fbsd-nat.c (debug_fbsd_nat): New variable.
7138 (show_fbsd_nat_debug): New function.
7139 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7140 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7141
7142 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7143
7144 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7145 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7146 prototype.
7147 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7148 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7149 method.
7150
7151 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7152
7153 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7154 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7155
7156 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7157
7158 * charset.c (struct charset_vector): New.
7159 (charsets): Change type to charset_vector.
7160 (find_charset_names): Adjust.
7161 (add_one): Adjust.
7162 (_initialize_charset): Adjust.
7163
7164 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7165
7166 * progspace.h (struct program_space) <deleted_solibs>: Change
7167 type to std::vector<std::string>.
7168 * progspace.c (clear_program_space_solib_cache): Adjust.
7169 * breakpoint.c (print_solib_event): Adjust.
7170 (check_status_catch_solib): Adjust.
7171 * solib.c (update_solib_list): Adjust.
7172 * ui-out.h (class ui_out) <field_string>: New overload.
7173 * ui-out.c (ui_out::field_string): New overload.
7174
7175 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7176
7177 * progspace.h (struct program_space): Add constructor and
7178 destructor, initialize fields.
7179 (add_program_space): Remove.
7180 * progspace.c (add_program_space): Rename to...
7181 (program_space::program_space): ... this.
7182 (release_program_space): Rename to...
7183 (program_space::~program_space): ... this.
7184 (delete_program_space): Use delete to delete program_space.
7185 (initialize_progspace): Use new to allocate program_space.
7186 * inferior.c (add_inferior_with_spaces): Likewise.
7187 (clone_inferior_command): Likewise.
7188 * infrun.c (follow_fork_inferior): Likewise.
7189 (handle_vfork_child_exec_or_exit): Likewise.
7190
7191 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7192
7193 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7194 (delim_string_to_char_ptr_vec): Return std::vector of
7195 gdb::unique_xmalloc_ptr.
7196 (dirnames_to_char_ptr_vec_append): Take std::vector of
7197 gdb::unique_xmalloc_ptr.
7198 (dirnames_to_char_ptr_vec): Return std::vector of
7199 gdb::unique_xmalloc_ptr.
7200 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7201 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7202 (delim_string_to_char_ptr_vec): Return an std::vector of
7203 gdb::unique_xmalloc_ptr, adjust the code.
7204 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7205 gdb::unique_xmalloc_ptr, adjust the code.
7206 (dirnames_to_char_ptr_vec): Return an std::vector of
7207 gdb::unique_xmalloc_ptr, adjust the code.
7208 * auto-load.c (auto_load_safe_path_vec): Change type to
7209 std::vector of gdb::unique_xmalloc_ptr.
7210 (auto_load_expand_dir_vars): Return an std::vector of
7211 gdb::unique_xmalloc_ptr, adjust the code.
7212 (auto_load_safe_path_vec_update): Adjust.
7213 (filename_is_in_auto_load_safe_path_vec): Adjust.
7214 (auto_load_objfile_script_1): Adjust.
7215 * build-id.c (build_id_to_debug_bfd): Adjust.
7216 * linux-thread-db.c (thread_db_load_search): Adjust.
7217 * source.c (add_path): Adjust.
7218 (openp): Adjust.
7219 * symfile.c (find_separate_debug_file): Adjust.
7220 * utils.c (do_free_char_ptr_vec): Remove.
7221 (make_cleanup_free_char_ptr_vec): Remove.
7222
7223 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7224
7225 PR gdb/22907
7226 * common/pathstuff.c: Conditionally include "<windows.h>".
7227
7228 2018-03-01 Georg Sauthoff <mail@georg.so>
7229
7230 PR gdb/22888
7231 * gcore.in: Quote variables and switch interpreter to bash.
7232
7233 2018-03-01 Tom Tromey <tom@tromey.com>
7234
7235 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7236 assertion. Add assertion for discriminant_index.
7237 (quirk_rust_enum): Use correct base type name in univariant case.
7238
7239 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7240
7241 * record.c (get_call_history_modifiers): Return a
7242 record_print_flags.
7243 (cmd_record_call_history): Adjust.
7244 * record-btrace.c (record_btrace_call_history): Adjust.
7245 (record_btrace_call_history_range): Adjust.
7246 (record_btrace_call_history_from): Adjust.
7247 * target-debug.h (target_debug_print_record_print_flags): New.
7248 * target-delegates.c: Re-generate.
7249 * target.c (target_call_history): Change flags type.
7250 (target_call_history_from): Likewise.
7251 (target_call_history_range): Likewise.
7252 * target.h (struct target_ops) <target_call_history>: Likewise.
7253 (target_call_history_from): Likewise.
7254 (target_call_history_range): Likewise.
7255
7256 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7257 Simon Marchi <simon.marchi@polymtl.ca>
7258
7259 * common/common-utils.c: Include "sys/stat.h".
7260 (is_regular_file): Move here from "source.c"; change return
7261 type to "bool".
7262 * common/common-utils.h (is_regular_file): New prototype.
7263 * common/pathstuff.c (contains_dir_separator): New function.
7264 * common/pathstuff.h (contains_dir_separator): New prototype.
7265 * source.c: Don't include "sys/stat.h".
7266 (is_regular_file): Move to "common/common-utils.c".
7267
7268 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7269
7270 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7271 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7272 * auto-load.c: Include "common/pathstuff.h".
7273 * common/common-def.h (current_directory): Move here.
7274 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7275 function.
7276 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7277 prototype.
7278 * common/pathstuff.c: New file.
7279 * common/pathstuff.h: New file.
7280 * compile/compile.c: Include "common/pathstuff.h".
7281 * defs.h (current_directory): Move to "common/common-defs.h".
7282 * dwarf2read.c: Include "common/pathstuff.h".
7283 * exec.c: Likewise.
7284 * guile/scm-safe-call.c: Likewise.
7285 * linux-thread-db.c: Likewise.
7286 * main.c: Likewise.
7287 * nto-tdep.c: Likewise.
7288 * objfiles.c: Likewise.
7289 * source.c: Likewise.
7290 * symtab.c: Likewise.
7291 * utils.c: Include "common/pathstuff.h".
7292 (gdb_realpath): Move to "common/pathstuff.c".
7293 (gdb_realpath_keepfile): Likewise.
7294 (gdb_abspath): Likewise.
7295 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7296 (gdb_realpath_keepfile): Likewise.
7297 (gdb_abspath): Likewise.
7298
7299 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7300
7301 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7302 wildcard process pid for super_resume for kernels with a
7303 specific bug.
7304
7305 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7306
7307 * compile/compile.c (get_args): Add additional comments
7308 explaining function.
7309
7310 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7311 Tom Tromey <tom@tromey.com>
7312
7313 * target.h (memory_write_request_s): Remove typedef. Don't define
7314 VEC.
7315 (target_write_memory_blocks): Change argument to std::vector.
7316 (struct memory_write_request): Add constructor.
7317 * target-memory.c (compare_block_starting_address): Return bool.
7318 Change argument types.
7319 (claim_memory): Change arguments to use std::vector.
7320 (split_regular_and_flash_blocks, blocks_to_erase)
7321 (compute_garbled_blocks): Likewise.
7322 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7323 (target_write_memory_blocks): Change argument to std::vector.
7324 * symfile.c (struct load_section_data): Add constructor and
7325 destructor. Use std::vector for "requests".
7326 (struct load_progress_data): Add initializers.
7327 (load_section_callback): Update. Use "new".
7328 (clear_memory_write_data): Remove.
7329 (generic_load): Update.
7330
7331 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7332
7333 * arch/aarch64.h: Use common/tdesc.h.
7334
7335 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7336
7337 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7338 architecture with a 64-bit ABI.
7339
7340 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7341
7342 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7343 ahead of target description loading.
7344
7345 2018-02-26 Tom Tromey <tom@tromey.com>
7346
7347 * stack.c (backtrace_command_1): Update.
7348 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7349 of "flags".
7350 * python/py-framefilter.c (py_print_frame)
7351 (gdbpy_apply_frame_filter): Change type of "flags".
7352 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7353 of "flags".
7354 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7355 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7356 * extension.h (enum frame_filter_flag): Rename from
7357 frame_filter_flags.
7358 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7359 (apply_ext_lang_frame_filter): Change type of "flags".
7360 * extension.c (apply_ext_lang_frame_filter): Change type of
7361 "flags".
7362 * extension-priv.h (struct extension_language_ops)
7363 <apply_frame_filter>: Change type of "flags".
7364
7365 2018-02-26 Tom Tromey <tom@tromey.com>
7366
7367 PR python/16497:
7368 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7369 off-by-one in py_end computation.
7370 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7371 PRINT_MORE_FRAMES.
7372 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7373 constant.
7374
7375 2018-02-26 Tom Tromey <tom@tromey.com>
7376
7377 * dwarf2read.c (struct variant_field): New.
7378 (struct nextfield) <variant>: New field.
7379 (dwarf2_add_field): Handle DW_TAG_variant_part.
7380 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7381 discriminated union.
7382 (read_structure_type): Handle DW_TAG_variant_part.
7383 (handle_struct_member_die): New function, extracted from
7384 process_structure_scope. Handle DW_TAG_variant.
7385 (process_structure_scope): Handle discriminated unions. Call
7386 handle_struct_member_die.
7387
7388 2018-02-26 Tom Tromey <tom@tromey.com>
7389
7390 * rust-lang.h (rust_last_path_segment): Declare.
7391 * rust-lang.c (rust_last_path_segment): Now public. Change
7392 contract.
7393 (struct disr_info): Remove.
7394 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7395 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7396 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7397 (rust_enum_p, rust_enum_variant): New function.
7398 (rust_underscore_fields): Remove "offset" parameter.
7399 (rust_print_enum): New function.
7400 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7401 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7402 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7403 enums.
7404 (rust_internal_print_type): New function, from rust_print_type.
7405 Remove enum code.
7406 (rust_print_type): Call rust_internal_print_type.
7407 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7408 Update enum handling.
7409 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7410 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7411 (rust_union_quirks): New functions.
7412 (process_full_comp_unit, process_full_type_unit): Call
7413 rust_union_quirks.
7414 (process_structure_scope): Update rust_unions if necessary.
7415
7416 2018-02-26 Tom Tromey <tom@tromey.com>
7417
7418 * value.h (value_union_variant): Declare.
7419 * valops.c (value_union_variant): New function.
7420 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7421 (struct discriminant_info): New.
7422 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7423 enumerator.
7424 (struct main_type) <flag_discriminated_union>: New field.
7425
7426 2018-02-26 Tom Tromey <tom@tromey.com>
7427
7428 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7429 unittests/unpack-selftests.c.
7430 * unittests/unpack-selftests.c: New file.
7431 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7432
7433 2018-02-26 Yao Qi <yao.qi@linaro.org>
7434
7435 * dwarf2read.c (struct partial_die_info) <read>: New method.
7436 (read_partial_die): Remove the declaration.
7437 (load_partial_dies): Update.
7438 (partial_die_info::partial_die_info):
7439 (read_partial_die): Change it to partial_die_info::read.
7440
7441 2018-02-26 Yao Qi <yao.qi@linaro.org>
7442
7443 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7444 (fixup_partial_die): Remove declaration.
7445 (scan_partial_symbols): Update.
7446 (partial_die_parent_scope): Likewise.
7447 (partial_die_full_name): Likewise.
7448 (fixup_partial_die): Change it to partial_die_info::fixup.
7449
7450 2018-02-26 Yao Qi <yao.qi@linaro.org>
7451
7452 * dwarf2read.c (read_partial_die): Update the declaration.
7453 (load_partial_dies): Caller update.
7454 (read_partial_die): Remove one argument abbrev_len.
7455
7456 2018-02-26 Yao Qi <yao.qi@linaro.org>
7457
7458 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7459 assignment operator.
7460 (load_partial_dies): Use ctor and copy ctor.
7461 (read_partial_die): Update.
7462 (dwarf2_cu::find_partial_die): Use ctor.
7463
7464 2018-02-26 Yao Qi <yao.qi@linaro.org>
7465
7466 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7467 (find_partial_die_in_comp_unit): Change it to
7468 dwarf2_cu::find_partial_die.
7469 (find_partial_die): Update.
7470
7471 2018-02-26 Yao Qi <yao.qi@linaro.org>
7472
7473 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7474 is NULL.
7475
7476 2018-02-26 Yao Qi <yao.qi@linaro.org>
7477
7478 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7479
7480 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7481
7482 * arch/amd64.h: Use common/tdesc.h.
7483 * arch/i386.c: Likewise.
7484 * arch/i386.h: Likewise.
7485 * arch/tic6x.c: Likewise.
7486 * arch/tdesc.h: Move file from here...
7487 * common/tdesc.h: ...to here.
7488 * features/aarch64-core.c: Regenerate.
7489 * features/aarch64-fpu.c: Regenerate.
7490 * features/i386/32bit-avx.c: Regenerate.
7491 * features/i386/32bit-avx512.c: Regenerate.
7492 * features/i386/32bit-core.c: Regenerate.
7493 * features/i386/32bit-linux.c: Regenerate.
7494 * features/i386/32bit-mpx.c: Regenerate.
7495 * features/i386/32bit-pkeys.c: Regenerate.
7496 * features/i386/32bit-sse.c: Regenerate.
7497 * features/i386/64bit-avx.c: Regenerate.
7498 * features/i386/64bit-avx512.c: Regenerate.
7499 * features/i386/64bit-core.c: Regenerate.
7500 * features/i386/64bit-linux.c: Regenerate.
7501 * features/i386/64bit-mpx.c: Regenerate.
7502 * features/i386/64bit-pkeys.c: Regenerate.
7503 * features/i386/64bit-segments.c: Regenerate.
7504 * features/i386/64bit-sse.c: Regenerate.
7505 * features/i386/x32-core.c: Regenerate.
7506 * features/tic6x-c6xp.c: Regenerate.
7507 * features/tic6x-core.c: Regenerate.
7508 * features/tic6x-gp.c: Regenerate.
7509 * target-descriptions.c: Use common/tdesc.h.
7510 * target-descriptions.h: Likewise.
7511
7512 2018-02-24 Tom Tromey <tom@tromey.com>
7513
7514 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7515 (try_thread_db_load_from_dir, thread_db_load_search): Use
7516 std::string.
7517 (info_auto_load_libthread_db_compare): Return bool. Change
7518 argument types.
7519 (info_auto_load_libthread_db): Use std::vector, std::string.
7520 Remove cleanups.
7521
7522 2018-02-24 Tom Tromey <tom@tromey.com>
7523
7524 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7525 std::string.
7526 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7527 std::string*.
7528 * gdbarch.c: Rebuild.
7529 * gdbarch.h: Rebuild.
7530 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7531 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7532 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7533 std::string*.
7534
7535 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7536
7537 * gdbtypes.h (sect_offset): Change type to uint64_t.
7538 (sect_offset_str): New function.
7539 * dwarf2read.c (create_addrmap_from_aranges): Use
7540 sect_offset_str.
7541 (error_check_comp_unit_head): Likewise.
7542 (create_debug_type_hash_table): Likewise.
7543 (read_cutu_die_from_dwo): Likewise.
7544 (init_cutu_and_read_dies): Likewise.
7545 (init_cutu_and_read_dies_no_follow): Likewise.
7546 (process_psymtab_comp_unit_reader): Likewise.
7547 (partial_die_parent_scope): Likewise.
7548 (peek_die_abbrev): Likewise.
7549 (process_queue): Likewise.
7550 (dwarf2_physname): Likewise.
7551 (read_namespace_alias): Likewise.
7552 (read_import_statement): Likewise.
7553 (create_dwo_cu_reader): Likewise.
7554 (create_cus_hash_table): Likewise.
7555 (lookup_dwo_cutu): Likewise.
7556 (inherit_abstract_dies): Likewise.
7557 (read_func_scope): Likewise.
7558 (read_call_site_scope): Likewise.
7559 (dwarf2_add_member_fn): Likewise.
7560 (read_common_block): Likewise.
7561 (read_module_type): Likewise.
7562 (read_typedef): Likewise.
7563 (read_subrange_type): Likewise.
7564 (load_partial_dies): Likewise.
7565 (read_partial_die): Likewise.
7566 (find_partial_die): Likewise.
7567 (read_str_index): Likewise.
7568 (dwarf2_string_attr): Likewise.
7569 (build_error_marker_type): Likewise.
7570 (lookup_die_type): Likewise.
7571 (dump_die_shallow): Likewise.
7572 (follow_die_ref): Likewise.
7573 (dwarf2_fetch_die_loc_sect_off): Likewise.
7574 (dwarf2_fetch_constant_bytes): Likewise.
7575 (follow_die_sig): Likewise.
7576 (get_signatured_type): Likewise.
7577 (get_DW_AT_signature_type): Likewise.
7578 (dwarf2_find_containing_comp_unit): Likewise.
7579 (set_die_type): Likewise.
7580
7581 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7582
7583 * arch/aarch64.c: Include "common-defs.h".
7584 * arch/amd64.c: Likewise.
7585 * arch/i386.c: Likewise.
7586
7587 2018-02-21 Tom Tromey <tom@tromey.com>
7588
7589 * value.h: (extract_field_op): Update.
7590 * eval.c (extract_field_op): Return a const char *.
7591 * expression.h (parse_expression_for_completion): Update.
7592 * completer.c (complete_expression): Update.
7593 (add_struct_fields): Make fieldname const.
7594 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7595 (mark_completion_tag, parse_exp_in_context_1): Update.
7596 (parse_expression_for_completion): Change "name" to
7597 unique_xmalloc_ptr*.
7598
7599 2018-02-21 Tom Tromey <tom@tromey.com>
7600
7601 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7602
7603 2018-02-21 Yao Qi <yao.qi@linaro.org>
7604
7605 * avr-tdep.c (avr_read_pc): Change parameter type to
7606 readable_regcache.
7607 * gdbarch.sh (read_pc): Likewise.
7608 * gdbarch.c: Re-generated.
7609 * gdbarch.h: Re-generated.
7610 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7611 readable_regcache.
7612 * ia64-tdep.c (ia64_read_pc): Likewise.
7613 * mips-tdep.c (mips_read_pc): Likewise.
7614 * spu-tdep.c (spu_read_pc): Likewise.
7615
7616 2018-02-21 Yao Qi <yao.qi@linaro.org>
7617
7618 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7619 * regcache-dump.c: New file.
7620 * regcache.c: Move register_dump to regcache-dump.c.
7621 (maintenance_print_registers): Likewise.
7622 (maintenance_print_raw_registers): Likewise.
7623 (maintenance_print_cooked_registers): Likewise.
7624 (maintenance_print_register_groups): Likewise.
7625 (maintenance_print_remote_registers): Likewise.
7626 (_initialize_regcache): Likewise.
7627 * regcache.h (register_dump): Moved from regcache.c.
7628
7629 2018-02-21 Yao Qi <yao.qi@linaro.org>
7630
7631 * regcache.c (regcache::regcache): Update.
7632 (regcache::invalidate): Move it to detached_regcache::invalidate.
7633 (get_thread_arch_aspace_regcache): Update.
7634 (regcache::raw_update): Update.
7635 (regcache::cooked_read): Remove some code.
7636 (regcache::cooked_read_value): Likewise.
7637 (regcache::raw_write): Remove assert on m_readonly_p.
7638 (regcache::raw_supply_integer): Move it to
7639 detached_regcache::raw_supply_integer.
7640 (regcache::raw_supply_zeroed): Likewise.
7641 * regcache.h (detached_regcache) <raw_supply_integer>: New
7642 declaration.
7643 <raw_supply_zeroed, invalidate>: Likewise.
7644 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7645 <invalidate>: Likewise.
7646 <m_readonly_p>: Removed.
7647
7648 2018-02-21 Yao Qi <yao.qi@linaro.org>
7649
7650 * infcmd.c (get_return_value): Let stop_regs point to
7651 get_current_regcache.
7652 * regcache.c (regcache::regcache): Remove.
7653 (register_dump_reg_buffer): New class.
7654 (regcache_print): Adjust.
7655 * regcache.h (regcache): Remove constructors.
7656
7657 2018-02-21 Yao Qi <yao.qi@linaro.org>
7658
7659 * regcache.c (class register_dump): New class.
7660 (register_dump_regcache, register_dump_none): New class.
7661 (register_dump_remote, register_dump_groups): New class.
7662 (regcache_print): Update.
7663 * regcache.h (regcache_dump_what): Move it to regcache.c.
7664 (regcache) <dump>: Remove.
7665
7666 2018-02-21 Yao Qi <yao.qi@linaro.org>
7667
7668 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7669 reg_buffer_rw *.
7670 (jit_unwind_reg_set_impl): Call raw_supply.
7671 (jit_frame_sniffer): Use reg_buffer_rw.
7672 * record-full.c (record_full_core_regbuf): Change its type.
7673 (record_full_core_open_1): Use reg_buffer_rw.
7674 (record_full_close): Likewise.
7675 (record_full_core_fetch_registers): Use regcache->raw_supply.
7676 (record_full_core_store_registers): Likewise.
7677 * regcache.c (regcache::get_register_status): Move it to
7678 reg_buffer.
7679 (regcache_raw_set_cached_value): Remove.
7680 (regcache::raw_set_cached_value): Remove.
7681 (regcache::raw_write): Call raw_supply.
7682 (regcache::raw_supply): Move it to reg_buffer_rw.
7683 * regcache.h (regcache_raw_set_cached_value): Remove.
7684 (reg_buffer_rw): New class.
7685
7686 2018-02-21 Yao Qi <yao.qi@linaro.org>
7687
7688 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7689 readonly_detached_regcache.
7690 (dummy_frame_prev_register): Use regcache->cooked_read.
7691 * frame.c (frame_save_as_regcache): Change return type.
7692 (frame_pop): Update.
7693 * frame.h (frame_save_as_regcache): Update declaration.
7694 * inferior.h (get_infcall_suspend_state_regcache): Update
7695 declaration.
7696 * infrun.c (infcall_suspend_state) <registers>: use
7697 readonly_detached_regcache.
7698 (save_infcall_suspend_state): Don't use regcache_dup.
7699 (get_infcall_suspend_state_regcache): Change return type.
7700 * linux-fork.c (struct fork_info) <savedregs>: Change to
7701 readonly_detached_regcache.
7702 <pc>: New field.
7703 (fork_save_infrun_state): Don't use regcache_dup.
7704 (info_checkpoints_command): Adjust.
7705 * mi/mi-main.c (register_changed_p): Update declaration.
7706 (mi_cmd_data_list_changed_registers): Use
7707 readonly_detached_regcache.
7708 (register_changed_p): Change parameter type to
7709 readonly_detached_regcache.
7710 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7711 readonly_detached_regcache.
7712 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7713 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7714 New.
7715 (regcache::save): Move it to reg_buffer.
7716 (regcache::restore): Change parameter type.
7717 (regcache_dup): Remove.
7718 * regcache.h (reg_buffer) <save>: New method.
7719 (readonly_detached_regcache): New class.
7720 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7721 readonly_detached_regcache.
7722 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7723
7724 2018-02-21 Yao Qi <yao.qi@linaro.org>
7725
7726 * frame.c (frame_save_as_regcache): Use regcache method save.
7727 (frame_pop): Use regcache method restore.
7728 * infrun.c (restore_infcall_suspend_state): Likewise.
7729 * linux-fork.c (fork_load_infrun_state): Likewise.
7730 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7731 save.
7732 * regcache.c (regcache_save): Remove.
7733 (regcache::restore): More asserts.
7734 (regcache_cpy): Remove.
7735 * regcache.h (regcache_save): Remove the declaration.
7736 (regcache::restore): Move from private to public.
7737 Remove the friend declaration of regcache_cpy.
7738 (regcache_cpy): Remove declaration.
7739
7740 2018-02-21 Yao Qi <yao.qi@linaro.org>
7741
7742 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7743 parameter type to 'readable_regcache *'.
7744 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7745 * arm-tdep.c (arm_neon_quad_read): Likewise.
7746 (arm_pseudo_read): Likewise.
7747 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7748 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7749 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7750 * gdbarch.c: Re-generated.
7751 * gdbarch.h: Re-generated.
7752 * gdbarch.sh (pseudo_register_read): Change parameter type to
7753 'readable_regcache *'.
7754 (pseudo_register_read_value): Likewise.
7755 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7756 (h8300_pseudo_register_read): Likewise.
7757 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7758 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7759 (i386_pseudo_register_read_into_value): Likewise.
7760 (i386_pseudo_register_read_value): Likewise.
7761 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7762 declaration.
7763 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7764 * m32c-tdep.c (m32c_raw_read): Likewise.
7765 (m32c_read_flg): Likewise.
7766 (m32c_banked_register): Likewise.
7767 (m32c_banked_read): Likewise.
7768 (m32c_sb_read): Likewise.
7769 (m32c_part_read): Likewise.
7770 (m32c_cat_read): Likewise.
7771 (m32c_r3r2r1r0_read): Likewise.
7772 (m32c_pseudo_register_read): Likewise.
7773 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7774 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7775 (mep_pseudo_cr64_read): Likewise.
7776 (mep_pseudo_register_read): Likewise.
7777 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7778 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7779 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7780 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7781 (regcache::cooked_read): Likewise.
7782 (regcache::cooked_read_value): Likewise.
7783 (regcache_cooked_read_signed):
7784 (regcache::cooked_read): Likewise.
7785 * regcache.h (readable_regcache): New class.
7786 (regcache): Inherit readable_regcache. Move some methods to
7787 readable_regcache.
7788 * rl78-tdep.c (rl78_pseudo_register_read): Change
7789 parameter type to 'readable_regcache *'.
7790 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7791 (e500_pseudo_register_read): Change parameter type to
7792 'readable_regcache *'.
7793 (dfp_pseudo_register_read): Likewise.
7794 (vsx_pseudo_register_read): Likewise.
7795 (efpr_pseudo_register_read): Likewise.
7796 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7797 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7798 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7799 (sh64_pseudo_register_read): Likewise.
7800 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7801 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7802 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7803 (spu_pseudo_register_read): Likewise.
7804 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7805 (xtensa_pseudo_register_read): Likewise.
7806
7807 2018-02-21 Yao Qi <yao.qi@linaro.org>
7808
7809 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7810 (regcache::arch): Move it to reg_buffer::arch.
7811 (regcache::register_buffer): Likewise.
7812 (regcache::assert_regnum): Likewise.
7813 (regcache::num_raw_registers): Likewise.
7814 * regcache.h (reg_buffer): New class.
7815 (regcache): Inherit reg_buffer.
7816
7817 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7818
7819 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7820 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7821
7822 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7823
7824 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7825
7826 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7827
7828 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7829 (SFILES): Remove common/*.c files.
7830 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7831 * common/common.host: Add common reference.
7832 * configure.ac: Likewise.
7833 * configure: Regenerate.
7834
7835 2018-02-16 Yao Qi <yao.qi@linaro.org>
7836
7837 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7838 (block_initialize_namespace): Use new.
7839 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7840 (dwarf2_free_objfile): Use delete.
7841 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7842 (copy_type_recursive): Use new.
7843 * gdb_obstack.h (allocate_on_obstack): New.
7844
7845 2018-02-15 Yao Qi <yao.qi@linaro.org>
7846
7847 PR gdb/22849
7848 * inferior.c (exit_inferior_1): Reset inf->control.
7849
7850 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7851
7852 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7853 declaration.
7854
7855 2018-02-14 Pedro Alves <palves@redhat.com>
7856
7857 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7858 frame_cleanup_after_sniffer on exception.
7859
7860 2018-02-14 Tom Tromey <tom@tromey.com>
7861
7862 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7863 const.
7864 (solib_bfd_open): Make pathname const.
7865 * solib.c (solib_bfd_open): Make pathname const.
7866 * solib-spu.c (spu_bfd_fopen): Make name const.
7867 (spu_bfd_open): Make pathname const.
7868 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7869 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7870
7871 2018-02-14 Tom Tromey <tom@tromey.com>
7872
7873 * symfile.c (symfile_bfd_open): Update.
7874 * source.h (openp, source_full_path_of, find_and_open_source):
7875 Change argument type to unique_xmalloc_ptr.
7876 * source.c (openp): Take a unique_xmalloc_ptr.
7877 (source_full_path_of, find_and_open_source): Likewise.
7878 (open_source_file, symtab_to_fullname): Update.
7879 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7880 unique_xmalloc_ptr.
7881 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7882 (exec_file_find): Update.
7883 * psymtab.c (psymtab_to_fullname): Update.
7884 * nto-tdep.h (nto_find_and_open_solib): Update.
7885 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7886 unique_xmalloc_ptr.
7887 * exec.c (exec_file_attach): Update.
7888 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7889 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7890
7891 2018-02-14 Tom Tromey <tom@tromey.com>
7892
7893 * solib.c: Include source.h.
7894 * nto-tdep.c: Include source.h.
7895 * mi/mi-cmd-env.c: Include source.h.
7896 * infcmd.c: Include source.h.
7897 * exec.c: Include source.h.
7898 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7899 (add_path, directory_switch, source_path, init_source_path): Move
7900 declarations...
7901 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7902 (add_path, directory_switch, source_path, init_source_path):
7903 ...here.
7904
7905 2018-02-14 Tom Tromey <tom@tromey.com>
7906
7907 * solist.h (exec_file_find, solib_find): Return
7908 unique_xmalloc_ptr.
7909 (solib_bfd_fopen): Take a const char *.
7910 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7911 (exec_file_find, solib_find): Likewise.
7912 (solib_bfd_fopen): Do not take ownership of "pathname".
7913 (solib_bfd_open): Use unique_xmalloc_ptr.
7914 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7915 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7916 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7917 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7918
7919 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7920
7921 * ada-lang.c (name_match_type_from_name): Remove reference to
7922 ada_name_for_lookup in function's documentation.
7923 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7924
7925 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7926
7927 * defs.h (enum openp_flags): New enum.
7928 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7929 Move to enum openp_flags.
7930 (openp_flags): New enum flags.
7931 (openp): Change parameter type to openp_flags.
7932 * source.c (openp): Change parameter type to openp_flags.
7933 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7934 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7935
7936 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7937
7938 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7939 per-command.
7940
7941 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7942
7943 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7944 into...
7945 (class dwarf2_queue_guard): ...the destructor of this new class.
7946 (dw2_do_instantiate_symtab): Create instance of the new class
7947 dwarf2_queue_guard, remove cleanup.
7948
7949 2018-02-09 Tom Tromey <tom@tromey.com>
7950
7951 * source.c (find_source_lines): Don't reference past the end of
7952 the vector.
7953
7954 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7955
7956 * remote.c (remote_btrace_maybe_reopen): Change error message.
7957 * btrace.c (btrace_enable): Likewise.
7958 (parse_xml_btrace): Likewise.
7959 (parse_xml_btrace_conf): Likewise.
7960
7961 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7962
7963 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7964 (linux_enable_pt, linux_enable_bts): Call
7965 diagnose_perf_event_open_fail.
7966
7967 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7968
7969 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7970 Remove parameter and change return type. Update callers. Move it.
7971 (linux_enable_bts, linux_enable_pt): Improve error message.
7972 (linux_enable_pt): Remove zero buffer size check.
7973 (linux_enable_btrace): Improve error messages. Remove NULL return
7974 check.
7975
7976 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7977
7978 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7979 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7980 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7981 (linux_supports_pt, linux_supports_btrace): Remove.
7982 (linux_enable_bts): Call cpu_supports_bts.
7983 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7984 * remote.c (remote_supports_btrace): Remove.
7985 (init_remote_ops): Remove remote_supports_btrace.
7986 * target-delegates.c: Regenerated.
7987 * target.c (target_supports_btrace): Remove.
7988 * target.h (target_ops) <to_supports_btrace>: Remove
7989 (target_supports_btrace): Remove.
7990 * x86-linux-nat.c (x86_linux_create_target): Remove
7991 linux_supports_btrace.
7992
7993 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7994
7995 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7996 btrace failed.
7997 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7998 exception and use message in own exception.
7999
8000 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8001
8002 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8003 (perf_event_pt_event_type): Use gdb_file_up.
8004 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8005 scoped_fd, and scoped_mmap.
8006
8007 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8008
8009 * common/scoped_mmap.h: New.
8010 * unittests/scoped_mmap-selftest.c: New.
8011 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8012 unittests/scoped_mmap-selftest.c.
8013
8014 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8015
8016 * common/scoped_fd.h: New.
8017 * unittests/scoped_fd-selftest.c: New.
8018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8019 unittests/scoped_fd-selftest.c.
8020
8021 2018-02-09 Tom Tromey <tom@tromey.com>
8022
8023 * auto-load.c (auto_load_section_scripts): Use
8024 gdb::unique_xmalloc_ptr.
8025
8026 2018-02-09 Tom Tromey <tom@tromey.com>
8027
8028 * auto-load.c (execute_script_contents): Use std::string.
8029
8030 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8031
8032 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8033 Python function, rather than a new command.
8034
8035 2018-02-08 Tom Tromey <tom@tromey.com>
8036
8037 * solib.c (solib_find_1): Use std::string.
8038 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8039
8040 2018-02-08 Tom Tromey <tom@tromey.com>
8041
8042 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8043
8044 2018-02-08 Tom Tromey <tom@tromey.com>
8045
8046 * source.c (find_source_lines): Use gdb::def_vector.
8047
8048 2018-02-08 Tom Tromey <tom@tromey.com>
8049
8050 * macrocmd.c (struct temporary_macro_definition): New.
8051 (macro_define_command): Use temporary_macro_definition. Remove
8052 cleanups.
8053 (free_macro_definition_ptr): Remove.
8054
8055 2018-02-08 Tom Tromey <tom@tromey.com>
8056
8057 * macroexp.c (maybe_expand): Use std::string.
8058
8059 2018-02-08 Tom Tromey <tom@tromey.com>
8060
8061 * macroexp.c (struct macro_buffer): Add initializers for some
8062 members.
8063 (init_buffer, init_shared_buffer, free_buffer)
8064 (free_buffer_return_text): Remove.
8065 (macro_buffer): New constructors.
8066 (~macro_buffer): New destructor.
8067 (macro_buffer::set_shared): New method.
8068 (macro_buffer::resize_buffer, macro_buffer::appendc)
8069 (macro_buffer::appendmem): Now methods, not free functions.
8070 (set_token, append_tokens_without_splicing, stringify)
8071 (macro_stringify): Update.
8072 (gather_arguments): Change return type. Remove argc_p argument,
8073 add args_ptr argument. Use std::vector.
8074 (substitute_args): Remove argc argument. Accept std::vector.
8075 (expand): Update. Use std::vector.
8076 (scan, macro_expand, macro_expand_next): Update.
8077
8078 2018-02-08 Tom Tromey <tom@tromey.com>
8079
8080 * symtab.c (default_collect_symbol_completion_matches_break_on):
8081 Use unique_xmalloc_ptr.
8082 * macroscope.h: (sal_macro_scope, user_macro_scope)
8083 (default_macro_scope): Return unique_xmalloc_ptr.
8084 * macroscope.c (sal_macro_scope, user_macro_scope)
8085 (default_macro_scope): Return unique_xmalloc_ptr.
8086 * macroexp.h (macro_expand, macro_expand_once): Return
8087 unique_xmalloc_ptr.
8088 * macroexp.c (macro_expand, macro_expand_once): Return
8089 unique_xmalloc_ptr.
8090 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8091 (info_macro_command, info_macros_command): Use
8092 unique_xmalloc_ptr.
8093 * compile/compile-c-support.c (write_macro_definitions): Use
8094 unique_xmalloc_ptr.
8095 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8096
8097 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8098
8099 * value.c (value_static_field): Assign field type instead of
8100 containing type when returning an optimized out value.
8101
8102 2018-02-06 Yao Qi <yao.qi@linaro.org>
8103
8104 * ft32-tdep.c (ft32_read_pc): Remove.
8105 (ft32_write_pc): Remove.
8106 (ft32_gdbarch_init): Update.
8107 * m32r-tdep.c (m32r_read_pc): Remove.
8108 (m32r_gdbarch_init): Update.
8109 * mep-tdep.c (mep_read_pc): Remove.
8110 (mep_gdbarch_init): Update.
8111 * microblaze-tdep.c (microblaze_write_pc): Remove.
8112 (microblaze_gdbarch_init): Update.
8113 * mn10300-tdep.c (mn10300_read_pc): Remove.
8114 (mn10300_write_pc): Remove.
8115 (mn10300_gdbarch_init): Update.
8116 * moxie-tdep.c (moxie_read_pc): Remove.
8117 (moxie_write_pc): Remove.
8118 (moxie_gdbarch_init): Update.
8119
8120 2018-02-06 Yao Qi <yao.qi@linaro.org>
8121
8122 * expprint.c (print_subexp_standard): Handle
8123 OP_F77_UNDETERMINED_ARGLIST.
8124 (dump_subexp_body_standard): Likewise.
8125
8126 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8127
8128 * target-descriptions.c (tdesc_element_visitor) Add empty
8129 implementations.
8130 (tdesc_type): Move make_gdb_type from here.
8131 (tdesc_type_builtin): Likewise.
8132 (tdesc_type_vector): Likewise.
8133 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8134 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8135 (make_gdb_type_union): Likewise.
8136 (make_gdb_type_flags): Likewise.
8137 (make_gdb_type_enum): Likewise.
8138 (make_gdb_type): New function.
8139 (tdesc_register_type): Use static make_gdb_type.
8140
8141 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8142
8143 * infcmd.c (default_print_one_register_info): Align natural-format
8144 column values consistently one under another.
8145 (pad_to_column): New function.
8146
8147 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8148
8149 * dwarf2read.c (dwarf2_physname): Move commment.
8150
8151 2018-02-01 Leszek Swirski <leszeks@google.com>
8152
8153 * varobj.c (varobj_formatted_print_options): Allow recursive
8154 pretty printing if pretty printing is enabled.
8155
8156 2018-02-01 Leszek Swirski <leszeks@google.com>
8157
8158 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8159 names after a structop as a filename.
8160
8161 2018-02-01 Yao Qi <yao.qi@linaro.org>
8162
8163 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8164 (arm_record_coproc_data_proc): Likewise.
8165
8166 2018-02-01 Yao Qi <yao.qi@linaro.org>
8167
8168 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8169
8170 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8171
8172 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8173 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8174
8175 2018-01-31 Pedro Alves <palves@redhat.com>
8176
8177 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8178 * inflow.c (child_terminal_save_inferior): Wrap reference to
8179 tcgetpgrp in HAVE_TERMIOS_H.
8180 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8181 _WIN32.
8182 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8183 always iterate over all inferiors.
8184 (gdbsim_cntrl_c): Adjust.
8185 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8186
8187 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8188
8189 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8190 index type is objfile-owned if the element type is as well.
8191
8192 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8193
8194 GDB 8.1 released.
8195
8196 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8197
8198 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8199 "features/s390x-linux64.c".
8200 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8201 s390_linux32 and s390x_linux64.
8202 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8203 default tdesc.
8204 * s390-tdep.c: Include "features/s390-linux32.c" and
8205 "features/s390x-linux64.c".
8206 (s390_tdesc_valid): Add check for tdesc_has_registers.
8207 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8208 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8209 tdesc_s390x_linux64.
8210 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8211 tdesc_s390x_linux64 to...
8212 * s390-tdep.h: ...here.
8213
8214 2018-01-30 Pedro Alves <palves@redhat.com>
8215
8216 PR gdb/13211
8217 * config.in, configure: Regenerate.
8218 * configure.ac: Check for getpgid.
8219 * go32-nat.c (go32_pass_ctrlc): New.
8220 (go32_target): Install it.
8221 * inf-child.c (inf_child_target): Install
8222 child_terminal_save_inferior, child_pass_ctrlc and
8223 child_interrupt.
8224 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8225 (inf_ptrace_target): No longer install it.
8226 * infcmd.c (interrupt_target_1): Adjust.
8227 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8228 (child_interrupt): Declare.
8229 (inferior::terminal_state): New.
8230 * inflow.c (struct terminal_info): Update comments.
8231 (inferior_process_group): Delete.
8232 (terminal_is_ours): Delete.
8233 (gdb_tty_state): New.
8234 (child_terminal_init): Adjust.
8235 (is_gdb_terminal, sharing_input_terminal_1)
8236 (sharing_input_terminal): New functions.
8237 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8238 Set the process's actual process group in the foreground if
8239 possible. Handle is_ours_for_output/is_ours distinction. Don't
8240 mark terminal as the inferior's if not sharing GDB's terminal.
8241 Don't check attach_flag.
8242 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8243 pass down a target_terminal_state.
8244 (child_terminal_save_inferior): New, factored out from ...
8245 (child_terminal_ours_1): ... this. Handle
8246 target_terminal_state::is_ours_for_output.
8247 (child_interrupt, child_pass_ctrlc): New.
8248 (inflow_inferior_exit): Clear the inferior's terminal_state.
8249 (copy_terminal_info): Copy the inferior's terminal state.
8250 (_initialize_inflow): Remove reference to terminal_is_ours.
8251 * inflow.h (inferior_process_group): Delete.
8252 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8253 * procfs.c (procfs_target): Don't install procfs_interrupt.
8254 (procfs_interrupt): Delete.
8255 * remote.c (remote_serial_quit_handler): Adjust.
8256 (remote_interrupt): Remove ptid parameter. Adjust.
8257 * target-delegates.c: Regenerate.
8258 * target.c: Include "terminal.h".
8259 (target_terminal::terminal_state): Rename to ...
8260 (target_terminal::m_terminal_state): ... this.
8261 (target_terminal::init): Adjust.
8262 (target_terminal::inferior): Adjust to per-inferior
8263 terminal_state.
8264 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8265 (target_terminal::ours, target_terminal::ours_for_output): Use
8266 target_terminal_is_ours_kind.
8267 (target_interrupt): Remove ptid parameter. Adjust.
8268 (default_target_pass_ctrlc): Adjust.
8269 * target.h (target_ops::to_terminal_save_inferior): New field.
8270 (target_ops::to_interrupt): Remove ptid_t parameter.
8271 (target_interrupt): Remove ptid_t parameter. Update comment.
8272 (target_pass_ctrlc): Update comment.
8273 * target/target.h (target_terminal_state): New scoped enum,
8274 factored out of ...
8275 (target_terminal::terminal_state): ... here.
8276 (target_terminal::inferior): Update comments.
8277 (target_terminal::restore_inferior): New.
8278 (target_terminal::is_inferior, target_terminal::is_ours)
8279 (target_terminal::is_ours_for_output): Adjust.
8280 (target_terminal::scoped_restore_terminal_state): Adjust to
8281 rename, and call restore_inferior() instead of inferior().
8282 (target_terminal::scoped_restore_terminal_state::m_state): Change
8283 type.
8284 (target_terminal::terminal_state): Rename to ...
8285 (target_terminal::m_terminal_state): ... this and change type.
8286
8287 2018-01-30 Pedro Alves <palves@redhat.com>
8288
8289 * linux-nat.c (wait_for_signal): New function.
8290 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8291 directly.
8292 (async_terminal_is_ours)
8293 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8294 (linux_nat_add_target): Don't override
8295 to_terminal_inferior/to_terminal_ours.
8296
8297 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8298
8299 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8300
8301 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8302
8303 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8304 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8305 dwarf2_per_objfile_free here.
8306 (dwarf2_per_objfile_free): Remove.
8307 (_initialize_dwarf2_read): Don't register
8308 dwarf2_per_objfile_free as a registry cleanup.
8309
8310 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8311
8312 Avoid compilation errors in MinGW native builds
8313
8314 The error is triggered by including python-internal.h, and the
8315 error message is:
8316
8317 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8318 from build-gnulib/import/math.h:27,
8319 from d:/usr/Python26/include/pyport.h:235,
8320 from d:/usr/Python26/include/Python.h:58,
8321 from python/python-internal.h:94,
8322 from python/py-arch.c:24:
8323 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8324 using ::hypot;
8325 ^~~~~
8326
8327 This happens because Python headers define 'hypot' to expand t
8328 '_hypot' in the Windows builds.
8329 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8330 'hypoth'. This avoids a compilation error.
8331
8332 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8333
8334 * MAINTAINERS (Write After Approval): Fix ordering.
8335
8336 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8337
8338 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8339
8340 2018-01-26 Alan Modra <amodra@gmail.com>
8341
8342 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8343 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8344 Remove nop. Make const. Comment.
8345 (powerpc32_plt_stub_so_2): New.
8346 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8347 Correct count. Update uses.
8348 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8349 Move common code reading PLT entry word. Correct
8350 powerpc32_plt_stub PLT address calculation.
8351 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8352 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8353 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8354 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8355 (ppc64_standard_linkage8): Likewise.
8356 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8357 Correct insns description.
8358 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8359
8360 2018-01-24 Pedro Alves <palves@redhat.com>
8361
8362 GCC PR libstdc++/83906
8363 * gdbtypes.c (operator==(const dynamic_prop &,
8364 const dynamic_prop &)): New.
8365 (operator==(const range_bounds &, const range_bounds &)): New.
8366 (check_types_equal): Use them instead of memcmp.
8367 * gdbtypes.h (operator==(const dynamic_prop &,
8368 const dynamic_prop &)): Declare.
8369 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8370 (operator==(const range_bounds &, const range_bounds &)): Declare.
8371 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8372
8373 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8374
8375 * s390-linux-tdep.c (s390_record_address_mask)
8376 (s390_record_calc_disp_common, s390_record_calc_disp)
8377 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8378 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8379 (s390_process_record): Move to s390-tdep.c.
8380 (s390_linux_init_abi_any): Adjust.
8381 * s390-tdep.c (s390_record_address_mask)
8382 (s390_record_calc_disp_common, s390_record_calc_disp)
8383 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8384 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8385 (s390_process_record): Moved from s390-linux-tdep.c
8386 (s390_gdbarch_init): Adjust.
8387
8388 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8389
8390 * s390-linux-nat.c (s390-tdep.h): New include.
8391 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8392 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8393 (ALLDEPFILES): Add s390-tdep.c.
8394 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8395 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8396 * s390-tdep.h: ...this. New file.
8397 * s390-linux-tdep.c (s390-tdep.h): New include.
8398 (_initialize_s390_tdep): Rename to...
8399 (_initialize_s390_linux_tdep): ...this and adjust.
8400 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8401 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8402 s390-tdep.h.
8403 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8404 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8405 (s390_is_partial_instruction, s390_software_single_step)
8406 (is_non_branch_ril, s390_displaced_step_copy_insn)
8407 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8408 (s390_prologue_data, s390_addr, s390_store, s390_load)
8409 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8410 (s390_register_call_saved, s390_guess_tracepoint_registers)
8411 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8412 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8413 (s390_pseudo_register_name, s390_pseudo_register_type)
8414 (s390_pseudo_register_read, s390_pseudo_register_write)
8415 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8416 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8417 (s390_addr_bits_remove, s390_address_class_type_flags)
8418 (s390_address_class_type_flags_to_name)
8419 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8420 (s390_function_arg_float, s390_function_arg_vector)
8421 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8422 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8423 (s390_frame_align, s390_register_return_value, s390_return_value)
8424 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8425 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8426 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8427 (s390_trad_frame_prev_register, s390_unwind_cache)
8428 (s390_prologue_frame_unwind_cache)
8429 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8430 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8431 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8432 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8433 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8434 (s390_frame_base_address, s390_local_base_address)
8435 (s390_frame_base, s390_gcc_target_options)
8436 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8437 (s390_validate_reg_range, s390_tdesc_valid)
8438 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8439 * s390-tdep.c: ...this. New file.
8440
8441 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8442
8443 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8444 (s390_process_record, s390_gdbarch_tdep_alloc)
8445 (s390_linux_init_abi_any): Use/set new hook.
8446
8447 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8448
8449 * s390-linux-tdep.c (osabi.h): New include.
8450 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8451 (s390_linux_init_abi_any): New functions.
8452 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8453
8454 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8455
8456 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8457 tdesc_has_registers check
8458
8459 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8460
8461 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8462 (s390_validate_reg_range): New macro.
8463 (s390_gdbarch_init): Adjust.
8464
8465 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8466
8467 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8468 (s390_gdbarch_tdep_alloc): Adjust.
8469 (s390_gdbarch_init): Adjust.
8470
8471 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8472
8473 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8474 <have_tdb>: Change type to bool.
8475 (s390_gdbarch_tdep_alloc): Adjust.
8476 (s390_gdbarch_init): Adjust.
8477
8478 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8479
8480 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8481 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8482 (s390_gdbarch_tdep_alloc): New function.
8483 (s390_gdbarch_init): Allocate tdep at start and use its fields
8484 instead of separate variables.
8485
8486 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8487
8488 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8489 when looking for cached gdbarch and add comment for remaining.
8490
8491 2018-01-22 Pedro Alves <palves@redhat.com>
8492 Sergio Durigan Junior <sergiodj@redhat.com>
8493
8494 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8495 case.
8496
8497 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8498
8499 * MAINTAINERS: Update my company e-mail address.
8500
8501 2018-01-22 Yao Qi <yao.qi@linaro.org>
8502
8503 * regcache.c (cooked_write_test): New function.
8504 (_initialize_regcache): Register the test.
8505
8506 2018-01-22 Yao Qi <yao.qi@linaro.org>
8507
8508 * ia64-tdep.c (ia64_pseudo_register_read): Call
8509 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8510 * m32c-tdep.c (m32c_cat_read): Likewise.
8511 (m32c_r3r2r1r0_read): Likewise.
8512 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8513 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8514
8515 2018-01-22 Yao Qi <yao.qi@linaro.org>
8516
8517 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8518 method raw_read instead of regcache_raw_read.
8519 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8520 * arm-tdep.c (arm_neon_quad_read): Likewise.
8521 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8522 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8523 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8524 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8525 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8526 (i386_pseudo_register_read_into_value): Likewise.
8527 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8528 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8529 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8530 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8531 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8532 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8533 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8534 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8535 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8536
8537 2018-01-22 Yao Qi <yao.qi@linaro.org>
8538
8539 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8540 * configure.tgt: Remove target mt.
8541 * mt-tdep.c: Remove.
8542 * regcache.c (cooked_read_test): Remove the check for mt.
8543
8544 2018-01-22 Yao Qi <yao.qi@linaro.org>
8545
8546 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8547 instead of gdbarch_pseudo_register_read_value.
8548
8549 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8550
8551 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8552 language is Ada.
8553
8554 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8555
8556 * linespec.c (create_sals_line_offset): Remove code that preserved
8557 the symtab_and_line's line number.
8558
8559 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8560
8561 * varobj.c (varobj_create): Don't set valid_block when creating a
8562 floating varobj.
8563
8564 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8565
8566 * varobj.c (varobj_create): Remove out of date comment.
8567
8568 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8569
8570 PR mi/20395
8571 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8572 updating innermost block.
8573 * parse.c (innermost_block_tracker::update): Take extra type
8574 parameter, and check types match before updating innermost block.
8575 (write_dollar_variable): Update innermost block for registers.
8576 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8577 (innermost_block_tracker::innermost_block_tracker): Initialise
8578 m_types member.
8579 (innermost_block_tracker::reset): Take type parameter.
8580 (innermost_block_tracker::update): Take type parameter, and pass
8581 type through as needed.
8582 (innermost_block_tracker::m_types): New member.
8583 * varobj.c (varobj_create): Pass type when reseting innermost
8584 block.
8585
8586 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8587
8588 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8589 * ada-lang.c (resolve_subexp): Likewise.
8590 * breakpoint.c (set_breakpoint_condition) Likewise.
8591 (watch_command_1) Likewise.
8592 * c-exp.y (variable): Likewise.
8593 * d-exp.y (PrimaryExpression): Likewise.
8594 * f-exp.y (variable): Likewise.
8595 * go-exp.y (variable): Likewise.
8596 * m2-exp.y (variable): Likewise.
8597 * objfiles.c (objfile::~objfile): Likewise.
8598 * p-exp.y (variable): Likewise.
8599 * parse.c (innermost_block): Change type.
8600 * parser-defs.h (class innermost_block_tracker): New.
8601 (innermost_block): Change to innermost_block_tracker.
8602 * printcmd.c (display_command): Switch to innermost_block API.
8603 (do_one_display): Likewise.
8604 * rust-exp.y (do_one_display): Likewise.
8605 * symfile.c (clear_symtab_users): Likewise.
8606 * varobj.c (varobj_create): Switch to innermost_block API, replace
8607 use of innermost_block with block stored on varobj object.
8608
8609 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8610
8611 * expression.h (innermost_block): Remove declaration.
8612 * varobj.c: Add 'parser-defs.h' include.
8613
8614 2018-01-19 Tom Tromey <tom@tromey.com>
8615
8616 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8617 symbols in the static and global blocks.
8618
8619 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8620
8621 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8622 gdb_ptrace.h, and move including gdb_wait.h ...
8623 * nat/linux-ptrace.h: ... to here.
8624
8625 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8626
8627 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8628 inf_ptrace_detach_success.
8629 (inf_ptrace_detach_success): Add inferior parameter, use it
8630 instead of inferior_ptid, pass it to detach_inferior.
8631 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8632 parameter.
8633 * inferior.c (detach_inferior): Add overload that takes an
8634 inferior object.
8635 * inferior.h (detach_inferior): Likewise.
8636 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8637 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8638 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8639
8640 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8641
8642 * target.h (struct target_ops) <to_detach>: Add inferior
8643 parameter.
8644 (target_detach): Likewise.
8645 * target.c (dispose_inferior): Pass inferior down.
8646 (target_detach): Pass inferior down. Assert that it is equal to
8647 the current inferior.
8648 * aix-thread.c (aix_thread_detach): Pass inferior down.
8649 * corefile.c (core_file_command): Pass current_inferior() down.
8650 * corelow.c (core_detach): Add inferior parameter.
8651 * darwin-nat.c (darwin_detach): Likewise.
8652 * gnu-nat.c (gnu_detach): Likewise.
8653 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8654 * infcmd.c (detach_command): Pass current_inferior() down to
8655 target_detach.
8656 * infrun.c (follow_fork_inferior): Pass parent_inf to
8657 target_detach.
8658 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8659 target_detach.
8660 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8661 * linux-thread-db.c (thread_db_detach): Likewise.
8662 * nto-procfs.c (procfs_detach): Likewise.
8663 * procfs.c (procfs_detach): Likewise.
8664 * record.c (record_detach): Likewise.
8665 * record.h (struct inferior): Forward-declare.
8666 (record_detach): Add inferior parameter.
8667 * remote-sim.c (gdbsim_detach): Likewise.
8668 * remote.c (remote_detach_1): Likewise.
8669 (remote_detach): Likewise.
8670 (extended_remote_detach): Likewise.
8671 * sol-thread.c (sol_thread_detach): Likewise.
8672 * target-debug.h (target_debug_print_inferior_p): New macro.
8673 * target-delegates.c: Re-generate.
8674 * top.c (kill_or_detach): Pass inferior down to target_detach.
8675 * windows-nat.c (windows_detach): Add inferior parameter.
8676
8677 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8678
8679 * target.h (struct target_ops) <to_detach>: Remove args
8680 parameter.
8681 (target_detach): Likewise.
8682 * target.c (dispose_inferior): Adjust.
8683 (target_detach): Remove args parameter, adjust.
8684 * aix-thread.c (aix_thread_detach): Adjust.
8685 * corefile.c (core_file_command): Adjust.
8686 * corelow.c (core_detach): Adjust.
8687 * darwin-nat.c (darwin_detach): Adjust.
8688 * gnu-nat.c (gnu_detach): Adjust.
8689 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8690 * infcmd.c (detach_command): Adjust
8691 * infrun.c (follow_fork_inferior): Adjust.
8692 (handle_vfork_child_exec_or_exit): Adjust.
8693 * linux-fork.c (linux_fork_detach): Remove args parameter.
8694 * linux-fork.h (linux_fork_detach): Likewise.
8695 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8696 * linux-thread-db.c (thread_db_detach): Likewise.
8697 * nto-procfs.c (procfs_detach): Likewise.
8698 * procfs.c (procfs_detach): Likewise.
8699 (do_detach): Remove signo parameter.
8700 * record.c (record_detach): Remove args parameter.
8701 * record.h (record_detach): Likewise.
8702 * remote-sim.c (gdbsim_detach): Likewise.
8703 * remote.c (remote_detach_1): Likewise.
8704 (remote_detach): Likewise.
8705 (extended_remote_detach): Likewise.
8706 * sol-thread.c (sol_thread_detach): Likewise.
8707 * target-delegates.c: Re-generate.
8708 * top.c (struct qt_args) <args>: Remove field.
8709 (kill_or_detach): Don't pass args.
8710 (quit_force): Don't set args.
8711 * windows-nat.c (windows_detach): Remove args parameter.
8712
8713 2018-01-19 Yao Qi <yao.qi@linaro.org>
8714
8715 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8716 (arm_linux_init_abi): Install it.
8717
8718 2018-01-19 Yao Qi <yao.qi@linaro.org>
8719
8720 * osabi.c (gdb_osabi_names): Extend the regexp for
8721 arm-linux-gnueabihf.
8722
8723 2018-01-18 Yao Qi <yao.qi@linaro.org>
8724
8725 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8726 m_abbrevs.
8727 (abbrev_table::add_abbrev): Update.
8728 (abbrev_table::lookup_abbrev): Update.
8729
8730 2018-01-18 Yao Qi <yao.qi@linaro.org>
8731
8732 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8733
8734 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8735
8736 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8737 to "std::string".
8738
8739 2018-01-17 Tom Tromey <tom@tromey.com>
8740
8741 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8742
8743 2018-01-17 Tom Tromey <tom@tromey.com>
8744
8745 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8746 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8747 (create_array_type_with_stride): Update.
8748 * dwarf2read.c (set_die_type): Update.
8749
8750 2018-01-17 Tom Tromey <tom@tromey.com>
8751
8752 * dwarf2read.c (delayed_method_info): Remove typedef.
8753 (dwarf2_cu::method_info): Now a std::vector.
8754 (add_to_method_list): Update.
8755 (free_delayed_list): Remove.
8756 (compute_delayed_physnames): Update.
8757 (process_full_comp_unit, process_full_type_unit): Clear the method
8758 list. Remove cleanups.
8759 (psymtab_include_file_name): Add name_holder parameter. Use
8760 unique_xmalloc_ptr.
8761 (dwarf_decode_lines): Update.
8762
8763 2018-01-17 Tom Tromey <tom@tromey.com>
8764 Simon Marchi <simon.marchi@ericsson.com>
8765
8766 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8767 (dwarf2_per_objfile::free_cached_comp_units)
8768 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8769 (init_cutu_and_read_dies_no_follow): Update.
8770 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8771 (dwarf2_cu::~dwarf2_cu): New.
8772 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8773 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8774
8775 2018-01-17 Tom Tromey <tom@tromey.com>
8776 Simon Marchi <simon.marchi@ericsson.com>
8777
8778 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8779 (struct die_reader_specs) <abbrev_table>: New member.
8780 (struct abbrev_table): Add constructor.
8781 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8782 <abbrev_obstack>: Now an auto_obstack.
8783 (abbrev_table_up): New typedef.
8784 (init_cu_die_reader): Add abbrev_table parameter.
8785 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8786 Add result_dwo_abbrev_table.
8787 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8788 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8789 Update.
8790 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8791 parameter.
8792 (skip_children): Update.
8793 (abbrev_table::alloc_abbrev): Rename from
8794 abbrev_table_alloc_abbrev.
8795 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8796 (abbrev_table::lookup_abbrev): Rename from
8797 abbrev_table_lookup_abbrev.
8798 (abbrev_table_read_table): Return abbrev_table_up.
8799 (abbrev_table_free, abbrev_table_free_cleanup)
8800 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8801 (load_partial_dies): Update.
8802
8803 2018-01-17 Tom Tromey <tom@tromey.com>
8804
8805 * dwarf2read.c (dwarf2_compute_name): Update comment.
8806 (read_func_scope, read_variable): Update.
8807 (new_symbol): Remove.
8808 (new_symbol_full): Rename to new_symbol.
8809
8810 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8811
8812 PR gdb/16577
8813 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8814 a warning instead of throwing an error, set section size to 0 and return
8815 NULL.
8816 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8817
8818 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8819
8820 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8821 std::string.
8822 (linux_ptrace_attach_fail_reason_string): Likewise.
8823 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8824 Likewise.
8825 (linux_ptrace_attach_fail_reason_string): Likewise.
8826 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8827
8828 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8829
8830 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8831
8832 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8833
8834 PR gdb/21559
8835 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8836 checking for fs_base/gs_base fields in struct user_regs_struct.
8837 * configure: Regenerate.
8838
8839 2018-01-17 Yao Qi <yao.qi@linaro.org>
8840
8841 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8842 function.
8843 (aarch64_linux_init_abi): Install it to gdbarch hook
8844 gcc_target_options.
8845
8846 2018-01-15 Pedro Alves <palves@redhat.com>
8847
8848 * common/signals-state-save-restore.c
8849 (save_original_signals_state): Fix typos.
8850
8851 2017-01-12 Tom Tromey <tom@tromey.com>
8852 Sergio Durigan Junior <sergiodj@redhat.com>
8853
8854 * Makefile.in (install-only): Install gdb-add-index.
8855
8856 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8857
8858 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8859
8860 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8861
8862 * infrun.c (keep_going_pass_signal): Clear step-over info when
8863 insert_breakpoints fails.
8864
8865 2018-01-11 Pedro Alves <palves@redhat.com>
8866
8867 PR gdb/22583
8868 * infrun.c (resume): Rename to ...
8869 (resume_1): ... this.
8870 (resume): Reimplement as wrapper around resume_1.
8871
8872 2018-01-11 Pedro Alves <palves@redhat.com>
8873
8874 PR remote/22597
8875 * remote.c (remote_parse_stop_reply): Default to the last-set
8876 general thread instead of to 'magic_null_ptid'.
8877
8878 2018-01-10 Pedro Alves <palves@redhat.com>
8879
8880 * language.h (language_get_symbol_name_matcher): Rename ...
8881 (get_symbol_name_matcher): ... this.
8882 * language.c (language_get_symbol_name_matcher): Ditto.
8883 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8884 callers adjusted.
8885
8886 2018-01-10 Pedro Alves <palves@redhat.com>
8887
8888 PR gdb/22670
8889 * dwarf2read.c
8890 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8891 Adjust to use language_get_symbol_name_matcher instead of
8892 language_defn::la_get_symbol_name_matcher.
8893 * language.c (language_get_symbol_name_matcher): If in Ada mode
8894 and the lookup name is a verbatim match, return Ada's matcher.
8895 * language.h (language_get_symbol_name_matcher): Adjust comment.
8896 (ada_lookup_name_info::verbatim_p):: New method.
8897
8898 2018-01-10 Pedro Alves <palves@redhat.com>
8899
8900 PR gdb/22670
8901 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8902 minsym's language is language_auto or language_cplus, pass down
8903 language_ada instead.
8904 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8905
8906 2018-01-10 Pedro Alves <palves@redhat.com>
8907
8908 PR gdb/22670
8909 * minsyms.c (linkage_name_str): New function.
8910 (iterate_over_minimal_symbols): Use it.
8911
8912 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8913
8914 * NEWS: Document that 'info proc' now works on FreeBSD.
8915
8916 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8917
8918 * configure.ac: Check for kinfo_getfile in libutil.
8919 * configure: Regenerate.
8920 * config.in: Regenerate.
8921 * fbsd-nat.c: Include "fbsd-tdep.h".
8922 (fbsd_fetch_cmdline): New.
8923 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8924 rather than calling error.
8925 (fbsd_info_proc): New.
8926 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8927 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8928 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8929
8930 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8931
8932 * fbsd-nat.c (struct free_deleter): Remove.
8933 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8934
8935 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8936
8937 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8938 NULL for an empty pathname.
8939
8940 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8941
8942 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8943 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8944 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8945 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8946 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8947 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8948 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8949 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8950 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8951 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8952 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8953 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8954 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8955 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8956 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8957
8958 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8959
8960 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8961 (gnu_xfer_auxv): New function.
8962 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8963 TARGET_OBJECT_AUXV.
8964
8965 2018-01-08 Yao Qi <yao.qi@linaro.org>
8966 Simon Marchi <simon.marchi@ericsson.com>
8967
8968 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8969 common/selftest.c.
8970 (COMMON_OBS): Remove selftest.o.
8971 * configure.ac: Append selftest-arch.c and common/selftest.c to
8972 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8973 * configure: Re-generated.
8974 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8975 GDB_SELF_TEST.
8976 (maintenance_info_selftests): Likewise.
8977
8978 2018-01-08 Xavier Roirand <roirand@adacore.com>
8979
8980 * ada-valprint.c (val_print_packed_array_elements): Use
8981 proper number of elements when printing an array indexed
8982 by an enumeration type.
8983
8984 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8985
8986 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8987 (dw2_get_file_names_reader): Adjust.
8988 (lookup_dwo_signatured_type): Adjust.
8989 (lookup_dwp_signatured_type): Adjust.
8990 (lookup_signatured_type): Adjust.
8991 (create_type_unit_group): Adjust.
8992 (get_type_unit_group): Adjust.
8993 (process_psymtab_comp_unit_reader): Adjust.
8994 (build_type_psymtabs_reader): Adjust.
8995 (scan_partial_symbols): Adjust.
8996 (add_partial_symbol): Adjust.
8997 (add_partial_subprogram): Adjust.
8998 (peek_die_abbrev): Adjust.
8999 (fixup_go_packaging): Adjust.
9000 (process_imported_unit_die): Adjust.
9001 (dwarf2_compute_name): Adjust.
9002 (dwarf2_physname): Adjust.
9003 (read_import_statement): Adjust.
9004 (handle_DW_AT_stmt_list): Adjust.
9005 (read_file_scope): Adjust.
9006 (read_func_scope): Adjust.
9007 (read_lexical_block_scope): Adjust.
9008 (read_call_site_scope): Adjust.
9009 (read_variable): Adjust.
9010 (dwarf2_rnglists_process): Adjust.
9011 (dwarf2_ranges_process): Adjust.
9012 (dwarf2_ranges_read): Adjust.
9013 (dwarf2_get_pc_bounds): Adjust.
9014 (dwarf2_record_block_ranges): Adjust.
9015 (dwarf2_add_field): Adjust.
9016 (dwarf2_add_member_fn): Adjust.
9017 (read_structure_type): Adjust.
9018 (process_structure_scope): Adjust.
9019 (read_enumeration_type): Adjust.
9020 (read_array_type): Adjust.
9021 (mark_common_block_symbol_computed): Adjust.
9022 (read_common_block): Adjust.
9023 (read_namespace_type): Adjust.
9024 (read_namespace): Adjust.
9025 (read_module_type): Adjust.
9026 (read_tag_pointer_type): Adjust.
9027 (read_tag_ptr_to_member_type): Adjust.
9028 (read_tag_string_type): Adjust.
9029 (read_subroutine_type): Adjust.
9030 (read_typedef): Adjust.
9031 (read_base_type): Adjust.
9032 (attr_to_dynamic_prop): Adjust.
9033 (read_subrange_type): Adjust.
9034 (read_unspecified_type): Adjust.
9035 (dwarf2_read_abbrevs): Adjust.
9036 (load_partial_dies): Adjust.
9037 (read_partial_die): Adjust.
9038 (find_partial_die): Adjust.
9039 (guess_partial_die_structure_name): Adjust.
9040 (fixup_partial_die): Adjust.
9041 (read_attribute_value): Adjust.
9042 (read_addr_index): Adjust.
9043 (read_addr_index_from_leb128): Adjust.
9044 (read_str_index): Adjust.
9045 (dwarf2_string_attr): Adjust.
9046 (get_debug_line_section): Adjust.
9047 (dwarf_decode_line_header): Adjust.
9048 (lnp_state_machine::check_line_address): Adjust.
9049 (dwarf_decode_lines_1): Adjust.
9050 (dwarf_decode_lines): Adjust.
9051 (dwarf2_start_symtab): Adjust.
9052 (var_decode_location): Adjust.
9053 (new_symbol_full): Adjust.
9054 (dwarf2_const_value_data): Adjust.
9055 (dwarf2_const_value_attr): Adjust.
9056 (dwarf2_const_value): Adjust.
9057 (die_type): Adjust.
9058 (die_containing_type): Adjust.
9059 (build_error_marker_type): Adjust.
9060 (lookup_die_type): Adjust.
9061 (guess_full_die_structure_name): Adjust.
9062 (anonymous_struct_prefix): Adjust.
9063 (determine_prefix): Adjust.
9064 (dwarf2_name): Adjust.
9065 (follow_die_ref_or_sig): Adjust.
9066 (follow_die_offset): Adjust.
9067 (follow_die_ref): Adjust.
9068 (follow_die_sig_1): Adjust.
9069 (follow_die_sig): Adjust.
9070 (get_signatured_type): Adjust.
9071 (get_DW_AT_signature_type): Adjust.
9072 (decode_locdesc): Adjust.
9073 (dwarf_decode_macros): Adjust.
9074 (cu_debug_loc_section): Adjust.
9075 (fill_in_loclist_baton): Adjust.
9076 (dwarf2_symbol_mark_computed): Adjust.
9077 (init_one_comp_unit): Don't assign
9078 dwarf2_cu::dwarf2_per_objfile.
9079 (set_die_type): Adjust.
9080
9081 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9082
9083 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9084 <dwarf2_per_objfile>: New field.
9085 (dwarf2_per_objfile): Remove global.
9086 (get_dwarf2_per_objfile): New function.
9087 (set_dwarf2_per_objfile): New function.
9088 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9089 dwarf2_per_objfile.
9090 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9091 (read_abbrev_offset): Likewise.
9092 (read_indirect_string): Likewise.
9093 (read_indirect_line_string): Likewise.
9094 (read_indirect_string_at_offset): Likewise.
9095 (read_indirect_string_from_dwz): Likewise.
9096 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9097 dwarf2_per_objfile.
9098 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9099 (create_all_comp_units): Change objfile parameter to
9100 dwarf2_per_objfile.
9101 (create_all_type_units): Likewise.
9102 (process_queue): Add dwarf2_per_objfile parameter.
9103 (read_and_check_comp_unit_head): Likewise.
9104 (lookup_dwo_unit_in_dwp): Likewise.
9105 (get_dwp_file): Likewise.
9106 (process_cu_includes): Likewise.
9107 (struct free_dwo_file_cleanup_data): New struct.
9108 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9109 set_dwarf2_per_objfile.
9110 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9111 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9112 context, adjust calls.
9113 (dw2_instantiate_symtab): Likewise.
9114 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9115 (dw2_get_cu): Likewise.
9116 (create_cu_from_index_list): Change objfile parameter to
9117 dwarf2_per_objfile.
9118 (create_cus_from_index_list): Get dwarf2_per_objfile from
9119 context, adjust calls.
9120 (create_cus_from_index): Likewise.
9121 (create_signatured_type_table_from_index): Change objfile
9122 parameter to dwarf2_per_objfile.
9123 (create_signatured_type_table_from_debug_names): Change objfile
9124 parameter to dwarf2_per_objfile.
9125 (create_addrmap_from_index): Likewise.
9126 (create_addrmap_from_aranges): Likewise.
9127 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9128 (dw2_setup): Remove.
9129 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9130 context.
9131 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9132 get_dwarf2_per_objfile.
9133 (dw2_forget_cached_source_info): Likewise.
9134 (dw2_map_symtabs_matching_filename): Likewise.
9135 (struct dw2_symtab_iterator) <index>: Remove.
9136 <dwarf2_per_objfile>: New field.
9137 (dw2_symtab_iter_init): Replace index parameter with
9138 dwarf2_per_objfile.
9139 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9140 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9141 (dw2_print_stats): Likewise.
9142 (dw2_dump): Likewise.
9143 (dw2_expand_symtabs_for_function): Likewise.
9144 (dw2_expand_all_symtabs): Likewise.
9145 (dw2_expand_symtabs_with_fullname): Likewise.
9146 (dw2_expand_marked_cus): Replace index and objfile parameters
9147 with dwarf2_per_objfile.
9148 (dw_expand_symtabs_matching_file_matcher): Add
9149 dwarf2_per_objfile parameter and adjust calls.
9150 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9151 adjust calls.
9152 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9153 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9154 adjust calls.
9155 (create_cus_from_debug_names_list): Replace objfile parameter
9156 with dwarf2_per_objfile and adjust calls.
9157 (create_cus_from_debug_names): Likewise.
9158 (dwarf2_read_debug_names): Likewise.
9159 (mapped_debug_names::namei_to_name): Adjust call.
9160 (dw2_debug_names_iterator::next): Likewise.
9161 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9162 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9163 (dw2_debug_names_dump): Likewise.
9164 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9165 (dw2_debug_names_expand_symtabs_matching): Likewise.
9166 (dwarf2_initialize_objfile): Likewise.
9167 (dwarf2_build_psymtabs): Likewise.
9168 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9169 this_cu.
9170 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9171 (read_and_check_comp_unit_head): Likewise.
9172 (read_abbrev_offset): Likewise.
9173 (create_debug_type_hash_table): Likewise.
9174 (create_debug_types_hash_table): Likewise.
9175 (create_all_type_units): Replace objfile parameter with
9176 dwarf2_per_objfile.
9177 (add_type_unit): Add dwarf2_per_objfile parameter.
9178 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9179 with dwarf2_per_objfile.
9180 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9181 (lookup_dwp_signatured_type): Likewise.
9182 (lookup_signatured_type): Likewise.
9183 (read_cutu_die_from_dwo): Likewise.
9184 (init_tu_and_read_dwo_dies): Likewise.
9185 (init_cutu_and_read_dies): Likewise.
9186 (init_cutu_and_read_dies_no_follow): Likewise.
9187 (allocate_type_unit_groups_table): Add objfile parameter.
9188 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9189 (get_type_unit_group): Likewise.
9190 (process_psymtab_comp_unit): Update call.
9191 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9192 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9193 (print_tu_stats): Likewise.
9194 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9195 in void* parameter.
9196 (build_type_psymtabs): Change objfile parameter to
9197 dwarf2_per_objfile.
9198 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9199 passed in void* parameter.
9200 (process_skeletonless_type_units): Change objfile parameter to
9201 dwarf2_per_objfile.
9202 (set_partial_user): Likewise.
9203 (dwarf2_build_psymtabs_hard): Likewise.
9204 (read_comp_units_from_section): Likewise.
9205 (create_all_comp_units): Likewise.
9206 (scan_partial_symbols): Update calls.
9207 (add_partial_symbol): Likewise.
9208 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9209 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9210 (process_queue): Add dwarf2_per_objfile parameter.
9211 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9212 (compute_compunit_symtab_includes): Likewise.
9213 (process_cu_includes): Add dwarf2_per_objfile parameter.
9214 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9215 (process_full_type_unit): Likewise.
9216 (process_imported_unit_die): Update call.
9217 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9218 (read_file_scope): Likewise.
9219 (allocate_dwo_file_hash_table): Add objfile parameter.
9220 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9221 (create_cus_hash_table): Likewise.
9222 (create_dwp_hash_table): Likewise.
9223 (create_dwo_unit_in_dwp_v1): Likewise.
9224 (create_dwp_v2_section): Likewise.
9225 (create_dwo_unit_in_dwp_v2): Likewise.
9226 (lookup_dwo_unit_in_dwp): Likewise.
9227 (try_open_dwop_file): Likewise.
9228 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9229 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9230 cleanup to include a reference to dwarf2_per_objfile.
9231 (open_dwp_file): Add dwarf2_per_objfile parameter.
9232 (open_and_init_dwp_file): Likewise.
9233 (get_dwp_file): Likewise.
9234 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9235 (queue_and_load_all_dwo_tus): Update call.
9236 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9237 data.
9238 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9239 (dwarf2_ranges_process): Likewise.
9240 (dwarf2_get_pc_bounds): Likewise.
9241 (mark_common_block_symbol_computed): Likewise.
9242 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9243 (dwarf2_read_abbrevs): Update call.
9244 (read_partial_die): Use dwarf2_per_objfile from cu.
9245 (find_partial_die): Likewise.
9246 (fixup_partial_die): Likewise.
9247 (read_attribute_value): Likewise.
9248 (read_indirect_string_at_offset_from): Add objfile parameter.
9249 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9250 parameter.
9251 (read_indirect_string_from_dwz): Add objfile parameter.
9252 (read_indirect_string): Add objfile parameter.
9253 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9254 (read_addr_index): Use dwarf2_per_objfile from cu.
9255 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9256 call dw2_setup.
9257 (read_str_index): Use dwarf2_per_objfile from cu.
9258 (get_debug_line_section): Likewise.
9259 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9260 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9261 (new_symbol_full): Use dwarf2_per_objfile from cu.
9262 (build_error_marker_type): Likewise.
9263 (lookup_die_type): Likewise.
9264 (determine_prefix): Likewise.
9265 (follow_die_offset): Likewise.
9266 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9267 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9268 (dwarf2_fetch_die_type_sect_off): Likewise.
9269 (dwarf2_get_die_type): Likewise.
9270 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9271 (get_signatured_type): Likewise.
9272 (get_DW_AT_signature_type): Likewise.
9273 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9274 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9275 (cu_debug_loc_section): Likewise.
9276 (fill_in_loclist_baton): Likewise.
9277 (dwarf2_symbol_mark_computed): Likewise.
9278 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9279 dwarf2_per_objfile.
9280 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9281 parameter.
9282 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9283 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9284 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9285 (set_die_type): Use dwarf2_free_objfile from cu.
9286 (get_die_type_at_offset): Likewise.
9287 (dwarf2_per_objfile_free): Don't assign global variable.
9288 (debug_names) <constructor>: Add dwarf2_per_objfile
9289 parameter, update m_debugstrlookup construction.
9290 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9291 parameter.
9292 <m_dwarf2_per_objfile>: New field.
9293 <lookup>: Use m_dwarf2_per_objfile.
9294 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9295 (psyms_seen_size): Likewise.
9296 (write_gdbindex): Replace objfile parameter with
9297 dwarf2_per_objfile.
9298 (write_debug_names): Likewise.
9299 (write_psymtabs_to_index): Likewise.
9300 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9301 calls.
9302
9303 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9304
9305 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9306 <dwarf2_per_objfile>: New field.
9307 (struct dwarf2_per_cu_data) <objfile>: Remove.
9308 <dwarf2_per_objfile>: New field.
9309 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9310 of objfile.
9311 (create_signatured_type_table_from_index): Likewise.
9312 (create_debug_type_hash_table): Likewise.
9313 (fill_in_sig_entry_from_dwo_entry): Likewise.
9314 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9315 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9316 objfile.
9317 (create_partial_symtab): Access objfile through
9318 dwarf2_per_objfile.
9319 (process_psymtab_comp_unit_reader): Likewise.
9320 (read_comp_units_from_section): Likewise.
9321 (scan_partial_symbols): Likewise.
9322 (add_partial_symbol): Likewise.
9323 (add_partial_subprogram): Likewise.
9324 (peek_die_abbrev): Likewise.
9325 (fixup_go_packaging): Likewise.
9326 (process_full_comp_unit): Likewise.
9327 (process_full_type_unit): Likewise.
9328 (process_imported_unit_die): Likewise.
9329 (dwarf2_compute_name): Likewise.
9330 (dwarf2_physname): Likewise.
9331 (read_import_statement): Likewise.
9332 (create_cus_hash_table): Assign dwarf2_physname instead of
9333 objfile.
9334 (read_func_scope): Access objfile through dwarf2_per_objfile.
9335 (read_lexical_block_scope): Likewise.
9336 (read_call_site_scope): Likewise.
9337 (read_variable): Likewise.
9338 (dwarf2_rnglists_process): Likewise.
9339 (dwarf2_ranges_process): Likewise.
9340 (dwarf2_ranges_read): Likewise.
9341 (dwarf2_record_block_ranges): Likewise.
9342 (dwarf2_add_field): Likewise.
9343 (dwarf2_add_member_fn): Likewise.
9344 (read_structure_type): Likewise.
9345 (process_structure_scope): Likewise.
9346 (read_enumeration_type): Likewise.
9347 (read_array_type): Likewise.
9348 (read_common_block): Likewise.
9349 (read_namespace_type): Likewise.
9350 (read_namespace): Likewise.
9351 (read_module_type): Likewise.
9352 (read_tag_pointer_type): Likewise.
9353 (read_tag_ptr_to_member_type): Likewise.
9354 (read_tag_string_type): Likewise.
9355 (read_subroutine_type): Likewise.
9356 (read_typedef): Likewise.
9357 (read_base_type): Likewise.
9358 (attr_to_dynamic_prop): Likewise.
9359 (read_subrange_type): Likewise.
9360 (read_unspecified_type): Likewise.
9361 (load_partial_dies): Likewise.
9362 (read_partial_die): Likewise.
9363 (find_partial_die): Likewise.
9364 (guess_partial_die_structure_name): Likewise.
9365 (fixup_partial_die): Likewise.
9366 (read_attribute_value): Likewise.
9367 (read_addr_index_from_leb128): Likewise.
9368 (dwarf2_read_addr_index): Likewise.
9369 (dwarf2_string_attr): Likewise.
9370 (lnp_state_machine::check_line_address): Likewise.
9371 (dwarf_decode_lines_1): Likewise.
9372 (dwarf_decode_lines): Likewise.
9373 (dwarf2_start_symtab): Likewise.
9374 (var_decode_location): Likewise.
9375 (new_symbol_full): Likewise.
9376 (dwarf2_const_value_data): Likewise.
9377 (dwarf2_const_value_attr): Likewise.
9378 (dwarf2_const_value): Likewise.
9379 (die_type): Likewise.
9380 (die_containing_type): Likewise.
9381 (lookup_die_type): Likewise.
9382 (guess_full_die_structure_name): Likewise.
9383 (anonymous_struct_prefix): Likewise.
9384 (dwarf2_name): Likewise.
9385 (follow_die_ref_or_sig): Likewise.
9386 (follow_die_offset): Likewise.
9387 (follow_die_ref): Likewise.
9388 (dwarf2_fetch_die_loc_sect_off): Likewise.
9389 (dwarf2_fetch_constant_bytes): Likewise.
9390 (dwarf2_fetch_die_type_sect_off): Likewise.
9391 (dwarf2_get_die_type): Likewise.
9392 (follow_die_sig): Likewise.
9393 (decode_locdesc): Likewise.
9394 (dwarf2_per_cu_objfile): Likewise.
9395 (dwarf2_per_cu_text_offset): Likewise.
9396 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9397 objfile.
9398 (set_die_type): Access objfile through
9399 dwarf2_per_objfile.
9400
9401 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9402
9403 * valprint.c (converted_character_d): Remove typedef.
9404 (DEF_VEC_O (converted_character_d)): Remove.
9405 (count_next_character): Use std::vector.
9406 (print_converted_chars_to_obstack): Likewise.
9407 (generic_printstr): Likewise.
9408
9409 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9410
9411 * xml-support.h (struct gdb_xml_value): Add constructor.
9412 <value>: Change type to unique_xmalloc_ptr.
9413 (gdb_xml_value_s): Remove typedef.
9414 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9415 (gdb_xml_element_start_handler): Change parameter type to
9416 std::vector.
9417 (xml_find_attribute): Likewise.
9418 * xml-support.c (xml_find_attribute): Change parameter type to
9419 std::vector and adjust.
9420 (gdb_xml_values_cleanup): Remove.
9421 (gdb_xml_parser::start_element): Adjust to std::vector.
9422 (xinclude_start_include): Change paraeter type to std::vector
9423 and adjust.
9424 * btrace.c (check_xml_btrace_version): Likewise.
9425 (parse_xml_btrace_block): Likewise.
9426 (parse_xml_btrace_pt_config_cpu): Likewise.
9427 (parse_xml_btrace_pt): Likewise.
9428 (parse_xml_btrace_conf_bts): Likewise.
9429 (parse_xml_btrace_conf_pt): Likewise.
9430 * memory-map.c (memory_map_start_memory): Likewise.
9431 (memory_map_start_property): Likewise.
9432 * osdata.c (osdata_start_osdata): Likewise.
9433 (osdata_start_item): Likewise.
9434 (osdata_start_column): Likewise.
9435 * remote.c (start_thread): Likewise.
9436 * solib-aix.c (library_list_start_library): Likewise.
9437 (library_list_start_list): Likewise.
9438 * solib-svr4.c (library_list_start_library): Likewise.
9439 (svr4_library_list_start_list): Likewise.
9440 * solib-target.c (library_list_start_segment): Likewise.
9441 (library_list_start_section): Likewise.
9442 (library_list_start_library): Likewise.
9443 (library_list_start_list): Likewise.
9444 * tracepoint.c (traceframe_info_start_memory): Likewise.
9445 (traceframe_info_start_tvar): Likewise.
9446 * xml-syscall.c (syscall_start_syscall): Likewise.
9447 * xml-tdesc.c (tdesc_start_target): Likewise.
9448 (tdesc_start_feature): Likewise.
9449 (tdesc_start_reg): Likewise.
9450 (tdesc_start_union): Likewise.
9451 (tdesc_start_struct): Likewise.
9452 (tdesc_start_flags): Likewise.
9453 (tdesc_start_enum): Likewise.
9454 (tdesc_start_field): Likewise.
9455 (tdesc_start_enum_value): Likewise.
9456 (tdesc_start_vector): Likewise.
9457
9458 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9459
9460 * extension.h (struct xmethod_worker) <clone>: Remove.
9461 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9462 Remove.
9463 (python_xmethod_worker::clone): Remove.
9464 * valops.c (find_overload_match): Use std::move instead of
9465 clone.
9466
9467 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9468
9469 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9470 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9471 <free_xmethod_worker_data>: Remove.
9472 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9473 <get_xmethod_arg_types>: Remove.
9474 <get_xmethod_result_type>: Remove.
9475 <invoke_xmethod>: Remove.
9476 * extension.c (new_xmethod_worker): Remove.
9477 (clone_xmethod_worker): Remove.
9478 (get_matching_xmethod_workers): Return void, pass std::vector by
9479 pointer.
9480 (get_xmethod_arg_types): Rename to...
9481 (xmethod_worker::get_arg_types): ... this, and adjust.
9482 (get_xmethod_result_type): Rename to...
9483 (xmethod_worker::get_result_type): ... this, and adjust.
9484 (invoke_xmethod): Remove.
9485 (free_xmethod_worker): Remove.
9486 (free_xmethod_worker_vec): Remove.
9487 * extension.h (enum ext_lang_rc): Move here from
9488 extension-priv.h.
9489 (struct xmethod_worker): Add constructor and destructor.
9490 <data>: Remove.
9491 <value>: Remove.
9492 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9493 virtual pure methods.
9494 <get_arg_types, get_result_type>: New methods.
9495 (xmethod_worker_ptr): Remove typedef.
9496 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9497 (xmethod_worker_vec): Remove typedef.
9498 (xmethod_worker_up): New typedef.
9499 (invoke_xmethod): Remove.
9500 (clone_xmethod_worker): Remove.
9501 (free_xmethod_worker): Remove.
9502 (free_xmethod_worker_vec): Remove.
9503 (get_xmethod_arg_types): Remove.
9504 (get_xmethod_result_type): Remove.
9505 * valops.c (find_method_list): Use std::vector, don't use
9506 intermediate vector.
9507 (value_find_oload_method_list): Use std::vector.
9508 (find_overload_match): Use std::vector.
9509 (find_oload_champ): Use std::vector.
9510 * value.c (value_free): Use operator delete.
9511 (value_of_xmethod): Rename to...
9512 (value_from_xmethod): ... this. Don't assign
9513 xmethod_worker::value, take rvalue-reference.
9514 (result_type_of_xmethod): Adjust.
9515 (call_xmethod): Adjust.
9516 * value.h: Include extension.h.
9517 (struct xmethod_worker): Don't forward-declare.
9518 (value_of_xmethod): Rename to...
9519 (value_from_xmethod): ... this, take rvalue-reference.
9520 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9521 (struct python_xmethod_worker): ... this, add constructor and
9522 destructor.
9523 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9524 (gdbpy_free_xmethod_worker_data): Rename to...
9525 (python_xmethod_worker::~python_xmethod_worker): ... this and
9526 adjust.
9527 (gdbpy_clone_xmethod_worker_data): Rename to...
9528 (python_xmethod_worker::clone): ... this and adjust.
9529 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9530 temporary vector.
9531 (gdbpy_get_xmethod_arg_types): Rename to...
9532 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9533 (gdbpy_get_xmethod_result_type): Rename to...
9534 (python_xmethod_worker::do_get_result_type): ... this and
9535 adjust.
9536 (gdbpy_invoke_xmethod): Rename to...
9537 (python_xmethod_worker::invoke): ... this and adjust.
9538 (new_python_xmethod_worker): Rename to...
9539 (python_xmethod_worker::python_xmethod_worker): ... this and
9540 adjust.
9541 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9542 Remove.
9543 (gdbpy_free_xmethod_worker_data): Remove.
9544 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9545 (gdbpy_get_xmethod_arg_types): Remove.
9546 (gdbpy_get_xmethod_result_type): Remove.
9547 (gdbpy_invoke_xmethod): Remove.
9548 * python/python.c (python_extension_ops): Remove obsolete
9549 callbacks.
9550
9551 2018-01-05 Pedro Alves <palves@redhat.com>
9552
9553 PR gdb/18653
9554 * common/signals-state-save-restore.c
9555 (save_original_signals_state): New parameter 'quiet'. Warn if we
9556 find a custom handler preinstalled, instead of internal erroring.
9557 But only warn if !quiet.
9558 * common/signals-state-save-restore.h
9559 (save_original_signals_state): New parameter 'quiet'.
9560 * main.c (captured_main_1): Move save_original_signals_state call
9561 after option handling, and pass QUIET.
9562
9563 2018-01-05 Pedro Alves <palves@redhat.com>
9564
9565 * spu-tdep.c (spu_catch_start): Pass
9566 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9567
9568 2018-01-05 Pedro Alves <palves@redhat.com>
9569
9570 PR gdb/22670
9571 * ada-lang.c (literal_symbol_name_matcher): New function.
9572 (ada_get_symbol_name_matcher): Use it for
9573 symbol_name_match_type::SEARCH_NAME.
9574 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9575 it down instead of assuming symbol_name_match_type::FULL.
9576 * block.h (block_lookup_symbol): New parameter 'match_type'.
9577 * c-valprint.c (print_unpacked_pointer): Use
9578 lookup_symbol_search_name instead of lookup_symbol.
9579 * compile/compile-object-load.c (get_out_value_type): Pass down
9580 symbol_name_match_type::SEARCH_NAME.
9581 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9582 symbol_name_match_type::FULL.
9583 * cp-support.c (cp_get_symbol_name_matcher): Handle
9584 symbol_name_match_type::SEARCH_NAME.
9585 * infrun.c (insert_exception_resume_breakpoint): Use
9586 lookup_symbol_search_name.
9587 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9588 * psymtab.c (maintenance_check_psymtabs): Use
9589 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9590 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9591 SYMBOL_SEARCH_NAME.
9592 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9593 if symbol_name_match_type::SEARCH_NAME.
9594 (lookup_symbol_in_language): Pass down
9595 symbol_name_match_type::FULL.
9596 (lookup_symbol_search_name): New.
9597 (lookup_language_this): Pass down
9598 symbol_name_match_type::SEARCH_NAME.
9599 (lookup_symbol_aux, lookup_local_symbol): New parameter
9600 'match_type'. Pass it down.
9601 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9602 (lookup_symbol_search_name): New declaration.
9603 (lookup_symbol_in_block): New 'match_type' parameter.
9604
9605 2018-01-05 Pedro Alves <palves@redhat.com>
9606
9607 PR gdb/22670
9608 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9609 ada_lookup_symbol.
9610 (ada_lookup_symbol): Reimplement in terms of
9611 ada_lookup_symbol_list, bits factored out from
9612 ada_lookup_encoded_symbol.
9613
9614 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9615
9616 * ada-exp.y (write_object_renaming): When subscripting an array
9617 using a symbol as the index, pass the block in call to
9618 ada_lookup_encoded_symbol when looking that symbol up.
9619
9620 2018-01-05 Jerome Guitton <guitton@adacore.com>
9621
9622 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9623 TYPE_INDEX_TYPE.
9624
9625 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9626
9627 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9628 the case where VALUE_LVAL (val0) is not lval_memory.
9629
9630 2018-01-05 Xavier Roirand <roirand@adacore.com>
9631
9632 * ada-valprint.c (print_optional_low_bound): Handle
9633 character-indexed array printing like boolean-indexed array
9634 printing.
9635
9636 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9637
9638 * NEWS: Create a new section for the next release branch.
9639 Rename the section of the current branch, now that it has
9640 been cut.
9641
9642 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9643
9644 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9645 * version.in: Bump version to 8.1.50.DATE-git.
9646
9647 2018-01-03 Xavier Roirand <roirand@adacore.com>
9648
9649 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9650 Add field.
9651 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9652 Add field.
9653 (default_exception_support_info) <catch_handlers_sym>: Add field.
9654 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9655 (ada_exception_name_addr_1): Add "catch handlers" handling.
9656 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9657 Update all callers.
9658 (create_excep_cond_exprs) <ex>: Add parameter.
9659 (re_set_exception): Update create_excep_cond_exprs call.
9660 (print_it_exception, print_one_exception, print_mention_exception)
9661 (print_recreate_exception): Add "catch handler" handling.
9662 (allocate_location_catch_handlers, re_set_catch_handlers)
9663 (check_status_catch_handlers, print_it_catch_handlers)
9664 (print_one_catch_handlers, print_mention_catch_handlers)
9665 (print_recreate_catch_handlers): New function.
9666 (catch_handlers_breakpoint_ops): New variable.
9667 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9668 Add parameter. Add "catch handler" handling.
9669 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9670 Add "catch handler" handling.
9671 (ada_exception_catchpoint_cond_string): Add "catch handler"
9672 handling.
9673 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9674 call.
9675 (catch_ada_handlers_command): New function.
9676 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9677 operations structure.
9678 (_initialize_ada_language): Add "catch handlers" command entry.
9679 * NEWS: Document "catch handlers" feature.
9680
9681 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9682
9683 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9684 account when creating the array type of the slice.
9685 (ada_value_slice): Likewise.
9686
9687 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9688
9689 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9690 New enum value.
9691 (create_array_type_with_stride): Add byte_stride_prop parameter.
9692 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9693 New parameter. Update all callers in this file.
9694 (array_type_has_dynamic_stride): New function.
9695 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9696 of arrays with dynamic byte strides.
9697 * dwarf2read.c (read_array_type): Add support for dynamic
9698 DW_AT_byte_stride attributes.
9699
9700 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9701
9702 * dwarf2read.c (read_unspecified_type): Treat
9703 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9704
9705 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9706
9707 Update copyright year range in all GDB files.
9708
9709 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9710
9711 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9712 and gdb/testsuite/gdb.base/step-line.c.
9713
9714 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9715
9716 * copyright.py (main): Dump the contents of
9717 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9718 even if BY_HAND is empty.
9719
9720 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9721
9722 * top.c (print_gdb_version): Update Copyright year in version
9723 message.
9724
9725 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9726
9727 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9728
9729 For older changes see ChangeLog-2017.
9730 \f
9731 Local Variables:
9732 mode: change-log
9733 left-margin: 8
9734 fill-column: 74
9735 version-control: never
9736 coding: utf-8
9737 End:
This page took 0.214707 seconds and 3 git commands to generate.