Avoid undefined behavior in extract_integer
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-03 Tom Tromey <tom@tromey.com>
2
3 * findvar.c (extract_integer): Do work in an unsigned type.
4
5 2018-10-03 Tom Tromey <tom@tromey.com>
6
7 * common/enum-flags.h (enum_flags::operator~): Add static assert.
8 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
9 base type.
10 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
11 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
12 type.
13 * c-lang.h (enum c_string_type_values): Use unsigned as base
14 type.
15 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
16
17 2018-10-03 Tom Tromey <tom@tromey.com>
18
19 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
20 <~dwarf2_frame_state_reg_info>: Update.
21 <dwarf2_frame_state_reg_info>: Update.
22 <alloc_regs>: Add assertion. Update.
23 <reg>: Now a std::vector.
24 <num_regs>: Remove.
25 <swap>: Update.
26 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
27 (execute_cfa_program_test, dwarf2_frame_cache): Update.
28
29 2018-10-03 Tom Tromey <tom@tromey.com>
30
31 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
32
33 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
34
35 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
36
37 2018-10-02 Tom Tromey <tom@tromey.com>
38
39 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
40
41 2018-10-02 John Darrington <john@darrington.wattle.id.au>
42
43 * NEWS: Mention changed commands.
44 * ser-uds.c: New file.
45 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
46 * configure: Regenerate.
47 * Makefile.in: Add new file.
48 * serial.c (serial_open): Check if filename is a socket
49 and lookup the appropriate interface accordingly.
50
51 2018-10-01 Alan Hayward <alan.hayward@arm.com>
52
53 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
54 define.
55 (AARCH64_EXTRA_MAGIC): Likewise.
56 (AARCH64_FPSIMD_MAGIC): Likewise.
57 (AARCH64_SVE_MAGIC): Likewise.
58 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
59 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
60 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
61 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
62 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
63 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
64 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
65 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
66 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
67 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
68 (read_aarch64_ctx): Add function.
69 (aarch64_linux_sigframe_init): Detect FP registers.
70
71 2018-10-01 Alan Hayward <alan.hayward@arm.com>
72
73 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
74 (AARCH64_D0_REGNUM): Likewise.
75 (AARCH64_S0_REGNUM): Likewise.
76 (AARCH64_H0_REGNUM): Likewise.
77 (AARCH64_B0_REGNUM): Likewise.
78 (AARCH64_SVE_V0_REGNUM): Likewise.
79 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
80 (AARCH64_D0_REGNUM): Likewise.
81 (AARCH64_S0_REGNUM): Likewise.
82 (AARCH64_H0_REGNUM): Likewise.
83 (AARCH64_B0_REGNUM): Likewise.
84 (AARCH64_SVE_V0_REGNUM): Likewise.
85
86 2018-10-01 Gary Benson <gbenson@redhat.com>
87
88 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
89 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
90 prfpregset_t instead of gdb_prfpregset_t.
91 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
92 * configure, config.in: Rebuild.
93
94 2018-10-01 Gary Benson <gbenson@redhat.com>
95
96 * common/gdb_proc_service.h: New file, factored out from...
97 * gdb_proc_service.h: Moved common code to the above file.
98 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
99
100 2018-10-01 Gary Benson <gbenson@redhat.com>
101
102 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
103 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
104
105 2018-10-01 Gary Benson <gbenson@redhat.com>
106
107 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
108 (AC_CHECK_HEADERS): Check for linux/elf.h.
109 * configure, config.in: Rebuild.
110 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
111 doesn't define elf_fpregset_t.
112
113 2018-10-01 Gary Benson <gbenson@redhat.com>
114
115 * gdb_proc_service.h: Whitespace change.
116
117 2018-10-01 Tom Tromey <tom@tromey.com>
118
119 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
120 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
121 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
122
123 2018-10-01 Tom Tromey <tom@tromey.com>
124
125 * README: Minor change.
126
127 2018-09-30 Pedro Alves <palves@redhat.com>
128
129 * darwin-nat-info.c (darwin_debug_regions_recurse)
130 (info_mach_exceptions_command): Remove unused local variables.
131 * darwin-nat.c (darwin_decode_notify_message)
132 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
133 (darwin_stop_inferior, darwin_setup_exceptions)
134 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
135 (darwin_nat_target::attach, darwin_nat_target::detach)
136 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
137 local variables.
138 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
139 variables.
140
141 2018-09-29 Tom Tromey <tom@tromey.com>
142
143 * README: Remove some leftover text.
144
145 2018-09-29 Tom Tromey <tom@tromey.com>
146
147 * PROBLEMS: Rewrite.
148 * README: Update.
149
150 2018-09-28 John Baldwin <jhb@FreeBSD.org>
151
152 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
153 case with explicit breakpoint kind.
154 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
155 'additional_info' and related logic.
156 (riscv_debug_breakpoints): New variable.
157 (riscv_breakpoint_kind_from_pc): Use the length of the existing
158 instruction to determine the breakpoint kind.
159 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
160 flag. Update description of 'set/show riscv
161 use-compressed-breakpoints' flag.
162
163 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
164
165 (NEWS): Mention changes to frame related commands.
166 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
167 (add_prefix_cmd_suppress_notification): New function.
168 (add_com_suppress_notification): Call
169 add_cmd_suppress_notification.
170 * command.h (add_cmd_suppress_notification): Declare.
171 (add_prefix_cmd_suppress_notification): Declare.
172 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
173 (parse_frame_specification): Moved from stack.c, with
174 simplification to handle a single argument.
175 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
176 switch to the selected frame. Add a header comment.
177 * stack.c: Remove 'safe-ctype.h' include.
178 (find_frame_for_function): Add declaration.
179 (find_frame_for_address): New function.
180 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
181 (frame_selection_by_function_completer): New function.
182 (info_frame_command): Rename to...
183 (info_frame_command_core): ...this, and update parameter types.
184 (select_frame_command): Rename to...
185 (select_frame_command_core): ...this, and update parameter types.
186 (frame_command): Rename to...
187 (frame_command_core): ...this, and update parameter types.
188 (class frame_command_helper): New class to wrap implementations of
189 frame related sub-commands.
190 (frame_apply_cmd_list): New static global.
191 (frame_cmd_list): Make static.
192 (select_frame_cmd_list): New global for sub-commands.
193 (info_frame_cmd_list): New global for sub-commands.
194 (_initialize_stack): Register sub-commands for 'frame',
195 'select-frame', and 'info frame'. Update 'frame apply' commands
196 to use frame_apply_cmd_list. Move function local static
197 frame_apply_list to file static frame_apply_cmd_list for
198 consistency.
199 * stack.h (select_frame_command): Delete declarationn.
200 (select_frame_for_mi): Declare new function.
201
202 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
203
204 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
205 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
206 and NOP.
207
208 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
209
210 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
211
212 2018-09-26 Tom Tromey <tom@tromey.com>
213
214 * valops.c (auto_abandon): Remove dead code.
215
216 2018-09-26 Tom Tromey <tom@tromey.com>
217
218 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
219
220 2018-09-24 Tom Tromey <tom@tromey.com>
221
222 * common/pathstuff.c (get_standard_cache_dir): Make
223 "xdg_cache_home" and "home" const.
224 * top.c (init_history): Make "tmpenv" const.
225 * main.c (get_init_files): Make "homedir" const.
226
227 2018-09-23 Tom Tromey <tom@tromey.com>
228
229 PR python/18852:
230 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
231
232 2018-09-23 Tom Tromey <tom@tromey.com>
233
234 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
235 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
236 * python/python-internal.h (gdbpy_handle_exception): Declare.
237 * python/py-utils.c (gdbpy_handle_exception): New function.
238
239 2018-09-23 Tom Tromey <tom@tromey.com>
240
241 PR python/17284:
242 * python/py-type.c (typy_template_argument): Check for negative
243 argument number.
244
245 2018-09-23 Tom Tromey <tom@tromey.com>
246
247 PR python/14062:
248 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
249
250 2018-09-23 Tom Tromey <tom@tromey.com>
251
252 PR python/18170:
253 * python/py-value.c (valpy_int): Allow conversion from pointer
254 type.
255
256 2018-09-23 Tom Tromey <tom@tromey.com>
257
258 PR python/20126:
259 * python/py-value.c (valpy_int): Respect type sign.
260
261 2018-09-23 Tom Tromey <tom@tromey.com>
262
263 PR python/18352;
264 * python/py-value.c (valpy_float): Allow conversions from int or
265 char.
266 (valpy_int, valpy_long): Allow conversions from float.
267
268 2018-09-23 Tom Tromey <tom@tromey.com>
269
270 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
271 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
272
273 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
274
275 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
276 __sighndlr.
277 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
278
279 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
280
281 * windows-nat.c (windows_nat_target::wait): Remove a spurious
282 target_terminal::ours().
283
284 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
285
286 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
287 of vl to ULONGEST.
288
289 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
290
291 * breakpoint.c (update_inserted_breakpoint_locations): Remove
292 redundant condition.
293
294 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
295
296 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
297
298 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
299 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
300 * sol-thread.c (ps_pdmodel): Don't guard definition.
301
302 * procfs.c: Fix formatting.
303
304 * procfs.c (sysset_t_alloc): Remove.
305 (create_procinfo): Use XNEW instead of sysset_t_alloc.
306 (procfs_debug_inferior): Likewise.
307 (procfs_set_exec_trap): Likewise.
308 (proc_set_traced_sysentry): Don't allocate argp dynamically.
309 (proc_set_traced_sysexit): Likewise.
310
311 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
312 (dead_procinfo): Likewise.
313 (proc_warn): Likewise.
314 (proc_error): Likewise.
315 (proc_get_LDT_entry): Likewise.
316 (do_attach): Likewise.
317 (procfs_target::pid_to_str): Likewise.
318 (iterate_over_mappings): Likewise.
319
320 * procfs.c (create_procinfo): Fix ARI warning.
321 (proc_get_status): Likewise.
322 (proc_stop_process): Likewise.
323 (proc_run_process): Likewise.
324 (proc_kill): Likewise.
325 (proc_get_LDT_entry): Likewise.
326 (procfs_find_LDT_entry): Likewise.
327 (proc_update_threads): Likewise.
328 (proc_iterate_over_threads): Likewise.
329 (do_attach): Likewise.
330 (procfs_xfer_memory): Likewise.
331 (invalidate_cache): Likewise.
332 (procfs_target::resume): Likewise.
333 (procfs_init_inferior): Likewise.
334 (procfs_set_exec_trap): Likewise.
335 (procfs_target::thread_alive): Likewise.
336 (procfs_target::pid_to_exec_file): Likewise.
337 (iterate_over_mappings): Likewise.
338 (procfs_target::make_corefile_notes): Likewise.
339 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
340
341 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
342 (procfs_find_LDT_entry): Likewise.
343 * sol-thread.c (ps_lgetLDT): Likewise.
344
345 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
346
347 PR tdep/17903
348 * procfs.c (procfs_target): Declare pid_to_exec_file.
349 (procfs_target::pid_to_exec_file): New.
350
351 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
352
353 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
354 renaming.
355 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
356 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
357
358 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
359
360 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
361 (supply_fpregset, fill_fpregset): Move ...
362 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
363 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
364 Remove references to ioctl-based procfs.
365 Include <sys/reg.h>.
366 Remove PR_MODEL_NATIVE guards.
367 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
368 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
369
370 2018-09-19 Xavier Roirand <roirand@adacore.com>
371
372 PR gdb/20981:
373 * solib-darwin.c (darwin_get_dyld_bfd): New function.
374 (darwin_solib_get_all_image_info_addr_at_init): Update call.
375 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
376
377 2018-09-19 John Baldwin <jhb@FreeBSD.org>
378
379 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
380 (fbsd_print_sockaddr_in6): Likewise.
381
382 2018-09-19 Richard Bunt <richard.bunt@arm.com>
383 Chris January <chris.january@arm.com>
384
385 * eval.c (skip_undetermined_arglist): Skip argument list helper.
386 (evaluate_subexp_standard): Return a dummy type when
387 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
388 OP_F77_UNDETERMINED_ARGLIST case.
389 * expression.h (enum noside): Update comment.
390
391 2018-09-19 George Vasick <george.vasick@oracle.com>
392
393 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
394
395 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
396 April Chin <april.chin@oracle.com>
397 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
398
399 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
400 uint_t lwpid_t.
401 (create_procinfo): Print pids in /proc without leading zeros.
402
403 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
404
405 * nios2-tdep.c (nios2_gcc_target_options): New.
406 (nios2_gdb_arch_init): Install new hook.
407
408 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
409
410 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
411 New file.
412 * update-gnulib.sh: Apply patch.
413 * configure: Re-generate.
414
415 2018-09-18 John Baldwin <jhb@FreeBSD.org>
416
417 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
418 description. Make "info proc" command descriptions more
419 consistent.
420
421 2018-09-18 John Baldwin <jhb@FreeBSD.org>
422
423 * NEWS: Mention 'info proc files' command.
424
425 2018-09-18 John Baldwin <jhb@FreeBSD.org>
426
427 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
428 descriptors for IP_FILES and IP_ALL.
429
430 2018-09-18 John Baldwin <jhb@FreeBSD.org>
431
432 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
433 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
434 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
435 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
436 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
437 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
438 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
439 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
440 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
441 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
442 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
443 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
444 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
445 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
446 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
447 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
448 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
449 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
450 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
451 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
452 (struct fbsd_sockaddr_un): New types.
453 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
454 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
455 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
456 (fbsd_core_info_proc_files): New functions.
457 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
458 IP_ALL.
459 * fbsd-tdep.h (fbsd_info_proc_files_header)
460 (fbsd_info_proc_files_entry): New.
461
462 2018-09-18 John Baldwin <jhb@FreeBSD.org>
463
464 * defs.h (enum info_proc_what) [IP_FILES]: New value.
465 * infcmd.c (info_proc_cmd_files): New function.
466 (_initialize_infcmd): Register 'info proc files' command.
467
468 2018-09-18 John Baldwin <jhb@FreeBSD.org>
469
470 * gnulib/aclocal-m4-deps.mk: Re-generate.
471 * gnulib/aclocal.m4: Re-generate.
472 * gnulib/config.in: Re-generate.
473 * gnulib/configure: Re-generate.
474 * gnulib/import/Makefile.am: Re-generate.
475 * gnulib/import/Makefile.in: Re-generate.
476 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
477 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
478 * gnulib/import/arpa_inet.in.h: New file.
479 * gnulib/import/inet_ntop.c: New file.
480 * gnulib/import/m4/arpa_inet_h.m4: New file.
481 * gnulib/import/m4/inet_ntop.m4: New file.
482 * gnulib/import/m4/netinet_in_h.m4: New file.
483 * gnulib/import/m4/socklen.m4: New file.
484 * gnulib/import/m4/sockpfaf.m4: New file.
485 * gnulib/import/m4/stdalign.m4: New file.
486 * gnulib/import/m4/sys_uio_h.m4: New file.
487 * gnulib/import/netinet_in.in.h: New file.
488 * gnulib/import/stdalign.in.h: New file.
489 * gnulib/import/sys_socket.c: New file.
490 * gnulib/import/sys_socket.in.h: New file.
491 * gnulib/import/sys_uio.in.h: New file.
492 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
493 module.
494
495 2018-09-18 John Baldwin <jhb@FreeBSD.org>
496
497 * gnulib/aclocal-m4-deps.mk: New file.
498 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
499 deterministically.
500
501 2018-09-18 John Baldwin <jhb@FreeBSD.org>
502
503 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
504 KVE_PATH.
505
506 2018-09-18 Tom Tromey <tom@tromey.com>
507
508 * compile/compile-object-load.c (struct
509 link_hash_table_cleanup_data): Add constructor and destructor.
510 Use DISABLE_COPY_AND_ASSIGN.
511 (~link_hash_table_cleanup_data): Rename from
512 link_hash_table_free. Now a destructor.
513 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
514
515 2018-09-18 Tom Tromey <tom@tromey.com>
516
517 * compile/compile-object-run.c (do_module_cleanup): Use delete.
518 * compile/compile-object-load.c (struct munmap_list): Move to
519 header file.
520 (munmap_list::add): Rename from munmap_list_add; rewrite.
521 (munmap_list::~munmap_list): Rename from munmap_list_free.
522 (munmap_listp_free_cleanup): Remove.
523 (compile_object_load): Update.
524 * compile/compile-object-load.h (struct munmap_list): Move from
525 compile-object-load.c. Rewrite.
526
527 2018-09-18 Alan Hayward <alan.hayward@arm.com>
528
529 * aarch64-tdep.c (pass_in_v): Use register size.
530 (aarch64_extract_return_value): Likewise.
531 (aarch64_store_return_value): Likewise.
532
533 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
534
535 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
536 rlim_t.
537
538 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
539
540 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
541 Fix short help line.
542
543 2018-09-17 Tom Tromey <tom@tromey.com>
544
545 PR python/20445:
546 * configure: Rebuild.
547 * configure.ac: Conditionally use -DNDEBUG for Python.
548
549 2018-09-17 Tom Tromey <tom@tromey.com>
550
551 * configure: Rebuild.
552 * configure.ac: Use gmp as a library dependency when checking for
553 mpfr.
554
555 2018-09-17 Pedro Alves <palves@redhat.com>
556
557 * python/py-inferior.c (find_inferior_object): Delete.
558
559 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
560
561 * compile/compile-cplus-types.c
562 (compile_cplus_instance::enter_scope): Don't use new_scope after
563 std::move.
564
565 2018-09-17 Tom Tromey <tom@tromey.com>
566
567 * common/pathstuff.c (get_standard_cache_dir): Use
568 ~/Library/Caches on macOS.
569 * common/pathstuff.h (get_standard_cache_dir): Update comment.
570
571 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
572
573 PR python/23669
574 * breakpoint.c (commands_cmd_element): New.
575 (_initialize_breakpoint): Assign commands_cmd_element.
576 * breakpoint.h (commands_cmd_element): New.
577 * cli/cli-script.c (while_cmd_element, if_command,
578 define_cmd_element): New.
579 (command_name_equals): Remove.
580 (process_next_line): Compare commands by pointer, not by name.
581 (_initialize_cli_script): Assign the various cmd_list_element
582 variables.
583 * compile/compile.c (compile_cmd_element): New.
584 (_initialize_compile): Assign compile_cmd_element.
585 * compile/compile.h (compile_cmd_element): New.
586 * guile/guile.c (guile_cmd_element): New.
587 (install_gdb_commands): Assign guile_cmd_element.
588 * guile/guile.h (guile_cmd_element): New.
589 * python/python.c (python_cmd_element): New.
590 (_initialize_python): Assign python_cmd_element.
591 * python/python.h (python_cmd_element): New.
592 * tracepoint.c (while_stepping_cmd_element): New.
593 (_initialize_tracepoint): Assign while_stepping_cmd_element.
594 * tracepoint.h (while_stepping_cmd_element): New.
595
596 2018-09-17 Tom Tromey <tom@tromey.com>
597
598 * infrun.c (save_infcall_suspend_state): Return
599 infcall_suspend_state_up.
600 (save_infcall_control_state): Return infcall_control_state_up.
601 * inferior.h (save_infcall_suspend_state)
602 (save_infcall_control_state): Declare later. Return unique
603 pointers.
604
605 2018-09-17 Tom Tromey <tom@tromey.com>
606
607 * infrun.c (struct stop_context): Declare constructor,
608 destructor, "changed" method.
609 (stop_context::stop_context): Rename from save_stop_context.
610 (stop_context::~stop_context): Rename from
611 release_stop_context_cleanup.
612 (normal_stop): Update.
613 (stop_context::changed): Rename from stop_context_changed. Return
614 bool.
615
616 2018-09-17 Tom Tromey <tom@tromey.com>
617
618 * inferior.h (struct infcall_suspend_state_deleter): New.
619 (infcall_suspend_state_up): New typedef.
620 (struct infcall_control_state_deleter): New.
621 (infcall_control_state_up): New typedef.
622 (make_cleanup_restore_infcall_suspend_state)
623 (make_cleanup_restore_infcall_control_state): Don't declare.
624 * infcall.c (call_function_by_hand_dummy): Update.
625 * infrun.c (do_restore_infcall_suspend_state_cleanup)
626 (make_cleanup_restore_infcall_suspend_state): Remove.
627 (do_restore_infcall_control_state_cleanup)
628 (make_cleanup_restore_infcall_control_state): Remove.
629
630 2018-09-17 Tom Tromey <tom@tromey.com>
631
632 * gdbthread.h (struct thread_control_state): Add initializer.
633 (class thread_info) <control>: Remove initializer.
634 * inferior.h (struct inferior_control_state): Add initializer.
635 (class inferior) <control>: Remove initializer.
636 (exit_inferior_1): Update.
637 * infrun.c (struct infcall_control_state): Add constructors.
638 (save_infcall_control_state): Use new.
639 (restore_infcall_control_state, discard_infcall_control_state):
640 Use delete.
641
642 2018-09-17 Tom Tromey <tom@tromey.com>
643
644 * infrun.c (struct infcall_suspend_state) <registers>: Now a
645 unique_ptr.
646 <siginfo_data>: Now a unique_xmalloc_ptr.
647 (save_infcall_suspend_state, restore_infcall_suspend_state)
648 (discard_infcall_suspend_state)
649 (get_infcall_suspend_state_regcache): Update.
650
651 2018-09-17 Tom Tromey <tom@tromey.com>
652
653 * gdbthread.h (struct thread_suspend_state): Add initializers.
654 (class thread_info) <suspend>: Remove initializer.
655 * infrun.c (struct infcall_suspend_state): Add initializers.
656 (save_infcall_suspend_state): Use new.
657 (discard_infcall_suspend_state): Use delete.
658
659 2018-09-16 Tom Tromey <tom@tromey.com>
660
661 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
662 Remove.
663 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
664 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
665 (py_varobj_iter_new): Likewise.
666 (py_varobj_get_iterator): Use gdbpy_ref.
667
668 2018-09-16 Tom Tromey <tom@tromey.com>
669
670 * python/py-threadevent.c (py_get_event_thread): Simplify.
671 * python/py-inferior.c (infpy_thread_from_thread_handle):
672 Return immediately after calling thread_to_thread_object. Use
673 Py_RETURN_NONE.
674 (thread_to_thread_object): Set the exception on a NULL return.
675
676 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
679
680 2018-09-16 Tom Tromey <tom@tromey.com>
681
682 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
683 Remove.
684
685 2018-09-16 Tom Tromey <tom@tromey.com>
686
687 * python/python-internal.h (thread_to_thread_object): Change
688 return type.
689 * python/py-inferior.c (thread_to_thread_object): Return a new
690 reference.
691 (infpy_thread_from_thread_handle): Update.
692 * python/py-infthread.c (gdbpy_selected_thread): Update.
693 * python/py-stopevent.c (create_stop_event_object): Update.
694 * python/py-threadevent.c (py_get_event_thread): Return a new
695 reference.
696 (py_get_event_thread): Update.
697 * python/py-event.h (py_get_event_thread): Change return type.
698 * python/py-continueevent.c (create_continue_event_object):
699 Update.
700
701 2018-09-16 Tom Tromey <tom@tromey.com>
702
703 * python/py-progspace.c (pspy_get_objfiles): Update.
704 * python/python-internal.h (objfile_to_objfile_object): Change
705 return type.
706 * python/py-newobjfileevent.c (create_new_objfile_event_object):
707 Update.
708 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
709 Update.
710 * python/python.c (gdbpy_get_current_objfile): Update.
711 (gdbpy_objfiles): Update.
712 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
713 Update.
714 (objfile_to_objfile_object): Return a new reference.
715 * python/py-symtab.c (stpy_get_objfile): Update.
716 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
717 Update.
718
719 2018-09-16 Tom Tromey <tom@tromey.com>
720
721 * python/py-inferior.c (infpy_get_progspace): Update.
722 * python/python-internal.h (pspace_to_pspace_object): Change
723 return type.
724 * python/py-newobjfileevent.c
725 (create_clear_objfiles_event_object): Update.
726 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
727 Update.
728 * python/python.c (gdbpy_get_current_progspace): Update.
729 (gdbpy_progspaces): Update.
730 * python/py-progspace.c (pspace_to_pspace_object): Return a new
731 reference.
732 * python/py-objfile.c (objfpy_get_progspace): Update.
733 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
734 Update.
735
736 2018-09-16 Tom Tromey <tom@tromey.com>
737
738 * python/lib/gdb/__init__.py (current_progspace, objfiles)
739 (solib_name, block_for_pc, find_pc_line): New functions.
740 (execute_unwinders): Update.
741 * python/py-block.c (gdbpy_block_for_pc): Remove.
742 * python/py-inferior.c (infpy_get_progspace): New function.
743 (inferior_object_getset) <progspace>: Add.
744 * python/py-progspace.c (pspy_objfiles): Rewrite.
745 (pspy_solib_name, pspy_block_for_pc)
746 (pspy_find_pc_line, pspy_is_valid): New functions.
747 (progspace_object_methods): Add entries for solib_name,
748 block_for_pc, find_pc_line, is_valid.
749 * python/python-internal.h (gdbpy_block_for_pc)
750 (build_objfiles_list): Don't declare.
751 * python/python.c: Don't include solib.h.
752 (gdbpy_solib_name, gdbpy_find_pc_line)
753 (gdbpy_get_current_progspace, build_objfiles_list)
754 (gdbpy_objfiles): Remove.
755 (GdbMethods) <current_progspace, objfiles, block_for_pc,
756 solib_name, find_pc_line>: Remove entries.
757
758 2018-09-16 Tom Tromey <tom@tromey.com>
759
760 * top.c (new_ui_command): Use GNU style for metasyntactic
761 variables.
762 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
763 variables.
764 * maint.c (maintenance_translate_address): Remove "<>" around
765 text.
766 * interps.c (interpreter_exec_cmd): Use GNU style for
767 metasyntactic variables.
768 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
769 metasyntactic variables.
770 * tracepoint.c (tfind_range_command): Use GNU style for
771 metasyntactic variables.
772 (tfind_outside_command): Likewise.
773 (_initialize_tracepoint): Likewise.
774 * remote.c (extended_remote_target::create_inferior): Use GNU
775 style for metasyntactic variables.
776 * sparc64-tdep.c (adi_examine_command): Use GNU style for
777 metasyntactic variables.
778 (adi_assign_command): Likewise.
779
780 2018-09-16 Tom Tromey <tom@tromey.com>
781
782 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
783 metasyntactic variables. Print message if no disassembler options
784 are available.
785
786 2018-09-15 Tom Tromey <tom@tromey.com>
787
788 * infcmd.c (get_inferior_args): Return const char *.
789 * inferior.h (get_inferior_args): Return type now const.
790 * linux-tdep.c (linux_fill_prpsinfo): Update.
791 * procfs.c (procfs_target::make_corefile_notes): Update.
792
793 2018-09-07 Tom Tromey <tom@tromey.com>
794
795 * python/python.c (execute_gdb_command): Call bpstat_do_actions
796 inside the TRY.
797
798 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
799
800 * nios2-tdep.c (nios2_type_align): New.
801 (nios2_gdb_arch_init): Install type_align hook.
802
803 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
804
805 * eval.c (fake_method::fake_method): Call xzalloc directly for a
806 type that is neither object file owned, nor gdbarch owned.
807 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
808 gdbarch is non-NULL.
809 (alloc_type_instance): Allocate non-objfile owned types on the
810 gdbarch obstack.
811 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
812 using TYPE_ALLOC to ensure memory is allocated on the correct
813 obstack.
814 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
815 obstack, or the gdbarch obstack.
816 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
817
818 2018-09-14 Tom Tromey <tom@tromey.com>
819
820 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
821 block.
822
823 2018-09-14 Tom Tromey <tom@tromey.com>
824
825 * nat/fork-inferior.c (get_startup_shell): Remove "static".
826
827 2018-09-13 Tom Tromey <tom@tromey.com>
828
829 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
830 static.
831
832 2018-09-13 Tom Tromey <tom@tromey.com>
833
834 * exec.c (try_open_exec_file): Use std::string.
835
836 2018-09-13 Tom Tromey <tom@tromey.com>
837
838 * utils.h (gdb_bfd_errmsg): Return std::string.
839 * exec.c (exec_file_attach): Update.
840 * compile/compile-object-load.c (compile_object_load): Update.
841 * utils.c (gdb_bfd_errmsg): Return std::string.
842
843 2018-09-13 Tom Tromey <tom@tromey.com>
844
845 * procfs.c (struct procinfo_deleter): New.
846 (procinfo_up): New typedef.
847 (do_destroy_procinfo_cleanup): Remove.
848 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
849
850 2018-09-13 Tom Tromey <tom@tromey.com>
851
852 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
853
854 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
855 2018-09-13 Tom Tromey <tom@tromey.com>
856
857 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
858 (pspy_get_objfiles): New function.
859 (progspace_object_methods): New.
860 (pspace_object_type): Add tp_methods callback.
861 * python/python-internal.h (build_objfiles_list): New
862 declaration.
863 * python/python.c (build_objfiles_list): New function.
864 (gdbpy_objfiles): Implement using build_objfiles_list.
865 * NEWS: Mention the Progspace.objfiles method.
866
867 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
868
869 * python/py-inferior.c (infpy_get_progspace): New function.
870 (inferior_object_getset): Add progspace property.
871 * NEWS: Mention the new property.
872
873 2018-09-13 Tom Tromey <tom@tromey.com>
874
875 PR rust/23650:
876 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
877
878 2018-09-13 Tom Tromey <tom@tromey.com>
879
880 PR rust/23626:
881 * rust-lang.c (rust_enum_variant): Now static.
882 (rust_empty_enum_p): New function.
883 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
884 Handle empty enum.
885
886 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
887
888 * python/py-inferior.c (infpy_repr): New.
889 (inferior_object_type): Register infpy_repr.
890 * python/py-objfile.c (objfpy_repr): New.
891 (objfile_object_type): Register objfpy_repr.
892
893 2018-09-12 John Baldwin <jhb@FreeBSD.org>
894
895 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
896
897 2018-09-12 John Baldwin <jhb@FreeBSD.org>
898
899 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
900 typo.
901
902 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
903
904 * common/common-utils.c: Don't include '<sys/stat.h>'.
905 (is_regular_file): Move to...
906 * common/filestuff.c (is_regular_file): ... here.
907 * common/common-utils.h (is_regular_file): Move to...
908 * common/filestuff.h (is_regular_file): ... here.
909
910 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
911
912 * skip.c (debug_skip): New variable.
913 (skiplist_entry::do_skip_file_p): Add debug output.
914 (skiplist_entry::do_skip_gfile_p): Likewise.
915 (skiplist_entry::skip_function_p): Likewise.
916 (_initialize_step_skip): Create debug command.
917 * NEWS: Mention set/show debug skip.
918
919 2018-09-11 Xavier Roirand <roirand@adacore.com>
920
921 * darwin-nat.c (should_disable_startup_with_shell):
922 New function.
923 (darwin_nat_target::create_inferior): Add call.
924
925 2018-09-11 Xavier Roirand <roirand@adacore.com>
926
927 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
928 inf_port, msg_state>: Initialize.
929 (struct darwin_thread_info) <signaled, single_step>: Change
930 type and initialize.
931 (struct darwin_thread_info) <event>: Initialize.
932
933 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
934
935 PR gdb/23555
936 PR gdb/23558
937 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
938 guesses.
939
940 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
941
942 Revert:
943 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
944
945 PR gdb/23555
946 PR gdb/23558
947 * gnulib/aclocal.m4: Regenerate.
948 * gnulib/config.in: Regenerate.
949 * gnulib/configure: Regenerate.
950 * gnulib/import/Makefile.am: Update.
951 * gnulib/import/Makefile.in: Update.
952 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
953 * gnulib/import/_Noreturn.h: ... this.
954 * gnulib/import/alloca.in.h: Update.
955 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
956 * gnulib/import/arg-nonnull.h: ... this.
957 * gnulib/import/assure.h: Update.
958 * gnulib/import/at-func.c: Update.
959 * gnulib/import/basename-lgpl.c: Update.
960 * gnulib/import/extra/snippet/c++defs.h: Rename to...
961 * gnulib/import/c++defs.h: ... this.
962 * gnulib/import/canonicalize-lgpl.c: Update.
963 * gnulib/import/cdefs.h: Update.
964 * gnulib/import/chdir-long.c: Update.
965 * gnulib/import/chdir-long.h: Update.
966 * gnulib/import/cloexec.c: Update.
967 * gnulib/import/cloexec.h: Update.
968 * gnulib/import/close.c: Update.
969 * gnulib/import/closedir.c: Update.
970 * gnulib/import/config.charset: Update.
971 * gnulib/import/dirent-private.h: Update.
972 * gnulib/import/dirent.in.h: Update.
973 * gnulib/import/dirfd.c: Update.
974 * gnulib/import/dirname-lgpl.c: Update.
975 * gnulib/import/dirname.h: Update.
976 * gnulib/import/dosname.h: Update.
977 * gnulib/import/dup-safer-flag.c: Update.
978 * gnulib/import/dup-safer.c: Update.
979 * gnulib/import/dup.c: Update.
980 * gnulib/import/dup2.c: Update.
981 * gnulib/import/errno.in.h: Update.
982 * gnulib/import/error.c: Update.
983 * gnulib/import/error.h: Update.
984 * gnulib/import/exitfail.c: Update.
985 * gnulib/import/exitfail.h: Update.
986 * gnulib/import/extra/update-copyright: Update.
987 * gnulib/import/fchdir.c: Update.
988 * gnulib/import/fcntl.c: Update.
989 * gnulib/import/fcntl.in.h: Update.
990 * gnulib/import/fd-hook.c: Update.
991 * gnulib/import/fd-hook.h: Update.
992 * gnulib/import/fd-safer-flag.c: Update.
993 * gnulib/import/fd-safer.c: Update.
994 * gnulib/import/fdopendir.c: Update.
995 * gnulib/import/filename.h: Update.
996 * gnulib/import/filenamecat-lgpl.c: Update.
997 * gnulib/import/filenamecat.h: Update.
998 * gnulib/import/flexmember.h: Update.
999 * gnulib/import/float+.h: Update.
1000 * gnulib/import/float.c: Update.
1001 * gnulib/import/float.in.h: Update.
1002 * gnulib/import/fnmatch.c: Update.
1003 * gnulib/import/fnmatch.in.h: Update.
1004 * gnulib/import/fnmatch_loop.c: Update.
1005 * gnulib/import/fpucw.h: Update.
1006 * gnulib/import/frexp.c: Update.
1007 * gnulib/import/frexpl.c: Update.
1008 * gnulib/import/fstat.c: Update.
1009 * gnulib/import/fstatat.c: Update.
1010 * gnulib/import/getcwd-lgpl.c: Update.
1011 * gnulib/import/getcwd.c: Update.
1012 * gnulib/import/getdtablesize.c: Update.
1013 * gnulib/import/getlogin_r.c: Update.
1014 * gnulib/import/getprogname.c: Update.
1015 * gnulib/import/getprogname.h: Update.
1016 * gnulib/import/gettext.h: Update.
1017 * gnulib/import/gettimeofday.c: Update.
1018 * gnulib/import/glob-libc.h: Update.
1019 * gnulib/import/glob.c: Update.
1020 * gnulib/import/glob.in.h: Update.
1021 * gnulib/import/glob_internal.h: Update.
1022 * gnulib/import/glob_pattern_p.c: Update.
1023 * gnulib/import/globfree.c: Update.
1024 * gnulib/import/hard-locale.c: Update.
1025 * gnulib/import/hard-locale.h: Update.
1026 * gnulib/import/intprops.h: Update.
1027 * gnulib/import/inttypes.in.h: Update.
1028 * gnulib/import/isnan.c: Update.
1029 * gnulib/import/isnand-nolibm.h: Update.
1030 * gnulib/import/isnand.c: Update.
1031 * gnulib/import/isnanl-nolibm.h: Update.
1032 * gnulib/import/isnanl.c: Update.
1033 * gnulib/import/itold.c: Update.
1034 * gnulib/import/libc-config.h: Update.
1035 * gnulib/import/limits.in.h: Update.
1036 * gnulib/import/localcharset.c: Update.
1037 * gnulib/import/localcharset.h: Update.
1038 * gnulib/import/localtime-buffer.c: Update.
1039 * gnulib/import/localtime-buffer.h: Update.
1040 * gnulib/import/lstat.c: Update.
1041 * gnulib/import/m4/00gnulib.m4: Update.
1042 * gnulib/import/m4/__inline.m4: Update.
1043 * gnulib/import/m4/absolute-header.m4: Update.
1044 * gnulib/import/m4/alloca.m4: Update.
1045 * gnulib/import/m4/builtin-expect.m4: Update.
1046 * gnulib/import/m4/canonicalize.m4: Update.
1047 * gnulib/import/m4/chdir-long.m4: Update.
1048 * gnulib/import/m4/close.m4: Update.
1049 * gnulib/import/m4/closedir.m4: Update.
1050 * gnulib/import/m4/configmake.m4: Update.
1051 * gnulib/import/m4/d-ino.m4: Update.
1052 * gnulib/import/m4/d-type.m4: Update.
1053 * gnulib/import/m4/dirent_h.m4: Update.
1054 * gnulib/import/m4/dirfd.m4: Update.
1055 * gnulib/import/m4/dirname.m4: Update.
1056 * gnulib/import/m4/double-slash-root.m4: Update.
1057 * gnulib/import/m4/dup.m4: Update.
1058 * gnulib/import/m4/dup2.m4: Update.
1059 * gnulib/import/m4/eealloc.m4: Update.
1060 * gnulib/import/m4/environ.m4: Update.
1061 * gnulib/import/m4/errno_h.m4: Update.
1062 * gnulib/import/m4/error.m4: Update.
1063 * gnulib/import/m4/exponentd.m4: Update.
1064 * gnulib/import/m4/exponentl.m4: Update.
1065 * gnulib/import/m4/extensions.m4: Update.
1066 * gnulib/import/m4/extern-inline.m4: Update.
1067 * gnulib/import/m4/fchdir.m4: Update.
1068 * gnulib/import/m4/fcntl-o.m4: Update.
1069 * gnulib/import/m4/fcntl.m4: Update.
1070 * gnulib/import/m4/fcntl_h.m4: Update.
1071 * gnulib/import/m4/fdopendir.m4: Update.
1072 * gnulib/import/m4/filenamecat.m4: Update.
1073 * gnulib/import/m4/flexmember.m4: Update.
1074 * gnulib/import/m4/float_h.m4: Update.
1075 * gnulib/import/m4/fnmatch.m4: Update.
1076 * gnulib/import/m4/fnmatch_h.m4: Update.
1077 * gnulib/import/m4/fpieee.m4: Update.
1078 * gnulib/import/m4/frexp.m4: Update.
1079 * gnulib/import/m4/frexpl.m4: Update.
1080 * gnulib/import/m4/fstat.m4: Update.
1081 * gnulib/import/m4/fstatat.m4: Update.
1082 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1083 * gnulib/import/m4/getcwd-path-max.m4: Update.
1084 * gnulib/import/m4/getcwd.m4: Update.
1085 * gnulib/import/m4/getdtablesize.m4: Update.
1086 * gnulib/import/m4/getlogin.m4: Update.
1087 * gnulib/import/m4/getlogin_r.m4: Update.
1088 * gnulib/import/m4/getpagesize.m4: Update.
1089 * gnulib/import/m4/getprogname.m4: Update.
1090 * gnulib/import/m4/gettimeofday.m4: Update.
1091 * gnulib/import/m4/glibc21.m4: Update.
1092 * gnulib/import/m4/glob.m4: Update.
1093 * gnulib/import/m4/glob_h.m4: Update.
1094 * gnulib/import/m4/gnulib-cache.m4: Update.
1095 * gnulib/import/m4/gnulib-common.m4: Update.
1096 * gnulib/import/m4/gnulib-comp.m4: Update.
1097 * gnulib/import/m4/gnulib-tool.m4: Update.
1098 * gnulib/import/m4/hard-locale.m4: Update.
1099 * gnulib/import/m4/include_next.m4: Update.
1100 * gnulib/import/m4/inttypes-pri.m4: Update.
1101 * gnulib/import/m4/inttypes.m4: Update.
1102 * gnulib/import/m4/isnand.m4: Update.
1103 * gnulib/import/m4/isnanl.m4: Update.
1104 * gnulib/import/m4/largefile.m4: Update.
1105 * gnulib/import/m4/limits-h.m4: Update.
1106 * gnulib/import/m4/localcharset.m4: Update.
1107 * gnulib/import/m4/locale-fr.m4: Update.
1108 * gnulib/import/m4/locale-ja.m4: Update.
1109 * gnulib/import/m4/locale-zh.m4: Update.
1110 * gnulib/import/m4/localtime-buffer.m4: Update.
1111 * gnulib/import/m4/longlong.m4: Update.
1112 * gnulib/import/m4/lstat.m4: Update.
1113 * gnulib/import/m4/malloc.m4: Update.
1114 * gnulib/import/m4/malloca.m4: Update.
1115 * gnulib/import/m4/math_h.m4: Update.
1116 * gnulib/import/m4/mbrtowc.m4: Update.
1117 * gnulib/import/m4/mbsinit.m4: Update.
1118 * gnulib/import/m4/mbsrtowcs.m4: Update.
1119 * gnulib/import/m4/mbstate_t.m4: Update.
1120 * gnulib/import/m4/memchr.m4: Update.
1121 * gnulib/import/m4/memmem.m4: Update.
1122 * gnulib/import/m4/mempcpy.m4: Update.
1123 * gnulib/import/m4/memrchr.m4: Update.
1124 * gnulib/import/m4/mkdir.m4: Update.
1125 * gnulib/import/m4/mkstemp.m4: Update.
1126 * gnulib/import/m4/mmap-anon.m4: Update.
1127 * gnulib/import/m4/mode_t.m4: Update.
1128 * gnulib/import/m4/msvc-inval.m4: Update.
1129 * gnulib/import/m4/msvc-nothrow.m4: Update.
1130 * gnulib/import/m4/multiarch.m4: Update.
1131 * gnulib/import/m4/nocrash.m4: Update.
1132 * gnulib/import/m4/off_t.m4: Update.
1133 * gnulib/import/m4/onceonly.m4: Update.
1134 * gnulib/import/m4/open-cloexec.m4: Update.
1135 * gnulib/import/m4/open.m4: Update.
1136 * gnulib/import/m4/openat.m4: Update.
1137 * gnulib/import/m4/opendir.m4: Update.
1138 * gnulib/import/m4/pathmax.m4: Update.
1139 * gnulib/import/m4/rawmemchr.m4: Update.
1140 * gnulib/import/m4/readdir.m4: Update.
1141 * gnulib/import/m4/readlink.m4: Update.
1142 * gnulib/import/m4/realloc.m4: Update.
1143 * gnulib/import/m4/rename.m4: Update.
1144 * gnulib/import/m4/rewinddir.m4: Update.
1145 * gnulib/import/m4/rmdir.m4: Update.
1146 * gnulib/import/m4/save-cwd.m4: Update.
1147 * gnulib/import/m4/secure_getenv.m4: Update.
1148 * gnulib/import/m4/setenv.m4: Update.
1149 * gnulib/import/m4/signal_h.m4: Update.
1150 * gnulib/import/m4/ssize_t.m4: Update.
1151 * gnulib/import/m4/stat-time.m4: Update.
1152 * gnulib/import/m4/stat.m4: Update.
1153 * gnulib/import/m4/std-gnu11.m4: Update.
1154 * gnulib/import/m4/stdbool.m4: Update.
1155 * gnulib/import/m4/stddef_h.m4: Update.
1156 * gnulib/import/m4/stdint.m4: Update.
1157 * gnulib/import/m4/stdio_h.m4: Update.
1158 * gnulib/import/m4/stdlib_h.m4: Update.
1159 * gnulib/import/m4/strchrnul.m4: Update.
1160 * gnulib/import/m4/strdup.m4: Update.
1161 * gnulib/import/m4/strerror.m4: Update.
1162 * gnulib/import/m4/string_h.m4: Update.
1163 * gnulib/import/m4/strstr.m4: Update.
1164 * gnulib/import/m4/strtok_r.m4: Update.
1165 * gnulib/import/m4/sys_socket_h.m4: Update.
1166 * gnulib/import/m4/sys_stat_h.m4: Update.
1167 * gnulib/import/m4/sys_time_h.m4: Update.
1168 * gnulib/import/m4/sys_types_h.m4: Update.
1169 * gnulib/import/m4/tempname.m4: Update.
1170 * gnulib/import/m4/time_h.m4: Update.
1171 * gnulib/import/m4/unistd-safer.m4: Update.
1172 * gnulib/import/m4/unistd_h.m4: Update.
1173 * gnulib/import/m4/warn-on-use.m4: Update.
1174 * gnulib/import/m4/wchar_h.m4: Update.
1175 * gnulib/import/m4/wchar_t.m4: Update.
1176 * gnulib/import/m4/wctype_h.m4: Update.
1177 * gnulib/import/m4/wint_t.m4: Update.
1178 * gnulib/import/malloc.c: Update.
1179 * gnulib/import/malloc/scratch_buffer.h: Update.
1180 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1181 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1182 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1183 * gnulib/import/malloca.c: Update.
1184 * gnulib/import/malloca.h: Update.
1185 * gnulib/import/malloca.valgrind: Update.
1186 * gnulib/import/math.in.h: Update.
1187 * gnulib/import/mbrtowc.c: Update.
1188 * gnulib/import/mbsinit.c: Update.
1189 * gnulib/import/mbsrtowcs-impl.h: Update.
1190 * gnulib/import/mbsrtowcs-state.c: Update.
1191 * gnulib/import/mbsrtowcs.c: Update.
1192 * gnulib/import/memchr.c: Update.
1193 * gnulib/import/memmem.c: Update.
1194 * gnulib/import/mempcpy.c: Update.
1195 * gnulib/import/memrchr.c: Update.
1196 * gnulib/import/mkdir.c: Update.
1197 * gnulib/import/mkstemp.c: Update.
1198 * gnulib/import/msvc-inval.c: Update.
1199 * gnulib/import/msvc-inval.h: Update.
1200 * gnulib/import/msvc-nothrow.c: Update.
1201 * gnulib/import/msvc-nothrow.h: Update.
1202 * gnulib/import/open.c: Update.
1203 * gnulib/import/openat-die.c: Update.
1204 * gnulib/import/openat-priv.h: Update.
1205 * gnulib/import/openat-proc.c: Update.
1206 * gnulib/import/openat.c: Update.
1207 * gnulib/import/openat.h: Update.
1208 * gnulib/import/opendir.c: Update.
1209 * gnulib/import/pathmax.h: Update.
1210 * gnulib/import/pipe-safer.c: Update.
1211 * gnulib/import/rawmemchr.c: Update.
1212 * gnulib/import/readdir.c: Update.
1213 * gnulib/import/readlink.c: Update.
1214 * gnulib/import/realloc.c: Update.
1215 * gnulib/import/ref-add.sin: Update.
1216 * gnulib/import/ref-del.sin: Update.
1217 * gnulib/import/rename.c: Update.
1218 * gnulib/import/rewinddir.c: Update.
1219 * gnulib/import/rmdir.c: Update.
1220 * gnulib/import/same-inode.h: Update.
1221 * gnulib/import/save-cwd.c: Update.
1222 * gnulib/import/save-cwd.h: Update.
1223 * gnulib/import/scratch_buffer.h: Update.
1224 * gnulib/import/secure_getenv.c: Update.
1225 * gnulib/import/setenv.c: Update.
1226 * gnulib/import/signal.in.h: Update.
1227 * gnulib/import/stat-time.c: Update.
1228 * gnulib/import/stat-time.h: Update.
1229 * gnulib/import/stat-w32.c: Update.
1230 * gnulib/import/stat-w32.h: Update.
1231 * gnulib/import/stat.c: Update.
1232 * gnulib/import/stdbool.in.h: Update.
1233 * gnulib/import/stddef.in.h: Update.
1234 * gnulib/import/stdint.in.h: Update.
1235 * gnulib/import/stdio.in.h: Update.
1236 * gnulib/import/stdlib.in.h: Update.
1237 * gnulib/import/str-two-way.h: Update.
1238 * gnulib/import/strchrnul.c: Update.
1239 * gnulib/import/strdup.c: Update.
1240 * gnulib/import/streq.h: Update.
1241 * gnulib/import/strerror-override.c: Update.
1242 * gnulib/import/strerror-override.h: Update.
1243 * gnulib/import/strerror.c: Update.
1244 * gnulib/import/string.in.h: Update.
1245 * gnulib/import/stripslash.c: Update.
1246 * gnulib/import/strnlen1.c: Update.
1247 * gnulib/import/strnlen1.h: Update.
1248 * gnulib/import/strstr.c: Update.
1249 * gnulib/import/strtok_r.c: Update.
1250 * gnulib/import/sys_stat.in.h: Update.
1251 * gnulib/import/sys_time.in.h: Update.
1252 * gnulib/import/sys_types.in.h: Update.
1253 * gnulib/import/tempname.c: Update.
1254 * gnulib/import/tempname.h: Update.
1255 * gnulib/import/time.in.h: Update.
1256 * gnulib/import/unistd--.h: Update.
1257 * gnulib/import/unistd-safer.h: Update.
1258 * gnulib/import/unistd.in.h: Update.
1259 * gnulib/import/unsetenv.c: Update.
1260 * gnulib/import/verify.h: Update.
1261 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1262 * gnulib/import/wchar.in.h: Update.
1263 * gnulib/import/wctype.in.h: Update.
1264 * gnulib/import/xalloc-oversized.h: Update.
1265 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1266 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1267
1268 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * record-btrace.c (get_thread_current_frame): Remove
1271 old_inferior_ptid.
1272
1273 2018-09-10 Jerome Guitton <guitton@adacore.com>
1274
1275 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1276 with check_tag to 1 if and only if the type is tagged and the
1277 component being searched cannot been found in the current
1278 view. Otherwise, always call ada_to_fixed_type with
1279 check_tag to 0.
1280
1281 2018-09-10 Xavier Roirand <roirand@adacore.com>
1282
1283 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1284 declaration.
1285 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1286 * ada-varobj.c (ada_varobj_get_number_of_children,
1287 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1288
1289 2018-09-10 Xavier Roirand <roirand@adacore.com>
1290
1291 * ada-valprint.c (ada_value_print): Use type instead of
1292 enclosing type.
1293
1294 2018-09-10 Xavier Roirand <roirand@adacore.com>
1295
1296 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1297 an array of access to unconstrained array.
1298
1299 2018-09-10 Xavier Roirand <roirand@adacore.com>
1300
1301 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1302 (ada_check_typedef): Use it.
1303
1304 2018-09-10 Xavier Roirand <roirand@adacore.com>
1305
1306 * ada-varobj.c (ada_varobj_describe_struct_child)
1307 (ada_varobj_describe_child): Handle union case like struct one.
1308
1309 2018-09-10 Tom Tromey <tom@tromey.com>
1310
1311 PR python/18380:
1312 * python/python.c (_initialize_python): Make example in "python"
1313 help work in Python 3.
1314
1315 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1316
1317 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1318 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1319 $(EXEEXT) to the script, as it is not a program.
1320
1321 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * python/py-prettyprint.c (pretty_print_one_value): Return
1324 gdbpy_ref<>.
1325 (print_string_repr): Adjust.
1326 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1327 * python/python-internal.h (apply_varobj_pretty_printer): Return
1328 gdbpy_ref<>.
1329 * varobj.c (varobj_value_get_print_value): Adjust.
1330
1331 2018-09-08 Tom Tromey <tom@tromey.com>
1332
1333 PR python/16047:
1334 * python/py-prettyprint.c (pretty_print_one_value): Check for
1335 to_string method.
1336
1337 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1338
1339 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1340 replace_operator_with_call.
1341
1342 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1343
1344 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1345
1346 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1347
1348 * ada-typeprint.c (print_range): Print the bounds using TYPE
1349 rather than its TYPE_TARGET_TYPE.
1350
1351 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1352
1353 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1354 call to ada_to_fixed_value_create.
1355
1356 2018-09-08 Jerome Guitton <guitton@adacore.com>
1357
1358 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1359
1360 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1361
1362 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1363 by calls to error.
1364
1365 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1366
1367 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1368 Move update of loop variable "fi".
1369
1370 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1371
1372 * ada-lang.c (value_assign_to_component): In the case of
1373 big-endian targets, extract the bits of the given VAL
1374 using an src_offset of zero if container is not a scalar.
1375
1376 2018-09-06 Simon Ser <contact@emersion.fr>
1377
1378 PR gdb/23105
1379 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1380 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1381 * fbsd-tdep.c (fbsd_make_note_desc): New.
1382 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1383 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1384 * target.h (enum target_object) Add FreeBSD-specific
1385 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1386
1387 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1388
1389 * compile/compile-c.h (generate_c_for_variable_locations):
1390 Change reference to pointer.
1391 * compile/compile-c-support.c (compile_program) <compute>:
1392 Likewise.
1393 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1394 (generate_c_for_for_one_variable): Likewise
1395 (generate_c_for_variable_locations): Likewise
1396 * compile/compile-c-types.c (compile_c_instance::convert_type):
1397 Likewise
1398 * compile/compile-cplus-symbols.c (convert_one_symbol):
1399 std::move the scope passed to enter_scope.
1400 * compile/compile-cplus-types.c
1401 (compile_cplus_instance::enter_scope): Make parameter
1402 rvalue-reference.
1403 (compile_cplus_instance::new_scope): Change reference to
1404 pointer.
1405 (compile_cplus_instance::convert_type): Likewise
1406 (compile_cplus_convert_typedef): std::move the scope passed to
1407 enter_scope.
1408 (compile_cplus_convert_struct_or_union): Likewise.
1409 (compile_cplus_convert_enum): Likewise.
1410 (compile_cplus_convert_namespace): Likewise.
1411 * compile/compile-cplus.h (compile_cplus_instance)
1412 <enter_scope>: Make parameter rvalue-reference.
1413 * compile/compile-internal.h (compile_instance)
1414 <get_cached_type>: Likewise
1415 * compile/compile-loc2c.c (push): Likewise
1416 (pushf): Likewise
1417 (unary): Likewise
1418 (binary): Likewise
1419 (print_label): Likewise
1420 (pushf_register_address): Likewise
1421 (pushf_register): Likewise
1422 (do_compile_dwarf_expr_to_c): Likewise
1423 (compile_dwarf_expr_to_c): Likewise
1424 (compile_dwarf_bounds_to_c): Likewise
1425 * compile/compile.c (compile_instance::get_cached_type):
1426 Likewise
1427 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1428 (compile_dwarf_bounds_to_c): Likewise
1429 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1430 (dwarf2_compile_property_to_c): Likewise
1431 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1432 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1433 Likewise
1434
1435 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1436
1437 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1438 * tui/tui-data.c (init_content_element): Don't initialize it.
1439
1440 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * tui/tui-data.h (struct tui_win_info)
1443 <detail::opaque>: Remove.
1444 * tui/tui-data.c (init_win_info): Remove assignment.
1445
1446 2018-09-05 Tom Tromey <tom@tromey.com>
1447
1448 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1449 -Wformat-nonliteral.
1450 * target-float.c (host_float_ops<T>::to_string)
1451 (host_float_ops<T>::from_string): Use
1452 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1453 * configure: Rebuild.
1454
1455 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * printcmd.c (printf_c_string): Use
1458 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1459 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1460
1461 2018-09-05 Tom Tromey <tom@tromey.com>
1462
1463 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1464
1465 2018-09-05 Tom de Vries <tdevries@suse.de>
1466
1467 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1468 with resolve_abstract_p == true.
1469 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1470 defaulting to false. Propagate resolve_abstract_p to
1471 dwarf2_fetch_die_loc_sect_off.
1472 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1473 parameter, defaulting to false.
1474 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1475 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1476 parameter.
1477 * dwarf2read.h (struct die_info): Forward-declare.
1478 (die_info_ptr): New typedef.
1479 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1480
1481 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1482
1483 GDB 8.2 released.
1484
1485 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1486 Pedro Alves <palves@redhat.com>
1487
1488 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1489 "aclocal-m4-deps.mk". Include file here.
1490 $(srcdir)/aclocal.m4: Add "configure.ac".
1491 * gnulib/aclocal-m4-deps.mk: New file.
1492 * gnulib/update-gnulib.sh: Automatically update
1493 "aclocal-m4-deps.mk".
1494
1495 2018-09-04 Tom Tromey <tom@tromey.com>
1496
1497 * configure: Rebuild.
1498 * configure.ac: Remove multi-ice code.
1499
1500 2018-09-04 Tom Tromey <tom@tromey.com>
1501
1502 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1503 (ada-exp.o): Update.
1504
1505 2018-09-04 Tom Tromey <tom@tromey.com>
1506
1507 * Makefile.in (printcmd.o, target-float.o): Remove.
1508 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1509
1510 2018-09-04 Tom Tromey <tom@tromey.com>
1511
1512 * gnulib/Makefile.in: Remove obsolete comment.
1513 * Makefile.in: Remove obsolete comment.
1514
1515 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1516
1517 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1518 line with '+'.
1519
1520 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1521
1522 * riscv-tdep.c: Add 'prologue-value.h' include.
1523 (struct riscv_unwind_cache): New struct.
1524 (riscv_debug_unwinder): New global.
1525 (riscv_scan_prologue): Update arguments, capture register details
1526 from prologue scan.
1527 (riscv_skip_prologue): Reformat arguments line, move end of
1528 prologue calculation into riscv_scan_prologue.
1529 (riscv_frame_cache): Update return type, create
1530 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1531 details.
1532 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1533 (riscv_frame_prev_register): Use the trad_frame within the
1534 riscv_unwind_cache.
1535 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1536 flag.
1537
1538 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1539
1540 * trad-frame.h (trad_frame_set_realreg): Declare.
1541 (trad_frame_set_addr): Declare.
1542 * trad-frame.c (trad_frame_set_realreg): Define new function.
1543 (trad_frame_set_addr): Define new function.
1544 (trad_frame_set_reg_realreg): Use new function.
1545 (trad_frame_set_reg_addr): Use new function.
1546
1547 2018-09-01 Keith Seitz <keiths@redhat.com>
1548
1549 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1550 pulongest instead of "%lld".
1551 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1552 ATTRIBUTE_UNUSED.
1553
1554 2018-08-31 Tom Tromey <tom@tromey.com>
1555
1556 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1557 variant part type.
1558
1559 2018-08-31 Pedro Alves <palves@redhat.com>
1560
1561 * gdbarch.h: Regenerate.
1562
1563 2018-08-31 Pedro Alves <palves@redhat.com>
1564
1565 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1566 * target.h (Hardware watchpoint interfaces): Describe
1567 continuable/steppable/non-steppable watchpoints.
1568 * gdbarch.h, gdbarch.c: Regenerate.
1569
1570 2018-08-31 Pedro Alves <palves@redhat.com>
1571
1572 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1573 Delete.
1574 * s390-linux-nat.c
1575 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1576 * target.h (target_ops::have_continuable_watchpoint): Delete.
1577 (target_have_continuable_watchpoint): Delete.
1578 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1579 * target-delegates.c: Regenerate.
1580
1581 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1582
1583 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1584 the files present in "gnulib/import/m4/".
1585
1586 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1587
1588 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1589 c.sw, c.swsp, and c.sdsp.
1590
1591 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1592
1593 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1594 (riscv_read_misa_reg): Don't cache value read into inferior data.
1595 (riscv_new_inferior_data): Delete.
1596 (riscv_inferior_data_cleanup): Delete.
1597 (riscv_inferior_data): Delete.
1598 (riscv_invalidate_inferior_data): Delete.
1599 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1600
1601 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * compile/compile-cplus-types.c
1604 (compile_cplus_instance::leave_scope): Take the address of scope
1605 object.
1606 (compile_cplus_instance::convert_qualified_base): Compare quals
1607 to 0.
1608
1609 2018-08-30 Keith Seitz <keiths@redhat.com>
1610
1611 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1612 Use "%s" and host_address_to_string instead of "%p" in printf.
1613
1614 2018-08-29 Keith Seitz <keiths@redhat.com>
1615
1616 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1617 and compile-cplus-types.c.
1618 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1619 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1620 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1621 Declare.
1622 * compile/compile-c-support.c: Include compile-cplus.h.
1623 (load_libcompile): Templatize.
1624 (get_compile_context): "New" function.
1625 (c_get_compile_context): Use get_compile_context.
1626 (cplus_get_compile_context): New function.
1627 (cplus_push_user_expression, cplus_pop_user_expression)
1628 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1629 (cplus_compute_program): Define new structs/functions.
1630 * compile/compile-cplus-symmbols.c: New file.
1631 * compile/compile-cplus-types.c: New file.
1632 * compile/compile-cplus.h: New file.
1633 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1634 Declare.
1635 * compile/compile-object-load.c (get_out_value_type): Use
1636 strncmp_iw when comparing symbol names.
1637 (compile_object_load): Add mst_bss and mst_data.
1638 * compile/compile.c (_initialize_compile): Remove
1639 -Wno-implicit-function-declaration from `compile_args'.
1640 * compile/gcc-cp-plugin.h: New file.
1641 * NEWS: Mention C++ compile support and new debug options.
1642
1643 2018-08-29 Keith Seitz <keiths@redhat.com>
1644
1645 * linespec.c (collect_info::add_symbol): Make virtual.
1646 (struct symbol_searcher_collect_info): New struct.
1647 (symbol_searcher::find_all_symbols): New method.
1648 * symtab.h (class symbol_searcher): New class.
1649
1650 2018-08-29 Keith Seitz <keiths@redhat.com>
1651
1652 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1653 Change to vector of block_symbol. Update all users.
1654 (struct collect_info) <symbols>: Likewise.
1655 (collect_info::add_symbol): Take block_symbol as argument.
1656 Update all callers.
1657 (decode_compound_collector) <m_symbols>: Change type to vector
1658 of block_symbol. Update all users.
1659 (decode_compound_collector::operator ()): Change parameter type
1660 to block_symbol.
1661 (find_method, find_function_symbols, find_linespec_symbols)
1662 (find_label_symbols_in_block, find_label_symbols): Change symbol
1663 vectors to block_symbol vectors.
1664 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1665 block_symbol.
1666
1667 2018-08-29 Keith Seitz <keiths@redhat.com>
1668
1669 * linespec.c (symbolp): Remove typedef and VEC definitions.
1670 (bound_minimal_symbol_d): Likewise.
1671
1672 2018-08-29 Keith Seitz <keiths@redhat.com>
1673
1674 * linespec.c (decode_compound_collector::decode_compound_collector):
1675 Remove initialization for `m_symtabs'.
1676 (decode_compound_collector::release_symbols): Change return type
1677 to std::vector. Update all callers.
1678 (class decode_compound_collector) <m_symbols>: Change type to
1679 std::vector.
1680 (lookup_prefix_sym): Change return type to std::vector. Update all
1681 callers.
1682 (compare_symbols): Remove.
1683 (std_compare_symbols): Rename to `compare_symbols'.
1684 (find_method): Change `sym_classes' parameter to std::vector.
1685 Update all callers. Use std::sort to sort sym_classes.
1686 (find_linespec_symbols): Remove cleanup.
1687
1688 2018-08-29 Keith Seitz <keiths@redhat.com>
1689
1690 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1691 std::vector. Update all users.
1692 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1693 (struct collect_info) <minimal_symbols>: Likewise.
1694 (compare_msymbols): Return bool. Change parameters to const
1695 bound_minimal_symbol references.
1696 (find_method, find_function_symbols, find_linespec_symbols): Change
1697 `minsyms' parameter to std::vector. Update all callers.
1698
1699 2018-08-29 Keith Seitz <keiths@redhat.com>
1700
1701 * linespec.c (struct linespec) <label_symbols>: Change type to
1702 std::vector. Update all users.
1703 (find_label_symbols_in_block): Change `result' parameter to
1704 std::vector. Update all callers.
1705 (find_label_symbols): Return std::vector. Update all callers.
1706
1707 2018-08-29 Keith Seitz <keiths@redhat.com>
1708
1709 * linespec.c (struct linespec) <function_symbols>: Change type to
1710 std::vector. Update all users.
1711 (struct collect_info) <function_symbols>: Likewise.
1712 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1713 (std_compare_symbols): New function.
1714 (find_method, find_function_symbols, find_linespec_symbols)
1715 (find_label_symbols_in_block): Change `symbols' parameter to
1716 std::vector. Update all callers.
1717 (find_label_symbols): Likewise for `function_symbols' and
1718 `label_funcs_ret'.
1719
1720 2018-08-29 Keith Seitz <keiths@redhat.com>
1721
1722 * linespec.c (symtab_vector_up): Define.
1723 (struct linespec) <file_symtabs>: Change type to std::vector *.
1724 Update all uses.
1725 (struct collect_info) <file_symtabs>: Likewise.
1726 (collect_symtabs_from_filename): Return symtab_vector_up.
1727 Update all callers.
1728 (decode_objc): Remove cleanup.
1729 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1730 (symtab_collector::release_symtabs): Return symtab_vector_up.
1731 Update all callers.
1732 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1733 Update all users.
1734 (collect_symtabs_from_filename, symtabs_from_filename): Return
1735 symtab_vector_up. Update all callers.
1736
1737 2018-08-29 Tom Tromey <tom@tromey.com>
1738
1739 * csky-tdep.c (csky_analyze_prologue): Use
1740 core_addr_to_string_nz.
1741
1742 2018-08-29 Tom Tromey <tom@tromey.com>
1743
1744 * windows-nat.c (struct xlate_exception) <them>: Change type to
1745 DWORD.
1746 (xlate): Fix formatting. Remove last entry.
1747 (struct xlate_exception, xlate): Comment out.
1748 (windows_nat_target::resume): Use ranged for.
1749
1750 2018-08-29 Jim Wilson <jimw@sifive.com>
1751
1752 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1753 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1754 of NT_PRFPREG.
1755 (riscv_linux_nat_target::store_registers): Likewise.
1756
1757 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1758
1759 PR gdb/23555
1760 PR gdb/23558
1761 * gnulib/aclocal.m4: Regenerate.
1762 * gnulib/config.in: Regenerate.
1763 * gnulib/configure: Regenerate.
1764 * gnulib/import/Makefile.am: Update.
1765 * gnulib/import/Makefile.in: Update.
1766 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1767 * gnulib/import/_Noreturn.h: ... this.
1768 * gnulib/import/alloca.in.h: Update.
1769 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1770 * gnulib/import/arg-nonnull.h: ... this.
1771 * gnulib/import/assure.h: Update.
1772 * gnulib/import/at-func.c: Update.
1773 * gnulib/import/basename-lgpl.c: Update.
1774 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1775 * gnulib/import/c++defs.h: ... this.
1776 * gnulib/import/canonicalize-lgpl.c: Update.
1777 * gnulib/import/cdefs.h: Update.
1778 * gnulib/import/chdir-long.c: Update.
1779 * gnulib/import/chdir-long.h: Update.
1780 * gnulib/import/cloexec.c: Update.
1781 * gnulib/import/cloexec.h: Update.
1782 * gnulib/import/close.c: Update.
1783 * gnulib/import/closedir.c: Update.
1784 * gnulib/import/config.charset: Update.
1785 * gnulib/import/dirent-private.h: Update.
1786 * gnulib/import/dirent.in.h: Update.
1787 * gnulib/import/dirfd.c: Update.
1788 * gnulib/import/dirname-lgpl.c: Update.
1789 * gnulib/import/dirname.h: Update.
1790 * gnulib/import/dosname.h: Update.
1791 * gnulib/import/dup-safer-flag.c: Update.
1792 * gnulib/import/dup-safer.c: Update.
1793 * gnulib/import/dup.c: Update.
1794 * gnulib/import/dup2.c: Update.
1795 * gnulib/import/errno.in.h: Update.
1796 * gnulib/import/error.c: Update.
1797 * gnulib/import/error.h: Update.
1798 * gnulib/import/exitfail.c: Update.
1799 * gnulib/import/exitfail.h: Update.
1800 * gnulib/import/extra/update-copyright: Update.
1801 * gnulib/import/fchdir.c: Update.
1802 * gnulib/import/fcntl.c: Update.
1803 * gnulib/import/fcntl.in.h: Update.
1804 * gnulib/import/fd-hook.c: Update.
1805 * gnulib/import/fd-hook.h: Update.
1806 * gnulib/import/fd-safer-flag.c: Update.
1807 * gnulib/import/fd-safer.c: Update.
1808 * gnulib/import/fdopendir.c: Update.
1809 * gnulib/import/filename.h: Update.
1810 * gnulib/import/filenamecat-lgpl.c: Update.
1811 * gnulib/import/filenamecat.h: Update.
1812 * gnulib/import/flexmember.h: Update.
1813 * gnulib/import/float+.h: Update.
1814 * gnulib/import/float.c: Update.
1815 * gnulib/import/float.in.h: Update.
1816 * gnulib/import/fnmatch.c: Update.
1817 * gnulib/import/fnmatch.in.h: Update.
1818 * gnulib/import/fnmatch_loop.c: Update.
1819 * gnulib/import/fpucw.h: Update.
1820 * gnulib/import/frexp.c: Update.
1821 * gnulib/import/frexpl.c: Update.
1822 * gnulib/import/fstat.c: Update.
1823 * gnulib/import/fstatat.c: Update.
1824 * gnulib/import/getcwd-lgpl.c: Update.
1825 * gnulib/import/getcwd.c: Update.
1826 * gnulib/import/getdtablesize.c: Update.
1827 * gnulib/import/getlogin_r.c: Update.
1828 * gnulib/import/getprogname.c: Update.
1829 * gnulib/import/getprogname.h: Update.
1830 * gnulib/import/gettext.h: Update.
1831 * gnulib/import/gettimeofday.c: Update.
1832 * gnulib/import/glob-libc.h: Update.
1833 * gnulib/import/glob.c: Update.
1834 * gnulib/import/glob.in.h: Update.
1835 * gnulib/import/glob_internal.h: Update.
1836 * gnulib/import/glob_pattern_p.c: Update.
1837 * gnulib/import/globfree.c: Update.
1838 * gnulib/import/hard-locale.c: Update.
1839 * gnulib/import/hard-locale.h: Update.
1840 * gnulib/import/intprops.h: Update.
1841 * gnulib/import/inttypes.in.h: Update.
1842 * gnulib/import/isnan.c: Update.
1843 * gnulib/import/isnand-nolibm.h: Update.
1844 * gnulib/import/isnand.c: Update.
1845 * gnulib/import/isnanl-nolibm.h: Update.
1846 * gnulib/import/isnanl.c: Update.
1847 * gnulib/import/itold.c: Update.
1848 * gnulib/import/libc-config.h: Update.
1849 * gnulib/import/limits.in.h: Update.
1850 * gnulib/import/localcharset.c: Update.
1851 * gnulib/import/localcharset.h: Update.
1852 * gnulib/import/localtime-buffer.c: Update.
1853 * gnulib/import/localtime-buffer.h: Update.
1854 * gnulib/import/lstat.c: Update.
1855 * gnulib/import/m4/00gnulib.m4: Update.
1856 * gnulib/import/m4/__inline.m4: Update.
1857 * gnulib/import/m4/absolute-header.m4: Update.
1858 * gnulib/import/m4/alloca.m4: Update.
1859 * gnulib/import/m4/builtin-expect.m4: Update.
1860 * gnulib/import/m4/canonicalize.m4: Update.
1861 * gnulib/import/m4/chdir-long.m4: Update.
1862 * gnulib/import/m4/close.m4: Update.
1863 * gnulib/import/m4/closedir.m4: Update.
1864 * gnulib/import/m4/configmake.m4: Update.
1865 * gnulib/import/m4/d-ino.m4: Update.
1866 * gnulib/import/m4/d-type.m4: Update.
1867 * gnulib/import/m4/dirent_h.m4: Update.
1868 * gnulib/import/m4/dirfd.m4: Update.
1869 * gnulib/import/m4/dirname.m4: Update.
1870 * gnulib/import/m4/double-slash-root.m4: Update.
1871 * gnulib/import/m4/dup.m4: Update.
1872 * gnulib/import/m4/dup2.m4: Update.
1873 * gnulib/import/m4/eealloc.m4: Update.
1874 * gnulib/import/m4/environ.m4: Update.
1875 * gnulib/import/m4/errno_h.m4: Update.
1876 * gnulib/import/m4/error.m4: Update.
1877 * gnulib/import/m4/exponentd.m4: Update.
1878 * gnulib/import/m4/exponentl.m4: Update.
1879 * gnulib/import/m4/extensions.m4: Update.
1880 * gnulib/import/m4/extern-inline.m4: Update.
1881 * gnulib/import/m4/fchdir.m4: Update.
1882 * gnulib/import/m4/fcntl-o.m4: Update.
1883 * gnulib/import/m4/fcntl.m4: Update.
1884 * gnulib/import/m4/fcntl_h.m4: Update.
1885 * gnulib/import/m4/fdopendir.m4: Update.
1886 * gnulib/import/m4/filenamecat.m4: Update.
1887 * gnulib/import/m4/flexmember.m4: Update.
1888 * gnulib/import/m4/float_h.m4: Update.
1889 * gnulib/import/m4/fnmatch.m4: Update.
1890 * gnulib/import/m4/fnmatch_h.m4: Update.
1891 * gnulib/import/m4/fpieee.m4: Update.
1892 * gnulib/import/m4/frexp.m4: Update.
1893 * gnulib/import/m4/frexpl.m4: Update.
1894 * gnulib/import/m4/fstat.m4: Update.
1895 * gnulib/import/m4/fstatat.m4: Update.
1896 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1897 * gnulib/import/m4/getcwd-path-max.m4: Update.
1898 * gnulib/import/m4/getcwd.m4: Update.
1899 * gnulib/import/m4/getdtablesize.m4: Update.
1900 * gnulib/import/m4/getlogin.m4: Update.
1901 * gnulib/import/m4/getlogin_r.m4: Update.
1902 * gnulib/import/m4/getpagesize.m4: Update.
1903 * gnulib/import/m4/getprogname.m4: Update.
1904 * gnulib/import/m4/gettimeofday.m4: Update.
1905 * gnulib/import/m4/glibc21.m4: Update.
1906 * gnulib/import/m4/glob.m4: Update.
1907 * gnulib/import/m4/glob_h.m4: Update.
1908 * gnulib/import/m4/gnulib-cache.m4: Update.
1909 * gnulib/import/m4/gnulib-common.m4: Update.
1910 * gnulib/import/m4/gnulib-comp.m4: Update.
1911 * gnulib/import/m4/gnulib-tool.m4: Update.
1912 * gnulib/import/m4/hard-locale.m4: Update.
1913 * gnulib/import/m4/include_next.m4: Update.
1914 * gnulib/import/m4/inttypes-pri.m4: Update.
1915 * gnulib/import/m4/inttypes.m4: Update.
1916 * gnulib/import/m4/isnand.m4: Update.
1917 * gnulib/import/m4/isnanl.m4: Update.
1918 * gnulib/import/m4/largefile.m4: Update.
1919 * gnulib/import/m4/limits-h.m4: Update.
1920 * gnulib/import/m4/localcharset.m4: Update.
1921 * gnulib/import/m4/locale-fr.m4: Update.
1922 * gnulib/import/m4/locale-ja.m4: Update.
1923 * gnulib/import/m4/locale-zh.m4: Update.
1924 * gnulib/import/m4/localtime-buffer.m4: Update.
1925 * gnulib/import/m4/longlong.m4: Update.
1926 * gnulib/import/m4/lstat.m4: Update.
1927 * gnulib/import/m4/malloc.m4: Update.
1928 * gnulib/import/m4/malloca.m4: Update.
1929 * gnulib/import/m4/math_h.m4: Update.
1930 * gnulib/import/m4/mbrtowc.m4: Update.
1931 * gnulib/import/m4/mbsinit.m4: Update.
1932 * gnulib/import/m4/mbsrtowcs.m4: Update.
1933 * gnulib/import/m4/mbstate_t.m4: Update.
1934 * gnulib/import/m4/memchr.m4: Update.
1935 * gnulib/import/m4/memmem.m4: Update.
1936 * gnulib/import/m4/mempcpy.m4: Update.
1937 * gnulib/import/m4/memrchr.m4: Update.
1938 * gnulib/import/m4/mkdir.m4: Update.
1939 * gnulib/import/m4/mkstemp.m4: Update.
1940 * gnulib/import/m4/mmap-anon.m4: Update.
1941 * gnulib/import/m4/mode_t.m4: Update.
1942 * gnulib/import/m4/msvc-inval.m4: Update.
1943 * gnulib/import/m4/msvc-nothrow.m4: Update.
1944 * gnulib/import/m4/multiarch.m4: Update.
1945 * gnulib/import/m4/nocrash.m4: Update.
1946 * gnulib/import/m4/off_t.m4: Update.
1947 * gnulib/import/m4/onceonly.m4: Update.
1948 * gnulib/import/m4/open-cloexec.m4: Update.
1949 * gnulib/import/m4/open.m4: Update.
1950 * gnulib/import/m4/openat.m4: Update.
1951 * gnulib/import/m4/opendir.m4: Update.
1952 * gnulib/import/m4/pathmax.m4: Update.
1953 * gnulib/import/m4/rawmemchr.m4: Update.
1954 * gnulib/import/m4/readdir.m4: Update.
1955 * gnulib/import/m4/readlink.m4: Update.
1956 * gnulib/import/m4/realloc.m4: Update.
1957 * gnulib/import/m4/rename.m4: Update.
1958 * gnulib/import/m4/rewinddir.m4: Update.
1959 * gnulib/import/m4/rmdir.m4: Update.
1960 * gnulib/import/m4/save-cwd.m4: Update.
1961 * gnulib/import/m4/secure_getenv.m4: Update.
1962 * gnulib/import/m4/setenv.m4: Update.
1963 * gnulib/import/m4/signal_h.m4: Update.
1964 * gnulib/import/m4/ssize_t.m4: Update.
1965 * gnulib/import/m4/stat-time.m4: Update.
1966 * gnulib/import/m4/stat.m4: Update.
1967 * gnulib/import/m4/std-gnu11.m4: Update.
1968 * gnulib/import/m4/stdbool.m4: Update.
1969 * gnulib/import/m4/stddef_h.m4: Update.
1970 * gnulib/import/m4/stdint.m4: Update.
1971 * gnulib/import/m4/stdio_h.m4: Update.
1972 * gnulib/import/m4/stdlib_h.m4: Update.
1973 * gnulib/import/m4/strchrnul.m4: Update.
1974 * gnulib/import/m4/strdup.m4: Update.
1975 * gnulib/import/m4/strerror.m4: Update.
1976 * gnulib/import/m4/string_h.m4: Update.
1977 * gnulib/import/m4/strstr.m4: Update.
1978 * gnulib/import/m4/strtok_r.m4: Update.
1979 * gnulib/import/m4/sys_socket_h.m4: Update.
1980 * gnulib/import/m4/sys_stat_h.m4: Update.
1981 * gnulib/import/m4/sys_time_h.m4: Update.
1982 * gnulib/import/m4/sys_types_h.m4: Update.
1983 * gnulib/import/m4/tempname.m4: Update.
1984 * gnulib/import/m4/time_h.m4: Update.
1985 * gnulib/import/m4/unistd-safer.m4: Update.
1986 * gnulib/import/m4/unistd_h.m4: Update.
1987 * gnulib/import/m4/warn-on-use.m4: Update.
1988 * gnulib/import/m4/wchar_h.m4: Update.
1989 * gnulib/import/m4/wchar_t.m4: Update.
1990 * gnulib/import/m4/wctype_h.m4: Update.
1991 * gnulib/import/m4/wint_t.m4: Update.
1992 * gnulib/import/malloc.c: Update.
1993 * gnulib/import/malloc/scratch_buffer.h: Update.
1994 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1995 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1996 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1997 * gnulib/import/malloca.c: Update.
1998 * gnulib/import/malloca.h: Update.
1999 * gnulib/import/malloca.valgrind: Update.
2000 * gnulib/import/math.in.h: Update.
2001 * gnulib/import/mbrtowc.c: Update.
2002 * gnulib/import/mbsinit.c: Update.
2003 * gnulib/import/mbsrtowcs-impl.h: Update.
2004 * gnulib/import/mbsrtowcs-state.c: Update.
2005 * gnulib/import/mbsrtowcs.c: Update.
2006 * gnulib/import/memchr.c: Update.
2007 * gnulib/import/memmem.c: Update.
2008 * gnulib/import/mempcpy.c: Update.
2009 * gnulib/import/memrchr.c: Update.
2010 * gnulib/import/mkdir.c: Update.
2011 * gnulib/import/mkstemp.c: Update.
2012 * gnulib/import/msvc-inval.c: Update.
2013 * gnulib/import/msvc-inval.h: Update.
2014 * gnulib/import/msvc-nothrow.c: Update.
2015 * gnulib/import/msvc-nothrow.h: Update.
2016 * gnulib/import/open.c: Update.
2017 * gnulib/import/openat-die.c: Update.
2018 * gnulib/import/openat-priv.h: Update.
2019 * gnulib/import/openat-proc.c: Update.
2020 * gnulib/import/openat.c: Update.
2021 * gnulib/import/openat.h: Update.
2022 * gnulib/import/opendir.c: Update.
2023 * gnulib/import/pathmax.h: Update.
2024 * gnulib/import/pipe-safer.c: Update.
2025 * gnulib/import/rawmemchr.c: Update.
2026 * gnulib/import/readdir.c: Update.
2027 * gnulib/import/readlink.c: Update.
2028 * gnulib/import/realloc.c: Update.
2029 * gnulib/import/ref-add.sin: Update.
2030 * gnulib/import/ref-del.sin: Update.
2031 * gnulib/import/rename.c: Update.
2032 * gnulib/import/rewinddir.c: Update.
2033 * gnulib/import/rmdir.c: Update.
2034 * gnulib/import/same-inode.h: Update.
2035 * gnulib/import/save-cwd.c: Update.
2036 * gnulib/import/save-cwd.h: Update.
2037 * gnulib/import/scratch_buffer.h: Update.
2038 * gnulib/import/secure_getenv.c: Update.
2039 * gnulib/import/setenv.c: Update.
2040 * gnulib/import/signal.in.h: Update.
2041 * gnulib/import/stat-time.c: Update.
2042 * gnulib/import/stat-time.h: Update.
2043 * gnulib/import/stat-w32.c: Update.
2044 * gnulib/import/stat-w32.h: Update.
2045 * gnulib/import/stat.c: Update.
2046 * gnulib/import/stdbool.in.h: Update.
2047 * gnulib/import/stddef.in.h: Update.
2048 * gnulib/import/stdint.in.h: Update.
2049 * gnulib/import/stdio.in.h: Update.
2050 * gnulib/import/stdlib.in.h: Update.
2051 * gnulib/import/str-two-way.h: Update.
2052 * gnulib/import/strchrnul.c: Update.
2053 * gnulib/import/strdup.c: Update.
2054 * gnulib/import/streq.h: Update.
2055 * gnulib/import/strerror-override.c: Update.
2056 * gnulib/import/strerror-override.h: Update.
2057 * gnulib/import/strerror.c: Update.
2058 * gnulib/import/string.in.h: Update.
2059 * gnulib/import/stripslash.c: Update.
2060 * gnulib/import/strnlen1.c: Update.
2061 * gnulib/import/strnlen1.h: Update.
2062 * gnulib/import/strstr.c: Update.
2063 * gnulib/import/strtok_r.c: Update.
2064 * gnulib/import/sys_stat.in.h: Update.
2065 * gnulib/import/sys_time.in.h: Update.
2066 * gnulib/import/sys_types.in.h: Update.
2067 * gnulib/import/tempname.c: Update.
2068 * gnulib/import/tempname.h: Update.
2069 * gnulib/import/time.in.h: Update.
2070 * gnulib/import/unistd--.h: Update.
2071 * gnulib/import/unistd-safer.h: Update.
2072 * gnulib/import/unistd.in.h: Update.
2073 * gnulib/import/unsetenv.c: Update.
2074 * gnulib/import/verify.h: Update.
2075 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2076 * gnulib/import/wchar.in.h: Update.
2077 * gnulib/import/wctype.in.h: Update.
2078 * gnulib/import/xalloc-oversized.h: Update.
2079 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2080 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2081
2082 2018-08-16 Gary Benson <gbenson@redhat.com>
2083
2084 PR gdb/13000:
2085 * gdb/main.c (captured_main_1): Exit with nonzero status
2086 in batch mode if the last command to be executed failed.
2087 * NEWS: Mention the above.
2088
2089 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2090
2091 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2092 end of warning message.
2093
2094 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2095
2096 PR gdb/22943:
2097 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2098 (aarch64_extract_return_value): Use
2099 aapcs_is_vfp_call_or_return_candidate.
2100 (aarch64_return_in_memory): Likewise.
2101 (aarch64_store_return_value): Likewise.
2102
2103 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2104
2105 * aarch64-tdep.c
2106 (aapcs_is_vfp_call_or_return_candidate): Make static
2107 (pass_in_v_or_stack): Remove function.
2108 (pass_in_v_vfp_candidate): New function.
2109 (aarch64_push_dummy_call): Check for float register candidates.
2110
2111 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2112
2113 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2114 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2115 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2116
2117 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2118
2119 PR build/23399
2120 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2121 (struct ipa_sym_addresses): Rename to...
2122 (struct ipa_sym_addresses_common): ... this.
2123 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2124
2125 2018-08-28 Tom Tromey <tom@tromey.com>
2126
2127 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2128 (token_fifo): Now a std::vector.
2129 (yylex, c_parse): Update.
2130 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2131 (token_fifo): Now a std::vector.
2132 (yylex, d_parse): Update.
2133 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2134 (token_fifo): Now a std::vector.
2135 (yylex, go_parse): Update.
2136
2137 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * parser-defs.h (struct type_stack) <elements>: Change type to
2140 std::vector<union type_stack_elt>.
2141 <depth, size>: Remove.
2142 * parse.c (parse_exp_in_context_1): Adjust.
2143 (type_stack_reserve): Remove.
2144 (check_type_stack_depth): Remove.
2145 (insert_into_type_stack): Adjust to std::vector.
2146 (insert_type): Likewise.
2147 (push_type): Likewise.
2148 (push_type_int): Likewise.
2149 (insert_type_address_space): Likewise.
2150 (pop_type): Likewise.
2151 (pop_type_int): Likewise.
2152 (pop_typelist): Likewise.
2153 (pop_type_stack): Likewise.
2154 (append_type_stack): Likewise.
2155 (push_type_stack): Likewise.
2156 (get_type_stack): Likewise.
2157 (type_stack_cleanup): Likewise.
2158 (push_typelist): Likewise.
2159 (follow_types): Likewise.
2160 (_initialize_parse): Likewise.
2161
2162 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2163
2164 * NEWS: Mention csky target.
2165
2166 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2167 Hafiz Abid Qadeer <abidh@codesourcery.com>
2168 Don Breazeal <donb@codesourcery.com>
2169
2170 * csky-linux-tdep.c: New file.
2171 * csky-tdep.c: Likewise.
2172 * csky-tdep.h: Likewise.
2173 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2174 csky-tdep.o.
2175 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2176 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2177 * configure.tgt: Add csky support.
2178
2179 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2180
2181 * python/py-framefilter.c (py_print_frame): Print frame architecture
2182 when printing on an MI output.
2183
2184 2018-08-27 Tom Tromey <tom@tromey.com>
2185
2186 PR build/23087:
2187 * configure: Rebuild.
2188 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2189
2190 2018-08-27 Tom Tromey <tom@tromey.com>
2191
2192 * aarch64-linux-tdep.c
2193 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2194 casts to int.
2195
2196 2018-08-27 Tom Tromey <tom@tromey.com>
2197
2198 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2199 unsigned.
2200 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2201 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2202 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2203 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2204 unsigned.
2205
2206 2018-08-27 Tom Tromey <tom@tromey.com>
2207
2208 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2209 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2210
2211 2018-08-27 Tom Tromey <tom@tromey.com>
2212
2213 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2214 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2215 ULONGEST_MAX.
2216 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2217 ULONGEST_MAX.
2218 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2219 ULONGEST_MAX.
2220 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2221 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2222 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2223 ULONGEST_MAX.
2224 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2225 (ppc64_linux_sigaction_tramp_frame)
2226 (ppc32_linux_sighandler_tramp_frame)
2227 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2228 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2229 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2230 * mn10300-linux-tdep.c (am33_linux_sigframe)
2231 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2232 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2233 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2234 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2235 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2236 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2237 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2238 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2239 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2240 * microblaze-linux-tdep.c
2241 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2242 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2243 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2244 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2245 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2246 * common/common-types.h (ULONGEST_MAX): New define.
2247 (CORE_ADDR_MAX): Fix formatting.
2248 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2249 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2250 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2251 (arm_linux_rt_sigreturn_tramp_frame)
2252 (arm_eabi_linux_sigreturn_tramp_frame)
2253 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2254 (thumb2_eabi_linux_sigreturn_tramp_frame)
2255 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2256 (arm_linux_restart_syscall_tramp_frame)
2257 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2258 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2259 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2260 ULONGEST_MAX.
2261 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2262
2263 2018-08-27 Tom Tromey <tom@tromey.com>
2264
2265 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2266 CORE_ADDR_MAX.
2267 * mips-tdep.c (mips_deal_with_atomic_sequence)
2268 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2269 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2270 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2271 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2272 CORE_ADDR_MAX.
2273 * aarch64-tdep.c (aarch64_software_single_step): Use
2274 CORE_ADDR_MAX.
2275
2276 2018-08-27 Tom Tromey <tom@tromey.com>
2277
2278 * linespec.c (complete_linespec_component): Add cast to "char".
2279 * completer.c (completion_tracker::build_completion_result): Add
2280 cast to "char".
2281
2282 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2283
2284 * solist.h (struct solist, struct target_so_ops): Fix
2285 indentation.
2286
2287 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2288
2289 * ada-tasks.c (ada_task_info_s): Remove typedef.
2290 (DEF_VEC_O(ada_task_info_s)): Remove.
2291 (struct ada_tasks_inferior_data): Initialize fields.
2292 <task_list>: Make an std::vector.
2293 (get_ada_tasks_inferior_data): Allocate with new.
2294 (ada_get_task_number): Adjust.
2295 (get_task_number_from_id): Likewise.
2296 (valid_task_id): Likewise.
2297 (ada_get_task_info_from_ptid): Likewise.
2298 (iterate_over_live_ada_tasks): Likewise.
2299 (add_ada_task): Likewise.
2300 (read_known_tasks): Likewise.
2301 (ada_build_task_list): Likewise.
2302 (print_ada_task_info): Likewise.
2303 (info_task): Likewise.
2304 (task_command_1): Likewise.
2305
2306 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2307
2308 * ada-lang.c (add_angle_brackets): Return std::string.
2309
2310 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 * python/py-threadevent.c (py_get_event_thread): Initialize
2313 pythread.
2314
2315 2018-08-24 Pedro Alves <palves@redhat.com>
2316
2317 * python/py-bpevent.c (create_breakpoint_event_object): Use
2318 copy-initialization.
2319 * python/py-continueevent.c (emit_continue_event): Use
2320 copy-initialization.
2321 * python/py-exitedevent.c (create_exited_event_object): Return a
2322 gdbpy_ref<>.
2323 (emit_exited_event): Use copy-initialization.
2324 * python/py-inferior.c (python_new_inferior)
2325 (python_inferior_deleted, add_thread_object): Use
2326 copy-initialization.
2327 * python/py-infevents.c (create_inferior_call_event_object)
2328 (create_register_changed_event_object)
2329 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2330 (emit_inferior_call_event, emit_memory_changed_event)
2331 (emit_register_changed_event): Use copy-initialization.
2332 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2333 Return a gdbpy_ref<>.
2334 (emit_new_objfile_event): Use copy-initialization.
2335 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2336 (emit_clear_objfiles_event): Use copy-initialization.
2337 * python/py-signalevent.c (create_signal_event_object): Use
2338 copy-initialization.
2339 * python/py-threadevent.c (create_thread_event_object): Use
2340 copy-initialization.
2341
2342 2018-08-24 Pedro Alves <palves@redhat.com>
2343 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 PR gdb/23379
2346 * python/py-continueevent.c: Include "gdbthread.h".
2347 (create_continue_event_object): Add intro comment. Add 'ptid'
2348 parameter. Use it to find thread to pass to
2349 create_thread_event_object.
2350 (emit_continue_event): Pass PTID down to
2351 create_continue_event_object.
2352 * python/py-event.h (py_get_event_thread): Declare.
2353 (create_thread_event_object): Remove default from 'thread'
2354 parameter.
2355 * python/py-stopevent.c (create_stop_event_object): Use
2356 py_get_event_thread.
2357 * python/py-threadevent.c (get_event_thread): Rename to ...
2358 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2359 and use it to find the thread.
2360 (create_thread_event_object): Assert that THREAD isn't null.
2361 Don't find the event thread here.
2362
2363 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2364
2365 * block.h (blockrange, blockranges): New struct declarations.
2366 (struct block): Add new field named `ranges'.
2367 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2368 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2369 macros for accessing ranges in struct block.
2370 (make_blockranges): New declaration.
2371 block.c (make_blockranges): New function.
2372 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2373 for block.
2374 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2375 * blockframe.c (cache_pc_function_block): New static global.
2376 (clear_pc_function_cache): Clear cache_pc_function_block.
2377 (find_pc_partial_function): Move comment to symtab.h. Add
2378 support for non-contiguous blocks.
2379 * cli/cli-cmds.c (block.h): Include.
2380 (print_disassembly): Handle printing of non-contiguous blocks.
2381 (disassemble_current_function): Likewise.
2382 (disassemble_command): Likewise.
2383
2384 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2385 BLOCK_START.
2386 * blockframe.c (get_pc_function_start): Likewise.
2387 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2388 (gcc_symbol_address): Likewise.
2389 * compile/compile-object-run.c (compile_object_run): Likewise.
2390 * compile/compile.c (get_expr_block_and_pc): Likewise.
2391 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2392 (func_addr_to_tail_call_list): Likewise.
2393 * findvar.c (default_read_var_value): Likewise.
2394 * inline-frame.c (inline_frame_this_id): Likewise.
2395 (skip-inline_frames): Likewise.
2396 * infcmd.c (until_next_command): Likewise.
2397 * linespec.c (convert_linespec_to_sals): Likewise.
2398 * parse.c (parse_exp_in_context_1): Likewise.
2399 * printcmd.c (build_address_symbolic): likewise.
2400 (info_address_command): Likewise.
2401 symtab.c (find_function_start_sal): Likewise.
2402 (skip_prologue_sal): Likewise.
2403 (find_function_alias_target): Likewise.
2404 (find_gnu_ifunc): Likewise.
2405 * stack.c (find_frame_funname): Likewise.
2406 * symtab.c (fixup_symbol_section): Likewise.
2407 (find_function_start_sal): Likewise.
2408 (skip_prologue_sal): Likewsie.
2409 (find_function_alias_target): Likewise.
2410 (find_gnu_ifunc): Likewise.
2411 * tracepoint.c (info_scope_command): Likewise.
2412 * value.c (value_fn_field): Likewise.
2413
2414 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2415 in place of find_pc_partial_function.
2416 * blockframe.c (find_function_entry_range_from_pc): New function.
2417 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2418 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2419 for each range in a block.
2420
2421
2422 2018-08-23 Xavier Roirand <roirand@adacore.com>
2423
2424 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2425 incrementation.
2426
2427 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2428
2429 * solib-svr4.c (read_program_headers_from_bfd): Return
2430 gdb::optional<gdb::byte_vector>.
2431 (svr4_exec_displacement): Adjust.
2432
2433 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2434
2435 * solib-svr4.c (read_program_header): Return
2436 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2437 (find_program_interpreter): Return
2438 gdb::optional<gdb::byte_vector>.
2439 (scan_dyntag_auxv): Adjust.
2440 (enable_break): Adjust.
2441 (svr4_exec_displacement): Adjust.
2442
2443 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2444
2445 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2446 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2447
2448 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2449
2450 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2451 string_vprintf.
2452 * guile/scm-utils.c (gdbscm_printf): Likewise.
2453 * serial.c (serial_printf): Likewise.
2454 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2455
2456 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2457
2458 * stack.c (print_frame): Print frame architecture when printing on
2459 an MI output.
2460 * NEWS: Mention new "arch" attribute in frame output.
2461
2462 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2463
2464 * arch/aarch64.h (aarch64_regnum): Update comment.
2465
2466 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2467
2468 * NEWS: Add SVE to 8.2 section.
2469
2470 2018-08-21 Pedro Alves <palves@redhat.com>
2471
2472 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2473 out from gdbscm_parse_function_args.
2474 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2475 gdbscm_parse_function_args_1.
2476
2477 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 PR gdb/17816
2480 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2481 operator.
2482
2483 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2484
2485 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2486
2487 2018-08-19 Michael Spang <spang@google.com>
2488
2489 PR gdb/11786
2490 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2491 for PT_TLS segments.
2492
2493 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2494
2495 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2496 dwarf_variable_value.
2497 * dwarf2-frame.c (class dwarf_expr_executor):
2498 Add override for dwarf_variable_value.
2499 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2500 (class symbol_needs_eval_context): Likewise.
2501 (indirect_synthetic_pointer): Add forward declaration.
2502 (sect_variable_value): New function.
2503 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2504 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2505 for DW_OP_GNU_variable_value.
2506
2507 2018-08-16 Tom Tromey <tom@tromey.com>
2508
2509 * top.c (read_command_file): Update.
2510 (command_line_input): Remove "repeat" argument.
2511 * ada-lang.c (get_selections): Update.
2512 * linespec.c (decode_line_2): Update.
2513 * defs.h (command_line_input): Remove argument.
2514 * cli/cli-script.c (read_next_line): Update.
2515 * python/py-gdb-readline.c: Update.
2516
2517 2018-08-17 Tom Tromey <tom@tromey.com>
2518
2519 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2520 command_line_input.
2521
2522 2018-08-15 Tom Tromey <tom@tromey.com>
2523
2524 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2525
2526 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2527
2528 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2529 If used, use find_pc_partial_function to find address range
2530 to disassemble.
2531 * mi/mi-main.c (mi_cmd_list_features): Report
2532 "data-disassemble-a-option" feature.
2533 * NEWS: Mention new -data-disassemble option -a.
2534
2535 2018-08-13 Tom Tromey <tom@tromey.com>
2536
2537 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2538
2539 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2540
2541 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2542 (aarch64_linux_collect_sve_regset): Likewise.
2543 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2544 * regcache.h (regcache_map_entry_size): New function.
2545
2546 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2547
2548 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2549 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2550 (SVE_HEADER_VL_LENGTH): Likewise.
2551 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2552 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2553 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2554 (SVE_HEADER_SIZE_OFFSET): Likewise.
2555 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2556 (SVE_HEADER_VL_OFFSET): Likewise.
2557 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2558 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2559 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2560 (SVE_HEADER_SIZE): Likewise.
2561 (aarch64_linux_core_read_vq): Add function.
2562 (aarch64_linux_core_read_description): Check for SVE section.
2563
2564 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2565
2566 * aarch64-fbsd-tdep.c
2567 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2568 collect_size.
2569 * aarch64-linux-tdep.c
2570 (aarch64_linux_iterate_over_regset_sections): Likewise.
2571 * alpha-linux-tdep.c
2572 (alpha_linux_iterate_over_regset_sections):
2573 * alpha-nbsd-tdep.c
2574 (alphanbsd_iterate_over_regset_sections): Likewise.
2575 * amd64-fbsd-tdep.c
2576 (amd64fbsd_iterate_over_regset_sections): Likewise.
2577 * amd64-linux-tdep.c
2578 (amd64_linux_iterate_over_regset_sections): Likewise.
2579 * arm-bsd-tdep.c
2580 (armbsd_iterate_over_regset_sections): Likewise.
2581 * arm-fbsd-tdep.c
2582 (arm_fbsd_iterate_over_regset_sections): Likewise.
2583 * arm-linux-tdep.c
2584 (arm_linux_iterate_over_regset_sections): Likewise.
2585 * corelow.c (get_core_registers_cb): Likewise.
2586 (core_target::fetch_registers): Likewise.
2587 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2588 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2589 * gdbarch.h (void): Regenerate.
2590 * gdbarch.sh: Add supply_size and collect_size.
2591 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2592 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2593 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2594 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2595 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2596 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2597 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2598 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2599 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2600 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2601 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2602 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2603 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2604 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2605 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2606 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2607 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2608 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2609 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2610 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2611 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2612 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2613 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2614 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2615 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2616 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2617 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2618 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2619 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2620 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2621
2622 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2625 with string_printf.
2626
2627 2018-08-10 Keith Seitz <keiths@redhat.com>
2628
2629 * compile/compile-c-support.c (add_code_header, add_code_footer):
2630 Move into policy class.
2631 (c_push_user_expression, pop_user_expression_nop)
2632 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2633 (compile_program): New host class.
2634 (c_compile_program): New typedef.
2635 (c_compute_porgram): Use c_compile_program.
2636
2637 2018-08-10 Keith Seitz <keiths@redhat.com>
2638
2639 * compile/compile-internal.h (compile_instance::~compile_instance):
2640 Remove calls to htab_delete.
2641 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2642 * compile.c (compile_instance::compile_instance): Initialize
2643 htab unique pointers.
2644 (compile_instance::get_cached_type, compile_instance::insert_type)
2645 (compile_instance::error_symbol_once): Update for unique_ptr.
2646
2647 2018-08-10 Keith Seitz <keiths@redhat.com>
2648
2649 * compile/compile-c-symbols.c (struct symbol_error)
2650 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2651 (compile_instance::insert_symbol_error)
2652 (compile_instance::error_symbol_once): Move to ...
2653 * compile/compile.c: ... here.
2654
2655 2018-08-10 Keith Seitz <keiths@redhat.com>
2656
2657 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2658 instead of `new_compile_instance'.
2659 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2660 Update description.
2661 If the symbol error map is not initialized, create it.
2662 (generate_c_for_for_one_symbol): Do not check/initialize
2663 the symbol error map.
2664 * compile/compile-c-types.c (compile_c_instance): Make a class.
2665 Update all callers.
2666 (compile_instance::compile_instance): Initialize the type cache.
2667 (get_cached_type): New function.
2668 (insert_type): Update description.
2669 (compile_c_instance::m_default_cflags): Define.
2670 (convert_type): Update description. Use get_cached_type.
2671 (delete_instance): Moved to destructor.
2672 (new_compile_instance): Moved to constructor.
2673 * compile/compile-c.h (compile_c_instance): Make class inheriting
2674 from compile_instance.
2675 <base>: Remove field.
2676 <type_map, symbol_err_map>: Move to base class.
2677 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2678 * compile/compile-internal.h (compile_instance): Make class.
2679 <type_map_t, symbol_err_map_t>: Define.
2680 <fe>: Rename to `m_gcc_fe'.
2681 <scope, block, gcc_target_options>: Add `m_' prefix.
2682 <m_type_map, m_symbol_err_map>: New fields, moved from
2683 compile_c_instance.
2684 <destroy>: Remove.
2685 (convert_type, new_compile_instance): Remove.
2686 * compile/compile.c (cleanup_compile_instance): Remove.
2687 (compile_to_object): Use unique_ptr to eliminate cleanups.
2688 (compile_instance::set_print_callback, compile_instance::version)
2689 (compile_instance::set_verbose)
2690 (compile_instance::set_driver_filename)
2691 (compile_instance::set_triplet_regexp)
2692 (compile_instance::set_arguments)
2693 (compile_instance::set_source_file)
2694 (compile_instance::compile): Define.
2695
2696 2018-08-10 Keith Seitz <keiths@redhat.com>
2697
2698 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2699 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2700 gcc-c-fe.def to define C plugin.
2701 (delete_instance): Delete `c_plugin'.
2702 (new_compile_instance): Initialize `c_plugin'.
2703 * compile/compile-c.h: Include gcc_c_plugin.h.
2704 (struct compile_c_instance) <c_plugin>: New member.
2705 * gcc-c-plugin.h: New file.
2706 Update all callers with API change.
2707
2708 2018-08-10 Keith Seitz <keiths@redhat.com>
2709
2710 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2711 (HFILES_NO_SRCDIR): ... to here.
2712 Add compile-internal.h and compile-c.h.
2713 * compile/compile-c-support.c: Include compile-c.h.
2714 * compile/compile-c-symbols.c: Include compile-c.h.
2715 (generate_c_for_variable_locations): Update comment.
2716 * compile/compile-c-types.c: Include compile-c.h.
2717 * compile/compile-c.h: New file -- moved C language declarations
2718 from other files here.
2719 * compile/compile-internal.h: Do not include hashtab.h or
2720 common/enum-flags.h.
2721 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2722 (gcc_convert_symbol, gcc_symbol_address)
2723 (generate_c_for_variable_locations, c_get_mode_for_size)
2724 (c_get_range_decl_name): Definitions moved to compile-c.h.
2725 * compile/compile-loc2c.c: Include compile-c.h.
2726
2727 2018-08-10 Keith Seitz <keiths@redhat.com>
2728
2729 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2730 (c_symbol_substitution_name): ... this.
2731 Update all callers.
2732
2733 2018-08-10 Keith Seitz <keiths@redhat.com>
2734
2735 * compile/compile-c-support.c (c_compute_program): Use
2736 unique_xmalloc_ptr to eliminate cleanup.
2737 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2738 Return a unique_xmalloc_ptr and eliminate cleanup.
2739 * compile/compile-internal.h (generate_c_for_variable_locations):
2740 Return unique_xmalloc_ptr and update description.
2741
2742 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2743
2744 * corelow.c (core_target::get_core_register_section): Rename
2745 min_size to section_min_size.
2746
2747 2018-08-09 Jim Wilson <jimw@sifive.com>
2748
2749 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2750 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2751 * NEWS: Mention new GNU/Linux RISC-V target.
2752 * configure.host: Add riscv*-*-linux*.
2753 * configure.nat: Add riscv*.
2754 * configure.tgt: Add riscv*-*-linux*.
2755 * riscv-linux-nat.c: New file.
2756 * riscv-linux-tdep.c: New file.
2757
2758 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2759
2760 * infrun.c (resume): Make static, add forward declaration.
2761 (proceed): Update header comment.
2762 * infrun.h (resume): Delete declaration.
2763
2764 2018-08-09 Tom Tromey <tom@tromey.com>
2765
2766 * riscv-tdep.h: Minor formatting fixes.
2767
2768 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2771 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2772 (test_mkdir_recursive): Likewise.
2773 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2774
2775 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2776
2777 * valarith.c (value_subscripted_rvalue): If an array is not in
2778 memory, and we don't know the upper bound, then we can't know that
2779 the requested element exists or not.
2780
2781 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2782
2783 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2784 (target_options_to_string): Add comment.
2785
2786 2018-08-08 Tom Tromey <tom@tromey.com>
2787
2788 * unittests/scoped_mmap-selftests.c: Check result of "write".
2789
2790 2018-08-08 Jim Wilson <jimw@sifive.com>
2791
2792 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2793 (decode_register_index_short): New.
2794 (decode_j_type_insn, decode_cj_type_insn): New.
2795 (decode_b_type_insn, decode_cb_type_insn): New.
2796 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2797 local xlen. Check xlen when decoding ambiguous compressed insns. In
2798 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2799 is_c_sw_insn instead of is_sw_insn.
2800 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2801 (riscv_software_single_step): New.
2802 * riscv-tdep.h (riscv_software_single_step): Declare.
2803
2804 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2805 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2806
2807 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2808
2809 PR gdb/18050:
2810 * target.c (dispose_inferior): Don't dispose of inferiors that are
2811 already killed.
2812
2813 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2814
2815 * remote.c (remote_target::download_tracepoint): Change char* to
2816 const char*.
2817
2818 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2819
2820 * target.h (target_options_to_string): Return an std::string.
2821 * target.c (str_comma_list_concat_elem): Return void, use
2822 std::string.
2823 (do_option): Likewise.
2824 (target_options_to_string): Return an std::string.
2825 * linux-nat.c (linux_nat_target::wait): Adjust.
2826 * target-debug.h (target_debug_print_options): Adjust.
2827
2828 2018-08-07 Tom Tromey <tom@tromey.com>
2829
2830 * Makefile.in (CPPFLAGS): New variable.
2831 (INTERNAL_CPPFLAGS): Use it.
2832
2833 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2834
2835 * NEWS: Mention the index cache.
2836
2837 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2838
2839 * common/pathstuff.h (get_standard_cache_dir): New.
2840 * common/pathstuff.c (get_standard_cache_dir): New.
2841 * build-id.h (build_id_to_string): New.
2842 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2843 DEBUG_STR_SUFFIX): Move to here.
2844 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2845 DEBUG_STR_SUFFIX): Move from there.
2846 (write_psymtabs_to_index): Make non-static, add basename
2847 parameter. Write to temporary files, rename when done.
2848 (save_gdb_index_command): Adjust call to
2849 write_psymtabs_to_index.
2850 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2851 field.
2852 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2853 (get_gdb_index_contents_from_cache): New.
2854 (get_gdb_index_contents_from_cache_dwz): New.
2855 (dwarf2_initialize_objfile): Read index from cache.
2856 (dwarf2_build_psymtabs): Save to index.
2857 * dwarf-index-cache.h: New file.
2858 * dwarf-index-cache.c: New file.
2859 * dwarf-index-write.h: New file.
2860
2861 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * gnulib/aclocal.m4: Re-generate.
2864 * gnulib/config.in: Re-generate.
2865 * gnulib/configure: Re-generate.
2866 * gnulib/import/Makefile.am: Re-generate.
2867 * gnulib/import/Makefile.in: Re-generate.
2868 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2869 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2870 * gnulib/import/m4/mkdir.m4: New file.
2871 * gnulib/import/mkdir.c: New file.
2872 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2873 module.
2874
2875 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2876
2877 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2878 * common/scoped_mmap.c: New file.
2879 * common/scoped_mmap.h (destroy): New method.
2880 (~scoped_mmap, reset): Use destroy.
2881 (scoped_mmap): New move constructor.
2882 (mmap_file): New declaration.
2883 * unittests/scoped_mmap-selftests.c (test_normal,
2884 test_invalid_filename, run_tests): New functions.
2885 (_initialize_scoped_mmap_selftests): Register selftest.
2886
2887 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2888
2889 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2890 (read_gdb_index_from_buffer): ... this. Remove section
2891 parameter, add buffer parameter.
2892 (get_gdb_index_contents_ftype,
2893 get_gdb_index_contents_dwz_ftype): New typedefs.
2894 (dwarf2_read_gdb_index): Add callback parameters to get the
2895 index contents.
2896 (get_gdb_index_contents_from_section): New.
2897 (dwarf2_initialize_objfile): Update call to
2898 dwarf2_read_gdb_index.
2899
2900 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2901
2902 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2903 (gdb_open_cloexec): Likewise.
2904 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2905 (commandline_from_pid): Likewise.
2906 (linux_xfer_osdata_threads): Likewise.
2907 (linux_xfer_osdata_fds): Likewise.
2908 * ada-lang.c (is_package_name): Likewise.
2909 * auxv.c (procfs_xfer_auxv): Likewise.
2910 * breakpoint.c (print_one_breakpoint_location): Use
2911 uiout::field_fmt.
2912 (print_one_catch_solib): Use string_printf.
2913 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2914 (add_pe_forwarded_sym): Likewise.
2915 * dwarf2read.c (create_type_unit_group): Likewise.
2916 (build_error_marker_type): Likewise.
2917 * infcall.c (get_function_name): Likewise.
2918 * valprint.c (print_converted_chars_to_obstack): Likewise.
2919 * xtensa-tdep.c (xtensa_register_type): Likewise.
2920
2921 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2922
2923 * remote.c (remote_target::download_tracepoint): Fix format
2924 string errors.
2925
2926 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2927
2928 * tracefile.c: Include common/byte-vector.h.
2929 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2930 with trace_regblock_size if needed. Update uses of buf.
2931
2932 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2933
2934 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2935 std::vector<unsigned char>.
2936 * tracepoint.c (collection_list::collection_list): Remove
2937 m_regs_mask initializer from initializer list. Resize
2938 m_regs_mask using the largest remote register number.
2939 (collection_list::add_remote_register): Remove size check on
2940 m_regs_mask. Use at to access element.
2941 (collection_list::stringify): Change type of temp_buf to
2942 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2943 stringify the register mask. Use pack_hex_byte for the register
2944 mask.
2945
2946 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2947
2948 * tracepoint.h (class collection_list) <add_register>: Remove.
2949 <add_remote_register, add_ax_registers, add_local_register>:
2950 Declare.
2951 <add_memrange>: Add scope parameter.
2952 * tracepoint.c (encode_actions_1): Likewise.
2953 (collection_list::add_register): Rename to ...
2954 (collection_list::add_remote_register): ... this. Update
2955 comment.
2956 (collection_list::add_ax_registers, add_local_register): New
2957 methods.
2958 (collection_list::add_memrange): Add scope parameter. Call
2959 add_local_register instead of add_register.
2960 (finalize_tracepoint_aexpr): New function.
2961 (collection_list::collect_symbol): Update calls to add_memrange.
2962 Call add_local_register instead of add_register. Call
2963 add_ax_registers. Call finalize_tracepoint_aexpr.
2964 (encode_actions_1): Get remote regnos for $reg action. Call
2965 add_remote_register, add_ax_registers, and add_local_register.
2966 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2967 (validate_actionline): Call finalize_tracepoint_aexpr.
2968
2969 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2970
2971 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2972 Replace array buf with gdb::char_vector buf, of size
2973 get_remote_packet_size (). Replace references to buf and
2974 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2975 and xsnprintf with snprintf. Raise errors if the buffer is too
2976 small.
2977
2978 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2979
2980 * remote.c (remote_target::download_tracepoint): Fix the has_more
2981 predicate in the QTDP action list iteration.
2982
2983 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2984
2985 * remote.c (remote_target::download_tracepoint): Fix indentation
2986 in for block.
2987
2988 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2989
2990 * proc-api.c (_initialize_proc_api): Remove c, unused.
2991 * procfs.c (procfs_init_inferior): Remove signals, unused.
2992 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2993 unused.
2994
2995 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2996 Andrew Burgess <andrew.burgess@embecosm.com>
2997
2998 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2999 'W_STOPCODE (0)' as this could be ambiguous.
3000
3001 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3002
3003 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3004 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3005 "ai_socktype").
3006
3007 2018-08-02 Tom Tromey <tom@tromey.com>
3008
3009 PR symtab/16842.
3010 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3011 symbols.
3012 (process_structure_scope): Likewise.
3013
3014 2018-08-02 Xavier Roirand <roirand@adacore.com>
3015
3016 PR gdb/22629:
3017 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3018 kill inferior.
3019
3020 2018-08-02 Tom Tromey <tom@tromey.com>
3021
3022 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3023 (darwin_suspend_inferior, darwin_resume_inferior)
3024 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3025 (darwin_check_new_threads): Check result of get_darwin_inferior.
3026
3027 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3028
3029 GDB 8.1.1 released.
3030
3031 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3032
3033 * varobj.c (varobj_get_path_expr_parent): Report an error if
3034 parent is a dynamic varobj.
3035
3036 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3037
3038 * gnulib/aclocal.m4: Re-generate.
3039 * gnulib/config.in: Re-generate.
3040 * gnulib/configure: Re-generate.
3041 * gnulib/import/Makefile.in: Re-generate.
3042 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3043 * gnulib/import/m4/onceonly.m4: Re-generate.
3044
3045 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3046
3047 * target-descriptions.c (struct xml_test_tdesc): New.
3048 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3049 (record_xml_tdesc): Update.
3050 (maintenance_check_xml_descriptions): Update.
3051 * target-descriptions.h (record_xml_tdesc): Update comment.
3052
3053 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3054
3055 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3056 checking array bounds are defined.
3057
3058 2018-07-30 Tom Tromey <tom@tromey.com>
3059
3060 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3061 irreflexivity violation.
3062
3063 2018-07-30 Tom Tromey <tom@tromey.com>
3064
3065 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3066 * value.c (unpack_long): Remove lint code.
3067 * valops.c (value_ind): Remove lint code.
3068 * valarith.c (value_x_binop, value_x_unop, value_equal)
3069 (value_pos): Remove lint code.
3070
3071 2018-07-28 Tom de Vries <tdevries@suse.de>
3072
3073 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3074 with undefined upper bound as <optimized out>.
3075
3076 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3077
3078 * gcore.in: Rename variable "name" to "prefix". Expand
3079 "usage" text.
3080
3081 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3082
3083 * windows-nat.c (windows_nat_target::create_inferior): Update to
3084 call close() in global namespace.
3085
3086 2018-07-26 Tom Tromey <tom@tromey.com>
3087
3088 * dwarf-index-write.c (add_address_entry): Don't add objfile
3089 offsets.
3090 * dbxread.c (find_stab_function): Rename from
3091 find_stab_function_addr. Return a bound_minimal_symbol.
3092 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3093 Don't add objfile offsets.
3094 (end_psymtab): Use raw_text_low, raw_text_high,
3095 MSYMBOL_VALUE_RAW_ADDRESS.
3096 (read_ofile_symtab): Update.
3097 (process_one_symbol): Update.
3098 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3099 offsets.
3100 (dw2_relocate): Remove.
3101 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3102 searching addrmap.
3103 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3104 Update.
3105 (process_psymtab_comp_unit_reader, add_partial_symbol)
3106 (add_partial_subprogram, dwarf2_ranges_read): Update.
3107 (load_partial_dies): Update.
3108 (add_address_entry): Don't add objfile offsets.
3109 (dwarf2_build_include_psymtabs): Update.
3110 (create_addrmap_from_aranges): Don't add objfile offsets.
3111 (dw2_find_pc_sect_compunit_symtab): Update.
3112 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3113 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3114 Update.
3115 (parse_partial_symbols): Don't add objfile offsets. Use
3116 raw_text_low, raw_text_high. Update.
3117 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3118 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3119 or call 'relocate' quick function. Clear psymbol_map.
3120 * psympriv.h (struct partial_symbol) <address>: Add section
3121 offset.
3122 <set_unrelocated_address>: Rename from set_address.
3123 <raw_text_low, raw_text_high>: New methods.
3124 <text_low, text_high>: Add objfile parameter.
3125 (add_psymbol_to_bcache): Add 'section' parameter. Call
3126 set_unrelocated_address.
3127 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3128 (find_pc_psymbol): Update.
3129 (fixup_psymbol_section, relocate_psymtabs): Remove.
3130 (dump_psymtab, psym_functions): Update.
3131 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3132 parameter.
3133 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3134 (start_psymtab_common): Update.
3135 * symfile-debug.c (debug_qf_relocate): Remove.
3136 (debug_sym_quick_functions): Update.
3137 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3138 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3139 Update.
3140
3141 2018-07-26 Tom Tromey <tromey@redhat.com>
3142
3143 * dbxread.c (end_psymtab): Use text_high_valid and
3144 text_low_valid.
3145 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3146 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3147 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3148 Update comment.
3149 <text_low_valid, text_high_valid>: New fields.
3150 <set_text_low, set_text_high>: Update.
3151 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3152
3153 2018-07-26 Tom Tromey <tom@tromey.com>
3154
3155 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3156 Update.
3157 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3158 textlow and texthigh fields.
3159 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3160 Update.
3161 * mdebugread.c (parse_lines, parse_partial_symbols)
3162 (psymtab_to_symtab_1): Update.
3163 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3164 Rename fields. Update comment. Now private.
3165 <text_low, text_high, set_text_low, set_text_high>: New methods.
3166 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3167 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3168 (start_psymtab_common, maintenance_info_psymtabs)
3169 (maintenance_check_psymtabs): Update.
3170 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3171 texthigh fields.
3172 (scan_xcoff_symtab): Update.
3173
3174 2018-07-26 Tom Tromey <tromey@redhat.com>
3175
3176 * psympriv.h (struct partial_symbol) <unrelocated_address,
3177 address, set_address>: New methods.
3178 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3179 (fixup_psymbol_section, relocate_psymtabs): Update.
3180 (print_partial_symbols): Add 'objfile' parameter. Update.
3181 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3182 Update.
3183
3184 2018-07-26 Tom Tromey <tom@tromey.com>
3185
3186 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3187 (debug_names::write_psymbols): Update.
3188 * psympriv.h (struct partial_symbol): Derive from
3189 general_symbol_info.
3190 <obj_section>: New method.
3191 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3192 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3193 (find_pc_sect_psymbol, fixup_psymbol_section)
3194 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3195 (print_partial_symbols, recursively_search_psymtabs)
3196 (compare_psymbols, psymbol_hash, psymbol_compare)
3197 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3198 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3199
3200 2018-07-26 Tom Tromey <tromey@redhat.com>
3201
3202 * dbxread.c (end_psymtab): Remove dead code.
3203
3204 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3205
3206 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3207 DWARF unwinders are disabled.
3208 * dwarf2-frame.c: Add dwarf2read.h include.
3209 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3210 disabled.
3211 (dwarf2_frame_unwinders_enabled_p): Define.
3212 (show_dwarf_unwinders_enabled_p): New function.
3213 (_initialize_dwarf2_frame): Register switch to control DWARF
3214 unwinder use.
3215 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3216 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3217 (show_dwarf_cmdlist): Remove static keyword.
3218 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3219 (show_dwarf_cmdlist): Declare.
3220 * NEWS: Document new feature.
3221
3222 2018-07-26 Tom de Vries <tdevries@suse.de>
3223
3224 PR breakpoints/23366
3225 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3226
3227 2018-07-26 Tom de Vries <tdevries@suse.de>
3228
3229 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3230 DW_AT_count can't be translated to a dynamic prop.
3231
3232 2018-07-25 Tom de Vries <tdevries@suse.de>
3233
3234 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3235 try/catch.
3236
3237 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3238
3239 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3240
3241 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3242
3243 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3244
3245 2018-07-24 Keith Seitz <keiths@redhat.comt
3246
3247 PR symtab/23010
3248 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3249 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3250 instead of add_symbol_to_list.
3251 (read_file_scope): Call prepare_one_comp_unit before reading
3252 any other DIEs.
3253
3254 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3255
3256 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3257
3258 2018-07-24 Tom Tromey <tom@tromey.com>
3259
3260 * utils.c (malloc, realloc, free): Don't declare.
3261 * configure, config.in: Rebuild.
3262 * configure.ac: Don't check for declarations of free, malloc, or
3263 realloc.
3264
3265 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3266
3267 * aarch64-linux-nat.c
3268 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3269 variable.
3270 * arm-linux-nat.c (fetch_regs): Likewise.
3271 (store_regs): Likewise.
3272 (fetch_vfp_regs): Likewise.
3273 (store_vfp_regs): Likewise.
3274 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3275 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3276 (arm_linux_nat_target::insert_watchpoint): Likewise.
3277 (arm_linux_nat_target::remove_watchpoint): Likewise.
3278 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3279 Likewise.
3280 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3281 Likewise.
3282 * ppc-linux-nat.c (fetch_register): Likewise.
3283 (fetch_all_gp_regs): Likewise.
3284 (fetch_ppc_registers): Likewise.
3285 (store_all_gp_regs): Likewise.
3286 (store_ppc_registers): Likewise.
3287 (hwdebug_insert_point): Likewise.
3288 (can_use_watchpoint_cond_accel): Likewise.
3289 * remote-sim.c (gdb_os_write_stdout): Likewise.
3290
3291 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3292 Tom Tromey <tom@tromey.com>
3293
3294 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3295 test for it.
3296 * configure: Rebuild.
3297
3298 2018-07-22 Tom Tromey <tom@tromey.com>
3299
3300 * regformats/regdat.sh: Define xmltarget_${name} inside
3301 #ifndef IN_PROCESS_AGENT.
3302
3303 2018-07-22 Tom Tromey <tom@tromey.com>
3304
3305 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3306
3307 2018-07-22 Tom Tromey <tom@tromey.com>
3308
3309 * symfile.c (reread_symbols): Notify iter, not objfile.
3310
3311 2018-07-22 Tom Tromey <tom@tromey.com>
3312
3313 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3314 Use arch_ops.
3315 (ravenscar_thread_target::prepare_to_store): Likewise.
3316
3317 2018-07-22 Tom Tromey <tom@tromey.com>
3318
3319 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3320 unused variable. Call value_fetch_lazy when needed.
3321 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3322 Remove unused variable. Call value_fetch_lazy when needed.
3323
3324 2018-07-22 Tom Tromey <tom@tromey.com>
3325
3326 * m32c-tdep.c (mark_dma): Return void.
3327 (make_regs): Remove unused declarations.
3328
3329 2018-07-22 Tom Tromey <tom@tromey.com>
3330
3331 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3332 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3333 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3334 bkscm_get_valid_block_smob_arg_unsafe for effect.
3335
3336 2018-07-22 Tom Tromey <tom@tromey.com>
3337
3338 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3339 value_type.
3340
3341 2018-07-22 Tom Tromey <tom@tromey.com>
3342
3343 * windows-nat.c (saved_context): Conditionally define.
3344 * remote.c (remote_target::remote_btrace_maybe_reopen):
3345 Conditionally declare "warned".
3346 * inflow.c (sigquit_ours): Conditionally define.
3347 (new_tty): Move "tty" declaration inside #if.
3348 * guile/guile.c (guile_datadir): Conditionally define.
3349 * charset.c (set_be_le_names): Move some declarations inside #if.
3350 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3351 #if.
3352 (parse_xml_btrace_conf): Likewise.
3353
3354 2018-07-22 Tom Tromey <tom@tromey.com>
3355
3356 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3357
3358 2018-07-22 Tom Tromey <tom@tromey.com>
3359
3360 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3361 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3362 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3363 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3364 * stack.c (frame_apply_level_command): Remove unused variable.
3365 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3366 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3367 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3368 unused variable.
3369 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3370 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3371 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3372 variable.
3373 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3374 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3375 variable.
3376 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3377 Remove unused variable.
3378 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3379 variable.
3380 * common/tdesc.c (print_xml_feature::visit): Remove unused
3381 variable.
3382 * compile/compile-object-load.c (store_regs): Remove unused
3383 variables.
3384 * complaints.c (clear_complaints): Remove unused variable.
3385 * corelow.c (core_target_open): Remove unused variable.
3386 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3387 variable.
3388 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3389 variable.
3390 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3391 variable.
3392 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3393 variable.
3394 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3395 variable.
3396 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3397 variable.
3398 * ia64-tdep.c (examine_prologue): Remove unused variable.
3399 * infcall.c (run_inferior_call): Remove unused variable.
3400 * inferior.c (exit_inferior): Remove unused variable.
3401 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3402 * linespec.c (decode_line_2): Remove unused variable.
3403 * linux-nat.c (super_close): Remove.
3404 * linux-tdep.c (linux_info_proc): Remove unused variable.
3405 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3406 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3407 Remove unused variable.
3408 * parse.c (find_minsym_type_and_address): Remove unused variable.
3409 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3410 variable.
3411 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3412 variable.
3413 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3414 variables.
3415 * record-btrace.c (record_btrace_target::store_registers): Remove
3416 unused variable.
3417 (cmd_show_record_btrace_cpu): Remove unused variable.
3418 * riscv-tdep.c (riscv_register_reggroup_p)
3419 (riscv_push_dummy_call, riscv_return_value): Remove unused
3420 variable.
3421 * rust-exp.y (literal): Remove unused variable.
3422 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3423 unused variable.
3424 <STRUCTOP_ANONYMOUS>: Likewise.
3425 * s390-linux-tdep.c (s390_linux_init_abi_31)
3426 (s390_linux_init_abi_64): Remove unused variable.
3427 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3428 (file_select_thread, net_windows_open, _initialize_ser_windows):
3429 Remove unused variables.
3430 * symtab.c (find_pc_sect_line): Remove unused variable.
3431 * target-memory.c (compute_garbled_blocks): Remove unused
3432 variable.
3433 (target_write_memory_blocks): Remove unused variable.
3434 * target.c (target_stack::unpush): Remove unused variables.
3435 * tracepoint.c (start_tracing, all_tracepoint_actions)
3436 (merge_uploaded_trace_state_variables)
3437 (print_one_static_tracepoint_marker): Remove unused variable.
3438 * unittests/basic_string_view/element_access/char/1.cc (test01):
3439 Remove unused variable.
3440 * windows-nat.c (windows_continue, windows_add_all_dlls)
3441 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3442 Remove unused variables.
3443
3444 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3445
3446 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3447 attr_profile in HAVE_ELF.
3448 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3449 HAVE_ELF.
3450
3451 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3452
3453 * frame.c (frame_register_unwind): Change parameter name.
3454 (frame_unwind_register): Likewise.
3455 (frame_unwind_register_value): Likewise.
3456 (frame_unwind_register_signed): Likewise.
3457 (frame_unwind_register_unsigned): Likewise.
3458 * frame.h (frame_register_unwind): Likewise.
3459 (frame_unwind_register): Likewise.
3460 (frame_unwind_register_value): Likewise.
3461 (frame_unwind_register_signed): Likewise.
3462 (frame_unwind_register_unsigned): Likewise.
3463 (frame_unwind_arch): Likewise.
3464
3465 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3466
3467 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3468 ISA maintenance.
3469
3470 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3471
3472 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3473 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3474 hand.
3475
3476 2018-07-20 Keith Seitz <keiths@redhat.com>
3477
3478 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3479 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3480 m_compunit_symtab, m_language>: Add "m_" prefix.
3481 Update all uses.
3482 * buildsym.c: Update all uses.
3483
3484 2018-07-20 Tom Tromey <tom@tromey.com>
3485
3486 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3487 * buildsym.h (record_line_ftype): Remove typedef.
3488
3489 2018-07-20 Tom Tromey <tom@tromey.com>
3490
3491 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3492 (end_expandable_symtab): Likewise.
3493 (end_symtab_get_static_block): Likewise.
3494 (end_symtab_from_static_block): Likewise.
3495 * buildsym-legacy.c (augment_type_symtab): Remove.
3496 (end_expandable_symtab): Remove.
3497 (end_symtab_get_static_block): Remove.
3498 (end_symtab_from_static_block): Remove.
3499
3500 2018-07-20 Tom Tromey <tom@tromey.com>
3501
3502 * dwarf2read.c: Include buildsym.h.
3503 (struct dwarf2_cu) <builder>: New method.
3504 (fixup_go_packaging): Update.
3505 (process_full_comp_unit, process_full_type_unit): Update. Don't
3506 use scoped_free_pendings.
3507 (using_directives): Add "cu" parameter, remove "language".
3508 (read_import_statement, setup_type_unit_groups, )
3509 (read_func_scope, read_lexical_block_scope)
3510 (dwarf2_record_block_ranges, read_namespace): Update.
3511 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3512 (lnp_state_machine::handle_end_sequence): Update.
3513 (class lnp_state_machine) <m_cu>: New member.
3514 <m_record_line_callback>: Remove.
3515 <m_currently_recording_lines>: New member.
3516 (lnp_state_machine::handle_set_file): Update.
3517 (noop_record_line): Remove.
3518 (dwarf_record_line_p): Add cu parameter.
3519 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3520 (lnp_state_machine::record_line)
3521 (lnp_state_machine::lnp_state_machine)
3522 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3523 (dwarf_decode_lines): Update.
3524 (dwarf2_start_subfile): Add cu parameter.
3525 (dwarf2_start_symtab, new_symbol): Update.
3526 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3527 Remove dwarf2_per_objfile parameter.
3528 (dwarf_decode_macros): Update.
3529
3530 2018-07-20 Tom Tromey <tom@tromey.com>
3531
3532 * stabsread.c (define_symbol): Update.
3533 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3534 * dwarf2read.c (new_symbol): Update.
3535 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3536 * cp-namespace.c: Include buildsym.h.
3537 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3538 * buildsym-legacy.c (get_buildsym_compunit): New function.
3539
3540 2018-07-20 Tom Tromey <tom@tromey.com>
3541
3542 * xcoffread.c: Include buildsym-legacy.h.
3543 * windows-nat.c: Include buildsym-legacy.h.
3544 * stabsread.c: Include buildsym-legacy.h.
3545 * mdebugread.c: Include buildsym-legacy.h.
3546 * buildsym-legacy.h: New file.
3547 * buildsym-legacy.c: New file, from buildsym.c.
3548 * go32-nat.c: Include buildsym-legacy.h.
3549 * dwarf2read.c: Include buildsym-legacy.h.
3550 * dbxread.c: Include buildsym-legacy.h.
3551 * cp-namespace.c: Include buildsym-legacy.h.
3552 * coffread.c: Include buildsym-legacy.h.
3553 * buildsym.h: Move some contents to buildsym-legacy.h.
3554 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3555 buildsym-legacy.c.
3556 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3557
3558 2018-07-20 Tom Tromey <tom@tromey.com>
3559
3560 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3561 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3562 (buildsym_compunit::buildsym_compunit)
3563 (buildsym_compunit::~buildsym_compunit)
3564 (buildsym_compunit::get_macro_table): Define.
3565
3566 2018-07-20 Tom Tromey <tom@tromey.com>
3567
3568 * buildsym.c (reset_symtab_globals): Remove.
3569 (buildsym_compunit::end_symtab_from_static_block): Update.
3570 (buildsym_compunit::augment_type_symtab): Update.
3571 (end_symtab_from_static_block): Call free_buildsym_compunit.
3572 (augment_type_symtab, end_symtab, end_expandable_symtab):
3573 Likewise.
3574
3575 2018-07-20 Tom Tromey <tom@tromey.com>
3576
3577 * arch-utils.c: Do not include buildsym.h.
3578 * mipsread.c: Do not include buildsym.h.
3579 * machoread.c: Do not include buildsym.h.
3580 * elfread.c: Do not include buildsym.h.
3581
3582 2018-07-20 Tom Tromey <tom@tromey.com>
3583
3584 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3585 initialization.
3586 (buildsym_compunit): Add new constructor.
3587 (struct buildsym_compunit) <get_last_source_file, finish_block,
3588 record_block_range, start_subfile, patch_subfile_names,
3589 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3590 set_last_source_start_addr, get_last_source_start_addr,
3591 get_local_using_directives, set_local_using_directives,
3592 get_global_using_directives, outermost_context_p,
3593 get_current_context_stack, get_context_stack_depth,
3594 get_current_subfile, get_local_symbols, get_file_symbols,
3595 get_global_symbols, record_debugformat, record_producer,
3596 push_context, pop_context, end_symtab_get_static_block,
3597 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3598 New public methods.
3599 <record_pending_block, finish_block_internal, make_blockvector,
3600 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3601 private methods.
3602 Update all users.
3603
3604 2018-05-22 Tom Tromey <tom@tromey.com>
3605
3606 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3607 parameter.
3608 (finish_block_internal): Update.
3609
3610 2018-07-20 Tom Tromey <tom@tromey.com>
3611
3612 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3613 parameter.
3614 (finish_block_internal): Update.
3615
3616 2018-07-20 Tom Tromey <tom@tromey.com>
3617
3618 * buildsym.h (EXTERN): Don't define or undef.
3619 * buildsym.c (EXTERN): Don't define.
3620
3621 2018-07-20 Tom Tromey <tom@tromey.com>
3622
3623 * buildsym.c: Remove TODO comment.
3624
3625 2018-07-20 Tom Tromey <tom@tromey.com>
3626
3627 * coffread.c (coff_symtab_read): Update.
3628 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3629 (xcoff_new_init): Update.
3630 * mipsread.c (mipscoff_new_init): Update.
3631 * mdebugread.c (mdebug_build_psymtabs): Update.
3632 * elfread.c (elf_new_init): Update.
3633 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3634 Update.
3635 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3636 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3637 (stabsect_build_psymtabs): Update.
3638 * buildsym.h (buildsym_init): Don't declare.
3639 * buildsym.c: Update comment.
3640 (prepare_for_building): Remove.
3641 (start_symtab, restart_symtab): Update.
3642 (reset_symtab_globals): Update comment.
3643 (buildsym_init): Remove.
3644
3645 2018-07-20 Tom Tromey <tom@tromey.com>
3646
3647 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3648 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3649 (read_enum_type, common_block_start, common_block_end)
3650 (cleanup_undefined_types_1, finish_global_stabs): Update.
3651 * mdebugread.c (psymtab_to_symtab_1): Update.
3652 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3653 (read_lexical_block_scope, new_symbol): Update.
3654 * dbxread.c (process_one_symbol): Update.
3655 * coffread.c (coff_symtab_read, process_coff_symbol)
3656 (coff_read_enum_type): Update.
3657 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3658 declare.
3659 (get_local_symbols, get_file_symbols, get_global_symbols): New
3660 functions.
3661 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3662 m_global_symbols.
3663 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3664 (~scoped_free_pendings): Update.
3665 (finish_block, prepare_for_building, reset_symtab_globals)
3666 (end_symtab_get_static_block, end_symtab_with_blockvector)
3667 (augment_type_symtab, push_context): Update.
3668 (get_local_symbols, get_file_symbols, get_global_symbols): New
3669 functions.
3670 (buildsym_init): Update.
3671
3672 2018-07-20 Tom Tromey <tom@tromey.com>
3673
3674 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3675 (process_full_type_unit): Likewise.
3676 (dwarf2_start_symtab): Set list_in_scope.
3677
3678 2018-07-20 Tom Tromey <tom@tromey.com>
3679
3680 * dwarf2read.c (process_psymtab_comp_unit_reader)
3681 (build_type_psymtabs_reader): Do not set list_in_scope.
3682
3683 2018-07-20 Tom Tromey <tom@tromey.com>
3684
3685 * buildsym.c (free_pendings): Remove.
3686 (add_symbol_to_list, scoped_free_pendings)
3687 (finish_block_internal, buildsym_init): Update.
3688
3689 2018-07-20 Tom Tromey <tom@tromey.com>
3690
3691 * xcoffread.c (read_xcoff_symtab): Update.
3692 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3693 Update.
3694 * dbxread.c (process_one_symbol): Update.
3695 * coffread.c (coff_symtab_read): Update.
3696 * buildsym.h (finish_block): Update.
3697 * buildsym.c (finish_block): Remove "listhead" argument.
3698 (end_symtab_get_static_block): Update.
3699
3700 2018-07-20 Tom Tromey <tom@tromey.com>
3701
3702 * buildsym.h (class scoped_free_pendings): Remove constructor.
3703 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3704 method.
3705 <m_pending_block_obstack, m_pending_blocks>: New members.
3706 (pending_block_obstack, pending_blocks): Remove.
3707 (scoped_free_pendings::scoped_free_pendings): Default.
3708 (~scoped_free_pendings): Update.
3709 (free_pending_blocks): Remove.
3710 (finish_block_internal, record_pending_block, make_blockvector)
3711 (end_symtab_get_static_block, augment_type_symtab, push_context)
3712 (buildsym_init): Update.
3713
3714 2018-07-20 Tom Tromey <tom@tromey.com>
3715
3716 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3717 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3718 members.
3719 (pending_addrmap, pending_addrmap_obstack)
3720 (pending_addrmap_interesting): Remove.
3721 (scoped_free_pendings, record_block_range, make_blockvector)
3722 (prepare_for_building, reset_symtab_globals, buildsym_init):
3723 Update.
3724
3725 2018-07-20 Tom Tromey <tom@tromey.com>
3726
3727 * xcoffread.c (process_linenos): Update.
3728 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3729 * mdebugread.c (psymtab_to_symtab_1): Update.
3730 * dwarf2read.c (setup_type_unit_groups)
3731 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3732 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3733 * dbxread.c (process_one_symbol): Update.
3734 * coffread.c (coff_symtab_read, enter_linenos)
3735 (process_coff_symbol): Update.
3736 * buildsym.h (current_subfile): Don't declare.
3737 (get_current_subfile): Declare.
3738 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3739 member.
3740 (start_subfile, free_buildsym_compunit, push_subfile)
3741 (prepare_for_building, start_symtab): Update.
3742 (get_current_subfile): New function.
3743
3744 2018-07-20 Tom Tromey <tom@tromey.com>
3745
3746 * coffread.c (coff_symtab_read): Update.
3747 * xcoffread.c (read_xcoff_symtab): Update.
3748 * dwarf2read.c (new_symbol): Update.
3749 (read_func_scope, read_lexical_block_scope): Update.
3750 * dbxread.c (process_one_symbol): Update.
3751 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3752 (outermost_context_p): Remove macro.
3753 (outermost_context_p, get_current_context_stack)
3754 (get_context_stack_depth): Declare.
3755 (pop_context): Return struct context_stack.
3756 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3757 member.
3758 (context_stack_size): Remove.
3759 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3760 (prepare_for_building, end_symtab_get_static_block)
3761 (augment_type_symtab, push_context): Update.
3762 (pop_context): Return struct context_stack.
3763 (outermost_context_p, get_current_context_stack)
3764 (get_context_stack_depth): New functions.
3765 (buildsym_init): Update.
3766
3767 2018-07-20 Tom Tromey <tom@tromey.com>
3768
3769 * rust-exp.y: Now a pure parser. Update all rules.
3770 (%union): Move earlier.
3771 (current_parser, work_obstack): Remove globals.
3772 (rust_parser, ~rust_parser): Update.
3773 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3774 lex_character, lex_number, lex_string, lex_identifier,
3775 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3776 convert_name, convert_params_to_expression,
3777 convert_ast_to_expression, ast_basic_type, ast_operation,
3778 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3779 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3780 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3781 ast_array_type, ast_slice_type, ast_reference_type,
3782 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3783 (rust_parse): Update.
3784 (rustyyerror, rustyylex): Add parser parameter.
3785 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3786 (rust_lex_stringish_test, rust_lex_test_sequence)
3787 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3788 (rust_lex_test_push_back, rust_lex_tests): Update.
3789
3790 2018-07-19 Pedro Alves <palves@redhat.com>
3791
3792 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3793 gdb::unique_xmalloc_ptr.
3794 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3795 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3796 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3797 copy-initialization.
3798 * guile/scm-pretty-print.c (ppscm_print_children): Use
3799 gdb::unique_xmalloc_ptr instead of cleanups.
3800 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3801 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3802 gdb::unique_xmalloc_ptr.
3803 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3804 Adjust to use gdb::unique_xmalloc_ptr.
3805 * guile/scm-utils.c (extract_arg): Adjust.
3806 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3807 gdb::unique_xmalloc_ptr instead of a cleanup.
3808
3809 2018-07-19 Tom Tromey <tom@tromey.com>
3810
3811 * utils.c (do_value_free_to_mark)
3812 (make_cleanup_value_free_to_mark): Remove.
3813 * utils.h (make_cleanup_value_free_to_mark): Remove.
3814
3815 2018-07-19 Pedro Alves <palves@redhat.com>
3816
3817 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3818 forwarding reference.
3819
3820 2018-07-18 Pedro Alves <palves@redhat.com>
3821
3822 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3823 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3824 cleanup.
3825
3826 2018-07-18 Pedro Alves <palves@redhat.com>
3827
3828 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3829 exceptions.
3830 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3831 (gdbscm_wrap): New.
3832 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3833 directly instead of a cleanup.
3834 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3835 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3836 (vlscm_binop_gdbthrow): New, factored out from ...
3837 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3838 (vlscm_rich_compare): Use gdbscm_wrap.
3839 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3840 instead of a cleanup.
3841 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3842 cleanup.
3843 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3844 Use xfree directly instead of a cleanup.
3845 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3846 Adjust to use gdbscm_wrap and scoped_value_mark.
3847 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3848 (gdbscm_value_address, gdbscm_value_dereference)
3849 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3850 scoped_value_mark.
3851 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3852 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3853 scoped_value_mark.
3854 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3855 gdbscm_wrap and scoped_value_mark.
3856 (gdbscm_value_to_string): Use xfree directly instead of a
3857 cleanup. Move 'buffer' unique_ptr to TRY scope.
3858 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3859 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3860 scoped_value_mark.
3861 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3862 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3863 scoped_value_mark.
3864 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3865 gdbscm_wrap.
3866
3867 2018-07-18 Tom de Vries <tdevries@suse.de>
3868
3869 * findvar.c (default_read_var_value): Also resolve dynamic type for
3870 LOC_OPTIMIZED_OUT vars.
3871
3872 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3873
3874 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3875 decoding.
3876
3877 2018-07-17 Tom Tromey <tom@tromey.com>
3878
3879 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3880 (compute_enum_list, pascm_set_param_value_x)
3881 (gdbscm_parameter_value): Update.
3882 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3883 (gdbscm_scm_to_host_string): Update.
3884 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3885 Update.
3886 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3887 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3888 * guile/scm-string.c (gdbscm_scm_to_string): Return
3889 unique_xmalloc_ptr.
3890 (gdbscm_scm_to_host_string): Likewise.
3891
3892 2018-07-17 Tom Tromey <tom@tromey.com>
3893
3894 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3895 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3896 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3897 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3898 unique_xmalloc_ptr.
3899
3900 2018-07-17 Tom Tromey <tom@tromey.com>
3901
3902 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3903 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3904 Update.
3905 * guile/scm-cmd.c (cmdscm_function): Update.
3906 * guile/scm-pretty-print.c
3907 (ppscm_print_exception_unless_memory_error): Update.
3908 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3909 Return unique_xmalloc_ptr.
3910
3911 2018-07-17 Tom Tromey <tom@tromey.com>
3912
3913 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3914 Use string_printf.
3915
3916 2018-07-17 Jim Wilson <jimw@sifive.com>
3917
3918 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3919 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3920 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3921 unecessary braces after EF_RISCV_RVC test. Delete call to
3922 set_gdbarch_decr_pc_after_break.
3923
3924 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3925 RISCV_LAST_FP_REGNUM + 1.
3926 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3927
3928 2018-07-17 Tom Tromey <tom@tromey.com>
3929
3930 * configure.ac: Remove --disable-gdbcli.
3931 * configure: Rebuild.
3932 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3933 (SUBDIR_CLI_CFLAGS): Remove.
3934 (SFILES): Use SUBDIR_CLI_SRCS.
3935 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3936
3937 2018-07-17 Tom Tromey <tom@tromey.com>
3938
3939 PR gdb/18624:
3940 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3941
3942 2018-07-16 Jim Wilson <jimw@sifive.com>
3943
3944 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3945
3946 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3947
3948 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3949 variable.
3950 (libunwind_frame_sniffer): Likewise.
3951 (libunwind_frame_prev_register): Likewise.
3952 (libunwind_sigtramp_frame_sniffer): Likewise.
3953 * ia64-tdep.c (ia64_access_reg): Likewise.
3954 (ia64_access_rse_reg): Likewise.
3955 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3956 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3957
3958 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3961
3962 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * remote-sim.c (gdbsim_target::close,
3965 gdbsim_target::mourn_inferior): Remove unused variables.
3966
3967 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3968
3969 * ia64-tdep.c (ktab_buf): New global.
3970 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3971 (get_kernel_table): Adjust.
3972
3973 2018-07-16 Tom Tromey <tom@tromey.com>
3974
3975 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3976 * dwarf2read.c (using_directives, new_symbol): Use
3977 outermost_context_p.
3978 * dbxread.c (process_one_symbol): Use outermost_context_p.
3979 * coffread.c (coff_symtab_read): Use outermost_context_p.
3980
3981 2018-07-16 Tom Tromey <tom@tromey.com>
3982
3983 * dwarf2read.c (using_directives, read_func_scope)
3984 (read_lexical_block_scope): Update.
3985 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3986 * buildsym.h (local_using_directives, global_using_directives):
3987 Don't declare.
3988 (get_local_using_directives, set_local_using_directives)
3989 (get_global_using_directives): Declare.
3990 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3991 m_global_using_directives>: New members.
3992 (finish_block_internal, prepare_for_building)
3993 (reset_symtab_globals, end_symtab_get_static_block)
3994 (push_context): Update.
3995 (get_local_using_directives, set_local_using_directives)
3996 (get_global_using_directives): New functions.
3997 (buildsym_init): Update.
3998
3999 2018-07-16 Tom Tromey <tom@tromey.com>
4000
4001 * xcoffread.c (xcoff_initial_scan): Don't call
4002 free_pending_blocks.
4003 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4004 * buildsym.h (class scoped_free_pendings): Add constructor.
4005 (free_pending_blocks): Don't declare.
4006 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4007 (free_pending_blocks): Now static.
4008
4009 2018-07-16 Tom Tromey <tom@tromey.com>
4010
4011 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4012 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4013 member.
4014 (struct subfile_stack): Remove.
4015 (subfile_stack): Remove.
4016 (push_subfile, pop_subfile, buildsym_init): Update.
4017
4018 2018-07-16 Tom Tromey <tom@tromey.com>
4019
4020 * buildsym.c (push_subfile): Use gdb_assert.
4021 (pop_subfile): Use gdb_assert.
4022
4023 2018-07-16 Tom Tromey <tom@tromey.com>
4024
4025 * buildsym.h (merge_symbol_lists): Remove.
4026 * buildsym.c (merge_symbol_lists): Remove.
4027
4028 2018-07-16 Tom Tromey <tom@tromey.com>
4029
4030 * stabsread.c (scan_file_globals): Update comment.
4031 * stabsread.h (scan_file_globals): Move from buildsym.h.
4032 * buildsym.h (scan_file_globals): Move to stabsread.h.
4033
4034 2018-07-16 Tom Tromey <tom@tromey.com>
4035
4036 * xcoffread.c (xcoff_new_init): Update.
4037 * mipsread.c (mipscoff_new_init): Update.
4038 * mdebugread.c (mdebug_build_psymtabs): Update.
4039 * elfread.c (elf_new_init): Update.
4040 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4041 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4042 * buildsym.h (buildsym_new_init): Don't declare.
4043 * buildsym.c (buildsym_new_init): Remove.
4044
4045 2018-07-16 Tom Tromey <tom@tromey.com>
4046
4047 * stabsread.h (within_function): Move from buildsym.h.
4048 * stabsread.c (start_stabs): Clear within_function.
4049 * coffread.c (coff_start_symtab): Clear within_function.
4050 * buildsym.h (within_function): Move to stabsread.h.
4051 * buildsym.c (prepare_for_building): Update.
4052
4053 2018-07-16 Tom Tromey <tom@tromey.com>
4054
4055 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4056 * dwarf2read.c (dwarf2_start_symtab): Don't set
4057 processing_gcc_compilation.
4058 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4059
4060 2018-07-16 Tom Tromey <tom@tromey.com>
4061
4062 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4063 (next_symbol_text_func): Move from buildsym.h.
4064 * stabsread.c (hashname): Move from buildsym.c.
4065 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4066 (next_symbol_text_func, hashname): Move to stabsread.h.
4067 * buildsym.c: Don't include bcache.h
4068 (hashname): Move to stasbread.c.
4069
4070 2018-07-16 Tom Tromey <tom@tromey.com>
4071
4072 * buildsym.h (context_stack_size): Don't declare.
4073 * buildsym.c (context_stack_size): New global.
4074
4075 2018-07-16 Tom Tromey <tom@tromey.com>
4076
4077 * dbxread.c (processing_acc_compilation): New global.
4078 * buildsym.h (processing_acc_compilation): Don't declare.
4079
4080 2018-07-16 Tom Tromey <tom@tromey.com>
4081
4082 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4083 * dbxread.c (read_ofile_symtab): Update.
4084 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4085 * buildsym.h (last_source_start_addr): Remove.
4086 (set_last_source_start_addr, get_last_source_start_addr):
4087 Declare.
4088 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4089 parameter.
4090 (struct buildsym_compunit) <m_last_source_start_addr>: New
4091 member.
4092 (prepare_for_building): Remove start_addr parameter.
4093 (start_symtab, restart_symtab, end_symtab_get_static_block)
4094 (end_symtab_with_blockvector): Update.
4095 (set_last_source_start_addr, get_last_source_start_addr): New
4096 functions.
4097
4098 2018-07-16 Tom Tromey <tom@tromey.com>
4099
4100 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4101 member.
4102 (have_line_numbers): Remove.
4103 (record_line, prepare_for_building, end_symtab_get_static_block)
4104 (augment_type_symtab): Update.
4105
4106 2018-07-16 Tom Tromey <tom@tromey.com>
4107
4108 * buildsym.c (~buildsym_compunit): Free the macro table.
4109 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4110 methods.
4111 <m_pending_macros>: New member.
4112 (pending_macros): Remove.
4113 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4114 (reset_symtab_globals, end_symtab_get_static_block)
4115 (end_symtab_with_blockvector, augment_type_symtab)
4116 (buildsym_init): Update.
4117
4118 2018-07-16 Tom Tromey <tom@tromey.com>
4119
4120 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4121 parameter.
4122 (buildsym_compunit::set_last_source_file): New method.
4123 <m_last_source_file>: New member.
4124 (prepare_for_building): Remove "name" parameter.
4125 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4126 (last_source_file): Remove.
4127 (set_last_source_file, get_last_source_file): Update.
4128
4129 2018-07-16 Tom Tromey <tom@tromey.com>
4130
4131 * buildsym.c (prepare_for_building): Add assert.
4132
4133 2018-07-16 Tom Tromey <tom@tromey.com>
4134
4135 * buildsym.c (~buildsym_compunit): Update.
4136 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4137 (start_subfile, patch_subfile_names)
4138 (end_symtab_with_blockvector): Update.
4139
4140 2018-07-16 Tom Tromey <tom@tromey.com>
4141
4142 * buildsym.c (struct buildsym_compunit): Add constructor,
4143 destructor, initializers.
4144 (start_buildsym_compunit): Remove.
4145 (free_buildsym_compunit): Use "delete".
4146 (start_symtab, restart_symtab): Use "new".
4147
4148 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4149
4150 * symfile.c (set_objfile_default_section_offset): Remove struct
4151 keyword.
4152
4153 2018-07-14 Stafford Horne <shorne@gmail.com>
4154
4155 * (Responsible Maintainers): Add myself as or1k maintainer.
4156
4157 2018-07-13 Tom Tromey <tom@tromey.com>
4158
4159 * symfile.c (set_objfile_default_section_offset): Use extra braces
4160 around initializer.
4161
4162 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4163
4164 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4165 non-branching basr.
4166
4167 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4168
4169 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4170 unittests/cli-utils-selftests.c
4171 * unittests/cli-utils-selftests.c: New file.
4172
4173 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4174
4175 * NEWS: Mention new commands. Mention change to 'thread apply'.
4176
4177 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4178
4179 * thread.c (thr_try_catch_cmd): New function.
4180 (thread_apply_all_command): Handle qcs flags.
4181 (thread_apply_command): Handle qcs flags.
4182 (taas_command): New function.
4183 (tfaas_command): New function.
4184 (_initialize_thread): Update to setup the new commands 'taas
4185 and 'tfaas'. Change doc string for 'thread apply'.
4186
4187 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4188
4189 * stack.c: (trailing_outermost_frame): New function, mostly
4190 extracted from backtrace_command_1.
4191 (leading_innermost_frame): New function.
4192 (backtrace_command_1): Update to call trailing_outermost_frame.
4193 (frame_apply_command_count): New function.
4194 (frame_apply_level_command): New function.
4195 (frame_apply_all_command): New function.
4196 (frame_apply_command): New function.
4197 (faas_command): New function.
4198 (frame_cmd_list): New variable.
4199 (_initialize_stack): Update to setup the new commands 'frame apply'
4200 and 'faas'.
4201
4202 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4203
4204 * cli-utils.c (number_or_range_parser::get_number): Only handle
4205 numbers or convenience var as numbers.
4206 (parse_flags): New function.
4207 (parse_flags_qcs): New function.
4208 (number_or_range_parser::finished): Ensure parsing end is detected
4209 before end of string.
4210 * cli-utils.h (parse_flags): New function.
4211 (parse_flags_qcs): New function.
4212 (number_or_range_parser): Remove m_finished bool.
4213 (number_or_range_parser::skip_range): Set m_in_range to false.
4214
4215 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4216
4217 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4218 on Windows.
4219
4220 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4221 Jan Kratochvil <jan.kratochvil@redhat.com>
4222 Paul Fertser <fercerpav@gmail.com>
4223 Tsutomu Seki <sekiriki@gmail.com>
4224 Pedro Alves <palves@redhat.com>
4225
4226 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4227 'unittests/parse-connection-spec-selftests.c'.
4228 (COMMON_SFILES): Add 'common/netstuff.c'.
4229 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4230 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4231 * common/netstuff.c: New file.
4232 * common/netstuff.h: New file.
4233 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4234 (wait_for_connect): Update comment. New parameter
4235 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4236 Use 'sock' directly instead of 'scb->fd'.
4237 (try_connect): New function, with code from 'net_open'.
4238 (net_open): Rewrite main loop to deal with multiple
4239 sockets/addresses. Handle IPv6-style hostnames; implement
4240 support for IPv6 connections.
4241 * unittests/parse-connection-spec-selftests.c: New file.
4242
4243 2018-07-11 Pedro Alves <palves@redhat.com>
4244
4245 PR gdb/23377
4246 * remote.c (remote_target::remote_detach_pid): Call
4247 set_current_process.
4248
4249 2018-07-11 Pedro Alves <palves@redhat.com>
4250
4251 * h8300-tdep.c (h8300_gdbarch_init): Remove
4252 set_gdbarch_ecoff_reg_to_regnum calls.
4253
4254 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4255
4256 PR c++/23373
4257 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4258 offsets/sizes for static members of a class/struct.
4259
4260 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4261
4262 * target-descriptions.c (tdesc_register_bitsize): Rename.
4263 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4264 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4265 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4266
4267 2018-07-10 Tom Tromey <tom@tromey.com>
4268
4269 * breakpoint.c (moribund_locations): Now static and a
4270 std::vector.
4271 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4272 (build_bpstat_chain, update_global_location_list)
4273 (breakpoint_retire_moribund): Update.
4274 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4275 VEC.
4276
4277 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4278
4279 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4280 (riscv_register_reggroup_p): Use new function, remove unneeded
4281 parenthesis.
4282 (riscv_push_dummy_call): Extend assert to compare against xlen or
4283 flen based on register type.
4284
4285 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4286
4287 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4288
4289 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4290
4291 * remote.c (show_hardware_watchpoint_limit): New function.
4292 (show_hardware_watchpoint_length_limit): New function.
4293 (show_hardware_breakpoint_limit): New function.
4294 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4295 where appropriate, update help text.
4296
4297 2018-07-09 Tom Tromey <tom@tromey.com>
4298
4299 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4300 (CLIBS): Don't mention NAT_CLIBS.
4301
4302 2018-07-09 Tom Tromey <tom@tromey.com>
4303
4304 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4305 (LIBGDB_OBS, clean mostlyclean): Update.
4306 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4307
4308 2018-07-09 Tom Tromey <tom@tromey.com>
4309
4310 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4311 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4312 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4313
4314 2018-07-09 Tom Tromey <tom@tromey.com>
4315
4316 * Makefile.in (ALLDEPFILES): Remove exec.c.
4317 (COMMON_OBS): Remove exec.o.
4318 (COMMON_SFILES): Add exec.c.
4319
4320 2018-07-09 Tom Tromey <tom@tromey.com>
4321
4322 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4323
4324 2018-07-09 Tom Tromey <tom@tromey.com>
4325
4326 * Makefile.in (clean mostlyclean): Remove stamp-version.
4327 (version.c): Depend on stamp-version.
4328 (stamp-version): New rule, from version.c rule.
4329
4330 2018-07-09 Tom Tromey <tom@tromey.com>
4331
4332 * Makefile.in (init.c): Depend on stamp-init.
4333 (stamp-init): New rule, from init.c rule.
4334 (clean mostlyclean): Remove stamp-init.
4335
4336 2018-07-09 Tom Tromey <tom@tromey.com>
4337
4338 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4339 SUBDIR_GCC_COMPILE_SRCS.
4340
4341 2018-07-09 Tom Tromey <tom@tromey.com>
4342
4343 * Makefile.in (init.c): Remove some unused sed rules.
4344
4345 2018-07-09 Tom Tromey <tom@tromey.com>
4346
4347 * Makefile.in (TSOBS): Remove.
4348 (INIT_FILES): Update.
4349 (LIBGDB_OBS): Update.
4350 (COMMON_SFILES): Add inflow.c.
4351 (SFILES): Remove inflow.c.
4352
4353 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4354
4355 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4356
4357 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4358
4359 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4360 get_saveloc_name, is_signal_frame_name, step_name,
4361 init_remote_name, create_addr_space_name,
4362 destroy_addr_space_name, search_unwind_table_name,
4363 find_dyn_list_name): Constify.
4364
4365 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4366
4367 * darwin-nat.c (darwin_pthread_kill): New function.
4368 (darwin_resume_thread): Use darwin_pthread_kill.
4369
4370 2018-07-05 Tom de Vries <tdevries@suse.de>
4371
4372 * macroexp.c (macro_buffer) <operator=>: New member function.
4373
4374 2018-07-04 Tom Tromey <tom@tromey.com>
4375
4376 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4377
4378 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4379
4380 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4381 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4382 * maint.c: Likewise.
4383 * top.c: Likewise.
4384
4385 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4386
4387 * NEWS: Create a new section for the next release branch.
4388 Rename the section of the current branch, now that it has
4389 been cut.
4390
4391 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4392
4393 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4394 * version.in: Bump version to 8.2.50.DATE-git.
4395
4396 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4397 Pedro Alves <palves@redhat.com>
4398
4399 * linux-nat.c (linux_init_ptrace): Rename to ...
4400 (linux_init_ptrace_procfs): ... this. Call
4401 linux_proc_init_warnings.
4402 (linux_nat_target::post_attach)
4403 (linux_nat_target::post_startup_inferior): Adjust.
4404 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4405 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4406
4407 2018-07-04 Tom de Vries <tdevries@suse.de>
4408
4409 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4410 check ...
4411 (read_comp_unit_head): ... here.
4412
4413 2018-07-03 Tom Tromey <tom@tromey.com>
4414
4415 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4416 (stop_tracing, tstatus_command)
4417 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4418 (print_one_static_tracepoint_marker): Update.
4419 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4420 std::vector.
4421 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4422 VEC.
4423 (all_tracepoints, static_tracepoints_here): Return std::vector.
4424
4425 2018-07-03 Tom Tromey <tom@tromey.com>
4426
4427 * common/ptid.c (ptid_equal): Remove.
4428 * common/ptid.h (ptid_equal): Don't declare.
4429 * ada-tasks.c: Update.
4430 * breakpoint.c: Update.
4431 * common/agent.c: Update.
4432 * corelow.c: Update.
4433 * darwin-nat-info.c: Update.
4434 * darwin-nat.c: Update.
4435 * dcache.c: Update.
4436 * dtrace-probe.c: Update.
4437 * dummy-frame.c: Update.
4438 * fbsd-nat.c: Update.
4439 * frame.c: Update.
4440 * gdbthread.h: Update.
4441 * gnu-nat.c: Update.
4442 * go32-nat.c: Update.
4443 * inf-loop.c: Update.
4444 * inf-ptrace.c: Update.
4445 * infcall.c: Update.
4446 * infcmd.c: Update.
4447 * inflow.c: Update.
4448 * infrun.c: Update.
4449 * linux-fork.c: Update.
4450 * linux-nat.c: Update.
4451 * linux-thread-db.c: Update.
4452 * mi/mi-cmd-var.c: Update.
4453 * mi/mi-interp.c: Update.
4454 * mi/mi-main.c: Update.
4455 * nto-procfs.c: Update.
4456 * ppc-linux-tdep.c: Update.
4457 * procfs.c: Update.
4458 * python/py-inferior.c: Update.
4459 * python/py-record-btrace.c: Update.
4460 * python/py-record.c: Update.
4461 * ravenscar-thread.c: Update.
4462 * regcache.c: Update.
4463 * remote-sim.c: Update.
4464 * remote.c: Update.
4465 * sol-thread.c: Update.
4466 * solib.c: Update.
4467 * target.c: Update.
4468 * tui/tui-stack.c: Update.
4469 * varobj.c: Update.
4470 * windows-nat.c: Update.
4471 * windows-tdep.c: Update.
4472
4473 2018-07-03 Tom Tromey <tom@tromey.com>
4474
4475 * common/ptid.c (ptid_match): Remove.
4476 * common/ptid.h (ptid_match): Don't declare.
4477 * fbsd-nat.c: Update.
4478 * infcmd.c: Update.
4479 * infrun.c: Update.
4480 * linux-nat.c: Update.
4481 * record-btrace.c: Update.
4482 * regcache.c: Update.
4483 * remote.c: Update.
4484
4485 2018-07-03 Tom Tromey <tom@tromey.com>
4486
4487 * common/ptid.c (ptid_tid_p): Remove.
4488 * common/ptid.h (ptid_tid_p): Don't declare.
4489 * sol-thread.c: Update.
4490
4491 2018-07-03 Tom Tromey <tom@tromey.com>
4492
4493 * common/ptid.c (ptid_lwp_p): Remove.
4494 * common/ptid.h (ptid_lwp_p): Don't declare.
4495 * fbsd-nat.c: Update.
4496 * linux-nat.c: Update.
4497 * nat/linux-procfs.c: Update.
4498 * nat/x86-linux-dregs.c: Update.
4499 * sol-thread.c: Update.
4500
4501 2018-07-03 Tom Tromey <tom@tromey.com>
4502
4503 * common/ptid.c (ptid_is_pid): Remove.
4504 * common/ptid.h (ptid_is_pid): Don't declare.
4505 * infrun.c: Update.
4506 * linux-nat.c: Update.
4507 * mi/mi-interp.c: Update.
4508 * remote.c: Update.
4509 * thread.c: Update.
4510
4511 2018-07-03 Tom Tromey <tom@tromey.com>
4512
4513 * common/ptid.c (ptid_get_tid): Remove.
4514 * common/ptid.h (ptid_get_tid): Don't declare.
4515 * ada-tasks.c: Update.
4516 * aix-thread.c: Update.
4517 * bsd-uthread.c: Update.
4518 * darwin-nat.c: Update.
4519 * fbsd-nat.c: Update.
4520 * i386-darwin-nat.c: Update.
4521 * infrun.c: Update.
4522 * linux-tdep.c: Update.
4523 * nto-procfs.c: Update.
4524 * ppc-ravenscar-thread.c: Update.
4525 * python/py-infthread.c: Update.
4526 * ravenscar-thread.c: Update.
4527 * sol-thread.c: Update.
4528 * sparc-ravenscar-thread.c: Update.
4529 * windows-nat.c: Update.
4530
4531 2018-07-03 Tom Tromey <tom@tromey.com>
4532
4533 * common/ptid.c (ptid_get_lwp): Remove.
4534 * common/ptid.h (ptid_get_lwp): Don't declare.
4535 * aarch64-linux-nat.c: Update.
4536 * ada-tasks.c: Update.
4537 * aix-thread.c: Update.
4538 * amd64-linux-nat.c: Update.
4539 * arm-linux-nat.c: Update.
4540 * corelow.c: Update.
4541 * fbsd-nat.c: Update.
4542 * fbsd-tdep.c: Update.
4543 * gnu-nat.c: Update.
4544 * i386-cygwin-tdep.c: Update.
4545 * i386-gnu-nat.c: Update.
4546 * i386-linux-nat.c: Update.
4547 * ia64-linux-nat.c: Update.
4548 * inf-ptrace.c: Update.
4549 * infrun.c: Update.
4550 * linux-fork.c: Update.
4551 * linux-nat.c: Update.
4552 * linux-tdep.c: Update.
4553 * linux-thread-db.c: Update.
4554 * mips-linux-nat.c: Update.
4555 * nat/aarch64-linux-hw-point.c: Update.
4556 * nat/aarch64-linux.c: Update.
4557 * nat/linux-btrace.c: Update.
4558 * nat/linux-osdata.c: Update.
4559 * nat/linux-procfs.c: Update.
4560 * nat/x86-linux-dregs.c: Update.
4561 * obsd-nat.c: Update.
4562 * ppc-fbsd-nat.c: Update.
4563 * ppc-linux-nat.c: Update.
4564 * procfs.c: Update.
4565 * python/py-infthread.c: Update.
4566 * ravenscar-thread.c: Update.
4567 * remote.c: Update.
4568 * s390-linux-nat.c: Update.
4569 * sol-thread.c: Update.
4570 * sol2-tdep.c: Update.
4571 * spu-linux-nat.c: Update.
4572 * x86-linux-nat.c: Update.
4573 * xtensa-linux-nat.c: Update.
4574
4575 2018-07-03 Tom Tromey <tom@tromey.com>
4576
4577 * common/ptid.c (ptid_get_pid): Remove.
4578 * common/ptid.h (ptid_get_pid): Don't declare.
4579 * aarch64-linux-nat.c: Update.
4580 * ada-lang.c: Update.
4581 * aix-thread.c: Update.
4582 * alpha-bsd-nat.c: Update.
4583 * amd64-fbsd-nat.c: Update.
4584 * amd64-linux-nat.c: Update.
4585 * arm-linux-nat.c: Update.
4586 * arm-nbsd-nat.c: Update.
4587 * auxv.c: Update.
4588 * break-catch-syscall.c: Update.
4589 * breakpoint.c: Update.
4590 * bsd-uthread.c: Update.
4591 * corelow.c: Update.
4592 * ctf.c: Update.
4593 * darwin-nat.c: Update.
4594 * fbsd-nat.c: Update.
4595 * fbsd-tdep.c: Update.
4596 * gcore.c: Update.
4597 * gnu-nat.c: Update.
4598 * hppa-nbsd-nat.c: Update.
4599 * hppa-obsd-nat.c: Update.
4600 * i386-fbsd-nat.c: Update.
4601 * ia64-linux-nat.c: Update.
4602 * inf-ptrace.c: Update.
4603 * infcmd.c: Update.
4604 * inferior.c: Update.
4605 * inferior.h: Update.
4606 * inflow.c: Update.
4607 * infrun.c: Update.
4608 * linux-fork.c: Update.
4609 * linux-nat.c: Update.
4610 * linux-tdep.c: Update.
4611 * linux-thread-db.c: Update.
4612 * m68k-bsd-nat.c: Update.
4613 * mi/mi-interp.c: Update.
4614 * mi/mi-main.c: Update.
4615 * mips-linux-nat.c: Update.
4616 * mips-nbsd-nat.c: Update.
4617 * mips64-obsd-nat.c: Update.
4618 * nat/aarch64-linux-hw-point.c: Update.
4619 * nat/aarch64-linux.c: Update.
4620 * nat/linux-btrace.c: Update.
4621 * nat/linux-osdata.c: Update.
4622 * nat/linux-procfs.c: Update.
4623 * nat/x86-linux-dregs.c: Update.
4624 * nto-procfs.c: Update.
4625 * obsd-nat.c: Update.
4626 * ppc-linux-nat.c: Update.
4627 * ppc-nbsd-nat.c: Update.
4628 * ppc-obsd-nat.c: Update.
4629 * proc-service.c: Update.
4630 * procfs.c: Update.
4631 * python/py-inferior.c: Update.
4632 * python/py-infthread.c: Update.
4633 * ravenscar-thread.c: Update.
4634 * record.c: Update.
4635 * remote-sim.c: Update.
4636 * remote.c: Update.
4637 * rs6000-nat.c: Update.
4638 * s390-linux-nat.c: Update.
4639 * sh-nbsd-nat.c: Update.
4640 * sol-thread.c: Update.
4641 * sparc-nat.c: Update.
4642 * sparc64-tdep.c: Update.
4643 * spu-linux-nat.c: Update.
4644 * spu-tdep.c: Update.
4645 * target-debug.h: Update.
4646 * target.c: Update.
4647 * thread.c: Update.
4648 * tid-parse.c: Update.
4649 * tracefile-tfile.c: Update.
4650 * vax-bsd-nat.c: Update.
4651 * windows-nat.c: Update.
4652 * x86-linux-nat.c: Update.
4653 * x86-nat.c: Update.
4654
4655 2018-07-03 Tom Tromey <tom@tromey.com>
4656
4657 * common/ptid.c (pid_to_ptid): Remove.
4658 * common/ptid.h (pid_to_ptid): Don't declare.
4659 * aix-thread.c: Update.
4660 * arm-linux-nat.c: Update.
4661 * common/ptid.c: Update.
4662 * common/ptid.h: Update.
4663 * corelow.c: Update.
4664 * ctf.c: Update.
4665 * darwin-nat.c: Update.
4666 * fbsd-nat.c: Update.
4667 * fork-child.c: Update.
4668 * gnu-nat.c: Update.
4669 * go32-nat.c: Update.
4670 * inf-ptrace.c: Update.
4671 * infcmd.c: Update.
4672 * inferior.c: Update.
4673 * infrun.c: Update.
4674 * linux-fork.c: Update.
4675 * linux-nat.c: Update.
4676 * nat/aarch64-linux-hw-point.c: Update.
4677 * nat/fork-inferior.c: Update.
4678 * nat/x86-linux-dregs.c: Update.
4679 * nto-procfs.c: Update.
4680 * obsd-nat.c: Update.
4681 * procfs.c: Update.
4682 * progspace.c: Update.
4683 * remote.c: Update.
4684 * rs6000-nat.c: Update.
4685 * s390-linux-nat.c: Update.
4686 * sol-thread.c: Update.
4687 * spu-linux-nat.c: Update.
4688 * target.c: Update.
4689 * top.c: Update.
4690 * tracefile-tfile.c: Update.
4691 * windows-nat.c: Update.
4692
4693 2018-07-03 Tom Tromey <tom@tromey.com>
4694
4695 * common/ptid.h (ptid_build): Don't declare.
4696 * common/ptid.c (ptid_build): Remove.
4697 * aix-thread.c: Update.
4698 * bsd-kvm.c: Update.
4699 * bsd-uthread.c: Update.
4700 * common/agent.c: Update.
4701 * common/ptid.c: Update.
4702 * common/ptid.h: Update.
4703 * corelow.c: Update.
4704 * darwin-nat.c: Update.
4705 * fbsd-nat.c: Update.
4706 * gnu-nat.c: Update.
4707 * linux-fork.c: Update.
4708 * linux-nat.c: Update.
4709 * linux-thread-db.c: Update.
4710 * nat/linux-osdata.c: Update.
4711 * nat/linux-procfs.c: Update.
4712 * nto-procfs.c: Update.
4713 * obsd-nat.c: Update.
4714 * proc-service.c: Update.
4715 * procfs.c: Update.
4716 * ravenscar-thread.c: Update.
4717 * remote-sim.c: Update.
4718 * remote.c: Update.
4719 * sol-thread.c: Update.
4720 * target.c: Update.
4721 * windows-nat.c: Update.
4722
4723 2018-07-03 Tom Tromey <tom@tromey.com>
4724
4725 * infrun.c (follow_exec): Use exit_inferior_silent.
4726 * inferior.c (exit_inferior_num_silent): Remove.
4727 * inferior.h (exit_inferior_num_silent): Don't declare.
4728
4729 2018-07-03 Tom Tromey <tom@tromey.com>
4730
4731 PR cli/23340:
4732 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4733 inferior_ptid on error.
4734
4735 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4736 Simon Marchi <simon.marchi@polymtl.ca>
4737
4738 PR tdep/8282
4739 * disasm.h (gdb_disassembler): Add
4740 `m_disassembler_options_holder'. member
4741 * disasm.c (get_all_disassembler_options): New function.
4742 (gdb_disassembler::gdb_disassembler): Use it.
4743 (gdb_buffered_insn_length_init_dis): Likewise.
4744 (gdb_buffered_insn_length): Adjust accordingly.
4745 (set_disassembler_options): Handle options with arguments.
4746 (show_disassembler_options_sfunc): Likewise. Add a leading new
4747 line if showing options with descriptions.
4748 (disassembler_options_completer): Adapt to using the
4749 `disasm_options_and_args_t' structure.
4750 * mips-tdep.c (mips_disassembler_options): New variable.
4751 (mips_disassembler_options_o32): Likewise.
4752 (mips_disassembler_options_n32): Likewise.
4753 (mips_disassembler_options_n64): Likewise.
4754 (gdb_print_insn_mips): Don't set `disassembler_options'.
4755 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4756 functions.
4757 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4758 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4759 `gdbarch_disassembler_options_implicit' and
4760 `gdbarch_valid_disassembler_options'.
4761 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4762 `disasm_options_and_args_t' structure.
4763 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4764 method.
4765 (valid_disassembler_options): Switch from `disasm_options_t' to
4766 the `disasm_options_and_args_t' structure.
4767 * NEWS: Document `set disassembler-options' support for the MIPS
4768 target.
4769 * gdbarch.h: Regenerate.
4770 * gdbarch.c: Regenerate.
4771
4772 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4773
4774 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4775
4776 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4777
4778 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4779 parameter in call to amd64_target_description.
4780 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4781 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4782 (amd64fbsd_init_abi): Likewise.
4783 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4784 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4785 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4786 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4787
4788 2018-06-29 Pedro Alves <palves@redhat.com>
4789
4790 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4791 "segments" parameter.
4792 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4793 (_initialize_amd64_tdep): Update call to
4794 amd64_create_target_description.
4795 (amd64_target_description): Add "segments" parameter. Adjust
4796 the implementation to use it.
4797 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4798 call to amd64_create_target_description.
4799 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4800 * gdb/arch/amd64.h (amd64_create_target_description): Add
4801 "segments" register.
4802 * gdb/arch/amd64.c (amd64_create_target_description): Add
4803 "segments" parameter. Call create_feature_i386_64bit_segments
4804 only if SEGMENTS is true.
4805 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4806 call to amd64_create_target_description.
4807
4808 2018-06-29 Pedro Alves <palves@redhat.com>
4809
4810 * thread.c (thread_target_id_str): New, factored out from ...
4811 (print_thread_info_1): ... here. Use it to compute the max
4812 "Target Id" column width.
4813
4814 2018-06-29 Pedro Alves <palves@redhat.com>
4815
4816 * remote.c (remote_target::extra_thread_info): Delete
4817 'display_buf' and 'n' locals. from the cache, regardless of
4818 packet mechanims is in use. Use cache for qThreadExtra and qP
4819 methods too.
4820
4821 2018-06-29 Pedro Alves <palves@redhat.com>
4822
4823 * blockframe.c (find_pc_sect_containing_function): New function.
4824 * breakpoint.c (print_breakpoint_location): Don't call
4825 find_pc_sect_function.
4826 * linespec.c (create_sals_line_offset): Record the location's
4827 symbol in the sal.
4828 * linespec.c (convert_address_location_to_sals): Fill in sal's
4829 symbol with find_pc_sect_containing_function.
4830 * symtab.c (find_function_start_sal): Rename to ...
4831 (find_function_start_sal_1): ... this.
4832 (find_function_start_sal): Reimplement as wrapper around
4833 find_function_start_sal_1, and use
4834 find_pc_sect_containing_function to fill in the sal's symbol.
4835 (find_function_start_sal(symbol*, bool)): Adjust.
4836 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4837 comments.
4838 (find_pc_sect_containing_function): Declare.
4839
4840 2018-06-29 Pedro Alves <palves@redhat.com>
4841
4842 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4843 true if the the location has no symbol.
4844
4845 2018-06-28 Tom Tromey <tom@tromey.com>
4846
4847 * NEWS: Mention --enable-codesign.
4848 * silent-rules.mk (ECHO_SIGN): New variable.
4849 * configure.ac: Add --enable-codesign.
4850 * configure: Rebuild.
4851 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4852 (gdb$(EXEEXT)): Optionally invoke codesign.
4853
4854 2018-06-28 Pedro Alves <palves@redhat.com>
4855
4856 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4857 comments.
4858 (switch_to_thread_no_regs): Adjust comment.
4859 * infcmd.c (stop_pc): Delete.
4860 (post_create_inferior, info_program_command): Replace references
4861 to stop_pc with references to thread_info->suspend.stop_pc.
4862 * inferior.h (stop_pc): Delete declaration.
4863 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4864 (handle_inferior_event_1, handle_signal_stop)
4865 (process_event_stop_test, keep_going_stepped_thread)
4866 (handle_step_into_function, handle_step_into_function_backward)
4867 (print_stop_location): Replace references to stop_pc with
4868 references to thread_info->suspend.stop_pc.
4869 (struct infcall_suspend_state) <stop_pc>: Delete field.
4870 (save_infcall_suspend_state, restore_infcall_suspend_state):
4871 Remove references to inf_stat->stop_pc.
4872 * linux-fork.c (fork_load_infrun_state): Likewise.
4873 * record-btrace.c (record_btrace_set_replay): Likewise.
4874 * record-full.c (record_full_goto_entry): Likewise.
4875 * remote.c (print_one_stopped_thread): Likewise.
4876 * target.c (target_resume): Extend comment.
4877 * thread.c (set_executing_thread): New.
4878 (set_executing): Use it.
4879 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4880 Remove references to stop_pc.
4881
4882 2018-06-28 Pedro Alves <palves@redhat.com>
4883
4884 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4885 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4886
4887 2018-06-28 Tom Tromey <tom@tromey.com>
4888
4889 * coffread.c (coff_symfile_finish): Update.
4890 * xcoffread.c (xcoff_symfile_finish): Update.
4891 * elfread.c (elf_symfile_finish): Update.
4892 * symfile.h (dwarf2_free_objfile): Don't declare.
4893 * dwarf2read.c (_initialize_dwarf2_read): Use
4894 register_objfile_data_with_cleanup.
4895 (dwarf2_free_objfile): Now static. Change signature.
4896
4897 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4898
4899 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4900 option "-o" to add-symbol-file-load to add an offset to each
4901 section's load address.
4902 * symfile.c (set_objfile_default_section_offset): New function.
4903
4904 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4905
4906 * symfile.c (add_symbol_file_command): Make sure that sections
4907 with the same name are sorted in the same order.
4908
4909 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4910
4911 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4912 require the second argument. If omitted, load sections at the
4913 addresses specified in the file.
4914
4915 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4916
4917 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4918 (_initialize_symfile): Add option "-o" to symbol-file to add an
4919 offset to each section of the symbol file.
4920
4921 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4922
4923 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4924
4925 2018-06-27 Tom Tromey <tom@tromey.com>
4926
4927 * stack.c (_initialize_stack): Update "func" help text.
4928
4929 2018-06-27 Tom Tromey <tom@tromey.com>
4930
4931 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4932 std::vector.
4933 (unwind_infopy_str, pyuw_create_unwind_info)
4934 (unwind_infopy_add_saved_register, pyuw_sniffer)
4935 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4936 Update.
4937 (struct saved_reg): Add constructor.
4938 <value>: Now a gdbpy_ref<>.
4939
4940 2018-06-27 Tom Tromey <tom@tromey.com>
4941
4942 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4943
4944 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4945
4946 * gdb-gdb.py.in: Format using autopep8.
4947
4948 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4949
4950 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4951 (type_lookup_function): Recognize CORE_ADDR values.
4952
4953 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4954
4955 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4956 print tag_name.
4957
4958 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4959
4960 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4961 <__lt__>: Add.
4962
4963 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4964
4965 * gdb-gdb.py: Move to...
4966 * gdb-gdb.py.in: ... here.
4967 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4968 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4969 dependencies.
4970 (distclean): Remove gdb-gdb.py when cleaning.
4971 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4972 * configure: Re-generate.
4973
4974 2018-06-27 Pedro Alves <palves@redhat.com>
4975
4976 * proc-service.c (get_ps_regcache): New.
4977 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4978 (ps_lsetfpregs): Use it.
4979
4980 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4981
4982 PR gdb/21695
4983 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4984 (dwarf_decode_lines_1): Adjust.
4985
4986 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4987
4988 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4989 override.
4990 <info_proc>: Likewise.
4991
4992 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4993
4994 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4995 to windows_fetch_one_register, and only handle the case of
4996 fetching one register. Move the code that reloads the context
4997 and iterates over all registers if R is negative to...
4998 (windows_nat_target::fetch_registers): ... here.
4999 (do_windows_store_inferior_registers): Rename to
5000 windows_store_one_register, and only handle the case of storing
5001 one register. Move the code that handles the case where r is
5002 negative to...
5003 (windows_nat_target::store_registers) ... here.
5004
5005 2018-06-26 Tom Tromey <tom@tromey.com>
5006
5007 PR rust/22574:
5008 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5009 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5010 Update.
5011 (rust_internal_print_type): Add podata parameter.
5012 (rust_print_type): Update.
5013
5014 2018-06-26 Tom Tromey <tom@tromey.com>
5015
5016 * typeprint.h (struct print_offset_data) <update, finish,
5017 maybe_print_hole>: New methods.
5018 <indentation>: New constant.
5019 * typeprint.c (print_offset_data::indentation): Define.
5020 (print_offset_data::maybe_print_hole, print_offset_data::update)
5021 (print_offset_data::finish): Move from c-typeprint.c and rename.
5022 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5023 (print_spaces_filtered_with_print_options): Update.
5024 (c_print_type_union_field_offset, maybe_print_hole)
5025 (c_print_type_struct_field_offset): Move to typeprint.c and
5026 rename.
5027 (c_type_print_base_struct_union): Update.
5028
5029 2018-06-25 Pedro Alves <palves@redhat.com>
5030
5031 * gdbthread.h (thread_info_ref, delete_thread)
5032 (delete_thread_silent, first_thread_of_inferior)
5033 (any_thread_of_inferior, switch_to_thread)
5034 (enable_thread_stack_temporaries)
5035 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5036 (get_last_thread_stack_temporary)
5037 (value_in_thread_stack_temporaries, can_access_registers_thread):
5038 Spell out "struct thread_info" instead of just "thread_info".
5039 * inferior.h (notice_new_inferior): Likewise.
5040
5041 2018-06-25 Pedro Alves <palves@redhat.com>
5042
5043 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5044 pass thread_info pointer to delete_thread.
5045 (windows_nat_target::detach): Pass inferior pointer to
5046 detach_inferior.
5047 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5048 delete_thread.
5049 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5050 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5051 and pass a thread_info pointer to delete_thread.
5052 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5053 pass thread_info pointer to delete_thread.
5054 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5055 delete_thread_silent call.
5056 * procfs.c (procfs_target::detach): Pass inferior pointer to
5057 detach_inferior.
5058 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5059 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5060 delete_thread_silent call.
5061 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5062 pass thread_info pointer to delete_thread.
5063 (windows_nat_target::detach): Pass inferior pointer to
5064 delete_inferior.
5065
5066 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5067
5068 * regcache.c (readable_regcache::read_part): Fix asserts.
5069 (reg_buffer::raw_collect_part): New function.
5070 (regcache::write_part): Fix asserts.
5071 (reg_buffer::raw_supply_part): New function.
5072 (regcache::transfer_regset_register): New helper function.
5073 (regcache::transfer_regset): Call new functions.
5074 (regcache_supply_regset): Use gdb_byte*.
5075 (regcache::supply_regset): Likewise.
5076 (regcache_collect_regset): Likewise.
5077 (regcache::collect_regset): Likewise.
5078 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5079 (reg_buffer::raw_supply_part): Likewise.
5080 (regcache::transfer_regset_register): Likewise.
5081 (regcache::transfer_regset): Use gdb_byte*.
5082
5083 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5084
5085 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5086
5087 2018-06-21 Pedro Alves <palves@redhat.com>
5088
5089 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5090 instead of a ptid_t. All callers adjusted.
5091 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5092 adjusted.
5093 (print_ada_task_info, display_current_task_id, task_command_1):
5094 Adjust.
5095 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5096 inferior_thread.
5097 (breakpoint_kind): Adjust.
5098 (remove_breakpoints_pid): Rename to ...
5099 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5100 pointer. All callers adjusted.
5101 (bpstat_clear_actions): Use inferior_thread.
5102 (get_bpstat_thread): New.
5103 (bpstat_do_actions): Use it.
5104 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5105 to take a thread_info pointer. All callers adjusted.
5106 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5107 (breakpoint_re_set_thread): Use inferior_thread.
5108 * breakpoint.h (struct inferior): Forward declare.
5109 (bpstat_stop_status): Update.
5110 (remove_breakpoints_pid): Delete.
5111 (remove_breakpoints_inf): New.
5112 * bsd-uthread.c (bsd_uthread_target::wait)
5113 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5114 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5115 (maint_btrace_packet_history_cmd)
5116 (maint_btrace_clear_packet_history_cmd): Adjust.
5117 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5118 inferior_thread.
5119 * cli/cli-interp.c: Include "inferior.h".
5120 * common/refcounted-object.h (struct
5121 refcounted_object_ref_policy): New.
5122 * compile/compile-object-load.c: Include gdbthread.h.
5123 (store_regs): Use inferior_thread.
5124 * corelow.c (core_target::close): Use current_inferior.
5125 (core_target_open): Adjust to use first_thread_of_inferior and use
5126 the current inferior.
5127 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5128 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5129 <thread>: ... this new field. All references adjusted.
5130 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5131 Take a thread_info pointer instead of a ptid_t.
5132 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5133 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5134 thread_info pointer instead of a ptid_t.
5135 * elfread.c: Include "inferior.h".
5136 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5137 Use inferior_thread.
5138 * eval.c (evaluate_subexp): Likewise.
5139 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5140 inferior_thread.
5141 * gdb_proc_service.h (struct thread_info): Forward declare.
5142 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5143 <thread>: ... this new field. All references adjusted.
5144 * gdbarch.h, gdbarch.c: Regenerate.
5145 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5146 'thread' parameter. All implementations and callers adjusted.
5147 * gdbthread.h (thread_info) <set_running>: New method.
5148 (delete_thread, delete_thread_silent): Take a thread_info pointer
5149 instead of a ptid.
5150 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5151 (first_thread_of_process): Delete, replaced by ...
5152 (first_thread_of_inferior): ... this new function. All callers
5153 adjusted.
5154 (any_live_thread_of_process): Delete, replaced by ...
5155 (any_live_thread_of_inferior): ... this new function. All callers
5156 adjusted.
5157 (switch_to_thread, switch_to_no_thread): Declare.
5158 (is_executing): Delete.
5159 (enable_thread_stack_temporaries): Update comment.
5160 <enable_thread_stack_temporaries>: Take a thread_info pointer
5161 instead of a ptid_t. Incref the thread.
5162 <~enable_thread_stack_temporaries>: Decref the thread.
5163 <m_ptid>: Delete
5164 <m_thr>: New.
5165 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5166 (get_last_thread_stack_temporary)
5167 (value_in_thread_stack_temporaries, can_access_registers_thread):
5168 Take a thread_info pointer instead of a ptid_t. All callers
5169 adjusted.
5170 * infcall.c (get_call_return_value): Use inferior_thread.
5171 (run_inferior_call): Work with thread pointers instead of ptid_t.
5172 (call_function_by_hand_dummy): Work with thread pointers instead
5173 of ptid_t. Use thread_info_ref.
5174 * infcmd.c (proceed_thread_callback): Access thread's state
5175 directly.
5176 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5177 access thread's state directly.
5178 (continue_command): Use inferior_thread.
5179 (info_program_command): Use find_thread_ptid and access thread
5180 state directly.
5181 (proceed_after_attach_callback): Use thread state directly.
5182 (notice_new_inferior): Take a thread_info pointer instead of a
5183 ptid_t. All callers adjusted.
5184 (exit_inferior): Take an inferior pointer instead of a pid. All
5185 callers adjusted.
5186 (exit_inferior_silent): New.
5187 (detach_inferior): Delete.
5188 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5189 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5190 (detach_inferior_command, kill_inferior_command): Use
5191 find_inferior_id instead of valid_gdb_inferior_id and
5192 gdb_inferior_id_to_pid.
5193 (inferior_command): Use inferior and thread pointers.
5194 * inferior.h (struct thread_info): Forward declare.
5195 (notice_new_inferior): Take a thread_info pointer instead of a
5196 ptid_t. All callers adjusted.
5197 (detach_inferior): Delete declaration.
5198 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5199 instead of a pid. All callers adjusted.
5200 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5201 (valid_gdb_inferior_id): Delete.
5202 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5203 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5204 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5205 ...
5206 <inf>: ... this new field.
5207 <step_ptid>: Delete, replaced by ...
5208 <step_thread>: ... this new field.
5209 (get_displaced_stepping_state): Take an inferior pointer instead
5210 of a pid. All callers adjusted.
5211 (displaced_step_in_progress_any_inferior): Adjust.
5212 (displaced_step_in_progress_thread): Take a thread pointer instead
5213 of a ptid_t. All callers adjusted.
5214 (displaced_step_in_progress, add_displaced_stepping_state): Take
5215 an inferior pointer instead of a pid. All callers adjusted.
5216 (get_displaced_step_closure_by_addr): Adjust.
5217 (remove_displaced_stepping_state): Take an inferior pointer
5218 instead of a pid. All callers adjusted.
5219 (displaced_step_prepare_throw, displaced_step_prepare)
5220 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5221 All callers adjusted.
5222 (start_step_over): Adjust.
5223 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5224 displaced step queue.
5225 (do_target_resume): Adjust.
5226 (fetch_inferior_event): Use inferior_thread.
5227 (context_switch, get_inferior_stop_soon): Take an
5228 execution_control_state pointer instead of a ptid_t. All callers
5229 adjusted.
5230 (switch_to_thread_cleanup): Delete.
5231 (stop_all_threads): Use scoped_restore_current_thread.
5232 * inline-frame.c: Include "gdbthread.h".
5233 (inline_state) <inline_state>: Take a thread pointer instead of a
5234 ptid_t. All callers adjusted.
5235 <ptid>: Delete, replaced by ...
5236 <thread>: ... this new field.
5237 (find_inline_frame_state): Take a thread pointer instead of a
5238 ptid_t. All callers adjusted.
5239 (skip_inline_frames, step_into_inline_frame)
5240 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5241 pointer instead of a ptid_t. All callers adjusted.
5242 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5243 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5244 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5245 pointers directly.
5246 * linux-nat.c (get_detach_signal): Likewise.
5247 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5248 (thread_db_notice_clone): Adjust.
5249 (thread_db_find_new_threads_silently)
5250 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5251 a thread pointer instead of a ptid_t. All callers adjusted.
5252 * mi/mi-cmd-var.c: Include "inferior.h".
5253 (mi_cmd_var_update_iter): Update to use thread pointers.
5254 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5255 inferior directly.
5256 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5257 out to ...
5258 (mi_output_running): ... this new function.
5259 (mi_on_resume_1): Adjust to use it.
5260 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5261 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5262 directly.
5263 (interrupt_thread_callback): : Adjust to use thread and inferior
5264 pointers.
5265 * proc-service.c: Include "gdbthread.h".
5266 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5267 * progspace-and-thread.c: Include "inferior.h".
5268 * progspace.c: Include "inferior.h".
5269 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5270 hold a reference to an inferior_object.
5271 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5272 inferior_thread.
5273 * python/py-inferior.c (struct inferior_object): Give the type a
5274 tag name instead of a typedef.
5275 (python_on_normal_stop): No need to check if the current thread is
5276 listed.
5277 (inferior_to_inferior_object): Change return type to
5278 inferior_object. All callers adjusted.
5279 (find_thread_object): Delete, bits factored out to ...
5280 (thread_to_thread_object): ... this new function.
5281 * python/py-infthread.c (create_thread_object): Use
5282 inferior_to_inferior_object.
5283 (thpy_is_stopped): Use thread pointer directly.
5284 (gdbpy_selected_thread): Use inferior_thread.
5285 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5286 field, replaced with ...
5287 <thread>: ... this new field. All users adjusted.
5288 (btpy_insn_or_gap_new): Drop const.
5289 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5290 callers adjusted.
5291 * python/py-record.c: Include "gdbthread.h".
5292 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5293 a ptid_t. All callers adjusted.
5294 (gdbpy_current_recording): Use inferior_thread.
5295 * python/py-record.h (recpy_record_object) <ptid>: Delete
5296 field, replaced with ...
5297 <thread>: ... this new field. All users adjusted.
5298 (recpy_element_object) <ptid>: Delete
5299 field, replaced with ...
5300 <thread>: ... this new field. All users adjusted.
5301 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5302 a ptid_t. All callers adjusted.
5303 * python/py-threadevent.c: Include "gdbthread.h".
5304 (get_event_thread): Use thread_to_thread_object.
5305 * python/python-internal.h (struct inferior_object): Forward
5306 declare.
5307 (find_thread_object, find_inferior_object): Delete declarations.
5308 (thread_to_thread_object, inferior_to_inferior_object): New
5309 declarations.
5310 * record-btrace.c: Include "inferior.h".
5311 (require_btrace_thread): Use inferior_thread.
5312 (record_btrace_frame_sniffer)
5313 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5314 (get_thread_current_frame): Use scoped_restore_current_thread and
5315 switch_to_thread.
5316 (get_thread_current_frame): Use thread pointer directly.
5317 (record_btrace_replay_at_breakpoint): Use thread's inferior
5318 pointer directly.
5319 * record-full.c: Include "inferior.h".
5320 * regcache.c: Include "gdbthread.h".
5321 (get_thread_arch_regcache): Use the inferior's address space
5322 directly.
5323 (get_thread_regcache, registers_changed_thread): New.
5324 * regcache.h (get_thread_regcache(thread_info *thread)): New
5325 overload.
5326 (registers_changed_thread): New.
5327 (remote_target) <remote_detach_1>: Swap order of parameters.
5328 (remote_add_thread): <remote_add_thread>: Return the new thread.
5329 (get_remote_thread_info(ptid_t)): New overload.
5330 (remote_target::remote_notice_new_inferior): Use thread pointers
5331 directly.
5332 (remote_target::process_initial_stop_replies): Use
5333 thread_info::set_running.
5334 (remote_target::remote_detach_1, remote_target::detach)
5335 (extended_remote_target::detach): Adjust.
5336 * stack.c (frame_show_address): Use inferior_thread.
5337 * target-debug.h (target_debug_print_thread_info_pp): New.
5338 * target-delegates.c: Regenerate.
5339 * target.c (default_thread_address_space): Delete.
5340 (memory_xfer_partial_1): Use current_inferior.
5341 (target_detach): Use current_inferior.
5342 (target_thread_address_space): Delete.
5343 (generic_mourn_inferior): Use current_inferior.
5344 * target.h (struct target_ops) <thread_address_space>: Delete.
5345 (target_thread_address_space): Delete.
5346 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5347 pointers directly.
5348 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5349 thread pointer instead of a ptid_t. Adjust all callers.
5350 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5351 (first_thread_of_process): Delete, replaced by ...
5352 (first_thread_of_inferior): ... this new function. All callers
5353 adjusted.
5354 (any_thread_of_process): Rename to ...
5355 (any_thread_of_inferior): ... this, and take an inferior pointer.
5356 (any_live_thread_of_process): Rename to ...
5357 (any_live_thread_of_inferior): ... this, and take an inferior
5358 pointer.
5359 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5360 (value_in_thread_stack_temporaries)
5361 (get_last_thread_stack_temporary): Take a thread pointer instead
5362 of a ptid_t. Adjust all callers.
5363 (thread_info::set_running): New.
5364 (validate_registers_access): Use inferior_thread.
5365 (can_access_registers_ptid): Rename to ...
5366 (can_access_registers_thread): ... this, and take a thread
5367 pointer.
5368 (print_thread_info_1): Adjust to compare thread pointers instead
5369 of ptids.
5370 (switch_to_no_thread, switch_to_thread): Make extern.
5371 (scoped_restore_current_thread::~scoped_restore_current_thread):
5372 Use m_thread pointer directly.
5373 (scoped_restore_current_thread::scoped_restore_current_thread):
5374 Use inferior_thread.
5375 (thread_command): Use thread pointer directly.
5376 (thread_num_make_value_helper): Use inferior_thread.
5377 * top.c (execute_command): Use inferior_thread.
5378 * tui/tui-interp.c: Include "inferior.h".
5379 * varobj.c (varobj_create): Use inferior_thread.
5380 (value_of_root_1): Use find_thread_global_id instead of
5381 global_thread_id_to_ptid.
5382
5383 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5384
5385 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5386 possible.
5387 (regcache::write_part): Likewise.
5388 (readable_regcache::cooked_read_part): Update comment.
5389 (readable_regcache::cooked_write_part): Likewise.
5390 * regcache.h: (readable_regcache::read_part): Likewise.
5391 (regcache::write_part): Likewise.
5392
5393 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5394 Dirk Schubert <dirk.schubert@arm.com>
5395
5396 * aarch64-linux-nat.c (post_attach): New.
5397 (aarch64_linux_nat_target::post_attach): Override post_attach to
5398 record the number of hardware debug registers.
5399
5400 2018-06-20 Tom Tromey <tom@tromey.com>
5401
5402 * python/py-param.c (add_setshow_generic): Make parameters const.
5403 (parmpy_init): Update.
5404
5405 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5406
5407 * regcache.h (regcache_cooked_read_ftype): Rename to...
5408 (register_read_ftype): ...this, change type to function_view.
5409 (class reg_buffer) <save>: Remove src parameter.
5410 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5411 parameter non-const in first overload. Remove src parameter in
5412 second overload.
5413 * regcache.c (do_cooked_read): Remove.
5414 (readonly_detached_regcache::readonly_detached_regcache): Make
5415 parameter non-const, adjust call to other constructor.
5416 (reg_buffer::save): Remove src parameter.
5417 * frame.c (do_frame_register_read): Remove.
5418 (frame_save_as_regcache): Use lambda function.
5419 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5420 parameter to ppu2spu_data *.
5421 (ppu2spu_sniffer): Use lambda function.
5422
5423 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5424
5425 * record-full.c (record_full_target::insert_breakpoint): Remove
5426 "struct" keyword, add const.
5427
5428 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5429
5430 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5431 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5432 * configure.ac: Remove AC_PREREQ, add missing quoting.
5433 * gnulib/configure.ac: Modernize usage of
5434 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5435 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5436 (AUTOMAKE_VERSION): Bump to 1.15.1.
5437 * configure: Re-generate.
5438 * config.in: Re-generate.
5439 * aclocal.m4: Re-generate.
5440 * gnulib/aclocal.m4: Re-generate.
5441 * gnulib/config.in: Re-generate.
5442 * gnulib/configure: Re-generate.
5443 * gnulib/import/Makefile.in: Re-generate.
5444
5445 2018-06-19 Pedro Alves <palves@redhat.com>
5446
5447 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5448 (lookup_minimal_symbol_by_pc_section): ... here with
5449 gdb_assert_not_reached added.
5450
5451 2018-06-19 Pedro Alves <palves@redhat.com>
5452
5453 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5454 parameter with a block parameter. Compare location's block symbol
5455 with the frame's block instead of addresses.
5456 (skip_inline_frames): Pass the current block instead of the
5457 frame's address. Break out as soon as we determine the frame
5458 should not be skipped.
5459
5460 2018-06-18 Tom Tromey <tom@tromey.com>
5461
5462 * solib-aix.c (solib_aix_get_section_offsets): Return
5463 unique_xmalloc_ptr.
5464 (solib_aix_solib_create_inferior_hook): Update.
5465
5466 2018-06-18 Tom Tromey <tom@tromey.com>
5467
5468 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5469
5470 2018-06-18 Tom Tromey <tom@tromey.com>
5471
5472 * solib-frv.c (frv_relocate_main_executable): Use
5473 unique_xmalloc_ptr.
5474 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5475 unique_xmalloc_ptr.
5476
5477 2018-06-18 Tom Tromey <tom@tromey.com>
5478
5479 * objfiles.h (inhibit_section_map_updates): Update.
5480 (resume_section_map_updates, resume_section_map_updates_cleanup):
5481 Remove.
5482 * solib-svr4.c (svr4_handle_solib_event): Update.
5483 * objfiles.c (inhibit_section_map_updates): Return
5484 scoped_restore_tmpl<int>.
5485 (resume_section_map_updates, resume_section_map_updates_cleanup):
5486 Remove.
5487
5488 2018-06-18 Tom Tromey <tom@tromey.com>
5489
5490 * valprint.h (read_string): Update.
5491 * valprint.c (read_string): Change type of "buffer".
5492 (val_print_string): Update.
5493 * python/py-value.c (valpy_string): Update.
5494 * language.h (struct language_defn) <la_get_string>: Change
5495 type of "buffer".
5496 (default_get_string, c_get_string): Update.
5497 * language.c (default_get_string): Change type of "buffer".
5498 * guile/scm-value.c (gdbscm_value_to_string): Update.
5499 * c-lang.c (c_get_string): Change type of "buffer".
5500
5501 2018-06-18 Tom Tromey <tom@tromey.com>
5502
5503 * ser-mingw.c (struct pipe_state_destroyer): New.
5504 (pipe_state_up): New typedef.
5505 (cleanup_pipe_state): Remove.
5506 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5507
5508 2018-06-18 Tom Tromey <tom@tromey.com>
5509
5510 * rust-lang.h (rust_yyerror): Don't declare.
5511 * rust-lang.c (rust_language_defn): Update.
5512 * rust-exp.y (yyerror): Now static.
5513 * parse.c (parse_exp_in_context_1): Update.
5514 * p-lang.h (p_yyerror): Don't declare.
5515 * p-lang.c (p_language_defn): Update.
5516 * p-exp.y (yyerror): Now static.
5517 * opencl-lang.c (opencl_language_defn): Update.
5518 * objc-lang.c (objc_language_defn): Update.
5519 * m2-lang.h (m2_yyerror): Don't declare.
5520 * m2-lang.c (m2_language_defn): Update.
5521 * m2-exp.y (yyerror): Now static.
5522 * language.h (struct language_defn) <la_error>: Remove.
5523 * language.c (unk_lang_error): Remove.
5524 (unknown_language_defn, auto_language_defn): Remove.
5525 * go-lang.h (go_yyerror): Don't declare.
5526 * go-lang.c (go_language_defn): Update.
5527 * go-exp.y (yyerror): Now static.
5528 * f-lang.h (f_yyerror): Don't declare.
5529 * f-lang.c (f_language_defn): Update.
5530 * f-exp.y (yyerror): Now static.
5531 * d-lang.h (d_yyerror): Don't declare.
5532 * d-lang.c (d_language_defn): Update.
5533 * d-exp.y (yyerror): Now static.
5534 * c-lang.h (c_yyerror): Don't declare.
5535 * c-lang.c (c_language_defn, cplus_language_defn)
5536 (asm_language_defn, minimal_language_defn): Update.
5537 * c-exp.y (yyerror): Now static.
5538 * ada-lang.h (ada_yyerror): Don't declare.
5539 * ada-lang.c (ada_language_defn): Update.
5540 * ada-exp.y (yyerror): Now static.
5541
5542 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5543
5544 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5545 (store_sveregs_to_thread): Likewise.
5546 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5547 (aarch64_linux_store_inferior_registers): Likewise.
5548 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5549 function.
5550 (aarch64_sve_regs_copy_to_regcache): Likewise.
5551 (aarch64_sve_regs_copy_from_regcache): Likewise.
5552 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5553 declaration.
5554 (aarch64_sve_regs_copy_to_regcache): Likewise.
5555 (aarch64_sve_regs_copy_from_regcache): Likewise.
5556 (sve_context): Structure from Linux headers.
5557 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5558 (SVE_SIG_ZREG_SIZE): Likewise.
5559 (SVE_SIG_PREG_SIZE): Likewise.
5560 (SVE_SIG_FFR_SIZE): Likewise.
5561 (SVE_SIG_REGS_OFFSET): Likewise.
5562 (SVE_SIG_ZREGS_OFFSET): Likewise.
5563 (SVE_SIG_ZREG_OFFSET): Likewise.
5564 (SVE_SIG_ZREGS_SIZE): Likewise.
5565 (SVE_SIG_PREGS_OFFSET): Likewise.
5566 (SVE_SIG_PREG_OFFSET): Likewise.
5567 (SVE_SIG_PREGS_SIZE): Likewise.
5568 (SVE_SIG_FFR_OFFSET): Likewise.
5569 (SVE_SIG_REGS_SIZE): Likewise.
5570 (SVE_SIG_CONTEXT_SIZE): Likewise.
5571 (SVE_PT_REGS_MASK): Likewise.
5572 (SVE_PT_REGS_FPSIMD): Likewise.
5573 (SVE_PT_REGS_SVE): Likewise.
5574 (SVE_PT_VL_INHERIT): Likewise.
5575 (SVE_PT_VL_ONEXEC): Likewise.
5576 (SVE_PT_REGS_OFFSET): Likewise.
5577 (SVE_PT_FPSIMD_OFFSET): Likewise.
5578 (SVE_PT_FPSIMD_SIZE): Likewise.
5579 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5580 (SVE_PT_SVE_PREG_SIZE): Likewise.
5581 (SVE_PT_SVE_FFR_SIZE): Likewise.
5582 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5583 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5584 (__SVE_SIG_TO_PT): Likewise.
5585 (SVE_PT_SVE_OFFSET): Likewise.
5586 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5587 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5588 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5589 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5590 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5591 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5592 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5593 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5594 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5595 (SVE_PT_SVE_SIZE): Likewise.
5596 (SVE_PT_SIZE): Likewise.
5597 (HAS_SVE_STATE): New define.
5598
5599 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5600
5601 * nat/aarch64-sve-linux-sigcontext.h: New file.
5602 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5603 new files.
5604 (SVE_VQ_MIN): Likewise.
5605 (SVE_VQ_MAX): Likewise.
5606 (SVE_VL_MIN): Likewise.
5607 (SVE_VL_MAX): Likewise.
5608 (SVE_NUM_ZREGS): Likewise.
5609 (SVE_NUM_PREGS): Likewise.
5610 (sve_vl_valid): Likewise.
5611 (struct user_sve_header): Likewise.
5612
5613 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5614 Richard Bunt <Richard.Bunt@arm.com>
5615
5616 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5617 was requested by GDB.
5618
5619 2018-06-15 Tom de Vries <tdevries@suse.de>
5620
5621 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5622
5623 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5624
5625 * gnulib/update-gnulib.sh: Print expected versions of
5626 autoconf/aclocal.
5627
5628 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5629
5630 * arch-utils.c (default_type_align): Use type_length_units.
5631 * gdbtypes.c (type_align): Use type_length_units.
5632
5633 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5634
5635 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5636 of 'define' command.
5637
5638 2018-06-14 Tom de Vries <tdevries@suse.de>
5639
5640 PR cli/22573
5641 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5642 get_no_prettyformat_print_options.
5643
5644 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5645
5646 * sparc-nat.h: Include target.h.
5647 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5648 <fetch_registers>: Remove this argument in function call.
5649 <store_registers>: Remove this argument in function call, remove
5650 extra semicolon.
5651 <low_forget_process>: Call sparc64_forget_process instead of
5652 sparc_forget_process.
5653
5654 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5655
5656 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5657 (procfs_target::make_corefile_notes): Adjust to new
5658 target_read_alloc return type.
5659
5660 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5661 Stephen Roberts <stephen.roberts@arm.com>
5662
5663 PR gdb/22882
5664 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5665 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5666 Move should_notify_stop local into more inner scope.
5667
5668 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5669 Stephen Roberts <stephen.roberts@arm.com>
5670
5671 PR gdb/22882
5672 * infrun.c (resume_1): Add call to mark_async_event_handler.
5673
5674 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5675
5676 * infrun.c (do_target_wait): Change old version of $pc printed.
5677
5678 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5679
5680 * dwarf2read.c (read_index_from_section): Rename to...
5681 (read_gdb_index_from_section): ... this, update all callers.
5682 (dwarf2_read_index): Rename to...
5683 (dwarf2_read_gdb_index): ... this, update all callers.
5684
5685 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5686
5687 * gdb/hppa-linux-nat.c
5688 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5689 hppa_linux_nat_target::fetch_registers.
5690
5691 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5692
5693 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5694 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5695 (AARCH64_DWARF_SVE_FFR): Likewise.
5696 (AARCH64_DWARF_SVE_P0): Likewise.
5697 (AARCH64_DWARF_SVE_Z0): Likewise.
5698
5699 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5700
5701 * common/common-regcache.h (raw_compare): New function.
5702 * regcache.c (regcache::raw_compare): Likewise.
5703 * regcache.h (regcache::raw_compare): New declaration.
5704
5705 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5706
5707 * common/common-regcache.h (reg_buffer_common): New structure.
5708 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5709 (reg_buffer::raw_supply): Likewise.
5710 (reg_buffer::raw_supply_integer): Likewise.
5711 (reg_buffer::raw_supply_zeroed): Likewise.
5712 (reg_buffer::raw_collect): Likewise.
5713 (reg_buffer::raw_collect_integer): Likewise.
5714 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5715 (reg_buffer::raw_supply): Likewise.
5716 (reg_buffer::raw_supply_integer): Likewise.
5717 (reg_buffer::raw_supply_zeroed): Likewise.
5718 (reg_buffer::raw_collect): Likewise.
5719 (reg_buffer::raw_collect_integer): Likewise.
5720
5721 2018-06-10 Tom Tromey <tom@tromey.com>
5722
5723 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5724 (class remote_state) <stop_reply_queue>: Now std::vector.
5725 (remote_state::~remote_state)
5726 (remote_target::stop_reply_queue_length): Update.
5727 (struct queue_iter_param, remove_child_of_pending_fork)
5728 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5729 (check_pending_event_prevents_wildcard_vcont_callback)
5730 (remove_stop_reply_for_inferior)
5731 (remove_stop_reply_of_remote_state)
5732 (remote_notif_remove_once_on_match)
5733 (stop_reply_match_ptid_and_ws)
5734 (remote_kill_child_of_pending_fork): Remove.
5735 (remote_target::remove_new_fork_children)
5736 (remote_target::check_pending_events_prevent_wildcard_vcont)
5737 (remote_target::discard_pending_stop_replies)
5738 (remote_target::discard_pending_stop_replies_in_queue)
5739 (remote_target::remote_notif_remove_queued_reply)
5740 (remote_target::queued_stop_reply)
5741 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5742 (remote_target::wait, remote_target::kill_new_fork_children)
5743 (remote_target::async): Update.
5744
5745 2018-06-10 Tom Tromey <tom@tromey.com>
5746
5747 * record-full.c (record_full_arch_list_cleanups): Remove.
5748 (record_full_message): Use try/catch.
5749 (record_full_wait_cleanups): Remove.
5750 (record_full_wait_1): Use try/catch.
5751 (record_full_restore): Likewise.
5752
5753 2018-06-10 Tom Tromey <tom@tromey.com>
5754
5755 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5756 declare VEC. Add constructor.
5757 <in_target_beneath>: Now bool.
5758 (record_full_breakpoints): Now a std::vector, static.
5759 (record_full_sync_record_breakpoints)
5760 (record_full_init_record_breakpoints)
5761 (record_full_target::insert_breakpoint)
5762 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5763
5764 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5765
5766 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5767 * serial.c (serial_interface_lookup): Remove struct keyword.
5768
5769 2018-06-10 Tom Tromey <tom@tromey.com>
5770
5771 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5772 method.
5773 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5774 a method.
5775 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5776 method.
5777 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5778 "beneath" as a method.
5779 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5780 Use "beneath" as a method.
5781
5782 2018-06-10 Tom Tromey <tom@tromey.com>
5783
5784 * tracefile.c (struct trace_file_writer_deleter): New.
5785 <operator()>: Rename from trace_file_writer_xfree.
5786 (trace_file_writer_up): New typedef.
5787 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5788
5789 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5790
5791 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5792 <m_registers, m_register_status>: Change type to
5793 std::unique_ptr.
5794 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5795 XCNEWVEC.
5796
5797 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5798
5799 * common/common-regcache.h (enum register_status): Add
5800 underlying type "signed char".
5801 * regcache.h (reg_buffer) <m_register_status>: Change type to
5802 register_status *.
5803 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5804 register_status instead of signed char.
5805 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5806 (reg_buffer::get_register_status): Remove cast.
5807 (readable_regcache::raw_read): Remove cast.
5808 (readable_regcache::cooked_read): Remove cast.
5809
5810 2018-06-09 Tom Tromey <tom@tromey.com>
5811
5812 * source.c (reverse_search_command, forward_search_command): Use
5813 scoped_fd.
5814
5815 2018-06-09 Tom Tromey <tom@tromey.com>
5816
5817 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5818 (serial_ops_list): Now static, std::vector.
5819 (serial_interface_lookup, serial_add_interface): Update.
5820
5821 2018-06-09 Tom Tromey <tom@tromey.com>
5822
5823 * dwarf2read.c (process_cu_includes): Update.
5824 (process_full_comp_unit): Update.
5825 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5826 std::vector.
5827
5828 2018-06-08 Paul Koning <paul_koning@dell.com>
5829
5830 PR gdb/23252
5831
5832 * python/python.c (do_start_initialization):
5833 Avoid call to internal Python API.
5834 (init__gdb_module): New function.
5835
5836 2018-06-08 Gary Benson <gbenson@redhat.com>
5837
5838 * linux-thread-db.c (valprint.h): New include.
5839 (struct check_thread_db_info): New structure.
5840 (check_thread_db_on_load, tdb_testinfo): New static globals.
5841 (check_thread_db, check_thread_db_callback): New functions.
5842 (try_thread_db_load_1): Run integrity checks if requested.
5843 (maintenance_check_libthread_db): New function.
5844 (_initialize_thread_db): Register "maint check libthread-db"
5845 and "maint set/show check-libthread-db".
5846 * NEWS: Mention the above new commands.
5847
5848 2018-06-08 Tom Tromey <tom@tromey.com>
5849
5850 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5851 now a method.
5852
5853 2018-06-08 Tom Tromey <tom@tromey.com>
5854
5855 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5856
5857 2018-06-08 Tom Tromey <tom@tromey.com>
5858
5859 * common/btrace-common.h (struct btrace_data): Add constructor,
5860 destructor, move assignment operator.
5861 <empty, clear, fini>: New methods.
5862 <format>: Initialize.
5863 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5864 (btrace_data_empty): Don't declare.
5865 * common/btrace-common.c (btrace_data_init): Remove.
5866 (btrace_data::fini): Rename from btrace_data_fini.
5867 (btrace_data::empty): Rename from btrace_data_empty.
5868 (btrace_data::clear): Rename from btrace_data_clear. Return
5869 bool.
5870 * btrace.h (make_cleanup_btrace_data): Don't declare.
5871 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5872 (parse_xml_btrace): Update.
5873 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5874 (maint_btrace_clear_packet_history_cmd): Update.
5875
5876 2018-06-07 Pedro Alves <palves@redhat.com>
5877
5878 * target.h (target_ops) <beneath>: Now a method. All references
5879 updated.
5880 (class target_stack): New.
5881 * target.c (g_target_stack): New.
5882 (g_current_top_target): Delete.
5883 (current_top_target): Get the top target out of g_target_stack.
5884 (target_stack::push, target_stack::unpush): New.
5885 (push_target, unpush_target): Reimplement.
5886 (target_is_pushed): Reimplement in terms of g_target_stack.
5887 (target_ops::beneath, target_stack::find_beneath): New.
5888
5889 2018-06-07 Pedro Alves <palves@redhat.com>
5890
5891 * target.h (find_target_beneath): Delete declaration.
5892 * target.c (find_target_beneath): Delete definition.
5893 * aix-thread.c: All callers of find_target_beneath adjusted to
5894 call target_ops::beneath instead.
5895 * bsd-uthread.c: Likewise.
5896 * linux-thread-db.c: Likewise.
5897 * ravenscar-thread.c: Likewise.
5898 * sol-thread.c: Likewise.
5899 * spu-multiarch.c: Likewise.
5900
5901 2018-06-07 Pedro Alves <palves@redhat.com>
5902
5903 * target.h (target_ops) <beneath>: Now a method. All references
5904 updated.
5905 (target_ops) <m_beneath>: New.
5906 * target.c (target_ops::beneath): New.
5907 * corelow.c: Adjust all references to target_ops::beneath.
5908 * linux-thread-db.c: Likewise.
5909 * make-target-delegates: Likewise.
5910 * record-btrace.c: Likewise.
5911 * record-full.c: Likewise.
5912 * remote.c: Likewise.
5913 * target.c: Likewise.
5914 * target-delegates.c: Regenerate.
5915
5916 2018-06-07 Pedro Alves <palves@redhat.com>
5917
5918 * target.h (target_stack): Delete.
5919 (current_top_target): Declare function.
5920 * target.c (target_stack): Delete.
5921 (g_current_top_target): New.
5922 (current_top_target): New function.
5923 * auxv.c: Use current_top_target instead of target_stack
5924 throughout.
5925 * avr-tdep.c: Likewise.
5926 * breakpoint.c: Likewise.
5927 * corefile.c: Likewise.
5928 * elfread.c: Likewise.
5929 * eval.c: Likewise.
5930 * exceptions.c: Likewise.
5931 * frame.c: Likewise.
5932 * gdbarch-selftests.c: Likewise.
5933 * gnu-v3-abi.c: Likewise.
5934 * ia64-tdep.c: Likewise.
5935 * ia64-vms-tdep.c: Likewise.
5936 * infcall.c: Likewise.
5937 * infcmd.c: Likewise.
5938 * infrun.c: Likewise.
5939 * linespec.c: Likewise.
5940 * linux-tdep.c: Likewise.
5941 * minsyms.c: Likewise.
5942 * ppc-linux-nat.c: Likewise.
5943 * ppc-linux-tdep.c: Likewise.
5944 * procfs.c: Likewise.
5945 * regcache.c: Likewise.
5946 * remote.c: Likewise.
5947 * rs6000-tdep.c: Likewise.
5948 * s390-linux-nat.c: Likewise.
5949 * s390-tdep.c: Likewise.
5950 * solib-aix.c: Likewise.
5951 * solib-darwin.c: Likewise.
5952 * solib-dsbt.c: Likewise.
5953 * solib-spu.c: Likewise.
5954 * solib-svr4.c: Likewise.
5955 * solib-target.c: Likewise.
5956 * sparc-tdep.c: Likewise.
5957 * sparc64-tdep.c: Likewise.
5958 * spu-tdep.c: Likewise.
5959 * symfile.c: Likewise.
5960 * symtab.c: Likewise.
5961 * target-descriptions.c: Likewise.
5962 * target-memory.c: Likewise.
5963 * target.c: Likewise.
5964 * target.h: Likewise.
5965 * tracefile-tfile.c: Likewise.
5966 * tracepoint.c: Likewise.
5967 * valops.c: Likewise.
5968 * valprint.c: Likewise.
5969 * value.c: Likewise.
5970 * windows-tdep.c: Likewise.
5971 * mi/mi-main.c: Likewise.
5972
5973 2018-06-07 Tom Tromey <tom@tromey.com>
5974
5975 * valprint.h (build_address_symbolic): Declare.
5976 * printcmd.c (print_address_symbolic): Update.
5977 (build_address_symbolic): Change "name" and "filename" to
5978 std::string.
5979 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5980 Update.
5981 * defs.h (build_address_symbolic): Remove declaration.
5982
5983 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5984
5985 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5986 (aarch64_vnv_type): Add function.
5987 (aarch64_pseudo_register_name): Add V regs for SVE.
5988 (aarch64_pseudo_register_type): Likewise.
5989 (aarch64_pseudo_register_reggroup_p): Likewise.
5990 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5991 (aarch64_pseudo_read_value): Add V regs for SVE.
5992 (aarch64_pseudo_write_2): Use V0 offset for SVE
5993 (aarch64_pseudo_write): Add V regs for SVE.
5994 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5995
5996 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5997
5998 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5999 (sve_vl_from_vq): Likewise.
6000
6001 2018-06-05 Tom Tromey <tom@tromey.com>
6002
6003 * cli/cli-cmds.c (show_version): Update.
6004 * top.c (print_gdb_version): Add "interactive" parameter.
6005 Update.
6006 * main.c (captured_main_1): Update.
6007 * top.h (print_gdb_version): Add "interactive" parameter and a
6008 comment.
6009
6010 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6011
6012 * common/enum-flags.h: Add trailing semicolon to example in
6013 comment.
6014
6015 2018-06-05 Tom Tromey <tom@tromey.com>
6016
6017 PR cli/12326:
6018 * NEWS: Add entry about pager.
6019 * utils.c (pagination_disabled_for_command): New global.
6020 (prompt_for_continue): Allow "c" response to prompt.
6021 (reinitialize_more_filter): Clear
6022 pagination_disabled_for_command.
6023 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6024
6025 2018-06-04 Tom Tromey <tom@tromey.com>
6026
6027 * ada-lang.h (ada_lookup_symbol_list): Update.
6028 * ada-lang.c (resolve_subexp): Update.
6029 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6030 parameter.
6031 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6032 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6033 results parameter to std::vector.
6034 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6035 Update.
6036 * ada-exp.y (block_lookup): Update.
6037 (select_possible_type_sym): Change type of syms. Remove nsyms
6038 parameter.
6039 (write_var_or_type, write_name_assoc): Update.
6040
6041 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6042
6043 * windows-nat.c (windows_nat_target::xfer_partial): Return
6044 TARGET_XFER_E_IO if we need to delegate to the target beneath
6045 but BENEATH is NULL.
6046
6047 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6048
6049 * Makefile.in (config.status): Add configure.nat as a
6050 dependency.
6051
6052 2018-06-04 Tom Tromey <tom@tromey.com>
6053
6054 * cp-name-parser.y (cpname_state): Add method declarations.
6055 (HANDLE_QUAL): Update.
6056 (cpname_state::d_grab, cpname_state::fill_comp)
6057 (cpname_state::make_operator, cpname_state::make_dtor)
6058 (cpname_state::make_builtin_type, cpname_state::make_name)
6059 (cpname_state::d_qualify, cpname_state::d_int_type)
6060 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6061 (%union): Move earlier.
6062
6063 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6064
6065 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6066
6067 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6068
6069 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6070 (aarch64_pseudo_write_1): Likewise.
6071 (aarch64_pseudo_read_value): Use helper.
6072 (aarch64_pseudo_write): Likewise.
6073
6074 2018-06-04 Pedro Alves <palves@redhat.com>
6075
6076 * darwin-nat.c (darwin_ops): Delete.
6077 (darwin_attach_pid): Use get_native_target.
6078
6079 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6080
6081 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6082 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6083
6084 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6085
6086 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6087 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6088 (aarch64_gdbarch_init): Check for SVE.
6089 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6090
6091 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6092
6093 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6094 * aarch64-tdep.h (aarch64_read_description): Likewise.
6095 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6096 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6097 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6098 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6099 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6100
6101 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6102
6103 * value.c (value_fetch_lazy_bitfield): New.
6104 (value_fetch_lazy_memory): New.
6105 (value_fetch_lazy_register): New.
6106 (value_fetch_lazy): Factor out to smaller functions.
6107
6108 2018-06-01 Tom Tromey <tom@tromey.com>
6109
6110 * cp-name-parser.y (backslashable, represented): Now const.
6111
6112 2018-06-01 Tom Tromey <tom@tromey.com>
6113
6114 * cp-name-parser.y: Include parser-defs.h.
6115 (parser_fprintf): Remove declaration.
6116
6117 2018-06-01 Tom Tromey <tom@tromey.com>
6118
6119 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6120 %parse-param.
6121 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6122 (global_result): Remove globals.
6123 (struct cpname_state): New.
6124 (yyparse): Don't declare.
6125 (yylex, yyerror): Move declarations after %union.
6126 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6127 (make_name): Add state parameter.
6128 Update all callers.
6129 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6130 parameter.
6131 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6132 Update.
6133 (yylex): Add lvalp, state parameters.
6134 (yyerror): Add state parameter.
6135 (cp_demangled_name_to_comp): Update.
6136
6137 2018-06-01 Tom Tromey <tom@tromey.com>
6138
6139 * cp-name-parser.y (parser_fprintf): Declare.
6140 (GDB_YY_REMAP_PREFIX): Define.
6141 Include yy-remap.h. Don't redefine yy* identifiers.
6142
6143 2018-06-01 Tom Tromey <tom@tromey.com>
6144
6145 * python/py-type.c (typy_legacy_template_argument): Update.
6146 * cp-support.h (cp_demangled_name_to_comp): Update.
6147 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6148 parameter to be a "std::string *".
6149 (main): Update.
6150
6151 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6152
6153 * ada-lex.l: Include "diagnostics.h" instead of
6154 "common/diagnostics.h".
6155 * unittests/environ-selftests.c: Likewise.
6156 * common/diagnostics.h: Moved to ../include.
6157
6158 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6159
6160 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6161 to language_mode_manual while calling breakpoint_re_set_one.
6162
6163 2018-06-01 Tom Tromey <tom@tromey.com>
6164
6165 * valops.c (value_cast_structs, destructor_name_p): Update.
6166 * symtab.c (gdb_mangle_name): Update.
6167 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6168 Update.
6169 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6170 (pascal_object_print_value_fields, pascal_object_print_value):
6171 Update.
6172 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6173 * linespec.c (find_methods): Update.
6174 * gdbtypes.h (type_name_no_tag): Remove.
6175 (type_name_or_error): Rename from type_name_no_tag_or_error.
6176 * gdbtypes.c (type_name_no_tag): Remove.
6177 (type_name_or_error): Rename from type_name_no_tag_or_error.
6178 (lookup_struct_elt_type, check_typedef): Update.
6179 * expprint.c (print_subexp_standard): Update.
6180 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6181 * d-namespace.c (d_lookup_nested_symbol): Update.
6182 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6183 (cp_print_class_member): Update.
6184 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6185 * completer.c (add_struct_fields): Update.
6186 * c-typeprint.c (cp_type_print_derivation_info)
6187 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6188 Update.
6189 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6190 (ada_prefer_type, ada_is_exception_sym): Update.
6191
6192 2018-06-01 Tom Tromey <tom@tromey.com>
6193
6194 * valops.c (enum_constant_from_type, value_namespace_elt)
6195 (value_maybe_namespace_elt): Update.
6196 * valarith.c (find_size_for_pointer_math): Update.
6197 * target-descriptions.c (make_gdb_type): Update.
6198 * symmisc.c (print_symbol): Update.
6199 * stabsread.c (define_symbol, read_type)
6200 (complain_about_struct_wipeout, add_undefined_type)
6201 (cleanup_undefined_types_1): Update.
6202 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6203 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6204 (rust_internal_print_type, rust_composite_type)
6205 (rust_evaluate_funcall, rust_evaluate_subexp)
6206 (rust_inclusive_range_type_p): Update.
6207 * python/py-type.c (typy_get_tag): Update.
6208 * p-typeprint.c (pascal_type_print_base): Update.
6209 * mdebugread.c (parse_symbol, parse_type): Update.
6210 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6211 Update.
6212 * guile/scm-type.c (gdbscm_type_tag): Update.
6213 * go-lang.c (sixg_string_p): Update.
6214 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6215 Update.
6216 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6217 (TYPE_TAG_NAME): Remove.
6218 * gdbtypes.c (type_name_no_tag): Simplify.
6219 (check_typedef, check_types_equal, recursive_dump_type)
6220 (copy_type_recursive, arch_composite_type): Update.
6221 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6222 in summary mode when needed.
6223 * eval.c (evaluate_funcall): Update.
6224 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6225 (process_structure_scope, read_enumeration_type)
6226 (read_namespace_type, read_module_type, determine_prefix): Update.
6227 * cp-support.c (inspect_type): Update.
6228 * coffread.c (process_coff_symbol, decode_base_type): Update.
6229 * c-varobj.c (c_is_path_expr_parent): Update.
6230 * c-typeprint.c (c_type_print_base_struct_union): Update.
6231 (c_type_print_base_1): Update. Print struct/class/union/enum in
6232 summary when using C language.
6233 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6234 (gen_maybe_namespace_elt): Update.
6235 * ada-lang.c (ada_type_name): Simplify.
6236 (empty_record, ada_template_to_fixed_record_type_1)
6237 (template_to_static_fixed_type)
6238 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6239
6240 2018-06-01 Tom Tromey <tom@tromey.com>
6241
6242 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6243 c_print_type.
6244 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6245 (c_print_type): Update.
6246 (c_print_type): New overload.
6247 (c_type_print_varspec_prefix, c_type_print_args)
6248 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6249 (c_type_print_base_struct_union, c_type_print_base_1)
6250 (cp_type_print_method_args): Add "language" parameter.
6251 (c_type_print_base): Update.
6252 * c-lang.h (c_print_type): Add new overload.
6253
6254 2018-06-01 Tom Tromey <tom@tromey.com>
6255
6256 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6257 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6258
6259 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6260
6261 * aarch64-tdep.c (aarch64_sve_register_names): New const
6262 var.
6263 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6264 (AARCH64_SVE_Z_REGS_NUM): New define.
6265 (AARCH64_SVE_P_REGS_NUM): Likewise.
6266 (AARCH64_SVE_NUM_REGS): Likewise.
6267
6268 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6269
6270 * nat/linux-ptrace.h [__alpha__]
6271 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6272 definitions.
6273
6274 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6275
6276 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6277 the endianness selected.
6278 * NEWS: Document `set endian auto' mode operation update.
6279
6280 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6281
6282 * Makefile.in: Add new header.
6283 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6284 (sve_vl_from_vg): Likewise.
6285 (sve_vq_from_vl): Likewise.
6286 (sve_vl_from_vq): Likewise.
6287 (sve_vq_from_vg): Likewise.
6288 (sve_vg_from_vq): Likewise.
6289 * configure.nat: Add new c file.
6290 * nat/aarch64-sve-linux-ptrace.c: New file.
6291 * nat/aarch64-sve-linux-ptrace.h: New file.
6292
6293 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6294
6295 * aarch64-linux-nat.c (aarch64_linux_read_description):
6296 Add parmeter zero.
6297 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6298 Likewise.
6299 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6300 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6301 (aarch64_gdbarch_init): Add parmeter zero.
6302 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6303 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6304 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6305 parmeter.
6306 * doc/gdb.texinfo: Describe SVE feature
6307 * features/aarch64-sve.c: New file.
6308
6309 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6310
6311 PR gdb/23210
6312 * gdbarch.sh (significant_addr_bit): Default to zero when
6313 not set by target architecture.
6314 * gdbarch.c: Re-generated.
6315 * utils.c (address_significant): Update.
6316
6317 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6318
6319 * stack.c (func_command): Remove trailing newline in call to error.
6320
6321 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6322
6323 * regcache.h (regcache_raw_collect): Remove, update callers to
6324 use regcache::raw_collect.
6325 * regcache.c (regcache_raw_collect): Remove.
6326
6327 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6328
6329 * regcache.h (regcache_raw_supply): Remove, update callers to
6330 use detached_regcache::raw_supply.
6331 * regcache.c (regcache_raw_supply): Remove.
6332
6333 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6334
6335 * regcache.h (regcache_cooked_write_part): Remove, update
6336 callers to use regcache::cooked_write_part.
6337 * regcache.c (regcache_cooked_write_part): Remove.
6338
6339 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6340
6341 * regcache.h (regcache_cooked_read_part): Remove, update callers
6342 to use readable_regcache::cooked_read_part.
6343 * regcache.c (regcache_cooked_read_part): Remove.
6344
6345 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6346
6347 * regcache.h (regcache_cooked_read_value): Remove, update
6348 callers to use readable_regcache::cooked_read_value.
6349 * regcache.c (regcache_cooked_read_value): Remove.
6350
6351 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6352
6353 * regcache.h (regcache_cooked_write): Remove, update callers to
6354 use regcache::cooked_write.
6355 * regcache.c (regcache_cooked_write): Remove.
6356
6357 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6358
6359 * regcache.h (regcache_invalidate): Remove, update callers to
6360 use detached_regcache::invalidate instead.
6361 * regcache.c (regcache_invalidate): Remove.
6362
6363 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6364
6365 * regcache.h (regcache_raw_write_part): Remove, update callers
6366 to use regcache::raw_write_part instead.
6367 * regcache.c (regcache_raw_write_part): Remove.
6368
6369 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6370
6371 * regcache.h (regcache_raw_read_part): Remove, update callers to
6372 use readable_regcache::raw_read_part instead.
6373 * regcache.c (regcache_raw_read_part): Remove.
6374
6375 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6376
6377 * regcache.h (regcache_cooked_read): Remove, update callers to
6378 use readable_regcache::cooked_read instead.
6379 * regcache.c (regcache_cooked_read): Remove.
6380
6381 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6382
6383 * regcache.h (regcache_raw_write): Remove, update callers to use
6384 regcache::raw_write instead.
6385 * regcache.c (regcache_raw_write): Remove.
6386
6387 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6388
6389 * regcache.h (regcache_raw_read): Remove, update callers to use
6390 readable_regcache::raw_read instead.
6391 * regcache.c (regcache_raw_read): Remove.
6392
6393 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * regcache.h (regcache_raw_update): Remove, update callers to
6396 use readable_regcache::raw_update instead.
6397 * regcache.c (regcache_raw_update): Remove.
6398
6399 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6400
6401 * regcache.h (regcache_register_status): Remove, update callers
6402 to use reg_buffer::get_register_status directly instead.
6403 * regcache.c (regcache_register_status): Remove.
6404
6405 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6406
6407 * regcache.h (regcache_get_ptid): Remove, update all callers to
6408 call regcache::ptid instead.
6409 * regcache.c (regcache_get_ptid): Remove.
6410
6411 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6412
6413 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6414
6415 2018-05-30 Pedro Alves <palves@redhat.com>
6416
6417 * common/common-exceptions.h (exception_rethrow): Use
6418 ATTRIBUTE_NORETURN.
6419
6420 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6421
6422 * breakpoint.c (print_solib_event, check_status_catch_solib):
6423 Remove struct keyword in range-based for loops.
6424 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6425 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6426 Likewise.
6427 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6428 Likewise.
6429 * symfile.c (addr_info_make_relative): Likewise.
6430 * thread.c (value_in_thread_stack_temporaries): Likewise.
6431
6432 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6433
6434 PR gdb/16841
6435 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6436 aggregate type to get its real type before accessing it.
6437
6438 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6439
6440 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6441 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6442 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6443 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6444 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6445 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6446 * printcmd.c (info_address_command): Likewise.
6447
6448 2018-05-29 Tom Tromey <tom@tromey.com>
6449
6450 * windows-nat.c (handle_exception): Update fall-through comment.
6451
6452 2018-05-29 Tom Tromey <tom@tromey.com>
6453
6454 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6455 (struct program_space) <added_solibs>: Now a std::vector.
6456 * breakpoint.c (print_solib_event): Update.
6457 (check_status_catch_solib): Update.
6458 * progspace.c (clear_program_space_solib_cache): Update.
6459 * solib.c (update_solib_list): Update.
6460
6461 2018-05-29 Tom Tromey <tom@tromey.com>
6462
6463 * python/py-type.c (typy_richcompare): Update.
6464 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6465 * gdbtypes.h (types_deeply_equal): Return bool.
6466 (types_equal): Likewise.
6467 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6468 declare VEC.
6469 (check_types_equal): Change worklist to std::vector. Return
6470 bool.
6471 (struct type_equality_entry): Add constructor.
6472 (compare_maybe_null_strings): Return bool.
6473 (check_types_worklist): Return bool. Change worklist to
6474 std::vector.
6475 (types_deeply_equal): Use std::vector.
6476 (types_equal): Return bool.
6477 (compare_maybe_null_strings): Simplify.
6478
6479 2018-05-29 Tom Tromey <tom@tromey.com>
6480
6481 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6482
6483 2018-05-29 Tom Tromey <tom@tromey.com>
6484
6485 * objc-lang.h: Don't include cp-support.h.
6486 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6487 declare VEC.
6488
6489 2018-05-27 Tom Tromey <tom@tromey.com>
6490
6491 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6492
6493 2018-05-25 Tom Tromey <tom@tromey.com>
6494
6495 * value.c (value::location): Initialize.
6496
6497 2018-05-25 Tom Tromey <tom@tromey.com>
6498
6499 * dbxread.c (init_bincl_list): Remove.
6500 (bincl_list): Now a std::vector.
6501 (bincls_allocated, next_bincl): Remove.
6502 (free_bincl_list, do_free_bincl_list_cleanup)
6503 (make_cleanup_free_bincl_list): Remove.
6504 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6505 unique_xmalloc_ptr.
6506 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6507 (struct header_file_location): Add constructor.
6508 (add_bincl_to_list): Remove.
6509
6510 2018-05-25 Tom Tromey <tom@tromey.com>
6511
6512 * tui/tui.c (tui_enable): Update.
6513 * mi/mi-interp.c (mi_interp::init): Update.
6514 * interps.h (class interp) <name>: New method.
6515 <m_name>: Rename from name.
6516 (~scoped_restore_interp): Update.
6517 * interps.c (interp::interp): Update.
6518 (interp_add, interp_set, interp_lookup_existing)
6519 (current_interp_named_p): Update.
6520
6521 2018-05-25 Tom Tromey <tom@tromey.com>
6522
6523 * interps.c (interp_name): Remove.
6524 * mi/mi-interp.c (mi_interp::init): Update.
6525 * interps.h (interp_name): Remove.
6526 (~scoped_restore_interp): Update.
6527 * tui/tui.c (tui_enable): Update.
6528
6529 2018-05-25 Tom Tromey <tom@tromey.com>
6530
6531 * utils.c (fputs_maybe_filtered): Update.
6532 * linespec.c (decode_line_full): Update.
6533 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6534 (mi_print_breakpoint_for_event, mi_solib_loaded)
6535 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6536 (mi_user_selected_context_changed): Update.
6537 * mi/mi-main.c (mi_execute_command): Update.
6538 * cli/cli-script.c (execute_control_command): Update.
6539 * python/python.c (execute_gdb_command): Update.
6540 * solib.c (info_sharedlibrary_command): Update.
6541 * interps.c (interp_ui_out): Remove.
6542 * interps.h (interp_ui_out): Remove.
6543
6544 2018-05-25 Tom Tromey <tom@tromey.com>
6545
6546 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6547 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6548 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6549
6550 2018-05-25 Tom Tromey <tom@tromey.com>
6551
6552 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6553 * interps.c (interp_exec): Use scoped_restore.
6554
6555 2018-05-25 Tom Tromey <tom@tromey.com>
6556
6557 * remote.c (remote_target::remote_file_get): Use
6558 gdb::byte_vector.
6559 (remote_target::remote_file_put): Likewise.
6560
6561 2018-05-25 Tom Tromey <tom@tromey.com>
6562
6563 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6564 a std::string.
6565 (get_pe_section_index, add_pe_exported_sym): Update.
6566 (read_pe_exported_syms): Use gdb::def_vector.
6567
6568 2018-05-25 Tom Tromey <tom@tromey.com>
6569
6570 * frame.c (remove_prev_frame): Remove.
6571 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6572
6573 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6574
6575 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6576 Remove prototypes.
6577 * mips-linux-nat.c (supply_fpregset): Always call
6578 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6579 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6580 `mips_fill_fpregset'.
6581 * mips-linux-tdep.c (mips_supply_fpregset)
6582 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6583 (mips_fill_fpregset_wrapper): Remove functions.
6584 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6585 (mips_linux_fpregset): Remove variable.
6586 (mips_linux_iterate_over_regset_sections): Use
6587 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6588 (mips_linux_o32_sigframe_init): Remove comment.
6589
6590 2018-05-25 Pedro Alves <palves@redhat.com>
6591
6592 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6593 (struct readahead_cache, struct packet_reg, struct
6594 remote_arch_state, class remote_state): Move higher up in the
6595 file.
6596 (remote_target::m_remote_state): Now an object instead of a pointer.
6597 (remote_target::get_remote_state): Adjust.
6598
6599 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6600
6601 * stack.c (select_and_print_frame): Delete.
6602 (struct function_bounds): Move struct within function.
6603 (func_command): Most content moved into new function
6604 find_frame_for_function, use new function, print result, add
6605 function comment.
6606 (find_frame_for_function): New function, now returns a result.
6607
6608 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6609
6610 * stack.c (iterate_over_block_arg_vars): Fix comment.
6611 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6612
6613 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6614
6615 PR gdb/23203
6616 * frame.c
6617 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6618 Define.
6619 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6620 Define.
6621 * frame.h (class scoped_restore_selected_frame): New class.
6622 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6623 of any exception, use scoped_restore_selected_frame to restore the
6624 frame instead.
6625
6626 2018-05-24 Pedro Alves <palves@redhat.com>
6627
6628 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6629 override.
6630
6631 2018-05-23 Tom Tromey <tom@tromey.com>
6632
6633 * complaints.c (struct complaints): Remove.
6634 (symfile_complaint_book): Remove.
6635 (series): New global.
6636 (complaint_internal): Update.
6637 (clear_complaints): Update.
6638
6639 2018-05-23 Tom Tromey <tom@tromey.com>
6640
6641 * complaints.c (counters): New global.
6642 (struct complain): Remove.
6643 (struct complaints) <root>: Remove.
6644 (complaint_sentinel): Remove.
6645 (symfile_complaint_book): Update.
6646 (find_complaint) Remove.
6647 (complaint_internal, clear_complaints): Update.
6648
6649 2018-05-23 Tom Tromey <tom@tromey.com>
6650
6651 * complaints.c (struct complain) <file, line>: Remove.
6652 (find_complaint): Remove file, line parameters.
6653 (complaint_internal): Update.
6654
6655 2018-05-23 Tom Tromey <tom@tromey.com>
6656
6657 * complaints.c (vcomplaint): Remove.
6658 (complaint_internal) Merge in contents of vcomplaint.
6659
6660 2018-05-23 Tom Tromey <tom@tromey.com>
6661
6662 * complaints.c (struct complaints) <explanation>: Remove.
6663 (symfile_explanations): Remove.
6664 (symfile_complaint_book): Update.
6665 (vcomplaint): Update.
6666 (struct explanation): Remove.
6667
6668 2018-05-23 Tom Tromey <tom@tromey.com>
6669
6670 * complaints.c (symfile_complaints): Remove.
6671 (complaint_internal): Remove "complaints" parameter.
6672 (clear_complaints, vcomplaint): Remove "c" parameter.
6673 (get_complaints): Remove.
6674 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6675 (dwarf2_debug_line_missing_file_complaint)
6676 (dwarf2_debug_line_missing_end_sequence_complaint)
6677 (dwarf2_complex_location_expr_complaint)
6678 (dwarf2_const_value_length_mismatch_complaint)
6679 (dwarf2_section_buffer_overflow_complaint)
6680 (dwarf2_macro_malformed_definition_complaint)
6681 (dwarf2_invalid_attrib_class_complaint)
6682 (create_addrmap_from_index, dw2_symtab_iter_next)
6683 (dw2_expand_marked_cus)
6684 (dw2_debug_names_iterator::find_vec_in_debug_names)
6685 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6686 (create_debug_type_hash_table, init_cutu_and_read_dies)
6687 (partial_die_parent_scope, add_partial_enumeration)
6688 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6689 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6690 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6691 (create_cus_hash_table, create_dwp_hash_table)
6692 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6693 (dwarf2_rnglists_process, dwarf2_ranges_process)
6694 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6695 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6696 (handle_struct_member_die, process_structure_scope)
6697 (read_array_type, read_common_block, read_module_type)
6698 (read_tag_pointer_type, read_typedef, read_base_type)
6699 (read_subrange_type, load_partial_dies, partial_die_info::read)
6700 (partial_die_info::read, partial_die_info::read)
6701 (partial_die_info::read, read_checked_initial_length_and_offset)
6702 (dwarf2_string_attr, read_formatted_entries)
6703 (dwarf_decode_line_header)
6704 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6705 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6706 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6707 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6708 (get_signatured_type, get_DW_AT_signature_type)
6709 (decode_locdesc, file_file_name, consume_improper_spaces)
6710 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6711 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6712 (dwarf2_symbol_mark_computed, set_die_type)
6713 (read_attribute_value): Update.
6714 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6715 Update.
6716 * dbxread.c (unknown_symtype_complaint)
6717 (lbrac_mismatch_complaint, repeated_header_complaint)
6718 (set_namestring, function_outside_compilation_unit_complaint)
6719 (read_dbx_symtab, process_one_symbol): Update.
6720 * gdbtypes.c (stub_noname_complaint): Update.
6721 * windows-nat.c (handle_unload_dll): Update.
6722 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6723 (decode_base_type): Update.
6724 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6725 (eb_complaint, record_include_begin, record_include_end)
6726 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6727 (process_xcoff_symbol, read_symbol)
6728 (function_outside_compilation_unit_complaint)
6729 (scan_xcoff_symtab): Update.
6730 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6731 * buildsym.c (finish_block_internal, make_blockvector)
6732 (end_symtab_get_static_block, augment_type_symtab): Update.
6733 * dtrace-probe.c (dtrace_process_dof)
6734 (dtrace_static_probe_ops::get_probes): Update.
6735 * complaints.h (struct complaint): Don't declare.
6736 (symfile_complaints): Remove.
6737 (complaint_internal): Remove "complaints" parameter.
6738 (complaint): Likewise.
6739 (clear_complaints): Likewise.
6740 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6741 (reread_symbols): Update.
6742 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6743 (dwarf2_frame_cache, decode_frame_entry): Update.
6744 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6745 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6746 (info_selectors_command): Update.
6747 * macrotab.c (macro_include, check_for_redefinition)
6748 (macro_undef): Update.
6749 * objfiles.c (filter_overlapping_sections): Update.
6750 * stabsread.c (invalid_cpp_abbrev_complaint)
6751 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6752 (define_symbol, error_type, read_type, rs6000_builtin_type)
6753 (stabs_method_name_from_physname, read_member_functions)
6754 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6755 (attach_fields_to_type, complain_about_struct_wipeout)
6756 (read_range_type, read_args, common_block_start)
6757 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6758 Update.
6759 * mdebugread.c (index_complaint, unknown_ext_complaint)
6760 (basic_type_complaint, bad_tag_guess_complaint)
6761 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6762 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6763 (parse_procedure, parse_lines)
6764 (function_outside_compilation_unit_complaint)
6765 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6766 (bad_tag_guess_complaint, reg_value_complaint): Update.
6767 * cp-support.c (demangled_name_complaint): Update.
6768 * macroscope.c (sal_macro_scope): Update.
6769 * dwarf-index-write.c (class debug_names): Update.
6770
6771 2018-05-23 Tom Tromey <tom@tromey.com>
6772
6773 * complaints.c (clear_complaints): Remove "noisy" parameter.
6774 * complaints.h (clear_complaints): Update.
6775 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6776 (reread_symbols): Update.
6777
6778 2018-05-23 Tom Tromey <tom@tromey.com>
6779
6780 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6781 SUBSEQUENT_MESSAGE.
6782 (vcomplaint, clear_complaints): Update.
6783 (symfile_explanations): Remove some messages.
6784
6785 2018-05-23 Tom Tromey <tom@tromey.com>
6786
6787 * complaints.c (internal_complaint): Remove.
6788 * complaints.h (internal_complaint): Remove.
6789
6790 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6791
6792 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6793
6794 2018-05-22 Pedro Alves <palves@redhat.com>
6795
6796 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6797 (remote_fileio_badfd, remote_fileio_return_errno)
6798 (remote_fileio_return_success, remote_fileio_func_open)
6799 (remote_fileio_func_open, remote_fileio_func_close)
6800 (remote_fileio_func_read, remote_fileio_func_write)
6801 (remote_fileio_func_lseek, remote_fileio_func_rename)
6802 (remote_fileio_func_unlink, remote_fileio_func_stat)
6803 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6804 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6805 remote_target parameter.
6806 (remote_fio_func_map) <func>: Add remote_target parameter.
6807 (do_remote_fileio_request, remote_fileio_request):
6808 * remote-fileio.h (remote_fileio_request):
6809 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6810 remote_target parameter.
6811 (remote_notif_process, handle_notification): Adjust to pass down
6812 the remote.
6813 (remote_notif_state_allocate): Add remote_target parameter. Save
6814 it.
6815 * remote-notif.h (struct remote_target): Forward declare.
6816 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6817 remote_target parameter.
6818 (struct remote_notif_state) <remote>: New field.
6819 (remote_notif_ack, remote_notif_parse): Add remote_target
6820 parameter.
6821 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6822 remote_target parameter.
6823 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6824 (threads_listing_context, rmt_thread_action, protocol_feature)
6825 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6826 (packet_result, struct threads_listing_context, remote_state):
6827 Move definitions and declarations higher up.
6828 (remote_target) <~remote_target>: Declare.
6829 (remote_download_command_source, remote_file_put, remote_file_get)
6830 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6831 (remote_hostio_pread_vFile, remote_hostio_send_command)
6832 (remote_hostio_set_filesystem, remote_hostio_open)
6833 (remote_hostio_close, remote_hostio_unlink, remote_state)
6834 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6835 (get_memory_write_packet_size, get_memory_read_packet_size)
6836 (append_pending_thread_resumptions, remote_detach_1)
6837 (append_resumption, remote_resume_with_vcont)
6838 (add_current_inferior_and_thread, wait_ns, wait_as)
6839 (process_stop_reply, remote_notice_new_inferior)
6840 (process_initial_stop_replies, remote_add_thread)
6841 (btrace_sync_conf, remote_btrace_maybe_reopen)
6842 (remove_new_fork_children, kill_new_fork_children)
6843 (discard_pending_stop_replies, stop_reply_queue_length)
6844 (check_pending_events_prevent_wildcard_vcont)
6845 (discard_pending_stop_replies_in_queue, stop_reply)
6846 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6847 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6848 (remote_interrupt_as, remote_interrupt_ns)
6849 (remote_get_noisy_reply, remote_query_attached)
6850 (remote_add_inferior, remote_current_thread, get_current_thread)
6851 (set_thread, set_general_thread, set_continue_thread)
6852 (set_general_process, write_ptid)
6853 (remote_unpack_thread_info_response, remote_get_threadinfo)
6854 (parse_threadlist_response, remote_get_threadlist)
6855 (remote_threadlist_iterator, remote_get_threads_with_ql)
6856 (remote_get_threads_with_qxfer)
6857 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6858 (get_offsets, remote_check_symbols, remote_supported_packet)
6859 (remote_query_supported, remote_packet_size)
6860 (remote_serial_quit_handler, remote_detach_pid)
6861 (remote_vcont_probe, remote_resume_with_hc)
6862 (send_interrupt_sequence, interrupt_query)
6863 (remote_notif_get_pending_events, fetch_register_using_p)
6864 (send_g_packet, process_g_packet, fetch_registers_using_g)
6865 (store_register_using_P, store_registers_using_G)
6866 (set_remote_traceframe, check_binary_download)
6867 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6868 (remote_xfer_live_readonly_partial, remote_read_bytes)
6869 (remote_send_printf, remote_flash_write, readchar)
6870 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6871 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6872 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6873 (extended_remote_disable_randomization, extended_remote_run)
6874 (send_environment_packet, extended_remote_environment_support)
6875 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6876 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6877 (packet_command): Now methods of ...
6878 (remote_target): ... this class.
6879 (m_remote_state) <remote_target>: New field.
6880 (struct remote_state) <stop_reply_queue,
6881 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6882 fields.
6883 (remote_state::remote_state): Allocate stop_reply_queue.
6884 (remote_state): Delete global.
6885 (get_remote_state_raw): Delete.
6886 (remote_target::get_remote_state): Allocate m_remote_state on
6887 demand.
6888 (get_current_remote_target): New.
6889 (remote_ops, extended_remote_ops): Delete.
6890 (wait_forever_enabled_p, remote_async_inferior_event_token):
6891 Delete, moved to struct remote_state.
6892 (remote_target::close): Delete self. Destruction bits split to
6893 ...
6894 (remote_target::~remote_target): ... this.
6895 (show_memory_packet_size): Adjust to use
6896 get_current_remote_target.
6897 (struct protocol_feature) <func>: Add remote_target parameter.
6898 All callers adjusted.
6899 (curr_quit_handler_target): New.
6900 (remote_serial_quit_handler): Reimplement.
6901 (remote_target::open_1): Adjust to use get_current_remote_target.
6902 Heap-allocate remote_target/extended_remote_target instances.
6903 (vcont_builder::vcont_builder): Add remote_target parameter, and
6904 save it in m_remote. All callers adjusted.
6905 (vcont_builder::m_remote): New field.
6906 (vcont_builder::restart, vcont_builder::flush)
6907 (vcont_builder::push_action): Use it.
6908 (remote_target::commit_resume): Use it.
6909 (struct queue_iter_param) <remote>: New field.
6910 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6911 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6912 (check_pending_event_prevents_wildcard_vcont_callback)
6913 (remote_target::check_pending_events_prevent_wildcard_vcont)
6914 (remote_target::discard_pending_stop_replies)
6915 (remote_target::discard_pending_stop_replies_in_queue)
6916 (remote_target::remote_notif_remove_queued_reply): Fill in
6917 'remote' field.
6918 (remote_notif_get_pending_events): New.
6919 (remote_target::readchar, remote_target::remote_serial_write):
6920 Save/restore curr_quit_handler_target.
6921 (putpkt): New.
6922 (kill_new_fork_children): Fill in 'remote' field.
6923 (packet_command): Use get_current_remote_target, defer to
6924 remote_target method of same name.
6925 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6926 parameter, and save it in m_remote. All callers adjusted.
6927 (scoped_remote_fd::release): Use m_remote.
6928 (scoped_remote_fd::m_remote): New field.
6929 (remote_file_put, remote_file_get, remote_file_delete): Use
6930 get_current_remote_target, defer to remote_target method of same
6931 name.
6932 (remote_btrace_reset): Add remote_state paremeter. Update all
6933 callers.
6934 (remote_async_inferior_event_handler). Pass down 'data'.
6935 (remote_new_objfile): Use get_current_remote_target.
6936 (remote_target::vcont_r_supported): New.
6937 (set_range_stepping): Use get_current_remote_target and
6938 remote_target::vcont_r_supported.
6939 (_initialize_remote): Don't allocate 'remote_state' and
6940 'stop_reply_queue' globals.
6941 * remote.h (struct remote_target): Forward declare.
6942 (getpkt, putpkt, remote_notif_get_pending_events): Add
6943 'remote_target' parameter.
6944
6945 2018-05-22 Pedro Alves <palves@redhat.com>
6946
6947 * remote.c (vcont_builder): Now a class. Make all data members
6948 private.
6949 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6950 Declare methods.
6951 (vcont_builder_restart): Rename to ...
6952 (vcont_builder::restart): ... this.
6953 (vcont_builder_flush): Rename to ...
6954 (vcont_builder::flush): ... this.
6955 (vcont_builder_push_action): Rename to ...
6956 (vcont_builder::push_action): ... this.
6957 (remote_target::commit_resume): Adjust.
6958
6959 2018-05-22 Pedro Alves <palves@redhat.com>
6960
6961 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6962 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6963 (get_fixed_memory_packet_size): New.
6964 (get_memory_packet_size): Use it.
6965 (set_memory_packet_size): Don't override the config size with
6966 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6967 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6968 Don't refer to get_memory_packet_size if not connected to a remote
6969 target. Show "(default)" if configured size is 0.
6970
6971 2018-05-22 Pedro Alves <palves@redhat.com>
6972
6973 * remote.c (remote_target::mourn_inferior): Move
6974 discard_pending_stop_replies call here from ...
6975 (_initialize_remote): ... here.
6976
6977 2018-05-22 Pedro Alves <palves@redhat.com>
6978
6979 * remote.c (compare_section_command): Remove set_general_process
6980 call.
6981
6982 2018-05-22 Pedro Alves <palves@redhat.com>
6983
6984 * remote.c (struct packet_reg, struct remote_arch_state):
6985 Move higher up in the file.
6986 (remote_state) <m_arch_states>: Store remote_arch_state values
6987 instead of remote_arch_state pointers.
6988 (remote_state::get_remote_arch_state): Adjust.
6989
6990 2018-05-22 Pedro Alves <palves@redhat.com>
6991
6992 * remote.c: Include <unordered_map>.
6993 (remote_state): Now a class.
6994 (remote_state) <get_remote_arch_state>: Declare method.
6995 <get_remote_arch_state>: New field.
6996 (remote_arch_state) <remote_arch_state>: Declare ctor.
6997 <regs>: Now a unique_ptr.
6998 (remote_gdbarch_data_handle): Delete.
6999 (get_remote_arch_state): Delete.
7000 (remote_state::get_remote_arch_state): New.
7001 (get_remote_state): Adjust to call remote_state's
7002 get_remote_arch_state method.
7003 (init_remote_state): Delete, bits factored out to ...
7004 (remote_arch_state::remote_arch_state): ... this new method.
7005 (get_remote_packet_size, get_memory_packet_size)
7006 (process_g_packet, remote_target::fetch_registers)
7007 (remote_target::prepare_to_store, store_registers_using_G)
7008 (remote_target::store_registers, remote_target::get_trace_status):
7009 Adjust to call remote_state's method.
7010 (_initialize_remote): Remove reference to
7011 remote_gdbarch_data_handle.
7012
7013 2018-05-22 Pedro Alves <palves@redhat.com>
7014
7015 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7016 pread>: New method declarations.
7017 (remote_target::open_1): Adjust.
7018 (readahead_cache_invalidate): Rename to ...
7019 (readahead_cache::invalidate): ... this, and adjust to be a class
7020 method.
7021 (readahead_cache_invalidate_fd): Rename to ...
7022 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7023 class method.
7024 (remote_hostio_pwrite): Adjust.
7025 (remote_hostio_pread_from_cache): Rename to ...
7026 (readahead_cache::pread): ... this, and adjust to be a class
7027 method.
7028 (remote_hostio_close): Adjust.
7029
7030 2018-05-22 Pedro Alves <palves@redhat.com>
7031
7032 * remote.c (remote_hostio_close_cleanup): Delete.
7033 (class scoped_remote_fd): New.
7034 (remote_file_put, remote_file_get): Use it.
7035
7036 2018-05-22 Pedro Alves <palves@redhat.com>
7037
7038 (struct vCont_action_support): Use bool and initialize all fields.
7039 (struct readahead_cache): Initialize all fields.
7040 (remote_state): Use bool and initialize all fields.
7041 (remote_state::remote_state, remote_state::~remote_state): New.
7042 (new_remote_state): Delete.
7043 (_initialize_remote): Use new to allocate remote_state.
7044
7045 2018-05-22 Pedro Alves <palves@redhat.com>
7046 張俊芝 <zjz@zjz.name>
7047
7048 PR gdb/22973
7049 * c-exp.y: Include "c-support.h".
7050 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7051 of tolower. Use c_ident_is_alpha to scan names.
7052 * c-lang.c: Include "c-support.h".
7053 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7054 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7055 * c-support.h: New file, with bits factored out from ...
7056 * cp-name-parser.y: ... this file.
7057 Include "c-support.h".
7058 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7059 c-support.h and renamed.
7060 (symbol_end, yylex): Adjust.
7061
7062 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7063
7064 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7065 parameter type to CORE_ADDR.
7066 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7067 parameter type in declaration to CORE_ADDR.
7068 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7069 target_auxv_search to get AT_HWCAP and use the result to get the
7070 target description.
7071 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7072 to CORE_ADDR. Remove the cast of the return value to unsigned
7073 long. Fix error predicate of target_auxv_search.
7074 (ppc_linux_nat_target::read_description): Change the type of the
7075 hwcap variable to CORE_ADDR.
7076
7077 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7078
7079 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7080 if the size of fpscr is larger than 32 bits.
7081
7082 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7083
7084 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7085 (ppc32_linux_vsxregmap): New global.
7086 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7087 regcache_supply_regset, and regcache_collect_regset.
7088 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7089 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7090 (fetch_vsx_register, store_vsx_register): Remove.
7091 (fetch_vsx_registers): Add regno parameter. Get regset using
7092 ppc_linux_vsxregset. Use regset to supply registers.
7093 (store_vsx_registers): Add regno parameter. Get regset using
7094 ppc_linux_vsxregset. Use regset to collect registers.
7095 (fetch_register): Call fetch_vsx_registers instead of
7096 fetch_vsx_register.
7097 (store_register): Call store_vsx_registers instead of
7098 store_vsx_register.
7099 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7100 new regno parameter.
7101 (store_ppc_registers): Call store_vsx_registers with -1 for the
7102 new regno parameter.
7103 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7104 (ppc_collect_vsxregset): Remove.
7105
7106 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7107
7108 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7109 offset fields.
7110 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7111 for vector register offset fields.
7112 (ppc64_fbsd_reg_offsets): Likewise.
7113 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7114 to vector register offset fields.
7115 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7116 to vector register offset fields.
7117 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7118 vector register offset fields.
7119 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7120 initializers for vector register offset fields.
7121 (rs6000_aix64_reg_offsets): Likewise.
7122 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7123 (ppc_supply_vrregset): Remove.
7124 (ppc_collect_vrregset): Remove.
7125 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7126 (ppc_linux_vrregset) : New function.
7127 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7128 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7129 (ppc32_linux_vrregset): Remove.
7130 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7131 and use result instead of ppc32_linux_vrregset.
7132 (ppc32_linux_reg_offsets): Remove initializers for vector register
7133 offset fields.
7134 (ppc64_linux_reg_offsets): Likewise.
7135 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7136 * ppc-linux-nat.c: Include regset.h.
7137 (gdb_vrregset_t): Adjust comment to account for little-endian
7138 mode.
7139 (supply_vrregset, fill_vrregset): Remove.
7140 (fetch_altivec_register, store_altivec_register): Remove.
7141 (fetch_altivec_registers): Add regno parameter. Get regset using
7142 ppc_linux_vrregset. Use regset to supply registers.
7143 (store_altivec_registers): Add regno parameter. Get regset using
7144 ppc_linux_vrregset. Use regset to collect registers.
7145 (fetch_register): Call fetch_altivec_registers instead of
7146 fetch_altivec_register.
7147 (store_register): Call store_altivec_registers instead of
7148 store_altivec_register.
7149 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7150 the new regno parameter.
7151 (store_ppc_registers): Call store_altivec_registers with -1 for
7152 the new regno parameter.
7153
7154 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7155
7156 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7157 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7158 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7159 (gdb_vrregset_t): Change array type size to
7160 PPC_LINUX_SIZEOF_VRREGSET.
7161 (gdb_vsxregset_t): Change array type size to
7162 PPC_LINUX_SIZEOF_VSXREGSET.
7163 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7164 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7165 PPC_LINUX_SIZEOF_VSXREGSET.
7166
7167 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7168
7169 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7170 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7171 nat/ppc-linux.c.
7172 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7173 ppc_linux_target_wordsize with tid.
7174 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7175 wordsize with tid.
7176 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7177 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7178 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7179 tid parameter. Remove static specifier.
7180 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7181 (ppc_linux_target_wordsize): New declaration.
7182
7183 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7184
7185 * arch/ppc-linux-common.c: New file.
7186 * arch/ppc-linux-common.h: New file.
7187 * arch/ppc-linux-tdesc.h: New file.
7188 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7189 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7190 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7191 arch/ppc-linux-tdesc.h.
7192 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7193 arch/ppc-linux-tdesc.h.
7194 (ppc_linux_nat_target::read_description): Remove target
7195 description matching code. Fill a ppc_linux_features struct and
7196 call ppc_linux_match_description with it. Move comment about ISA
7197 2.05 to ppc-linux-common.c.
7198 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7199 arch/ppc-linux-tdesc.h.
7200 (ppc_linux_core_read_description): Remove target description
7201 matching code. Fill a ppc_linux_features struct and call
7202 ppc_linux_match_description with it.
7203 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7204 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7205 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7206 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7207 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7208 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7209 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7210 (tdesc_powerpc_e500l): Remove.
7211
7212 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7213
7214 * ada-lang.c (catch_assert_command): Pass empty string instead
7215 of NULL for excep_string argument.
7216
7217 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7218
7219 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7220 the width of the requested register exceeds the width of the
7221 `ptrace' data type.
7222
7223 2018-05-21 Tom Tromey <tom@tromey.com>
7224
7225 * printcmd.c (output_command): Remove.
7226 (output_command_const): Rename to output_command.
7227 * valprint.h (output_command): Rename from output_command_const.
7228 * tracepoint.c (trace_dump_actions): Call output_command.
7229
7230 2018-05-21 Tom Tromey <tom@tromey.com>
7231
7232 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7233 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7234 * ada-lang.h (create_ada_exception_catchpoint): Update.
7235 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7236 std::string.
7237 (create_excep_cond_exprs, ~ada_catchpoint)
7238 (should_stop_exception, print_one_exception)
7239 (print_mention_exception, print_recreate_exception): Update.
7240 (ada_get_next_arg): Remove.
7241 (catch_ada_exception_command_split): Use std::string. Change type
7242 of "excep_string", "cond_string".
7243 (catch_ada_exception_command): Update.
7244 (create_ada_exception_catchpoint): Change type of excep_string.
7245 (ada_exception_sal): Remove excep_string parameter.
7246 (~ada_catchpoint): Remove.
7247
7248 2018-05-21 Tom Tromey <tom@tromey.com>
7249
7250 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7251 cleanup.
7252
7253 2018-05-21 Tom Tromey <tom@tromey.com>
7254
7255 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7256 Return unique_xmalloc_ptr.
7257 (print_it_exception): Update.
7258
7259 2018-05-21 Tom Tromey <tom@tromey.com>
7260
7261 * tracepoint.c (trace_dump_actions): Use std::string.
7262
7263 2018-05-21 Tom Tromey <tom@tromey.com>
7264
7265 * symfile.c (reread_symbols): Use std::string for original_name.
7266
7267 2018-05-21 Tom Tromey <tom@tromey.com>
7268
7269 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7270 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7271 constructor.
7272
7273 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7274
7275 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7276 instance to...
7277 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7278 * objfiles.c (get_objfile_bfd_data): Allocate
7279 objfile_per_bfd_storage with obstack_new when allocating on
7280 obstack.
7281
7282 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7283
7284 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7285 OBSTACK_ZALLOC.
7286 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7287 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7288 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7289 (add_pending): Likewise.
7290 (parse_symbol): Likewise.
7291 (parse_partial_symbols): Likewise.
7292 (psymtab_to_symtab_1): Likewise.
7293 (new_psymtab): Likewise.
7294 (elfmdebug_build_psymtabs): Likewise.
7295 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7296 * objfiles.c (get_objfile_bfd_data): Likewise.
7297 (objfile_register_static_link): Likewise.
7298 * psymtab.c (allocate_psymtab): Likewise.
7299 * stabsread.c (read_member_functions): Likewise.
7300 * xcoffread.c (xcoff_end_psymtab): Likewise.
7301
7302 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7303
7304 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7305 compiler supports std::is_trivially_constructible.
7306 * common/poison.h: Include obstack.h.
7307 (IsMallocable): Define to is_trivially_constructible if the
7308 compiler supports it, define to true_type otherwise.
7309 (xobnew): New.
7310 (XOBNEW): Redefine.
7311 (xobnewvec): New.
7312 (XOBNEWVEC): Redefine.
7313 * gdb_obstack.h (obstack_zalloc): New.
7314 (OBSTACK_ZALLOC): Redefine.
7315 (obstack_calloc): New.
7316 (OBSTACK_CALLOC): Redefine.
7317 (obstack_new): New.
7318 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7319 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7320 gdbarch.c.
7321 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7322 obstack_calloc/obstack_zalloc.
7323 (gdbarch_obstack_zalloc): Remove.
7324 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7325
7326 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7327
7328 * stack.c (backtrace_command_1): Remove useless variable int i.
7329
7330 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7331
7332 * stack.c (print_frame_info): Fix comment.
7333
7334 2018-05-18 Tom Tromey <tom@tromey.com>
7335
7336 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7337 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7338 (~dwarf2_per_objfile): Update
7339 (dwarf2_get_dwz_file): Use new.
7340 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7341 unique_ptr.
7342
7343 2018-05-18 Tom Tromey <tom@tromey.com>
7344
7345 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7346 unique_ptr.
7347 * dwarf2read.c (struct dwp_file): Add constructor and
7348 initializers.
7349 (open_and_init_dwp_file): Return a unique_ptr.
7350 (dwarf2_per_objfile, create_dwp_hash_table)
7351 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7352 (lookup_dwo_unit_in_dwp): Update.
7353 (open_and_init_dwp_file, get_dwp_file): Update.
7354
7355 2018-05-18 Tom Tromey <tom@tromey.com>
7356
7357 * dwarf2read.c (dwarf2_per_objfile): Update.
7358 (struct mapped_index): Add initializers.
7359 (dwarf2_read_index): Use new.
7360 (dw2_symtab_iter_init): Update.
7361 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7362 unique_ptr.
7363
7364 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7365
7366 * dwarf2read.c (mapped_index) <total_size>: Remove.
7367
7368 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7369
7370 * unittests/format_pieces-selftests.c (test_format_specifier):
7371 Add ARI comments.
7372
7373 2018-05-18 Tom Tromey <tom@tromey.com>
7374
7375 * c-typeprint.c (maybe_print_hole): New function.
7376 (c_print_type_struct_field_offset): Update.
7377 (c_type_print_base_struct_union): Call maybe_print_hole.
7378
7379 2018-05-17 Keith Seitz <keiths@redhat.com>
7380
7381 * breakpoint.c (build_bpstat_chain): New function, moved from
7382 bpstat_stop_status.
7383 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7384 If no stop chain is passed, call build_bpstat_chain to build it.
7385 * breakpoint.h (build_bpstat_chain): Declare.
7386 (bpstat_stop_status): Move documentation here from breakpoint.c.
7387 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7388 build the stop chain and pass it to skip_inline_frames.
7389 Pass this stop chain to bpstat_stop_status.
7390 * inline-frame.c: Include breakpoint.h.
7391 (stopped_by_user_bp_inline_frame): New function.
7392 (skip_inline_frames): Add parameter `stop_chain'.
7393 Move documention to inline-frame.h.
7394 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7395 whether the frame should be elided.
7396 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7397 Add moved documentation and update for new parameter.
7398
7399 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7400
7401 PR cli/14975
7402 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7403 unittests/format_pieces-selftests.c.
7404 * common/format.h (format_piece) <operator==>: New.
7405 (format_pieces) <operator[]>: Remove.
7406 * common/format.c (format_pieces::format_pieces): Handle \e.
7407 * unittests/format_pieces-selftests.c: New.
7408
7409 2018-05-17 Tom Tromey <tom@tromey.com>
7410
7411 PR symtab/23010:
7412 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7413 (dw2_instantiate_symtab): Add skip_partial parameter.
7414 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7415 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7416 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7417 (dw2_expand_symtabs_matching_one)
7418 (dw2_find_pc_sect_compunit_symtab)
7419 (dw2_debug_names_lookup_symbol)
7420 (dw2_debug_names_expand_symtabs_for_function): Update.
7421 (init_cutu_and_read_dies): Add skip_partial parameter.
7422 (process_psymtab_comp_unit, build_type_psymtabs_1)
7423 (process_skeletonless_type_unit, load_partial_comp_unit)
7424 (psymtab_to_symtab_1): Update.
7425 (load_full_comp_unit): Add skip_partial parameter.
7426 (process_imported_unit_die, dwarf2_read_addr_index)
7427 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7428 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7429 (read_signatured_type): Update.
7430
7431 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7432
7433 * value.c (release_value): Remove unused variable.
7434 (record_latest_value): Likewise.
7435 (access_value_history): Likewise.
7436 (preserve_values): Likewise.
7437
7438 2018-05-17 Tom Tromey <tom@tromey.com>
7439
7440 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7441 Initialize.
7442
7443 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7444
7445 PR gdb/22286
7446 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7447 Also handle registers whose width is not a multiple of
7448 PTRACE_TYPE_RET.
7449 (linux_nat_trad_target::store_register): Likewise.
7450
7451 2018-05-16 Tom Tromey <tom@tromey.com>
7452
7453 * gdbcore.h (core_bfd): Redefine.
7454 * corelow.c (core_target::close): Update.
7455 (core_target_open): Update.
7456 * progspace.h (struct program_space) <cbfd>: Now a
7457 gdb_bfd_ref_ptr.
7458
7459 2018-05-16 Tom Tromey <tom@tromey.com>
7460
7461 PR cli/19551:
7462 * symfile-add-flags.h (enum symfile_add_flags)
7463 <SYMFILE_NOT_FILENAME>: New constant.
7464 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7465 objfile name from BFD.
7466 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7467 * minidebug.c (find_separate_debug_file_in_section): Put
7468 ".gnu_debugdata" into BFD's file name.
7469
7470 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7471
7472 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7473 Remove.
7474
7475 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7476
7477 PR binutils/21446
7478 * aarch64-tdep.c (aarch64_analyze_prologue,
7479 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7480 Indicate not interested in errors.
7481
7482 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7483
7484 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7485 Supply the MIPS_ZERO_REGNUM register.
7486
7487 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7488
7489 * mips-tdep.c (mask_address_var): Make variable static.
7490
7491 2018-05-14 Tom Tromey <tom@tromey.com>
7492
7493 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7494
7495 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7496
7497 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7498 FXSAVE_ADDR for the mxcsr register.
7499
7500 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7501
7502 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7503
7504 2018-05-11 Pedro Alves <palves@redhat.com>
7505
7506 * corelow.c (core_target) <core_target>: No longer inline.
7507 Initialize m_core_gdbarch, m_core_vec and build the section table
7508 here.
7509 <~core_target>: New.
7510 <core_gdbarch, get_core_register_section>: New methods.
7511 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7512 factored out from ...
7513 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7514 (core_ops): Delete.
7515 (sniff_core_bfd): Add gdbarch parameter.
7516 (core_close): Delete, merged into ...
7517 (core_target::close): ... here. Delete self.
7518 (core_close_cleanup): Delete.
7519 (core_target_open): Allocate a core_target on the heap. Use a
7520 unique_ptr instead of a cleanup. Bits moved into the core_target
7521 ctor. Adjust to use core_target methods instead of globals.
7522 (get_core_register_section): Rename to ...
7523 (core_target::get_core_register_section): ... this and adjust.
7524 (struct get_core_registers_cb_data): New.
7525 (get_core_registers_cb): Use it. Use bool.
7526 (core_target::fetch_registers, core_target::files_info)
7527 (core_target::xfer_partial, core_target::read_description)
7528 (core_target::pid_to, core_target::thread_name): Adjust to
7529 reference class fields instead of globals.
7530 * target.h (struct target_ops_deleter, target_ops_up): New.
7531
7532 2018-05-11 Pedro Alves <palves@redhat.com>
7533
7534 * corefile.c (core_file_command): Move to corelow.c.
7535 * corelow.c (the_core_target): Delete.
7536 (core_file_command): Moved from corefile.c. Check exec_bfd
7537 instead of the_core_target. Use target_detach instead of calling
7538 into the_core_target directly.
7539 (maybe_say_no_core_file_now): New.
7540 (core_target::detach): Use it.
7541 (_initialize_corelow): Remove references to the_core_target.
7542 * gdbcore.h (the_core_target): Delete.
7543
7544 2018-05-11 Tom Tromey <tromey@redhat.com>
7545 Pedro Alves <palves@redhat.com>
7546
7547 * corefile.c (core_bfd): Remove.
7548 * gdbcore.h (core_bfd): Now a macro.
7549 * progspace.h (struct program_space) <cbfd>: New field.
7550
7551 2018-05-11 Tom Tromey <tom@tromey.com>
7552
7553 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7554 gdb::def_vector.
7555
7556 2018-05-10 Tom Tromey <tom@tromey.com>
7557
7558 * configure: Rebuild.
7559 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7560
7561 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7562
7563 PR server/23158:
7564 * regformats/regdat.sh: Adjust script, following the addition
7565 of the new expedite_regs parameter to init_target_desc.
7566
7567 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7568
7569 PR gdb/23127
7570 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7571 set_gdbarch_significant_addr_bit.
7572 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7573 set_gdbarch_significant_addr_bit.
7574 * utils.c (address_significant): Update to sign extend addr.
7575
7576 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7577
7578 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7579 (xtensa_linux_init_abi): Limit tdep->num_regs by
7580 tdep->num_nopriv_regs.
7581 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7582 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7583 not initialized.
7584
7585 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7586
7587 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7588
7589 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7590
7591 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7592 (I387_MXCSR_INIT_VAL): New constant.
7593 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7594 buffer if it was supplied by the inferior.
7595 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7596 (i387_xsave_get_clear_bv): New function.
7597 (i387_supply_xsave): Only read x87 control registers from the
7598 xsave buffer if the feature is enabled, and the state will have
7599 been written, otherwise, provide a suitable default.
7600 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7601 including x87 control registers. Update control registers if they
7602 have changed from the default value, and mark features as enabled
7603 as required.
7604 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7605
7606 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7607
7608 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7609
7610 2018-05-07 Tom Tromey <tom@tromey.com>
7611
7612 * configure: Rebuild.
7613 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7614
7615 2018-05-07 Tom Tromey <tom@tromey.com>
7616
7617 PR tdep/20362:
7618 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7619 bit. Use correct value for VDIV.
7620
7621 2018-05-04 Tom Tromey <tom@tromey.com>
7622
7623 * configure: Rebuild.
7624 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7625
7626 2018-05-04 Tom Tromey <tom@tromey.com>
7627
7628 * linux-record.c (record_linux_system_call) <case
7629 RECORD_SYS_RECVFROM>: Add "break".
7630
7631 2018-05-04 Tom Tromey <tom@tromey.com>
7632
7633 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7634 Add missing "break".
7635 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7636 Add missing "break".
7637
7638 2018-05-04 Tom Tromey <tom@tromey.com>
7639
7640 * rs6000-tdep.c (ppc_process_record_op4)
7641 (ppc_process_record_op63): Add fall-through comment.
7642
7643 2018-05-04 Tom Tromey <tom@tromey.com>
7644
7645 * i386-tdep.c (i386_process_record): Add fall-through comment.
7646
7647 2018-05-04 Tom Tromey <tom@tromey.com>
7648
7649 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7650 comment.
7651
7652 2018-05-04 Tom Tromey <tom@tromey.com>
7653
7654 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7655 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7656 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7657 comment.
7658 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7659 comment.
7660 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7661 comment.
7662
7663 2018-05-04 Tom Tromey <tom@tromey.com>
7664
7665 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7666
7667 2018-05-04 Tom Tromey <tom@tromey.com>
7668
7669 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7670 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7671 * symfile.c (section_is_mapped): Fix fall-through comment.
7672 * stabsread.c (define_symbol, read_member_functions): Fix
7673 fall-through comment.
7674 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7675 comment.
7676 * remote.c (remote_wait_as): Fix fall-through comment.
7677 * p-exp.y (yylex): Fix fall-through comment.
7678 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7679 comment.
7680 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7681 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7682 * jv-exp.y (yylex): Fix fall-through comment.
7683 * go-exp.y (lex_one_token): Fix fall-through comment.
7684 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7685 fall-through comment.
7686 * f-exp.y (yylex): Fix fall-through comment.
7687 * dwarf2read.c (process_die): Fix fall-through comments.
7688 * dbxread.c (process_one_symbol): Fix fall-through comment.
7689 * d-exp.y (lex_one_token): Fix fall-through comment.
7690 * cp-name-parser.y (yylex): Fix fall-through comment.
7691 * coffread.c (coff_symtab_read): Fix fall-through comment.
7692 * c-exp.y (lex_one_token): Fix fall-through comment.
7693 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7694 comment.
7695 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7696 comment.
7697
7698 2018-05-04 Tom Tromey <tom@tromey.com>
7699
7700 PR python/22730:
7701 * NEWS: Mention gdb.execute change.
7702 * gdbcmd.h (execute_control_command): Don't declare.
7703 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7704 execute_control_commands, execute_control_commands_to_string.
7705 * cli/cli-script.h (execute_control_commands)
7706 (execute_control_commands_to_string): Declare.
7707 (execute_control_command): Add from_tty parameter.
7708 * cli/cli-script.c (execute_control_commands)
7709 (execute_control_commands_to_string): New functions.
7710 (execute_user_command): Use execute_control_commands.
7711 (execute_control_command_1): Add "from_tty" parameter. Update.
7712 (execute_control_command): Likewise.
7713
7714 2018-05-04 Tom Tromey <tom@tromey.com>
7715
7716 PR python/22731:
7717 * NEWS: Mention that breakpoint commands are writable.
7718 * python/py-breakpoint.c (bppy_set_commands): New function.
7719 (breakpoint_object_getset) <"commands">: Use it.
7720
7721 2018-05-04 Tom Tromey <tom@tromey.com>
7722
7723 * tracepoint.c (actions_command): Update.
7724 * mi/mi-cmd-break.c (mi_command_line_array)
7725 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7726 (mi_read_next_line): Remove.
7727 (mi_cmd_break_commands): Update.
7728 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7729 function_view.
7730 * cli/cli-script.c (get_command_line): Update.
7731 (process_next_line): Use function_view. Constify.
7732 (recurse_read_control_structure, read_command_lines)
7733 (read_command_lines_1): Change argument types to function_view.
7734 (do_define_command, document_command): Update.
7735 * breakpoint.h (check_tracepoint_command): Don't declare.
7736 * breakpoint.c (check_tracepoint_command): Remove.
7737 (commands_command_1, create_tracepoint_from_upload): Update.
7738
7739 2018-05-04 Tom Tromey <tom@tromey.com>
7740
7741 PR gdb/11750:
7742 * cli/cli-script.h (enum command_control_type) <define_control>:
7743 New constant.
7744 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7745 (build_command_line, execute_control_command_1)
7746 (process_next_line): Likewise.
7747 (do_define_command): New function, extracted from define_command.
7748 (define_command): Use it.
7749
7750 2018-05-04 Tom Tromey <tom@tromey.com>
7751
7752 * tracepoint.c (actions_command): Update.
7753 * cli/cli-script.h (read_command_lines): Update.
7754 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7755 (MAX_TMPBUF): Remove define.
7756 (define_command): Use string_printf.
7757 (document_command): Likewise.
7758 * breakpoint.c (commands_command_1): Update.
7759
7760 2018-05-04 Tom Tromey <tom@tromey.com>
7761
7762 * top.c (execute_command): Update.
7763 * cli/cli-script.h (print_command_lines): Now varargs.
7764 * cli/cli-script.c (print_command_lines): Now varargs.
7765 (execute_control_command_1) <case while_control, case if_control>:
7766 Update.
7767
7768 2018-05-04 Tom Tromey <tom@tromey.com>
7769
7770 * tracepoint.c (all_tracepoint_actions): Rename from
7771 all_tracepoint_actions_and_cleanup. Change return type.
7772 (actions_command, encode_actions_1, encode_actions)
7773 (trace_dump_actions, tdump_command): Update.
7774 * remote.c (remote_download_command_source): Update.
7775 * python/python.c (gdbpy_eval_from_control_command)
7776 (python_command, python_interactive_command): Update.
7777 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7778 * guile/guile.c (guile_command)
7779 (gdbscm_eval_from_control_command, guile_command): Update.
7780 * compile/compile.c (compile_code_command)
7781 (compile_print_command, compile_to_object): Update.
7782 * cli/cli-script.h (struct command_lines_deleter): New.
7783 (counted_command_line): New typedef.
7784 (struct command_line): Add constructor, destructor.
7785 <body_list>: Remove.
7786 <body_list_0, body_list_1>: New members.
7787 (command_line_up): Remove typedef.
7788 (read_command_lines, read_command_lines_1, get_command_line):
7789 Update.
7790 (copy_command_lines): Don't declare.
7791 * cli/cli-script.c (build_command_line): Use "new".
7792 (get_command_line): Return counted_command_line.
7793 (print_command_lines, execute_user_command)
7794 (execute_control_command_1, while_command, if_command): Update.
7795 (realloc_body_list): Remove.
7796 (process_next_line, recurse_read_control_structure): Update.
7797 (read_command_lines, read_command_lines_1): Return counted_command_line.
7798 (free_command_lines): Use "delete".
7799 (copy_command_lines): Remove.
7800 (define_command, document_command, show_user_1): Update.
7801 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7802 a counted_command_line.
7803 * breakpoint.h (counted_command_line): Remove typedef.
7804 (breakpoint_set_commands): Update.
7805 * breakpoint.c (check_no_tracepoint_commands)
7806 (validate_commands_for_breakpoint): Update.
7807 (breakpoint_set_commands): Change commands to be a
7808 counted_command_line.
7809 (commands_command_1, update_dprintf_command_list)
7810 (create_tracepoint_from_upload): Update.
7811
7812 2018-05-04 Tom Tromey <tom@tromey.com>
7813
7814 * cli/cli-decode.h (cmd_list_element): New constructor.
7815 (~cmd_list_element): New destructor.
7816 (struct cmd_list_element): Add initializers.
7817 * cli/cli-decode.c (do_add_cmd): Use "new".
7818 (delete_cmd): Use "delete".
7819
7820 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7821 Pedro Alves <palves@redhat.com>
7822
7823 PR breakpoints/19806 and support for PR external/20207.
7824 * NEWS: Mention Aarch64 watchpoint improvements.
7825 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7826 watchpoints and PR external/20207 watchpoints.
7827 * nat/aarch64-linux-hw-point.c
7828 (kernel_supports_any_contiguous_range): New.
7829 (aarch64_watchpoint_offset): New.
7830 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7831 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7832 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7833 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7834 next_addr_orig_p. Support PR external/20207 watchpoints.
7835 (aarch64_downgrade_regs): New.
7836 (aarch64_dr_state_insert_one_point): New parameters offset and
7837 addr_orig.
7838 (aarch64_dr_state_remove_one_point): Likewise.
7839 (aarch64_handle_breakpoint): Update caller.
7840 (aarch64_handle_aligned_watchpoint): Likewise.
7841 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7842 aligned_offset.
7843 (aarch64_linux_set_debug_regs): Remove const from state. Call
7844 aarch64_downgrade_regs.
7845 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7846 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7847 (DR_CONTROL_MASK): ... this.
7848 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7849 (unsigned int aarch64_watchpoint_offset): New prototype.
7850 (aarch64_linux_set_debug_regs): Remove const from state.
7851 * utils.c (align_up, align_down): Move to ...
7852 * common/common-utils.c (align_up, align_down): ... here.
7853 * utils.h (align_up, align_down): Move to ...
7854 * common/common-utils.h (align_up, align_down): ... here.
7855
7856 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7857
7858 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7859 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7860 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7861 Re-implement to match the ABI as summarized in GCC's
7862 gcc/config/sparc/sparc.c. All callers updated.
7863 (sparc32_store_arguments): Remove assertion.
7864
7865 2018-05-04 Tom Tromey <tom@tromey.com>
7866
7867 * printcmd.c: Don't include tui.h.
7868 (decode_format): Use skip_spaces.
7869
7870 2018-05-04 Tom Tromey <tom@tromey.com>
7871
7872 PR gdb/22619:
7873 * printcmd.c (last_count): New global.
7874 (x_command): Use saved count when repeating.
7875
7876 2018-05-04 Tom Tromey <tom@tromey.com>
7877
7878 * nto-procfs.c (do_closedir_cleanup): Remove.
7879 (procfs_pidlist): Use gdb_dir_up.
7880 * procfs.c (do_closedir_cleanup): Remove.
7881 (proc_update_threads): Use gdb_dir_up.
7882 * common/filestuff.h (struct gdb_dir_deleter): New.
7883 (gdb_dir_up): New typedef.
7884
7885 2018-05-04 Tom Tromey <tom@tromey.com>
7886
7887 * ada-lang.c (print_mention_exception): Use std::string.
7888
7889 2018-05-04 Tom Tromey <tom@tromey.com>
7890
7891 * ada-lang.c (create_excep_cond_exprs): Update.
7892 (ada_exception_catchpoint_cond_string): Use std::string.
7893
7894 2018-05-04 Tom Tromey <tom@tromey.com>
7895
7896 * ada-lang.c (xget_renaming_scope): Return std::string.
7897 (old_renaming_is_invisible): Update.
7898
7899 2018-05-04 Tom Tromey <tom@tromey.com>
7900
7901 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7902 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7903
7904 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7905
7906 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7907
7908 2018-05-04 Tom Tromey <tom@tromey.com>
7909
7910 * remote.c (remote_query_supported_append): Change type.
7911 (remote_check_symbols): Update.
7912
7913 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7914
7915 PR gdb/11420
7916 * configure.ac: Prepend libpython.
7917 * python/python-config.py: Likewise.
7918 * configure: Regenerate.
7919
7920 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7921
7922 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7923
7924 2018-05-03 Pedro Alves <palves@redhat.com>
7925
7926 * s390-linux-nat.c
7927 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7928 override. Write 'true' instead of '1'.
7929 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7930 declaration.
7931
7932 2018-05-02 Pedro Alves <palves@redhat.com>
7933
7934 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7935 add_inf_child_target.
7936 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7937 add_inf_child_target.
7938 * aix-thread.c (aix_thread_target_info): New.
7939 (aix_thread_target) <shortname, longname, doc>: Delete.
7940 <info>: New.
7941 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7942 add_inf_child_target.
7943 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7944 add_inf_child_target.
7945 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7946 add_inf_child_target.
7947 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7948 add_inf_child_target.
7949 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7950 add_inf_child_target.
7951 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7952 add_inf_child_target.
7953 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7954 add_inf_child_target.
7955 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7956 add_inf_child_target.
7957 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7958 add_inf_child_target.
7959 * bfd-target.c (target_bfd_target_info): New.
7960 (target_bfd) <shortname, longname, doc>: Delete.
7961 <info>: New.
7962 * bsd-kvm.c (bsd_kvm_target_info): New.
7963 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7964 <info>: New.
7965 (bsd_kvm_target::open): Rename to ...
7966 (bsd_kvm_target_open): ... this. Adjust.
7967 * bsd-uthread.c (bsd_uthread_target_info): New.
7968 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7969 <info>: New.
7970 * corefile.c (core_file_command): Adjust.
7971 * corelow.c (core_target_info): New.
7972 (core_target) <shortname, longname, doc>: Delete.
7973 <info>: New.
7974 (core_target::open): Rename to ...
7975 (core_target_open): ... this. Adjust.
7976 * ctf.c (ctf_target_info): New.
7977 (ctf_target) <shortname, longname, doc>: Delete.
7978 <info>: New.
7979 (ctf_target::open): Rename to ...
7980 (ctf_target_open): ... this.
7981 (_initialize_ctf): Adjust.
7982 * exec.c (exec_target_info): New.
7983 (exec_target) <shortname, longname, doc>: Delete.
7984 <info>: New.
7985 (exec_target::open): Rename to ...
7986 (exec_target_open): ... this.
7987 * gdbcore.h (core_target_open): Declare.
7988 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7989 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7990 add_inf_child_target.
7991 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7992 add_inf_child_target.
7993 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7994 add_inf_child_target.
7995 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7996 add_inf_child_target.
7997 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7998 add_inf_child_target.
7999 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8000 add_inf_child_target.
8001 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8002 add_inf_child_target.
8003 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8004 add_inf_child_target.
8005 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8006 add_inf_child_target.
8007 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8008 add_inf_child_target.
8009 * inf-child.c (inf_child_target_info): New.
8010 (inf_child_target::info): New.
8011 (inf_child_open_target): Remove 'target' parameter. Use
8012 get_native_target instead.
8013 (inf_child_target::open): Delete.
8014 (add_inf_child_target): New.
8015 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8016 Delete.
8017 <info>: New.
8018 (add_inf_child_target): Declare.
8019 (inf_child_open_target): Declare.
8020 * linux-thread-db.c (thread_db_target_info): New.
8021 (thread_db_target) <shortname, longname, doc>: Delete.
8022 <info>: New.
8023 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8024 add_inf_child_target.
8025 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8026 add_inf_child_target.
8027 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8028 add_inf_child_target.
8029 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8030 add_inf_child_target.
8031 * make-target-delegates (print_class): Adjust.
8032 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8033 add_inf_child_target.
8034 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8035 add_inf_child_target.
8036 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8037 add_inf_child_target.
8038 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8039 add_inf_child_target.
8040 * nto-procfs.c (nto_native_target_info): New.
8041 (nto_procfs_target_native) <shortname, longname, doc>:
8042 Delete.
8043 <info>: New.
8044 (nto_procfs_target_info): New.
8045 (nto_procfs_target_procfs) <shortname, longname, doc>:
8046 Delete.
8047 <info>: New.
8048 (init_procfs_targets): Adjust.
8049 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8050 add_inf_child_target.
8051 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8052 add_inf_child_target.
8053 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8054 add_inf_child_target.
8055 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8056 add_inf_child_target.
8057 * ravenscar-thread.c (ravenscar_target_info): New.
8058 (ravenscar_thread_target) <shortname, longname, doc>:
8059 Delete.
8060 <info>: New.
8061 * record-btrace.c (record_btrace_target_info):
8062 (record_btrace_target) <shortname, longname, doc>: Delete.
8063 <info>: New.
8064 (record_btrace_target::open): Rename to ...
8065 (record_btrace_target_open): ... this. Adjust.
8066 * record-full.c (record_longname, record_doc): New.
8067 (record_full_base_target) <shortname, longname, doc>: Delete.
8068 <info>: New.
8069 (record_full_target_info): New.
8070 (record_full_target): <shortname>: Delete.
8071 <info>: New.
8072 (record_full_core_open_1, record_full_open_1): Update comments.
8073 (record_full_base_target::open): Rename to ...
8074 (record_full_open): ... this.
8075 (cmd_record_full_restore): Update.
8076 (_initialize_record_full): Update.
8077 * remote-sim.c (remote_sim_target_info): New.
8078 (gdbsim_target) <shortname, longname, doc>: Delete.
8079 <info>: New.
8080 (gdbsim_target::open): Rename to ...
8081 (gdbsim_target_open): ... this.
8082 (_initialize_remote_sim): Adjust.
8083 * remote.c (remote_doc): New.
8084 (remote_target_info): New.
8085 (remote_target) <shortname, longname, doc>: Delete.
8086 <info>: New.
8087 (extended_remote_target_info): New.
8088 (extended_remote_target) <shortname, longname, doc>: Delete.
8089 <info>: New.
8090 (remote_target::open_1): Make static. Adjust.
8091 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8092 * s390-linux-nat.c (_initialize_s390_nat): Use
8093 add_inf_child_target.
8094 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8095 add_inf_child_target.
8096 * sol-thread.c (thread_db_target_info): New.
8097 (sol_thread_target) <shortname, longname, doc>: Delete.
8098 <info>: New.
8099 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8100 add_inf_child_target.
8101 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8102 add_inf_child_target.
8103 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8104 add_inf_child_target.
8105 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8106 add_inf_child_target.
8107 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8108 add_inf_child_target.
8109 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8110 add_inf_child_target.
8111 * spu-linux-nat.c (_initialize_spu_nat): Use
8112 add_inf_child_target.
8113 * spu-multiarch.c (spu_multiarch_target_info): New.
8114 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8115 <info>: New.
8116 * target-delegates.c: Regenerate.
8117 * target.c: Include <unordered_map>.
8118 (target_ops_p): Delete.
8119 (DEF_VEC_P(target_ops_p)): Delete.
8120 (target_factories): New.
8121 (test_target_info): New.
8122 (test_target_ops::info): New.
8123 (open_target): Adjust to use target_factories.
8124 (add_target_with_completer): Rename to ...
8125 (add_target): ... this. Change prototype. Register target_info
8126 and open callback in target_factories. Register target_info in
8127 command context instead of target_ops.
8128 (add_target): Delete old implementation.
8129 (add_deprecated_target_alias): Change prototype. Adjust.
8130 (the_native_target): New.
8131 (set_native_target, get_native_target): New.
8132 (find_default_run_target): Use the_native_target.
8133 (find_attach_target, find_run_target): Simplify.
8134 (target_ops::open): Delete.
8135 (dummy_target_info): New.
8136 (dummy_target::shortname, dummy_target::longname)
8137 (dummy_target::doc): Delete.
8138 (dummy_target::info): New.
8139 (debug_target::shortname, debug_target::longname)
8140 (debug_target::doc): Delete.
8141 (debug_target::info): New.
8142 * target.h (struct target_info): New.
8143 (target_ops::~target_ops): Add comment.
8144 (target_ops::info): New.
8145 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8146 longer virtual. Implement in terms of target_info.
8147 (set_native_target, get_native_target): Declare.
8148 (target_open_ftype): New.
8149 (add_target, add_target_with_completer)
8150 (add_deprecated_target_alias): Change prototype.
8151 (test_target) <shortname, longname, doc>: Delete.
8152 <info>: New.
8153 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8154 add_inf_child_target.
8155 * tracefile-tfile.c (tfile_target_info): New.
8156 (tfile_target) <shortname, longname, doc>: Delete.
8157 <info>: New.
8158 (tfile_target::open): Rename to ...
8159 (tfile_target_open): ... this.
8160 (_initialize_tracefile_tfile): Adjust.
8161 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8162 add_inf_child_target.
8163 * windows-nat.c (_initialize_windows_nat): Use
8164 add_inf_child_target.
8165 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8166 add_inf_child_target.
8167
8168 2018-05-02 Pedro Alves <palves@redhat.com>
8169
8170 * linux-nat.h (linux_nat_target) <low_new_thread,
8171 low_delete_thread, low_new_fork, low_forget_process,
8172 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8173 New virtual methods.
8174 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8175 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8176 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8177 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8178 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8179 Delete.
8180 * linux-fork.c (delete_fork): Adjust to call low method.
8181 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8182 (linux_nat_new_fork, linux_nat_forget_process_hook)
8183 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8184 (linux_nat_status_is_event):
8185 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8186 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8187 to call low method.
8188 (sigtrap_is_event): Rename to ...
8189 (linux_nat_target::low_status_is_event): ... this.
8190 (linux_nat_set_status_is_event): Delete.
8191 (save_stop_reason, linux_nat_wait_1)
8192 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8193 low methods.
8194 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8195 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8196 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8197 (linux_nat_set_prepare_to_resume): Delete.
8198 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8199 low virtual methods.
8200 * amd64-linux-nat.c: Likewise.
8201 * arm-linux-nat.c: Likewise.
8202 * i386-linux-nat.c: Likewise.
8203 * ia64-linux-nat.c: Likewise.
8204 * mips-linux-nat.c: Likewise.
8205 * ppc-linux-nat.c: Likewise.
8206 * s390-linux-nat.c: Likewise.
8207 * sparc64-linux-nat.c: Likewise.
8208 * x86-linux-nat.c: Likewise.
8209 * x86-linux-nat.h: Include "nat/x86-linux.h".
8210 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8211 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8212 Override methods.
8213
8214 2018-05-02 Pedro Alves <palves@redhat.com>
8215
8216 * target.h (target_ops)
8217 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8218 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8219 stopped_by_watchpoint, have_continuable_watchpoint,
8220 stopped_data_address, watchpoint_addr_within_range,
8221 can_accel_watchpoint_condition, can_run, thread_alive,
8222 has_all_memory, has_memory, has_stack, has_registers,
8223 has_execution, can_async_p, is_async_p, supports_non_stop,
8224 always_non_stop_p, can_execute_reverse, supports_multi_process,
8225 supports_enable_disable_tracepoint,
8226 supports_disable_randomization, supports_string_tracing,
8227 supports_evaluation_of_breakpoint_conditions,
8228 can_run_breakpoint_commands, filesystem_is_local,
8229 can_download_tracepoint, get_trace_state_variable_value,
8230 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8231 record_is_replaying, record_will_replay,
8232 augmented_libraries_svr4_read>: Adjust to return bool.
8233 * aarch64-linux-nat.c: All implementations adjusted.
8234 * aix-thread.c: All implementations adjusted.
8235 * arm-linux-nat.c: All implementations adjusted.
8236 * breakpoint.c: All implementations adjusted.
8237 * bsd-kvm.c: All implementations adjusted.
8238 * bsd-uthread.c: All implementations adjusted.
8239 * corelow.c: All implementations adjusted.
8240 * ctf.c: All implementations adjusted.
8241 * darwin-nat.c: All implementations adjusted.
8242 * darwin-nat.h: All implementations adjusted.
8243 * exec.c: All implementations adjusted.
8244 * fbsd-nat.c: All implementations adjusted.
8245 * fbsd-nat.h: All implementations adjusted.
8246 * gnu-nat.c: All implementations adjusted.
8247 * gnu-nat.h: All implementations adjusted.
8248 * go32-nat.c: All implementations adjusted.
8249 * ia64-linux-nat.c: All implementations adjusted.
8250 * inf-child.c: All implementations adjusted.
8251 * inf-child.h: All implementations adjusted.
8252 * inf-ptrace.c: All implementations adjusted.
8253 * inf-ptrace.h: All implementations adjusted.
8254 * linux-nat.c: All implementations adjusted.
8255 * linux-nat.h: All implementations adjusted.
8256 * mips-linux-nat.c: All implementations adjusted.
8257 * nto-procfs.c: All implementations adjusted.
8258 * ppc-linux-nat.c: All implementations adjusted.
8259 * procfs.c: All implementations adjusted.
8260 * ravenscar-thread.c: All implementations adjusted.
8261 * record-btrace.c: All implementations adjusted.
8262 * record-full.c: All implementations adjusted.
8263 * remote-sim.c: All implementations adjusted.
8264 * remote.c: All implementations adjusted.
8265 * s390-linux-nat.c: All implementations adjusted.
8266 * sol-thread.c: All implementations adjusted.
8267 * spu-multiarch.c: All implementations adjusted.
8268 * target-delegates.c: All implementations adjusted.
8269 * target.c: All implementations adjusted.
8270 * target.h: All implementations adjusted.
8271 * tracefile-tfile.c: All implementations adjusted.
8272 * tracefile.c: All implementations adjusted.
8273 * tracefile.h: All implementations adjusted.
8274 * windows-nat.c: All implementations adjusted.
8275 * x86-linux-nat.h: All implementations adjusted.
8276 * x86-nat.h: All implementations adjusted.
8277
8278 2018-05-02 Pedro Alves <palves@redhat.com>
8279
8280 * make-target-delegates (scan_target_h): Don't trim lines here.
8281 Replace sequences of tabs and/or whitespace with a single
8282 whitespace.
8283 (top level, parsing methods): Trim each line before processing it
8284 here.
8285
8286 2018-05-02 Pedro Alves <palves@redhat.com>
8287 John Baldwin <jhb@freebsd.org>
8288
8289 * target.h (enum strata) <debug_stratum>: New.
8290 (struct target_ops) <all delegation methods>: Replace by C++
8291 virtual methods, and drop "to_" prefix. All references updated
8292 throughout.
8293 <to_shortname, to_longname, to_doc, to_data,
8294 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8295 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8296 virtual methods. All references updated throughout.
8297 <can_attach, supports_terminal_ours, can_create_inferior,
8298 get_thread_control_capabilities, attach_no_wait>: New
8299 virtual methods.
8300 <insert_breakpoint, remove_breakpoint>: Now
8301 TARGET_DEFAULT_NORETURN methods.
8302 <info_proc>: Now returns bool.
8303 <to_magic>: Delete.
8304 (OPS_MAGIC): Delete.
8305 (current_target): Delete. All references replaced by references
8306 to ...
8307 (target_stack): ... this. New.
8308 (target_shortname, target_longname): Adjust.
8309 (target_can_run): Now a function declaration.
8310 (default_child_has_all_memory, default_child_has_memory)
8311 (default_child_has_stack, default_child_has_registers)
8312 (default_child_has_execution): Remove target_ops parameter.
8313 (complete_target_initialization): Delete.
8314 (memory_breakpoint_target): New template class.
8315 (test_target_ops): Refactor as a C++ class with virtual methods.
8316 * make-target-delegates (NAME_PART): Tighten.
8317 (POINTER_PART, CP_SYMBOL): New.
8318 (SIMPLE_RETURN_PART): Reimplement.
8319 (VEC_RETURN_PART): Expect less.
8320 (RETURN_PART, VIRTUAL_PART): New.
8321 (METHOD): Adjust to C++ virtual methods.
8322 (scan_target_h): Remove reference to C99.
8323 (dname): Output "target_ops::" prefix.
8324 (write_function_header): Adjust to output a C++ class method.
8325 (write_declaration): New.
8326 (write_delegator): Adjust to output a C++ class method.
8327 (tdname): Output "dummy_target::" prefix.
8328 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8329 method.
8330 (tdefault_names, debug_names): Delete.
8331 (return_types, tdefaults, styles, argtypes_array): New.
8332 (top level): All methods are delegators.
8333 (print_class): New.
8334 (top level): Print dummy_target and debug_target classes.
8335 * target-delegates.c: Regenerate.
8336 * target-debug.h (target_debug_print_enum_info_proc_what)
8337 (target_debug_print_thread_control_capabilities)
8338 (target_debug_print_thread_info_p): New.
8339 * target.c (dummy_target): Delete.
8340 (the_dummy_target, the_debug_target): New.
8341 (target_stack): Now extern.
8342 (set_targetdebug): Push/unpush debug target.
8343 (default_child_has_all_memory, default_child_has_memory)
8344 (default_child_has_stack, default_child_has_registers)
8345 (default_child_has_execution): Remove target_ops parameter.
8346 (complete_target_initialization): Delete.
8347 (add_target_with_completer): No longer call
8348 complete_target_initialization.
8349 (target_supports_terminal_ours): Use regular delegation.
8350 (update_current_target): Delete.
8351 (push_target): No longer check magic number. Don't call
8352 update_current_target.
8353 (unpush_target): Don't call update_current_target.
8354 (target_is_pushed): No longer check magic number.
8355 (target_require_runnable): Skip for all stratums over
8356 process_stratum.
8357 (target_ops::info_proc): New.
8358 (target_info_proc): Use find_target_at and
8359 find_default_run_target.
8360 (target_supports_disable_randomization): Use regular delegation.
8361 (target_get_osdata): Use find_target_at.
8362 (target_ops::open, target_ops::close, target_ops::can_attach)
8363 (target_ops::attach, target_ops::can_create_inferior)
8364 (target_ops::create_inferior, target_ops::can_run)
8365 (target_can_run): New.
8366 (default_fileio_target): Use regular delegation.
8367 (target_ops::fileio_open, target_ops::fileio_pwrite)
8368 (target_ops::fileio_pread, target_ops::fileio_fstat)
8369 (target_ops::fileio_close, target_ops::fileio_unlink)
8370 (target_ops::fileio_readlink): New.
8371 (target_fileio_open_1, target_fileio_unlink)
8372 (target_fileio_readlink): Always call the target method. Handle
8373 FILEIO_ENOSYS.
8374 (return_zero, return_zero_has_execution): Delete.
8375 (init_dummy_target): Delete.
8376 (dummy_target::dummy_target, dummy_target::shortname)
8377 (dummy_target::longname, dummy_target::doc)
8378 (debug_target::debug_target, debug_target::shortname)
8379 (debug_target::longname, debug_target::doc): New.
8380 (target_supports_delete_record): Use regular delegation.
8381 (setup_target_debug): Delete.
8382 (maintenance_print_target_stack): Skip debug_stratum.
8383 (initialize_targets): Instantiate the_dummy_target and
8384 the_debug_target.
8385 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8386 use target_stack.
8387 (target_auxv_search, fprint_target_auxv): Adjust.
8388 (info_auxv_command): Adjust to use target_stack.
8389 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8390 * exceptions.c (print_flush): Handle a NULL target_stack.
8391 * regcache.c (target_ops_no_register): Refactor as class with
8392 virtual methods.
8393
8394 * exec.c (exec_target): New class.
8395 (exec_ops): Now an exec_target.
8396 (exec_open, exec_close_1, exec_get_section_table)
8397 (exec_xfer_partial, exec_files_info, exec_has_memory)
8398 (exec_make_note_section): Refactor as exec_target methods.
8399 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8400 Delete.
8401 (exec_target::find_memory_regions): New.
8402 (_initialize_exec): Don't call init_exec_ops.
8403 * gdbcore.h (exec_file_clear): Delete.
8404
8405 * corefile.c (core_target): Delete.
8406 (core_file_command): Adjust.
8407 * corelow.c (core_target): New class.
8408 (the_core_target): New.
8409 (core_close): Remove target_ops parameter.
8410 (core_close_cleanup): Adjust.
8411 (core_target::close): New.
8412 (core_open, core_detach, get_core_registers, core_files_info)
8413 (core_xfer_partial, core_thread_alive, core_read_description)
8414 (core_pid_to_str, core_thread_name, core_has_memory)
8415 (core_has_stack, core_has_registers, core_info_proc): Rework as
8416 core_target methods.
8417 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8418 (_initialize_corelow): Initialize the_core_target.
8419 * gdbcore.h (core_target): Delete.
8420 (the_core_target): New.
8421
8422 * ctf.c: (ctf_target): New class.
8423 (ctf_ops): Now a ctf_target.
8424 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8425 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8426 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8427 methods.
8428 (init_ctf_ops): Delete.
8429 (_initialize_ctf): Don't call it.
8430 * tracefile-tfile.c (tfile_target): New class.
8431 (tfile_ops): Now a tfile_target.
8432 (tfile_open, tfile_close, tfile_files_info)
8433 (tfile_get_tracepoint_status, tfile_trace_find)
8434 (tfile_fetch_registers, tfile_xfer_partial)
8435 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8436 Refactor as tfile_target methods.
8437 (tfile_xfer_partial_features): Remove target_ops parameter.
8438 (init_tfile_ops): Delete.
8439 (_initialize_tracefile_tfile): Don't call it.
8440 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8441 (tracefile_has_stack, tracefile_has_registers)
8442 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8443 tracefile_target methods.
8444 (init_tracefile_ops): Delete.
8445 (tracefile_target::tracefile_target): New.
8446 * tracefile.h: Include "target.h".
8447 (tracefile_target): New class.
8448 (init_tracefile_ops): Delete.
8449
8450 * spu-multiarch.c (spu_multiarch_target): New class.
8451 (spu_ops): Now a spu_multiarch_target.
8452 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8453 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8454 (spu_search_memory, spu_mourn_inferior): Refactor as
8455 spu_multiarch_target methods.
8456 (init_spu_ops): Delete.
8457 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8458 complete_target_initialization.
8459
8460 * ravenscar-thread.c (ravenscar_thread_target): New class.
8461 (ravenscar_ops): Now a ravenscar_thread_target.
8462 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8463 (ravenscar_thread_alive, ravenscar_pid_to_str)
8464 (ravenscar_fetch_registers, ravenscar_store_registers)
8465 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8466 (ravenscar_stopped_by_hw_breakpoint)
8467 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8468 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8469 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8470 methods.
8471 (init_ravenscar_thread_ops): Delete.
8472 (_initialize_ravenscar): Remove references to
8473 init_ravenscar_thread_ops and complete_target_initialization.
8474
8475 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8476 (bsd_uthread_target): New class.
8477 (bsd_uthread_ops): Now a bsd_uthread_target.
8478 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8479 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8480 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8481 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8482 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8483 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8484 (bsd_uthread_target): Delete function.
8485 (_initialize_bsd_uthread): Remove reference to
8486 complete_target_initialization.
8487
8488 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8489 (target_bfd): ... this new class.
8490 (target_bfd_xfer_partial, target_bfd_get_section_table)
8491 (target_bfd_close): Refactor as target_bfd methods.
8492 (target_bfd::~target_bfd): New.
8493 (target_bfd_reopen): Adjust.
8494 (target_bfd::close): New.
8495
8496 * record-btrace.c (record_btrace_target): New class.
8497 (record_btrace_ops): Now a record_btrace_target.
8498 (record_btrace_open, record_btrace_stop_recording)
8499 (record_btrace_disconnect, record_btrace_close)
8500 (record_btrace_async, record_btrace_info)
8501 (record_btrace_insn_history, record_btrace_insn_history_range)
8502 (record_btrace_insn_history_from, record_btrace_call_history)
8503 (record_btrace_call_history_range)
8504 (record_btrace_call_history_from, record_btrace_record_method)
8505 (record_btrace_is_replaying, record_btrace_will_replay)
8506 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8507 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8508 (record_btrace_store_registers, record_btrace_prepare_to_store)
8509 (record_btrace_to_get_unwinder)
8510 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8511 (record_btrace_commit_resume, record_btrace_wait)
8512 (record_btrace_stop, record_btrace_can_execute_reverse)
8513 (record_btrace_stopped_by_sw_breakpoint)
8514 (record_btrace_supports_stopped_by_sw_breakpoint)
8515 (record_btrace_stopped_by_hw_breakpoint)
8516 (record_btrace_supports_stopped_by_hw_breakpoint)
8517 (record_btrace_update_thread_list, record_btrace_thread_alive)
8518 (record_btrace_goto_begin, record_btrace_goto_end)
8519 (record_btrace_goto, record_btrace_stop_replaying_all)
8520 (record_btrace_execution_direction)
8521 (record_btrace_prepare_to_generate_core)
8522 (record_btrace_done_generating_core): Refactor as
8523 record_btrace_target methods.
8524 (init_record_btrace_ops): Delete.
8525 (_initialize_record_btrace): Remove reference to
8526 init_record_btrace_ops.
8527 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8528 the execution_direction global.
8529 (record_full_base_target, record_full_target)
8530 (record_full_core_target): New classes.
8531 (record_full_ops): Now a record_full_target.
8532 (record_full_core_ops): Now a record_full_core_target.
8533 (record_full_target::detach, record_full_target::disconnect)
8534 (record_full_core_target::disconnect)
8535 (record_full_target::mourn_inferior, record_full_target::kill):
8536 New.
8537 (record_full_open, record_full_close, record_full_async): Refactor
8538 as methods of the record_full_base_target class.
8539 (record_full_resume, record_full_commit_resume): Refactor
8540 as methods of the record_full_target class.
8541 (record_full_wait, record_full_stopped_by_watchpoint)
8542 (record_full_stopped_data_address)
8543 (record_full_stopped_by_sw_breakpoint)
8544 (record_full_supports_stopped_by_sw_breakpoint)
8545 (record_full_stopped_by_hw_breakpoint)
8546 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8547 methods of the record_full_base_target class.
8548 (record_full_store_registers, record_full_xfer_partial)
8549 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8550 Refactor as methods of the record_full_target class.
8551 (record_full_can_execute_reverse, record_full_get_bookmark)
8552 (record_full_goto_bookmark, record_full_execution_direction)
8553 (record_full_record_method, record_full_info, record_full_delete)
8554 (record_full_is_replaying, record_full_will_replay)
8555 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8556 (record_full_stop_replaying): Refactor as methods of the
8557 record_full_base_target class.
8558 (record_full_core_resume, record_full_core_kill)
8559 (record_full_core_fetch_registers)
8560 (record_full_core_prepare_to_store)
8561 (record_full_core_store_registers, record_full_core_xfer_partial)
8562 (record_full_core_insert_breakpoint)
8563 (record_full_core_remove_breakpoint)
8564 (record_full_core_has_execution): Refactor
8565 as methods of the record_full_core_target class.
8566 (record_full_base_target::supports_delete_record): New.
8567 (init_record_full_ops): Delete.
8568 (init_record_full_core_ops): Delete.
8569 (record_full_save): Refactor as method of the
8570 record_full_base_target class.
8571 (_initialize_record_full): Remove references to
8572 init_record_full_ops and init_record_full_core_ops.
8573
8574 * remote.c (remote_target, extended_remote_target): New classes.
8575 (remote_ops): Now a remote_target.
8576 (extended_remote_ops): Now an extended_remote_target.
8577 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8578 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8579 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8580 (remote_pass_signals, remote_set_syscall_catchpoint)
8581 (remote_program_signals, )
8582 (remote_thread_always_alive): Remove target_ops parameter.
8583 (remote_thread_alive, remote_thread_name)
8584 (remote_update_thread_list, remote_threads_extra_info)
8585 (remote_static_tracepoint_marker_at)
8586 (remote_static_tracepoint_markers_by_strid)
8587 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8588 (remote_open): Refactor as methods of remote_target.
8589 (extended_remote_open, extended_remote_detach)
8590 (extended_remote_attach, extended_remote_post_attach):
8591 (extended_remote_supports_disable_randomization)
8592 (extended_remote_create_inferior): : Refactor as method of
8593 extended_remote_target.
8594 (remote_set_permissions, remote_open_1, remote_detach)
8595 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8596 (remote_resume, remote_commit_resume, remote_stop)
8597 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8598 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8599 (remote_prepare_to_store, remote_store_registers)
8600 (remote_flash_erase, remote_flash_done, remote_files_info)
8601 (remote_kill, remote_mourn, remote_insert_breakpoint)
8602 (remote_remove_breakpoint, remote_insert_watchpoint)
8603 (remote_watchpoint_addr_within_range)
8604 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8605 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8606 (remote_supports_stopped_by_sw_breakpoint)
8607 (remote_stopped_by_hw_breakpoint)
8608 (remote_supports_stopped_by_hw_breakpoint)
8609 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8610 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8611 (remote_verify_memory): Refactor as methods of remote_target.
8612 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8613 parameter.
8614 (remote_xfer_partial, remote_get_memory_xfer_limit)
8615 (remote_search_memory, remote_rcmd, remote_memory_map)
8616 (remote_pid_to_str, remote_get_thread_local_address)
8617 (remote_get_tib_address, remote_read_description): Refactor as
8618 methods of remote_target.
8619 (remote_target::fileio_open, remote_target::fileio_pwrite)
8620 (remote_target::fileio_pread, remote_target::fileio_close): New.
8621 (remote_hostio_readlink, remote_hostio_fstat)
8622 (remote_filesystem_is_local, remote_can_execute_reverse)
8623 (remote_supports_non_stop, remote_supports_disable_randomization)
8624 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8625 (remote_supports_enable_disable_tracepoint)
8626 (remote_supports_string_tracing)
8627 (remote_can_run_breakpoint_commands, remote_trace_init)
8628 (remote_download_tracepoint, remote_can_download_tracepoint)
8629 (remote_download_trace_state_variable, remote_enable_tracepoint)
8630 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8631 (remote_trace_start, remote_get_trace_status)
8632 (remote_get_tracepoint_status, remote_trace_stop)
8633 (remote_trace_find, remote_get_trace_state_variable_value)
8634 (remote_save_trace_data, remote_get_raw_trace_data)
8635 (remote_set_disconnected_tracing, remote_core_of_thread)
8636 (remote_set_circular_trace_buffer, remote_traceframe_info)
8637 (remote_get_min_fast_tracepoint_insn_len)
8638 (remote_set_trace_buffer_size, remote_set_trace_notes)
8639 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8640 (remote_disable_btrace, remote_teardown_btrace)
8641 (remote_read_btrace, remote_btrace_conf)
8642 (remote_augmented_libraries_svr4_read, remote_load)
8643 (remote_pid_to_exec_file, remote_can_do_single_step)
8644 (remote_execution_direction, remote_thread_handle_to_thread_info):
8645 Refactor as methods of remote_target.
8646 (init_remote_ops, init_extended_remote_ops): Delete.
8647 (remote_can_async_p, remote_is_async_p, remote_async)
8648 (remote_thread_events, remote_upload_tracepoints)
8649 (remote_upload_trace_state_variables): Refactor as methods of
8650 remote_target.
8651 (_initialize_remote): Remove references to init_remote_ops and
8652 init_extended_remote_ops.
8653
8654 * remote-sim.c (gdbsim_target): New class.
8655 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8656 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8657 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8658 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8659 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8660 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8661 Refactor as methods of gdbsim_target.
8662 (gdbsim_ops): Now a gdbsim_target.
8663 (init_gdbsim_ops): Delete.
8664 (gdbsim_cntrl_c): Adjust.
8665 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8666
8667 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8668 (the_amd64_linux_nat_target): New.
8669 (amd64_linux_fetch_inferior_registers)
8670 (amd64_linux_store_inferior_registers): Refactor as methods of
8671 amd64_linux_nat_target.
8672 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8673 * i386-linux-nat.c: Don't include "linux-nat.h".
8674 (i386_linux_nat_target): New class.
8675 (the_i386_linux_nat_target): New.
8676 (i386_linux_fetch_inferior_registers)
8677 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8678 as methods of i386_linux_nat_target.
8679 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8680 * inf-child.c (inf_child_ops): Delete.
8681 (inf_child_fetch_inferior_registers)
8682 (inf_child_store_inferior_registers): Delete.
8683 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8684 methods of inf_child_target.
8685 (inf_child_target::supports_terminal_ours)
8686 (inf_child_target::terminal_init)
8687 (inf_child_target::terminal_inferior)
8688 (inf_child_target::terminal_ours_for_output)
8689 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8690 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8691 New.
8692 (inf_child_open, inf_child_disconnect, inf_child_close)
8693 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8694 (inf_child_post_startup_inferior, inf_child_can_run)
8695 (inf_child_pid_to_exec_file): Refactor as methods of
8696 inf_child_target.
8697 (inf_child_follow_fork): Delete.
8698 (inf_child_target::can_create_inferior)
8699 (inf_child_target::can_attach): New.
8700 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8701 (inf_child_target::has_stack, inf_child_target::has_registers)
8702 (inf_child_target::has_execution): New.
8703 (inf_child_fileio_open, inf_child_fileio_pwrite)
8704 (inf_child_fileio_pread, inf_child_fileio_fstat)
8705 (inf_child_fileio_close, inf_child_fileio_unlink)
8706 (inf_child_fileio_readlink, inf_child_use_agent)
8707 (inf_child_can_use_agent): Refactor as methods of
8708 inf_child_target.
8709 (return_zero, inf_child_target): Delete.
8710 (inf_child_target::inf_child_target): New.
8711 * inf-child.h: Include "target.h".
8712 (inf_child_target): Delete function prototype.
8713 (inf_child_target): New class.
8714 (inf_child_open_target, inf_child_mourn_inferior)
8715 (inf_child_maybe_unpush_target): Delete.
8716 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8717 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8718 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8719 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8720 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8721 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8722 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8723 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8724 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8725 methods of inf_ptrace_target.
8726 (inf_ptrace_target): Delete function.
8727 * inf-ptrace.h: Include "inf-child.h".
8728 (inf_ptrace_target): Delete function declaration.
8729 (inf_ptrace_target): New class.
8730 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8731 * linux-nat.c (linux_target): New.
8732 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8733 (linux_nat_target::~linux_nat_target): New.
8734 (linux_child_post_attach, linux_child_post_startup_inferior)
8735 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8736 (linux_child_remove_fork_catchpoint)
8737 (linux_child_insert_vfork_catchpoint)
8738 (linux_child_remove_vfork_catchpoint)
8739 (linux_child_insert_exec_catchpoint)
8740 (linux_child_remove_exec_catchpoint)
8741 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8742 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8743 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8744 (linux_nat_stopped_data_address)
8745 (linux_nat_stopped_by_sw_breakpoint)
8746 (linux_nat_supports_stopped_by_sw_breakpoint)
8747 (linux_nat_stopped_by_hw_breakpoint)
8748 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8749 (linux_nat_kill, linux_nat_mourn_inferior)
8750 (linux_nat_xfer_partial, linux_nat_thread_alive)
8751 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8752 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8753 (linux_child_static_tracepoint_markers_by_strid)
8754 (linux_nat_is_async_p, linux_nat_can_async_p)
8755 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8756 (linux_nat_supports_multi_process)
8757 (linux_nat_supports_disable_randomization, linux_nat_async)
8758 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8759 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8760 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8761 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8762 methods of linux_nat_target.
8763 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8764 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8765 parameter.
8766 (check_stopped_by_watchpoint): Adjust.
8767 (linux_xfer_partial): Delete.
8768 (linux_target_install_ops, linux_target, linux_nat_add_target):
8769 Delete.
8770 (linux_nat_target::linux_nat_target): New.
8771 * linux-nat.h: Include "inf-ptrace.h".
8772 (linux_nat_target): New.
8773 (linux_target, linux_target_install_ops, linux_nat_add_target):
8774 Delete function declarations.
8775 (linux_target): Declare global.
8776 * linux-thread-db.c (thread_db_target): New.
8777 (thread_db_target::thread_db_target): New.
8778 (thread_db_ops): Delete.
8779 (the_thread_db_target): New.
8780 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8781 (thread_db_update_thread_list, thread_db_pid_to_str)
8782 (thread_db_extra_thread_info)
8783 (thread_db_thread_handle_to_thread_info)
8784 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8785 (thread_db_resume): Refactor as methods of thread_db_target.
8786 (init_thread_db_ops): Delete.
8787 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8788 * x86-linux-nat.c: Don't include "linux-nat.h".
8789 (super_post_startup_inferior): Delete.
8790 (x86_linux_nat_target::~x86_linux_nat_target): New.
8791 (x86_linux_child_post_startup_inferior)
8792 (x86_linux_read_description, x86_linux_enable_btrace)
8793 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8794 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8795 methods of x86_linux_nat_target.
8796 (x86_linux_create_target): Delete. Bits folded ...
8797 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8798 pointer.
8799 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8800 (x86_linux_nat_target): New class.
8801 (x86_linux_create_target): Delete.
8802 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8803 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8804 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8805 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8806 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8807 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8808 make extern.
8809 (x86_use_watchpoints): Delete.
8810 * x86-nat.h: Include "breakpoint.h" and "target.h".
8811 (x86_use_watchpoints): Delete.
8812 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8813 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8814 (x86_insert_watchpoint, x86_remove_watchpoint)
8815 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8816 (x86_stopped_by_hw_breakpoint): New declarations.
8817 (x86_nat_target): New template class.
8818
8819 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8820 (the_ppc_linux_nat_target): New.
8821 (ppc_linux_fetch_inferior_registers)
8822 (ppc_linux_can_use_hw_breakpoint)
8823 (ppc_linux_region_ok_for_hw_watchpoint)
8824 (ppc_linux_ranged_break_num_registers)
8825 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8826 (ppc_linux_insert_mask_watchpoint)
8827 (ppc_linux_remove_mask_watchpoint)
8828 (ppc_linux_can_accel_watchpoint_condition)
8829 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8830 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8831 (ppc_linux_watchpoint_addr_within_range)
8832 (ppc_linux_masked_watch_num_registers)
8833 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8834 (ppc_linux_read_description): Refactor as methods of
8835 ppc_linux_nat_target.
8836 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8837
8838 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8839 (procfs_target): New class.
8840 (the_procfs_target): New.
8841 (procfs_target): Delete function.
8842 (procfs_auxv_parse, procfs_attach, procfs_detach)
8843 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8844 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8845 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8846 (procfs_create_inferior, procfs_update_thread_list)
8847 (procfs_thread_alive, procfs_pid_to_str)
8848 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8849 (procfs_stopped_data_address, procfs_insert_watchpoint)
8850 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8851 (proc_find_memory_regions, procfs_info_proc)
8852 (procfs_make_note_section): Refactor as methods of procfs_target.
8853 (_initialize_procfs): Adjust.
8854 * sol-thread.c (sol_thread_target): New class.
8855 (sol_thread_ops): Now a sol_thread_target.
8856 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8857 (sol_thread_fetch_registers, sol_thread_store_registers)
8858 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8859 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8860 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8861 (init_sol_thread_ops): Delete.
8862 (_initialize_sol_thread): Adjust. Remove references to
8863 init_sol_thread_ops and complete_target_initialization.
8864
8865 * windows-nat.c (windows_nat_target): New class.
8866 (windows_fetch_inferior_registers)
8867 (windows_store_inferior_registers, windows_resume, windows_wait)
8868 (windows_attach, windows_detach, windows_pid_to_exec_file)
8869 (windows_files_info, windows_create_inferior)
8870 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8871 (windows_close, windows_pid_to_str, windows_xfer_partial)
8872 (windows_get_tib_address, windows_get_ada_task_ptid)
8873 (windows_thread_name, windows_thread_alive): Refactor as
8874 windows_nat_target methods.
8875 (do_initial_windows_stuff): Adjust.
8876 (windows_target): Delete function.
8877 (_initialize_windows_nat): Adjust.
8878
8879 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8880 (darwin_mourn_inferior, darwin_kill_inferior)
8881 (darwin_create_inferior, darwin_attach, darwin_detach)
8882 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8883 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8884 (darwin_supports_multi_process): Refactor as darwin_nat_target
8885 methods.
8886 (darwin_resume_to, darwin_files_info): Delete.
8887 (_initialize_darwin_inferior): Rename to ...
8888 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8889 * darwin-nat.h: Include "inf-child.h".
8890 (darwin_nat_target): New class.
8891 (darwin_complete_target): Delete.
8892 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8893 (darwin_target): New.
8894 (i386_darwin_fetch_inferior_registers)
8895 (i386_darwin_store_inferior_registers): Refactor as methods of
8896 darwin_nat_target.
8897 (darwin_complete_target): Delete, with ...
8898 (_initialize_i386_darwin_nat): ... bits factored out here.
8899
8900 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8901 (the_alpha_linux_nat_target): New.
8902 (alpha_linux_register_u_offset): Refactor as
8903 alpha_linux_nat_target method.
8904 (_initialize_alpha_linux_nat): Adjust.
8905 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8906 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8907 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8908 methods of linux_nat_trad_target.
8909 (linux_trad_target): Delete.
8910 * linux-nat-trad.h (linux_trad_target): Delete function.
8911 (linux_nat_trad_target): New class.
8912 * mips-linux-nat.c (mips_linux_nat_target): New class.
8913 (super_fetch_registers, super_store_registers, super_close):
8914 Delete.
8915 (the_mips_linux_nat_target): New.
8916 (mips64_linux_regsets_fetch_registers)
8917 (mips64_linux_regsets_store_registers)
8918 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8919 (mips_linux_register_u_offset, mips_linux_read_description)
8920 (mips_linux_can_use_hw_breakpoint)
8921 (mips_linux_stopped_by_watchpoint)
8922 (mips_linux_stopped_data_address)
8923 (mips_linux_region_ok_for_hw_watchpoint)
8924 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8925 (mips_linux_close): Refactor as methods of mips_linux_nat.
8926 (_initialize_mips_linux_nat): Adjust to C++ification.
8927
8928 * aix-thread.c (aix_thread_target): New class.
8929 (aix_thread_ops): Now an aix_thread_target.
8930 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8931 (aix_thread_fetch_registers, aix_thread_store_registers)
8932 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8933 (aix_thread_thread_alive, aix_thread_pid_to_str)
8934 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8935 Refactor as methods of aix_thread_target.
8936 (init_aix_thread_ops): Delete.
8937 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8938 and complete_target_initialization.
8939 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8940 (rs6000_nat_target): New class.
8941 (the_rs6000_nat_target): New.
8942 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8943 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8944 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8945 (super_create_inferior): Delete.
8946 (_initialize_rs6000_nat): Adjust to C++ification.
8947
8948 * arm-linux-nat.c (arm_linux_nat_target): New class.
8949 (the_arm_linux_nat_target): New.
8950 (arm_linux_fetch_inferior_registers)
8951 (arm_linux_store_inferior_registers, arm_linux_read_description)
8952 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8953 (arm_linux_remove_hw_breakpoint)
8954 (arm_linux_region_ok_for_hw_watchpoint)
8955 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8956 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8957 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8958 arm_linux_nat_target.
8959 (_initialize_arm_linux_nat): Adjust to C++ification.
8960
8961 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8962 (the_aarch64_linux_nat_target): New.
8963 (aarch64_linux_fetch_inferior_registers)
8964 (aarch64_linux_store_inferior_registers)
8965 (aarch64_linux_child_post_startup_inferior)
8966 (aarch64_linux_read_description)
8967 (aarch64_linux_can_use_hw_breakpoint)
8968 (aarch64_linux_insert_hw_breakpoint)
8969 (aarch64_linux_remove_hw_breakpoint)
8970 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8971 (aarch64_linux_region_ok_for_hw_watchpoint)
8972 (aarch64_linux_stopped_data_address)
8973 (aarch64_linux_stopped_by_watchpoint)
8974 (aarch64_linux_watchpoint_addr_within_range)
8975 (aarch64_linux_can_do_single_step): Refactor as methods of
8976 aarch64_linux_nat_target.
8977 (super_post_startup_inferior): Delete.
8978 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8979
8980 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8981 (the_hppa_linux_nat_target): New.
8982 (hppa_linux_fetch_inferior_registers)
8983 (hppa_linux_store_inferior_registers): Refactor as methods of
8984 hppa_linux_nat_target.
8985 (_initialize_hppa_linux_nat): Adjust to C++ification.
8986
8987 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8988 (the_ia64_linux_nat_target): New.
8989 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8990 (ia64_linux_stopped_data_address)
8991 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8992 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8993 ia64_linux_nat_target methods.
8994 (super_xfer_partial): Delete.
8995 (_initialize_ia64_linux_nat): Adjust to C++ification.
8996
8997 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8998 (the_m32r_linux_nat_target): New.
8999 (m32r_linux_fetch_inferior_registers)
9000 (m32r_linux_store_inferior_registers): Refactor as
9001 m32r_linux_nat_target methods.
9002 (_initialize_m32r_linux_nat): Adjust to C++ification.
9003
9004 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9005 (the_m68k_linux_nat_target): New.
9006 (m68k_linux_fetch_inferior_registers)
9007 (m68k_linux_store_inferior_registers): Refactor as
9008 m68k_linux_nat_target methods.
9009 (_initialize_m68k_linux_nat): Adjust to C++ification.
9010
9011 * s390-linux-nat.c (s390_linux_nat_target): New class.
9012 (the_s390_linux_nat_target): New.
9013 (s390_linux_fetch_inferior_registers)
9014 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9015 (s390_insert_watchpoint, s390_remove_watchpoint)
9016 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9017 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9018 (s390_auxv_parse, s390_read_description): Refactor as methods of
9019 s390_linux_nat_target.
9020 (_initialize_s390_nat): Adjust to C++ification.
9021
9022 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9023 (the_sparc_linux_nat_target): New.
9024 (_initialize_sparc_linux_nat): Adjust to C++ification.
9025 * sparc-nat.c (sparc_fetch_inferior_registers)
9026 (sparc_store_inferior_registers): Remove target_ops parameter.
9027 * sparc-nat.h (sparc_fetch_inferior_registers)
9028 (sparc_store_inferior_registers): Remove target_ops parameter.
9029 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9030 (the_sparc64_linux_nat_target): New.
9031 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9032
9033 * spu-linux-nat.c (spu_linux_nat_target): New class.
9034 (the_spu_linux_nat_target): New.
9035 (spu_child_post_startup_inferior, spu_child_post_attach)
9036 (spu_child_wait, spu_fetch_inferior_registers)
9037 (spu_store_inferior_registers, spu_xfer_partial)
9038 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9039 methods.
9040 (_initialize_spu_nat): Adjust to C++ification.
9041
9042 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9043 (the_tilegx_linux_nat_target): New.
9044 (fetch_inferior_registers, store_inferior_registers):
9045 Refactor as methods.
9046 (_initialize_tile_linux_nat): Adjust to C++ification.
9047
9048 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9049 (the_xtensa_linux_nat_target): New.
9050 (xtensa_linux_fetch_inferior_registers)
9051 (xtensa_linux_store_inferior_registers): Refactor as
9052 xtensa_linux_nat_target methods.
9053 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9054
9055 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9056 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9057 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9058 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9059 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9060 (fbsd_stopped_by_sw_breakpoint)
9061 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9062 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9063 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9064 (fbsd_post_startup_inferior, fbsd_post_attach)
9065 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9066 (fbsd_set_syscall_catchpoint)
9067 (super_xfer_partial, super_resume, super_wait)
9068 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9069 (fbsd_handle_debug_trap): Remove target_ops parameter.
9070 (fbsd_nat_add_target): Delete.
9071 * fbsd-nat.h: Include "inf-ptrace.h".
9072 (fbsd_nat_add_target): Delete.
9073 (USE_SIGTRAP_SIGINFO): Define.
9074 (fbsd_nat_target): New class.
9075
9076 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9077 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9078 (amd64bsd_target): Delete.
9079 * amd64-bsd-nat.h: New file.
9080 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9081 "x86-bsd-nat.h".
9082 (amd64_fbsd_nat_target): New class.
9083 (the_amd64_fbsd_nat_target): New.
9084 (amd64fbsd_read_description): Refactor as method of
9085 amd64_fbsd_nat_target.
9086 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9087 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9088 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9089 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9090 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9091 (i386bsd_target): Delete.
9092 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9093 (i386bsd_fetch_inferior_registers)
9094 (i386bsd_store_inferior_registers): Declare.
9095 (i386_bsd_nat_target): New class.
9096 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9097 (the_i386_fbsd_nat_target): New.
9098 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9099 i386_fbsd_nat_target methods.
9100 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9101 (_initialize_i386fbsd_nat): Adjust to C++ification.
9102 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9103 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9104 (_initialize_x86_bsd_nat): Adjust to C++ification.
9105 * x86-bsd-nat.h: Include "x86-nat.h".
9106 (x86bsd_target): Delete declaration.
9107 (x86bsd_nat_target): New class.
9108
9109 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9110 (the_aarch64_fbsd_nat_target): New.
9111 (aarch64_fbsd_fetch_inferior_registers)
9112 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9113 aarch64_fbsd_nat_target.
9114 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9115 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9116 (the_alpha_bsd_nat_target): New.
9117 (alphabsd_fetch_inferior_registers)
9118 (alphabsd_store_inferior_registers): Refactor as
9119 alpha_bsd_nat_target methods.
9120 (_initialize_alphabsd_nat): Refactor as methods of
9121 alpha_bsd_nat_target.
9122 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9123 (the_amd64_nbsd_nat_target): New.
9124 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9125 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9126 (the_amd64_obsd_nat_target): New.
9127 (_initialize_amd64obsd_nat): Adjust to C++ification.
9128 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9129 (the_arm_fbsd_nat_target): New.
9130 (arm_fbsd_fetch_inferior_registers)
9131 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9132 (_initialize_arm_fbsd_nat): Refactor as methods of
9133 arm_fbsd_nat_target.
9134 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9135 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9136 (the_arm_netbsd_nat_target): New.
9137 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9138 arm_netbsd_nat_target.
9139 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9140 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9141 (the_hppa_nbsd_nat_target): New.
9142 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9143 hppa_nbsd_nat_target methods.
9144 (_initialize_hppanbsd_nat): Adjust to C++ification.
9145 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9146 (the_hppa_obsd_nat_target): New.
9147 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9148 methods of hppa_obsd_nat_target.
9149 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9150 add_target.
9151 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9152 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9153 add_target.
9154 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9155 (_initialize_i386obsd_nat): Use add_target.
9156 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9157 (the_m68k_bsd_nat_target): New.
9158 (m68kbsd_fetch_inferior_registers)
9159 (m68kbsd_store_inferior_registers): Refactor as methods of
9160 m68k_bsd_nat_target.
9161 (_initialize_m68kbsd_nat): Adjust to C++ification.
9162 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9163 (the_mips_fbsd_nat_target): New.
9164 (mips_fbsd_fetch_inferior_registers)
9165 (mips_fbsd_store_inferior_registers): Refactor as methods of
9166 mips_fbsd_nat_target.
9167 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9168 add_target.
9169 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9170 (the_mips_nbsd_nat_target): New.
9171 (mipsnbsd_fetch_inferior_registers)
9172 (mipsnbsd_store_inferior_registers): Refactor as methods of
9173 mips_nbsd_nat_target.
9174 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9175 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9176 (the_mips64_obsd_nat_target): New.
9177 (mips64obsd_fetch_inferior_registers)
9178 (mips64obsd_store_inferior_registers): Refactor as methods of
9179 mips64_obsd_nat_target.
9180 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9181 add_target.
9182 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9183 nbsd_nat_target.
9184 * nbsd-nat.h: Include "inf-ptrace.h".
9185 (nbsd_nat_target): New class.
9186 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9187 (obsd_wait): Refactor as methods of obsd_nat_target.
9188 (obsd_add_target): Delete.
9189 * obsd-nat.h: Include "inf-ptrace.h".
9190 (obsd_nat_target): New class.
9191 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9192 (the_ppc_fbsd_nat_target): New.
9193 (ppcfbsd_fetch_inferior_registers)
9194 (ppcfbsd_store_inferior_registers): Refactor as methods of
9195 ppc_fbsd_nat_target.
9196 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9197 add_target.
9198 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9199 (the_ppc_nbsd_nat_target): New.
9200 (ppcnbsd_fetch_inferior_registers)
9201 (ppcnbsd_store_inferior_registers): Refactor as methods of
9202 ppc_nbsd_nat_target.
9203 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9204 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9205 (the_ppc_obsd_nat_target): New.
9206 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9207 methods of ppc_obsd_nat_target.
9208 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9209 add_target.
9210 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9211 (the_sh_nbsd_nat_target): New.
9212 (shnbsd_fetch_inferior_registers)
9213 (shnbsd_store_inferior_registers): Refactor as methods of
9214 sh_nbsd_nat_target.
9215 (_initialize_shnbsd_nat): Adjust to C++ification.
9216 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9217 (inf_ptrace_xfer_partial): Delete.
9218 (sparc_xfer_partial, sparc_target): Delete.
9219 * sparc-nat.h (sparc_fetch_inferior_registers)
9220 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9221 (sparc_target): Delete function declaration.
9222 (sparc_target): New template class.
9223 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9224 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9225 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9226 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9227 add_target.
9228 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9229 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9230 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9231 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9232 add_target.
9233 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9234 (the_vax_bsd_nat_target): New.
9235 (vaxbsd_fetch_inferior_registers)
9236 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9237 methods.
9238 (_initialize_vaxbsd_nat): Adjust to C++ification.
9239
9240 * bsd-kvm.c (bsd_kvm_target): New class.
9241 (bsd_kvm_ops): Now a bsd_kvm_target.
9242 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9243 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9244 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9245 bsd_kvm_target.
9246 (bsd_kvm_return_one): Delete.
9247 (bsd_kvm_add_target): Adjust to C++ification.
9248
9249 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9250 (nto_procfs_target_procfs): New classes.
9251 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9252 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9253 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9254 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9255 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9256 (procfs_remove_hw_breakpoint, procfs_resume)
9257 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9258 (procfs_kill_inferior, procfs_store_registers)
9259 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9260 as methods of nto_procfs_target.
9261 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9262 (nto_native_ops): Delete.
9263 (procfs_open, procfs_native_open): Delete.
9264 (nto_native_ops): Now an nto_procfs_target_native.
9265 (init_procfs_targets): Adjust to C++ification.
9266 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9267 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9268 Refactor as methods of nto_procfs_target.
9269
9270 * go32-nat.c (go32_nat_target): New class.
9271 (the_go32_nat_target): New.
9272 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9273 (go32_store_registers, go32_xfer_partial, go32_files_info)
9274 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9275 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9276 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9277 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9278 (go32_target): Delete.
9279 (_initialize_go32_nat): Adjust to C++ification.
9280
9281 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9282 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9283 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9284 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9285 gnu_nat_target.
9286 (gnu_target): Delete.
9287 * gnu-nat.h (gnu_target): Delete.
9288 (gnu_nat_target): New class.
9289 * i386-gnu-nat.c (gnu_base_target): New.
9290 (i386_gnu_nat_target): New class.
9291 (the_i386_gnu_nat_target): New.
9292 (_initialize_i386gnu_nat): Adjust to C++ification.
9293
9294 2018-05-02 Pedro Alves <palves@redhat.com>
9295
9296 * bfd-target.c (target_bfd_xclose): Rename to ...
9297 (target_bfd_close): ... this.
9298 (target_bfd_reopen): Adjust.
9299 * target.c (target_close): Remove references to to_xclose.
9300 * target.h (target_ops::to_xclose): Delete.
9301 (target_ops::to_close): Update comments.
9302
9303 2018-05-02 Pedro Alves <palves@redhat.com>
9304
9305 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9306 "linux-nat.h".
9307 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9308 * inf-ptrace.c (inf_ptrace_register_u_offset)
9309 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9310 (inf_ptrace_store_register, inf_ptrace_store_registers)
9311 (inf_ptrace_trad_target): Move to ...
9312 * linux-nat-trad.c: ... this new file.
9313 * linux-nat-trad.h: New file.
9314 * linux-nat.c (linux_target_install_ops): Make extern.
9315 (linux_trad_target): Delete.
9316 * linux-nat.h (linux_trad_target): Delete declaration.
9317 (linux_target_install_ops): Declare.
9318 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9319 "linux-nat.h".
9320
9321 2018-05-02 Pedro Alves <palves@redhat.com>
9322
9323 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9324 procfs_target/add_target here.
9325 * procfs.c (procfs_target): Make static.
9326 (_initialize_procfs): Call add_target here.
9327 * procfs.h (struct target_ops): Remove forward declaration.
9328 (procfs_target): Remove declaration.
9329 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9330
9331 2018-05-02 Pedro Alves <palves@redhat.com>
9332
9333 * procfs.c (procfs_stopped_by_watchpoint)
9334 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9335 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9336 Forward declare.
9337 (procfs_use_watchpoints): Delete, move contents...
9338 (procfs_target): ... here.
9339 * procfs.h (procfs_use_watchpoints): Delete declaration.
9340 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9341 procfs_use_watchpoints.
9342 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9343 procfs_use_watchpoints.
9344
9345 2018-05-02 Tom Tromey <tom@tromey.com>
9346
9347 PR python/20084:
9348 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9349 and var_zuinteger_unlimited.
9350 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9351 and PARAM_ZUINTEGER_UNLIMITED.
9352 (set_parameter_value): Handle var_zuinteger and
9353 var_zuinteger_unlimited.
9354 (add_setshow_generic): Likewise.
9355 (parmpy_init): Likewise.
9356
9357 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9358
9359 PR rust/23124
9360 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9361 pointer is not null before dereferencing it.
9362
9363 2018-04-30 Tom Tromey <tom@tromey.com>
9364
9365 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9366 is_mi_like_p.
9367
9368 2018-04-30 Tom Tromey <tom@tromey.com>
9369
9370 * breakpoint.c (mention): Remove use of is_mi_like_p.
9371 (print_mention_ranged_breakpoint): Likewise.
9372 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9373 of is_mi_like_p.
9374
9375 2018-04-30 Tom Tromey <tom@tromey.com>
9376
9377 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9378
9379 2018-04-30 Tom Tromey <tom@tromey.com>
9380
9381 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9382 (info_spu_event_command): Remove some uses of is_mi_like_p.
9383
9384 2018-04-30 Tom Tromey <tom@tromey.com>
9385
9386 * python/py-framefilter.c (py_print_single_arg)
9387 (enumerate_locals, py_print_args, py_print_frame): Remove some
9388 uses of is_mi_like_p.
9389
9390 2018-04-30 Tom Tromey <tom@tromey.com>
9391
9392 * ui-out.c: Update.
9393 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9394 * ui-out.h (ui_out::is_mi_like_p): Now const.
9395 (ui_out::do_is_mi_like_p): Now const.
9396 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9397
9398 2018-04-30 Tom Tromey <tom@tromey.com>
9399
9400 * varobj.c (varobj_set_visualizer): Use new_reference.
9401 * python/python.c (gdbpy_decode_line): Use new_reference.
9402 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9403 new_reference.
9404
9405 2018-04-30 Tom Tromey <tom@tromey.com>
9406
9407 * varobj.c (install_new_value): Use new_reference.
9408 * value.h (value_incref): Return void. Swap intro comment with
9409 value_decref.
9410 * value.c (set_value_parent): Use new_reference.
9411 (value_incref): Return void. Update intro comment.
9412 (release_value): Use new_reference.
9413 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9414
9415 2018-04-30 Tom Tromey <tom@tromey.com>
9416
9417 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9418 * gdb_bfd.h (new_bfd_ref): Remove.
9419 (gdb_bfd_open): Update comment.
9420 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9421 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9422 (gdb_bfd_fdopenr): Use new_reference.
9423 * exec.c (exec_file_attach): Use new_reference.
9424
9425 2018-04-30 Tom Tromey <tom@tromey.com>
9426
9427 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9428 method.
9429
9430 2018-04-30 Tom Tromey <tom@tromey.com>
9431
9432 * jit.c (jit_read_code_entry): Use type_align.
9433 * i386-tdep.c (i386_gdbarch_init): Don't call
9434 set_gdbarch_long_long_align_bit.
9435 * gdbarch.sh: Remove long_long_align_bit.
9436 * gdbarch.c, gdbarch.h: Rebuild.
9437 * arc-tdep.c (arc_type_align): New function.
9438 (arc_gdbarch_init): Use arc_type_align. Don't call
9439 set_gdbarch_long_long_align_bit.
9440
9441 2018-04-30 Tom Tromey <tom@tromey.com>
9442
9443 * rust-lang.c (rust_type_alignment): Remove.
9444 (rust_composite_type): Use type_align.
9445
9446 2018-04-30 Tom Tromey <tom@tromey.com>
9447
9448 * NEWS: Mention Type.align.
9449 * python/py-type.c (typy_get_alignof): New function.
9450 (type_object_getset): Add "alignof".
9451
9452 2018-04-30 Tom Tromey <tom@tromey.com>
9453
9454 PR exp/17095:
9455 * NEWS: Update.
9456 * std-operator.def (UNOP_ALIGNOF): New operator.
9457 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9458 New.
9459 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9460 * c-lang.c (c_op_print_tab): Add alignof.
9461 * c-exp.y (ALIGNOF): New token.
9462 (exp): Add "ALIGNOF" production.
9463 (ident_tokens): Add _Alignof and alignof.
9464
9465 2018-04-30 Tom Tromey <tom@tromey.com>
9466
9467 * i386-tdep.c (i386_type_align): New function.
9468 (i386_gdbarch_init): Update.
9469 * gdbarch.sh (type_align): New method.
9470 * gdbarch.c, gdbarch.h: Rebuild.
9471 * arch-utils.h (default_type_align): Declare.
9472 * arch-utils.c (default_type_align): New function.
9473 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9474 (struct type) <align_log2>: New field.
9475 <instance_flags>: Now a bitfield.
9476 (TYPE_RAW_ALIGN): New macro.
9477 (type_align, type_raw_align, set_type_align): Declare.
9478 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9479 functions.
9480 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9481 (get_alignment, maybe_set_alignment): New functions.
9482 (read_structure_type, read_enumeration_type, read_array_type)
9483 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9484 (read_subrange_type, read_base_type): Set type alignment.
9485
9486 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9487
9488 * dwarf2read.c (read_index_from_section): Use bool.
9489
9490 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9491
9492 PR gdb/22950
9493 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9494 with #ifdef.
9495
9496 2018-04-29 John Reiser <jreiser@BitWagon.com>
9497
9498 PR build/22873
9499 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9500 last step, and do it atomically.
9501
9502 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9503
9504 * compile/compile-c-types.c (convert_int, convert_float):
9505 Update for C FE v1.
9506
9507 2018-04-27 Tom Tromey <tom@tromey.com>
9508
9509 PR rust/22545:
9510 * rust-lang.c (rust_inclusive_range_type_p): New function.
9511 (rust_range): Handle inclusive ranges.
9512 (rust_compute_range): Likewise.
9513 * rust-exp.y (struct rust_op) <inclusive>: New field.
9514 (DOTDOTEQ): New constant.
9515 (range_expr): Add "..=" productions.
9516 (operator_tokens): Add "..=" token.
9517 (ast_range): Add "inclusive" parameter.
9518 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9519 ranges.
9520 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9521 bounds values.
9522 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9523 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9524 Update comments.
9525 * expprint.c (print_subexp_standard): Handle new bounds values.
9526 (dump_subexp_body_standard): Likewise.
9527
9528 2018-04-27 Tom Tromey <tom@tromey.com>
9529
9530 * configure: Rebuild.
9531 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9532 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9533 "OVERRIDE".
9534 (class symbol_needs_eval_context): Likewise.
9535 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9536 (mock_mapped_index::symbol_name_at): Use "override". Remove
9537 "virtual".
9538 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9539 "override".
9540 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9541 * aarch64-tdep.c (instruction_reader::read): Use "override".
9542 (instruction_reader_test::read): Likewise.
9543 * arm-tdep.c (instruction_reader::read): Use "override".
9544 (instruction_reader_thumb::read): Likewise.
9545
9546 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9547
9548 PR remote/9665
9549 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9550 instead of remote_send.
9551 (remote_send): Remove.
9552
9553 2018-04-26 Pedro Alves <palves@redhat.com>
9554
9555 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9556 find_function_start_sal instead of find_pc_line.
9557
9558 2018-04-26 Pedro Alves <palves@redhat.com>
9559
9560 * breakpoint.c (set_breakpoint_location_function): Handle
9561 mst_data_gnu_ifunc.
9562 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9563 * elfread.c (elf_symtab_read): Give data symbols with
9564 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9565 (elf_rel_plt_read): Update comment.
9566 * linespec.c (convert_linespec_to_sals): Handle
9567 mst_data_gnu_ifunc.
9568 (minsym_found): Handle mst_data_gnu_ifunc.
9569 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9570 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9571 * parse.c (find_minsym_type_and_address): Handle
9572 mst_data_gnu_ifunc.
9573 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9574 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9575 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9576 comment.
9577 <mst_data_gnu_ifunc>: New enumerator.
9578
9579 2018-04-26 Pedro Alves <palves@redhat.com>
9580
9581 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9582 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9583 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9584 Handle it.
9585 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9586 (lookup_minimal_symbol_by_pc): Adjust.
9587 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9588 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9589 * minsyms.h (lookup_msym_prefer): New enum.
9590 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9591 parameter by a lookup_msym_prefer parameter.
9592
9593 2018-04-26 Pedro Alves <palves@redhat.com>
9594
9595 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9596 ends in "@plt" instead of looking at the symbol's section.
9597
9598 2018-04-26 Pedro Alves <palves@redhat.com>
9599
9600 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9601 all references.
9602 (find_pc_partial_function_gnu_ifunc): Rename to ...
9603 (find_pc_partial_function): ... this, and remove references to
9604 'is_gnu_ifunc_p'.
9605 (find_pc_partial_function): Delete old implementation.
9606 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9607
9608 2018-04-26 Pedro Alves <palves@redhat.com>
9609
9610 * linespec.c (struct bound_minimal_symbol_search_key): New.
9611 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9612 skip first line if we found a GNU ifunc minimal symbol by name.
9613 (compare_msymbols): Change parameters to work with a destructured
9614 lhs minsym.
9615 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9616 functions.
9617
9618 2018-04-26 Pedro Alves <palves@redhat.com>
9619
9620 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9621 ifunc targets here. Instead, if we have an ifunc minsym, use its
9622 address/name.
9623 (add_location_to_breakpoint): Store the minsym and the objfile in
9624 the breakpoint location.
9625 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9626 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9627 Record the minsym in the sal.
9628 * symtab.h (symtab_and_line) <msymbol>: New field.
9629
9630 2018-04-26 Pedro Alves <palves@redhat.com>
9631
9632 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9633 unless we actually resolved the ifunc.
9634
9635 2018-04-26 Pedro Alves <palves@redhat.com>
9636
9637 * c-exp.y (variable production): Prefer ifunc minsyms over
9638 regular function symbols.
9639 * symtab.c (find_gnu_ifunc): New function.
9640 * minsyms.h (lookup_msym_prefer): New enum.
9641 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9642 parameter by a lookup_msym_prefer parameter.
9643 * symtab.h (find_gnu_ifunc): New declaration.
9644
9645 2018-04-26 Pedro Alves <palves@redhat.com>
9646
9647 * blockframe.c (find_gnu_ifunc_target_type): New function.
9648 (find_function_type): New.
9649 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9650 return a value with a memory address.
9651 (eval_call): For calls to GNU ifunc functions, try to find the
9652 type of the target function from the type that the resolver
9653 returns.
9654 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9655 symbols.
9656 * infcall.c (find_function_return_type): Delete.
9657 (find_function_addr): Add 'function_type' parameter. For calls to
9658 GNU ifunc functions, try to find the type of the target function
9659 from the type that the resolver returns, and return it via
9660 FUNCTION_TYPE.
9661 (call_function_by_hand_dummy): Adjust to use the function type
9662 returned by find_function_addr.
9663 (find_function_addr): Add 'function_type' parameter and move
9664 description here.
9665 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9666 declarations.
9667
9668 2018-04-26 Pedro Alves <palves@redhat.com>
9669
9670 * c-exp.y (variable production): Skip finding an alias for ifunc
9671 symbols.
9672
9673 2018-04-26 Pedro Alves <palves@redhat.com>
9674
9675 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9676
9677 2018-04-25 Pedro Alves <palves@redhat.com>
9678
9679 * infcmd.c (kill_command): Print the pid as string, not the whole
9680 thread's ptid. Add comment. s/has been killed/killed/ in output
9681 message.
9682 * remote.c (remote_detach_1): Print the pid as string, not the
9683 whole thread's ptid.
9684
9685 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9686 Sergio Durigan Junior <sergiodj@redhat.com>
9687 Pedro Alves <palves@redhat.com>
9688
9689 * infcmd.c (kill_command): Print message when inferior has
9690 been killed.
9691 * inferior.c (print_inferior_events): Remove 'static'. Set as
9692 '1'.
9693 (add_inferior): Improve message printed when
9694 'print_inferior_events' is on.
9695 (exit_inferior): Remove message printed when
9696 'print_inferior_events' is on.
9697 (detach_inferior): Improve message printed when
9698 'print_inferior_events' is on.
9699 (initialize_inferiors): Use 'add_inferior_silent' to set
9700 'current_inferior_'.
9701 * inferior.h (print_inferior_events): Declare here as
9702 'extern'.
9703 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9704 '[Detaching...]' messages when 'print_inferior_events' is on.
9705 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9706 as prefix/suffix for messages. Remove periods. Fix erroneous
9707 'Detaching after fork from child...', replace it by '... from
9708 parent...'.
9709 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9710 prefix/suffix when printing 'Detaching...' messages. Print
9711 them when 'print_inferior_events' is on.
9712 * remote.c (remote_detach_1): Print message when detaching
9713 from inferior and '!is_fork_parent'.
9714
9715 2018-04-24 Tom Tromey <tom@tromey.com>
9716
9717 * cli-out.h: Reindent.
9718
9719 2018-04-24 Tom Tromey <tom@tromey.com>
9720
9721 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9722 (cli_ui_out::do_field_string): Use fputs_filtered.
9723 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9724
9725 2018-04-23 Tom Tromey <tom@tromey.com>
9726
9727 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9728 gdb::unique_xmalloc_ptr.
9729
9730 2018-04-23 Tom Tromey <tom@tromey.com>
9731
9732 * configure: Rebuild.
9733
9734 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9735
9736 PR gdb/23095
9737 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9738 prepare_for_testing. Set normal_bp to r_debug_state if target
9739 is bsd.
9740
9741 2018-04-21 Pedro Alves <palves@redhat.com>
9742 Rajendra SY <rajendra.sy@gmail.com>
9743
9744 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9745 * remote.c (extended_remote_attach): In all-stop mode, mark the
9746 thread as executing.
9747
9748 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9749
9750 * thread.c (thread_apply_all_command): Fix comment.
9751 (thread_command): Fix comment.
9752
9753 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9754
9755 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9756 parameter.
9757 * features/aarch64-core.c (create_feature_aarch64_core):
9758 Regenerate.
9759 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9760 Likewise.
9761 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9762 Likewise.
9763 * features/i386/32bit-avx512.c
9764 (create_feature_i386_32bit_avx512): Likewise.
9765 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9766 Likewise.
9767 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9768 Likewise.
9769 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9770 Likewise.
9771 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9772 Likewise.
9773 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9774 Likewise.
9775 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9776 Likewise.
9777 * features/i386/64bit-avx512.c
9778 (create_feature_i386_64bit_avx512): Likewise.
9779 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9780 Likewise.
9781 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9782 Likewise.
9783 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9784 Likewise.
9785 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9786 Likewise.
9787 * features/i386/64bit-segments.c
9788 (create_feature_i386_64bit_segments): Likewise.
9789 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9790 Likewise.
9791 * features/i386/x32-core.c
9792 (create_feature_i386_x32_core): Likewise.
9793 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9794 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9795 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9796 * target-descriptions.c: In generated code, don't pass xml
9797 filename.
9798
9799 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9800
9801 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9802 (print_xml_feature::visit_post): Likewise.
9803 (print_xml_feature::visit): Likewise.
9804 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9805 (print_xml_feature): Add new class.
9806 * regformats/regdat.sh: Null xmltarget on feature targets.
9807 * target-descriptions.c (struct target_desc): Add xmltarget.
9808 (maintenance_check_tdesc_xml_convert): Add unittest function.
9809 (tdesc_get_features_xml): Add function to get xml.
9810 (maintenance_check_xml_descriptions): Test xml generation.
9811 * xml-tdesc.c (string_read_description_xml): Add function.
9812 * xml-tdesc.h (string_read_description_xml): Add declaration.
9813
9814 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9815
9816 * features/Makefile: Add feature marker to targets with new style
9817 target descriptions.
9818 * regformats/aarch64.dat: Regenerate.
9819 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9820 * regformats/i386/amd64-avx-linux.dat: Likewise.
9821 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9822 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9823 * regformats/i386/amd64-linux.dat: Likewise.
9824 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9825 * regformats/i386/amd64.dat: Likewise.
9826 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9827 * regformats/i386/i386-avx-linux.dat: Likewise.
9828 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9829 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9830 * regformats/i386/i386-linux.dat: Likewise.
9831 * regformats/i386/i386-mmx-linux.dat: Likewise.
9832 * regformats/i386/i386-mpx-linux.dat: Likewise.
9833 * regformats/i386/i386.dat: Likewise.
9834 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9835 * regformats/i386/x32-avx-linux.dat: Likewise.
9836 * regformats/i386/x32-linux.dat: Likewise.
9837 * regformats/tic6x-c62x-linux.dat: Likewise.
9838 * regformats/tic6x-c64x-linux.dat: Likewise.
9839 * regformats/tic6x-c64xp-linux.dat: Likewise.
9840 * regformats/regdat.sh: Parse feature marker.
9841
9842 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9843
9844 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9845 (tdesc_osabi_name): Likewise.
9846 * target-descriptions.c (tdesc_architecture_name): Add new
9847 function.
9848 (tdesc_osabi_name): Likewise.
9849
9850 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9851
9852 * common/tdesc.c (tdesc_predefined_type): Move to here.
9853 (tdesc_named_type): Likewise.
9854 (tdesc_create_vector): Likewise.
9855 (tdesc_create_struct): Likewise.
9856 (tdesc_set_struct_size): Likewise.
9857 (tdesc_create_union): Likewise.
9858 (tdesc_create_flags): Likewise.
9859 (tdesc_create_enum): Likewise.
9860 (tdesc_add_field): Likewise.
9861 (tdesc_add_typed_bitfield): Likewise.
9862 (tdesc_add_bitfield): Likewise.
9863 (tdesc_add_flag): Likewise.
9864 (tdesc_add_enum_value): Likewise.
9865 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9866 (struct tdesc_type_vector): Likewise.
9867 (struct tdesc_type_field): Likewise.
9868 (struct tdesc_type_with_fields): Likewise.
9869 (tdesc_create_enum): Add declaration.
9870 (tdesc_add_typed_bitfield): Likewise.
9871 (tdesc_add_enum_value): Likewise.
9872 * target-descriptions.c (tdesc_type_field): Move from here.
9873 (tdesc_type_builtin): Likewise.
9874 (tdesc_type_vector): Likewise.
9875 (tdesc_type_with_fields): Likewise.
9876 (tdesc_predefined_types): Likewise.
9877 (tdesc_named_type): Likewise.
9878 (tdesc_create_vector): Likewise.
9879 (tdesc_create_struct): Likewise.
9880 (tdesc_set_struct_size): Likewise.
9881 (tdesc_create_union): Likewise.
9882 (tdesc_create_flags): Likewise.
9883 (tdesc_create_enum): Likewise.
9884 (tdesc_add_field): Likewise.
9885 (tdesc_add_typed_bitfield): Likewise.
9886 (tdesc_add_bitfield): Likewise.
9887 (tdesc_add_flag): Likewise.
9888 (tdesc_add_enum_value): Likewise.
9889 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9890 (tdesc_add_typed_bitfield): Likewise.
9891 (tdesc_add_enum_value): Likewise.
9892
9893 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9894
9895 * common/tdesc.c (tdesc_feature::accept): Move to here.
9896 (tdesc_feature::operator==): Likewise.
9897 (tdesc_create_reg): Likewise.
9898 * common/tdesc.h (tdesc_type_kind): Likewise.
9899 (struct tdesc_type): Likewise.
9900 (struct tdesc_feature): Likewise.
9901 * regformats/regdat.sh: Create a feature.
9902 * target-descriptions.c (tdesc_type_kind): Move from here.
9903 (tdesc_type): Likewise.
9904 (tdesc_type_up): Likewise.
9905 (tdesc_feature): Likewise.
9906 (tdesc_create_reg): Likewise.
9907
9908 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9909
9910 * Makefile.in: Add arch/tdesc.c
9911 * common/tdesc.c: New file.
9912 * common/tdesc.h (tdesc_element_visitor): Move to here.
9913 (tdesc_element): Likewise.
9914 (tdesc_reg): Likewise.
9915 (tdesc_reg_up): Likewise.
9916 * regformats/regdef.h (reg): Add offset to constructors.
9917 * target-descriptions.c (tdesc_element_visitor): Move from here.
9918 (tdesc_element): Likewise.
9919 (tdesc_reg): Likewise.
9920 (tdesc_reg_up): Likewise.
9921
9922 2018-04-17 Tom Tromey <tom@tromey.com>
9923
9924 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9925 discriminant field.
9926
9927 2018-04-17 Tom Tromey <tom@tromey.com>
9928
9929 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9930
9931 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9932
9933 * symtab.c (print_symbol_info): Skip printing filename and line
9934 number when `last' is NULL.
9935 (symtab_symbol_info): Use empty string instead of NULL for first
9936 invocation of print_symbol_info.
9937 (rbreak_command): Pass NULL to `last' parameter of
9938 print_symbol_info.
9939
9940 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9941
9942 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9943 instead of nullptr.
9944
9945 2018-04-16 Pedro Alves <palves@redhat.com>
9946
9947 * MAINTAINERS (sh): Remove.
9948 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9949 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9950 (ALLDEPFILES): Remove sh64-tdep.c.
9951 * NEWS: Mentions that support for SH-5/SH64 is removed.
9952 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9953 (sh*-*-openbsd*): Ditto.
9954 (sh64-*-elf*): Remove.
9955 (sh*): Remove.
9956 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9957 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9958 * sh-tdep.c: No longer include "sh64-tdep.h".
9959 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9960 * sh64-tdep.c, sh64-tdep.h: Remove files.
9961
9962 2018-04-16 Pedro Alves <palves@redhat.com>
9963
9964 * MAINTAINERS: Remove m88k.
9965 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9966 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9967 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9968 * NEWS: Mention that support for m88k was removed.
9969 * configure.host (m88*-*-*): Remove support.
9970 * configure.nat (m88k-*-*): Remove support.
9971 * configure.tgt (m88*-*-openbsd*): Remove.
9972 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9973
9974 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9975
9976 * configure.tgt (x86_tobjs): New variable.
9977 (amd64_tobjs, i386_tobjs): Use it.
9978
9979 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9980
9981 * symtab.c (print_symbol_info): Precede the symbol definition by
9982 the line number when available.
9983 * NEWS: Advertise this enhancement.
9984
9985 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9986
9987 * NEWS (New options): announce set/show record btrace cpu.
9988 * btrace.c: Include record-btrace.h.
9989 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9990 the vendor is unknown.
9991 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9992 Maybe overwrite the btrace configuration's cpu.
9993 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9994 (btrace_fetch): Add cpu parameter. Update callers.
9995 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9996 Maybe overwrite the btrace configuration's cpu. Skip enabling
9997 errata workarounds if the vendor is unknown.
9998 * python/py-record-btrace.c: Include record-btrace.h.
9999 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10000 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10001 * record-btrace.c (record_btrace_cpu_state_kind): New.
10002 (record_btrace_cpu): New.
10003 (set_record_btrace_cpu_cmdlist): New.
10004 (record_btrace_get_cpu): New.
10005 (require_btrace_thread, record_btrace_info)
10006 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10007 (cmd_set_record_btrace_cpu_none): New.
10008 (cmd_set_record_btrace_cpu_auto): New.
10009 (cmd_set_record_btrace_cpu): New.
10010 (cmd_show_record_btrace_cpu): New.
10011 (_initialize_record_btrace): Initialize set/show record btrace cpu
10012 commands.
10013 * record-btrace.h (record_btrace_get_cpu): New.
10014
10015 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10016
10017 * record.c (set_record_command): Fix typo in message.
10018
10019 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10020
10021 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10022
10023 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10024
10025 * infrun.c (process_event_stop_test): Call
10026 gdbarch_in_indirect_branch_thunk.
10027 * gdbarch.sh (in_indirect_branch_thunk): New.
10028 * gdbarch.c: Regenerated.
10029 * gdbarch.h: Regenerated.
10030 * x86-tdep.h: New.
10031 * x86-tdep.c: New.
10032 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10033 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10034 (ALLDEPFILES): Add x86-tdep.c.
10035 * arch-utils.h (default_in_indirect_branch_thunk): New.
10036 * arch-utils.c (default_in_indirect_branch_thunk): New.
10037 * i386-tdep: Include x86-tdep.h.
10038 (i386_in_indirect_branch_thunk): New.
10039 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10040 function.
10041 * amd64-tdep: Include x86-tdep.h.
10042 (amd64_in_indirect_branch_thunk): New.
10043 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10044
10045 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10046
10047 PR gdb/23053
10048 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10049 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10050 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10051 regression.
10052
10053 2018-04-12 Tom Tromey <tom@tromey.com>
10054
10055 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10056 (rust_evaluate_subexp): Likewise.
10057
10058 2018-04-12 Pedro Alves <palves@redhat.com>
10059
10060 * procfs.c (procfs_detach): Make forward declaration's prototype
10061 match definition's protototype.
10062 (proc_get_LDT_entry): Remove stale do_cleanups call.
10063
10064 2018-04-12 Pedro Alves <palves@redhat.com>
10065
10066 * target.h (target_ops::to_has_exited): Delete.
10067 (target_has_exited): Delete.
10068 * target-delegates.c: Regenerate.
10069
10070 2018-04-11 Pedro Alves <palves@redhat.com>
10071
10072 * target.c (fileio_fh_t::t): Add comment.
10073 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10074 (target_fileio_close): Handle a NULL target.
10075 (invalidate_fileio_fh): New.
10076 (target_close): Call it.
10077 * remote.c (remote_hostio_send_command): No longer check whether
10078 remote_desc is open.
10079
10080 2018-04-11 Pedro Alves <palves@redhat.com>
10081
10082 * target.c (fileio_fh_t): Make it a named struct instead of a
10083 typedef.
10084 (fileio_fh_t::is_closed): New method.
10085 (DEF_VEC_O (fileio_fh_t)): Remove.
10086 (fileio_fhandles): Now a std::vector.
10087 (is_closed_fileio_fh): Delete.
10088 (acquire_fileio_fd): Adjust. Rename parameters.
10089 (release_fileio_fd): Adjust.
10090 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10091 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10092 (target_fileio_close): Adjust.
10093
10094 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10095
10096 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10097 index.
10098
10099 2018-04-10 Pedro Alves <palves@redhat.com>
10100
10101 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10102 (scoped_finish_thread_state): New class.
10103 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10104 cleanup.
10105 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10106 (fetch_inferior_event, normal_stop): Likewise.
10107 * thread.c (finish_thread_state_cleanup): Delete.
10108
10109 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10110 Pedro Alves <palves@redhat.com>
10111
10112 * value.c: Include "selftest.h" and "common/array-view.h".
10113 (struct range) <operator ==>: New.
10114 (test_ranges_contain): New.
10115 (check_ranges_vector): New.
10116 (test_insert_into_bit_range_vector): New.
10117 (_initialize_values): Register selftests.
10118 * common/array-view.h (operator==, operator!=): New.
10119
10120 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10121
10122 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10123 an iterator.
10124 * inline-frame.c: Include <algorithm>.
10125 (struct inline_state): Add constructor.
10126 (inline_state_s): Remove.
10127 (DEF_VEC_O(inline_state_s)): Remove.
10128 (inline_states): Change type to std::vector.
10129 (find_inline_frame_state): Adjust to std::vector.
10130 (allocate_inline_frame_state): Remove.
10131 (clear_inline_frame_state): Adjust to std::vector.
10132 (skip_inline_frames): Adjust to std::vector.
10133
10134 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10135
10136 * tracepoint.h (struct trace_state_variable): Add constructor.
10137 <name>: Change type to std::string.
10138 * tracepoint.c (tsv_s): Remove.
10139 (DEF_VEC_O(tsv_s)): Remove.
10140 (tvariables): Change to std::vector.
10141 (create_trace_state_variable): Adjust to std::vector.
10142 (find_trace_state_variable): Likewise.
10143 (find_trace_state_variable_by_number): Likewise.
10144 (delete_trace_state_variable): Likewise.
10145 (trace_variable_command): Adjust to std::string.
10146 (delete_trace_variable_command): Likewise.
10147 (tvariables_info_1): Adjust to std::vector.
10148 (save_trace_state_variables): Likewise.
10149 (start_tracing): Likewise.
10150 (merge_uploaded_trace_state_variables): Adjust to std::vector
10151 and std::string.
10152 * target.h (struct target_ops)
10153 <to_download_trace_state_variable>: Pass reference to
10154 trace_state_variable.
10155 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10156 * target-delegates.c: Re-generate.
10157 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10158 (mi_tsv_deleted): Likewise.
10159 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10160 * remote.c (remote_download_trace_state_variable): Change
10161 pointer to reference and adjust.
10162 * make-target-delegates (parse_argtypes): Handle references.
10163 (write_function_header): Likewise.
10164 (munge_type): Likewise.
10165
10166 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10167
10168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10169 string_view-selftests.c.
10170 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10171 testsuite.
10172 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10173 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10174 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10175 * unittests/basic_string_view/element_access/char/1.cc:
10176 Likewise.
10177 * unittests/basic_string_view/element_access/char/empty.cc:
10178 Likewise.
10179 * unittests/basic_string_view/element_access/char/front_back.cc:
10180 Likewise.
10181 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10182 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10183 Likewise.
10184 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10185 Likewise.
10186 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10187 Likewise.
10188 * unittests/basic_string_view/operations/compare/char/1.cc:
10189 Likewise.
10190 * unittests/basic_string_view/operations/compare/char/13650.cc:
10191 Likewise.
10192 * unittests/basic_string_view/operations/copy/char/1.cc:
10193 Likewise.
10194 * unittests/basic_string_view/operations/data/char/1.cc:
10195 Likewise.
10196 * unittests/basic_string_view/operations/find/char/1.cc:
10197 Likewise.
10198 * unittests/basic_string_view/operations/find/char/2.cc:
10199 Likewise.
10200 * unittests/basic_string_view/operations/find/char/3.cc:
10201 Likewise.
10202 * unittests/basic_string_view/operations/find/char/4.cc:
10203 Likewise.
10204 * unittests/basic_string_view/operations/rfind/char/1.cc:
10205 Likewise.
10206 * unittests/basic_string_view/operations/rfind/char/2.cc:
10207 Likewise.
10208 * unittests/basic_string_view/operations/rfind/char/3.cc:
10209 Likewise.
10210 * unittests/basic_string_view/operations/substr/char/1.cc:
10211 Likewise.
10212 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10213 * unittests/string_view-selftests.c: New file.
10214
10215 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10216
10217 * unittests/basic_string_view/capacity/1.cc: New file.
10218 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10219 * unittests/basic_string_view/cons/char/1.cc: New file.
10220 * unittests/basic_string_view/cons/char/2.cc: New file.
10221 * unittests/basic_string_view/cons/char/3.cc: New file.
10222 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10223 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10224 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10225 * unittests/basic_string_view/element_access/char/1.cc: New file.
10226 * unittests/basic_string_view/element_access/char/2.cc: New file.
10227 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10228 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10229 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10230 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10231 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10232 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10233 * unittests/basic_string_view/include.cc: New file.
10234 * unittests/basic_string_view/inserters/char/1.cc: New file.
10235 * unittests/basic_string_view/inserters/char/2.cc: New file.
10236 * unittests/basic_string_view/inserters/char/3.cc: New file.
10237 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10238 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10239 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10240 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10241 * unittests/basic_string_view/literals/types.cc: New file.
10242 * unittests/basic_string_view/literals/values.cc: New file.
10243 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10244 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10245 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10246 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10247 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10248 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10249 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10250 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10251 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10252 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10253 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10254 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10255 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10256 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10257 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10258 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10259 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10260 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10261 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10262 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10263 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10264 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10265 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10266 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10267 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10268 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10269 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10270 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10271 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10272 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10273 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10274 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10275 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10276 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10277 * unittests/basic_string_view/operators/char/2.cc: New file.
10278 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10279 * unittests/basic_string_view/range_access/char/1.cc: New file.
10280 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10281 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10282 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10283 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10284 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10285 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10286 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10287 * unittests/basic_string_view/typedefs.cc: New file.
10288 * unittests/basic_string_view/types/1.cc: New file.
10289
10290 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10291
10292 * common/gdb_string_view.h: Remove libstdc++ implementation
10293 details, adjust to gdb reality.
10294 * common/gdb_string_view.tcc: Likewise.
10295 * cli/cli-script.c (struct string_view): Remove.
10296 (user_args) <m_args>: Change element type to gdb::string_view.
10297 (user_args::insert_args): Adjust.
10298
10299 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10300
10301 * common/gdb_string_view.h: New file.
10302 * common/gdb_string_view.tcc: New file.
10303
10304 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10305
10306 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10307 * configure: Re-generate.
10308
10309 2018-04-09 Pedro Alves <palves@redhat.com>
10310
10311 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10312 (set_target_gdbarch): Call
10313 gdb::observers::architecture_changed.notify instead of
10314 observer_notify_architecture_changed.
10315
10316 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10317
10318 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10319 (do_restore_current_traceframe_cleanup): Remove.
10320 (restore_current_traceframe_cleanup_dtor): Remove.
10321 (make_cleanup_restore_current_traceframe): Remove.
10322 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10323 New.
10324 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10325 * infrun.c (fetch_inferior_event): Use
10326 scoped_restore_current_traceframe.
10327
10328 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10329
10330 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10331 Remove.
10332 <n_allocated_type_units>: Remove.
10333 <all_type_units>: Change to std::vector.
10334 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10335 to std::vector change.
10336 (dwarf2_per_objfile::get_cutu): Likewise.
10337 (dwarf2_per_objfile::get_tu): Likewise.
10338 (create_signatured_type_table_from_index): Likewise.
10339 (create_signatured_type_table_from_debug_names): Likewise.
10340 (dw2_symtab_iter_next): Likewise.
10341 (dw2_print_stats): Likewise.
10342 (dw2_expand_all_symtabs): Likewise.
10343 (dw2_expand_marked_cus): Likewise.
10344 (dw2_debug_names_iterator::next): Likewise.
10345 (dwarf2_initialize_objfile): Likewise.
10346 (add_signatured_type_cu_to_table): Likewise.
10347 (create_all_type_units): Likewise.
10348 (add_type_unit): Likewise.
10349 (struct tu_abbrev_offset): Add constructor.
10350 (build_type_psymtabs_1): Adjust to std::vector change.
10351 (print_tu_stats): Likewise.
10352 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10353 (write_debug_names): Likewise.
10354
10355 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10356
10357 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10358 Make an std::vector.
10359 <n_comp_units>: Remove.
10360 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10361 to std::vector change.
10362 (dwarf2_per_objfile::get_cutu): Likewise.
10363 (dwarf2_per_objfile::get_cu): Likewise.
10364 (create_cus_from_index): Likewise.
10365 (create_addrmap_from_index): Likewise.
10366 (create_addrmap_from_aranges): Likewise.
10367 (dwarf2_read_index): Likewise.
10368 (dw2_find_last_source_symtab): Likewise.
10369 (dw2_map_symtabs_matching_filename): Likewise.
10370 (dw2_symtab_iter_next): Likewise.
10371 (dw2_print_stats): Likewise.
10372 (dw2_expand_all_symtabs): Likewise.
10373 (dw2_expand_symtabs_with_fullname): Likewise.
10374 (dw2_expand_marked_cus): Likewise.
10375 (dw2_map_symbol_filenames): Likewise.
10376 (create_cus_from_debug_names): Likewise.
10377 (dwarf2_read_debug_names): Likewise.
10378 (dw2_debug_names_iterator::next): Likewise.
10379 (dwarf2_initialize_objfile): Likewise.
10380 (set_partial_user): Likewise.
10381 (dwarf2_build_psymtabs_hard): Likewise.
10382 (read_comp_units_from_section): Remove arguments, adjust to
10383 std::vector change.
10384 (create_all_comp_units): Adjust to std::vector and
10385 read_comp_units_from_section changes.
10386 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10387 change.
10388 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10389 (psyms_seen_size): Likewise.
10390 (write_gdbindex): Likewise.
10391 (write_debug_names): Likewise.
10392
10393 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10394
10395 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10396 with dwarf2_per_objfile.
10397 (create_cus_from_index): Likewise.
10398 (create_signatured_type_table_from_index): Likewise.
10399 (dwarf2_read_index): Likewise.
10400 (dwarf2_initialize_objfile): Likewise.
10401 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10402 per_cu rather than get_dwarf2_per_objfile.
10403
10404 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10405
10406 * dwarf2read.h (struct signatured_type): Forward declare.
10407 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10408 New methods.
10409 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10410 (dw2_get_cutu): ...this.
10411 (dwarf2_per_objfile::get_cu): Rename from...
10412 (dw2_get_cu): ...this.
10413 (dwarf2_per_objfile::get_tu): New.
10414 (create_addrmap_from_index): Adjust.
10415 (create_addrmap_from_aranges): Adjust.
10416 (dw2_find_last_source_symtab): Adjust.
10417 (dw2_map_symtabs_matching_filename): Adjust.
10418 (dw2_symtab_iter_next): Adjust.
10419 (dw2_print_stats): Adjust.
10420 (dw2_expand_all_symtabs): Adjust.
10421 (dw2_expand_symtabs_with_fullname): Adjust.
10422 (dw2_expand_marked_cus): Adjust.
10423 (dw_expand_symtabs_matching_file_matcher): Adjust.
10424 (dw2_map_symbol_filenames): Adjust.
10425 (dw2_debug_names_iterator::next): Adjust.
10426 (dwarf2_initialize_objfile): Adjust.
10427 (set_partial_user): Adjust.
10428 (dwarf2_build_psymtabs_hard): Adjust.
10429
10430 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10431
10432 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10433 Remove unused variables.
10434 (dw2_map_symtabs_matching_filename): Likewise.
10435 (dwarf2_record_block_ranges): Likewise.
10436 (dwarf2_read_addr_index): Likewise.
10437 (follow_die_offset): Likewise.
10438
10439 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10440
10441 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10442 to symbol_file_add_main.
10443
10444 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10445
10446 PR mi/22299
10447 * mi/mi-console.c (do_fputc_async_safe): New.
10448 (mi_console_file::write_async_safe): New.
10449 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10450 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10451 New.
10452 * ui-file.c (ui_file::putstrn): Adjust call to
10453 fputstrn_unfiltered.
10454 * utils.c (printchar): Replace do_fputs and do_fprintf
10455 parameters by do_fputc.
10456 (fputstr_filtered): Adjust call to printchar.
10457 (fputstr_unfiltered): Likewise.
10458 (fputstrn_filtered): Likewise.
10459 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10460 printchar.
10461 * utils.h (do_fputc_ftype): New typedef.
10462 (fputstrn_unfiltered): Add do_fputc parameter.
10463
10464 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10465
10466 * regformats/i386/i386-avx.dat: Remove.
10467
10468 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10469
10470 PR gdb/22979
10471 * amd64-tdep.c (amd64_none_init_abi): New function.
10472 (amd64_x32_none_init_abi): New function.
10473 (_initialize_amd64_tdep): Register handlers for x86-64 and
10474 x64_32 with GDB_OSABI_NONE.
10475 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10476 GDB_OSABI_NONE osabi.
10477
10478 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10479
10480 PR gdb/22980
10481 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10482 GDB_OSABI_NONE.
10483 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10484 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10485
10486 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10487
10488 * common/byte-vector.h (char_vector): New type.
10489 * target.h (target_read_alloc): Return
10490 gdb::optional<byte_vector>.
10491 (target_read_stralloc): Return gdb::optional<char_vector>.
10492 (target_get_osdata): Return gdb::optional<char_vector>.
10493 * target.c (target_read_alloc_1): Templatize. Replacement
10494 manual memory management with vector.
10495 (target_read_alloc): Change return type, adjust.
10496 (target_read_stralloc): Change return type, adjust.
10497 (target_get_osdata): Change return type, adjust.
10498 * auxv.c (struct auxv_info) <length>: Remove.
10499 <data>: Change type to gdb::optional<byte_vector>.
10500 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10501 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10502 (target_auxv_search): Adjust.
10503 (fprint_target_auxv): Adjust.
10504 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10505 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10506 (linux_make_corefile_notes): Adjust.
10507 * osdata.c (get_osdata): Adjust.
10508 * remote.c (remote_get_threads_with_qxfer): Adjust.
10509 (remote_memory_map): Adjust.
10510 (remote_traceframe_info): Adjust.
10511 (btrace_read_config): Adjust.
10512 (remote_read_btrace): Adjust.
10513 (remote_pid_to_exec_file): Adjust.
10514 * solib-aix.c (solib_aix_get_library_list): Adjust.
10515 * solib-dsbt.c (decode_loadmap): Don't free buf.
10516 (dsbt_get_initial_loadmaps): Adjust.
10517 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10518 * solib-target.c (solib_target_current_sos): Adjust.
10519 * tracepoint.c (sdata_make_value): Adjust.
10520 * xml-support.c (xinclude_start_include): Adjust.
10521 (xml_fetch_content_from_file): Adjust.
10522 * xml-support.h (xml_fetch_another): Change return type.
10523 (xml_fetch_content_from_file): Change return type.
10524 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10525 * xml-tdesc.c (file_read_description_xml): Adjust.
10526 (fetch_available_features_from_target): Change return type.
10527 (target_fetch_description_xml): Adjust.
10528 (target_read_description_xml): Adjust.
10529
10530 2018-04-06 Tom Tromey <tom@tromey.com>
10531
10532 * value.c (~value): Update.
10533 (struct value) <contents>: Now unique_xmalloc_ptr.
10534 (value_contents_bits_eq, allocate_value_contents)
10535 (value_contents_raw, value_contents_all_raw)
10536 (value_contents_for_printing, value_contents_for_printing_const)
10537 (set_value_enclosing_type): Update.
10538
10539 2018-04-06 Tom Tromey <tom@tromey.com>
10540
10541 * value.c (range_s): Remove typedef, VEC.
10542 (struct range): Add operator<.
10543 (range_lessthan): Remove.
10544 (ranges_contain): Change type.
10545 (~value): Update.
10546 (struct value) <unavailable, optimized_out>: Now std::vector.
10547 (value_entirely_available)
10548 (value_entirely_covered_by_range_vector)
10549 (value_entirely_unavailable, value_entirely_optimized_out):
10550 Update.
10551 (insert_into_bit_range_vector): Change argument type.
10552 (find_first_range_overlap): Likewise.
10553 (struct ranges_and_idx, value_contents_bits_eq)
10554 (require_not_optimized_out, require_available): Update.
10555 (ranges_copy_adjusted): Change argument types.
10556 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10557
10558 2018-04-06 Tom Tromey <tom@tromey.com>
10559
10560 * value.c (~value): Update.
10561 (struct value) <parent>: Now a value_ref_ptr.
10562 (value_parent, set_value_parent, value_address, value_copy):
10563 Update.
10564
10565 2018-04-06 Tom Tromey <tom@tromey.com>
10566
10567 * value.c (struct value): Add constructor, destructor, and member
10568 initializers.
10569 (allocate_value_lazy, value_decref): Update.
10570
10571 2018-04-06 Tom Tromey <tom@tromey.com>
10572
10573 * value.c (struct value) <released, next>: Remove.
10574 (all_values): Now a std::vector.
10575 (allocate_value_lazy): Update.
10576 (value_next): Remove.
10577 (value_mark, value_free_to_mark, release_value)
10578 (value_release_to_mark): Update.
10579
10580 2018-04-06 Tom Tromey <tom@tromey.com>
10581
10582 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10583 (free_value_chain): Remove.
10584 * value.c (free_value_chain): Remove.
10585 (value_release_to_mark): Return a std::vector.
10586 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10587 std::vector.
10588 (check_condition): Update.
10589 * eval.c (fetch_subexp_value): Change "val_chain" to a
10590 std::vector.
10591 * breakpoint.c (update_watchpoint): Update.
10592 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10593
10594 2018-04-06 Tom Tromey <tom@tromey.com>
10595
10596 * value.h (free_all_values): Remove.
10597 * value.c (free_all_values): Remove.
10598
10599 2018-04-06 Tom Tromey <tom@tromey.com>
10600
10601 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10602 (value_history_chain, value_history_count): Remove.
10603 (value_history): New global.
10604 (record_latest_value, access_value_history, show_values)
10605 (preserve_values): Update.
10606
10607 2018-04-06 Tom Tromey <tom@tromey.com>
10608
10609 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10610 * varobj.c (varobj_set_display_format, varobj_set_value)
10611 (install_default_visualizer, construct_visualizer)
10612 (install_new_value, ~varobj, varobj_get_value_type)
10613 (my_value_of_variable, varobj_editable_p): Update.
10614 * c-varobj.c (c_describe_child, c_value_of_variable)
10615 (cplus_number_of_children, cplus_describe_child): Update.
10616 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10617 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10618 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10619
10620 2018-04-06 Tom Tromey <tom@tromey.com>
10621
10622 * printcmd.c (last_examine_address): Change type to
10623 value_ref_ptr.
10624 (do_examine, x_command): Update.
10625
10626 2018-04-06 Tom Tromey <tom@tromey.com>
10627
10628 * value.c (release_value): Update.
10629 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10630 (struct bpstats) <val>: Now a value_ref_ptr.
10631 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10632 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10633 (~watchpoint, print_it_watchpoint, watch_command_1)
10634 (invalidate_bp_value_on_memory_change): Update.
10635
10636 2018-04-06 Tom Tromey <tom@tromey.com>
10637
10638 * varobj.c (varobj_clear_saved_item)
10639 (update_dynamic_varobj_children, install_new_value, ~varobj):
10640 Update.
10641 * value.h (value_incref): Move declaration earlier.
10642 (value_decref): Rename from value_free.
10643 (struct value_ref_policy): New.
10644 (value_ref_ptr): New typedef.
10645 (struct value_deleter): Remove.
10646 (gdb_value_up): Remove typedef.
10647 (release_value): Change return type.
10648 (release_value_or_incref): Remove.
10649 * value.c (set_value_parent): Update.
10650 (value_incref): Change return type.
10651 (value_decref): Rename from value_free.
10652 (value_free_to_mark, free_all_values, free_value_chain): Update.
10653 (release_value): Return value_ref_ptr.
10654 (release_value_or_incref): Remove.
10655 (record_latest_value, set_internalvar, clear_internalvar):
10656 Update.
10657 * stack.c (info_frame_command): Don't call value_free.
10658 * python/py-value.c (valpy_dealloc, valpy_new)
10659 (value_to_value_object): Update.
10660 * printcmd.c (do_examine): Update.
10661 * opencl-lang.c (lval_func_free_closure): Update.
10662 * mi/mi-main.c (register_changed_p): Don't call value_free.
10663 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10664 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10665 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10666 value_free.
10667 * guile/scm-value.c (vlscm_free_value_smob)
10668 (vlscm_scm_from_value): Update.
10669 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10670 (frame_unwind_register_unsigned, get_frame_register_bytes)
10671 (put_frame_register_bytes): Don't call value_free.
10672 * findvar.c (address_from_register): Don't call value_free.
10673 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10674 * dwarf2loc.c (entry_data_value_free_closure)
10675 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10676 (dwarf2_evaluate_loc_desc_full): Update.
10677 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10678 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10679 (~watchpoint, watch_command_1)
10680 (invalidate_bp_value_on_memory_change): Update.
10681 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10682
10683 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10684
10685 PR gdb/23022
10686 * warning.m4: Add -Wno-error=deprecated-register.
10687 * configure: Re-generate.
10688
10689 2018-04-05 Tom Tromey <tom@tromey.com>
10690
10691 * linespec.h: Remove include of "vec.h".
10692
10693 2018-04-05 Tom Tromey <tom@tromey.com>
10694
10695 * linespec.c (typep): Remove typedef.
10696 (find_methods, find_superclass_methods): Take a std::vector.
10697 (find_method): Use std::vector.
10698
10699 2018-04-05 Tom Tromey <tom@tromey.com>
10700
10701 * utils.c (compare_strings): Remove.
10702 * utils.h (compare_strings): Remove.
10703 * objc-lang.h (find_imps): Update.
10704 * objc-lang.c (find_methods): Take a std::vector.
10705 (uniquify_strings, find_imps): Likewise.
10706 * linespec.c (find_methods): Take a std::vector.
10707 (decode_objc): Use std::vector.
10708 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10709 a std::vector.
10710 (find_method, find_function_symbols): Use std::vector.
10711
10712 2018-04-05 Tom Tromey <tom@tromey.com>
10713
10714 * completer.c (completion_tracker::completion_tracker): Remove
10715 cast.
10716 (completion_tracker::discard_completions): Likewise.
10717 * breakpoint.c (ambiguous_names_p): Remove cast.
10718 * ada-lang.c (_initialize_ada_language): Remove cast.
10719 * utils.h (streq): Update.
10720 (streq_hash): Add new declaration.
10721 * utils.c (streq): Return bool.
10722 (streq_hash): New function.
10723
10724 2018-04-05 Tom Tromey <tom@tromey.com>
10725
10726 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10727 Remove a string copy.
10728
10729 2018-04-05 Tom Tromey <tom@tromey.com>
10730
10731 * linespec.c (filter_results): Use std::vector.
10732 (decode_line_2, decode_line_full): Update.
10733
10734 2018-04-05 Tom Tromey <tom@tromey.com>
10735
10736 * linespec.c (canonical_to_fullform): Return std::string.
10737 (filter_results): Update.
10738 (struct decode_line_2_item): Add constructor.
10739 <fullform, displayform>: Now std::string.
10740 (decode_line_2_compare_items): Now a std::sort comparator.
10741 (decode_line_2): Update.
10742
10743 2018-04-05 Tom Tromey <tom@tromey.com>
10744
10745 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10746 (unexpected_linespec_error): Update.
10747 (linespec_parse_basic, parse_linespec): Update.
10748
10749 2018-04-05 Tom Tromey <tom@tromey.com>
10750
10751 * linespec.c (linespec_parse_basic): Reindent.
10752
10753 2018-04-05 Tom Tromey <tom@tromey.com>
10754
10755 * minsyms.h (iterate_over_minimal_symbols): Update.
10756 * minsyms.c (iterate_over_minimal_symbols): Take a
10757 gdb::function_view.
10758 * linespec.c (struct collect_minsyms): Remove.
10759 (compare_msyms): Now a std::sort comparator.
10760 (add_minsym): Add parameters.
10761 (search_minsyms_for_name): Update. Use std::vector.
10762
10763 2018-04-03 Tom Tromey <tom@tromey.com>
10764
10765 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10766 gdb::byte_vector.
10767
10768 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10769
10770 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10771
10772 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10773
10774 PR gdb/16959
10775 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10776 printing static type.
10777
10778 2018-04-01 Tom Tromey <tom@tromey.com>
10779
10780 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10781 (rs6000_xfer_shared_libraries): Update.
10782
10783 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10784
10785 * common/gdb_vecs.h (char_ptr): Remove.
10786 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10787
10788 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10789
10790 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10791 with std::vector.
10792 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10793
10794 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10795
10796 * tracepoint.h (struct uploaded_tp): Initialize fields.
10797 <actions, step_actions, cmd_strings>: Change type to
10798 std::vector<char *>.
10799 * tracepoint.c (get_uploaded_tp): Allocate with new.
10800 (free_uploaded_tps): Free with delete.
10801 (parse_tracepoint_definition): Adjust to std::vector change.
10802 * breakpoint.c (read_uploaded_action): Likewise.
10803 (create_tracepoint_from_upload): Likewise.
10804 * ctf.c (ctf_write_uploaded_tp): Likewise.
10805 (SET_ARRAY_FIELD): Likewise.
10806 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10807
10808 2018-03-30 Tom Tromey <tom@tromey.com>
10809
10810 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10811 std::unique_ptr.
10812 (svr4_keep_data_in_core): Update.
10813 (svr4_read_so_list): Update.
10814
10815 2018-03-30 Tom Tromey <tom@tromey.com>
10816
10817 * windows-nat.c (handle_output_debug_string, handle_exception):
10818 Update.
10819 * target.h (target_read_string): Update.
10820 * target.c (target_read_string): Change "string" to
10821 unique_xmalloc_ptr.
10822 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10823 Update.
10824 * solib-frv.c (frv_current_sos): Update.
10825 * solib-dsbt.c (dsbt_current_sos): Update.
10826 * solib-darwin.c (darwin_current_sos): Update.
10827 * linux-thread-db.c (inferior_has_bug): Update.
10828 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10829 Update. Remove alloca.
10830 * ada-lang.c (ada_main_name): Update.
10831
10832 2018-03-30 Tom Tromey <tom@tromey.com>
10833
10834 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10835 (struct dwo_file_deleter): New.
10836 (dwo_file_up): New typedef.
10837 (open_and_init_dwo_file): Use dwo_file_up.
10838 (free_dwo_file_cleanup): Remove.
10839
10840 2018-03-30 Tom Tromey <tom@tromey.com>
10841
10842 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10843 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10844
10845 2018-03-30 Tom Tromey <tom@tromey.com>
10846
10847 * dwarf2read.c (class free_cached_comp_units): New class.
10848 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10849 (free_cached_comp_units): Remove function.
10850
10851 2018-03-30 Tom Tromey <tom@tromey.com>
10852
10853 * utils.h (make_cleanup_unpush_target): Remove.
10854 * inf-ptrace.c (struct target_unpusher): New.
10855 (target_unpush_up) New typedef.
10856 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10857 target_unpush_up.
10858 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10859
10860 2018-03-27 Tom Tromey <tom@tromey.com>
10861
10862 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10863
10864 2018-03-27 Pedro Alves <palves@redhat.com>
10865 Tom Tromey <tom@tromey.com>
10866
10867 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10868 destructor. Now a class.
10869 (gdb_readline_wrapper_cleanup): Remove function.
10870 (gdb_readline_wrapper): Remove cleanups.
10871
10872 2018-03-27 Tom Tromey <tom@tromey.com>
10873
10874 * typeprint.h (struct type_print_options) <local_typedefs,
10875 global_typedefs>: Remove "struct" keyword.
10876 (class typedef_hash_table): New class.
10877 (recursively_update_typedef_hash, add_template_parameters)
10878 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10879 (find_typedef_in_hash): Don't declare.
10880 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10881 (typedef_hash_table::recursively_update): Rename from
10882 recursively_update_typedef_hash. Now a member.
10883 (typedef_hash_table::add_template_parameters): Rename from
10884 add_template_parameters. Now a member.
10885 (typedef_hash_table::typedef_hash_table): Now a constructor;
10886 rename from create_typedef_hash.
10887 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10888 rename from free_typedef_hash.
10889 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10890 (do_free_global_table): Remove.
10891 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10892 from copy_type_recursive.
10893 (create_global_typedef_table): Remove.
10894 (typedef_hash_table::find_global_typedef): Now a member of
10895 typedef_hash_table.
10896 (typedef_hash_table::find_typedef): Rename from
10897 find_typedef_in_hash; now a member.
10898 (whatis_exp): Update.
10899 * extension.h (struct ext_lang_type_printers): Add constructor and
10900 destructor.
10901 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10902 declare.
10903 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10904 Now a constructor; rename from start_ext_lang_type_printers.
10905 (ext_lang_type_printers): Now a destructor; rename from
10906 free_ext_lang_type_printers.
10907 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10908 Update.
10909 (c_type_print_base_struct_union): Update. Remove cleanups.
10910
10911 2018-03-27 Tom Tromey <tom@tromey.com>
10912
10913 * dwarf-index-write.c: Include <cmath>.
10914
10915 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10916
10917 * NEWS: Add entry describing new "set|show varsize-limit" command.
10918 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10919 command.
10920 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10921 "set variable".
10922
10923 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10924
10925 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10926 dwarf-index-write.c
10927 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10928 * dwarf-index-common.c: New file.
10929 * dwarf-index-common.h: New file.
10930 * dwarf-index-write.c: New file.
10931 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10932 (struct dwarf2_section_info): Move from here.
10933 (dwarf2_section_info_def): Likewise.
10934 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10935 (offset_type): Likewise.
10936 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10937 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10938 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10939 (byte_swap): Likewise.
10940 (MAYBE_SWAP): Likewise.
10941 (dwarf2_per_cu_ptr): Likewise.
10942 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10943 (struct tu_stats): Likewise.
10944 (struct dwarf2_per_objfile): Likewise.
10945 (struct dwarf2_per_cu_data): Likewise.
10946 (struct signatured_type): Likewise.
10947 (sig_type_ptr): Likewise.
10948 (DEF_VEC_P (sig_type_ptr)): Likewise.
10949 (INDEX4_SUFFIX): Likewise.
10950 (INDEX5_SUFFIX): Likewise.
10951 (DEBUG_STR_SUFFIX): Likewise.
10952 (dwarf2_read_section): Make non-static.
10953 (mapped_index_string_hash): Move from here.
10954 (dwarf5_djb_hash): Likewise.
10955 (file_write): Likewise.
10956 (class data_buf): Likewise.
10957 (struct symtab_index_entry): Likewise.
10958 (struct mapped_symtab): Likewise.
10959 (find_slot): Likewise.
10960 (hash_expand): Likewise.
10961 (add_index_entry): Likewise.
10962 (uniquify_cu_indices): Likewise.
10963 (class c_str_view): Likewise.
10964 (class c_str_view_hasher): Likewise.
10965 (class vector_hasher): Likewise.
10966 (write_hash_table): Likewise.
10967 (psym_index_map): Likewise.
10968 (struct addrmap_index_data): Likewise.
10969 (add_address_entry): Likewise.
10970 (add_address_entry_worker): Likewise.
10971 (write_address_map): Likewise.
10972 (symbol_kind): Likewise.
10973 (write_psymbols): Likewise.
10974 (struct signatured_type_index_data): Likewise.
10975 (write_one_signatured_type): Likewise.
10976 (recursively_count_psymbols): Likewise.
10977 (recursively_write_psymbols): Likewise.
10978 (class debug_names): Likewise.
10979 (check_dwarf64_offsets): Likewise.
10980 (psyms_seen_size): Likewise.
10981 (write_gdbindex): Likewise.
10982 (write_debug_names): Likewise.
10983 (assert_file_size): Likewise.
10984 (write_psymtabs_to_index): Likewise.
10985 (save_gdb_index_command): Likewise.
10986 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10987 command.
10988 * dwarf2read.h: New file.
10989
10990 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10991
10992 PR gdb/22670
10993 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10994 symbol name if the CU's language stores symbol names in linkage
10995 format.
10996 * language.h (struct language_defn)
10997 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10998 all instances of this struct.
10999
11000 2018-03-26 Tom Tromey <tom@tromey.com>
11001
11002 * stack.c (backtrace_command_1): Remove verbose code.
11003
11004 2018-03-26 Tom Tromey <tom@tromey.com>
11005
11006 * python/py-framefilter.c (py_print_type): Don't catch
11007 exceptions. Return void.
11008 (py_print_value): Likewise.
11009 (py_print_single_arg): Likewise.
11010 (enumerate_args): Don't catch exceptions.
11011 (py_print_args): Likewise.
11012 (py_print_frame): Likewise.
11013 (gdbpy_apply_frame_filter): Catch exceptions here.
11014
11015 2018-03-26 Tom Tromey <tom@tromey.com>
11016
11017 * stack.c (_initialize_stack): Remove trailing newlines from help
11018 text. Add "Usage" line to "backtrace" help.
11019
11020 2018-03-26 Tom Tromey <tom@tromey.com>
11021
11022 PR python/16486:
11023 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11024
11025 2018-03-26 Tom Tromey <tom@tromey.com>
11026
11027 * python/py-framefilter.c (py_print_single_arg): Return
11028 EXT_LANG_BT_ERROR from catch.
11029
11030 2018-03-26 Tom Tromey <tom@tromey.com>
11031
11032 PR backtrace/15584:
11033 * stack.c (backtrace_command_1): Move some code into no-filters
11034 "if".
11035
11036 2018-03-26 Tom Tromey <tom@tromey.com>
11037
11038 * python/py-framefilter.c (throw_quit_or_print_exception): New
11039 function.
11040 (gdbpy_apply_frame_filter): Use it.
11041
11042 2018-03-26 Tom Tromey <tom@tromey.com>
11043
11044 PR cli/17716:
11045 * python/py-framefilter.c (py_print_type, py_print_value)
11046 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11047 RETURN_MASK_ERROR.
11048
11049 2018-03-26 Tom Tromey <tom@tromey.com>
11050
11051 * python/py-framefilter.c (enumerate_args): Use
11052 gdb::unique_xmalloc_ptr.
11053
11054 2018-03-26 Tom Tromey <tom@tromey.com>
11055
11056 * python/py-framefilter.c (py_print_frame): Return
11057 EXT_LANG_BT_OK.
11058 (gdbpy_apply_frame_filter): Update comment.
11059 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11060 Remove.
11061 <EXT_LANG_BT_NO_FILTERS>: Change value.
11062
11063 2018-03-26 Tom Tromey <tom@tromey.com>
11064
11065 PR backtrace/15582:
11066 * stack.c (backtrace_command): Parse "hide" argument.
11067 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11068 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11069 constant.
11070
11071 2018-03-26 Tom Tromey <tom@tromey.com>
11072
11073 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11074 add "flags".
11075 (backtrace_command): Remove "fulltrace", add "flags".
11076
11077 2018-03-26 Tom Tromey <tom@tromey.com>
11078
11079 * stack.c (backtrace_command): Rewrite command line parsing.
11080
11081 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11082
11083 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11084
11085 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11086
11087 * filename-seen-cache.h: Add include guard.
11088
11089 2018-03-26 Keith Seitz <keiths@redhat.com>
11090
11091 * symfile.c (place_section): Remove "struct" from section_addr_info
11092 in comment.
11093 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11094 "struct" keyword from section_addr_info.
11095
11096 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11097
11098 * regformats/regdef.h (reg): Add constructors.
11099
11100 2018-03-25 Pedro Alves <palves@redhat.com>
11101
11102 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11103 if then/else bodies in var_func_name extraction.
11104
11105 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11106
11107 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11108 lookup_minimal_symbol() to find symbol entry.
11109 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11110
11111 2018-03-23 Keith Seitz <keiths@redhat.com>
11112
11113 PR c++/22968
11114 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11115 nested type definitions for C++, too.
11116
11117 2018-03-23 Tom Tromey <tom@tromey.com>
11118
11119 * machoread.c (struct oso_el): Add a constructor. Don't define as
11120 a typedef.
11121 (macho_register_oso): Remove.
11122 (macho_symtab_read): Take a std::vector.
11123 (oso_el_compare_name): Now a std::sort comparator.
11124 (macho_symfile_read_all_oso): Take a std::vector.
11125 (macho_symfile_read): Use std::vector. Remove cleanups.
11126
11127 2018-03-22 Tom Tromey <tom@tromey.com>
11128
11129 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11130 (record_full_goto_bookmark): Use std::string.
11131
11132 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11133
11134 PR tdep/18295
11135 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11136 a single mask.
11137
11138 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11139
11140 * rs6000-tdep.c (store_insn_p): New function.
11141 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11142 and cr_reg to their unshifted values. Use store_insn_p to
11143 match LR saves using either R1 or fdata->alloca_reg. Use
11144 store_insn_p to match CR saves. Set alloca_reg_offset
11145 when alloca_reg and framep are set. Remove lr_reg shift
11146 when assigning to fdata->lr_register.
11147
11148 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11149
11150 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11151 command line args instead of emitting a warning.
11152
11153 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11154
11155 * tracepoint.h (struct static_tracepoint_marker): Initialize
11156 fields, define default constructor, move constructor and move
11157 assignment, disable the rest.
11158 <str_id, extra>: Make std::string.
11159 (release_static_tracepoint_marker): Remove.
11160 (free_current_marker): Remove.
11161 * tracepoint.c (free_current_marker): Remove.
11162 (parse_static_tracepoint_marker_definition): Adjust to
11163 std::string, use new hex2str overload.
11164 (release_static_tracepoint_marker): Remove.
11165 (print_one_static_tracepoint_marker): Get marker by reference
11166 and adjust to std::string.
11167 (info_static_tracepoint_markers_command): Adjust to std::vector
11168 changes
11169 * target.h (static_tracepoint_marker_p): Remove typedef.
11170 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11171 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11172 bool.
11173 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11174 * target-debug.h
11175 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11176 (target_debug_print_std_vector_static_tracepoint_marker): New.
11177 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11178 to...
11179 (target_debug_print_static_tracepoint_marker_p): ... this.
11180 * target-delegates.c: Re-generate.
11181 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11182 Make std::string.
11183 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11184 (decode_static_tracepoint_spec): Adjust to std::vector.
11185 (tracepoint_print_one_detail): Adjust to std::string.
11186 (strace_marker_decode_location): Adjust to std::string.
11187 (update_static_tracepoint): Adjust to std::string, remove call
11188 to release_static_tracepoint_marker.
11189 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11190 Adjust to std::vector.
11191 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11192 (remote_static_tracepoint_markers_by_strid): Adjust to
11193 std::vector.
11194 * common/rsp-low.h (hex2str): New overload with explicit count
11195 of bytes.
11196 * common/rsp-low.c (hex2str): New overload with explicit count
11197 of bytes.
11198 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11199 (_initialize_rsp_low_selftests): Add test_hex2str test.
11200 * unittests/tracepoint-selftests.c
11201 (test_parse_static_tracepoint_marker_definition): Adjust to
11202 std::string.
11203
11204 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11205
11206 * tracepoint.c (parse_static_tracepoint_marker_definition):
11207 Consider case where the definition is followed by more
11208 definitions.
11209 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11210 tracepoint-selftests.c.
11211 * unittests/tracepoint-selftests.c: New.
11212
11213 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11214
11215 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11216 Carvalho.
11217
11218 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11219
11220 * symtab.c (find_pc_sect_line): fixed indentation.
11221
11222 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11223
11224 * symtab.c (find_pc_sect_line): now uses binary search.
11225
11226 2018-03-19 Tom Tromey <tom@tromey.com>
11227
11228 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11229 "IDENT" production.
11230
11231 2018-03-19 Pedro Alves <palves@redhat.com>
11232 Tom Tromey <tom@tromey.com>
11233
11234 * unittests/observable-selftests.c: New file.
11235 * common/observable.h: New file.
11236 * observable.h: New file.
11237 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11238 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11239 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11240 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11241 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11242 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11243 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11244 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11245 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11246 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11247 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11248 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11249 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11250 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11251 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11252 tui/tui-interp.c, valops.c: Update all users.
11253 * tui/tui-hooks.c (tui_bp_created_observer)
11254 (tui_bp_deleted_observer, tui_bp_modified_observer)
11255 (tui_inferior_exit_observer, tui_before_prompt_observer)
11256 (tui_normal_stop_observer, tui_register_changed_observer):
11257 Remove.
11258 (tui_observers_token): New global.
11259 (attach_or_detach, tui_attach_detach_observers): New functions.
11260 (tui_install_hooks, tui_remove_hooks): Use
11261 tui_attach_detach_observers.
11262 * record-btrace.c (record_btrace_thread_observer): Remove.
11263 (record_btrace_thread_observer_token): New global.
11264 * observer.sh: Remove.
11265 * observer.c: Rename to observable.c.
11266 * observable.c (namespace gdb_observers): Define new objects.
11267 (observer_debug): Move into gdb_observers namespace.
11268 (struct observer, struct observer_list, xalloc_observer_list_node)
11269 (xfree_observer_list_node, generic_observer_attach)
11270 (generic_observer_detach, generic_observer_notify): Remove.
11271 (_initialize_observer): Update.
11272 Don't include observer.inc.
11273 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11274 (clean mostlyclean): Likewise.
11275 (observer.h, observer.inc): Remove targets.
11276 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11277 (COMMON_SFILES): Use observable.c, not observer.c.
11278 * .gitignore: Remove observer.h.
11279
11280 2018-03-18 Tom Tromey <tom@tromey.com>
11281
11282 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11283 gdb::def_vector.
11284 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11285
11286 2018-03-17 Tom Tromey <tom@tromey.com>
11287
11288 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11289
11290 2018-03-17 Tom Tromey <tom@tromey.com>
11291
11292 * target.c (class scoped_target_fd): New.
11293 (target_fileio_close_cleanup): Remove.
11294 (target_fileio_read_alloc_1): Use scoped_target_fd.
11295
11296 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11297
11298 * silent-rules.mk: New.
11299 * Makefile.in: Include silent-rules.mk
11300 (srcdir, VPATH, top_srcdir): Move up.
11301 (COMPILE): Add ECHO_CXX.
11302 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11303 (init.c): Add ECHO_INIT_C.
11304 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11305 (version.c): Add ECHO_GEN.
11306 (printcmd.o): Add ECHO_CXX.
11307 (target-float.o): Add ECHO_CXX.
11308 (ada-exp.o): Add ECHO_CXX.
11309 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11310 (insight$(EXEEXT)): Add ECHO_CXXLD.
11311 * gnulib/configure.ac: Add AM_SILENT_RULES.
11312 * gnulib/aclocal.m4: Re-generate.
11313 * gnulib/configure: Re-generate.
11314 * gnulib/import/Makefile.in: Re-generate.
11315
11316 2018-03-16 Tom Tromey <tom@tromey.com>
11317
11318 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11319 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11320 * utils.c (do_free_section_addr_info)
11321 (make_cleanup_free_section_addr_info): Remove.
11322 * symfile.h (struct other_sections): Add constructor.
11323 (struct section_addr_info): Remove.
11324 (section_addr_info): New typedef.
11325 (struct sym_fns) <sym_offsets>: Change type of parameter.
11326 (build_section_addr_info_from_objfile)
11327 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11328 (default_symfile_offsets, symbol_file_add)
11329 (symbol_file_add_from_bfd)
11330 (build_section_addr_info_from_section_table): Update.
11331 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11332 * symfile.c (alloc_section_addr_info): Remove.
11333 (build_section_addr_info_from_section_table): Change return type.
11334 Update.
11335 (build_section_addr_info_from_bfd)
11336 (build_section_addr_info_from_objfile): Likewise.
11337 (free_section_addr_info): Remove.
11338 (relative_addr_info_to_section_offsets): Change type of "addrs".
11339 (addrs_section_compar): Now a std::sort comparator.
11340 (addrs_section_sort): Change return type.
11341 (addr_info_make_relative): Change type of "addrs". Update.
11342 (default_symfile_offsets, syms_from_objfile_1)
11343 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11344 (symbol_file_add_separate): Update.
11345 (symbol_file_add): Change type of "addrs". Update.
11346 (add_symbol_file_command): Update. Remove cleanups.
11347 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11348 cleanups.
11349 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11350 * solib.c (solib_read_symbols): Update.
11351 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11352 * machoread.c (macho_symfile_offsets): Update.
11353 * jit.c (jit_bfd_try_read_symtab): Update.
11354
11355 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11356
11357 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11358 unittests/utils-selftests.c.
11359 * unittests/utils-selftests.c: New file.
11360
11361 2018-03-14 Tom Tromey <tom@tromey.com>
11362
11363 PR cli/14977:
11364 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11365 for NULL.
11366
11367 2018-03-14 Tom Tromey <tom@tromey.com>
11368
11369 PR cli/19918:
11370 * printcmd.c (printf_pointer): Allow "-" in format.
11371
11372 2018-03-14 Tom Tromey <tom@tromey.com>
11373
11374 * printcmd.c (_initialize_printcmd): Add usage to printf.
11375
11376 2018-03-14 Yao Qi <qiyao@sourceware.org>
11377
11378 * MAINTAINERS: Update my email address.
11379
11380 2018-03-13 Tom Tromey <tom@tromey.com>
11381
11382 * machoread.c (macho_check_dsym): Change filenamep to a
11383 std::string*.
11384 (macho_symfile_read): Update.
11385 * symfile.c (load_command): Use std::string.
11386
11387 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11388
11389 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11390 to error message string.
11391 (riscv_register_name): Use xsnprintf instead of sprintf.
11392 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11393 internal_error.
11394 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11395 error.
11396 (riscv_push_dummy_call): Likewise.
11397
11398 2018-03-12 Tom Tromey <tom@tromey.com>
11399
11400 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11401 Use gdb::byte_vector.
11402 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11403
11404 2018-03-12 Yao Qi <yao.qi@linaro.org>
11405
11406 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11407 parameter type to readable_regcache.
11408 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11409 the declaration.
11410
11411 2018-03-11 Tom Tromey <tom@tromey.com>
11412
11413 * dwarf2read.c (struct nextfield): Add initializers.
11414 (struct nextfnfield): Remove.
11415 (struct fnfieldlist): Add initializers. Remove "length" and
11416 "head", use std::vector.
11417 (struct decl_field_list): Remove.
11418 (struct field_info): Add initializers.
11419 <fields, baseclasses>: Now std::vector.
11420 <nbaseclasses, nfnfields, typedef_field_list_count,
11421 nested_types_list_count>: Remove.
11422 (dwarf2_add_field, dwarf2_add_type_defn)
11423 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11424 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11425 (process_structure_scope): Update.
11426
11427 2018-03-11 Tom Tromey <tom@tromey.com>
11428
11429 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11430 for use by std::sort.
11431 (build_type_psymtabs_1): Use std::vector.
11432
11433 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11434
11435 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11436 and LIBMPFR in the printed configuration.
11437
11438 2018-03-08 Tom Tromey <tom@tromey.com>
11439
11440 * source.c (get_filename_and_charpos): Use scoped_fd.
11441 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11442 (procfs_pidlist): Likewise.
11443 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11444 (iterate_over_mappings): Likewise.
11445
11446 2018-03-08 Tom Tromey <tom@tromey.com>
11447
11448 * infcall.c (struct call_return_meta_info)
11449 <stack_temporaries_enabled>: Remove.
11450 (get_call_return_value, call_function_by_hand_dummy): Update.
11451 * thread.c (disable_thread_stack_temporaries): Remove.
11452 (enable_thread_stack_temporaries): Remove.
11453 (thread_stack_temporaries_enabled_p): Return bool.
11454 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11455 (get_last_thread_stack_temporary): Update.
11456 * eval.c (evaluate_subexp): Update.
11457 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11458 class, not a function.
11459 (value_ptr, value_vec): Remove typedefs.
11460 (class thread_info) <stack_temporaries_enabled>: Now bool.
11461 <stack_temporaries>: Now a std::vector.
11462 (thread_stack_temporaries_enabled_p)
11463 (value_in_thread_stack_temporaries): Return bool.
11464
11465 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11466
11467 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11468 (getpkt_or_notif_sane_1): Likewise.
11469
11470 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11471
11472 * build-id.c (build_id_to_debug_bfd): Use std::string.
11473
11474 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11475
11476 * build-id.c (find_separate_debug_file_by_buildid): Return
11477 std::string.
11478 * build-id.h (find_separate_debug_file_by_buildid): Return
11479 std::string.
11480 * coffread.c (coff_symfile_read): Adjust to std::string.
11481 * elfread.c (elf_symfile_read): Adjust to std::string.
11482 * symfile.c (separate_debug_file_exists): Change parameter to
11483 std::string.
11484 (find_separate_debug_file): Return std::string.
11485 (find_separate_debug_file_by_debuglink): Return std::string.
11486 * symfile.h (find_separate_debug_file_by_debuglink): Return
11487 std::string.
11488
11489 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11490
11491 * common/xml-utils.c (xml_escape_text): Move code to...
11492 (xml_escape_text_append): ... this new function.
11493 * common/xml-utils.h (xml_escape_text_append): New declaration.
11494 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11495 New function.
11496 (_initialize_xml_utils): register test_xml_escape_text_append as
11497 a selftest.
11498
11499 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11500
11501 * defs.h: Remove MAX_REGISTER_SIZE.
11502 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11503 asserts.
11504 * python/py-unwind.c (pyuw_sniffer): Likewise.
11505
11506 2018-03-07 Tom Tromey <tom@tromey.com>
11507
11508 * linux-tdep.c (linux_info_proc): Update.
11509 * target.h (struct target_ops) <to_fileio_readlink>: Return
11510 optional<string>.
11511 (target_fileio_readlink): Return optional<string>.
11512 * remote.c (remote_hostio_readlink): Return optional<string>.
11513 * inf-child.c (inf_child_fileio_readlink): Return
11514 optional<string>.
11515 * target.c (target_fileio_readlink): Return optional<string>.
11516
11517 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11518
11519 * regcache.c (cooked_read_test): Add riscv to the list of
11520 architectures that have a save_reggroup.
11521
11522 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11523
11524 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11525 value is not a dynamic class object.
11526
11527 2018-03-06 Tom Tromey <tom@tromey.com>
11528
11529 * rust-exp.y: Formatting fixes.
11530
11531 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11532
11533 * riscv-tdep.c (riscv_register_name): Remove target description
11534 support.
11535 (riscv_gdbarch_init): Remove target description check.
11536
11537 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11538
11539 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11540 comment.
11541 * riscv-tdep.h: Likewise.
11542
11543 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11544
11545 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11546 (riscv_pseudo_register_write): Delete.
11547 (riscv_gdbarch_init): Remove all use of pseudo registers.
11548
11549 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11550
11551 * record-btrace.c (btrace_print_lines): Replace cleanup
11552 parameter with RAII equivalents.
11553 (btrace_insn_history): Replace cleanup with RAII equivalents.
11554 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11555 make_cleanup_ui_out_tuple_begin_end): Remove.
11556 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11557 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11558 make_cleanup_ui_out_list_begin_end): Remove.
11559
11560 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11561
11562 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11563 parameter types to std::vector. Use bool.
11564 (record_btrace_wait): Replace VEC(tp_t) with
11565 std::vector<thread_info *>.
11566 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11567
11568 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11569
11570 * record-btrace.c (record_btrace_disable_callback): Remove.
11571 (struct scoped_btrace_disable): New.
11572 (record_btrace_open): Use scoped_btrace_disable.
11573
11574 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11575
11576 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11577 reading values from registers.
11578
11579 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11580
11581 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11582 where appropriate.
11583
11584 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11585
11586 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11587 change parameter type. Use GDB's print functions, and use
11588 core_addr_to_string where appropriate.
11589 (riscv_push_dummy_call): Use core_addr_to_string where
11590 appropriate, update call to riscv_print_arg_location, and reindent
11591 a few lines.
11592 (riscv_return_value): Update call to riscv_print_arg_location.
11593
11594 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11595 Tim Newsome <tim@sifive.com>
11596 Albert Ou <a0u@eecs.berkeley.edu>
11597 Darius Rad <darius@bluespec.com>
11598
11599 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11600 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11601 (ALLDEPFILES): Add riscv-tdep.c
11602 * configure.tgt: Add riscv support.
11603 * riscv-tdep.c: New file.
11604 * riscv-tdep.h: New file.
11605 * NEWS: Mention new target.
11606 * MAINTAINERS: Add entry for riscv.
11607
11608 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11609
11610 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11611 fields within aggregates.
11612
11613 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11614
11615 * record-btrace.c (btrace_print_lines): Change type of flags to
11616 gdb_disassembly_flags.
11617
11618 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11619
11620 * fbsd-nat.c: Include "inf-ptrace.h".
11621 (USE_SIGTRAP_SIGINFO): Conditionally define.
11622 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11623 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11624 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11625 function.
11626 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11627 Likewise.
11628 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11629 Likewise.
11630 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11631 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11632 "supports_stopped_by_hw_breakpoint" target methods.
11633
11634 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11635
11636 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11637 * fbsd-nat.c (debug_fbsd_nat): New variable.
11638 (show_fbsd_nat_debug): New function.
11639 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11640 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11641
11642 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11643
11644 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11645 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11646 prototype.
11647 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11648 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11649 method.
11650
11651 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11652
11653 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11654 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11655
11656 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11657
11658 * charset.c (struct charset_vector): New.
11659 (charsets): Change type to charset_vector.
11660 (find_charset_names): Adjust.
11661 (add_one): Adjust.
11662 (_initialize_charset): Adjust.
11663
11664 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11665
11666 * progspace.h (struct program_space) <deleted_solibs>: Change
11667 type to std::vector<std::string>.
11668 * progspace.c (clear_program_space_solib_cache): Adjust.
11669 * breakpoint.c (print_solib_event): Adjust.
11670 (check_status_catch_solib): Adjust.
11671 * solib.c (update_solib_list): Adjust.
11672 * ui-out.h (class ui_out) <field_string>: New overload.
11673 * ui-out.c (ui_out::field_string): New overload.
11674
11675 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11676
11677 * progspace.h (struct program_space): Add constructor and
11678 destructor, initialize fields.
11679 (add_program_space): Remove.
11680 * progspace.c (add_program_space): Rename to...
11681 (program_space::program_space): ... this.
11682 (release_program_space): Rename to...
11683 (program_space::~program_space): ... this.
11684 (delete_program_space): Use delete to delete program_space.
11685 (initialize_progspace): Use new to allocate program_space.
11686 * inferior.c (add_inferior_with_spaces): Likewise.
11687 (clone_inferior_command): Likewise.
11688 * infrun.c (follow_fork_inferior): Likewise.
11689 (handle_vfork_child_exec_or_exit): Likewise.
11690
11691 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11692
11693 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11694 (delim_string_to_char_ptr_vec): Return std::vector of
11695 gdb::unique_xmalloc_ptr.
11696 (dirnames_to_char_ptr_vec_append): Take std::vector of
11697 gdb::unique_xmalloc_ptr.
11698 (dirnames_to_char_ptr_vec): Return std::vector of
11699 gdb::unique_xmalloc_ptr.
11700 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11701 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11702 (delim_string_to_char_ptr_vec): Return an std::vector of
11703 gdb::unique_xmalloc_ptr, adjust the code.
11704 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11705 gdb::unique_xmalloc_ptr, adjust the code.
11706 (dirnames_to_char_ptr_vec): Return an std::vector of
11707 gdb::unique_xmalloc_ptr, adjust the code.
11708 * auto-load.c (auto_load_safe_path_vec): Change type to
11709 std::vector of gdb::unique_xmalloc_ptr.
11710 (auto_load_expand_dir_vars): Return an std::vector of
11711 gdb::unique_xmalloc_ptr, adjust the code.
11712 (auto_load_safe_path_vec_update): Adjust.
11713 (filename_is_in_auto_load_safe_path_vec): Adjust.
11714 (auto_load_objfile_script_1): Adjust.
11715 * build-id.c (build_id_to_debug_bfd): Adjust.
11716 * linux-thread-db.c (thread_db_load_search): Adjust.
11717 * source.c (add_path): Adjust.
11718 (openp): Adjust.
11719 * symfile.c (find_separate_debug_file): Adjust.
11720 * utils.c (do_free_char_ptr_vec): Remove.
11721 (make_cleanup_free_char_ptr_vec): Remove.
11722
11723 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11724
11725 PR gdb/22907
11726 * common/pathstuff.c: Conditionally include "<windows.h>".
11727
11728 2018-03-01 Georg Sauthoff <mail@georg.so>
11729
11730 PR gdb/22888
11731 * gcore.in: Quote variables and switch interpreter to bash.
11732
11733 2018-03-01 Tom Tromey <tom@tromey.com>
11734
11735 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11736 assertion. Add assertion for discriminant_index.
11737 (quirk_rust_enum): Use correct base type name in univariant case.
11738
11739 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11740
11741 * record.c (get_call_history_modifiers): Return a
11742 record_print_flags.
11743 (cmd_record_call_history): Adjust.
11744 * record-btrace.c (record_btrace_call_history): Adjust.
11745 (record_btrace_call_history_range): Adjust.
11746 (record_btrace_call_history_from): Adjust.
11747 * target-debug.h (target_debug_print_record_print_flags): New.
11748 * target-delegates.c: Re-generate.
11749 * target.c (target_call_history): Change flags type.
11750 (target_call_history_from): Likewise.
11751 (target_call_history_range): Likewise.
11752 * target.h (struct target_ops) <target_call_history>: Likewise.
11753 (target_call_history_from): Likewise.
11754 (target_call_history_range): Likewise.
11755
11756 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11757 Simon Marchi <simon.marchi@polymtl.ca>
11758
11759 * common/common-utils.c: Include "sys/stat.h".
11760 (is_regular_file): Move here from "source.c"; change return
11761 type to "bool".
11762 * common/common-utils.h (is_regular_file): New prototype.
11763 * common/pathstuff.c (contains_dir_separator): New function.
11764 * common/pathstuff.h (contains_dir_separator): New prototype.
11765 * source.c: Don't include "sys/stat.h".
11766 (is_regular_file): Move to "common/common-utils.c".
11767
11768 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11769
11770 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11771 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11772 * auto-load.c: Include "common/pathstuff.h".
11773 * common/common-def.h (current_directory): Move here.
11774 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11775 function.
11776 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11777 prototype.
11778 * common/pathstuff.c: New file.
11779 * common/pathstuff.h: New file.
11780 * compile/compile.c: Include "common/pathstuff.h".
11781 * defs.h (current_directory): Move to "common/common-defs.h".
11782 * dwarf2read.c: Include "common/pathstuff.h".
11783 * exec.c: Likewise.
11784 * guile/scm-safe-call.c: Likewise.
11785 * linux-thread-db.c: Likewise.
11786 * main.c: Likewise.
11787 * nto-tdep.c: Likewise.
11788 * objfiles.c: Likewise.
11789 * source.c: Likewise.
11790 * symtab.c: Likewise.
11791 * utils.c: Include "common/pathstuff.h".
11792 (gdb_realpath): Move to "common/pathstuff.c".
11793 (gdb_realpath_keepfile): Likewise.
11794 (gdb_abspath): Likewise.
11795 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11796 (gdb_realpath_keepfile): Likewise.
11797 (gdb_abspath): Likewise.
11798
11799 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11800
11801 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11802 wildcard process pid for super_resume for kernels with a
11803 specific bug.
11804
11805 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11806
11807 * compile/compile.c (get_args): Add additional comments
11808 explaining function.
11809
11810 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11811 Tom Tromey <tom@tromey.com>
11812
11813 * target.h (memory_write_request_s): Remove typedef. Don't define
11814 VEC.
11815 (target_write_memory_blocks): Change argument to std::vector.
11816 (struct memory_write_request): Add constructor.
11817 * target-memory.c (compare_block_starting_address): Return bool.
11818 Change argument types.
11819 (claim_memory): Change arguments to use std::vector.
11820 (split_regular_and_flash_blocks, blocks_to_erase)
11821 (compute_garbled_blocks): Likewise.
11822 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11823 (target_write_memory_blocks): Change argument to std::vector.
11824 * symfile.c (struct load_section_data): Add constructor and
11825 destructor. Use std::vector for "requests".
11826 (struct load_progress_data): Add initializers.
11827 (load_section_callback): Update. Use "new".
11828 (clear_memory_write_data): Remove.
11829 (generic_load): Update.
11830
11831 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11832
11833 * arch/aarch64.h: Use common/tdesc.h.
11834
11835 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11836
11837 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11838 architecture with a 64-bit ABI.
11839
11840 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11841
11842 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11843 ahead of target description loading.
11844
11845 2018-02-26 Tom Tromey <tom@tromey.com>
11846
11847 * stack.c (backtrace_command_1): Update.
11848 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11849 of "flags".
11850 * python/py-framefilter.c (py_print_frame)
11851 (gdbpy_apply_frame_filter): Change type of "flags".
11852 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11853 of "flags".
11854 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11855 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11856 * extension.h (enum frame_filter_flag): Rename from
11857 frame_filter_flags.
11858 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11859 (apply_ext_lang_frame_filter): Change type of "flags".
11860 * extension.c (apply_ext_lang_frame_filter): Change type of
11861 "flags".
11862 * extension-priv.h (struct extension_language_ops)
11863 <apply_frame_filter>: Change type of "flags".
11864
11865 2018-02-26 Tom Tromey <tom@tromey.com>
11866
11867 PR python/16497:
11868 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11869 off-by-one in py_end computation.
11870 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11871 PRINT_MORE_FRAMES.
11872 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11873 constant.
11874
11875 2018-02-26 Tom Tromey <tom@tromey.com>
11876
11877 * dwarf2read.c (struct variant_field): New.
11878 (struct nextfield) <variant>: New field.
11879 (dwarf2_add_field): Handle DW_TAG_variant_part.
11880 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11881 discriminated union.
11882 (read_structure_type): Handle DW_TAG_variant_part.
11883 (handle_struct_member_die): New function, extracted from
11884 process_structure_scope. Handle DW_TAG_variant.
11885 (process_structure_scope): Handle discriminated unions. Call
11886 handle_struct_member_die.
11887
11888 2018-02-26 Tom Tromey <tom@tromey.com>
11889
11890 * rust-lang.h (rust_last_path_segment): Declare.
11891 * rust-lang.c (rust_last_path_segment): Now public. Change
11892 contract.
11893 (struct disr_info): Remove.
11894 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11895 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11896 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11897 (rust_enum_p, rust_enum_variant): New function.
11898 (rust_underscore_fields): Remove "offset" parameter.
11899 (rust_print_enum): New function.
11900 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11901 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11902 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11903 enums.
11904 (rust_internal_print_type): New function, from rust_print_type.
11905 Remove enum code.
11906 (rust_print_type): Call rust_internal_print_type.
11907 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11908 Update enum handling.
11909 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11910 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11911 (rust_union_quirks): New functions.
11912 (process_full_comp_unit, process_full_type_unit): Call
11913 rust_union_quirks.
11914 (process_structure_scope): Update rust_unions if necessary.
11915
11916 2018-02-26 Tom Tromey <tom@tromey.com>
11917
11918 * value.h (value_union_variant): Declare.
11919 * valops.c (value_union_variant): New function.
11920 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11921 (struct discriminant_info): New.
11922 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11923 enumerator.
11924 (struct main_type) <flag_discriminated_union>: New field.
11925
11926 2018-02-26 Tom Tromey <tom@tromey.com>
11927
11928 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11929 unittests/unpack-selftests.c.
11930 * unittests/unpack-selftests.c: New file.
11931 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11932
11933 2018-02-26 Yao Qi <yao.qi@linaro.org>
11934
11935 * dwarf2read.c (struct partial_die_info) <read>: New method.
11936 (read_partial_die): Remove the declaration.
11937 (load_partial_dies): Update.
11938 (partial_die_info::partial_die_info):
11939 (read_partial_die): Change it to partial_die_info::read.
11940
11941 2018-02-26 Yao Qi <yao.qi@linaro.org>
11942
11943 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11944 (fixup_partial_die): Remove declaration.
11945 (scan_partial_symbols): Update.
11946 (partial_die_parent_scope): Likewise.
11947 (partial_die_full_name): Likewise.
11948 (fixup_partial_die): Change it to partial_die_info::fixup.
11949
11950 2018-02-26 Yao Qi <yao.qi@linaro.org>
11951
11952 * dwarf2read.c (read_partial_die): Update the declaration.
11953 (load_partial_dies): Caller update.
11954 (read_partial_die): Remove one argument abbrev_len.
11955
11956 2018-02-26 Yao Qi <yao.qi@linaro.org>
11957
11958 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11959 assignment operator.
11960 (load_partial_dies): Use ctor and copy ctor.
11961 (read_partial_die): Update.
11962 (dwarf2_cu::find_partial_die): Use ctor.
11963
11964 2018-02-26 Yao Qi <yao.qi@linaro.org>
11965
11966 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11967 (find_partial_die_in_comp_unit): Change it to
11968 dwarf2_cu::find_partial_die.
11969 (find_partial_die): Update.
11970
11971 2018-02-26 Yao Qi <yao.qi@linaro.org>
11972
11973 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11974 is NULL.
11975
11976 2018-02-26 Yao Qi <yao.qi@linaro.org>
11977
11978 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11979
11980 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11981
11982 * arch/amd64.h: Use common/tdesc.h.
11983 * arch/i386.c: Likewise.
11984 * arch/i386.h: Likewise.
11985 * arch/tic6x.c: Likewise.
11986 * arch/tdesc.h: Move file from here...
11987 * common/tdesc.h: ...to here.
11988 * features/aarch64-core.c: Regenerate.
11989 * features/aarch64-fpu.c: Regenerate.
11990 * features/i386/32bit-avx.c: Regenerate.
11991 * features/i386/32bit-avx512.c: Regenerate.
11992 * features/i386/32bit-core.c: Regenerate.
11993 * features/i386/32bit-linux.c: Regenerate.
11994 * features/i386/32bit-mpx.c: Regenerate.
11995 * features/i386/32bit-pkeys.c: Regenerate.
11996 * features/i386/32bit-sse.c: Regenerate.
11997 * features/i386/64bit-avx.c: Regenerate.
11998 * features/i386/64bit-avx512.c: Regenerate.
11999 * features/i386/64bit-core.c: Regenerate.
12000 * features/i386/64bit-linux.c: Regenerate.
12001 * features/i386/64bit-mpx.c: Regenerate.
12002 * features/i386/64bit-pkeys.c: Regenerate.
12003 * features/i386/64bit-segments.c: Regenerate.
12004 * features/i386/64bit-sse.c: Regenerate.
12005 * features/i386/x32-core.c: Regenerate.
12006 * features/tic6x-c6xp.c: Regenerate.
12007 * features/tic6x-core.c: Regenerate.
12008 * features/tic6x-gp.c: Regenerate.
12009 * target-descriptions.c: Use common/tdesc.h.
12010 * target-descriptions.h: Likewise.
12011
12012 2018-02-24 Tom Tromey <tom@tromey.com>
12013
12014 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12015 (try_thread_db_load_from_dir, thread_db_load_search): Use
12016 std::string.
12017 (info_auto_load_libthread_db_compare): Return bool. Change
12018 argument types.
12019 (info_auto_load_libthread_db): Use std::vector, std::string.
12020 Remove cleanups.
12021
12022 2018-02-24 Tom Tromey <tom@tromey.com>
12023
12024 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12025 std::string.
12026 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12027 std::string*.
12028 * gdbarch.c: Rebuild.
12029 * gdbarch.h: Rebuild.
12030 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12031 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12032 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12033 std::string*.
12034
12035 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12036
12037 * gdbtypes.h (sect_offset): Change type to uint64_t.
12038 (sect_offset_str): New function.
12039 * dwarf2read.c (create_addrmap_from_aranges): Use
12040 sect_offset_str.
12041 (error_check_comp_unit_head): Likewise.
12042 (create_debug_type_hash_table): Likewise.
12043 (read_cutu_die_from_dwo): Likewise.
12044 (init_cutu_and_read_dies): Likewise.
12045 (init_cutu_and_read_dies_no_follow): Likewise.
12046 (process_psymtab_comp_unit_reader): Likewise.
12047 (partial_die_parent_scope): Likewise.
12048 (peek_die_abbrev): Likewise.
12049 (process_queue): Likewise.
12050 (dwarf2_physname): Likewise.
12051 (read_namespace_alias): Likewise.
12052 (read_import_statement): Likewise.
12053 (create_dwo_cu_reader): Likewise.
12054 (create_cus_hash_table): Likewise.
12055 (lookup_dwo_cutu): Likewise.
12056 (inherit_abstract_dies): Likewise.
12057 (read_func_scope): Likewise.
12058 (read_call_site_scope): Likewise.
12059 (dwarf2_add_member_fn): Likewise.
12060 (read_common_block): Likewise.
12061 (read_module_type): Likewise.
12062 (read_typedef): Likewise.
12063 (read_subrange_type): Likewise.
12064 (load_partial_dies): Likewise.
12065 (read_partial_die): Likewise.
12066 (find_partial_die): Likewise.
12067 (read_str_index): Likewise.
12068 (dwarf2_string_attr): Likewise.
12069 (build_error_marker_type): Likewise.
12070 (lookup_die_type): Likewise.
12071 (dump_die_shallow): Likewise.
12072 (follow_die_ref): Likewise.
12073 (dwarf2_fetch_die_loc_sect_off): Likewise.
12074 (dwarf2_fetch_constant_bytes): Likewise.
12075 (follow_die_sig): Likewise.
12076 (get_signatured_type): Likewise.
12077 (get_DW_AT_signature_type): Likewise.
12078 (dwarf2_find_containing_comp_unit): Likewise.
12079 (set_die_type): Likewise.
12080
12081 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12082
12083 * arch/aarch64.c: Include "common-defs.h".
12084 * arch/amd64.c: Likewise.
12085 * arch/i386.c: Likewise.
12086
12087 2018-02-21 Tom Tromey <tom@tromey.com>
12088
12089 * value.h: (extract_field_op): Update.
12090 * eval.c (extract_field_op): Return a const char *.
12091 * expression.h (parse_expression_for_completion): Update.
12092 * completer.c (complete_expression): Update.
12093 (add_struct_fields): Make fieldname const.
12094 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12095 (mark_completion_tag, parse_exp_in_context_1): Update.
12096 (parse_expression_for_completion): Change "name" to
12097 unique_xmalloc_ptr*.
12098
12099 2018-02-21 Tom Tromey <tom@tromey.com>
12100
12101 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12102
12103 2018-02-21 Yao Qi <yao.qi@linaro.org>
12104
12105 * avr-tdep.c (avr_read_pc): Change parameter type to
12106 readable_regcache.
12107 * gdbarch.sh (read_pc): Likewise.
12108 * gdbarch.c: Re-generated.
12109 * gdbarch.h: Re-generated.
12110 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12111 readable_regcache.
12112 * ia64-tdep.c (ia64_read_pc): Likewise.
12113 * mips-tdep.c (mips_read_pc): Likewise.
12114 * spu-tdep.c (spu_read_pc): Likewise.
12115
12116 2018-02-21 Yao Qi <yao.qi@linaro.org>
12117
12118 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12119 * regcache-dump.c: New file.
12120 * regcache.c: Move register_dump to regcache-dump.c.
12121 (maintenance_print_registers): Likewise.
12122 (maintenance_print_raw_registers): Likewise.
12123 (maintenance_print_cooked_registers): Likewise.
12124 (maintenance_print_register_groups): Likewise.
12125 (maintenance_print_remote_registers): Likewise.
12126 (_initialize_regcache): Likewise.
12127 * regcache.h (register_dump): Moved from regcache.c.
12128
12129 2018-02-21 Yao Qi <yao.qi@linaro.org>
12130
12131 * regcache.c (regcache::regcache): Update.
12132 (regcache::invalidate): Move it to detached_regcache::invalidate.
12133 (get_thread_arch_aspace_regcache): Update.
12134 (regcache::raw_update): Update.
12135 (regcache::cooked_read): Remove some code.
12136 (regcache::cooked_read_value): Likewise.
12137 (regcache::raw_write): Remove assert on m_readonly_p.
12138 (regcache::raw_supply_integer): Move it to
12139 detached_regcache::raw_supply_integer.
12140 (regcache::raw_supply_zeroed): Likewise.
12141 * regcache.h (detached_regcache) <raw_supply_integer>: New
12142 declaration.
12143 <raw_supply_zeroed, invalidate>: Likewise.
12144 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12145 <invalidate>: Likewise.
12146 <m_readonly_p>: Removed.
12147
12148 2018-02-21 Yao Qi <yao.qi@linaro.org>
12149
12150 * infcmd.c (get_return_value): Let stop_regs point to
12151 get_current_regcache.
12152 * regcache.c (regcache::regcache): Remove.
12153 (register_dump_reg_buffer): New class.
12154 (regcache_print): Adjust.
12155 * regcache.h (regcache): Remove constructors.
12156
12157 2018-02-21 Yao Qi <yao.qi@linaro.org>
12158
12159 * regcache.c (class register_dump): New class.
12160 (register_dump_regcache, register_dump_none): New class.
12161 (register_dump_remote, register_dump_groups): New class.
12162 (regcache_print): Update.
12163 * regcache.h (regcache_dump_what): Move it to regcache.c.
12164 (regcache) <dump>: Remove.
12165
12166 2018-02-21 Yao Qi <yao.qi@linaro.org>
12167
12168 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12169 reg_buffer_rw *.
12170 (jit_unwind_reg_set_impl): Call raw_supply.
12171 (jit_frame_sniffer): Use reg_buffer_rw.
12172 * record-full.c (record_full_core_regbuf): Change its type.
12173 (record_full_core_open_1): Use reg_buffer_rw.
12174 (record_full_close): Likewise.
12175 (record_full_core_fetch_registers): Use regcache->raw_supply.
12176 (record_full_core_store_registers): Likewise.
12177 * regcache.c (regcache::get_register_status): Move it to
12178 reg_buffer.
12179 (regcache_raw_set_cached_value): Remove.
12180 (regcache::raw_set_cached_value): Remove.
12181 (regcache::raw_write): Call raw_supply.
12182 (regcache::raw_supply): Move it to reg_buffer_rw.
12183 * regcache.h (regcache_raw_set_cached_value): Remove.
12184 (reg_buffer_rw): New class.
12185
12186 2018-02-21 Yao Qi <yao.qi@linaro.org>
12187
12188 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12189 readonly_detached_regcache.
12190 (dummy_frame_prev_register): Use regcache->cooked_read.
12191 * frame.c (frame_save_as_regcache): Change return type.
12192 (frame_pop): Update.
12193 * frame.h (frame_save_as_regcache): Update declaration.
12194 * inferior.h (get_infcall_suspend_state_regcache): Update
12195 declaration.
12196 * infrun.c (infcall_suspend_state) <registers>: use
12197 readonly_detached_regcache.
12198 (save_infcall_suspend_state): Don't use regcache_dup.
12199 (get_infcall_suspend_state_regcache): Change return type.
12200 * linux-fork.c (struct fork_info) <savedregs>: Change to
12201 readonly_detached_regcache.
12202 <pc>: New field.
12203 (fork_save_infrun_state): Don't use regcache_dup.
12204 (info_checkpoints_command): Adjust.
12205 * mi/mi-main.c (register_changed_p): Update declaration.
12206 (mi_cmd_data_list_changed_registers): Use
12207 readonly_detached_regcache.
12208 (register_changed_p): Change parameter type to
12209 readonly_detached_regcache.
12210 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12211 readonly_detached_regcache.
12212 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12213 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12214 New.
12215 (regcache::save): Move it to reg_buffer.
12216 (regcache::restore): Change parameter type.
12217 (regcache_dup): Remove.
12218 * regcache.h (reg_buffer) <save>: New method.
12219 (readonly_detached_regcache): New class.
12220 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12221 readonly_detached_regcache.
12222 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12223
12224 2018-02-21 Yao Qi <yao.qi@linaro.org>
12225
12226 * frame.c (frame_save_as_regcache): Use regcache method save.
12227 (frame_pop): Use regcache method restore.
12228 * infrun.c (restore_infcall_suspend_state): Likewise.
12229 * linux-fork.c (fork_load_infrun_state): Likewise.
12230 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12231 save.
12232 * regcache.c (regcache_save): Remove.
12233 (regcache::restore): More asserts.
12234 (regcache_cpy): Remove.
12235 * regcache.h (regcache_save): Remove the declaration.
12236 (regcache::restore): Move from private to public.
12237 Remove the friend declaration of regcache_cpy.
12238 (regcache_cpy): Remove declaration.
12239
12240 2018-02-21 Yao Qi <yao.qi@linaro.org>
12241
12242 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12243 parameter type to 'readable_regcache *'.
12244 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12245 * arm-tdep.c (arm_neon_quad_read): Likewise.
12246 (arm_pseudo_read): Likewise.
12247 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12248 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12249 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12250 * gdbarch.c: Re-generated.
12251 * gdbarch.h: Re-generated.
12252 * gdbarch.sh (pseudo_register_read): Change parameter type to
12253 'readable_regcache *'.
12254 (pseudo_register_read_value): Likewise.
12255 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12256 (h8300_pseudo_register_read): Likewise.
12257 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12258 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12259 (i386_pseudo_register_read_into_value): Likewise.
12260 (i386_pseudo_register_read_value): Likewise.
12261 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12262 declaration.
12263 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12264 * m32c-tdep.c (m32c_raw_read): Likewise.
12265 (m32c_read_flg): Likewise.
12266 (m32c_banked_register): Likewise.
12267 (m32c_banked_read): Likewise.
12268 (m32c_sb_read): Likewise.
12269 (m32c_part_read): Likewise.
12270 (m32c_cat_read): Likewise.
12271 (m32c_r3r2r1r0_read): Likewise.
12272 (m32c_pseudo_register_read): Likewise.
12273 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12274 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12275 (mep_pseudo_cr64_read): Likewise.
12276 (mep_pseudo_register_read): Likewise.
12277 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12278 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12279 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12280 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12281 (regcache::cooked_read): Likewise.
12282 (regcache::cooked_read_value): Likewise.
12283 (regcache_cooked_read_signed):
12284 (regcache::cooked_read): Likewise.
12285 * regcache.h (readable_regcache): New class.
12286 (regcache): Inherit readable_regcache. Move some methods to
12287 readable_regcache.
12288 * rl78-tdep.c (rl78_pseudo_register_read): Change
12289 parameter type to 'readable_regcache *'.
12290 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12291 (e500_pseudo_register_read): Change parameter type to
12292 'readable_regcache *'.
12293 (dfp_pseudo_register_read): Likewise.
12294 (vsx_pseudo_register_read): Likewise.
12295 (efpr_pseudo_register_read): Likewise.
12296 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12297 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12298 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12299 (sh64_pseudo_register_read): Likewise.
12300 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12301 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12302 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12303 (spu_pseudo_register_read): Likewise.
12304 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12305 (xtensa_pseudo_register_read): Likewise.
12306
12307 2018-02-21 Yao Qi <yao.qi@linaro.org>
12308
12309 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12310 (regcache::arch): Move it to reg_buffer::arch.
12311 (regcache::register_buffer): Likewise.
12312 (regcache::assert_regnum): Likewise.
12313 (regcache::num_raw_registers): Likewise.
12314 * regcache.h (reg_buffer): New class.
12315 (regcache): Inherit reg_buffer.
12316
12317 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12318
12319 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12320 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12321
12322 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12323
12324 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12325
12326 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12327
12328 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12329 (SFILES): Remove common/*.c files.
12330 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12331 * common/common.host: Add common reference.
12332 * configure.ac: Likewise.
12333 * configure: Regenerate.
12334
12335 2018-02-16 Yao Qi <yao.qi@linaro.org>
12336
12337 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12338 (block_initialize_namespace): Use new.
12339 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12340 (dwarf2_free_objfile): Use delete.
12341 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12342 (copy_type_recursive): Use new.
12343 * gdb_obstack.h (allocate_on_obstack): New.
12344
12345 2018-02-15 Yao Qi <yao.qi@linaro.org>
12346
12347 PR gdb/22849
12348 * inferior.c (exit_inferior_1): Reset inf->control.
12349
12350 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12351
12352 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12353 declaration.
12354
12355 2018-02-14 Pedro Alves <palves@redhat.com>
12356
12357 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12358 frame_cleanup_after_sniffer on exception.
12359
12360 2018-02-14 Tom Tromey <tom@tromey.com>
12361
12362 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12363 const.
12364 (solib_bfd_open): Make pathname const.
12365 * solib.c (solib_bfd_open): Make pathname const.
12366 * solib-spu.c (spu_bfd_fopen): Make name const.
12367 (spu_bfd_open): Make pathname const.
12368 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12369 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12370
12371 2018-02-14 Tom Tromey <tom@tromey.com>
12372
12373 * symfile.c (symfile_bfd_open): Update.
12374 * source.h (openp, source_full_path_of, find_and_open_source):
12375 Change argument type to unique_xmalloc_ptr.
12376 * source.c (openp): Take a unique_xmalloc_ptr.
12377 (source_full_path_of, find_and_open_source): Likewise.
12378 (open_source_file, symtab_to_fullname): Update.
12379 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12380 unique_xmalloc_ptr.
12381 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12382 (exec_file_find): Update.
12383 * psymtab.c (psymtab_to_fullname): Update.
12384 * nto-tdep.h (nto_find_and_open_solib): Update.
12385 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12386 unique_xmalloc_ptr.
12387 * exec.c (exec_file_attach): Update.
12388 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12389 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12390
12391 2018-02-14 Tom Tromey <tom@tromey.com>
12392
12393 * solib.c: Include source.h.
12394 * nto-tdep.c: Include source.h.
12395 * mi/mi-cmd-env.c: Include source.h.
12396 * infcmd.c: Include source.h.
12397 * exec.c: Include source.h.
12398 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12399 (add_path, directory_switch, source_path, init_source_path): Move
12400 declarations...
12401 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12402 (add_path, directory_switch, source_path, init_source_path):
12403 ...here.
12404
12405 2018-02-14 Tom Tromey <tom@tromey.com>
12406
12407 * solist.h (exec_file_find, solib_find): Return
12408 unique_xmalloc_ptr.
12409 (solib_bfd_fopen): Take a const char *.
12410 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12411 (exec_file_find, solib_find): Likewise.
12412 (solib_bfd_fopen): Do not take ownership of "pathname".
12413 (solib_bfd_open): Use unique_xmalloc_ptr.
12414 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12415 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12416 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12417 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12418
12419 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12420
12421 * ada-lang.c (name_match_type_from_name): Remove reference to
12422 ada_name_for_lookup in function's documentation.
12423 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12424
12425 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12426
12427 * defs.h (enum openp_flags): New enum.
12428 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12429 Move to enum openp_flags.
12430 (openp_flags): New enum flags.
12431 (openp): Change parameter type to openp_flags.
12432 * source.c (openp): Change parameter type to openp_flags.
12433 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12434 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12435
12436 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12437
12438 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12439 per-command.
12440
12441 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12442
12443 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12444 into...
12445 (class dwarf2_queue_guard): ...the destructor of this new class.
12446 (dw2_do_instantiate_symtab): Create instance of the new class
12447 dwarf2_queue_guard, remove cleanup.
12448
12449 2018-02-09 Tom Tromey <tom@tromey.com>
12450
12451 * source.c (find_source_lines): Don't reference past the end of
12452 the vector.
12453
12454 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12455
12456 * remote.c (remote_btrace_maybe_reopen): Change error message.
12457 * btrace.c (btrace_enable): Likewise.
12458 (parse_xml_btrace): Likewise.
12459 (parse_xml_btrace_conf): Likewise.
12460
12461 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12462
12463 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12464 (linux_enable_pt, linux_enable_bts): Call
12465 diagnose_perf_event_open_fail.
12466
12467 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12468
12469 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12470 Remove parameter and change return type. Update callers. Move it.
12471 (linux_enable_bts, linux_enable_pt): Improve error message.
12472 (linux_enable_pt): Remove zero buffer size check.
12473 (linux_enable_btrace): Improve error messages. Remove NULL return
12474 check.
12475
12476 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12477
12478 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12479 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12480 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12481 (linux_supports_pt, linux_supports_btrace): Remove.
12482 (linux_enable_bts): Call cpu_supports_bts.
12483 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12484 * remote.c (remote_supports_btrace): Remove.
12485 (init_remote_ops): Remove remote_supports_btrace.
12486 * target-delegates.c: Regenerated.
12487 * target.c (target_supports_btrace): Remove.
12488 * target.h (target_ops) <to_supports_btrace>: Remove
12489 (target_supports_btrace): Remove.
12490 * x86-linux-nat.c (x86_linux_create_target): Remove
12491 linux_supports_btrace.
12492
12493 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12494
12495 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12496 btrace failed.
12497 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12498 exception and use message in own exception.
12499
12500 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12501
12502 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12503 (perf_event_pt_event_type): Use gdb_file_up.
12504 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12505 scoped_fd, and scoped_mmap.
12506
12507 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12508
12509 * common/scoped_mmap.h: New.
12510 * unittests/scoped_mmap-selftest.c: New.
12511 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12512 unittests/scoped_mmap-selftest.c.
12513
12514 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12515
12516 * common/scoped_fd.h: New.
12517 * unittests/scoped_fd-selftest.c: New.
12518 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12519 unittests/scoped_fd-selftest.c.
12520
12521 2018-02-09 Tom Tromey <tom@tromey.com>
12522
12523 * auto-load.c (auto_load_section_scripts): Use
12524 gdb::unique_xmalloc_ptr.
12525
12526 2018-02-09 Tom Tromey <tom@tromey.com>
12527
12528 * auto-load.c (execute_script_contents): Use std::string.
12529
12530 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12531
12532 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12533 Python function, rather than a new command.
12534
12535 2018-02-08 Tom Tromey <tom@tromey.com>
12536
12537 * solib.c (solib_find_1): Use std::string.
12538 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12539
12540 2018-02-08 Tom Tromey <tom@tromey.com>
12541
12542 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12543
12544 2018-02-08 Tom Tromey <tom@tromey.com>
12545
12546 * source.c (find_source_lines): Use gdb::def_vector.
12547
12548 2018-02-08 Tom Tromey <tom@tromey.com>
12549
12550 * macrocmd.c (struct temporary_macro_definition): New.
12551 (macro_define_command): Use temporary_macro_definition. Remove
12552 cleanups.
12553 (free_macro_definition_ptr): Remove.
12554
12555 2018-02-08 Tom Tromey <tom@tromey.com>
12556
12557 * macroexp.c (maybe_expand): Use std::string.
12558
12559 2018-02-08 Tom Tromey <tom@tromey.com>
12560
12561 * macroexp.c (struct macro_buffer): Add initializers for some
12562 members.
12563 (init_buffer, init_shared_buffer, free_buffer)
12564 (free_buffer_return_text): Remove.
12565 (macro_buffer): New constructors.
12566 (~macro_buffer): New destructor.
12567 (macro_buffer::set_shared): New method.
12568 (macro_buffer::resize_buffer, macro_buffer::appendc)
12569 (macro_buffer::appendmem): Now methods, not free functions.
12570 (set_token, append_tokens_without_splicing, stringify)
12571 (macro_stringify): Update.
12572 (gather_arguments): Change return type. Remove argc_p argument,
12573 add args_ptr argument. Use std::vector.
12574 (substitute_args): Remove argc argument. Accept std::vector.
12575 (expand): Update. Use std::vector.
12576 (scan, macro_expand, macro_expand_next): Update.
12577
12578 2018-02-08 Tom Tromey <tom@tromey.com>
12579
12580 * symtab.c (default_collect_symbol_completion_matches_break_on):
12581 Use unique_xmalloc_ptr.
12582 * macroscope.h: (sal_macro_scope, user_macro_scope)
12583 (default_macro_scope): Return unique_xmalloc_ptr.
12584 * macroscope.c (sal_macro_scope, user_macro_scope)
12585 (default_macro_scope): Return unique_xmalloc_ptr.
12586 * macroexp.h (macro_expand, macro_expand_once): Return
12587 unique_xmalloc_ptr.
12588 * macroexp.c (macro_expand, macro_expand_once): Return
12589 unique_xmalloc_ptr.
12590 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12591 (info_macro_command, info_macros_command): Use
12592 unique_xmalloc_ptr.
12593 * compile/compile-c-support.c (write_macro_definitions): Use
12594 unique_xmalloc_ptr.
12595 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12596
12597 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12598
12599 * value.c (value_static_field): Assign field type instead of
12600 containing type when returning an optimized out value.
12601
12602 2018-02-06 Yao Qi <yao.qi@linaro.org>
12603
12604 * ft32-tdep.c (ft32_read_pc): Remove.
12605 (ft32_write_pc): Remove.
12606 (ft32_gdbarch_init): Update.
12607 * m32r-tdep.c (m32r_read_pc): Remove.
12608 (m32r_gdbarch_init): Update.
12609 * mep-tdep.c (mep_read_pc): Remove.
12610 (mep_gdbarch_init): Update.
12611 * microblaze-tdep.c (microblaze_write_pc): Remove.
12612 (microblaze_gdbarch_init): Update.
12613 * mn10300-tdep.c (mn10300_read_pc): Remove.
12614 (mn10300_write_pc): Remove.
12615 (mn10300_gdbarch_init): Update.
12616 * moxie-tdep.c (moxie_read_pc): Remove.
12617 (moxie_write_pc): Remove.
12618 (moxie_gdbarch_init): Update.
12619
12620 2018-02-06 Yao Qi <yao.qi@linaro.org>
12621
12622 * expprint.c (print_subexp_standard): Handle
12623 OP_F77_UNDETERMINED_ARGLIST.
12624 (dump_subexp_body_standard): Likewise.
12625
12626 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12627
12628 * target-descriptions.c (tdesc_element_visitor) Add empty
12629 implementations.
12630 (tdesc_type): Move make_gdb_type from here.
12631 (tdesc_type_builtin): Likewise.
12632 (tdesc_type_vector): Likewise.
12633 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12634 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12635 (make_gdb_type_union): Likewise.
12636 (make_gdb_type_flags): Likewise.
12637 (make_gdb_type_enum): Likewise.
12638 (make_gdb_type): New function.
12639 (tdesc_register_type): Use static make_gdb_type.
12640
12641 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12642
12643 * infcmd.c (default_print_one_register_info): Align natural-format
12644 column values consistently one under another.
12645 (pad_to_column): New function.
12646
12647 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12648
12649 * dwarf2read.c (dwarf2_physname): Move commment.
12650
12651 2018-02-01 Leszek Swirski <leszeks@google.com>
12652
12653 * varobj.c (varobj_formatted_print_options): Allow recursive
12654 pretty printing if pretty printing is enabled.
12655
12656 2018-02-01 Leszek Swirski <leszeks@google.com>
12657
12658 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12659 names after a structop as a filename.
12660
12661 2018-02-01 Yao Qi <yao.qi@linaro.org>
12662
12663 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12664 (arm_record_coproc_data_proc): Likewise.
12665
12666 2018-02-01 Yao Qi <yao.qi@linaro.org>
12667
12668 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12669
12670 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12671
12672 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12673 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12674
12675 2018-01-31 Pedro Alves <palves@redhat.com>
12676
12677 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12678 * inflow.c (child_terminal_save_inferior): Wrap reference to
12679 tcgetpgrp in HAVE_TERMIOS_H.
12680 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12681 _WIN32.
12682 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12683 always iterate over all inferiors.
12684 (gdbsim_cntrl_c): Adjust.
12685 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12686
12687 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12688
12689 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12690 index type is objfile-owned if the element type is as well.
12691
12692 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12693
12694 GDB 8.1 released.
12695
12696 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12697
12698 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12699 "features/s390x-linux64.c".
12700 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12701 s390_linux32 and s390x_linux64.
12702 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12703 default tdesc.
12704 * s390-tdep.c: Include "features/s390-linux32.c" and
12705 "features/s390x-linux64.c".
12706 (s390_tdesc_valid): Add check for tdesc_has_registers.
12707 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12708 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12709 tdesc_s390x_linux64.
12710 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12711 tdesc_s390x_linux64 to...
12712 * s390-tdep.h: ...here.
12713
12714 2018-01-30 Pedro Alves <palves@redhat.com>
12715
12716 PR gdb/13211
12717 * config.in, configure: Regenerate.
12718 * configure.ac: Check for getpgid.
12719 * go32-nat.c (go32_pass_ctrlc): New.
12720 (go32_target): Install it.
12721 * inf-child.c (inf_child_target): Install
12722 child_terminal_save_inferior, child_pass_ctrlc and
12723 child_interrupt.
12724 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12725 (inf_ptrace_target): No longer install it.
12726 * infcmd.c (interrupt_target_1): Adjust.
12727 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12728 (child_interrupt): Declare.
12729 (inferior::terminal_state): New.
12730 * inflow.c (struct terminal_info): Update comments.
12731 (inferior_process_group): Delete.
12732 (terminal_is_ours): Delete.
12733 (gdb_tty_state): New.
12734 (child_terminal_init): Adjust.
12735 (is_gdb_terminal, sharing_input_terminal_1)
12736 (sharing_input_terminal): New functions.
12737 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12738 Set the process's actual process group in the foreground if
12739 possible. Handle is_ours_for_output/is_ours distinction. Don't
12740 mark terminal as the inferior's if not sharing GDB's terminal.
12741 Don't check attach_flag.
12742 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12743 pass down a target_terminal_state.
12744 (child_terminal_save_inferior): New, factored out from ...
12745 (child_terminal_ours_1): ... this. Handle
12746 target_terminal_state::is_ours_for_output.
12747 (child_interrupt, child_pass_ctrlc): New.
12748 (inflow_inferior_exit): Clear the inferior's terminal_state.
12749 (copy_terminal_info): Copy the inferior's terminal state.
12750 (_initialize_inflow): Remove reference to terminal_is_ours.
12751 * inflow.h (inferior_process_group): Delete.
12752 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12753 * procfs.c (procfs_target): Don't install procfs_interrupt.
12754 (procfs_interrupt): Delete.
12755 * remote.c (remote_serial_quit_handler): Adjust.
12756 (remote_interrupt): Remove ptid parameter. Adjust.
12757 * target-delegates.c: Regenerate.
12758 * target.c: Include "terminal.h".
12759 (target_terminal::terminal_state): Rename to ...
12760 (target_terminal::m_terminal_state): ... this.
12761 (target_terminal::init): Adjust.
12762 (target_terminal::inferior): Adjust to per-inferior
12763 terminal_state.
12764 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12765 (target_terminal::ours, target_terminal::ours_for_output): Use
12766 target_terminal_is_ours_kind.
12767 (target_interrupt): Remove ptid parameter. Adjust.
12768 (default_target_pass_ctrlc): Adjust.
12769 * target.h (target_ops::to_terminal_save_inferior): New field.
12770 (target_ops::to_interrupt): Remove ptid_t parameter.
12771 (target_interrupt): Remove ptid_t parameter. Update comment.
12772 (target_pass_ctrlc): Update comment.
12773 * target/target.h (target_terminal_state): New scoped enum,
12774 factored out of ...
12775 (target_terminal::terminal_state): ... here.
12776 (target_terminal::inferior): Update comments.
12777 (target_terminal::restore_inferior): New.
12778 (target_terminal::is_inferior, target_terminal::is_ours)
12779 (target_terminal::is_ours_for_output): Adjust.
12780 (target_terminal::scoped_restore_terminal_state): Adjust to
12781 rename, and call restore_inferior() instead of inferior().
12782 (target_terminal::scoped_restore_terminal_state::m_state): Change
12783 type.
12784 (target_terminal::terminal_state): Rename to ...
12785 (target_terminal::m_terminal_state): ... this and change type.
12786
12787 2018-01-30 Pedro Alves <palves@redhat.com>
12788
12789 * linux-nat.c (wait_for_signal): New function.
12790 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12791 directly.
12792 (async_terminal_is_ours)
12793 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12794 (linux_nat_add_target): Don't override
12795 to_terminal_inferior/to_terminal_ours.
12796
12797 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12798
12799 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12800
12801 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12802
12803 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12804 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12805 dwarf2_per_objfile_free here.
12806 (dwarf2_per_objfile_free): Remove.
12807 (_initialize_dwarf2_read): Don't register
12808 dwarf2_per_objfile_free as a registry cleanup.
12809
12810 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12811
12812 Avoid compilation errors in MinGW native builds
12813
12814 The error is triggered by including python-internal.h, and the
12815 error message is:
12816
12817 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12818 from build-gnulib/import/math.h:27,
12819 from d:/usr/Python26/include/pyport.h:235,
12820 from d:/usr/Python26/include/Python.h:58,
12821 from python/python-internal.h:94,
12822 from python/py-arch.c:24:
12823 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12824 using ::hypot;
12825 ^~~~~
12826
12827 This happens because Python headers define 'hypot' to expand t
12828 '_hypot' in the Windows builds.
12829 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12830 'hypoth'. This avoids a compilation error.
12831
12832 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12833
12834 * MAINTAINERS (Write After Approval): Fix ordering.
12835
12836 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12837
12838 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12839
12840 2018-01-26 Alan Modra <amodra@gmail.com>
12841
12842 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12843 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12844 Remove nop. Make const. Comment.
12845 (powerpc32_plt_stub_so_2): New.
12846 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12847 Correct count. Update uses.
12848 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12849 Move common code reading PLT entry word. Correct
12850 powerpc32_plt_stub PLT address calculation.
12851 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12852 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12853 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12854 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12855 (ppc64_standard_linkage8): Likewise.
12856 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12857 Correct insns description.
12858 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12859
12860 2018-01-24 Pedro Alves <palves@redhat.com>
12861
12862 GCC PR libstdc++/83906
12863 * gdbtypes.c (operator==(const dynamic_prop &,
12864 const dynamic_prop &)): New.
12865 (operator==(const range_bounds &, const range_bounds &)): New.
12866 (check_types_equal): Use them instead of memcmp.
12867 * gdbtypes.h (operator==(const dynamic_prop &,
12868 const dynamic_prop &)): Declare.
12869 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12870 (operator==(const range_bounds &, const range_bounds &)): Declare.
12871 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12872
12873 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12874
12875 * s390-linux-tdep.c (s390_record_address_mask)
12876 (s390_record_calc_disp_common, s390_record_calc_disp)
12877 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12878 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12879 (s390_process_record): Move to s390-tdep.c.
12880 (s390_linux_init_abi_any): Adjust.
12881 * s390-tdep.c (s390_record_address_mask)
12882 (s390_record_calc_disp_common, s390_record_calc_disp)
12883 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12884 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12885 (s390_process_record): Moved from s390-linux-tdep.c
12886 (s390_gdbarch_init): Adjust.
12887
12888 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12889
12890 * s390-linux-nat.c (s390-tdep.h): New include.
12891 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12892 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12893 (ALLDEPFILES): Add s390-tdep.c.
12894 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12895 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12896 * s390-tdep.h: ...this. New file.
12897 * s390-linux-tdep.c (s390-tdep.h): New include.
12898 (_initialize_s390_tdep): Rename to...
12899 (_initialize_s390_linux_tdep): ...this and adjust.
12900 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12901 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12902 s390-tdep.h.
12903 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12904 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12905 (s390_is_partial_instruction, s390_software_single_step)
12906 (is_non_branch_ril, s390_displaced_step_copy_insn)
12907 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12908 (s390_prologue_data, s390_addr, s390_store, s390_load)
12909 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12910 (s390_register_call_saved, s390_guess_tracepoint_registers)
12911 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12912 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12913 (s390_pseudo_register_name, s390_pseudo_register_type)
12914 (s390_pseudo_register_read, s390_pseudo_register_write)
12915 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12916 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12917 (s390_addr_bits_remove, s390_address_class_type_flags)
12918 (s390_address_class_type_flags_to_name)
12919 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12920 (s390_function_arg_float, s390_function_arg_vector)
12921 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12922 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12923 (s390_frame_align, s390_register_return_value, s390_return_value)
12924 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12925 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12926 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12927 (s390_trad_frame_prev_register, s390_unwind_cache)
12928 (s390_prologue_frame_unwind_cache)
12929 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12930 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12931 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12932 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12933 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12934 (s390_frame_base_address, s390_local_base_address)
12935 (s390_frame_base, s390_gcc_target_options)
12936 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12937 (s390_validate_reg_range, s390_tdesc_valid)
12938 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12939 * s390-tdep.c: ...this. New file.
12940
12941 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12942
12943 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12944 (s390_process_record, s390_gdbarch_tdep_alloc)
12945 (s390_linux_init_abi_any): Use/set new hook.
12946
12947 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12948
12949 * s390-linux-tdep.c (osabi.h): New include.
12950 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12951 (s390_linux_init_abi_any): New functions.
12952 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12953
12954 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12955
12956 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12957 tdesc_has_registers check
12958
12959 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12960
12961 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12962 (s390_validate_reg_range): New macro.
12963 (s390_gdbarch_init): Adjust.
12964
12965 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12966
12967 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12968 (s390_gdbarch_tdep_alloc): Adjust.
12969 (s390_gdbarch_init): Adjust.
12970
12971 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12972
12973 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12974 <have_tdb>: Change type to bool.
12975 (s390_gdbarch_tdep_alloc): Adjust.
12976 (s390_gdbarch_init): Adjust.
12977
12978 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12979
12980 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12981 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12982 (s390_gdbarch_tdep_alloc): New function.
12983 (s390_gdbarch_init): Allocate tdep at start and use its fields
12984 instead of separate variables.
12985
12986 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12987
12988 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12989 when looking for cached gdbarch and add comment for remaining.
12990
12991 2018-01-22 Pedro Alves <palves@redhat.com>
12992 Sergio Durigan Junior <sergiodj@redhat.com>
12993
12994 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12995 case.
12996
12997 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12998
12999 * MAINTAINERS: Update my company e-mail address.
13000
13001 2018-01-22 Yao Qi <yao.qi@linaro.org>
13002
13003 * regcache.c (cooked_write_test): New function.
13004 (_initialize_regcache): Register the test.
13005
13006 2018-01-22 Yao Qi <yao.qi@linaro.org>
13007
13008 * ia64-tdep.c (ia64_pseudo_register_read): Call
13009 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13010 * m32c-tdep.c (m32c_cat_read): Likewise.
13011 (m32c_r3r2r1r0_read): Likewise.
13012 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13013 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13014
13015 2018-01-22 Yao Qi <yao.qi@linaro.org>
13016
13017 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13018 method raw_read instead of regcache_raw_read.
13019 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13020 * arm-tdep.c (arm_neon_quad_read): Likewise.
13021 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13022 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13023 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13024 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13025 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13026 (i386_pseudo_register_read_into_value): Likewise.
13027 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13028 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13029 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13030 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13031 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13032 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13033 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13034 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13035 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13036
13037 2018-01-22 Yao Qi <yao.qi@linaro.org>
13038
13039 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13040 * configure.tgt: Remove target mt.
13041 * mt-tdep.c: Remove.
13042 * regcache.c (cooked_read_test): Remove the check for mt.
13043
13044 2018-01-22 Yao Qi <yao.qi@linaro.org>
13045
13046 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13047 instead of gdbarch_pseudo_register_read_value.
13048
13049 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13050
13051 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13052 language is Ada.
13053
13054 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13055
13056 * linespec.c (create_sals_line_offset): Remove code that preserved
13057 the symtab_and_line's line number.
13058
13059 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13060
13061 * varobj.c (varobj_create): Don't set valid_block when creating a
13062 floating varobj.
13063
13064 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13065
13066 * varobj.c (varobj_create): Remove out of date comment.
13067
13068 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13069
13070 PR mi/20395
13071 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13072 updating innermost block.
13073 * parse.c (innermost_block_tracker::update): Take extra type
13074 parameter, and check types match before updating innermost block.
13075 (write_dollar_variable): Update innermost block for registers.
13076 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13077 (innermost_block_tracker::innermost_block_tracker): Initialise
13078 m_types member.
13079 (innermost_block_tracker::reset): Take type parameter.
13080 (innermost_block_tracker::update): Take type parameter, and pass
13081 type through as needed.
13082 (innermost_block_tracker::m_types): New member.
13083 * varobj.c (varobj_create): Pass type when reseting innermost
13084 block.
13085
13086 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13087
13088 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13089 * ada-lang.c (resolve_subexp): Likewise.
13090 * breakpoint.c (set_breakpoint_condition) Likewise.
13091 (watch_command_1) Likewise.
13092 * c-exp.y (variable): Likewise.
13093 * d-exp.y (PrimaryExpression): Likewise.
13094 * f-exp.y (variable): Likewise.
13095 * go-exp.y (variable): Likewise.
13096 * m2-exp.y (variable): Likewise.
13097 * objfiles.c (objfile::~objfile): Likewise.
13098 * p-exp.y (variable): Likewise.
13099 * parse.c (innermost_block): Change type.
13100 * parser-defs.h (class innermost_block_tracker): New.
13101 (innermost_block): Change to innermost_block_tracker.
13102 * printcmd.c (display_command): Switch to innermost_block API.
13103 (do_one_display): Likewise.
13104 * rust-exp.y (do_one_display): Likewise.
13105 * symfile.c (clear_symtab_users): Likewise.
13106 * varobj.c (varobj_create): Switch to innermost_block API, replace
13107 use of innermost_block with block stored on varobj object.
13108
13109 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13110
13111 * expression.h (innermost_block): Remove declaration.
13112 * varobj.c: Add 'parser-defs.h' include.
13113
13114 2018-01-19 Tom Tromey <tom@tromey.com>
13115
13116 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13117 symbols in the static and global blocks.
13118
13119 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13120
13121 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13122 gdb_ptrace.h, and move including gdb_wait.h ...
13123 * nat/linux-ptrace.h: ... to here.
13124
13125 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13126
13127 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13128 inf_ptrace_detach_success.
13129 (inf_ptrace_detach_success): Add inferior parameter, use it
13130 instead of inferior_ptid, pass it to detach_inferior.
13131 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13132 parameter.
13133 * inferior.c (detach_inferior): Add overload that takes an
13134 inferior object.
13135 * inferior.h (detach_inferior): Likewise.
13136 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13137 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13138 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13139
13140 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13141
13142 * target.h (struct target_ops) <to_detach>: Add inferior
13143 parameter.
13144 (target_detach): Likewise.
13145 * target.c (dispose_inferior): Pass inferior down.
13146 (target_detach): Pass inferior down. Assert that it is equal to
13147 the current inferior.
13148 * aix-thread.c (aix_thread_detach): Pass inferior down.
13149 * corefile.c (core_file_command): Pass current_inferior() down.
13150 * corelow.c (core_detach): Add inferior parameter.
13151 * darwin-nat.c (darwin_detach): Likewise.
13152 * gnu-nat.c (gnu_detach): Likewise.
13153 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13154 * infcmd.c (detach_command): Pass current_inferior() down to
13155 target_detach.
13156 * infrun.c (follow_fork_inferior): Pass parent_inf to
13157 target_detach.
13158 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13159 target_detach.
13160 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13161 * linux-thread-db.c (thread_db_detach): Likewise.
13162 * nto-procfs.c (procfs_detach): Likewise.
13163 * procfs.c (procfs_detach): Likewise.
13164 * record.c (record_detach): Likewise.
13165 * record.h (struct inferior): Forward-declare.
13166 (record_detach): Add inferior parameter.
13167 * remote-sim.c (gdbsim_detach): Likewise.
13168 * remote.c (remote_detach_1): Likewise.
13169 (remote_detach): Likewise.
13170 (extended_remote_detach): Likewise.
13171 * sol-thread.c (sol_thread_detach): Likewise.
13172 * target-debug.h (target_debug_print_inferior_p): New macro.
13173 * target-delegates.c: Re-generate.
13174 * top.c (kill_or_detach): Pass inferior down to target_detach.
13175 * windows-nat.c (windows_detach): Add inferior parameter.
13176
13177 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13178
13179 * target.h (struct target_ops) <to_detach>: Remove args
13180 parameter.
13181 (target_detach): Likewise.
13182 * target.c (dispose_inferior): Adjust.
13183 (target_detach): Remove args parameter, adjust.
13184 * aix-thread.c (aix_thread_detach): Adjust.
13185 * corefile.c (core_file_command): Adjust.
13186 * corelow.c (core_detach): Adjust.
13187 * darwin-nat.c (darwin_detach): Adjust.
13188 * gnu-nat.c (gnu_detach): Adjust.
13189 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13190 * infcmd.c (detach_command): Adjust
13191 * infrun.c (follow_fork_inferior): Adjust.
13192 (handle_vfork_child_exec_or_exit): Adjust.
13193 * linux-fork.c (linux_fork_detach): Remove args parameter.
13194 * linux-fork.h (linux_fork_detach): Likewise.
13195 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13196 * linux-thread-db.c (thread_db_detach): Likewise.
13197 * nto-procfs.c (procfs_detach): Likewise.
13198 * procfs.c (procfs_detach): Likewise.
13199 (do_detach): Remove signo parameter.
13200 * record.c (record_detach): Remove args parameter.
13201 * record.h (record_detach): Likewise.
13202 * remote-sim.c (gdbsim_detach): Likewise.
13203 * remote.c (remote_detach_1): Likewise.
13204 (remote_detach): Likewise.
13205 (extended_remote_detach): Likewise.
13206 * sol-thread.c (sol_thread_detach): Likewise.
13207 * target-delegates.c: Re-generate.
13208 * top.c (struct qt_args) <args>: Remove field.
13209 (kill_or_detach): Don't pass args.
13210 (quit_force): Don't set args.
13211 * windows-nat.c (windows_detach): Remove args parameter.
13212
13213 2018-01-19 Yao Qi <yao.qi@linaro.org>
13214
13215 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13216 (arm_linux_init_abi): Install it.
13217
13218 2018-01-19 Yao Qi <yao.qi@linaro.org>
13219
13220 * osabi.c (gdb_osabi_names): Extend the regexp for
13221 arm-linux-gnueabihf.
13222
13223 2018-01-18 Yao Qi <yao.qi@linaro.org>
13224
13225 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13226 m_abbrevs.
13227 (abbrev_table::add_abbrev): Update.
13228 (abbrev_table::lookup_abbrev): Update.
13229
13230 2018-01-18 Yao Qi <yao.qi@linaro.org>
13231
13232 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13233
13234 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13235
13236 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13237 to "std::string".
13238
13239 2018-01-17 Tom Tromey <tom@tromey.com>
13240
13241 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13242
13243 2018-01-17 Tom Tromey <tom@tromey.com>
13244
13245 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13246 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13247 (create_array_type_with_stride): Update.
13248 * dwarf2read.c (set_die_type): Update.
13249
13250 2018-01-17 Tom Tromey <tom@tromey.com>
13251
13252 * dwarf2read.c (delayed_method_info): Remove typedef.
13253 (dwarf2_cu::method_info): Now a std::vector.
13254 (add_to_method_list): Update.
13255 (free_delayed_list): Remove.
13256 (compute_delayed_physnames): Update.
13257 (process_full_comp_unit, process_full_type_unit): Clear the method
13258 list. Remove cleanups.
13259 (psymtab_include_file_name): Add name_holder parameter. Use
13260 unique_xmalloc_ptr.
13261 (dwarf_decode_lines): Update.
13262
13263 2018-01-17 Tom Tromey <tom@tromey.com>
13264 Simon Marchi <simon.marchi@ericsson.com>
13265
13266 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13267 (dwarf2_per_objfile::free_cached_comp_units)
13268 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13269 (init_cutu_and_read_dies_no_follow): Update.
13270 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13271 (dwarf2_cu::~dwarf2_cu): New.
13272 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13273 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13274
13275 2018-01-17 Tom Tromey <tom@tromey.com>
13276 Simon Marchi <simon.marchi@ericsson.com>
13277
13278 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13279 (struct die_reader_specs) <abbrev_table>: New member.
13280 (struct abbrev_table): Add constructor.
13281 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13282 <abbrev_obstack>: Now an auto_obstack.
13283 (abbrev_table_up): New typedef.
13284 (init_cu_die_reader): Add abbrev_table parameter.
13285 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13286 Add result_dwo_abbrev_table.
13287 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13288 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13289 Update.
13290 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13291 parameter.
13292 (skip_children): Update.
13293 (abbrev_table::alloc_abbrev): Rename from
13294 abbrev_table_alloc_abbrev.
13295 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13296 (abbrev_table::lookup_abbrev): Rename from
13297 abbrev_table_lookup_abbrev.
13298 (abbrev_table_read_table): Return abbrev_table_up.
13299 (abbrev_table_free, abbrev_table_free_cleanup)
13300 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13301 (load_partial_dies): Update.
13302
13303 2018-01-17 Tom Tromey <tom@tromey.com>
13304
13305 * dwarf2read.c (dwarf2_compute_name): Update comment.
13306 (read_func_scope, read_variable): Update.
13307 (new_symbol): Remove.
13308 (new_symbol_full): Rename to new_symbol.
13309
13310 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13311
13312 PR gdb/16577
13313 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13314 a warning instead of throwing an error, set section size to 0 and return
13315 NULL.
13316 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13317
13318 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13319
13320 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13321 std::string.
13322 (linux_ptrace_attach_fail_reason_string): Likewise.
13323 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13324 Likewise.
13325 (linux_ptrace_attach_fail_reason_string): Likewise.
13326 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13327
13328 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13329
13330 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13331
13332 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13333
13334 PR gdb/21559
13335 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13336 checking for fs_base/gs_base fields in struct user_regs_struct.
13337 * configure: Regenerate.
13338
13339 2018-01-17 Yao Qi <yao.qi@linaro.org>
13340
13341 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13342 function.
13343 (aarch64_linux_init_abi): Install it to gdbarch hook
13344 gcc_target_options.
13345
13346 2018-01-15 Pedro Alves <palves@redhat.com>
13347
13348 * common/signals-state-save-restore.c
13349 (save_original_signals_state): Fix typos.
13350
13351 2017-01-12 Tom Tromey <tom@tromey.com>
13352 Sergio Durigan Junior <sergiodj@redhat.com>
13353
13354 * Makefile.in (install-only): Install gdb-add-index.
13355
13356 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13357
13358 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13359
13360 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13361
13362 * infrun.c (keep_going_pass_signal): Clear step-over info when
13363 insert_breakpoints fails.
13364
13365 2018-01-11 Pedro Alves <palves@redhat.com>
13366
13367 PR gdb/22583
13368 * infrun.c (resume): Rename to ...
13369 (resume_1): ... this.
13370 (resume): Reimplement as wrapper around resume_1.
13371
13372 2018-01-11 Pedro Alves <palves@redhat.com>
13373
13374 PR remote/22597
13375 * remote.c (remote_parse_stop_reply): Default to the last-set
13376 general thread instead of to 'magic_null_ptid'.
13377
13378 2018-01-10 Pedro Alves <palves@redhat.com>
13379
13380 * language.h (language_get_symbol_name_matcher): Rename ...
13381 (get_symbol_name_matcher): ... this.
13382 * language.c (language_get_symbol_name_matcher): Ditto.
13383 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13384 callers adjusted.
13385
13386 2018-01-10 Pedro Alves <palves@redhat.com>
13387
13388 PR gdb/22670
13389 * dwarf2read.c
13390 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13391 Adjust to use language_get_symbol_name_matcher instead of
13392 language_defn::la_get_symbol_name_matcher.
13393 * language.c (language_get_symbol_name_matcher): If in Ada mode
13394 and the lookup name is a verbatim match, return Ada's matcher.
13395 * language.h (language_get_symbol_name_matcher): Adjust comment.
13396 (ada_lookup_name_info::verbatim_p):: New method.
13397
13398 2018-01-10 Pedro Alves <palves@redhat.com>
13399
13400 PR gdb/22670
13401 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13402 minsym's language is language_auto or language_cplus, pass down
13403 language_ada instead.
13404 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13405
13406 2018-01-10 Pedro Alves <palves@redhat.com>
13407
13408 PR gdb/22670
13409 * minsyms.c (linkage_name_str): New function.
13410 (iterate_over_minimal_symbols): Use it.
13411
13412 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13413
13414 * NEWS: Document that 'info proc' now works on FreeBSD.
13415
13416 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13417
13418 * configure.ac: Check for kinfo_getfile in libutil.
13419 * configure: Regenerate.
13420 * config.in: Regenerate.
13421 * fbsd-nat.c: Include "fbsd-tdep.h".
13422 (fbsd_fetch_cmdline): New.
13423 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13424 rather than calling error.
13425 (fbsd_info_proc): New.
13426 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13427 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13428 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13429
13430 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13431
13432 * fbsd-nat.c (struct free_deleter): Remove.
13433 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13434
13435 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13436
13437 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13438 NULL for an empty pathname.
13439
13440 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13441
13442 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13443 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13444 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13445 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13446 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13447 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13448 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13449 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13450 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13451 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13452 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13453 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13454 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13455 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13456 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13457
13458 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13459
13460 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13461 (gnu_xfer_auxv): New function.
13462 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13463 TARGET_OBJECT_AUXV.
13464
13465 2018-01-08 Yao Qi <yao.qi@linaro.org>
13466 Simon Marchi <simon.marchi@ericsson.com>
13467
13468 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13469 common/selftest.c.
13470 (COMMON_OBS): Remove selftest.o.
13471 * configure.ac: Append selftest-arch.c and common/selftest.c to
13472 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13473 * configure: Re-generated.
13474 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13475 GDB_SELF_TEST.
13476 (maintenance_info_selftests): Likewise.
13477
13478 2018-01-08 Xavier Roirand <roirand@adacore.com>
13479
13480 * ada-valprint.c (val_print_packed_array_elements): Use
13481 proper number of elements when printing an array indexed
13482 by an enumeration type.
13483
13484 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13485
13486 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13487 (dw2_get_file_names_reader): Adjust.
13488 (lookup_dwo_signatured_type): Adjust.
13489 (lookup_dwp_signatured_type): Adjust.
13490 (lookup_signatured_type): Adjust.
13491 (create_type_unit_group): Adjust.
13492 (get_type_unit_group): Adjust.
13493 (process_psymtab_comp_unit_reader): Adjust.
13494 (build_type_psymtabs_reader): Adjust.
13495 (scan_partial_symbols): Adjust.
13496 (add_partial_symbol): Adjust.
13497 (add_partial_subprogram): Adjust.
13498 (peek_die_abbrev): Adjust.
13499 (fixup_go_packaging): Adjust.
13500 (process_imported_unit_die): Adjust.
13501 (dwarf2_compute_name): Adjust.
13502 (dwarf2_physname): Adjust.
13503 (read_import_statement): Adjust.
13504 (handle_DW_AT_stmt_list): Adjust.
13505 (read_file_scope): Adjust.
13506 (read_func_scope): Adjust.
13507 (read_lexical_block_scope): Adjust.
13508 (read_call_site_scope): Adjust.
13509 (read_variable): Adjust.
13510 (dwarf2_rnglists_process): Adjust.
13511 (dwarf2_ranges_process): Adjust.
13512 (dwarf2_ranges_read): Adjust.
13513 (dwarf2_get_pc_bounds): Adjust.
13514 (dwarf2_record_block_ranges): Adjust.
13515 (dwarf2_add_field): Adjust.
13516 (dwarf2_add_member_fn): Adjust.
13517 (read_structure_type): Adjust.
13518 (process_structure_scope): Adjust.
13519 (read_enumeration_type): Adjust.
13520 (read_array_type): Adjust.
13521 (mark_common_block_symbol_computed): Adjust.
13522 (read_common_block): Adjust.
13523 (read_namespace_type): Adjust.
13524 (read_namespace): Adjust.
13525 (read_module_type): Adjust.
13526 (read_tag_pointer_type): Adjust.
13527 (read_tag_ptr_to_member_type): Adjust.
13528 (read_tag_string_type): Adjust.
13529 (read_subroutine_type): Adjust.
13530 (read_typedef): Adjust.
13531 (read_base_type): Adjust.
13532 (attr_to_dynamic_prop): Adjust.
13533 (read_subrange_type): Adjust.
13534 (read_unspecified_type): Adjust.
13535 (dwarf2_read_abbrevs): Adjust.
13536 (load_partial_dies): Adjust.
13537 (read_partial_die): Adjust.
13538 (find_partial_die): Adjust.
13539 (guess_partial_die_structure_name): Adjust.
13540 (fixup_partial_die): Adjust.
13541 (read_attribute_value): Adjust.
13542 (read_addr_index): Adjust.
13543 (read_addr_index_from_leb128): Adjust.
13544 (read_str_index): Adjust.
13545 (dwarf2_string_attr): Adjust.
13546 (get_debug_line_section): Adjust.
13547 (dwarf_decode_line_header): Adjust.
13548 (lnp_state_machine::check_line_address): Adjust.
13549 (dwarf_decode_lines_1): Adjust.
13550 (dwarf_decode_lines): Adjust.
13551 (dwarf2_start_symtab): Adjust.
13552 (var_decode_location): Adjust.
13553 (new_symbol_full): Adjust.
13554 (dwarf2_const_value_data): Adjust.
13555 (dwarf2_const_value_attr): Adjust.
13556 (dwarf2_const_value): Adjust.
13557 (die_type): Adjust.
13558 (die_containing_type): Adjust.
13559 (build_error_marker_type): Adjust.
13560 (lookup_die_type): Adjust.
13561 (guess_full_die_structure_name): Adjust.
13562 (anonymous_struct_prefix): Adjust.
13563 (determine_prefix): Adjust.
13564 (dwarf2_name): Adjust.
13565 (follow_die_ref_or_sig): Adjust.
13566 (follow_die_offset): Adjust.
13567 (follow_die_ref): Adjust.
13568 (follow_die_sig_1): Adjust.
13569 (follow_die_sig): Adjust.
13570 (get_signatured_type): Adjust.
13571 (get_DW_AT_signature_type): Adjust.
13572 (decode_locdesc): Adjust.
13573 (dwarf_decode_macros): Adjust.
13574 (cu_debug_loc_section): Adjust.
13575 (fill_in_loclist_baton): Adjust.
13576 (dwarf2_symbol_mark_computed): Adjust.
13577 (init_one_comp_unit): Don't assign
13578 dwarf2_cu::dwarf2_per_objfile.
13579 (set_die_type): Adjust.
13580
13581 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13582
13583 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13584 <dwarf2_per_objfile>: New field.
13585 (dwarf2_per_objfile): Remove global.
13586 (get_dwarf2_per_objfile): New function.
13587 (set_dwarf2_per_objfile): New function.
13588 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13589 dwarf2_per_objfile.
13590 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13591 (read_abbrev_offset): Likewise.
13592 (read_indirect_string): Likewise.
13593 (read_indirect_line_string): Likewise.
13594 (read_indirect_string_at_offset): Likewise.
13595 (read_indirect_string_from_dwz): Likewise.
13596 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13597 dwarf2_per_objfile.
13598 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13599 (create_all_comp_units): Change objfile parameter to
13600 dwarf2_per_objfile.
13601 (create_all_type_units): Likewise.
13602 (process_queue): Add dwarf2_per_objfile parameter.
13603 (read_and_check_comp_unit_head): Likewise.
13604 (lookup_dwo_unit_in_dwp): Likewise.
13605 (get_dwp_file): Likewise.
13606 (process_cu_includes): Likewise.
13607 (struct free_dwo_file_cleanup_data): New struct.
13608 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13609 set_dwarf2_per_objfile.
13610 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13611 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13612 context, adjust calls.
13613 (dw2_instantiate_symtab): Likewise.
13614 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13615 (dw2_get_cu): Likewise.
13616 (create_cu_from_index_list): Change objfile parameter to
13617 dwarf2_per_objfile.
13618 (create_cus_from_index_list): Get dwarf2_per_objfile from
13619 context, adjust calls.
13620 (create_cus_from_index): Likewise.
13621 (create_signatured_type_table_from_index): Change objfile
13622 parameter to dwarf2_per_objfile.
13623 (create_signatured_type_table_from_debug_names): Change objfile
13624 parameter to dwarf2_per_objfile.
13625 (create_addrmap_from_index): Likewise.
13626 (create_addrmap_from_aranges): Likewise.
13627 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13628 (dw2_setup): Remove.
13629 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13630 context.
13631 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13632 get_dwarf2_per_objfile.
13633 (dw2_forget_cached_source_info): Likewise.
13634 (dw2_map_symtabs_matching_filename): Likewise.
13635 (struct dw2_symtab_iterator) <index>: Remove.
13636 <dwarf2_per_objfile>: New field.
13637 (dw2_symtab_iter_init): Replace index parameter with
13638 dwarf2_per_objfile.
13639 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13640 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13641 (dw2_print_stats): Likewise.
13642 (dw2_dump): Likewise.
13643 (dw2_expand_symtabs_for_function): Likewise.
13644 (dw2_expand_all_symtabs): Likewise.
13645 (dw2_expand_symtabs_with_fullname): Likewise.
13646 (dw2_expand_marked_cus): Replace index and objfile parameters
13647 with dwarf2_per_objfile.
13648 (dw_expand_symtabs_matching_file_matcher): Add
13649 dwarf2_per_objfile parameter and adjust calls.
13650 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13651 adjust calls.
13652 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13653 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13654 adjust calls.
13655 (create_cus_from_debug_names_list): Replace objfile parameter
13656 with dwarf2_per_objfile and adjust calls.
13657 (create_cus_from_debug_names): Likewise.
13658 (dwarf2_read_debug_names): Likewise.
13659 (mapped_debug_names::namei_to_name): Adjust call.
13660 (dw2_debug_names_iterator::next): Likewise.
13661 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13662 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13663 (dw2_debug_names_dump): Likewise.
13664 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13665 (dw2_debug_names_expand_symtabs_matching): Likewise.
13666 (dwarf2_initialize_objfile): Likewise.
13667 (dwarf2_build_psymtabs): Likewise.
13668 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13669 this_cu.
13670 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13671 (read_and_check_comp_unit_head): Likewise.
13672 (read_abbrev_offset): Likewise.
13673 (create_debug_type_hash_table): Likewise.
13674 (create_debug_types_hash_table): Likewise.
13675 (create_all_type_units): Replace objfile parameter with
13676 dwarf2_per_objfile.
13677 (add_type_unit): Add dwarf2_per_objfile parameter.
13678 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13679 with dwarf2_per_objfile.
13680 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13681 (lookup_dwp_signatured_type): Likewise.
13682 (lookup_signatured_type): Likewise.
13683 (read_cutu_die_from_dwo): Likewise.
13684 (init_tu_and_read_dwo_dies): Likewise.
13685 (init_cutu_and_read_dies): Likewise.
13686 (init_cutu_and_read_dies_no_follow): Likewise.
13687 (allocate_type_unit_groups_table): Add objfile parameter.
13688 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13689 (get_type_unit_group): Likewise.
13690 (process_psymtab_comp_unit): Update call.
13691 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13692 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13693 (print_tu_stats): Likewise.
13694 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13695 in void* parameter.
13696 (build_type_psymtabs): Change objfile parameter to
13697 dwarf2_per_objfile.
13698 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13699 passed in void* parameter.
13700 (process_skeletonless_type_units): Change objfile parameter to
13701 dwarf2_per_objfile.
13702 (set_partial_user): Likewise.
13703 (dwarf2_build_psymtabs_hard): Likewise.
13704 (read_comp_units_from_section): Likewise.
13705 (create_all_comp_units): Likewise.
13706 (scan_partial_symbols): Update calls.
13707 (add_partial_symbol): Likewise.
13708 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13709 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13710 (process_queue): Add dwarf2_per_objfile parameter.
13711 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13712 (compute_compunit_symtab_includes): Likewise.
13713 (process_cu_includes): Add dwarf2_per_objfile parameter.
13714 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13715 (process_full_type_unit): Likewise.
13716 (process_imported_unit_die): Update call.
13717 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13718 (read_file_scope): Likewise.
13719 (allocate_dwo_file_hash_table): Add objfile parameter.
13720 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13721 (create_cus_hash_table): Likewise.
13722 (create_dwp_hash_table): Likewise.
13723 (create_dwo_unit_in_dwp_v1): Likewise.
13724 (create_dwp_v2_section): Likewise.
13725 (create_dwo_unit_in_dwp_v2): Likewise.
13726 (lookup_dwo_unit_in_dwp): Likewise.
13727 (try_open_dwop_file): Likewise.
13728 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13729 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13730 cleanup to include a reference to dwarf2_per_objfile.
13731 (open_dwp_file): Add dwarf2_per_objfile parameter.
13732 (open_and_init_dwp_file): Likewise.
13733 (get_dwp_file): Likewise.
13734 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13735 (queue_and_load_all_dwo_tus): Update call.
13736 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13737 data.
13738 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13739 (dwarf2_ranges_process): Likewise.
13740 (dwarf2_get_pc_bounds): Likewise.
13741 (mark_common_block_symbol_computed): Likewise.
13742 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13743 (dwarf2_read_abbrevs): Update call.
13744 (read_partial_die): Use dwarf2_per_objfile from cu.
13745 (find_partial_die): Likewise.
13746 (fixup_partial_die): Likewise.
13747 (read_attribute_value): Likewise.
13748 (read_indirect_string_at_offset_from): Add objfile parameter.
13749 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13750 parameter.
13751 (read_indirect_string_from_dwz): Add objfile parameter.
13752 (read_indirect_string): Add objfile parameter.
13753 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13754 (read_addr_index): Use dwarf2_per_objfile from cu.
13755 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13756 call dw2_setup.
13757 (read_str_index): Use dwarf2_per_objfile from cu.
13758 (get_debug_line_section): Likewise.
13759 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13760 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13761 (new_symbol_full): Use dwarf2_per_objfile from cu.
13762 (build_error_marker_type): Likewise.
13763 (lookup_die_type): Likewise.
13764 (determine_prefix): Likewise.
13765 (follow_die_offset): Likewise.
13766 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13767 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13768 (dwarf2_fetch_die_type_sect_off): Likewise.
13769 (dwarf2_get_die_type): Likewise.
13770 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13771 (get_signatured_type): Likewise.
13772 (get_DW_AT_signature_type): Likewise.
13773 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13774 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13775 (cu_debug_loc_section): Likewise.
13776 (fill_in_loclist_baton): Likewise.
13777 (dwarf2_symbol_mark_computed): Likewise.
13778 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13779 dwarf2_per_objfile.
13780 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13781 parameter.
13782 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13783 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13784 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13785 (set_die_type): Use dwarf2_free_objfile from cu.
13786 (get_die_type_at_offset): Likewise.
13787 (dwarf2_per_objfile_free): Don't assign global variable.
13788 (debug_names) <constructor>: Add dwarf2_per_objfile
13789 parameter, update m_debugstrlookup construction.
13790 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13791 parameter.
13792 <m_dwarf2_per_objfile>: New field.
13793 <lookup>: Use m_dwarf2_per_objfile.
13794 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13795 (psyms_seen_size): Likewise.
13796 (write_gdbindex): Replace objfile parameter with
13797 dwarf2_per_objfile.
13798 (write_debug_names): Likewise.
13799 (write_psymtabs_to_index): Likewise.
13800 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13801 calls.
13802
13803 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13804
13805 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13806 <dwarf2_per_objfile>: New field.
13807 (struct dwarf2_per_cu_data) <objfile>: Remove.
13808 <dwarf2_per_objfile>: New field.
13809 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13810 of objfile.
13811 (create_signatured_type_table_from_index): Likewise.
13812 (create_debug_type_hash_table): Likewise.
13813 (fill_in_sig_entry_from_dwo_entry): Likewise.
13814 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13815 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13816 objfile.
13817 (create_partial_symtab): Access objfile through
13818 dwarf2_per_objfile.
13819 (process_psymtab_comp_unit_reader): Likewise.
13820 (read_comp_units_from_section): Likewise.
13821 (scan_partial_symbols): Likewise.
13822 (add_partial_symbol): Likewise.
13823 (add_partial_subprogram): Likewise.
13824 (peek_die_abbrev): Likewise.
13825 (fixup_go_packaging): Likewise.
13826 (process_full_comp_unit): Likewise.
13827 (process_full_type_unit): Likewise.
13828 (process_imported_unit_die): Likewise.
13829 (dwarf2_compute_name): Likewise.
13830 (dwarf2_physname): Likewise.
13831 (read_import_statement): Likewise.
13832 (create_cus_hash_table): Assign dwarf2_physname instead of
13833 objfile.
13834 (read_func_scope): Access objfile through dwarf2_per_objfile.
13835 (read_lexical_block_scope): Likewise.
13836 (read_call_site_scope): Likewise.
13837 (read_variable): Likewise.
13838 (dwarf2_rnglists_process): Likewise.
13839 (dwarf2_ranges_process): Likewise.
13840 (dwarf2_ranges_read): Likewise.
13841 (dwarf2_record_block_ranges): Likewise.
13842 (dwarf2_add_field): Likewise.
13843 (dwarf2_add_member_fn): Likewise.
13844 (read_structure_type): Likewise.
13845 (process_structure_scope): Likewise.
13846 (read_enumeration_type): Likewise.
13847 (read_array_type): Likewise.
13848 (read_common_block): Likewise.
13849 (read_namespace_type): Likewise.
13850 (read_namespace): Likewise.
13851 (read_module_type): Likewise.
13852 (read_tag_pointer_type): Likewise.
13853 (read_tag_ptr_to_member_type): Likewise.
13854 (read_tag_string_type): Likewise.
13855 (read_subroutine_type): Likewise.
13856 (read_typedef): Likewise.
13857 (read_base_type): Likewise.
13858 (attr_to_dynamic_prop): Likewise.
13859 (read_subrange_type): Likewise.
13860 (read_unspecified_type): Likewise.
13861 (load_partial_dies): Likewise.
13862 (read_partial_die): Likewise.
13863 (find_partial_die): Likewise.
13864 (guess_partial_die_structure_name): Likewise.
13865 (fixup_partial_die): Likewise.
13866 (read_attribute_value): Likewise.
13867 (read_addr_index_from_leb128): Likewise.
13868 (dwarf2_read_addr_index): Likewise.
13869 (dwarf2_string_attr): Likewise.
13870 (lnp_state_machine::check_line_address): Likewise.
13871 (dwarf_decode_lines_1): Likewise.
13872 (dwarf_decode_lines): Likewise.
13873 (dwarf2_start_symtab): Likewise.
13874 (var_decode_location): Likewise.
13875 (new_symbol_full): Likewise.
13876 (dwarf2_const_value_data): Likewise.
13877 (dwarf2_const_value_attr): Likewise.
13878 (dwarf2_const_value): Likewise.
13879 (die_type): Likewise.
13880 (die_containing_type): Likewise.
13881 (lookup_die_type): Likewise.
13882 (guess_full_die_structure_name): Likewise.
13883 (anonymous_struct_prefix): Likewise.
13884 (dwarf2_name): Likewise.
13885 (follow_die_ref_or_sig): Likewise.
13886 (follow_die_offset): Likewise.
13887 (follow_die_ref): Likewise.
13888 (dwarf2_fetch_die_loc_sect_off): Likewise.
13889 (dwarf2_fetch_constant_bytes): Likewise.
13890 (dwarf2_fetch_die_type_sect_off): Likewise.
13891 (dwarf2_get_die_type): Likewise.
13892 (follow_die_sig): Likewise.
13893 (decode_locdesc): Likewise.
13894 (dwarf2_per_cu_objfile): Likewise.
13895 (dwarf2_per_cu_text_offset): Likewise.
13896 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13897 objfile.
13898 (set_die_type): Access objfile through
13899 dwarf2_per_objfile.
13900
13901 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13902
13903 * valprint.c (converted_character_d): Remove typedef.
13904 (DEF_VEC_O (converted_character_d)): Remove.
13905 (count_next_character): Use std::vector.
13906 (print_converted_chars_to_obstack): Likewise.
13907 (generic_printstr): Likewise.
13908
13909 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13910
13911 * xml-support.h (struct gdb_xml_value): Add constructor.
13912 <value>: Change type to unique_xmalloc_ptr.
13913 (gdb_xml_value_s): Remove typedef.
13914 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13915 (gdb_xml_element_start_handler): Change parameter type to
13916 std::vector.
13917 (xml_find_attribute): Likewise.
13918 * xml-support.c (xml_find_attribute): Change parameter type to
13919 std::vector and adjust.
13920 (gdb_xml_values_cleanup): Remove.
13921 (gdb_xml_parser::start_element): Adjust to std::vector.
13922 (xinclude_start_include): Change paraeter type to std::vector
13923 and adjust.
13924 * btrace.c (check_xml_btrace_version): Likewise.
13925 (parse_xml_btrace_block): Likewise.
13926 (parse_xml_btrace_pt_config_cpu): Likewise.
13927 (parse_xml_btrace_pt): Likewise.
13928 (parse_xml_btrace_conf_bts): Likewise.
13929 (parse_xml_btrace_conf_pt): Likewise.
13930 * memory-map.c (memory_map_start_memory): Likewise.
13931 (memory_map_start_property): Likewise.
13932 * osdata.c (osdata_start_osdata): Likewise.
13933 (osdata_start_item): Likewise.
13934 (osdata_start_column): Likewise.
13935 * remote.c (start_thread): Likewise.
13936 * solib-aix.c (library_list_start_library): Likewise.
13937 (library_list_start_list): Likewise.
13938 * solib-svr4.c (library_list_start_library): Likewise.
13939 (svr4_library_list_start_list): Likewise.
13940 * solib-target.c (library_list_start_segment): Likewise.
13941 (library_list_start_section): Likewise.
13942 (library_list_start_library): Likewise.
13943 (library_list_start_list): Likewise.
13944 * tracepoint.c (traceframe_info_start_memory): Likewise.
13945 (traceframe_info_start_tvar): Likewise.
13946 * xml-syscall.c (syscall_start_syscall): Likewise.
13947 * xml-tdesc.c (tdesc_start_target): Likewise.
13948 (tdesc_start_feature): Likewise.
13949 (tdesc_start_reg): Likewise.
13950 (tdesc_start_union): Likewise.
13951 (tdesc_start_struct): Likewise.
13952 (tdesc_start_flags): Likewise.
13953 (tdesc_start_enum): Likewise.
13954 (tdesc_start_field): Likewise.
13955 (tdesc_start_enum_value): Likewise.
13956 (tdesc_start_vector): Likewise.
13957
13958 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13959
13960 * extension.h (struct xmethod_worker) <clone>: Remove.
13961 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13962 Remove.
13963 (python_xmethod_worker::clone): Remove.
13964 * valops.c (find_overload_match): Use std::move instead of
13965 clone.
13966
13967 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13968
13969 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13970 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13971 <free_xmethod_worker_data>: Remove.
13972 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13973 <get_xmethod_arg_types>: Remove.
13974 <get_xmethod_result_type>: Remove.
13975 <invoke_xmethod>: Remove.
13976 * extension.c (new_xmethod_worker): Remove.
13977 (clone_xmethod_worker): Remove.
13978 (get_matching_xmethod_workers): Return void, pass std::vector by
13979 pointer.
13980 (get_xmethod_arg_types): Rename to...
13981 (xmethod_worker::get_arg_types): ... this, and adjust.
13982 (get_xmethod_result_type): Rename to...
13983 (xmethod_worker::get_result_type): ... this, and adjust.
13984 (invoke_xmethod): Remove.
13985 (free_xmethod_worker): Remove.
13986 (free_xmethod_worker_vec): Remove.
13987 * extension.h (enum ext_lang_rc): Move here from
13988 extension-priv.h.
13989 (struct xmethod_worker): Add constructor and destructor.
13990 <data>: Remove.
13991 <value>: Remove.
13992 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13993 virtual pure methods.
13994 <get_arg_types, get_result_type>: New methods.
13995 (xmethod_worker_ptr): Remove typedef.
13996 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13997 (xmethod_worker_vec): Remove typedef.
13998 (xmethod_worker_up): New typedef.
13999 (invoke_xmethod): Remove.
14000 (clone_xmethod_worker): Remove.
14001 (free_xmethod_worker): Remove.
14002 (free_xmethod_worker_vec): Remove.
14003 (get_xmethod_arg_types): Remove.
14004 (get_xmethod_result_type): Remove.
14005 * valops.c (find_method_list): Use std::vector, don't use
14006 intermediate vector.
14007 (value_find_oload_method_list): Use std::vector.
14008 (find_overload_match): Use std::vector.
14009 (find_oload_champ): Use std::vector.
14010 * value.c (value_free): Use operator delete.
14011 (value_of_xmethod): Rename to...
14012 (value_from_xmethod): ... this. Don't assign
14013 xmethod_worker::value, take rvalue-reference.
14014 (result_type_of_xmethod): Adjust.
14015 (call_xmethod): Adjust.
14016 * value.h: Include extension.h.
14017 (struct xmethod_worker): Don't forward-declare.
14018 (value_of_xmethod): Rename to...
14019 (value_from_xmethod): ... this, take rvalue-reference.
14020 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14021 (struct python_xmethod_worker): ... this, add constructor and
14022 destructor.
14023 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14024 (gdbpy_free_xmethod_worker_data): Rename to...
14025 (python_xmethod_worker::~python_xmethod_worker): ... this and
14026 adjust.
14027 (gdbpy_clone_xmethod_worker_data): Rename to...
14028 (python_xmethod_worker::clone): ... this and adjust.
14029 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14030 temporary vector.
14031 (gdbpy_get_xmethod_arg_types): Rename to...
14032 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14033 (gdbpy_get_xmethod_result_type): Rename to...
14034 (python_xmethod_worker::do_get_result_type): ... this and
14035 adjust.
14036 (gdbpy_invoke_xmethod): Rename to...
14037 (python_xmethod_worker::invoke): ... this and adjust.
14038 (new_python_xmethod_worker): Rename to...
14039 (python_xmethod_worker::python_xmethod_worker): ... this and
14040 adjust.
14041 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14042 Remove.
14043 (gdbpy_free_xmethod_worker_data): Remove.
14044 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14045 (gdbpy_get_xmethod_arg_types): Remove.
14046 (gdbpy_get_xmethod_result_type): Remove.
14047 (gdbpy_invoke_xmethod): Remove.
14048 * python/python.c (python_extension_ops): Remove obsolete
14049 callbacks.
14050
14051 2018-01-05 Pedro Alves <palves@redhat.com>
14052
14053 PR gdb/18653
14054 * common/signals-state-save-restore.c
14055 (save_original_signals_state): New parameter 'quiet'. Warn if we
14056 find a custom handler preinstalled, instead of internal erroring.
14057 But only warn if !quiet.
14058 * common/signals-state-save-restore.h
14059 (save_original_signals_state): New parameter 'quiet'.
14060 * main.c (captured_main_1): Move save_original_signals_state call
14061 after option handling, and pass QUIET.
14062
14063 2018-01-05 Pedro Alves <palves@redhat.com>
14064
14065 * spu-tdep.c (spu_catch_start): Pass
14066 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14067
14068 2018-01-05 Pedro Alves <palves@redhat.com>
14069
14070 PR gdb/22670
14071 * ada-lang.c (literal_symbol_name_matcher): New function.
14072 (ada_get_symbol_name_matcher): Use it for
14073 symbol_name_match_type::SEARCH_NAME.
14074 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14075 it down instead of assuming symbol_name_match_type::FULL.
14076 * block.h (block_lookup_symbol): New parameter 'match_type'.
14077 * c-valprint.c (print_unpacked_pointer): Use
14078 lookup_symbol_search_name instead of lookup_symbol.
14079 * compile/compile-object-load.c (get_out_value_type): Pass down
14080 symbol_name_match_type::SEARCH_NAME.
14081 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14082 symbol_name_match_type::FULL.
14083 * cp-support.c (cp_get_symbol_name_matcher): Handle
14084 symbol_name_match_type::SEARCH_NAME.
14085 * infrun.c (insert_exception_resume_breakpoint): Use
14086 lookup_symbol_search_name.
14087 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14088 * psymtab.c (maintenance_check_psymtabs): Use
14089 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14090 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14091 SYMBOL_SEARCH_NAME.
14092 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14093 if symbol_name_match_type::SEARCH_NAME.
14094 (lookup_symbol_in_language): Pass down
14095 symbol_name_match_type::FULL.
14096 (lookup_symbol_search_name): New.
14097 (lookup_language_this): Pass down
14098 symbol_name_match_type::SEARCH_NAME.
14099 (lookup_symbol_aux, lookup_local_symbol): New parameter
14100 'match_type'. Pass it down.
14101 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14102 (lookup_symbol_search_name): New declaration.
14103 (lookup_symbol_in_block): New 'match_type' parameter.
14104
14105 2018-01-05 Pedro Alves <palves@redhat.com>
14106
14107 PR gdb/22670
14108 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14109 ada_lookup_symbol.
14110 (ada_lookup_symbol): Reimplement in terms of
14111 ada_lookup_symbol_list, bits factored out from
14112 ada_lookup_encoded_symbol.
14113
14114 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14115
14116 * ada-exp.y (write_object_renaming): When subscripting an array
14117 using a symbol as the index, pass the block in call to
14118 ada_lookup_encoded_symbol when looking that symbol up.
14119
14120 2018-01-05 Jerome Guitton <guitton@adacore.com>
14121
14122 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14123 TYPE_INDEX_TYPE.
14124
14125 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14126
14127 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14128 the case where VALUE_LVAL (val0) is not lval_memory.
14129
14130 2018-01-05 Xavier Roirand <roirand@adacore.com>
14131
14132 * ada-valprint.c (print_optional_low_bound): Handle
14133 character-indexed array printing like boolean-indexed array
14134 printing.
14135
14136 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14137
14138 * NEWS: Create a new section for the next release branch.
14139 Rename the section of the current branch, now that it has
14140 been cut.
14141
14142 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14143
14144 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14145 * version.in: Bump version to 8.1.50.DATE-git.
14146
14147 2018-01-03 Xavier Roirand <roirand@adacore.com>
14148
14149 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14150 Add field.
14151 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14152 Add field.
14153 (default_exception_support_info) <catch_handlers_sym>: Add field.
14154 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14155 (ada_exception_name_addr_1): Add "catch handlers" handling.
14156 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14157 Update all callers.
14158 (create_excep_cond_exprs) <ex>: Add parameter.
14159 (re_set_exception): Update create_excep_cond_exprs call.
14160 (print_it_exception, print_one_exception, print_mention_exception)
14161 (print_recreate_exception): Add "catch handler" handling.
14162 (allocate_location_catch_handlers, re_set_catch_handlers)
14163 (check_status_catch_handlers, print_it_catch_handlers)
14164 (print_one_catch_handlers, print_mention_catch_handlers)
14165 (print_recreate_catch_handlers): New function.
14166 (catch_handlers_breakpoint_ops): New variable.
14167 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14168 Add parameter. Add "catch handler" handling.
14169 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14170 Add "catch handler" handling.
14171 (ada_exception_catchpoint_cond_string): Add "catch handler"
14172 handling.
14173 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14174 call.
14175 (catch_ada_handlers_command): New function.
14176 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14177 operations structure.
14178 (_initialize_ada_language): Add "catch handlers" command entry.
14179 * NEWS: Document "catch handlers" feature.
14180
14181 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14182
14183 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14184 account when creating the array type of the slice.
14185 (ada_value_slice): Likewise.
14186
14187 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14188
14189 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14190 New enum value.
14191 (create_array_type_with_stride): Add byte_stride_prop parameter.
14192 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14193 New parameter. Update all callers in this file.
14194 (array_type_has_dynamic_stride): New function.
14195 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14196 of arrays with dynamic byte strides.
14197 * dwarf2read.c (read_array_type): Add support for dynamic
14198 DW_AT_byte_stride attributes.
14199
14200 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14201
14202 * dwarf2read.c (read_unspecified_type): Treat
14203 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14204
14205 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14206
14207 Update copyright year range in all GDB files.
14208
14209 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14210
14211 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14212 and gdb/testsuite/gdb.base/step-line.c.
14213
14214 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14215
14216 * copyright.py (main): Dump the contents of
14217 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14218 even if BY_HAND is empty.
14219
14220 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14221
14222 * top.c (print_gdb_version): Update Copyright year in version
14223 message.
14224
14225 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14226
14227 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14228
14229 For older changes see ChangeLog-2017.
14230 \f
14231 Local Variables:
14232 mode: change-log
14233 left-margin: 8
14234 fill-column: 74
14235 version-control: never
14236 coding: utf-8
14237 End: