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