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