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