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