Avoid undefined behavior in read_subrange_type
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-03 Tom Tromey <tom@tromey.com>
2
3 * dwarf2read.c (read_subrange_type): Make "negative_mask"
4 unsigned.
5
6 2018-10-03 Tom Tromey <tom@tromey.com>
7
8 * findvar.c (extract_integer): Do work in an unsigned type.
9
10 2018-10-03 Tom Tromey <tom@tromey.com>
11
12 * common/enum-flags.h (enum_flags::operator~): Add static assert.
13 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
14 base type.
15 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
16 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
17 type.
18 * c-lang.h (enum c_string_type_values): Use unsigned as base
19 type.
20 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
21
22 2018-10-03 Tom Tromey <tom@tromey.com>
23
24 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
25 <~dwarf2_frame_state_reg_info>: Update.
26 <dwarf2_frame_state_reg_info>: Update.
27 <alloc_regs>: Add assertion. Update.
28 <reg>: Now a std::vector.
29 <num_regs>: Remove.
30 <swap>: Update.
31 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
32 (execute_cfa_program_test, dwarf2_frame_cache): Update.
33
34 2018-10-03 Tom Tromey <tom@tromey.com>
35
36 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
37
38 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
39
40 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
41
42 2018-10-02 Tom Tromey <tom@tromey.com>
43
44 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
45
46 2018-10-02 John Darrington <john@darrington.wattle.id.au>
47
48 * NEWS: Mention changed commands.
49 * ser-uds.c: New file.
50 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
51 * configure: Regenerate.
52 * Makefile.in: Add new file.
53 * serial.c (serial_open): Check if filename is a socket
54 and lookup the appropriate interface accordingly.
55
56 2018-10-01 Alan Hayward <alan.hayward@arm.com>
57
58 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
59 define.
60 (AARCH64_EXTRA_MAGIC): Likewise.
61 (AARCH64_FPSIMD_MAGIC): Likewise.
62 (AARCH64_SVE_MAGIC): Likewise.
63 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
64 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
65 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
66 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
67 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
68 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
69 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
70 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
71 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
72 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
73 (read_aarch64_ctx): Add function.
74 (aarch64_linux_sigframe_init): Detect FP registers.
75
76 2018-10-01 Alan Hayward <alan.hayward@arm.com>
77
78 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
79 (AARCH64_D0_REGNUM): Likewise.
80 (AARCH64_S0_REGNUM): Likewise.
81 (AARCH64_H0_REGNUM): Likewise.
82 (AARCH64_B0_REGNUM): Likewise.
83 (AARCH64_SVE_V0_REGNUM): Likewise.
84 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
85 (AARCH64_D0_REGNUM): Likewise.
86 (AARCH64_S0_REGNUM): Likewise.
87 (AARCH64_H0_REGNUM): Likewise.
88 (AARCH64_B0_REGNUM): Likewise.
89 (AARCH64_SVE_V0_REGNUM): Likewise.
90
91 2018-10-01 Gary Benson <gbenson@redhat.com>
92
93 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
94 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
95 prfpregset_t instead of gdb_prfpregset_t.
96 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
97 * configure, config.in: Rebuild.
98
99 2018-10-01 Gary Benson <gbenson@redhat.com>
100
101 * common/gdb_proc_service.h: New file, factored out from...
102 * gdb_proc_service.h: Moved common code to the above file.
103 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
104
105 2018-10-01 Gary Benson <gbenson@redhat.com>
106
107 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
108 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
109
110 2018-10-01 Gary Benson <gbenson@redhat.com>
111
112 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
113 (AC_CHECK_HEADERS): Check for linux/elf.h.
114 * configure, config.in: Rebuild.
115 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
116 doesn't define elf_fpregset_t.
117
118 2018-10-01 Gary Benson <gbenson@redhat.com>
119
120 * gdb_proc_service.h: Whitespace change.
121
122 2018-10-01 Tom Tromey <tom@tromey.com>
123
124 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
125 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
126 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
127
128 2018-10-01 Tom Tromey <tom@tromey.com>
129
130 * README: Minor change.
131
132 2018-09-30 Pedro Alves <palves@redhat.com>
133
134 * darwin-nat-info.c (darwin_debug_regions_recurse)
135 (info_mach_exceptions_command): Remove unused local variables.
136 * darwin-nat.c (darwin_decode_notify_message)
137 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
138 (darwin_stop_inferior, darwin_setup_exceptions)
139 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
140 (darwin_nat_target::attach, darwin_nat_target::detach)
141 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
142 local variables.
143 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
144 variables.
145
146 2018-09-29 Tom Tromey <tom@tromey.com>
147
148 * README: Remove some leftover text.
149
150 2018-09-29 Tom Tromey <tom@tromey.com>
151
152 * PROBLEMS: Rewrite.
153 * README: Update.
154
155 2018-09-28 John Baldwin <jhb@FreeBSD.org>
156
157 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
158 case with explicit breakpoint kind.
159 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
160 'additional_info' and related logic.
161 (riscv_debug_breakpoints): New variable.
162 (riscv_breakpoint_kind_from_pc): Use the length of the existing
163 instruction to determine the breakpoint kind.
164 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
165 flag. Update description of 'set/show riscv
166 use-compressed-breakpoints' flag.
167
168 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
169
170 (NEWS): Mention changes to frame related commands.
171 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
172 (add_prefix_cmd_suppress_notification): New function.
173 (add_com_suppress_notification): Call
174 add_cmd_suppress_notification.
175 * command.h (add_cmd_suppress_notification): Declare.
176 (add_prefix_cmd_suppress_notification): Declare.
177 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
178 (parse_frame_specification): Moved from stack.c, with
179 simplification to handle a single argument.
180 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
181 switch to the selected frame. Add a header comment.
182 * stack.c: Remove 'safe-ctype.h' include.
183 (find_frame_for_function): Add declaration.
184 (find_frame_for_address): New function.
185 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
186 (frame_selection_by_function_completer): New function.
187 (info_frame_command): Rename to...
188 (info_frame_command_core): ...this, and update parameter types.
189 (select_frame_command): Rename to...
190 (select_frame_command_core): ...this, and update parameter types.
191 (frame_command): Rename to...
192 (frame_command_core): ...this, and update parameter types.
193 (class frame_command_helper): New class to wrap implementations of
194 frame related sub-commands.
195 (frame_apply_cmd_list): New static global.
196 (frame_cmd_list): Make static.
197 (select_frame_cmd_list): New global for sub-commands.
198 (info_frame_cmd_list): New global for sub-commands.
199 (_initialize_stack): Register sub-commands for 'frame',
200 'select-frame', and 'info frame'. Update 'frame apply' commands
201 to use frame_apply_cmd_list. Move function local static
202 frame_apply_list to file static frame_apply_cmd_list for
203 consistency.
204 * stack.h (select_frame_command): Delete declarationn.
205 (select_frame_for_mi): Declare new function.
206
207 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
208
209 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
210 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
211 and NOP.
212
213 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
214
215 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
216
217 2018-09-26 Tom Tromey <tom@tromey.com>
218
219 * valops.c (auto_abandon): Remove dead code.
220
221 2018-09-26 Tom Tromey <tom@tromey.com>
222
223 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
224
225 2018-09-24 Tom Tromey <tom@tromey.com>
226
227 * common/pathstuff.c (get_standard_cache_dir): Make
228 "xdg_cache_home" and "home" const.
229 * top.c (init_history): Make "tmpenv" const.
230 * main.c (get_init_files): Make "homedir" const.
231
232 2018-09-23 Tom Tromey <tom@tromey.com>
233
234 PR python/18852:
235 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
236
237 2018-09-23 Tom Tromey <tom@tromey.com>
238
239 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
240 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
241 * python/python-internal.h (gdbpy_handle_exception): Declare.
242 * python/py-utils.c (gdbpy_handle_exception): New function.
243
244 2018-09-23 Tom Tromey <tom@tromey.com>
245
246 PR python/17284:
247 * python/py-type.c (typy_template_argument): Check for negative
248 argument number.
249
250 2018-09-23 Tom Tromey <tom@tromey.com>
251
252 PR python/14062:
253 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
254
255 2018-09-23 Tom Tromey <tom@tromey.com>
256
257 PR python/18170:
258 * python/py-value.c (valpy_int): Allow conversion from pointer
259 type.
260
261 2018-09-23 Tom Tromey <tom@tromey.com>
262
263 PR python/20126:
264 * python/py-value.c (valpy_int): Respect type sign.
265
266 2018-09-23 Tom Tromey <tom@tromey.com>
267
268 PR python/18352;
269 * python/py-value.c (valpy_float): Allow conversions from int or
270 char.
271 (valpy_int, valpy_long): Allow conversions from float.
272
273 2018-09-23 Tom Tromey <tom@tromey.com>
274
275 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
276 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
277
278 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
279
280 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
281 __sighndlr.
282 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
283
284 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
285
286 * windows-nat.c (windows_nat_target::wait): Remove a spurious
287 target_terminal::ours().
288
289 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
290
291 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
292 of vl to ULONGEST.
293
294 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
295
296 * breakpoint.c (update_inserted_breakpoint_locations): Remove
297 redundant condition.
298
299 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
300
301 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
302
303 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
304 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
305 * sol-thread.c (ps_pdmodel): Don't guard definition.
306
307 * procfs.c: Fix formatting.
308
309 * procfs.c (sysset_t_alloc): Remove.
310 (create_procinfo): Use XNEW instead of sysset_t_alloc.
311 (procfs_debug_inferior): Likewise.
312 (procfs_set_exec_trap): Likewise.
313 (proc_set_traced_sysentry): Don't allocate argp dynamically.
314 (proc_set_traced_sysexit): Likewise.
315
316 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
317 (dead_procinfo): Likewise.
318 (proc_warn): Likewise.
319 (proc_error): Likewise.
320 (proc_get_LDT_entry): Likewise.
321 (do_attach): Likewise.
322 (procfs_target::pid_to_str): Likewise.
323 (iterate_over_mappings): Likewise.
324
325 * procfs.c (create_procinfo): Fix ARI warning.
326 (proc_get_status): Likewise.
327 (proc_stop_process): Likewise.
328 (proc_run_process): Likewise.
329 (proc_kill): Likewise.
330 (proc_get_LDT_entry): Likewise.
331 (procfs_find_LDT_entry): Likewise.
332 (proc_update_threads): Likewise.
333 (proc_iterate_over_threads): Likewise.
334 (do_attach): Likewise.
335 (procfs_xfer_memory): Likewise.
336 (invalidate_cache): Likewise.
337 (procfs_target::resume): Likewise.
338 (procfs_init_inferior): Likewise.
339 (procfs_set_exec_trap): Likewise.
340 (procfs_target::thread_alive): Likewise.
341 (procfs_target::pid_to_exec_file): Likewise.
342 (iterate_over_mappings): Likewise.
343 (procfs_target::make_corefile_notes): Likewise.
344 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
345
346 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
347 (procfs_find_LDT_entry): Likewise.
348 * sol-thread.c (ps_lgetLDT): Likewise.
349
350 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
351
352 PR tdep/17903
353 * procfs.c (procfs_target): Declare pid_to_exec_file.
354 (procfs_target::pid_to_exec_file): New.
355
356 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
357
358 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
359 renaming.
360 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
361 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
362
363 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
364
365 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
366 (supply_fpregset, fill_fpregset): Move ...
367 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
368 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
369 Remove references to ioctl-based procfs.
370 Include <sys/reg.h>.
371 Remove PR_MODEL_NATIVE guards.
372 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
373 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
374
375 2018-09-19 Xavier Roirand <roirand@adacore.com>
376
377 PR gdb/20981:
378 * solib-darwin.c (darwin_get_dyld_bfd): New function.
379 (darwin_solib_get_all_image_info_addr_at_init): Update call.
380 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
381
382 2018-09-19 John Baldwin <jhb@FreeBSD.org>
383
384 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
385 (fbsd_print_sockaddr_in6): Likewise.
386
387 2018-09-19 Richard Bunt <richard.bunt@arm.com>
388 Chris January <chris.january@arm.com>
389
390 * eval.c (skip_undetermined_arglist): Skip argument list helper.
391 (evaluate_subexp_standard): Return a dummy type when
392 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
393 OP_F77_UNDETERMINED_ARGLIST case.
394 * expression.h (enum noside): Update comment.
395
396 2018-09-19 George Vasick <george.vasick@oracle.com>
397
398 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
399
400 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
401 April Chin <april.chin@oracle.com>
402 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
403
404 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
405 uint_t lwpid_t.
406 (create_procinfo): Print pids in /proc without leading zeros.
407
408 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
409
410 * nios2-tdep.c (nios2_gcc_target_options): New.
411 (nios2_gdb_arch_init): Install new hook.
412
413 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
414
415 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
416 New file.
417 * update-gnulib.sh: Apply patch.
418 * configure: Re-generate.
419
420 2018-09-18 John Baldwin <jhb@FreeBSD.org>
421
422 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
423 description. Make "info proc" command descriptions more
424 consistent.
425
426 2018-09-18 John Baldwin <jhb@FreeBSD.org>
427
428 * NEWS: Mention 'info proc files' command.
429
430 2018-09-18 John Baldwin <jhb@FreeBSD.org>
431
432 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
433 descriptors for IP_FILES and IP_ALL.
434
435 2018-09-18 John Baldwin <jhb@FreeBSD.org>
436
437 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
438 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
439 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
440 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
441 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
442 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
443 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
444 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
445 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
446 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
447 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
448 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
449 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
450 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
451 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
452 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
453 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
454 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
455 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
456 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
457 (struct fbsd_sockaddr_un): New types.
458 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
459 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
460 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
461 (fbsd_core_info_proc_files): New functions.
462 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
463 IP_ALL.
464 * fbsd-tdep.h (fbsd_info_proc_files_header)
465 (fbsd_info_proc_files_entry): New.
466
467 2018-09-18 John Baldwin <jhb@FreeBSD.org>
468
469 * defs.h (enum info_proc_what) [IP_FILES]: New value.
470 * infcmd.c (info_proc_cmd_files): New function.
471 (_initialize_infcmd): Register 'info proc files' command.
472
473 2018-09-18 John Baldwin <jhb@FreeBSD.org>
474
475 * gnulib/aclocal-m4-deps.mk: Re-generate.
476 * gnulib/aclocal.m4: Re-generate.
477 * gnulib/config.in: Re-generate.
478 * gnulib/configure: Re-generate.
479 * gnulib/import/Makefile.am: Re-generate.
480 * gnulib/import/Makefile.in: Re-generate.
481 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
482 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
483 * gnulib/import/arpa_inet.in.h: New file.
484 * gnulib/import/inet_ntop.c: New file.
485 * gnulib/import/m4/arpa_inet_h.m4: New file.
486 * gnulib/import/m4/inet_ntop.m4: New file.
487 * gnulib/import/m4/netinet_in_h.m4: New file.
488 * gnulib/import/m4/socklen.m4: New file.
489 * gnulib/import/m4/sockpfaf.m4: New file.
490 * gnulib/import/m4/stdalign.m4: New file.
491 * gnulib/import/m4/sys_uio_h.m4: New file.
492 * gnulib/import/netinet_in.in.h: New file.
493 * gnulib/import/stdalign.in.h: New file.
494 * gnulib/import/sys_socket.c: New file.
495 * gnulib/import/sys_socket.in.h: New file.
496 * gnulib/import/sys_uio.in.h: New file.
497 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
498 module.
499
500 2018-09-18 John Baldwin <jhb@FreeBSD.org>
501
502 * gnulib/aclocal-m4-deps.mk: New file.
503 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
504 deterministically.
505
506 2018-09-18 John Baldwin <jhb@FreeBSD.org>
507
508 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
509 KVE_PATH.
510
511 2018-09-18 Tom Tromey <tom@tromey.com>
512
513 * compile/compile-object-load.c (struct
514 link_hash_table_cleanup_data): Add constructor and destructor.
515 Use DISABLE_COPY_AND_ASSIGN.
516 (~link_hash_table_cleanup_data): Rename from
517 link_hash_table_free. Now a destructor.
518 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
519
520 2018-09-18 Tom Tromey <tom@tromey.com>
521
522 * compile/compile-object-run.c (do_module_cleanup): Use delete.
523 * compile/compile-object-load.c (struct munmap_list): Move to
524 header file.
525 (munmap_list::add): Rename from munmap_list_add; rewrite.
526 (munmap_list::~munmap_list): Rename from munmap_list_free.
527 (munmap_listp_free_cleanup): Remove.
528 (compile_object_load): Update.
529 * compile/compile-object-load.h (struct munmap_list): Move from
530 compile-object-load.c. Rewrite.
531
532 2018-09-18 Alan Hayward <alan.hayward@arm.com>
533
534 * aarch64-tdep.c (pass_in_v): Use register size.
535 (aarch64_extract_return_value): Likewise.
536 (aarch64_store_return_value): Likewise.
537
538 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
539
540 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
541 rlim_t.
542
543 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
544
545 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
546 Fix short help line.
547
548 2018-09-17 Tom Tromey <tom@tromey.com>
549
550 PR python/20445:
551 * configure: Rebuild.
552 * configure.ac: Conditionally use -DNDEBUG for Python.
553
554 2018-09-17 Tom Tromey <tom@tromey.com>
555
556 * configure: Rebuild.
557 * configure.ac: Use gmp as a library dependency when checking for
558 mpfr.
559
560 2018-09-17 Pedro Alves <palves@redhat.com>
561
562 * python/py-inferior.c (find_inferior_object): Delete.
563
564 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
565
566 * compile/compile-cplus-types.c
567 (compile_cplus_instance::enter_scope): Don't use new_scope after
568 std::move.
569
570 2018-09-17 Tom Tromey <tom@tromey.com>
571
572 * common/pathstuff.c (get_standard_cache_dir): Use
573 ~/Library/Caches on macOS.
574 * common/pathstuff.h (get_standard_cache_dir): Update comment.
575
576 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
577
578 PR python/23669
579 * breakpoint.c (commands_cmd_element): New.
580 (_initialize_breakpoint): Assign commands_cmd_element.
581 * breakpoint.h (commands_cmd_element): New.
582 * cli/cli-script.c (while_cmd_element, if_command,
583 define_cmd_element): New.
584 (command_name_equals): Remove.
585 (process_next_line): Compare commands by pointer, not by name.
586 (_initialize_cli_script): Assign the various cmd_list_element
587 variables.
588 * compile/compile.c (compile_cmd_element): New.
589 (_initialize_compile): Assign compile_cmd_element.
590 * compile/compile.h (compile_cmd_element): New.
591 * guile/guile.c (guile_cmd_element): New.
592 (install_gdb_commands): Assign guile_cmd_element.
593 * guile/guile.h (guile_cmd_element): New.
594 * python/python.c (python_cmd_element): New.
595 (_initialize_python): Assign python_cmd_element.
596 * python/python.h (python_cmd_element): New.
597 * tracepoint.c (while_stepping_cmd_element): New.
598 (_initialize_tracepoint): Assign while_stepping_cmd_element.
599 * tracepoint.h (while_stepping_cmd_element): New.
600
601 2018-09-17 Tom Tromey <tom@tromey.com>
602
603 * infrun.c (save_infcall_suspend_state): Return
604 infcall_suspend_state_up.
605 (save_infcall_control_state): Return infcall_control_state_up.
606 * inferior.h (save_infcall_suspend_state)
607 (save_infcall_control_state): Declare later. Return unique
608 pointers.
609
610 2018-09-17 Tom Tromey <tom@tromey.com>
611
612 * infrun.c (struct stop_context): Declare constructor,
613 destructor, "changed" method.
614 (stop_context::stop_context): Rename from save_stop_context.
615 (stop_context::~stop_context): Rename from
616 release_stop_context_cleanup.
617 (normal_stop): Update.
618 (stop_context::changed): Rename from stop_context_changed. Return
619 bool.
620
621 2018-09-17 Tom Tromey <tom@tromey.com>
622
623 * inferior.h (struct infcall_suspend_state_deleter): New.
624 (infcall_suspend_state_up): New typedef.
625 (struct infcall_control_state_deleter): New.
626 (infcall_control_state_up): New typedef.
627 (make_cleanup_restore_infcall_suspend_state)
628 (make_cleanup_restore_infcall_control_state): Don't declare.
629 * infcall.c (call_function_by_hand_dummy): Update.
630 * infrun.c (do_restore_infcall_suspend_state_cleanup)
631 (make_cleanup_restore_infcall_suspend_state): Remove.
632 (do_restore_infcall_control_state_cleanup)
633 (make_cleanup_restore_infcall_control_state): Remove.
634
635 2018-09-17 Tom Tromey <tom@tromey.com>
636
637 * gdbthread.h (struct thread_control_state): Add initializer.
638 (class thread_info) <control>: Remove initializer.
639 * inferior.h (struct inferior_control_state): Add initializer.
640 (class inferior) <control>: Remove initializer.
641 (exit_inferior_1): Update.
642 * infrun.c (struct infcall_control_state): Add constructors.
643 (save_infcall_control_state): Use new.
644 (restore_infcall_control_state, discard_infcall_control_state):
645 Use delete.
646
647 2018-09-17 Tom Tromey <tom@tromey.com>
648
649 * infrun.c (struct infcall_suspend_state) <registers>: Now a
650 unique_ptr.
651 <siginfo_data>: Now a unique_xmalloc_ptr.
652 (save_infcall_suspend_state, restore_infcall_suspend_state)
653 (discard_infcall_suspend_state)
654 (get_infcall_suspend_state_regcache): Update.
655
656 2018-09-17 Tom Tromey <tom@tromey.com>
657
658 * gdbthread.h (struct thread_suspend_state): Add initializers.
659 (class thread_info) <suspend>: Remove initializer.
660 * infrun.c (struct infcall_suspend_state): Add initializers.
661 (save_infcall_suspend_state): Use new.
662 (discard_infcall_suspend_state): Use delete.
663
664 2018-09-16 Tom Tromey <tom@tromey.com>
665
666 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
667 Remove.
668 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
669 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
670 (py_varobj_iter_new): Likewise.
671 (py_varobj_get_iterator): Use gdbpy_ref.
672
673 2018-09-16 Tom Tromey <tom@tromey.com>
674
675 * python/py-threadevent.c (py_get_event_thread): Simplify.
676 * python/py-inferior.c (infpy_thread_from_thread_handle):
677 Return immediately after calling thread_to_thread_object. Use
678 Py_RETURN_NONE.
679 (thread_to_thread_object): Set the exception on a NULL return.
680
681 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
684
685 2018-09-16 Tom Tromey <tom@tromey.com>
686
687 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
688 Remove.
689
690 2018-09-16 Tom Tromey <tom@tromey.com>
691
692 * python/python-internal.h (thread_to_thread_object): Change
693 return type.
694 * python/py-inferior.c (thread_to_thread_object): Return a new
695 reference.
696 (infpy_thread_from_thread_handle): Update.
697 * python/py-infthread.c (gdbpy_selected_thread): Update.
698 * python/py-stopevent.c (create_stop_event_object): Update.
699 * python/py-threadevent.c (py_get_event_thread): Return a new
700 reference.
701 (py_get_event_thread): Update.
702 * python/py-event.h (py_get_event_thread): Change return type.
703 * python/py-continueevent.c (create_continue_event_object):
704 Update.
705
706 2018-09-16 Tom Tromey <tom@tromey.com>
707
708 * python/py-progspace.c (pspy_get_objfiles): Update.
709 * python/python-internal.h (objfile_to_objfile_object): Change
710 return type.
711 * python/py-newobjfileevent.c (create_new_objfile_event_object):
712 Update.
713 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
714 Update.
715 * python/python.c (gdbpy_get_current_objfile): Update.
716 (gdbpy_objfiles): Update.
717 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
718 Update.
719 (objfile_to_objfile_object): Return a new reference.
720 * python/py-symtab.c (stpy_get_objfile): Update.
721 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
722 Update.
723
724 2018-09-16 Tom Tromey <tom@tromey.com>
725
726 * python/py-inferior.c (infpy_get_progspace): Update.
727 * python/python-internal.h (pspace_to_pspace_object): Change
728 return type.
729 * python/py-newobjfileevent.c
730 (create_clear_objfiles_event_object): Update.
731 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
732 Update.
733 * python/python.c (gdbpy_get_current_progspace): Update.
734 (gdbpy_progspaces): Update.
735 * python/py-progspace.c (pspace_to_pspace_object): Return a new
736 reference.
737 * python/py-objfile.c (objfpy_get_progspace): Update.
738 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
739 Update.
740
741 2018-09-16 Tom Tromey <tom@tromey.com>
742
743 * python/lib/gdb/__init__.py (current_progspace, objfiles)
744 (solib_name, block_for_pc, find_pc_line): New functions.
745 (execute_unwinders): Update.
746 * python/py-block.c (gdbpy_block_for_pc): Remove.
747 * python/py-inferior.c (infpy_get_progspace): New function.
748 (inferior_object_getset) <progspace>: Add.
749 * python/py-progspace.c (pspy_objfiles): Rewrite.
750 (pspy_solib_name, pspy_block_for_pc)
751 (pspy_find_pc_line, pspy_is_valid): New functions.
752 (progspace_object_methods): Add entries for solib_name,
753 block_for_pc, find_pc_line, is_valid.
754 * python/python-internal.h (gdbpy_block_for_pc)
755 (build_objfiles_list): Don't declare.
756 * python/python.c: Don't include solib.h.
757 (gdbpy_solib_name, gdbpy_find_pc_line)
758 (gdbpy_get_current_progspace, build_objfiles_list)
759 (gdbpy_objfiles): Remove.
760 (GdbMethods) <current_progspace, objfiles, block_for_pc,
761 solib_name, find_pc_line>: Remove entries.
762
763 2018-09-16 Tom Tromey <tom@tromey.com>
764
765 * top.c (new_ui_command): Use GNU style for metasyntactic
766 variables.
767 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
768 variables.
769 * maint.c (maintenance_translate_address): Remove "<>" around
770 text.
771 * interps.c (interpreter_exec_cmd): Use GNU style for
772 metasyntactic variables.
773 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
774 metasyntactic variables.
775 * tracepoint.c (tfind_range_command): Use GNU style for
776 metasyntactic variables.
777 (tfind_outside_command): Likewise.
778 (_initialize_tracepoint): Likewise.
779 * remote.c (extended_remote_target::create_inferior): Use GNU
780 style for metasyntactic variables.
781 * sparc64-tdep.c (adi_examine_command): Use GNU style for
782 metasyntactic variables.
783 (adi_assign_command): Likewise.
784
785 2018-09-16 Tom Tromey <tom@tromey.com>
786
787 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
788 metasyntactic variables. Print message if no disassembler options
789 are available.
790
791 2018-09-15 Tom Tromey <tom@tromey.com>
792
793 * infcmd.c (get_inferior_args): Return const char *.
794 * inferior.h (get_inferior_args): Return type now const.
795 * linux-tdep.c (linux_fill_prpsinfo): Update.
796 * procfs.c (procfs_target::make_corefile_notes): Update.
797
798 2018-09-07 Tom Tromey <tom@tromey.com>
799
800 * python/python.c (execute_gdb_command): Call bpstat_do_actions
801 inside the TRY.
802
803 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
804
805 * nios2-tdep.c (nios2_type_align): New.
806 (nios2_gdb_arch_init): Install type_align hook.
807
808 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
809
810 * eval.c (fake_method::fake_method): Call xzalloc directly for a
811 type that is neither object file owned, nor gdbarch owned.
812 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
813 gdbarch is non-NULL.
814 (alloc_type_instance): Allocate non-objfile owned types on the
815 gdbarch obstack.
816 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
817 using TYPE_ALLOC to ensure memory is allocated on the correct
818 obstack.
819 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
820 obstack, or the gdbarch obstack.
821 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
822
823 2018-09-14 Tom Tromey <tom@tromey.com>
824
825 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
826 block.
827
828 2018-09-14 Tom Tromey <tom@tromey.com>
829
830 * nat/fork-inferior.c (get_startup_shell): Remove "static".
831
832 2018-09-13 Tom Tromey <tom@tromey.com>
833
834 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
835 static.
836
837 2018-09-13 Tom Tromey <tom@tromey.com>
838
839 * exec.c (try_open_exec_file): Use std::string.
840
841 2018-09-13 Tom Tromey <tom@tromey.com>
842
843 * utils.h (gdb_bfd_errmsg): Return std::string.
844 * exec.c (exec_file_attach): Update.
845 * compile/compile-object-load.c (compile_object_load): Update.
846 * utils.c (gdb_bfd_errmsg): Return std::string.
847
848 2018-09-13 Tom Tromey <tom@tromey.com>
849
850 * procfs.c (struct procinfo_deleter): New.
851 (procinfo_up): New typedef.
852 (do_destroy_procinfo_cleanup): Remove.
853 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
854
855 2018-09-13 Tom Tromey <tom@tromey.com>
856
857 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
858
859 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
860 2018-09-13 Tom Tromey <tom@tromey.com>
861
862 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
863 (pspy_get_objfiles): New function.
864 (progspace_object_methods): New.
865 (pspace_object_type): Add tp_methods callback.
866 * python/python-internal.h (build_objfiles_list): New
867 declaration.
868 * python/python.c (build_objfiles_list): New function.
869 (gdbpy_objfiles): Implement using build_objfiles_list.
870 * NEWS: Mention the Progspace.objfiles method.
871
872 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
873
874 * python/py-inferior.c (infpy_get_progspace): New function.
875 (inferior_object_getset): Add progspace property.
876 * NEWS: Mention the new property.
877
878 2018-09-13 Tom Tromey <tom@tromey.com>
879
880 PR rust/23650:
881 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
882
883 2018-09-13 Tom Tromey <tom@tromey.com>
884
885 PR rust/23626:
886 * rust-lang.c (rust_enum_variant): Now static.
887 (rust_empty_enum_p): New function.
888 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
889 Handle empty enum.
890
891 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
892
893 * python/py-inferior.c (infpy_repr): New.
894 (inferior_object_type): Register infpy_repr.
895 * python/py-objfile.c (objfpy_repr): New.
896 (objfile_object_type): Register objfpy_repr.
897
898 2018-09-12 John Baldwin <jhb@FreeBSD.org>
899
900 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
901
902 2018-09-12 John Baldwin <jhb@FreeBSD.org>
903
904 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
905 typo.
906
907 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
908
909 * common/common-utils.c: Don't include '<sys/stat.h>'.
910 (is_regular_file): Move to...
911 * common/filestuff.c (is_regular_file): ... here.
912 * common/common-utils.h (is_regular_file): Move to...
913 * common/filestuff.h (is_regular_file): ... here.
914
915 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
916
917 * skip.c (debug_skip): New variable.
918 (skiplist_entry::do_skip_file_p): Add debug output.
919 (skiplist_entry::do_skip_gfile_p): Likewise.
920 (skiplist_entry::skip_function_p): Likewise.
921 (_initialize_step_skip): Create debug command.
922 * NEWS: Mention set/show debug skip.
923
924 2018-09-11 Xavier Roirand <roirand@adacore.com>
925
926 * darwin-nat.c (should_disable_startup_with_shell):
927 New function.
928 (darwin_nat_target::create_inferior): Add call.
929
930 2018-09-11 Xavier Roirand <roirand@adacore.com>
931
932 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
933 inf_port, msg_state>: Initialize.
934 (struct darwin_thread_info) <signaled, single_step>: Change
935 type and initialize.
936 (struct darwin_thread_info) <event>: Initialize.
937
938 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
939
940 PR gdb/23555
941 PR gdb/23558
942 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
943 guesses.
944
945 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
946
947 Revert:
948 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
949
950 PR gdb/23555
951 PR gdb/23558
952 * gnulib/aclocal.m4: Regenerate.
953 * gnulib/config.in: Regenerate.
954 * gnulib/configure: Regenerate.
955 * gnulib/import/Makefile.am: Update.
956 * gnulib/import/Makefile.in: Update.
957 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
958 * gnulib/import/_Noreturn.h: ... this.
959 * gnulib/import/alloca.in.h: Update.
960 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
961 * gnulib/import/arg-nonnull.h: ... this.
962 * gnulib/import/assure.h: Update.
963 * gnulib/import/at-func.c: Update.
964 * gnulib/import/basename-lgpl.c: Update.
965 * gnulib/import/extra/snippet/c++defs.h: Rename to...
966 * gnulib/import/c++defs.h: ... this.
967 * gnulib/import/canonicalize-lgpl.c: Update.
968 * gnulib/import/cdefs.h: Update.
969 * gnulib/import/chdir-long.c: Update.
970 * gnulib/import/chdir-long.h: Update.
971 * gnulib/import/cloexec.c: Update.
972 * gnulib/import/cloexec.h: Update.
973 * gnulib/import/close.c: Update.
974 * gnulib/import/closedir.c: Update.
975 * gnulib/import/config.charset: Update.
976 * gnulib/import/dirent-private.h: Update.
977 * gnulib/import/dirent.in.h: Update.
978 * gnulib/import/dirfd.c: Update.
979 * gnulib/import/dirname-lgpl.c: Update.
980 * gnulib/import/dirname.h: Update.
981 * gnulib/import/dosname.h: Update.
982 * gnulib/import/dup-safer-flag.c: Update.
983 * gnulib/import/dup-safer.c: Update.
984 * gnulib/import/dup.c: Update.
985 * gnulib/import/dup2.c: Update.
986 * gnulib/import/errno.in.h: Update.
987 * gnulib/import/error.c: Update.
988 * gnulib/import/error.h: Update.
989 * gnulib/import/exitfail.c: Update.
990 * gnulib/import/exitfail.h: Update.
991 * gnulib/import/extra/update-copyright: Update.
992 * gnulib/import/fchdir.c: Update.
993 * gnulib/import/fcntl.c: Update.
994 * gnulib/import/fcntl.in.h: Update.
995 * gnulib/import/fd-hook.c: Update.
996 * gnulib/import/fd-hook.h: Update.
997 * gnulib/import/fd-safer-flag.c: Update.
998 * gnulib/import/fd-safer.c: Update.
999 * gnulib/import/fdopendir.c: Update.
1000 * gnulib/import/filename.h: Update.
1001 * gnulib/import/filenamecat-lgpl.c: Update.
1002 * gnulib/import/filenamecat.h: Update.
1003 * gnulib/import/flexmember.h: Update.
1004 * gnulib/import/float+.h: Update.
1005 * gnulib/import/float.c: Update.
1006 * gnulib/import/float.in.h: Update.
1007 * gnulib/import/fnmatch.c: Update.
1008 * gnulib/import/fnmatch.in.h: Update.
1009 * gnulib/import/fnmatch_loop.c: Update.
1010 * gnulib/import/fpucw.h: Update.
1011 * gnulib/import/frexp.c: Update.
1012 * gnulib/import/frexpl.c: Update.
1013 * gnulib/import/fstat.c: Update.
1014 * gnulib/import/fstatat.c: Update.
1015 * gnulib/import/getcwd-lgpl.c: Update.
1016 * gnulib/import/getcwd.c: Update.
1017 * gnulib/import/getdtablesize.c: Update.
1018 * gnulib/import/getlogin_r.c: Update.
1019 * gnulib/import/getprogname.c: Update.
1020 * gnulib/import/getprogname.h: Update.
1021 * gnulib/import/gettext.h: Update.
1022 * gnulib/import/gettimeofday.c: Update.
1023 * gnulib/import/glob-libc.h: Update.
1024 * gnulib/import/glob.c: Update.
1025 * gnulib/import/glob.in.h: Update.
1026 * gnulib/import/glob_internal.h: Update.
1027 * gnulib/import/glob_pattern_p.c: Update.
1028 * gnulib/import/globfree.c: Update.
1029 * gnulib/import/hard-locale.c: Update.
1030 * gnulib/import/hard-locale.h: Update.
1031 * gnulib/import/intprops.h: Update.
1032 * gnulib/import/inttypes.in.h: Update.
1033 * gnulib/import/isnan.c: Update.
1034 * gnulib/import/isnand-nolibm.h: Update.
1035 * gnulib/import/isnand.c: Update.
1036 * gnulib/import/isnanl-nolibm.h: Update.
1037 * gnulib/import/isnanl.c: Update.
1038 * gnulib/import/itold.c: Update.
1039 * gnulib/import/libc-config.h: Update.
1040 * gnulib/import/limits.in.h: Update.
1041 * gnulib/import/localcharset.c: Update.
1042 * gnulib/import/localcharset.h: Update.
1043 * gnulib/import/localtime-buffer.c: Update.
1044 * gnulib/import/localtime-buffer.h: Update.
1045 * gnulib/import/lstat.c: Update.
1046 * gnulib/import/m4/00gnulib.m4: Update.
1047 * gnulib/import/m4/__inline.m4: Update.
1048 * gnulib/import/m4/absolute-header.m4: Update.
1049 * gnulib/import/m4/alloca.m4: Update.
1050 * gnulib/import/m4/builtin-expect.m4: Update.
1051 * gnulib/import/m4/canonicalize.m4: Update.
1052 * gnulib/import/m4/chdir-long.m4: Update.
1053 * gnulib/import/m4/close.m4: Update.
1054 * gnulib/import/m4/closedir.m4: Update.
1055 * gnulib/import/m4/configmake.m4: Update.
1056 * gnulib/import/m4/d-ino.m4: Update.
1057 * gnulib/import/m4/d-type.m4: Update.
1058 * gnulib/import/m4/dirent_h.m4: Update.
1059 * gnulib/import/m4/dirfd.m4: Update.
1060 * gnulib/import/m4/dirname.m4: Update.
1061 * gnulib/import/m4/double-slash-root.m4: Update.
1062 * gnulib/import/m4/dup.m4: Update.
1063 * gnulib/import/m4/dup2.m4: Update.
1064 * gnulib/import/m4/eealloc.m4: Update.
1065 * gnulib/import/m4/environ.m4: Update.
1066 * gnulib/import/m4/errno_h.m4: Update.
1067 * gnulib/import/m4/error.m4: Update.
1068 * gnulib/import/m4/exponentd.m4: Update.
1069 * gnulib/import/m4/exponentl.m4: Update.
1070 * gnulib/import/m4/extensions.m4: Update.
1071 * gnulib/import/m4/extern-inline.m4: Update.
1072 * gnulib/import/m4/fchdir.m4: Update.
1073 * gnulib/import/m4/fcntl-o.m4: Update.
1074 * gnulib/import/m4/fcntl.m4: Update.
1075 * gnulib/import/m4/fcntl_h.m4: Update.
1076 * gnulib/import/m4/fdopendir.m4: Update.
1077 * gnulib/import/m4/filenamecat.m4: Update.
1078 * gnulib/import/m4/flexmember.m4: Update.
1079 * gnulib/import/m4/float_h.m4: Update.
1080 * gnulib/import/m4/fnmatch.m4: Update.
1081 * gnulib/import/m4/fnmatch_h.m4: Update.
1082 * gnulib/import/m4/fpieee.m4: Update.
1083 * gnulib/import/m4/frexp.m4: Update.
1084 * gnulib/import/m4/frexpl.m4: Update.
1085 * gnulib/import/m4/fstat.m4: Update.
1086 * gnulib/import/m4/fstatat.m4: Update.
1087 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1088 * gnulib/import/m4/getcwd-path-max.m4: Update.
1089 * gnulib/import/m4/getcwd.m4: Update.
1090 * gnulib/import/m4/getdtablesize.m4: Update.
1091 * gnulib/import/m4/getlogin.m4: Update.
1092 * gnulib/import/m4/getlogin_r.m4: Update.
1093 * gnulib/import/m4/getpagesize.m4: Update.
1094 * gnulib/import/m4/getprogname.m4: Update.
1095 * gnulib/import/m4/gettimeofday.m4: Update.
1096 * gnulib/import/m4/glibc21.m4: Update.
1097 * gnulib/import/m4/glob.m4: Update.
1098 * gnulib/import/m4/glob_h.m4: Update.
1099 * gnulib/import/m4/gnulib-cache.m4: Update.
1100 * gnulib/import/m4/gnulib-common.m4: Update.
1101 * gnulib/import/m4/gnulib-comp.m4: Update.
1102 * gnulib/import/m4/gnulib-tool.m4: Update.
1103 * gnulib/import/m4/hard-locale.m4: Update.
1104 * gnulib/import/m4/include_next.m4: Update.
1105 * gnulib/import/m4/inttypes-pri.m4: Update.
1106 * gnulib/import/m4/inttypes.m4: Update.
1107 * gnulib/import/m4/isnand.m4: Update.
1108 * gnulib/import/m4/isnanl.m4: Update.
1109 * gnulib/import/m4/largefile.m4: Update.
1110 * gnulib/import/m4/limits-h.m4: Update.
1111 * gnulib/import/m4/localcharset.m4: Update.
1112 * gnulib/import/m4/locale-fr.m4: Update.
1113 * gnulib/import/m4/locale-ja.m4: Update.
1114 * gnulib/import/m4/locale-zh.m4: Update.
1115 * gnulib/import/m4/localtime-buffer.m4: Update.
1116 * gnulib/import/m4/longlong.m4: Update.
1117 * gnulib/import/m4/lstat.m4: Update.
1118 * gnulib/import/m4/malloc.m4: Update.
1119 * gnulib/import/m4/malloca.m4: Update.
1120 * gnulib/import/m4/math_h.m4: Update.
1121 * gnulib/import/m4/mbrtowc.m4: Update.
1122 * gnulib/import/m4/mbsinit.m4: Update.
1123 * gnulib/import/m4/mbsrtowcs.m4: Update.
1124 * gnulib/import/m4/mbstate_t.m4: Update.
1125 * gnulib/import/m4/memchr.m4: Update.
1126 * gnulib/import/m4/memmem.m4: Update.
1127 * gnulib/import/m4/mempcpy.m4: Update.
1128 * gnulib/import/m4/memrchr.m4: Update.
1129 * gnulib/import/m4/mkdir.m4: Update.
1130 * gnulib/import/m4/mkstemp.m4: Update.
1131 * gnulib/import/m4/mmap-anon.m4: Update.
1132 * gnulib/import/m4/mode_t.m4: Update.
1133 * gnulib/import/m4/msvc-inval.m4: Update.
1134 * gnulib/import/m4/msvc-nothrow.m4: Update.
1135 * gnulib/import/m4/multiarch.m4: Update.
1136 * gnulib/import/m4/nocrash.m4: Update.
1137 * gnulib/import/m4/off_t.m4: Update.
1138 * gnulib/import/m4/onceonly.m4: Update.
1139 * gnulib/import/m4/open-cloexec.m4: Update.
1140 * gnulib/import/m4/open.m4: Update.
1141 * gnulib/import/m4/openat.m4: Update.
1142 * gnulib/import/m4/opendir.m4: Update.
1143 * gnulib/import/m4/pathmax.m4: Update.
1144 * gnulib/import/m4/rawmemchr.m4: Update.
1145 * gnulib/import/m4/readdir.m4: Update.
1146 * gnulib/import/m4/readlink.m4: Update.
1147 * gnulib/import/m4/realloc.m4: Update.
1148 * gnulib/import/m4/rename.m4: Update.
1149 * gnulib/import/m4/rewinddir.m4: Update.
1150 * gnulib/import/m4/rmdir.m4: Update.
1151 * gnulib/import/m4/save-cwd.m4: Update.
1152 * gnulib/import/m4/secure_getenv.m4: Update.
1153 * gnulib/import/m4/setenv.m4: Update.
1154 * gnulib/import/m4/signal_h.m4: Update.
1155 * gnulib/import/m4/ssize_t.m4: Update.
1156 * gnulib/import/m4/stat-time.m4: Update.
1157 * gnulib/import/m4/stat.m4: Update.
1158 * gnulib/import/m4/std-gnu11.m4: Update.
1159 * gnulib/import/m4/stdbool.m4: Update.
1160 * gnulib/import/m4/stddef_h.m4: Update.
1161 * gnulib/import/m4/stdint.m4: Update.
1162 * gnulib/import/m4/stdio_h.m4: Update.
1163 * gnulib/import/m4/stdlib_h.m4: Update.
1164 * gnulib/import/m4/strchrnul.m4: Update.
1165 * gnulib/import/m4/strdup.m4: Update.
1166 * gnulib/import/m4/strerror.m4: Update.
1167 * gnulib/import/m4/string_h.m4: Update.
1168 * gnulib/import/m4/strstr.m4: Update.
1169 * gnulib/import/m4/strtok_r.m4: Update.
1170 * gnulib/import/m4/sys_socket_h.m4: Update.
1171 * gnulib/import/m4/sys_stat_h.m4: Update.
1172 * gnulib/import/m4/sys_time_h.m4: Update.
1173 * gnulib/import/m4/sys_types_h.m4: Update.
1174 * gnulib/import/m4/tempname.m4: Update.
1175 * gnulib/import/m4/time_h.m4: Update.
1176 * gnulib/import/m4/unistd-safer.m4: Update.
1177 * gnulib/import/m4/unistd_h.m4: Update.
1178 * gnulib/import/m4/warn-on-use.m4: Update.
1179 * gnulib/import/m4/wchar_h.m4: Update.
1180 * gnulib/import/m4/wchar_t.m4: Update.
1181 * gnulib/import/m4/wctype_h.m4: Update.
1182 * gnulib/import/m4/wint_t.m4: Update.
1183 * gnulib/import/malloc.c: Update.
1184 * gnulib/import/malloc/scratch_buffer.h: Update.
1185 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1186 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1187 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1188 * gnulib/import/malloca.c: Update.
1189 * gnulib/import/malloca.h: Update.
1190 * gnulib/import/malloca.valgrind: Update.
1191 * gnulib/import/math.in.h: Update.
1192 * gnulib/import/mbrtowc.c: Update.
1193 * gnulib/import/mbsinit.c: Update.
1194 * gnulib/import/mbsrtowcs-impl.h: Update.
1195 * gnulib/import/mbsrtowcs-state.c: Update.
1196 * gnulib/import/mbsrtowcs.c: Update.
1197 * gnulib/import/memchr.c: Update.
1198 * gnulib/import/memmem.c: Update.
1199 * gnulib/import/mempcpy.c: Update.
1200 * gnulib/import/memrchr.c: Update.
1201 * gnulib/import/mkdir.c: Update.
1202 * gnulib/import/mkstemp.c: Update.
1203 * gnulib/import/msvc-inval.c: Update.
1204 * gnulib/import/msvc-inval.h: Update.
1205 * gnulib/import/msvc-nothrow.c: Update.
1206 * gnulib/import/msvc-nothrow.h: Update.
1207 * gnulib/import/open.c: Update.
1208 * gnulib/import/openat-die.c: Update.
1209 * gnulib/import/openat-priv.h: Update.
1210 * gnulib/import/openat-proc.c: Update.
1211 * gnulib/import/openat.c: Update.
1212 * gnulib/import/openat.h: Update.
1213 * gnulib/import/opendir.c: Update.
1214 * gnulib/import/pathmax.h: Update.
1215 * gnulib/import/pipe-safer.c: Update.
1216 * gnulib/import/rawmemchr.c: Update.
1217 * gnulib/import/readdir.c: Update.
1218 * gnulib/import/readlink.c: Update.
1219 * gnulib/import/realloc.c: Update.
1220 * gnulib/import/ref-add.sin: Update.
1221 * gnulib/import/ref-del.sin: Update.
1222 * gnulib/import/rename.c: Update.
1223 * gnulib/import/rewinddir.c: Update.
1224 * gnulib/import/rmdir.c: Update.
1225 * gnulib/import/same-inode.h: Update.
1226 * gnulib/import/save-cwd.c: Update.
1227 * gnulib/import/save-cwd.h: Update.
1228 * gnulib/import/scratch_buffer.h: Update.
1229 * gnulib/import/secure_getenv.c: Update.
1230 * gnulib/import/setenv.c: Update.
1231 * gnulib/import/signal.in.h: Update.
1232 * gnulib/import/stat-time.c: Update.
1233 * gnulib/import/stat-time.h: Update.
1234 * gnulib/import/stat-w32.c: Update.
1235 * gnulib/import/stat-w32.h: Update.
1236 * gnulib/import/stat.c: Update.
1237 * gnulib/import/stdbool.in.h: Update.
1238 * gnulib/import/stddef.in.h: Update.
1239 * gnulib/import/stdint.in.h: Update.
1240 * gnulib/import/stdio.in.h: Update.
1241 * gnulib/import/stdlib.in.h: Update.
1242 * gnulib/import/str-two-way.h: Update.
1243 * gnulib/import/strchrnul.c: Update.
1244 * gnulib/import/strdup.c: Update.
1245 * gnulib/import/streq.h: Update.
1246 * gnulib/import/strerror-override.c: Update.
1247 * gnulib/import/strerror-override.h: Update.
1248 * gnulib/import/strerror.c: Update.
1249 * gnulib/import/string.in.h: Update.
1250 * gnulib/import/stripslash.c: Update.
1251 * gnulib/import/strnlen1.c: Update.
1252 * gnulib/import/strnlen1.h: Update.
1253 * gnulib/import/strstr.c: Update.
1254 * gnulib/import/strtok_r.c: Update.
1255 * gnulib/import/sys_stat.in.h: Update.
1256 * gnulib/import/sys_time.in.h: Update.
1257 * gnulib/import/sys_types.in.h: Update.
1258 * gnulib/import/tempname.c: Update.
1259 * gnulib/import/tempname.h: Update.
1260 * gnulib/import/time.in.h: Update.
1261 * gnulib/import/unistd--.h: Update.
1262 * gnulib/import/unistd-safer.h: Update.
1263 * gnulib/import/unistd.in.h: Update.
1264 * gnulib/import/unsetenv.c: Update.
1265 * gnulib/import/verify.h: Update.
1266 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1267 * gnulib/import/wchar.in.h: Update.
1268 * gnulib/import/wctype.in.h: Update.
1269 * gnulib/import/xalloc-oversized.h: Update.
1270 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1271 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1272
1273 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1274
1275 * record-btrace.c (get_thread_current_frame): Remove
1276 old_inferior_ptid.
1277
1278 2018-09-10 Jerome Guitton <guitton@adacore.com>
1279
1280 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1281 with check_tag to 1 if and only if the type is tagged and the
1282 component being searched cannot been found in the current
1283 view. Otherwise, always call ada_to_fixed_type with
1284 check_tag to 0.
1285
1286 2018-09-10 Xavier Roirand <roirand@adacore.com>
1287
1288 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1289 declaration.
1290 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1291 * ada-varobj.c (ada_varobj_get_number_of_children,
1292 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1293
1294 2018-09-10 Xavier Roirand <roirand@adacore.com>
1295
1296 * ada-valprint.c (ada_value_print): Use type instead of
1297 enclosing type.
1298
1299 2018-09-10 Xavier Roirand <roirand@adacore.com>
1300
1301 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1302 an array of access to unconstrained array.
1303
1304 2018-09-10 Xavier Roirand <roirand@adacore.com>
1305
1306 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1307 (ada_check_typedef): Use it.
1308
1309 2018-09-10 Xavier Roirand <roirand@adacore.com>
1310
1311 * ada-varobj.c (ada_varobj_describe_struct_child)
1312 (ada_varobj_describe_child): Handle union case like struct one.
1313
1314 2018-09-10 Tom Tromey <tom@tromey.com>
1315
1316 PR python/18380:
1317 * python/python.c (_initialize_python): Make example in "python"
1318 help work in Python 3.
1319
1320 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1321
1322 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1323 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1324 $(EXEEXT) to the script, as it is not a program.
1325
1326 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1327
1328 * python/py-prettyprint.c (pretty_print_one_value): Return
1329 gdbpy_ref<>.
1330 (print_string_repr): Adjust.
1331 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1332 * python/python-internal.h (apply_varobj_pretty_printer): Return
1333 gdbpy_ref<>.
1334 * varobj.c (varobj_value_get_print_value): Adjust.
1335
1336 2018-09-08 Tom Tromey <tom@tromey.com>
1337
1338 PR python/16047:
1339 * python/py-prettyprint.c (pretty_print_one_value): Check for
1340 to_string method.
1341
1342 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1343
1344 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1345 replace_operator_with_call.
1346
1347 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1348
1349 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1350
1351 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1352
1353 * ada-typeprint.c (print_range): Print the bounds using TYPE
1354 rather than its TYPE_TARGET_TYPE.
1355
1356 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1357
1358 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1359 call to ada_to_fixed_value_create.
1360
1361 2018-09-08 Jerome Guitton <guitton@adacore.com>
1362
1363 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1364
1365 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1366
1367 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1368 by calls to error.
1369
1370 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1371
1372 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1373 Move update of loop variable "fi".
1374
1375 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1376
1377 * ada-lang.c (value_assign_to_component): In the case of
1378 big-endian targets, extract the bits of the given VAL
1379 using an src_offset of zero if container is not a scalar.
1380
1381 2018-09-06 Simon Ser <contact@emersion.fr>
1382
1383 PR gdb/23105
1384 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1385 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1386 * fbsd-tdep.c (fbsd_make_note_desc): New.
1387 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1388 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1389 * target.h (enum target_object) Add FreeBSD-specific
1390 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1391
1392 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1393
1394 * compile/compile-c.h (generate_c_for_variable_locations):
1395 Change reference to pointer.
1396 * compile/compile-c-support.c (compile_program) <compute>:
1397 Likewise.
1398 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1399 (generate_c_for_for_one_variable): Likewise
1400 (generate_c_for_variable_locations): Likewise
1401 * compile/compile-c-types.c (compile_c_instance::convert_type):
1402 Likewise
1403 * compile/compile-cplus-symbols.c (convert_one_symbol):
1404 std::move the scope passed to enter_scope.
1405 * compile/compile-cplus-types.c
1406 (compile_cplus_instance::enter_scope): Make parameter
1407 rvalue-reference.
1408 (compile_cplus_instance::new_scope): Change reference to
1409 pointer.
1410 (compile_cplus_instance::convert_type): Likewise
1411 (compile_cplus_convert_typedef): std::move the scope passed to
1412 enter_scope.
1413 (compile_cplus_convert_struct_or_union): Likewise.
1414 (compile_cplus_convert_enum): Likewise.
1415 (compile_cplus_convert_namespace): Likewise.
1416 * compile/compile-cplus.h (compile_cplus_instance)
1417 <enter_scope>: Make parameter rvalue-reference.
1418 * compile/compile-internal.h (compile_instance)
1419 <get_cached_type>: Likewise
1420 * compile/compile-loc2c.c (push): Likewise
1421 (pushf): Likewise
1422 (unary): Likewise
1423 (binary): Likewise
1424 (print_label): Likewise
1425 (pushf_register_address): Likewise
1426 (pushf_register): Likewise
1427 (do_compile_dwarf_expr_to_c): Likewise
1428 (compile_dwarf_expr_to_c): Likewise
1429 (compile_dwarf_bounds_to_c): Likewise
1430 * compile/compile.c (compile_instance::get_cached_type):
1431 Likewise
1432 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1433 (compile_dwarf_bounds_to_c): Likewise
1434 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1435 (dwarf2_compile_property_to_c): Likewise
1436 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1437 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1438 Likewise
1439
1440 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1443 * tui/tui-data.c (init_content_element): Don't initialize it.
1444
1445 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1446
1447 * tui/tui-data.h (struct tui_win_info)
1448 <detail::opaque>: Remove.
1449 * tui/tui-data.c (init_win_info): Remove assignment.
1450
1451 2018-09-05 Tom Tromey <tom@tromey.com>
1452
1453 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1454 -Wformat-nonliteral.
1455 * target-float.c (host_float_ops<T>::to_string)
1456 (host_float_ops<T>::from_string): Use
1457 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1458 * configure: Rebuild.
1459
1460 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1461
1462 * printcmd.c (printf_c_string): Use
1463 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1464 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1465
1466 2018-09-05 Tom Tromey <tom@tromey.com>
1467
1468 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1469
1470 2018-09-05 Tom de Vries <tdevries@suse.de>
1471
1472 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1473 with resolve_abstract_p == true.
1474 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1475 defaulting to false. Propagate resolve_abstract_p to
1476 dwarf2_fetch_die_loc_sect_off.
1477 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1478 parameter, defaulting to false.
1479 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1480 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1481 parameter.
1482 * dwarf2read.h (struct die_info): Forward-declare.
1483 (die_info_ptr): New typedef.
1484 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1485
1486 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1487
1488 GDB 8.2 released.
1489
1490 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1491 Pedro Alves <palves@redhat.com>
1492
1493 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1494 "aclocal-m4-deps.mk". Include file here.
1495 $(srcdir)/aclocal.m4: Add "configure.ac".
1496 * gnulib/aclocal-m4-deps.mk: New file.
1497 * gnulib/update-gnulib.sh: Automatically update
1498 "aclocal-m4-deps.mk".
1499
1500 2018-09-04 Tom Tromey <tom@tromey.com>
1501
1502 * configure: Rebuild.
1503 * configure.ac: Remove multi-ice code.
1504
1505 2018-09-04 Tom Tromey <tom@tromey.com>
1506
1507 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1508 (ada-exp.o): Update.
1509
1510 2018-09-04 Tom Tromey <tom@tromey.com>
1511
1512 * Makefile.in (printcmd.o, target-float.o): Remove.
1513 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1514
1515 2018-09-04 Tom Tromey <tom@tromey.com>
1516
1517 * gnulib/Makefile.in: Remove obsolete comment.
1518 * Makefile.in: Remove obsolete comment.
1519
1520 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1521
1522 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1523 line with '+'.
1524
1525 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1526
1527 * riscv-tdep.c: Add 'prologue-value.h' include.
1528 (struct riscv_unwind_cache): New struct.
1529 (riscv_debug_unwinder): New global.
1530 (riscv_scan_prologue): Update arguments, capture register details
1531 from prologue scan.
1532 (riscv_skip_prologue): Reformat arguments line, move end of
1533 prologue calculation into riscv_scan_prologue.
1534 (riscv_frame_cache): Update return type, create
1535 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1536 details.
1537 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1538 (riscv_frame_prev_register): Use the trad_frame within the
1539 riscv_unwind_cache.
1540 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1541 flag.
1542
1543 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1544
1545 * trad-frame.h (trad_frame_set_realreg): Declare.
1546 (trad_frame_set_addr): Declare.
1547 * trad-frame.c (trad_frame_set_realreg): Define new function.
1548 (trad_frame_set_addr): Define new function.
1549 (trad_frame_set_reg_realreg): Use new function.
1550 (trad_frame_set_reg_addr): Use new function.
1551
1552 2018-09-01 Keith Seitz <keiths@redhat.com>
1553
1554 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1555 pulongest instead of "%lld".
1556 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1557 ATTRIBUTE_UNUSED.
1558
1559 2018-08-31 Tom Tromey <tom@tromey.com>
1560
1561 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1562 variant part type.
1563
1564 2018-08-31 Pedro Alves <palves@redhat.com>
1565
1566 * gdbarch.h: Regenerate.
1567
1568 2018-08-31 Pedro Alves <palves@redhat.com>
1569
1570 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1571 * target.h (Hardware watchpoint interfaces): Describe
1572 continuable/steppable/non-steppable watchpoints.
1573 * gdbarch.h, gdbarch.c: Regenerate.
1574
1575 2018-08-31 Pedro Alves <palves@redhat.com>
1576
1577 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1578 Delete.
1579 * s390-linux-nat.c
1580 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1581 * target.h (target_ops::have_continuable_watchpoint): Delete.
1582 (target_have_continuable_watchpoint): Delete.
1583 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1584 * target-delegates.c: Regenerate.
1585
1586 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1587
1588 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1589 the files present in "gnulib/import/m4/".
1590
1591 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1592
1593 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1594 c.sw, c.swsp, and c.sdsp.
1595
1596 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1597
1598 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1599 (riscv_read_misa_reg): Don't cache value read into inferior data.
1600 (riscv_new_inferior_data): Delete.
1601 (riscv_inferior_data_cleanup): Delete.
1602 (riscv_inferior_data): Delete.
1603 (riscv_invalidate_inferior_data): Delete.
1604 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1605
1606 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1607
1608 * compile/compile-cplus-types.c
1609 (compile_cplus_instance::leave_scope): Take the address of scope
1610 object.
1611 (compile_cplus_instance::convert_qualified_base): Compare quals
1612 to 0.
1613
1614 2018-08-30 Keith Seitz <keiths@redhat.com>
1615
1616 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1617 Use "%s" and host_address_to_string instead of "%p" in printf.
1618
1619 2018-08-29 Keith Seitz <keiths@redhat.com>
1620
1621 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1622 and compile-cplus-types.c.
1623 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1624 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1625 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1626 Declare.
1627 * compile/compile-c-support.c: Include compile-cplus.h.
1628 (load_libcompile): Templatize.
1629 (get_compile_context): "New" function.
1630 (c_get_compile_context): Use get_compile_context.
1631 (cplus_get_compile_context): New function.
1632 (cplus_push_user_expression, cplus_pop_user_expression)
1633 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1634 (cplus_compute_program): Define new structs/functions.
1635 * compile/compile-cplus-symmbols.c: New file.
1636 * compile/compile-cplus-types.c: New file.
1637 * compile/compile-cplus.h: New file.
1638 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1639 Declare.
1640 * compile/compile-object-load.c (get_out_value_type): Use
1641 strncmp_iw when comparing symbol names.
1642 (compile_object_load): Add mst_bss and mst_data.
1643 * compile/compile.c (_initialize_compile): Remove
1644 -Wno-implicit-function-declaration from `compile_args'.
1645 * compile/gcc-cp-plugin.h: New file.
1646 * NEWS: Mention C++ compile support and new debug options.
1647
1648 2018-08-29 Keith Seitz <keiths@redhat.com>
1649
1650 * linespec.c (collect_info::add_symbol): Make virtual.
1651 (struct symbol_searcher_collect_info): New struct.
1652 (symbol_searcher::find_all_symbols): New method.
1653 * symtab.h (class symbol_searcher): New class.
1654
1655 2018-08-29 Keith Seitz <keiths@redhat.com>
1656
1657 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1658 Change to vector of block_symbol. Update all users.
1659 (struct collect_info) <symbols>: Likewise.
1660 (collect_info::add_symbol): Take block_symbol as argument.
1661 Update all callers.
1662 (decode_compound_collector) <m_symbols>: Change type to vector
1663 of block_symbol. Update all users.
1664 (decode_compound_collector::operator ()): Change parameter type
1665 to block_symbol.
1666 (find_method, find_function_symbols, find_linespec_symbols)
1667 (find_label_symbols_in_block, find_label_symbols): Change symbol
1668 vectors to block_symbol vectors.
1669 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1670 block_symbol.
1671
1672 2018-08-29 Keith Seitz <keiths@redhat.com>
1673
1674 * linespec.c (symbolp): Remove typedef and VEC definitions.
1675 (bound_minimal_symbol_d): Likewise.
1676
1677 2018-08-29 Keith Seitz <keiths@redhat.com>
1678
1679 * linespec.c (decode_compound_collector::decode_compound_collector):
1680 Remove initialization for `m_symtabs'.
1681 (decode_compound_collector::release_symbols): Change return type
1682 to std::vector. Update all callers.
1683 (class decode_compound_collector) <m_symbols>: Change type to
1684 std::vector.
1685 (lookup_prefix_sym): Change return type to std::vector. Update all
1686 callers.
1687 (compare_symbols): Remove.
1688 (std_compare_symbols): Rename to `compare_symbols'.
1689 (find_method): Change `sym_classes' parameter to std::vector.
1690 Update all callers. Use std::sort to sort sym_classes.
1691 (find_linespec_symbols): Remove cleanup.
1692
1693 2018-08-29 Keith Seitz <keiths@redhat.com>
1694
1695 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1696 std::vector. Update all users.
1697 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1698 (struct collect_info) <minimal_symbols>: Likewise.
1699 (compare_msymbols): Return bool. Change parameters to const
1700 bound_minimal_symbol references.
1701 (find_method, find_function_symbols, find_linespec_symbols): Change
1702 `minsyms' parameter to std::vector. Update all callers.
1703
1704 2018-08-29 Keith Seitz <keiths@redhat.com>
1705
1706 * linespec.c (struct linespec) <label_symbols>: Change type to
1707 std::vector. Update all users.
1708 (find_label_symbols_in_block): Change `result' parameter to
1709 std::vector. Update all callers.
1710 (find_label_symbols): Return std::vector. Update all callers.
1711
1712 2018-08-29 Keith Seitz <keiths@redhat.com>
1713
1714 * linespec.c (struct linespec) <function_symbols>: Change type to
1715 std::vector. Update all users.
1716 (struct collect_info) <function_symbols>: Likewise.
1717 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1718 (std_compare_symbols): New function.
1719 (find_method, find_function_symbols, find_linespec_symbols)
1720 (find_label_symbols_in_block): Change `symbols' parameter to
1721 std::vector. Update all callers.
1722 (find_label_symbols): Likewise for `function_symbols' and
1723 `label_funcs_ret'.
1724
1725 2018-08-29 Keith Seitz <keiths@redhat.com>
1726
1727 * linespec.c (symtab_vector_up): Define.
1728 (struct linespec) <file_symtabs>: Change type to std::vector *.
1729 Update all uses.
1730 (struct collect_info) <file_symtabs>: Likewise.
1731 (collect_symtabs_from_filename): Return symtab_vector_up.
1732 Update all callers.
1733 (decode_objc): Remove cleanup.
1734 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1735 (symtab_collector::release_symtabs): Return symtab_vector_up.
1736 Update all callers.
1737 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1738 Update all users.
1739 (collect_symtabs_from_filename, symtabs_from_filename): Return
1740 symtab_vector_up. Update all callers.
1741
1742 2018-08-29 Tom Tromey <tom@tromey.com>
1743
1744 * csky-tdep.c (csky_analyze_prologue): Use
1745 core_addr_to_string_nz.
1746
1747 2018-08-29 Tom Tromey <tom@tromey.com>
1748
1749 * windows-nat.c (struct xlate_exception) <them>: Change type to
1750 DWORD.
1751 (xlate): Fix formatting. Remove last entry.
1752 (struct xlate_exception, xlate): Comment out.
1753 (windows_nat_target::resume): Use ranged for.
1754
1755 2018-08-29 Jim Wilson <jimw@sifive.com>
1756
1757 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1758 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1759 of NT_PRFPREG.
1760 (riscv_linux_nat_target::store_registers): Likewise.
1761
1762 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1763
1764 PR gdb/23555
1765 PR gdb/23558
1766 * gnulib/aclocal.m4: Regenerate.
1767 * gnulib/config.in: Regenerate.
1768 * gnulib/configure: Regenerate.
1769 * gnulib/import/Makefile.am: Update.
1770 * gnulib/import/Makefile.in: Update.
1771 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1772 * gnulib/import/_Noreturn.h: ... this.
1773 * gnulib/import/alloca.in.h: Update.
1774 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1775 * gnulib/import/arg-nonnull.h: ... this.
1776 * gnulib/import/assure.h: Update.
1777 * gnulib/import/at-func.c: Update.
1778 * gnulib/import/basename-lgpl.c: Update.
1779 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1780 * gnulib/import/c++defs.h: ... this.
1781 * gnulib/import/canonicalize-lgpl.c: Update.
1782 * gnulib/import/cdefs.h: Update.
1783 * gnulib/import/chdir-long.c: Update.
1784 * gnulib/import/chdir-long.h: Update.
1785 * gnulib/import/cloexec.c: Update.
1786 * gnulib/import/cloexec.h: Update.
1787 * gnulib/import/close.c: Update.
1788 * gnulib/import/closedir.c: Update.
1789 * gnulib/import/config.charset: Update.
1790 * gnulib/import/dirent-private.h: Update.
1791 * gnulib/import/dirent.in.h: Update.
1792 * gnulib/import/dirfd.c: Update.
1793 * gnulib/import/dirname-lgpl.c: Update.
1794 * gnulib/import/dirname.h: Update.
1795 * gnulib/import/dosname.h: Update.
1796 * gnulib/import/dup-safer-flag.c: Update.
1797 * gnulib/import/dup-safer.c: Update.
1798 * gnulib/import/dup.c: Update.
1799 * gnulib/import/dup2.c: Update.
1800 * gnulib/import/errno.in.h: Update.
1801 * gnulib/import/error.c: Update.
1802 * gnulib/import/error.h: Update.
1803 * gnulib/import/exitfail.c: Update.
1804 * gnulib/import/exitfail.h: Update.
1805 * gnulib/import/extra/update-copyright: Update.
1806 * gnulib/import/fchdir.c: Update.
1807 * gnulib/import/fcntl.c: Update.
1808 * gnulib/import/fcntl.in.h: Update.
1809 * gnulib/import/fd-hook.c: Update.
1810 * gnulib/import/fd-hook.h: Update.
1811 * gnulib/import/fd-safer-flag.c: Update.
1812 * gnulib/import/fd-safer.c: Update.
1813 * gnulib/import/fdopendir.c: Update.
1814 * gnulib/import/filename.h: Update.
1815 * gnulib/import/filenamecat-lgpl.c: Update.
1816 * gnulib/import/filenamecat.h: Update.
1817 * gnulib/import/flexmember.h: Update.
1818 * gnulib/import/float+.h: Update.
1819 * gnulib/import/float.c: Update.
1820 * gnulib/import/float.in.h: Update.
1821 * gnulib/import/fnmatch.c: Update.
1822 * gnulib/import/fnmatch.in.h: Update.
1823 * gnulib/import/fnmatch_loop.c: Update.
1824 * gnulib/import/fpucw.h: Update.
1825 * gnulib/import/frexp.c: Update.
1826 * gnulib/import/frexpl.c: Update.
1827 * gnulib/import/fstat.c: Update.
1828 * gnulib/import/fstatat.c: Update.
1829 * gnulib/import/getcwd-lgpl.c: Update.
1830 * gnulib/import/getcwd.c: Update.
1831 * gnulib/import/getdtablesize.c: Update.
1832 * gnulib/import/getlogin_r.c: Update.
1833 * gnulib/import/getprogname.c: Update.
1834 * gnulib/import/getprogname.h: Update.
1835 * gnulib/import/gettext.h: Update.
1836 * gnulib/import/gettimeofday.c: Update.
1837 * gnulib/import/glob-libc.h: Update.
1838 * gnulib/import/glob.c: Update.
1839 * gnulib/import/glob.in.h: Update.
1840 * gnulib/import/glob_internal.h: Update.
1841 * gnulib/import/glob_pattern_p.c: Update.
1842 * gnulib/import/globfree.c: Update.
1843 * gnulib/import/hard-locale.c: Update.
1844 * gnulib/import/hard-locale.h: Update.
1845 * gnulib/import/intprops.h: Update.
1846 * gnulib/import/inttypes.in.h: Update.
1847 * gnulib/import/isnan.c: Update.
1848 * gnulib/import/isnand-nolibm.h: Update.
1849 * gnulib/import/isnand.c: Update.
1850 * gnulib/import/isnanl-nolibm.h: Update.
1851 * gnulib/import/isnanl.c: Update.
1852 * gnulib/import/itold.c: Update.
1853 * gnulib/import/libc-config.h: Update.
1854 * gnulib/import/limits.in.h: Update.
1855 * gnulib/import/localcharset.c: Update.
1856 * gnulib/import/localcharset.h: Update.
1857 * gnulib/import/localtime-buffer.c: Update.
1858 * gnulib/import/localtime-buffer.h: Update.
1859 * gnulib/import/lstat.c: Update.
1860 * gnulib/import/m4/00gnulib.m4: Update.
1861 * gnulib/import/m4/__inline.m4: Update.
1862 * gnulib/import/m4/absolute-header.m4: Update.
1863 * gnulib/import/m4/alloca.m4: Update.
1864 * gnulib/import/m4/builtin-expect.m4: Update.
1865 * gnulib/import/m4/canonicalize.m4: Update.
1866 * gnulib/import/m4/chdir-long.m4: Update.
1867 * gnulib/import/m4/close.m4: Update.
1868 * gnulib/import/m4/closedir.m4: Update.
1869 * gnulib/import/m4/configmake.m4: Update.
1870 * gnulib/import/m4/d-ino.m4: Update.
1871 * gnulib/import/m4/d-type.m4: Update.
1872 * gnulib/import/m4/dirent_h.m4: Update.
1873 * gnulib/import/m4/dirfd.m4: Update.
1874 * gnulib/import/m4/dirname.m4: Update.
1875 * gnulib/import/m4/double-slash-root.m4: Update.
1876 * gnulib/import/m4/dup.m4: Update.
1877 * gnulib/import/m4/dup2.m4: Update.
1878 * gnulib/import/m4/eealloc.m4: Update.
1879 * gnulib/import/m4/environ.m4: Update.
1880 * gnulib/import/m4/errno_h.m4: Update.
1881 * gnulib/import/m4/error.m4: Update.
1882 * gnulib/import/m4/exponentd.m4: Update.
1883 * gnulib/import/m4/exponentl.m4: Update.
1884 * gnulib/import/m4/extensions.m4: Update.
1885 * gnulib/import/m4/extern-inline.m4: Update.
1886 * gnulib/import/m4/fchdir.m4: Update.
1887 * gnulib/import/m4/fcntl-o.m4: Update.
1888 * gnulib/import/m4/fcntl.m4: Update.
1889 * gnulib/import/m4/fcntl_h.m4: Update.
1890 * gnulib/import/m4/fdopendir.m4: Update.
1891 * gnulib/import/m4/filenamecat.m4: Update.
1892 * gnulib/import/m4/flexmember.m4: Update.
1893 * gnulib/import/m4/float_h.m4: Update.
1894 * gnulib/import/m4/fnmatch.m4: Update.
1895 * gnulib/import/m4/fnmatch_h.m4: Update.
1896 * gnulib/import/m4/fpieee.m4: Update.
1897 * gnulib/import/m4/frexp.m4: Update.
1898 * gnulib/import/m4/frexpl.m4: Update.
1899 * gnulib/import/m4/fstat.m4: Update.
1900 * gnulib/import/m4/fstatat.m4: Update.
1901 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1902 * gnulib/import/m4/getcwd-path-max.m4: Update.
1903 * gnulib/import/m4/getcwd.m4: Update.
1904 * gnulib/import/m4/getdtablesize.m4: Update.
1905 * gnulib/import/m4/getlogin.m4: Update.
1906 * gnulib/import/m4/getlogin_r.m4: Update.
1907 * gnulib/import/m4/getpagesize.m4: Update.
1908 * gnulib/import/m4/getprogname.m4: Update.
1909 * gnulib/import/m4/gettimeofday.m4: Update.
1910 * gnulib/import/m4/glibc21.m4: Update.
1911 * gnulib/import/m4/glob.m4: Update.
1912 * gnulib/import/m4/glob_h.m4: Update.
1913 * gnulib/import/m4/gnulib-cache.m4: Update.
1914 * gnulib/import/m4/gnulib-common.m4: Update.
1915 * gnulib/import/m4/gnulib-comp.m4: Update.
1916 * gnulib/import/m4/gnulib-tool.m4: Update.
1917 * gnulib/import/m4/hard-locale.m4: Update.
1918 * gnulib/import/m4/include_next.m4: Update.
1919 * gnulib/import/m4/inttypes-pri.m4: Update.
1920 * gnulib/import/m4/inttypes.m4: Update.
1921 * gnulib/import/m4/isnand.m4: Update.
1922 * gnulib/import/m4/isnanl.m4: Update.
1923 * gnulib/import/m4/largefile.m4: Update.
1924 * gnulib/import/m4/limits-h.m4: Update.
1925 * gnulib/import/m4/localcharset.m4: Update.
1926 * gnulib/import/m4/locale-fr.m4: Update.
1927 * gnulib/import/m4/locale-ja.m4: Update.
1928 * gnulib/import/m4/locale-zh.m4: Update.
1929 * gnulib/import/m4/localtime-buffer.m4: Update.
1930 * gnulib/import/m4/longlong.m4: Update.
1931 * gnulib/import/m4/lstat.m4: Update.
1932 * gnulib/import/m4/malloc.m4: Update.
1933 * gnulib/import/m4/malloca.m4: Update.
1934 * gnulib/import/m4/math_h.m4: Update.
1935 * gnulib/import/m4/mbrtowc.m4: Update.
1936 * gnulib/import/m4/mbsinit.m4: Update.
1937 * gnulib/import/m4/mbsrtowcs.m4: Update.
1938 * gnulib/import/m4/mbstate_t.m4: Update.
1939 * gnulib/import/m4/memchr.m4: Update.
1940 * gnulib/import/m4/memmem.m4: Update.
1941 * gnulib/import/m4/mempcpy.m4: Update.
1942 * gnulib/import/m4/memrchr.m4: Update.
1943 * gnulib/import/m4/mkdir.m4: Update.
1944 * gnulib/import/m4/mkstemp.m4: Update.
1945 * gnulib/import/m4/mmap-anon.m4: Update.
1946 * gnulib/import/m4/mode_t.m4: Update.
1947 * gnulib/import/m4/msvc-inval.m4: Update.
1948 * gnulib/import/m4/msvc-nothrow.m4: Update.
1949 * gnulib/import/m4/multiarch.m4: Update.
1950 * gnulib/import/m4/nocrash.m4: Update.
1951 * gnulib/import/m4/off_t.m4: Update.
1952 * gnulib/import/m4/onceonly.m4: Update.
1953 * gnulib/import/m4/open-cloexec.m4: Update.
1954 * gnulib/import/m4/open.m4: Update.
1955 * gnulib/import/m4/openat.m4: Update.
1956 * gnulib/import/m4/opendir.m4: Update.
1957 * gnulib/import/m4/pathmax.m4: Update.
1958 * gnulib/import/m4/rawmemchr.m4: Update.
1959 * gnulib/import/m4/readdir.m4: Update.
1960 * gnulib/import/m4/readlink.m4: Update.
1961 * gnulib/import/m4/realloc.m4: Update.
1962 * gnulib/import/m4/rename.m4: Update.
1963 * gnulib/import/m4/rewinddir.m4: Update.
1964 * gnulib/import/m4/rmdir.m4: Update.
1965 * gnulib/import/m4/save-cwd.m4: Update.
1966 * gnulib/import/m4/secure_getenv.m4: Update.
1967 * gnulib/import/m4/setenv.m4: Update.
1968 * gnulib/import/m4/signal_h.m4: Update.
1969 * gnulib/import/m4/ssize_t.m4: Update.
1970 * gnulib/import/m4/stat-time.m4: Update.
1971 * gnulib/import/m4/stat.m4: Update.
1972 * gnulib/import/m4/std-gnu11.m4: Update.
1973 * gnulib/import/m4/stdbool.m4: Update.
1974 * gnulib/import/m4/stddef_h.m4: Update.
1975 * gnulib/import/m4/stdint.m4: Update.
1976 * gnulib/import/m4/stdio_h.m4: Update.
1977 * gnulib/import/m4/stdlib_h.m4: Update.
1978 * gnulib/import/m4/strchrnul.m4: Update.
1979 * gnulib/import/m4/strdup.m4: Update.
1980 * gnulib/import/m4/strerror.m4: Update.
1981 * gnulib/import/m4/string_h.m4: Update.
1982 * gnulib/import/m4/strstr.m4: Update.
1983 * gnulib/import/m4/strtok_r.m4: Update.
1984 * gnulib/import/m4/sys_socket_h.m4: Update.
1985 * gnulib/import/m4/sys_stat_h.m4: Update.
1986 * gnulib/import/m4/sys_time_h.m4: Update.
1987 * gnulib/import/m4/sys_types_h.m4: Update.
1988 * gnulib/import/m4/tempname.m4: Update.
1989 * gnulib/import/m4/time_h.m4: Update.
1990 * gnulib/import/m4/unistd-safer.m4: Update.
1991 * gnulib/import/m4/unistd_h.m4: Update.
1992 * gnulib/import/m4/warn-on-use.m4: Update.
1993 * gnulib/import/m4/wchar_h.m4: Update.
1994 * gnulib/import/m4/wchar_t.m4: Update.
1995 * gnulib/import/m4/wctype_h.m4: Update.
1996 * gnulib/import/m4/wint_t.m4: Update.
1997 * gnulib/import/malloc.c: Update.
1998 * gnulib/import/malloc/scratch_buffer.h: Update.
1999 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2000 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2001 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2002 * gnulib/import/malloca.c: Update.
2003 * gnulib/import/malloca.h: Update.
2004 * gnulib/import/malloca.valgrind: Update.
2005 * gnulib/import/math.in.h: Update.
2006 * gnulib/import/mbrtowc.c: Update.
2007 * gnulib/import/mbsinit.c: Update.
2008 * gnulib/import/mbsrtowcs-impl.h: Update.
2009 * gnulib/import/mbsrtowcs-state.c: Update.
2010 * gnulib/import/mbsrtowcs.c: Update.
2011 * gnulib/import/memchr.c: Update.
2012 * gnulib/import/memmem.c: Update.
2013 * gnulib/import/mempcpy.c: Update.
2014 * gnulib/import/memrchr.c: Update.
2015 * gnulib/import/mkdir.c: Update.
2016 * gnulib/import/mkstemp.c: Update.
2017 * gnulib/import/msvc-inval.c: Update.
2018 * gnulib/import/msvc-inval.h: Update.
2019 * gnulib/import/msvc-nothrow.c: Update.
2020 * gnulib/import/msvc-nothrow.h: Update.
2021 * gnulib/import/open.c: Update.
2022 * gnulib/import/openat-die.c: Update.
2023 * gnulib/import/openat-priv.h: Update.
2024 * gnulib/import/openat-proc.c: Update.
2025 * gnulib/import/openat.c: Update.
2026 * gnulib/import/openat.h: Update.
2027 * gnulib/import/opendir.c: Update.
2028 * gnulib/import/pathmax.h: Update.
2029 * gnulib/import/pipe-safer.c: Update.
2030 * gnulib/import/rawmemchr.c: Update.
2031 * gnulib/import/readdir.c: Update.
2032 * gnulib/import/readlink.c: Update.
2033 * gnulib/import/realloc.c: Update.
2034 * gnulib/import/ref-add.sin: Update.
2035 * gnulib/import/ref-del.sin: Update.
2036 * gnulib/import/rename.c: Update.
2037 * gnulib/import/rewinddir.c: Update.
2038 * gnulib/import/rmdir.c: Update.
2039 * gnulib/import/same-inode.h: Update.
2040 * gnulib/import/save-cwd.c: Update.
2041 * gnulib/import/save-cwd.h: Update.
2042 * gnulib/import/scratch_buffer.h: Update.
2043 * gnulib/import/secure_getenv.c: Update.
2044 * gnulib/import/setenv.c: Update.
2045 * gnulib/import/signal.in.h: Update.
2046 * gnulib/import/stat-time.c: Update.
2047 * gnulib/import/stat-time.h: Update.
2048 * gnulib/import/stat-w32.c: Update.
2049 * gnulib/import/stat-w32.h: Update.
2050 * gnulib/import/stat.c: Update.
2051 * gnulib/import/stdbool.in.h: Update.
2052 * gnulib/import/stddef.in.h: Update.
2053 * gnulib/import/stdint.in.h: Update.
2054 * gnulib/import/stdio.in.h: Update.
2055 * gnulib/import/stdlib.in.h: Update.
2056 * gnulib/import/str-two-way.h: Update.
2057 * gnulib/import/strchrnul.c: Update.
2058 * gnulib/import/strdup.c: Update.
2059 * gnulib/import/streq.h: Update.
2060 * gnulib/import/strerror-override.c: Update.
2061 * gnulib/import/strerror-override.h: Update.
2062 * gnulib/import/strerror.c: Update.
2063 * gnulib/import/string.in.h: Update.
2064 * gnulib/import/stripslash.c: Update.
2065 * gnulib/import/strnlen1.c: Update.
2066 * gnulib/import/strnlen1.h: Update.
2067 * gnulib/import/strstr.c: Update.
2068 * gnulib/import/strtok_r.c: Update.
2069 * gnulib/import/sys_stat.in.h: Update.
2070 * gnulib/import/sys_time.in.h: Update.
2071 * gnulib/import/sys_types.in.h: Update.
2072 * gnulib/import/tempname.c: Update.
2073 * gnulib/import/tempname.h: Update.
2074 * gnulib/import/time.in.h: Update.
2075 * gnulib/import/unistd--.h: Update.
2076 * gnulib/import/unistd-safer.h: Update.
2077 * gnulib/import/unistd.in.h: Update.
2078 * gnulib/import/unsetenv.c: Update.
2079 * gnulib/import/verify.h: Update.
2080 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2081 * gnulib/import/wchar.in.h: Update.
2082 * gnulib/import/wctype.in.h: Update.
2083 * gnulib/import/xalloc-oversized.h: Update.
2084 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2085 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2086
2087 2018-08-16 Gary Benson <gbenson@redhat.com>
2088
2089 PR gdb/13000:
2090 * gdb/main.c (captured_main_1): Exit with nonzero status
2091 in batch mode if the last command to be executed failed.
2092 * NEWS: Mention the above.
2093
2094 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2095
2096 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2097 end of warning message.
2098
2099 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2100
2101 PR gdb/22943:
2102 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2103 (aarch64_extract_return_value): Use
2104 aapcs_is_vfp_call_or_return_candidate.
2105 (aarch64_return_in_memory): Likewise.
2106 (aarch64_store_return_value): Likewise.
2107
2108 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2109
2110 * aarch64-tdep.c
2111 (aapcs_is_vfp_call_or_return_candidate): Make static
2112 (pass_in_v_or_stack): Remove function.
2113 (pass_in_v_vfp_candidate): New function.
2114 (aarch64_push_dummy_call): Check for float register candidates.
2115
2116 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2117
2118 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2119 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2120 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2121
2122 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2123
2124 PR build/23399
2125 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2126 (struct ipa_sym_addresses): Rename to...
2127 (struct ipa_sym_addresses_common): ... this.
2128 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2129
2130 2018-08-28 Tom Tromey <tom@tromey.com>
2131
2132 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2133 (token_fifo): Now a std::vector.
2134 (yylex, c_parse): Update.
2135 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2136 (token_fifo): Now a std::vector.
2137 (yylex, d_parse): Update.
2138 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2139 (token_fifo): Now a std::vector.
2140 (yylex, go_parse): Update.
2141
2142 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2143
2144 * parser-defs.h (struct type_stack) <elements>: Change type to
2145 std::vector<union type_stack_elt>.
2146 <depth, size>: Remove.
2147 * parse.c (parse_exp_in_context_1): Adjust.
2148 (type_stack_reserve): Remove.
2149 (check_type_stack_depth): Remove.
2150 (insert_into_type_stack): Adjust to std::vector.
2151 (insert_type): Likewise.
2152 (push_type): Likewise.
2153 (push_type_int): Likewise.
2154 (insert_type_address_space): Likewise.
2155 (pop_type): Likewise.
2156 (pop_type_int): Likewise.
2157 (pop_typelist): Likewise.
2158 (pop_type_stack): Likewise.
2159 (append_type_stack): Likewise.
2160 (push_type_stack): Likewise.
2161 (get_type_stack): Likewise.
2162 (type_stack_cleanup): Likewise.
2163 (push_typelist): Likewise.
2164 (follow_types): Likewise.
2165 (_initialize_parse): Likewise.
2166
2167 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2168
2169 * NEWS: Mention csky target.
2170
2171 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2172 Hafiz Abid Qadeer <abidh@codesourcery.com>
2173 Don Breazeal <donb@codesourcery.com>
2174
2175 * csky-linux-tdep.c: New file.
2176 * csky-tdep.c: Likewise.
2177 * csky-tdep.h: Likewise.
2178 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2179 csky-tdep.o.
2180 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2181 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2182 * configure.tgt: Add csky support.
2183
2184 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2185
2186 * python/py-framefilter.c (py_print_frame): Print frame architecture
2187 when printing on an MI output.
2188
2189 2018-08-27 Tom Tromey <tom@tromey.com>
2190
2191 PR build/23087:
2192 * configure: Rebuild.
2193 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2194
2195 2018-08-27 Tom Tromey <tom@tromey.com>
2196
2197 * aarch64-linux-tdep.c
2198 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2199 casts to int.
2200
2201 2018-08-27 Tom Tromey <tom@tromey.com>
2202
2203 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2204 unsigned.
2205 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2206 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2207 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2208 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2209 unsigned.
2210
2211 2018-08-27 Tom Tromey <tom@tromey.com>
2212
2213 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2214 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2215
2216 2018-08-27 Tom Tromey <tom@tromey.com>
2217
2218 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2219 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2220 ULONGEST_MAX.
2221 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2222 ULONGEST_MAX.
2223 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2224 ULONGEST_MAX.
2225 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2226 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2227 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2228 ULONGEST_MAX.
2229 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2230 (ppc64_linux_sigaction_tramp_frame)
2231 (ppc32_linux_sighandler_tramp_frame)
2232 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2233 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2234 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2235 * mn10300-linux-tdep.c (am33_linux_sigframe)
2236 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2237 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2238 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2239 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2240 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2241 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2242 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2243 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2244 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2245 * microblaze-linux-tdep.c
2246 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2247 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2248 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2249 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2250 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2251 * common/common-types.h (ULONGEST_MAX): New define.
2252 (CORE_ADDR_MAX): Fix formatting.
2253 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2254 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2255 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2256 (arm_linux_rt_sigreturn_tramp_frame)
2257 (arm_eabi_linux_sigreturn_tramp_frame)
2258 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2259 (thumb2_eabi_linux_sigreturn_tramp_frame)
2260 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2261 (arm_linux_restart_syscall_tramp_frame)
2262 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2263 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2264 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2265 ULONGEST_MAX.
2266 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2267
2268 2018-08-27 Tom Tromey <tom@tromey.com>
2269
2270 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2271 CORE_ADDR_MAX.
2272 * mips-tdep.c (mips_deal_with_atomic_sequence)
2273 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2274 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2275 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2276 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2277 CORE_ADDR_MAX.
2278 * aarch64-tdep.c (aarch64_software_single_step): Use
2279 CORE_ADDR_MAX.
2280
2281 2018-08-27 Tom Tromey <tom@tromey.com>
2282
2283 * linespec.c (complete_linespec_component): Add cast to "char".
2284 * completer.c (completion_tracker::build_completion_result): Add
2285 cast to "char".
2286
2287 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2288
2289 * solist.h (struct solist, struct target_so_ops): Fix
2290 indentation.
2291
2292 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2293
2294 * ada-tasks.c (ada_task_info_s): Remove typedef.
2295 (DEF_VEC_O(ada_task_info_s)): Remove.
2296 (struct ada_tasks_inferior_data): Initialize fields.
2297 <task_list>: Make an std::vector.
2298 (get_ada_tasks_inferior_data): Allocate with new.
2299 (ada_get_task_number): Adjust.
2300 (get_task_number_from_id): Likewise.
2301 (valid_task_id): Likewise.
2302 (ada_get_task_info_from_ptid): Likewise.
2303 (iterate_over_live_ada_tasks): Likewise.
2304 (add_ada_task): Likewise.
2305 (read_known_tasks): Likewise.
2306 (ada_build_task_list): Likewise.
2307 (print_ada_task_info): Likewise.
2308 (info_task): Likewise.
2309 (task_command_1): Likewise.
2310
2311 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2312
2313 * ada-lang.c (add_angle_brackets): Return std::string.
2314
2315 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2316
2317 * python/py-threadevent.c (py_get_event_thread): Initialize
2318 pythread.
2319
2320 2018-08-24 Pedro Alves <palves@redhat.com>
2321
2322 * python/py-bpevent.c (create_breakpoint_event_object): Use
2323 copy-initialization.
2324 * python/py-continueevent.c (emit_continue_event): Use
2325 copy-initialization.
2326 * python/py-exitedevent.c (create_exited_event_object): Return a
2327 gdbpy_ref<>.
2328 (emit_exited_event): Use copy-initialization.
2329 * python/py-inferior.c (python_new_inferior)
2330 (python_inferior_deleted, add_thread_object): Use
2331 copy-initialization.
2332 * python/py-infevents.c (create_inferior_call_event_object)
2333 (create_register_changed_event_object)
2334 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2335 (emit_inferior_call_event, emit_memory_changed_event)
2336 (emit_register_changed_event): Use copy-initialization.
2337 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2338 Return a gdbpy_ref<>.
2339 (emit_new_objfile_event): Use copy-initialization.
2340 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2341 (emit_clear_objfiles_event): Use copy-initialization.
2342 * python/py-signalevent.c (create_signal_event_object): Use
2343 copy-initialization.
2344 * python/py-threadevent.c (create_thread_event_object): Use
2345 copy-initialization.
2346
2347 2018-08-24 Pedro Alves <palves@redhat.com>
2348 Simon Marchi <simon.marchi@ericsson.com>
2349
2350 PR gdb/23379
2351 * python/py-continueevent.c: Include "gdbthread.h".
2352 (create_continue_event_object): Add intro comment. Add 'ptid'
2353 parameter. Use it to find thread to pass to
2354 create_thread_event_object.
2355 (emit_continue_event): Pass PTID down to
2356 create_continue_event_object.
2357 * python/py-event.h (py_get_event_thread): Declare.
2358 (create_thread_event_object): Remove default from 'thread'
2359 parameter.
2360 * python/py-stopevent.c (create_stop_event_object): Use
2361 py_get_event_thread.
2362 * python/py-threadevent.c (get_event_thread): Rename to ...
2363 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2364 and use it to find the thread.
2365 (create_thread_event_object): Assert that THREAD isn't null.
2366 Don't find the event thread here.
2367
2368 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2369
2370 * block.h (blockrange, blockranges): New struct declarations.
2371 (struct block): Add new field named `ranges'.
2372 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2373 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2374 macros for accessing ranges in struct block.
2375 (make_blockranges): New declaration.
2376 block.c (make_blockranges): New function.
2377 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2378 for block.
2379 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2380 * blockframe.c (cache_pc_function_block): New static global.
2381 (clear_pc_function_cache): Clear cache_pc_function_block.
2382 (find_pc_partial_function): Move comment to symtab.h. Add
2383 support for non-contiguous blocks.
2384 * cli/cli-cmds.c (block.h): Include.
2385 (print_disassembly): Handle printing of non-contiguous blocks.
2386 (disassemble_current_function): Likewise.
2387 (disassemble_command): Likewise.
2388
2389 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2390 BLOCK_START.
2391 * blockframe.c (get_pc_function_start): Likewise.
2392 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2393 (gcc_symbol_address): Likewise.
2394 * compile/compile-object-run.c (compile_object_run): Likewise.
2395 * compile/compile.c (get_expr_block_and_pc): Likewise.
2396 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2397 (func_addr_to_tail_call_list): Likewise.
2398 * findvar.c (default_read_var_value): Likewise.
2399 * inline-frame.c (inline_frame_this_id): Likewise.
2400 (skip-inline_frames): Likewise.
2401 * infcmd.c (until_next_command): Likewise.
2402 * linespec.c (convert_linespec_to_sals): Likewise.
2403 * parse.c (parse_exp_in_context_1): Likewise.
2404 * printcmd.c (build_address_symbolic): likewise.
2405 (info_address_command): Likewise.
2406 symtab.c (find_function_start_sal): Likewise.
2407 (skip_prologue_sal): Likewise.
2408 (find_function_alias_target): Likewise.
2409 (find_gnu_ifunc): Likewise.
2410 * stack.c (find_frame_funname): Likewise.
2411 * symtab.c (fixup_symbol_section): Likewise.
2412 (find_function_start_sal): Likewise.
2413 (skip_prologue_sal): Likewsie.
2414 (find_function_alias_target): Likewise.
2415 (find_gnu_ifunc): Likewise.
2416 * tracepoint.c (info_scope_command): Likewise.
2417 * value.c (value_fn_field): Likewise.
2418
2419 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2420 in place of find_pc_partial_function.
2421 * blockframe.c (find_function_entry_range_from_pc): New function.
2422 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2423 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2424 for each range in a block.
2425
2426
2427 2018-08-23 Xavier Roirand <roirand@adacore.com>
2428
2429 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2430 incrementation.
2431
2432 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2433
2434 * solib-svr4.c (read_program_headers_from_bfd): Return
2435 gdb::optional<gdb::byte_vector>.
2436 (svr4_exec_displacement): Adjust.
2437
2438 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2439
2440 * solib-svr4.c (read_program_header): Return
2441 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2442 (find_program_interpreter): Return
2443 gdb::optional<gdb::byte_vector>.
2444 (scan_dyntag_auxv): Adjust.
2445 (enable_break): Adjust.
2446 (svr4_exec_displacement): Adjust.
2447
2448 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2449
2450 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2451 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2452
2453 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2454
2455 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2456 string_vprintf.
2457 * guile/scm-utils.c (gdbscm_printf): Likewise.
2458 * serial.c (serial_printf): Likewise.
2459 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2460
2461 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2462
2463 * stack.c (print_frame): Print frame architecture when printing on
2464 an MI output.
2465 * NEWS: Mention new "arch" attribute in frame output.
2466
2467 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2468
2469 * arch/aarch64.h (aarch64_regnum): Update comment.
2470
2471 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2472
2473 * NEWS: Add SVE to 8.2 section.
2474
2475 2018-08-21 Pedro Alves <palves@redhat.com>
2476
2477 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2478 out from gdbscm_parse_function_args.
2479 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2480 gdbscm_parse_function_args_1.
2481
2482 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 PR gdb/17816
2485 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2486 operator.
2487
2488 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2489
2490 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2491
2492 2018-08-19 Michael Spang <spang@google.com>
2493
2494 PR gdb/11786
2495 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2496 for PT_TLS segments.
2497
2498 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2499
2500 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2501 dwarf_variable_value.
2502 * dwarf2-frame.c (class dwarf_expr_executor):
2503 Add override for dwarf_variable_value.
2504 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2505 (class symbol_needs_eval_context): Likewise.
2506 (indirect_synthetic_pointer): Add forward declaration.
2507 (sect_variable_value): New function.
2508 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2509 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2510 for DW_OP_GNU_variable_value.
2511
2512 2018-08-16 Tom Tromey <tom@tromey.com>
2513
2514 * top.c (read_command_file): Update.
2515 (command_line_input): Remove "repeat" argument.
2516 * ada-lang.c (get_selections): Update.
2517 * linespec.c (decode_line_2): Update.
2518 * defs.h (command_line_input): Remove argument.
2519 * cli/cli-script.c (read_next_line): Update.
2520 * python/py-gdb-readline.c: Update.
2521
2522 2018-08-17 Tom Tromey <tom@tromey.com>
2523
2524 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2525 command_line_input.
2526
2527 2018-08-15 Tom Tromey <tom@tromey.com>
2528
2529 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2530
2531 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2532
2533 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2534 If used, use find_pc_partial_function to find address range
2535 to disassemble.
2536 * mi/mi-main.c (mi_cmd_list_features): Report
2537 "data-disassemble-a-option" feature.
2538 * NEWS: Mention new -data-disassemble option -a.
2539
2540 2018-08-13 Tom Tromey <tom@tromey.com>
2541
2542 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2543
2544 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2545
2546 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2547 (aarch64_linux_collect_sve_regset): Likewise.
2548 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2549 * regcache.h (regcache_map_entry_size): New function.
2550
2551 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2552
2553 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2554 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2555 (SVE_HEADER_VL_LENGTH): Likewise.
2556 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2557 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2558 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2559 (SVE_HEADER_SIZE_OFFSET): Likewise.
2560 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2561 (SVE_HEADER_VL_OFFSET): Likewise.
2562 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2563 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2564 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2565 (SVE_HEADER_SIZE): Likewise.
2566 (aarch64_linux_core_read_vq): Add function.
2567 (aarch64_linux_core_read_description): Check for SVE section.
2568
2569 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2570
2571 * aarch64-fbsd-tdep.c
2572 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2573 collect_size.
2574 * aarch64-linux-tdep.c
2575 (aarch64_linux_iterate_over_regset_sections): Likewise.
2576 * alpha-linux-tdep.c
2577 (alpha_linux_iterate_over_regset_sections):
2578 * alpha-nbsd-tdep.c
2579 (alphanbsd_iterate_over_regset_sections): Likewise.
2580 * amd64-fbsd-tdep.c
2581 (amd64fbsd_iterate_over_regset_sections): Likewise.
2582 * amd64-linux-tdep.c
2583 (amd64_linux_iterate_over_regset_sections): Likewise.
2584 * arm-bsd-tdep.c
2585 (armbsd_iterate_over_regset_sections): Likewise.
2586 * arm-fbsd-tdep.c
2587 (arm_fbsd_iterate_over_regset_sections): Likewise.
2588 * arm-linux-tdep.c
2589 (arm_linux_iterate_over_regset_sections): Likewise.
2590 * corelow.c (get_core_registers_cb): Likewise.
2591 (core_target::fetch_registers): Likewise.
2592 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2593 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2594 * gdbarch.h (void): Regenerate.
2595 * gdbarch.sh: Add supply_size and collect_size.
2596 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2597 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2598 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2599 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2600 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2601 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2602 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2603 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2604 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2605 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2606 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2607 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2608 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2609 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2610 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2611 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2612 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2613 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2614 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2615 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2616 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2617 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2618 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2619 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2620 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2621 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2622 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2623 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2624 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2625 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2626
2627 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2628
2629 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2630 with string_printf.
2631
2632 2018-08-10 Keith Seitz <keiths@redhat.com>
2633
2634 * compile/compile-c-support.c (add_code_header, add_code_footer):
2635 Move into policy class.
2636 (c_push_user_expression, pop_user_expression_nop)
2637 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2638 (compile_program): New host class.
2639 (c_compile_program): New typedef.
2640 (c_compute_porgram): Use c_compile_program.
2641
2642 2018-08-10 Keith Seitz <keiths@redhat.com>
2643
2644 * compile/compile-internal.h (compile_instance::~compile_instance):
2645 Remove calls to htab_delete.
2646 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2647 * compile.c (compile_instance::compile_instance): Initialize
2648 htab unique pointers.
2649 (compile_instance::get_cached_type, compile_instance::insert_type)
2650 (compile_instance::error_symbol_once): Update for unique_ptr.
2651
2652 2018-08-10 Keith Seitz <keiths@redhat.com>
2653
2654 * compile/compile-c-symbols.c (struct symbol_error)
2655 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2656 (compile_instance::insert_symbol_error)
2657 (compile_instance::error_symbol_once): Move to ...
2658 * compile/compile.c: ... here.
2659
2660 2018-08-10 Keith Seitz <keiths@redhat.com>
2661
2662 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2663 instead of `new_compile_instance'.
2664 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2665 Update description.
2666 If the symbol error map is not initialized, create it.
2667 (generate_c_for_for_one_symbol): Do not check/initialize
2668 the symbol error map.
2669 * compile/compile-c-types.c (compile_c_instance): Make a class.
2670 Update all callers.
2671 (compile_instance::compile_instance): Initialize the type cache.
2672 (get_cached_type): New function.
2673 (insert_type): Update description.
2674 (compile_c_instance::m_default_cflags): Define.
2675 (convert_type): Update description. Use get_cached_type.
2676 (delete_instance): Moved to destructor.
2677 (new_compile_instance): Moved to constructor.
2678 * compile/compile-c.h (compile_c_instance): Make class inheriting
2679 from compile_instance.
2680 <base>: Remove field.
2681 <type_map, symbol_err_map>: Move to base class.
2682 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2683 * compile/compile-internal.h (compile_instance): Make class.
2684 <type_map_t, symbol_err_map_t>: Define.
2685 <fe>: Rename to `m_gcc_fe'.
2686 <scope, block, gcc_target_options>: Add `m_' prefix.
2687 <m_type_map, m_symbol_err_map>: New fields, moved from
2688 compile_c_instance.
2689 <destroy>: Remove.
2690 (convert_type, new_compile_instance): Remove.
2691 * compile/compile.c (cleanup_compile_instance): Remove.
2692 (compile_to_object): Use unique_ptr to eliminate cleanups.
2693 (compile_instance::set_print_callback, compile_instance::version)
2694 (compile_instance::set_verbose)
2695 (compile_instance::set_driver_filename)
2696 (compile_instance::set_triplet_regexp)
2697 (compile_instance::set_arguments)
2698 (compile_instance::set_source_file)
2699 (compile_instance::compile): Define.
2700
2701 2018-08-10 Keith Seitz <keiths@redhat.com>
2702
2703 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2704 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2705 gcc-c-fe.def to define C plugin.
2706 (delete_instance): Delete `c_plugin'.
2707 (new_compile_instance): Initialize `c_plugin'.
2708 * compile/compile-c.h: Include gcc_c_plugin.h.
2709 (struct compile_c_instance) <c_plugin>: New member.
2710 * gcc-c-plugin.h: New file.
2711 Update all callers with API change.
2712
2713 2018-08-10 Keith Seitz <keiths@redhat.com>
2714
2715 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2716 (HFILES_NO_SRCDIR): ... to here.
2717 Add compile-internal.h and compile-c.h.
2718 * compile/compile-c-support.c: Include compile-c.h.
2719 * compile/compile-c-symbols.c: Include compile-c.h.
2720 (generate_c_for_variable_locations): Update comment.
2721 * compile/compile-c-types.c: Include compile-c.h.
2722 * compile/compile-c.h: New file -- moved C language declarations
2723 from other files here.
2724 * compile/compile-internal.h: Do not include hashtab.h or
2725 common/enum-flags.h.
2726 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2727 (gcc_convert_symbol, gcc_symbol_address)
2728 (generate_c_for_variable_locations, c_get_mode_for_size)
2729 (c_get_range_decl_name): Definitions moved to compile-c.h.
2730 * compile/compile-loc2c.c: Include compile-c.h.
2731
2732 2018-08-10 Keith Seitz <keiths@redhat.com>
2733
2734 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2735 (c_symbol_substitution_name): ... this.
2736 Update all callers.
2737
2738 2018-08-10 Keith Seitz <keiths@redhat.com>
2739
2740 * compile/compile-c-support.c (c_compute_program): Use
2741 unique_xmalloc_ptr to eliminate cleanup.
2742 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2743 Return a unique_xmalloc_ptr and eliminate cleanup.
2744 * compile/compile-internal.h (generate_c_for_variable_locations):
2745 Return unique_xmalloc_ptr and update description.
2746
2747 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2748
2749 * corelow.c (core_target::get_core_register_section): Rename
2750 min_size to section_min_size.
2751
2752 2018-08-09 Jim Wilson <jimw@sifive.com>
2753
2754 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2755 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2756 * NEWS: Mention new GNU/Linux RISC-V target.
2757 * configure.host: Add riscv*-*-linux*.
2758 * configure.nat: Add riscv*.
2759 * configure.tgt: Add riscv*-*-linux*.
2760 * riscv-linux-nat.c: New file.
2761 * riscv-linux-tdep.c: New file.
2762
2763 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2764
2765 * infrun.c (resume): Make static, add forward declaration.
2766 (proceed): Update header comment.
2767 * infrun.h (resume): Delete declaration.
2768
2769 2018-08-09 Tom Tromey <tom@tromey.com>
2770
2771 * riscv-tdep.h: Minor formatting fixes.
2772
2773 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2774
2775 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2776 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2777 (test_mkdir_recursive): Likewise.
2778 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2779
2780 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2781
2782 * valarith.c (value_subscripted_rvalue): If an array is not in
2783 memory, and we don't know the upper bound, then we can't know that
2784 the requested element exists or not.
2785
2786 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2787
2788 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2789 (target_options_to_string): Add comment.
2790
2791 2018-08-08 Tom Tromey <tom@tromey.com>
2792
2793 * unittests/scoped_mmap-selftests.c: Check result of "write".
2794
2795 2018-08-08 Jim Wilson <jimw@sifive.com>
2796
2797 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2798 (decode_register_index_short): New.
2799 (decode_j_type_insn, decode_cj_type_insn): New.
2800 (decode_b_type_insn, decode_cb_type_insn): New.
2801 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2802 local xlen. Check xlen when decoding ambiguous compressed insns. In
2803 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2804 is_c_sw_insn instead of is_sw_insn.
2805 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2806 (riscv_software_single_step): New.
2807 * riscv-tdep.h (riscv_software_single_step): Declare.
2808
2809 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2810 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2811
2812 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2813
2814 PR gdb/18050:
2815 * target.c (dispose_inferior): Don't dispose of inferiors that are
2816 already killed.
2817
2818 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2819
2820 * remote.c (remote_target::download_tracepoint): Change char* to
2821 const char*.
2822
2823 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2824
2825 * target.h (target_options_to_string): Return an std::string.
2826 * target.c (str_comma_list_concat_elem): Return void, use
2827 std::string.
2828 (do_option): Likewise.
2829 (target_options_to_string): Return an std::string.
2830 * linux-nat.c (linux_nat_target::wait): Adjust.
2831 * target-debug.h (target_debug_print_options): Adjust.
2832
2833 2018-08-07 Tom Tromey <tom@tromey.com>
2834
2835 * Makefile.in (CPPFLAGS): New variable.
2836 (INTERNAL_CPPFLAGS): Use it.
2837
2838 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2839
2840 * NEWS: Mention the index cache.
2841
2842 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2843
2844 * common/pathstuff.h (get_standard_cache_dir): New.
2845 * common/pathstuff.c (get_standard_cache_dir): New.
2846 * build-id.h (build_id_to_string): New.
2847 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2848 DEBUG_STR_SUFFIX): Move to here.
2849 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2850 DEBUG_STR_SUFFIX): Move from there.
2851 (write_psymtabs_to_index): Make non-static, add basename
2852 parameter. Write to temporary files, rename when done.
2853 (save_gdb_index_command): Adjust call to
2854 write_psymtabs_to_index.
2855 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2856 field.
2857 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2858 (get_gdb_index_contents_from_cache): New.
2859 (get_gdb_index_contents_from_cache_dwz): New.
2860 (dwarf2_initialize_objfile): Read index from cache.
2861 (dwarf2_build_psymtabs): Save to index.
2862 * dwarf-index-cache.h: New file.
2863 * dwarf-index-cache.c: New file.
2864 * dwarf-index-write.h: New file.
2865
2866 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * gnulib/aclocal.m4: Re-generate.
2869 * gnulib/config.in: Re-generate.
2870 * gnulib/configure: Re-generate.
2871 * gnulib/import/Makefile.am: Re-generate.
2872 * gnulib/import/Makefile.in: Re-generate.
2873 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2874 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2875 * gnulib/import/m4/mkdir.m4: New file.
2876 * gnulib/import/mkdir.c: New file.
2877 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2878 module.
2879
2880 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2881
2882 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2883 * common/scoped_mmap.c: New file.
2884 * common/scoped_mmap.h (destroy): New method.
2885 (~scoped_mmap, reset): Use destroy.
2886 (scoped_mmap): New move constructor.
2887 (mmap_file): New declaration.
2888 * unittests/scoped_mmap-selftests.c (test_normal,
2889 test_invalid_filename, run_tests): New functions.
2890 (_initialize_scoped_mmap_selftests): Register selftest.
2891
2892 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2893
2894 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2895 (read_gdb_index_from_buffer): ... this. Remove section
2896 parameter, add buffer parameter.
2897 (get_gdb_index_contents_ftype,
2898 get_gdb_index_contents_dwz_ftype): New typedefs.
2899 (dwarf2_read_gdb_index): Add callback parameters to get the
2900 index contents.
2901 (get_gdb_index_contents_from_section): New.
2902 (dwarf2_initialize_objfile): Update call to
2903 dwarf2_read_gdb_index.
2904
2905 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2906
2907 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2908 (gdb_open_cloexec): Likewise.
2909 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2910 (commandline_from_pid): Likewise.
2911 (linux_xfer_osdata_threads): Likewise.
2912 (linux_xfer_osdata_fds): Likewise.
2913 * ada-lang.c (is_package_name): Likewise.
2914 * auxv.c (procfs_xfer_auxv): Likewise.
2915 * breakpoint.c (print_one_breakpoint_location): Use
2916 uiout::field_fmt.
2917 (print_one_catch_solib): Use string_printf.
2918 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2919 (add_pe_forwarded_sym): Likewise.
2920 * dwarf2read.c (create_type_unit_group): Likewise.
2921 (build_error_marker_type): Likewise.
2922 * infcall.c (get_function_name): Likewise.
2923 * valprint.c (print_converted_chars_to_obstack): Likewise.
2924 * xtensa-tdep.c (xtensa_register_type): Likewise.
2925
2926 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2927
2928 * remote.c (remote_target::download_tracepoint): Fix format
2929 string errors.
2930
2931 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2932
2933 * tracefile.c: Include common/byte-vector.h.
2934 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2935 with trace_regblock_size if needed. Update uses of buf.
2936
2937 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2938
2939 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2940 std::vector<unsigned char>.
2941 * tracepoint.c (collection_list::collection_list): Remove
2942 m_regs_mask initializer from initializer list. Resize
2943 m_regs_mask using the largest remote register number.
2944 (collection_list::add_remote_register): Remove size check on
2945 m_regs_mask. Use at to access element.
2946 (collection_list::stringify): Change type of temp_buf to
2947 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2948 stringify the register mask. Use pack_hex_byte for the register
2949 mask.
2950
2951 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2952
2953 * tracepoint.h (class collection_list) <add_register>: Remove.
2954 <add_remote_register, add_ax_registers, add_local_register>:
2955 Declare.
2956 <add_memrange>: Add scope parameter.
2957 * tracepoint.c (encode_actions_1): Likewise.
2958 (collection_list::add_register): Rename to ...
2959 (collection_list::add_remote_register): ... this. Update
2960 comment.
2961 (collection_list::add_ax_registers, add_local_register): New
2962 methods.
2963 (collection_list::add_memrange): Add scope parameter. Call
2964 add_local_register instead of add_register.
2965 (finalize_tracepoint_aexpr): New function.
2966 (collection_list::collect_symbol): Update calls to add_memrange.
2967 Call add_local_register instead of add_register. Call
2968 add_ax_registers. Call finalize_tracepoint_aexpr.
2969 (encode_actions_1): Get remote regnos for $reg action. Call
2970 add_remote_register, add_ax_registers, and add_local_register.
2971 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2972 (validate_actionline): Call finalize_tracepoint_aexpr.
2973
2974 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2975
2976 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2977 Replace array buf with gdb::char_vector buf, of size
2978 get_remote_packet_size (). Replace references to buf and
2979 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2980 and xsnprintf with snprintf. Raise errors if the buffer is too
2981 small.
2982
2983 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2984
2985 * remote.c (remote_target::download_tracepoint): Fix the has_more
2986 predicate in the QTDP action list iteration.
2987
2988 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2989
2990 * remote.c (remote_target::download_tracepoint): Fix indentation
2991 in for block.
2992
2993 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2994
2995 * proc-api.c (_initialize_proc_api): Remove c, unused.
2996 * procfs.c (procfs_init_inferior): Remove signals, unused.
2997 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2998 unused.
2999
3000 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3001 Andrew Burgess <andrew.burgess@embecosm.com>
3002
3003 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3004 'W_STOPCODE (0)' as this could be ambiguous.
3005
3006 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3007
3008 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3009 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3010 "ai_socktype").
3011
3012 2018-08-02 Tom Tromey <tom@tromey.com>
3013
3014 PR symtab/16842.
3015 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3016 symbols.
3017 (process_structure_scope): Likewise.
3018
3019 2018-08-02 Xavier Roirand <roirand@adacore.com>
3020
3021 PR gdb/22629:
3022 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3023 kill inferior.
3024
3025 2018-08-02 Tom Tromey <tom@tromey.com>
3026
3027 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3028 (darwin_suspend_inferior, darwin_resume_inferior)
3029 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3030 (darwin_check_new_threads): Check result of get_darwin_inferior.
3031
3032 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3033
3034 GDB 8.1.1 released.
3035
3036 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3037
3038 * varobj.c (varobj_get_path_expr_parent): Report an error if
3039 parent is a dynamic varobj.
3040
3041 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3042
3043 * gnulib/aclocal.m4: Re-generate.
3044 * gnulib/config.in: Re-generate.
3045 * gnulib/configure: Re-generate.
3046 * gnulib/import/Makefile.in: Re-generate.
3047 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3048 * gnulib/import/m4/onceonly.m4: Re-generate.
3049
3050 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3051
3052 * target-descriptions.c (struct xml_test_tdesc): New.
3053 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3054 (record_xml_tdesc): Update.
3055 (maintenance_check_xml_descriptions): Update.
3056 * target-descriptions.h (record_xml_tdesc): Update comment.
3057
3058 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3059
3060 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3061 checking array bounds are defined.
3062
3063 2018-07-30 Tom Tromey <tom@tromey.com>
3064
3065 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3066 irreflexivity violation.
3067
3068 2018-07-30 Tom Tromey <tom@tromey.com>
3069
3070 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3071 * value.c (unpack_long): Remove lint code.
3072 * valops.c (value_ind): Remove lint code.
3073 * valarith.c (value_x_binop, value_x_unop, value_equal)
3074 (value_pos): Remove lint code.
3075
3076 2018-07-28 Tom de Vries <tdevries@suse.de>
3077
3078 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3079 with undefined upper bound as <optimized out>.
3080
3081 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3082
3083 * gcore.in: Rename variable "name" to "prefix". Expand
3084 "usage" text.
3085
3086 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3087
3088 * windows-nat.c (windows_nat_target::create_inferior): Update to
3089 call close() in global namespace.
3090
3091 2018-07-26 Tom Tromey <tom@tromey.com>
3092
3093 * dwarf-index-write.c (add_address_entry): Don't add objfile
3094 offsets.
3095 * dbxread.c (find_stab_function): Rename from
3096 find_stab_function_addr. Return a bound_minimal_symbol.
3097 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3098 Don't add objfile offsets.
3099 (end_psymtab): Use raw_text_low, raw_text_high,
3100 MSYMBOL_VALUE_RAW_ADDRESS.
3101 (read_ofile_symtab): Update.
3102 (process_one_symbol): Update.
3103 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3104 offsets.
3105 (dw2_relocate): Remove.
3106 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3107 searching addrmap.
3108 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3109 Update.
3110 (process_psymtab_comp_unit_reader, add_partial_symbol)
3111 (add_partial_subprogram, dwarf2_ranges_read): Update.
3112 (load_partial_dies): Update.
3113 (add_address_entry): Don't add objfile offsets.
3114 (dwarf2_build_include_psymtabs): Update.
3115 (create_addrmap_from_aranges): Don't add objfile offsets.
3116 (dw2_find_pc_sect_compunit_symtab): Update.
3117 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3118 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3119 Update.
3120 (parse_partial_symbols): Don't add objfile offsets. Use
3121 raw_text_low, raw_text_high. Update.
3122 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3123 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3124 or call 'relocate' quick function. Clear psymbol_map.
3125 * psympriv.h (struct partial_symbol) <address>: Add section
3126 offset.
3127 <set_unrelocated_address>: Rename from set_address.
3128 <raw_text_low, raw_text_high>: New methods.
3129 <text_low, text_high>: Add objfile parameter.
3130 (add_psymbol_to_bcache): Add 'section' parameter. Call
3131 set_unrelocated_address.
3132 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3133 (find_pc_psymbol): Update.
3134 (fixup_psymbol_section, relocate_psymtabs): Remove.
3135 (dump_psymtab, psym_functions): Update.
3136 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3137 parameter.
3138 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3139 (start_psymtab_common): Update.
3140 * symfile-debug.c (debug_qf_relocate): Remove.
3141 (debug_sym_quick_functions): Update.
3142 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3143 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3144 Update.
3145
3146 2018-07-26 Tom Tromey <tromey@redhat.com>
3147
3148 * dbxread.c (end_psymtab): Use text_high_valid and
3149 text_low_valid.
3150 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3151 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3152 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3153 Update comment.
3154 <text_low_valid, text_high_valid>: New fields.
3155 <set_text_low, set_text_high>: Update.
3156 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3157
3158 2018-07-26 Tom Tromey <tom@tromey.com>
3159
3160 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3161 Update.
3162 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3163 textlow and texthigh fields.
3164 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3165 Update.
3166 * mdebugread.c (parse_lines, parse_partial_symbols)
3167 (psymtab_to_symtab_1): Update.
3168 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3169 Rename fields. Update comment. Now private.
3170 <text_low, text_high, set_text_low, set_text_high>: New methods.
3171 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3172 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3173 (start_psymtab_common, maintenance_info_psymtabs)
3174 (maintenance_check_psymtabs): Update.
3175 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3176 texthigh fields.
3177 (scan_xcoff_symtab): Update.
3178
3179 2018-07-26 Tom Tromey <tromey@redhat.com>
3180
3181 * psympriv.h (struct partial_symbol) <unrelocated_address,
3182 address, set_address>: New methods.
3183 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3184 (fixup_psymbol_section, relocate_psymtabs): Update.
3185 (print_partial_symbols): Add 'objfile' parameter. Update.
3186 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3187 Update.
3188
3189 2018-07-26 Tom Tromey <tom@tromey.com>
3190
3191 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3192 (debug_names::write_psymbols): Update.
3193 * psympriv.h (struct partial_symbol): Derive from
3194 general_symbol_info.
3195 <obj_section>: New method.
3196 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3197 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3198 (find_pc_sect_psymbol, fixup_psymbol_section)
3199 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3200 (print_partial_symbols, recursively_search_psymtabs)
3201 (compare_psymbols, psymbol_hash, psymbol_compare)
3202 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3203 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3204
3205 2018-07-26 Tom Tromey <tromey@redhat.com>
3206
3207 * dbxread.c (end_psymtab): Remove dead code.
3208
3209 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3210
3211 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3212 DWARF unwinders are disabled.
3213 * dwarf2-frame.c: Add dwarf2read.h include.
3214 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3215 disabled.
3216 (dwarf2_frame_unwinders_enabled_p): Define.
3217 (show_dwarf_unwinders_enabled_p): New function.
3218 (_initialize_dwarf2_frame): Register switch to control DWARF
3219 unwinder use.
3220 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3221 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3222 (show_dwarf_cmdlist): Remove static keyword.
3223 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3224 (show_dwarf_cmdlist): Declare.
3225 * NEWS: Document new feature.
3226
3227 2018-07-26 Tom de Vries <tdevries@suse.de>
3228
3229 PR breakpoints/23366
3230 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3231
3232 2018-07-26 Tom de Vries <tdevries@suse.de>
3233
3234 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3235 DW_AT_count can't be translated to a dynamic prop.
3236
3237 2018-07-25 Tom de Vries <tdevries@suse.de>
3238
3239 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3240 try/catch.
3241
3242 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3243
3244 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3245
3246 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3247
3248 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3249
3250 2018-07-24 Keith Seitz <keiths@redhat.comt
3251
3252 PR symtab/23010
3253 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3254 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3255 instead of add_symbol_to_list.
3256 (read_file_scope): Call prepare_one_comp_unit before reading
3257 any other DIEs.
3258
3259 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3262
3263 2018-07-24 Tom Tromey <tom@tromey.com>
3264
3265 * utils.c (malloc, realloc, free): Don't declare.
3266 * configure, config.in: Rebuild.
3267 * configure.ac: Don't check for declarations of free, malloc, or
3268 realloc.
3269
3270 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * aarch64-linux-nat.c
3273 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3274 variable.
3275 * arm-linux-nat.c (fetch_regs): Likewise.
3276 (store_regs): Likewise.
3277 (fetch_vfp_regs): Likewise.
3278 (store_vfp_regs): Likewise.
3279 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3280 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3281 (arm_linux_nat_target::insert_watchpoint): Likewise.
3282 (arm_linux_nat_target::remove_watchpoint): Likewise.
3283 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3284 Likewise.
3285 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3286 Likewise.
3287 * ppc-linux-nat.c (fetch_register): Likewise.
3288 (fetch_all_gp_regs): Likewise.
3289 (fetch_ppc_registers): Likewise.
3290 (store_all_gp_regs): Likewise.
3291 (store_ppc_registers): Likewise.
3292 (hwdebug_insert_point): Likewise.
3293 (can_use_watchpoint_cond_accel): Likewise.
3294 * remote-sim.c (gdb_os_write_stdout): Likewise.
3295
3296 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3297 Tom Tromey <tom@tromey.com>
3298
3299 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3300 test for it.
3301 * configure: Rebuild.
3302
3303 2018-07-22 Tom Tromey <tom@tromey.com>
3304
3305 * regformats/regdat.sh: Define xmltarget_${name} inside
3306 #ifndef IN_PROCESS_AGENT.
3307
3308 2018-07-22 Tom Tromey <tom@tromey.com>
3309
3310 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3311
3312 2018-07-22 Tom Tromey <tom@tromey.com>
3313
3314 * symfile.c (reread_symbols): Notify iter, not objfile.
3315
3316 2018-07-22 Tom Tromey <tom@tromey.com>
3317
3318 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3319 Use arch_ops.
3320 (ravenscar_thread_target::prepare_to_store): Likewise.
3321
3322 2018-07-22 Tom Tromey <tom@tromey.com>
3323
3324 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3325 unused variable. Call value_fetch_lazy when needed.
3326 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3327 Remove unused variable. Call value_fetch_lazy when needed.
3328
3329 2018-07-22 Tom Tromey <tom@tromey.com>
3330
3331 * m32c-tdep.c (mark_dma): Return void.
3332 (make_regs): Remove unused declarations.
3333
3334 2018-07-22 Tom Tromey <tom@tromey.com>
3335
3336 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3337 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3338 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3339 bkscm_get_valid_block_smob_arg_unsafe for effect.
3340
3341 2018-07-22 Tom Tromey <tom@tromey.com>
3342
3343 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3344 value_type.
3345
3346 2018-07-22 Tom Tromey <tom@tromey.com>
3347
3348 * windows-nat.c (saved_context): Conditionally define.
3349 * remote.c (remote_target::remote_btrace_maybe_reopen):
3350 Conditionally declare "warned".
3351 * inflow.c (sigquit_ours): Conditionally define.
3352 (new_tty): Move "tty" declaration inside #if.
3353 * guile/guile.c (guile_datadir): Conditionally define.
3354 * charset.c (set_be_le_names): Move some declarations inside #if.
3355 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3356 #if.
3357 (parse_xml_btrace_conf): Likewise.
3358
3359 2018-07-22 Tom Tromey <tom@tromey.com>
3360
3361 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3362
3363 2018-07-22 Tom Tromey <tom@tromey.com>
3364
3365 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3366 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3367 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3368 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3369 * stack.c (frame_apply_level_command): Remove unused variable.
3370 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3371 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3372 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3373 unused variable.
3374 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3375 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3376 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3377 variable.
3378 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3379 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3380 variable.
3381 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3382 Remove unused variable.
3383 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3384 variable.
3385 * common/tdesc.c (print_xml_feature::visit): Remove unused
3386 variable.
3387 * compile/compile-object-load.c (store_regs): Remove unused
3388 variables.
3389 * complaints.c (clear_complaints): Remove unused variable.
3390 * corelow.c (core_target_open): Remove unused variable.
3391 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3392 variable.
3393 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3394 variable.
3395 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3396 variable.
3397 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3398 variable.
3399 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3400 variable.
3401 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3402 variable.
3403 * ia64-tdep.c (examine_prologue): Remove unused variable.
3404 * infcall.c (run_inferior_call): Remove unused variable.
3405 * inferior.c (exit_inferior): Remove unused variable.
3406 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3407 * linespec.c (decode_line_2): Remove unused variable.
3408 * linux-nat.c (super_close): Remove.
3409 * linux-tdep.c (linux_info_proc): Remove unused variable.
3410 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3411 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3412 Remove unused variable.
3413 * parse.c (find_minsym_type_and_address): Remove unused variable.
3414 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3415 variable.
3416 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3417 variable.
3418 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3419 variables.
3420 * record-btrace.c (record_btrace_target::store_registers): Remove
3421 unused variable.
3422 (cmd_show_record_btrace_cpu): Remove unused variable.
3423 * riscv-tdep.c (riscv_register_reggroup_p)
3424 (riscv_push_dummy_call, riscv_return_value): Remove unused
3425 variable.
3426 * rust-exp.y (literal): Remove unused variable.
3427 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3428 unused variable.
3429 <STRUCTOP_ANONYMOUS>: Likewise.
3430 * s390-linux-tdep.c (s390_linux_init_abi_31)
3431 (s390_linux_init_abi_64): Remove unused variable.
3432 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3433 (file_select_thread, net_windows_open, _initialize_ser_windows):
3434 Remove unused variables.
3435 * symtab.c (find_pc_sect_line): Remove unused variable.
3436 * target-memory.c (compute_garbled_blocks): Remove unused
3437 variable.
3438 (target_write_memory_blocks): Remove unused variable.
3439 * target.c (target_stack::unpush): Remove unused variables.
3440 * tracepoint.c (start_tracing, all_tracepoint_actions)
3441 (merge_uploaded_trace_state_variables)
3442 (print_one_static_tracepoint_marker): Remove unused variable.
3443 * unittests/basic_string_view/element_access/char/1.cc (test01):
3444 Remove unused variable.
3445 * windows-nat.c (windows_continue, windows_add_all_dlls)
3446 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3447 Remove unused variables.
3448
3449 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3450
3451 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3452 attr_profile in HAVE_ELF.
3453 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3454 HAVE_ELF.
3455
3456 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3457
3458 * frame.c (frame_register_unwind): Change parameter name.
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.h (frame_register_unwind): Likewise.
3464 (frame_unwind_register): Likewise.
3465 (frame_unwind_register_value): Likewise.
3466 (frame_unwind_register_signed): Likewise.
3467 (frame_unwind_register_unsigned): Likewise.
3468 (frame_unwind_arch): Likewise.
3469
3470 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3471
3472 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3473 ISA maintenance.
3474
3475 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3476
3477 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3478 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3479 hand.
3480
3481 2018-07-20 Keith Seitz <keiths@redhat.com>
3482
3483 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3484 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3485 m_compunit_symtab, m_language>: Add "m_" prefix.
3486 Update all uses.
3487 * buildsym.c: Update all uses.
3488
3489 2018-07-20 Tom Tromey <tom@tromey.com>
3490
3491 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3492 * buildsym.h (record_line_ftype): Remove typedef.
3493
3494 2018-07-20 Tom Tromey <tom@tromey.com>
3495
3496 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3497 (end_expandable_symtab): Likewise.
3498 (end_symtab_get_static_block): Likewise.
3499 (end_symtab_from_static_block): Likewise.
3500 * buildsym-legacy.c (augment_type_symtab): Remove.
3501 (end_expandable_symtab): Remove.
3502 (end_symtab_get_static_block): Remove.
3503 (end_symtab_from_static_block): Remove.
3504
3505 2018-07-20 Tom Tromey <tom@tromey.com>
3506
3507 * dwarf2read.c: Include buildsym.h.
3508 (struct dwarf2_cu) <builder>: New method.
3509 (fixup_go_packaging): Update.
3510 (process_full_comp_unit, process_full_type_unit): Update. Don't
3511 use scoped_free_pendings.
3512 (using_directives): Add "cu" parameter, remove "language".
3513 (read_import_statement, setup_type_unit_groups, )
3514 (read_func_scope, read_lexical_block_scope)
3515 (dwarf2_record_block_ranges, read_namespace): Update.
3516 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3517 (lnp_state_machine::handle_end_sequence): Update.
3518 (class lnp_state_machine) <m_cu>: New member.
3519 <m_record_line_callback>: Remove.
3520 <m_currently_recording_lines>: New member.
3521 (lnp_state_machine::handle_set_file): Update.
3522 (noop_record_line): Remove.
3523 (dwarf_record_line_p): Add cu parameter.
3524 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3525 (lnp_state_machine::record_line)
3526 (lnp_state_machine::lnp_state_machine)
3527 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3528 (dwarf_decode_lines): Update.
3529 (dwarf2_start_subfile): Add cu parameter.
3530 (dwarf2_start_symtab, new_symbol): Update.
3531 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3532 Remove dwarf2_per_objfile parameter.
3533 (dwarf_decode_macros): Update.
3534
3535 2018-07-20 Tom Tromey <tom@tromey.com>
3536
3537 * stabsread.c (define_symbol): Update.
3538 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3539 * dwarf2read.c (new_symbol): Update.
3540 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3541 * cp-namespace.c: Include buildsym.h.
3542 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3543 * buildsym-legacy.c (get_buildsym_compunit): New function.
3544
3545 2018-07-20 Tom Tromey <tom@tromey.com>
3546
3547 * xcoffread.c: Include buildsym-legacy.h.
3548 * windows-nat.c: Include buildsym-legacy.h.
3549 * stabsread.c: Include buildsym-legacy.h.
3550 * mdebugread.c: Include buildsym-legacy.h.
3551 * buildsym-legacy.h: New file.
3552 * buildsym-legacy.c: New file, from buildsym.c.
3553 * go32-nat.c: Include buildsym-legacy.h.
3554 * dwarf2read.c: Include buildsym-legacy.h.
3555 * dbxread.c: Include buildsym-legacy.h.
3556 * cp-namespace.c: Include buildsym-legacy.h.
3557 * coffread.c: Include buildsym-legacy.h.
3558 * buildsym.h: Move some contents to buildsym-legacy.h.
3559 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3560 buildsym-legacy.c.
3561 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3562
3563 2018-07-20 Tom Tromey <tom@tromey.com>
3564
3565 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3566 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3567 (buildsym_compunit::buildsym_compunit)
3568 (buildsym_compunit::~buildsym_compunit)
3569 (buildsym_compunit::get_macro_table): Define.
3570
3571 2018-07-20 Tom Tromey <tom@tromey.com>
3572
3573 * buildsym.c (reset_symtab_globals): Remove.
3574 (buildsym_compunit::end_symtab_from_static_block): Update.
3575 (buildsym_compunit::augment_type_symtab): Update.
3576 (end_symtab_from_static_block): Call free_buildsym_compunit.
3577 (augment_type_symtab, end_symtab, end_expandable_symtab):
3578 Likewise.
3579
3580 2018-07-20 Tom Tromey <tom@tromey.com>
3581
3582 * arch-utils.c: Do not include buildsym.h.
3583 * mipsread.c: Do not include buildsym.h.
3584 * machoread.c: Do not include buildsym.h.
3585 * elfread.c: Do not include buildsym.h.
3586
3587 2018-07-20 Tom Tromey <tom@tromey.com>
3588
3589 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3590 initialization.
3591 (buildsym_compunit): Add new constructor.
3592 (struct buildsym_compunit) <get_last_source_file, finish_block,
3593 record_block_range, start_subfile, patch_subfile_names,
3594 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3595 set_last_source_start_addr, get_last_source_start_addr,
3596 get_local_using_directives, set_local_using_directives,
3597 get_global_using_directives, outermost_context_p,
3598 get_current_context_stack, get_context_stack_depth,
3599 get_current_subfile, get_local_symbols, get_file_symbols,
3600 get_global_symbols, record_debugformat, record_producer,
3601 push_context, pop_context, end_symtab_get_static_block,
3602 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3603 New public methods.
3604 <record_pending_block, finish_block_internal, make_blockvector,
3605 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3606 private methods.
3607 Update all users.
3608
3609 2018-05-22 Tom Tromey <tom@tromey.com>
3610
3611 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3612 parameter.
3613 (finish_block_internal): Update.
3614
3615 2018-07-20 Tom Tromey <tom@tromey.com>
3616
3617 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3618 parameter.
3619 (finish_block_internal): Update.
3620
3621 2018-07-20 Tom Tromey <tom@tromey.com>
3622
3623 * buildsym.h (EXTERN): Don't define or undef.
3624 * buildsym.c (EXTERN): Don't define.
3625
3626 2018-07-20 Tom Tromey <tom@tromey.com>
3627
3628 * buildsym.c: Remove TODO comment.
3629
3630 2018-07-20 Tom Tromey <tom@tromey.com>
3631
3632 * coffread.c (coff_symtab_read): Update.
3633 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3634 (xcoff_new_init): Update.
3635 * mipsread.c (mipscoff_new_init): Update.
3636 * mdebugread.c (mdebug_build_psymtabs): Update.
3637 * elfread.c (elf_new_init): Update.
3638 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3639 Update.
3640 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3641 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3642 (stabsect_build_psymtabs): Update.
3643 * buildsym.h (buildsym_init): Don't declare.
3644 * buildsym.c: Update comment.
3645 (prepare_for_building): Remove.
3646 (start_symtab, restart_symtab): Update.
3647 (reset_symtab_globals): Update comment.
3648 (buildsym_init): Remove.
3649
3650 2018-07-20 Tom Tromey <tom@tromey.com>
3651
3652 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3653 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3654 (read_enum_type, common_block_start, common_block_end)
3655 (cleanup_undefined_types_1, finish_global_stabs): Update.
3656 * mdebugread.c (psymtab_to_symtab_1): Update.
3657 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3658 (read_lexical_block_scope, new_symbol): Update.
3659 * dbxread.c (process_one_symbol): Update.
3660 * coffread.c (coff_symtab_read, process_coff_symbol)
3661 (coff_read_enum_type): Update.
3662 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3663 declare.
3664 (get_local_symbols, get_file_symbols, get_global_symbols): New
3665 functions.
3666 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3667 m_global_symbols.
3668 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3669 (~scoped_free_pendings): Update.
3670 (finish_block, prepare_for_building, reset_symtab_globals)
3671 (end_symtab_get_static_block, end_symtab_with_blockvector)
3672 (augment_type_symtab, push_context): Update.
3673 (get_local_symbols, get_file_symbols, get_global_symbols): New
3674 functions.
3675 (buildsym_init): Update.
3676
3677 2018-07-20 Tom Tromey <tom@tromey.com>
3678
3679 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3680 (process_full_type_unit): Likewise.
3681 (dwarf2_start_symtab): Set list_in_scope.
3682
3683 2018-07-20 Tom Tromey <tom@tromey.com>
3684
3685 * dwarf2read.c (process_psymtab_comp_unit_reader)
3686 (build_type_psymtabs_reader): Do not set list_in_scope.
3687
3688 2018-07-20 Tom Tromey <tom@tromey.com>
3689
3690 * buildsym.c (free_pendings): Remove.
3691 (add_symbol_to_list, scoped_free_pendings)
3692 (finish_block_internal, buildsym_init): Update.
3693
3694 2018-07-20 Tom Tromey <tom@tromey.com>
3695
3696 * xcoffread.c (read_xcoff_symtab): Update.
3697 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3698 Update.
3699 * dbxread.c (process_one_symbol): Update.
3700 * coffread.c (coff_symtab_read): Update.
3701 * buildsym.h (finish_block): Update.
3702 * buildsym.c (finish_block): Remove "listhead" argument.
3703 (end_symtab_get_static_block): Update.
3704
3705 2018-07-20 Tom Tromey <tom@tromey.com>
3706
3707 * buildsym.h (class scoped_free_pendings): Remove constructor.
3708 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3709 method.
3710 <m_pending_block_obstack, m_pending_blocks>: New members.
3711 (pending_block_obstack, pending_blocks): Remove.
3712 (scoped_free_pendings::scoped_free_pendings): Default.
3713 (~scoped_free_pendings): Update.
3714 (free_pending_blocks): Remove.
3715 (finish_block_internal, record_pending_block, make_blockvector)
3716 (end_symtab_get_static_block, augment_type_symtab, push_context)
3717 (buildsym_init): Update.
3718
3719 2018-07-20 Tom Tromey <tom@tromey.com>
3720
3721 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3722 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3723 members.
3724 (pending_addrmap, pending_addrmap_obstack)
3725 (pending_addrmap_interesting): Remove.
3726 (scoped_free_pendings, record_block_range, make_blockvector)
3727 (prepare_for_building, reset_symtab_globals, buildsym_init):
3728 Update.
3729
3730 2018-07-20 Tom Tromey <tom@tromey.com>
3731
3732 * xcoffread.c (process_linenos): Update.
3733 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3734 * mdebugread.c (psymtab_to_symtab_1): Update.
3735 * dwarf2read.c (setup_type_unit_groups)
3736 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3737 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3738 * dbxread.c (process_one_symbol): Update.
3739 * coffread.c (coff_symtab_read, enter_linenos)
3740 (process_coff_symbol): Update.
3741 * buildsym.h (current_subfile): Don't declare.
3742 (get_current_subfile): Declare.
3743 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3744 member.
3745 (start_subfile, free_buildsym_compunit, push_subfile)
3746 (prepare_for_building, start_symtab): Update.
3747 (get_current_subfile): New function.
3748
3749 2018-07-20 Tom Tromey <tom@tromey.com>
3750
3751 * coffread.c (coff_symtab_read): Update.
3752 * xcoffread.c (read_xcoff_symtab): Update.
3753 * dwarf2read.c (new_symbol): Update.
3754 (read_func_scope, read_lexical_block_scope): Update.
3755 * dbxread.c (process_one_symbol): Update.
3756 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3757 (outermost_context_p): Remove macro.
3758 (outermost_context_p, get_current_context_stack)
3759 (get_context_stack_depth): Declare.
3760 (pop_context): Return struct context_stack.
3761 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3762 member.
3763 (context_stack_size): Remove.
3764 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3765 (prepare_for_building, end_symtab_get_static_block)
3766 (augment_type_symtab, push_context): Update.
3767 (pop_context): Return struct context_stack.
3768 (outermost_context_p, get_current_context_stack)
3769 (get_context_stack_depth): New functions.
3770 (buildsym_init): Update.
3771
3772 2018-07-20 Tom Tromey <tom@tromey.com>
3773
3774 * rust-exp.y: Now a pure parser. Update all rules.
3775 (%union): Move earlier.
3776 (current_parser, work_obstack): Remove globals.
3777 (rust_parser, ~rust_parser): Update.
3778 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3779 lex_character, lex_number, lex_string, lex_identifier,
3780 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3781 convert_name, convert_params_to_expression,
3782 convert_ast_to_expression, ast_basic_type, ast_operation,
3783 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3784 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3785 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3786 ast_array_type, ast_slice_type, ast_reference_type,
3787 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3788 (rust_parse): Update.
3789 (rustyyerror, rustyylex): Add parser parameter.
3790 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3791 (rust_lex_stringish_test, rust_lex_test_sequence)
3792 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3793 (rust_lex_test_push_back, rust_lex_tests): Update.
3794
3795 2018-07-19 Pedro Alves <palves@redhat.com>
3796
3797 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3798 gdb::unique_xmalloc_ptr.
3799 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3800 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3801 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3802 copy-initialization.
3803 * guile/scm-pretty-print.c (ppscm_print_children): Use
3804 gdb::unique_xmalloc_ptr instead of cleanups.
3805 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3806 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3807 gdb::unique_xmalloc_ptr.
3808 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3809 Adjust to use gdb::unique_xmalloc_ptr.
3810 * guile/scm-utils.c (extract_arg): Adjust.
3811 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3812 gdb::unique_xmalloc_ptr instead of a cleanup.
3813
3814 2018-07-19 Tom Tromey <tom@tromey.com>
3815
3816 * utils.c (do_value_free_to_mark)
3817 (make_cleanup_value_free_to_mark): Remove.
3818 * utils.h (make_cleanup_value_free_to_mark): Remove.
3819
3820 2018-07-19 Pedro Alves <palves@redhat.com>
3821
3822 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3823 forwarding reference.
3824
3825 2018-07-18 Pedro Alves <palves@redhat.com>
3826
3827 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3828 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3829 cleanup.
3830
3831 2018-07-18 Pedro Alves <palves@redhat.com>
3832
3833 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3834 exceptions.
3835 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3836 (gdbscm_wrap): New.
3837 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3838 directly instead of a cleanup.
3839 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3840 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3841 (vlscm_binop_gdbthrow): New, factored out from ...
3842 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3843 (vlscm_rich_compare): Use gdbscm_wrap.
3844 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3845 instead of a cleanup.
3846 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3847 cleanup.
3848 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3849 Use xfree directly instead of a cleanup.
3850 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3851 Adjust to use gdbscm_wrap and scoped_value_mark.
3852 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3853 (gdbscm_value_address, gdbscm_value_dereference)
3854 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3855 scoped_value_mark.
3856 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3857 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3858 scoped_value_mark.
3859 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3860 gdbscm_wrap and scoped_value_mark.
3861 (gdbscm_value_to_string): Use xfree directly instead of a
3862 cleanup. Move 'buffer' unique_ptr to TRY scope.
3863 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3864 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3865 scoped_value_mark.
3866 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3867 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3868 scoped_value_mark.
3869 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3870 gdbscm_wrap.
3871
3872 2018-07-18 Tom de Vries <tdevries@suse.de>
3873
3874 * findvar.c (default_read_var_value): Also resolve dynamic type for
3875 LOC_OPTIMIZED_OUT vars.
3876
3877 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3878
3879 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3880 decoding.
3881
3882 2018-07-17 Tom Tromey <tom@tromey.com>
3883
3884 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3885 (compute_enum_list, pascm_set_param_value_x)
3886 (gdbscm_parameter_value): Update.
3887 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3888 (gdbscm_scm_to_host_string): Update.
3889 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3890 Update.
3891 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3892 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3893 * guile/scm-string.c (gdbscm_scm_to_string): Return
3894 unique_xmalloc_ptr.
3895 (gdbscm_scm_to_host_string): Likewise.
3896
3897 2018-07-17 Tom Tromey <tom@tromey.com>
3898
3899 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3900 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3901 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3902 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3903 unique_xmalloc_ptr.
3904
3905 2018-07-17 Tom Tromey <tom@tromey.com>
3906
3907 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3908 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3909 Update.
3910 * guile/scm-cmd.c (cmdscm_function): Update.
3911 * guile/scm-pretty-print.c
3912 (ppscm_print_exception_unless_memory_error): Update.
3913 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3914 Return unique_xmalloc_ptr.
3915
3916 2018-07-17 Tom Tromey <tom@tromey.com>
3917
3918 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3919 Use string_printf.
3920
3921 2018-07-17 Jim Wilson <jimw@sifive.com>
3922
3923 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3924 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3925 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3926 unecessary braces after EF_RISCV_RVC test. Delete call to
3927 set_gdbarch_decr_pc_after_break.
3928
3929 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3930 RISCV_LAST_FP_REGNUM + 1.
3931 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3932
3933 2018-07-17 Tom Tromey <tom@tromey.com>
3934
3935 * configure.ac: Remove --disable-gdbcli.
3936 * configure: Rebuild.
3937 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3938 (SUBDIR_CLI_CFLAGS): Remove.
3939 (SFILES): Use SUBDIR_CLI_SRCS.
3940 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3941
3942 2018-07-17 Tom Tromey <tom@tromey.com>
3943
3944 PR gdb/18624:
3945 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3946
3947 2018-07-16 Jim Wilson <jimw@sifive.com>
3948
3949 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3950
3951 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3952
3953 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3954 variable.
3955 (libunwind_frame_sniffer): Likewise.
3956 (libunwind_frame_prev_register): Likewise.
3957 (libunwind_sigtramp_frame_sniffer): Likewise.
3958 * ia64-tdep.c (ia64_access_reg): Likewise.
3959 (ia64_access_rse_reg): Likewise.
3960 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3961 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3962
3963 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3964
3965 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3966
3967 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * remote-sim.c (gdbsim_target::close,
3970 gdbsim_target::mourn_inferior): Remove unused variables.
3971
3972 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3973
3974 * ia64-tdep.c (ktab_buf): New global.
3975 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3976 (get_kernel_table): Adjust.
3977
3978 2018-07-16 Tom Tromey <tom@tromey.com>
3979
3980 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3981 * dwarf2read.c (using_directives, new_symbol): Use
3982 outermost_context_p.
3983 * dbxread.c (process_one_symbol): Use outermost_context_p.
3984 * coffread.c (coff_symtab_read): Use outermost_context_p.
3985
3986 2018-07-16 Tom Tromey <tom@tromey.com>
3987
3988 * dwarf2read.c (using_directives, read_func_scope)
3989 (read_lexical_block_scope): Update.
3990 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3991 * buildsym.h (local_using_directives, global_using_directives):
3992 Don't declare.
3993 (get_local_using_directives, set_local_using_directives)
3994 (get_global_using_directives): Declare.
3995 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3996 m_global_using_directives>: New members.
3997 (finish_block_internal, prepare_for_building)
3998 (reset_symtab_globals, end_symtab_get_static_block)
3999 (push_context): Update.
4000 (get_local_using_directives, set_local_using_directives)
4001 (get_global_using_directives): New functions.
4002 (buildsym_init): Update.
4003
4004 2018-07-16 Tom Tromey <tom@tromey.com>
4005
4006 * xcoffread.c (xcoff_initial_scan): Don't call
4007 free_pending_blocks.
4008 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4009 * buildsym.h (class scoped_free_pendings): Add constructor.
4010 (free_pending_blocks): Don't declare.
4011 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4012 (free_pending_blocks): Now static.
4013
4014 2018-07-16 Tom Tromey <tom@tromey.com>
4015
4016 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4017 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4018 member.
4019 (struct subfile_stack): Remove.
4020 (subfile_stack): Remove.
4021 (push_subfile, pop_subfile, buildsym_init): Update.
4022
4023 2018-07-16 Tom Tromey <tom@tromey.com>
4024
4025 * buildsym.c (push_subfile): Use gdb_assert.
4026 (pop_subfile): Use gdb_assert.
4027
4028 2018-07-16 Tom Tromey <tom@tromey.com>
4029
4030 * buildsym.h (merge_symbol_lists): Remove.
4031 * buildsym.c (merge_symbol_lists): Remove.
4032
4033 2018-07-16 Tom Tromey <tom@tromey.com>
4034
4035 * stabsread.c (scan_file_globals): Update comment.
4036 * stabsread.h (scan_file_globals): Move from buildsym.h.
4037 * buildsym.h (scan_file_globals): Move to stabsread.h.
4038
4039 2018-07-16 Tom Tromey <tom@tromey.com>
4040
4041 * xcoffread.c (xcoff_new_init): Update.
4042 * mipsread.c (mipscoff_new_init): Update.
4043 * mdebugread.c (mdebug_build_psymtabs): Update.
4044 * elfread.c (elf_new_init): Update.
4045 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4046 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4047 * buildsym.h (buildsym_new_init): Don't declare.
4048 * buildsym.c (buildsym_new_init): Remove.
4049
4050 2018-07-16 Tom Tromey <tom@tromey.com>
4051
4052 * stabsread.h (within_function): Move from buildsym.h.
4053 * stabsread.c (start_stabs): Clear within_function.
4054 * coffread.c (coff_start_symtab): Clear within_function.
4055 * buildsym.h (within_function): Move to stabsread.h.
4056 * buildsym.c (prepare_for_building): Update.
4057
4058 2018-07-16 Tom Tromey <tom@tromey.com>
4059
4060 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4061 * dwarf2read.c (dwarf2_start_symtab): Don't set
4062 processing_gcc_compilation.
4063 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4064
4065 2018-07-16 Tom Tromey <tom@tromey.com>
4066
4067 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4068 (next_symbol_text_func): Move from buildsym.h.
4069 * stabsread.c (hashname): Move from buildsym.c.
4070 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4071 (next_symbol_text_func, hashname): Move to stabsread.h.
4072 * buildsym.c: Don't include bcache.h
4073 (hashname): Move to stasbread.c.
4074
4075 2018-07-16 Tom Tromey <tom@tromey.com>
4076
4077 * buildsym.h (context_stack_size): Don't declare.
4078 * buildsym.c (context_stack_size): New global.
4079
4080 2018-07-16 Tom Tromey <tom@tromey.com>
4081
4082 * dbxread.c (processing_acc_compilation): New global.
4083 * buildsym.h (processing_acc_compilation): Don't declare.
4084
4085 2018-07-16 Tom Tromey <tom@tromey.com>
4086
4087 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4088 * dbxread.c (read_ofile_symtab): Update.
4089 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4090 * buildsym.h (last_source_start_addr): Remove.
4091 (set_last_source_start_addr, get_last_source_start_addr):
4092 Declare.
4093 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4094 parameter.
4095 (struct buildsym_compunit) <m_last_source_start_addr>: New
4096 member.
4097 (prepare_for_building): Remove start_addr parameter.
4098 (start_symtab, restart_symtab, end_symtab_get_static_block)
4099 (end_symtab_with_blockvector): Update.
4100 (set_last_source_start_addr, get_last_source_start_addr): New
4101 functions.
4102
4103 2018-07-16 Tom Tromey <tom@tromey.com>
4104
4105 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4106 member.
4107 (have_line_numbers): Remove.
4108 (record_line, prepare_for_building, end_symtab_get_static_block)
4109 (augment_type_symtab): Update.
4110
4111 2018-07-16 Tom Tromey <tom@tromey.com>
4112
4113 * buildsym.c (~buildsym_compunit): Free the macro table.
4114 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4115 methods.
4116 <m_pending_macros>: New member.
4117 (pending_macros): Remove.
4118 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4119 (reset_symtab_globals, end_symtab_get_static_block)
4120 (end_symtab_with_blockvector, augment_type_symtab)
4121 (buildsym_init): Update.
4122
4123 2018-07-16 Tom Tromey <tom@tromey.com>
4124
4125 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4126 parameter.
4127 (buildsym_compunit::set_last_source_file): New method.
4128 <m_last_source_file>: New member.
4129 (prepare_for_building): Remove "name" parameter.
4130 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4131 (last_source_file): Remove.
4132 (set_last_source_file, get_last_source_file): Update.
4133
4134 2018-07-16 Tom Tromey <tom@tromey.com>
4135
4136 * buildsym.c (prepare_for_building): Add assert.
4137
4138 2018-07-16 Tom Tromey <tom@tromey.com>
4139
4140 * buildsym.c (~buildsym_compunit): Update.
4141 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4142 (start_subfile, patch_subfile_names)
4143 (end_symtab_with_blockvector): Update.
4144
4145 2018-07-16 Tom Tromey <tom@tromey.com>
4146
4147 * buildsym.c (struct buildsym_compunit): Add constructor,
4148 destructor, initializers.
4149 (start_buildsym_compunit): Remove.
4150 (free_buildsym_compunit): Use "delete".
4151 (start_symtab, restart_symtab): Use "new".
4152
4153 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4154
4155 * symfile.c (set_objfile_default_section_offset): Remove struct
4156 keyword.
4157
4158 2018-07-14 Stafford Horne <shorne@gmail.com>
4159
4160 * (Responsible Maintainers): Add myself as or1k maintainer.
4161
4162 2018-07-13 Tom Tromey <tom@tromey.com>
4163
4164 * symfile.c (set_objfile_default_section_offset): Use extra braces
4165 around initializer.
4166
4167 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4168
4169 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4170 non-branching basr.
4171
4172 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4173
4174 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4175 unittests/cli-utils-selftests.c
4176 * unittests/cli-utils-selftests.c: New file.
4177
4178 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4179
4180 * NEWS: Mention new commands. Mention change to 'thread apply'.
4181
4182 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4183
4184 * thread.c (thr_try_catch_cmd): New function.
4185 (thread_apply_all_command): Handle qcs flags.
4186 (thread_apply_command): Handle qcs flags.
4187 (taas_command): New function.
4188 (tfaas_command): New function.
4189 (_initialize_thread): Update to setup the new commands 'taas
4190 and 'tfaas'. Change doc string for 'thread apply'.
4191
4192 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4193
4194 * stack.c: (trailing_outermost_frame): New function, mostly
4195 extracted from backtrace_command_1.
4196 (leading_innermost_frame): New function.
4197 (backtrace_command_1): Update to call trailing_outermost_frame.
4198 (frame_apply_command_count): New function.
4199 (frame_apply_level_command): New function.
4200 (frame_apply_all_command): New function.
4201 (frame_apply_command): New function.
4202 (faas_command): New function.
4203 (frame_cmd_list): New variable.
4204 (_initialize_stack): Update to setup the new commands 'frame apply'
4205 and 'faas'.
4206
4207 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4208
4209 * cli-utils.c (number_or_range_parser::get_number): Only handle
4210 numbers or convenience var as numbers.
4211 (parse_flags): New function.
4212 (parse_flags_qcs): New function.
4213 (number_or_range_parser::finished): Ensure parsing end is detected
4214 before end of string.
4215 * cli-utils.h (parse_flags): New function.
4216 (parse_flags_qcs): New function.
4217 (number_or_range_parser): Remove m_finished bool.
4218 (number_or_range_parser::skip_range): Set m_in_range to false.
4219
4220 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4221
4222 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4223 on Windows.
4224
4225 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4226 Jan Kratochvil <jan.kratochvil@redhat.com>
4227 Paul Fertser <fercerpav@gmail.com>
4228 Tsutomu Seki <sekiriki@gmail.com>
4229 Pedro Alves <palves@redhat.com>
4230
4231 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4232 'unittests/parse-connection-spec-selftests.c'.
4233 (COMMON_SFILES): Add 'common/netstuff.c'.
4234 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4235 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4236 * common/netstuff.c: New file.
4237 * common/netstuff.h: New file.
4238 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4239 (wait_for_connect): Update comment. New parameter
4240 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4241 Use 'sock' directly instead of 'scb->fd'.
4242 (try_connect): New function, with code from 'net_open'.
4243 (net_open): Rewrite main loop to deal with multiple
4244 sockets/addresses. Handle IPv6-style hostnames; implement
4245 support for IPv6 connections.
4246 * unittests/parse-connection-spec-selftests.c: New file.
4247
4248 2018-07-11 Pedro Alves <palves@redhat.com>
4249
4250 PR gdb/23377
4251 * remote.c (remote_target::remote_detach_pid): Call
4252 set_current_process.
4253
4254 2018-07-11 Pedro Alves <palves@redhat.com>
4255
4256 * h8300-tdep.c (h8300_gdbarch_init): Remove
4257 set_gdbarch_ecoff_reg_to_regnum calls.
4258
4259 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4260
4261 PR c++/23373
4262 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4263 offsets/sizes for static members of a class/struct.
4264
4265 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4266
4267 * target-descriptions.c (tdesc_register_bitsize): Rename.
4268 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4269 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4270 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4271
4272 2018-07-10 Tom Tromey <tom@tromey.com>
4273
4274 * breakpoint.c (moribund_locations): Now static and a
4275 std::vector.
4276 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4277 (build_bpstat_chain, update_global_location_list)
4278 (breakpoint_retire_moribund): Update.
4279 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4280 VEC.
4281
4282 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4283
4284 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4285 (riscv_register_reggroup_p): Use new function, remove unneeded
4286 parenthesis.
4287 (riscv_push_dummy_call): Extend assert to compare against xlen or
4288 flen based on register type.
4289
4290 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4291
4292 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4293
4294 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4295
4296 * remote.c (show_hardware_watchpoint_limit): New function.
4297 (show_hardware_watchpoint_length_limit): New function.
4298 (show_hardware_breakpoint_limit): New function.
4299 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4300 where appropriate, update help text.
4301
4302 2018-07-09 Tom Tromey <tom@tromey.com>
4303
4304 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4305 (CLIBS): Don't mention NAT_CLIBS.
4306
4307 2018-07-09 Tom Tromey <tom@tromey.com>
4308
4309 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4310 (LIBGDB_OBS, clean mostlyclean): Update.
4311 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4312
4313 2018-07-09 Tom Tromey <tom@tromey.com>
4314
4315 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4316 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4317 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4318
4319 2018-07-09 Tom Tromey <tom@tromey.com>
4320
4321 * Makefile.in (ALLDEPFILES): Remove exec.c.
4322 (COMMON_OBS): Remove exec.o.
4323 (COMMON_SFILES): Add exec.c.
4324
4325 2018-07-09 Tom Tromey <tom@tromey.com>
4326
4327 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4328
4329 2018-07-09 Tom Tromey <tom@tromey.com>
4330
4331 * Makefile.in (clean mostlyclean): Remove stamp-version.
4332 (version.c): Depend on stamp-version.
4333 (stamp-version): New rule, from version.c rule.
4334
4335 2018-07-09 Tom Tromey <tom@tromey.com>
4336
4337 * Makefile.in (init.c): Depend on stamp-init.
4338 (stamp-init): New rule, from init.c rule.
4339 (clean mostlyclean): Remove stamp-init.
4340
4341 2018-07-09 Tom Tromey <tom@tromey.com>
4342
4343 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4344 SUBDIR_GCC_COMPILE_SRCS.
4345
4346 2018-07-09 Tom Tromey <tom@tromey.com>
4347
4348 * Makefile.in (init.c): Remove some unused sed rules.
4349
4350 2018-07-09 Tom Tromey <tom@tromey.com>
4351
4352 * Makefile.in (TSOBS): Remove.
4353 (INIT_FILES): Update.
4354 (LIBGDB_OBS): Update.
4355 (COMMON_SFILES): Add inflow.c.
4356 (SFILES): Remove inflow.c.
4357
4358 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4359
4360 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4361
4362 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4363
4364 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4365 get_saveloc_name, is_signal_frame_name, step_name,
4366 init_remote_name, create_addr_space_name,
4367 destroy_addr_space_name, search_unwind_table_name,
4368 find_dyn_list_name): Constify.
4369
4370 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4371
4372 * darwin-nat.c (darwin_pthread_kill): New function.
4373 (darwin_resume_thread): Use darwin_pthread_kill.
4374
4375 2018-07-05 Tom de Vries <tdevries@suse.de>
4376
4377 * macroexp.c (macro_buffer) <operator=>: New member function.
4378
4379 2018-07-04 Tom Tromey <tom@tromey.com>
4380
4381 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4382
4383 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4384
4385 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4386 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4387 * maint.c: Likewise.
4388 * top.c: Likewise.
4389
4390 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4391
4392 * NEWS: Create a new section for the next release branch.
4393 Rename the section of the current branch, now that it has
4394 been cut.
4395
4396 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4397
4398 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4399 * version.in: Bump version to 8.2.50.DATE-git.
4400
4401 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4402 Pedro Alves <palves@redhat.com>
4403
4404 * linux-nat.c (linux_init_ptrace): Rename to ...
4405 (linux_init_ptrace_procfs): ... this. Call
4406 linux_proc_init_warnings.
4407 (linux_nat_target::post_attach)
4408 (linux_nat_target::post_startup_inferior): Adjust.
4409 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4410 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4411
4412 2018-07-04 Tom de Vries <tdevries@suse.de>
4413
4414 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4415 check ...
4416 (read_comp_unit_head): ... here.
4417
4418 2018-07-03 Tom Tromey <tom@tromey.com>
4419
4420 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4421 (stop_tracing, tstatus_command)
4422 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4423 (print_one_static_tracepoint_marker): Update.
4424 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4425 std::vector.
4426 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4427 VEC.
4428 (all_tracepoints, static_tracepoints_here): Return std::vector.
4429
4430 2018-07-03 Tom Tromey <tom@tromey.com>
4431
4432 * common/ptid.c (ptid_equal): Remove.
4433 * common/ptid.h (ptid_equal): Don't declare.
4434 * ada-tasks.c: Update.
4435 * breakpoint.c: Update.
4436 * common/agent.c: Update.
4437 * corelow.c: Update.
4438 * darwin-nat-info.c: Update.
4439 * darwin-nat.c: Update.
4440 * dcache.c: Update.
4441 * dtrace-probe.c: Update.
4442 * dummy-frame.c: Update.
4443 * fbsd-nat.c: Update.
4444 * frame.c: Update.
4445 * gdbthread.h: Update.
4446 * gnu-nat.c: Update.
4447 * go32-nat.c: Update.
4448 * inf-loop.c: Update.
4449 * inf-ptrace.c: Update.
4450 * infcall.c: Update.
4451 * infcmd.c: Update.
4452 * inflow.c: Update.
4453 * infrun.c: Update.
4454 * linux-fork.c: Update.
4455 * linux-nat.c: Update.
4456 * linux-thread-db.c: Update.
4457 * mi/mi-cmd-var.c: Update.
4458 * mi/mi-interp.c: Update.
4459 * mi/mi-main.c: Update.
4460 * nto-procfs.c: Update.
4461 * ppc-linux-tdep.c: Update.
4462 * procfs.c: Update.
4463 * python/py-inferior.c: Update.
4464 * python/py-record-btrace.c: Update.
4465 * python/py-record.c: Update.
4466 * ravenscar-thread.c: Update.
4467 * regcache.c: Update.
4468 * remote-sim.c: Update.
4469 * remote.c: Update.
4470 * sol-thread.c: Update.
4471 * solib.c: Update.
4472 * target.c: Update.
4473 * tui/tui-stack.c: Update.
4474 * varobj.c: Update.
4475 * windows-nat.c: Update.
4476 * windows-tdep.c: Update.
4477
4478 2018-07-03 Tom Tromey <tom@tromey.com>
4479
4480 * common/ptid.c (ptid_match): Remove.
4481 * common/ptid.h (ptid_match): Don't declare.
4482 * fbsd-nat.c: Update.
4483 * infcmd.c: Update.
4484 * infrun.c: Update.
4485 * linux-nat.c: Update.
4486 * record-btrace.c: Update.
4487 * regcache.c: Update.
4488 * remote.c: Update.
4489
4490 2018-07-03 Tom Tromey <tom@tromey.com>
4491
4492 * common/ptid.c (ptid_tid_p): Remove.
4493 * common/ptid.h (ptid_tid_p): Don't declare.
4494 * sol-thread.c: Update.
4495
4496 2018-07-03 Tom Tromey <tom@tromey.com>
4497
4498 * common/ptid.c (ptid_lwp_p): Remove.
4499 * common/ptid.h (ptid_lwp_p): Don't declare.
4500 * fbsd-nat.c: Update.
4501 * linux-nat.c: Update.
4502 * nat/linux-procfs.c: Update.
4503 * nat/x86-linux-dregs.c: Update.
4504 * sol-thread.c: Update.
4505
4506 2018-07-03 Tom Tromey <tom@tromey.com>
4507
4508 * common/ptid.c (ptid_is_pid): Remove.
4509 * common/ptid.h (ptid_is_pid): Don't declare.
4510 * infrun.c: Update.
4511 * linux-nat.c: Update.
4512 * mi/mi-interp.c: Update.
4513 * remote.c: Update.
4514 * thread.c: Update.
4515
4516 2018-07-03 Tom Tromey <tom@tromey.com>
4517
4518 * common/ptid.c (ptid_get_tid): Remove.
4519 * common/ptid.h (ptid_get_tid): Don't declare.
4520 * ada-tasks.c: Update.
4521 * aix-thread.c: Update.
4522 * bsd-uthread.c: Update.
4523 * darwin-nat.c: Update.
4524 * fbsd-nat.c: Update.
4525 * i386-darwin-nat.c: Update.
4526 * infrun.c: Update.
4527 * linux-tdep.c: Update.
4528 * nto-procfs.c: Update.
4529 * ppc-ravenscar-thread.c: Update.
4530 * python/py-infthread.c: Update.
4531 * ravenscar-thread.c: Update.
4532 * sol-thread.c: Update.
4533 * sparc-ravenscar-thread.c: Update.
4534 * windows-nat.c: Update.
4535
4536 2018-07-03 Tom Tromey <tom@tromey.com>
4537
4538 * common/ptid.c (ptid_get_lwp): Remove.
4539 * common/ptid.h (ptid_get_lwp): Don't declare.
4540 * aarch64-linux-nat.c: Update.
4541 * ada-tasks.c: Update.
4542 * aix-thread.c: Update.
4543 * amd64-linux-nat.c: Update.
4544 * arm-linux-nat.c: Update.
4545 * corelow.c: Update.
4546 * fbsd-nat.c: Update.
4547 * fbsd-tdep.c: Update.
4548 * gnu-nat.c: Update.
4549 * i386-cygwin-tdep.c: Update.
4550 * i386-gnu-nat.c: Update.
4551 * i386-linux-nat.c: Update.
4552 * ia64-linux-nat.c: Update.
4553 * inf-ptrace.c: Update.
4554 * infrun.c: Update.
4555 * linux-fork.c: Update.
4556 * linux-nat.c: Update.
4557 * linux-tdep.c: Update.
4558 * linux-thread-db.c: Update.
4559 * mips-linux-nat.c: Update.
4560 * nat/aarch64-linux-hw-point.c: Update.
4561 * nat/aarch64-linux.c: Update.
4562 * nat/linux-btrace.c: Update.
4563 * nat/linux-osdata.c: Update.
4564 * nat/linux-procfs.c: Update.
4565 * nat/x86-linux-dregs.c: Update.
4566 * obsd-nat.c: Update.
4567 * ppc-fbsd-nat.c: Update.
4568 * ppc-linux-nat.c: Update.
4569 * procfs.c: Update.
4570 * python/py-infthread.c: Update.
4571 * ravenscar-thread.c: Update.
4572 * remote.c: Update.
4573 * s390-linux-nat.c: Update.
4574 * sol-thread.c: Update.
4575 * sol2-tdep.c: Update.
4576 * spu-linux-nat.c: Update.
4577 * x86-linux-nat.c: Update.
4578 * xtensa-linux-nat.c: Update.
4579
4580 2018-07-03 Tom Tromey <tom@tromey.com>
4581
4582 * common/ptid.c (ptid_get_pid): Remove.
4583 * common/ptid.h (ptid_get_pid): Don't declare.
4584 * aarch64-linux-nat.c: Update.
4585 * ada-lang.c: Update.
4586 * aix-thread.c: Update.
4587 * alpha-bsd-nat.c: Update.
4588 * amd64-fbsd-nat.c: Update.
4589 * amd64-linux-nat.c: Update.
4590 * arm-linux-nat.c: Update.
4591 * arm-nbsd-nat.c: Update.
4592 * auxv.c: Update.
4593 * break-catch-syscall.c: Update.
4594 * breakpoint.c: Update.
4595 * bsd-uthread.c: Update.
4596 * corelow.c: Update.
4597 * ctf.c: Update.
4598 * darwin-nat.c: Update.
4599 * fbsd-nat.c: Update.
4600 * fbsd-tdep.c: Update.
4601 * gcore.c: Update.
4602 * gnu-nat.c: Update.
4603 * hppa-nbsd-nat.c: Update.
4604 * hppa-obsd-nat.c: Update.
4605 * i386-fbsd-nat.c: Update.
4606 * ia64-linux-nat.c: Update.
4607 * inf-ptrace.c: Update.
4608 * infcmd.c: Update.
4609 * inferior.c: Update.
4610 * inferior.h: Update.
4611 * inflow.c: Update.
4612 * infrun.c: Update.
4613 * linux-fork.c: Update.
4614 * linux-nat.c: Update.
4615 * linux-tdep.c: Update.
4616 * linux-thread-db.c: Update.
4617 * m68k-bsd-nat.c: Update.
4618 * mi/mi-interp.c: Update.
4619 * mi/mi-main.c: Update.
4620 * mips-linux-nat.c: Update.
4621 * mips-nbsd-nat.c: Update.
4622 * mips64-obsd-nat.c: Update.
4623 * nat/aarch64-linux-hw-point.c: Update.
4624 * nat/aarch64-linux.c: Update.
4625 * nat/linux-btrace.c: Update.
4626 * nat/linux-osdata.c: Update.
4627 * nat/linux-procfs.c: Update.
4628 * nat/x86-linux-dregs.c: Update.
4629 * nto-procfs.c: Update.
4630 * obsd-nat.c: Update.
4631 * ppc-linux-nat.c: Update.
4632 * ppc-nbsd-nat.c: Update.
4633 * ppc-obsd-nat.c: Update.
4634 * proc-service.c: Update.
4635 * procfs.c: Update.
4636 * python/py-inferior.c: Update.
4637 * python/py-infthread.c: Update.
4638 * ravenscar-thread.c: Update.
4639 * record.c: Update.
4640 * remote-sim.c: Update.
4641 * remote.c: Update.
4642 * rs6000-nat.c: Update.
4643 * s390-linux-nat.c: Update.
4644 * sh-nbsd-nat.c: Update.
4645 * sol-thread.c: Update.
4646 * sparc-nat.c: Update.
4647 * sparc64-tdep.c: Update.
4648 * spu-linux-nat.c: Update.
4649 * spu-tdep.c: Update.
4650 * target-debug.h: Update.
4651 * target.c: Update.
4652 * thread.c: Update.
4653 * tid-parse.c: Update.
4654 * tracefile-tfile.c: Update.
4655 * vax-bsd-nat.c: Update.
4656 * windows-nat.c: Update.
4657 * x86-linux-nat.c: Update.
4658 * x86-nat.c: Update.
4659
4660 2018-07-03 Tom Tromey <tom@tromey.com>
4661
4662 * common/ptid.c (pid_to_ptid): Remove.
4663 * common/ptid.h (pid_to_ptid): Don't declare.
4664 * aix-thread.c: Update.
4665 * arm-linux-nat.c: Update.
4666 * common/ptid.c: Update.
4667 * common/ptid.h: Update.
4668 * corelow.c: Update.
4669 * ctf.c: Update.
4670 * darwin-nat.c: Update.
4671 * fbsd-nat.c: Update.
4672 * fork-child.c: Update.
4673 * gnu-nat.c: Update.
4674 * go32-nat.c: Update.
4675 * inf-ptrace.c: Update.
4676 * infcmd.c: Update.
4677 * inferior.c: Update.
4678 * infrun.c: Update.
4679 * linux-fork.c: Update.
4680 * linux-nat.c: Update.
4681 * nat/aarch64-linux-hw-point.c: Update.
4682 * nat/fork-inferior.c: Update.
4683 * nat/x86-linux-dregs.c: Update.
4684 * nto-procfs.c: Update.
4685 * obsd-nat.c: Update.
4686 * procfs.c: Update.
4687 * progspace.c: Update.
4688 * remote.c: Update.
4689 * rs6000-nat.c: Update.
4690 * s390-linux-nat.c: Update.
4691 * sol-thread.c: Update.
4692 * spu-linux-nat.c: Update.
4693 * target.c: Update.
4694 * top.c: Update.
4695 * tracefile-tfile.c: Update.
4696 * windows-nat.c: Update.
4697
4698 2018-07-03 Tom Tromey <tom@tromey.com>
4699
4700 * common/ptid.h (ptid_build): Don't declare.
4701 * common/ptid.c (ptid_build): Remove.
4702 * aix-thread.c: Update.
4703 * bsd-kvm.c: Update.
4704 * bsd-uthread.c: Update.
4705 * common/agent.c: Update.
4706 * common/ptid.c: Update.
4707 * common/ptid.h: Update.
4708 * corelow.c: Update.
4709 * darwin-nat.c: Update.
4710 * fbsd-nat.c: Update.
4711 * gnu-nat.c: Update.
4712 * linux-fork.c: Update.
4713 * linux-nat.c: Update.
4714 * linux-thread-db.c: Update.
4715 * nat/linux-osdata.c: Update.
4716 * nat/linux-procfs.c: Update.
4717 * nto-procfs.c: Update.
4718 * obsd-nat.c: Update.
4719 * proc-service.c: Update.
4720 * procfs.c: Update.
4721 * ravenscar-thread.c: Update.
4722 * remote-sim.c: Update.
4723 * remote.c: Update.
4724 * sol-thread.c: Update.
4725 * target.c: Update.
4726 * windows-nat.c: Update.
4727
4728 2018-07-03 Tom Tromey <tom@tromey.com>
4729
4730 * infrun.c (follow_exec): Use exit_inferior_silent.
4731 * inferior.c (exit_inferior_num_silent): Remove.
4732 * inferior.h (exit_inferior_num_silent): Don't declare.
4733
4734 2018-07-03 Tom Tromey <tom@tromey.com>
4735
4736 PR cli/23340:
4737 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4738 inferior_ptid on error.
4739
4740 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4741 Simon Marchi <simon.marchi@polymtl.ca>
4742
4743 PR tdep/8282
4744 * disasm.h (gdb_disassembler): Add
4745 `m_disassembler_options_holder'. member
4746 * disasm.c (get_all_disassembler_options): New function.
4747 (gdb_disassembler::gdb_disassembler): Use it.
4748 (gdb_buffered_insn_length_init_dis): Likewise.
4749 (gdb_buffered_insn_length): Adjust accordingly.
4750 (set_disassembler_options): Handle options with arguments.
4751 (show_disassembler_options_sfunc): Likewise. Add a leading new
4752 line if showing options with descriptions.
4753 (disassembler_options_completer): Adapt to using the
4754 `disasm_options_and_args_t' structure.
4755 * mips-tdep.c (mips_disassembler_options): New variable.
4756 (mips_disassembler_options_o32): Likewise.
4757 (mips_disassembler_options_n32): Likewise.
4758 (mips_disassembler_options_n64): Likewise.
4759 (gdb_print_insn_mips): Don't set `disassembler_options'.
4760 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4761 functions.
4762 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4763 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4764 `gdbarch_disassembler_options_implicit' and
4765 `gdbarch_valid_disassembler_options'.
4766 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4767 `disasm_options_and_args_t' structure.
4768 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4769 method.
4770 (valid_disassembler_options): Switch from `disasm_options_t' to
4771 the `disasm_options_and_args_t' structure.
4772 * NEWS: Document `set disassembler-options' support for the MIPS
4773 target.
4774 * gdbarch.h: Regenerate.
4775 * gdbarch.c: Regenerate.
4776
4777 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4778
4779 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4780
4781 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4782
4783 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4784 parameter in call to amd64_target_description.
4785 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4786 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4787 (amd64fbsd_init_abi): Likewise.
4788 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4789 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4790 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4791 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4792
4793 2018-06-29 Pedro Alves <palves@redhat.com>
4794
4795 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4796 "segments" parameter.
4797 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4798 (_initialize_amd64_tdep): Update call to
4799 amd64_create_target_description.
4800 (amd64_target_description): Add "segments" parameter. Adjust
4801 the implementation to use it.
4802 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4803 call to amd64_create_target_description.
4804 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4805 * gdb/arch/amd64.h (amd64_create_target_description): Add
4806 "segments" register.
4807 * gdb/arch/amd64.c (amd64_create_target_description): Add
4808 "segments" parameter. Call create_feature_i386_64bit_segments
4809 only if SEGMENTS is true.
4810 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4811 call to amd64_create_target_description.
4812
4813 2018-06-29 Pedro Alves <palves@redhat.com>
4814
4815 * thread.c (thread_target_id_str): New, factored out from ...
4816 (print_thread_info_1): ... here. Use it to compute the max
4817 "Target Id" column width.
4818
4819 2018-06-29 Pedro Alves <palves@redhat.com>
4820
4821 * remote.c (remote_target::extra_thread_info): Delete
4822 'display_buf' and 'n' locals. from the cache, regardless of
4823 packet mechanims is in use. Use cache for qThreadExtra and qP
4824 methods too.
4825
4826 2018-06-29 Pedro Alves <palves@redhat.com>
4827
4828 * blockframe.c (find_pc_sect_containing_function): New function.
4829 * breakpoint.c (print_breakpoint_location): Don't call
4830 find_pc_sect_function.
4831 * linespec.c (create_sals_line_offset): Record the location's
4832 symbol in the sal.
4833 * linespec.c (convert_address_location_to_sals): Fill in sal's
4834 symbol with find_pc_sect_containing_function.
4835 * symtab.c (find_function_start_sal): Rename to ...
4836 (find_function_start_sal_1): ... this.
4837 (find_function_start_sal): Reimplement as wrapper around
4838 find_function_start_sal_1, and use
4839 find_pc_sect_containing_function to fill in the sal's symbol.
4840 (find_function_start_sal(symbol*, bool)): Adjust.
4841 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4842 comments.
4843 (find_pc_sect_containing_function): Declare.
4844
4845 2018-06-29 Pedro Alves <palves@redhat.com>
4846
4847 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4848 true if the the location has no symbol.
4849
4850 2018-06-28 Tom Tromey <tom@tromey.com>
4851
4852 * NEWS: Mention --enable-codesign.
4853 * silent-rules.mk (ECHO_SIGN): New variable.
4854 * configure.ac: Add --enable-codesign.
4855 * configure: Rebuild.
4856 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4857 (gdb$(EXEEXT)): Optionally invoke codesign.
4858
4859 2018-06-28 Pedro Alves <palves@redhat.com>
4860
4861 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4862 comments.
4863 (switch_to_thread_no_regs): Adjust comment.
4864 * infcmd.c (stop_pc): Delete.
4865 (post_create_inferior, info_program_command): Replace references
4866 to stop_pc with references to thread_info->suspend.stop_pc.
4867 * inferior.h (stop_pc): Delete declaration.
4868 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4869 (handle_inferior_event_1, handle_signal_stop)
4870 (process_event_stop_test, keep_going_stepped_thread)
4871 (handle_step_into_function, handle_step_into_function_backward)
4872 (print_stop_location): Replace references to stop_pc with
4873 references to thread_info->suspend.stop_pc.
4874 (struct infcall_suspend_state) <stop_pc>: Delete field.
4875 (save_infcall_suspend_state, restore_infcall_suspend_state):
4876 Remove references to inf_stat->stop_pc.
4877 * linux-fork.c (fork_load_infrun_state): Likewise.
4878 * record-btrace.c (record_btrace_set_replay): Likewise.
4879 * record-full.c (record_full_goto_entry): Likewise.
4880 * remote.c (print_one_stopped_thread): Likewise.
4881 * target.c (target_resume): Extend comment.
4882 * thread.c (set_executing_thread): New.
4883 (set_executing): Use it.
4884 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4885 Remove references to stop_pc.
4886
4887 2018-06-28 Pedro Alves <palves@redhat.com>
4888
4889 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4890 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4891
4892 2018-06-28 Tom Tromey <tom@tromey.com>
4893
4894 * coffread.c (coff_symfile_finish): Update.
4895 * xcoffread.c (xcoff_symfile_finish): Update.
4896 * elfread.c (elf_symfile_finish): Update.
4897 * symfile.h (dwarf2_free_objfile): Don't declare.
4898 * dwarf2read.c (_initialize_dwarf2_read): Use
4899 register_objfile_data_with_cleanup.
4900 (dwarf2_free_objfile): Now static. Change signature.
4901
4902 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4903
4904 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4905 option "-o" to add-symbol-file-load to add an offset to each
4906 section's load address.
4907 * symfile.c (set_objfile_default_section_offset): New function.
4908
4909 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4910
4911 * symfile.c (add_symbol_file_command): Make sure that sections
4912 with the same name are sorted in the same order.
4913
4914 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4915
4916 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4917 require the second argument. If omitted, load sections at the
4918 addresses specified in the file.
4919
4920 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4921
4922 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4923 (_initialize_symfile): Add option "-o" to symbol-file to add an
4924 offset to each section of the symbol file.
4925
4926 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4927
4928 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4929
4930 2018-06-27 Tom Tromey <tom@tromey.com>
4931
4932 * stack.c (_initialize_stack): Update "func" help text.
4933
4934 2018-06-27 Tom Tromey <tom@tromey.com>
4935
4936 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4937 std::vector.
4938 (unwind_infopy_str, pyuw_create_unwind_info)
4939 (unwind_infopy_add_saved_register, pyuw_sniffer)
4940 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4941 Update.
4942 (struct saved_reg): Add constructor.
4943 <value>: Now a gdbpy_ref<>.
4944
4945 2018-06-27 Tom Tromey <tom@tromey.com>
4946
4947 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4948
4949 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4950
4951 * gdb-gdb.py.in: Format using autopep8.
4952
4953 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4954
4955 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4956 (type_lookup_function): Recognize CORE_ADDR values.
4957
4958 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4959
4960 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4961 print tag_name.
4962
4963 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4964
4965 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4966 <__lt__>: Add.
4967
4968 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * gdb-gdb.py: Move to...
4971 * gdb-gdb.py.in: ... here.
4972 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4973 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4974 dependencies.
4975 (distclean): Remove gdb-gdb.py when cleaning.
4976 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4977 * configure: Re-generate.
4978
4979 2018-06-27 Pedro Alves <palves@redhat.com>
4980
4981 * proc-service.c (get_ps_regcache): New.
4982 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4983 (ps_lsetfpregs): Use it.
4984
4985 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4986
4987 PR gdb/21695
4988 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4989 (dwarf_decode_lines_1): Adjust.
4990
4991 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4992
4993 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4994 override.
4995 <info_proc>: Likewise.
4996
4997 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4998
4999 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5000 to windows_fetch_one_register, and only handle the case of
5001 fetching one register. Move the code that reloads the context
5002 and iterates over all registers if R is negative to...
5003 (windows_nat_target::fetch_registers): ... here.
5004 (do_windows_store_inferior_registers): Rename to
5005 windows_store_one_register, and only handle the case of storing
5006 one register. Move the code that handles the case where r is
5007 negative to...
5008 (windows_nat_target::store_registers) ... here.
5009
5010 2018-06-26 Tom Tromey <tom@tromey.com>
5011
5012 PR rust/22574:
5013 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5014 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5015 Update.
5016 (rust_internal_print_type): Add podata parameter.
5017 (rust_print_type): Update.
5018
5019 2018-06-26 Tom Tromey <tom@tromey.com>
5020
5021 * typeprint.h (struct print_offset_data) <update, finish,
5022 maybe_print_hole>: New methods.
5023 <indentation>: New constant.
5024 * typeprint.c (print_offset_data::indentation): Define.
5025 (print_offset_data::maybe_print_hole, print_offset_data::update)
5026 (print_offset_data::finish): Move from c-typeprint.c and rename.
5027 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5028 (print_spaces_filtered_with_print_options): Update.
5029 (c_print_type_union_field_offset, maybe_print_hole)
5030 (c_print_type_struct_field_offset): Move to typeprint.c and
5031 rename.
5032 (c_type_print_base_struct_union): Update.
5033
5034 2018-06-25 Pedro Alves <palves@redhat.com>
5035
5036 * gdbthread.h (thread_info_ref, delete_thread)
5037 (delete_thread_silent, first_thread_of_inferior)
5038 (any_thread_of_inferior, switch_to_thread)
5039 (enable_thread_stack_temporaries)
5040 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5041 (get_last_thread_stack_temporary)
5042 (value_in_thread_stack_temporaries, can_access_registers_thread):
5043 Spell out "struct thread_info" instead of just "thread_info".
5044 * inferior.h (notice_new_inferior): Likewise.
5045
5046 2018-06-25 Pedro Alves <palves@redhat.com>
5047
5048 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5049 pass thread_info pointer to delete_thread.
5050 (windows_nat_target::detach): Pass inferior pointer to
5051 detach_inferior.
5052 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5053 delete_thread.
5054 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5055 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5056 and pass a thread_info pointer to delete_thread.
5057 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5058 pass thread_info pointer to delete_thread.
5059 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5060 delete_thread_silent call.
5061 * procfs.c (procfs_target::detach): Pass inferior pointer to
5062 detach_inferior.
5063 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5064 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5065 delete_thread_silent call.
5066 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5067 pass thread_info pointer to delete_thread.
5068 (windows_nat_target::detach): Pass inferior pointer to
5069 delete_inferior.
5070
5071 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5072
5073 * regcache.c (readable_regcache::read_part): Fix asserts.
5074 (reg_buffer::raw_collect_part): New function.
5075 (regcache::write_part): Fix asserts.
5076 (reg_buffer::raw_supply_part): New function.
5077 (regcache::transfer_regset_register): New helper function.
5078 (regcache::transfer_regset): Call new functions.
5079 (regcache_supply_regset): Use gdb_byte*.
5080 (regcache::supply_regset): Likewise.
5081 (regcache_collect_regset): Likewise.
5082 (regcache::collect_regset): Likewise.
5083 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5084 (reg_buffer::raw_supply_part): Likewise.
5085 (regcache::transfer_regset_register): Likewise.
5086 (regcache::transfer_regset): Use gdb_byte*.
5087
5088 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5089
5090 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5091
5092 2018-06-21 Pedro Alves <palves@redhat.com>
5093
5094 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5095 instead of a ptid_t. All callers adjusted.
5096 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5097 adjusted.
5098 (print_ada_task_info, display_current_task_id, task_command_1):
5099 Adjust.
5100 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5101 inferior_thread.
5102 (breakpoint_kind): Adjust.
5103 (remove_breakpoints_pid): Rename to ...
5104 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5105 pointer. All callers adjusted.
5106 (bpstat_clear_actions): Use inferior_thread.
5107 (get_bpstat_thread): New.
5108 (bpstat_do_actions): Use it.
5109 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5110 to take a thread_info pointer. All callers adjusted.
5111 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5112 (breakpoint_re_set_thread): Use inferior_thread.
5113 * breakpoint.h (struct inferior): Forward declare.
5114 (bpstat_stop_status): Update.
5115 (remove_breakpoints_pid): Delete.
5116 (remove_breakpoints_inf): New.
5117 * bsd-uthread.c (bsd_uthread_target::wait)
5118 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5119 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5120 (maint_btrace_packet_history_cmd)
5121 (maint_btrace_clear_packet_history_cmd): Adjust.
5122 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5123 inferior_thread.
5124 * cli/cli-interp.c: Include "inferior.h".
5125 * common/refcounted-object.h (struct
5126 refcounted_object_ref_policy): New.
5127 * compile/compile-object-load.c: Include gdbthread.h.
5128 (store_regs): Use inferior_thread.
5129 * corelow.c (core_target::close): Use current_inferior.
5130 (core_target_open): Adjust to use first_thread_of_inferior and use
5131 the current inferior.
5132 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5133 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5134 <thread>: ... this new field. All references adjusted.
5135 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5136 Take a thread_info pointer instead of a ptid_t.
5137 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5138 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5139 thread_info pointer instead of a ptid_t.
5140 * elfread.c: Include "inferior.h".
5141 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5142 Use inferior_thread.
5143 * eval.c (evaluate_subexp): Likewise.
5144 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5145 inferior_thread.
5146 * gdb_proc_service.h (struct thread_info): Forward declare.
5147 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5148 <thread>: ... this new field. All references adjusted.
5149 * gdbarch.h, gdbarch.c: Regenerate.
5150 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5151 'thread' parameter. All implementations and callers adjusted.
5152 * gdbthread.h (thread_info) <set_running>: New method.
5153 (delete_thread, delete_thread_silent): Take a thread_info pointer
5154 instead of a ptid.
5155 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5156 (first_thread_of_process): Delete, replaced by ...
5157 (first_thread_of_inferior): ... this new function. All callers
5158 adjusted.
5159 (any_live_thread_of_process): Delete, replaced by ...
5160 (any_live_thread_of_inferior): ... this new function. All callers
5161 adjusted.
5162 (switch_to_thread, switch_to_no_thread): Declare.
5163 (is_executing): Delete.
5164 (enable_thread_stack_temporaries): Update comment.
5165 <enable_thread_stack_temporaries>: Take a thread_info pointer
5166 instead of a ptid_t. Incref the thread.
5167 <~enable_thread_stack_temporaries>: Decref the thread.
5168 <m_ptid>: Delete
5169 <m_thr>: New.
5170 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5171 (get_last_thread_stack_temporary)
5172 (value_in_thread_stack_temporaries, can_access_registers_thread):
5173 Take a thread_info pointer instead of a ptid_t. All callers
5174 adjusted.
5175 * infcall.c (get_call_return_value): Use inferior_thread.
5176 (run_inferior_call): Work with thread pointers instead of ptid_t.
5177 (call_function_by_hand_dummy): Work with thread pointers instead
5178 of ptid_t. Use thread_info_ref.
5179 * infcmd.c (proceed_thread_callback): Access thread's state
5180 directly.
5181 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5182 access thread's state directly.
5183 (continue_command): Use inferior_thread.
5184 (info_program_command): Use find_thread_ptid and access thread
5185 state directly.
5186 (proceed_after_attach_callback): Use thread state directly.
5187 (notice_new_inferior): Take a thread_info pointer instead of a
5188 ptid_t. All callers adjusted.
5189 (exit_inferior): Take an inferior pointer instead of a pid. All
5190 callers adjusted.
5191 (exit_inferior_silent): New.
5192 (detach_inferior): Delete.
5193 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5194 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5195 (detach_inferior_command, kill_inferior_command): Use
5196 find_inferior_id instead of valid_gdb_inferior_id and
5197 gdb_inferior_id_to_pid.
5198 (inferior_command): Use inferior and thread pointers.
5199 * inferior.h (struct thread_info): Forward declare.
5200 (notice_new_inferior): Take a thread_info pointer instead of a
5201 ptid_t. All callers adjusted.
5202 (detach_inferior): Delete declaration.
5203 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5204 instead of a pid. All callers adjusted.
5205 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5206 (valid_gdb_inferior_id): Delete.
5207 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5208 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5209 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5210 ...
5211 <inf>: ... this new field.
5212 <step_ptid>: Delete, replaced by ...
5213 <step_thread>: ... this new field.
5214 (get_displaced_stepping_state): Take an inferior pointer instead
5215 of a pid. All callers adjusted.
5216 (displaced_step_in_progress_any_inferior): Adjust.
5217 (displaced_step_in_progress_thread): Take a thread pointer instead
5218 of a ptid_t. All callers adjusted.
5219 (displaced_step_in_progress, add_displaced_stepping_state): Take
5220 an inferior pointer instead of a pid. All callers adjusted.
5221 (get_displaced_step_closure_by_addr): Adjust.
5222 (remove_displaced_stepping_state): Take an inferior pointer
5223 instead of a pid. All callers adjusted.
5224 (displaced_step_prepare_throw, displaced_step_prepare)
5225 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5226 All callers adjusted.
5227 (start_step_over): Adjust.
5228 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5229 displaced step queue.
5230 (do_target_resume): Adjust.
5231 (fetch_inferior_event): Use inferior_thread.
5232 (context_switch, get_inferior_stop_soon): Take an
5233 execution_control_state pointer instead of a ptid_t. All callers
5234 adjusted.
5235 (switch_to_thread_cleanup): Delete.
5236 (stop_all_threads): Use scoped_restore_current_thread.
5237 * inline-frame.c: Include "gdbthread.h".
5238 (inline_state) <inline_state>: Take a thread pointer instead of a
5239 ptid_t. All callers adjusted.
5240 <ptid>: Delete, replaced by ...
5241 <thread>: ... this new field.
5242 (find_inline_frame_state): Take a thread pointer instead of a
5243 ptid_t. All callers adjusted.
5244 (skip_inline_frames, step_into_inline_frame)
5245 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5246 pointer instead of a ptid_t. All callers adjusted.
5247 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5248 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5249 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5250 pointers directly.
5251 * linux-nat.c (get_detach_signal): Likewise.
5252 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5253 (thread_db_notice_clone): Adjust.
5254 (thread_db_find_new_threads_silently)
5255 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5256 a thread pointer instead of a ptid_t. All callers adjusted.
5257 * mi/mi-cmd-var.c: Include "inferior.h".
5258 (mi_cmd_var_update_iter): Update to use thread pointers.
5259 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5260 inferior directly.
5261 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5262 out to ...
5263 (mi_output_running): ... this new function.
5264 (mi_on_resume_1): Adjust to use it.
5265 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5266 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5267 directly.
5268 (interrupt_thread_callback): : Adjust to use thread and inferior
5269 pointers.
5270 * proc-service.c: Include "gdbthread.h".
5271 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5272 * progspace-and-thread.c: Include "inferior.h".
5273 * progspace.c: Include "inferior.h".
5274 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5275 hold a reference to an inferior_object.
5276 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5277 inferior_thread.
5278 * python/py-inferior.c (struct inferior_object): Give the type a
5279 tag name instead of a typedef.
5280 (python_on_normal_stop): No need to check if the current thread is
5281 listed.
5282 (inferior_to_inferior_object): Change return type to
5283 inferior_object. All callers adjusted.
5284 (find_thread_object): Delete, bits factored out to ...
5285 (thread_to_thread_object): ... this new function.
5286 * python/py-infthread.c (create_thread_object): Use
5287 inferior_to_inferior_object.
5288 (thpy_is_stopped): Use thread pointer directly.
5289 (gdbpy_selected_thread): Use inferior_thread.
5290 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5291 field, replaced with ...
5292 <thread>: ... this new field. All users adjusted.
5293 (btpy_insn_or_gap_new): Drop const.
5294 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5295 callers adjusted.
5296 * python/py-record.c: Include "gdbthread.h".
5297 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5298 a ptid_t. All callers adjusted.
5299 (gdbpy_current_recording): Use inferior_thread.
5300 * python/py-record.h (recpy_record_object) <ptid>: Delete
5301 field, replaced with ...
5302 <thread>: ... this new field. All users adjusted.
5303 (recpy_element_object) <ptid>: Delete
5304 field, replaced with ...
5305 <thread>: ... this new field. All users adjusted.
5306 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5307 a ptid_t. All callers adjusted.
5308 * python/py-threadevent.c: Include "gdbthread.h".
5309 (get_event_thread): Use thread_to_thread_object.
5310 * python/python-internal.h (struct inferior_object): Forward
5311 declare.
5312 (find_thread_object, find_inferior_object): Delete declarations.
5313 (thread_to_thread_object, inferior_to_inferior_object): New
5314 declarations.
5315 * record-btrace.c: Include "inferior.h".
5316 (require_btrace_thread): Use inferior_thread.
5317 (record_btrace_frame_sniffer)
5318 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5319 (get_thread_current_frame): Use scoped_restore_current_thread and
5320 switch_to_thread.
5321 (get_thread_current_frame): Use thread pointer directly.
5322 (record_btrace_replay_at_breakpoint): Use thread's inferior
5323 pointer directly.
5324 * record-full.c: Include "inferior.h".
5325 * regcache.c: Include "gdbthread.h".
5326 (get_thread_arch_regcache): Use the inferior's address space
5327 directly.
5328 (get_thread_regcache, registers_changed_thread): New.
5329 * regcache.h (get_thread_regcache(thread_info *thread)): New
5330 overload.
5331 (registers_changed_thread): New.
5332 (remote_target) <remote_detach_1>: Swap order of parameters.
5333 (remote_add_thread): <remote_add_thread>: Return the new thread.
5334 (get_remote_thread_info(ptid_t)): New overload.
5335 (remote_target::remote_notice_new_inferior): Use thread pointers
5336 directly.
5337 (remote_target::process_initial_stop_replies): Use
5338 thread_info::set_running.
5339 (remote_target::remote_detach_1, remote_target::detach)
5340 (extended_remote_target::detach): Adjust.
5341 * stack.c (frame_show_address): Use inferior_thread.
5342 * target-debug.h (target_debug_print_thread_info_pp): New.
5343 * target-delegates.c: Regenerate.
5344 * target.c (default_thread_address_space): Delete.
5345 (memory_xfer_partial_1): Use current_inferior.
5346 (target_detach): Use current_inferior.
5347 (target_thread_address_space): Delete.
5348 (generic_mourn_inferior): Use current_inferior.
5349 * target.h (struct target_ops) <thread_address_space>: Delete.
5350 (target_thread_address_space): Delete.
5351 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5352 pointers directly.
5353 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5354 thread pointer instead of a ptid_t. Adjust all callers.
5355 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5356 (first_thread_of_process): Delete, replaced by ...
5357 (first_thread_of_inferior): ... this new function. All callers
5358 adjusted.
5359 (any_thread_of_process): Rename to ...
5360 (any_thread_of_inferior): ... this, and take an inferior pointer.
5361 (any_live_thread_of_process): Rename to ...
5362 (any_live_thread_of_inferior): ... this, and take an inferior
5363 pointer.
5364 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5365 (value_in_thread_stack_temporaries)
5366 (get_last_thread_stack_temporary): Take a thread pointer instead
5367 of a ptid_t. Adjust all callers.
5368 (thread_info::set_running): New.
5369 (validate_registers_access): Use inferior_thread.
5370 (can_access_registers_ptid): Rename to ...
5371 (can_access_registers_thread): ... this, and take a thread
5372 pointer.
5373 (print_thread_info_1): Adjust to compare thread pointers instead
5374 of ptids.
5375 (switch_to_no_thread, switch_to_thread): Make extern.
5376 (scoped_restore_current_thread::~scoped_restore_current_thread):
5377 Use m_thread pointer directly.
5378 (scoped_restore_current_thread::scoped_restore_current_thread):
5379 Use inferior_thread.
5380 (thread_command): Use thread pointer directly.
5381 (thread_num_make_value_helper): Use inferior_thread.
5382 * top.c (execute_command): Use inferior_thread.
5383 * tui/tui-interp.c: Include "inferior.h".
5384 * varobj.c (varobj_create): Use inferior_thread.
5385 (value_of_root_1): Use find_thread_global_id instead of
5386 global_thread_id_to_ptid.
5387
5388 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5389
5390 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5391 possible.
5392 (regcache::write_part): Likewise.
5393 (readable_regcache::cooked_read_part): Update comment.
5394 (readable_regcache::cooked_write_part): Likewise.
5395 * regcache.h: (readable_regcache::read_part): Likewise.
5396 (regcache::write_part): Likewise.
5397
5398 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5399 Dirk Schubert <dirk.schubert@arm.com>
5400
5401 * aarch64-linux-nat.c (post_attach): New.
5402 (aarch64_linux_nat_target::post_attach): Override post_attach to
5403 record the number of hardware debug registers.
5404
5405 2018-06-20 Tom Tromey <tom@tromey.com>
5406
5407 * python/py-param.c (add_setshow_generic): Make parameters const.
5408 (parmpy_init): Update.
5409
5410 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5411
5412 * regcache.h (regcache_cooked_read_ftype): Rename to...
5413 (register_read_ftype): ...this, change type to function_view.
5414 (class reg_buffer) <save>: Remove src parameter.
5415 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5416 parameter non-const in first overload. Remove src parameter in
5417 second overload.
5418 * regcache.c (do_cooked_read): Remove.
5419 (readonly_detached_regcache::readonly_detached_regcache): Make
5420 parameter non-const, adjust call to other constructor.
5421 (reg_buffer::save): Remove src parameter.
5422 * frame.c (do_frame_register_read): Remove.
5423 (frame_save_as_regcache): Use lambda function.
5424 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5425 parameter to ppu2spu_data *.
5426 (ppu2spu_sniffer): Use lambda function.
5427
5428 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5429
5430 * record-full.c (record_full_target::insert_breakpoint): Remove
5431 "struct" keyword, add const.
5432
5433 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5434
5435 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5436 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5437 * configure.ac: Remove AC_PREREQ, add missing quoting.
5438 * gnulib/configure.ac: Modernize usage of
5439 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5440 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5441 (AUTOMAKE_VERSION): Bump to 1.15.1.
5442 * configure: Re-generate.
5443 * config.in: Re-generate.
5444 * aclocal.m4: Re-generate.
5445 * gnulib/aclocal.m4: Re-generate.
5446 * gnulib/config.in: Re-generate.
5447 * gnulib/configure: Re-generate.
5448 * gnulib/import/Makefile.in: Re-generate.
5449
5450 2018-06-19 Pedro Alves <palves@redhat.com>
5451
5452 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5453 (lookup_minimal_symbol_by_pc_section): ... here with
5454 gdb_assert_not_reached added.
5455
5456 2018-06-19 Pedro Alves <palves@redhat.com>
5457
5458 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5459 parameter with a block parameter. Compare location's block symbol
5460 with the frame's block instead of addresses.
5461 (skip_inline_frames): Pass the current block instead of the
5462 frame's address. Break out as soon as we determine the frame
5463 should not be skipped.
5464
5465 2018-06-18 Tom Tromey <tom@tromey.com>
5466
5467 * solib-aix.c (solib_aix_get_section_offsets): Return
5468 unique_xmalloc_ptr.
5469 (solib_aix_solib_create_inferior_hook): Update.
5470
5471 2018-06-18 Tom Tromey <tom@tromey.com>
5472
5473 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5474
5475 2018-06-18 Tom Tromey <tom@tromey.com>
5476
5477 * solib-frv.c (frv_relocate_main_executable): Use
5478 unique_xmalloc_ptr.
5479 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5480 unique_xmalloc_ptr.
5481
5482 2018-06-18 Tom Tromey <tom@tromey.com>
5483
5484 * objfiles.h (inhibit_section_map_updates): Update.
5485 (resume_section_map_updates, resume_section_map_updates_cleanup):
5486 Remove.
5487 * solib-svr4.c (svr4_handle_solib_event): Update.
5488 * objfiles.c (inhibit_section_map_updates): Return
5489 scoped_restore_tmpl<int>.
5490 (resume_section_map_updates, resume_section_map_updates_cleanup):
5491 Remove.
5492
5493 2018-06-18 Tom Tromey <tom@tromey.com>
5494
5495 * valprint.h (read_string): Update.
5496 * valprint.c (read_string): Change type of "buffer".
5497 (val_print_string): Update.
5498 * python/py-value.c (valpy_string): Update.
5499 * language.h (struct language_defn) <la_get_string>: Change
5500 type of "buffer".
5501 (default_get_string, c_get_string): Update.
5502 * language.c (default_get_string): Change type of "buffer".
5503 * guile/scm-value.c (gdbscm_value_to_string): Update.
5504 * c-lang.c (c_get_string): Change type of "buffer".
5505
5506 2018-06-18 Tom Tromey <tom@tromey.com>
5507
5508 * ser-mingw.c (struct pipe_state_destroyer): New.
5509 (pipe_state_up): New typedef.
5510 (cleanup_pipe_state): Remove.
5511 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5512
5513 2018-06-18 Tom Tromey <tom@tromey.com>
5514
5515 * rust-lang.h (rust_yyerror): Don't declare.
5516 * rust-lang.c (rust_language_defn): Update.
5517 * rust-exp.y (yyerror): Now static.
5518 * parse.c (parse_exp_in_context_1): Update.
5519 * p-lang.h (p_yyerror): Don't declare.
5520 * p-lang.c (p_language_defn): Update.
5521 * p-exp.y (yyerror): Now static.
5522 * opencl-lang.c (opencl_language_defn): Update.
5523 * objc-lang.c (objc_language_defn): Update.
5524 * m2-lang.h (m2_yyerror): Don't declare.
5525 * m2-lang.c (m2_language_defn): Update.
5526 * m2-exp.y (yyerror): Now static.
5527 * language.h (struct language_defn) <la_error>: Remove.
5528 * language.c (unk_lang_error): Remove.
5529 (unknown_language_defn, auto_language_defn): Remove.
5530 * go-lang.h (go_yyerror): Don't declare.
5531 * go-lang.c (go_language_defn): Update.
5532 * go-exp.y (yyerror): Now static.
5533 * f-lang.h (f_yyerror): Don't declare.
5534 * f-lang.c (f_language_defn): Update.
5535 * f-exp.y (yyerror): Now static.
5536 * d-lang.h (d_yyerror): Don't declare.
5537 * d-lang.c (d_language_defn): Update.
5538 * d-exp.y (yyerror): Now static.
5539 * c-lang.h (c_yyerror): Don't declare.
5540 * c-lang.c (c_language_defn, cplus_language_defn)
5541 (asm_language_defn, minimal_language_defn): Update.
5542 * c-exp.y (yyerror): Now static.
5543 * ada-lang.h (ada_yyerror): Don't declare.
5544 * ada-lang.c (ada_language_defn): Update.
5545 * ada-exp.y (yyerror): Now static.
5546
5547 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5548
5549 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5550 (store_sveregs_to_thread): Likewise.
5551 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5552 (aarch64_linux_store_inferior_registers): Likewise.
5553 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5554 function.
5555 (aarch64_sve_regs_copy_to_regcache): Likewise.
5556 (aarch64_sve_regs_copy_from_regcache): Likewise.
5557 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5558 declaration.
5559 (aarch64_sve_regs_copy_to_regcache): Likewise.
5560 (aarch64_sve_regs_copy_from_regcache): Likewise.
5561 (sve_context): Structure from Linux headers.
5562 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5563 (SVE_SIG_ZREG_SIZE): Likewise.
5564 (SVE_SIG_PREG_SIZE): Likewise.
5565 (SVE_SIG_FFR_SIZE): Likewise.
5566 (SVE_SIG_REGS_OFFSET): Likewise.
5567 (SVE_SIG_ZREGS_OFFSET): Likewise.
5568 (SVE_SIG_ZREG_OFFSET): Likewise.
5569 (SVE_SIG_ZREGS_SIZE): Likewise.
5570 (SVE_SIG_PREGS_OFFSET): Likewise.
5571 (SVE_SIG_PREG_OFFSET): Likewise.
5572 (SVE_SIG_PREGS_SIZE): Likewise.
5573 (SVE_SIG_FFR_OFFSET): Likewise.
5574 (SVE_SIG_REGS_SIZE): Likewise.
5575 (SVE_SIG_CONTEXT_SIZE): Likewise.
5576 (SVE_PT_REGS_MASK): Likewise.
5577 (SVE_PT_REGS_FPSIMD): Likewise.
5578 (SVE_PT_REGS_SVE): Likewise.
5579 (SVE_PT_VL_INHERIT): Likewise.
5580 (SVE_PT_VL_ONEXEC): Likewise.
5581 (SVE_PT_REGS_OFFSET): Likewise.
5582 (SVE_PT_FPSIMD_OFFSET): Likewise.
5583 (SVE_PT_FPSIMD_SIZE): Likewise.
5584 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5585 (SVE_PT_SVE_PREG_SIZE): Likewise.
5586 (SVE_PT_SVE_FFR_SIZE): Likewise.
5587 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5588 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5589 (__SVE_SIG_TO_PT): Likewise.
5590 (SVE_PT_SVE_OFFSET): Likewise.
5591 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5592 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5593 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5594 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5595 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5596 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5597 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5598 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5599 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5600 (SVE_PT_SVE_SIZE): Likewise.
5601 (SVE_PT_SIZE): Likewise.
5602 (HAS_SVE_STATE): New define.
5603
5604 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5605
5606 * nat/aarch64-sve-linux-sigcontext.h: New file.
5607 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5608 new files.
5609 (SVE_VQ_MIN): Likewise.
5610 (SVE_VQ_MAX): Likewise.
5611 (SVE_VL_MIN): Likewise.
5612 (SVE_VL_MAX): Likewise.
5613 (SVE_NUM_ZREGS): Likewise.
5614 (SVE_NUM_PREGS): Likewise.
5615 (sve_vl_valid): Likewise.
5616 (struct user_sve_header): Likewise.
5617
5618 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5619 Richard Bunt <Richard.Bunt@arm.com>
5620
5621 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5622 was requested by GDB.
5623
5624 2018-06-15 Tom de Vries <tdevries@suse.de>
5625
5626 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5627
5628 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5629
5630 * gnulib/update-gnulib.sh: Print expected versions of
5631 autoconf/aclocal.
5632
5633 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5634
5635 * arch-utils.c (default_type_align): Use type_length_units.
5636 * gdbtypes.c (type_align): Use type_length_units.
5637
5638 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5639
5640 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5641 of 'define' command.
5642
5643 2018-06-14 Tom de Vries <tdevries@suse.de>
5644
5645 PR cli/22573
5646 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5647 get_no_prettyformat_print_options.
5648
5649 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5650
5651 * sparc-nat.h: Include target.h.
5652 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5653 <fetch_registers>: Remove this argument in function call.
5654 <store_registers>: Remove this argument in function call, remove
5655 extra semicolon.
5656 <low_forget_process>: Call sparc64_forget_process instead of
5657 sparc_forget_process.
5658
5659 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5660
5661 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5662 (procfs_target::make_corefile_notes): Adjust to new
5663 target_read_alloc return type.
5664
5665 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5666 Stephen Roberts <stephen.roberts@arm.com>
5667
5668 PR gdb/22882
5669 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5670 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5671 Move should_notify_stop local into more inner scope.
5672
5673 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5674 Stephen Roberts <stephen.roberts@arm.com>
5675
5676 PR gdb/22882
5677 * infrun.c (resume_1): Add call to mark_async_event_handler.
5678
5679 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5680
5681 * infrun.c (do_target_wait): Change old version of $pc printed.
5682
5683 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5684
5685 * dwarf2read.c (read_index_from_section): Rename to...
5686 (read_gdb_index_from_section): ... this, update all callers.
5687 (dwarf2_read_index): Rename to...
5688 (dwarf2_read_gdb_index): ... this, update all callers.
5689
5690 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5691
5692 * gdb/hppa-linux-nat.c
5693 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5694 hppa_linux_nat_target::fetch_registers.
5695
5696 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5697
5698 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5699 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5700 (AARCH64_DWARF_SVE_FFR): Likewise.
5701 (AARCH64_DWARF_SVE_P0): Likewise.
5702 (AARCH64_DWARF_SVE_Z0): Likewise.
5703
5704 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5705
5706 * common/common-regcache.h (raw_compare): New function.
5707 * regcache.c (regcache::raw_compare): Likewise.
5708 * regcache.h (regcache::raw_compare): New declaration.
5709
5710 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5711
5712 * common/common-regcache.h (reg_buffer_common): New structure.
5713 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5714 (reg_buffer::raw_supply): Likewise.
5715 (reg_buffer::raw_supply_integer): Likewise.
5716 (reg_buffer::raw_supply_zeroed): Likewise.
5717 (reg_buffer::raw_collect): Likewise.
5718 (reg_buffer::raw_collect_integer): Likewise.
5719 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5720 (reg_buffer::raw_supply): Likewise.
5721 (reg_buffer::raw_supply_integer): Likewise.
5722 (reg_buffer::raw_supply_zeroed): Likewise.
5723 (reg_buffer::raw_collect): Likewise.
5724 (reg_buffer::raw_collect_integer): Likewise.
5725
5726 2018-06-10 Tom Tromey <tom@tromey.com>
5727
5728 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5729 (class remote_state) <stop_reply_queue>: Now std::vector.
5730 (remote_state::~remote_state)
5731 (remote_target::stop_reply_queue_length): Update.
5732 (struct queue_iter_param, remove_child_of_pending_fork)
5733 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5734 (check_pending_event_prevents_wildcard_vcont_callback)
5735 (remove_stop_reply_for_inferior)
5736 (remove_stop_reply_of_remote_state)
5737 (remote_notif_remove_once_on_match)
5738 (stop_reply_match_ptid_and_ws)
5739 (remote_kill_child_of_pending_fork): Remove.
5740 (remote_target::remove_new_fork_children)
5741 (remote_target::check_pending_events_prevent_wildcard_vcont)
5742 (remote_target::discard_pending_stop_replies)
5743 (remote_target::discard_pending_stop_replies_in_queue)
5744 (remote_target::remote_notif_remove_queued_reply)
5745 (remote_target::queued_stop_reply)
5746 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5747 (remote_target::wait, remote_target::kill_new_fork_children)
5748 (remote_target::async): Update.
5749
5750 2018-06-10 Tom Tromey <tom@tromey.com>
5751
5752 * record-full.c (record_full_arch_list_cleanups): Remove.
5753 (record_full_message): Use try/catch.
5754 (record_full_wait_cleanups): Remove.
5755 (record_full_wait_1): Use try/catch.
5756 (record_full_restore): Likewise.
5757
5758 2018-06-10 Tom Tromey <tom@tromey.com>
5759
5760 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5761 declare VEC. Add constructor.
5762 <in_target_beneath>: Now bool.
5763 (record_full_breakpoints): Now a std::vector, static.
5764 (record_full_sync_record_breakpoints)
5765 (record_full_init_record_breakpoints)
5766 (record_full_target::insert_breakpoint)
5767 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5768
5769 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5770
5771 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5772 * serial.c (serial_interface_lookup): Remove struct keyword.
5773
5774 2018-06-10 Tom Tromey <tom@tromey.com>
5775
5776 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5777 method.
5778 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5779 a method.
5780 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5781 method.
5782 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5783 "beneath" as a method.
5784 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5785 Use "beneath" as a method.
5786
5787 2018-06-10 Tom Tromey <tom@tromey.com>
5788
5789 * tracefile.c (struct trace_file_writer_deleter): New.
5790 <operator()>: Rename from trace_file_writer_xfree.
5791 (trace_file_writer_up): New typedef.
5792 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5793
5794 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5795
5796 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5797 <m_registers, m_register_status>: Change type to
5798 std::unique_ptr.
5799 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5800 XCNEWVEC.
5801
5802 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5803
5804 * common/common-regcache.h (enum register_status): Add
5805 underlying type "signed char".
5806 * regcache.h (reg_buffer) <m_register_status>: Change type to
5807 register_status *.
5808 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5809 register_status instead of signed char.
5810 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5811 (reg_buffer::get_register_status): Remove cast.
5812 (readable_regcache::raw_read): Remove cast.
5813 (readable_regcache::cooked_read): Remove cast.
5814
5815 2018-06-09 Tom Tromey <tom@tromey.com>
5816
5817 * source.c (reverse_search_command, forward_search_command): Use
5818 scoped_fd.
5819
5820 2018-06-09 Tom Tromey <tom@tromey.com>
5821
5822 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5823 (serial_ops_list): Now static, std::vector.
5824 (serial_interface_lookup, serial_add_interface): Update.
5825
5826 2018-06-09 Tom Tromey <tom@tromey.com>
5827
5828 * dwarf2read.c (process_cu_includes): Update.
5829 (process_full_comp_unit): Update.
5830 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5831 std::vector.
5832
5833 2018-06-08 Paul Koning <paul_koning@dell.com>
5834
5835 PR gdb/23252
5836
5837 * python/python.c (do_start_initialization):
5838 Avoid call to internal Python API.
5839 (init__gdb_module): New function.
5840
5841 2018-06-08 Gary Benson <gbenson@redhat.com>
5842
5843 * linux-thread-db.c (valprint.h): New include.
5844 (struct check_thread_db_info): New structure.
5845 (check_thread_db_on_load, tdb_testinfo): New static globals.
5846 (check_thread_db, check_thread_db_callback): New functions.
5847 (try_thread_db_load_1): Run integrity checks if requested.
5848 (maintenance_check_libthread_db): New function.
5849 (_initialize_thread_db): Register "maint check libthread-db"
5850 and "maint set/show check-libthread-db".
5851 * NEWS: Mention the above new commands.
5852
5853 2018-06-08 Tom Tromey <tom@tromey.com>
5854
5855 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5856 now a method.
5857
5858 2018-06-08 Tom Tromey <tom@tromey.com>
5859
5860 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5861
5862 2018-06-08 Tom Tromey <tom@tromey.com>
5863
5864 * common/btrace-common.h (struct btrace_data): Add constructor,
5865 destructor, move assignment operator.
5866 <empty, clear, fini>: New methods.
5867 <format>: Initialize.
5868 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5869 (btrace_data_empty): Don't declare.
5870 * common/btrace-common.c (btrace_data_init): Remove.
5871 (btrace_data::fini): Rename from btrace_data_fini.
5872 (btrace_data::empty): Rename from btrace_data_empty.
5873 (btrace_data::clear): Rename from btrace_data_clear. Return
5874 bool.
5875 * btrace.h (make_cleanup_btrace_data): Don't declare.
5876 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5877 (parse_xml_btrace): Update.
5878 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5879 (maint_btrace_clear_packet_history_cmd): Update.
5880
5881 2018-06-07 Pedro Alves <palves@redhat.com>
5882
5883 * target.h (target_ops) <beneath>: Now a method. All references
5884 updated.
5885 (class target_stack): New.
5886 * target.c (g_target_stack): New.
5887 (g_current_top_target): Delete.
5888 (current_top_target): Get the top target out of g_target_stack.
5889 (target_stack::push, target_stack::unpush): New.
5890 (push_target, unpush_target): Reimplement.
5891 (target_is_pushed): Reimplement in terms of g_target_stack.
5892 (target_ops::beneath, target_stack::find_beneath): New.
5893
5894 2018-06-07 Pedro Alves <palves@redhat.com>
5895
5896 * target.h (find_target_beneath): Delete declaration.
5897 * target.c (find_target_beneath): Delete definition.
5898 * aix-thread.c: All callers of find_target_beneath adjusted to
5899 call target_ops::beneath instead.
5900 * bsd-uthread.c: Likewise.
5901 * linux-thread-db.c: Likewise.
5902 * ravenscar-thread.c: Likewise.
5903 * sol-thread.c: Likewise.
5904 * spu-multiarch.c: Likewise.
5905
5906 2018-06-07 Pedro Alves <palves@redhat.com>
5907
5908 * target.h (target_ops) <beneath>: Now a method. All references
5909 updated.
5910 (target_ops) <m_beneath>: New.
5911 * target.c (target_ops::beneath): New.
5912 * corelow.c: Adjust all references to target_ops::beneath.
5913 * linux-thread-db.c: Likewise.
5914 * make-target-delegates: Likewise.
5915 * record-btrace.c: Likewise.
5916 * record-full.c: Likewise.
5917 * remote.c: Likewise.
5918 * target.c: Likewise.
5919 * target-delegates.c: Regenerate.
5920
5921 2018-06-07 Pedro Alves <palves@redhat.com>
5922
5923 * target.h (target_stack): Delete.
5924 (current_top_target): Declare function.
5925 * target.c (target_stack): Delete.
5926 (g_current_top_target): New.
5927 (current_top_target): New function.
5928 * auxv.c: Use current_top_target instead of target_stack
5929 throughout.
5930 * avr-tdep.c: Likewise.
5931 * breakpoint.c: Likewise.
5932 * corefile.c: Likewise.
5933 * elfread.c: Likewise.
5934 * eval.c: Likewise.
5935 * exceptions.c: Likewise.
5936 * frame.c: Likewise.
5937 * gdbarch-selftests.c: Likewise.
5938 * gnu-v3-abi.c: Likewise.
5939 * ia64-tdep.c: Likewise.
5940 * ia64-vms-tdep.c: Likewise.
5941 * infcall.c: Likewise.
5942 * infcmd.c: Likewise.
5943 * infrun.c: Likewise.
5944 * linespec.c: Likewise.
5945 * linux-tdep.c: Likewise.
5946 * minsyms.c: Likewise.
5947 * ppc-linux-nat.c: Likewise.
5948 * ppc-linux-tdep.c: Likewise.
5949 * procfs.c: Likewise.
5950 * regcache.c: Likewise.
5951 * remote.c: Likewise.
5952 * rs6000-tdep.c: Likewise.
5953 * s390-linux-nat.c: Likewise.
5954 * s390-tdep.c: Likewise.
5955 * solib-aix.c: Likewise.
5956 * solib-darwin.c: Likewise.
5957 * solib-dsbt.c: Likewise.
5958 * solib-spu.c: Likewise.
5959 * solib-svr4.c: Likewise.
5960 * solib-target.c: Likewise.
5961 * sparc-tdep.c: Likewise.
5962 * sparc64-tdep.c: Likewise.
5963 * spu-tdep.c: Likewise.
5964 * symfile.c: Likewise.
5965 * symtab.c: Likewise.
5966 * target-descriptions.c: Likewise.
5967 * target-memory.c: Likewise.
5968 * target.c: Likewise.
5969 * target.h: Likewise.
5970 * tracefile-tfile.c: Likewise.
5971 * tracepoint.c: Likewise.
5972 * valops.c: Likewise.
5973 * valprint.c: Likewise.
5974 * value.c: Likewise.
5975 * windows-tdep.c: Likewise.
5976 * mi/mi-main.c: Likewise.
5977
5978 2018-06-07 Tom Tromey <tom@tromey.com>
5979
5980 * valprint.h (build_address_symbolic): Declare.
5981 * printcmd.c (print_address_symbolic): Update.
5982 (build_address_symbolic): Change "name" and "filename" to
5983 std::string.
5984 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5985 Update.
5986 * defs.h (build_address_symbolic): Remove declaration.
5987
5988 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5989
5990 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5991 (aarch64_vnv_type): Add function.
5992 (aarch64_pseudo_register_name): Add V regs for SVE.
5993 (aarch64_pseudo_register_type): Likewise.
5994 (aarch64_pseudo_register_reggroup_p): Likewise.
5995 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5996 (aarch64_pseudo_read_value): Add V regs for SVE.
5997 (aarch64_pseudo_write_2): Use V0 offset for SVE
5998 (aarch64_pseudo_write): Add V regs for SVE.
5999 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6000
6001 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6002
6003 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6004 (sve_vl_from_vq): Likewise.
6005
6006 2018-06-05 Tom Tromey <tom@tromey.com>
6007
6008 * cli/cli-cmds.c (show_version): Update.
6009 * top.c (print_gdb_version): Add "interactive" parameter.
6010 Update.
6011 * main.c (captured_main_1): Update.
6012 * top.h (print_gdb_version): Add "interactive" parameter and a
6013 comment.
6014
6015 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6016
6017 * common/enum-flags.h: Add trailing semicolon to example in
6018 comment.
6019
6020 2018-06-05 Tom Tromey <tom@tromey.com>
6021
6022 PR cli/12326:
6023 * NEWS: Add entry about pager.
6024 * utils.c (pagination_disabled_for_command): New global.
6025 (prompt_for_continue): Allow "c" response to prompt.
6026 (reinitialize_more_filter): Clear
6027 pagination_disabled_for_command.
6028 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6029
6030 2018-06-04 Tom Tromey <tom@tromey.com>
6031
6032 * ada-lang.h (ada_lookup_symbol_list): Update.
6033 * ada-lang.c (resolve_subexp): Update.
6034 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6035 parameter.
6036 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6037 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6038 results parameter to std::vector.
6039 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6040 Update.
6041 * ada-exp.y (block_lookup): Update.
6042 (select_possible_type_sym): Change type of syms. Remove nsyms
6043 parameter.
6044 (write_var_or_type, write_name_assoc): Update.
6045
6046 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6047
6048 * windows-nat.c (windows_nat_target::xfer_partial): Return
6049 TARGET_XFER_E_IO if we need to delegate to the target beneath
6050 but BENEATH is NULL.
6051
6052 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6053
6054 * Makefile.in (config.status): Add configure.nat as a
6055 dependency.
6056
6057 2018-06-04 Tom Tromey <tom@tromey.com>
6058
6059 * cp-name-parser.y (cpname_state): Add method declarations.
6060 (HANDLE_QUAL): Update.
6061 (cpname_state::d_grab, cpname_state::fill_comp)
6062 (cpname_state::make_operator, cpname_state::make_dtor)
6063 (cpname_state::make_builtin_type, cpname_state::make_name)
6064 (cpname_state::d_qualify, cpname_state::d_int_type)
6065 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6066 (%union): Move earlier.
6067
6068 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6069
6070 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6071
6072 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6073
6074 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6075 (aarch64_pseudo_write_1): Likewise.
6076 (aarch64_pseudo_read_value): Use helper.
6077 (aarch64_pseudo_write): Likewise.
6078
6079 2018-06-04 Pedro Alves <palves@redhat.com>
6080
6081 * darwin-nat.c (darwin_ops): Delete.
6082 (darwin_attach_pid): Use get_native_target.
6083
6084 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6085
6086 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6087 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6088
6089 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6090
6091 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6092 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6093 (aarch64_gdbarch_init): Check for SVE.
6094 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6095
6096 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6097
6098 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6099 * aarch64-tdep.h (aarch64_read_description): Likewise.
6100 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6101 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6102 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6103 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6104 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6105
6106 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6107
6108 * value.c (value_fetch_lazy_bitfield): New.
6109 (value_fetch_lazy_memory): New.
6110 (value_fetch_lazy_register): New.
6111 (value_fetch_lazy): Factor out to smaller functions.
6112
6113 2018-06-01 Tom Tromey <tom@tromey.com>
6114
6115 * cp-name-parser.y (backslashable, represented): Now const.
6116
6117 2018-06-01 Tom Tromey <tom@tromey.com>
6118
6119 * cp-name-parser.y: Include parser-defs.h.
6120 (parser_fprintf): Remove declaration.
6121
6122 2018-06-01 Tom Tromey <tom@tromey.com>
6123
6124 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6125 %parse-param.
6126 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6127 (global_result): Remove globals.
6128 (struct cpname_state): New.
6129 (yyparse): Don't declare.
6130 (yylex, yyerror): Move declarations after %union.
6131 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6132 (make_name): Add state parameter.
6133 Update all callers.
6134 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6135 parameter.
6136 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6137 Update.
6138 (yylex): Add lvalp, state parameters.
6139 (yyerror): Add state parameter.
6140 (cp_demangled_name_to_comp): Update.
6141
6142 2018-06-01 Tom Tromey <tom@tromey.com>
6143
6144 * cp-name-parser.y (parser_fprintf): Declare.
6145 (GDB_YY_REMAP_PREFIX): Define.
6146 Include yy-remap.h. Don't redefine yy* identifiers.
6147
6148 2018-06-01 Tom Tromey <tom@tromey.com>
6149
6150 * python/py-type.c (typy_legacy_template_argument): Update.
6151 * cp-support.h (cp_demangled_name_to_comp): Update.
6152 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6153 parameter to be a "std::string *".
6154 (main): Update.
6155
6156 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6157
6158 * ada-lex.l: Include "diagnostics.h" instead of
6159 "common/diagnostics.h".
6160 * unittests/environ-selftests.c: Likewise.
6161 * common/diagnostics.h: Moved to ../include.
6162
6163 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6164
6165 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6166 to language_mode_manual while calling breakpoint_re_set_one.
6167
6168 2018-06-01 Tom Tromey <tom@tromey.com>
6169
6170 * valops.c (value_cast_structs, destructor_name_p): Update.
6171 * symtab.c (gdb_mangle_name): Update.
6172 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6173 Update.
6174 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6175 (pascal_object_print_value_fields, pascal_object_print_value):
6176 Update.
6177 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6178 * linespec.c (find_methods): Update.
6179 * gdbtypes.h (type_name_no_tag): Remove.
6180 (type_name_or_error): Rename from type_name_no_tag_or_error.
6181 * gdbtypes.c (type_name_no_tag): Remove.
6182 (type_name_or_error): Rename from type_name_no_tag_or_error.
6183 (lookup_struct_elt_type, check_typedef): Update.
6184 * expprint.c (print_subexp_standard): Update.
6185 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6186 * d-namespace.c (d_lookup_nested_symbol): Update.
6187 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6188 (cp_print_class_member): Update.
6189 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6190 * completer.c (add_struct_fields): Update.
6191 * c-typeprint.c (cp_type_print_derivation_info)
6192 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6193 Update.
6194 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6195 (ada_prefer_type, ada_is_exception_sym): Update.
6196
6197 2018-06-01 Tom Tromey <tom@tromey.com>
6198
6199 * valops.c (enum_constant_from_type, value_namespace_elt)
6200 (value_maybe_namespace_elt): Update.
6201 * valarith.c (find_size_for_pointer_math): Update.
6202 * target-descriptions.c (make_gdb_type): Update.
6203 * symmisc.c (print_symbol): Update.
6204 * stabsread.c (define_symbol, read_type)
6205 (complain_about_struct_wipeout, add_undefined_type)
6206 (cleanup_undefined_types_1): Update.
6207 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6208 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6209 (rust_internal_print_type, rust_composite_type)
6210 (rust_evaluate_funcall, rust_evaluate_subexp)
6211 (rust_inclusive_range_type_p): Update.
6212 * python/py-type.c (typy_get_tag): Update.
6213 * p-typeprint.c (pascal_type_print_base): Update.
6214 * mdebugread.c (parse_symbol, parse_type): Update.
6215 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6216 Update.
6217 * guile/scm-type.c (gdbscm_type_tag): Update.
6218 * go-lang.c (sixg_string_p): Update.
6219 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6220 Update.
6221 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6222 (TYPE_TAG_NAME): Remove.
6223 * gdbtypes.c (type_name_no_tag): Simplify.
6224 (check_typedef, check_types_equal, recursive_dump_type)
6225 (copy_type_recursive, arch_composite_type): Update.
6226 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6227 in summary mode when needed.
6228 * eval.c (evaluate_funcall): Update.
6229 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6230 (process_structure_scope, read_enumeration_type)
6231 (read_namespace_type, read_module_type, determine_prefix): Update.
6232 * cp-support.c (inspect_type): Update.
6233 * coffread.c (process_coff_symbol, decode_base_type): Update.
6234 * c-varobj.c (c_is_path_expr_parent): Update.
6235 * c-typeprint.c (c_type_print_base_struct_union): Update.
6236 (c_type_print_base_1): Update. Print struct/class/union/enum in
6237 summary when using C language.
6238 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6239 (gen_maybe_namespace_elt): Update.
6240 * ada-lang.c (ada_type_name): Simplify.
6241 (empty_record, ada_template_to_fixed_record_type_1)
6242 (template_to_static_fixed_type)
6243 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6244
6245 2018-06-01 Tom Tromey <tom@tromey.com>
6246
6247 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6248 c_print_type.
6249 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6250 (c_print_type): Update.
6251 (c_print_type): New overload.
6252 (c_type_print_varspec_prefix, c_type_print_args)
6253 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6254 (c_type_print_base_struct_union, c_type_print_base_1)
6255 (cp_type_print_method_args): Add "language" parameter.
6256 (c_type_print_base): Update.
6257 * c-lang.h (c_print_type): Add new overload.
6258
6259 2018-06-01 Tom Tromey <tom@tromey.com>
6260
6261 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6262 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6263
6264 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6265
6266 * aarch64-tdep.c (aarch64_sve_register_names): New const
6267 var.
6268 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6269 (AARCH64_SVE_Z_REGS_NUM): New define.
6270 (AARCH64_SVE_P_REGS_NUM): Likewise.
6271 (AARCH64_SVE_NUM_REGS): Likewise.
6272
6273 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6274
6275 * nat/linux-ptrace.h [__alpha__]
6276 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6277 definitions.
6278
6279 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6280
6281 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6282 the endianness selected.
6283 * NEWS: Document `set endian auto' mode operation update.
6284
6285 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6286
6287 * Makefile.in: Add new header.
6288 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6289 (sve_vl_from_vg): Likewise.
6290 (sve_vq_from_vl): Likewise.
6291 (sve_vl_from_vq): Likewise.
6292 (sve_vq_from_vg): Likewise.
6293 (sve_vg_from_vq): Likewise.
6294 * configure.nat: Add new c file.
6295 * nat/aarch64-sve-linux-ptrace.c: New file.
6296 * nat/aarch64-sve-linux-ptrace.h: New file.
6297
6298 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6299
6300 * aarch64-linux-nat.c (aarch64_linux_read_description):
6301 Add parmeter zero.
6302 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6303 Likewise.
6304 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6305 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6306 (aarch64_gdbarch_init): Add parmeter zero.
6307 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6308 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6309 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6310 parmeter.
6311 * doc/gdb.texinfo: Describe SVE feature
6312 * features/aarch64-sve.c: New file.
6313
6314 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6315
6316 PR gdb/23210
6317 * gdbarch.sh (significant_addr_bit): Default to zero when
6318 not set by target architecture.
6319 * gdbarch.c: Re-generated.
6320 * utils.c (address_significant): Update.
6321
6322 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6323
6324 * stack.c (func_command): Remove trailing newline in call to error.
6325
6326 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6327
6328 * regcache.h (regcache_raw_collect): Remove, update callers to
6329 use regcache::raw_collect.
6330 * regcache.c (regcache_raw_collect): Remove.
6331
6332 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6333
6334 * regcache.h (regcache_raw_supply): Remove, update callers to
6335 use detached_regcache::raw_supply.
6336 * regcache.c (regcache_raw_supply): Remove.
6337
6338 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6339
6340 * regcache.h (regcache_cooked_write_part): Remove, update
6341 callers to use regcache::cooked_write_part.
6342 * regcache.c (regcache_cooked_write_part): Remove.
6343
6344 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6345
6346 * regcache.h (regcache_cooked_read_part): Remove, update callers
6347 to use readable_regcache::cooked_read_part.
6348 * regcache.c (regcache_cooked_read_part): Remove.
6349
6350 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6351
6352 * regcache.h (regcache_cooked_read_value): Remove, update
6353 callers to use readable_regcache::cooked_read_value.
6354 * regcache.c (regcache_cooked_read_value): Remove.
6355
6356 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6357
6358 * regcache.h (regcache_cooked_write): Remove, update callers to
6359 use regcache::cooked_write.
6360 * regcache.c (regcache_cooked_write): Remove.
6361
6362 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6363
6364 * regcache.h (regcache_invalidate): Remove, update callers to
6365 use detached_regcache::invalidate instead.
6366 * regcache.c (regcache_invalidate): Remove.
6367
6368 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6369
6370 * regcache.h (regcache_raw_write_part): Remove, update callers
6371 to use regcache::raw_write_part instead.
6372 * regcache.c (regcache_raw_write_part): Remove.
6373
6374 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6375
6376 * regcache.h (regcache_raw_read_part): Remove, update callers to
6377 use readable_regcache::raw_read_part instead.
6378 * regcache.c (regcache_raw_read_part): Remove.
6379
6380 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6381
6382 * regcache.h (regcache_cooked_read): Remove, update callers to
6383 use readable_regcache::cooked_read instead.
6384 * regcache.c (regcache_cooked_read): Remove.
6385
6386 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6387
6388 * regcache.h (regcache_raw_write): Remove, update callers to use
6389 regcache::raw_write instead.
6390 * regcache.c (regcache_raw_write): Remove.
6391
6392 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6393
6394 * regcache.h (regcache_raw_read): Remove, update callers to use
6395 readable_regcache::raw_read instead.
6396 * regcache.c (regcache_raw_read): Remove.
6397
6398 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6399
6400 * regcache.h (regcache_raw_update): Remove, update callers to
6401 use readable_regcache::raw_update instead.
6402 * regcache.c (regcache_raw_update): Remove.
6403
6404 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6405
6406 * regcache.h (regcache_register_status): Remove, update callers
6407 to use reg_buffer::get_register_status directly instead.
6408 * regcache.c (regcache_register_status): Remove.
6409
6410 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6411
6412 * regcache.h (regcache_get_ptid): Remove, update all callers to
6413 call regcache::ptid instead.
6414 * regcache.c (regcache_get_ptid): Remove.
6415
6416 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6417
6418 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6419
6420 2018-05-30 Pedro Alves <palves@redhat.com>
6421
6422 * common/common-exceptions.h (exception_rethrow): Use
6423 ATTRIBUTE_NORETURN.
6424
6425 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6426
6427 * breakpoint.c (print_solib_event, check_status_catch_solib):
6428 Remove struct keyword in range-based for loops.
6429 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6430 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6431 Likewise.
6432 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6433 Likewise.
6434 * symfile.c (addr_info_make_relative): Likewise.
6435 * thread.c (value_in_thread_stack_temporaries): Likewise.
6436
6437 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6438
6439 PR gdb/16841
6440 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6441 aggregate type to get its real type before accessing it.
6442
6443 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6444
6445 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6446 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6447 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6448 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6449 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6450 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6451 * printcmd.c (info_address_command): Likewise.
6452
6453 2018-05-29 Tom Tromey <tom@tromey.com>
6454
6455 * windows-nat.c (handle_exception): Update fall-through comment.
6456
6457 2018-05-29 Tom Tromey <tom@tromey.com>
6458
6459 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6460 (struct program_space) <added_solibs>: Now a std::vector.
6461 * breakpoint.c (print_solib_event): Update.
6462 (check_status_catch_solib): Update.
6463 * progspace.c (clear_program_space_solib_cache): Update.
6464 * solib.c (update_solib_list): Update.
6465
6466 2018-05-29 Tom Tromey <tom@tromey.com>
6467
6468 * python/py-type.c (typy_richcompare): Update.
6469 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6470 * gdbtypes.h (types_deeply_equal): Return bool.
6471 (types_equal): Likewise.
6472 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6473 declare VEC.
6474 (check_types_equal): Change worklist to std::vector. Return
6475 bool.
6476 (struct type_equality_entry): Add constructor.
6477 (compare_maybe_null_strings): Return bool.
6478 (check_types_worklist): Return bool. Change worklist to
6479 std::vector.
6480 (types_deeply_equal): Use std::vector.
6481 (types_equal): Return bool.
6482 (compare_maybe_null_strings): Simplify.
6483
6484 2018-05-29 Tom Tromey <tom@tromey.com>
6485
6486 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6487
6488 2018-05-29 Tom Tromey <tom@tromey.com>
6489
6490 * objc-lang.h: Don't include cp-support.h.
6491 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6492 declare VEC.
6493
6494 2018-05-27 Tom Tromey <tom@tromey.com>
6495
6496 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6497
6498 2018-05-25 Tom Tromey <tom@tromey.com>
6499
6500 * value.c (value::location): Initialize.
6501
6502 2018-05-25 Tom Tromey <tom@tromey.com>
6503
6504 * dbxread.c (init_bincl_list): Remove.
6505 (bincl_list): Now a std::vector.
6506 (bincls_allocated, next_bincl): Remove.
6507 (free_bincl_list, do_free_bincl_list_cleanup)
6508 (make_cleanup_free_bincl_list): Remove.
6509 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6510 unique_xmalloc_ptr.
6511 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6512 (struct header_file_location): Add constructor.
6513 (add_bincl_to_list): Remove.
6514
6515 2018-05-25 Tom Tromey <tom@tromey.com>
6516
6517 * tui/tui.c (tui_enable): Update.
6518 * mi/mi-interp.c (mi_interp::init): Update.
6519 * interps.h (class interp) <name>: New method.
6520 <m_name>: Rename from name.
6521 (~scoped_restore_interp): Update.
6522 * interps.c (interp::interp): Update.
6523 (interp_add, interp_set, interp_lookup_existing)
6524 (current_interp_named_p): Update.
6525
6526 2018-05-25 Tom Tromey <tom@tromey.com>
6527
6528 * interps.c (interp_name): Remove.
6529 * mi/mi-interp.c (mi_interp::init): Update.
6530 * interps.h (interp_name): Remove.
6531 (~scoped_restore_interp): Update.
6532 * tui/tui.c (tui_enable): Update.
6533
6534 2018-05-25 Tom Tromey <tom@tromey.com>
6535
6536 * utils.c (fputs_maybe_filtered): Update.
6537 * linespec.c (decode_line_full): Update.
6538 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6539 (mi_print_breakpoint_for_event, mi_solib_loaded)
6540 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6541 (mi_user_selected_context_changed): Update.
6542 * mi/mi-main.c (mi_execute_command): Update.
6543 * cli/cli-script.c (execute_control_command): Update.
6544 * python/python.c (execute_gdb_command): Update.
6545 * solib.c (info_sharedlibrary_command): Update.
6546 * interps.c (interp_ui_out): Remove.
6547 * interps.h (interp_ui_out): Remove.
6548
6549 2018-05-25 Tom Tromey <tom@tromey.com>
6550
6551 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6552 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6553 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6554
6555 2018-05-25 Tom Tromey <tom@tromey.com>
6556
6557 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6558 * interps.c (interp_exec): Use scoped_restore.
6559
6560 2018-05-25 Tom Tromey <tom@tromey.com>
6561
6562 * remote.c (remote_target::remote_file_get): Use
6563 gdb::byte_vector.
6564 (remote_target::remote_file_put): Likewise.
6565
6566 2018-05-25 Tom Tromey <tom@tromey.com>
6567
6568 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6569 a std::string.
6570 (get_pe_section_index, add_pe_exported_sym): Update.
6571 (read_pe_exported_syms): Use gdb::def_vector.
6572
6573 2018-05-25 Tom Tromey <tom@tromey.com>
6574
6575 * frame.c (remove_prev_frame): Remove.
6576 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6577
6578 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6579
6580 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6581 Remove prototypes.
6582 * mips-linux-nat.c (supply_fpregset): Always call
6583 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6584 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6585 `mips_fill_fpregset'.
6586 * mips-linux-tdep.c (mips_supply_fpregset)
6587 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6588 (mips_fill_fpregset_wrapper): Remove functions.
6589 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6590 (mips_linux_fpregset): Remove variable.
6591 (mips_linux_iterate_over_regset_sections): Use
6592 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6593 (mips_linux_o32_sigframe_init): Remove comment.
6594
6595 2018-05-25 Pedro Alves <palves@redhat.com>
6596
6597 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6598 (struct readahead_cache, struct packet_reg, struct
6599 remote_arch_state, class remote_state): Move higher up in the
6600 file.
6601 (remote_target::m_remote_state): Now an object instead of a pointer.
6602 (remote_target::get_remote_state): Adjust.
6603
6604 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6605
6606 * stack.c (select_and_print_frame): Delete.
6607 (struct function_bounds): Move struct within function.
6608 (func_command): Most content moved into new function
6609 find_frame_for_function, use new function, print result, add
6610 function comment.
6611 (find_frame_for_function): New function, now returns a result.
6612
6613 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6614
6615 * stack.c (iterate_over_block_arg_vars): Fix comment.
6616 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6617
6618 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6619
6620 PR gdb/23203
6621 * frame.c
6622 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6623 Define.
6624 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6625 Define.
6626 * frame.h (class scoped_restore_selected_frame): New class.
6627 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6628 of any exception, use scoped_restore_selected_frame to restore the
6629 frame instead.
6630
6631 2018-05-24 Pedro Alves <palves@redhat.com>
6632
6633 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6634 override.
6635
6636 2018-05-23 Tom Tromey <tom@tromey.com>
6637
6638 * complaints.c (struct complaints): Remove.
6639 (symfile_complaint_book): Remove.
6640 (series): New global.
6641 (complaint_internal): Update.
6642 (clear_complaints): Update.
6643
6644 2018-05-23 Tom Tromey <tom@tromey.com>
6645
6646 * complaints.c (counters): New global.
6647 (struct complain): Remove.
6648 (struct complaints) <root>: Remove.
6649 (complaint_sentinel): Remove.
6650 (symfile_complaint_book): Update.
6651 (find_complaint) Remove.
6652 (complaint_internal, clear_complaints): Update.
6653
6654 2018-05-23 Tom Tromey <tom@tromey.com>
6655
6656 * complaints.c (struct complain) <file, line>: Remove.
6657 (find_complaint): Remove file, line parameters.
6658 (complaint_internal): Update.
6659
6660 2018-05-23 Tom Tromey <tom@tromey.com>
6661
6662 * complaints.c (vcomplaint): Remove.
6663 (complaint_internal) Merge in contents of vcomplaint.
6664
6665 2018-05-23 Tom Tromey <tom@tromey.com>
6666
6667 * complaints.c (struct complaints) <explanation>: Remove.
6668 (symfile_explanations): Remove.
6669 (symfile_complaint_book): Update.
6670 (vcomplaint): Update.
6671 (struct explanation): Remove.
6672
6673 2018-05-23 Tom Tromey <tom@tromey.com>
6674
6675 * complaints.c (symfile_complaints): Remove.
6676 (complaint_internal): Remove "complaints" parameter.
6677 (clear_complaints, vcomplaint): Remove "c" parameter.
6678 (get_complaints): Remove.
6679 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6680 (dwarf2_debug_line_missing_file_complaint)
6681 (dwarf2_debug_line_missing_end_sequence_complaint)
6682 (dwarf2_complex_location_expr_complaint)
6683 (dwarf2_const_value_length_mismatch_complaint)
6684 (dwarf2_section_buffer_overflow_complaint)
6685 (dwarf2_macro_malformed_definition_complaint)
6686 (dwarf2_invalid_attrib_class_complaint)
6687 (create_addrmap_from_index, dw2_symtab_iter_next)
6688 (dw2_expand_marked_cus)
6689 (dw2_debug_names_iterator::find_vec_in_debug_names)
6690 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6691 (create_debug_type_hash_table, init_cutu_and_read_dies)
6692 (partial_die_parent_scope, add_partial_enumeration)
6693 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6694 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6695 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6696 (create_cus_hash_table, create_dwp_hash_table)
6697 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6698 (dwarf2_rnglists_process, dwarf2_ranges_process)
6699 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6700 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6701 (handle_struct_member_die, process_structure_scope)
6702 (read_array_type, read_common_block, read_module_type)
6703 (read_tag_pointer_type, read_typedef, read_base_type)
6704 (read_subrange_type, load_partial_dies, partial_die_info::read)
6705 (partial_die_info::read, partial_die_info::read)
6706 (partial_die_info::read, read_checked_initial_length_and_offset)
6707 (dwarf2_string_attr, read_formatted_entries)
6708 (dwarf_decode_line_header)
6709 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6710 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6711 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6712 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6713 (get_signatured_type, get_DW_AT_signature_type)
6714 (decode_locdesc, file_file_name, consume_improper_spaces)
6715 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6716 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6717 (dwarf2_symbol_mark_computed, set_die_type)
6718 (read_attribute_value): Update.
6719 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6720 Update.
6721 * dbxread.c (unknown_symtype_complaint)
6722 (lbrac_mismatch_complaint, repeated_header_complaint)
6723 (set_namestring, function_outside_compilation_unit_complaint)
6724 (read_dbx_symtab, process_one_symbol): Update.
6725 * gdbtypes.c (stub_noname_complaint): Update.
6726 * windows-nat.c (handle_unload_dll): Update.
6727 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6728 (decode_base_type): Update.
6729 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6730 (eb_complaint, record_include_begin, record_include_end)
6731 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6732 (process_xcoff_symbol, read_symbol)
6733 (function_outside_compilation_unit_complaint)
6734 (scan_xcoff_symtab): Update.
6735 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6736 * buildsym.c (finish_block_internal, make_blockvector)
6737 (end_symtab_get_static_block, augment_type_symtab): Update.
6738 * dtrace-probe.c (dtrace_process_dof)
6739 (dtrace_static_probe_ops::get_probes): Update.
6740 * complaints.h (struct complaint): Don't declare.
6741 (symfile_complaints): Remove.
6742 (complaint_internal): Remove "complaints" parameter.
6743 (complaint): Likewise.
6744 (clear_complaints): Likewise.
6745 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6746 (reread_symbols): Update.
6747 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6748 (dwarf2_frame_cache, decode_frame_entry): Update.
6749 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6750 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6751 (info_selectors_command): Update.
6752 * macrotab.c (macro_include, check_for_redefinition)
6753 (macro_undef): Update.
6754 * objfiles.c (filter_overlapping_sections): Update.
6755 * stabsread.c (invalid_cpp_abbrev_complaint)
6756 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6757 (define_symbol, error_type, read_type, rs6000_builtin_type)
6758 (stabs_method_name_from_physname, read_member_functions)
6759 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6760 (attach_fields_to_type, complain_about_struct_wipeout)
6761 (read_range_type, read_args, common_block_start)
6762 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6763 Update.
6764 * mdebugread.c (index_complaint, unknown_ext_complaint)
6765 (basic_type_complaint, bad_tag_guess_complaint)
6766 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6767 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6768 (parse_procedure, parse_lines)
6769 (function_outside_compilation_unit_complaint)
6770 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6771 (bad_tag_guess_complaint, reg_value_complaint): Update.
6772 * cp-support.c (demangled_name_complaint): Update.
6773 * macroscope.c (sal_macro_scope): Update.
6774 * dwarf-index-write.c (class debug_names): Update.
6775
6776 2018-05-23 Tom Tromey <tom@tromey.com>
6777
6778 * complaints.c (clear_complaints): Remove "noisy" parameter.
6779 * complaints.h (clear_complaints): Update.
6780 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6781 (reread_symbols): Update.
6782
6783 2018-05-23 Tom Tromey <tom@tromey.com>
6784
6785 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6786 SUBSEQUENT_MESSAGE.
6787 (vcomplaint, clear_complaints): Update.
6788 (symfile_explanations): Remove some messages.
6789
6790 2018-05-23 Tom Tromey <tom@tromey.com>
6791
6792 * complaints.c (internal_complaint): Remove.
6793 * complaints.h (internal_complaint): Remove.
6794
6795 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6796
6797 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6798
6799 2018-05-22 Pedro Alves <palves@redhat.com>
6800
6801 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6802 (remote_fileio_badfd, remote_fileio_return_errno)
6803 (remote_fileio_return_success, remote_fileio_func_open)
6804 (remote_fileio_func_open, remote_fileio_func_close)
6805 (remote_fileio_func_read, remote_fileio_func_write)
6806 (remote_fileio_func_lseek, remote_fileio_func_rename)
6807 (remote_fileio_func_unlink, remote_fileio_func_stat)
6808 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6809 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6810 remote_target parameter.
6811 (remote_fio_func_map) <func>: Add remote_target parameter.
6812 (do_remote_fileio_request, remote_fileio_request):
6813 * remote-fileio.h (remote_fileio_request):
6814 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6815 remote_target parameter.
6816 (remote_notif_process, handle_notification): Adjust to pass down
6817 the remote.
6818 (remote_notif_state_allocate): Add remote_target parameter. Save
6819 it.
6820 * remote-notif.h (struct remote_target): Forward declare.
6821 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6822 remote_target parameter.
6823 (struct remote_notif_state) <remote>: New field.
6824 (remote_notif_ack, remote_notif_parse): Add remote_target
6825 parameter.
6826 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6827 remote_target parameter.
6828 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6829 (threads_listing_context, rmt_thread_action, protocol_feature)
6830 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6831 (packet_result, struct threads_listing_context, remote_state):
6832 Move definitions and declarations higher up.
6833 (remote_target) <~remote_target>: Declare.
6834 (remote_download_command_source, remote_file_put, remote_file_get)
6835 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6836 (remote_hostio_pread_vFile, remote_hostio_send_command)
6837 (remote_hostio_set_filesystem, remote_hostio_open)
6838 (remote_hostio_close, remote_hostio_unlink, remote_state)
6839 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6840 (get_memory_write_packet_size, get_memory_read_packet_size)
6841 (append_pending_thread_resumptions, remote_detach_1)
6842 (append_resumption, remote_resume_with_vcont)
6843 (add_current_inferior_and_thread, wait_ns, wait_as)
6844 (process_stop_reply, remote_notice_new_inferior)
6845 (process_initial_stop_replies, remote_add_thread)
6846 (btrace_sync_conf, remote_btrace_maybe_reopen)
6847 (remove_new_fork_children, kill_new_fork_children)
6848 (discard_pending_stop_replies, stop_reply_queue_length)
6849 (check_pending_events_prevent_wildcard_vcont)
6850 (discard_pending_stop_replies_in_queue, stop_reply)
6851 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6852 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6853 (remote_interrupt_as, remote_interrupt_ns)
6854 (remote_get_noisy_reply, remote_query_attached)
6855 (remote_add_inferior, remote_current_thread, get_current_thread)
6856 (set_thread, set_general_thread, set_continue_thread)
6857 (set_general_process, write_ptid)
6858 (remote_unpack_thread_info_response, remote_get_threadinfo)
6859 (parse_threadlist_response, remote_get_threadlist)
6860 (remote_threadlist_iterator, remote_get_threads_with_ql)
6861 (remote_get_threads_with_qxfer)
6862 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6863 (get_offsets, remote_check_symbols, remote_supported_packet)
6864 (remote_query_supported, remote_packet_size)
6865 (remote_serial_quit_handler, remote_detach_pid)
6866 (remote_vcont_probe, remote_resume_with_hc)
6867 (send_interrupt_sequence, interrupt_query)
6868 (remote_notif_get_pending_events, fetch_register_using_p)
6869 (send_g_packet, process_g_packet, fetch_registers_using_g)
6870 (store_register_using_P, store_registers_using_G)
6871 (set_remote_traceframe, check_binary_download)
6872 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6873 (remote_xfer_live_readonly_partial, remote_read_bytes)
6874 (remote_send_printf, remote_flash_write, readchar)
6875 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6876 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6877 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6878 (extended_remote_disable_randomization, extended_remote_run)
6879 (send_environment_packet, extended_remote_environment_support)
6880 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6881 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6882 (packet_command): Now methods of ...
6883 (remote_target): ... this class.
6884 (m_remote_state) <remote_target>: New field.
6885 (struct remote_state) <stop_reply_queue,
6886 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6887 fields.
6888 (remote_state::remote_state): Allocate stop_reply_queue.
6889 (remote_state): Delete global.
6890 (get_remote_state_raw): Delete.
6891 (remote_target::get_remote_state): Allocate m_remote_state on
6892 demand.
6893 (get_current_remote_target): New.
6894 (remote_ops, extended_remote_ops): Delete.
6895 (wait_forever_enabled_p, remote_async_inferior_event_token):
6896 Delete, moved to struct remote_state.
6897 (remote_target::close): Delete self. Destruction bits split to
6898 ...
6899 (remote_target::~remote_target): ... this.
6900 (show_memory_packet_size): Adjust to use
6901 get_current_remote_target.
6902 (struct protocol_feature) <func>: Add remote_target parameter.
6903 All callers adjusted.
6904 (curr_quit_handler_target): New.
6905 (remote_serial_quit_handler): Reimplement.
6906 (remote_target::open_1): Adjust to use get_current_remote_target.
6907 Heap-allocate remote_target/extended_remote_target instances.
6908 (vcont_builder::vcont_builder): Add remote_target parameter, and
6909 save it in m_remote. All callers adjusted.
6910 (vcont_builder::m_remote): New field.
6911 (vcont_builder::restart, vcont_builder::flush)
6912 (vcont_builder::push_action): Use it.
6913 (remote_target::commit_resume): Use it.
6914 (struct queue_iter_param) <remote>: New field.
6915 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6916 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6917 (check_pending_event_prevents_wildcard_vcont_callback)
6918 (remote_target::check_pending_events_prevent_wildcard_vcont)
6919 (remote_target::discard_pending_stop_replies)
6920 (remote_target::discard_pending_stop_replies_in_queue)
6921 (remote_target::remote_notif_remove_queued_reply): Fill in
6922 'remote' field.
6923 (remote_notif_get_pending_events): New.
6924 (remote_target::readchar, remote_target::remote_serial_write):
6925 Save/restore curr_quit_handler_target.
6926 (putpkt): New.
6927 (kill_new_fork_children): Fill in 'remote' field.
6928 (packet_command): Use get_current_remote_target, defer to
6929 remote_target method of same name.
6930 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6931 parameter, and save it in m_remote. All callers adjusted.
6932 (scoped_remote_fd::release): Use m_remote.
6933 (scoped_remote_fd::m_remote): New field.
6934 (remote_file_put, remote_file_get, remote_file_delete): Use
6935 get_current_remote_target, defer to remote_target method of same
6936 name.
6937 (remote_btrace_reset): Add remote_state paremeter. Update all
6938 callers.
6939 (remote_async_inferior_event_handler). Pass down 'data'.
6940 (remote_new_objfile): Use get_current_remote_target.
6941 (remote_target::vcont_r_supported): New.
6942 (set_range_stepping): Use get_current_remote_target and
6943 remote_target::vcont_r_supported.
6944 (_initialize_remote): Don't allocate 'remote_state' and
6945 'stop_reply_queue' globals.
6946 * remote.h (struct remote_target): Forward declare.
6947 (getpkt, putpkt, remote_notif_get_pending_events): Add
6948 'remote_target' parameter.
6949
6950 2018-05-22 Pedro Alves <palves@redhat.com>
6951
6952 * remote.c (vcont_builder): Now a class. Make all data members
6953 private.
6954 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6955 Declare methods.
6956 (vcont_builder_restart): Rename to ...
6957 (vcont_builder::restart): ... this.
6958 (vcont_builder_flush): Rename to ...
6959 (vcont_builder::flush): ... this.
6960 (vcont_builder_push_action): Rename to ...
6961 (vcont_builder::push_action): ... this.
6962 (remote_target::commit_resume): Adjust.
6963
6964 2018-05-22 Pedro Alves <palves@redhat.com>
6965
6966 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6967 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6968 (get_fixed_memory_packet_size): New.
6969 (get_memory_packet_size): Use it.
6970 (set_memory_packet_size): Don't override the config size with
6971 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6972 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6973 Don't refer to get_memory_packet_size if not connected to a remote
6974 target. Show "(default)" if configured size is 0.
6975
6976 2018-05-22 Pedro Alves <palves@redhat.com>
6977
6978 * remote.c (remote_target::mourn_inferior): Move
6979 discard_pending_stop_replies call here from ...
6980 (_initialize_remote): ... here.
6981
6982 2018-05-22 Pedro Alves <palves@redhat.com>
6983
6984 * remote.c (compare_section_command): Remove set_general_process
6985 call.
6986
6987 2018-05-22 Pedro Alves <palves@redhat.com>
6988
6989 * remote.c (struct packet_reg, struct remote_arch_state):
6990 Move higher up in the file.
6991 (remote_state) <m_arch_states>: Store remote_arch_state values
6992 instead of remote_arch_state pointers.
6993 (remote_state::get_remote_arch_state): Adjust.
6994
6995 2018-05-22 Pedro Alves <palves@redhat.com>
6996
6997 * remote.c: Include <unordered_map>.
6998 (remote_state): Now a class.
6999 (remote_state) <get_remote_arch_state>: Declare method.
7000 <get_remote_arch_state>: New field.
7001 (remote_arch_state) <remote_arch_state>: Declare ctor.
7002 <regs>: Now a unique_ptr.
7003 (remote_gdbarch_data_handle): Delete.
7004 (get_remote_arch_state): Delete.
7005 (remote_state::get_remote_arch_state): New.
7006 (get_remote_state): Adjust to call remote_state's
7007 get_remote_arch_state method.
7008 (init_remote_state): Delete, bits factored out to ...
7009 (remote_arch_state::remote_arch_state): ... this new method.
7010 (get_remote_packet_size, get_memory_packet_size)
7011 (process_g_packet, remote_target::fetch_registers)
7012 (remote_target::prepare_to_store, store_registers_using_G)
7013 (remote_target::store_registers, remote_target::get_trace_status):
7014 Adjust to call remote_state's method.
7015 (_initialize_remote): Remove reference to
7016 remote_gdbarch_data_handle.
7017
7018 2018-05-22 Pedro Alves <palves@redhat.com>
7019
7020 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7021 pread>: New method declarations.
7022 (remote_target::open_1): Adjust.
7023 (readahead_cache_invalidate): Rename to ...
7024 (readahead_cache::invalidate): ... this, and adjust to be a class
7025 method.
7026 (readahead_cache_invalidate_fd): Rename to ...
7027 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7028 class method.
7029 (remote_hostio_pwrite): Adjust.
7030 (remote_hostio_pread_from_cache): Rename to ...
7031 (readahead_cache::pread): ... this, and adjust to be a class
7032 method.
7033 (remote_hostio_close): Adjust.
7034
7035 2018-05-22 Pedro Alves <palves@redhat.com>
7036
7037 * remote.c (remote_hostio_close_cleanup): Delete.
7038 (class scoped_remote_fd): New.
7039 (remote_file_put, remote_file_get): Use it.
7040
7041 2018-05-22 Pedro Alves <palves@redhat.com>
7042
7043 (struct vCont_action_support): Use bool and initialize all fields.
7044 (struct readahead_cache): Initialize all fields.
7045 (remote_state): Use bool and initialize all fields.
7046 (remote_state::remote_state, remote_state::~remote_state): New.
7047 (new_remote_state): Delete.
7048 (_initialize_remote): Use new to allocate remote_state.
7049
7050 2018-05-22 Pedro Alves <palves@redhat.com>
7051 張俊芝 <zjz@zjz.name>
7052
7053 PR gdb/22973
7054 * c-exp.y: Include "c-support.h".
7055 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7056 of tolower. Use c_ident_is_alpha to scan names.
7057 * c-lang.c: Include "c-support.h".
7058 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7059 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7060 * c-support.h: New file, with bits factored out from ...
7061 * cp-name-parser.y: ... this file.
7062 Include "c-support.h".
7063 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7064 c-support.h and renamed.
7065 (symbol_end, yylex): Adjust.
7066
7067 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7068
7069 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7070 parameter type to CORE_ADDR.
7071 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7072 parameter type in declaration to CORE_ADDR.
7073 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7074 target_auxv_search to get AT_HWCAP and use the result to get the
7075 target description.
7076 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7077 to CORE_ADDR. Remove the cast of the return value to unsigned
7078 long. Fix error predicate of target_auxv_search.
7079 (ppc_linux_nat_target::read_description): Change the type of the
7080 hwcap variable to CORE_ADDR.
7081
7082 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7083
7084 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7085 if the size of fpscr is larger than 32 bits.
7086
7087 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7088
7089 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7090 (ppc32_linux_vsxregmap): New global.
7091 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7092 regcache_supply_regset, and regcache_collect_regset.
7093 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7094 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7095 (fetch_vsx_register, store_vsx_register): Remove.
7096 (fetch_vsx_registers): Add regno parameter. Get regset using
7097 ppc_linux_vsxregset. Use regset to supply registers.
7098 (store_vsx_registers): Add regno parameter. Get regset using
7099 ppc_linux_vsxregset. Use regset to collect registers.
7100 (fetch_register): Call fetch_vsx_registers instead of
7101 fetch_vsx_register.
7102 (store_register): Call store_vsx_registers instead of
7103 store_vsx_register.
7104 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7105 new regno parameter.
7106 (store_ppc_registers): Call store_vsx_registers with -1 for the
7107 new regno parameter.
7108 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7109 (ppc_collect_vsxregset): Remove.
7110
7111 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7112
7113 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7114 offset fields.
7115 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7116 for vector register offset fields.
7117 (ppc64_fbsd_reg_offsets): Likewise.
7118 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7119 to vector register offset fields.
7120 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7121 to vector register offset fields.
7122 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7123 vector register offset fields.
7124 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7125 initializers for vector register offset fields.
7126 (rs6000_aix64_reg_offsets): Likewise.
7127 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7128 (ppc_supply_vrregset): Remove.
7129 (ppc_collect_vrregset): Remove.
7130 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7131 (ppc_linux_vrregset) : New function.
7132 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7133 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7134 (ppc32_linux_vrregset): Remove.
7135 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7136 and use result instead of ppc32_linux_vrregset.
7137 (ppc32_linux_reg_offsets): Remove initializers for vector register
7138 offset fields.
7139 (ppc64_linux_reg_offsets): Likewise.
7140 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7141 * ppc-linux-nat.c: Include regset.h.
7142 (gdb_vrregset_t): Adjust comment to account for little-endian
7143 mode.
7144 (supply_vrregset, fill_vrregset): Remove.
7145 (fetch_altivec_register, store_altivec_register): Remove.
7146 (fetch_altivec_registers): Add regno parameter. Get regset using
7147 ppc_linux_vrregset. Use regset to supply registers.
7148 (store_altivec_registers): Add regno parameter. Get regset using
7149 ppc_linux_vrregset. Use regset to collect registers.
7150 (fetch_register): Call fetch_altivec_registers instead of
7151 fetch_altivec_register.
7152 (store_register): Call store_altivec_registers instead of
7153 store_altivec_register.
7154 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7155 the new regno parameter.
7156 (store_ppc_registers): Call store_altivec_registers with -1 for
7157 the new regno parameter.
7158
7159 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7160
7161 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7162 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7163 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7164 (gdb_vrregset_t): Change array type size to
7165 PPC_LINUX_SIZEOF_VRREGSET.
7166 (gdb_vsxregset_t): Change array type size to
7167 PPC_LINUX_SIZEOF_VSXREGSET.
7168 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7169 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7170 PPC_LINUX_SIZEOF_VSXREGSET.
7171
7172 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7173
7174 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7175 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7176 nat/ppc-linux.c.
7177 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7178 ppc_linux_target_wordsize with tid.
7179 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7180 wordsize with tid.
7181 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7182 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7183 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7184 tid parameter. Remove static specifier.
7185 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7186 (ppc_linux_target_wordsize): New declaration.
7187
7188 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7189
7190 * arch/ppc-linux-common.c: New file.
7191 * arch/ppc-linux-common.h: New file.
7192 * arch/ppc-linux-tdesc.h: New file.
7193 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7194 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7195 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7196 arch/ppc-linux-tdesc.h.
7197 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7198 arch/ppc-linux-tdesc.h.
7199 (ppc_linux_nat_target::read_description): Remove target
7200 description matching code. Fill a ppc_linux_features struct and
7201 call ppc_linux_match_description with it. Move comment about ISA
7202 2.05 to ppc-linux-common.c.
7203 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7204 arch/ppc-linux-tdesc.h.
7205 (ppc_linux_core_read_description): Remove target description
7206 matching code. Fill a ppc_linux_features struct and call
7207 ppc_linux_match_description with it.
7208 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7209 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7210 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7211 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7212 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7213 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7214 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7215 (tdesc_powerpc_e500l): Remove.
7216
7217 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7218
7219 * ada-lang.c (catch_assert_command): Pass empty string instead
7220 of NULL for excep_string argument.
7221
7222 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7223
7224 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7225 the width of the requested register exceeds the width of the
7226 `ptrace' data type.
7227
7228 2018-05-21 Tom Tromey <tom@tromey.com>
7229
7230 * printcmd.c (output_command): Remove.
7231 (output_command_const): Rename to output_command.
7232 * valprint.h (output_command): Rename from output_command_const.
7233 * tracepoint.c (trace_dump_actions): Call output_command.
7234
7235 2018-05-21 Tom Tromey <tom@tromey.com>
7236
7237 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7238 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7239 * ada-lang.h (create_ada_exception_catchpoint): Update.
7240 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7241 std::string.
7242 (create_excep_cond_exprs, ~ada_catchpoint)
7243 (should_stop_exception, print_one_exception)
7244 (print_mention_exception, print_recreate_exception): Update.
7245 (ada_get_next_arg): Remove.
7246 (catch_ada_exception_command_split): Use std::string. Change type
7247 of "excep_string", "cond_string".
7248 (catch_ada_exception_command): Update.
7249 (create_ada_exception_catchpoint): Change type of excep_string.
7250 (ada_exception_sal): Remove excep_string parameter.
7251 (~ada_catchpoint): Remove.
7252
7253 2018-05-21 Tom Tromey <tom@tromey.com>
7254
7255 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7256 cleanup.
7257
7258 2018-05-21 Tom Tromey <tom@tromey.com>
7259
7260 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7261 Return unique_xmalloc_ptr.
7262 (print_it_exception): Update.
7263
7264 2018-05-21 Tom Tromey <tom@tromey.com>
7265
7266 * tracepoint.c (trace_dump_actions): Use std::string.
7267
7268 2018-05-21 Tom Tromey <tom@tromey.com>
7269
7270 * symfile.c (reread_symbols): Use std::string for original_name.
7271
7272 2018-05-21 Tom Tromey <tom@tromey.com>
7273
7274 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7275 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7276 constructor.
7277
7278 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7279
7280 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7281 instance to...
7282 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7283 * objfiles.c (get_objfile_bfd_data): Allocate
7284 objfile_per_bfd_storage with obstack_new when allocating on
7285 obstack.
7286
7287 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7288
7289 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7290 OBSTACK_ZALLOC.
7291 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7292 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7293 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7294 (add_pending): Likewise.
7295 (parse_symbol): Likewise.
7296 (parse_partial_symbols): Likewise.
7297 (psymtab_to_symtab_1): Likewise.
7298 (new_psymtab): Likewise.
7299 (elfmdebug_build_psymtabs): Likewise.
7300 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7301 * objfiles.c (get_objfile_bfd_data): Likewise.
7302 (objfile_register_static_link): Likewise.
7303 * psymtab.c (allocate_psymtab): Likewise.
7304 * stabsread.c (read_member_functions): Likewise.
7305 * xcoffread.c (xcoff_end_psymtab): Likewise.
7306
7307 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7308
7309 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7310 compiler supports std::is_trivially_constructible.
7311 * common/poison.h: Include obstack.h.
7312 (IsMallocable): Define to is_trivially_constructible if the
7313 compiler supports it, define to true_type otherwise.
7314 (xobnew): New.
7315 (XOBNEW): Redefine.
7316 (xobnewvec): New.
7317 (XOBNEWVEC): Redefine.
7318 * gdb_obstack.h (obstack_zalloc): New.
7319 (OBSTACK_ZALLOC): Redefine.
7320 (obstack_calloc): New.
7321 (OBSTACK_CALLOC): Redefine.
7322 (obstack_new): New.
7323 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7324 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7325 gdbarch.c.
7326 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7327 obstack_calloc/obstack_zalloc.
7328 (gdbarch_obstack_zalloc): Remove.
7329 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7330
7331 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7332
7333 * stack.c (backtrace_command_1): Remove useless variable int i.
7334
7335 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7336
7337 * stack.c (print_frame_info): Fix comment.
7338
7339 2018-05-18 Tom Tromey <tom@tromey.com>
7340
7341 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7342 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7343 (~dwarf2_per_objfile): Update
7344 (dwarf2_get_dwz_file): Use new.
7345 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7346 unique_ptr.
7347
7348 2018-05-18 Tom Tromey <tom@tromey.com>
7349
7350 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7351 unique_ptr.
7352 * dwarf2read.c (struct dwp_file): Add constructor and
7353 initializers.
7354 (open_and_init_dwp_file): Return a unique_ptr.
7355 (dwarf2_per_objfile, create_dwp_hash_table)
7356 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7357 (lookup_dwo_unit_in_dwp): Update.
7358 (open_and_init_dwp_file, get_dwp_file): Update.
7359
7360 2018-05-18 Tom Tromey <tom@tromey.com>
7361
7362 * dwarf2read.c (dwarf2_per_objfile): Update.
7363 (struct mapped_index): Add initializers.
7364 (dwarf2_read_index): Use new.
7365 (dw2_symtab_iter_init): Update.
7366 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7367 unique_ptr.
7368
7369 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7370
7371 * dwarf2read.c (mapped_index) <total_size>: Remove.
7372
7373 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7374
7375 * unittests/format_pieces-selftests.c (test_format_specifier):
7376 Add ARI comments.
7377
7378 2018-05-18 Tom Tromey <tom@tromey.com>
7379
7380 * c-typeprint.c (maybe_print_hole): New function.
7381 (c_print_type_struct_field_offset): Update.
7382 (c_type_print_base_struct_union): Call maybe_print_hole.
7383
7384 2018-05-17 Keith Seitz <keiths@redhat.com>
7385
7386 * breakpoint.c (build_bpstat_chain): New function, moved from
7387 bpstat_stop_status.
7388 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7389 If no stop chain is passed, call build_bpstat_chain to build it.
7390 * breakpoint.h (build_bpstat_chain): Declare.
7391 (bpstat_stop_status): Move documentation here from breakpoint.c.
7392 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7393 build the stop chain and pass it to skip_inline_frames.
7394 Pass this stop chain to bpstat_stop_status.
7395 * inline-frame.c: Include breakpoint.h.
7396 (stopped_by_user_bp_inline_frame): New function.
7397 (skip_inline_frames): Add parameter `stop_chain'.
7398 Move documention to inline-frame.h.
7399 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7400 whether the frame should be elided.
7401 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7402 Add moved documentation and update for new parameter.
7403
7404 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7405
7406 PR cli/14975
7407 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7408 unittests/format_pieces-selftests.c.
7409 * common/format.h (format_piece) <operator==>: New.
7410 (format_pieces) <operator[]>: Remove.
7411 * common/format.c (format_pieces::format_pieces): Handle \e.
7412 * unittests/format_pieces-selftests.c: New.
7413
7414 2018-05-17 Tom Tromey <tom@tromey.com>
7415
7416 PR symtab/23010:
7417 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7418 (dw2_instantiate_symtab): Add skip_partial parameter.
7419 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7420 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7421 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7422 (dw2_expand_symtabs_matching_one)
7423 (dw2_find_pc_sect_compunit_symtab)
7424 (dw2_debug_names_lookup_symbol)
7425 (dw2_debug_names_expand_symtabs_for_function): Update.
7426 (init_cutu_and_read_dies): Add skip_partial parameter.
7427 (process_psymtab_comp_unit, build_type_psymtabs_1)
7428 (process_skeletonless_type_unit, load_partial_comp_unit)
7429 (psymtab_to_symtab_1): Update.
7430 (load_full_comp_unit): Add skip_partial parameter.
7431 (process_imported_unit_die, dwarf2_read_addr_index)
7432 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7433 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7434 (read_signatured_type): Update.
7435
7436 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7437
7438 * value.c (release_value): Remove unused variable.
7439 (record_latest_value): Likewise.
7440 (access_value_history): Likewise.
7441 (preserve_values): Likewise.
7442
7443 2018-05-17 Tom Tromey <tom@tromey.com>
7444
7445 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7446 Initialize.
7447
7448 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7449
7450 PR gdb/22286
7451 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7452 Also handle registers whose width is not a multiple of
7453 PTRACE_TYPE_RET.
7454 (linux_nat_trad_target::store_register): Likewise.
7455
7456 2018-05-16 Tom Tromey <tom@tromey.com>
7457
7458 * gdbcore.h (core_bfd): Redefine.
7459 * corelow.c (core_target::close): Update.
7460 (core_target_open): Update.
7461 * progspace.h (struct program_space) <cbfd>: Now a
7462 gdb_bfd_ref_ptr.
7463
7464 2018-05-16 Tom Tromey <tom@tromey.com>
7465
7466 PR cli/19551:
7467 * symfile-add-flags.h (enum symfile_add_flags)
7468 <SYMFILE_NOT_FILENAME>: New constant.
7469 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7470 objfile name from BFD.
7471 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7472 * minidebug.c (find_separate_debug_file_in_section): Put
7473 ".gnu_debugdata" into BFD's file name.
7474
7475 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7476
7477 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7478 Remove.
7479
7480 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7481
7482 PR binutils/21446
7483 * aarch64-tdep.c (aarch64_analyze_prologue,
7484 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7485 Indicate not interested in errors.
7486
7487 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7488
7489 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7490 Supply the MIPS_ZERO_REGNUM register.
7491
7492 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7493
7494 * mips-tdep.c (mask_address_var): Make variable static.
7495
7496 2018-05-14 Tom Tromey <tom@tromey.com>
7497
7498 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7499
7500 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7501
7502 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7503 FXSAVE_ADDR for the mxcsr register.
7504
7505 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7506
7507 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7508
7509 2018-05-11 Pedro Alves <palves@redhat.com>
7510
7511 * corelow.c (core_target) <core_target>: No longer inline.
7512 Initialize m_core_gdbarch, m_core_vec and build the section table
7513 here.
7514 <~core_target>: New.
7515 <core_gdbarch, get_core_register_section>: New methods.
7516 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7517 factored out from ...
7518 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7519 (core_ops): Delete.
7520 (sniff_core_bfd): Add gdbarch parameter.
7521 (core_close): Delete, merged into ...
7522 (core_target::close): ... here. Delete self.
7523 (core_close_cleanup): Delete.
7524 (core_target_open): Allocate a core_target on the heap. Use a
7525 unique_ptr instead of a cleanup. Bits moved into the core_target
7526 ctor. Adjust to use core_target methods instead of globals.
7527 (get_core_register_section): Rename to ...
7528 (core_target::get_core_register_section): ... this and adjust.
7529 (struct get_core_registers_cb_data): New.
7530 (get_core_registers_cb): Use it. Use bool.
7531 (core_target::fetch_registers, core_target::files_info)
7532 (core_target::xfer_partial, core_target::read_description)
7533 (core_target::pid_to, core_target::thread_name): Adjust to
7534 reference class fields instead of globals.
7535 * target.h (struct target_ops_deleter, target_ops_up): New.
7536
7537 2018-05-11 Pedro Alves <palves@redhat.com>
7538
7539 * corefile.c (core_file_command): Move to corelow.c.
7540 * corelow.c (the_core_target): Delete.
7541 (core_file_command): Moved from corefile.c. Check exec_bfd
7542 instead of the_core_target. Use target_detach instead of calling
7543 into the_core_target directly.
7544 (maybe_say_no_core_file_now): New.
7545 (core_target::detach): Use it.
7546 (_initialize_corelow): Remove references to the_core_target.
7547 * gdbcore.h (the_core_target): Delete.
7548
7549 2018-05-11 Tom Tromey <tromey@redhat.com>
7550 Pedro Alves <palves@redhat.com>
7551
7552 * corefile.c (core_bfd): Remove.
7553 * gdbcore.h (core_bfd): Now a macro.
7554 * progspace.h (struct program_space) <cbfd>: New field.
7555
7556 2018-05-11 Tom Tromey <tom@tromey.com>
7557
7558 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7559 gdb::def_vector.
7560
7561 2018-05-10 Tom Tromey <tom@tromey.com>
7562
7563 * configure: Rebuild.
7564 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7565
7566 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7567
7568 PR server/23158:
7569 * regformats/regdat.sh: Adjust script, following the addition
7570 of the new expedite_regs parameter to init_target_desc.
7571
7572 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7573
7574 PR gdb/23127
7575 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7576 set_gdbarch_significant_addr_bit.
7577 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7578 set_gdbarch_significant_addr_bit.
7579 * utils.c (address_significant): Update to sign extend addr.
7580
7581 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7582
7583 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7584 (xtensa_linux_init_abi): Limit tdep->num_regs by
7585 tdep->num_nopriv_regs.
7586 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7587 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7588 not initialized.
7589
7590 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7591
7592 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7593
7594 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7595
7596 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7597 (I387_MXCSR_INIT_VAL): New constant.
7598 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7599 buffer if it was supplied by the inferior.
7600 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7601 (i387_xsave_get_clear_bv): New function.
7602 (i387_supply_xsave): Only read x87 control registers from the
7603 xsave buffer if the feature is enabled, and the state will have
7604 been written, otherwise, provide a suitable default.
7605 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7606 including x87 control registers. Update control registers if they
7607 have changed from the default value, and mark features as enabled
7608 as required.
7609 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7610
7611 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7612
7613 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7614
7615 2018-05-07 Tom Tromey <tom@tromey.com>
7616
7617 * configure: Rebuild.
7618 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7619
7620 2018-05-07 Tom Tromey <tom@tromey.com>
7621
7622 PR tdep/20362:
7623 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7624 bit. Use correct value for VDIV.
7625
7626 2018-05-04 Tom Tromey <tom@tromey.com>
7627
7628 * configure: Rebuild.
7629 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7630
7631 2018-05-04 Tom Tromey <tom@tromey.com>
7632
7633 * linux-record.c (record_linux_system_call) <case
7634 RECORD_SYS_RECVFROM>: Add "break".
7635
7636 2018-05-04 Tom Tromey <tom@tromey.com>
7637
7638 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7639 Add missing "break".
7640 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7641 Add missing "break".
7642
7643 2018-05-04 Tom Tromey <tom@tromey.com>
7644
7645 * rs6000-tdep.c (ppc_process_record_op4)
7646 (ppc_process_record_op63): Add fall-through comment.
7647
7648 2018-05-04 Tom Tromey <tom@tromey.com>
7649
7650 * i386-tdep.c (i386_process_record): Add fall-through comment.
7651
7652 2018-05-04 Tom Tromey <tom@tromey.com>
7653
7654 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7655 comment.
7656
7657 2018-05-04 Tom Tromey <tom@tromey.com>
7658
7659 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7660 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7661 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7662 comment.
7663 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7664 comment.
7665 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7666 comment.
7667
7668 2018-05-04 Tom Tromey <tom@tromey.com>
7669
7670 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7671
7672 2018-05-04 Tom Tromey <tom@tromey.com>
7673
7674 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7675 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7676 * symfile.c (section_is_mapped): Fix fall-through comment.
7677 * stabsread.c (define_symbol, read_member_functions): Fix
7678 fall-through comment.
7679 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7680 comment.
7681 * remote.c (remote_wait_as): Fix fall-through comment.
7682 * p-exp.y (yylex): Fix fall-through comment.
7683 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7684 comment.
7685 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7686 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7687 * jv-exp.y (yylex): Fix fall-through comment.
7688 * go-exp.y (lex_one_token): Fix fall-through comment.
7689 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7690 fall-through comment.
7691 * f-exp.y (yylex): Fix fall-through comment.
7692 * dwarf2read.c (process_die): Fix fall-through comments.
7693 * dbxread.c (process_one_symbol): Fix fall-through comment.
7694 * d-exp.y (lex_one_token): Fix fall-through comment.
7695 * cp-name-parser.y (yylex): Fix fall-through comment.
7696 * coffread.c (coff_symtab_read): Fix fall-through comment.
7697 * c-exp.y (lex_one_token): Fix fall-through comment.
7698 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7699 comment.
7700 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7701 comment.
7702
7703 2018-05-04 Tom Tromey <tom@tromey.com>
7704
7705 PR python/22730:
7706 * NEWS: Mention gdb.execute change.
7707 * gdbcmd.h (execute_control_command): Don't declare.
7708 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7709 execute_control_commands, execute_control_commands_to_string.
7710 * cli/cli-script.h (execute_control_commands)
7711 (execute_control_commands_to_string): Declare.
7712 (execute_control_command): Add from_tty parameter.
7713 * cli/cli-script.c (execute_control_commands)
7714 (execute_control_commands_to_string): New functions.
7715 (execute_user_command): Use execute_control_commands.
7716 (execute_control_command_1): Add "from_tty" parameter. Update.
7717 (execute_control_command): Likewise.
7718
7719 2018-05-04 Tom Tromey <tom@tromey.com>
7720
7721 PR python/22731:
7722 * NEWS: Mention that breakpoint commands are writable.
7723 * python/py-breakpoint.c (bppy_set_commands): New function.
7724 (breakpoint_object_getset) <"commands">: Use it.
7725
7726 2018-05-04 Tom Tromey <tom@tromey.com>
7727
7728 * tracepoint.c (actions_command): Update.
7729 * mi/mi-cmd-break.c (mi_command_line_array)
7730 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7731 (mi_read_next_line): Remove.
7732 (mi_cmd_break_commands): Update.
7733 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7734 function_view.
7735 * cli/cli-script.c (get_command_line): Update.
7736 (process_next_line): Use function_view. Constify.
7737 (recurse_read_control_structure, read_command_lines)
7738 (read_command_lines_1): Change argument types to function_view.
7739 (do_define_command, document_command): Update.
7740 * breakpoint.h (check_tracepoint_command): Don't declare.
7741 * breakpoint.c (check_tracepoint_command): Remove.
7742 (commands_command_1, create_tracepoint_from_upload): Update.
7743
7744 2018-05-04 Tom Tromey <tom@tromey.com>
7745
7746 PR gdb/11750:
7747 * cli/cli-script.h (enum command_control_type) <define_control>:
7748 New constant.
7749 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7750 (build_command_line, execute_control_command_1)
7751 (process_next_line): Likewise.
7752 (do_define_command): New function, extracted from define_command.
7753 (define_command): Use it.
7754
7755 2018-05-04 Tom Tromey <tom@tromey.com>
7756
7757 * tracepoint.c (actions_command): Update.
7758 * cli/cli-script.h (read_command_lines): Update.
7759 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7760 (MAX_TMPBUF): Remove define.
7761 (define_command): Use string_printf.
7762 (document_command): Likewise.
7763 * breakpoint.c (commands_command_1): Update.
7764
7765 2018-05-04 Tom Tromey <tom@tromey.com>
7766
7767 * top.c (execute_command): Update.
7768 * cli/cli-script.h (print_command_lines): Now varargs.
7769 * cli/cli-script.c (print_command_lines): Now varargs.
7770 (execute_control_command_1) <case while_control, case if_control>:
7771 Update.
7772
7773 2018-05-04 Tom Tromey <tom@tromey.com>
7774
7775 * tracepoint.c (all_tracepoint_actions): Rename from
7776 all_tracepoint_actions_and_cleanup. Change return type.
7777 (actions_command, encode_actions_1, encode_actions)
7778 (trace_dump_actions, tdump_command): Update.
7779 * remote.c (remote_download_command_source): Update.
7780 * python/python.c (gdbpy_eval_from_control_command)
7781 (python_command, python_interactive_command): Update.
7782 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7783 * guile/guile.c (guile_command)
7784 (gdbscm_eval_from_control_command, guile_command): Update.
7785 * compile/compile.c (compile_code_command)
7786 (compile_print_command, compile_to_object): Update.
7787 * cli/cli-script.h (struct command_lines_deleter): New.
7788 (counted_command_line): New typedef.
7789 (struct command_line): Add constructor, destructor.
7790 <body_list>: Remove.
7791 <body_list_0, body_list_1>: New members.
7792 (command_line_up): Remove typedef.
7793 (read_command_lines, read_command_lines_1, get_command_line):
7794 Update.
7795 (copy_command_lines): Don't declare.
7796 * cli/cli-script.c (build_command_line): Use "new".
7797 (get_command_line): Return counted_command_line.
7798 (print_command_lines, execute_user_command)
7799 (execute_control_command_1, while_command, if_command): Update.
7800 (realloc_body_list): Remove.
7801 (process_next_line, recurse_read_control_structure): Update.
7802 (read_command_lines, read_command_lines_1): Return counted_command_line.
7803 (free_command_lines): Use "delete".
7804 (copy_command_lines): Remove.
7805 (define_command, document_command, show_user_1): Update.
7806 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7807 a counted_command_line.
7808 * breakpoint.h (counted_command_line): Remove typedef.
7809 (breakpoint_set_commands): Update.
7810 * breakpoint.c (check_no_tracepoint_commands)
7811 (validate_commands_for_breakpoint): Update.
7812 (breakpoint_set_commands): Change commands to be a
7813 counted_command_line.
7814 (commands_command_1, update_dprintf_command_list)
7815 (create_tracepoint_from_upload): Update.
7816
7817 2018-05-04 Tom Tromey <tom@tromey.com>
7818
7819 * cli/cli-decode.h (cmd_list_element): New constructor.
7820 (~cmd_list_element): New destructor.
7821 (struct cmd_list_element): Add initializers.
7822 * cli/cli-decode.c (do_add_cmd): Use "new".
7823 (delete_cmd): Use "delete".
7824
7825 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7826 Pedro Alves <palves@redhat.com>
7827
7828 PR breakpoints/19806 and support for PR external/20207.
7829 * NEWS: Mention Aarch64 watchpoint improvements.
7830 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7831 watchpoints and PR external/20207 watchpoints.
7832 * nat/aarch64-linux-hw-point.c
7833 (kernel_supports_any_contiguous_range): New.
7834 (aarch64_watchpoint_offset): New.
7835 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7836 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7837 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7838 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7839 next_addr_orig_p. Support PR external/20207 watchpoints.
7840 (aarch64_downgrade_regs): New.
7841 (aarch64_dr_state_insert_one_point): New parameters offset and
7842 addr_orig.
7843 (aarch64_dr_state_remove_one_point): Likewise.
7844 (aarch64_handle_breakpoint): Update caller.
7845 (aarch64_handle_aligned_watchpoint): Likewise.
7846 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7847 aligned_offset.
7848 (aarch64_linux_set_debug_regs): Remove const from state. Call
7849 aarch64_downgrade_regs.
7850 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7851 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7852 (DR_CONTROL_MASK): ... this.
7853 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7854 (unsigned int aarch64_watchpoint_offset): New prototype.
7855 (aarch64_linux_set_debug_regs): Remove const from state.
7856 * utils.c (align_up, align_down): Move to ...
7857 * common/common-utils.c (align_up, align_down): ... here.
7858 * utils.h (align_up, align_down): Move to ...
7859 * common/common-utils.h (align_up, align_down): ... here.
7860
7861 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7862
7863 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7864 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7865 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7866 Re-implement to match the ABI as summarized in GCC's
7867 gcc/config/sparc/sparc.c. All callers updated.
7868 (sparc32_store_arguments): Remove assertion.
7869
7870 2018-05-04 Tom Tromey <tom@tromey.com>
7871
7872 * printcmd.c: Don't include tui.h.
7873 (decode_format): Use skip_spaces.
7874
7875 2018-05-04 Tom Tromey <tom@tromey.com>
7876
7877 PR gdb/22619:
7878 * printcmd.c (last_count): New global.
7879 (x_command): Use saved count when repeating.
7880
7881 2018-05-04 Tom Tromey <tom@tromey.com>
7882
7883 * nto-procfs.c (do_closedir_cleanup): Remove.
7884 (procfs_pidlist): Use gdb_dir_up.
7885 * procfs.c (do_closedir_cleanup): Remove.
7886 (proc_update_threads): Use gdb_dir_up.
7887 * common/filestuff.h (struct gdb_dir_deleter): New.
7888 (gdb_dir_up): New typedef.
7889
7890 2018-05-04 Tom Tromey <tom@tromey.com>
7891
7892 * ada-lang.c (print_mention_exception): Use std::string.
7893
7894 2018-05-04 Tom Tromey <tom@tromey.com>
7895
7896 * ada-lang.c (create_excep_cond_exprs): Update.
7897 (ada_exception_catchpoint_cond_string): Use std::string.
7898
7899 2018-05-04 Tom Tromey <tom@tromey.com>
7900
7901 * ada-lang.c (xget_renaming_scope): Return std::string.
7902 (old_renaming_is_invisible): Update.
7903
7904 2018-05-04 Tom Tromey <tom@tromey.com>
7905
7906 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7907 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7908
7909 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7910
7911 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7912
7913 2018-05-04 Tom Tromey <tom@tromey.com>
7914
7915 * remote.c (remote_query_supported_append): Change type.
7916 (remote_check_symbols): Update.
7917
7918 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7919
7920 PR gdb/11420
7921 * configure.ac: Prepend libpython.
7922 * python/python-config.py: Likewise.
7923 * configure: Regenerate.
7924
7925 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7926
7927 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7928
7929 2018-05-03 Pedro Alves <palves@redhat.com>
7930
7931 * s390-linux-nat.c
7932 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7933 override. Write 'true' instead of '1'.
7934 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7935 declaration.
7936
7937 2018-05-02 Pedro Alves <palves@redhat.com>
7938
7939 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7940 add_inf_child_target.
7941 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7942 add_inf_child_target.
7943 * aix-thread.c (aix_thread_target_info): New.
7944 (aix_thread_target) <shortname, longname, doc>: Delete.
7945 <info>: New.
7946 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7947 add_inf_child_target.
7948 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7949 add_inf_child_target.
7950 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7951 add_inf_child_target.
7952 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7953 add_inf_child_target.
7954 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7955 add_inf_child_target.
7956 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7957 add_inf_child_target.
7958 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7959 add_inf_child_target.
7960 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7961 add_inf_child_target.
7962 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7963 add_inf_child_target.
7964 * bfd-target.c (target_bfd_target_info): New.
7965 (target_bfd) <shortname, longname, doc>: Delete.
7966 <info>: New.
7967 * bsd-kvm.c (bsd_kvm_target_info): New.
7968 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7969 <info>: New.
7970 (bsd_kvm_target::open): Rename to ...
7971 (bsd_kvm_target_open): ... this. Adjust.
7972 * bsd-uthread.c (bsd_uthread_target_info): New.
7973 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7974 <info>: New.
7975 * corefile.c (core_file_command): Adjust.
7976 * corelow.c (core_target_info): New.
7977 (core_target) <shortname, longname, doc>: Delete.
7978 <info>: New.
7979 (core_target::open): Rename to ...
7980 (core_target_open): ... this. Adjust.
7981 * ctf.c (ctf_target_info): New.
7982 (ctf_target) <shortname, longname, doc>: Delete.
7983 <info>: New.
7984 (ctf_target::open): Rename to ...
7985 (ctf_target_open): ... this.
7986 (_initialize_ctf): Adjust.
7987 * exec.c (exec_target_info): New.
7988 (exec_target) <shortname, longname, doc>: Delete.
7989 <info>: New.
7990 (exec_target::open): Rename to ...
7991 (exec_target_open): ... this.
7992 * gdbcore.h (core_target_open): Declare.
7993 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7994 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7995 add_inf_child_target.
7996 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7997 add_inf_child_target.
7998 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7999 add_inf_child_target.
8000 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8001 add_inf_child_target.
8002 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8003 add_inf_child_target.
8004 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8005 add_inf_child_target.
8006 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8007 add_inf_child_target.
8008 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8009 add_inf_child_target.
8010 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8011 add_inf_child_target.
8012 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8013 add_inf_child_target.
8014 * inf-child.c (inf_child_target_info): New.
8015 (inf_child_target::info): New.
8016 (inf_child_open_target): Remove 'target' parameter. Use
8017 get_native_target instead.
8018 (inf_child_target::open): Delete.
8019 (add_inf_child_target): New.
8020 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8021 Delete.
8022 <info>: New.
8023 (add_inf_child_target): Declare.
8024 (inf_child_open_target): Declare.
8025 * linux-thread-db.c (thread_db_target_info): New.
8026 (thread_db_target) <shortname, longname, doc>: Delete.
8027 <info>: New.
8028 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8029 add_inf_child_target.
8030 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8031 add_inf_child_target.
8032 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8033 add_inf_child_target.
8034 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8035 add_inf_child_target.
8036 * make-target-delegates (print_class): Adjust.
8037 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8038 add_inf_child_target.
8039 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8040 add_inf_child_target.
8041 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8042 add_inf_child_target.
8043 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8044 add_inf_child_target.
8045 * nto-procfs.c (nto_native_target_info): New.
8046 (nto_procfs_target_native) <shortname, longname, doc>:
8047 Delete.
8048 <info>: New.
8049 (nto_procfs_target_info): New.
8050 (nto_procfs_target_procfs) <shortname, longname, doc>:
8051 Delete.
8052 <info>: New.
8053 (init_procfs_targets): Adjust.
8054 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8055 add_inf_child_target.
8056 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8057 add_inf_child_target.
8058 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8059 add_inf_child_target.
8060 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8061 add_inf_child_target.
8062 * ravenscar-thread.c (ravenscar_target_info): New.
8063 (ravenscar_thread_target) <shortname, longname, doc>:
8064 Delete.
8065 <info>: New.
8066 * record-btrace.c (record_btrace_target_info):
8067 (record_btrace_target) <shortname, longname, doc>: Delete.
8068 <info>: New.
8069 (record_btrace_target::open): Rename to ...
8070 (record_btrace_target_open): ... this. Adjust.
8071 * record-full.c (record_longname, record_doc): New.
8072 (record_full_base_target) <shortname, longname, doc>: Delete.
8073 <info>: New.
8074 (record_full_target_info): New.
8075 (record_full_target): <shortname>: Delete.
8076 <info>: New.
8077 (record_full_core_open_1, record_full_open_1): Update comments.
8078 (record_full_base_target::open): Rename to ...
8079 (record_full_open): ... this.
8080 (cmd_record_full_restore): Update.
8081 (_initialize_record_full): Update.
8082 * remote-sim.c (remote_sim_target_info): New.
8083 (gdbsim_target) <shortname, longname, doc>: Delete.
8084 <info>: New.
8085 (gdbsim_target::open): Rename to ...
8086 (gdbsim_target_open): ... this.
8087 (_initialize_remote_sim): Adjust.
8088 * remote.c (remote_doc): New.
8089 (remote_target_info): New.
8090 (remote_target) <shortname, longname, doc>: Delete.
8091 <info>: New.
8092 (extended_remote_target_info): New.
8093 (extended_remote_target) <shortname, longname, doc>: Delete.
8094 <info>: New.
8095 (remote_target::open_1): Make static. Adjust.
8096 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8097 * s390-linux-nat.c (_initialize_s390_nat): Use
8098 add_inf_child_target.
8099 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8100 add_inf_child_target.
8101 * sol-thread.c (thread_db_target_info): New.
8102 (sol_thread_target) <shortname, longname, doc>: Delete.
8103 <info>: New.
8104 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8105 add_inf_child_target.
8106 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8107 add_inf_child_target.
8108 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8109 add_inf_child_target.
8110 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8111 add_inf_child_target.
8112 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8113 add_inf_child_target.
8114 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8115 add_inf_child_target.
8116 * spu-linux-nat.c (_initialize_spu_nat): Use
8117 add_inf_child_target.
8118 * spu-multiarch.c (spu_multiarch_target_info): New.
8119 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8120 <info>: New.
8121 * target-delegates.c: Regenerate.
8122 * target.c: Include <unordered_map>.
8123 (target_ops_p): Delete.
8124 (DEF_VEC_P(target_ops_p)): Delete.
8125 (target_factories): New.
8126 (test_target_info): New.
8127 (test_target_ops::info): New.
8128 (open_target): Adjust to use target_factories.
8129 (add_target_with_completer): Rename to ...
8130 (add_target): ... this. Change prototype. Register target_info
8131 and open callback in target_factories. Register target_info in
8132 command context instead of target_ops.
8133 (add_target): Delete old implementation.
8134 (add_deprecated_target_alias): Change prototype. Adjust.
8135 (the_native_target): New.
8136 (set_native_target, get_native_target): New.
8137 (find_default_run_target): Use the_native_target.
8138 (find_attach_target, find_run_target): Simplify.
8139 (target_ops::open): Delete.
8140 (dummy_target_info): New.
8141 (dummy_target::shortname, dummy_target::longname)
8142 (dummy_target::doc): Delete.
8143 (dummy_target::info): New.
8144 (debug_target::shortname, debug_target::longname)
8145 (debug_target::doc): Delete.
8146 (debug_target::info): New.
8147 * target.h (struct target_info): New.
8148 (target_ops::~target_ops): Add comment.
8149 (target_ops::info): New.
8150 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8151 longer virtual. Implement in terms of target_info.
8152 (set_native_target, get_native_target): Declare.
8153 (target_open_ftype): New.
8154 (add_target, add_target_with_completer)
8155 (add_deprecated_target_alias): Change prototype.
8156 (test_target) <shortname, longname, doc>: Delete.
8157 <info>: New.
8158 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8159 add_inf_child_target.
8160 * tracefile-tfile.c (tfile_target_info): New.
8161 (tfile_target) <shortname, longname, doc>: Delete.
8162 <info>: New.
8163 (tfile_target::open): Rename to ...
8164 (tfile_target_open): ... this.
8165 (_initialize_tracefile_tfile): Adjust.
8166 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8167 add_inf_child_target.
8168 * windows-nat.c (_initialize_windows_nat): Use
8169 add_inf_child_target.
8170 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8171 add_inf_child_target.
8172
8173 2018-05-02 Pedro Alves <palves@redhat.com>
8174
8175 * linux-nat.h (linux_nat_target) <low_new_thread,
8176 low_delete_thread, low_new_fork, low_forget_process,
8177 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8178 New virtual methods.
8179 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8180 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8181 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8182 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8183 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8184 Delete.
8185 * linux-fork.c (delete_fork): Adjust to call low method.
8186 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8187 (linux_nat_new_fork, linux_nat_forget_process_hook)
8188 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8189 (linux_nat_status_is_event):
8190 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8191 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8192 to call low method.
8193 (sigtrap_is_event): Rename to ...
8194 (linux_nat_target::low_status_is_event): ... this.
8195 (linux_nat_set_status_is_event): Delete.
8196 (save_stop_reason, linux_nat_wait_1)
8197 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8198 low methods.
8199 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8200 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8201 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8202 (linux_nat_set_prepare_to_resume): Delete.
8203 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8204 low virtual methods.
8205 * amd64-linux-nat.c: Likewise.
8206 * arm-linux-nat.c: Likewise.
8207 * i386-linux-nat.c: Likewise.
8208 * ia64-linux-nat.c: Likewise.
8209 * mips-linux-nat.c: Likewise.
8210 * ppc-linux-nat.c: Likewise.
8211 * s390-linux-nat.c: Likewise.
8212 * sparc64-linux-nat.c: Likewise.
8213 * x86-linux-nat.c: Likewise.
8214 * x86-linux-nat.h: Include "nat/x86-linux.h".
8215 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8216 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8217 Override methods.
8218
8219 2018-05-02 Pedro Alves <palves@redhat.com>
8220
8221 * target.h (target_ops)
8222 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8223 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8224 stopped_by_watchpoint, have_continuable_watchpoint,
8225 stopped_data_address, watchpoint_addr_within_range,
8226 can_accel_watchpoint_condition, can_run, thread_alive,
8227 has_all_memory, has_memory, has_stack, has_registers,
8228 has_execution, can_async_p, is_async_p, supports_non_stop,
8229 always_non_stop_p, can_execute_reverse, supports_multi_process,
8230 supports_enable_disable_tracepoint,
8231 supports_disable_randomization, supports_string_tracing,
8232 supports_evaluation_of_breakpoint_conditions,
8233 can_run_breakpoint_commands, filesystem_is_local,
8234 can_download_tracepoint, get_trace_state_variable_value,
8235 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8236 record_is_replaying, record_will_replay,
8237 augmented_libraries_svr4_read>: Adjust to return bool.
8238 * aarch64-linux-nat.c: All implementations adjusted.
8239 * aix-thread.c: All implementations adjusted.
8240 * arm-linux-nat.c: All implementations adjusted.
8241 * breakpoint.c: All implementations adjusted.
8242 * bsd-kvm.c: All implementations adjusted.
8243 * bsd-uthread.c: All implementations adjusted.
8244 * corelow.c: All implementations adjusted.
8245 * ctf.c: All implementations adjusted.
8246 * darwin-nat.c: All implementations adjusted.
8247 * darwin-nat.h: All implementations adjusted.
8248 * exec.c: All implementations adjusted.
8249 * fbsd-nat.c: All implementations adjusted.
8250 * fbsd-nat.h: All implementations adjusted.
8251 * gnu-nat.c: All implementations adjusted.
8252 * gnu-nat.h: All implementations adjusted.
8253 * go32-nat.c: All implementations adjusted.
8254 * ia64-linux-nat.c: All implementations adjusted.
8255 * inf-child.c: All implementations adjusted.
8256 * inf-child.h: All implementations adjusted.
8257 * inf-ptrace.c: All implementations adjusted.
8258 * inf-ptrace.h: All implementations adjusted.
8259 * linux-nat.c: All implementations adjusted.
8260 * linux-nat.h: All implementations adjusted.
8261 * mips-linux-nat.c: All implementations adjusted.
8262 * nto-procfs.c: All implementations adjusted.
8263 * ppc-linux-nat.c: All implementations adjusted.
8264 * procfs.c: All implementations adjusted.
8265 * ravenscar-thread.c: All implementations adjusted.
8266 * record-btrace.c: All implementations adjusted.
8267 * record-full.c: All implementations adjusted.
8268 * remote-sim.c: All implementations adjusted.
8269 * remote.c: All implementations adjusted.
8270 * s390-linux-nat.c: All implementations adjusted.
8271 * sol-thread.c: All implementations adjusted.
8272 * spu-multiarch.c: All implementations adjusted.
8273 * target-delegates.c: All implementations adjusted.
8274 * target.c: All implementations adjusted.
8275 * target.h: All implementations adjusted.
8276 * tracefile-tfile.c: All implementations adjusted.
8277 * tracefile.c: All implementations adjusted.
8278 * tracefile.h: All implementations adjusted.
8279 * windows-nat.c: All implementations adjusted.
8280 * x86-linux-nat.h: All implementations adjusted.
8281 * x86-nat.h: All implementations adjusted.
8282
8283 2018-05-02 Pedro Alves <palves@redhat.com>
8284
8285 * make-target-delegates (scan_target_h): Don't trim lines here.
8286 Replace sequences of tabs and/or whitespace with a single
8287 whitespace.
8288 (top level, parsing methods): Trim each line before processing it
8289 here.
8290
8291 2018-05-02 Pedro Alves <palves@redhat.com>
8292 John Baldwin <jhb@freebsd.org>
8293
8294 * target.h (enum strata) <debug_stratum>: New.
8295 (struct target_ops) <all delegation methods>: Replace by C++
8296 virtual methods, and drop "to_" prefix. All references updated
8297 throughout.
8298 <to_shortname, to_longname, to_doc, to_data,
8299 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8300 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8301 virtual methods. All references updated throughout.
8302 <can_attach, supports_terminal_ours, can_create_inferior,
8303 get_thread_control_capabilities, attach_no_wait>: New
8304 virtual methods.
8305 <insert_breakpoint, remove_breakpoint>: Now
8306 TARGET_DEFAULT_NORETURN methods.
8307 <info_proc>: Now returns bool.
8308 <to_magic>: Delete.
8309 (OPS_MAGIC): Delete.
8310 (current_target): Delete. All references replaced by references
8311 to ...
8312 (target_stack): ... this. New.
8313 (target_shortname, target_longname): Adjust.
8314 (target_can_run): Now a function declaration.
8315 (default_child_has_all_memory, default_child_has_memory)
8316 (default_child_has_stack, default_child_has_registers)
8317 (default_child_has_execution): Remove target_ops parameter.
8318 (complete_target_initialization): Delete.
8319 (memory_breakpoint_target): New template class.
8320 (test_target_ops): Refactor as a C++ class with virtual methods.
8321 * make-target-delegates (NAME_PART): Tighten.
8322 (POINTER_PART, CP_SYMBOL): New.
8323 (SIMPLE_RETURN_PART): Reimplement.
8324 (VEC_RETURN_PART): Expect less.
8325 (RETURN_PART, VIRTUAL_PART): New.
8326 (METHOD): Adjust to C++ virtual methods.
8327 (scan_target_h): Remove reference to C99.
8328 (dname): Output "target_ops::" prefix.
8329 (write_function_header): Adjust to output a C++ class method.
8330 (write_declaration): New.
8331 (write_delegator): Adjust to output a C++ class method.
8332 (tdname): Output "dummy_target::" prefix.
8333 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8334 method.
8335 (tdefault_names, debug_names): Delete.
8336 (return_types, tdefaults, styles, argtypes_array): New.
8337 (top level): All methods are delegators.
8338 (print_class): New.
8339 (top level): Print dummy_target and debug_target classes.
8340 * target-delegates.c: Regenerate.
8341 * target-debug.h (target_debug_print_enum_info_proc_what)
8342 (target_debug_print_thread_control_capabilities)
8343 (target_debug_print_thread_info_p): New.
8344 * target.c (dummy_target): Delete.
8345 (the_dummy_target, the_debug_target): New.
8346 (target_stack): Now extern.
8347 (set_targetdebug): Push/unpush debug target.
8348 (default_child_has_all_memory, default_child_has_memory)
8349 (default_child_has_stack, default_child_has_registers)
8350 (default_child_has_execution): Remove target_ops parameter.
8351 (complete_target_initialization): Delete.
8352 (add_target_with_completer): No longer call
8353 complete_target_initialization.
8354 (target_supports_terminal_ours): Use regular delegation.
8355 (update_current_target): Delete.
8356 (push_target): No longer check magic number. Don't call
8357 update_current_target.
8358 (unpush_target): Don't call update_current_target.
8359 (target_is_pushed): No longer check magic number.
8360 (target_require_runnable): Skip for all stratums over
8361 process_stratum.
8362 (target_ops::info_proc): New.
8363 (target_info_proc): Use find_target_at and
8364 find_default_run_target.
8365 (target_supports_disable_randomization): Use regular delegation.
8366 (target_get_osdata): Use find_target_at.
8367 (target_ops::open, target_ops::close, target_ops::can_attach)
8368 (target_ops::attach, target_ops::can_create_inferior)
8369 (target_ops::create_inferior, target_ops::can_run)
8370 (target_can_run): New.
8371 (default_fileio_target): Use regular delegation.
8372 (target_ops::fileio_open, target_ops::fileio_pwrite)
8373 (target_ops::fileio_pread, target_ops::fileio_fstat)
8374 (target_ops::fileio_close, target_ops::fileio_unlink)
8375 (target_ops::fileio_readlink): New.
8376 (target_fileio_open_1, target_fileio_unlink)
8377 (target_fileio_readlink): Always call the target method. Handle
8378 FILEIO_ENOSYS.
8379 (return_zero, return_zero_has_execution): Delete.
8380 (init_dummy_target): Delete.
8381 (dummy_target::dummy_target, dummy_target::shortname)
8382 (dummy_target::longname, dummy_target::doc)
8383 (debug_target::debug_target, debug_target::shortname)
8384 (debug_target::longname, debug_target::doc): New.
8385 (target_supports_delete_record): Use regular delegation.
8386 (setup_target_debug): Delete.
8387 (maintenance_print_target_stack): Skip debug_stratum.
8388 (initialize_targets): Instantiate the_dummy_target and
8389 the_debug_target.
8390 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8391 use target_stack.
8392 (target_auxv_search, fprint_target_auxv): Adjust.
8393 (info_auxv_command): Adjust to use target_stack.
8394 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8395 * exceptions.c (print_flush): Handle a NULL target_stack.
8396 * regcache.c (target_ops_no_register): Refactor as class with
8397 virtual methods.
8398
8399 * exec.c (exec_target): New class.
8400 (exec_ops): Now an exec_target.
8401 (exec_open, exec_close_1, exec_get_section_table)
8402 (exec_xfer_partial, exec_files_info, exec_has_memory)
8403 (exec_make_note_section): Refactor as exec_target methods.
8404 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8405 Delete.
8406 (exec_target::find_memory_regions): New.
8407 (_initialize_exec): Don't call init_exec_ops.
8408 * gdbcore.h (exec_file_clear): Delete.
8409
8410 * corefile.c (core_target): Delete.
8411 (core_file_command): Adjust.
8412 * corelow.c (core_target): New class.
8413 (the_core_target): New.
8414 (core_close): Remove target_ops parameter.
8415 (core_close_cleanup): Adjust.
8416 (core_target::close): New.
8417 (core_open, core_detach, get_core_registers, core_files_info)
8418 (core_xfer_partial, core_thread_alive, core_read_description)
8419 (core_pid_to_str, core_thread_name, core_has_memory)
8420 (core_has_stack, core_has_registers, core_info_proc): Rework as
8421 core_target methods.
8422 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8423 (_initialize_corelow): Initialize the_core_target.
8424 * gdbcore.h (core_target): Delete.
8425 (the_core_target): New.
8426
8427 * ctf.c: (ctf_target): New class.
8428 (ctf_ops): Now a ctf_target.
8429 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8430 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8431 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8432 methods.
8433 (init_ctf_ops): Delete.
8434 (_initialize_ctf): Don't call it.
8435 * tracefile-tfile.c (tfile_target): New class.
8436 (tfile_ops): Now a tfile_target.
8437 (tfile_open, tfile_close, tfile_files_info)
8438 (tfile_get_tracepoint_status, tfile_trace_find)
8439 (tfile_fetch_registers, tfile_xfer_partial)
8440 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8441 Refactor as tfile_target methods.
8442 (tfile_xfer_partial_features): Remove target_ops parameter.
8443 (init_tfile_ops): Delete.
8444 (_initialize_tracefile_tfile): Don't call it.
8445 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8446 (tracefile_has_stack, tracefile_has_registers)
8447 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8448 tracefile_target methods.
8449 (init_tracefile_ops): Delete.
8450 (tracefile_target::tracefile_target): New.
8451 * tracefile.h: Include "target.h".
8452 (tracefile_target): New class.
8453 (init_tracefile_ops): Delete.
8454
8455 * spu-multiarch.c (spu_multiarch_target): New class.
8456 (spu_ops): Now a spu_multiarch_target.
8457 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8458 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8459 (spu_search_memory, spu_mourn_inferior): Refactor as
8460 spu_multiarch_target methods.
8461 (init_spu_ops): Delete.
8462 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8463 complete_target_initialization.
8464
8465 * ravenscar-thread.c (ravenscar_thread_target): New class.
8466 (ravenscar_ops): Now a ravenscar_thread_target.
8467 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8468 (ravenscar_thread_alive, ravenscar_pid_to_str)
8469 (ravenscar_fetch_registers, ravenscar_store_registers)
8470 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8471 (ravenscar_stopped_by_hw_breakpoint)
8472 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8473 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8474 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8475 methods.
8476 (init_ravenscar_thread_ops): Delete.
8477 (_initialize_ravenscar): Remove references to
8478 init_ravenscar_thread_ops and complete_target_initialization.
8479
8480 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8481 (bsd_uthread_target): New class.
8482 (bsd_uthread_ops): Now a bsd_uthread_target.
8483 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8484 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8485 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8486 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8487 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8488 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8489 (bsd_uthread_target): Delete function.
8490 (_initialize_bsd_uthread): Remove reference to
8491 complete_target_initialization.
8492
8493 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8494 (target_bfd): ... this new class.
8495 (target_bfd_xfer_partial, target_bfd_get_section_table)
8496 (target_bfd_close): Refactor as target_bfd methods.
8497 (target_bfd::~target_bfd): New.
8498 (target_bfd_reopen): Adjust.
8499 (target_bfd::close): New.
8500
8501 * record-btrace.c (record_btrace_target): New class.
8502 (record_btrace_ops): Now a record_btrace_target.
8503 (record_btrace_open, record_btrace_stop_recording)
8504 (record_btrace_disconnect, record_btrace_close)
8505 (record_btrace_async, record_btrace_info)
8506 (record_btrace_insn_history, record_btrace_insn_history_range)
8507 (record_btrace_insn_history_from, record_btrace_call_history)
8508 (record_btrace_call_history_range)
8509 (record_btrace_call_history_from, record_btrace_record_method)
8510 (record_btrace_is_replaying, record_btrace_will_replay)
8511 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8512 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8513 (record_btrace_store_registers, record_btrace_prepare_to_store)
8514 (record_btrace_to_get_unwinder)
8515 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8516 (record_btrace_commit_resume, record_btrace_wait)
8517 (record_btrace_stop, record_btrace_can_execute_reverse)
8518 (record_btrace_stopped_by_sw_breakpoint)
8519 (record_btrace_supports_stopped_by_sw_breakpoint)
8520 (record_btrace_stopped_by_hw_breakpoint)
8521 (record_btrace_supports_stopped_by_hw_breakpoint)
8522 (record_btrace_update_thread_list, record_btrace_thread_alive)
8523 (record_btrace_goto_begin, record_btrace_goto_end)
8524 (record_btrace_goto, record_btrace_stop_replaying_all)
8525 (record_btrace_execution_direction)
8526 (record_btrace_prepare_to_generate_core)
8527 (record_btrace_done_generating_core): Refactor as
8528 record_btrace_target methods.
8529 (init_record_btrace_ops): Delete.
8530 (_initialize_record_btrace): Remove reference to
8531 init_record_btrace_ops.
8532 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8533 the execution_direction global.
8534 (record_full_base_target, record_full_target)
8535 (record_full_core_target): New classes.
8536 (record_full_ops): Now a record_full_target.
8537 (record_full_core_ops): Now a record_full_core_target.
8538 (record_full_target::detach, record_full_target::disconnect)
8539 (record_full_core_target::disconnect)
8540 (record_full_target::mourn_inferior, record_full_target::kill):
8541 New.
8542 (record_full_open, record_full_close, record_full_async): Refactor
8543 as methods of the record_full_base_target class.
8544 (record_full_resume, record_full_commit_resume): Refactor
8545 as methods of the record_full_target class.
8546 (record_full_wait, record_full_stopped_by_watchpoint)
8547 (record_full_stopped_data_address)
8548 (record_full_stopped_by_sw_breakpoint)
8549 (record_full_supports_stopped_by_sw_breakpoint)
8550 (record_full_stopped_by_hw_breakpoint)
8551 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8552 methods of the record_full_base_target class.
8553 (record_full_store_registers, record_full_xfer_partial)
8554 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8555 Refactor as methods of the record_full_target class.
8556 (record_full_can_execute_reverse, record_full_get_bookmark)
8557 (record_full_goto_bookmark, record_full_execution_direction)
8558 (record_full_record_method, record_full_info, record_full_delete)
8559 (record_full_is_replaying, record_full_will_replay)
8560 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8561 (record_full_stop_replaying): Refactor as methods of the
8562 record_full_base_target class.
8563 (record_full_core_resume, record_full_core_kill)
8564 (record_full_core_fetch_registers)
8565 (record_full_core_prepare_to_store)
8566 (record_full_core_store_registers, record_full_core_xfer_partial)
8567 (record_full_core_insert_breakpoint)
8568 (record_full_core_remove_breakpoint)
8569 (record_full_core_has_execution): Refactor
8570 as methods of the record_full_core_target class.
8571 (record_full_base_target::supports_delete_record): New.
8572 (init_record_full_ops): Delete.
8573 (init_record_full_core_ops): Delete.
8574 (record_full_save): Refactor as method of the
8575 record_full_base_target class.
8576 (_initialize_record_full): Remove references to
8577 init_record_full_ops and init_record_full_core_ops.
8578
8579 * remote.c (remote_target, extended_remote_target): New classes.
8580 (remote_ops): Now a remote_target.
8581 (extended_remote_ops): Now an extended_remote_target.
8582 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8583 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8584 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8585 (remote_pass_signals, remote_set_syscall_catchpoint)
8586 (remote_program_signals, )
8587 (remote_thread_always_alive): Remove target_ops parameter.
8588 (remote_thread_alive, remote_thread_name)
8589 (remote_update_thread_list, remote_threads_extra_info)
8590 (remote_static_tracepoint_marker_at)
8591 (remote_static_tracepoint_markers_by_strid)
8592 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8593 (remote_open): Refactor as methods of remote_target.
8594 (extended_remote_open, extended_remote_detach)
8595 (extended_remote_attach, extended_remote_post_attach):
8596 (extended_remote_supports_disable_randomization)
8597 (extended_remote_create_inferior): : Refactor as method of
8598 extended_remote_target.
8599 (remote_set_permissions, remote_open_1, remote_detach)
8600 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8601 (remote_resume, remote_commit_resume, remote_stop)
8602 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8603 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8604 (remote_prepare_to_store, remote_store_registers)
8605 (remote_flash_erase, remote_flash_done, remote_files_info)
8606 (remote_kill, remote_mourn, remote_insert_breakpoint)
8607 (remote_remove_breakpoint, remote_insert_watchpoint)
8608 (remote_watchpoint_addr_within_range)
8609 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8610 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8611 (remote_supports_stopped_by_sw_breakpoint)
8612 (remote_stopped_by_hw_breakpoint)
8613 (remote_supports_stopped_by_hw_breakpoint)
8614 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8615 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8616 (remote_verify_memory): Refactor as methods of remote_target.
8617 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8618 parameter.
8619 (remote_xfer_partial, remote_get_memory_xfer_limit)
8620 (remote_search_memory, remote_rcmd, remote_memory_map)
8621 (remote_pid_to_str, remote_get_thread_local_address)
8622 (remote_get_tib_address, remote_read_description): Refactor as
8623 methods of remote_target.
8624 (remote_target::fileio_open, remote_target::fileio_pwrite)
8625 (remote_target::fileio_pread, remote_target::fileio_close): New.
8626 (remote_hostio_readlink, remote_hostio_fstat)
8627 (remote_filesystem_is_local, remote_can_execute_reverse)
8628 (remote_supports_non_stop, remote_supports_disable_randomization)
8629 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8630 (remote_supports_enable_disable_tracepoint)
8631 (remote_supports_string_tracing)
8632 (remote_can_run_breakpoint_commands, remote_trace_init)
8633 (remote_download_tracepoint, remote_can_download_tracepoint)
8634 (remote_download_trace_state_variable, remote_enable_tracepoint)
8635 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8636 (remote_trace_start, remote_get_trace_status)
8637 (remote_get_tracepoint_status, remote_trace_stop)
8638 (remote_trace_find, remote_get_trace_state_variable_value)
8639 (remote_save_trace_data, remote_get_raw_trace_data)
8640 (remote_set_disconnected_tracing, remote_core_of_thread)
8641 (remote_set_circular_trace_buffer, remote_traceframe_info)
8642 (remote_get_min_fast_tracepoint_insn_len)
8643 (remote_set_trace_buffer_size, remote_set_trace_notes)
8644 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8645 (remote_disable_btrace, remote_teardown_btrace)
8646 (remote_read_btrace, remote_btrace_conf)
8647 (remote_augmented_libraries_svr4_read, remote_load)
8648 (remote_pid_to_exec_file, remote_can_do_single_step)
8649 (remote_execution_direction, remote_thread_handle_to_thread_info):
8650 Refactor as methods of remote_target.
8651 (init_remote_ops, init_extended_remote_ops): Delete.
8652 (remote_can_async_p, remote_is_async_p, remote_async)
8653 (remote_thread_events, remote_upload_tracepoints)
8654 (remote_upload_trace_state_variables): Refactor as methods of
8655 remote_target.
8656 (_initialize_remote): Remove references to init_remote_ops and
8657 init_extended_remote_ops.
8658
8659 * remote-sim.c (gdbsim_target): New class.
8660 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8661 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8662 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8663 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8664 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8665 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8666 Refactor as methods of gdbsim_target.
8667 (gdbsim_ops): Now a gdbsim_target.
8668 (init_gdbsim_ops): Delete.
8669 (gdbsim_cntrl_c): Adjust.
8670 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8671
8672 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8673 (the_amd64_linux_nat_target): New.
8674 (amd64_linux_fetch_inferior_registers)
8675 (amd64_linux_store_inferior_registers): Refactor as methods of
8676 amd64_linux_nat_target.
8677 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8678 * i386-linux-nat.c: Don't include "linux-nat.h".
8679 (i386_linux_nat_target): New class.
8680 (the_i386_linux_nat_target): New.
8681 (i386_linux_fetch_inferior_registers)
8682 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8683 as methods of i386_linux_nat_target.
8684 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8685 * inf-child.c (inf_child_ops): Delete.
8686 (inf_child_fetch_inferior_registers)
8687 (inf_child_store_inferior_registers): Delete.
8688 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8689 methods of inf_child_target.
8690 (inf_child_target::supports_terminal_ours)
8691 (inf_child_target::terminal_init)
8692 (inf_child_target::terminal_inferior)
8693 (inf_child_target::terminal_ours_for_output)
8694 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8695 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8696 New.
8697 (inf_child_open, inf_child_disconnect, inf_child_close)
8698 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8699 (inf_child_post_startup_inferior, inf_child_can_run)
8700 (inf_child_pid_to_exec_file): Refactor as methods of
8701 inf_child_target.
8702 (inf_child_follow_fork): Delete.
8703 (inf_child_target::can_create_inferior)
8704 (inf_child_target::can_attach): New.
8705 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8706 (inf_child_target::has_stack, inf_child_target::has_registers)
8707 (inf_child_target::has_execution): New.
8708 (inf_child_fileio_open, inf_child_fileio_pwrite)
8709 (inf_child_fileio_pread, inf_child_fileio_fstat)
8710 (inf_child_fileio_close, inf_child_fileio_unlink)
8711 (inf_child_fileio_readlink, inf_child_use_agent)
8712 (inf_child_can_use_agent): Refactor as methods of
8713 inf_child_target.
8714 (return_zero, inf_child_target): Delete.
8715 (inf_child_target::inf_child_target): New.
8716 * inf-child.h: Include "target.h".
8717 (inf_child_target): Delete function prototype.
8718 (inf_child_target): New class.
8719 (inf_child_open_target, inf_child_mourn_inferior)
8720 (inf_child_maybe_unpush_target): Delete.
8721 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8722 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8723 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8724 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8725 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8726 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8727 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8728 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8729 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8730 methods of inf_ptrace_target.
8731 (inf_ptrace_target): Delete function.
8732 * inf-ptrace.h: Include "inf-child.h".
8733 (inf_ptrace_target): Delete function declaration.
8734 (inf_ptrace_target): New class.
8735 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8736 * linux-nat.c (linux_target): New.
8737 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8738 (linux_nat_target::~linux_nat_target): New.
8739 (linux_child_post_attach, linux_child_post_startup_inferior)
8740 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8741 (linux_child_remove_fork_catchpoint)
8742 (linux_child_insert_vfork_catchpoint)
8743 (linux_child_remove_vfork_catchpoint)
8744 (linux_child_insert_exec_catchpoint)
8745 (linux_child_remove_exec_catchpoint)
8746 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8747 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8748 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8749 (linux_nat_stopped_data_address)
8750 (linux_nat_stopped_by_sw_breakpoint)
8751 (linux_nat_supports_stopped_by_sw_breakpoint)
8752 (linux_nat_stopped_by_hw_breakpoint)
8753 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8754 (linux_nat_kill, linux_nat_mourn_inferior)
8755 (linux_nat_xfer_partial, linux_nat_thread_alive)
8756 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8757 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8758 (linux_child_static_tracepoint_markers_by_strid)
8759 (linux_nat_is_async_p, linux_nat_can_async_p)
8760 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8761 (linux_nat_supports_multi_process)
8762 (linux_nat_supports_disable_randomization, linux_nat_async)
8763 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8764 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8765 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8766 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8767 methods of linux_nat_target.
8768 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8769 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8770 parameter.
8771 (check_stopped_by_watchpoint): Adjust.
8772 (linux_xfer_partial): Delete.
8773 (linux_target_install_ops, linux_target, linux_nat_add_target):
8774 Delete.
8775 (linux_nat_target::linux_nat_target): New.
8776 * linux-nat.h: Include "inf-ptrace.h".
8777 (linux_nat_target): New.
8778 (linux_target, linux_target_install_ops, linux_nat_add_target):
8779 Delete function declarations.
8780 (linux_target): Declare global.
8781 * linux-thread-db.c (thread_db_target): New.
8782 (thread_db_target::thread_db_target): New.
8783 (thread_db_ops): Delete.
8784 (the_thread_db_target): New.
8785 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8786 (thread_db_update_thread_list, thread_db_pid_to_str)
8787 (thread_db_extra_thread_info)
8788 (thread_db_thread_handle_to_thread_info)
8789 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8790 (thread_db_resume): Refactor as methods of thread_db_target.
8791 (init_thread_db_ops): Delete.
8792 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8793 * x86-linux-nat.c: Don't include "linux-nat.h".
8794 (super_post_startup_inferior): Delete.
8795 (x86_linux_nat_target::~x86_linux_nat_target): New.
8796 (x86_linux_child_post_startup_inferior)
8797 (x86_linux_read_description, x86_linux_enable_btrace)
8798 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8799 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8800 methods of x86_linux_nat_target.
8801 (x86_linux_create_target): Delete. Bits folded ...
8802 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8803 pointer.
8804 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8805 (x86_linux_nat_target): New class.
8806 (x86_linux_create_target): Delete.
8807 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8808 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8809 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8810 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8811 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8812 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8813 make extern.
8814 (x86_use_watchpoints): Delete.
8815 * x86-nat.h: Include "breakpoint.h" and "target.h".
8816 (x86_use_watchpoints): Delete.
8817 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8818 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8819 (x86_insert_watchpoint, x86_remove_watchpoint)
8820 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8821 (x86_stopped_by_hw_breakpoint): New declarations.
8822 (x86_nat_target): New template class.
8823
8824 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8825 (the_ppc_linux_nat_target): New.
8826 (ppc_linux_fetch_inferior_registers)
8827 (ppc_linux_can_use_hw_breakpoint)
8828 (ppc_linux_region_ok_for_hw_watchpoint)
8829 (ppc_linux_ranged_break_num_registers)
8830 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8831 (ppc_linux_insert_mask_watchpoint)
8832 (ppc_linux_remove_mask_watchpoint)
8833 (ppc_linux_can_accel_watchpoint_condition)
8834 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8835 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8836 (ppc_linux_watchpoint_addr_within_range)
8837 (ppc_linux_masked_watch_num_registers)
8838 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8839 (ppc_linux_read_description): Refactor as methods of
8840 ppc_linux_nat_target.
8841 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8842
8843 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8844 (procfs_target): New class.
8845 (the_procfs_target): New.
8846 (procfs_target): Delete function.
8847 (procfs_auxv_parse, procfs_attach, procfs_detach)
8848 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8849 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8850 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8851 (procfs_create_inferior, procfs_update_thread_list)
8852 (procfs_thread_alive, procfs_pid_to_str)
8853 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8854 (procfs_stopped_data_address, procfs_insert_watchpoint)
8855 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8856 (proc_find_memory_regions, procfs_info_proc)
8857 (procfs_make_note_section): Refactor as methods of procfs_target.
8858 (_initialize_procfs): Adjust.
8859 * sol-thread.c (sol_thread_target): New class.
8860 (sol_thread_ops): Now a sol_thread_target.
8861 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8862 (sol_thread_fetch_registers, sol_thread_store_registers)
8863 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8864 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8865 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8866 (init_sol_thread_ops): Delete.
8867 (_initialize_sol_thread): Adjust. Remove references to
8868 init_sol_thread_ops and complete_target_initialization.
8869
8870 * windows-nat.c (windows_nat_target): New class.
8871 (windows_fetch_inferior_registers)
8872 (windows_store_inferior_registers, windows_resume, windows_wait)
8873 (windows_attach, windows_detach, windows_pid_to_exec_file)
8874 (windows_files_info, windows_create_inferior)
8875 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8876 (windows_close, windows_pid_to_str, windows_xfer_partial)
8877 (windows_get_tib_address, windows_get_ada_task_ptid)
8878 (windows_thread_name, windows_thread_alive): Refactor as
8879 windows_nat_target methods.
8880 (do_initial_windows_stuff): Adjust.
8881 (windows_target): Delete function.
8882 (_initialize_windows_nat): Adjust.
8883
8884 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8885 (darwin_mourn_inferior, darwin_kill_inferior)
8886 (darwin_create_inferior, darwin_attach, darwin_detach)
8887 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8888 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8889 (darwin_supports_multi_process): Refactor as darwin_nat_target
8890 methods.
8891 (darwin_resume_to, darwin_files_info): Delete.
8892 (_initialize_darwin_inferior): Rename to ...
8893 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8894 * darwin-nat.h: Include "inf-child.h".
8895 (darwin_nat_target): New class.
8896 (darwin_complete_target): Delete.
8897 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8898 (darwin_target): New.
8899 (i386_darwin_fetch_inferior_registers)
8900 (i386_darwin_store_inferior_registers): Refactor as methods of
8901 darwin_nat_target.
8902 (darwin_complete_target): Delete, with ...
8903 (_initialize_i386_darwin_nat): ... bits factored out here.
8904
8905 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8906 (the_alpha_linux_nat_target): New.
8907 (alpha_linux_register_u_offset): Refactor as
8908 alpha_linux_nat_target method.
8909 (_initialize_alpha_linux_nat): Adjust.
8910 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8911 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8912 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8913 methods of linux_nat_trad_target.
8914 (linux_trad_target): Delete.
8915 * linux-nat-trad.h (linux_trad_target): Delete function.
8916 (linux_nat_trad_target): New class.
8917 * mips-linux-nat.c (mips_linux_nat_target): New class.
8918 (super_fetch_registers, super_store_registers, super_close):
8919 Delete.
8920 (the_mips_linux_nat_target): New.
8921 (mips64_linux_regsets_fetch_registers)
8922 (mips64_linux_regsets_store_registers)
8923 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8924 (mips_linux_register_u_offset, mips_linux_read_description)
8925 (mips_linux_can_use_hw_breakpoint)
8926 (mips_linux_stopped_by_watchpoint)
8927 (mips_linux_stopped_data_address)
8928 (mips_linux_region_ok_for_hw_watchpoint)
8929 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8930 (mips_linux_close): Refactor as methods of mips_linux_nat.
8931 (_initialize_mips_linux_nat): Adjust to C++ification.
8932
8933 * aix-thread.c (aix_thread_target): New class.
8934 (aix_thread_ops): Now an aix_thread_target.
8935 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8936 (aix_thread_fetch_registers, aix_thread_store_registers)
8937 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8938 (aix_thread_thread_alive, aix_thread_pid_to_str)
8939 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8940 Refactor as methods of aix_thread_target.
8941 (init_aix_thread_ops): Delete.
8942 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8943 and complete_target_initialization.
8944 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8945 (rs6000_nat_target): New class.
8946 (the_rs6000_nat_target): New.
8947 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8948 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8949 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8950 (super_create_inferior): Delete.
8951 (_initialize_rs6000_nat): Adjust to C++ification.
8952
8953 * arm-linux-nat.c (arm_linux_nat_target): New class.
8954 (the_arm_linux_nat_target): New.
8955 (arm_linux_fetch_inferior_registers)
8956 (arm_linux_store_inferior_registers, arm_linux_read_description)
8957 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8958 (arm_linux_remove_hw_breakpoint)
8959 (arm_linux_region_ok_for_hw_watchpoint)
8960 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8961 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8962 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8963 arm_linux_nat_target.
8964 (_initialize_arm_linux_nat): Adjust to C++ification.
8965
8966 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8967 (the_aarch64_linux_nat_target): New.
8968 (aarch64_linux_fetch_inferior_registers)
8969 (aarch64_linux_store_inferior_registers)
8970 (aarch64_linux_child_post_startup_inferior)
8971 (aarch64_linux_read_description)
8972 (aarch64_linux_can_use_hw_breakpoint)
8973 (aarch64_linux_insert_hw_breakpoint)
8974 (aarch64_linux_remove_hw_breakpoint)
8975 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8976 (aarch64_linux_region_ok_for_hw_watchpoint)
8977 (aarch64_linux_stopped_data_address)
8978 (aarch64_linux_stopped_by_watchpoint)
8979 (aarch64_linux_watchpoint_addr_within_range)
8980 (aarch64_linux_can_do_single_step): Refactor as methods of
8981 aarch64_linux_nat_target.
8982 (super_post_startup_inferior): Delete.
8983 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8984
8985 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8986 (the_hppa_linux_nat_target): New.
8987 (hppa_linux_fetch_inferior_registers)
8988 (hppa_linux_store_inferior_registers): Refactor as methods of
8989 hppa_linux_nat_target.
8990 (_initialize_hppa_linux_nat): Adjust to C++ification.
8991
8992 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8993 (the_ia64_linux_nat_target): New.
8994 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8995 (ia64_linux_stopped_data_address)
8996 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8997 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8998 ia64_linux_nat_target methods.
8999 (super_xfer_partial): Delete.
9000 (_initialize_ia64_linux_nat): Adjust to C++ification.
9001
9002 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9003 (the_m32r_linux_nat_target): New.
9004 (m32r_linux_fetch_inferior_registers)
9005 (m32r_linux_store_inferior_registers): Refactor as
9006 m32r_linux_nat_target methods.
9007 (_initialize_m32r_linux_nat): Adjust to C++ification.
9008
9009 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9010 (the_m68k_linux_nat_target): New.
9011 (m68k_linux_fetch_inferior_registers)
9012 (m68k_linux_store_inferior_registers): Refactor as
9013 m68k_linux_nat_target methods.
9014 (_initialize_m68k_linux_nat): Adjust to C++ification.
9015
9016 * s390-linux-nat.c (s390_linux_nat_target): New class.
9017 (the_s390_linux_nat_target): New.
9018 (s390_linux_fetch_inferior_registers)
9019 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9020 (s390_insert_watchpoint, s390_remove_watchpoint)
9021 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9022 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9023 (s390_auxv_parse, s390_read_description): Refactor as methods of
9024 s390_linux_nat_target.
9025 (_initialize_s390_nat): Adjust to C++ification.
9026
9027 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9028 (the_sparc_linux_nat_target): New.
9029 (_initialize_sparc_linux_nat): Adjust to C++ification.
9030 * sparc-nat.c (sparc_fetch_inferior_registers)
9031 (sparc_store_inferior_registers): Remove target_ops parameter.
9032 * sparc-nat.h (sparc_fetch_inferior_registers)
9033 (sparc_store_inferior_registers): Remove target_ops parameter.
9034 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9035 (the_sparc64_linux_nat_target): New.
9036 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9037
9038 * spu-linux-nat.c (spu_linux_nat_target): New class.
9039 (the_spu_linux_nat_target): New.
9040 (spu_child_post_startup_inferior, spu_child_post_attach)
9041 (spu_child_wait, spu_fetch_inferior_registers)
9042 (spu_store_inferior_registers, spu_xfer_partial)
9043 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9044 methods.
9045 (_initialize_spu_nat): Adjust to C++ification.
9046
9047 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9048 (the_tilegx_linux_nat_target): New.
9049 (fetch_inferior_registers, store_inferior_registers):
9050 Refactor as methods.
9051 (_initialize_tile_linux_nat): Adjust to C++ification.
9052
9053 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9054 (the_xtensa_linux_nat_target): New.
9055 (xtensa_linux_fetch_inferior_registers)
9056 (xtensa_linux_store_inferior_registers): Refactor as
9057 xtensa_linux_nat_target methods.
9058 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9059
9060 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9061 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9062 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9063 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9064 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9065 (fbsd_stopped_by_sw_breakpoint)
9066 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9067 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9068 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9069 (fbsd_post_startup_inferior, fbsd_post_attach)
9070 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9071 (fbsd_set_syscall_catchpoint)
9072 (super_xfer_partial, super_resume, super_wait)
9073 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9074 (fbsd_handle_debug_trap): Remove target_ops parameter.
9075 (fbsd_nat_add_target): Delete.
9076 * fbsd-nat.h: Include "inf-ptrace.h".
9077 (fbsd_nat_add_target): Delete.
9078 (USE_SIGTRAP_SIGINFO): Define.
9079 (fbsd_nat_target): New class.
9080
9081 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9082 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9083 (amd64bsd_target): Delete.
9084 * amd64-bsd-nat.h: New file.
9085 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9086 "x86-bsd-nat.h".
9087 (amd64_fbsd_nat_target): New class.
9088 (the_amd64_fbsd_nat_target): New.
9089 (amd64fbsd_read_description): Refactor as method of
9090 amd64_fbsd_nat_target.
9091 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9092 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9093 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9094 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9095 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9096 (i386bsd_target): Delete.
9097 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9098 (i386bsd_fetch_inferior_registers)
9099 (i386bsd_store_inferior_registers): Declare.
9100 (i386_bsd_nat_target): New class.
9101 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9102 (the_i386_fbsd_nat_target): New.
9103 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9104 i386_fbsd_nat_target methods.
9105 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9106 (_initialize_i386fbsd_nat): Adjust to C++ification.
9107 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9108 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9109 (_initialize_x86_bsd_nat): Adjust to C++ification.
9110 * x86-bsd-nat.h: Include "x86-nat.h".
9111 (x86bsd_target): Delete declaration.
9112 (x86bsd_nat_target): New class.
9113
9114 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9115 (the_aarch64_fbsd_nat_target): New.
9116 (aarch64_fbsd_fetch_inferior_registers)
9117 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9118 aarch64_fbsd_nat_target.
9119 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9120 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9121 (the_alpha_bsd_nat_target): New.
9122 (alphabsd_fetch_inferior_registers)
9123 (alphabsd_store_inferior_registers): Refactor as
9124 alpha_bsd_nat_target methods.
9125 (_initialize_alphabsd_nat): Refactor as methods of
9126 alpha_bsd_nat_target.
9127 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9128 (the_amd64_nbsd_nat_target): New.
9129 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9130 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9131 (the_amd64_obsd_nat_target): New.
9132 (_initialize_amd64obsd_nat): Adjust to C++ification.
9133 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9134 (the_arm_fbsd_nat_target): New.
9135 (arm_fbsd_fetch_inferior_registers)
9136 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9137 (_initialize_arm_fbsd_nat): Refactor as methods of
9138 arm_fbsd_nat_target.
9139 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9140 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9141 (the_arm_netbsd_nat_target): New.
9142 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9143 arm_netbsd_nat_target.
9144 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9145 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9146 (the_hppa_nbsd_nat_target): New.
9147 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9148 hppa_nbsd_nat_target methods.
9149 (_initialize_hppanbsd_nat): Adjust to C++ification.
9150 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9151 (the_hppa_obsd_nat_target): New.
9152 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9153 methods of hppa_obsd_nat_target.
9154 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9155 add_target.
9156 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9157 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9158 add_target.
9159 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9160 (_initialize_i386obsd_nat): Use add_target.
9161 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9162 (the_m68k_bsd_nat_target): New.
9163 (m68kbsd_fetch_inferior_registers)
9164 (m68kbsd_store_inferior_registers): Refactor as methods of
9165 m68k_bsd_nat_target.
9166 (_initialize_m68kbsd_nat): Adjust to C++ification.
9167 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9168 (the_mips_fbsd_nat_target): New.
9169 (mips_fbsd_fetch_inferior_registers)
9170 (mips_fbsd_store_inferior_registers): Refactor as methods of
9171 mips_fbsd_nat_target.
9172 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9173 add_target.
9174 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9175 (the_mips_nbsd_nat_target): New.
9176 (mipsnbsd_fetch_inferior_registers)
9177 (mipsnbsd_store_inferior_registers): Refactor as methods of
9178 mips_nbsd_nat_target.
9179 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9180 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9181 (the_mips64_obsd_nat_target): New.
9182 (mips64obsd_fetch_inferior_registers)
9183 (mips64obsd_store_inferior_registers): Refactor as methods of
9184 mips64_obsd_nat_target.
9185 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9186 add_target.
9187 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9188 nbsd_nat_target.
9189 * nbsd-nat.h: Include "inf-ptrace.h".
9190 (nbsd_nat_target): New class.
9191 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9192 (obsd_wait): Refactor as methods of obsd_nat_target.
9193 (obsd_add_target): Delete.
9194 * obsd-nat.h: Include "inf-ptrace.h".
9195 (obsd_nat_target): New class.
9196 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9197 (the_ppc_fbsd_nat_target): New.
9198 (ppcfbsd_fetch_inferior_registers)
9199 (ppcfbsd_store_inferior_registers): Refactor as methods of
9200 ppc_fbsd_nat_target.
9201 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9202 add_target.
9203 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9204 (the_ppc_nbsd_nat_target): New.
9205 (ppcnbsd_fetch_inferior_registers)
9206 (ppcnbsd_store_inferior_registers): Refactor as methods of
9207 ppc_nbsd_nat_target.
9208 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9209 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9210 (the_ppc_obsd_nat_target): New.
9211 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9212 methods of ppc_obsd_nat_target.
9213 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9214 add_target.
9215 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9216 (the_sh_nbsd_nat_target): New.
9217 (shnbsd_fetch_inferior_registers)
9218 (shnbsd_store_inferior_registers): Refactor as methods of
9219 sh_nbsd_nat_target.
9220 (_initialize_shnbsd_nat): Adjust to C++ification.
9221 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9222 (inf_ptrace_xfer_partial): Delete.
9223 (sparc_xfer_partial, sparc_target): Delete.
9224 * sparc-nat.h (sparc_fetch_inferior_registers)
9225 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9226 (sparc_target): Delete function declaration.
9227 (sparc_target): New template class.
9228 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9229 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9230 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9231 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9232 add_target.
9233 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9234 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9235 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9236 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9237 add_target.
9238 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9239 (the_vax_bsd_nat_target): New.
9240 (vaxbsd_fetch_inferior_registers)
9241 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9242 methods.
9243 (_initialize_vaxbsd_nat): Adjust to C++ification.
9244
9245 * bsd-kvm.c (bsd_kvm_target): New class.
9246 (bsd_kvm_ops): Now a bsd_kvm_target.
9247 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9248 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9249 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9250 bsd_kvm_target.
9251 (bsd_kvm_return_one): Delete.
9252 (bsd_kvm_add_target): Adjust to C++ification.
9253
9254 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9255 (nto_procfs_target_procfs): New classes.
9256 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9257 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9258 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9259 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9260 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9261 (procfs_remove_hw_breakpoint, procfs_resume)
9262 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9263 (procfs_kill_inferior, procfs_store_registers)
9264 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9265 as methods of nto_procfs_target.
9266 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9267 (nto_native_ops): Delete.
9268 (procfs_open, procfs_native_open): Delete.
9269 (nto_native_ops): Now an nto_procfs_target_native.
9270 (init_procfs_targets): Adjust to C++ification.
9271 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9272 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9273 Refactor as methods of nto_procfs_target.
9274
9275 * go32-nat.c (go32_nat_target): New class.
9276 (the_go32_nat_target): New.
9277 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9278 (go32_store_registers, go32_xfer_partial, go32_files_info)
9279 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9280 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9281 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9282 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9283 (go32_target): Delete.
9284 (_initialize_go32_nat): Adjust to C++ification.
9285
9286 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9287 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9288 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9289 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9290 gnu_nat_target.
9291 (gnu_target): Delete.
9292 * gnu-nat.h (gnu_target): Delete.
9293 (gnu_nat_target): New class.
9294 * i386-gnu-nat.c (gnu_base_target): New.
9295 (i386_gnu_nat_target): New class.
9296 (the_i386_gnu_nat_target): New.
9297 (_initialize_i386gnu_nat): Adjust to C++ification.
9298
9299 2018-05-02 Pedro Alves <palves@redhat.com>
9300
9301 * bfd-target.c (target_bfd_xclose): Rename to ...
9302 (target_bfd_close): ... this.
9303 (target_bfd_reopen): Adjust.
9304 * target.c (target_close): Remove references to to_xclose.
9305 * target.h (target_ops::to_xclose): Delete.
9306 (target_ops::to_close): Update comments.
9307
9308 2018-05-02 Pedro Alves <palves@redhat.com>
9309
9310 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9311 "linux-nat.h".
9312 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9313 * inf-ptrace.c (inf_ptrace_register_u_offset)
9314 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9315 (inf_ptrace_store_register, inf_ptrace_store_registers)
9316 (inf_ptrace_trad_target): Move to ...
9317 * linux-nat-trad.c: ... this new file.
9318 * linux-nat-trad.h: New file.
9319 * linux-nat.c (linux_target_install_ops): Make extern.
9320 (linux_trad_target): Delete.
9321 * linux-nat.h (linux_trad_target): Delete declaration.
9322 (linux_target_install_ops): Declare.
9323 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9324 "linux-nat.h".
9325
9326 2018-05-02 Pedro Alves <palves@redhat.com>
9327
9328 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9329 procfs_target/add_target here.
9330 * procfs.c (procfs_target): Make static.
9331 (_initialize_procfs): Call add_target here.
9332 * procfs.h (struct target_ops): Remove forward declaration.
9333 (procfs_target): Remove declaration.
9334 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9335
9336 2018-05-02 Pedro Alves <palves@redhat.com>
9337
9338 * procfs.c (procfs_stopped_by_watchpoint)
9339 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9340 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9341 Forward declare.
9342 (procfs_use_watchpoints): Delete, move contents...
9343 (procfs_target): ... here.
9344 * procfs.h (procfs_use_watchpoints): Delete declaration.
9345 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9346 procfs_use_watchpoints.
9347 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9348 procfs_use_watchpoints.
9349
9350 2018-05-02 Tom Tromey <tom@tromey.com>
9351
9352 PR python/20084:
9353 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9354 and var_zuinteger_unlimited.
9355 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9356 and PARAM_ZUINTEGER_UNLIMITED.
9357 (set_parameter_value): Handle var_zuinteger and
9358 var_zuinteger_unlimited.
9359 (add_setshow_generic): Likewise.
9360 (parmpy_init): Likewise.
9361
9362 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9363
9364 PR rust/23124
9365 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9366 pointer is not null before dereferencing it.
9367
9368 2018-04-30 Tom Tromey <tom@tromey.com>
9369
9370 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9371 is_mi_like_p.
9372
9373 2018-04-30 Tom Tromey <tom@tromey.com>
9374
9375 * breakpoint.c (mention): Remove use of is_mi_like_p.
9376 (print_mention_ranged_breakpoint): Likewise.
9377 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9378 of is_mi_like_p.
9379
9380 2018-04-30 Tom Tromey <tom@tromey.com>
9381
9382 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9383
9384 2018-04-30 Tom Tromey <tom@tromey.com>
9385
9386 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9387 (info_spu_event_command): Remove some uses of is_mi_like_p.
9388
9389 2018-04-30 Tom Tromey <tom@tromey.com>
9390
9391 * python/py-framefilter.c (py_print_single_arg)
9392 (enumerate_locals, py_print_args, py_print_frame): Remove some
9393 uses of is_mi_like_p.
9394
9395 2018-04-30 Tom Tromey <tom@tromey.com>
9396
9397 * ui-out.c: Update.
9398 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9399 * ui-out.h (ui_out::is_mi_like_p): Now const.
9400 (ui_out::do_is_mi_like_p): Now const.
9401 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9402
9403 2018-04-30 Tom Tromey <tom@tromey.com>
9404
9405 * varobj.c (varobj_set_visualizer): Use new_reference.
9406 * python/python.c (gdbpy_decode_line): Use new_reference.
9407 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9408 new_reference.
9409
9410 2018-04-30 Tom Tromey <tom@tromey.com>
9411
9412 * varobj.c (install_new_value): Use new_reference.
9413 * value.h (value_incref): Return void. Swap intro comment with
9414 value_decref.
9415 * value.c (set_value_parent): Use new_reference.
9416 (value_incref): Return void. Update intro comment.
9417 (release_value): Use new_reference.
9418 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9419
9420 2018-04-30 Tom Tromey <tom@tromey.com>
9421
9422 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9423 * gdb_bfd.h (new_bfd_ref): Remove.
9424 (gdb_bfd_open): Update comment.
9425 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9426 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9427 (gdb_bfd_fdopenr): Use new_reference.
9428 * exec.c (exec_file_attach): Use new_reference.
9429
9430 2018-04-30 Tom Tromey <tom@tromey.com>
9431
9432 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9433 method.
9434
9435 2018-04-30 Tom Tromey <tom@tromey.com>
9436
9437 * jit.c (jit_read_code_entry): Use type_align.
9438 * i386-tdep.c (i386_gdbarch_init): Don't call
9439 set_gdbarch_long_long_align_bit.
9440 * gdbarch.sh: Remove long_long_align_bit.
9441 * gdbarch.c, gdbarch.h: Rebuild.
9442 * arc-tdep.c (arc_type_align): New function.
9443 (arc_gdbarch_init): Use arc_type_align. Don't call
9444 set_gdbarch_long_long_align_bit.
9445
9446 2018-04-30 Tom Tromey <tom@tromey.com>
9447
9448 * rust-lang.c (rust_type_alignment): Remove.
9449 (rust_composite_type): Use type_align.
9450
9451 2018-04-30 Tom Tromey <tom@tromey.com>
9452
9453 * NEWS: Mention Type.align.
9454 * python/py-type.c (typy_get_alignof): New function.
9455 (type_object_getset): Add "alignof".
9456
9457 2018-04-30 Tom Tromey <tom@tromey.com>
9458
9459 PR exp/17095:
9460 * NEWS: Update.
9461 * std-operator.def (UNOP_ALIGNOF): New operator.
9462 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9463 New.
9464 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9465 * c-lang.c (c_op_print_tab): Add alignof.
9466 * c-exp.y (ALIGNOF): New token.
9467 (exp): Add "ALIGNOF" production.
9468 (ident_tokens): Add _Alignof and alignof.
9469
9470 2018-04-30 Tom Tromey <tom@tromey.com>
9471
9472 * i386-tdep.c (i386_type_align): New function.
9473 (i386_gdbarch_init): Update.
9474 * gdbarch.sh (type_align): New method.
9475 * gdbarch.c, gdbarch.h: Rebuild.
9476 * arch-utils.h (default_type_align): Declare.
9477 * arch-utils.c (default_type_align): New function.
9478 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9479 (struct type) <align_log2>: New field.
9480 <instance_flags>: Now a bitfield.
9481 (TYPE_RAW_ALIGN): New macro.
9482 (type_align, type_raw_align, set_type_align): Declare.
9483 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9484 functions.
9485 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9486 (get_alignment, maybe_set_alignment): New functions.
9487 (read_structure_type, read_enumeration_type, read_array_type)
9488 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9489 (read_subrange_type, read_base_type): Set type alignment.
9490
9491 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9492
9493 * dwarf2read.c (read_index_from_section): Use bool.
9494
9495 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9496
9497 PR gdb/22950
9498 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9499 with #ifdef.
9500
9501 2018-04-29 John Reiser <jreiser@BitWagon.com>
9502
9503 PR build/22873
9504 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9505 last step, and do it atomically.
9506
9507 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9508
9509 * compile/compile-c-types.c (convert_int, convert_float):
9510 Update for C FE v1.
9511
9512 2018-04-27 Tom Tromey <tom@tromey.com>
9513
9514 PR rust/22545:
9515 * rust-lang.c (rust_inclusive_range_type_p): New function.
9516 (rust_range): Handle inclusive ranges.
9517 (rust_compute_range): Likewise.
9518 * rust-exp.y (struct rust_op) <inclusive>: New field.
9519 (DOTDOTEQ): New constant.
9520 (range_expr): Add "..=" productions.
9521 (operator_tokens): Add "..=" token.
9522 (ast_range): Add "inclusive" parameter.
9523 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9524 ranges.
9525 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9526 bounds values.
9527 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9528 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9529 Update comments.
9530 * expprint.c (print_subexp_standard): Handle new bounds values.
9531 (dump_subexp_body_standard): Likewise.
9532
9533 2018-04-27 Tom Tromey <tom@tromey.com>
9534
9535 * configure: Rebuild.
9536 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9537 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9538 "OVERRIDE".
9539 (class symbol_needs_eval_context): Likewise.
9540 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9541 (mock_mapped_index::symbol_name_at): Use "override". Remove
9542 "virtual".
9543 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9544 "override".
9545 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9546 * aarch64-tdep.c (instruction_reader::read): Use "override".
9547 (instruction_reader_test::read): Likewise.
9548 * arm-tdep.c (instruction_reader::read): Use "override".
9549 (instruction_reader_thumb::read): Likewise.
9550
9551 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9552
9553 PR remote/9665
9554 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9555 instead of remote_send.
9556 (remote_send): Remove.
9557
9558 2018-04-26 Pedro Alves <palves@redhat.com>
9559
9560 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9561 find_function_start_sal instead of find_pc_line.
9562
9563 2018-04-26 Pedro Alves <palves@redhat.com>
9564
9565 * breakpoint.c (set_breakpoint_location_function): Handle
9566 mst_data_gnu_ifunc.
9567 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9568 * elfread.c (elf_symtab_read): Give data symbols with
9569 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9570 (elf_rel_plt_read): Update comment.
9571 * linespec.c (convert_linespec_to_sals): Handle
9572 mst_data_gnu_ifunc.
9573 (minsym_found): Handle mst_data_gnu_ifunc.
9574 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9575 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9576 * parse.c (find_minsym_type_and_address): Handle
9577 mst_data_gnu_ifunc.
9578 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9579 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9580 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9581 comment.
9582 <mst_data_gnu_ifunc>: New enumerator.
9583
9584 2018-04-26 Pedro Alves <palves@redhat.com>
9585
9586 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9587 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9588 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9589 Handle it.
9590 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9591 (lookup_minimal_symbol_by_pc): Adjust.
9592 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9593 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9594 * minsyms.h (lookup_msym_prefer): New enum.
9595 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9596 parameter by a lookup_msym_prefer parameter.
9597
9598 2018-04-26 Pedro Alves <palves@redhat.com>
9599
9600 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9601 ends in "@plt" instead of looking at the symbol's section.
9602
9603 2018-04-26 Pedro Alves <palves@redhat.com>
9604
9605 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9606 all references.
9607 (find_pc_partial_function_gnu_ifunc): Rename to ...
9608 (find_pc_partial_function): ... this, and remove references to
9609 'is_gnu_ifunc_p'.
9610 (find_pc_partial_function): Delete old implementation.
9611 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9612
9613 2018-04-26 Pedro Alves <palves@redhat.com>
9614
9615 * linespec.c (struct bound_minimal_symbol_search_key): New.
9616 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9617 skip first line if we found a GNU ifunc minimal symbol by name.
9618 (compare_msymbols): Change parameters to work with a destructured
9619 lhs minsym.
9620 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9621 functions.
9622
9623 2018-04-26 Pedro Alves <palves@redhat.com>
9624
9625 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9626 ifunc targets here. Instead, if we have an ifunc minsym, use its
9627 address/name.
9628 (add_location_to_breakpoint): Store the minsym and the objfile in
9629 the breakpoint location.
9630 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9631 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9632 Record the minsym in the sal.
9633 * symtab.h (symtab_and_line) <msymbol>: New field.
9634
9635 2018-04-26 Pedro Alves <palves@redhat.com>
9636
9637 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9638 unless we actually resolved the ifunc.
9639
9640 2018-04-26 Pedro Alves <palves@redhat.com>
9641
9642 * c-exp.y (variable production): Prefer ifunc minsyms over
9643 regular function symbols.
9644 * symtab.c (find_gnu_ifunc): New function.
9645 * minsyms.h (lookup_msym_prefer): New enum.
9646 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9647 parameter by a lookup_msym_prefer parameter.
9648 * symtab.h (find_gnu_ifunc): New declaration.
9649
9650 2018-04-26 Pedro Alves <palves@redhat.com>
9651
9652 * blockframe.c (find_gnu_ifunc_target_type): New function.
9653 (find_function_type): New.
9654 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9655 return a value with a memory address.
9656 (eval_call): For calls to GNU ifunc functions, try to find the
9657 type of the target function from the type that the resolver
9658 returns.
9659 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9660 symbols.
9661 * infcall.c (find_function_return_type): Delete.
9662 (find_function_addr): Add 'function_type' parameter. For calls to
9663 GNU ifunc functions, try to find the type of the target function
9664 from the type that the resolver returns, and return it via
9665 FUNCTION_TYPE.
9666 (call_function_by_hand_dummy): Adjust to use the function type
9667 returned by find_function_addr.
9668 (find_function_addr): Add 'function_type' parameter and move
9669 description here.
9670 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9671 declarations.
9672
9673 2018-04-26 Pedro Alves <palves@redhat.com>
9674
9675 * c-exp.y (variable production): Skip finding an alias for ifunc
9676 symbols.
9677
9678 2018-04-26 Pedro Alves <palves@redhat.com>
9679
9680 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9681
9682 2018-04-25 Pedro Alves <palves@redhat.com>
9683
9684 * infcmd.c (kill_command): Print the pid as string, not the whole
9685 thread's ptid. Add comment. s/has been killed/killed/ in output
9686 message.
9687 * remote.c (remote_detach_1): Print the pid as string, not the
9688 whole thread's ptid.
9689
9690 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9691 Sergio Durigan Junior <sergiodj@redhat.com>
9692 Pedro Alves <palves@redhat.com>
9693
9694 * infcmd.c (kill_command): Print message when inferior has
9695 been killed.
9696 * inferior.c (print_inferior_events): Remove 'static'. Set as
9697 '1'.
9698 (add_inferior): Improve message printed when
9699 'print_inferior_events' is on.
9700 (exit_inferior): Remove message printed when
9701 'print_inferior_events' is on.
9702 (detach_inferior): Improve message printed when
9703 'print_inferior_events' is on.
9704 (initialize_inferiors): Use 'add_inferior_silent' to set
9705 'current_inferior_'.
9706 * inferior.h (print_inferior_events): Declare here as
9707 'extern'.
9708 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9709 '[Detaching...]' messages when 'print_inferior_events' is on.
9710 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9711 as prefix/suffix for messages. Remove periods. Fix erroneous
9712 'Detaching after fork from child...', replace it by '... from
9713 parent...'.
9714 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9715 prefix/suffix when printing 'Detaching...' messages. Print
9716 them when 'print_inferior_events' is on.
9717 * remote.c (remote_detach_1): Print message when detaching
9718 from inferior and '!is_fork_parent'.
9719
9720 2018-04-24 Tom Tromey <tom@tromey.com>
9721
9722 * cli-out.h: Reindent.
9723
9724 2018-04-24 Tom Tromey <tom@tromey.com>
9725
9726 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9727 (cli_ui_out::do_field_string): Use fputs_filtered.
9728 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9729
9730 2018-04-23 Tom Tromey <tom@tromey.com>
9731
9732 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9733 gdb::unique_xmalloc_ptr.
9734
9735 2018-04-23 Tom Tromey <tom@tromey.com>
9736
9737 * configure: Rebuild.
9738
9739 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9740
9741 PR gdb/23095
9742 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9743 prepare_for_testing. Set normal_bp to r_debug_state if target
9744 is bsd.
9745
9746 2018-04-21 Pedro Alves <palves@redhat.com>
9747 Rajendra SY <rajendra.sy@gmail.com>
9748
9749 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9750 * remote.c (extended_remote_attach): In all-stop mode, mark the
9751 thread as executing.
9752
9753 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9754
9755 * thread.c (thread_apply_all_command): Fix comment.
9756 (thread_command): Fix comment.
9757
9758 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9759
9760 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9761 parameter.
9762 * features/aarch64-core.c (create_feature_aarch64_core):
9763 Regenerate.
9764 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9765 Likewise.
9766 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9767 Likewise.
9768 * features/i386/32bit-avx512.c
9769 (create_feature_i386_32bit_avx512): Likewise.
9770 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9771 Likewise.
9772 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9773 Likewise.
9774 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9775 Likewise.
9776 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9777 Likewise.
9778 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9779 Likewise.
9780 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9781 Likewise.
9782 * features/i386/64bit-avx512.c
9783 (create_feature_i386_64bit_avx512): Likewise.
9784 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9785 Likewise.
9786 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9787 Likewise.
9788 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9789 Likewise.
9790 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9791 Likewise.
9792 * features/i386/64bit-segments.c
9793 (create_feature_i386_64bit_segments): Likewise.
9794 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9795 Likewise.
9796 * features/i386/x32-core.c
9797 (create_feature_i386_x32_core): Likewise.
9798 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9799 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9800 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9801 * target-descriptions.c: In generated code, don't pass xml
9802 filename.
9803
9804 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9805
9806 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9807 (print_xml_feature::visit_post): Likewise.
9808 (print_xml_feature::visit): Likewise.
9809 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9810 (print_xml_feature): Add new class.
9811 * regformats/regdat.sh: Null xmltarget on feature targets.
9812 * target-descriptions.c (struct target_desc): Add xmltarget.
9813 (maintenance_check_tdesc_xml_convert): Add unittest function.
9814 (tdesc_get_features_xml): Add function to get xml.
9815 (maintenance_check_xml_descriptions): Test xml generation.
9816 * xml-tdesc.c (string_read_description_xml): Add function.
9817 * xml-tdesc.h (string_read_description_xml): Add declaration.
9818
9819 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9820
9821 * features/Makefile: Add feature marker to targets with new style
9822 target descriptions.
9823 * regformats/aarch64.dat: Regenerate.
9824 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9825 * regformats/i386/amd64-avx-linux.dat: Likewise.
9826 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9827 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9828 * regformats/i386/amd64-linux.dat: Likewise.
9829 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9830 * regformats/i386/amd64.dat: Likewise.
9831 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9832 * regformats/i386/i386-avx-linux.dat: Likewise.
9833 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9834 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9835 * regformats/i386/i386-linux.dat: Likewise.
9836 * regformats/i386/i386-mmx-linux.dat: Likewise.
9837 * regformats/i386/i386-mpx-linux.dat: Likewise.
9838 * regformats/i386/i386.dat: Likewise.
9839 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9840 * regformats/i386/x32-avx-linux.dat: Likewise.
9841 * regformats/i386/x32-linux.dat: Likewise.
9842 * regformats/tic6x-c62x-linux.dat: Likewise.
9843 * regformats/tic6x-c64x-linux.dat: Likewise.
9844 * regformats/tic6x-c64xp-linux.dat: Likewise.
9845 * regformats/regdat.sh: Parse feature marker.
9846
9847 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9848
9849 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9850 (tdesc_osabi_name): Likewise.
9851 * target-descriptions.c (tdesc_architecture_name): Add new
9852 function.
9853 (tdesc_osabi_name): Likewise.
9854
9855 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9856
9857 * common/tdesc.c (tdesc_predefined_type): Move to here.
9858 (tdesc_named_type): Likewise.
9859 (tdesc_create_vector): Likewise.
9860 (tdesc_create_struct): Likewise.
9861 (tdesc_set_struct_size): Likewise.
9862 (tdesc_create_union): Likewise.
9863 (tdesc_create_flags): Likewise.
9864 (tdesc_create_enum): Likewise.
9865 (tdesc_add_field): Likewise.
9866 (tdesc_add_typed_bitfield): Likewise.
9867 (tdesc_add_bitfield): Likewise.
9868 (tdesc_add_flag): Likewise.
9869 (tdesc_add_enum_value): Likewise.
9870 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9871 (struct tdesc_type_vector): Likewise.
9872 (struct tdesc_type_field): Likewise.
9873 (struct tdesc_type_with_fields): Likewise.
9874 (tdesc_create_enum): Add declaration.
9875 (tdesc_add_typed_bitfield): Likewise.
9876 (tdesc_add_enum_value): Likewise.
9877 * target-descriptions.c (tdesc_type_field): Move from here.
9878 (tdesc_type_builtin): Likewise.
9879 (tdesc_type_vector): Likewise.
9880 (tdesc_type_with_fields): Likewise.
9881 (tdesc_predefined_types): Likewise.
9882 (tdesc_named_type): Likewise.
9883 (tdesc_create_vector): Likewise.
9884 (tdesc_create_struct): Likewise.
9885 (tdesc_set_struct_size): Likewise.
9886 (tdesc_create_union): Likewise.
9887 (tdesc_create_flags): Likewise.
9888 (tdesc_create_enum): Likewise.
9889 (tdesc_add_field): Likewise.
9890 (tdesc_add_typed_bitfield): Likewise.
9891 (tdesc_add_bitfield): Likewise.
9892 (tdesc_add_flag): Likewise.
9893 (tdesc_add_enum_value): Likewise.
9894 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9895 (tdesc_add_typed_bitfield): Likewise.
9896 (tdesc_add_enum_value): Likewise.
9897
9898 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9899
9900 * common/tdesc.c (tdesc_feature::accept): Move to here.
9901 (tdesc_feature::operator==): Likewise.
9902 (tdesc_create_reg): Likewise.
9903 * common/tdesc.h (tdesc_type_kind): Likewise.
9904 (struct tdesc_type): Likewise.
9905 (struct tdesc_feature): Likewise.
9906 * regformats/regdat.sh: Create a feature.
9907 * target-descriptions.c (tdesc_type_kind): Move from here.
9908 (tdesc_type): Likewise.
9909 (tdesc_type_up): Likewise.
9910 (tdesc_feature): Likewise.
9911 (tdesc_create_reg): Likewise.
9912
9913 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9914
9915 * Makefile.in: Add arch/tdesc.c
9916 * common/tdesc.c: New file.
9917 * common/tdesc.h (tdesc_element_visitor): Move to here.
9918 (tdesc_element): Likewise.
9919 (tdesc_reg): Likewise.
9920 (tdesc_reg_up): Likewise.
9921 * regformats/regdef.h (reg): Add offset to constructors.
9922 * target-descriptions.c (tdesc_element_visitor): Move from here.
9923 (tdesc_element): Likewise.
9924 (tdesc_reg): Likewise.
9925 (tdesc_reg_up): Likewise.
9926
9927 2018-04-17 Tom Tromey <tom@tromey.com>
9928
9929 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9930 discriminant field.
9931
9932 2018-04-17 Tom Tromey <tom@tromey.com>
9933
9934 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9935
9936 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9937
9938 * symtab.c (print_symbol_info): Skip printing filename and line
9939 number when `last' is NULL.
9940 (symtab_symbol_info): Use empty string instead of NULL for first
9941 invocation of print_symbol_info.
9942 (rbreak_command): Pass NULL to `last' parameter of
9943 print_symbol_info.
9944
9945 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9946
9947 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9948 instead of nullptr.
9949
9950 2018-04-16 Pedro Alves <palves@redhat.com>
9951
9952 * MAINTAINERS (sh): Remove.
9953 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9954 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9955 (ALLDEPFILES): Remove sh64-tdep.c.
9956 * NEWS: Mentions that support for SH-5/SH64 is removed.
9957 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9958 (sh*-*-openbsd*): Ditto.
9959 (sh64-*-elf*): Remove.
9960 (sh*): Remove.
9961 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9962 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9963 * sh-tdep.c: No longer include "sh64-tdep.h".
9964 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9965 * sh64-tdep.c, sh64-tdep.h: Remove files.
9966
9967 2018-04-16 Pedro Alves <palves@redhat.com>
9968
9969 * MAINTAINERS: Remove m88k.
9970 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9971 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9972 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9973 * NEWS: Mention that support for m88k was removed.
9974 * configure.host (m88*-*-*): Remove support.
9975 * configure.nat (m88k-*-*): Remove support.
9976 * configure.tgt (m88*-*-openbsd*): Remove.
9977 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9978
9979 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9980
9981 * configure.tgt (x86_tobjs): New variable.
9982 (amd64_tobjs, i386_tobjs): Use it.
9983
9984 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9985
9986 * symtab.c (print_symbol_info): Precede the symbol definition by
9987 the line number when available.
9988 * NEWS: Advertise this enhancement.
9989
9990 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9991
9992 * NEWS (New options): announce set/show record btrace cpu.
9993 * btrace.c: Include record-btrace.h.
9994 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9995 the vendor is unknown.
9996 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9997 Maybe overwrite the btrace configuration's cpu.
9998 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9999 (btrace_fetch): Add cpu parameter. Update callers.
10000 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10001 Maybe overwrite the btrace configuration's cpu. Skip enabling
10002 errata workarounds if the vendor is unknown.
10003 * python/py-record-btrace.c: Include record-btrace.h.
10004 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10005 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10006 * record-btrace.c (record_btrace_cpu_state_kind): New.
10007 (record_btrace_cpu): New.
10008 (set_record_btrace_cpu_cmdlist): New.
10009 (record_btrace_get_cpu): New.
10010 (require_btrace_thread, record_btrace_info)
10011 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10012 (cmd_set_record_btrace_cpu_none): New.
10013 (cmd_set_record_btrace_cpu_auto): New.
10014 (cmd_set_record_btrace_cpu): New.
10015 (cmd_show_record_btrace_cpu): New.
10016 (_initialize_record_btrace): Initialize set/show record btrace cpu
10017 commands.
10018 * record-btrace.h (record_btrace_get_cpu): New.
10019
10020 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10021
10022 * record.c (set_record_command): Fix typo in message.
10023
10024 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10025
10026 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10027
10028 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10029
10030 * infrun.c (process_event_stop_test): Call
10031 gdbarch_in_indirect_branch_thunk.
10032 * gdbarch.sh (in_indirect_branch_thunk): New.
10033 * gdbarch.c: Regenerated.
10034 * gdbarch.h: Regenerated.
10035 * x86-tdep.h: New.
10036 * x86-tdep.c: New.
10037 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10038 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10039 (ALLDEPFILES): Add x86-tdep.c.
10040 * arch-utils.h (default_in_indirect_branch_thunk): New.
10041 * arch-utils.c (default_in_indirect_branch_thunk): New.
10042 * i386-tdep: Include x86-tdep.h.
10043 (i386_in_indirect_branch_thunk): New.
10044 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10045 function.
10046 * amd64-tdep: Include x86-tdep.h.
10047 (amd64_in_indirect_branch_thunk): New.
10048 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10049
10050 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10051
10052 PR gdb/23053
10053 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10054 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10055 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10056 regression.
10057
10058 2018-04-12 Tom Tromey <tom@tromey.com>
10059
10060 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10061 (rust_evaluate_subexp): Likewise.
10062
10063 2018-04-12 Pedro Alves <palves@redhat.com>
10064
10065 * procfs.c (procfs_detach): Make forward declaration's prototype
10066 match definition's protototype.
10067 (proc_get_LDT_entry): Remove stale do_cleanups call.
10068
10069 2018-04-12 Pedro Alves <palves@redhat.com>
10070
10071 * target.h (target_ops::to_has_exited): Delete.
10072 (target_has_exited): Delete.
10073 * target-delegates.c: Regenerate.
10074
10075 2018-04-11 Pedro Alves <palves@redhat.com>
10076
10077 * target.c (fileio_fh_t::t): Add comment.
10078 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10079 (target_fileio_close): Handle a NULL target.
10080 (invalidate_fileio_fh): New.
10081 (target_close): Call it.
10082 * remote.c (remote_hostio_send_command): No longer check whether
10083 remote_desc is open.
10084
10085 2018-04-11 Pedro Alves <palves@redhat.com>
10086
10087 * target.c (fileio_fh_t): Make it a named struct instead of a
10088 typedef.
10089 (fileio_fh_t::is_closed): New method.
10090 (DEF_VEC_O (fileio_fh_t)): Remove.
10091 (fileio_fhandles): Now a std::vector.
10092 (is_closed_fileio_fh): Delete.
10093 (acquire_fileio_fd): Adjust. Rename parameters.
10094 (release_fileio_fd): Adjust.
10095 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10096 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10097 (target_fileio_close): Adjust.
10098
10099 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10100
10101 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10102 index.
10103
10104 2018-04-10 Pedro Alves <palves@redhat.com>
10105
10106 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10107 (scoped_finish_thread_state): New class.
10108 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10109 cleanup.
10110 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10111 (fetch_inferior_event, normal_stop): Likewise.
10112 * thread.c (finish_thread_state_cleanup): Delete.
10113
10114 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10115 Pedro Alves <palves@redhat.com>
10116
10117 * value.c: Include "selftest.h" and "common/array-view.h".
10118 (struct range) <operator ==>: New.
10119 (test_ranges_contain): New.
10120 (check_ranges_vector): New.
10121 (test_insert_into_bit_range_vector): New.
10122 (_initialize_values): Register selftests.
10123 * common/array-view.h (operator==, operator!=): New.
10124
10125 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10126
10127 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10128 an iterator.
10129 * inline-frame.c: Include <algorithm>.
10130 (struct inline_state): Add constructor.
10131 (inline_state_s): Remove.
10132 (DEF_VEC_O(inline_state_s)): Remove.
10133 (inline_states): Change type to std::vector.
10134 (find_inline_frame_state): Adjust to std::vector.
10135 (allocate_inline_frame_state): Remove.
10136 (clear_inline_frame_state): Adjust to std::vector.
10137 (skip_inline_frames): Adjust to std::vector.
10138
10139 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10140
10141 * tracepoint.h (struct trace_state_variable): Add constructor.
10142 <name>: Change type to std::string.
10143 * tracepoint.c (tsv_s): Remove.
10144 (DEF_VEC_O(tsv_s)): Remove.
10145 (tvariables): Change to std::vector.
10146 (create_trace_state_variable): Adjust to std::vector.
10147 (find_trace_state_variable): Likewise.
10148 (find_trace_state_variable_by_number): Likewise.
10149 (delete_trace_state_variable): Likewise.
10150 (trace_variable_command): Adjust to std::string.
10151 (delete_trace_variable_command): Likewise.
10152 (tvariables_info_1): Adjust to std::vector.
10153 (save_trace_state_variables): Likewise.
10154 (start_tracing): Likewise.
10155 (merge_uploaded_trace_state_variables): Adjust to std::vector
10156 and std::string.
10157 * target.h (struct target_ops)
10158 <to_download_trace_state_variable>: Pass reference to
10159 trace_state_variable.
10160 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10161 * target-delegates.c: Re-generate.
10162 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10163 (mi_tsv_deleted): Likewise.
10164 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10165 * remote.c (remote_download_trace_state_variable): Change
10166 pointer to reference and adjust.
10167 * make-target-delegates (parse_argtypes): Handle references.
10168 (write_function_header): Likewise.
10169 (munge_type): Likewise.
10170
10171 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10172
10173 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10174 string_view-selftests.c.
10175 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10176 testsuite.
10177 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10178 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10179 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10180 * unittests/basic_string_view/element_access/char/1.cc:
10181 Likewise.
10182 * unittests/basic_string_view/element_access/char/empty.cc:
10183 Likewise.
10184 * unittests/basic_string_view/element_access/char/front_back.cc:
10185 Likewise.
10186 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10187 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10188 Likewise.
10189 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10190 Likewise.
10191 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10192 Likewise.
10193 * unittests/basic_string_view/operations/compare/char/1.cc:
10194 Likewise.
10195 * unittests/basic_string_view/operations/compare/char/13650.cc:
10196 Likewise.
10197 * unittests/basic_string_view/operations/copy/char/1.cc:
10198 Likewise.
10199 * unittests/basic_string_view/operations/data/char/1.cc:
10200 Likewise.
10201 * unittests/basic_string_view/operations/find/char/1.cc:
10202 Likewise.
10203 * unittests/basic_string_view/operations/find/char/2.cc:
10204 Likewise.
10205 * unittests/basic_string_view/operations/find/char/3.cc:
10206 Likewise.
10207 * unittests/basic_string_view/operations/find/char/4.cc:
10208 Likewise.
10209 * unittests/basic_string_view/operations/rfind/char/1.cc:
10210 Likewise.
10211 * unittests/basic_string_view/operations/rfind/char/2.cc:
10212 Likewise.
10213 * unittests/basic_string_view/operations/rfind/char/3.cc:
10214 Likewise.
10215 * unittests/basic_string_view/operations/substr/char/1.cc:
10216 Likewise.
10217 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10218 * unittests/string_view-selftests.c: New file.
10219
10220 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10221
10222 * unittests/basic_string_view/capacity/1.cc: New file.
10223 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10224 * unittests/basic_string_view/cons/char/1.cc: New file.
10225 * unittests/basic_string_view/cons/char/2.cc: New file.
10226 * unittests/basic_string_view/cons/char/3.cc: New file.
10227 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10228 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10229 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10230 * unittests/basic_string_view/element_access/char/1.cc: New file.
10231 * unittests/basic_string_view/element_access/char/2.cc: New file.
10232 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10233 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10234 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10235 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10236 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10237 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10238 * unittests/basic_string_view/include.cc: New file.
10239 * unittests/basic_string_view/inserters/char/1.cc: New file.
10240 * unittests/basic_string_view/inserters/char/2.cc: New file.
10241 * unittests/basic_string_view/inserters/char/3.cc: New file.
10242 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10243 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10244 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10245 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10246 * unittests/basic_string_view/literals/types.cc: New file.
10247 * unittests/basic_string_view/literals/values.cc: New file.
10248 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10249 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10250 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10251 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10252 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10253 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10254 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10255 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10256 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10257 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10258 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10259 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10260 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10261 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10262 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10263 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10264 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10265 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10266 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10267 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10268 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10269 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10270 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10271 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10272 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10273 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10274 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10275 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10276 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10277 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10278 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10279 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10280 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10281 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10282 * unittests/basic_string_view/operators/char/2.cc: New file.
10283 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10284 * unittests/basic_string_view/range_access/char/1.cc: New file.
10285 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10286 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10287 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10288 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10289 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10290 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10291 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10292 * unittests/basic_string_view/typedefs.cc: New file.
10293 * unittests/basic_string_view/types/1.cc: New file.
10294
10295 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10296
10297 * common/gdb_string_view.h: Remove libstdc++ implementation
10298 details, adjust to gdb reality.
10299 * common/gdb_string_view.tcc: Likewise.
10300 * cli/cli-script.c (struct string_view): Remove.
10301 (user_args) <m_args>: Change element type to gdb::string_view.
10302 (user_args::insert_args): Adjust.
10303
10304 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10305
10306 * common/gdb_string_view.h: New file.
10307 * common/gdb_string_view.tcc: New file.
10308
10309 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10310
10311 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10312 * configure: Re-generate.
10313
10314 2018-04-09 Pedro Alves <palves@redhat.com>
10315
10316 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10317 (set_target_gdbarch): Call
10318 gdb::observers::architecture_changed.notify instead of
10319 observer_notify_architecture_changed.
10320
10321 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10322
10323 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10324 (do_restore_current_traceframe_cleanup): Remove.
10325 (restore_current_traceframe_cleanup_dtor): Remove.
10326 (make_cleanup_restore_current_traceframe): Remove.
10327 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10328 New.
10329 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10330 * infrun.c (fetch_inferior_event): Use
10331 scoped_restore_current_traceframe.
10332
10333 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10334
10335 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10336 Remove.
10337 <n_allocated_type_units>: Remove.
10338 <all_type_units>: Change to std::vector.
10339 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10340 to std::vector change.
10341 (dwarf2_per_objfile::get_cutu): Likewise.
10342 (dwarf2_per_objfile::get_tu): Likewise.
10343 (create_signatured_type_table_from_index): Likewise.
10344 (create_signatured_type_table_from_debug_names): Likewise.
10345 (dw2_symtab_iter_next): Likewise.
10346 (dw2_print_stats): Likewise.
10347 (dw2_expand_all_symtabs): Likewise.
10348 (dw2_expand_marked_cus): Likewise.
10349 (dw2_debug_names_iterator::next): Likewise.
10350 (dwarf2_initialize_objfile): Likewise.
10351 (add_signatured_type_cu_to_table): Likewise.
10352 (create_all_type_units): Likewise.
10353 (add_type_unit): Likewise.
10354 (struct tu_abbrev_offset): Add constructor.
10355 (build_type_psymtabs_1): Adjust to std::vector change.
10356 (print_tu_stats): Likewise.
10357 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10358 (write_debug_names): Likewise.
10359
10360 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10361
10362 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10363 Make an std::vector.
10364 <n_comp_units>: Remove.
10365 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10366 to std::vector change.
10367 (dwarf2_per_objfile::get_cutu): Likewise.
10368 (dwarf2_per_objfile::get_cu): Likewise.
10369 (create_cus_from_index): Likewise.
10370 (create_addrmap_from_index): Likewise.
10371 (create_addrmap_from_aranges): Likewise.
10372 (dwarf2_read_index): Likewise.
10373 (dw2_find_last_source_symtab): Likewise.
10374 (dw2_map_symtabs_matching_filename): Likewise.
10375 (dw2_symtab_iter_next): Likewise.
10376 (dw2_print_stats): Likewise.
10377 (dw2_expand_all_symtabs): Likewise.
10378 (dw2_expand_symtabs_with_fullname): Likewise.
10379 (dw2_expand_marked_cus): Likewise.
10380 (dw2_map_symbol_filenames): Likewise.
10381 (create_cus_from_debug_names): Likewise.
10382 (dwarf2_read_debug_names): Likewise.
10383 (dw2_debug_names_iterator::next): Likewise.
10384 (dwarf2_initialize_objfile): Likewise.
10385 (set_partial_user): Likewise.
10386 (dwarf2_build_psymtabs_hard): Likewise.
10387 (read_comp_units_from_section): Remove arguments, adjust to
10388 std::vector change.
10389 (create_all_comp_units): Adjust to std::vector and
10390 read_comp_units_from_section changes.
10391 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10392 change.
10393 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10394 (psyms_seen_size): Likewise.
10395 (write_gdbindex): Likewise.
10396 (write_debug_names): Likewise.
10397
10398 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10399
10400 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10401 with dwarf2_per_objfile.
10402 (create_cus_from_index): Likewise.
10403 (create_signatured_type_table_from_index): Likewise.
10404 (dwarf2_read_index): Likewise.
10405 (dwarf2_initialize_objfile): Likewise.
10406 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10407 per_cu rather than get_dwarf2_per_objfile.
10408
10409 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10410
10411 * dwarf2read.h (struct signatured_type): Forward declare.
10412 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10413 New methods.
10414 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10415 (dw2_get_cutu): ...this.
10416 (dwarf2_per_objfile::get_cu): Rename from...
10417 (dw2_get_cu): ...this.
10418 (dwarf2_per_objfile::get_tu): New.
10419 (create_addrmap_from_index): Adjust.
10420 (create_addrmap_from_aranges): Adjust.
10421 (dw2_find_last_source_symtab): Adjust.
10422 (dw2_map_symtabs_matching_filename): Adjust.
10423 (dw2_symtab_iter_next): Adjust.
10424 (dw2_print_stats): Adjust.
10425 (dw2_expand_all_symtabs): Adjust.
10426 (dw2_expand_symtabs_with_fullname): Adjust.
10427 (dw2_expand_marked_cus): Adjust.
10428 (dw_expand_symtabs_matching_file_matcher): Adjust.
10429 (dw2_map_symbol_filenames): Adjust.
10430 (dw2_debug_names_iterator::next): Adjust.
10431 (dwarf2_initialize_objfile): Adjust.
10432 (set_partial_user): Adjust.
10433 (dwarf2_build_psymtabs_hard): Adjust.
10434
10435 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10436
10437 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10438 Remove unused variables.
10439 (dw2_map_symtabs_matching_filename): Likewise.
10440 (dwarf2_record_block_ranges): Likewise.
10441 (dwarf2_read_addr_index): Likewise.
10442 (follow_die_offset): Likewise.
10443
10444 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10445
10446 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10447 to symbol_file_add_main.
10448
10449 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10450
10451 PR mi/22299
10452 * mi/mi-console.c (do_fputc_async_safe): New.
10453 (mi_console_file::write_async_safe): New.
10454 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10455 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10456 New.
10457 * ui-file.c (ui_file::putstrn): Adjust call to
10458 fputstrn_unfiltered.
10459 * utils.c (printchar): Replace do_fputs and do_fprintf
10460 parameters by do_fputc.
10461 (fputstr_filtered): Adjust call to printchar.
10462 (fputstr_unfiltered): Likewise.
10463 (fputstrn_filtered): Likewise.
10464 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10465 printchar.
10466 * utils.h (do_fputc_ftype): New typedef.
10467 (fputstrn_unfiltered): Add do_fputc parameter.
10468
10469 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10470
10471 * regformats/i386/i386-avx.dat: Remove.
10472
10473 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10474
10475 PR gdb/22979
10476 * amd64-tdep.c (amd64_none_init_abi): New function.
10477 (amd64_x32_none_init_abi): New function.
10478 (_initialize_amd64_tdep): Register handlers for x86-64 and
10479 x64_32 with GDB_OSABI_NONE.
10480 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10481 GDB_OSABI_NONE osabi.
10482
10483 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10484
10485 PR gdb/22980
10486 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10487 GDB_OSABI_NONE.
10488 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10489 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10490
10491 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10492
10493 * common/byte-vector.h (char_vector): New type.
10494 * target.h (target_read_alloc): Return
10495 gdb::optional<byte_vector>.
10496 (target_read_stralloc): Return gdb::optional<char_vector>.
10497 (target_get_osdata): Return gdb::optional<char_vector>.
10498 * target.c (target_read_alloc_1): Templatize. Replacement
10499 manual memory management with vector.
10500 (target_read_alloc): Change return type, adjust.
10501 (target_read_stralloc): Change return type, adjust.
10502 (target_get_osdata): Change return type, adjust.
10503 * auxv.c (struct auxv_info) <length>: Remove.
10504 <data>: Change type to gdb::optional<byte_vector>.
10505 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10506 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10507 (target_auxv_search): Adjust.
10508 (fprint_target_auxv): Adjust.
10509 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10510 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10511 (linux_make_corefile_notes): Adjust.
10512 * osdata.c (get_osdata): Adjust.
10513 * remote.c (remote_get_threads_with_qxfer): Adjust.
10514 (remote_memory_map): Adjust.
10515 (remote_traceframe_info): Adjust.
10516 (btrace_read_config): Adjust.
10517 (remote_read_btrace): Adjust.
10518 (remote_pid_to_exec_file): Adjust.
10519 * solib-aix.c (solib_aix_get_library_list): Adjust.
10520 * solib-dsbt.c (decode_loadmap): Don't free buf.
10521 (dsbt_get_initial_loadmaps): Adjust.
10522 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10523 * solib-target.c (solib_target_current_sos): Adjust.
10524 * tracepoint.c (sdata_make_value): Adjust.
10525 * xml-support.c (xinclude_start_include): Adjust.
10526 (xml_fetch_content_from_file): Adjust.
10527 * xml-support.h (xml_fetch_another): Change return type.
10528 (xml_fetch_content_from_file): Change return type.
10529 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10530 * xml-tdesc.c (file_read_description_xml): Adjust.
10531 (fetch_available_features_from_target): Change return type.
10532 (target_fetch_description_xml): Adjust.
10533 (target_read_description_xml): Adjust.
10534
10535 2018-04-06 Tom Tromey <tom@tromey.com>
10536
10537 * value.c (~value): Update.
10538 (struct value) <contents>: Now unique_xmalloc_ptr.
10539 (value_contents_bits_eq, allocate_value_contents)
10540 (value_contents_raw, value_contents_all_raw)
10541 (value_contents_for_printing, value_contents_for_printing_const)
10542 (set_value_enclosing_type): Update.
10543
10544 2018-04-06 Tom Tromey <tom@tromey.com>
10545
10546 * value.c (range_s): Remove typedef, VEC.
10547 (struct range): Add operator<.
10548 (range_lessthan): Remove.
10549 (ranges_contain): Change type.
10550 (~value): Update.
10551 (struct value) <unavailable, optimized_out>: Now std::vector.
10552 (value_entirely_available)
10553 (value_entirely_covered_by_range_vector)
10554 (value_entirely_unavailable, value_entirely_optimized_out):
10555 Update.
10556 (insert_into_bit_range_vector): Change argument type.
10557 (find_first_range_overlap): Likewise.
10558 (struct ranges_and_idx, value_contents_bits_eq)
10559 (require_not_optimized_out, require_available): Update.
10560 (ranges_copy_adjusted): Change argument types.
10561 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10562
10563 2018-04-06 Tom Tromey <tom@tromey.com>
10564
10565 * value.c (~value): Update.
10566 (struct value) <parent>: Now a value_ref_ptr.
10567 (value_parent, set_value_parent, value_address, value_copy):
10568 Update.
10569
10570 2018-04-06 Tom Tromey <tom@tromey.com>
10571
10572 * value.c (struct value): Add constructor, destructor, and member
10573 initializers.
10574 (allocate_value_lazy, value_decref): Update.
10575
10576 2018-04-06 Tom Tromey <tom@tromey.com>
10577
10578 * value.c (struct value) <released, next>: Remove.
10579 (all_values): Now a std::vector.
10580 (allocate_value_lazy): Update.
10581 (value_next): Remove.
10582 (value_mark, value_free_to_mark, release_value)
10583 (value_release_to_mark): Update.
10584
10585 2018-04-06 Tom Tromey <tom@tromey.com>
10586
10587 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10588 (free_value_chain): Remove.
10589 * value.c (free_value_chain): Remove.
10590 (value_release_to_mark): Return a std::vector.
10591 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10592 std::vector.
10593 (check_condition): Update.
10594 * eval.c (fetch_subexp_value): Change "val_chain" to a
10595 std::vector.
10596 * breakpoint.c (update_watchpoint): Update.
10597 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10598
10599 2018-04-06 Tom Tromey <tom@tromey.com>
10600
10601 * value.h (free_all_values): Remove.
10602 * value.c (free_all_values): Remove.
10603
10604 2018-04-06 Tom Tromey <tom@tromey.com>
10605
10606 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10607 (value_history_chain, value_history_count): Remove.
10608 (value_history): New global.
10609 (record_latest_value, access_value_history, show_values)
10610 (preserve_values): Update.
10611
10612 2018-04-06 Tom Tromey <tom@tromey.com>
10613
10614 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10615 * varobj.c (varobj_set_display_format, varobj_set_value)
10616 (install_default_visualizer, construct_visualizer)
10617 (install_new_value, ~varobj, varobj_get_value_type)
10618 (my_value_of_variable, varobj_editable_p): Update.
10619 * c-varobj.c (c_describe_child, c_value_of_variable)
10620 (cplus_number_of_children, cplus_describe_child): Update.
10621 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10622 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10623 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10624
10625 2018-04-06 Tom Tromey <tom@tromey.com>
10626
10627 * printcmd.c (last_examine_address): Change type to
10628 value_ref_ptr.
10629 (do_examine, x_command): Update.
10630
10631 2018-04-06 Tom Tromey <tom@tromey.com>
10632
10633 * value.c (release_value): Update.
10634 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10635 (struct bpstats) <val>: Now a value_ref_ptr.
10636 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10637 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10638 (~watchpoint, print_it_watchpoint, watch_command_1)
10639 (invalidate_bp_value_on_memory_change): Update.
10640
10641 2018-04-06 Tom Tromey <tom@tromey.com>
10642
10643 * varobj.c (varobj_clear_saved_item)
10644 (update_dynamic_varobj_children, install_new_value, ~varobj):
10645 Update.
10646 * value.h (value_incref): Move declaration earlier.
10647 (value_decref): Rename from value_free.
10648 (struct value_ref_policy): New.
10649 (value_ref_ptr): New typedef.
10650 (struct value_deleter): Remove.
10651 (gdb_value_up): Remove typedef.
10652 (release_value): Change return type.
10653 (release_value_or_incref): Remove.
10654 * value.c (set_value_parent): Update.
10655 (value_incref): Change return type.
10656 (value_decref): Rename from value_free.
10657 (value_free_to_mark, free_all_values, free_value_chain): Update.
10658 (release_value): Return value_ref_ptr.
10659 (release_value_or_incref): Remove.
10660 (record_latest_value, set_internalvar, clear_internalvar):
10661 Update.
10662 * stack.c (info_frame_command): Don't call value_free.
10663 * python/py-value.c (valpy_dealloc, valpy_new)
10664 (value_to_value_object): Update.
10665 * printcmd.c (do_examine): Update.
10666 * opencl-lang.c (lval_func_free_closure): Update.
10667 * mi/mi-main.c (register_changed_p): Don't call value_free.
10668 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10669 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10670 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10671 value_free.
10672 * guile/scm-value.c (vlscm_free_value_smob)
10673 (vlscm_scm_from_value): Update.
10674 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10675 (frame_unwind_register_unsigned, get_frame_register_bytes)
10676 (put_frame_register_bytes): Don't call value_free.
10677 * findvar.c (address_from_register): Don't call value_free.
10678 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10679 * dwarf2loc.c (entry_data_value_free_closure)
10680 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10681 (dwarf2_evaluate_loc_desc_full): Update.
10682 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10683 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10684 (~watchpoint, watch_command_1)
10685 (invalidate_bp_value_on_memory_change): Update.
10686 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10687
10688 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10689
10690 PR gdb/23022
10691 * warning.m4: Add -Wno-error=deprecated-register.
10692 * configure: Re-generate.
10693
10694 2018-04-05 Tom Tromey <tom@tromey.com>
10695
10696 * linespec.h: Remove include of "vec.h".
10697
10698 2018-04-05 Tom Tromey <tom@tromey.com>
10699
10700 * linespec.c (typep): Remove typedef.
10701 (find_methods, find_superclass_methods): Take a std::vector.
10702 (find_method): Use std::vector.
10703
10704 2018-04-05 Tom Tromey <tom@tromey.com>
10705
10706 * utils.c (compare_strings): Remove.
10707 * utils.h (compare_strings): Remove.
10708 * objc-lang.h (find_imps): Update.
10709 * objc-lang.c (find_methods): Take a std::vector.
10710 (uniquify_strings, find_imps): Likewise.
10711 * linespec.c (find_methods): Take a std::vector.
10712 (decode_objc): Use std::vector.
10713 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10714 a std::vector.
10715 (find_method, find_function_symbols): Use std::vector.
10716
10717 2018-04-05 Tom Tromey <tom@tromey.com>
10718
10719 * completer.c (completion_tracker::completion_tracker): Remove
10720 cast.
10721 (completion_tracker::discard_completions): Likewise.
10722 * breakpoint.c (ambiguous_names_p): Remove cast.
10723 * ada-lang.c (_initialize_ada_language): Remove cast.
10724 * utils.h (streq): Update.
10725 (streq_hash): Add new declaration.
10726 * utils.c (streq): Return bool.
10727 (streq_hash): New function.
10728
10729 2018-04-05 Tom Tromey <tom@tromey.com>
10730
10731 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10732 Remove a string copy.
10733
10734 2018-04-05 Tom Tromey <tom@tromey.com>
10735
10736 * linespec.c (filter_results): Use std::vector.
10737 (decode_line_2, decode_line_full): Update.
10738
10739 2018-04-05 Tom Tromey <tom@tromey.com>
10740
10741 * linespec.c (canonical_to_fullform): Return std::string.
10742 (filter_results): Update.
10743 (struct decode_line_2_item): Add constructor.
10744 <fullform, displayform>: Now std::string.
10745 (decode_line_2_compare_items): Now a std::sort comparator.
10746 (decode_line_2): Update.
10747
10748 2018-04-05 Tom Tromey <tom@tromey.com>
10749
10750 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10751 (unexpected_linespec_error): Update.
10752 (linespec_parse_basic, parse_linespec): Update.
10753
10754 2018-04-05 Tom Tromey <tom@tromey.com>
10755
10756 * linespec.c (linespec_parse_basic): Reindent.
10757
10758 2018-04-05 Tom Tromey <tom@tromey.com>
10759
10760 * minsyms.h (iterate_over_minimal_symbols): Update.
10761 * minsyms.c (iterate_over_minimal_symbols): Take a
10762 gdb::function_view.
10763 * linespec.c (struct collect_minsyms): Remove.
10764 (compare_msyms): Now a std::sort comparator.
10765 (add_minsym): Add parameters.
10766 (search_minsyms_for_name): Update. Use std::vector.
10767
10768 2018-04-03 Tom Tromey <tom@tromey.com>
10769
10770 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10771 gdb::byte_vector.
10772
10773 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10774
10775 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10776
10777 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10778
10779 PR gdb/16959
10780 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10781 printing static type.
10782
10783 2018-04-01 Tom Tromey <tom@tromey.com>
10784
10785 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10786 (rs6000_xfer_shared_libraries): Update.
10787
10788 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10789
10790 * common/gdb_vecs.h (char_ptr): Remove.
10791 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10792
10793 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10794
10795 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10796 with std::vector.
10797 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10798
10799 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10800
10801 * tracepoint.h (struct uploaded_tp): Initialize fields.
10802 <actions, step_actions, cmd_strings>: Change type to
10803 std::vector<char *>.
10804 * tracepoint.c (get_uploaded_tp): Allocate with new.
10805 (free_uploaded_tps): Free with delete.
10806 (parse_tracepoint_definition): Adjust to std::vector change.
10807 * breakpoint.c (read_uploaded_action): Likewise.
10808 (create_tracepoint_from_upload): Likewise.
10809 * ctf.c (ctf_write_uploaded_tp): Likewise.
10810 (SET_ARRAY_FIELD): Likewise.
10811 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10812
10813 2018-03-30 Tom Tromey <tom@tromey.com>
10814
10815 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10816 std::unique_ptr.
10817 (svr4_keep_data_in_core): Update.
10818 (svr4_read_so_list): Update.
10819
10820 2018-03-30 Tom Tromey <tom@tromey.com>
10821
10822 * windows-nat.c (handle_output_debug_string, handle_exception):
10823 Update.
10824 * target.h (target_read_string): Update.
10825 * target.c (target_read_string): Change "string" to
10826 unique_xmalloc_ptr.
10827 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10828 Update.
10829 * solib-frv.c (frv_current_sos): Update.
10830 * solib-dsbt.c (dsbt_current_sos): Update.
10831 * solib-darwin.c (darwin_current_sos): Update.
10832 * linux-thread-db.c (inferior_has_bug): Update.
10833 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10834 Update. Remove alloca.
10835 * ada-lang.c (ada_main_name): Update.
10836
10837 2018-03-30 Tom Tromey <tom@tromey.com>
10838
10839 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10840 (struct dwo_file_deleter): New.
10841 (dwo_file_up): New typedef.
10842 (open_and_init_dwo_file): Use dwo_file_up.
10843 (free_dwo_file_cleanup): Remove.
10844
10845 2018-03-30 Tom Tromey <tom@tromey.com>
10846
10847 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10848 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10849
10850 2018-03-30 Tom Tromey <tom@tromey.com>
10851
10852 * dwarf2read.c (class free_cached_comp_units): New class.
10853 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10854 (free_cached_comp_units): Remove function.
10855
10856 2018-03-30 Tom Tromey <tom@tromey.com>
10857
10858 * utils.h (make_cleanup_unpush_target): Remove.
10859 * inf-ptrace.c (struct target_unpusher): New.
10860 (target_unpush_up) New typedef.
10861 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10862 target_unpush_up.
10863 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10864
10865 2018-03-27 Tom Tromey <tom@tromey.com>
10866
10867 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10868
10869 2018-03-27 Pedro Alves <palves@redhat.com>
10870 Tom Tromey <tom@tromey.com>
10871
10872 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10873 destructor. Now a class.
10874 (gdb_readline_wrapper_cleanup): Remove function.
10875 (gdb_readline_wrapper): Remove cleanups.
10876
10877 2018-03-27 Tom Tromey <tom@tromey.com>
10878
10879 * typeprint.h (struct type_print_options) <local_typedefs,
10880 global_typedefs>: Remove "struct" keyword.
10881 (class typedef_hash_table): New class.
10882 (recursively_update_typedef_hash, add_template_parameters)
10883 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10884 (find_typedef_in_hash): Don't declare.
10885 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10886 (typedef_hash_table::recursively_update): Rename from
10887 recursively_update_typedef_hash. Now a member.
10888 (typedef_hash_table::add_template_parameters): Rename from
10889 add_template_parameters. Now a member.
10890 (typedef_hash_table::typedef_hash_table): Now a constructor;
10891 rename from create_typedef_hash.
10892 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10893 rename from free_typedef_hash.
10894 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10895 (do_free_global_table): Remove.
10896 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10897 from copy_type_recursive.
10898 (create_global_typedef_table): Remove.
10899 (typedef_hash_table::find_global_typedef): Now a member of
10900 typedef_hash_table.
10901 (typedef_hash_table::find_typedef): Rename from
10902 find_typedef_in_hash; now a member.
10903 (whatis_exp): Update.
10904 * extension.h (struct ext_lang_type_printers): Add constructor and
10905 destructor.
10906 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10907 declare.
10908 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10909 Now a constructor; rename from start_ext_lang_type_printers.
10910 (ext_lang_type_printers): Now a destructor; rename from
10911 free_ext_lang_type_printers.
10912 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10913 Update.
10914 (c_type_print_base_struct_union): Update. Remove cleanups.
10915
10916 2018-03-27 Tom Tromey <tom@tromey.com>
10917
10918 * dwarf-index-write.c: Include <cmath>.
10919
10920 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10921
10922 * NEWS: Add entry describing new "set|show varsize-limit" command.
10923 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10924 command.
10925 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10926 "set variable".
10927
10928 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10929
10930 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10931 dwarf-index-write.c
10932 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10933 * dwarf-index-common.c: New file.
10934 * dwarf-index-common.h: New file.
10935 * dwarf-index-write.c: New file.
10936 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10937 (struct dwarf2_section_info): Move from here.
10938 (dwarf2_section_info_def): Likewise.
10939 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10940 (offset_type): Likewise.
10941 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10942 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10943 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10944 (byte_swap): Likewise.
10945 (MAYBE_SWAP): Likewise.
10946 (dwarf2_per_cu_ptr): Likewise.
10947 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10948 (struct tu_stats): Likewise.
10949 (struct dwarf2_per_objfile): Likewise.
10950 (struct dwarf2_per_cu_data): Likewise.
10951 (struct signatured_type): Likewise.
10952 (sig_type_ptr): Likewise.
10953 (DEF_VEC_P (sig_type_ptr)): Likewise.
10954 (INDEX4_SUFFIX): Likewise.
10955 (INDEX5_SUFFIX): Likewise.
10956 (DEBUG_STR_SUFFIX): Likewise.
10957 (dwarf2_read_section): Make non-static.
10958 (mapped_index_string_hash): Move from here.
10959 (dwarf5_djb_hash): Likewise.
10960 (file_write): Likewise.
10961 (class data_buf): Likewise.
10962 (struct symtab_index_entry): Likewise.
10963 (struct mapped_symtab): Likewise.
10964 (find_slot): Likewise.
10965 (hash_expand): Likewise.
10966 (add_index_entry): Likewise.
10967 (uniquify_cu_indices): Likewise.
10968 (class c_str_view): Likewise.
10969 (class c_str_view_hasher): Likewise.
10970 (class vector_hasher): Likewise.
10971 (write_hash_table): Likewise.
10972 (psym_index_map): Likewise.
10973 (struct addrmap_index_data): Likewise.
10974 (add_address_entry): Likewise.
10975 (add_address_entry_worker): Likewise.
10976 (write_address_map): Likewise.
10977 (symbol_kind): Likewise.
10978 (write_psymbols): Likewise.
10979 (struct signatured_type_index_data): Likewise.
10980 (write_one_signatured_type): Likewise.
10981 (recursively_count_psymbols): Likewise.
10982 (recursively_write_psymbols): Likewise.
10983 (class debug_names): Likewise.
10984 (check_dwarf64_offsets): Likewise.
10985 (psyms_seen_size): Likewise.
10986 (write_gdbindex): Likewise.
10987 (write_debug_names): Likewise.
10988 (assert_file_size): Likewise.
10989 (write_psymtabs_to_index): Likewise.
10990 (save_gdb_index_command): Likewise.
10991 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10992 command.
10993 * dwarf2read.h: New file.
10994
10995 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10996
10997 PR gdb/22670
10998 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10999 symbol name if the CU's language stores symbol names in linkage
11000 format.
11001 * language.h (struct language_defn)
11002 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11003 all instances of this struct.
11004
11005 2018-03-26 Tom Tromey <tom@tromey.com>
11006
11007 * stack.c (backtrace_command_1): Remove verbose code.
11008
11009 2018-03-26 Tom Tromey <tom@tromey.com>
11010
11011 * python/py-framefilter.c (py_print_type): Don't catch
11012 exceptions. Return void.
11013 (py_print_value): Likewise.
11014 (py_print_single_arg): Likewise.
11015 (enumerate_args): Don't catch exceptions.
11016 (py_print_args): Likewise.
11017 (py_print_frame): Likewise.
11018 (gdbpy_apply_frame_filter): Catch exceptions here.
11019
11020 2018-03-26 Tom Tromey <tom@tromey.com>
11021
11022 * stack.c (_initialize_stack): Remove trailing newlines from help
11023 text. Add "Usage" line to "backtrace" help.
11024
11025 2018-03-26 Tom Tromey <tom@tromey.com>
11026
11027 PR python/16486:
11028 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11029
11030 2018-03-26 Tom Tromey <tom@tromey.com>
11031
11032 * python/py-framefilter.c (py_print_single_arg): Return
11033 EXT_LANG_BT_ERROR from catch.
11034
11035 2018-03-26 Tom Tromey <tom@tromey.com>
11036
11037 PR backtrace/15584:
11038 * stack.c (backtrace_command_1): Move some code into no-filters
11039 "if".
11040
11041 2018-03-26 Tom Tromey <tom@tromey.com>
11042
11043 * python/py-framefilter.c (throw_quit_or_print_exception): New
11044 function.
11045 (gdbpy_apply_frame_filter): Use it.
11046
11047 2018-03-26 Tom Tromey <tom@tromey.com>
11048
11049 PR cli/17716:
11050 * python/py-framefilter.c (py_print_type, py_print_value)
11051 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11052 RETURN_MASK_ERROR.
11053
11054 2018-03-26 Tom Tromey <tom@tromey.com>
11055
11056 * python/py-framefilter.c (enumerate_args): Use
11057 gdb::unique_xmalloc_ptr.
11058
11059 2018-03-26 Tom Tromey <tom@tromey.com>
11060
11061 * python/py-framefilter.c (py_print_frame): Return
11062 EXT_LANG_BT_OK.
11063 (gdbpy_apply_frame_filter): Update comment.
11064 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11065 Remove.
11066 <EXT_LANG_BT_NO_FILTERS>: Change value.
11067
11068 2018-03-26 Tom Tromey <tom@tromey.com>
11069
11070 PR backtrace/15582:
11071 * stack.c (backtrace_command): Parse "hide" argument.
11072 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11073 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11074 constant.
11075
11076 2018-03-26 Tom Tromey <tom@tromey.com>
11077
11078 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11079 add "flags".
11080 (backtrace_command): Remove "fulltrace", add "flags".
11081
11082 2018-03-26 Tom Tromey <tom@tromey.com>
11083
11084 * stack.c (backtrace_command): Rewrite command line parsing.
11085
11086 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11087
11088 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11089
11090 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11091
11092 * filename-seen-cache.h: Add include guard.
11093
11094 2018-03-26 Keith Seitz <keiths@redhat.com>
11095
11096 * symfile.c (place_section): Remove "struct" from section_addr_info
11097 in comment.
11098 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11099 "struct" keyword from section_addr_info.
11100
11101 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11102
11103 * regformats/regdef.h (reg): Add constructors.
11104
11105 2018-03-25 Pedro Alves <palves@redhat.com>
11106
11107 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11108 if then/else bodies in var_func_name extraction.
11109
11110 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11111
11112 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11113 lookup_minimal_symbol() to find symbol entry.
11114 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11115
11116 2018-03-23 Keith Seitz <keiths@redhat.com>
11117
11118 PR c++/22968
11119 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11120 nested type definitions for C++, too.
11121
11122 2018-03-23 Tom Tromey <tom@tromey.com>
11123
11124 * machoread.c (struct oso_el): Add a constructor. Don't define as
11125 a typedef.
11126 (macho_register_oso): Remove.
11127 (macho_symtab_read): Take a std::vector.
11128 (oso_el_compare_name): Now a std::sort comparator.
11129 (macho_symfile_read_all_oso): Take a std::vector.
11130 (macho_symfile_read): Use std::vector. Remove cleanups.
11131
11132 2018-03-22 Tom Tromey <tom@tromey.com>
11133
11134 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11135 (record_full_goto_bookmark): Use std::string.
11136
11137 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11138
11139 PR tdep/18295
11140 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11141 a single mask.
11142
11143 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11144
11145 * rs6000-tdep.c (store_insn_p): New function.
11146 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11147 and cr_reg to their unshifted values. Use store_insn_p to
11148 match LR saves using either R1 or fdata->alloca_reg. Use
11149 store_insn_p to match CR saves. Set alloca_reg_offset
11150 when alloca_reg and framep are set. Remove lr_reg shift
11151 when assigning to fdata->lr_register.
11152
11153 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11154
11155 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11156 command line args instead of emitting a warning.
11157
11158 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11159
11160 * tracepoint.h (struct static_tracepoint_marker): Initialize
11161 fields, define default constructor, move constructor and move
11162 assignment, disable the rest.
11163 <str_id, extra>: Make std::string.
11164 (release_static_tracepoint_marker): Remove.
11165 (free_current_marker): Remove.
11166 * tracepoint.c (free_current_marker): Remove.
11167 (parse_static_tracepoint_marker_definition): Adjust to
11168 std::string, use new hex2str overload.
11169 (release_static_tracepoint_marker): Remove.
11170 (print_one_static_tracepoint_marker): Get marker by reference
11171 and adjust to std::string.
11172 (info_static_tracepoint_markers_command): Adjust to std::vector
11173 changes
11174 * target.h (static_tracepoint_marker_p): Remove typedef.
11175 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11176 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11177 bool.
11178 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11179 * target-debug.h
11180 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11181 (target_debug_print_std_vector_static_tracepoint_marker): New.
11182 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11183 to...
11184 (target_debug_print_static_tracepoint_marker_p): ... this.
11185 * target-delegates.c: Re-generate.
11186 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11187 Make std::string.
11188 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11189 (decode_static_tracepoint_spec): Adjust to std::vector.
11190 (tracepoint_print_one_detail): Adjust to std::string.
11191 (strace_marker_decode_location): Adjust to std::string.
11192 (update_static_tracepoint): Adjust to std::string, remove call
11193 to release_static_tracepoint_marker.
11194 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11195 Adjust to std::vector.
11196 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11197 (remote_static_tracepoint_markers_by_strid): Adjust to
11198 std::vector.
11199 * common/rsp-low.h (hex2str): New overload with explicit count
11200 of bytes.
11201 * common/rsp-low.c (hex2str): New overload with explicit count
11202 of bytes.
11203 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11204 (_initialize_rsp_low_selftests): Add test_hex2str test.
11205 * unittests/tracepoint-selftests.c
11206 (test_parse_static_tracepoint_marker_definition): Adjust to
11207 std::string.
11208
11209 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11210
11211 * tracepoint.c (parse_static_tracepoint_marker_definition):
11212 Consider case where the definition is followed by more
11213 definitions.
11214 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11215 tracepoint-selftests.c.
11216 * unittests/tracepoint-selftests.c: New.
11217
11218 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11219
11220 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11221 Carvalho.
11222
11223 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11224
11225 * symtab.c (find_pc_sect_line): fixed indentation.
11226
11227 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11228
11229 * symtab.c (find_pc_sect_line): now uses binary search.
11230
11231 2018-03-19 Tom Tromey <tom@tromey.com>
11232
11233 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11234 "IDENT" production.
11235
11236 2018-03-19 Pedro Alves <palves@redhat.com>
11237 Tom Tromey <tom@tromey.com>
11238
11239 * unittests/observable-selftests.c: New file.
11240 * common/observable.h: New file.
11241 * observable.h: New file.
11242 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11243 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11244 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11245 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11246 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11247 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11248 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11249 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11250 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11251 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11252 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11253 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11254 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11255 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11256 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11257 tui/tui-interp.c, valops.c: Update all users.
11258 * tui/tui-hooks.c (tui_bp_created_observer)
11259 (tui_bp_deleted_observer, tui_bp_modified_observer)
11260 (tui_inferior_exit_observer, tui_before_prompt_observer)
11261 (tui_normal_stop_observer, tui_register_changed_observer):
11262 Remove.
11263 (tui_observers_token): New global.
11264 (attach_or_detach, tui_attach_detach_observers): New functions.
11265 (tui_install_hooks, tui_remove_hooks): Use
11266 tui_attach_detach_observers.
11267 * record-btrace.c (record_btrace_thread_observer): Remove.
11268 (record_btrace_thread_observer_token): New global.
11269 * observer.sh: Remove.
11270 * observer.c: Rename to observable.c.
11271 * observable.c (namespace gdb_observers): Define new objects.
11272 (observer_debug): Move into gdb_observers namespace.
11273 (struct observer, struct observer_list, xalloc_observer_list_node)
11274 (xfree_observer_list_node, generic_observer_attach)
11275 (generic_observer_detach, generic_observer_notify): Remove.
11276 (_initialize_observer): Update.
11277 Don't include observer.inc.
11278 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11279 (clean mostlyclean): Likewise.
11280 (observer.h, observer.inc): Remove targets.
11281 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11282 (COMMON_SFILES): Use observable.c, not observer.c.
11283 * .gitignore: Remove observer.h.
11284
11285 2018-03-18 Tom Tromey <tom@tromey.com>
11286
11287 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11288 gdb::def_vector.
11289 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11290
11291 2018-03-17 Tom Tromey <tom@tromey.com>
11292
11293 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11294
11295 2018-03-17 Tom Tromey <tom@tromey.com>
11296
11297 * target.c (class scoped_target_fd): New.
11298 (target_fileio_close_cleanup): Remove.
11299 (target_fileio_read_alloc_1): Use scoped_target_fd.
11300
11301 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11302
11303 * silent-rules.mk: New.
11304 * Makefile.in: Include silent-rules.mk
11305 (srcdir, VPATH, top_srcdir): Move up.
11306 (COMPILE): Add ECHO_CXX.
11307 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11308 (init.c): Add ECHO_INIT_C.
11309 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11310 (version.c): Add ECHO_GEN.
11311 (printcmd.o): Add ECHO_CXX.
11312 (target-float.o): Add ECHO_CXX.
11313 (ada-exp.o): Add ECHO_CXX.
11314 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11315 (insight$(EXEEXT)): Add ECHO_CXXLD.
11316 * gnulib/configure.ac: Add AM_SILENT_RULES.
11317 * gnulib/aclocal.m4: Re-generate.
11318 * gnulib/configure: Re-generate.
11319 * gnulib/import/Makefile.in: Re-generate.
11320
11321 2018-03-16 Tom Tromey <tom@tromey.com>
11322
11323 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11324 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11325 * utils.c (do_free_section_addr_info)
11326 (make_cleanup_free_section_addr_info): Remove.
11327 * symfile.h (struct other_sections): Add constructor.
11328 (struct section_addr_info): Remove.
11329 (section_addr_info): New typedef.
11330 (struct sym_fns) <sym_offsets>: Change type of parameter.
11331 (build_section_addr_info_from_objfile)
11332 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11333 (default_symfile_offsets, symbol_file_add)
11334 (symbol_file_add_from_bfd)
11335 (build_section_addr_info_from_section_table): Update.
11336 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11337 * symfile.c (alloc_section_addr_info): Remove.
11338 (build_section_addr_info_from_section_table): Change return type.
11339 Update.
11340 (build_section_addr_info_from_bfd)
11341 (build_section_addr_info_from_objfile): Likewise.
11342 (free_section_addr_info): Remove.
11343 (relative_addr_info_to_section_offsets): Change type of "addrs".
11344 (addrs_section_compar): Now a std::sort comparator.
11345 (addrs_section_sort): Change return type.
11346 (addr_info_make_relative): Change type of "addrs". Update.
11347 (default_symfile_offsets, syms_from_objfile_1)
11348 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11349 (symbol_file_add_separate): Update.
11350 (symbol_file_add): Change type of "addrs". Update.
11351 (add_symbol_file_command): Update. Remove cleanups.
11352 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11353 cleanups.
11354 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11355 * solib.c (solib_read_symbols): Update.
11356 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11357 * machoread.c (macho_symfile_offsets): Update.
11358 * jit.c (jit_bfd_try_read_symtab): Update.
11359
11360 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11361
11362 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11363 unittests/utils-selftests.c.
11364 * unittests/utils-selftests.c: New file.
11365
11366 2018-03-14 Tom Tromey <tom@tromey.com>
11367
11368 PR cli/14977:
11369 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11370 for NULL.
11371
11372 2018-03-14 Tom Tromey <tom@tromey.com>
11373
11374 PR cli/19918:
11375 * printcmd.c (printf_pointer): Allow "-" in format.
11376
11377 2018-03-14 Tom Tromey <tom@tromey.com>
11378
11379 * printcmd.c (_initialize_printcmd): Add usage to printf.
11380
11381 2018-03-14 Yao Qi <qiyao@sourceware.org>
11382
11383 * MAINTAINERS: Update my email address.
11384
11385 2018-03-13 Tom Tromey <tom@tromey.com>
11386
11387 * machoread.c (macho_check_dsym): Change filenamep to a
11388 std::string*.
11389 (macho_symfile_read): Update.
11390 * symfile.c (load_command): Use std::string.
11391
11392 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11393
11394 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11395 to error message string.
11396 (riscv_register_name): Use xsnprintf instead of sprintf.
11397 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11398 internal_error.
11399 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11400 error.
11401 (riscv_push_dummy_call): Likewise.
11402
11403 2018-03-12 Tom Tromey <tom@tromey.com>
11404
11405 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11406 Use gdb::byte_vector.
11407 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11408
11409 2018-03-12 Yao Qi <yao.qi@linaro.org>
11410
11411 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11412 parameter type to readable_regcache.
11413 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11414 the declaration.
11415
11416 2018-03-11 Tom Tromey <tom@tromey.com>
11417
11418 * dwarf2read.c (struct nextfield): Add initializers.
11419 (struct nextfnfield): Remove.
11420 (struct fnfieldlist): Add initializers. Remove "length" and
11421 "head", use std::vector.
11422 (struct decl_field_list): Remove.
11423 (struct field_info): Add initializers.
11424 <fields, baseclasses>: Now std::vector.
11425 <nbaseclasses, nfnfields, typedef_field_list_count,
11426 nested_types_list_count>: Remove.
11427 (dwarf2_add_field, dwarf2_add_type_defn)
11428 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11429 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11430 (process_structure_scope): Update.
11431
11432 2018-03-11 Tom Tromey <tom@tromey.com>
11433
11434 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11435 for use by std::sort.
11436 (build_type_psymtabs_1): Use std::vector.
11437
11438 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11439
11440 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11441 and LIBMPFR in the printed configuration.
11442
11443 2018-03-08 Tom Tromey <tom@tromey.com>
11444
11445 * source.c (get_filename_and_charpos): Use scoped_fd.
11446 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11447 (procfs_pidlist): Likewise.
11448 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11449 (iterate_over_mappings): Likewise.
11450
11451 2018-03-08 Tom Tromey <tom@tromey.com>
11452
11453 * infcall.c (struct call_return_meta_info)
11454 <stack_temporaries_enabled>: Remove.
11455 (get_call_return_value, call_function_by_hand_dummy): Update.
11456 * thread.c (disable_thread_stack_temporaries): Remove.
11457 (enable_thread_stack_temporaries): Remove.
11458 (thread_stack_temporaries_enabled_p): Return bool.
11459 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11460 (get_last_thread_stack_temporary): Update.
11461 * eval.c (evaluate_subexp): Update.
11462 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11463 class, not a function.
11464 (value_ptr, value_vec): Remove typedefs.
11465 (class thread_info) <stack_temporaries_enabled>: Now bool.
11466 <stack_temporaries>: Now a std::vector.
11467 (thread_stack_temporaries_enabled_p)
11468 (value_in_thread_stack_temporaries): Return bool.
11469
11470 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11471
11472 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11473 (getpkt_or_notif_sane_1): Likewise.
11474
11475 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11476
11477 * build-id.c (build_id_to_debug_bfd): Use std::string.
11478
11479 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11480
11481 * build-id.c (find_separate_debug_file_by_buildid): Return
11482 std::string.
11483 * build-id.h (find_separate_debug_file_by_buildid): Return
11484 std::string.
11485 * coffread.c (coff_symfile_read): Adjust to std::string.
11486 * elfread.c (elf_symfile_read): Adjust to std::string.
11487 * symfile.c (separate_debug_file_exists): Change parameter to
11488 std::string.
11489 (find_separate_debug_file): Return std::string.
11490 (find_separate_debug_file_by_debuglink): Return std::string.
11491 * symfile.h (find_separate_debug_file_by_debuglink): Return
11492 std::string.
11493
11494 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11495
11496 * common/xml-utils.c (xml_escape_text): Move code to...
11497 (xml_escape_text_append): ... this new function.
11498 * common/xml-utils.h (xml_escape_text_append): New declaration.
11499 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11500 New function.
11501 (_initialize_xml_utils): register test_xml_escape_text_append as
11502 a selftest.
11503
11504 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11505
11506 * defs.h: Remove MAX_REGISTER_SIZE.
11507 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11508 asserts.
11509 * python/py-unwind.c (pyuw_sniffer): Likewise.
11510
11511 2018-03-07 Tom Tromey <tom@tromey.com>
11512
11513 * linux-tdep.c (linux_info_proc): Update.
11514 * target.h (struct target_ops) <to_fileio_readlink>: Return
11515 optional<string>.
11516 (target_fileio_readlink): Return optional<string>.
11517 * remote.c (remote_hostio_readlink): Return optional<string>.
11518 * inf-child.c (inf_child_fileio_readlink): Return
11519 optional<string>.
11520 * target.c (target_fileio_readlink): Return optional<string>.
11521
11522 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11523
11524 * regcache.c (cooked_read_test): Add riscv to the list of
11525 architectures that have a save_reggroup.
11526
11527 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11528
11529 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11530 value is not a dynamic class object.
11531
11532 2018-03-06 Tom Tromey <tom@tromey.com>
11533
11534 * rust-exp.y: Formatting fixes.
11535
11536 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11537
11538 * riscv-tdep.c (riscv_register_name): Remove target description
11539 support.
11540 (riscv_gdbarch_init): Remove target description check.
11541
11542 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11543
11544 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11545 comment.
11546 * riscv-tdep.h: Likewise.
11547
11548 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11549
11550 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11551 (riscv_pseudo_register_write): Delete.
11552 (riscv_gdbarch_init): Remove all use of pseudo registers.
11553
11554 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11555
11556 * record-btrace.c (btrace_print_lines): Replace cleanup
11557 parameter with RAII equivalents.
11558 (btrace_insn_history): Replace cleanup with RAII equivalents.
11559 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11560 make_cleanup_ui_out_tuple_begin_end): Remove.
11561 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11562 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11563 make_cleanup_ui_out_list_begin_end): Remove.
11564
11565 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11566
11567 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11568 parameter types to std::vector. Use bool.
11569 (record_btrace_wait): Replace VEC(tp_t) with
11570 std::vector<thread_info *>.
11571 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11572
11573 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11574
11575 * record-btrace.c (record_btrace_disable_callback): Remove.
11576 (struct scoped_btrace_disable): New.
11577 (record_btrace_open): Use scoped_btrace_disable.
11578
11579 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11580
11581 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11582 reading values from registers.
11583
11584 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11585
11586 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11587 where appropriate.
11588
11589 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11590
11591 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11592 change parameter type. Use GDB's print functions, and use
11593 core_addr_to_string where appropriate.
11594 (riscv_push_dummy_call): Use core_addr_to_string where
11595 appropriate, update call to riscv_print_arg_location, and reindent
11596 a few lines.
11597 (riscv_return_value): Update call to riscv_print_arg_location.
11598
11599 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11600 Tim Newsome <tim@sifive.com>
11601 Albert Ou <a0u@eecs.berkeley.edu>
11602 Darius Rad <darius@bluespec.com>
11603
11604 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11605 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11606 (ALLDEPFILES): Add riscv-tdep.c
11607 * configure.tgt: Add riscv support.
11608 * riscv-tdep.c: New file.
11609 * riscv-tdep.h: New file.
11610 * NEWS: Mention new target.
11611 * MAINTAINERS: Add entry for riscv.
11612
11613 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11614
11615 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11616 fields within aggregates.
11617
11618 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11619
11620 * record-btrace.c (btrace_print_lines): Change type of flags to
11621 gdb_disassembly_flags.
11622
11623 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11624
11625 * fbsd-nat.c: Include "inf-ptrace.h".
11626 (USE_SIGTRAP_SIGINFO): Conditionally define.
11627 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11628 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11629 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11630 function.
11631 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11632 Likewise.
11633 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11634 Likewise.
11635 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11636 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11637 "supports_stopped_by_hw_breakpoint" target methods.
11638
11639 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11640
11641 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11642 * fbsd-nat.c (debug_fbsd_nat): New variable.
11643 (show_fbsd_nat_debug): New function.
11644 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11645 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11646
11647 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11648
11649 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11650 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11651 prototype.
11652 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11653 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11654 method.
11655
11656 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11657
11658 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11659 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11660
11661 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11662
11663 * charset.c (struct charset_vector): New.
11664 (charsets): Change type to charset_vector.
11665 (find_charset_names): Adjust.
11666 (add_one): Adjust.
11667 (_initialize_charset): Adjust.
11668
11669 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11670
11671 * progspace.h (struct program_space) <deleted_solibs>: Change
11672 type to std::vector<std::string>.
11673 * progspace.c (clear_program_space_solib_cache): Adjust.
11674 * breakpoint.c (print_solib_event): Adjust.
11675 (check_status_catch_solib): Adjust.
11676 * solib.c (update_solib_list): Adjust.
11677 * ui-out.h (class ui_out) <field_string>: New overload.
11678 * ui-out.c (ui_out::field_string): New overload.
11679
11680 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11681
11682 * progspace.h (struct program_space): Add constructor and
11683 destructor, initialize fields.
11684 (add_program_space): Remove.
11685 * progspace.c (add_program_space): Rename to...
11686 (program_space::program_space): ... this.
11687 (release_program_space): Rename to...
11688 (program_space::~program_space): ... this.
11689 (delete_program_space): Use delete to delete program_space.
11690 (initialize_progspace): Use new to allocate program_space.
11691 * inferior.c (add_inferior_with_spaces): Likewise.
11692 (clone_inferior_command): Likewise.
11693 * infrun.c (follow_fork_inferior): Likewise.
11694 (handle_vfork_child_exec_or_exit): Likewise.
11695
11696 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11697
11698 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11699 (delim_string_to_char_ptr_vec): Return std::vector of
11700 gdb::unique_xmalloc_ptr.
11701 (dirnames_to_char_ptr_vec_append): Take std::vector of
11702 gdb::unique_xmalloc_ptr.
11703 (dirnames_to_char_ptr_vec): Return std::vector of
11704 gdb::unique_xmalloc_ptr.
11705 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11706 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11707 (delim_string_to_char_ptr_vec): Return an std::vector of
11708 gdb::unique_xmalloc_ptr, adjust the code.
11709 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11710 gdb::unique_xmalloc_ptr, adjust the code.
11711 (dirnames_to_char_ptr_vec): Return an std::vector of
11712 gdb::unique_xmalloc_ptr, adjust the code.
11713 * auto-load.c (auto_load_safe_path_vec): Change type to
11714 std::vector of gdb::unique_xmalloc_ptr.
11715 (auto_load_expand_dir_vars): Return an std::vector of
11716 gdb::unique_xmalloc_ptr, adjust the code.
11717 (auto_load_safe_path_vec_update): Adjust.
11718 (filename_is_in_auto_load_safe_path_vec): Adjust.
11719 (auto_load_objfile_script_1): Adjust.
11720 * build-id.c (build_id_to_debug_bfd): Adjust.
11721 * linux-thread-db.c (thread_db_load_search): Adjust.
11722 * source.c (add_path): Adjust.
11723 (openp): Adjust.
11724 * symfile.c (find_separate_debug_file): Adjust.
11725 * utils.c (do_free_char_ptr_vec): Remove.
11726 (make_cleanup_free_char_ptr_vec): Remove.
11727
11728 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11729
11730 PR gdb/22907
11731 * common/pathstuff.c: Conditionally include "<windows.h>".
11732
11733 2018-03-01 Georg Sauthoff <mail@georg.so>
11734
11735 PR gdb/22888
11736 * gcore.in: Quote variables and switch interpreter to bash.
11737
11738 2018-03-01 Tom Tromey <tom@tromey.com>
11739
11740 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11741 assertion. Add assertion for discriminant_index.
11742 (quirk_rust_enum): Use correct base type name in univariant case.
11743
11744 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11745
11746 * record.c (get_call_history_modifiers): Return a
11747 record_print_flags.
11748 (cmd_record_call_history): Adjust.
11749 * record-btrace.c (record_btrace_call_history): Adjust.
11750 (record_btrace_call_history_range): Adjust.
11751 (record_btrace_call_history_from): Adjust.
11752 * target-debug.h (target_debug_print_record_print_flags): New.
11753 * target-delegates.c: Re-generate.
11754 * target.c (target_call_history): Change flags type.
11755 (target_call_history_from): Likewise.
11756 (target_call_history_range): Likewise.
11757 * target.h (struct target_ops) <target_call_history>: Likewise.
11758 (target_call_history_from): Likewise.
11759 (target_call_history_range): Likewise.
11760
11761 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11762 Simon Marchi <simon.marchi@polymtl.ca>
11763
11764 * common/common-utils.c: Include "sys/stat.h".
11765 (is_regular_file): Move here from "source.c"; change return
11766 type to "bool".
11767 * common/common-utils.h (is_regular_file): New prototype.
11768 * common/pathstuff.c (contains_dir_separator): New function.
11769 * common/pathstuff.h (contains_dir_separator): New prototype.
11770 * source.c: Don't include "sys/stat.h".
11771 (is_regular_file): Move to "common/common-utils.c".
11772
11773 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11774
11775 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11776 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11777 * auto-load.c: Include "common/pathstuff.h".
11778 * common/common-def.h (current_directory): Move here.
11779 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11780 function.
11781 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11782 prototype.
11783 * common/pathstuff.c: New file.
11784 * common/pathstuff.h: New file.
11785 * compile/compile.c: Include "common/pathstuff.h".
11786 * defs.h (current_directory): Move to "common/common-defs.h".
11787 * dwarf2read.c: Include "common/pathstuff.h".
11788 * exec.c: Likewise.
11789 * guile/scm-safe-call.c: Likewise.
11790 * linux-thread-db.c: Likewise.
11791 * main.c: Likewise.
11792 * nto-tdep.c: Likewise.
11793 * objfiles.c: Likewise.
11794 * source.c: Likewise.
11795 * symtab.c: Likewise.
11796 * utils.c: Include "common/pathstuff.h".
11797 (gdb_realpath): Move to "common/pathstuff.c".
11798 (gdb_realpath_keepfile): Likewise.
11799 (gdb_abspath): Likewise.
11800 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11801 (gdb_realpath_keepfile): Likewise.
11802 (gdb_abspath): Likewise.
11803
11804 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11805
11806 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11807 wildcard process pid for super_resume for kernels with a
11808 specific bug.
11809
11810 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11811
11812 * compile/compile.c (get_args): Add additional comments
11813 explaining function.
11814
11815 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11816 Tom Tromey <tom@tromey.com>
11817
11818 * target.h (memory_write_request_s): Remove typedef. Don't define
11819 VEC.
11820 (target_write_memory_blocks): Change argument to std::vector.
11821 (struct memory_write_request): Add constructor.
11822 * target-memory.c (compare_block_starting_address): Return bool.
11823 Change argument types.
11824 (claim_memory): Change arguments to use std::vector.
11825 (split_regular_and_flash_blocks, blocks_to_erase)
11826 (compute_garbled_blocks): Likewise.
11827 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11828 (target_write_memory_blocks): Change argument to std::vector.
11829 * symfile.c (struct load_section_data): Add constructor and
11830 destructor. Use std::vector for "requests".
11831 (struct load_progress_data): Add initializers.
11832 (load_section_callback): Update. Use "new".
11833 (clear_memory_write_data): Remove.
11834 (generic_load): Update.
11835
11836 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11837
11838 * arch/aarch64.h: Use common/tdesc.h.
11839
11840 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11841
11842 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11843 architecture with a 64-bit ABI.
11844
11845 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11846
11847 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11848 ahead of target description loading.
11849
11850 2018-02-26 Tom Tromey <tom@tromey.com>
11851
11852 * stack.c (backtrace_command_1): Update.
11853 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11854 of "flags".
11855 * python/py-framefilter.c (py_print_frame)
11856 (gdbpy_apply_frame_filter): Change type of "flags".
11857 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11858 of "flags".
11859 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11860 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11861 * extension.h (enum frame_filter_flag): Rename from
11862 frame_filter_flags.
11863 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11864 (apply_ext_lang_frame_filter): Change type of "flags".
11865 * extension.c (apply_ext_lang_frame_filter): Change type of
11866 "flags".
11867 * extension-priv.h (struct extension_language_ops)
11868 <apply_frame_filter>: Change type of "flags".
11869
11870 2018-02-26 Tom Tromey <tom@tromey.com>
11871
11872 PR python/16497:
11873 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11874 off-by-one in py_end computation.
11875 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11876 PRINT_MORE_FRAMES.
11877 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11878 constant.
11879
11880 2018-02-26 Tom Tromey <tom@tromey.com>
11881
11882 * dwarf2read.c (struct variant_field): New.
11883 (struct nextfield) <variant>: New field.
11884 (dwarf2_add_field): Handle DW_TAG_variant_part.
11885 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11886 discriminated union.
11887 (read_structure_type): Handle DW_TAG_variant_part.
11888 (handle_struct_member_die): New function, extracted from
11889 process_structure_scope. Handle DW_TAG_variant.
11890 (process_structure_scope): Handle discriminated unions. Call
11891 handle_struct_member_die.
11892
11893 2018-02-26 Tom Tromey <tom@tromey.com>
11894
11895 * rust-lang.h (rust_last_path_segment): Declare.
11896 * rust-lang.c (rust_last_path_segment): Now public. Change
11897 contract.
11898 (struct disr_info): Remove.
11899 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11900 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11901 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11902 (rust_enum_p, rust_enum_variant): New function.
11903 (rust_underscore_fields): Remove "offset" parameter.
11904 (rust_print_enum): New function.
11905 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11906 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11907 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11908 enums.
11909 (rust_internal_print_type): New function, from rust_print_type.
11910 Remove enum code.
11911 (rust_print_type): Call rust_internal_print_type.
11912 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11913 Update enum handling.
11914 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11915 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11916 (rust_union_quirks): New functions.
11917 (process_full_comp_unit, process_full_type_unit): Call
11918 rust_union_quirks.
11919 (process_structure_scope): Update rust_unions if necessary.
11920
11921 2018-02-26 Tom Tromey <tom@tromey.com>
11922
11923 * value.h (value_union_variant): Declare.
11924 * valops.c (value_union_variant): New function.
11925 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11926 (struct discriminant_info): New.
11927 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11928 enumerator.
11929 (struct main_type) <flag_discriminated_union>: New field.
11930
11931 2018-02-26 Tom Tromey <tom@tromey.com>
11932
11933 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11934 unittests/unpack-selftests.c.
11935 * unittests/unpack-selftests.c: New file.
11936 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11937
11938 2018-02-26 Yao Qi <yao.qi@linaro.org>
11939
11940 * dwarf2read.c (struct partial_die_info) <read>: New method.
11941 (read_partial_die): Remove the declaration.
11942 (load_partial_dies): Update.
11943 (partial_die_info::partial_die_info):
11944 (read_partial_die): Change it to partial_die_info::read.
11945
11946 2018-02-26 Yao Qi <yao.qi@linaro.org>
11947
11948 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11949 (fixup_partial_die): Remove declaration.
11950 (scan_partial_symbols): Update.
11951 (partial_die_parent_scope): Likewise.
11952 (partial_die_full_name): Likewise.
11953 (fixup_partial_die): Change it to partial_die_info::fixup.
11954
11955 2018-02-26 Yao Qi <yao.qi@linaro.org>
11956
11957 * dwarf2read.c (read_partial_die): Update the declaration.
11958 (load_partial_dies): Caller update.
11959 (read_partial_die): Remove one argument abbrev_len.
11960
11961 2018-02-26 Yao Qi <yao.qi@linaro.org>
11962
11963 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11964 assignment operator.
11965 (load_partial_dies): Use ctor and copy ctor.
11966 (read_partial_die): Update.
11967 (dwarf2_cu::find_partial_die): Use ctor.
11968
11969 2018-02-26 Yao Qi <yao.qi@linaro.org>
11970
11971 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11972 (find_partial_die_in_comp_unit): Change it to
11973 dwarf2_cu::find_partial_die.
11974 (find_partial_die): Update.
11975
11976 2018-02-26 Yao Qi <yao.qi@linaro.org>
11977
11978 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11979 is NULL.
11980
11981 2018-02-26 Yao Qi <yao.qi@linaro.org>
11982
11983 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11984
11985 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11986
11987 * arch/amd64.h: Use common/tdesc.h.
11988 * arch/i386.c: Likewise.
11989 * arch/i386.h: Likewise.
11990 * arch/tic6x.c: Likewise.
11991 * arch/tdesc.h: Move file from here...
11992 * common/tdesc.h: ...to here.
11993 * features/aarch64-core.c: Regenerate.
11994 * features/aarch64-fpu.c: Regenerate.
11995 * features/i386/32bit-avx.c: Regenerate.
11996 * features/i386/32bit-avx512.c: Regenerate.
11997 * features/i386/32bit-core.c: Regenerate.
11998 * features/i386/32bit-linux.c: Regenerate.
11999 * features/i386/32bit-mpx.c: Regenerate.
12000 * features/i386/32bit-pkeys.c: Regenerate.
12001 * features/i386/32bit-sse.c: Regenerate.
12002 * features/i386/64bit-avx.c: Regenerate.
12003 * features/i386/64bit-avx512.c: Regenerate.
12004 * features/i386/64bit-core.c: Regenerate.
12005 * features/i386/64bit-linux.c: Regenerate.
12006 * features/i386/64bit-mpx.c: Regenerate.
12007 * features/i386/64bit-pkeys.c: Regenerate.
12008 * features/i386/64bit-segments.c: Regenerate.
12009 * features/i386/64bit-sse.c: Regenerate.
12010 * features/i386/x32-core.c: Regenerate.
12011 * features/tic6x-c6xp.c: Regenerate.
12012 * features/tic6x-core.c: Regenerate.
12013 * features/tic6x-gp.c: Regenerate.
12014 * target-descriptions.c: Use common/tdesc.h.
12015 * target-descriptions.h: Likewise.
12016
12017 2018-02-24 Tom Tromey <tom@tromey.com>
12018
12019 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12020 (try_thread_db_load_from_dir, thread_db_load_search): Use
12021 std::string.
12022 (info_auto_load_libthread_db_compare): Return bool. Change
12023 argument types.
12024 (info_auto_load_libthread_db): Use std::vector, std::string.
12025 Remove cleanups.
12026
12027 2018-02-24 Tom Tromey <tom@tromey.com>
12028
12029 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12030 std::string.
12031 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12032 std::string*.
12033 * gdbarch.c: Rebuild.
12034 * gdbarch.h: Rebuild.
12035 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12036 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12037 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12038 std::string*.
12039
12040 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12041
12042 * gdbtypes.h (sect_offset): Change type to uint64_t.
12043 (sect_offset_str): New function.
12044 * dwarf2read.c (create_addrmap_from_aranges): Use
12045 sect_offset_str.
12046 (error_check_comp_unit_head): Likewise.
12047 (create_debug_type_hash_table): Likewise.
12048 (read_cutu_die_from_dwo): Likewise.
12049 (init_cutu_and_read_dies): Likewise.
12050 (init_cutu_and_read_dies_no_follow): Likewise.
12051 (process_psymtab_comp_unit_reader): Likewise.
12052 (partial_die_parent_scope): Likewise.
12053 (peek_die_abbrev): Likewise.
12054 (process_queue): Likewise.
12055 (dwarf2_physname): Likewise.
12056 (read_namespace_alias): Likewise.
12057 (read_import_statement): Likewise.
12058 (create_dwo_cu_reader): Likewise.
12059 (create_cus_hash_table): Likewise.
12060 (lookup_dwo_cutu): Likewise.
12061 (inherit_abstract_dies): Likewise.
12062 (read_func_scope): Likewise.
12063 (read_call_site_scope): Likewise.
12064 (dwarf2_add_member_fn): Likewise.
12065 (read_common_block): Likewise.
12066 (read_module_type): Likewise.
12067 (read_typedef): Likewise.
12068 (read_subrange_type): Likewise.
12069 (load_partial_dies): Likewise.
12070 (read_partial_die): Likewise.
12071 (find_partial_die): Likewise.
12072 (read_str_index): Likewise.
12073 (dwarf2_string_attr): Likewise.
12074 (build_error_marker_type): Likewise.
12075 (lookup_die_type): Likewise.
12076 (dump_die_shallow): Likewise.
12077 (follow_die_ref): Likewise.
12078 (dwarf2_fetch_die_loc_sect_off): Likewise.
12079 (dwarf2_fetch_constant_bytes): Likewise.
12080 (follow_die_sig): Likewise.
12081 (get_signatured_type): Likewise.
12082 (get_DW_AT_signature_type): Likewise.
12083 (dwarf2_find_containing_comp_unit): Likewise.
12084 (set_die_type): Likewise.
12085
12086 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12087
12088 * arch/aarch64.c: Include "common-defs.h".
12089 * arch/amd64.c: Likewise.
12090 * arch/i386.c: Likewise.
12091
12092 2018-02-21 Tom Tromey <tom@tromey.com>
12093
12094 * value.h: (extract_field_op): Update.
12095 * eval.c (extract_field_op): Return a const char *.
12096 * expression.h (parse_expression_for_completion): Update.
12097 * completer.c (complete_expression): Update.
12098 (add_struct_fields): Make fieldname const.
12099 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12100 (mark_completion_tag, parse_exp_in_context_1): Update.
12101 (parse_expression_for_completion): Change "name" to
12102 unique_xmalloc_ptr*.
12103
12104 2018-02-21 Tom Tromey <tom@tromey.com>
12105
12106 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12107
12108 2018-02-21 Yao Qi <yao.qi@linaro.org>
12109
12110 * avr-tdep.c (avr_read_pc): Change parameter type to
12111 readable_regcache.
12112 * gdbarch.sh (read_pc): Likewise.
12113 * gdbarch.c: Re-generated.
12114 * gdbarch.h: Re-generated.
12115 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12116 readable_regcache.
12117 * ia64-tdep.c (ia64_read_pc): Likewise.
12118 * mips-tdep.c (mips_read_pc): Likewise.
12119 * spu-tdep.c (spu_read_pc): Likewise.
12120
12121 2018-02-21 Yao Qi <yao.qi@linaro.org>
12122
12123 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12124 * regcache-dump.c: New file.
12125 * regcache.c: Move register_dump to regcache-dump.c.
12126 (maintenance_print_registers): Likewise.
12127 (maintenance_print_raw_registers): Likewise.
12128 (maintenance_print_cooked_registers): Likewise.
12129 (maintenance_print_register_groups): Likewise.
12130 (maintenance_print_remote_registers): Likewise.
12131 (_initialize_regcache): Likewise.
12132 * regcache.h (register_dump): Moved from regcache.c.
12133
12134 2018-02-21 Yao Qi <yao.qi@linaro.org>
12135
12136 * regcache.c (regcache::regcache): Update.
12137 (regcache::invalidate): Move it to detached_regcache::invalidate.
12138 (get_thread_arch_aspace_regcache): Update.
12139 (regcache::raw_update): Update.
12140 (regcache::cooked_read): Remove some code.
12141 (regcache::cooked_read_value): Likewise.
12142 (regcache::raw_write): Remove assert on m_readonly_p.
12143 (regcache::raw_supply_integer): Move it to
12144 detached_regcache::raw_supply_integer.
12145 (regcache::raw_supply_zeroed): Likewise.
12146 * regcache.h (detached_regcache) <raw_supply_integer>: New
12147 declaration.
12148 <raw_supply_zeroed, invalidate>: Likewise.
12149 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12150 <invalidate>: Likewise.
12151 <m_readonly_p>: Removed.
12152
12153 2018-02-21 Yao Qi <yao.qi@linaro.org>
12154
12155 * infcmd.c (get_return_value): Let stop_regs point to
12156 get_current_regcache.
12157 * regcache.c (regcache::regcache): Remove.
12158 (register_dump_reg_buffer): New class.
12159 (regcache_print): Adjust.
12160 * regcache.h (regcache): Remove constructors.
12161
12162 2018-02-21 Yao Qi <yao.qi@linaro.org>
12163
12164 * regcache.c (class register_dump): New class.
12165 (register_dump_regcache, register_dump_none): New class.
12166 (register_dump_remote, register_dump_groups): New class.
12167 (regcache_print): Update.
12168 * regcache.h (regcache_dump_what): Move it to regcache.c.
12169 (regcache) <dump>: Remove.
12170
12171 2018-02-21 Yao Qi <yao.qi@linaro.org>
12172
12173 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12174 reg_buffer_rw *.
12175 (jit_unwind_reg_set_impl): Call raw_supply.
12176 (jit_frame_sniffer): Use reg_buffer_rw.
12177 * record-full.c (record_full_core_regbuf): Change its type.
12178 (record_full_core_open_1): Use reg_buffer_rw.
12179 (record_full_close): Likewise.
12180 (record_full_core_fetch_registers): Use regcache->raw_supply.
12181 (record_full_core_store_registers): Likewise.
12182 * regcache.c (regcache::get_register_status): Move it to
12183 reg_buffer.
12184 (regcache_raw_set_cached_value): Remove.
12185 (regcache::raw_set_cached_value): Remove.
12186 (regcache::raw_write): Call raw_supply.
12187 (regcache::raw_supply): Move it to reg_buffer_rw.
12188 * regcache.h (regcache_raw_set_cached_value): Remove.
12189 (reg_buffer_rw): New class.
12190
12191 2018-02-21 Yao Qi <yao.qi@linaro.org>
12192
12193 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12194 readonly_detached_regcache.
12195 (dummy_frame_prev_register): Use regcache->cooked_read.
12196 * frame.c (frame_save_as_regcache): Change return type.
12197 (frame_pop): Update.
12198 * frame.h (frame_save_as_regcache): Update declaration.
12199 * inferior.h (get_infcall_suspend_state_regcache): Update
12200 declaration.
12201 * infrun.c (infcall_suspend_state) <registers>: use
12202 readonly_detached_regcache.
12203 (save_infcall_suspend_state): Don't use regcache_dup.
12204 (get_infcall_suspend_state_regcache): Change return type.
12205 * linux-fork.c (struct fork_info) <savedregs>: Change to
12206 readonly_detached_regcache.
12207 <pc>: New field.
12208 (fork_save_infrun_state): Don't use regcache_dup.
12209 (info_checkpoints_command): Adjust.
12210 * mi/mi-main.c (register_changed_p): Update declaration.
12211 (mi_cmd_data_list_changed_registers): Use
12212 readonly_detached_regcache.
12213 (register_changed_p): Change parameter type to
12214 readonly_detached_regcache.
12215 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12216 readonly_detached_regcache.
12217 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12218 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12219 New.
12220 (regcache::save): Move it to reg_buffer.
12221 (regcache::restore): Change parameter type.
12222 (regcache_dup): Remove.
12223 * regcache.h (reg_buffer) <save>: New method.
12224 (readonly_detached_regcache): New class.
12225 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12226 readonly_detached_regcache.
12227 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12228
12229 2018-02-21 Yao Qi <yao.qi@linaro.org>
12230
12231 * frame.c (frame_save_as_regcache): Use regcache method save.
12232 (frame_pop): Use regcache method restore.
12233 * infrun.c (restore_infcall_suspend_state): Likewise.
12234 * linux-fork.c (fork_load_infrun_state): Likewise.
12235 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12236 save.
12237 * regcache.c (regcache_save): Remove.
12238 (regcache::restore): More asserts.
12239 (regcache_cpy): Remove.
12240 * regcache.h (regcache_save): Remove the declaration.
12241 (regcache::restore): Move from private to public.
12242 Remove the friend declaration of regcache_cpy.
12243 (regcache_cpy): Remove declaration.
12244
12245 2018-02-21 Yao Qi <yao.qi@linaro.org>
12246
12247 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12248 parameter type to 'readable_regcache *'.
12249 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12250 * arm-tdep.c (arm_neon_quad_read): Likewise.
12251 (arm_pseudo_read): Likewise.
12252 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12253 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12254 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12255 * gdbarch.c: Re-generated.
12256 * gdbarch.h: Re-generated.
12257 * gdbarch.sh (pseudo_register_read): Change parameter type to
12258 'readable_regcache *'.
12259 (pseudo_register_read_value): Likewise.
12260 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12261 (h8300_pseudo_register_read): Likewise.
12262 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12263 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12264 (i386_pseudo_register_read_into_value): Likewise.
12265 (i386_pseudo_register_read_value): Likewise.
12266 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12267 declaration.
12268 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12269 * m32c-tdep.c (m32c_raw_read): Likewise.
12270 (m32c_read_flg): Likewise.
12271 (m32c_banked_register): Likewise.
12272 (m32c_banked_read): Likewise.
12273 (m32c_sb_read): Likewise.
12274 (m32c_part_read): Likewise.
12275 (m32c_cat_read): Likewise.
12276 (m32c_r3r2r1r0_read): Likewise.
12277 (m32c_pseudo_register_read): Likewise.
12278 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12279 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12280 (mep_pseudo_cr64_read): Likewise.
12281 (mep_pseudo_register_read): Likewise.
12282 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12283 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12284 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12285 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12286 (regcache::cooked_read): Likewise.
12287 (regcache::cooked_read_value): Likewise.
12288 (regcache_cooked_read_signed):
12289 (regcache::cooked_read): Likewise.
12290 * regcache.h (readable_regcache): New class.
12291 (regcache): Inherit readable_regcache. Move some methods to
12292 readable_regcache.
12293 * rl78-tdep.c (rl78_pseudo_register_read): Change
12294 parameter type to 'readable_regcache *'.
12295 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12296 (e500_pseudo_register_read): Change parameter type to
12297 'readable_regcache *'.
12298 (dfp_pseudo_register_read): Likewise.
12299 (vsx_pseudo_register_read): Likewise.
12300 (efpr_pseudo_register_read): Likewise.
12301 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12302 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12303 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12304 (sh64_pseudo_register_read): Likewise.
12305 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12306 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12307 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12308 (spu_pseudo_register_read): Likewise.
12309 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12310 (xtensa_pseudo_register_read): Likewise.
12311
12312 2018-02-21 Yao Qi <yao.qi@linaro.org>
12313
12314 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12315 (regcache::arch): Move it to reg_buffer::arch.
12316 (regcache::register_buffer): Likewise.
12317 (regcache::assert_regnum): Likewise.
12318 (regcache::num_raw_registers): Likewise.
12319 * regcache.h (reg_buffer): New class.
12320 (regcache): Inherit reg_buffer.
12321
12322 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12323
12324 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12325 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12326
12327 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12328
12329 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12330
12331 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12332
12333 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12334 (SFILES): Remove common/*.c files.
12335 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12336 * common/common.host: Add common reference.
12337 * configure.ac: Likewise.
12338 * configure: Regenerate.
12339
12340 2018-02-16 Yao Qi <yao.qi@linaro.org>
12341
12342 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12343 (block_initialize_namespace): Use new.
12344 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12345 (dwarf2_free_objfile): Use delete.
12346 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12347 (copy_type_recursive): Use new.
12348 * gdb_obstack.h (allocate_on_obstack): New.
12349
12350 2018-02-15 Yao Qi <yao.qi@linaro.org>
12351
12352 PR gdb/22849
12353 * inferior.c (exit_inferior_1): Reset inf->control.
12354
12355 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12356
12357 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12358 declaration.
12359
12360 2018-02-14 Pedro Alves <palves@redhat.com>
12361
12362 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12363 frame_cleanup_after_sniffer on exception.
12364
12365 2018-02-14 Tom Tromey <tom@tromey.com>
12366
12367 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12368 const.
12369 (solib_bfd_open): Make pathname const.
12370 * solib.c (solib_bfd_open): Make pathname const.
12371 * solib-spu.c (spu_bfd_fopen): Make name const.
12372 (spu_bfd_open): Make pathname const.
12373 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12374 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12375
12376 2018-02-14 Tom Tromey <tom@tromey.com>
12377
12378 * symfile.c (symfile_bfd_open): Update.
12379 * source.h (openp, source_full_path_of, find_and_open_source):
12380 Change argument type to unique_xmalloc_ptr.
12381 * source.c (openp): Take a unique_xmalloc_ptr.
12382 (source_full_path_of, find_and_open_source): Likewise.
12383 (open_source_file, symtab_to_fullname): Update.
12384 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12385 unique_xmalloc_ptr.
12386 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12387 (exec_file_find): Update.
12388 * psymtab.c (psymtab_to_fullname): Update.
12389 * nto-tdep.h (nto_find_and_open_solib): Update.
12390 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12391 unique_xmalloc_ptr.
12392 * exec.c (exec_file_attach): Update.
12393 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12394 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12395
12396 2018-02-14 Tom Tromey <tom@tromey.com>
12397
12398 * solib.c: Include source.h.
12399 * nto-tdep.c: Include source.h.
12400 * mi/mi-cmd-env.c: Include source.h.
12401 * infcmd.c: Include source.h.
12402 * exec.c: Include source.h.
12403 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12404 (add_path, directory_switch, source_path, init_source_path): Move
12405 declarations...
12406 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12407 (add_path, directory_switch, source_path, init_source_path):
12408 ...here.
12409
12410 2018-02-14 Tom Tromey <tom@tromey.com>
12411
12412 * solist.h (exec_file_find, solib_find): Return
12413 unique_xmalloc_ptr.
12414 (solib_bfd_fopen): Take a const char *.
12415 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12416 (exec_file_find, solib_find): Likewise.
12417 (solib_bfd_fopen): Do not take ownership of "pathname".
12418 (solib_bfd_open): Use unique_xmalloc_ptr.
12419 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12420 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12421 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12422 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12423
12424 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12425
12426 * ada-lang.c (name_match_type_from_name): Remove reference to
12427 ada_name_for_lookup in function's documentation.
12428 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12429
12430 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12431
12432 * defs.h (enum openp_flags): New enum.
12433 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12434 Move to enum openp_flags.
12435 (openp_flags): New enum flags.
12436 (openp): Change parameter type to openp_flags.
12437 * source.c (openp): Change parameter type to openp_flags.
12438 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12439 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12440
12441 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12442
12443 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12444 per-command.
12445
12446 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12447
12448 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12449 into...
12450 (class dwarf2_queue_guard): ...the destructor of this new class.
12451 (dw2_do_instantiate_symtab): Create instance of the new class
12452 dwarf2_queue_guard, remove cleanup.
12453
12454 2018-02-09 Tom Tromey <tom@tromey.com>
12455
12456 * source.c (find_source_lines): Don't reference past the end of
12457 the vector.
12458
12459 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12460
12461 * remote.c (remote_btrace_maybe_reopen): Change error message.
12462 * btrace.c (btrace_enable): Likewise.
12463 (parse_xml_btrace): Likewise.
12464 (parse_xml_btrace_conf): Likewise.
12465
12466 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12467
12468 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12469 (linux_enable_pt, linux_enable_bts): Call
12470 diagnose_perf_event_open_fail.
12471
12472 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12473
12474 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12475 Remove parameter and change return type. Update callers. Move it.
12476 (linux_enable_bts, linux_enable_pt): Improve error message.
12477 (linux_enable_pt): Remove zero buffer size check.
12478 (linux_enable_btrace): Improve error messages. Remove NULL return
12479 check.
12480
12481 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12482
12483 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12484 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12485 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12486 (linux_supports_pt, linux_supports_btrace): Remove.
12487 (linux_enable_bts): Call cpu_supports_bts.
12488 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12489 * remote.c (remote_supports_btrace): Remove.
12490 (init_remote_ops): Remove remote_supports_btrace.
12491 * target-delegates.c: Regenerated.
12492 * target.c (target_supports_btrace): Remove.
12493 * target.h (target_ops) <to_supports_btrace>: Remove
12494 (target_supports_btrace): Remove.
12495 * x86-linux-nat.c (x86_linux_create_target): Remove
12496 linux_supports_btrace.
12497
12498 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12499
12500 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12501 btrace failed.
12502 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12503 exception and use message in own exception.
12504
12505 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12506
12507 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12508 (perf_event_pt_event_type): Use gdb_file_up.
12509 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12510 scoped_fd, and scoped_mmap.
12511
12512 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12513
12514 * common/scoped_mmap.h: New.
12515 * unittests/scoped_mmap-selftest.c: New.
12516 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12517 unittests/scoped_mmap-selftest.c.
12518
12519 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12520
12521 * common/scoped_fd.h: New.
12522 * unittests/scoped_fd-selftest.c: New.
12523 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12524 unittests/scoped_fd-selftest.c.
12525
12526 2018-02-09 Tom Tromey <tom@tromey.com>
12527
12528 * auto-load.c (auto_load_section_scripts): Use
12529 gdb::unique_xmalloc_ptr.
12530
12531 2018-02-09 Tom Tromey <tom@tromey.com>
12532
12533 * auto-load.c (execute_script_contents): Use std::string.
12534
12535 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12536
12537 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12538 Python function, rather than a new command.
12539
12540 2018-02-08 Tom Tromey <tom@tromey.com>
12541
12542 * solib.c (solib_find_1): Use std::string.
12543 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12544
12545 2018-02-08 Tom Tromey <tom@tromey.com>
12546
12547 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12548
12549 2018-02-08 Tom Tromey <tom@tromey.com>
12550
12551 * source.c (find_source_lines): Use gdb::def_vector.
12552
12553 2018-02-08 Tom Tromey <tom@tromey.com>
12554
12555 * macrocmd.c (struct temporary_macro_definition): New.
12556 (macro_define_command): Use temporary_macro_definition. Remove
12557 cleanups.
12558 (free_macro_definition_ptr): Remove.
12559
12560 2018-02-08 Tom Tromey <tom@tromey.com>
12561
12562 * macroexp.c (maybe_expand): Use std::string.
12563
12564 2018-02-08 Tom Tromey <tom@tromey.com>
12565
12566 * macroexp.c (struct macro_buffer): Add initializers for some
12567 members.
12568 (init_buffer, init_shared_buffer, free_buffer)
12569 (free_buffer_return_text): Remove.
12570 (macro_buffer): New constructors.
12571 (~macro_buffer): New destructor.
12572 (macro_buffer::set_shared): New method.
12573 (macro_buffer::resize_buffer, macro_buffer::appendc)
12574 (macro_buffer::appendmem): Now methods, not free functions.
12575 (set_token, append_tokens_without_splicing, stringify)
12576 (macro_stringify): Update.
12577 (gather_arguments): Change return type. Remove argc_p argument,
12578 add args_ptr argument. Use std::vector.
12579 (substitute_args): Remove argc argument. Accept std::vector.
12580 (expand): Update. Use std::vector.
12581 (scan, macro_expand, macro_expand_next): Update.
12582
12583 2018-02-08 Tom Tromey <tom@tromey.com>
12584
12585 * symtab.c (default_collect_symbol_completion_matches_break_on):
12586 Use unique_xmalloc_ptr.
12587 * macroscope.h: (sal_macro_scope, user_macro_scope)
12588 (default_macro_scope): Return unique_xmalloc_ptr.
12589 * macroscope.c (sal_macro_scope, user_macro_scope)
12590 (default_macro_scope): Return unique_xmalloc_ptr.
12591 * macroexp.h (macro_expand, macro_expand_once): Return
12592 unique_xmalloc_ptr.
12593 * macroexp.c (macro_expand, macro_expand_once): Return
12594 unique_xmalloc_ptr.
12595 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12596 (info_macro_command, info_macros_command): Use
12597 unique_xmalloc_ptr.
12598 * compile/compile-c-support.c (write_macro_definitions): Use
12599 unique_xmalloc_ptr.
12600 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12601
12602 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12603
12604 * value.c (value_static_field): Assign field type instead of
12605 containing type when returning an optimized out value.
12606
12607 2018-02-06 Yao Qi <yao.qi@linaro.org>
12608
12609 * ft32-tdep.c (ft32_read_pc): Remove.
12610 (ft32_write_pc): Remove.
12611 (ft32_gdbarch_init): Update.
12612 * m32r-tdep.c (m32r_read_pc): Remove.
12613 (m32r_gdbarch_init): Update.
12614 * mep-tdep.c (mep_read_pc): Remove.
12615 (mep_gdbarch_init): Update.
12616 * microblaze-tdep.c (microblaze_write_pc): Remove.
12617 (microblaze_gdbarch_init): Update.
12618 * mn10300-tdep.c (mn10300_read_pc): Remove.
12619 (mn10300_write_pc): Remove.
12620 (mn10300_gdbarch_init): Update.
12621 * moxie-tdep.c (moxie_read_pc): Remove.
12622 (moxie_write_pc): Remove.
12623 (moxie_gdbarch_init): Update.
12624
12625 2018-02-06 Yao Qi <yao.qi@linaro.org>
12626
12627 * expprint.c (print_subexp_standard): Handle
12628 OP_F77_UNDETERMINED_ARGLIST.
12629 (dump_subexp_body_standard): Likewise.
12630
12631 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12632
12633 * target-descriptions.c (tdesc_element_visitor) Add empty
12634 implementations.
12635 (tdesc_type): Move make_gdb_type from here.
12636 (tdesc_type_builtin): Likewise.
12637 (tdesc_type_vector): Likewise.
12638 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12639 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12640 (make_gdb_type_union): Likewise.
12641 (make_gdb_type_flags): Likewise.
12642 (make_gdb_type_enum): Likewise.
12643 (make_gdb_type): New function.
12644 (tdesc_register_type): Use static make_gdb_type.
12645
12646 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12647
12648 * infcmd.c (default_print_one_register_info): Align natural-format
12649 column values consistently one under another.
12650 (pad_to_column): New function.
12651
12652 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12653
12654 * dwarf2read.c (dwarf2_physname): Move commment.
12655
12656 2018-02-01 Leszek Swirski <leszeks@google.com>
12657
12658 * varobj.c (varobj_formatted_print_options): Allow recursive
12659 pretty printing if pretty printing is enabled.
12660
12661 2018-02-01 Leszek Swirski <leszeks@google.com>
12662
12663 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12664 names after a structop as a filename.
12665
12666 2018-02-01 Yao Qi <yao.qi@linaro.org>
12667
12668 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12669 (arm_record_coproc_data_proc): Likewise.
12670
12671 2018-02-01 Yao Qi <yao.qi@linaro.org>
12672
12673 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12674
12675 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12676
12677 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12678 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12679
12680 2018-01-31 Pedro Alves <palves@redhat.com>
12681
12682 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12683 * inflow.c (child_terminal_save_inferior): Wrap reference to
12684 tcgetpgrp in HAVE_TERMIOS_H.
12685 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12686 _WIN32.
12687 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12688 always iterate over all inferiors.
12689 (gdbsim_cntrl_c): Adjust.
12690 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12691
12692 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12693
12694 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12695 index type is objfile-owned if the element type is as well.
12696
12697 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12698
12699 GDB 8.1 released.
12700
12701 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12702
12703 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12704 "features/s390x-linux64.c".
12705 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12706 s390_linux32 and s390x_linux64.
12707 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12708 default tdesc.
12709 * s390-tdep.c: Include "features/s390-linux32.c" and
12710 "features/s390x-linux64.c".
12711 (s390_tdesc_valid): Add check for tdesc_has_registers.
12712 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12713 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12714 tdesc_s390x_linux64.
12715 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12716 tdesc_s390x_linux64 to...
12717 * s390-tdep.h: ...here.
12718
12719 2018-01-30 Pedro Alves <palves@redhat.com>
12720
12721 PR gdb/13211
12722 * config.in, configure: Regenerate.
12723 * configure.ac: Check for getpgid.
12724 * go32-nat.c (go32_pass_ctrlc): New.
12725 (go32_target): Install it.
12726 * inf-child.c (inf_child_target): Install
12727 child_terminal_save_inferior, child_pass_ctrlc and
12728 child_interrupt.
12729 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12730 (inf_ptrace_target): No longer install it.
12731 * infcmd.c (interrupt_target_1): Adjust.
12732 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12733 (child_interrupt): Declare.
12734 (inferior::terminal_state): New.
12735 * inflow.c (struct terminal_info): Update comments.
12736 (inferior_process_group): Delete.
12737 (terminal_is_ours): Delete.
12738 (gdb_tty_state): New.
12739 (child_terminal_init): Adjust.
12740 (is_gdb_terminal, sharing_input_terminal_1)
12741 (sharing_input_terminal): New functions.
12742 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12743 Set the process's actual process group in the foreground if
12744 possible. Handle is_ours_for_output/is_ours distinction. Don't
12745 mark terminal as the inferior's if not sharing GDB's terminal.
12746 Don't check attach_flag.
12747 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12748 pass down a target_terminal_state.
12749 (child_terminal_save_inferior): New, factored out from ...
12750 (child_terminal_ours_1): ... this. Handle
12751 target_terminal_state::is_ours_for_output.
12752 (child_interrupt, child_pass_ctrlc): New.
12753 (inflow_inferior_exit): Clear the inferior's terminal_state.
12754 (copy_terminal_info): Copy the inferior's terminal state.
12755 (_initialize_inflow): Remove reference to terminal_is_ours.
12756 * inflow.h (inferior_process_group): Delete.
12757 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12758 * procfs.c (procfs_target): Don't install procfs_interrupt.
12759 (procfs_interrupt): Delete.
12760 * remote.c (remote_serial_quit_handler): Adjust.
12761 (remote_interrupt): Remove ptid parameter. Adjust.
12762 * target-delegates.c: Regenerate.
12763 * target.c: Include "terminal.h".
12764 (target_terminal::terminal_state): Rename to ...
12765 (target_terminal::m_terminal_state): ... this.
12766 (target_terminal::init): Adjust.
12767 (target_terminal::inferior): Adjust to per-inferior
12768 terminal_state.
12769 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12770 (target_terminal::ours, target_terminal::ours_for_output): Use
12771 target_terminal_is_ours_kind.
12772 (target_interrupt): Remove ptid parameter. Adjust.
12773 (default_target_pass_ctrlc): Adjust.
12774 * target.h (target_ops::to_terminal_save_inferior): New field.
12775 (target_ops::to_interrupt): Remove ptid_t parameter.
12776 (target_interrupt): Remove ptid_t parameter. Update comment.
12777 (target_pass_ctrlc): Update comment.
12778 * target/target.h (target_terminal_state): New scoped enum,
12779 factored out of ...
12780 (target_terminal::terminal_state): ... here.
12781 (target_terminal::inferior): Update comments.
12782 (target_terminal::restore_inferior): New.
12783 (target_terminal::is_inferior, target_terminal::is_ours)
12784 (target_terminal::is_ours_for_output): Adjust.
12785 (target_terminal::scoped_restore_terminal_state): Adjust to
12786 rename, and call restore_inferior() instead of inferior().
12787 (target_terminal::scoped_restore_terminal_state::m_state): Change
12788 type.
12789 (target_terminal::terminal_state): Rename to ...
12790 (target_terminal::m_terminal_state): ... this and change type.
12791
12792 2018-01-30 Pedro Alves <palves@redhat.com>
12793
12794 * linux-nat.c (wait_for_signal): New function.
12795 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12796 directly.
12797 (async_terminal_is_ours)
12798 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12799 (linux_nat_add_target): Don't override
12800 to_terminal_inferior/to_terminal_ours.
12801
12802 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12803
12804 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12805
12806 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12807
12808 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12809 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12810 dwarf2_per_objfile_free here.
12811 (dwarf2_per_objfile_free): Remove.
12812 (_initialize_dwarf2_read): Don't register
12813 dwarf2_per_objfile_free as a registry cleanup.
12814
12815 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12816
12817 Avoid compilation errors in MinGW native builds
12818
12819 The error is triggered by including python-internal.h, and the
12820 error message is:
12821
12822 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12823 from build-gnulib/import/math.h:27,
12824 from d:/usr/Python26/include/pyport.h:235,
12825 from d:/usr/Python26/include/Python.h:58,
12826 from python/python-internal.h:94,
12827 from python/py-arch.c:24:
12828 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12829 using ::hypot;
12830 ^~~~~
12831
12832 This happens because Python headers define 'hypot' to expand t
12833 '_hypot' in the Windows builds.
12834 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12835 'hypoth'. This avoids a compilation error.
12836
12837 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12838
12839 * MAINTAINERS (Write After Approval): Fix ordering.
12840
12841 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12842
12843 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12844
12845 2018-01-26 Alan Modra <amodra@gmail.com>
12846
12847 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12848 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12849 Remove nop. Make const. Comment.
12850 (powerpc32_plt_stub_so_2): New.
12851 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12852 Correct count. Update uses.
12853 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12854 Move common code reading PLT entry word. Correct
12855 powerpc32_plt_stub PLT address calculation.
12856 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12857 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12858 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12859 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12860 (ppc64_standard_linkage8): Likewise.
12861 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12862 Correct insns description.
12863 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12864
12865 2018-01-24 Pedro Alves <palves@redhat.com>
12866
12867 GCC PR libstdc++/83906
12868 * gdbtypes.c (operator==(const dynamic_prop &,
12869 const dynamic_prop &)): New.
12870 (operator==(const range_bounds &, const range_bounds &)): New.
12871 (check_types_equal): Use them instead of memcmp.
12872 * gdbtypes.h (operator==(const dynamic_prop &,
12873 const dynamic_prop &)): Declare.
12874 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12875 (operator==(const range_bounds &, const range_bounds &)): Declare.
12876 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12877
12878 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12879
12880 * s390-linux-tdep.c (s390_record_address_mask)
12881 (s390_record_calc_disp_common, s390_record_calc_disp)
12882 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12883 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12884 (s390_process_record): Move to s390-tdep.c.
12885 (s390_linux_init_abi_any): Adjust.
12886 * s390-tdep.c (s390_record_address_mask)
12887 (s390_record_calc_disp_common, s390_record_calc_disp)
12888 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12889 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12890 (s390_process_record): Moved from s390-linux-tdep.c
12891 (s390_gdbarch_init): Adjust.
12892
12893 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12894
12895 * s390-linux-nat.c (s390-tdep.h): New include.
12896 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12897 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12898 (ALLDEPFILES): Add s390-tdep.c.
12899 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12900 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12901 * s390-tdep.h: ...this. New file.
12902 * s390-linux-tdep.c (s390-tdep.h): New include.
12903 (_initialize_s390_tdep): Rename to...
12904 (_initialize_s390_linux_tdep): ...this and adjust.
12905 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12906 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12907 s390-tdep.h.
12908 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12909 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12910 (s390_is_partial_instruction, s390_software_single_step)
12911 (is_non_branch_ril, s390_displaced_step_copy_insn)
12912 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12913 (s390_prologue_data, s390_addr, s390_store, s390_load)
12914 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12915 (s390_register_call_saved, s390_guess_tracepoint_registers)
12916 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12917 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12918 (s390_pseudo_register_name, s390_pseudo_register_type)
12919 (s390_pseudo_register_read, s390_pseudo_register_write)
12920 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12921 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12922 (s390_addr_bits_remove, s390_address_class_type_flags)
12923 (s390_address_class_type_flags_to_name)
12924 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12925 (s390_function_arg_float, s390_function_arg_vector)
12926 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12927 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12928 (s390_frame_align, s390_register_return_value, s390_return_value)
12929 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12930 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12931 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12932 (s390_trad_frame_prev_register, s390_unwind_cache)
12933 (s390_prologue_frame_unwind_cache)
12934 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12935 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12936 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12937 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12938 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12939 (s390_frame_base_address, s390_local_base_address)
12940 (s390_frame_base, s390_gcc_target_options)
12941 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12942 (s390_validate_reg_range, s390_tdesc_valid)
12943 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12944 * s390-tdep.c: ...this. New file.
12945
12946 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12947
12948 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12949 (s390_process_record, s390_gdbarch_tdep_alloc)
12950 (s390_linux_init_abi_any): Use/set new hook.
12951
12952 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12953
12954 * s390-linux-tdep.c (osabi.h): New include.
12955 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12956 (s390_linux_init_abi_any): New functions.
12957 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12958
12959 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12960
12961 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12962 tdesc_has_registers check
12963
12964 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12965
12966 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12967 (s390_validate_reg_range): New macro.
12968 (s390_gdbarch_init): Adjust.
12969
12970 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12971
12972 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12973 (s390_gdbarch_tdep_alloc): Adjust.
12974 (s390_gdbarch_init): Adjust.
12975
12976 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12977
12978 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12979 <have_tdb>: Change type to bool.
12980 (s390_gdbarch_tdep_alloc): Adjust.
12981 (s390_gdbarch_init): Adjust.
12982
12983 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12984
12985 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12986 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12987 (s390_gdbarch_tdep_alloc): New function.
12988 (s390_gdbarch_init): Allocate tdep at start and use its fields
12989 instead of separate variables.
12990
12991 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12992
12993 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12994 when looking for cached gdbarch and add comment for remaining.
12995
12996 2018-01-22 Pedro Alves <palves@redhat.com>
12997 Sergio Durigan Junior <sergiodj@redhat.com>
12998
12999 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13000 case.
13001
13002 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13003
13004 * MAINTAINERS: Update my company e-mail address.
13005
13006 2018-01-22 Yao Qi <yao.qi@linaro.org>
13007
13008 * regcache.c (cooked_write_test): New function.
13009 (_initialize_regcache): Register the test.
13010
13011 2018-01-22 Yao Qi <yao.qi@linaro.org>
13012
13013 * ia64-tdep.c (ia64_pseudo_register_read): Call
13014 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13015 * m32c-tdep.c (m32c_cat_read): Likewise.
13016 (m32c_r3r2r1r0_read): Likewise.
13017 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13018 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13019
13020 2018-01-22 Yao Qi <yao.qi@linaro.org>
13021
13022 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13023 method raw_read instead of regcache_raw_read.
13024 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13025 * arm-tdep.c (arm_neon_quad_read): Likewise.
13026 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13027 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13028 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13029 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13030 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13031 (i386_pseudo_register_read_into_value): Likewise.
13032 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13033 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13034 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13035 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13036 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13037 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13038 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13039 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13040 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13041
13042 2018-01-22 Yao Qi <yao.qi@linaro.org>
13043
13044 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13045 * configure.tgt: Remove target mt.
13046 * mt-tdep.c: Remove.
13047 * regcache.c (cooked_read_test): Remove the check for mt.
13048
13049 2018-01-22 Yao Qi <yao.qi@linaro.org>
13050
13051 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13052 instead of gdbarch_pseudo_register_read_value.
13053
13054 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13055
13056 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13057 language is Ada.
13058
13059 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13060
13061 * linespec.c (create_sals_line_offset): Remove code that preserved
13062 the symtab_and_line's line number.
13063
13064 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13065
13066 * varobj.c (varobj_create): Don't set valid_block when creating a
13067 floating varobj.
13068
13069 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13070
13071 * varobj.c (varobj_create): Remove out of date comment.
13072
13073 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13074
13075 PR mi/20395
13076 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13077 updating innermost block.
13078 * parse.c (innermost_block_tracker::update): Take extra type
13079 parameter, and check types match before updating innermost block.
13080 (write_dollar_variable): Update innermost block for registers.
13081 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13082 (innermost_block_tracker::innermost_block_tracker): Initialise
13083 m_types member.
13084 (innermost_block_tracker::reset): Take type parameter.
13085 (innermost_block_tracker::update): Take type parameter, and pass
13086 type through as needed.
13087 (innermost_block_tracker::m_types): New member.
13088 * varobj.c (varobj_create): Pass type when reseting innermost
13089 block.
13090
13091 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13092
13093 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13094 * ada-lang.c (resolve_subexp): Likewise.
13095 * breakpoint.c (set_breakpoint_condition) Likewise.
13096 (watch_command_1) Likewise.
13097 * c-exp.y (variable): Likewise.
13098 * d-exp.y (PrimaryExpression): Likewise.
13099 * f-exp.y (variable): Likewise.
13100 * go-exp.y (variable): Likewise.
13101 * m2-exp.y (variable): Likewise.
13102 * objfiles.c (objfile::~objfile): Likewise.
13103 * p-exp.y (variable): Likewise.
13104 * parse.c (innermost_block): Change type.
13105 * parser-defs.h (class innermost_block_tracker): New.
13106 (innermost_block): Change to innermost_block_tracker.
13107 * printcmd.c (display_command): Switch to innermost_block API.
13108 (do_one_display): Likewise.
13109 * rust-exp.y (do_one_display): Likewise.
13110 * symfile.c (clear_symtab_users): Likewise.
13111 * varobj.c (varobj_create): Switch to innermost_block API, replace
13112 use of innermost_block with block stored on varobj object.
13113
13114 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13115
13116 * expression.h (innermost_block): Remove declaration.
13117 * varobj.c: Add 'parser-defs.h' include.
13118
13119 2018-01-19 Tom Tromey <tom@tromey.com>
13120
13121 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13122 symbols in the static and global blocks.
13123
13124 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13125
13126 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13127 gdb_ptrace.h, and move including gdb_wait.h ...
13128 * nat/linux-ptrace.h: ... to here.
13129
13130 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13131
13132 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13133 inf_ptrace_detach_success.
13134 (inf_ptrace_detach_success): Add inferior parameter, use it
13135 instead of inferior_ptid, pass it to detach_inferior.
13136 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13137 parameter.
13138 * inferior.c (detach_inferior): Add overload that takes an
13139 inferior object.
13140 * inferior.h (detach_inferior): Likewise.
13141 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13142 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13143 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13144
13145 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13146
13147 * target.h (struct target_ops) <to_detach>: Add inferior
13148 parameter.
13149 (target_detach): Likewise.
13150 * target.c (dispose_inferior): Pass inferior down.
13151 (target_detach): Pass inferior down. Assert that it is equal to
13152 the current inferior.
13153 * aix-thread.c (aix_thread_detach): Pass inferior down.
13154 * corefile.c (core_file_command): Pass current_inferior() down.
13155 * corelow.c (core_detach): Add inferior parameter.
13156 * darwin-nat.c (darwin_detach): Likewise.
13157 * gnu-nat.c (gnu_detach): Likewise.
13158 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13159 * infcmd.c (detach_command): Pass current_inferior() down to
13160 target_detach.
13161 * infrun.c (follow_fork_inferior): Pass parent_inf to
13162 target_detach.
13163 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13164 target_detach.
13165 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13166 * linux-thread-db.c (thread_db_detach): Likewise.
13167 * nto-procfs.c (procfs_detach): Likewise.
13168 * procfs.c (procfs_detach): Likewise.
13169 * record.c (record_detach): Likewise.
13170 * record.h (struct inferior): Forward-declare.
13171 (record_detach): Add inferior parameter.
13172 * remote-sim.c (gdbsim_detach): Likewise.
13173 * remote.c (remote_detach_1): Likewise.
13174 (remote_detach): Likewise.
13175 (extended_remote_detach): Likewise.
13176 * sol-thread.c (sol_thread_detach): Likewise.
13177 * target-debug.h (target_debug_print_inferior_p): New macro.
13178 * target-delegates.c: Re-generate.
13179 * top.c (kill_or_detach): Pass inferior down to target_detach.
13180 * windows-nat.c (windows_detach): Add inferior parameter.
13181
13182 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13183
13184 * target.h (struct target_ops) <to_detach>: Remove args
13185 parameter.
13186 (target_detach): Likewise.
13187 * target.c (dispose_inferior): Adjust.
13188 (target_detach): Remove args parameter, adjust.
13189 * aix-thread.c (aix_thread_detach): Adjust.
13190 * corefile.c (core_file_command): Adjust.
13191 * corelow.c (core_detach): Adjust.
13192 * darwin-nat.c (darwin_detach): Adjust.
13193 * gnu-nat.c (gnu_detach): Adjust.
13194 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13195 * infcmd.c (detach_command): Adjust
13196 * infrun.c (follow_fork_inferior): Adjust.
13197 (handle_vfork_child_exec_or_exit): Adjust.
13198 * linux-fork.c (linux_fork_detach): Remove args parameter.
13199 * linux-fork.h (linux_fork_detach): Likewise.
13200 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13201 * linux-thread-db.c (thread_db_detach): Likewise.
13202 * nto-procfs.c (procfs_detach): Likewise.
13203 * procfs.c (procfs_detach): Likewise.
13204 (do_detach): Remove signo parameter.
13205 * record.c (record_detach): Remove args parameter.
13206 * record.h (record_detach): Likewise.
13207 * remote-sim.c (gdbsim_detach): Likewise.
13208 * remote.c (remote_detach_1): Likewise.
13209 (remote_detach): Likewise.
13210 (extended_remote_detach): Likewise.
13211 * sol-thread.c (sol_thread_detach): Likewise.
13212 * target-delegates.c: Re-generate.
13213 * top.c (struct qt_args) <args>: Remove field.
13214 (kill_or_detach): Don't pass args.
13215 (quit_force): Don't set args.
13216 * windows-nat.c (windows_detach): Remove args parameter.
13217
13218 2018-01-19 Yao Qi <yao.qi@linaro.org>
13219
13220 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13221 (arm_linux_init_abi): Install it.
13222
13223 2018-01-19 Yao Qi <yao.qi@linaro.org>
13224
13225 * osabi.c (gdb_osabi_names): Extend the regexp for
13226 arm-linux-gnueabihf.
13227
13228 2018-01-18 Yao Qi <yao.qi@linaro.org>
13229
13230 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13231 m_abbrevs.
13232 (abbrev_table::add_abbrev): Update.
13233 (abbrev_table::lookup_abbrev): Update.
13234
13235 2018-01-18 Yao Qi <yao.qi@linaro.org>
13236
13237 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13238
13239 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13240
13241 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13242 to "std::string".
13243
13244 2018-01-17 Tom Tromey <tom@tromey.com>
13245
13246 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13247
13248 2018-01-17 Tom Tromey <tom@tromey.com>
13249
13250 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13251 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13252 (create_array_type_with_stride): Update.
13253 * dwarf2read.c (set_die_type): Update.
13254
13255 2018-01-17 Tom Tromey <tom@tromey.com>
13256
13257 * dwarf2read.c (delayed_method_info): Remove typedef.
13258 (dwarf2_cu::method_info): Now a std::vector.
13259 (add_to_method_list): Update.
13260 (free_delayed_list): Remove.
13261 (compute_delayed_physnames): Update.
13262 (process_full_comp_unit, process_full_type_unit): Clear the method
13263 list. Remove cleanups.
13264 (psymtab_include_file_name): Add name_holder parameter. Use
13265 unique_xmalloc_ptr.
13266 (dwarf_decode_lines): Update.
13267
13268 2018-01-17 Tom Tromey <tom@tromey.com>
13269 Simon Marchi <simon.marchi@ericsson.com>
13270
13271 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13272 (dwarf2_per_objfile::free_cached_comp_units)
13273 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13274 (init_cutu_and_read_dies_no_follow): Update.
13275 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13276 (dwarf2_cu::~dwarf2_cu): New.
13277 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13278 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13279
13280 2018-01-17 Tom Tromey <tom@tromey.com>
13281 Simon Marchi <simon.marchi@ericsson.com>
13282
13283 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13284 (struct die_reader_specs) <abbrev_table>: New member.
13285 (struct abbrev_table): Add constructor.
13286 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13287 <abbrev_obstack>: Now an auto_obstack.
13288 (abbrev_table_up): New typedef.
13289 (init_cu_die_reader): Add abbrev_table parameter.
13290 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13291 Add result_dwo_abbrev_table.
13292 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13293 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13294 Update.
13295 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13296 parameter.
13297 (skip_children): Update.
13298 (abbrev_table::alloc_abbrev): Rename from
13299 abbrev_table_alloc_abbrev.
13300 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13301 (abbrev_table::lookup_abbrev): Rename from
13302 abbrev_table_lookup_abbrev.
13303 (abbrev_table_read_table): Return abbrev_table_up.
13304 (abbrev_table_free, abbrev_table_free_cleanup)
13305 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13306 (load_partial_dies): Update.
13307
13308 2018-01-17 Tom Tromey <tom@tromey.com>
13309
13310 * dwarf2read.c (dwarf2_compute_name): Update comment.
13311 (read_func_scope, read_variable): Update.
13312 (new_symbol): Remove.
13313 (new_symbol_full): Rename to new_symbol.
13314
13315 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13316
13317 PR gdb/16577
13318 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13319 a warning instead of throwing an error, set section size to 0 and return
13320 NULL.
13321 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13322
13323 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13324
13325 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13326 std::string.
13327 (linux_ptrace_attach_fail_reason_string): Likewise.
13328 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13329 Likewise.
13330 (linux_ptrace_attach_fail_reason_string): Likewise.
13331 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13332
13333 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13334
13335 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13336
13337 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13338
13339 PR gdb/21559
13340 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13341 checking for fs_base/gs_base fields in struct user_regs_struct.
13342 * configure: Regenerate.
13343
13344 2018-01-17 Yao Qi <yao.qi@linaro.org>
13345
13346 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13347 function.
13348 (aarch64_linux_init_abi): Install it to gdbarch hook
13349 gcc_target_options.
13350
13351 2018-01-15 Pedro Alves <palves@redhat.com>
13352
13353 * common/signals-state-save-restore.c
13354 (save_original_signals_state): Fix typos.
13355
13356 2017-01-12 Tom Tromey <tom@tromey.com>
13357 Sergio Durigan Junior <sergiodj@redhat.com>
13358
13359 * Makefile.in (install-only): Install gdb-add-index.
13360
13361 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13362
13363 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13364
13365 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13366
13367 * infrun.c (keep_going_pass_signal): Clear step-over info when
13368 insert_breakpoints fails.
13369
13370 2018-01-11 Pedro Alves <palves@redhat.com>
13371
13372 PR gdb/22583
13373 * infrun.c (resume): Rename to ...
13374 (resume_1): ... this.
13375 (resume): Reimplement as wrapper around resume_1.
13376
13377 2018-01-11 Pedro Alves <palves@redhat.com>
13378
13379 PR remote/22597
13380 * remote.c (remote_parse_stop_reply): Default to the last-set
13381 general thread instead of to 'magic_null_ptid'.
13382
13383 2018-01-10 Pedro Alves <palves@redhat.com>
13384
13385 * language.h (language_get_symbol_name_matcher): Rename ...
13386 (get_symbol_name_matcher): ... this.
13387 * language.c (language_get_symbol_name_matcher): Ditto.
13388 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13389 callers adjusted.
13390
13391 2018-01-10 Pedro Alves <palves@redhat.com>
13392
13393 PR gdb/22670
13394 * dwarf2read.c
13395 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13396 Adjust to use language_get_symbol_name_matcher instead of
13397 language_defn::la_get_symbol_name_matcher.
13398 * language.c (language_get_symbol_name_matcher): If in Ada mode
13399 and the lookup name is a verbatim match, return Ada's matcher.
13400 * language.h (language_get_symbol_name_matcher): Adjust comment.
13401 (ada_lookup_name_info::verbatim_p):: New method.
13402
13403 2018-01-10 Pedro Alves <palves@redhat.com>
13404
13405 PR gdb/22670
13406 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13407 minsym's language is language_auto or language_cplus, pass down
13408 language_ada instead.
13409 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13410
13411 2018-01-10 Pedro Alves <palves@redhat.com>
13412
13413 PR gdb/22670
13414 * minsyms.c (linkage_name_str): New function.
13415 (iterate_over_minimal_symbols): Use it.
13416
13417 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13418
13419 * NEWS: Document that 'info proc' now works on FreeBSD.
13420
13421 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13422
13423 * configure.ac: Check for kinfo_getfile in libutil.
13424 * configure: Regenerate.
13425 * config.in: Regenerate.
13426 * fbsd-nat.c: Include "fbsd-tdep.h".
13427 (fbsd_fetch_cmdline): New.
13428 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13429 rather than calling error.
13430 (fbsd_info_proc): New.
13431 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13432 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13433 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13434
13435 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13436
13437 * fbsd-nat.c (struct free_deleter): Remove.
13438 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13439
13440 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13441
13442 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13443 NULL for an empty pathname.
13444
13445 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13446
13447 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13448 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13449 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13450 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13451 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13452 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13453 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13454 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13455 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13456 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13457 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13458 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13459 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13460 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13461 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13462
13463 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13464
13465 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13466 (gnu_xfer_auxv): New function.
13467 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13468 TARGET_OBJECT_AUXV.
13469
13470 2018-01-08 Yao Qi <yao.qi@linaro.org>
13471 Simon Marchi <simon.marchi@ericsson.com>
13472
13473 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13474 common/selftest.c.
13475 (COMMON_OBS): Remove selftest.o.
13476 * configure.ac: Append selftest-arch.c and common/selftest.c to
13477 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13478 * configure: Re-generated.
13479 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13480 GDB_SELF_TEST.
13481 (maintenance_info_selftests): Likewise.
13482
13483 2018-01-08 Xavier Roirand <roirand@adacore.com>
13484
13485 * ada-valprint.c (val_print_packed_array_elements): Use
13486 proper number of elements when printing an array indexed
13487 by an enumeration type.
13488
13489 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13490
13491 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13492 (dw2_get_file_names_reader): Adjust.
13493 (lookup_dwo_signatured_type): Adjust.
13494 (lookup_dwp_signatured_type): Adjust.
13495 (lookup_signatured_type): Adjust.
13496 (create_type_unit_group): Adjust.
13497 (get_type_unit_group): Adjust.
13498 (process_psymtab_comp_unit_reader): Adjust.
13499 (build_type_psymtabs_reader): Adjust.
13500 (scan_partial_symbols): Adjust.
13501 (add_partial_symbol): Adjust.
13502 (add_partial_subprogram): Adjust.
13503 (peek_die_abbrev): Adjust.
13504 (fixup_go_packaging): Adjust.
13505 (process_imported_unit_die): Adjust.
13506 (dwarf2_compute_name): Adjust.
13507 (dwarf2_physname): Adjust.
13508 (read_import_statement): Adjust.
13509 (handle_DW_AT_stmt_list): Adjust.
13510 (read_file_scope): Adjust.
13511 (read_func_scope): Adjust.
13512 (read_lexical_block_scope): Adjust.
13513 (read_call_site_scope): Adjust.
13514 (read_variable): Adjust.
13515 (dwarf2_rnglists_process): Adjust.
13516 (dwarf2_ranges_process): Adjust.
13517 (dwarf2_ranges_read): Adjust.
13518 (dwarf2_get_pc_bounds): Adjust.
13519 (dwarf2_record_block_ranges): Adjust.
13520 (dwarf2_add_field): Adjust.
13521 (dwarf2_add_member_fn): Adjust.
13522 (read_structure_type): Adjust.
13523 (process_structure_scope): Adjust.
13524 (read_enumeration_type): Adjust.
13525 (read_array_type): Adjust.
13526 (mark_common_block_symbol_computed): Adjust.
13527 (read_common_block): Adjust.
13528 (read_namespace_type): Adjust.
13529 (read_namespace): Adjust.
13530 (read_module_type): Adjust.
13531 (read_tag_pointer_type): Adjust.
13532 (read_tag_ptr_to_member_type): Adjust.
13533 (read_tag_string_type): Adjust.
13534 (read_subroutine_type): Adjust.
13535 (read_typedef): Adjust.
13536 (read_base_type): Adjust.
13537 (attr_to_dynamic_prop): Adjust.
13538 (read_subrange_type): Adjust.
13539 (read_unspecified_type): Adjust.
13540 (dwarf2_read_abbrevs): Adjust.
13541 (load_partial_dies): Adjust.
13542 (read_partial_die): Adjust.
13543 (find_partial_die): Adjust.
13544 (guess_partial_die_structure_name): Adjust.
13545 (fixup_partial_die): Adjust.
13546 (read_attribute_value): Adjust.
13547 (read_addr_index): Adjust.
13548 (read_addr_index_from_leb128): Adjust.
13549 (read_str_index): Adjust.
13550 (dwarf2_string_attr): Adjust.
13551 (get_debug_line_section): Adjust.
13552 (dwarf_decode_line_header): Adjust.
13553 (lnp_state_machine::check_line_address): Adjust.
13554 (dwarf_decode_lines_1): Adjust.
13555 (dwarf_decode_lines): Adjust.
13556 (dwarf2_start_symtab): Adjust.
13557 (var_decode_location): Adjust.
13558 (new_symbol_full): Adjust.
13559 (dwarf2_const_value_data): Adjust.
13560 (dwarf2_const_value_attr): Adjust.
13561 (dwarf2_const_value): Adjust.
13562 (die_type): Adjust.
13563 (die_containing_type): Adjust.
13564 (build_error_marker_type): Adjust.
13565 (lookup_die_type): Adjust.
13566 (guess_full_die_structure_name): Adjust.
13567 (anonymous_struct_prefix): Adjust.
13568 (determine_prefix): Adjust.
13569 (dwarf2_name): Adjust.
13570 (follow_die_ref_or_sig): Adjust.
13571 (follow_die_offset): Adjust.
13572 (follow_die_ref): Adjust.
13573 (follow_die_sig_1): Adjust.
13574 (follow_die_sig): Adjust.
13575 (get_signatured_type): Adjust.
13576 (get_DW_AT_signature_type): Adjust.
13577 (decode_locdesc): Adjust.
13578 (dwarf_decode_macros): Adjust.
13579 (cu_debug_loc_section): Adjust.
13580 (fill_in_loclist_baton): Adjust.
13581 (dwarf2_symbol_mark_computed): Adjust.
13582 (init_one_comp_unit): Don't assign
13583 dwarf2_cu::dwarf2_per_objfile.
13584 (set_die_type): Adjust.
13585
13586 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13587
13588 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13589 <dwarf2_per_objfile>: New field.
13590 (dwarf2_per_objfile): Remove global.
13591 (get_dwarf2_per_objfile): New function.
13592 (set_dwarf2_per_objfile): New function.
13593 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13594 dwarf2_per_objfile.
13595 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13596 (read_abbrev_offset): Likewise.
13597 (read_indirect_string): Likewise.
13598 (read_indirect_line_string): Likewise.
13599 (read_indirect_string_at_offset): Likewise.
13600 (read_indirect_string_from_dwz): Likewise.
13601 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13602 dwarf2_per_objfile.
13603 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13604 (create_all_comp_units): Change objfile parameter to
13605 dwarf2_per_objfile.
13606 (create_all_type_units): Likewise.
13607 (process_queue): Add dwarf2_per_objfile parameter.
13608 (read_and_check_comp_unit_head): Likewise.
13609 (lookup_dwo_unit_in_dwp): Likewise.
13610 (get_dwp_file): Likewise.
13611 (process_cu_includes): Likewise.
13612 (struct free_dwo_file_cleanup_data): New struct.
13613 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13614 set_dwarf2_per_objfile.
13615 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13616 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13617 context, adjust calls.
13618 (dw2_instantiate_symtab): Likewise.
13619 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13620 (dw2_get_cu): Likewise.
13621 (create_cu_from_index_list): Change objfile parameter to
13622 dwarf2_per_objfile.
13623 (create_cus_from_index_list): Get dwarf2_per_objfile from
13624 context, adjust calls.
13625 (create_cus_from_index): Likewise.
13626 (create_signatured_type_table_from_index): Change objfile
13627 parameter to dwarf2_per_objfile.
13628 (create_signatured_type_table_from_debug_names): Change objfile
13629 parameter to dwarf2_per_objfile.
13630 (create_addrmap_from_index): Likewise.
13631 (create_addrmap_from_aranges): Likewise.
13632 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13633 (dw2_setup): Remove.
13634 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13635 context.
13636 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13637 get_dwarf2_per_objfile.
13638 (dw2_forget_cached_source_info): Likewise.
13639 (dw2_map_symtabs_matching_filename): Likewise.
13640 (struct dw2_symtab_iterator) <index>: Remove.
13641 <dwarf2_per_objfile>: New field.
13642 (dw2_symtab_iter_init): Replace index parameter with
13643 dwarf2_per_objfile.
13644 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13645 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13646 (dw2_print_stats): Likewise.
13647 (dw2_dump): Likewise.
13648 (dw2_expand_symtabs_for_function): Likewise.
13649 (dw2_expand_all_symtabs): Likewise.
13650 (dw2_expand_symtabs_with_fullname): Likewise.
13651 (dw2_expand_marked_cus): Replace index and objfile parameters
13652 with dwarf2_per_objfile.
13653 (dw_expand_symtabs_matching_file_matcher): Add
13654 dwarf2_per_objfile parameter and adjust calls.
13655 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13656 adjust calls.
13657 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13658 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13659 adjust calls.
13660 (create_cus_from_debug_names_list): Replace objfile parameter
13661 with dwarf2_per_objfile and adjust calls.
13662 (create_cus_from_debug_names): Likewise.
13663 (dwarf2_read_debug_names): Likewise.
13664 (mapped_debug_names::namei_to_name): Adjust call.
13665 (dw2_debug_names_iterator::next): Likewise.
13666 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13667 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13668 (dw2_debug_names_dump): Likewise.
13669 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13670 (dw2_debug_names_expand_symtabs_matching): Likewise.
13671 (dwarf2_initialize_objfile): Likewise.
13672 (dwarf2_build_psymtabs): Likewise.
13673 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13674 this_cu.
13675 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13676 (read_and_check_comp_unit_head): Likewise.
13677 (read_abbrev_offset): Likewise.
13678 (create_debug_type_hash_table): Likewise.
13679 (create_debug_types_hash_table): Likewise.
13680 (create_all_type_units): Replace objfile parameter with
13681 dwarf2_per_objfile.
13682 (add_type_unit): Add dwarf2_per_objfile parameter.
13683 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13684 with dwarf2_per_objfile.
13685 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13686 (lookup_dwp_signatured_type): Likewise.
13687 (lookup_signatured_type): Likewise.
13688 (read_cutu_die_from_dwo): Likewise.
13689 (init_tu_and_read_dwo_dies): Likewise.
13690 (init_cutu_and_read_dies): Likewise.
13691 (init_cutu_and_read_dies_no_follow): Likewise.
13692 (allocate_type_unit_groups_table): Add objfile parameter.
13693 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13694 (get_type_unit_group): Likewise.
13695 (process_psymtab_comp_unit): Update call.
13696 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13697 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13698 (print_tu_stats): Likewise.
13699 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13700 in void* parameter.
13701 (build_type_psymtabs): Change objfile parameter to
13702 dwarf2_per_objfile.
13703 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13704 passed in void* parameter.
13705 (process_skeletonless_type_units): Change objfile parameter to
13706 dwarf2_per_objfile.
13707 (set_partial_user): Likewise.
13708 (dwarf2_build_psymtabs_hard): Likewise.
13709 (read_comp_units_from_section): Likewise.
13710 (create_all_comp_units): Likewise.
13711 (scan_partial_symbols): Update calls.
13712 (add_partial_symbol): Likewise.
13713 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13714 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13715 (process_queue): Add dwarf2_per_objfile parameter.
13716 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13717 (compute_compunit_symtab_includes): Likewise.
13718 (process_cu_includes): Add dwarf2_per_objfile parameter.
13719 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13720 (process_full_type_unit): Likewise.
13721 (process_imported_unit_die): Update call.
13722 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13723 (read_file_scope): Likewise.
13724 (allocate_dwo_file_hash_table): Add objfile parameter.
13725 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13726 (create_cus_hash_table): Likewise.
13727 (create_dwp_hash_table): Likewise.
13728 (create_dwo_unit_in_dwp_v1): Likewise.
13729 (create_dwp_v2_section): Likewise.
13730 (create_dwo_unit_in_dwp_v2): Likewise.
13731 (lookup_dwo_unit_in_dwp): Likewise.
13732 (try_open_dwop_file): Likewise.
13733 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13734 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13735 cleanup to include a reference to dwarf2_per_objfile.
13736 (open_dwp_file): Add dwarf2_per_objfile parameter.
13737 (open_and_init_dwp_file): Likewise.
13738 (get_dwp_file): Likewise.
13739 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13740 (queue_and_load_all_dwo_tus): Update call.
13741 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13742 data.
13743 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13744 (dwarf2_ranges_process): Likewise.
13745 (dwarf2_get_pc_bounds): Likewise.
13746 (mark_common_block_symbol_computed): Likewise.
13747 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13748 (dwarf2_read_abbrevs): Update call.
13749 (read_partial_die): Use dwarf2_per_objfile from cu.
13750 (find_partial_die): Likewise.
13751 (fixup_partial_die): Likewise.
13752 (read_attribute_value): Likewise.
13753 (read_indirect_string_at_offset_from): Add objfile parameter.
13754 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13755 parameter.
13756 (read_indirect_string_from_dwz): Add objfile parameter.
13757 (read_indirect_string): Add objfile parameter.
13758 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13759 (read_addr_index): Use dwarf2_per_objfile from cu.
13760 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13761 call dw2_setup.
13762 (read_str_index): Use dwarf2_per_objfile from cu.
13763 (get_debug_line_section): Likewise.
13764 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13765 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13766 (new_symbol_full): Use dwarf2_per_objfile from cu.
13767 (build_error_marker_type): Likewise.
13768 (lookup_die_type): Likewise.
13769 (determine_prefix): Likewise.
13770 (follow_die_offset): Likewise.
13771 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13772 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13773 (dwarf2_fetch_die_type_sect_off): Likewise.
13774 (dwarf2_get_die_type): Likewise.
13775 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13776 (get_signatured_type): Likewise.
13777 (get_DW_AT_signature_type): Likewise.
13778 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13779 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13780 (cu_debug_loc_section): Likewise.
13781 (fill_in_loclist_baton): Likewise.
13782 (dwarf2_symbol_mark_computed): Likewise.
13783 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13784 dwarf2_per_objfile.
13785 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13786 parameter.
13787 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13788 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13789 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13790 (set_die_type): Use dwarf2_free_objfile from cu.
13791 (get_die_type_at_offset): Likewise.
13792 (dwarf2_per_objfile_free): Don't assign global variable.
13793 (debug_names) <constructor>: Add dwarf2_per_objfile
13794 parameter, update m_debugstrlookup construction.
13795 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13796 parameter.
13797 <m_dwarf2_per_objfile>: New field.
13798 <lookup>: Use m_dwarf2_per_objfile.
13799 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13800 (psyms_seen_size): Likewise.
13801 (write_gdbindex): Replace objfile parameter with
13802 dwarf2_per_objfile.
13803 (write_debug_names): Likewise.
13804 (write_psymtabs_to_index): Likewise.
13805 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13806 calls.
13807
13808 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13809
13810 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13811 <dwarf2_per_objfile>: New field.
13812 (struct dwarf2_per_cu_data) <objfile>: Remove.
13813 <dwarf2_per_objfile>: New field.
13814 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13815 of objfile.
13816 (create_signatured_type_table_from_index): Likewise.
13817 (create_debug_type_hash_table): Likewise.
13818 (fill_in_sig_entry_from_dwo_entry): Likewise.
13819 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13820 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13821 objfile.
13822 (create_partial_symtab): Access objfile through
13823 dwarf2_per_objfile.
13824 (process_psymtab_comp_unit_reader): Likewise.
13825 (read_comp_units_from_section): Likewise.
13826 (scan_partial_symbols): Likewise.
13827 (add_partial_symbol): Likewise.
13828 (add_partial_subprogram): Likewise.
13829 (peek_die_abbrev): Likewise.
13830 (fixup_go_packaging): Likewise.
13831 (process_full_comp_unit): Likewise.
13832 (process_full_type_unit): Likewise.
13833 (process_imported_unit_die): Likewise.
13834 (dwarf2_compute_name): Likewise.
13835 (dwarf2_physname): Likewise.
13836 (read_import_statement): Likewise.
13837 (create_cus_hash_table): Assign dwarf2_physname instead of
13838 objfile.
13839 (read_func_scope): Access objfile through dwarf2_per_objfile.
13840 (read_lexical_block_scope): Likewise.
13841 (read_call_site_scope): Likewise.
13842 (read_variable): Likewise.
13843 (dwarf2_rnglists_process): Likewise.
13844 (dwarf2_ranges_process): Likewise.
13845 (dwarf2_ranges_read): Likewise.
13846 (dwarf2_record_block_ranges): Likewise.
13847 (dwarf2_add_field): Likewise.
13848 (dwarf2_add_member_fn): Likewise.
13849 (read_structure_type): Likewise.
13850 (process_structure_scope): Likewise.
13851 (read_enumeration_type): Likewise.
13852 (read_array_type): Likewise.
13853 (read_common_block): Likewise.
13854 (read_namespace_type): Likewise.
13855 (read_namespace): Likewise.
13856 (read_module_type): Likewise.
13857 (read_tag_pointer_type): Likewise.
13858 (read_tag_ptr_to_member_type): Likewise.
13859 (read_tag_string_type): Likewise.
13860 (read_subroutine_type): Likewise.
13861 (read_typedef): Likewise.
13862 (read_base_type): Likewise.
13863 (attr_to_dynamic_prop): Likewise.
13864 (read_subrange_type): Likewise.
13865 (read_unspecified_type): Likewise.
13866 (load_partial_dies): Likewise.
13867 (read_partial_die): Likewise.
13868 (find_partial_die): Likewise.
13869 (guess_partial_die_structure_name): Likewise.
13870 (fixup_partial_die): Likewise.
13871 (read_attribute_value): Likewise.
13872 (read_addr_index_from_leb128): Likewise.
13873 (dwarf2_read_addr_index): Likewise.
13874 (dwarf2_string_attr): Likewise.
13875 (lnp_state_machine::check_line_address): Likewise.
13876 (dwarf_decode_lines_1): Likewise.
13877 (dwarf_decode_lines): Likewise.
13878 (dwarf2_start_symtab): Likewise.
13879 (var_decode_location): Likewise.
13880 (new_symbol_full): Likewise.
13881 (dwarf2_const_value_data): Likewise.
13882 (dwarf2_const_value_attr): Likewise.
13883 (dwarf2_const_value): Likewise.
13884 (die_type): Likewise.
13885 (die_containing_type): Likewise.
13886 (lookup_die_type): Likewise.
13887 (guess_full_die_structure_name): Likewise.
13888 (anonymous_struct_prefix): Likewise.
13889 (dwarf2_name): Likewise.
13890 (follow_die_ref_or_sig): Likewise.
13891 (follow_die_offset): Likewise.
13892 (follow_die_ref): Likewise.
13893 (dwarf2_fetch_die_loc_sect_off): Likewise.
13894 (dwarf2_fetch_constant_bytes): Likewise.
13895 (dwarf2_fetch_die_type_sect_off): Likewise.
13896 (dwarf2_get_die_type): Likewise.
13897 (follow_die_sig): Likewise.
13898 (decode_locdesc): Likewise.
13899 (dwarf2_per_cu_objfile): Likewise.
13900 (dwarf2_per_cu_text_offset): Likewise.
13901 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13902 objfile.
13903 (set_die_type): Access objfile through
13904 dwarf2_per_objfile.
13905
13906 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13907
13908 * valprint.c (converted_character_d): Remove typedef.
13909 (DEF_VEC_O (converted_character_d)): Remove.
13910 (count_next_character): Use std::vector.
13911 (print_converted_chars_to_obstack): Likewise.
13912 (generic_printstr): Likewise.
13913
13914 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13915
13916 * xml-support.h (struct gdb_xml_value): Add constructor.
13917 <value>: Change type to unique_xmalloc_ptr.
13918 (gdb_xml_value_s): Remove typedef.
13919 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13920 (gdb_xml_element_start_handler): Change parameter type to
13921 std::vector.
13922 (xml_find_attribute): Likewise.
13923 * xml-support.c (xml_find_attribute): Change parameter type to
13924 std::vector and adjust.
13925 (gdb_xml_values_cleanup): Remove.
13926 (gdb_xml_parser::start_element): Adjust to std::vector.
13927 (xinclude_start_include): Change paraeter type to std::vector
13928 and adjust.
13929 * btrace.c (check_xml_btrace_version): Likewise.
13930 (parse_xml_btrace_block): Likewise.
13931 (parse_xml_btrace_pt_config_cpu): Likewise.
13932 (parse_xml_btrace_pt): Likewise.
13933 (parse_xml_btrace_conf_bts): Likewise.
13934 (parse_xml_btrace_conf_pt): Likewise.
13935 * memory-map.c (memory_map_start_memory): Likewise.
13936 (memory_map_start_property): Likewise.
13937 * osdata.c (osdata_start_osdata): Likewise.
13938 (osdata_start_item): Likewise.
13939 (osdata_start_column): Likewise.
13940 * remote.c (start_thread): Likewise.
13941 * solib-aix.c (library_list_start_library): Likewise.
13942 (library_list_start_list): Likewise.
13943 * solib-svr4.c (library_list_start_library): Likewise.
13944 (svr4_library_list_start_list): Likewise.
13945 * solib-target.c (library_list_start_segment): Likewise.
13946 (library_list_start_section): Likewise.
13947 (library_list_start_library): Likewise.
13948 (library_list_start_list): Likewise.
13949 * tracepoint.c (traceframe_info_start_memory): Likewise.
13950 (traceframe_info_start_tvar): Likewise.
13951 * xml-syscall.c (syscall_start_syscall): Likewise.
13952 * xml-tdesc.c (tdesc_start_target): Likewise.
13953 (tdesc_start_feature): Likewise.
13954 (tdesc_start_reg): Likewise.
13955 (tdesc_start_union): Likewise.
13956 (tdesc_start_struct): Likewise.
13957 (tdesc_start_flags): Likewise.
13958 (tdesc_start_enum): Likewise.
13959 (tdesc_start_field): Likewise.
13960 (tdesc_start_enum_value): Likewise.
13961 (tdesc_start_vector): Likewise.
13962
13963 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13964
13965 * extension.h (struct xmethod_worker) <clone>: Remove.
13966 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13967 Remove.
13968 (python_xmethod_worker::clone): Remove.
13969 * valops.c (find_overload_match): Use std::move instead of
13970 clone.
13971
13972 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13973
13974 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13975 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13976 <free_xmethod_worker_data>: Remove.
13977 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13978 <get_xmethod_arg_types>: Remove.
13979 <get_xmethod_result_type>: Remove.
13980 <invoke_xmethod>: Remove.
13981 * extension.c (new_xmethod_worker): Remove.
13982 (clone_xmethod_worker): Remove.
13983 (get_matching_xmethod_workers): Return void, pass std::vector by
13984 pointer.
13985 (get_xmethod_arg_types): Rename to...
13986 (xmethod_worker::get_arg_types): ... this, and adjust.
13987 (get_xmethod_result_type): Rename to...
13988 (xmethod_worker::get_result_type): ... this, and adjust.
13989 (invoke_xmethod): Remove.
13990 (free_xmethod_worker): Remove.
13991 (free_xmethod_worker_vec): Remove.
13992 * extension.h (enum ext_lang_rc): Move here from
13993 extension-priv.h.
13994 (struct xmethod_worker): Add constructor and destructor.
13995 <data>: Remove.
13996 <value>: Remove.
13997 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13998 virtual pure methods.
13999 <get_arg_types, get_result_type>: New methods.
14000 (xmethod_worker_ptr): Remove typedef.
14001 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14002 (xmethod_worker_vec): Remove typedef.
14003 (xmethod_worker_up): New typedef.
14004 (invoke_xmethod): Remove.
14005 (clone_xmethod_worker): Remove.
14006 (free_xmethod_worker): Remove.
14007 (free_xmethod_worker_vec): Remove.
14008 (get_xmethod_arg_types): Remove.
14009 (get_xmethod_result_type): Remove.
14010 * valops.c (find_method_list): Use std::vector, don't use
14011 intermediate vector.
14012 (value_find_oload_method_list): Use std::vector.
14013 (find_overload_match): Use std::vector.
14014 (find_oload_champ): Use std::vector.
14015 * value.c (value_free): Use operator delete.
14016 (value_of_xmethod): Rename to...
14017 (value_from_xmethod): ... this. Don't assign
14018 xmethod_worker::value, take rvalue-reference.
14019 (result_type_of_xmethod): Adjust.
14020 (call_xmethod): Adjust.
14021 * value.h: Include extension.h.
14022 (struct xmethod_worker): Don't forward-declare.
14023 (value_of_xmethod): Rename to...
14024 (value_from_xmethod): ... this, take rvalue-reference.
14025 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14026 (struct python_xmethod_worker): ... this, add constructor and
14027 destructor.
14028 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14029 (gdbpy_free_xmethod_worker_data): Rename to...
14030 (python_xmethod_worker::~python_xmethod_worker): ... this and
14031 adjust.
14032 (gdbpy_clone_xmethod_worker_data): Rename to...
14033 (python_xmethod_worker::clone): ... this and adjust.
14034 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14035 temporary vector.
14036 (gdbpy_get_xmethod_arg_types): Rename to...
14037 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14038 (gdbpy_get_xmethod_result_type): Rename to...
14039 (python_xmethod_worker::do_get_result_type): ... this and
14040 adjust.
14041 (gdbpy_invoke_xmethod): Rename to...
14042 (python_xmethod_worker::invoke): ... this and adjust.
14043 (new_python_xmethod_worker): Rename to...
14044 (python_xmethod_worker::python_xmethod_worker): ... this and
14045 adjust.
14046 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14047 Remove.
14048 (gdbpy_free_xmethod_worker_data): Remove.
14049 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14050 (gdbpy_get_xmethod_arg_types): Remove.
14051 (gdbpy_get_xmethod_result_type): Remove.
14052 (gdbpy_invoke_xmethod): Remove.
14053 * python/python.c (python_extension_ops): Remove obsolete
14054 callbacks.
14055
14056 2018-01-05 Pedro Alves <palves@redhat.com>
14057
14058 PR gdb/18653
14059 * common/signals-state-save-restore.c
14060 (save_original_signals_state): New parameter 'quiet'. Warn if we
14061 find a custom handler preinstalled, instead of internal erroring.
14062 But only warn if !quiet.
14063 * common/signals-state-save-restore.h
14064 (save_original_signals_state): New parameter 'quiet'.
14065 * main.c (captured_main_1): Move save_original_signals_state call
14066 after option handling, and pass QUIET.
14067
14068 2018-01-05 Pedro Alves <palves@redhat.com>
14069
14070 * spu-tdep.c (spu_catch_start): Pass
14071 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14072
14073 2018-01-05 Pedro Alves <palves@redhat.com>
14074
14075 PR gdb/22670
14076 * ada-lang.c (literal_symbol_name_matcher): New function.
14077 (ada_get_symbol_name_matcher): Use it for
14078 symbol_name_match_type::SEARCH_NAME.
14079 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14080 it down instead of assuming symbol_name_match_type::FULL.
14081 * block.h (block_lookup_symbol): New parameter 'match_type'.
14082 * c-valprint.c (print_unpacked_pointer): Use
14083 lookup_symbol_search_name instead of lookup_symbol.
14084 * compile/compile-object-load.c (get_out_value_type): Pass down
14085 symbol_name_match_type::SEARCH_NAME.
14086 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14087 symbol_name_match_type::FULL.
14088 * cp-support.c (cp_get_symbol_name_matcher): Handle
14089 symbol_name_match_type::SEARCH_NAME.
14090 * infrun.c (insert_exception_resume_breakpoint): Use
14091 lookup_symbol_search_name.
14092 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14093 * psymtab.c (maintenance_check_psymtabs): Use
14094 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14095 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14096 SYMBOL_SEARCH_NAME.
14097 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14098 if symbol_name_match_type::SEARCH_NAME.
14099 (lookup_symbol_in_language): Pass down
14100 symbol_name_match_type::FULL.
14101 (lookup_symbol_search_name): New.
14102 (lookup_language_this): Pass down
14103 symbol_name_match_type::SEARCH_NAME.
14104 (lookup_symbol_aux, lookup_local_symbol): New parameter
14105 'match_type'. Pass it down.
14106 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14107 (lookup_symbol_search_name): New declaration.
14108 (lookup_symbol_in_block): New 'match_type' parameter.
14109
14110 2018-01-05 Pedro Alves <palves@redhat.com>
14111
14112 PR gdb/22670
14113 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14114 ada_lookup_symbol.
14115 (ada_lookup_symbol): Reimplement in terms of
14116 ada_lookup_symbol_list, bits factored out from
14117 ada_lookup_encoded_symbol.
14118
14119 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14120
14121 * ada-exp.y (write_object_renaming): When subscripting an array
14122 using a symbol as the index, pass the block in call to
14123 ada_lookup_encoded_symbol when looking that symbol up.
14124
14125 2018-01-05 Jerome Guitton <guitton@adacore.com>
14126
14127 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14128 TYPE_INDEX_TYPE.
14129
14130 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14131
14132 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14133 the case where VALUE_LVAL (val0) is not lval_memory.
14134
14135 2018-01-05 Xavier Roirand <roirand@adacore.com>
14136
14137 * ada-valprint.c (print_optional_low_bound): Handle
14138 character-indexed array printing like boolean-indexed array
14139 printing.
14140
14141 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14142
14143 * NEWS: Create a new section for the next release branch.
14144 Rename the section of the current branch, now that it has
14145 been cut.
14146
14147 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14148
14149 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14150 * version.in: Bump version to 8.1.50.DATE-git.
14151
14152 2018-01-03 Xavier Roirand <roirand@adacore.com>
14153
14154 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14155 Add field.
14156 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14157 Add field.
14158 (default_exception_support_info) <catch_handlers_sym>: Add field.
14159 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14160 (ada_exception_name_addr_1): Add "catch handlers" handling.
14161 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14162 Update all callers.
14163 (create_excep_cond_exprs) <ex>: Add parameter.
14164 (re_set_exception): Update create_excep_cond_exprs call.
14165 (print_it_exception, print_one_exception, print_mention_exception)
14166 (print_recreate_exception): Add "catch handler" handling.
14167 (allocate_location_catch_handlers, re_set_catch_handlers)
14168 (check_status_catch_handlers, print_it_catch_handlers)
14169 (print_one_catch_handlers, print_mention_catch_handlers)
14170 (print_recreate_catch_handlers): New function.
14171 (catch_handlers_breakpoint_ops): New variable.
14172 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14173 Add parameter. Add "catch handler" handling.
14174 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14175 Add "catch handler" handling.
14176 (ada_exception_catchpoint_cond_string): Add "catch handler"
14177 handling.
14178 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14179 call.
14180 (catch_ada_handlers_command): New function.
14181 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14182 operations structure.
14183 (_initialize_ada_language): Add "catch handlers" command entry.
14184 * NEWS: Document "catch handlers" feature.
14185
14186 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14187
14188 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14189 account when creating the array type of the slice.
14190 (ada_value_slice): Likewise.
14191
14192 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14193
14194 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14195 New enum value.
14196 (create_array_type_with_stride): Add byte_stride_prop parameter.
14197 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14198 New parameter. Update all callers in this file.
14199 (array_type_has_dynamic_stride): New function.
14200 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14201 of arrays with dynamic byte strides.
14202 * dwarf2read.c (read_array_type): Add support for dynamic
14203 DW_AT_byte_stride attributes.
14204
14205 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14206
14207 * dwarf2read.c (read_unspecified_type): Treat
14208 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14209
14210 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14211
14212 Update copyright year range in all GDB files.
14213
14214 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14215
14216 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14217 and gdb/testsuite/gdb.base/step-line.c.
14218
14219 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14220
14221 * copyright.py (main): Dump the contents of
14222 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14223 even if BY_HAND is empty.
14224
14225 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14226
14227 * top.c (print_gdb_version): Update Copyright year in version
14228 message.
14229
14230 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14231
14232 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14233
14234 For older changes see ChangeLog-2017.
14235 \f
14236 Local Variables:
14237 mode: change-log
14238 left-margin: 8
14239 fill-column: 74
14240 version-control: never
14241 coding: utf-8
14242 End: