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