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