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