97ee73bab38511a212fc44f878a03d880350b413
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-03 Tom Tromey <tom@tromey.com>
2
3 * c-exp.y (parse_number): Work in unsigned. Remove casts.
4
5 2018-10-03 Tom Tromey <tom@tromey.com>
6
7 * dwarf2read.c (read_subrange_type): Make "negative_mask"
8 unsigned.
9
10 2018-10-03 Tom Tromey <tom@tromey.com>
11
12 * findvar.c (extract_integer): Do work in an unsigned type.
13
14 2018-10-03 Tom Tromey <tom@tromey.com>
15
16 * common/enum-flags.h (enum_flags::operator~): Add static assert.
17 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
18 base type.
19 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
20 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
21 type.
22 * c-lang.h (enum c_string_type_values): Use unsigned as base
23 type.
24 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
25
26 2018-10-03 Tom Tromey <tom@tromey.com>
27
28 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
29 <~dwarf2_frame_state_reg_info>: Update.
30 <dwarf2_frame_state_reg_info>: Update.
31 <alloc_regs>: Add assertion. Update.
32 <reg>: Now a std::vector.
33 <num_regs>: Remove.
34 <swap>: Update.
35 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
36 (execute_cfa_program_test, dwarf2_frame_cache): Update.
37
38 2018-10-03 Tom Tromey <tom@tromey.com>
39
40 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
41
42 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
43
44 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
45
46 2018-10-02 Tom Tromey <tom@tromey.com>
47
48 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
49
50 2018-10-02 John Darrington <john@darrington.wattle.id.au>
51
52 * NEWS: Mention changed commands.
53 * ser-uds.c: New file.
54 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
55 * configure: Regenerate.
56 * Makefile.in: Add new file.
57 * serial.c (serial_open): Check if filename is a socket
58 and lookup the appropriate interface accordingly.
59
60 2018-10-01 Alan Hayward <alan.hayward@arm.com>
61
62 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
63 define.
64 (AARCH64_EXTRA_MAGIC): Likewise.
65 (AARCH64_FPSIMD_MAGIC): Likewise.
66 (AARCH64_SVE_MAGIC): Likewise.
67 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
68 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
69 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
70 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
71 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
72 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
73 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
74 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
75 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
76 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
77 (read_aarch64_ctx): Add function.
78 (aarch64_linux_sigframe_init): Detect FP registers.
79
80 2018-10-01 Alan Hayward <alan.hayward@arm.com>
81
82 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
83 (AARCH64_D0_REGNUM): Likewise.
84 (AARCH64_S0_REGNUM): Likewise.
85 (AARCH64_H0_REGNUM): Likewise.
86 (AARCH64_B0_REGNUM): Likewise.
87 (AARCH64_SVE_V0_REGNUM): Likewise.
88 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
89 (AARCH64_D0_REGNUM): Likewise.
90 (AARCH64_S0_REGNUM): Likewise.
91 (AARCH64_H0_REGNUM): Likewise.
92 (AARCH64_B0_REGNUM): Likewise.
93 (AARCH64_SVE_V0_REGNUM): Likewise.
94
95 2018-10-01 Gary Benson <gbenson@redhat.com>
96
97 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
98 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
99 prfpregset_t instead of gdb_prfpregset_t.
100 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
101 * configure, config.in: Rebuild.
102
103 2018-10-01 Gary Benson <gbenson@redhat.com>
104
105 * common/gdb_proc_service.h: New file, factored out from...
106 * gdb_proc_service.h: Moved common code to the above file.
107 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
108
109 2018-10-01 Gary Benson <gbenson@redhat.com>
110
111 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
112 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
113
114 2018-10-01 Gary Benson <gbenson@redhat.com>
115
116 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
117 (AC_CHECK_HEADERS): Check for linux/elf.h.
118 * configure, config.in: Rebuild.
119 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
120 doesn't define elf_fpregset_t.
121
122 2018-10-01 Gary Benson <gbenson@redhat.com>
123
124 * gdb_proc_service.h: Whitespace change.
125
126 2018-10-01 Tom Tromey <tom@tromey.com>
127
128 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
129 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
130 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
131
132 2018-10-01 Tom Tromey <tom@tromey.com>
133
134 * README: Minor change.
135
136 2018-09-30 Pedro Alves <palves@redhat.com>
137
138 * darwin-nat-info.c (darwin_debug_regions_recurse)
139 (info_mach_exceptions_command): Remove unused local variables.
140 * darwin-nat.c (darwin_decode_notify_message)
141 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
142 (darwin_stop_inferior, darwin_setup_exceptions)
143 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
144 (darwin_nat_target::attach, darwin_nat_target::detach)
145 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
146 local variables.
147 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
148 variables.
149
150 2018-09-29 Tom Tromey <tom@tromey.com>
151
152 * README: Remove some leftover text.
153
154 2018-09-29 Tom Tromey <tom@tromey.com>
155
156 * PROBLEMS: Rewrite.
157 * README: Update.
158
159 2018-09-28 John Baldwin <jhb@FreeBSD.org>
160
161 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
162 case with explicit breakpoint kind.
163 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
164 'additional_info' and related logic.
165 (riscv_debug_breakpoints): New variable.
166 (riscv_breakpoint_kind_from_pc): Use the length of the existing
167 instruction to determine the breakpoint kind.
168 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
169 flag. Update description of 'set/show riscv
170 use-compressed-breakpoints' flag.
171
172 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
173
174 (NEWS): Mention changes to frame related commands.
175 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
176 (add_prefix_cmd_suppress_notification): New function.
177 (add_com_suppress_notification): Call
178 add_cmd_suppress_notification.
179 * command.h (add_cmd_suppress_notification): Declare.
180 (add_prefix_cmd_suppress_notification): Declare.
181 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
182 (parse_frame_specification): Moved from stack.c, with
183 simplification to handle a single argument.
184 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
185 switch to the selected frame. Add a header comment.
186 * stack.c: Remove 'safe-ctype.h' include.
187 (find_frame_for_function): Add declaration.
188 (find_frame_for_address): New function.
189 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
190 (frame_selection_by_function_completer): New function.
191 (info_frame_command): Rename to...
192 (info_frame_command_core): ...this, and update parameter types.
193 (select_frame_command): Rename to...
194 (select_frame_command_core): ...this, and update parameter types.
195 (frame_command): Rename to...
196 (frame_command_core): ...this, and update parameter types.
197 (class frame_command_helper): New class to wrap implementations of
198 frame related sub-commands.
199 (frame_apply_cmd_list): New static global.
200 (frame_cmd_list): Make static.
201 (select_frame_cmd_list): New global for sub-commands.
202 (info_frame_cmd_list): New global for sub-commands.
203 (_initialize_stack): Register sub-commands for 'frame',
204 'select-frame', and 'info frame'. Update 'frame apply' commands
205 to use frame_apply_cmd_list. Move function local static
206 frame_apply_list to file static frame_apply_cmd_list for
207 consistency.
208 * stack.h (select_frame_command): Delete declarationn.
209 (select_frame_for_mi): Declare new function.
210
211 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
212
213 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
214 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
215 and NOP.
216
217 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
218
219 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
220
221 2018-09-26 Tom Tromey <tom@tromey.com>
222
223 * valops.c (auto_abandon): Remove dead code.
224
225 2018-09-26 Tom Tromey <tom@tromey.com>
226
227 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
228
229 2018-09-24 Tom Tromey <tom@tromey.com>
230
231 * common/pathstuff.c (get_standard_cache_dir): Make
232 "xdg_cache_home" and "home" const.
233 * top.c (init_history): Make "tmpenv" const.
234 * main.c (get_init_files): Make "homedir" const.
235
236 2018-09-23 Tom Tromey <tom@tromey.com>
237
238 PR python/18852:
239 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
240
241 2018-09-23 Tom Tromey <tom@tromey.com>
242
243 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
244 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
245 * python/python-internal.h (gdbpy_handle_exception): Declare.
246 * python/py-utils.c (gdbpy_handle_exception): New function.
247
248 2018-09-23 Tom Tromey <tom@tromey.com>
249
250 PR python/17284:
251 * python/py-type.c (typy_template_argument): Check for negative
252 argument number.
253
254 2018-09-23 Tom Tromey <tom@tromey.com>
255
256 PR python/14062:
257 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
258
259 2018-09-23 Tom Tromey <tom@tromey.com>
260
261 PR python/18170:
262 * python/py-value.c (valpy_int): Allow conversion from pointer
263 type.
264
265 2018-09-23 Tom Tromey <tom@tromey.com>
266
267 PR python/20126:
268 * python/py-value.c (valpy_int): Respect type sign.
269
270 2018-09-23 Tom Tromey <tom@tromey.com>
271
272 PR python/18352;
273 * python/py-value.c (valpy_float): Allow conversions from int or
274 char.
275 (valpy_int, valpy_long): Allow conversions from float.
276
277 2018-09-23 Tom Tromey <tom@tromey.com>
278
279 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
280 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
281
282 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
283
284 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
285 __sighndlr.
286 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
287
288 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
289
290 * windows-nat.c (windows_nat_target::wait): Remove a spurious
291 target_terminal::ours().
292
293 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
294
295 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
296 of vl to ULONGEST.
297
298 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
299
300 * breakpoint.c (update_inserted_breakpoint_locations): Remove
301 redundant condition.
302
303 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
304
305 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
306
307 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
308 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
309 * sol-thread.c (ps_pdmodel): Don't guard definition.
310
311 * procfs.c: Fix formatting.
312
313 * procfs.c (sysset_t_alloc): Remove.
314 (create_procinfo): Use XNEW instead of sysset_t_alloc.
315 (procfs_debug_inferior): Likewise.
316 (procfs_set_exec_trap): Likewise.
317 (proc_set_traced_sysentry): Don't allocate argp dynamically.
318 (proc_set_traced_sysexit): Likewise.
319
320 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
321 (dead_procinfo): Likewise.
322 (proc_warn): Likewise.
323 (proc_error): Likewise.
324 (proc_get_LDT_entry): Likewise.
325 (do_attach): Likewise.
326 (procfs_target::pid_to_str): Likewise.
327 (iterate_over_mappings): Likewise.
328
329 * procfs.c (create_procinfo): Fix ARI warning.
330 (proc_get_status): Likewise.
331 (proc_stop_process): Likewise.
332 (proc_run_process): Likewise.
333 (proc_kill): Likewise.
334 (proc_get_LDT_entry): Likewise.
335 (procfs_find_LDT_entry): Likewise.
336 (proc_update_threads): Likewise.
337 (proc_iterate_over_threads): Likewise.
338 (do_attach): Likewise.
339 (procfs_xfer_memory): Likewise.
340 (invalidate_cache): Likewise.
341 (procfs_target::resume): Likewise.
342 (procfs_init_inferior): Likewise.
343 (procfs_set_exec_trap): Likewise.
344 (procfs_target::thread_alive): Likewise.
345 (procfs_target::pid_to_exec_file): Likewise.
346 (iterate_over_mappings): Likewise.
347 (procfs_target::make_corefile_notes): Likewise.
348 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
349
350 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
351 (procfs_find_LDT_entry): Likewise.
352 * sol-thread.c (ps_lgetLDT): Likewise.
353
354 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
355
356 PR tdep/17903
357 * procfs.c (procfs_target): Declare pid_to_exec_file.
358 (procfs_target::pid_to_exec_file): New.
359
360 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
361
362 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
363 renaming.
364 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
365 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
366
367 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
368
369 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
370 (supply_fpregset, fill_fpregset): Move ...
371 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
372 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
373 Remove references to ioctl-based procfs.
374 Include <sys/reg.h>.
375 Remove PR_MODEL_NATIVE guards.
376 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
377 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
378
379 2018-09-19 Xavier Roirand <roirand@adacore.com>
380
381 PR gdb/20981:
382 * solib-darwin.c (darwin_get_dyld_bfd): New function.
383 (darwin_solib_get_all_image_info_addr_at_init): Update call.
384 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
385
386 2018-09-19 John Baldwin <jhb@FreeBSD.org>
387
388 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
389 (fbsd_print_sockaddr_in6): Likewise.
390
391 2018-09-19 Richard Bunt <richard.bunt@arm.com>
392 Chris January <chris.january@arm.com>
393
394 * eval.c (skip_undetermined_arglist): Skip argument list helper.
395 (evaluate_subexp_standard): Return a dummy type when
396 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
397 OP_F77_UNDETERMINED_ARGLIST case.
398 * expression.h (enum noside): Update comment.
399
400 2018-09-19 George Vasick <george.vasick@oracle.com>
401
402 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
403
404 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
405 April Chin <april.chin@oracle.com>
406 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
407
408 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
409 uint_t lwpid_t.
410 (create_procinfo): Print pids in /proc without leading zeros.
411
412 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
413
414 * nios2-tdep.c (nios2_gcc_target_options): New.
415 (nios2_gdb_arch_init): Install new hook.
416
417 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
418
419 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
420 New file.
421 * update-gnulib.sh: Apply patch.
422 * configure: Re-generate.
423
424 2018-09-18 John Baldwin <jhb@FreeBSD.org>
425
426 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
427 description. Make "info proc" command descriptions more
428 consistent.
429
430 2018-09-18 John Baldwin <jhb@FreeBSD.org>
431
432 * NEWS: Mention 'info proc files' command.
433
434 2018-09-18 John Baldwin <jhb@FreeBSD.org>
435
436 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
437 descriptors for IP_FILES and IP_ALL.
438
439 2018-09-18 John Baldwin <jhb@FreeBSD.org>
440
441 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
442 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
443 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
444 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
445 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
446 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
447 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
448 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
449 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
450 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
451 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
452 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
453 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
454 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
455 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
456 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
457 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
458 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
459 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
460 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
461 (struct fbsd_sockaddr_un): New types.
462 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
463 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
464 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
465 (fbsd_core_info_proc_files): New functions.
466 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
467 IP_ALL.
468 * fbsd-tdep.h (fbsd_info_proc_files_header)
469 (fbsd_info_proc_files_entry): New.
470
471 2018-09-18 John Baldwin <jhb@FreeBSD.org>
472
473 * defs.h (enum info_proc_what) [IP_FILES]: New value.
474 * infcmd.c (info_proc_cmd_files): New function.
475 (_initialize_infcmd): Register 'info proc files' command.
476
477 2018-09-18 John Baldwin <jhb@FreeBSD.org>
478
479 * gnulib/aclocal-m4-deps.mk: Re-generate.
480 * gnulib/aclocal.m4: Re-generate.
481 * gnulib/config.in: Re-generate.
482 * gnulib/configure: Re-generate.
483 * gnulib/import/Makefile.am: Re-generate.
484 * gnulib/import/Makefile.in: Re-generate.
485 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
486 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
487 * gnulib/import/arpa_inet.in.h: New file.
488 * gnulib/import/inet_ntop.c: New file.
489 * gnulib/import/m4/arpa_inet_h.m4: New file.
490 * gnulib/import/m4/inet_ntop.m4: New file.
491 * gnulib/import/m4/netinet_in_h.m4: New file.
492 * gnulib/import/m4/socklen.m4: New file.
493 * gnulib/import/m4/sockpfaf.m4: New file.
494 * gnulib/import/m4/stdalign.m4: New file.
495 * gnulib/import/m4/sys_uio_h.m4: New file.
496 * gnulib/import/netinet_in.in.h: New file.
497 * gnulib/import/stdalign.in.h: New file.
498 * gnulib/import/sys_socket.c: New file.
499 * gnulib/import/sys_socket.in.h: New file.
500 * gnulib/import/sys_uio.in.h: New file.
501 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
502 module.
503
504 2018-09-18 John Baldwin <jhb@FreeBSD.org>
505
506 * gnulib/aclocal-m4-deps.mk: New file.
507 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
508 deterministically.
509
510 2018-09-18 John Baldwin <jhb@FreeBSD.org>
511
512 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
513 KVE_PATH.
514
515 2018-09-18 Tom Tromey <tom@tromey.com>
516
517 * compile/compile-object-load.c (struct
518 link_hash_table_cleanup_data): Add constructor and destructor.
519 Use DISABLE_COPY_AND_ASSIGN.
520 (~link_hash_table_cleanup_data): Rename from
521 link_hash_table_free. Now a destructor.
522 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
523
524 2018-09-18 Tom Tromey <tom@tromey.com>
525
526 * compile/compile-object-run.c (do_module_cleanup): Use delete.
527 * compile/compile-object-load.c (struct munmap_list): Move to
528 header file.
529 (munmap_list::add): Rename from munmap_list_add; rewrite.
530 (munmap_list::~munmap_list): Rename from munmap_list_free.
531 (munmap_listp_free_cleanup): Remove.
532 (compile_object_load): Update.
533 * compile/compile-object-load.h (struct munmap_list): Move from
534 compile-object-load.c. Rewrite.
535
536 2018-09-18 Alan Hayward <alan.hayward@arm.com>
537
538 * aarch64-tdep.c (pass_in_v): Use register size.
539 (aarch64_extract_return_value): Likewise.
540 (aarch64_store_return_value): Likewise.
541
542 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
543
544 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
545 rlim_t.
546
547 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
548
549 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
550 Fix short help line.
551
552 2018-09-17 Tom Tromey <tom@tromey.com>
553
554 PR python/20445:
555 * configure: Rebuild.
556 * configure.ac: Conditionally use -DNDEBUG for Python.
557
558 2018-09-17 Tom Tromey <tom@tromey.com>
559
560 * configure: Rebuild.
561 * configure.ac: Use gmp as a library dependency when checking for
562 mpfr.
563
564 2018-09-17 Pedro Alves <palves@redhat.com>
565
566 * python/py-inferior.c (find_inferior_object): Delete.
567
568 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
569
570 * compile/compile-cplus-types.c
571 (compile_cplus_instance::enter_scope): Don't use new_scope after
572 std::move.
573
574 2018-09-17 Tom Tromey <tom@tromey.com>
575
576 * common/pathstuff.c (get_standard_cache_dir): Use
577 ~/Library/Caches on macOS.
578 * common/pathstuff.h (get_standard_cache_dir): Update comment.
579
580 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
581
582 PR python/23669
583 * breakpoint.c (commands_cmd_element): New.
584 (_initialize_breakpoint): Assign commands_cmd_element.
585 * breakpoint.h (commands_cmd_element): New.
586 * cli/cli-script.c (while_cmd_element, if_command,
587 define_cmd_element): New.
588 (command_name_equals): Remove.
589 (process_next_line): Compare commands by pointer, not by name.
590 (_initialize_cli_script): Assign the various cmd_list_element
591 variables.
592 * compile/compile.c (compile_cmd_element): New.
593 (_initialize_compile): Assign compile_cmd_element.
594 * compile/compile.h (compile_cmd_element): New.
595 * guile/guile.c (guile_cmd_element): New.
596 (install_gdb_commands): Assign guile_cmd_element.
597 * guile/guile.h (guile_cmd_element): New.
598 * python/python.c (python_cmd_element): New.
599 (_initialize_python): Assign python_cmd_element.
600 * python/python.h (python_cmd_element): New.
601 * tracepoint.c (while_stepping_cmd_element): New.
602 (_initialize_tracepoint): Assign while_stepping_cmd_element.
603 * tracepoint.h (while_stepping_cmd_element): New.
604
605 2018-09-17 Tom Tromey <tom@tromey.com>
606
607 * infrun.c (save_infcall_suspend_state): Return
608 infcall_suspend_state_up.
609 (save_infcall_control_state): Return infcall_control_state_up.
610 * inferior.h (save_infcall_suspend_state)
611 (save_infcall_control_state): Declare later. Return unique
612 pointers.
613
614 2018-09-17 Tom Tromey <tom@tromey.com>
615
616 * infrun.c (struct stop_context): Declare constructor,
617 destructor, "changed" method.
618 (stop_context::stop_context): Rename from save_stop_context.
619 (stop_context::~stop_context): Rename from
620 release_stop_context_cleanup.
621 (normal_stop): Update.
622 (stop_context::changed): Rename from stop_context_changed. Return
623 bool.
624
625 2018-09-17 Tom Tromey <tom@tromey.com>
626
627 * inferior.h (struct infcall_suspend_state_deleter): New.
628 (infcall_suspend_state_up): New typedef.
629 (struct infcall_control_state_deleter): New.
630 (infcall_control_state_up): New typedef.
631 (make_cleanup_restore_infcall_suspend_state)
632 (make_cleanup_restore_infcall_control_state): Don't declare.
633 * infcall.c (call_function_by_hand_dummy): Update.
634 * infrun.c (do_restore_infcall_suspend_state_cleanup)
635 (make_cleanup_restore_infcall_suspend_state): Remove.
636 (do_restore_infcall_control_state_cleanup)
637 (make_cleanup_restore_infcall_control_state): Remove.
638
639 2018-09-17 Tom Tromey <tom@tromey.com>
640
641 * gdbthread.h (struct thread_control_state): Add initializer.
642 (class thread_info) <control>: Remove initializer.
643 * inferior.h (struct inferior_control_state): Add initializer.
644 (class inferior) <control>: Remove initializer.
645 (exit_inferior_1): Update.
646 * infrun.c (struct infcall_control_state): Add constructors.
647 (save_infcall_control_state): Use new.
648 (restore_infcall_control_state, discard_infcall_control_state):
649 Use delete.
650
651 2018-09-17 Tom Tromey <tom@tromey.com>
652
653 * infrun.c (struct infcall_suspend_state) <registers>: Now a
654 unique_ptr.
655 <siginfo_data>: Now a unique_xmalloc_ptr.
656 (save_infcall_suspend_state, restore_infcall_suspend_state)
657 (discard_infcall_suspend_state)
658 (get_infcall_suspend_state_regcache): Update.
659
660 2018-09-17 Tom Tromey <tom@tromey.com>
661
662 * gdbthread.h (struct thread_suspend_state): Add initializers.
663 (class thread_info) <suspend>: Remove initializer.
664 * infrun.c (struct infcall_suspend_state): Add initializers.
665 (save_infcall_suspend_state): Use new.
666 (discard_infcall_suspend_state): Use delete.
667
668 2018-09-16 Tom Tromey <tom@tromey.com>
669
670 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
671 Remove.
672 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
673 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
674 (py_varobj_iter_new): Likewise.
675 (py_varobj_get_iterator): Use gdbpy_ref.
676
677 2018-09-16 Tom Tromey <tom@tromey.com>
678
679 * python/py-threadevent.c (py_get_event_thread): Simplify.
680 * python/py-inferior.c (infpy_thread_from_thread_handle):
681 Return immediately after calling thread_to_thread_object. Use
682 Py_RETURN_NONE.
683 (thread_to_thread_object): Set the exception on a NULL return.
684
685 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
688
689 2018-09-16 Tom Tromey <tom@tromey.com>
690
691 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
692 Remove.
693
694 2018-09-16 Tom Tromey <tom@tromey.com>
695
696 * python/python-internal.h (thread_to_thread_object): Change
697 return type.
698 * python/py-inferior.c (thread_to_thread_object): Return a new
699 reference.
700 (infpy_thread_from_thread_handle): Update.
701 * python/py-infthread.c (gdbpy_selected_thread): Update.
702 * python/py-stopevent.c (create_stop_event_object): Update.
703 * python/py-threadevent.c (py_get_event_thread): Return a new
704 reference.
705 (py_get_event_thread): Update.
706 * python/py-event.h (py_get_event_thread): Change return type.
707 * python/py-continueevent.c (create_continue_event_object):
708 Update.
709
710 2018-09-16 Tom Tromey <tom@tromey.com>
711
712 * python/py-progspace.c (pspy_get_objfiles): Update.
713 * python/python-internal.h (objfile_to_objfile_object): Change
714 return type.
715 * python/py-newobjfileevent.c (create_new_objfile_event_object):
716 Update.
717 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
718 Update.
719 * python/python.c (gdbpy_get_current_objfile): Update.
720 (gdbpy_objfiles): Update.
721 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
722 Update.
723 (objfile_to_objfile_object): Return a new reference.
724 * python/py-symtab.c (stpy_get_objfile): Update.
725 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
726 Update.
727
728 2018-09-16 Tom Tromey <tom@tromey.com>
729
730 * python/py-inferior.c (infpy_get_progspace): Update.
731 * python/python-internal.h (pspace_to_pspace_object): Change
732 return type.
733 * python/py-newobjfileevent.c
734 (create_clear_objfiles_event_object): Update.
735 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
736 Update.
737 * python/python.c (gdbpy_get_current_progspace): Update.
738 (gdbpy_progspaces): Update.
739 * python/py-progspace.c (pspace_to_pspace_object): Return a new
740 reference.
741 * python/py-objfile.c (objfpy_get_progspace): Update.
742 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
743 Update.
744
745 2018-09-16 Tom Tromey <tom@tromey.com>
746
747 * python/lib/gdb/__init__.py (current_progspace, objfiles)
748 (solib_name, block_for_pc, find_pc_line): New functions.
749 (execute_unwinders): Update.
750 * python/py-block.c (gdbpy_block_for_pc): Remove.
751 * python/py-inferior.c (infpy_get_progspace): New function.
752 (inferior_object_getset) <progspace>: Add.
753 * python/py-progspace.c (pspy_objfiles): Rewrite.
754 (pspy_solib_name, pspy_block_for_pc)
755 (pspy_find_pc_line, pspy_is_valid): New functions.
756 (progspace_object_methods): Add entries for solib_name,
757 block_for_pc, find_pc_line, is_valid.
758 * python/python-internal.h (gdbpy_block_for_pc)
759 (build_objfiles_list): Don't declare.
760 * python/python.c: Don't include solib.h.
761 (gdbpy_solib_name, gdbpy_find_pc_line)
762 (gdbpy_get_current_progspace, build_objfiles_list)
763 (gdbpy_objfiles): Remove.
764 (GdbMethods) <current_progspace, objfiles, block_for_pc,
765 solib_name, find_pc_line>: Remove entries.
766
767 2018-09-16 Tom Tromey <tom@tromey.com>
768
769 * top.c (new_ui_command): Use GNU style for metasyntactic
770 variables.
771 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
772 variables.
773 * maint.c (maintenance_translate_address): Remove "<>" around
774 text.
775 * interps.c (interpreter_exec_cmd): Use GNU style for
776 metasyntactic variables.
777 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
778 metasyntactic variables.
779 * tracepoint.c (tfind_range_command): Use GNU style for
780 metasyntactic variables.
781 (tfind_outside_command): Likewise.
782 (_initialize_tracepoint): Likewise.
783 * remote.c (extended_remote_target::create_inferior): Use GNU
784 style for metasyntactic variables.
785 * sparc64-tdep.c (adi_examine_command): Use GNU style for
786 metasyntactic variables.
787 (adi_assign_command): Likewise.
788
789 2018-09-16 Tom Tromey <tom@tromey.com>
790
791 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
792 metasyntactic variables. Print message if no disassembler options
793 are available.
794
795 2018-09-15 Tom Tromey <tom@tromey.com>
796
797 * infcmd.c (get_inferior_args): Return const char *.
798 * inferior.h (get_inferior_args): Return type now const.
799 * linux-tdep.c (linux_fill_prpsinfo): Update.
800 * procfs.c (procfs_target::make_corefile_notes): Update.
801
802 2018-09-07 Tom Tromey <tom@tromey.com>
803
804 * python/python.c (execute_gdb_command): Call bpstat_do_actions
805 inside the TRY.
806
807 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
808
809 * nios2-tdep.c (nios2_type_align): New.
810 (nios2_gdb_arch_init): Install type_align hook.
811
812 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
813
814 * eval.c (fake_method::fake_method): Call xzalloc directly for a
815 type that is neither object file owned, nor gdbarch owned.
816 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
817 gdbarch is non-NULL.
818 (alloc_type_instance): Allocate non-objfile owned types on the
819 gdbarch obstack.
820 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
821 using TYPE_ALLOC to ensure memory is allocated on the correct
822 obstack.
823 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
824 obstack, or the gdbarch obstack.
825 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
826
827 2018-09-14 Tom Tromey <tom@tromey.com>
828
829 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
830 block.
831
832 2018-09-14 Tom Tromey <tom@tromey.com>
833
834 * nat/fork-inferior.c (get_startup_shell): Remove "static".
835
836 2018-09-13 Tom Tromey <tom@tromey.com>
837
838 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
839 static.
840
841 2018-09-13 Tom Tromey <tom@tromey.com>
842
843 * exec.c (try_open_exec_file): Use std::string.
844
845 2018-09-13 Tom Tromey <tom@tromey.com>
846
847 * utils.h (gdb_bfd_errmsg): Return std::string.
848 * exec.c (exec_file_attach): Update.
849 * compile/compile-object-load.c (compile_object_load): Update.
850 * utils.c (gdb_bfd_errmsg): Return std::string.
851
852 2018-09-13 Tom Tromey <tom@tromey.com>
853
854 * procfs.c (struct procinfo_deleter): New.
855 (procinfo_up): New typedef.
856 (do_destroy_procinfo_cleanup): Remove.
857 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
858
859 2018-09-13 Tom Tromey <tom@tromey.com>
860
861 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
862
863 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
864 2018-09-13 Tom Tromey <tom@tromey.com>
865
866 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
867 (pspy_get_objfiles): New function.
868 (progspace_object_methods): New.
869 (pspace_object_type): Add tp_methods callback.
870 * python/python-internal.h (build_objfiles_list): New
871 declaration.
872 * python/python.c (build_objfiles_list): New function.
873 (gdbpy_objfiles): Implement using build_objfiles_list.
874 * NEWS: Mention the Progspace.objfiles method.
875
876 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
877
878 * python/py-inferior.c (infpy_get_progspace): New function.
879 (inferior_object_getset): Add progspace property.
880 * NEWS: Mention the new property.
881
882 2018-09-13 Tom Tromey <tom@tromey.com>
883
884 PR rust/23650:
885 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
886
887 2018-09-13 Tom Tromey <tom@tromey.com>
888
889 PR rust/23626:
890 * rust-lang.c (rust_enum_variant): Now static.
891 (rust_empty_enum_p): New function.
892 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
893 Handle empty enum.
894
895 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
896
897 * python/py-inferior.c (infpy_repr): New.
898 (inferior_object_type): Register infpy_repr.
899 * python/py-objfile.c (objfpy_repr): New.
900 (objfile_object_type): Register objfpy_repr.
901
902 2018-09-12 John Baldwin <jhb@FreeBSD.org>
903
904 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
905
906 2018-09-12 John Baldwin <jhb@FreeBSD.org>
907
908 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
909 typo.
910
911 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
912
913 * common/common-utils.c: Don't include '<sys/stat.h>'.
914 (is_regular_file): Move to...
915 * common/filestuff.c (is_regular_file): ... here.
916 * common/common-utils.h (is_regular_file): Move to...
917 * common/filestuff.h (is_regular_file): ... here.
918
919 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
920
921 * skip.c (debug_skip): New variable.
922 (skiplist_entry::do_skip_file_p): Add debug output.
923 (skiplist_entry::do_skip_gfile_p): Likewise.
924 (skiplist_entry::skip_function_p): Likewise.
925 (_initialize_step_skip): Create debug command.
926 * NEWS: Mention set/show debug skip.
927
928 2018-09-11 Xavier Roirand <roirand@adacore.com>
929
930 * darwin-nat.c (should_disable_startup_with_shell):
931 New function.
932 (darwin_nat_target::create_inferior): Add call.
933
934 2018-09-11 Xavier Roirand <roirand@adacore.com>
935
936 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
937 inf_port, msg_state>: Initialize.
938 (struct darwin_thread_info) <signaled, single_step>: Change
939 type and initialize.
940 (struct darwin_thread_info) <event>: Initialize.
941
942 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
943
944 PR gdb/23555
945 PR gdb/23558
946 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
947 guesses.
948
949 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
950
951 Revert:
952 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
953
954 PR gdb/23555
955 PR gdb/23558
956 * gnulib/aclocal.m4: Regenerate.
957 * gnulib/config.in: Regenerate.
958 * gnulib/configure: Regenerate.
959 * gnulib/import/Makefile.am: Update.
960 * gnulib/import/Makefile.in: Update.
961 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
962 * gnulib/import/_Noreturn.h: ... this.
963 * gnulib/import/alloca.in.h: Update.
964 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
965 * gnulib/import/arg-nonnull.h: ... this.
966 * gnulib/import/assure.h: Update.
967 * gnulib/import/at-func.c: Update.
968 * gnulib/import/basename-lgpl.c: Update.
969 * gnulib/import/extra/snippet/c++defs.h: Rename to...
970 * gnulib/import/c++defs.h: ... this.
971 * gnulib/import/canonicalize-lgpl.c: Update.
972 * gnulib/import/cdefs.h: Update.
973 * gnulib/import/chdir-long.c: Update.
974 * gnulib/import/chdir-long.h: Update.
975 * gnulib/import/cloexec.c: Update.
976 * gnulib/import/cloexec.h: Update.
977 * gnulib/import/close.c: Update.
978 * gnulib/import/closedir.c: Update.
979 * gnulib/import/config.charset: Update.
980 * gnulib/import/dirent-private.h: Update.
981 * gnulib/import/dirent.in.h: Update.
982 * gnulib/import/dirfd.c: Update.
983 * gnulib/import/dirname-lgpl.c: Update.
984 * gnulib/import/dirname.h: Update.
985 * gnulib/import/dosname.h: Update.
986 * gnulib/import/dup-safer-flag.c: Update.
987 * gnulib/import/dup-safer.c: Update.
988 * gnulib/import/dup.c: Update.
989 * gnulib/import/dup2.c: Update.
990 * gnulib/import/errno.in.h: Update.
991 * gnulib/import/error.c: Update.
992 * gnulib/import/error.h: Update.
993 * gnulib/import/exitfail.c: Update.
994 * gnulib/import/exitfail.h: Update.
995 * gnulib/import/extra/update-copyright: Update.
996 * gnulib/import/fchdir.c: Update.
997 * gnulib/import/fcntl.c: Update.
998 * gnulib/import/fcntl.in.h: Update.
999 * gnulib/import/fd-hook.c: Update.
1000 * gnulib/import/fd-hook.h: Update.
1001 * gnulib/import/fd-safer-flag.c: Update.
1002 * gnulib/import/fd-safer.c: Update.
1003 * gnulib/import/fdopendir.c: Update.
1004 * gnulib/import/filename.h: Update.
1005 * gnulib/import/filenamecat-lgpl.c: Update.
1006 * gnulib/import/filenamecat.h: Update.
1007 * gnulib/import/flexmember.h: Update.
1008 * gnulib/import/float+.h: Update.
1009 * gnulib/import/float.c: Update.
1010 * gnulib/import/float.in.h: Update.
1011 * gnulib/import/fnmatch.c: Update.
1012 * gnulib/import/fnmatch.in.h: Update.
1013 * gnulib/import/fnmatch_loop.c: Update.
1014 * gnulib/import/fpucw.h: Update.
1015 * gnulib/import/frexp.c: Update.
1016 * gnulib/import/frexpl.c: Update.
1017 * gnulib/import/fstat.c: Update.
1018 * gnulib/import/fstatat.c: Update.
1019 * gnulib/import/getcwd-lgpl.c: Update.
1020 * gnulib/import/getcwd.c: Update.
1021 * gnulib/import/getdtablesize.c: Update.
1022 * gnulib/import/getlogin_r.c: Update.
1023 * gnulib/import/getprogname.c: Update.
1024 * gnulib/import/getprogname.h: Update.
1025 * gnulib/import/gettext.h: Update.
1026 * gnulib/import/gettimeofday.c: Update.
1027 * gnulib/import/glob-libc.h: Update.
1028 * gnulib/import/glob.c: Update.
1029 * gnulib/import/glob.in.h: Update.
1030 * gnulib/import/glob_internal.h: Update.
1031 * gnulib/import/glob_pattern_p.c: Update.
1032 * gnulib/import/globfree.c: Update.
1033 * gnulib/import/hard-locale.c: Update.
1034 * gnulib/import/hard-locale.h: Update.
1035 * gnulib/import/intprops.h: Update.
1036 * gnulib/import/inttypes.in.h: Update.
1037 * gnulib/import/isnan.c: Update.
1038 * gnulib/import/isnand-nolibm.h: Update.
1039 * gnulib/import/isnand.c: Update.
1040 * gnulib/import/isnanl-nolibm.h: Update.
1041 * gnulib/import/isnanl.c: Update.
1042 * gnulib/import/itold.c: Update.
1043 * gnulib/import/libc-config.h: Update.
1044 * gnulib/import/limits.in.h: Update.
1045 * gnulib/import/localcharset.c: Update.
1046 * gnulib/import/localcharset.h: Update.
1047 * gnulib/import/localtime-buffer.c: Update.
1048 * gnulib/import/localtime-buffer.h: Update.
1049 * gnulib/import/lstat.c: Update.
1050 * gnulib/import/m4/00gnulib.m4: Update.
1051 * gnulib/import/m4/__inline.m4: Update.
1052 * gnulib/import/m4/absolute-header.m4: Update.
1053 * gnulib/import/m4/alloca.m4: Update.
1054 * gnulib/import/m4/builtin-expect.m4: Update.
1055 * gnulib/import/m4/canonicalize.m4: Update.
1056 * gnulib/import/m4/chdir-long.m4: Update.
1057 * gnulib/import/m4/close.m4: Update.
1058 * gnulib/import/m4/closedir.m4: Update.
1059 * gnulib/import/m4/configmake.m4: Update.
1060 * gnulib/import/m4/d-ino.m4: Update.
1061 * gnulib/import/m4/d-type.m4: Update.
1062 * gnulib/import/m4/dirent_h.m4: Update.
1063 * gnulib/import/m4/dirfd.m4: Update.
1064 * gnulib/import/m4/dirname.m4: Update.
1065 * gnulib/import/m4/double-slash-root.m4: Update.
1066 * gnulib/import/m4/dup.m4: Update.
1067 * gnulib/import/m4/dup2.m4: Update.
1068 * gnulib/import/m4/eealloc.m4: Update.
1069 * gnulib/import/m4/environ.m4: Update.
1070 * gnulib/import/m4/errno_h.m4: Update.
1071 * gnulib/import/m4/error.m4: Update.
1072 * gnulib/import/m4/exponentd.m4: Update.
1073 * gnulib/import/m4/exponentl.m4: Update.
1074 * gnulib/import/m4/extensions.m4: Update.
1075 * gnulib/import/m4/extern-inline.m4: Update.
1076 * gnulib/import/m4/fchdir.m4: Update.
1077 * gnulib/import/m4/fcntl-o.m4: Update.
1078 * gnulib/import/m4/fcntl.m4: Update.
1079 * gnulib/import/m4/fcntl_h.m4: Update.
1080 * gnulib/import/m4/fdopendir.m4: Update.
1081 * gnulib/import/m4/filenamecat.m4: Update.
1082 * gnulib/import/m4/flexmember.m4: Update.
1083 * gnulib/import/m4/float_h.m4: Update.
1084 * gnulib/import/m4/fnmatch.m4: Update.
1085 * gnulib/import/m4/fnmatch_h.m4: Update.
1086 * gnulib/import/m4/fpieee.m4: Update.
1087 * gnulib/import/m4/frexp.m4: Update.
1088 * gnulib/import/m4/frexpl.m4: Update.
1089 * gnulib/import/m4/fstat.m4: Update.
1090 * gnulib/import/m4/fstatat.m4: Update.
1091 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1092 * gnulib/import/m4/getcwd-path-max.m4: Update.
1093 * gnulib/import/m4/getcwd.m4: Update.
1094 * gnulib/import/m4/getdtablesize.m4: Update.
1095 * gnulib/import/m4/getlogin.m4: Update.
1096 * gnulib/import/m4/getlogin_r.m4: Update.
1097 * gnulib/import/m4/getpagesize.m4: Update.
1098 * gnulib/import/m4/getprogname.m4: Update.
1099 * gnulib/import/m4/gettimeofday.m4: Update.
1100 * gnulib/import/m4/glibc21.m4: Update.
1101 * gnulib/import/m4/glob.m4: Update.
1102 * gnulib/import/m4/glob_h.m4: Update.
1103 * gnulib/import/m4/gnulib-cache.m4: Update.
1104 * gnulib/import/m4/gnulib-common.m4: Update.
1105 * gnulib/import/m4/gnulib-comp.m4: Update.
1106 * gnulib/import/m4/gnulib-tool.m4: Update.
1107 * gnulib/import/m4/hard-locale.m4: Update.
1108 * gnulib/import/m4/include_next.m4: Update.
1109 * gnulib/import/m4/inttypes-pri.m4: Update.
1110 * gnulib/import/m4/inttypes.m4: Update.
1111 * gnulib/import/m4/isnand.m4: Update.
1112 * gnulib/import/m4/isnanl.m4: Update.
1113 * gnulib/import/m4/largefile.m4: Update.
1114 * gnulib/import/m4/limits-h.m4: Update.
1115 * gnulib/import/m4/localcharset.m4: Update.
1116 * gnulib/import/m4/locale-fr.m4: Update.
1117 * gnulib/import/m4/locale-ja.m4: Update.
1118 * gnulib/import/m4/locale-zh.m4: Update.
1119 * gnulib/import/m4/localtime-buffer.m4: Update.
1120 * gnulib/import/m4/longlong.m4: Update.
1121 * gnulib/import/m4/lstat.m4: Update.
1122 * gnulib/import/m4/malloc.m4: Update.
1123 * gnulib/import/m4/malloca.m4: Update.
1124 * gnulib/import/m4/math_h.m4: Update.
1125 * gnulib/import/m4/mbrtowc.m4: Update.
1126 * gnulib/import/m4/mbsinit.m4: Update.
1127 * gnulib/import/m4/mbsrtowcs.m4: Update.
1128 * gnulib/import/m4/mbstate_t.m4: Update.
1129 * gnulib/import/m4/memchr.m4: Update.
1130 * gnulib/import/m4/memmem.m4: Update.
1131 * gnulib/import/m4/mempcpy.m4: Update.
1132 * gnulib/import/m4/memrchr.m4: Update.
1133 * gnulib/import/m4/mkdir.m4: Update.
1134 * gnulib/import/m4/mkstemp.m4: Update.
1135 * gnulib/import/m4/mmap-anon.m4: Update.
1136 * gnulib/import/m4/mode_t.m4: Update.
1137 * gnulib/import/m4/msvc-inval.m4: Update.
1138 * gnulib/import/m4/msvc-nothrow.m4: Update.
1139 * gnulib/import/m4/multiarch.m4: Update.
1140 * gnulib/import/m4/nocrash.m4: Update.
1141 * gnulib/import/m4/off_t.m4: Update.
1142 * gnulib/import/m4/onceonly.m4: Update.
1143 * gnulib/import/m4/open-cloexec.m4: Update.
1144 * gnulib/import/m4/open.m4: Update.
1145 * gnulib/import/m4/openat.m4: Update.
1146 * gnulib/import/m4/opendir.m4: Update.
1147 * gnulib/import/m4/pathmax.m4: Update.
1148 * gnulib/import/m4/rawmemchr.m4: Update.
1149 * gnulib/import/m4/readdir.m4: Update.
1150 * gnulib/import/m4/readlink.m4: Update.
1151 * gnulib/import/m4/realloc.m4: Update.
1152 * gnulib/import/m4/rename.m4: Update.
1153 * gnulib/import/m4/rewinddir.m4: Update.
1154 * gnulib/import/m4/rmdir.m4: Update.
1155 * gnulib/import/m4/save-cwd.m4: Update.
1156 * gnulib/import/m4/secure_getenv.m4: Update.
1157 * gnulib/import/m4/setenv.m4: Update.
1158 * gnulib/import/m4/signal_h.m4: Update.
1159 * gnulib/import/m4/ssize_t.m4: Update.
1160 * gnulib/import/m4/stat-time.m4: Update.
1161 * gnulib/import/m4/stat.m4: Update.
1162 * gnulib/import/m4/std-gnu11.m4: Update.
1163 * gnulib/import/m4/stdbool.m4: Update.
1164 * gnulib/import/m4/stddef_h.m4: Update.
1165 * gnulib/import/m4/stdint.m4: Update.
1166 * gnulib/import/m4/stdio_h.m4: Update.
1167 * gnulib/import/m4/stdlib_h.m4: Update.
1168 * gnulib/import/m4/strchrnul.m4: Update.
1169 * gnulib/import/m4/strdup.m4: Update.
1170 * gnulib/import/m4/strerror.m4: Update.
1171 * gnulib/import/m4/string_h.m4: Update.
1172 * gnulib/import/m4/strstr.m4: Update.
1173 * gnulib/import/m4/strtok_r.m4: Update.
1174 * gnulib/import/m4/sys_socket_h.m4: Update.
1175 * gnulib/import/m4/sys_stat_h.m4: Update.
1176 * gnulib/import/m4/sys_time_h.m4: Update.
1177 * gnulib/import/m4/sys_types_h.m4: Update.
1178 * gnulib/import/m4/tempname.m4: Update.
1179 * gnulib/import/m4/time_h.m4: Update.
1180 * gnulib/import/m4/unistd-safer.m4: Update.
1181 * gnulib/import/m4/unistd_h.m4: Update.
1182 * gnulib/import/m4/warn-on-use.m4: Update.
1183 * gnulib/import/m4/wchar_h.m4: Update.
1184 * gnulib/import/m4/wchar_t.m4: Update.
1185 * gnulib/import/m4/wctype_h.m4: Update.
1186 * gnulib/import/m4/wint_t.m4: Update.
1187 * gnulib/import/malloc.c: Update.
1188 * gnulib/import/malloc/scratch_buffer.h: Update.
1189 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1190 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1191 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1192 * gnulib/import/malloca.c: Update.
1193 * gnulib/import/malloca.h: Update.
1194 * gnulib/import/malloca.valgrind: Update.
1195 * gnulib/import/math.in.h: Update.
1196 * gnulib/import/mbrtowc.c: Update.
1197 * gnulib/import/mbsinit.c: Update.
1198 * gnulib/import/mbsrtowcs-impl.h: Update.
1199 * gnulib/import/mbsrtowcs-state.c: Update.
1200 * gnulib/import/mbsrtowcs.c: Update.
1201 * gnulib/import/memchr.c: Update.
1202 * gnulib/import/memmem.c: Update.
1203 * gnulib/import/mempcpy.c: Update.
1204 * gnulib/import/memrchr.c: Update.
1205 * gnulib/import/mkdir.c: Update.
1206 * gnulib/import/mkstemp.c: Update.
1207 * gnulib/import/msvc-inval.c: Update.
1208 * gnulib/import/msvc-inval.h: Update.
1209 * gnulib/import/msvc-nothrow.c: Update.
1210 * gnulib/import/msvc-nothrow.h: Update.
1211 * gnulib/import/open.c: Update.
1212 * gnulib/import/openat-die.c: Update.
1213 * gnulib/import/openat-priv.h: Update.
1214 * gnulib/import/openat-proc.c: Update.
1215 * gnulib/import/openat.c: Update.
1216 * gnulib/import/openat.h: Update.
1217 * gnulib/import/opendir.c: Update.
1218 * gnulib/import/pathmax.h: Update.
1219 * gnulib/import/pipe-safer.c: Update.
1220 * gnulib/import/rawmemchr.c: Update.
1221 * gnulib/import/readdir.c: Update.
1222 * gnulib/import/readlink.c: Update.
1223 * gnulib/import/realloc.c: Update.
1224 * gnulib/import/ref-add.sin: Update.
1225 * gnulib/import/ref-del.sin: Update.
1226 * gnulib/import/rename.c: Update.
1227 * gnulib/import/rewinddir.c: Update.
1228 * gnulib/import/rmdir.c: Update.
1229 * gnulib/import/same-inode.h: Update.
1230 * gnulib/import/save-cwd.c: Update.
1231 * gnulib/import/save-cwd.h: Update.
1232 * gnulib/import/scratch_buffer.h: Update.
1233 * gnulib/import/secure_getenv.c: Update.
1234 * gnulib/import/setenv.c: Update.
1235 * gnulib/import/signal.in.h: Update.
1236 * gnulib/import/stat-time.c: Update.
1237 * gnulib/import/stat-time.h: Update.
1238 * gnulib/import/stat-w32.c: Update.
1239 * gnulib/import/stat-w32.h: Update.
1240 * gnulib/import/stat.c: Update.
1241 * gnulib/import/stdbool.in.h: Update.
1242 * gnulib/import/stddef.in.h: Update.
1243 * gnulib/import/stdint.in.h: Update.
1244 * gnulib/import/stdio.in.h: Update.
1245 * gnulib/import/stdlib.in.h: Update.
1246 * gnulib/import/str-two-way.h: Update.
1247 * gnulib/import/strchrnul.c: Update.
1248 * gnulib/import/strdup.c: Update.
1249 * gnulib/import/streq.h: Update.
1250 * gnulib/import/strerror-override.c: Update.
1251 * gnulib/import/strerror-override.h: Update.
1252 * gnulib/import/strerror.c: Update.
1253 * gnulib/import/string.in.h: Update.
1254 * gnulib/import/stripslash.c: Update.
1255 * gnulib/import/strnlen1.c: Update.
1256 * gnulib/import/strnlen1.h: Update.
1257 * gnulib/import/strstr.c: Update.
1258 * gnulib/import/strtok_r.c: Update.
1259 * gnulib/import/sys_stat.in.h: Update.
1260 * gnulib/import/sys_time.in.h: Update.
1261 * gnulib/import/sys_types.in.h: Update.
1262 * gnulib/import/tempname.c: Update.
1263 * gnulib/import/tempname.h: Update.
1264 * gnulib/import/time.in.h: Update.
1265 * gnulib/import/unistd--.h: Update.
1266 * gnulib/import/unistd-safer.h: Update.
1267 * gnulib/import/unistd.in.h: Update.
1268 * gnulib/import/unsetenv.c: Update.
1269 * gnulib/import/verify.h: Update.
1270 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1271 * gnulib/import/wchar.in.h: Update.
1272 * gnulib/import/wctype.in.h: Update.
1273 * gnulib/import/xalloc-oversized.h: Update.
1274 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1275 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1276
1277 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1278
1279 * record-btrace.c (get_thread_current_frame): Remove
1280 old_inferior_ptid.
1281
1282 2018-09-10 Jerome Guitton <guitton@adacore.com>
1283
1284 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1285 with check_tag to 1 if and only if the type is tagged and the
1286 component being searched cannot been found in the current
1287 view. Otherwise, always call ada_to_fixed_type with
1288 check_tag to 0.
1289
1290 2018-09-10 Xavier Roirand <roirand@adacore.com>
1291
1292 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1293 declaration.
1294 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1295 * ada-varobj.c (ada_varobj_get_number_of_children,
1296 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1297
1298 2018-09-10 Xavier Roirand <roirand@adacore.com>
1299
1300 * ada-valprint.c (ada_value_print): Use type instead of
1301 enclosing type.
1302
1303 2018-09-10 Xavier Roirand <roirand@adacore.com>
1304
1305 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1306 an array of access to unconstrained array.
1307
1308 2018-09-10 Xavier Roirand <roirand@adacore.com>
1309
1310 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1311 (ada_check_typedef): Use it.
1312
1313 2018-09-10 Xavier Roirand <roirand@adacore.com>
1314
1315 * ada-varobj.c (ada_varobj_describe_struct_child)
1316 (ada_varobj_describe_child): Handle union case like struct one.
1317
1318 2018-09-10 Tom Tromey <tom@tromey.com>
1319
1320 PR python/18380:
1321 * python/python.c (_initialize_python): Make example in "python"
1322 help work in Python 3.
1323
1324 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1325
1326 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1327 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1328 $(EXEEXT) to the script, as it is not a program.
1329
1330 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * python/py-prettyprint.c (pretty_print_one_value): Return
1333 gdbpy_ref<>.
1334 (print_string_repr): Adjust.
1335 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1336 * python/python-internal.h (apply_varobj_pretty_printer): Return
1337 gdbpy_ref<>.
1338 * varobj.c (varobj_value_get_print_value): Adjust.
1339
1340 2018-09-08 Tom Tromey <tom@tromey.com>
1341
1342 PR python/16047:
1343 * python/py-prettyprint.c (pretty_print_one_value): Check for
1344 to_string method.
1345
1346 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1347
1348 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1349 replace_operator_with_call.
1350
1351 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1352
1353 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1354
1355 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1356
1357 * ada-typeprint.c (print_range): Print the bounds using TYPE
1358 rather than its TYPE_TARGET_TYPE.
1359
1360 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1361
1362 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1363 call to ada_to_fixed_value_create.
1364
1365 2018-09-08 Jerome Guitton <guitton@adacore.com>
1366
1367 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1368
1369 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1370
1371 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1372 by calls to error.
1373
1374 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1375
1376 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1377 Move update of loop variable "fi".
1378
1379 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1380
1381 * ada-lang.c (value_assign_to_component): In the case of
1382 big-endian targets, extract the bits of the given VAL
1383 using an src_offset of zero if container is not a scalar.
1384
1385 2018-09-06 Simon Ser <contact@emersion.fr>
1386
1387 PR gdb/23105
1388 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1389 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1390 * fbsd-tdep.c (fbsd_make_note_desc): New.
1391 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1392 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1393 * target.h (enum target_object) Add FreeBSD-specific
1394 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1395
1396 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * compile/compile-c.h (generate_c_for_variable_locations):
1399 Change reference to pointer.
1400 * compile/compile-c-support.c (compile_program) <compute>:
1401 Likewise.
1402 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1403 (generate_c_for_for_one_variable): Likewise
1404 (generate_c_for_variable_locations): Likewise
1405 * compile/compile-c-types.c (compile_c_instance::convert_type):
1406 Likewise
1407 * compile/compile-cplus-symbols.c (convert_one_symbol):
1408 std::move the scope passed to enter_scope.
1409 * compile/compile-cplus-types.c
1410 (compile_cplus_instance::enter_scope): Make parameter
1411 rvalue-reference.
1412 (compile_cplus_instance::new_scope): Change reference to
1413 pointer.
1414 (compile_cplus_instance::convert_type): Likewise
1415 (compile_cplus_convert_typedef): std::move the scope passed to
1416 enter_scope.
1417 (compile_cplus_convert_struct_or_union): Likewise.
1418 (compile_cplus_convert_enum): Likewise.
1419 (compile_cplus_convert_namespace): Likewise.
1420 * compile/compile-cplus.h (compile_cplus_instance)
1421 <enter_scope>: Make parameter rvalue-reference.
1422 * compile/compile-internal.h (compile_instance)
1423 <get_cached_type>: Likewise
1424 * compile/compile-loc2c.c (push): Likewise
1425 (pushf): Likewise
1426 (unary): Likewise
1427 (binary): Likewise
1428 (print_label): Likewise
1429 (pushf_register_address): Likewise
1430 (pushf_register): Likewise
1431 (do_compile_dwarf_expr_to_c): Likewise
1432 (compile_dwarf_expr_to_c): Likewise
1433 (compile_dwarf_bounds_to_c): Likewise
1434 * compile/compile.c (compile_instance::get_cached_type):
1435 Likewise
1436 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1437 (compile_dwarf_bounds_to_c): Likewise
1438 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1439 (dwarf2_compile_property_to_c): Likewise
1440 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1441 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1442 Likewise
1443
1444 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1447 * tui/tui-data.c (init_content_element): Don't initialize it.
1448
1449 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1450
1451 * tui/tui-data.h (struct tui_win_info)
1452 <detail::opaque>: Remove.
1453 * tui/tui-data.c (init_win_info): Remove assignment.
1454
1455 2018-09-05 Tom Tromey <tom@tromey.com>
1456
1457 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1458 -Wformat-nonliteral.
1459 * target-float.c (host_float_ops<T>::to_string)
1460 (host_float_ops<T>::from_string): Use
1461 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1462 * configure: Rebuild.
1463
1464 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * printcmd.c (printf_c_string): Use
1467 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1468 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1469
1470 2018-09-05 Tom Tromey <tom@tromey.com>
1471
1472 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1473
1474 2018-09-05 Tom de Vries <tdevries@suse.de>
1475
1476 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1477 with resolve_abstract_p == true.
1478 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1479 defaulting to false. Propagate resolve_abstract_p to
1480 dwarf2_fetch_die_loc_sect_off.
1481 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1482 parameter, defaulting to false.
1483 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1484 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1485 parameter.
1486 * dwarf2read.h (struct die_info): Forward-declare.
1487 (die_info_ptr): New typedef.
1488 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1489
1490 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1491
1492 GDB 8.2 released.
1493
1494 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1495 Pedro Alves <palves@redhat.com>
1496
1497 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1498 "aclocal-m4-deps.mk". Include file here.
1499 $(srcdir)/aclocal.m4: Add "configure.ac".
1500 * gnulib/aclocal-m4-deps.mk: New file.
1501 * gnulib/update-gnulib.sh: Automatically update
1502 "aclocal-m4-deps.mk".
1503
1504 2018-09-04 Tom Tromey <tom@tromey.com>
1505
1506 * configure: Rebuild.
1507 * configure.ac: Remove multi-ice code.
1508
1509 2018-09-04 Tom Tromey <tom@tromey.com>
1510
1511 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1512 (ada-exp.o): Update.
1513
1514 2018-09-04 Tom Tromey <tom@tromey.com>
1515
1516 * Makefile.in (printcmd.o, target-float.o): Remove.
1517 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1518
1519 2018-09-04 Tom Tromey <tom@tromey.com>
1520
1521 * gnulib/Makefile.in: Remove obsolete comment.
1522 * Makefile.in: Remove obsolete comment.
1523
1524 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1525
1526 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1527 line with '+'.
1528
1529 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1530
1531 * riscv-tdep.c: Add 'prologue-value.h' include.
1532 (struct riscv_unwind_cache): New struct.
1533 (riscv_debug_unwinder): New global.
1534 (riscv_scan_prologue): Update arguments, capture register details
1535 from prologue scan.
1536 (riscv_skip_prologue): Reformat arguments line, move end of
1537 prologue calculation into riscv_scan_prologue.
1538 (riscv_frame_cache): Update return type, create
1539 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1540 details.
1541 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1542 (riscv_frame_prev_register): Use the trad_frame within the
1543 riscv_unwind_cache.
1544 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1545 flag.
1546
1547 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1548
1549 * trad-frame.h (trad_frame_set_realreg): Declare.
1550 (trad_frame_set_addr): Declare.
1551 * trad-frame.c (trad_frame_set_realreg): Define new function.
1552 (trad_frame_set_addr): Define new function.
1553 (trad_frame_set_reg_realreg): Use new function.
1554 (trad_frame_set_reg_addr): Use new function.
1555
1556 2018-09-01 Keith Seitz <keiths@redhat.com>
1557
1558 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1559 pulongest instead of "%lld".
1560 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1561 ATTRIBUTE_UNUSED.
1562
1563 2018-08-31 Tom Tromey <tom@tromey.com>
1564
1565 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1566 variant part type.
1567
1568 2018-08-31 Pedro Alves <palves@redhat.com>
1569
1570 * gdbarch.h: Regenerate.
1571
1572 2018-08-31 Pedro Alves <palves@redhat.com>
1573
1574 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1575 * target.h (Hardware watchpoint interfaces): Describe
1576 continuable/steppable/non-steppable watchpoints.
1577 * gdbarch.h, gdbarch.c: Regenerate.
1578
1579 2018-08-31 Pedro Alves <palves@redhat.com>
1580
1581 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1582 Delete.
1583 * s390-linux-nat.c
1584 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1585 * target.h (target_ops::have_continuable_watchpoint): Delete.
1586 (target_have_continuable_watchpoint): Delete.
1587 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1588 * target-delegates.c: Regenerate.
1589
1590 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1591
1592 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1593 the files present in "gnulib/import/m4/".
1594
1595 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1596
1597 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1598 c.sw, c.swsp, and c.sdsp.
1599
1600 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1601
1602 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1603 (riscv_read_misa_reg): Don't cache value read into inferior data.
1604 (riscv_new_inferior_data): Delete.
1605 (riscv_inferior_data_cleanup): Delete.
1606 (riscv_inferior_data): Delete.
1607 (riscv_invalidate_inferior_data): Delete.
1608 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1609
1610 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1611
1612 * compile/compile-cplus-types.c
1613 (compile_cplus_instance::leave_scope): Take the address of scope
1614 object.
1615 (compile_cplus_instance::convert_qualified_base): Compare quals
1616 to 0.
1617
1618 2018-08-30 Keith Seitz <keiths@redhat.com>
1619
1620 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1621 Use "%s" and host_address_to_string instead of "%p" in printf.
1622
1623 2018-08-29 Keith Seitz <keiths@redhat.com>
1624
1625 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1626 and compile-cplus-types.c.
1627 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1628 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1629 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1630 Declare.
1631 * compile/compile-c-support.c: Include compile-cplus.h.
1632 (load_libcompile): Templatize.
1633 (get_compile_context): "New" function.
1634 (c_get_compile_context): Use get_compile_context.
1635 (cplus_get_compile_context): New function.
1636 (cplus_push_user_expression, cplus_pop_user_expression)
1637 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1638 (cplus_compute_program): Define new structs/functions.
1639 * compile/compile-cplus-symmbols.c: New file.
1640 * compile/compile-cplus-types.c: New file.
1641 * compile/compile-cplus.h: New file.
1642 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1643 Declare.
1644 * compile/compile-object-load.c (get_out_value_type): Use
1645 strncmp_iw when comparing symbol names.
1646 (compile_object_load): Add mst_bss and mst_data.
1647 * compile/compile.c (_initialize_compile): Remove
1648 -Wno-implicit-function-declaration from `compile_args'.
1649 * compile/gcc-cp-plugin.h: New file.
1650 * NEWS: Mention C++ compile support and new debug options.
1651
1652 2018-08-29 Keith Seitz <keiths@redhat.com>
1653
1654 * linespec.c (collect_info::add_symbol): Make virtual.
1655 (struct symbol_searcher_collect_info): New struct.
1656 (symbol_searcher::find_all_symbols): New method.
1657 * symtab.h (class symbol_searcher): New class.
1658
1659 2018-08-29 Keith Seitz <keiths@redhat.com>
1660
1661 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1662 Change to vector of block_symbol. Update all users.
1663 (struct collect_info) <symbols>: Likewise.
1664 (collect_info::add_symbol): Take block_symbol as argument.
1665 Update all callers.
1666 (decode_compound_collector) <m_symbols>: Change type to vector
1667 of block_symbol. Update all users.
1668 (decode_compound_collector::operator ()): Change parameter type
1669 to block_symbol.
1670 (find_method, find_function_symbols, find_linespec_symbols)
1671 (find_label_symbols_in_block, find_label_symbols): Change symbol
1672 vectors to block_symbol vectors.
1673 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1674 block_symbol.
1675
1676 2018-08-29 Keith Seitz <keiths@redhat.com>
1677
1678 * linespec.c (symbolp): Remove typedef and VEC definitions.
1679 (bound_minimal_symbol_d): Likewise.
1680
1681 2018-08-29 Keith Seitz <keiths@redhat.com>
1682
1683 * linespec.c (decode_compound_collector::decode_compound_collector):
1684 Remove initialization for `m_symtabs'.
1685 (decode_compound_collector::release_symbols): Change return type
1686 to std::vector. Update all callers.
1687 (class decode_compound_collector) <m_symbols>: Change type to
1688 std::vector.
1689 (lookup_prefix_sym): Change return type to std::vector. Update all
1690 callers.
1691 (compare_symbols): Remove.
1692 (std_compare_symbols): Rename to `compare_symbols'.
1693 (find_method): Change `sym_classes' parameter to std::vector.
1694 Update all callers. Use std::sort to sort sym_classes.
1695 (find_linespec_symbols): Remove cleanup.
1696
1697 2018-08-29 Keith Seitz <keiths@redhat.com>
1698
1699 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1700 std::vector. Update all users.
1701 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1702 (struct collect_info) <minimal_symbols>: Likewise.
1703 (compare_msymbols): Return bool. Change parameters to const
1704 bound_minimal_symbol references.
1705 (find_method, find_function_symbols, find_linespec_symbols): Change
1706 `minsyms' parameter to std::vector. Update all callers.
1707
1708 2018-08-29 Keith Seitz <keiths@redhat.com>
1709
1710 * linespec.c (struct linespec) <label_symbols>: Change type to
1711 std::vector. Update all users.
1712 (find_label_symbols_in_block): Change `result' parameter to
1713 std::vector. Update all callers.
1714 (find_label_symbols): Return std::vector. Update all callers.
1715
1716 2018-08-29 Keith Seitz <keiths@redhat.com>
1717
1718 * linespec.c (struct linespec) <function_symbols>: Change type to
1719 std::vector. Update all users.
1720 (struct collect_info) <function_symbols>: Likewise.
1721 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1722 (std_compare_symbols): New function.
1723 (find_method, find_function_symbols, find_linespec_symbols)
1724 (find_label_symbols_in_block): Change `symbols' parameter to
1725 std::vector. Update all callers.
1726 (find_label_symbols): Likewise for `function_symbols' and
1727 `label_funcs_ret'.
1728
1729 2018-08-29 Keith Seitz <keiths@redhat.com>
1730
1731 * linespec.c (symtab_vector_up): Define.
1732 (struct linespec) <file_symtabs>: Change type to std::vector *.
1733 Update all uses.
1734 (struct collect_info) <file_symtabs>: Likewise.
1735 (collect_symtabs_from_filename): Return symtab_vector_up.
1736 Update all callers.
1737 (decode_objc): Remove cleanup.
1738 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1739 (symtab_collector::release_symtabs): Return symtab_vector_up.
1740 Update all callers.
1741 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1742 Update all users.
1743 (collect_symtabs_from_filename, symtabs_from_filename): Return
1744 symtab_vector_up. Update all callers.
1745
1746 2018-08-29 Tom Tromey <tom@tromey.com>
1747
1748 * csky-tdep.c (csky_analyze_prologue): Use
1749 core_addr_to_string_nz.
1750
1751 2018-08-29 Tom Tromey <tom@tromey.com>
1752
1753 * windows-nat.c (struct xlate_exception) <them>: Change type to
1754 DWORD.
1755 (xlate): Fix formatting. Remove last entry.
1756 (struct xlate_exception, xlate): Comment out.
1757 (windows_nat_target::resume): Use ranged for.
1758
1759 2018-08-29 Jim Wilson <jimw@sifive.com>
1760
1761 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1762 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1763 of NT_PRFPREG.
1764 (riscv_linux_nat_target::store_registers): Likewise.
1765
1766 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1767
1768 PR gdb/23555
1769 PR gdb/23558
1770 * gnulib/aclocal.m4: Regenerate.
1771 * gnulib/config.in: Regenerate.
1772 * gnulib/configure: Regenerate.
1773 * gnulib/import/Makefile.am: Update.
1774 * gnulib/import/Makefile.in: Update.
1775 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1776 * gnulib/import/_Noreturn.h: ... this.
1777 * gnulib/import/alloca.in.h: Update.
1778 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1779 * gnulib/import/arg-nonnull.h: ... this.
1780 * gnulib/import/assure.h: Update.
1781 * gnulib/import/at-func.c: Update.
1782 * gnulib/import/basename-lgpl.c: Update.
1783 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1784 * gnulib/import/c++defs.h: ... this.
1785 * gnulib/import/canonicalize-lgpl.c: Update.
1786 * gnulib/import/cdefs.h: Update.
1787 * gnulib/import/chdir-long.c: Update.
1788 * gnulib/import/chdir-long.h: Update.
1789 * gnulib/import/cloexec.c: Update.
1790 * gnulib/import/cloexec.h: Update.
1791 * gnulib/import/close.c: Update.
1792 * gnulib/import/closedir.c: Update.
1793 * gnulib/import/config.charset: Update.
1794 * gnulib/import/dirent-private.h: Update.
1795 * gnulib/import/dirent.in.h: Update.
1796 * gnulib/import/dirfd.c: Update.
1797 * gnulib/import/dirname-lgpl.c: Update.
1798 * gnulib/import/dirname.h: Update.
1799 * gnulib/import/dosname.h: Update.
1800 * gnulib/import/dup-safer-flag.c: Update.
1801 * gnulib/import/dup-safer.c: Update.
1802 * gnulib/import/dup.c: Update.
1803 * gnulib/import/dup2.c: Update.
1804 * gnulib/import/errno.in.h: Update.
1805 * gnulib/import/error.c: Update.
1806 * gnulib/import/error.h: Update.
1807 * gnulib/import/exitfail.c: Update.
1808 * gnulib/import/exitfail.h: Update.
1809 * gnulib/import/extra/update-copyright: Update.
1810 * gnulib/import/fchdir.c: Update.
1811 * gnulib/import/fcntl.c: Update.
1812 * gnulib/import/fcntl.in.h: Update.
1813 * gnulib/import/fd-hook.c: Update.
1814 * gnulib/import/fd-hook.h: Update.
1815 * gnulib/import/fd-safer-flag.c: Update.
1816 * gnulib/import/fd-safer.c: Update.
1817 * gnulib/import/fdopendir.c: Update.
1818 * gnulib/import/filename.h: Update.
1819 * gnulib/import/filenamecat-lgpl.c: Update.
1820 * gnulib/import/filenamecat.h: Update.
1821 * gnulib/import/flexmember.h: Update.
1822 * gnulib/import/float+.h: Update.
1823 * gnulib/import/float.c: Update.
1824 * gnulib/import/float.in.h: Update.
1825 * gnulib/import/fnmatch.c: Update.
1826 * gnulib/import/fnmatch.in.h: Update.
1827 * gnulib/import/fnmatch_loop.c: Update.
1828 * gnulib/import/fpucw.h: Update.
1829 * gnulib/import/frexp.c: Update.
1830 * gnulib/import/frexpl.c: Update.
1831 * gnulib/import/fstat.c: Update.
1832 * gnulib/import/fstatat.c: Update.
1833 * gnulib/import/getcwd-lgpl.c: Update.
1834 * gnulib/import/getcwd.c: Update.
1835 * gnulib/import/getdtablesize.c: Update.
1836 * gnulib/import/getlogin_r.c: Update.
1837 * gnulib/import/getprogname.c: Update.
1838 * gnulib/import/getprogname.h: Update.
1839 * gnulib/import/gettext.h: Update.
1840 * gnulib/import/gettimeofday.c: Update.
1841 * gnulib/import/glob-libc.h: Update.
1842 * gnulib/import/glob.c: Update.
1843 * gnulib/import/glob.in.h: Update.
1844 * gnulib/import/glob_internal.h: Update.
1845 * gnulib/import/glob_pattern_p.c: Update.
1846 * gnulib/import/globfree.c: Update.
1847 * gnulib/import/hard-locale.c: Update.
1848 * gnulib/import/hard-locale.h: Update.
1849 * gnulib/import/intprops.h: Update.
1850 * gnulib/import/inttypes.in.h: Update.
1851 * gnulib/import/isnan.c: Update.
1852 * gnulib/import/isnand-nolibm.h: Update.
1853 * gnulib/import/isnand.c: Update.
1854 * gnulib/import/isnanl-nolibm.h: Update.
1855 * gnulib/import/isnanl.c: Update.
1856 * gnulib/import/itold.c: Update.
1857 * gnulib/import/libc-config.h: Update.
1858 * gnulib/import/limits.in.h: Update.
1859 * gnulib/import/localcharset.c: Update.
1860 * gnulib/import/localcharset.h: Update.
1861 * gnulib/import/localtime-buffer.c: Update.
1862 * gnulib/import/localtime-buffer.h: Update.
1863 * gnulib/import/lstat.c: Update.
1864 * gnulib/import/m4/00gnulib.m4: Update.
1865 * gnulib/import/m4/__inline.m4: Update.
1866 * gnulib/import/m4/absolute-header.m4: Update.
1867 * gnulib/import/m4/alloca.m4: Update.
1868 * gnulib/import/m4/builtin-expect.m4: Update.
1869 * gnulib/import/m4/canonicalize.m4: Update.
1870 * gnulib/import/m4/chdir-long.m4: Update.
1871 * gnulib/import/m4/close.m4: Update.
1872 * gnulib/import/m4/closedir.m4: Update.
1873 * gnulib/import/m4/configmake.m4: Update.
1874 * gnulib/import/m4/d-ino.m4: Update.
1875 * gnulib/import/m4/d-type.m4: Update.
1876 * gnulib/import/m4/dirent_h.m4: Update.
1877 * gnulib/import/m4/dirfd.m4: Update.
1878 * gnulib/import/m4/dirname.m4: Update.
1879 * gnulib/import/m4/double-slash-root.m4: Update.
1880 * gnulib/import/m4/dup.m4: Update.
1881 * gnulib/import/m4/dup2.m4: Update.
1882 * gnulib/import/m4/eealloc.m4: Update.
1883 * gnulib/import/m4/environ.m4: Update.
1884 * gnulib/import/m4/errno_h.m4: Update.
1885 * gnulib/import/m4/error.m4: Update.
1886 * gnulib/import/m4/exponentd.m4: Update.
1887 * gnulib/import/m4/exponentl.m4: Update.
1888 * gnulib/import/m4/extensions.m4: Update.
1889 * gnulib/import/m4/extern-inline.m4: Update.
1890 * gnulib/import/m4/fchdir.m4: Update.
1891 * gnulib/import/m4/fcntl-o.m4: Update.
1892 * gnulib/import/m4/fcntl.m4: Update.
1893 * gnulib/import/m4/fcntl_h.m4: Update.
1894 * gnulib/import/m4/fdopendir.m4: Update.
1895 * gnulib/import/m4/filenamecat.m4: Update.
1896 * gnulib/import/m4/flexmember.m4: Update.
1897 * gnulib/import/m4/float_h.m4: Update.
1898 * gnulib/import/m4/fnmatch.m4: Update.
1899 * gnulib/import/m4/fnmatch_h.m4: Update.
1900 * gnulib/import/m4/fpieee.m4: Update.
1901 * gnulib/import/m4/frexp.m4: Update.
1902 * gnulib/import/m4/frexpl.m4: Update.
1903 * gnulib/import/m4/fstat.m4: Update.
1904 * gnulib/import/m4/fstatat.m4: Update.
1905 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1906 * gnulib/import/m4/getcwd-path-max.m4: Update.
1907 * gnulib/import/m4/getcwd.m4: Update.
1908 * gnulib/import/m4/getdtablesize.m4: Update.
1909 * gnulib/import/m4/getlogin.m4: Update.
1910 * gnulib/import/m4/getlogin_r.m4: Update.
1911 * gnulib/import/m4/getpagesize.m4: Update.
1912 * gnulib/import/m4/getprogname.m4: Update.
1913 * gnulib/import/m4/gettimeofday.m4: Update.
1914 * gnulib/import/m4/glibc21.m4: Update.
1915 * gnulib/import/m4/glob.m4: Update.
1916 * gnulib/import/m4/glob_h.m4: Update.
1917 * gnulib/import/m4/gnulib-cache.m4: Update.
1918 * gnulib/import/m4/gnulib-common.m4: Update.
1919 * gnulib/import/m4/gnulib-comp.m4: Update.
1920 * gnulib/import/m4/gnulib-tool.m4: Update.
1921 * gnulib/import/m4/hard-locale.m4: Update.
1922 * gnulib/import/m4/include_next.m4: Update.
1923 * gnulib/import/m4/inttypes-pri.m4: Update.
1924 * gnulib/import/m4/inttypes.m4: Update.
1925 * gnulib/import/m4/isnand.m4: Update.
1926 * gnulib/import/m4/isnanl.m4: Update.
1927 * gnulib/import/m4/largefile.m4: Update.
1928 * gnulib/import/m4/limits-h.m4: Update.
1929 * gnulib/import/m4/localcharset.m4: Update.
1930 * gnulib/import/m4/locale-fr.m4: Update.
1931 * gnulib/import/m4/locale-ja.m4: Update.
1932 * gnulib/import/m4/locale-zh.m4: Update.
1933 * gnulib/import/m4/localtime-buffer.m4: Update.
1934 * gnulib/import/m4/longlong.m4: Update.
1935 * gnulib/import/m4/lstat.m4: Update.
1936 * gnulib/import/m4/malloc.m4: Update.
1937 * gnulib/import/m4/malloca.m4: Update.
1938 * gnulib/import/m4/math_h.m4: Update.
1939 * gnulib/import/m4/mbrtowc.m4: Update.
1940 * gnulib/import/m4/mbsinit.m4: Update.
1941 * gnulib/import/m4/mbsrtowcs.m4: Update.
1942 * gnulib/import/m4/mbstate_t.m4: Update.
1943 * gnulib/import/m4/memchr.m4: Update.
1944 * gnulib/import/m4/memmem.m4: Update.
1945 * gnulib/import/m4/mempcpy.m4: Update.
1946 * gnulib/import/m4/memrchr.m4: Update.
1947 * gnulib/import/m4/mkdir.m4: Update.
1948 * gnulib/import/m4/mkstemp.m4: Update.
1949 * gnulib/import/m4/mmap-anon.m4: Update.
1950 * gnulib/import/m4/mode_t.m4: Update.
1951 * gnulib/import/m4/msvc-inval.m4: Update.
1952 * gnulib/import/m4/msvc-nothrow.m4: Update.
1953 * gnulib/import/m4/multiarch.m4: Update.
1954 * gnulib/import/m4/nocrash.m4: Update.
1955 * gnulib/import/m4/off_t.m4: Update.
1956 * gnulib/import/m4/onceonly.m4: Update.
1957 * gnulib/import/m4/open-cloexec.m4: Update.
1958 * gnulib/import/m4/open.m4: Update.
1959 * gnulib/import/m4/openat.m4: Update.
1960 * gnulib/import/m4/opendir.m4: Update.
1961 * gnulib/import/m4/pathmax.m4: Update.
1962 * gnulib/import/m4/rawmemchr.m4: Update.
1963 * gnulib/import/m4/readdir.m4: Update.
1964 * gnulib/import/m4/readlink.m4: Update.
1965 * gnulib/import/m4/realloc.m4: Update.
1966 * gnulib/import/m4/rename.m4: Update.
1967 * gnulib/import/m4/rewinddir.m4: Update.
1968 * gnulib/import/m4/rmdir.m4: Update.
1969 * gnulib/import/m4/save-cwd.m4: Update.
1970 * gnulib/import/m4/secure_getenv.m4: Update.
1971 * gnulib/import/m4/setenv.m4: Update.
1972 * gnulib/import/m4/signal_h.m4: Update.
1973 * gnulib/import/m4/ssize_t.m4: Update.
1974 * gnulib/import/m4/stat-time.m4: Update.
1975 * gnulib/import/m4/stat.m4: Update.
1976 * gnulib/import/m4/std-gnu11.m4: Update.
1977 * gnulib/import/m4/stdbool.m4: Update.
1978 * gnulib/import/m4/stddef_h.m4: Update.
1979 * gnulib/import/m4/stdint.m4: Update.
1980 * gnulib/import/m4/stdio_h.m4: Update.
1981 * gnulib/import/m4/stdlib_h.m4: Update.
1982 * gnulib/import/m4/strchrnul.m4: Update.
1983 * gnulib/import/m4/strdup.m4: Update.
1984 * gnulib/import/m4/strerror.m4: Update.
1985 * gnulib/import/m4/string_h.m4: Update.
1986 * gnulib/import/m4/strstr.m4: Update.
1987 * gnulib/import/m4/strtok_r.m4: Update.
1988 * gnulib/import/m4/sys_socket_h.m4: Update.
1989 * gnulib/import/m4/sys_stat_h.m4: Update.
1990 * gnulib/import/m4/sys_time_h.m4: Update.
1991 * gnulib/import/m4/sys_types_h.m4: Update.
1992 * gnulib/import/m4/tempname.m4: Update.
1993 * gnulib/import/m4/time_h.m4: Update.
1994 * gnulib/import/m4/unistd-safer.m4: Update.
1995 * gnulib/import/m4/unistd_h.m4: Update.
1996 * gnulib/import/m4/warn-on-use.m4: Update.
1997 * gnulib/import/m4/wchar_h.m4: Update.
1998 * gnulib/import/m4/wchar_t.m4: Update.
1999 * gnulib/import/m4/wctype_h.m4: Update.
2000 * gnulib/import/m4/wint_t.m4: Update.
2001 * gnulib/import/malloc.c: Update.
2002 * gnulib/import/malloc/scratch_buffer.h: Update.
2003 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2004 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2005 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2006 * gnulib/import/malloca.c: Update.
2007 * gnulib/import/malloca.h: Update.
2008 * gnulib/import/malloca.valgrind: Update.
2009 * gnulib/import/math.in.h: Update.
2010 * gnulib/import/mbrtowc.c: Update.
2011 * gnulib/import/mbsinit.c: Update.
2012 * gnulib/import/mbsrtowcs-impl.h: Update.
2013 * gnulib/import/mbsrtowcs-state.c: Update.
2014 * gnulib/import/mbsrtowcs.c: Update.
2015 * gnulib/import/memchr.c: Update.
2016 * gnulib/import/memmem.c: Update.
2017 * gnulib/import/mempcpy.c: Update.
2018 * gnulib/import/memrchr.c: Update.
2019 * gnulib/import/mkdir.c: Update.
2020 * gnulib/import/mkstemp.c: Update.
2021 * gnulib/import/msvc-inval.c: Update.
2022 * gnulib/import/msvc-inval.h: Update.
2023 * gnulib/import/msvc-nothrow.c: Update.
2024 * gnulib/import/msvc-nothrow.h: Update.
2025 * gnulib/import/open.c: Update.
2026 * gnulib/import/openat-die.c: Update.
2027 * gnulib/import/openat-priv.h: Update.
2028 * gnulib/import/openat-proc.c: Update.
2029 * gnulib/import/openat.c: Update.
2030 * gnulib/import/openat.h: Update.
2031 * gnulib/import/opendir.c: Update.
2032 * gnulib/import/pathmax.h: Update.
2033 * gnulib/import/pipe-safer.c: Update.
2034 * gnulib/import/rawmemchr.c: Update.
2035 * gnulib/import/readdir.c: Update.
2036 * gnulib/import/readlink.c: Update.
2037 * gnulib/import/realloc.c: Update.
2038 * gnulib/import/ref-add.sin: Update.
2039 * gnulib/import/ref-del.sin: Update.
2040 * gnulib/import/rename.c: Update.
2041 * gnulib/import/rewinddir.c: Update.
2042 * gnulib/import/rmdir.c: Update.
2043 * gnulib/import/same-inode.h: Update.
2044 * gnulib/import/save-cwd.c: Update.
2045 * gnulib/import/save-cwd.h: Update.
2046 * gnulib/import/scratch_buffer.h: Update.
2047 * gnulib/import/secure_getenv.c: Update.
2048 * gnulib/import/setenv.c: Update.
2049 * gnulib/import/signal.in.h: Update.
2050 * gnulib/import/stat-time.c: Update.
2051 * gnulib/import/stat-time.h: Update.
2052 * gnulib/import/stat-w32.c: Update.
2053 * gnulib/import/stat-w32.h: Update.
2054 * gnulib/import/stat.c: Update.
2055 * gnulib/import/stdbool.in.h: Update.
2056 * gnulib/import/stddef.in.h: Update.
2057 * gnulib/import/stdint.in.h: Update.
2058 * gnulib/import/stdio.in.h: Update.
2059 * gnulib/import/stdlib.in.h: Update.
2060 * gnulib/import/str-two-way.h: Update.
2061 * gnulib/import/strchrnul.c: Update.
2062 * gnulib/import/strdup.c: Update.
2063 * gnulib/import/streq.h: Update.
2064 * gnulib/import/strerror-override.c: Update.
2065 * gnulib/import/strerror-override.h: Update.
2066 * gnulib/import/strerror.c: Update.
2067 * gnulib/import/string.in.h: Update.
2068 * gnulib/import/stripslash.c: Update.
2069 * gnulib/import/strnlen1.c: Update.
2070 * gnulib/import/strnlen1.h: Update.
2071 * gnulib/import/strstr.c: Update.
2072 * gnulib/import/strtok_r.c: Update.
2073 * gnulib/import/sys_stat.in.h: Update.
2074 * gnulib/import/sys_time.in.h: Update.
2075 * gnulib/import/sys_types.in.h: Update.
2076 * gnulib/import/tempname.c: Update.
2077 * gnulib/import/tempname.h: Update.
2078 * gnulib/import/time.in.h: Update.
2079 * gnulib/import/unistd--.h: Update.
2080 * gnulib/import/unistd-safer.h: Update.
2081 * gnulib/import/unistd.in.h: Update.
2082 * gnulib/import/unsetenv.c: Update.
2083 * gnulib/import/verify.h: Update.
2084 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2085 * gnulib/import/wchar.in.h: Update.
2086 * gnulib/import/wctype.in.h: Update.
2087 * gnulib/import/xalloc-oversized.h: Update.
2088 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2089 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2090
2091 2018-08-16 Gary Benson <gbenson@redhat.com>
2092
2093 PR gdb/13000:
2094 * gdb/main.c (captured_main_1): Exit with nonzero status
2095 in batch mode if the last command to be executed failed.
2096 * NEWS: Mention the above.
2097
2098 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2099
2100 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2101 end of warning message.
2102
2103 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2104
2105 PR gdb/22943:
2106 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2107 (aarch64_extract_return_value): Use
2108 aapcs_is_vfp_call_or_return_candidate.
2109 (aarch64_return_in_memory): Likewise.
2110 (aarch64_store_return_value): Likewise.
2111
2112 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2113
2114 * aarch64-tdep.c
2115 (aapcs_is_vfp_call_or_return_candidate): Make static
2116 (pass_in_v_or_stack): Remove function.
2117 (pass_in_v_vfp_candidate): New function.
2118 (aarch64_push_dummy_call): Check for float register candidates.
2119
2120 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2121
2122 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2123 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2124 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2125
2126 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2127
2128 PR build/23399
2129 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2130 (struct ipa_sym_addresses): Rename to...
2131 (struct ipa_sym_addresses_common): ... this.
2132 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2133
2134 2018-08-28 Tom Tromey <tom@tromey.com>
2135
2136 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2137 (token_fifo): Now a std::vector.
2138 (yylex, c_parse): Update.
2139 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2140 (token_fifo): Now a std::vector.
2141 (yylex, d_parse): Update.
2142 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2143 (token_fifo): Now a std::vector.
2144 (yylex, go_parse): Update.
2145
2146 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2147
2148 * parser-defs.h (struct type_stack) <elements>: Change type to
2149 std::vector<union type_stack_elt>.
2150 <depth, size>: Remove.
2151 * parse.c (parse_exp_in_context_1): Adjust.
2152 (type_stack_reserve): Remove.
2153 (check_type_stack_depth): Remove.
2154 (insert_into_type_stack): Adjust to std::vector.
2155 (insert_type): Likewise.
2156 (push_type): Likewise.
2157 (push_type_int): Likewise.
2158 (insert_type_address_space): Likewise.
2159 (pop_type): Likewise.
2160 (pop_type_int): Likewise.
2161 (pop_typelist): Likewise.
2162 (pop_type_stack): Likewise.
2163 (append_type_stack): Likewise.
2164 (push_type_stack): Likewise.
2165 (get_type_stack): Likewise.
2166 (type_stack_cleanup): Likewise.
2167 (push_typelist): Likewise.
2168 (follow_types): Likewise.
2169 (_initialize_parse): Likewise.
2170
2171 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2172
2173 * NEWS: Mention csky target.
2174
2175 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2176 Hafiz Abid Qadeer <abidh@codesourcery.com>
2177 Don Breazeal <donb@codesourcery.com>
2178
2179 * csky-linux-tdep.c: New file.
2180 * csky-tdep.c: Likewise.
2181 * csky-tdep.h: Likewise.
2182 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2183 csky-tdep.o.
2184 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2185 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2186 * configure.tgt: Add csky support.
2187
2188 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2189
2190 * python/py-framefilter.c (py_print_frame): Print frame architecture
2191 when printing on an MI output.
2192
2193 2018-08-27 Tom Tromey <tom@tromey.com>
2194
2195 PR build/23087:
2196 * configure: Rebuild.
2197 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2198
2199 2018-08-27 Tom Tromey <tom@tromey.com>
2200
2201 * aarch64-linux-tdep.c
2202 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2203 casts to int.
2204
2205 2018-08-27 Tom Tromey <tom@tromey.com>
2206
2207 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2208 unsigned.
2209 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2210 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2211 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2212 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2213 unsigned.
2214
2215 2018-08-27 Tom Tromey <tom@tromey.com>
2216
2217 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2218 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2219
2220 2018-08-27 Tom Tromey <tom@tromey.com>
2221
2222 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2223 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2224 ULONGEST_MAX.
2225 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2226 ULONGEST_MAX.
2227 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2228 ULONGEST_MAX.
2229 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2230 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2231 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2232 ULONGEST_MAX.
2233 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2234 (ppc64_linux_sigaction_tramp_frame)
2235 (ppc32_linux_sighandler_tramp_frame)
2236 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2237 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2238 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2239 * mn10300-linux-tdep.c (am33_linux_sigframe)
2240 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2241 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2242 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2243 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2244 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2245 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2246 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2247 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2248 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2249 * microblaze-linux-tdep.c
2250 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2251 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2252 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2253 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2254 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2255 * common/common-types.h (ULONGEST_MAX): New define.
2256 (CORE_ADDR_MAX): Fix formatting.
2257 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2258 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2259 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2260 (arm_linux_rt_sigreturn_tramp_frame)
2261 (arm_eabi_linux_sigreturn_tramp_frame)
2262 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2263 (thumb2_eabi_linux_sigreturn_tramp_frame)
2264 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2265 (arm_linux_restart_syscall_tramp_frame)
2266 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2267 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2268 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2269 ULONGEST_MAX.
2270 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2271
2272 2018-08-27 Tom Tromey <tom@tromey.com>
2273
2274 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2275 CORE_ADDR_MAX.
2276 * mips-tdep.c (mips_deal_with_atomic_sequence)
2277 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2278 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2279 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2280 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2281 CORE_ADDR_MAX.
2282 * aarch64-tdep.c (aarch64_software_single_step): Use
2283 CORE_ADDR_MAX.
2284
2285 2018-08-27 Tom Tromey <tom@tromey.com>
2286
2287 * linespec.c (complete_linespec_component): Add cast to "char".
2288 * completer.c (completion_tracker::build_completion_result): Add
2289 cast to "char".
2290
2291 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2292
2293 * solist.h (struct solist, struct target_so_ops): Fix
2294 indentation.
2295
2296 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2297
2298 * ada-tasks.c (ada_task_info_s): Remove typedef.
2299 (DEF_VEC_O(ada_task_info_s)): Remove.
2300 (struct ada_tasks_inferior_data): Initialize fields.
2301 <task_list>: Make an std::vector.
2302 (get_ada_tasks_inferior_data): Allocate with new.
2303 (ada_get_task_number): Adjust.
2304 (get_task_number_from_id): Likewise.
2305 (valid_task_id): Likewise.
2306 (ada_get_task_info_from_ptid): Likewise.
2307 (iterate_over_live_ada_tasks): Likewise.
2308 (add_ada_task): Likewise.
2309 (read_known_tasks): Likewise.
2310 (ada_build_task_list): Likewise.
2311 (print_ada_task_info): Likewise.
2312 (info_task): Likewise.
2313 (task_command_1): Likewise.
2314
2315 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2316
2317 * ada-lang.c (add_angle_brackets): Return std::string.
2318
2319 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2320
2321 * python/py-threadevent.c (py_get_event_thread): Initialize
2322 pythread.
2323
2324 2018-08-24 Pedro Alves <palves@redhat.com>
2325
2326 * python/py-bpevent.c (create_breakpoint_event_object): Use
2327 copy-initialization.
2328 * python/py-continueevent.c (emit_continue_event): Use
2329 copy-initialization.
2330 * python/py-exitedevent.c (create_exited_event_object): Return a
2331 gdbpy_ref<>.
2332 (emit_exited_event): Use copy-initialization.
2333 * python/py-inferior.c (python_new_inferior)
2334 (python_inferior_deleted, add_thread_object): Use
2335 copy-initialization.
2336 * python/py-infevents.c (create_inferior_call_event_object)
2337 (create_register_changed_event_object)
2338 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2339 (emit_inferior_call_event, emit_memory_changed_event)
2340 (emit_register_changed_event): Use copy-initialization.
2341 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2342 Return a gdbpy_ref<>.
2343 (emit_new_objfile_event): Use copy-initialization.
2344 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2345 (emit_clear_objfiles_event): Use copy-initialization.
2346 * python/py-signalevent.c (create_signal_event_object): Use
2347 copy-initialization.
2348 * python/py-threadevent.c (create_thread_event_object): Use
2349 copy-initialization.
2350
2351 2018-08-24 Pedro Alves <palves@redhat.com>
2352 Simon Marchi <simon.marchi@ericsson.com>
2353
2354 PR gdb/23379
2355 * python/py-continueevent.c: Include "gdbthread.h".
2356 (create_continue_event_object): Add intro comment. Add 'ptid'
2357 parameter. Use it to find thread to pass to
2358 create_thread_event_object.
2359 (emit_continue_event): Pass PTID down to
2360 create_continue_event_object.
2361 * python/py-event.h (py_get_event_thread): Declare.
2362 (create_thread_event_object): Remove default from 'thread'
2363 parameter.
2364 * python/py-stopevent.c (create_stop_event_object): Use
2365 py_get_event_thread.
2366 * python/py-threadevent.c (get_event_thread): Rename to ...
2367 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2368 and use it to find the thread.
2369 (create_thread_event_object): Assert that THREAD isn't null.
2370 Don't find the event thread here.
2371
2372 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2373
2374 * block.h (blockrange, blockranges): New struct declarations.
2375 (struct block): Add new field named `ranges'.
2376 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2377 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2378 macros for accessing ranges in struct block.
2379 (make_blockranges): New declaration.
2380 block.c (make_blockranges): New function.
2381 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2382 for block.
2383 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2384 * blockframe.c (cache_pc_function_block): New static global.
2385 (clear_pc_function_cache): Clear cache_pc_function_block.
2386 (find_pc_partial_function): Move comment to symtab.h. Add
2387 support for non-contiguous blocks.
2388 * cli/cli-cmds.c (block.h): Include.
2389 (print_disassembly): Handle printing of non-contiguous blocks.
2390 (disassemble_current_function): Likewise.
2391 (disassemble_command): Likewise.
2392
2393 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2394 BLOCK_START.
2395 * blockframe.c (get_pc_function_start): Likewise.
2396 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2397 (gcc_symbol_address): Likewise.
2398 * compile/compile-object-run.c (compile_object_run): Likewise.
2399 * compile/compile.c (get_expr_block_and_pc): Likewise.
2400 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2401 (func_addr_to_tail_call_list): Likewise.
2402 * findvar.c (default_read_var_value): Likewise.
2403 * inline-frame.c (inline_frame_this_id): Likewise.
2404 (skip-inline_frames): Likewise.
2405 * infcmd.c (until_next_command): Likewise.
2406 * linespec.c (convert_linespec_to_sals): Likewise.
2407 * parse.c (parse_exp_in_context_1): Likewise.
2408 * printcmd.c (build_address_symbolic): likewise.
2409 (info_address_command): Likewise.
2410 symtab.c (find_function_start_sal): Likewise.
2411 (skip_prologue_sal): Likewise.
2412 (find_function_alias_target): Likewise.
2413 (find_gnu_ifunc): Likewise.
2414 * stack.c (find_frame_funname): Likewise.
2415 * symtab.c (fixup_symbol_section): Likewise.
2416 (find_function_start_sal): Likewise.
2417 (skip_prologue_sal): Likewsie.
2418 (find_function_alias_target): Likewise.
2419 (find_gnu_ifunc): Likewise.
2420 * tracepoint.c (info_scope_command): Likewise.
2421 * value.c (value_fn_field): Likewise.
2422
2423 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2424 in place of find_pc_partial_function.
2425 * blockframe.c (find_function_entry_range_from_pc): New function.
2426 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2427 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2428 for each range in a block.
2429
2430
2431 2018-08-23 Xavier Roirand <roirand@adacore.com>
2432
2433 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2434 incrementation.
2435
2436 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2437
2438 * solib-svr4.c (read_program_headers_from_bfd): Return
2439 gdb::optional<gdb::byte_vector>.
2440 (svr4_exec_displacement): Adjust.
2441
2442 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2443
2444 * solib-svr4.c (read_program_header): Return
2445 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2446 (find_program_interpreter): Return
2447 gdb::optional<gdb::byte_vector>.
2448 (scan_dyntag_auxv): Adjust.
2449 (enable_break): Adjust.
2450 (svr4_exec_displacement): Adjust.
2451
2452 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2453
2454 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2455 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2456
2457 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2458
2459 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2460 string_vprintf.
2461 * guile/scm-utils.c (gdbscm_printf): Likewise.
2462 * serial.c (serial_printf): Likewise.
2463 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2464
2465 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2466
2467 * stack.c (print_frame): Print frame architecture when printing on
2468 an MI output.
2469 * NEWS: Mention new "arch" attribute in frame output.
2470
2471 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2472
2473 * arch/aarch64.h (aarch64_regnum): Update comment.
2474
2475 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2476
2477 * NEWS: Add SVE to 8.2 section.
2478
2479 2018-08-21 Pedro Alves <palves@redhat.com>
2480
2481 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2482 out from gdbscm_parse_function_args.
2483 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2484 gdbscm_parse_function_args_1.
2485
2486 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2487
2488 PR gdb/17816
2489 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2490 operator.
2491
2492 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2493
2494 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2495
2496 2018-08-19 Michael Spang <spang@google.com>
2497
2498 PR gdb/11786
2499 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2500 for PT_TLS segments.
2501
2502 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2503
2504 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2505 dwarf_variable_value.
2506 * dwarf2-frame.c (class dwarf_expr_executor):
2507 Add override for dwarf_variable_value.
2508 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2509 (class symbol_needs_eval_context): Likewise.
2510 (indirect_synthetic_pointer): Add forward declaration.
2511 (sect_variable_value): New function.
2512 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2513 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2514 for DW_OP_GNU_variable_value.
2515
2516 2018-08-16 Tom Tromey <tom@tromey.com>
2517
2518 * top.c (read_command_file): Update.
2519 (command_line_input): Remove "repeat" argument.
2520 * ada-lang.c (get_selections): Update.
2521 * linespec.c (decode_line_2): Update.
2522 * defs.h (command_line_input): Remove argument.
2523 * cli/cli-script.c (read_next_line): Update.
2524 * python/py-gdb-readline.c: Update.
2525
2526 2018-08-17 Tom Tromey <tom@tromey.com>
2527
2528 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2529 command_line_input.
2530
2531 2018-08-15 Tom Tromey <tom@tromey.com>
2532
2533 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2534
2535 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2536
2537 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2538 If used, use find_pc_partial_function to find address range
2539 to disassemble.
2540 * mi/mi-main.c (mi_cmd_list_features): Report
2541 "data-disassemble-a-option" feature.
2542 * NEWS: Mention new -data-disassemble option -a.
2543
2544 2018-08-13 Tom Tromey <tom@tromey.com>
2545
2546 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2547
2548 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2549
2550 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2551 (aarch64_linux_collect_sve_regset): Likewise.
2552 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2553 * regcache.h (regcache_map_entry_size): New function.
2554
2555 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2556
2557 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2558 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2559 (SVE_HEADER_VL_LENGTH): Likewise.
2560 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2561 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2562 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2563 (SVE_HEADER_SIZE_OFFSET): Likewise.
2564 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2565 (SVE_HEADER_VL_OFFSET): Likewise.
2566 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2567 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2568 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2569 (SVE_HEADER_SIZE): Likewise.
2570 (aarch64_linux_core_read_vq): Add function.
2571 (aarch64_linux_core_read_description): Check for SVE section.
2572
2573 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2574
2575 * aarch64-fbsd-tdep.c
2576 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2577 collect_size.
2578 * aarch64-linux-tdep.c
2579 (aarch64_linux_iterate_over_regset_sections): Likewise.
2580 * alpha-linux-tdep.c
2581 (alpha_linux_iterate_over_regset_sections):
2582 * alpha-nbsd-tdep.c
2583 (alphanbsd_iterate_over_regset_sections): Likewise.
2584 * amd64-fbsd-tdep.c
2585 (amd64fbsd_iterate_over_regset_sections): Likewise.
2586 * amd64-linux-tdep.c
2587 (amd64_linux_iterate_over_regset_sections): Likewise.
2588 * arm-bsd-tdep.c
2589 (armbsd_iterate_over_regset_sections): Likewise.
2590 * arm-fbsd-tdep.c
2591 (arm_fbsd_iterate_over_regset_sections): Likewise.
2592 * arm-linux-tdep.c
2593 (arm_linux_iterate_over_regset_sections): Likewise.
2594 * corelow.c (get_core_registers_cb): Likewise.
2595 (core_target::fetch_registers): Likewise.
2596 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2597 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2598 * gdbarch.h (void): Regenerate.
2599 * gdbarch.sh: Add supply_size and collect_size.
2600 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2601 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2602 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2603 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2604 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2605 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2606 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2607 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2608 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2609 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2610 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2611 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2612 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2613 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2614 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2615 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2616 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2617 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2618 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2619 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2620 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2621 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2622 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2623 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2624 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2625 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2626 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2627 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2628 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2629 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2630
2631 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2632
2633 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2634 with string_printf.
2635
2636 2018-08-10 Keith Seitz <keiths@redhat.com>
2637
2638 * compile/compile-c-support.c (add_code_header, add_code_footer):
2639 Move into policy class.
2640 (c_push_user_expression, pop_user_expression_nop)
2641 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2642 (compile_program): New host class.
2643 (c_compile_program): New typedef.
2644 (c_compute_porgram): Use c_compile_program.
2645
2646 2018-08-10 Keith Seitz <keiths@redhat.com>
2647
2648 * compile/compile-internal.h (compile_instance::~compile_instance):
2649 Remove calls to htab_delete.
2650 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2651 * compile.c (compile_instance::compile_instance): Initialize
2652 htab unique pointers.
2653 (compile_instance::get_cached_type, compile_instance::insert_type)
2654 (compile_instance::error_symbol_once): Update for unique_ptr.
2655
2656 2018-08-10 Keith Seitz <keiths@redhat.com>
2657
2658 * compile/compile-c-symbols.c (struct symbol_error)
2659 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2660 (compile_instance::insert_symbol_error)
2661 (compile_instance::error_symbol_once): Move to ...
2662 * compile/compile.c: ... here.
2663
2664 2018-08-10 Keith Seitz <keiths@redhat.com>
2665
2666 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2667 instead of `new_compile_instance'.
2668 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2669 Update description.
2670 If the symbol error map is not initialized, create it.
2671 (generate_c_for_for_one_symbol): Do not check/initialize
2672 the symbol error map.
2673 * compile/compile-c-types.c (compile_c_instance): Make a class.
2674 Update all callers.
2675 (compile_instance::compile_instance): Initialize the type cache.
2676 (get_cached_type): New function.
2677 (insert_type): Update description.
2678 (compile_c_instance::m_default_cflags): Define.
2679 (convert_type): Update description. Use get_cached_type.
2680 (delete_instance): Moved to destructor.
2681 (new_compile_instance): Moved to constructor.
2682 * compile/compile-c.h (compile_c_instance): Make class inheriting
2683 from compile_instance.
2684 <base>: Remove field.
2685 <type_map, symbol_err_map>: Move to base class.
2686 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2687 * compile/compile-internal.h (compile_instance): Make class.
2688 <type_map_t, symbol_err_map_t>: Define.
2689 <fe>: Rename to `m_gcc_fe'.
2690 <scope, block, gcc_target_options>: Add `m_' prefix.
2691 <m_type_map, m_symbol_err_map>: New fields, moved from
2692 compile_c_instance.
2693 <destroy>: Remove.
2694 (convert_type, new_compile_instance): Remove.
2695 * compile/compile.c (cleanup_compile_instance): Remove.
2696 (compile_to_object): Use unique_ptr to eliminate cleanups.
2697 (compile_instance::set_print_callback, compile_instance::version)
2698 (compile_instance::set_verbose)
2699 (compile_instance::set_driver_filename)
2700 (compile_instance::set_triplet_regexp)
2701 (compile_instance::set_arguments)
2702 (compile_instance::set_source_file)
2703 (compile_instance::compile): Define.
2704
2705 2018-08-10 Keith Seitz <keiths@redhat.com>
2706
2707 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2708 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2709 gcc-c-fe.def to define C plugin.
2710 (delete_instance): Delete `c_plugin'.
2711 (new_compile_instance): Initialize `c_plugin'.
2712 * compile/compile-c.h: Include gcc_c_plugin.h.
2713 (struct compile_c_instance) <c_plugin>: New member.
2714 * gcc-c-plugin.h: New file.
2715 Update all callers with API change.
2716
2717 2018-08-10 Keith Seitz <keiths@redhat.com>
2718
2719 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2720 (HFILES_NO_SRCDIR): ... to here.
2721 Add compile-internal.h and compile-c.h.
2722 * compile/compile-c-support.c: Include compile-c.h.
2723 * compile/compile-c-symbols.c: Include compile-c.h.
2724 (generate_c_for_variable_locations): Update comment.
2725 * compile/compile-c-types.c: Include compile-c.h.
2726 * compile/compile-c.h: New file -- moved C language declarations
2727 from other files here.
2728 * compile/compile-internal.h: Do not include hashtab.h or
2729 common/enum-flags.h.
2730 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2731 (gcc_convert_symbol, gcc_symbol_address)
2732 (generate_c_for_variable_locations, c_get_mode_for_size)
2733 (c_get_range_decl_name): Definitions moved to compile-c.h.
2734 * compile/compile-loc2c.c: Include compile-c.h.
2735
2736 2018-08-10 Keith Seitz <keiths@redhat.com>
2737
2738 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2739 (c_symbol_substitution_name): ... this.
2740 Update all callers.
2741
2742 2018-08-10 Keith Seitz <keiths@redhat.com>
2743
2744 * compile/compile-c-support.c (c_compute_program): Use
2745 unique_xmalloc_ptr to eliminate cleanup.
2746 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2747 Return a unique_xmalloc_ptr and eliminate cleanup.
2748 * compile/compile-internal.h (generate_c_for_variable_locations):
2749 Return unique_xmalloc_ptr and update description.
2750
2751 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2752
2753 * corelow.c (core_target::get_core_register_section): Rename
2754 min_size to section_min_size.
2755
2756 2018-08-09 Jim Wilson <jimw@sifive.com>
2757
2758 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2759 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2760 * NEWS: Mention new GNU/Linux RISC-V target.
2761 * configure.host: Add riscv*-*-linux*.
2762 * configure.nat: Add riscv*.
2763 * configure.tgt: Add riscv*-*-linux*.
2764 * riscv-linux-nat.c: New file.
2765 * riscv-linux-tdep.c: New file.
2766
2767 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2768
2769 * infrun.c (resume): Make static, add forward declaration.
2770 (proceed): Update header comment.
2771 * infrun.h (resume): Delete declaration.
2772
2773 2018-08-09 Tom Tromey <tom@tromey.com>
2774
2775 * riscv-tdep.h: Minor formatting fixes.
2776
2777 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2778
2779 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2780 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2781 (test_mkdir_recursive): Likewise.
2782 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2783
2784 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2785
2786 * valarith.c (value_subscripted_rvalue): If an array is not in
2787 memory, and we don't know the upper bound, then we can't know that
2788 the requested element exists or not.
2789
2790 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2793 (target_options_to_string): Add comment.
2794
2795 2018-08-08 Tom Tromey <tom@tromey.com>
2796
2797 * unittests/scoped_mmap-selftests.c: Check result of "write".
2798
2799 2018-08-08 Jim Wilson <jimw@sifive.com>
2800
2801 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2802 (decode_register_index_short): New.
2803 (decode_j_type_insn, decode_cj_type_insn): New.
2804 (decode_b_type_insn, decode_cb_type_insn): New.
2805 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2806 local xlen. Check xlen when decoding ambiguous compressed insns. In
2807 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2808 is_c_sw_insn instead of is_sw_insn.
2809 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2810 (riscv_software_single_step): New.
2811 * riscv-tdep.h (riscv_software_single_step): Declare.
2812
2813 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2814 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2815
2816 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2817
2818 PR gdb/18050:
2819 * target.c (dispose_inferior): Don't dispose of inferiors that are
2820 already killed.
2821
2822 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2823
2824 * remote.c (remote_target::download_tracepoint): Change char* to
2825 const char*.
2826
2827 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2828
2829 * target.h (target_options_to_string): Return an std::string.
2830 * target.c (str_comma_list_concat_elem): Return void, use
2831 std::string.
2832 (do_option): Likewise.
2833 (target_options_to_string): Return an std::string.
2834 * linux-nat.c (linux_nat_target::wait): Adjust.
2835 * target-debug.h (target_debug_print_options): Adjust.
2836
2837 2018-08-07 Tom Tromey <tom@tromey.com>
2838
2839 * Makefile.in (CPPFLAGS): New variable.
2840 (INTERNAL_CPPFLAGS): Use it.
2841
2842 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2843
2844 * NEWS: Mention the index cache.
2845
2846 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2847
2848 * common/pathstuff.h (get_standard_cache_dir): New.
2849 * common/pathstuff.c (get_standard_cache_dir): New.
2850 * build-id.h (build_id_to_string): New.
2851 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2852 DEBUG_STR_SUFFIX): Move to here.
2853 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2854 DEBUG_STR_SUFFIX): Move from there.
2855 (write_psymtabs_to_index): Make non-static, add basename
2856 parameter. Write to temporary files, rename when done.
2857 (save_gdb_index_command): Adjust call to
2858 write_psymtabs_to_index.
2859 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2860 field.
2861 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2862 (get_gdb_index_contents_from_cache): New.
2863 (get_gdb_index_contents_from_cache_dwz): New.
2864 (dwarf2_initialize_objfile): Read index from cache.
2865 (dwarf2_build_psymtabs): Save to index.
2866 * dwarf-index-cache.h: New file.
2867 * dwarf-index-cache.c: New file.
2868 * dwarf-index-write.h: New file.
2869
2870 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2871
2872 * gnulib/aclocal.m4: Re-generate.
2873 * gnulib/config.in: Re-generate.
2874 * gnulib/configure: Re-generate.
2875 * gnulib/import/Makefile.am: Re-generate.
2876 * gnulib/import/Makefile.in: Re-generate.
2877 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2878 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2879 * gnulib/import/m4/mkdir.m4: New file.
2880 * gnulib/import/mkdir.c: New file.
2881 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2882 module.
2883
2884 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2887 * common/scoped_mmap.c: New file.
2888 * common/scoped_mmap.h (destroy): New method.
2889 (~scoped_mmap, reset): Use destroy.
2890 (scoped_mmap): New move constructor.
2891 (mmap_file): New declaration.
2892 * unittests/scoped_mmap-selftests.c (test_normal,
2893 test_invalid_filename, run_tests): New functions.
2894 (_initialize_scoped_mmap_selftests): Register selftest.
2895
2896 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2897
2898 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2899 (read_gdb_index_from_buffer): ... this. Remove section
2900 parameter, add buffer parameter.
2901 (get_gdb_index_contents_ftype,
2902 get_gdb_index_contents_dwz_ftype): New typedefs.
2903 (dwarf2_read_gdb_index): Add callback parameters to get the
2904 index contents.
2905 (get_gdb_index_contents_from_section): New.
2906 (dwarf2_initialize_objfile): Update call to
2907 dwarf2_read_gdb_index.
2908
2909 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2910
2911 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2912 (gdb_open_cloexec): Likewise.
2913 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2914 (commandline_from_pid): Likewise.
2915 (linux_xfer_osdata_threads): Likewise.
2916 (linux_xfer_osdata_fds): Likewise.
2917 * ada-lang.c (is_package_name): Likewise.
2918 * auxv.c (procfs_xfer_auxv): Likewise.
2919 * breakpoint.c (print_one_breakpoint_location): Use
2920 uiout::field_fmt.
2921 (print_one_catch_solib): Use string_printf.
2922 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2923 (add_pe_forwarded_sym): Likewise.
2924 * dwarf2read.c (create_type_unit_group): Likewise.
2925 (build_error_marker_type): Likewise.
2926 * infcall.c (get_function_name): Likewise.
2927 * valprint.c (print_converted_chars_to_obstack): Likewise.
2928 * xtensa-tdep.c (xtensa_register_type): Likewise.
2929
2930 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2931
2932 * remote.c (remote_target::download_tracepoint): Fix format
2933 string errors.
2934
2935 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2936
2937 * tracefile.c: Include common/byte-vector.h.
2938 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2939 with trace_regblock_size if needed. Update uses of buf.
2940
2941 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2942
2943 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2944 std::vector<unsigned char>.
2945 * tracepoint.c (collection_list::collection_list): Remove
2946 m_regs_mask initializer from initializer list. Resize
2947 m_regs_mask using the largest remote register number.
2948 (collection_list::add_remote_register): Remove size check on
2949 m_regs_mask. Use at to access element.
2950 (collection_list::stringify): Change type of temp_buf to
2951 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2952 stringify the register mask. Use pack_hex_byte for the register
2953 mask.
2954
2955 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2956
2957 * tracepoint.h (class collection_list) <add_register>: Remove.
2958 <add_remote_register, add_ax_registers, add_local_register>:
2959 Declare.
2960 <add_memrange>: Add scope parameter.
2961 * tracepoint.c (encode_actions_1): Likewise.
2962 (collection_list::add_register): Rename to ...
2963 (collection_list::add_remote_register): ... this. Update
2964 comment.
2965 (collection_list::add_ax_registers, add_local_register): New
2966 methods.
2967 (collection_list::add_memrange): Add scope parameter. Call
2968 add_local_register instead of add_register.
2969 (finalize_tracepoint_aexpr): New function.
2970 (collection_list::collect_symbol): Update calls to add_memrange.
2971 Call add_local_register instead of add_register. Call
2972 add_ax_registers. Call finalize_tracepoint_aexpr.
2973 (encode_actions_1): Get remote regnos for $reg action. Call
2974 add_remote_register, add_ax_registers, and add_local_register.
2975 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2976 (validate_actionline): Call finalize_tracepoint_aexpr.
2977
2978 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2979
2980 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2981 Replace array buf with gdb::char_vector buf, of size
2982 get_remote_packet_size (). Replace references to buf and
2983 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2984 and xsnprintf with snprintf. Raise errors if the buffer is too
2985 small.
2986
2987 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2988
2989 * remote.c (remote_target::download_tracepoint): Fix the has_more
2990 predicate in the QTDP action list iteration.
2991
2992 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2993
2994 * remote.c (remote_target::download_tracepoint): Fix indentation
2995 in for block.
2996
2997 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2998
2999 * proc-api.c (_initialize_proc_api): Remove c, unused.
3000 * procfs.c (procfs_init_inferior): Remove signals, unused.
3001 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3002 unused.
3003
3004 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3005 Andrew Burgess <andrew.burgess@embecosm.com>
3006
3007 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3008 'W_STOPCODE (0)' as this could be ambiguous.
3009
3010 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3011
3012 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3013 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3014 "ai_socktype").
3015
3016 2018-08-02 Tom Tromey <tom@tromey.com>
3017
3018 PR symtab/16842.
3019 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3020 symbols.
3021 (process_structure_scope): Likewise.
3022
3023 2018-08-02 Xavier Roirand <roirand@adacore.com>
3024
3025 PR gdb/22629:
3026 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3027 kill inferior.
3028
3029 2018-08-02 Tom Tromey <tom@tromey.com>
3030
3031 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3032 (darwin_suspend_inferior, darwin_resume_inferior)
3033 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3034 (darwin_check_new_threads): Check result of get_darwin_inferior.
3035
3036 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3037
3038 GDB 8.1.1 released.
3039
3040 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3041
3042 * varobj.c (varobj_get_path_expr_parent): Report an error if
3043 parent is a dynamic varobj.
3044
3045 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3046
3047 * gnulib/aclocal.m4: Re-generate.
3048 * gnulib/config.in: Re-generate.
3049 * gnulib/configure: Re-generate.
3050 * gnulib/import/Makefile.in: Re-generate.
3051 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3052 * gnulib/import/m4/onceonly.m4: Re-generate.
3053
3054 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * target-descriptions.c (struct xml_test_tdesc): New.
3057 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3058 (record_xml_tdesc): Update.
3059 (maintenance_check_xml_descriptions): Update.
3060 * target-descriptions.h (record_xml_tdesc): Update comment.
3061
3062 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3063
3064 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3065 checking array bounds are defined.
3066
3067 2018-07-30 Tom Tromey <tom@tromey.com>
3068
3069 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3070 irreflexivity violation.
3071
3072 2018-07-30 Tom Tromey <tom@tromey.com>
3073
3074 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3075 * value.c (unpack_long): Remove lint code.
3076 * valops.c (value_ind): Remove lint code.
3077 * valarith.c (value_x_binop, value_x_unop, value_equal)
3078 (value_pos): Remove lint code.
3079
3080 2018-07-28 Tom de Vries <tdevries@suse.de>
3081
3082 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3083 with undefined upper bound as <optimized out>.
3084
3085 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3086
3087 * gcore.in: Rename variable "name" to "prefix". Expand
3088 "usage" text.
3089
3090 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3091
3092 * windows-nat.c (windows_nat_target::create_inferior): Update to
3093 call close() in global namespace.
3094
3095 2018-07-26 Tom Tromey <tom@tromey.com>
3096
3097 * dwarf-index-write.c (add_address_entry): Don't add objfile
3098 offsets.
3099 * dbxread.c (find_stab_function): Rename from
3100 find_stab_function_addr. Return a bound_minimal_symbol.
3101 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3102 Don't add objfile offsets.
3103 (end_psymtab): Use raw_text_low, raw_text_high,
3104 MSYMBOL_VALUE_RAW_ADDRESS.
3105 (read_ofile_symtab): Update.
3106 (process_one_symbol): Update.
3107 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3108 offsets.
3109 (dw2_relocate): Remove.
3110 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3111 searching addrmap.
3112 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3113 Update.
3114 (process_psymtab_comp_unit_reader, add_partial_symbol)
3115 (add_partial_subprogram, dwarf2_ranges_read): Update.
3116 (load_partial_dies): Update.
3117 (add_address_entry): Don't add objfile offsets.
3118 (dwarf2_build_include_psymtabs): Update.
3119 (create_addrmap_from_aranges): Don't add objfile offsets.
3120 (dw2_find_pc_sect_compunit_symtab): Update.
3121 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3122 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3123 Update.
3124 (parse_partial_symbols): Don't add objfile offsets. Use
3125 raw_text_low, raw_text_high. Update.
3126 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3127 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3128 or call 'relocate' quick function. Clear psymbol_map.
3129 * psympriv.h (struct partial_symbol) <address>: Add section
3130 offset.
3131 <set_unrelocated_address>: Rename from set_address.
3132 <raw_text_low, raw_text_high>: New methods.
3133 <text_low, text_high>: Add objfile parameter.
3134 (add_psymbol_to_bcache): Add 'section' parameter. Call
3135 set_unrelocated_address.
3136 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3137 (find_pc_psymbol): Update.
3138 (fixup_psymbol_section, relocate_psymtabs): Remove.
3139 (dump_psymtab, psym_functions): Update.
3140 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3141 parameter.
3142 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3143 (start_psymtab_common): Update.
3144 * symfile-debug.c (debug_qf_relocate): Remove.
3145 (debug_sym_quick_functions): Update.
3146 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3147 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3148 Update.
3149
3150 2018-07-26 Tom Tromey <tromey@redhat.com>
3151
3152 * dbxread.c (end_psymtab): Use text_high_valid and
3153 text_low_valid.
3154 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3155 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3156 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3157 Update comment.
3158 <text_low_valid, text_high_valid>: New fields.
3159 <set_text_low, set_text_high>: Update.
3160 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3161
3162 2018-07-26 Tom Tromey <tom@tromey.com>
3163
3164 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3165 Update.
3166 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3167 textlow and texthigh fields.
3168 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3169 Update.
3170 * mdebugread.c (parse_lines, parse_partial_symbols)
3171 (psymtab_to_symtab_1): Update.
3172 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3173 Rename fields. Update comment. Now private.
3174 <text_low, text_high, set_text_low, set_text_high>: New methods.
3175 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3176 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3177 (start_psymtab_common, maintenance_info_psymtabs)
3178 (maintenance_check_psymtabs): Update.
3179 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3180 texthigh fields.
3181 (scan_xcoff_symtab): Update.
3182
3183 2018-07-26 Tom Tromey <tromey@redhat.com>
3184
3185 * psympriv.h (struct partial_symbol) <unrelocated_address,
3186 address, set_address>: New methods.
3187 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3188 (fixup_psymbol_section, relocate_psymtabs): Update.
3189 (print_partial_symbols): Add 'objfile' parameter. Update.
3190 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3191 Update.
3192
3193 2018-07-26 Tom Tromey <tom@tromey.com>
3194
3195 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3196 (debug_names::write_psymbols): Update.
3197 * psympriv.h (struct partial_symbol): Derive from
3198 general_symbol_info.
3199 <obj_section>: New method.
3200 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3201 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3202 (find_pc_sect_psymbol, fixup_psymbol_section)
3203 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3204 (print_partial_symbols, recursively_search_psymtabs)
3205 (compare_psymbols, psymbol_hash, psymbol_compare)
3206 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3207 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3208
3209 2018-07-26 Tom Tromey <tromey@redhat.com>
3210
3211 * dbxread.c (end_psymtab): Remove dead code.
3212
3213 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3214
3215 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3216 DWARF unwinders are disabled.
3217 * dwarf2-frame.c: Add dwarf2read.h include.
3218 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3219 disabled.
3220 (dwarf2_frame_unwinders_enabled_p): Define.
3221 (show_dwarf_unwinders_enabled_p): New function.
3222 (_initialize_dwarf2_frame): Register switch to control DWARF
3223 unwinder use.
3224 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3225 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3226 (show_dwarf_cmdlist): Remove static keyword.
3227 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3228 (show_dwarf_cmdlist): Declare.
3229 * NEWS: Document new feature.
3230
3231 2018-07-26 Tom de Vries <tdevries@suse.de>
3232
3233 PR breakpoints/23366
3234 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3235
3236 2018-07-26 Tom de Vries <tdevries@suse.de>
3237
3238 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3239 DW_AT_count can't be translated to a dynamic prop.
3240
3241 2018-07-25 Tom de Vries <tdevries@suse.de>
3242
3243 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3244 try/catch.
3245
3246 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3247
3248 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3249
3250 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3251
3252 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3253
3254 2018-07-24 Keith Seitz <keiths@redhat.comt
3255
3256 PR symtab/23010
3257 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3258 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3259 instead of add_symbol_to_list.
3260 (read_file_scope): Call prepare_one_comp_unit before reading
3261 any other DIEs.
3262
3263 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3264
3265 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3266
3267 2018-07-24 Tom Tromey <tom@tromey.com>
3268
3269 * utils.c (malloc, realloc, free): Don't declare.
3270 * configure, config.in: Rebuild.
3271 * configure.ac: Don't check for declarations of free, malloc, or
3272 realloc.
3273
3274 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3275
3276 * aarch64-linux-nat.c
3277 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3278 variable.
3279 * arm-linux-nat.c (fetch_regs): Likewise.
3280 (store_regs): Likewise.
3281 (fetch_vfp_regs): Likewise.
3282 (store_vfp_regs): Likewise.
3283 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3284 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3285 (arm_linux_nat_target::insert_watchpoint): Likewise.
3286 (arm_linux_nat_target::remove_watchpoint): Likewise.
3287 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3288 Likewise.
3289 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3290 Likewise.
3291 * ppc-linux-nat.c (fetch_register): Likewise.
3292 (fetch_all_gp_regs): Likewise.
3293 (fetch_ppc_registers): Likewise.
3294 (store_all_gp_regs): Likewise.
3295 (store_ppc_registers): Likewise.
3296 (hwdebug_insert_point): Likewise.
3297 (can_use_watchpoint_cond_accel): Likewise.
3298 * remote-sim.c (gdb_os_write_stdout): Likewise.
3299
3300 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3301 Tom Tromey <tom@tromey.com>
3302
3303 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3304 test for it.
3305 * configure: Rebuild.
3306
3307 2018-07-22 Tom Tromey <tom@tromey.com>
3308
3309 * regformats/regdat.sh: Define xmltarget_${name} inside
3310 #ifndef IN_PROCESS_AGENT.
3311
3312 2018-07-22 Tom Tromey <tom@tromey.com>
3313
3314 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3315
3316 2018-07-22 Tom Tromey <tom@tromey.com>
3317
3318 * symfile.c (reread_symbols): Notify iter, not objfile.
3319
3320 2018-07-22 Tom Tromey <tom@tromey.com>
3321
3322 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3323 Use arch_ops.
3324 (ravenscar_thread_target::prepare_to_store): Likewise.
3325
3326 2018-07-22 Tom Tromey <tom@tromey.com>
3327
3328 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3329 unused variable. Call value_fetch_lazy when needed.
3330 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3331 Remove unused variable. Call value_fetch_lazy when needed.
3332
3333 2018-07-22 Tom Tromey <tom@tromey.com>
3334
3335 * m32c-tdep.c (mark_dma): Return void.
3336 (make_regs): Remove unused declarations.
3337
3338 2018-07-22 Tom Tromey <tom@tromey.com>
3339
3340 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3341 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3342 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3343 bkscm_get_valid_block_smob_arg_unsafe for effect.
3344
3345 2018-07-22 Tom Tromey <tom@tromey.com>
3346
3347 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3348 value_type.
3349
3350 2018-07-22 Tom Tromey <tom@tromey.com>
3351
3352 * windows-nat.c (saved_context): Conditionally define.
3353 * remote.c (remote_target::remote_btrace_maybe_reopen):
3354 Conditionally declare "warned".
3355 * inflow.c (sigquit_ours): Conditionally define.
3356 (new_tty): Move "tty" declaration inside #if.
3357 * guile/guile.c (guile_datadir): Conditionally define.
3358 * charset.c (set_be_le_names): Move some declarations inside #if.
3359 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3360 #if.
3361 (parse_xml_btrace_conf): Likewise.
3362
3363 2018-07-22 Tom Tromey <tom@tromey.com>
3364
3365 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3366
3367 2018-07-22 Tom Tromey <tom@tromey.com>
3368
3369 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3370 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3371 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3372 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3373 * stack.c (frame_apply_level_command): Remove unused variable.
3374 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3375 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3376 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3377 unused variable.
3378 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3379 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3380 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3381 variable.
3382 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3383 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3384 variable.
3385 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3386 Remove unused variable.
3387 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3388 variable.
3389 * common/tdesc.c (print_xml_feature::visit): Remove unused
3390 variable.
3391 * compile/compile-object-load.c (store_regs): Remove unused
3392 variables.
3393 * complaints.c (clear_complaints): Remove unused variable.
3394 * corelow.c (core_target_open): Remove unused variable.
3395 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3396 variable.
3397 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3398 variable.
3399 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3400 variable.
3401 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3402 variable.
3403 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3404 variable.
3405 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3406 variable.
3407 * ia64-tdep.c (examine_prologue): Remove unused variable.
3408 * infcall.c (run_inferior_call): Remove unused variable.
3409 * inferior.c (exit_inferior): Remove unused variable.
3410 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3411 * linespec.c (decode_line_2): Remove unused variable.
3412 * linux-nat.c (super_close): Remove.
3413 * linux-tdep.c (linux_info_proc): Remove unused variable.
3414 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3415 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3416 Remove unused variable.
3417 * parse.c (find_minsym_type_and_address): Remove unused variable.
3418 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3419 variable.
3420 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3421 variable.
3422 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3423 variables.
3424 * record-btrace.c (record_btrace_target::store_registers): Remove
3425 unused variable.
3426 (cmd_show_record_btrace_cpu): Remove unused variable.
3427 * riscv-tdep.c (riscv_register_reggroup_p)
3428 (riscv_push_dummy_call, riscv_return_value): Remove unused
3429 variable.
3430 * rust-exp.y (literal): Remove unused variable.
3431 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3432 unused variable.
3433 <STRUCTOP_ANONYMOUS>: Likewise.
3434 * s390-linux-tdep.c (s390_linux_init_abi_31)
3435 (s390_linux_init_abi_64): Remove unused variable.
3436 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3437 (file_select_thread, net_windows_open, _initialize_ser_windows):
3438 Remove unused variables.
3439 * symtab.c (find_pc_sect_line): Remove unused variable.
3440 * target-memory.c (compute_garbled_blocks): Remove unused
3441 variable.
3442 (target_write_memory_blocks): Remove unused variable.
3443 * target.c (target_stack::unpush): Remove unused variables.
3444 * tracepoint.c (start_tracing, all_tracepoint_actions)
3445 (merge_uploaded_trace_state_variables)
3446 (print_one_static_tracepoint_marker): Remove unused variable.
3447 * unittests/basic_string_view/element_access/char/1.cc (test01):
3448 Remove unused variable.
3449 * windows-nat.c (windows_continue, windows_add_all_dlls)
3450 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3451 Remove unused variables.
3452
3453 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3454
3455 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3456 attr_profile in HAVE_ELF.
3457 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3458 HAVE_ELF.
3459
3460 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3461
3462 * frame.c (frame_register_unwind): Change parameter name.
3463 (frame_unwind_register): Likewise.
3464 (frame_unwind_register_value): Likewise.
3465 (frame_unwind_register_signed): Likewise.
3466 (frame_unwind_register_unsigned): Likewise.
3467 * frame.h (frame_register_unwind): Likewise.
3468 (frame_unwind_register): Likewise.
3469 (frame_unwind_register_value): Likewise.
3470 (frame_unwind_register_signed): Likewise.
3471 (frame_unwind_register_unsigned): Likewise.
3472 (frame_unwind_arch): Likewise.
3473
3474 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3475
3476 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3477 ISA maintenance.
3478
3479 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3480
3481 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3482 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3483 hand.
3484
3485 2018-07-20 Keith Seitz <keiths@redhat.com>
3486
3487 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3488 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3489 m_compunit_symtab, m_language>: Add "m_" prefix.
3490 Update all uses.
3491 * buildsym.c: Update all uses.
3492
3493 2018-07-20 Tom Tromey <tom@tromey.com>
3494
3495 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3496 * buildsym.h (record_line_ftype): Remove typedef.
3497
3498 2018-07-20 Tom Tromey <tom@tromey.com>
3499
3500 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3501 (end_expandable_symtab): Likewise.
3502 (end_symtab_get_static_block): Likewise.
3503 (end_symtab_from_static_block): Likewise.
3504 * buildsym-legacy.c (augment_type_symtab): Remove.
3505 (end_expandable_symtab): Remove.
3506 (end_symtab_get_static_block): Remove.
3507 (end_symtab_from_static_block): Remove.
3508
3509 2018-07-20 Tom Tromey <tom@tromey.com>
3510
3511 * dwarf2read.c: Include buildsym.h.
3512 (struct dwarf2_cu) <builder>: New method.
3513 (fixup_go_packaging): Update.
3514 (process_full_comp_unit, process_full_type_unit): Update. Don't
3515 use scoped_free_pendings.
3516 (using_directives): Add "cu" parameter, remove "language".
3517 (read_import_statement, setup_type_unit_groups, )
3518 (read_func_scope, read_lexical_block_scope)
3519 (dwarf2_record_block_ranges, read_namespace): Update.
3520 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3521 (lnp_state_machine::handle_end_sequence): Update.
3522 (class lnp_state_machine) <m_cu>: New member.
3523 <m_record_line_callback>: Remove.
3524 <m_currently_recording_lines>: New member.
3525 (lnp_state_machine::handle_set_file): Update.
3526 (noop_record_line): Remove.
3527 (dwarf_record_line_p): Add cu parameter.
3528 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3529 (lnp_state_machine::record_line)
3530 (lnp_state_machine::lnp_state_machine)
3531 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3532 (dwarf_decode_lines): Update.
3533 (dwarf2_start_subfile): Add cu parameter.
3534 (dwarf2_start_symtab, new_symbol): Update.
3535 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3536 Remove dwarf2_per_objfile parameter.
3537 (dwarf_decode_macros): Update.
3538
3539 2018-07-20 Tom Tromey <tom@tromey.com>
3540
3541 * stabsread.c (define_symbol): Update.
3542 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3543 * dwarf2read.c (new_symbol): Update.
3544 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3545 * cp-namespace.c: Include buildsym.h.
3546 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3547 * buildsym-legacy.c (get_buildsym_compunit): New function.
3548
3549 2018-07-20 Tom Tromey <tom@tromey.com>
3550
3551 * xcoffread.c: Include buildsym-legacy.h.
3552 * windows-nat.c: Include buildsym-legacy.h.
3553 * stabsread.c: Include buildsym-legacy.h.
3554 * mdebugread.c: Include buildsym-legacy.h.
3555 * buildsym-legacy.h: New file.
3556 * buildsym-legacy.c: New file, from buildsym.c.
3557 * go32-nat.c: Include buildsym-legacy.h.
3558 * dwarf2read.c: Include buildsym-legacy.h.
3559 * dbxread.c: Include buildsym-legacy.h.
3560 * cp-namespace.c: Include buildsym-legacy.h.
3561 * coffread.c: Include buildsym-legacy.h.
3562 * buildsym.h: Move some contents to buildsym-legacy.h.
3563 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3564 buildsym-legacy.c.
3565 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3566
3567 2018-07-20 Tom Tromey <tom@tromey.com>
3568
3569 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3570 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3571 (buildsym_compunit::buildsym_compunit)
3572 (buildsym_compunit::~buildsym_compunit)
3573 (buildsym_compunit::get_macro_table): Define.
3574
3575 2018-07-20 Tom Tromey <tom@tromey.com>
3576
3577 * buildsym.c (reset_symtab_globals): Remove.
3578 (buildsym_compunit::end_symtab_from_static_block): Update.
3579 (buildsym_compunit::augment_type_symtab): Update.
3580 (end_symtab_from_static_block): Call free_buildsym_compunit.
3581 (augment_type_symtab, end_symtab, end_expandable_symtab):
3582 Likewise.
3583
3584 2018-07-20 Tom Tromey <tom@tromey.com>
3585
3586 * arch-utils.c: Do not include buildsym.h.
3587 * mipsread.c: Do not include buildsym.h.
3588 * machoread.c: Do not include buildsym.h.
3589 * elfread.c: Do not include buildsym.h.
3590
3591 2018-07-20 Tom Tromey <tom@tromey.com>
3592
3593 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3594 initialization.
3595 (buildsym_compunit): Add new constructor.
3596 (struct buildsym_compunit) <get_last_source_file, finish_block,
3597 record_block_range, start_subfile, patch_subfile_names,
3598 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3599 set_last_source_start_addr, get_last_source_start_addr,
3600 get_local_using_directives, set_local_using_directives,
3601 get_global_using_directives, outermost_context_p,
3602 get_current_context_stack, get_context_stack_depth,
3603 get_current_subfile, get_local_symbols, get_file_symbols,
3604 get_global_symbols, record_debugformat, record_producer,
3605 push_context, pop_context, end_symtab_get_static_block,
3606 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3607 New public methods.
3608 <record_pending_block, finish_block_internal, make_blockvector,
3609 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3610 private methods.
3611 Update all users.
3612
3613 2018-05-22 Tom Tromey <tom@tromey.com>
3614
3615 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3616 parameter.
3617 (finish_block_internal): Update.
3618
3619 2018-07-20 Tom Tromey <tom@tromey.com>
3620
3621 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3622 parameter.
3623 (finish_block_internal): Update.
3624
3625 2018-07-20 Tom Tromey <tom@tromey.com>
3626
3627 * buildsym.h (EXTERN): Don't define or undef.
3628 * buildsym.c (EXTERN): Don't define.
3629
3630 2018-07-20 Tom Tromey <tom@tromey.com>
3631
3632 * buildsym.c: Remove TODO comment.
3633
3634 2018-07-20 Tom Tromey <tom@tromey.com>
3635
3636 * coffread.c (coff_symtab_read): Update.
3637 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3638 (xcoff_new_init): Update.
3639 * mipsread.c (mipscoff_new_init): Update.
3640 * mdebugread.c (mdebug_build_psymtabs): Update.
3641 * elfread.c (elf_new_init): Update.
3642 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3643 Update.
3644 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3645 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3646 (stabsect_build_psymtabs): Update.
3647 * buildsym.h (buildsym_init): Don't declare.
3648 * buildsym.c: Update comment.
3649 (prepare_for_building): Remove.
3650 (start_symtab, restart_symtab): Update.
3651 (reset_symtab_globals): Update comment.
3652 (buildsym_init): Remove.
3653
3654 2018-07-20 Tom Tromey <tom@tromey.com>
3655
3656 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3657 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3658 (read_enum_type, common_block_start, common_block_end)
3659 (cleanup_undefined_types_1, finish_global_stabs): Update.
3660 * mdebugread.c (psymtab_to_symtab_1): Update.
3661 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3662 (read_lexical_block_scope, new_symbol): Update.
3663 * dbxread.c (process_one_symbol): Update.
3664 * coffread.c (coff_symtab_read, process_coff_symbol)
3665 (coff_read_enum_type): Update.
3666 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3667 declare.
3668 (get_local_symbols, get_file_symbols, get_global_symbols): New
3669 functions.
3670 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3671 m_global_symbols.
3672 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3673 (~scoped_free_pendings): Update.
3674 (finish_block, prepare_for_building, reset_symtab_globals)
3675 (end_symtab_get_static_block, end_symtab_with_blockvector)
3676 (augment_type_symtab, push_context): Update.
3677 (get_local_symbols, get_file_symbols, get_global_symbols): New
3678 functions.
3679 (buildsym_init): Update.
3680
3681 2018-07-20 Tom Tromey <tom@tromey.com>
3682
3683 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3684 (process_full_type_unit): Likewise.
3685 (dwarf2_start_symtab): Set list_in_scope.
3686
3687 2018-07-20 Tom Tromey <tom@tromey.com>
3688
3689 * dwarf2read.c (process_psymtab_comp_unit_reader)
3690 (build_type_psymtabs_reader): Do not set list_in_scope.
3691
3692 2018-07-20 Tom Tromey <tom@tromey.com>
3693
3694 * buildsym.c (free_pendings): Remove.
3695 (add_symbol_to_list, scoped_free_pendings)
3696 (finish_block_internal, buildsym_init): Update.
3697
3698 2018-07-20 Tom Tromey <tom@tromey.com>
3699
3700 * xcoffread.c (read_xcoff_symtab): Update.
3701 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3702 Update.
3703 * dbxread.c (process_one_symbol): Update.
3704 * coffread.c (coff_symtab_read): Update.
3705 * buildsym.h (finish_block): Update.
3706 * buildsym.c (finish_block): Remove "listhead" argument.
3707 (end_symtab_get_static_block): Update.
3708
3709 2018-07-20 Tom Tromey <tom@tromey.com>
3710
3711 * buildsym.h (class scoped_free_pendings): Remove constructor.
3712 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3713 method.
3714 <m_pending_block_obstack, m_pending_blocks>: New members.
3715 (pending_block_obstack, pending_blocks): Remove.
3716 (scoped_free_pendings::scoped_free_pendings): Default.
3717 (~scoped_free_pendings): Update.
3718 (free_pending_blocks): Remove.
3719 (finish_block_internal, record_pending_block, make_blockvector)
3720 (end_symtab_get_static_block, augment_type_symtab, push_context)
3721 (buildsym_init): Update.
3722
3723 2018-07-20 Tom Tromey <tom@tromey.com>
3724
3725 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3726 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3727 members.
3728 (pending_addrmap, pending_addrmap_obstack)
3729 (pending_addrmap_interesting): Remove.
3730 (scoped_free_pendings, record_block_range, make_blockvector)
3731 (prepare_for_building, reset_symtab_globals, buildsym_init):
3732 Update.
3733
3734 2018-07-20 Tom Tromey <tom@tromey.com>
3735
3736 * xcoffread.c (process_linenos): Update.
3737 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3738 * mdebugread.c (psymtab_to_symtab_1): Update.
3739 * dwarf2read.c (setup_type_unit_groups)
3740 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3741 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3742 * dbxread.c (process_one_symbol): Update.
3743 * coffread.c (coff_symtab_read, enter_linenos)
3744 (process_coff_symbol): Update.
3745 * buildsym.h (current_subfile): Don't declare.
3746 (get_current_subfile): Declare.
3747 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3748 member.
3749 (start_subfile, free_buildsym_compunit, push_subfile)
3750 (prepare_for_building, start_symtab): Update.
3751 (get_current_subfile): New function.
3752
3753 2018-07-20 Tom Tromey <tom@tromey.com>
3754
3755 * coffread.c (coff_symtab_read): Update.
3756 * xcoffread.c (read_xcoff_symtab): Update.
3757 * dwarf2read.c (new_symbol): Update.
3758 (read_func_scope, read_lexical_block_scope): Update.
3759 * dbxread.c (process_one_symbol): Update.
3760 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3761 (outermost_context_p): Remove macro.
3762 (outermost_context_p, get_current_context_stack)
3763 (get_context_stack_depth): Declare.
3764 (pop_context): Return struct context_stack.
3765 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3766 member.
3767 (context_stack_size): Remove.
3768 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3769 (prepare_for_building, end_symtab_get_static_block)
3770 (augment_type_symtab, push_context): Update.
3771 (pop_context): Return struct context_stack.
3772 (outermost_context_p, get_current_context_stack)
3773 (get_context_stack_depth): New functions.
3774 (buildsym_init): Update.
3775
3776 2018-07-20 Tom Tromey <tom@tromey.com>
3777
3778 * rust-exp.y: Now a pure parser. Update all rules.
3779 (%union): Move earlier.
3780 (current_parser, work_obstack): Remove globals.
3781 (rust_parser, ~rust_parser): Update.
3782 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3783 lex_character, lex_number, lex_string, lex_identifier,
3784 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3785 convert_name, convert_params_to_expression,
3786 convert_ast_to_expression, ast_basic_type, ast_operation,
3787 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3788 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3789 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3790 ast_array_type, ast_slice_type, ast_reference_type,
3791 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3792 (rust_parse): Update.
3793 (rustyyerror, rustyylex): Add parser parameter.
3794 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3795 (rust_lex_stringish_test, rust_lex_test_sequence)
3796 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3797 (rust_lex_test_push_back, rust_lex_tests): Update.
3798
3799 2018-07-19 Pedro Alves <palves@redhat.com>
3800
3801 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3802 gdb::unique_xmalloc_ptr.
3803 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3804 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3805 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3806 copy-initialization.
3807 * guile/scm-pretty-print.c (ppscm_print_children): Use
3808 gdb::unique_xmalloc_ptr instead of cleanups.
3809 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3810 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3811 gdb::unique_xmalloc_ptr.
3812 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3813 Adjust to use gdb::unique_xmalloc_ptr.
3814 * guile/scm-utils.c (extract_arg): Adjust.
3815 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3816 gdb::unique_xmalloc_ptr instead of a cleanup.
3817
3818 2018-07-19 Tom Tromey <tom@tromey.com>
3819
3820 * utils.c (do_value_free_to_mark)
3821 (make_cleanup_value_free_to_mark): Remove.
3822 * utils.h (make_cleanup_value_free_to_mark): Remove.
3823
3824 2018-07-19 Pedro Alves <palves@redhat.com>
3825
3826 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3827 forwarding reference.
3828
3829 2018-07-18 Pedro Alves <palves@redhat.com>
3830
3831 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3832 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3833 cleanup.
3834
3835 2018-07-18 Pedro Alves <palves@redhat.com>
3836
3837 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3838 exceptions.
3839 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3840 (gdbscm_wrap): New.
3841 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3842 directly instead of a cleanup.
3843 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3844 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3845 (vlscm_binop_gdbthrow): New, factored out from ...
3846 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3847 (vlscm_rich_compare): Use gdbscm_wrap.
3848 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3849 instead of a cleanup.
3850 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3851 cleanup.
3852 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3853 Use xfree directly instead of a cleanup.
3854 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3855 Adjust to use gdbscm_wrap and scoped_value_mark.
3856 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3857 (gdbscm_value_address, gdbscm_value_dereference)
3858 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3859 scoped_value_mark.
3860 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3861 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3862 scoped_value_mark.
3863 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3864 gdbscm_wrap and scoped_value_mark.
3865 (gdbscm_value_to_string): Use xfree directly instead of a
3866 cleanup. Move 'buffer' unique_ptr to TRY scope.
3867 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3868 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3869 scoped_value_mark.
3870 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3871 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3872 scoped_value_mark.
3873 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3874 gdbscm_wrap.
3875
3876 2018-07-18 Tom de Vries <tdevries@suse.de>
3877
3878 * findvar.c (default_read_var_value): Also resolve dynamic type for
3879 LOC_OPTIMIZED_OUT vars.
3880
3881 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3882
3883 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3884 decoding.
3885
3886 2018-07-17 Tom Tromey <tom@tromey.com>
3887
3888 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3889 (compute_enum_list, pascm_set_param_value_x)
3890 (gdbscm_parameter_value): Update.
3891 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3892 (gdbscm_scm_to_host_string): Update.
3893 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3894 Update.
3895 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3896 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3897 * guile/scm-string.c (gdbscm_scm_to_string): Return
3898 unique_xmalloc_ptr.
3899 (gdbscm_scm_to_host_string): Likewise.
3900
3901 2018-07-17 Tom Tromey <tom@tromey.com>
3902
3903 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3904 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3905 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3906 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3907 unique_xmalloc_ptr.
3908
3909 2018-07-17 Tom Tromey <tom@tromey.com>
3910
3911 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3912 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3913 Update.
3914 * guile/scm-cmd.c (cmdscm_function): Update.
3915 * guile/scm-pretty-print.c
3916 (ppscm_print_exception_unless_memory_error): Update.
3917 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3918 Return unique_xmalloc_ptr.
3919
3920 2018-07-17 Tom Tromey <tom@tromey.com>
3921
3922 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3923 Use string_printf.
3924
3925 2018-07-17 Jim Wilson <jimw@sifive.com>
3926
3927 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3928 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3929 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3930 unecessary braces after EF_RISCV_RVC test. Delete call to
3931 set_gdbarch_decr_pc_after_break.
3932
3933 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3934 RISCV_LAST_FP_REGNUM + 1.
3935 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3936
3937 2018-07-17 Tom Tromey <tom@tromey.com>
3938
3939 * configure.ac: Remove --disable-gdbcli.
3940 * configure: Rebuild.
3941 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3942 (SUBDIR_CLI_CFLAGS): Remove.
3943 (SFILES): Use SUBDIR_CLI_SRCS.
3944 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3945
3946 2018-07-17 Tom Tromey <tom@tromey.com>
3947
3948 PR gdb/18624:
3949 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3950
3951 2018-07-16 Jim Wilson <jimw@sifive.com>
3952
3953 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3954
3955 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3956
3957 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3958 variable.
3959 (libunwind_frame_sniffer): Likewise.
3960 (libunwind_frame_prev_register): Likewise.
3961 (libunwind_sigtramp_frame_sniffer): Likewise.
3962 * ia64-tdep.c (ia64_access_reg): Likewise.
3963 (ia64_access_rse_reg): Likewise.
3964 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3965 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3966
3967 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3970
3971 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * remote-sim.c (gdbsim_target::close,
3974 gdbsim_target::mourn_inferior): Remove unused variables.
3975
3976 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3977
3978 * ia64-tdep.c (ktab_buf): New global.
3979 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3980 (get_kernel_table): Adjust.
3981
3982 2018-07-16 Tom Tromey <tom@tromey.com>
3983
3984 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3985 * dwarf2read.c (using_directives, new_symbol): Use
3986 outermost_context_p.
3987 * dbxread.c (process_one_symbol): Use outermost_context_p.
3988 * coffread.c (coff_symtab_read): Use outermost_context_p.
3989
3990 2018-07-16 Tom Tromey <tom@tromey.com>
3991
3992 * dwarf2read.c (using_directives, read_func_scope)
3993 (read_lexical_block_scope): Update.
3994 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3995 * buildsym.h (local_using_directives, global_using_directives):
3996 Don't declare.
3997 (get_local_using_directives, set_local_using_directives)
3998 (get_global_using_directives): Declare.
3999 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4000 m_global_using_directives>: New members.
4001 (finish_block_internal, prepare_for_building)
4002 (reset_symtab_globals, end_symtab_get_static_block)
4003 (push_context): Update.
4004 (get_local_using_directives, set_local_using_directives)
4005 (get_global_using_directives): New functions.
4006 (buildsym_init): Update.
4007
4008 2018-07-16 Tom Tromey <tom@tromey.com>
4009
4010 * xcoffread.c (xcoff_initial_scan): Don't call
4011 free_pending_blocks.
4012 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4013 * buildsym.h (class scoped_free_pendings): Add constructor.
4014 (free_pending_blocks): Don't declare.
4015 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4016 (free_pending_blocks): Now static.
4017
4018 2018-07-16 Tom Tromey <tom@tromey.com>
4019
4020 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4021 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4022 member.
4023 (struct subfile_stack): Remove.
4024 (subfile_stack): Remove.
4025 (push_subfile, pop_subfile, buildsym_init): Update.
4026
4027 2018-07-16 Tom Tromey <tom@tromey.com>
4028
4029 * buildsym.c (push_subfile): Use gdb_assert.
4030 (pop_subfile): Use gdb_assert.
4031
4032 2018-07-16 Tom Tromey <tom@tromey.com>
4033
4034 * buildsym.h (merge_symbol_lists): Remove.
4035 * buildsym.c (merge_symbol_lists): Remove.
4036
4037 2018-07-16 Tom Tromey <tom@tromey.com>
4038
4039 * stabsread.c (scan_file_globals): Update comment.
4040 * stabsread.h (scan_file_globals): Move from buildsym.h.
4041 * buildsym.h (scan_file_globals): Move to stabsread.h.
4042
4043 2018-07-16 Tom Tromey <tom@tromey.com>
4044
4045 * xcoffread.c (xcoff_new_init): Update.
4046 * mipsread.c (mipscoff_new_init): Update.
4047 * mdebugread.c (mdebug_build_psymtabs): Update.
4048 * elfread.c (elf_new_init): Update.
4049 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4050 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4051 * buildsym.h (buildsym_new_init): Don't declare.
4052 * buildsym.c (buildsym_new_init): Remove.
4053
4054 2018-07-16 Tom Tromey <tom@tromey.com>
4055
4056 * stabsread.h (within_function): Move from buildsym.h.
4057 * stabsread.c (start_stabs): Clear within_function.
4058 * coffread.c (coff_start_symtab): Clear within_function.
4059 * buildsym.h (within_function): Move to stabsread.h.
4060 * buildsym.c (prepare_for_building): Update.
4061
4062 2018-07-16 Tom Tromey <tom@tromey.com>
4063
4064 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4065 * dwarf2read.c (dwarf2_start_symtab): Don't set
4066 processing_gcc_compilation.
4067 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4068
4069 2018-07-16 Tom Tromey <tom@tromey.com>
4070
4071 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4072 (next_symbol_text_func): Move from buildsym.h.
4073 * stabsread.c (hashname): Move from buildsym.c.
4074 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4075 (next_symbol_text_func, hashname): Move to stabsread.h.
4076 * buildsym.c: Don't include bcache.h
4077 (hashname): Move to stasbread.c.
4078
4079 2018-07-16 Tom Tromey <tom@tromey.com>
4080
4081 * buildsym.h (context_stack_size): Don't declare.
4082 * buildsym.c (context_stack_size): New global.
4083
4084 2018-07-16 Tom Tromey <tom@tromey.com>
4085
4086 * dbxread.c (processing_acc_compilation): New global.
4087 * buildsym.h (processing_acc_compilation): Don't declare.
4088
4089 2018-07-16 Tom Tromey <tom@tromey.com>
4090
4091 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4092 * dbxread.c (read_ofile_symtab): Update.
4093 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4094 * buildsym.h (last_source_start_addr): Remove.
4095 (set_last_source_start_addr, get_last_source_start_addr):
4096 Declare.
4097 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4098 parameter.
4099 (struct buildsym_compunit) <m_last_source_start_addr>: New
4100 member.
4101 (prepare_for_building): Remove start_addr parameter.
4102 (start_symtab, restart_symtab, end_symtab_get_static_block)
4103 (end_symtab_with_blockvector): Update.
4104 (set_last_source_start_addr, get_last_source_start_addr): New
4105 functions.
4106
4107 2018-07-16 Tom Tromey <tom@tromey.com>
4108
4109 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4110 member.
4111 (have_line_numbers): Remove.
4112 (record_line, prepare_for_building, end_symtab_get_static_block)
4113 (augment_type_symtab): Update.
4114
4115 2018-07-16 Tom Tromey <tom@tromey.com>
4116
4117 * buildsym.c (~buildsym_compunit): Free the macro table.
4118 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4119 methods.
4120 <m_pending_macros>: New member.
4121 (pending_macros): Remove.
4122 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4123 (reset_symtab_globals, end_symtab_get_static_block)
4124 (end_symtab_with_blockvector, augment_type_symtab)
4125 (buildsym_init): Update.
4126
4127 2018-07-16 Tom Tromey <tom@tromey.com>
4128
4129 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4130 parameter.
4131 (buildsym_compunit::set_last_source_file): New method.
4132 <m_last_source_file>: New member.
4133 (prepare_for_building): Remove "name" parameter.
4134 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4135 (last_source_file): Remove.
4136 (set_last_source_file, get_last_source_file): Update.
4137
4138 2018-07-16 Tom Tromey <tom@tromey.com>
4139
4140 * buildsym.c (prepare_for_building): Add assert.
4141
4142 2018-07-16 Tom Tromey <tom@tromey.com>
4143
4144 * buildsym.c (~buildsym_compunit): Update.
4145 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4146 (start_subfile, patch_subfile_names)
4147 (end_symtab_with_blockvector): Update.
4148
4149 2018-07-16 Tom Tromey <tom@tromey.com>
4150
4151 * buildsym.c (struct buildsym_compunit): Add constructor,
4152 destructor, initializers.
4153 (start_buildsym_compunit): Remove.
4154 (free_buildsym_compunit): Use "delete".
4155 (start_symtab, restart_symtab): Use "new".
4156
4157 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4158
4159 * symfile.c (set_objfile_default_section_offset): Remove struct
4160 keyword.
4161
4162 2018-07-14 Stafford Horne <shorne@gmail.com>
4163
4164 * (Responsible Maintainers): Add myself as or1k maintainer.
4165
4166 2018-07-13 Tom Tromey <tom@tromey.com>
4167
4168 * symfile.c (set_objfile_default_section_offset): Use extra braces
4169 around initializer.
4170
4171 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4172
4173 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4174 non-branching basr.
4175
4176 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4177
4178 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4179 unittests/cli-utils-selftests.c
4180 * unittests/cli-utils-selftests.c: New file.
4181
4182 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4183
4184 * NEWS: Mention new commands. Mention change to 'thread apply'.
4185
4186 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4187
4188 * thread.c (thr_try_catch_cmd): New function.
4189 (thread_apply_all_command): Handle qcs flags.
4190 (thread_apply_command): Handle qcs flags.
4191 (taas_command): New function.
4192 (tfaas_command): New function.
4193 (_initialize_thread): Update to setup the new commands 'taas
4194 and 'tfaas'. Change doc string for 'thread apply'.
4195
4196 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4197
4198 * stack.c: (trailing_outermost_frame): New function, mostly
4199 extracted from backtrace_command_1.
4200 (leading_innermost_frame): New function.
4201 (backtrace_command_1): Update to call trailing_outermost_frame.
4202 (frame_apply_command_count): New function.
4203 (frame_apply_level_command): New function.
4204 (frame_apply_all_command): New function.
4205 (frame_apply_command): New function.
4206 (faas_command): New function.
4207 (frame_cmd_list): New variable.
4208 (_initialize_stack): Update to setup the new commands 'frame apply'
4209 and 'faas'.
4210
4211 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4212
4213 * cli-utils.c (number_or_range_parser::get_number): Only handle
4214 numbers or convenience var as numbers.
4215 (parse_flags): New function.
4216 (parse_flags_qcs): New function.
4217 (number_or_range_parser::finished): Ensure parsing end is detected
4218 before end of string.
4219 * cli-utils.h (parse_flags): New function.
4220 (parse_flags_qcs): New function.
4221 (number_or_range_parser): Remove m_finished bool.
4222 (number_or_range_parser::skip_range): Set m_in_range to false.
4223
4224 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4225
4226 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4227 on Windows.
4228
4229 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4230 Jan Kratochvil <jan.kratochvil@redhat.com>
4231 Paul Fertser <fercerpav@gmail.com>
4232 Tsutomu Seki <sekiriki@gmail.com>
4233 Pedro Alves <palves@redhat.com>
4234
4235 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4236 'unittests/parse-connection-spec-selftests.c'.
4237 (COMMON_SFILES): Add 'common/netstuff.c'.
4238 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4239 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4240 * common/netstuff.c: New file.
4241 * common/netstuff.h: New file.
4242 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4243 (wait_for_connect): Update comment. New parameter
4244 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4245 Use 'sock' directly instead of 'scb->fd'.
4246 (try_connect): New function, with code from 'net_open'.
4247 (net_open): Rewrite main loop to deal with multiple
4248 sockets/addresses. Handle IPv6-style hostnames; implement
4249 support for IPv6 connections.
4250 * unittests/parse-connection-spec-selftests.c: New file.
4251
4252 2018-07-11 Pedro Alves <palves@redhat.com>
4253
4254 PR gdb/23377
4255 * remote.c (remote_target::remote_detach_pid): Call
4256 set_current_process.
4257
4258 2018-07-11 Pedro Alves <palves@redhat.com>
4259
4260 * h8300-tdep.c (h8300_gdbarch_init): Remove
4261 set_gdbarch_ecoff_reg_to_regnum calls.
4262
4263 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4264
4265 PR c++/23373
4266 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4267 offsets/sizes for static members of a class/struct.
4268
4269 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4270
4271 * target-descriptions.c (tdesc_register_bitsize): Rename.
4272 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4273 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4274 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4275
4276 2018-07-10 Tom Tromey <tom@tromey.com>
4277
4278 * breakpoint.c (moribund_locations): Now static and a
4279 std::vector.
4280 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4281 (build_bpstat_chain, update_global_location_list)
4282 (breakpoint_retire_moribund): Update.
4283 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4284 VEC.
4285
4286 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4287
4288 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4289 (riscv_register_reggroup_p): Use new function, remove unneeded
4290 parenthesis.
4291 (riscv_push_dummy_call): Extend assert to compare against xlen or
4292 flen based on register type.
4293
4294 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4295
4296 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4297
4298 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4299
4300 * remote.c (show_hardware_watchpoint_limit): New function.
4301 (show_hardware_watchpoint_length_limit): New function.
4302 (show_hardware_breakpoint_limit): New function.
4303 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4304 where appropriate, update help text.
4305
4306 2018-07-09 Tom Tromey <tom@tromey.com>
4307
4308 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4309 (CLIBS): Don't mention NAT_CLIBS.
4310
4311 2018-07-09 Tom Tromey <tom@tromey.com>
4312
4313 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4314 (LIBGDB_OBS, clean mostlyclean): Update.
4315 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4316
4317 2018-07-09 Tom Tromey <tom@tromey.com>
4318
4319 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4320 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4321 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4322
4323 2018-07-09 Tom Tromey <tom@tromey.com>
4324
4325 * Makefile.in (ALLDEPFILES): Remove exec.c.
4326 (COMMON_OBS): Remove exec.o.
4327 (COMMON_SFILES): Add exec.c.
4328
4329 2018-07-09 Tom Tromey <tom@tromey.com>
4330
4331 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4332
4333 2018-07-09 Tom Tromey <tom@tromey.com>
4334
4335 * Makefile.in (clean mostlyclean): Remove stamp-version.
4336 (version.c): Depend on stamp-version.
4337 (stamp-version): New rule, from version.c rule.
4338
4339 2018-07-09 Tom Tromey <tom@tromey.com>
4340
4341 * Makefile.in (init.c): Depend on stamp-init.
4342 (stamp-init): New rule, from init.c rule.
4343 (clean mostlyclean): Remove stamp-init.
4344
4345 2018-07-09 Tom Tromey <tom@tromey.com>
4346
4347 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4348 SUBDIR_GCC_COMPILE_SRCS.
4349
4350 2018-07-09 Tom Tromey <tom@tromey.com>
4351
4352 * Makefile.in (init.c): Remove some unused sed rules.
4353
4354 2018-07-09 Tom Tromey <tom@tromey.com>
4355
4356 * Makefile.in (TSOBS): Remove.
4357 (INIT_FILES): Update.
4358 (LIBGDB_OBS): Update.
4359 (COMMON_SFILES): Add inflow.c.
4360 (SFILES): Remove inflow.c.
4361
4362 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4363
4364 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4365
4366 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4367
4368 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4369 get_saveloc_name, is_signal_frame_name, step_name,
4370 init_remote_name, create_addr_space_name,
4371 destroy_addr_space_name, search_unwind_table_name,
4372 find_dyn_list_name): Constify.
4373
4374 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4375
4376 * darwin-nat.c (darwin_pthread_kill): New function.
4377 (darwin_resume_thread): Use darwin_pthread_kill.
4378
4379 2018-07-05 Tom de Vries <tdevries@suse.de>
4380
4381 * macroexp.c (macro_buffer) <operator=>: New member function.
4382
4383 2018-07-04 Tom Tromey <tom@tromey.com>
4384
4385 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4386
4387 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4388
4389 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4390 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4391 * maint.c: Likewise.
4392 * top.c: Likewise.
4393
4394 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4395
4396 * NEWS: Create a new section for the next release branch.
4397 Rename the section of the current branch, now that it has
4398 been cut.
4399
4400 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4401
4402 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4403 * version.in: Bump version to 8.2.50.DATE-git.
4404
4405 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4406 Pedro Alves <palves@redhat.com>
4407
4408 * linux-nat.c (linux_init_ptrace): Rename to ...
4409 (linux_init_ptrace_procfs): ... this. Call
4410 linux_proc_init_warnings.
4411 (linux_nat_target::post_attach)
4412 (linux_nat_target::post_startup_inferior): Adjust.
4413 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4414 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4415
4416 2018-07-04 Tom de Vries <tdevries@suse.de>
4417
4418 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4419 check ...
4420 (read_comp_unit_head): ... here.
4421
4422 2018-07-03 Tom Tromey <tom@tromey.com>
4423
4424 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4425 (stop_tracing, tstatus_command)
4426 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4427 (print_one_static_tracepoint_marker): Update.
4428 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4429 std::vector.
4430 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4431 VEC.
4432 (all_tracepoints, static_tracepoints_here): Return std::vector.
4433
4434 2018-07-03 Tom Tromey <tom@tromey.com>
4435
4436 * common/ptid.c (ptid_equal): Remove.
4437 * common/ptid.h (ptid_equal): Don't declare.
4438 * ada-tasks.c: Update.
4439 * breakpoint.c: Update.
4440 * common/agent.c: Update.
4441 * corelow.c: Update.
4442 * darwin-nat-info.c: Update.
4443 * darwin-nat.c: Update.
4444 * dcache.c: Update.
4445 * dtrace-probe.c: Update.
4446 * dummy-frame.c: Update.
4447 * fbsd-nat.c: Update.
4448 * frame.c: Update.
4449 * gdbthread.h: Update.
4450 * gnu-nat.c: Update.
4451 * go32-nat.c: Update.
4452 * inf-loop.c: Update.
4453 * inf-ptrace.c: Update.
4454 * infcall.c: Update.
4455 * infcmd.c: Update.
4456 * inflow.c: Update.
4457 * infrun.c: Update.
4458 * linux-fork.c: Update.
4459 * linux-nat.c: Update.
4460 * linux-thread-db.c: Update.
4461 * mi/mi-cmd-var.c: Update.
4462 * mi/mi-interp.c: Update.
4463 * mi/mi-main.c: Update.
4464 * nto-procfs.c: Update.
4465 * ppc-linux-tdep.c: Update.
4466 * procfs.c: Update.
4467 * python/py-inferior.c: Update.
4468 * python/py-record-btrace.c: Update.
4469 * python/py-record.c: Update.
4470 * ravenscar-thread.c: Update.
4471 * regcache.c: Update.
4472 * remote-sim.c: Update.
4473 * remote.c: Update.
4474 * sol-thread.c: Update.
4475 * solib.c: Update.
4476 * target.c: Update.
4477 * tui/tui-stack.c: Update.
4478 * varobj.c: Update.
4479 * windows-nat.c: Update.
4480 * windows-tdep.c: Update.
4481
4482 2018-07-03 Tom Tromey <tom@tromey.com>
4483
4484 * common/ptid.c (ptid_match): Remove.
4485 * common/ptid.h (ptid_match): Don't declare.
4486 * fbsd-nat.c: Update.
4487 * infcmd.c: Update.
4488 * infrun.c: Update.
4489 * linux-nat.c: Update.
4490 * record-btrace.c: Update.
4491 * regcache.c: Update.
4492 * remote.c: Update.
4493
4494 2018-07-03 Tom Tromey <tom@tromey.com>
4495
4496 * common/ptid.c (ptid_tid_p): Remove.
4497 * common/ptid.h (ptid_tid_p): Don't declare.
4498 * sol-thread.c: Update.
4499
4500 2018-07-03 Tom Tromey <tom@tromey.com>
4501
4502 * common/ptid.c (ptid_lwp_p): Remove.
4503 * common/ptid.h (ptid_lwp_p): Don't declare.
4504 * fbsd-nat.c: Update.
4505 * linux-nat.c: Update.
4506 * nat/linux-procfs.c: Update.
4507 * nat/x86-linux-dregs.c: Update.
4508 * sol-thread.c: Update.
4509
4510 2018-07-03 Tom Tromey <tom@tromey.com>
4511
4512 * common/ptid.c (ptid_is_pid): Remove.
4513 * common/ptid.h (ptid_is_pid): Don't declare.
4514 * infrun.c: Update.
4515 * linux-nat.c: Update.
4516 * mi/mi-interp.c: Update.
4517 * remote.c: Update.
4518 * thread.c: Update.
4519
4520 2018-07-03 Tom Tromey <tom@tromey.com>
4521
4522 * common/ptid.c (ptid_get_tid): Remove.
4523 * common/ptid.h (ptid_get_tid): Don't declare.
4524 * ada-tasks.c: Update.
4525 * aix-thread.c: Update.
4526 * bsd-uthread.c: Update.
4527 * darwin-nat.c: Update.
4528 * fbsd-nat.c: Update.
4529 * i386-darwin-nat.c: Update.
4530 * infrun.c: Update.
4531 * linux-tdep.c: Update.
4532 * nto-procfs.c: Update.
4533 * ppc-ravenscar-thread.c: Update.
4534 * python/py-infthread.c: Update.
4535 * ravenscar-thread.c: Update.
4536 * sol-thread.c: Update.
4537 * sparc-ravenscar-thread.c: Update.
4538 * windows-nat.c: Update.
4539
4540 2018-07-03 Tom Tromey <tom@tromey.com>
4541
4542 * common/ptid.c (ptid_get_lwp): Remove.
4543 * common/ptid.h (ptid_get_lwp): Don't declare.
4544 * aarch64-linux-nat.c: Update.
4545 * ada-tasks.c: Update.
4546 * aix-thread.c: Update.
4547 * amd64-linux-nat.c: Update.
4548 * arm-linux-nat.c: Update.
4549 * corelow.c: Update.
4550 * fbsd-nat.c: Update.
4551 * fbsd-tdep.c: Update.
4552 * gnu-nat.c: Update.
4553 * i386-cygwin-tdep.c: Update.
4554 * i386-gnu-nat.c: Update.
4555 * i386-linux-nat.c: Update.
4556 * ia64-linux-nat.c: Update.
4557 * inf-ptrace.c: Update.
4558 * infrun.c: Update.
4559 * linux-fork.c: Update.
4560 * linux-nat.c: Update.
4561 * linux-tdep.c: Update.
4562 * linux-thread-db.c: Update.
4563 * mips-linux-nat.c: Update.
4564 * nat/aarch64-linux-hw-point.c: Update.
4565 * nat/aarch64-linux.c: Update.
4566 * nat/linux-btrace.c: Update.
4567 * nat/linux-osdata.c: Update.
4568 * nat/linux-procfs.c: Update.
4569 * nat/x86-linux-dregs.c: Update.
4570 * obsd-nat.c: Update.
4571 * ppc-fbsd-nat.c: Update.
4572 * ppc-linux-nat.c: Update.
4573 * procfs.c: Update.
4574 * python/py-infthread.c: Update.
4575 * ravenscar-thread.c: Update.
4576 * remote.c: Update.
4577 * s390-linux-nat.c: Update.
4578 * sol-thread.c: Update.
4579 * sol2-tdep.c: Update.
4580 * spu-linux-nat.c: Update.
4581 * x86-linux-nat.c: Update.
4582 * xtensa-linux-nat.c: Update.
4583
4584 2018-07-03 Tom Tromey <tom@tromey.com>
4585
4586 * common/ptid.c (ptid_get_pid): Remove.
4587 * common/ptid.h (ptid_get_pid): Don't declare.
4588 * aarch64-linux-nat.c: Update.
4589 * ada-lang.c: Update.
4590 * aix-thread.c: Update.
4591 * alpha-bsd-nat.c: Update.
4592 * amd64-fbsd-nat.c: Update.
4593 * amd64-linux-nat.c: Update.
4594 * arm-linux-nat.c: Update.
4595 * arm-nbsd-nat.c: Update.
4596 * auxv.c: Update.
4597 * break-catch-syscall.c: Update.
4598 * breakpoint.c: Update.
4599 * bsd-uthread.c: Update.
4600 * corelow.c: Update.
4601 * ctf.c: Update.
4602 * darwin-nat.c: Update.
4603 * fbsd-nat.c: Update.
4604 * fbsd-tdep.c: Update.
4605 * gcore.c: Update.
4606 * gnu-nat.c: Update.
4607 * hppa-nbsd-nat.c: Update.
4608 * hppa-obsd-nat.c: Update.
4609 * i386-fbsd-nat.c: Update.
4610 * ia64-linux-nat.c: Update.
4611 * inf-ptrace.c: Update.
4612 * infcmd.c: Update.
4613 * inferior.c: Update.
4614 * inferior.h: Update.
4615 * inflow.c: Update.
4616 * infrun.c: Update.
4617 * linux-fork.c: Update.
4618 * linux-nat.c: Update.
4619 * linux-tdep.c: Update.
4620 * linux-thread-db.c: Update.
4621 * m68k-bsd-nat.c: Update.
4622 * mi/mi-interp.c: Update.
4623 * mi/mi-main.c: Update.
4624 * mips-linux-nat.c: Update.
4625 * mips-nbsd-nat.c: Update.
4626 * mips64-obsd-nat.c: Update.
4627 * nat/aarch64-linux-hw-point.c: Update.
4628 * nat/aarch64-linux.c: Update.
4629 * nat/linux-btrace.c: Update.
4630 * nat/linux-osdata.c: Update.
4631 * nat/linux-procfs.c: Update.
4632 * nat/x86-linux-dregs.c: Update.
4633 * nto-procfs.c: Update.
4634 * obsd-nat.c: Update.
4635 * ppc-linux-nat.c: Update.
4636 * ppc-nbsd-nat.c: Update.
4637 * ppc-obsd-nat.c: Update.
4638 * proc-service.c: Update.
4639 * procfs.c: Update.
4640 * python/py-inferior.c: Update.
4641 * python/py-infthread.c: Update.
4642 * ravenscar-thread.c: Update.
4643 * record.c: Update.
4644 * remote-sim.c: Update.
4645 * remote.c: Update.
4646 * rs6000-nat.c: Update.
4647 * s390-linux-nat.c: Update.
4648 * sh-nbsd-nat.c: Update.
4649 * sol-thread.c: Update.
4650 * sparc-nat.c: Update.
4651 * sparc64-tdep.c: Update.
4652 * spu-linux-nat.c: Update.
4653 * spu-tdep.c: Update.
4654 * target-debug.h: Update.
4655 * target.c: Update.
4656 * thread.c: Update.
4657 * tid-parse.c: Update.
4658 * tracefile-tfile.c: Update.
4659 * vax-bsd-nat.c: Update.
4660 * windows-nat.c: Update.
4661 * x86-linux-nat.c: Update.
4662 * x86-nat.c: Update.
4663
4664 2018-07-03 Tom Tromey <tom@tromey.com>
4665
4666 * common/ptid.c (pid_to_ptid): Remove.
4667 * common/ptid.h (pid_to_ptid): Don't declare.
4668 * aix-thread.c: Update.
4669 * arm-linux-nat.c: Update.
4670 * common/ptid.c: Update.
4671 * common/ptid.h: Update.
4672 * corelow.c: Update.
4673 * ctf.c: Update.
4674 * darwin-nat.c: Update.
4675 * fbsd-nat.c: Update.
4676 * fork-child.c: Update.
4677 * gnu-nat.c: Update.
4678 * go32-nat.c: Update.
4679 * inf-ptrace.c: Update.
4680 * infcmd.c: Update.
4681 * inferior.c: Update.
4682 * infrun.c: Update.
4683 * linux-fork.c: Update.
4684 * linux-nat.c: Update.
4685 * nat/aarch64-linux-hw-point.c: Update.
4686 * nat/fork-inferior.c: Update.
4687 * nat/x86-linux-dregs.c: Update.
4688 * nto-procfs.c: Update.
4689 * obsd-nat.c: Update.
4690 * procfs.c: Update.
4691 * progspace.c: Update.
4692 * remote.c: Update.
4693 * rs6000-nat.c: Update.
4694 * s390-linux-nat.c: Update.
4695 * sol-thread.c: Update.
4696 * spu-linux-nat.c: Update.
4697 * target.c: Update.
4698 * top.c: Update.
4699 * tracefile-tfile.c: Update.
4700 * windows-nat.c: Update.
4701
4702 2018-07-03 Tom Tromey <tom@tromey.com>
4703
4704 * common/ptid.h (ptid_build): Don't declare.
4705 * common/ptid.c (ptid_build): Remove.
4706 * aix-thread.c: Update.
4707 * bsd-kvm.c: Update.
4708 * bsd-uthread.c: Update.
4709 * common/agent.c: Update.
4710 * common/ptid.c: Update.
4711 * common/ptid.h: Update.
4712 * corelow.c: Update.
4713 * darwin-nat.c: Update.
4714 * fbsd-nat.c: Update.
4715 * gnu-nat.c: Update.
4716 * linux-fork.c: Update.
4717 * linux-nat.c: Update.
4718 * linux-thread-db.c: Update.
4719 * nat/linux-osdata.c: Update.
4720 * nat/linux-procfs.c: Update.
4721 * nto-procfs.c: Update.
4722 * obsd-nat.c: Update.
4723 * proc-service.c: Update.
4724 * procfs.c: Update.
4725 * ravenscar-thread.c: Update.
4726 * remote-sim.c: Update.
4727 * remote.c: Update.
4728 * sol-thread.c: Update.
4729 * target.c: Update.
4730 * windows-nat.c: Update.
4731
4732 2018-07-03 Tom Tromey <tom@tromey.com>
4733
4734 * infrun.c (follow_exec): Use exit_inferior_silent.
4735 * inferior.c (exit_inferior_num_silent): Remove.
4736 * inferior.h (exit_inferior_num_silent): Don't declare.
4737
4738 2018-07-03 Tom Tromey <tom@tromey.com>
4739
4740 PR cli/23340:
4741 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4742 inferior_ptid on error.
4743
4744 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4745 Simon Marchi <simon.marchi@polymtl.ca>
4746
4747 PR tdep/8282
4748 * disasm.h (gdb_disassembler): Add
4749 `m_disassembler_options_holder'. member
4750 * disasm.c (get_all_disassembler_options): New function.
4751 (gdb_disassembler::gdb_disassembler): Use it.
4752 (gdb_buffered_insn_length_init_dis): Likewise.
4753 (gdb_buffered_insn_length): Adjust accordingly.
4754 (set_disassembler_options): Handle options with arguments.
4755 (show_disassembler_options_sfunc): Likewise. Add a leading new
4756 line if showing options with descriptions.
4757 (disassembler_options_completer): Adapt to using the
4758 `disasm_options_and_args_t' structure.
4759 * mips-tdep.c (mips_disassembler_options): New variable.
4760 (mips_disassembler_options_o32): Likewise.
4761 (mips_disassembler_options_n32): Likewise.
4762 (mips_disassembler_options_n64): Likewise.
4763 (gdb_print_insn_mips): Don't set `disassembler_options'.
4764 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4765 functions.
4766 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4767 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4768 `gdbarch_disassembler_options_implicit' and
4769 `gdbarch_valid_disassembler_options'.
4770 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4771 `disasm_options_and_args_t' structure.
4772 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4773 method.
4774 (valid_disassembler_options): Switch from `disasm_options_t' to
4775 the `disasm_options_and_args_t' structure.
4776 * NEWS: Document `set disassembler-options' support for the MIPS
4777 target.
4778 * gdbarch.h: Regenerate.
4779 * gdbarch.c: Regenerate.
4780
4781 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4782
4783 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4784
4785 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4786
4787 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4788 parameter in call to amd64_target_description.
4789 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4790 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4791 (amd64fbsd_init_abi): Likewise.
4792 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4793 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4794 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4795 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4796
4797 2018-06-29 Pedro Alves <palves@redhat.com>
4798
4799 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4800 "segments" parameter.
4801 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4802 (_initialize_amd64_tdep): Update call to
4803 amd64_create_target_description.
4804 (amd64_target_description): Add "segments" parameter. Adjust
4805 the implementation to use it.
4806 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4807 call to amd64_create_target_description.
4808 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4809 * gdb/arch/amd64.h (amd64_create_target_description): Add
4810 "segments" register.
4811 * gdb/arch/amd64.c (amd64_create_target_description): Add
4812 "segments" parameter. Call create_feature_i386_64bit_segments
4813 only if SEGMENTS is true.
4814 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4815 call to amd64_create_target_description.
4816
4817 2018-06-29 Pedro Alves <palves@redhat.com>
4818
4819 * thread.c (thread_target_id_str): New, factored out from ...
4820 (print_thread_info_1): ... here. Use it to compute the max
4821 "Target Id" column width.
4822
4823 2018-06-29 Pedro Alves <palves@redhat.com>
4824
4825 * remote.c (remote_target::extra_thread_info): Delete
4826 'display_buf' and 'n' locals. from the cache, regardless of
4827 packet mechanims is in use. Use cache for qThreadExtra and qP
4828 methods too.
4829
4830 2018-06-29 Pedro Alves <palves@redhat.com>
4831
4832 * blockframe.c (find_pc_sect_containing_function): New function.
4833 * breakpoint.c (print_breakpoint_location): Don't call
4834 find_pc_sect_function.
4835 * linespec.c (create_sals_line_offset): Record the location's
4836 symbol in the sal.
4837 * linespec.c (convert_address_location_to_sals): Fill in sal's
4838 symbol with find_pc_sect_containing_function.
4839 * symtab.c (find_function_start_sal): Rename to ...
4840 (find_function_start_sal_1): ... this.
4841 (find_function_start_sal): Reimplement as wrapper around
4842 find_function_start_sal_1, and use
4843 find_pc_sect_containing_function to fill in the sal's symbol.
4844 (find_function_start_sal(symbol*, bool)): Adjust.
4845 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4846 comments.
4847 (find_pc_sect_containing_function): Declare.
4848
4849 2018-06-29 Pedro Alves <palves@redhat.com>
4850
4851 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4852 true if the the location has no symbol.
4853
4854 2018-06-28 Tom Tromey <tom@tromey.com>
4855
4856 * NEWS: Mention --enable-codesign.
4857 * silent-rules.mk (ECHO_SIGN): New variable.
4858 * configure.ac: Add --enable-codesign.
4859 * configure: Rebuild.
4860 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4861 (gdb$(EXEEXT)): Optionally invoke codesign.
4862
4863 2018-06-28 Pedro Alves <palves@redhat.com>
4864
4865 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4866 comments.
4867 (switch_to_thread_no_regs): Adjust comment.
4868 * infcmd.c (stop_pc): Delete.
4869 (post_create_inferior, info_program_command): Replace references
4870 to stop_pc with references to thread_info->suspend.stop_pc.
4871 * inferior.h (stop_pc): Delete declaration.
4872 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4873 (handle_inferior_event_1, handle_signal_stop)
4874 (process_event_stop_test, keep_going_stepped_thread)
4875 (handle_step_into_function, handle_step_into_function_backward)
4876 (print_stop_location): Replace references to stop_pc with
4877 references to thread_info->suspend.stop_pc.
4878 (struct infcall_suspend_state) <stop_pc>: Delete field.
4879 (save_infcall_suspend_state, restore_infcall_suspend_state):
4880 Remove references to inf_stat->stop_pc.
4881 * linux-fork.c (fork_load_infrun_state): Likewise.
4882 * record-btrace.c (record_btrace_set_replay): Likewise.
4883 * record-full.c (record_full_goto_entry): Likewise.
4884 * remote.c (print_one_stopped_thread): Likewise.
4885 * target.c (target_resume): Extend comment.
4886 * thread.c (set_executing_thread): New.
4887 (set_executing): Use it.
4888 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4889 Remove references to stop_pc.
4890
4891 2018-06-28 Pedro Alves <palves@redhat.com>
4892
4893 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4894 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4895
4896 2018-06-28 Tom Tromey <tom@tromey.com>
4897
4898 * coffread.c (coff_symfile_finish): Update.
4899 * xcoffread.c (xcoff_symfile_finish): Update.
4900 * elfread.c (elf_symfile_finish): Update.
4901 * symfile.h (dwarf2_free_objfile): Don't declare.
4902 * dwarf2read.c (_initialize_dwarf2_read): Use
4903 register_objfile_data_with_cleanup.
4904 (dwarf2_free_objfile): Now static. Change signature.
4905
4906 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4907
4908 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4909 option "-o" to add-symbol-file-load to add an offset to each
4910 section's load address.
4911 * symfile.c (set_objfile_default_section_offset): New function.
4912
4913 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4914
4915 * symfile.c (add_symbol_file_command): Make sure that sections
4916 with the same name are sorted in the same order.
4917
4918 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4919
4920 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4921 require the second argument. If omitted, load sections at the
4922 addresses specified in the file.
4923
4924 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4925
4926 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4927 (_initialize_symfile): Add option "-o" to symbol-file to add an
4928 offset to each section of the symbol file.
4929
4930 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4931
4932 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4933
4934 2018-06-27 Tom Tromey <tom@tromey.com>
4935
4936 * stack.c (_initialize_stack): Update "func" help text.
4937
4938 2018-06-27 Tom Tromey <tom@tromey.com>
4939
4940 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4941 std::vector.
4942 (unwind_infopy_str, pyuw_create_unwind_info)
4943 (unwind_infopy_add_saved_register, pyuw_sniffer)
4944 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4945 Update.
4946 (struct saved_reg): Add constructor.
4947 <value>: Now a gdbpy_ref<>.
4948
4949 2018-06-27 Tom Tromey <tom@tromey.com>
4950
4951 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4952
4953 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4954
4955 * gdb-gdb.py.in: Format using autopep8.
4956
4957 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4958
4959 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4960 (type_lookup_function): Recognize CORE_ADDR values.
4961
4962 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4963
4964 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4965 print tag_name.
4966
4967 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4968
4969 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4970 <__lt__>: Add.
4971
4972 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4973
4974 * gdb-gdb.py: Move to...
4975 * gdb-gdb.py.in: ... here.
4976 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4977 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4978 dependencies.
4979 (distclean): Remove gdb-gdb.py when cleaning.
4980 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4981 * configure: Re-generate.
4982
4983 2018-06-27 Pedro Alves <palves@redhat.com>
4984
4985 * proc-service.c (get_ps_regcache): New.
4986 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4987 (ps_lsetfpregs): Use it.
4988
4989 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4990
4991 PR gdb/21695
4992 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4993 (dwarf_decode_lines_1): Adjust.
4994
4995 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4996
4997 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4998 override.
4999 <info_proc>: Likewise.
5000
5001 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5002
5003 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5004 to windows_fetch_one_register, and only handle the case of
5005 fetching one register. Move the code that reloads the context
5006 and iterates over all registers if R is negative to...
5007 (windows_nat_target::fetch_registers): ... here.
5008 (do_windows_store_inferior_registers): Rename to
5009 windows_store_one_register, and only handle the case of storing
5010 one register. Move the code that handles the case where r is
5011 negative to...
5012 (windows_nat_target::store_registers) ... here.
5013
5014 2018-06-26 Tom Tromey <tom@tromey.com>
5015
5016 PR rust/22574:
5017 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5018 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5019 Update.
5020 (rust_internal_print_type): Add podata parameter.
5021 (rust_print_type): Update.
5022
5023 2018-06-26 Tom Tromey <tom@tromey.com>
5024
5025 * typeprint.h (struct print_offset_data) <update, finish,
5026 maybe_print_hole>: New methods.
5027 <indentation>: New constant.
5028 * typeprint.c (print_offset_data::indentation): Define.
5029 (print_offset_data::maybe_print_hole, print_offset_data::update)
5030 (print_offset_data::finish): Move from c-typeprint.c and rename.
5031 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5032 (print_spaces_filtered_with_print_options): Update.
5033 (c_print_type_union_field_offset, maybe_print_hole)
5034 (c_print_type_struct_field_offset): Move to typeprint.c and
5035 rename.
5036 (c_type_print_base_struct_union): Update.
5037
5038 2018-06-25 Pedro Alves <palves@redhat.com>
5039
5040 * gdbthread.h (thread_info_ref, delete_thread)
5041 (delete_thread_silent, first_thread_of_inferior)
5042 (any_thread_of_inferior, switch_to_thread)
5043 (enable_thread_stack_temporaries)
5044 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5045 (get_last_thread_stack_temporary)
5046 (value_in_thread_stack_temporaries, can_access_registers_thread):
5047 Spell out "struct thread_info" instead of just "thread_info".
5048 * inferior.h (notice_new_inferior): Likewise.
5049
5050 2018-06-25 Pedro Alves <palves@redhat.com>
5051
5052 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5053 pass thread_info pointer to delete_thread.
5054 (windows_nat_target::detach): Pass inferior pointer to
5055 detach_inferior.
5056 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5057 delete_thread.
5058 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5059 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5060 and pass a thread_info pointer to delete_thread.
5061 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5062 pass thread_info pointer to delete_thread.
5063 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5064 delete_thread_silent call.
5065 * procfs.c (procfs_target::detach): Pass inferior pointer to
5066 detach_inferior.
5067 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5068 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5069 delete_thread_silent call.
5070 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5071 pass thread_info pointer to delete_thread.
5072 (windows_nat_target::detach): Pass inferior pointer to
5073 delete_inferior.
5074
5075 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5076
5077 * regcache.c (readable_regcache::read_part): Fix asserts.
5078 (reg_buffer::raw_collect_part): New function.
5079 (regcache::write_part): Fix asserts.
5080 (reg_buffer::raw_supply_part): New function.
5081 (regcache::transfer_regset_register): New helper function.
5082 (regcache::transfer_regset): Call new functions.
5083 (regcache_supply_regset): Use gdb_byte*.
5084 (regcache::supply_regset): Likewise.
5085 (regcache_collect_regset): Likewise.
5086 (regcache::collect_regset): Likewise.
5087 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5088 (reg_buffer::raw_supply_part): Likewise.
5089 (regcache::transfer_regset_register): Likewise.
5090 (regcache::transfer_regset): Use gdb_byte*.
5091
5092 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5093
5094 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5095
5096 2018-06-21 Pedro Alves <palves@redhat.com>
5097
5098 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5099 instead of a ptid_t. All callers adjusted.
5100 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5101 adjusted.
5102 (print_ada_task_info, display_current_task_id, task_command_1):
5103 Adjust.
5104 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5105 inferior_thread.
5106 (breakpoint_kind): Adjust.
5107 (remove_breakpoints_pid): Rename to ...
5108 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5109 pointer. All callers adjusted.
5110 (bpstat_clear_actions): Use inferior_thread.
5111 (get_bpstat_thread): New.
5112 (bpstat_do_actions): Use it.
5113 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5114 to take a thread_info pointer. All callers adjusted.
5115 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5116 (breakpoint_re_set_thread): Use inferior_thread.
5117 * breakpoint.h (struct inferior): Forward declare.
5118 (bpstat_stop_status): Update.
5119 (remove_breakpoints_pid): Delete.
5120 (remove_breakpoints_inf): New.
5121 * bsd-uthread.c (bsd_uthread_target::wait)
5122 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5123 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5124 (maint_btrace_packet_history_cmd)
5125 (maint_btrace_clear_packet_history_cmd): Adjust.
5126 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5127 inferior_thread.
5128 * cli/cli-interp.c: Include "inferior.h".
5129 * common/refcounted-object.h (struct
5130 refcounted_object_ref_policy): New.
5131 * compile/compile-object-load.c: Include gdbthread.h.
5132 (store_regs): Use inferior_thread.
5133 * corelow.c (core_target::close): Use current_inferior.
5134 (core_target_open): Adjust to use first_thread_of_inferior and use
5135 the current inferior.
5136 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5137 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5138 <thread>: ... this new field. All references adjusted.
5139 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5140 Take a thread_info pointer instead of a ptid_t.
5141 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5142 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5143 thread_info pointer instead of a ptid_t.
5144 * elfread.c: Include "inferior.h".
5145 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5146 Use inferior_thread.
5147 * eval.c (evaluate_subexp): Likewise.
5148 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5149 inferior_thread.
5150 * gdb_proc_service.h (struct thread_info): Forward declare.
5151 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5152 <thread>: ... this new field. All references adjusted.
5153 * gdbarch.h, gdbarch.c: Regenerate.
5154 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5155 'thread' parameter. All implementations and callers adjusted.
5156 * gdbthread.h (thread_info) <set_running>: New method.
5157 (delete_thread, delete_thread_silent): Take a thread_info pointer
5158 instead of a ptid.
5159 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5160 (first_thread_of_process): Delete, replaced by ...
5161 (first_thread_of_inferior): ... this new function. All callers
5162 adjusted.
5163 (any_live_thread_of_process): Delete, replaced by ...
5164 (any_live_thread_of_inferior): ... this new function. All callers
5165 adjusted.
5166 (switch_to_thread, switch_to_no_thread): Declare.
5167 (is_executing): Delete.
5168 (enable_thread_stack_temporaries): Update comment.
5169 <enable_thread_stack_temporaries>: Take a thread_info pointer
5170 instead of a ptid_t. Incref the thread.
5171 <~enable_thread_stack_temporaries>: Decref the thread.
5172 <m_ptid>: Delete
5173 <m_thr>: New.
5174 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5175 (get_last_thread_stack_temporary)
5176 (value_in_thread_stack_temporaries, can_access_registers_thread):
5177 Take a thread_info pointer instead of a ptid_t. All callers
5178 adjusted.
5179 * infcall.c (get_call_return_value): Use inferior_thread.
5180 (run_inferior_call): Work with thread pointers instead of ptid_t.
5181 (call_function_by_hand_dummy): Work with thread pointers instead
5182 of ptid_t. Use thread_info_ref.
5183 * infcmd.c (proceed_thread_callback): Access thread's state
5184 directly.
5185 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5186 access thread's state directly.
5187 (continue_command): Use inferior_thread.
5188 (info_program_command): Use find_thread_ptid and access thread
5189 state directly.
5190 (proceed_after_attach_callback): Use thread state directly.
5191 (notice_new_inferior): Take a thread_info pointer instead of a
5192 ptid_t. All callers adjusted.
5193 (exit_inferior): Take an inferior pointer instead of a pid. All
5194 callers adjusted.
5195 (exit_inferior_silent): New.
5196 (detach_inferior): Delete.
5197 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5198 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5199 (detach_inferior_command, kill_inferior_command): Use
5200 find_inferior_id instead of valid_gdb_inferior_id and
5201 gdb_inferior_id_to_pid.
5202 (inferior_command): Use inferior and thread pointers.
5203 * inferior.h (struct thread_info): Forward declare.
5204 (notice_new_inferior): Take a thread_info pointer instead of a
5205 ptid_t. All callers adjusted.
5206 (detach_inferior): Delete declaration.
5207 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5208 instead of a pid. All callers adjusted.
5209 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5210 (valid_gdb_inferior_id): Delete.
5211 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5212 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5213 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5214 ...
5215 <inf>: ... this new field.
5216 <step_ptid>: Delete, replaced by ...
5217 <step_thread>: ... this new field.
5218 (get_displaced_stepping_state): Take an inferior pointer instead
5219 of a pid. All callers adjusted.
5220 (displaced_step_in_progress_any_inferior): Adjust.
5221 (displaced_step_in_progress_thread): Take a thread pointer instead
5222 of a ptid_t. All callers adjusted.
5223 (displaced_step_in_progress, add_displaced_stepping_state): Take
5224 an inferior pointer instead of a pid. All callers adjusted.
5225 (get_displaced_step_closure_by_addr): Adjust.
5226 (remove_displaced_stepping_state): Take an inferior pointer
5227 instead of a pid. All callers adjusted.
5228 (displaced_step_prepare_throw, displaced_step_prepare)
5229 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5230 All callers adjusted.
5231 (start_step_over): Adjust.
5232 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5233 displaced step queue.
5234 (do_target_resume): Adjust.
5235 (fetch_inferior_event): Use inferior_thread.
5236 (context_switch, get_inferior_stop_soon): Take an
5237 execution_control_state pointer instead of a ptid_t. All callers
5238 adjusted.
5239 (switch_to_thread_cleanup): Delete.
5240 (stop_all_threads): Use scoped_restore_current_thread.
5241 * inline-frame.c: Include "gdbthread.h".
5242 (inline_state) <inline_state>: Take a thread pointer instead of a
5243 ptid_t. All callers adjusted.
5244 <ptid>: Delete, replaced by ...
5245 <thread>: ... this new field.
5246 (find_inline_frame_state): Take a thread pointer instead of a
5247 ptid_t. All callers adjusted.
5248 (skip_inline_frames, step_into_inline_frame)
5249 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5250 pointer instead of a ptid_t. All callers adjusted.
5251 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5252 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5253 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5254 pointers directly.
5255 * linux-nat.c (get_detach_signal): Likewise.
5256 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5257 (thread_db_notice_clone): Adjust.
5258 (thread_db_find_new_threads_silently)
5259 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5260 a thread pointer instead of a ptid_t. All callers adjusted.
5261 * mi/mi-cmd-var.c: Include "inferior.h".
5262 (mi_cmd_var_update_iter): Update to use thread pointers.
5263 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5264 inferior directly.
5265 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5266 out to ...
5267 (mi_output_running): ... this new function.
5268 (mi_on_resume_1): Adjust to use it.
5269 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5270 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5271 directly.
5272 (interrupt_thread_callback): : Adjust to use thread and inferior
5273 pointers.
5274 * proc-service.c: Include "gdbthread.h".
5275 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5276 * progspace-and-thread.c: Include "inferior.h".
5277 * progspace.c: Include "inferior.h".
5278 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5279 hold a reference to an inferior_object.
5280 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5281 inferior_thread.
5282 * python/py-inferior.c (struct inferior_object): Give the type a
5283 tag name instead of a typedef.
5284 (python_on_normal_stop): No need to check if the current thread is
5285 listed.
5286 (inferior_to_inferior_object): Change return type to
5287 inferior_object. All callers adjusted.
5288 (find_thread_object): Delete, bits factored out to ...
5289 (thread_to_thread_object): ... this new function.
5290 * python/py-infthread.c (create_thread_object): Use
5291 inferior_to_inferior_object.
5292 (thpy_is_stopped): Use thread pointer directly.
5293 (gdbpy_selected_thread): Use inferior_thread.
5294 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5295 field, replaced with ...
5296 <thread>: ... this new field. All users adjusted.
5297 (btpy_insn_or_gap_new): Drop const.
5298 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5299 callers adjusted.
5300 * python/py-record.c: Include "gdbthread.h".
5301 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5302 a ptid_t. All callers adjusted.
5303 (gdbpy_current_recording): Use inferior_thread.
5304 * python/py-record.h (recpy_record_object) <ptid>: Delete
5305 field, replaced with ...
5306 <thread>: ... this new field. All users adjusted.
5307 (recpy_element_object) <ptid>: Delete
5308 field, replaced with ...
5309 <thread>: ... this new field. All users adjusted.
5310 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5311 a ptid_t. All callers adjusted.
5312 * python/py-threadevent.c: Include "gdbthread.h".
5313 (get_event_thread): Use thread_to_thread_object.
5314 * python/python-internal.h (struct inferior_object): Forward
5315 declare.
5316 (find_thread_object, find_inferior_object): Delete declarations.
5317 (thread_to_thread_object, inferior_to_inferior_object): New
5318 declarations.
5319 * record-btrace.c: Include "inferior.h".
5320 (require_btrace_thread): Use inferior_thread.
5321 (record_btrace_frame_sniffer)
5322 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5323 (get_thread_current_frame): Use scoped_restore_current_thread and
5324 switch_to_thread.
5325 (get_thread_current_frame): Use thread pointer directly.
5326 (record_btrace_replay_at_breakpoint): Use thread's inferior
5327 pointer directly.
5328 * record-full.c: Include "inferior.h".
5329 * regcache.c: Include "gdbthread.h".
5330 (get_thread_arch_regcache): Use the inferior's address space
5331 directly.
5332 (get_thread_regcache, registers_changed_thread): New.
5333 * regcache.h (get_thread_regcache(thread_info *thread)): New
5334 overload.
5335 (registers_changed_thread): New.
5336 (remote_target) <remote_detach_1>: Swap order of parameters.
5337 (remote_add_thread): <remote_add_thread>: Return the new thread.
5338 (get_remote_thread_info(ptid_t)): New overload.
5339 (remote_target::remote_notice_new_inferior): Use thread pointers
5340 directly.
5341 (remote_target::process_initial_stop_replies): Use
5342 thread_info::set_running.
5343 (remote_target::remote_detach_1, remote_target::detach)
5344 (extended_remote_target::detach): Adjust.
5345 * stack.c (frame_show_address): Use inferior_thread.
5346 * target-debug.h (target_debug_print_thread_info_pp): New.
5347 * target-delegates.c: Regenerate.
5348 * target.c (default_thread_address_space): Delete.
5349 (memory_xfer_partial_1): Use current_inferior.
5350 (target_detach): Use current_inferior.
5351 (target_thread_address_space): Delete.
5352 (generic_mourn_inferior): Use current_inferior.
5353 * target.h (struct target_ops) <thread_address_space>: Delete.
5354 (target_thread_address_space): Delete.
5355 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5356 pointers directly.
5357 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5358 thread pointer instead of a ptid_t. Adjust all callers.
5359 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5360 (first_thread_of_process): Delete, replaced by ...
5361 (first_thread_of_inferior): ... this new function. All callers
5362 adjusted.
5363 (any_thread_of_process): Rename to ...
5364 (any_thread_of_inferior): ... this, and take an inferior pointer.
5365 (any_live_thread_of_process): Rename to ...
5366 (any_live_thread_of_inferior): ... this, and take an inferior
5367 pointer.
5368 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5369 (value_in_thread_stack_temporaries)
5370 (get_last_thread_stack_temporary): Take a thread pointer instead
5371 of a ptid_t. Adjust all callers.
5372 (thread_info::set_running): New.
5373 (validate_registers_access): Use inferior_thread.
5374 (can_access_registers_ptid): Rename to ...
5375 (can_access_registers_thread): ... this, and take a thread
5376 pointer.
5377 (print_thread_info_1): Adjust to compare thread pointers instead
5378 of ptids.
5379 (switch_to_no_thread, switch_to_thread): Make extern.
5380 (scoped_restore_current_thread::~scoped_restore_current_thread):
5381 Use m_thread pointer directly.
5382 (scoped_restore_current_thread::scoped_restore_current_thread):
5383 Use inferior_thread.
5384 (thread_command): Use thread pointer directly.
5385 (thread_num_make_value_helper): Use inferior_thread.
5386 * top.c (execute_command): Use inferior_thread.
5387 * tui/tui-interp.c: Include "inferior.h".
5388 * varobj.c (varobj_create): Use inferior_thread.
5389 (value_of_root_1): Use find_thread_global_id instead of
5390 global_thread_id_to_ptid.
5391
5392 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5393
5394 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5395 possible.
5396 (regcache::write_part): Likewise.
5397 (readable_regcache::cooked_read_part): Update comment.
5398 (readable_regcache::cooked_write_part): Likewise.
5399 * regcache.h: (readable_regcache::read_part): Likewise.
5400 (regcache::write_part): Likewise.
5401
5402 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5403 Dirk Schubert <dirk.schubert@arm.com>
5404
5405 * aarch64-linux-nat.c (post_attach): New.
5406 (aarch64_linux_nat_target::post_attach): Override post_attach to
5407 record the number of hardware debug registers.
5408
5409 2018-06-20 Tom Tromey <tom@tromey.com>
5410
5411 * python/py-param.c (add_setshow_generic): Make parameters const.
5412 (parmpy_init): Update.
5413
5414 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5415
5416 * regcache.h (regcache_cooked_read_ftype): Rename to...
5417 (register_read_ftype): ...this, change type to function_view.
5418 (class reg_buffer) <save>: Remove src parameter.
5419 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5420 parameter non-const in first overload. Remove src parameter in
5421 second overload.
5422 * regcache.c (do_cooked_read): Remove.
5423 (readonly_detached_regcache::readonly_detached_regcache): Make
5424 parameter non-const, adjust call to other constructor.
5425 (reg_buffer::save): Remove src parameter.
5426 * frame.c (do_frame_register_read): Remove.
5427 (frame_save_as_regcache): Use lambda function.
5428 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5429 parameter to ppu2spu_data *.
5430 (ppu2spu_sniffer): Use lambda function.
5431
5432 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5433
5434 * record-full.c (record_full_target::insert_breakpoint): Remove
5435 "struct" keyword, add const.
5436
5437 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5438
5439 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5440 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5441 * configure.ac: Remove AC_PREREQ, add missing quoting.
5442 * gnulib/configure.ac: Modernize usage of
5443 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5444 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5445 (AUTOMAKE_VERSION): Bump to 1.15.1.
5446 * configure: Re-generate.
5447 * config.in: Re-generate.
5448 * aclocal.m4: Re-generate.
5449 * gnulib/aclocal.m4: Re-generate.
5450 * gnulib/config.in: Re-generate.
5451 * gnulib/configure: Re-generate.
5452 * gnulib/import/Makefile.in: Re-generate.
5453
5454 2018-06-19 Pedro Alves <palves@redhat.com>
5455
5456 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5457 (lookup_minimal_symbol_by_pc_section): ... here with
5458 gdb_assert_not_reached added.
5459
5460 2018-06-19 Pedro Alves <palves@redhat.com>
5461
5462 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5463 parameter with a block parameter. Compare location's block symbol
5464 with the frame's block instead of addresses.
5465 (skip_inline_frames): Pass the current block instead of the
5466 frame's address. Break out as soon as we determine the frame
5467 should not be skipped.
5468
5469 2018-06-18 Tom Tromey <tom@tromey.com>
5470
5471 * solib-aix.c (solib_aix_get_section_offsets): Return
5472 unique_xmalloc_ptr.
5473 (solib_aix_solib_create_inferior_hook): Update.
5474
5475 2018-06-18 Tom Tromey <tom@tromey.com>
5476
5477 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5478
5479 2018-06-18 Tom Tromey <tom@tromey.com>
5480
5481 * solib-frv.c (frv_relocate_main_executable): Use
5482 unique_xmalloc_ptr.
5483 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5484 unique_xmalloc_ptr.
5485
5486 2018-06-18 Tom Tromey <tom@tromey.com>
5487
5488 * objfiles.h (inhibit_section_map_updates): Update.
5489 (resume_section_map_updates, resume_section_map_updates_cleanup):
5490 Remove.
5491 * solib-svr4.c (svr4_handle_solib_event): Update.
5492 * objfiles.c (inhibit_section_map_updates): Return
5493 scoped_restore_tmpl<int>.
5494 (resume_section_map_updates, resume_section_map_updates_cleanup):
5495 Remove.
5496
5497 2018-06-18 Tom Tromey <tom@tromey.com>
5498
5499 * valprint.h (read_string): Update.
5500 * valprint.c (read_string): Change type of "buffer".
5501 (val_print_string): Update.
5502 * python/py-value.c (valpy_string): Update.
5503 * language.h (struct language_defn) <la_get_string>: Change
5504 type of "buffer".
5505 (default_get_string, c_get_string): Update.
5506 * language.c (default_get_string): Change type of "buffer".
5507 * guile/scm-value.c (gdbscm_value_to_string): Update.
5508 * c-lang.c (c_get_string): Change type of "buffer".
5509
5510 2018-06-18 Tom Tromey <tom@tromey.com>
5511
5512 * ser-mingw.c (struct pipe_state_destroyer): New.
5513 (pipe_state_up): New typedef.
5514 (cleanup_pipe_state): Remove.
5515 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5516
5517 2018-06-18 Tom Tromey <tom@tromey.com>
5518
5519 * rust-lang.h (rust_yyerror): Don't declare.
5520 * rust-lang.c (rust_language_defn): Update.
5521 * rust-exp.y (yyerror): Now static.
5522 * parse.c (parse_exp_in_context_1): Update.
5523 * p-lang.h (p_yyerror): Don't declare.
5524 * p-lang.c (p_language_defn): Update.
5525 * p-exp.y (yyerror): Now static.
5526 * opencl-lang.c (opencl_language_defn): Update.
5527 * objc-lang.c (objc_language_defn): Update.
5528 * m2-lang.h (m2_yyerror): Don't declare.
5529 * m2-lang.c (m2_language_defn): Update.
5530 * m2-exp.y (yyerror): Now static.
5531 * language.h (struct language_defn) <la_error>: Remove.
5532 * language.c (unk_lang_error): Remove.
5533 (unknown_language_defn, auto_language_defn): Remove.
5534 * go-lang.h (go_yyerror): Don't declare.
5535 * go-lang.c (go_language_defn): Update.
5536 * go-exp.y (yyerror): Now static.
5537 * f-lang.h (f_yyerror): Don't declare.
5538 * f-lang.c (f_language_defn): Update.
5539 * f-exp.y (yyerror): Now static.
5540 * d-lang.h (d_yyerror): Don't declare.
5541 * d-lang.c (d_language_defn): Update.
5542 * d-exp.y (yyerror): Now static.
5543 * c-lang.h (c_yyerror): Don't declare.
5544 * c-lang.c (c_language_defn, cplus_language_defn)
5545 (asm_language_defn, minimal_language_defn): Update.
5546 * c-exp.y (yyerror): Now static.
5547 * ada-lang.h (ada_yyerror): Don't declare.
5548 * ada-lang.c (ada_language_defn): Update.
5549 * ada-exp.y (yyerror): Now static.
5550
5551 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5552
5553 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5554 (store_sveregs_to_thread): Likewise.
5555 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5556 (aarch64_linux_store_inferior_registers): Likewise.
5557 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5558 function.
5559 (aarch64_sve_regs_copy_to_regcache): Likewise.
5560 (aarch64_sve_regs_copy_from_regcache): Likewise.
5561 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5562 declaration.
5563 (aarch64_sve_regs_copy_to_regcache): Likewise.
5564 (aarch64_sve_regs_copy_from_regcache): Likewise.
5565 (sve_context): Structure from Linux headers.
5566 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5567 (SVE_SIG_ZREG_SIZE): Likewise.
5568 (SVE_SIG_PREG_SIZE): Likewise.
5569 (SVE_SIG_FFR_SIZE): Likewise.
5570 (SVE_SIG_REGS_OFFSET): Likewise.
5571 (SVE_SIG_ZREGS_OFFSET): Likewise.
5572 (SVE_SIG_ZREG_OFFSET): Likewise.
5573 (SVE_SIG_ZREGS_SIZE): Likewise.
5574 (SVE_SIG_PREGS_OFFSET): Likewise.
5575 (SVE_SIG_PREG_OFFSET): Likewise.
5576 (SVE_SIG_PREGS_SIZE): Likewise.
5577 (SVE_SIG_FFR_OFFSET): Likewise.
5578 (SVE_SIG_REGS_SIZE): Likewise.
5579 (SVE_SIG_CONTEXT_SIZE): Likewise.
5580 (SVE_PT_REGS_MASK): Likewise.
5581 (SVE_PT_REGS_FPSIMD): Likewise.
5582 (SVE_PT_REGS_SVE): Likewise.
5583 (SVE_PT_VL_INHERIT): Likewise.
5584 (SVE_PT_VL_ONEXEC): Likewise.
5585 (SVE_PT_REGS_OFFSET): Likewise.
5586 (SVE_PT_FPSIMD_OFFSET): Likewise.
5587 (SVE_PT_FPSIMD_SIZE): Likewise.
5588 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5589 (SVE_PT_SVE_PREG_SIZE): Likewise.
5590 (SVE_PT_SVE_FFR_SIZE): Likewise.
5591 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5592 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5593 (__SVE_SIG_TO_PT): Likewise.
5594 (SVE_PT_SVE_OFFSET): Likewise.
5595 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5596 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5597 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5598 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5599 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5600 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5601 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5602 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5603 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5604 (SVE_PT_SVE_SIZE): Likewise.
5605 (SVE_PT_SIZE): Likewise.
5606 (HAS_SVE_STATE): New define.
5607
5608 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5609
5610 * nat/aarch64-sve-linux-sigcontext.h: New file.
5611 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5612 new files.
5613 (SVE_VQ_MIN): Likewise.
5614 (SVE_VQ_MAX): Likewise.
5615 (SVE_VL_MIN): Likewise.
5616 (SVE_VL_MAX): Likewise.
5617 (SVE_NUM_ZREGS): Likewise.
5618 (SVE_NUM_PREGS): Likewise.
5619 (sve_vl_valid): Likewise.
5620 (struct user_sve_header): Likewise.
5621
5622 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5623 Richard Bunt <Richard.Bunt@arm.com>
5624
5625 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5626 was requested by GDB.
5627
5628 2018-06-15 Tom de Vries <tdevries@suse.de>
5629
5630 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5631
5632 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5633
5634 * gnulib/update-gnulib.sh: Print expected versions of
5635 autoconf/aclocal.
5636
5637 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5638
5639 * arch-utils.c (default_type_align): Use type_length_units.
5640 * gdbtypes.c (type_align): Use type_length_units.
5641
5642 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5643
5644 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5645 of 'define' command.
5646
5647 2018-06-14 Tom de Vries <tdevries@suse.de>
5648
5649 PR cli/22573
5650 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5651 get_no_prettyformat_print_options.
5652
5653 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5654
5655 * sparc-nat.h: Include target.h.
5656 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5657 <fetch_registers>: Remove this argument in function call.
5658 <store_registers>: Remove this argument in function call, remove
5659 extra semicolon.
5660 <low_forget_process>: Call sparc64_forget_process instead of
5661 sparc_forget_process.
5662
5663 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5664
5665 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5666 (procfs_target::make_corefile_notes): Adjust to new
5667 target_read_alloc return type.
5668
5669 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5670 Stephen Roberts <stephen.roberts@arm.com>
5671
5672 PR gdb/22882
5673 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5674 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5675 Move should_notify_stop local into more inner scope.
5676
5677 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5678 Stephen Roberts <stephen.roberts@arm.com>
5679
5680 PR gdb/22882
5681 * infrun.c (resume_1): Add call to mark_async_event_handler.
5682
5683 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5684
5685 * infrun.c (do_target_wait): Change old version of $pc printed.
5686
5687 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5688
5689 * dwarf2read.c (read_index_from_section): Rename to...
5690 (read_gdb_index_from_section): ... this, update all callers.
5691 (dwarf2_read_index): Rename to...
5692 (dwarf2_read_gdb_index): ... this, update all callers.
5693
5694 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5695
5696 * gdb/hppa-linux-nat.c
5697 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5698 hppa_linux_nat_target::fetch_registers.
5699
5700 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5701
5702 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5703 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5704 (AARCH64_DWARF_SVE_FFR): Likewise.
5705 (AARCH64_DWARF_SVE_P0): Likewise.
5706 (AARCH64_DWARF_SVE_Z0): Likewise.
5707
5708 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5709
5710 * common/common-regcache.h (raw_compare): New function.
5711 * regcache.c (regcache::raw_compare): Likewise.
5712 * regcache.h (regcache::raw_compare): New declaration.
5713
5714 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5715
5716 * common/common-regcache.h (reg_buffer_common): New structure.
5717 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5718 (reg_buffer::raw_supply): Likewise.
5719 (reg_buffer::raw_supply_integer): Likewise.
5720 (reg_buffer::raw_supply_zeroed): Likewise.
5721 (reg_buffer::raw_collect): Likewise.
5722 (reg_buffer::raw_collect_integer): Likewise.
5723 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5724 (reg_buffer::raw_supply): Likewise.
5725 (reg_buffer::raw_supply_integer): Likewise.
5726 (reg_buffer::raw_supply_zeroed): Likewise.
5727 (reg_buffer::raw_collect): Likewise.
5728 (reg_buffer::raw_collect_integer): Likewise.
5729
5730 2018-06-10 Tom Tromey <tom@tromey.com>
5731
5732 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5733 (class remote_state) <stop_reply_queue>: Now std::vector.
5734 (remote_state::~remote_state)
5735 (remote_target::stop_reply_queue_length): Update.
5736 (struct queue_iter_param, remove_child_of_pending_fork)
5737 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5738 (check_pending_event_prevents_wildcard_vcont_callback)
5739 (remove_stop_reply_for_inferior)
5740 (remove_stop_reply_of_remote_state)
5741 (remote_notif_remove_once_on_match)
5742 (stop_reply_match_ptid_and_ws)
5743 (remote_kill_child_of_pending_fork): Remove.
5744 (remote_target::remove_new_fork_children)
5745 (remote_target::check_pending_events_prevent_wildcard_vcont)
5746 (remote_target::discard_pending_stop_replies)
5747 (remote_target::discard_pending_stop_replies_in_queue)
5748 (remote_target::remote_notif_remove_queued_reply)
5749 (remote_target::queued_stop_reply)
5750 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5751 (remote_target::wait, remote_target::kill_new_fork_children)
5752 (remote_target::async): Update.
5753
5754 2018-06-10 Tom Tromey <tom@tromey.com>
5755
5756 * record-full.c (record_full_arch_list_cleanups): Remove.
5757 (record_full_message): Use try/catch.
5758 (record_full_wait_cleanups): Remove.
5759 (record_full_wait_1): Use try/catch.
5760 (record_full_restore): Likewise.
5761
5762 2018-06-10 Tom Tromey <tom@tromey.com>
5763
5764 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5765 declare VEC. Add constructor.
5766 <in_target_beneath>: Now bool.
5767 (record_full_breakpoints): Now a std::vector, static.
5768 (record_full_sync_record_breakpoints)
5769 (record_full_init_record_breakpoints)
5770 (record_full_target::insert_breakpoint)
5771 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5772
5773 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5774
5775 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5776 * serial.c (serial_interface_lookup): Remove struct keyword.
5777
5778 2018-06-10 Tom Tromey <tom@tromey.com>
5779
5780 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5781 method.
5782 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5783 a method.
5784 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5785 method.
5786 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5787 "beneath" as a method.
5788 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5789 Use "beneath" as a method.
5790
5791 2018-06-10 Tom Tromey <tom@tromey.com>
5792
5793 * tracefile.c (struct trace_file_writer_deleter): New.
5794 <operator()>: Rename from trace_file_writer_xfree.
5795 (trace_file_writer_up): New typedef.
5796 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5797
5798 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5799
5800 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5801 <m_registers, m_register_status>: Change type to
5802 std::unique_ptr.
5803 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5804 XCNEWVEC.
5805
5806 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5807
5808 * common/common-regcache.h (enum register_status): Add
5809 underlying type "signed char".
5810 * regcache.h (reg_buffer) <m_register_status>: Change type to
5811 register_status *.
5812 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5813 register_status instead of signed char.
5814 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5815 (reg_buffer::get_register_status): Remove cast.
5816 (readable_regcache::raw_read): Remove cast.
5817 (readable_regcache::cooked_read): Remove cast.
5818
5819 2018-06-09 Tom Tromey <tom@tromey.com>
5820
5821 * source.c (reverse_search_command, forward_search_command): Use
5822 scoped_fd.
5823
5824 2018-06-09 Tom Tromey <tom@tromey.com>
5825
5826 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5827 (serial_ops_list): Now static, std::vector.
5828 (serial_interface_lookup, serial_add_interface): Update.
5829
5830 2018-06-09 Tom Tromey <tom@tromey.com>
5831
5832 * dwarf2read.c (process_cu_includes): Update.
5833 (process_full_comp_unit): Update.
5834 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5835 std::vector.
5836
5837 2018-06-08 Paul Koning <paul_koning@dell.com>
5838
5839 PR gdb/23252
5840
5841 * python/python.c (do_start_initialization):
5842 Avoid call to internal Python API.
5843 (init__gdb_module): New function.
5844
5845 2018-06-08 Gary Benson <gbenson@redhat.com>
5846
5847 * linux-thread-db.c (valprint.h): New include.
5848 (struct check_thread_db_info): New structure.
5849 (check_thread_db_on_load, tdb_testinfo): New static globals.
5850 (check_thread_db, check_thread_db_callback): New functions.
5851 (try_thread_db_load_1): Run integrity checks if requested.
5852 (maintenance_check_libthread_db): New function.
5853 (_initialize_thread_db): Register "maint check libthread-db"
5854 and "maint set/show check-libthread-db".
5855 * NEWS: Mention the above new commands.
5856
5857 2018-06-08 Tom Tromey <tom@tromey.com>
5858
5859 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5860 now a method.
5861
5862 2018-06-08 Tom Tromey <tom@tromey.com>
5863
5864 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5865
5866 2018-06-08 Tom Tromey <tom@tromey.com>
5867
5868 * common/btrace-common.h (struct btrace_data): Add constructor,
5869 destructor, move assignment operator.
5870 <empty, clear, fini>: New methods.
5871 <format>: Initialize.
5872 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5873 (btrace_data_empty): Don't declare.
5874 * common/btrace-common.c (btrace_data_init): Remove.
5875 (btrace_data::fini): Rename from btrace_data_fini.
5876 (btrace_data::empty): Rename from btrace_data_empty.
5877 (btrace_data::clear): Rename from btrace_data_clear. Return
5878 bool.
5879 * btrace.h (make_cleanup_btrace_data): Don't declare.
5880 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5881 (parse_xml_btrace): Update.
5882 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5883 (maint_btrace_clear_packet_history_cmd): Update.
5884
5885 2018-06-07 Pedro Alves <palves@redhat.com>
5886
5887 * target.h (target_ops) <beneath>: Now a method. All references
5888 updated.
5889 (class target_stack): New.
5890 * target.c (g_target_stack): New.
5891 (g_current_top_target): Delete.
5892 (current_top_target): Get the top target out of g_target_stack.
5893 (target_stack::push, target_stack::unpush): New.
5894 (push_target, unpush_target): Reimplement.
5895 (target_is_pushed): Reimplement in terms of g_target_stack.
5896 (target_ops::beneath, target_stack::find_beneath): New.
5897
5898 2018-06-07 Pedro Alves <palves@redhat.com>
5899
5900 * target.h (find_target_beneath): Delete declaration.
5901 * target.c (find_target_beneath): Delete definition.
5902 * aix-thread.c: All callers of find_target_beneath adjusted to
5903 call target_ops::beneath instead.
5904 * bsd-uthread.c: Likewise.
5905 * linux-thread-db.c: Likewise.
5906 * ravenscar-thread.c: Likewise.
5907 * sol-thread.c: Likewise.
5908 * spu-multiarch.c: Likewise.
5909
5910 2018-06-07 Pedro Alves <palves@redhat.com>
5911
5912 * target.h (target_ops) <beneath>: Now a method. All references
5913 updated.
5914 (target_ops) <m_beneath>: New.
5915 * target.c (target_ops::beneath): New.
5916 * corelow.c: Adjust all references to target_ops::beneath.
5917 * linux-thread-db.c: Likewise.
5918 * make-target-delegates: Likewise.
5919 * record-btrace.c: Likewise.
5920 * record-full.c: Likewise.
5921 * remote.c: Likewise.
5922 * target.c: Likewise.
5923 * target-delegates.c: Regenerate.
5924
5925 2018-06-07 Pedro Alves <palves@redhat.com>
5926
5927 * target.h (target_stack): Delete.
5928 (current_top_target): Declare function.
5929 * target.c (target_stack): Delete.
5930 (g_current_top_target): New.
5931 (current_top_target): New function.
5932 * auxv.c: Use current_top_target instead of target_stack
5933 throughout.
5934 * avr-tdep.c: Likewise.
5935 * breakpoint.c: Likewise.
5936 * corefile.c: Likewise.
5937 * elfread.c: Likewise.
5938 * eval.c: Likewise.
5939 * exceptions.c: Likewise.
5940 * frame.c: Likewise.
5941 * gdbarch-selftests.c: Likewise.
5942 * gnu-v3-abi.c: Likewise.
5943 * ia64-tdep.c: Likewise.
5944 * ia64-vms-tdep.c: Likewise.
5945 * infcall.c: Likewise.
5946 * infcmd.c: Likewise.
5947 * infrun.c: Likewise.
5948 * linespec.c: Likewise.
5949 * linux-tdep.c: Likewise.
5950 * minsyms.c: Likewise.
5951 * ppc-linux-nat.c: Likewise.
5952 * ppc-linux-tdep.c: Likewise.
5953 * procfs.c: Likewise.
5954 * regcache.c: Likewise.
5955 * remote.c: Likewise.
5956 * rs6000-tdep.c: Likewise.
5957 * s390-linux-nat.c: Likewise.
5958 * s390-tdep.c: Likewise.
5959 * solib-aix.c: Likewise.
5960 * solib-darwin.c: Likewise.
5961 * solib-dsbt.c: Likewise.
5962 * solib-spu.c: Likewise.
5963 * solib-svr4.c: Likewise.
5964 * solib-target.c: Likewise.
5965 * sparc-tdep.c: Likewise.
5966 * sparc64-tdep.c: Likewise.
5967 * spu-tdep.c: Likewise.
5968 * symfile.c: Likewise.
5969 * symtab.c: Likewise.
5970 * target-descriptions.c: Likewise.
5971 * target-memory.c: Likewise.
5972 * target.c: Likewise.
5973 * target.h: Likewise.
5974 * tracefile-tfile.c: Likewise.
5975 * tracepoint.c: Likewise.
5976 * valops.c: Likewise.
5977 * valprint.c: Likewise.
5978 * value.c: Likewise.
5979 * windows-tdep.c: Likewise.
5980 * mi/mi-main.c: Likewise.
5981
5982 2018-06-07 Tom Tromey <tom@tromey.com>
5983
5984 * valprint.h (build_address_symbolic): Declare.
5985 * printcmd.c (print_address_symbolic): Update.
5986 (build_address_symbolic): Change "name" and "filename" to
5987 std::string.
5988 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5989 Update.
5990 * defs.h (build_address_symbolic): Remove declaration.
5991
5992 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5993
5994 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5995 (aarch64_vnv_type): Add function.
5996 (aarch64_pseudo_register_name): Add V regs for SVE.
5997 (aarch64_pseudo_register_type): Likewise.
5998 (aarch64_pseudo_register_reggroup_p): Likewise.
5999 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6000 (aarch64_pseudo_read_value): Add V regs for SVE.
6001 (aarch64_pseudo_write_2): Use V0 offset for SVE
6002 (aarch64_pseudo_write): Add V regs for SVE.
6003 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6004
6005 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6006
6007 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6008 (sve_vl_from_vq): Likewise.
6009
6010 2018-06-05 Tom Tromey <tom@tromey.com>
6011
6012 * cli/cli-cmds.c (show_version): Update.
6013 * top.c (print_gdb_version): Add "interactive" parameter.
6014 Update.
6015 * main.c (captured_main_1): Update.
6016 * top.h (print_gdb_version): Add "interactive" parameter and a
6017 comment.
6018
6019 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6020
6021 * common/enum-flags.h: Add trailing semicolon to example in
6022 comment.
6023
6024 2018-06-05 Tom Tromey <tom@tromey.com>
6025
6026 PR cli/12326:
6027 * NEWS: Add entry about pager.
6028 * utils.c (pagination_disabled_for_command): New global.
6029 (prompt_for_continue): Allow "c" response to prompt.
6030 (reinitialize_more_filter): Clear
6031 pagination_disabled_for_command.
6032 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6033
6034 2018-06-04 Tom Tromey <tom@tromey.com>
6035
6036 * ada-lang.h (ada_lookup_symbol_list): Update.
6037 * ada-lang.c (resolve_subexp): Update.
6038 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6039 parameter.
6040 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6041 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6042 results parameter to std::vector.
6043 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6044 Update.
6045 * ada-exp.y (block_lookup): Update.
6046 (select_possible_type_sym): Change type of syms. Remove nsyms
6047 parameter.
6048 (write_var_or_type, write_name_assoc): Update.
6049
6050 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6051
6052 * windows-nat.c (windows_nat_target::xfer_partial): Return
6053 TARGET_XFER_E_IO if we need to delegate to the target beneath
6054 but BENEATH is NULL.
6055
6056 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * Makefile.in (config.status): Add configure.nat as a
6059 dependency.
6060
6061 2018-06-04 Tom Tromey <tom@tromey.com>
6062
6063 * cp-name-parser.y (cpname_state): Add method declarations.
6064 (HANDLE_QUAL): Update.
6065 (cpname_state::d_grab, cpname_state::fill_comp)
6066 (cpname_state::make_operator, cpname_state::make_dtor)
6067 (cpname_state::make_builtin_type, cpname_state::make_name)
6068 (cpname_state::d_qualify, cpname_state::d_int_type)
6069 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6070 (%union): Move earlier.
6071
6072 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6073
6074 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6075
6076 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6077
6078 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6079 (aarch64_pseudo_write_1): Likewise.
6080 (aarch64_pseudo_read_value): Use helper.
6081 (aarch64_pseudo_write): Likewise.
6082
6083 2018-06-04 Pedro Alves <palves@redhat.com>
6084
6085 * darwin-nat.c (darwin_ops): Delete.
6086 (darwin_attach_pid): Use get_native_target.
6087
6088 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6089
6090 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6091 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6092
6093 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6094
6095 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6096 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6097 (aarch64_gdbarch_init): Check for SVE.
6098 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6099
6100 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6101
6102 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6103 * aarch64-tdep.h (aarch64_read_description): Likewise.
6104 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6105 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6106 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6107 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6108 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6109
6110 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6111
6112 * value.c (value_fetch_lazy_bitfield): New.
6113 (value_fetch_lazy_memory): New.
6114 (value_fetch_lazy_register): New.
6115 (value_fetch_lazy): Factor out to smaller functions.
6116
6117 2018-06-01 Tom Tromey <tom@tromey.com>
6118
6119 * cp-name-parser.y (backslashable, represented): Now const.
6120
6121 2018-06-01 Tom Tromey <tom@tromey.com>
6122
6123 * cp-name-parser.y: Include parser-defs.h.
6124 (parser_fprintf): Remove declaration.
6125
6126 2018-06-01 Tom Tromey <tom@tromey.com>
6127
6128 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6129 %parse-param.
6130 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6131 (global_result): Remove globals.
6132 (struct cpname_state): New.
6133 (yyparse): Don't declare.
6134 (yylex, yyerror): Move declarations after %union.
6135 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6136 (make_name): Add state parameter.
6137 Update all callers.
6138 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6139 parameter.
6140 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6141 Update.
6142 (yylex): Add lvalp, state parameters.
6143 (yyerror): Add state parameter.
6144 (cp_demangled_name_to_comp): Update.
6145
6146 2018-06-01 Tom Tromey <tom@tromey.com>
6147
6148 * cp-name-parser.y (parser_fprintf): Declare.
6149 (GDB_YY_REMAP_PREFIX): Define.
6150 Include yy-remap.h. Don't redefine yy* identifiers.
6151
6152 2018-06-01 Tom Tromey <tom@tromey.com>
6153
6154 * python/py-type.c (typy_legacy_template_argument): Update.
6155 * cp-support.h (cp_demangled_name_to_comp): Update.
6156 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6157 parameter to be a "std::string *".
6158 (main): Update.
6159
6160 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6161
6162 * ada-lex.l: Include "diagnostics.h" instead of
6163 "common/diagnostics.h".
6164 * unittests/environ-selftests.c: Likewise.
6165 * common/diagnostics.h: Moved to ../include.
6166
6167 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6168
6169 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6170 to language_mode_manual while calling breakpoint_re_set_one.
6171
6172 2018-06-01 Tom Tromey <tom@tromey.com>
6173
6174 * valops.c (value_cast_structs, destructor_name_p): Update.
6175 * symtab.c (gdb_mangle_name): Update.
6176 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6177 Update.
6178 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6179 (pascal_object_print_value_fields, pascal_object_print_value):
6180 Update.
6181 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6182 * linespec.c (find_methods): Update.
6183 * gdbtypes.h (type_name_no_tag): Remove.
6184 (type_name_or_error): Rename from type_name_no_tag_or_error.
6185 * gdbtypes.c (type_name_no_tag): Remove.
6186 (type_name_or_error): Rename from type_name_no_tag_or_error.
6187 (lookup_struct_elt_type, check_typedef): Update.
6188 * expprint.c (print_subexp_standard): Update.
6189 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6190 * d-namespace.c (d_lookup_nested_symbol): Update.
6191 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6192 (cp_print_class_member): Update.
6193 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6194 * completer.c (add_struct_fields): Update.
6195 * c-typeprint.c (cp_type_print_derivation_info)
6196 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6197 Update.
6198 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6199 (ada_prefer_type, ada_is_exception_sym): Update.
6200
6201 2018-06-01 Tom Tromey <tom@tromey.com>
6202
6203 * valops.c (enum_constant_from_type, value_namespace_elt)
6204 (value_maybe_namespace_elt): Update.
6205 * valarith.c (find_size_for_pointer_math): Update.
6206 * target-descriptions.c (make_gdb_type): Update.
6207 * symmisc.c (print_symbol): Update.
6208 * stabsread.c (define_symbol, read_type)
6209 (complain_about_struct_wipeout, add_undefined_type)
6210 (cleanup_undefined_types_1): Update.
6211 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6212 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6213 (rust_internal_print_type, rust_composite_type)
6214 (rust_evaluate_funcall, rust_evaluate_subexp)
6215 (rust_inclusive_range_type_p): Update.
6216 * python/py-type.c (typy_get_tag): Update.
6217 * p-typeprint.c (pascal_type_print_base): Update.
6218 * mdebugread.c (parse_symbol, parse_type): Update.
6219 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6220 Update.
6221 * guile/scm-type.c (gdbscm_type_tag): Update.
6222 * go-lang.c (sixg_string_p): Update.
6223 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6224 Update.
6225 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6226 (TYPE_TAG_NAME): Remove.
6227 * gdbtypes.c (type_name_no_tag): Simplify.
6228 (check_typedef, check_types_equal, recursive_dump_type)
6229 (copy_type_recursive, arch_composite_type): Update.
6230 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6231 in summary mode when needed.
6232 * eval.c (evaluate_funcall): Update.
6233 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6234 (process_structure_scope, read_enumeration_type)
6235 (read_namespace_type, read_module_type, determine_prefix): Update.
6236 * cp-support.c (inspect_type): Update.
6237 * coffread.c (process_coff_symbol, decode_base_type): Update.
6238 * c-varobj.c (c_is_path_expr_parent): Update.
6239 * c-typeprint.c (c_type_print_base_struct_union): Update.
6240 (c_type_print_base_1): Update. Print struct/class/union/enum in
6241 summary when using C language.
6242 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6243 (gen_maybe_namespace_elt): Update.
6244 * ada-lang.c (ada_type_name): Simplify.
6245 (empty_record, ada_template_to_fixed_record_type_1)
6246 (template_to_static_fixed_type)
6247 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6248
6249 2018-06-01 Tom Tromey <tom@tromey.com>
6250
6251 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6252 c_print_type.
6253 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6254 (c_print_type): Update.
6255 (c_print_type): New overload.
6256 (c_type_print_varspec_prefix, c_type_print_args)
6257 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6258 (c_type_print_base_struct_union, c_type_print_base_1)
6259 (cp_type_print_method_args): Add "language" parameter.
6260 (c_type_print_base): Update.
6261 * c-lang.h (c_print_type): Add new overload.
6262
6263 2018-06-01 Tom Tromey <tom@tromey.com>
6264
6265 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6266 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6267
6268 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6269
6270 * aarch64-tdep.c (aarch64_sve_register_names): New const
6271 var.
6272 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6273 (AARCH64_SVE_Z_REGS_NUM): New define.
6274 (AARCH64_SVE_P_REGS_NUM): Likewise.
6275 (AARCH64_SVE_NUM_REGS): Likewise.
6276
6277 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6278
6279 * nat/linux-ptrace.h [__alpha__]
6280 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6281 definitions.
6282
6283 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6284
6285 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6286 the endianness selected.
6287 * NEWS: Document `set endian auto' mode operation update.
6288
6289 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6290
6291 * Makefile.in: Add new header.
6292 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6293 (sve_vl_from_vg): Likewise.
6294 (sve_vq_from_vl): Likewise.
6295 (sve_vl_from_vq): Likewise.
6296 (sve_vq_from_vg): Likewise.
6297 (sve_vg_from_vq): Likewise.
6298 * configure.nat: Add new c file.
6299 * nat/aarch64-sve-linux-ptrace.c: New file.
6300 * nat/aarch64-sve-linux-ptrace.h: New file.
6301
6302 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6303
6304 * aarch64-linux-nat.c (aarch64_linux_read_description):
6305 Add parmeter zero.
6306 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6307 Likewise.
6308 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6309 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6310 (aarch64_gdbarch_init): Add parmeter zero.
6311 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6312 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6313 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6314 parmeter.
6315 * doc/gdb.texinfo: Describe SVE feature
6316 * features/aarch64-sve.c: New file.
6317
6318 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6319
6320 PR gdb/23210
6321 * gdbarch.sh (significant_addr_bit): Default to zero when
6322 not set by target architecture.
6323 * gdbarch.c: Re-generated.
6324 * utils.c (address_significant): Update.
6325
6326 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6327
6328 * stack.c (func_command): Remove trailing newline in call to error.
6329
6330 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6331
6332 * regcache.h (regcache_raw_collect): Remove, update callers to
6333 use regcache::raw_collect.
6334 * regcache.c (regcache_raw_collect): Remove.
6335
6336 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * regcache.h (regcache_raw_supply): Remove, update callers to
6339 use detached_regcache::raw_supply.
6340 * regcache.c (regcache_raw_supply): Remove.
6341
6342 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6343
6344 * regcache.h (regcache_cooked_write_part): Remove, update
6345 callers to use regcache::cooked_write_part.
6346 * regcache.c (regcache_cooked_write_part): Remove.
6347
6348 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6349
6350 * regcache.h (regcache_cooked_read_part): Remove, update callers
6351 to use readable_regcache::cooked_read_part.
6352 * regcache.c (regcache_cooked_read_part): Remove.
6353
6354 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6355
6356 * regcache.h (regcache_cooked_read_value): Remove, update
6357 callers to use readable_regcache::cooked_read_value.
6358 * regcache.c (regcache_cooked_read_value): Remove.
6359
6360 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * regcache.h (regcache_cooked_write): Remove, update callers to
6363 use regcache::cooked_write.
6364 * regcache.c (regcache_cooked_write): Remove.
6365
6366 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6367
6368 * regcache.h (regcache_invalidate): Remove, update callers to
6369 use detached_regcache::invalidate instead.
6370 * regcache.c (regcache_invalidate): Remove.
6371
6372 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6373
6374 * regcache.h (regcache_raw_write_part): Remove, update callers
6375 to use regcache::raw_write_part instead.
6376 * regcache.c (regcache_raw_write_part): Remove.
6377
6378 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6379
6380 * regcache.h (regcache_raw_read_part): Remove, update callers to
6381 use readable_regcache::raw_read_part instead.
6382 * regcache.c (regcache_raw_read_part): Remove.
6383
6384 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * regcache.h (regcache_cooked_read): Remove, update callers to
6387 use readable_regcache::cooked_read instead.
6388 * regcache.c (regcache_cooked_read): Remove.
6389
6390 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6391
6392 * regcache.h (regcache_raw_write): Remove, update callers to use
6393 regcache::raw_write instead.
6394 * regcache.c (regcache_raw_write): Remove.
6395
6396 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6397
6398 * regcache.h (regcache_raw_read): Remove, update callers to use
6399 readable_regcache::raw_read instead.
6400 * regcache.c (regcache_raw_read): Remove.
6401
6402 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6403
6404 * regcache.h (regcache_raw_update): Remove, update callers to
6405 use readable_regcache::raw_update instead.
6406 * regcache.c (regcache_raw_update): Remove.
6407
6408 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6409
6410 * regcache.h (regcache_register_status): Remove, update callers
6411 to use reg_buffer::get_register_status directly instead.
6412 * regcache.c (regcache_register_status): Remove.
6413
6414 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6415
6416 * regcache.h (regcache_get_ptid): Remove, update all callers to
6417 call regcache::ptid instead.
6418 * regcache.c (regcache_get_ptid): Remove.
6419
6420 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6421
6422 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6423
6424 2018-05-30 Pedro Alves <palves@redhat.com>
6425
6426 * common/common-exceptions.h (exception_rethrow): Use
6427 ATTRIBUTE_NORETURN.
6428
6429 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6430
6431 * breakpoint.c (print_solib_event, check_status_catch_solib):
6432 Remove struct keyword in range-based for loops.
6433 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6434 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6435 Likewise.
6436 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6437 Likewise.
6438 * symfile.c (addr_info_make_relative): Likewise.
6439 * thread.c (value_in_thread_stack_temporaries): Likewise.
6440
6441 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6442
6443 PR gdb/16841
6444 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6445 aggregate type to get its real type before accessing it.
6446
6447 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6448
6449 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6450 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6451 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6452 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6453 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6454 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6455 * printcmd.c (info_address_command): Likewise.
6456
6457 2018-05-29 Tom Tromey <tom@tromey.com>
6458
6459 * windows-nat.c (handle_exception): Update fall-through comment.
6460
6461 2018-05-29 Tom Tromey <tom@tromey.com>
6462
6463 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6464 (struct program_space) <added_solibs>: Now a std::vector.
6465 * breakpoint.c (print_solib_event): Update.
6466 (check_status_catch_solib): Update.
6467 * progspace.c (clear_program_space_solib_cache): Update.
6468 * solib.c (update_solib_list): Update.
6469
6470 2018-05-29 Tom Tromey <tom@tromey.com>
6471
6472 * python/py-type.c (typy_richcompare): Update.
6473 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6474 * gdbtypes.h (types_deeply_equal): Return bool.
6475 (types_equal): Likewise.
6476 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6477 declare VEC.
6478 (check_types_equal): Change worklist to std::vector. Return
6479 bool.
6480 (struct type_equality_entry): Add constructor.
6481 (compare_maybe_null_strings): Return bool.
6482 (check_types_worklist): Return bool. Change worklist to
6483 std::vector.
6484 (types_deeply_equal): Use std::vector.
6485 (types_equal): Return bool.
6486 (compare_maybe_null_strings): Simplify.
6487
6488 2018-05-29 Tom Tromey <tom@tromey.com>
6489
6490 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6491
6492 2018-05-29 Tom Tromey <tom@tromey.com>
6493
6494 * objc-lang.h: Don't include cp-support.h.
6495 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6496 declare VEC.
6497
6498 2018-05-27 Tom Tromey <tom@tromey.com>
6499
6500 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6501
6502 2018-05-25 Tom Tromey <tom@tromey.com>
6503
6504 * value.c (value::location): Initialize.
6505
6506 2018-05-25 Tom Tromey <tom@tromey.com>
6507
6508 * dbxread.c (init_bincl_list): Remove.
6509 (bincl_list): Now a std::vector.
6510 (bincls_allocated, next_bincl): Remove.
6511 (free_bincl_list, do_free_bincl_list_cleanup)
6512 (make_cleanup_free_bincl_list): Remove.
6513 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6514 unique_xmalloc_ptr.
6515 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6516 (struct header_file_location): Add constructor.
6517 (add_bincl_to_list): Remove.
6518
6519 2018-05-25 Tom Tromey <tom@tromey.com>
6520
6521 * tui/tui.c (tui_enable): Update.
6522 * mi/mi-interp.c (mi_interp::init): Update.
6523 * interps.h (class interp) <name>: New method.
6524 <m_name>: Rename from name.
6525 (~scoped_restore_interp): Update.
6526 * interps.c (interp::interp): Update.
6527 (interp_add, interp_set, interp_lookup_existing)
6528 (current_interp_named_p): Update.
6529
6530 2018-05-25 Tom Tromey <tom@tromey.com>
6531
6532 * interps.c (interp_name): Remove.
6533 * mi/mi-interp.c (mi_interp::init): Update.
6534 * interps.h (interp_name): Remove.
6535 (~scoped_restore_interp): Update.
6536 * tui/tui.c (tui_enable): Update.
6537
6538 2018-05-25 Tom Tromey <tom@tromey.com>
6539
6540 * utils.c (fputs_maybe_filtered): Update.
6541 * linespec.c (decode_line_full): Update.
6542 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6543 (mi_print_breakpoint_for_event, mi_solib_loaded)
6544 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6545 (mi_user_selected_context_changed): Update.
6546 * mi/mi-main.c (mi_execute_command): Update.
6547 * cli/cli-script.c (execute_control_command): Update.
6548 * python/python.c (execute_gdb_command): Update.
6549 * solib.c (info_sharedlibrary_command): Update.
6550 * interps.c (interp_ui_out): Remove.
6551 * interps.h (interp_ui_out): Remove.
6552
6553 2018-05-25 Tom Tromey <tom@tromey.com>
6554
6555 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6556 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6557 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6558
6559 2018-05-25 Tom Tromey <tom@tromey.com>
6560
6561 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6562 * interps.c (interp_exec): Use scoped_restore.
6563
6564 2018-05-25 Tom Tromey <tom@tromey.com>
6565
6566 * remote.c (remote_target::remote_file_get): Use
6567 gdb::byte_vector.
6568 (remote_target::remote_file_put): Likewise.
6569
6570 2018-05-25 Tom Tromey <tom@tromey.com>
6571
6572 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6573 a std::string.
6574 (get_pe_section_index, add_pe_exported_sym): Update.
6575 (read_pe_exported_syms): Use gdb::def_vector.
6576
6577 2018-05-25 Tom Tromey <tom@tromey.com>
6578
6579 * frame.c (remove_prev_frame): Remove.
6580 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6581
6582 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6583
6584 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6585 Remove prototypes.
6586 * mips-linux-nat.c (supply_fpregset): Always call
6587 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6588 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6589 `mips_fill_fpregset'.
6590 * mips-linux-tdep.c (mips_supply_fpregset)
6591 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6592 (mips_fill_fpregset_wrapper): Remove functions.
6593 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6594 (mips_linux_fpregset): Remove variable.
6595 (mips_linux_iterate_over_regset_sections): Use
6596 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6597 (mips_linux_o32_sigframe_init): Remove comment.
6598
6599 2018-05-25 Pedro Alves <palves@redhat.com>
6600
6601 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6602 (struct readahead_cache, struct packet_reg, struct
6603 remote_arch_state, class remote_state): Move higher up in the
6604 file.
6605 (remote_target::m_remote_state): Now an object instead of a pointer.
6606 (remote_target::get_remote_state): Adjust.
6607
6608 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6609
6610 * stack.c (select_and_print_frame): Delete.
6611 (struct function_bounds): Move struct within function.
6612 (func_command): Most content moved into new function
6613 find_frame_for_function, use new function, print result, add
6614 function comment.
6615 (find_frame_for_function): New function, now returns a result.
6616
6617 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6618
6619 * stack.c (iterate_over_block_arg_vars): Fix comment.
6620 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6621
6622 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6623
6624 PR gdb/23203
6625 * frame.c
6626 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6627 Define.
6628 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6629 Define.
6630 * frame.h (class scoped_restore_selected_frame): New class.
6631 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6632 of any exception, use scoped_restore_selected_frame to restore the
6633 frame instead.
6634
6635 2018-05-24 Pedro Alves <palves@redhat.com>
6636
6637 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6638 override.
6639
6640 2018-05-23 Tom Tromey <tom@tromey.com>
6641
6642 * complaints.c (struct complaints): Remove.
6643 (symfile_complaint_book): Remove.
6644 (series): New global.
6645 (complaint_internal): Update.
6646 (clear_complaints): Update.
6647
6648 2018-05-23 Tom Tromey <tom@tromey.com>
6649
6650 * complaints.c (counters): New global.
6651 (struct complain): Remove.
6652 (struct complaints) <root>: Remove.
6653 (complaint_sentinel): Remove.
6654 (symfile_complaint_book): Update.
6655 (find_complaint) Remove.
6656 (complaint_internal, clear_complaints): Update.
6657
6658 2018-05-23 Tom Tromey <tom@tromey.com>
6659
6660 * complaints.c (struct complain) <file, line>: Remove.
6661 (find_complaint): Remove file, line parameters.
6662 (complaint_internal): Update.
6663
6664 2018-05-23 Tom Tromey <tom@tromey.com>
6665
6666 * complaints.c (vcomplaint): Remove.
6667 (complaint_internal) Merge in contents of vcomplaint.
6668
6669 2018-05-23 Tom Tromey <tom@tromey.com>
6670
6671 * complaints.c (struct complaints) <explanation>: Remove.
6672 (symfile_explanations): Remove.
6673 (symfile_complaint_book): Update.
6674 (vcomplaint): Update.
6675 (struct explanation): Remove.
6676
6677 2018-05-23 Tom Tromey <tom@tromey.com>
6678
6679 * complaints.c (symfile_complaints): Remove.
6680 (complaint_internal): Remove "complaints" parameter.
6681 (clear_complaints, vcomplaint): Remove "c" parameter.
6682 (get_complaints): Remove.
6683 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6684 (dwarf2_debug_line_missing_file_complaint)
6685 (dwarf2_debug_line_missing_end_sequence_complaint)
6686 (dwarf2_complex_location_expr_complaint)
6687 (dwarf2_const_value_length_mismatch_complaint)
6688 (dwarf2_section_buffer_overflow_complaint)
6689 (dwarf2_macro_malformed_definition_complaint)
6690 (dwarf2_invalid_attrib_class_complaint)
6691 (create_addrmap_from_index, dw2_symtab_iter_next)
6692 (dw2_expand_marked_cus)
6693 (dw2_debug_names_iterator::find_vec_in_debug_names)
6694 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6695 (create_debug_type_hash_table, init_cutu_and_read_dies)
6696 (partial_die_parent_scope, add_partial_enumeration)
6697 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6698 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6699 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6700 (create_cus_hash_table, create_dwp_hash_table)
6701 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6702 (dwarf2_rnglists_process, dwarf2_ranges_process)
6703 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6704 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6705 (handle_struct_member_die, process_structure_scope)
6706 (read_array_type, read_common_block, read_module_type)
6707 (read_tag_pointer_type, read_typedef, read_base_type)
6708 (read_subrange_type, load_partial_dies, partial_die_info::read)
6709 (partial_die_info::read, partial_die_info::read)
6710 (partial_die_info::read, read_checked_initial_length_and_offset)
6711 (dwarf2_string_attr, read_formatted_entries)
6712 (dwarf_decode_line_header)
6713 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6714 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6715 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6716 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6717 (get_signatured_type, get_DW_AT_signature_type)
6718 (decode_locdesc, file_file_name, consume_improper_spaces)
6719 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6720 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6721 (dwarf2_symbol_mark_computed, set_die_type)
6722 (read_attribute_value): Update.
6723 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6724 Update.
6725 * dbxread.c (unknown_symtype_complaint)
6726 (lbrac_mismatch_complaint, repeated_header_complaint)
6727 (set_namestring, function_outside_compilation_unit_complaint)
6728 (read_dbx_symtab, process_one_symbol): Update.
6729 * gdbtypes.c (stub_noname_complaint): Update.
6730 * windows-nat.c (handle_unload_dll): Update.
6731 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6732 (decode_base_type): Update.
6733 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6734 (eb_complaint, record_include_begin, record_include_end)
6735 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6736 (process_xcoff_symbol, read_symbol)
6737 (function_outside_compilation_unit_complaint)
6738 (scan_xcoff_symtab): Update.
6739 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6740 * buildsym.c (finish_block_internal, make_blockvector)
6741 (end_symtab_get_static_block, augment_type_symtab): Update.
6742 * dtrace-probe.c (dtrace_process_dof)
6743 (dtrace_static_probe_ops::get_probes): Update.
6744 * complaints.h (struct complaint): Don't declare.
6745 (symfile_complaints): Remove.
6746 (complaint_internal): Remove "complaints" parameter.
6747 (complaint): Likewise.
6748 (clear_complaints): Likewise.
6749 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6750 (reread_symbols): Update.
6751 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6752 (dwarf2_frame_cache, decode_frame_entry): Update.
6753 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6754 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6755 (info_selectors_command): Update.
6756 * macrotab.c (macro_include, check_for_redefinition)
6757 (macro_undef): Update.
6758 * objfiles.c (filter_overlapping_sections): Update.
6759 * stabsread.c (invalid_cpp_abbrev_complaint)
6760 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6761 (define_symbol, error_type, read_type, rs6000_builtin_type)
6762 (stabs_method_name_from_physname, read_member_functions)
6763 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6764 (attach_fields_to_type, complain_about_struct_wipeout)
6765 (read_range_type, read_args, common_block_start)
6766 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6767 Update.
6768 * mdebugread.c (index_complaint, unknown_ext_complaint)
6769 (basic_type_complaint, bad_tag_guess_complaint)
6770 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6771 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6772 (parse_procedure, parse_lines)
6773 (function_outside_compilation_unit_complaint)
6774 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6775 (bad_tag_guess_complaint, reg_value_complaint): Update.
6776 * cp-support.c (demangled_name_complaint): Update.
6777 * macroscope.c (sal_macro_scope): Update.
6778 * dwarf-index-write.c (class debug_names): Update.
6779
6780 2018-05-23 Tom Tromey <tom@tromey.com>
6781
6782 * complaints.c (clear_complaints): Remove "noisy" parameter.
6783 * complaints.h (clear_complaints): Update.
6784 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6785 (reread_symbols): Update.
6786
6787 2018-05-23 Tom Tromey <tom@tromey.com>
6788
6789 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6790 SUBSEQUENT_MESSAGE.
6791 (vcomplaint, clear_complaints): Update.
6792 (symfile_explanations): Remove some messages.
6793
6794 2018-05-23 Tom Tromey <tom@tromey.com>
6795
6796 * complaints.c (internal_complaint): Remove.
6797 * complaints.h (internal_complaint): Remove.
6798
6799 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6800
6801 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6802
6803 2018-05-22 Pedro Alves <palves@redhat.com>
6804
6805 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6806 (remote_fileio_badfd, remote_fileio_return_errno)
6807 (remote_fileio_return_success, remote_fileio_func_open)
6808 (remote_fileio_func_open, remote_fileio_func_close)
6809 (remote_fileio_func_read, remote_fileio_func_write)
6810 (remote_fileio_func_lseek, remote_fileio_func_rename)
6811 (remote_fileio_func_unlink, remote_fileio_func_stat)
6812 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6813 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6814 remote_target parameter.
6815 (remote_fio_func_map) <func>: Add remote_target parameter.
6816 (do_remote_fileio_request, remote_fileio_request):
6817 * remote-fileio.h (remote_fileio_request):
6818 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6819 remote_target parameter.
6820 (remote_notif_process, handle_notification): Adjust to pass down
6821 the remote.
6822 (remote_notif_state_allocate): Add remote_target parameter. Save
6823 it.
6824 * remote-notif.h (struct remote_target): Forward declare.
6825 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6826 remote_target parameter.
6827 (struct remote_notif_state) <remote>: New field.
6828 (remote_notif_ack, remote_notif_parse): Add remote_target
6829 parameter.
6830 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6831 remote_target parameter.
6832 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6833 (threads_listing_context, rmt_thread_action, protocol_feature)
6834 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6835 (packet_result, struct threads_listing_context, remote_state):
6836 Move definitions and declarations higher up.
6837 (remote_target) <~remote_target>: Declare.
6838 (remote_download_command_source, remote_file_put, remote_file_get)
6839 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6840 (remote_hostio_pread_vFile, remote_hostio_send_command)
6841 (remote_hostio_set_filesystem, remote_hostio_open)
6842 (remote_hostio_close, remote_hostio_unlink, remote_state)
6843 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6844 (get_memory_write_packet_size, get_memory_read_packet_size)
6845 (append_pending_thread_resumptions, remote_detach_1)
6846 (append_resumption, remote_resume_with_vcont)
6847 (add_current_inferior_and_thread, wait_ns, wait_as)
6848 (process_stop_reply, remote_notice_new_inferior)
6849 (process_initial_stop_replies, remote_add_thread)
6850 (btrace_sync_conf, remote_btrace_maybe_reopen)
6851 (remove_new_fork_children, kill_new_fork_children)
6852 (discard_pending_stop_replies, stop_reply_queue_length)
6853 (check_pending_events_prevent_wildcard_vcont)
6854 (discard_pending_stop_replies_in_queue, stop_reply)
6855 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6856 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6857 (remote_interrupt_as, remote_interrupt_ns)
6858 (remote_get_noisy_reply, remote_query_attached)
6859 (remote_add_inferior, remote_current_thread, get_current_thread)
6860 (set_thread, set_general_thread, set_continue_thread)
6861 (set_general_process, write_ptid)
6862 (remote_unpack_thread_info_response, remote_get_threadinfo)
6863 (parse_threadlist_response, remote_get_threadlist)
6864 (remote_threadlist_iterator, remote_get_threads_with_ql)
6865 (remote_get_threads_with_qxfer)
6866 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6867 (get_offsets, remote_check_symbols, remote_supported_packet)
6868 (remote_query_supported, remote_packet_size)
6869 (remote_serial_quit_handler, remote_detach_pid)
6870 (remote_vcont_probe, remote_resume_with_hc)
6871 (send_interrupt_sequence, interrupt_query)
6872 (remote_notif_get_pending_events, fetch_register_using_p)
6873 (send_g_packet, process_g_packet, fetch_registers_using_g)
6874 (store_register_using_P, store_registers_using_G)
6875 (set_remote_traceframe, check_binary_download)
6876 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6877 (remote_xfer_live_readonly_partial, remote_read_bytes)
6878 (remote_send_printf, remote_flash_write, readchar)
6879 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6880 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6881 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6882 (extended_remote_disable_randomization, extended_remote_run)
6883 (send_environment_packet, extended_remote_environment_support)
6884 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6885 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6886 (packet_command): Now methods of ...
6887 (remote_target): ... this class.
6888 (m_remote_state) <remote_target>: New field.
6889 (struct remote_state) <stop_reply_queue,
6890 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6891 fields.
6892 (remote_state::remote_state): Allocate stop_reply_queue.
6893 (remote_state): Delete global.
6894 (get_remote_state_raw): Delete.
6895 (remote_target::get_remote_state): Allocate m_remote_state on
6896 demand.
6897 (get_current_remote_target): New.
6898 (remote_ops, extended_remote_ops): Delete.
6899 (wait_forever_enabled_p, remote_async_inferior_event_token):
6900 Delete, moved to struct remote_state.
6901 (remote_target::close): Delete self. Destruction bits split to
6902 ...
6903 (remote_target::~remote_target): ... this.
6904 (show_memory_packet_size): Adjust to use
6905 get_current_remote_target.
6906 (struct protocol_feature) <func>: Add remote_target parameter.
6907 All callers adjusted.
6908 (curr_quit_handler_target): New.
6909 (remote_serial_quit_handler): Reimplement.
6910 (remote_target::open_1): Adjust to use get_current_remote_target.
6911 Heap-allocate remote_target/extended_remote_target instances.
6912 (vcont_builder::vcont_builder): Add remote_target parameter, and
6913 save it in m_remote. All callers adjusted.
6914 (vcont_builder::m_remote): New field.
6915 (vcont_builder::restart, vcont_builder::flush)
6916 (vcont_builder::push_action): Use it.
6917 (remote_target::commit_resume): Use it.
6918 (struct queue_iter_param) <remote>: New field.
6919 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6920 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6921 (check_pending_event_prevents_wildcard_vcont_callback)
6922 (remote_target::check_pending_events_prevent_wildcard_vcont)
6923 (remote_target::discard_pending_stop_replies)
6924 (remote_target::discard_pending_stop_replies_in_queue)
6925 (remote_target::remote_notif_remove_queued_reply): Fill in
6926 'remote' field.
6927 (remote_notif_get_pending_events): New.
6928 (remote_target::readchar, remote_target::remote_serial_write):
6929 Save/restore curr_quit_handler_target.
6930 (putpkt): New.
6931 (kill_new_fork_children): Fill in 'remote' field.
6932 (packet_command): Use get_current_remote_target, defer to
6933 remote_target method of same name.
6934 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6935 parameter, and save it in m_remote. All callers adjusted.
6936 (scoped_remote_fd::release): Use m_remote.
6937 (scoped_remote_fd::m_remote): New field.
6938 (remote_file_put, remote_file_get, remote_file_delete): Use
6939 get_current_remote_target, defer to remote_target method of same
6940 name.
6941 (remote_btrace_reset): Add remote_state paremeter. Update all
6942 callers.
6943 (remote_async_inferior_event_handler). Pass down 'data'.
6944 (remote_new_objfile): Use get_current_remote_target.
6945 (remote_target::vcont_r_supported): New.
6946 (set_range_stepping): Use get_current_remote_target and
6947 remote_target::vcont_r_supported.
6948 (_initialize_remote): Don't allocate 'remote_state' and
6949 'stop_reply_queue' globals.
6950 * remote.h (struct remote_target): Forward declare.
6951 (getpkt, putpkt, remote_notif_get_pending_events): Add
6952 'remote_target' parameter.
6953
6954 2018-05-22 Pedro Alves <palves@redhat.com>
6955
6956 * remote.c (vcont_builder): Now a class. Make all data members
6957 private.
6958 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6959 Declare methods.
6960 (vcont_builder_restart): Rename to ...
6961 (vcont_builder::restart): ... this.
6962 (vcont_builder_flush): Rename to ...
6963 (vcont_builder::flush): ... this.
6964 (vcont_builder_push_action): Rename to ...
6965 (vcont_builder::push_action): ... this.
6966 (remote_target::commit_resume): Adjust.
6967
6968 2018-05-22 Pedro Alves <palves@redhat.com>
6969
6970 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6971 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6972 (get_fixed_memory_packet_size): New.
6973 (get_memory_packet_size): Use it.
6974 (set_memory_packet_size): Don't override the config size with
6975 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6976 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6977 Don't refer to get_memory_packet_size if not connected to a remote
6978 target. Show "(default)" if configured size is 0.
6979
6980 2018-05-22 Pedro Alves <palves@redhat.com>
6981
6982 * remote.c (remote_target::mourn_inferior): Move
6983 discard_pending_stop_replies call here from ...
6984 (_initialize_remote): ... here.
6985
6986 2018-05-22 Pedro Alves <palves@redhat.com>
6987
6988 * remote.c (compare_section_command): Remove set_general_process
6989 call.
6990
6991 2018-05-22 Pedro Alves <palves@redhat.com>
6992
6993 * remote.c (struct packet_reg, struct remote_arch_state):
6994 Move higher up in the file.
6995 (remote_state) <m_arch_states>: Store remote_arch_state values
6996 instead of remote_arch_state pointers.
6997 (remote_state::get_remote_arch_state): Adjust.
6998
6999 2018-05-22 Pedro Alves <palves@redhat.com>
7000
7001 * remote.c: Include <unordered_map>.
7002 (remote_state): Now a class.
7003 (remote_state) <get_remote_arch_state>: Declare method.
7004 <get_remote_arch_state>: New field.
7005 (remote_arch_state) <remote_arch_state>: Declare ctor.
7006 <regs>: Now a unique_ptr.
7007 (remote_gdbarch_data_handle): Delete.
7008 (get_remote_arch_state): Delete.
7009 (remote_state::get_remote_arch_state): New.
7010 (get_remote_state): Adjust to call remote_state's
7011 get_remote_arch_state method.
7012 (init_remote_state): Delete, bits factored out to ...
7013 (remote_arch_state::remote_arch_state): ... this new method.
7014 (get_remote_packet_size, get_memory_packet_size)
7015 (process_g_packet, remote_target::fetch_registers)
7016 (remote_target::prepare_to_store, store_registers_using_G)
7017 (remote_target::store_registers, remote_target::get_trace_status):
7018 Adjust to call remote_state's method.
7019 (_initialize_remote): Remove reference to
7020 remote_gdbarch_data_handle.
7021
7022 2018-05-22 Pedro Alves <palves@redhat.com>
7023
7024 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7025 pread>: New method declarations.
7026 (remote_target::open_1): Adjust.
7027 (readahead_cache_invalidate): Rename to ...
7028 (readahead_cache::invalidate): ... this, and adjust to be a class
7029 method.
7030 (readahead_cache_invalidate_fd): Rename to ...
7031 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7032 class method.
7033 (remote_hostio_pwrite): Adjust.
7034 (remote_hostio_pread_from_cache): Rename to ...
7035 (readahead_cache::pread): ... this, and adjust to be a class
7036 method.
7037 (remote_hostio_close): Adjust.
7038
7039 2018-05-22 Pedro Alves <palves@redhat.com>
7040
7041 * remote.c (remote_hostio_close_cleanup): Delete.
7042 (class scoped_remote_fd): New.
7043 (remote_file_put, remote_file_get): Use it.
7044
7045 2018-05-22 Pedro Alves <palves@redhat.com>
7046
7047 (struct vCont_action_support): Use bool and initialize all fields.
7048 (struct readahead_cache): Initialize all fields.
7049 (remote_state): Use bool and initialize all fields.
7050 (remote_state::remote_state, remote_state::~remote_state): New.
7051 (new_remote_state): Delete.
7052 (_initialize_remote): Use new to allocate remote_state.
7053
7054 2018-05-22 Pedro Alves <palves@redhat.com>
7055 張俊芝 <zjz@zjz.name>
7056
7057 PR gdb/22973
7058 * c-exp.y: Include "c-support.h".
7059 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7060 of tolower. Use c_ident_is_alpha to scan names.
7061 * c-lang.c: Include "c-support.h".
7062 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7063 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7064 * c-support.h: New file, with bits factored out from ...
7065 * cp-name-parser.y: ... this file.
7066 Include "c-support.h".
7067 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7068 c-support.h and renamed.
7069 (symbol_end, yylex): Adjust.
7070
7071 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7072
7073 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7074 parameter type to CORE_ADDR.
7075 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7076 parameter type in declaration to CORE_ADDR.
7077 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7078 target_auxv_search to get AT_HWCAP and use the result to get the
7079 target description.
7080 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7081 to CORE_ADDR. Remove the cast of the return value to unsigned
7082 long. Fix error predicate of target_auxv_search.
7083 (ppc_linux_nat_target::read_description): Change the type of the
7084 hwcap variable to CORE_ADDR.
7085
7086 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7087
7088 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7089 if the size of fpscr is larger than 32 bits.
7090
7091 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7092
7093 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7094 (ppc32_linux_vsxregmap): New global.
7095 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7096 regcache_supply_regset, and regcache_collect_regset.
7097 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7098 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7099 (fetch_vsx_register, store_vsx_register): Remove.
7100 (fetch_vsx_registers): Add regno parameter. Get regset using
7101 ppc_linux_vsxregset. Use regset to supply registers.
7102 (store_vsx_registers): Add regno parameter. Get regset using
7103 ppc_linux_vsxregset. Use regset to collect registers.
7104 (fetch_register): Call fetch_vsx_registers instead of
7105 fetch_vsx_register.
7106 (store_register): Call store_vsx_registers instead of
7107 store_vsx_register.
7108 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7109 new regno parameter.
7110 (store_ppc_registers): Call store_vsx_registers with -1 for the
7111 new regno parameter.
7112 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7113 (ppc_collect_vsxregset): Remove.
7114
7115 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7116
7117 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7118 offset fields.
7119 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7120 for vector register offset fields.
7121 (ppc64_fbsd_reg_offsets): Likewise.
7122 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7123 to vector register offset fields.
7124 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7125 to vector register offset fields.
7126 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7127 vector register offset fields.
7128 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7129 initializers for vector register offset fields.
7130 (rs6000_aix64_reg_offsets): Likewise.
7131 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7132 (ppc_supply_vrregset): Remove.
7133 (ppc_collect_vrregset): Remove.
7134 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7135 (ppc_linux_vrregset) : New function.
7136 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7137 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7138 (ppc32_linux_vrregset): Remove.
7139 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7140 and use result instead of ppc32_linux_vrregset.
7141 (ppc32_linux_reg_offsets): Remove initializers for vector register
7142 offset fields.
7143 (ppc64_linux_reg_offsets): Likewise.
7144 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7145 * ppc-linux-nat.c: Include regset.h.
7146 (gdb_vrregset_t): Adjust comment to account for little-endian
7147 mode.
7148 (supply_vrregset, fill_vrregset): Remove.
7149 (fetch_altivec_register, store_altivec_register): Remove.
7150 (fetch_altivec_registers): Add regno parameter. Get regset using
7151 ppc_linux_vrregset. Use regset to supply registers.
7152 (store_altivec_registers): Add regno parameter. Get regset using
7153 ppc_linux_vrregset. Use regset to collect registers.
7154 (fetch_register): Call fetch_altivec_registers instead of
7155 fetch_altivec_register.
7156 (store_register): Call store_altivec_registers instead of
7157 store_altivec_register.
7158 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7159 the new regno parameter.
7160 (store_ppc_registers): Call store_altivec_registers with -1 for
7161 the new regno parameter.
7162
7163 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7164
7165 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7166 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7167 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7168 (gdb_vrregset_t): Change array type size to
7169 PPC_LINUX_SIZEOF_VRREGSET.
7170 (gdb_vsxregset_t): Change array type size to
7171 PPC_LINUX_SIZEOF_VSXREGSET.
7172 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7173 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7174 PPC_LINUX_SIZEOF_VSXREGSET.
7175
7176 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7177
7178 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7179 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7180 nat/ppc-linux.c.
7181 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7182 ppc_linux_target_wordsize with tid.
7183 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7184 wordsize with tid.
7185 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7186 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7187 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7188 tid parameter. Remove static specifier.
7189 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7190 (ppc_linux_target_wordsize): New declaration.
7191
7192 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7193
7194 * arch/ppc-linux-common.c: New file.
7195 * arch/ppc-linux-common.h: New file.
7196 * arch/ppc-linux-tdesc.h: New file.
7197 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7198 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7199 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7200 arch/ppc-linux-tdesc.h.
7201 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7202 arch/ppc-linux-tdesc.h.
7203 (ppc_linux_nat_target::read_description): Remove target
7204 description matching code. Fill a ppc_linux_features struct and
7205 call ppc_linux_match_description with it. Move comment about ISA
7206 2.05 to ppc-linux-common.c.
7207 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7208 arch/ppc-linux-tdesc.h.
7209 (ppc_linux_core_read_description): Remove target description
7210 matching code. Fill a ppc_linux_features struct and call
7211 ppc_linux_match_description with it.
7212 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7213 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7214 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7215 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7216 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7217 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7218 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7219 (tdesc_powerpc_e500l): Remove.
7220
7221 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7222
7223 * ada-lang.c (catch_assert_command): Pass empty string instead
7224 of NULL for excep_string argument.
7225
7226 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7227
7228 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7229 the width of the requested register exceeds the width of the
7230 `ptrace' data type.
7231
7232 2018-05-21 Tom Tromey <tom@tromey.com>
7233
7234 * printcmd.c (output_command): Remove.
7235 (output_command_const): Rename to output_command.
7236 * valprint.h (output_command): Rename from output_command_const.
7237 * tracepoint.c (trace_dump_actions): Call output_command.
7238
7239 2018-05-21 Tom Tromey <tom@tromey.com>
7240
7241 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7242 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7243 * ada-lang.h (create_ada_exception_catchpoint): Update.
7244 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7245 std::string.
7246 (create_excep_cond_exprs, ~ada_catchpoint)
7247 (should_stop_exception, print_one_exception)
7248 (print_mention_exception, print_recreate_exception): Update.
7249 (ada_get_next_arg): Remove.
7250 (catch_ada_exception_command_split): Use std::string. Change type
7251 of "excep_string", "cond_string".
7252 (catch_ada_exception_command): Update.
7253 (create_ada_exception_catchpoint): Change type of excep_string.
7254 (ada_exception_sal): Remove excep_string parameter.
7255 (~ada_catchpoint): Remove.
7256
7257 2018-05-21 Tom Tromey <tom@tromey.com>
7258
7259 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7260 cleanup.
7261
7262 2018-05-21 Tom Tromey <tom@tromey.com>
7263
7264 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7265 Return unique_xmalloc_ptr.
7266 (print_it_exception): Update.
7267
7268 2018-05-21 Tom Tromey <tom@tromey.com>
7269
7270 * tracepoint.c (trace_dump_actions): Use std::string.
7271
7272 2018-05-21 Tom Tromey <tom@tromey.com>
7273
7274 * symfile.c (reread_symbols): Use std::string for original_name.
7275
7276 2018-05-21 Tom Tromey <tom@tromey.com>
7277
7278 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7279 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7280 constructor.
7281
7282 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7283
7284 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7285 instance to...
7286 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7287 * objfiles.c (get_objfile_bfd_data): Allocate
7288 objfile_per_bfd_storage with obstack_new when allocating on
7289 obstack.
7290
7291 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7292
7293 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7294 OBSTACK_ZALLOC.
7295 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7296 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7297 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7298 (add_pending): Likewise.
7299 (parse_symbol): Likewise.
7300 (parse_partial_symbols): Likewise.
7301 (psymtab_to_symtab_1): Likewise.
7302 (new_psymtab): Likewise.
7303 (elfmdebug_build_psymtabs): Likewise.
7304 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7305 * objfiles.c (get_objfile_bfd_data): Likewise.
7306 (objfile_register_static_link): Likewise.
7307 * psymtab.c (allocate_psymtab): Likewise.
7308 * stabsread.c (read_member_functions): Likewise.
7309 * xcoffread.c (xcoff_end_psymtab): Likewise.
7310
7311 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7312
7313 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7314 compiler supports std::is_trivially_constructible.
7315 * common/poison.h: Include obstack.h.
7316 (IsMallocable): Define to is_trivially_constructible if the
7317 compiler supports it, define to true_type otherwise.
7318 (xobnew): New.
7319 (XOBNEW): Redefine.
7320 (xobnewvec): New.
7321 (XOBNEWVEC): Redefine.
7322 * gdb_obstack.h (obstack_zalloc): New.
7323 (OBSTACK_ZALLOC): Redefine.
7324 (obstack_calloc): New.
7325 (OBSTACK_CALLOC): Redefine.
7326 (obstack_new): New.
7327 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7328 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7329 gdbarch.c.
7330 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7331 obstack_calloc/obstack_zalloc.
7332 (gdbarch_obstack_zalloc): Remove.
7333 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7334
7335 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7336
7337 * stack.c (backtrace_command_1): Remove useless variable int i.
7338
7339 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7340
7341 * stack.c (print_frame_info): Fix comment.
7342
7343 2018-05-18 Tom Tromey <tom@tromey.com>
7344
7345 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7346 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7347 (~dwarf2_per_objfile): Update
7348 (dwarf2_get_dwz_file): Use new.
7349 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7350 unique_ptr.
7351
7352 2018-05-18 Tom Tromey <tom@tromey.com>
7353
7354 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7355 unique_ptr.
7356 * dwarf2read.c (struct dwp_file): Add constructor and
7357 initializers.
7358 (open_and_init_dwp_file): Return a unique_ptr.
7359 (dwarf2_per_objfile, create_dwp_hash_table)
7360 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7361 (lookup_dwo_unit_in_dwp): Update.
7362 (open_and_init_dwp_file, get_dwp_file): Update.
7363
7364 2018-05-18 Tom Tromey <tom@tromey.com>
7365
7366 * dwarf2read.c (dwarf2_per_objfile): Update.
7367 (struct mapped_index): Add initializers.
7368 (dwarf2_read_index): Use new.
7369 (dw2_symtab_iter_init): Update.
7370 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7371 unique_ptr.
7372
7373 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7374
7375 * dwarf2read.c (mapped_index) <total_size>: Remove.
7376
7377 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7378
7379 * unittests/format_pieces-selftests.c (test_format_specifier):
7380 Add ARI comments.
7381
7382 2018-05-18 Tom Tromey <tom@tromey.com>
7383
7384 * c-typeprint.c (maybe_print_hole): New function.
7385 (c_print_type_struct_field_offset): Update.
7386 (c_type_print_base_struct_union): Call maybe_print_hole.
7387
7388 2018-05-17 Keith Seitz <keiths@redhat.com>
7389
7390 * breakpoint.c (build_bpstat_chain): New function, moved from
7391 bpstat_stop_status.
7392 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7393 If no stop chain is passed, call build_bpstat_chain to build it.
7394 * breakpoint.h (build_bpstat_chain): Declare.
7395 (bpstat_stop_status): Move documentation here from breakpoint.c.
7396 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7397 build the stop chain and pass it to skip_inline_frames.
7398 Pass this stop chain to bpstat_stop_status.
7399 * inline-frame.c: Include breakpoint.h.
7400 (stopped_by_user_bp_inline_frame): New function.
7401 (skip_inline_frames): Add parameter `stop_chain'.
7402 Move documention to inline-frame.h.
7403 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7404 whether the frame should be elided.
7405 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7406 Add moved documentation and update for new parameter.
7407
7408 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7409
7410 PR cli/14975
7411 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7412 unittests/format_pieces-selftests.c.
7413 * common/format.h (format_piece) <operator==>: New.
7414 (format_pieces) <operator[]>: Remove.
7415 * common/format.c (format_pieces::format_pieces): Handle \e.
7416 * unittests/format_pieces-selftests.c: New.
7417
7418 2018-05-17 Tom Tromey <tom@tromey.com>
7419
7420 PR symtab/23010:
7421 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7422 (dw2_instantiate_symtab): Add skip_partial parameter.
7423 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7424 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7425 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7426 (dw2_expand_symtabs_matching_one)
7427 (dw2_find_pc_sect_compunit_symtab)
7428 (dw2_debug_names_lookup_symbol)
7429 (dw2_debug_names_expand_symtabs_for_function): Update.
7430 (init_cutu_and_read_dies): Add skip_partial parameter.
7431 (process_psymtab_comp_unit, build_type_psymtabs_1)
7432 (process_skeletonless_type_unit, load_partial_comp_unit)
7433 (psymtab_to_symtab_1): Update.
7434 (load_full_comp_unit): Add skip_partial parameter.
7435 (process_imported_unit_die, dwarf2_read_addr_index)
7436 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7437 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7438 (read_signatured_type): Update.
7439
7440 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7441
7442 * value.c (release_value): Remove unused variable.
7443 (record_latest_value): Likewise.
7444 (access_value_history): Likewise.
7445 (preserve_values): Likewise.
7446
7447 2018-05-17 Tom Tromey <tom@tromey.com>
7448
7449 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7450 Initialize.
7451
7452 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7453
7454 PR gdb/22286
7455 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7456 Also handle registers whose width is not a multiple of
7457 PTRACE_TYPE_RET.
7458 (linux_nat_trad_target::store_register): Likewise.
7459
7460 2018-05-16 Tom Tromey <tom@tromey.com>
7461
7462 * gdbcore.h (core_bfd): Redefine.
7463 * corelow.c (core_target::close): Update.
7464 (core_target_open): Update.
7465 * progspace.h (struct program_space) <cbfd>: Now a
7466 gdb_bfd_ref_ptr.
7467
7468 2018-05-16 Tom Tromey <tom@tromey.com>
7469
7470 PR cli/19551:
7471 * symfile-add-flags.h (enum symfile_add_flags)
7472 <SYMFILE_NOT_FILENAME>: New constant.
7473 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7474 objfile name from BFD.
7475 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7476 * minidebug.c (find_separate_debug_file_in_section): Put
7477 ".gnu_debugdata" into BFD's file name.
7478
7479 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7480
7481 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7482 Remove.
7483
7484 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7485
7486 PR binutils/21446
7487 * aarch64-tdep.c (aarch64_analyze_prologue,
7488 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7489 Indicate not interested in errors.
7490
7491 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7492
7493 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7494 Supply the MIPS_ZERO_REGNUM register.
7495
7496 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7497
7498 * mips-tdep.c (mask_address_var): Make variable static.
7499
7500 2018-05-14 Tom Tromey <tom@tromey.com>
7501
7502 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7503
7504 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7505
7506 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7507 FXSAVE_ADDR for the mxcsr register.
7508
7509 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7510
7511 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7512
7513 2018-05-11 Pedro Alves <palves@redhat.com>
7514
7515 * corelow.c (core_target) <core_target>: No longer inline.
7516 Initialize m_core_gdbarch, m_core_vec and build the section table
7517 here.
7518 <~core_target>: New.
7519 <core_gdbarch, get_core_register_section>: New methods.
7520 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7521 factored out from ...
7522 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7523 (core_ops): Delete.
7524 (sniff_core_bfd): Add gdbarch parameter.
7525 (core_close): Delete, merged into ...
7526 (core_target::close): ... here. Delete self.
7527 (core_close_cleanup): Delete.
7528 (core_target_open): Allocate a core_target on the heap. Use a
7529 unique_ptr instead of a cleanup. Bits moved into the core_target
7530 ctor. Adjust to use core_target methods instead of globals.
7531 (get_core_register_section): Rename to ...
7532 (core_target::get_core_register_section): ... this and adjust.
7533 (struct get_core_registers_cb_data): New.
7534 (get_core_registers_cb): Use it. Use bool.
7535 (core_target::fetch_registers, core_target::files_info)
7536 (core_target::xfer_partial, core_target::read_description)
7537 (core_target::pid_to, core_target::thread_name): Adjust to
7538 reference class fields instead of globals.
7539 * target.h (struct target_ops_deleter, target_ops_up): New.
7540
7541 2018-05-11 Pedro Alves <palves@redhat.com>
7542
7543 * corefile.c (core_file_command): Move to corelow.c.
7544 * corelow.c (the_core_target): Delete.
7545 (core_file_command): Moved from corefile.c. Check exec_bfd
7546 instead of the_core_target. Use target_detach instead of calling
7547 into the_core_target directly.
7548 (maybe_say_no_core_file_now): New.
7549 (core_target::detach): Use it.
7550 (_initialize_corelow): Remove references to the_core_target.
7551 * gdbcore.h (the_core_target): Delete.
7552
7553 2018-05-11 Tom Tromey <tromey@redhat.com>
7554 Pedro Alves <palves@redhat.com>
7555
7556 * corefile.c (core_bfd): Remove.
7557 * gdbcore.h (core_bfd): Now a macro.
7558 * progspace.h (struct program_space) <cbfd>: New field.
7559
7560 2018-05-11 Tom Tromey <tom@tromey.com>
7561
7562 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7563 gdb::def_vector.
7564
7565 2018-05-10 Tom Tromey <tom@tromey.com>
7566
7567 * configure: Rebuild.
7568 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7569
7570 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7571
7572 PR server/23158:
7573 * regformats/regdat.sh: Adjust script, following the addition
7574 of the new expedite_regs parameter to init_target_desc.
7575
7576 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7577
7578 PR gdb/23127
7579 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7580 set_gdbarch_significant_addr_bit.
7581 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7582 set_gdbarch_significant_addr_bit.
7583 * utils.c (address_significant): Update to sign extend addr.
7584
7585 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7586
7587 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7588 (xtensa_linux_init_abi): Limit tdep->num_regs by
7589 tdep->num_nopriv_regs.
7590 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7591 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7592 not initialized.
7593
7594 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7595
7596 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7597
7598 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7599
7600 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7601 (I387_MXCSR_INIT_VAL): New constant.
7602 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7603 buffer if it was supplied by the inferior.
7604 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7605 (i387_xsave_get_clear_bv): New function.
7606 (i387_supply_xsave): Only read x87 control registers from the
7607 xsave buffer if the feature is enabled, and the state will have
7608 been written, otherwise, provide a suitable default.
7609 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7610 including x87 control registers. Update control registers if they
7611 have changed from the default value, and mark features as enabled
7612 as required.
7613 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7614
7615 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7616
7617 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7618
7619 2018-05-07 Tom Tromey <tom@tromey.com>
7620
7621 * configure: Rebuild.
7622 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7623
7624 2018-05-07 Tom Tromey <tom@tromey.com>
7625
7626 PR tdep/20362:
7627 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7628 bit. Use correct value for VDIV.
7629
7630 2018-05-04 Tom Tromey <tom@tromey.com>
7631
7632 * configure: Rebuild.
7633 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7634
7635 2018-05-04 Tom Tromey <tom@tromey.com>
7636
7637 * linux-record.c (record_linux_system_call) <case
7638 RECORD_SYS_RECVFROM>: Add "break".
7639
7640 2018-05-04 Tom Tromey <tom@tromey.com>
7641
7642 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7643 Add missing "break".
7644 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7645 Add missing "break".
7646
7647 2018-05-04 Tom Tromey <tom@tromey.com>
7648
7649 * rs6000-tdep.c (ppc_process_record_op4)
7650 (ppc_process_record_op63): Add fall-through comment.
7651
7652 2018-05-04 Tom Tromey <tom@tromey.com>
7653
7654 * i386-tdep.c (i386_process_record): Add fall-through comment.
7655
7656 2018-05-04 Tom Tromey <tom@tromey.com>
7657
7658 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7659 comment.
7660
7661 2018-05-04 Tom Tromey <tom@tromey.com>
7662
7663 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7664 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7665 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7666 comment.
7667 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7668 comment.
7669 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7670 comment.
7671
7672 2018-05-04 Tom Tromey <tom@tromey.com>
7673
7674 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7675
7676 2018-05-04 Tom Tromey <tom@tromey.com>
7677
7678 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7679 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7680 * symfile.c (section_is_mapped): Fix fall-through comment.
7681 * stabsread.c (define_symbol, read_member_functions): Fix
7682 fall-through comment.
7683 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7684 comment.
7685 * remote.c (remote_wait_as): Fix fall-through comment.
7686 * p-exp.y (yylex): Fix fall-through comment.
7687 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7688 comment.
7689 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7690 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7691 * jv-exp.y (yylex): Fix fall-through comment.
7692 * go-exp.y (lex_one_token): Fix fall-through comment.
7693 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7694 fall-through comment.
7695 * f-exp.y (yylex): Fix fall-through comment.
7696 * dwarf2read.c (process_die): Fix fall-through comments.
7697 * dbxread.c (process_one_symbol): Fix fall-through comment.
7698 * d-exp.y (lex_one_token): Fix fall-through comment.
7699 * cp-name-parser.y (yylex): Fix fall-through comment.
7700 * coffread.c (coff_symtab_read): Fix fall-through comment.
7701 * c-exp.y (lex_one_token): Fix fall-through comment.
7702 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7703 comment.
7704 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7705 comment.
7706
7707 2018-05-04 Tom Tromey <tom@tromey.com>
7708
7709 PR python/22730:
7710 * NEWS: Mention gdb.execute change.
7711 * gdbcmd.h (execute_control_command): Don't declare.
7712 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7713 execute_control_commands, execute_control_commands_to_string.
7714 * cli/cli-script.h (execute_control_commands)
7715 (execute_control_commands_to_string): Declare.
7716 (execute_control_command): Add from_tty parameter.
7717 * cli/cli-script.c (execute_control_commands)
7718 (execute_control_commands_to_string): New functions.
7719 (execute_user_command): Use execute_control_commands.
7720 (execute_control_command_1): Add "from_tty" parameter. Update.
7721 (execute_control_command): Likewise.
7722
7723 2018-05-04 Tom Tromey <tom@tromey.com>
7724
7725 PR python/22731:
7726 * NEWS: Mention that breakpoint commands are writable.
7727 * python/py-breakpoint.c (bppy_set_commands): New function.
7728 (breakpoint_object_getset) <"commands">: Use it.
7729
7730 2018-05-04 Tom Tromey <tom@tromey.com>
7731
7732 * tracepoint.c (actions_command): Update.
7733 * mi/mi-cmd-break.c (mi_command_line_array)
7734 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7735 (mi_read_next_line): Remove.
7736 (mi_cmd_break_commands): Update.
7737 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7738 function_view.
7739 * cli/cli-script.c (get_command_line): Update.
7740 (process_next_line): Use function_view. Constify.
7741 (recurse_read_control_structure, read_command_lines)
7742 (read_command_lines_1): Change argument types to function_view.
7743 (do_define_command, document_command): Update.
7744 * breakpoint.h (check_tracepoint_command): Don't declare.
7745 * breakpoint.c (check_tracepoint_command): Remove.
7746 (commands_command_1, create_tracepoint_from_upload): Update.
7747
7748 2018-05-04 Tom Tromey <tom@tromey.com>
7749
7750 PR gdb/11750:
7751 * cli/cli-script.h (enum command_control_type) <define_control>:
7752 New constant.
7753 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7754 (build_command_line, execute_control_command_1)
7755 (process_next_line): Likewise.
7756 (do_define_command): New function, extracted from define_command.
7757 (define_command): Use it.
7758
7759 2018-05-04 Tom Tromey <tom@tromey.com>
7760
7761 * tracepoint.c (actions_command): Update.
7762 * cli/cli-script.h (read_command_lines): Update.
7763 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7764 (MAX_TMPBUF): Remove define.
7765 (define_command): Use string_printf.
7766 (document_command): Likewise.
7767 * breakpoint.c (commands_command_1): Update.
7768
7769 2018-05-04 Tom Tromey <tom@tromey.com>
7770
7771 * top.c (execute_command): Update.
7772 * cli/cli-script.h (print_command_lines): Now varargs.
7773 * cli/cli-script.c (print_command_lines): Now varargs.
7774 (execute_control_command_1) <case while_control, case if_control>:
7775 Update.
7776
7777 2018-05-04 Tom Tromey <tom@tromey.com>
7778
7779 * tracepoint.c (all_tracepoint_actions): Rename from
7780 all_tracepoint_actions_and_cleanup. Change return type.
7781 (actions_command, encode_actions_1, encode_actions)
7782 (trace_dump_actions, tdump_command): Update.
7783 * remote.c (remote_download_command_source): Update.
7784 * python/python.c (gdbpy_eval_from_control_command)
7785 (python_command, python_interactive_command): Update.
7786 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7787 * guile/guile.c (guile_command)
7788 (gdbscm_eval_from_control_command, guile_command): Update.
7789 * compile/compile.c (compile_code_command)
7790 (compile_print_command, compile_to_object): Update.
7791 * cli/cli-script.h (struct command_lines_deleter): New.
7792 (counted_command_line): New typedef.
7793 (struct command_line): Add constructor, destructor.
7794 <body_list>: Remove.
7795 <body_list_0, body_list_1>: New members.
7796 (command_line_up): Remove typedef.
7797 (read_command_lines, read_command_lines_1, get_command_line):
7798 Update.
7799 (copy_command_lines): Don't declare.
7800 * cli/cli-script.c (build_command_line): Use "new".
7801 (get_command_line): Return counted_command_line.
7802 (print_command_lines, execute_user_command)
7803 (execute_control_command_1, while_command, if_command): Update.
7804 (realloc_body_list): Remove.
7805 (process_next_line, recurse_read_control_structure): Update.
7806 (read_command_lines, read_command_lines_1): Return counted_command_line.
7807 (free_command_lines): Use "delete".
7808 (copy_command_lines): Remove.
7809 (define_command, document_command, show_user_1): Update.
7810 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7811 a counted_command_line.
7812 * breakpoint.h (counted_command_line): Remove typedef.
7813 (breakpoint_set_commands): Update.
7814 * breakpoint.c (check_no_tracepoint_commands)
7815 (validate_commands_for_breakpoint): Update.
7816 (breakpoint_set_commands): Change commands to be a
7817 counted_command_line.
7818 (commands_command_1, update_dprintf_command_list)
7819 (create_tracepoint_from_upload): Update.
7820
7821 2018-05-04 Tom Tromey <tom@tromey.com>
7822
7823 * cli/cli-decode.h (cmd_list_element): New constructor.
7824 (~cmd_list_element): New destructor.
7825 (struct cmd_list_element): Add initializers.
7826 * cli/cli-decode.c (do_add_cmd): Use "new".
7827 (delete_cmd): Use "delete".
7828
7829 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7830 Pedro Alves <palves@redhat.com>
7831
7832 PR breakpoints/19806 and support for PR external/20207.
7833 * NEWS: Mention Aarch64 watchpoint improvements.
7834 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7835 watchpoints and PR external/20207 watchpoints.
7836 * nat/aarch64-linux-hw-point.c
7837 (kernel_supports_any_contiguous_range): New.
7838 (aarch64_watchpoint_offset): New.
7839 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7840 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7841 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7842 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7843 next_addr_orig_p. Support PR external/20207 watchpoints.
7844 (aarch64_downgrade_regs): New.
7845 (aarch64_dr_state_insert_one_point): New parameters offset and
7846 addr_orig.
7847 (aarch64_dr_state_remove_one_point): Likewise.
7848 (aarch64_handle_breakpoint): Update caller.
7849 (aarch64_handle_aligned_watchpoint): Likewise.
7850 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7851 aligned_offset.
7852 (aarch64_linux_set_debug_regs): Remove const from state. Call
7853 aarch64_downgrade_regs.
7854 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7855 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7856 (DR_CONTROL_MASK): ... this.
7857 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7858 (unsigned int aarch64_watchpoint_offset): New prototype.
7859 (aarch64_linux_set_debug_regs): Remove const from state.
7860 * utils.c (align_up, align_down): Move to ...
7861 * common/common-utils.c (align_up, align_down): ... here.
7862 * utils.h (align_up, align_down): Move to ...
7863 * common/common-utils.h (align_up, align_down): ... here.
7864
7865 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7866
7867 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7868 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7869 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7870 Re-implement to match the ABI as summarized in GCC's
7871 gcc/config/sparc/sparc.c. All callers updated.
7872 (sparc32_store_arguments): Remove assertion.
7873
7874 2018-05-04 Tom Tromey <tom@tromey.com>
7875
7876 * printcmd.c: Don't include tui.h.
7877 (decode_format): Use skip_spaces.
7878
7879 2018-05-04 Tom Tromey <tom@tromey.com>
7880
7881 PR gdb/22619:
7882 * printcmd.c (last_count): New global.
7883 (x_command): Use saved count when repeating.
7884
7885 2018-05-04 Tom Tromey <tom@tromey.com>
7886
7887 * nto-procfs.c (do_closedir_cleanup): Remove.
7888 (procfs_pidlist): Use gdb_dir_up.
7889 * procfs.c (do_closedir_cleanup): Remove.
7890 (proc_update_threads): Use gdb_dir_up.
7891 * common/filestuff.h (struct gdb_dir_deleter): New.
7892 (gdb_dir_up): New typedef.
7893
7894 2018-05-04 Tom Tromey <tom@tromey.com>
7895
7896 * ada-lang.c (print_mention_exception): Use std::string.
7897
7898 2018-05-04 Tom Tromey <tom@tromey.com>
7899
7900 * ada-lang.c (create_excep_cond_exprs): Update.
7901 (ada_exception_catchpoint_cond_string): Use std::string.
7902
7903 2018-05-04 Tom Tromey <tom@tromey.com>
7904
7905 * ada-lang.c (xget_renaming_scope): Return std::string.
7906 (old_renaming_is_invisible): Update.
7907
7908 2018-05-04 Tom Tromey <tom@tromey.com>
7909
7910 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7911 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7912
7913 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7914
7915 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7916
7917 2018-05-04 Tom Tromey <tom@tromey.com>
7918
7919 * remote.c (remote_query_supported_append): Change type.
7920 (remote_check_symbols): Update.
7921
7922 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7923
7924 PR gdb/11420
7925 * configure.ac: Prepend libpython.
7926 * python/python-config.py: Likewise.
7927 * configure: Regenerate.
7928
7929 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7930
7931 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7932
7933 2018-05-03 Pedro Alves <palves@redhat.com>
7934
7935 * s390-linux-nat.c
7936 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7937 override. Write 'true' instead of '1'.
7938 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7939 declaration.
7940
7941 2018-05-02 Pedro Alves <palves@redhat.com>
7942
7943 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7944 add_inf_child_target.
7945 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7946 add_inf_child_target.
7947 * aix-thread.c (aix_thread_target_info): New.
7948 (aix_thread_target) <shortname, longname, doc>: Delete.
7949 <info>: New.
7950 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7951 add_inf_child_target.
7952 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7953 add_inf_child_target.
7954 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7955 add_inf_child_target.
7956 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7957 add_inf_child_target.
7958 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7959 add_inf_child_target.
7960 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7961 add_inf_child_target.
7962 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7963 add_inf_child_target.
7964 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7965 add_inf_child_target.
7966 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7967 add_inf_child_target.
7968 * bfd-target.c (target_bfd_target_info): New.
7969 (target_bfd) <shortname, longname, doc>: Delete.
7970 <info>: New.
7971 * bsd-kvm.c (bsd_kvm_target_info): New.
7972 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7973 <info>: New.
7974 (bsd_kvm_target::open): Rename to ...
7975 (bsd_kvm_target_open): ... this. Adjust.
7976 * bsd-uthread.c (bsd_uthread_target_info): New.
7977 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7978 <info>: New.
7979 * corefile.c (core_file_command): Adjust.
7980 * corelow.c (core_target_info): New.
7981 (core_target) <shortname, longname, doc>: Delete.
7982 <info>: New.
7983 (core_target::open): Rename to ...
7984 (core_target_open): ... this. Adjust.
7985 * ctf.c (ctf_target_info): New.
7986 (ctf_target) <shortname, longname, doc>: Delete.
7987 <info>: New.
7988 (ctf_target::open): Rename to ...
7989 (ctf_target_open): ... this.
7990 (_initialize_ctf): Adjust.
7991 * exec.c (exec_target_info): New.
7992 (exec_target) <shortname, longname, doc>: Delete.
7993 <info>: New.
7994 (exec_target::open): Rename to ...
7995 (exec_target_open): ... this.
7996 * gdbcore.h (core_target_open): Declare.
7997 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7998 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7999 add_inf_child_target.
8000 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8001 add_inf_child_target.
8002 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8003 add_inf_child_target.
8004 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8005 add_inf_child_target.
8006 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8007 add_inf_child_target.
8008 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8009 add_inf_child_target.
8010 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8011 add_inf_child_target.
8012 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8013 add_inf_child_target.
8014 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8015 add_inf_child_target.
8016 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8017 add_inf_child_target.
8018 * inf-child.c (inf_child_target_info): New.
8019 (inf_child_target::info): New.
8020 (inf_child_open_target): Remove 'target' parameter. Use
8021 get_native_target instead.
8022 (inf_child_target::open): Delete.
8023 (add_inf_child_target): New.
8024 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8025 Delete.
8026 <info>: New.
8027 (add_inf_child_target): Declare.
8028 (inf_child_open_target): Declare.
8029 * linux-thread-db.c (thread_db_target_info): New.
8030 (thread_db_target) <shortname, longname, doc>: Delete.
8031 <info>: New.
8032 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8033 add_inf_child_target.
8034 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8035 add_inf_child_target.
8036 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8037 add_inf_child_target.
8038 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8039 add_inf_child_target.
8040 * make-target-delegates (print_class): Adjust.
8041 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8042 add_inf_child_target.
8043 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8044 add_inf_child_target.
8045 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8046 add_inf_child_target.
8047 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8048 add_inf_child_target.
8049 * nto-procfs.c (nto_native_target_info): New.
8050 (nto_procfs_target_native) <shortname, longname, doc>:
8051 Delete.
8052 <info>: New.
8053 (nto_procfs_target_info): New.
8054 (nto_procfs_target_procfs) <shortname, longname, doc>:
8055 Delete.
8056 <info>: New.
8057 (init_procfs_targets): Adjust.
8058 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8059 add_inf_child_target.
8060 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8061 add_inf_child_target.
8062 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8063 add_inf_child_target.
8064 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8065 add_inf_child_target.
8066 * ravenscar-thread.c (ravenscar_target_info): New.
8067 (ravenscar_thread_target) <shortname, longname, doc>:
8068 Delete.
8069 <info>: New.
8070 * record-btrace.c (record_btrace_target_info):
8071 (record_btrace_target) <shortname, longname, doc>: Delete.
8072 <info>: New.
8073 (record_btrace_target::open): Rename to ...
8074 (record_btrace_target_open): ... this. Adjust.
8075 * record-full.c (record_longname, record_doc): New.
8076 (record_full_base_target) <shortname, longname, doc>: Delete.
8077 <info>: New.
8078 (record_full_target_info): New.
8079 (record_full_target): <shortname>: Delete.
8080 <info>: New.
8081 (record_full_core_open_1, record_full_open_1): Update comments.
8082 (record_full_base_target::open): Rename to ...
8083 (record_full_open): ... this.
8084 (cmd_record_full_restore): Update.
8085 (_initialize_record_full): Update.
8086 * remote-sim.c (remote_sim_target_info): New.
8087 (gdbsim_target) <shortname, longname, doc>: Delete.
8088 <info>: New.
8089 (gdbsim_target::open): Rename to ...
8090 (gdbsim_target_open): ... this.
8091 (_initialize_remote_sim): Adjust.
8092 * remote.c (remote_doc): New.
8093 (remote_target_info): New.
8094 (remote_target) <shortname, longname, doc>: Delete.
8095 <info>: New.
8096 (extended_remote_target_info): New.
8097 (extended_remote_target) <shortname, longname, doc>: Delete.
8098 <info>: New.
8099 (remote_target::open_1): Make static. Adjust.
8100 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8101 * s390-linux-nat.c (_initialize_s390_nat): Use
8102 add_inf_child_target.
8103 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8104 add_inf_child_target.
8105 * sol-thread.c (thread_db_target_info): New.
8106 (sol_thread_target) <shortname, longname, doc>: Delete.
8107 <info>: New.
8108 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8109 add_inf_child_target.
8110 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8111 add_inf_child_target.
8112 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8113 add_inf_child_target.
8114 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8115 add_inf_child_target.
8116 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8117 add_inf_child_target.
8118 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8119 add_inf_child_target.
8120 * spu-linux-nat.c (_initialize_spu_nat): Use
8121 add_inf_child_target.
8122 * spu-multiarch.c (spu_multiarch_target_info): New.
8123 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8124 <info>: New.
8125 * target-delegates.c: Regenerate.
8126 * target.c: Include <unordered_map>.
8127 (target_ops_p): Delete.
8128 (DEF_VEC_P(target_ops_p)): Delete.
8129 (target_factories): New.
8130 (test_target_info): New.
8131 (test_target_ops::info): New.
8132 (open_target): Adjust to use target_factories.
8133 (add_target_with_completer): Rename to ...
8134 (add_target): ... this. Change prototype. Register target_info
8135 and open callback in target_factories. Register target_info in
8136 command context instead of target_ops.
8137 (add_target): Delete old implementation.
8138 (add_deprecated_target_alias): Change prototype. Adjust.
8139 (the_native_target): New.
8140 (set_native_target, get_native_target): New.
8141 (find_default_run_target): Use the_native_target.
8142 (find_attach_target, find_run_target): Simplify.
8143 (target_ops::open): Delete.
8144 (dummy_target_info): New.
8145 (dummy_target::shortname, dummy_target::longname)
8146 (dummy_target::doc): Delete.
8147 (dummy_target::info): New.
8148 (debug_target::shortname, debug_target::longname)
8149 (debug_target::doc): Delete.
8150 (debug_target::info): New.
8151 * target.h (struct target_info): New.
8152 (target_ops::~target_ops): Add comment.
8153 (target_ops::info): New.
8154 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8155 longer virtual. Implement in terms of target_info.
8156 (set_native_target, get_native_target): Declare.
8157 (target_open_ftype): New.
8158 (add_target, add_target_with_completer)
8159 (add_deprecated_target_alias): Change prototype.
8160 (test_target) <shortname, longname, doc>: Delete.
8161 <info>: New.
8162 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8163 add_inf_child_target.
8164 * tracefile-tfile.c (tfile_target_info): New.
8165 (tfile_target) <shortname, longname, doc>: Delete.
8166 <info>: New.
8167 (tfile_target::open): Rename to ...
8168 (tfile_target_open): ... this.
8169 (_initialize_tracefile_tfile): Adjust.
8170 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8171 add_inf_child_target.
8172 * windows-nat.c (_initialize_windows_nat): Use
8173 add_inf_child_target.
8174 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8175 add_inf_child_target.
8176
8177 2018-05-02 Pedro Alves <palves@redhat.com>
8178
8179 * linux-nat.h (linux_nat_target) <low_new_thread,
8180 low_delete_thread, low_new_fork, low_forget_process,
8181 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8182 New virtual methods.
8183 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8184 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8185 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8186 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8187 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8188 Delete.
8189 * linux-fork.c (delete_fork): Adjust to call low method.
8190 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8191 (linux_nat_new_fork, linux_nat_forget_process_hook)
8192 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8193 (linux_nat_status_is_event):
8194 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8195 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8196 to call low method.
8197 (sigtrap_is_event): Rename to ...
8198 (linux_nat_target::low_status_is_event): ... this.
8199 (linux_nat_set_status_is_event): Delete.
8200 (save_stop_reason, linux_nat_wait_1)
8201 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8202 low methods.
8203 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8204 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8205 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8206 (linux_nat_set_prepare_to_resume): Delete.
8207 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8208 low virtual methods.
8209 * amd64-linux-nat.c: Likewise.
8210 * arm-linux-nat.c: Likewise.
8211 * i386-linux-nat.c: Likewise.
8212 * ia64-linux-nat.c: Likewise.
8213 * mips-linux-nat.c: Likewise.
8214 * ppc-linux-nat.c: Likewise.
8215 * s390-linux-nat.c: Likewise.
8216 * sparc64-linux-nat.c: Likewise.
8217 * x86-linux-nat.c: Likewise.
8218 * x86-linux-nat.h: Include "nat/x86-linux.h".
8219 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8220 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8221 Override methods.
8222
8223 2018-05-02 Pedro Alves <palves@redhat.com>
8224
8225 * target.h (target_ops)
8226 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8227 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8228 stopped_by_watchpoint, have_continuable_watchpoint,
8229 stopped_data_address, watchpoint_addr_within_range,
8230 can_accel_watchpoint_condition, can_run, thread_alive,
8231 has_all_memory, has_memory, has_stack, has_registers,
8232 has_execution, can_async_p, is_async_p, supports_non_stop,
8233 always_non_stop_p, can_execute_reverse, supports_multi_process,
8234 supports_enable_disable_tracepoint,
8235 supports_disable_randomization, supports_string_tracing,
8236 supports_evaluation_of_breakpoint_conditions,
8237 can_run_breakpoint_commands, filesystem_is_local,
8238 can_download_tracepoint, get_trace_state_variable_value,
8239 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8240 record_is_replaying, record_will_replay,
8241 augmented_libraries_svr4_read>: Adjust to return bool.
8242 * aarch64-linux-nat.c: All implementations adjusted.
8243 * aix-thread.c: All implementations adjusted.
8244 * arm-linux-nat.c: All implementations adjusted.
8245 * breakpoint.c: All implementations adjusted.
8246 * bsd-kvm.c: All implementations adjusted.
8247 * bsd-uthread.c: All implementations adjusted.
8248 * corelow.c: All implementations adjusted.
8249 * ctf.c: All implementations adjusted.
8250 * darwin-nat.c: All implementations adjusted.
8251 * darwin-nat.h: All implementations adjusted.
8252 * exec.c: All implementations adjusted.
8253 * fbsd-nat.c: All implementations adjusted.
8254 * fbsd-nat.h: All implementations adjusted.
8255 * gnu-nat.c: All implementations adjusted.
8256 * gnu-nat.h: All implementations adjusted.
8257 * go32-nat.c: All implementations adjusted.
8258 * ia64-linux-nat.c: All implementations adjusted.
8259 * inf-child.c: All implementations adjusted.
8260 * inf-child.h: All implementations adjusted.
8261 * inf-ptrace.c: All implementations adjusted.
8262 * inf-ptrace.h: All implementations adjusted.
8263 * linux-nat.c: All implementations adjusted.
8264 * linux-nat.h: All implementations adjusted.
8265 * mips-linux-nat.c: All implementations adjusted.
8266 * nto-procfs.c: All implementations adjusted.
8267 * ppc-linux-nat.c: All implementations adjusted.
8268 * procfs.c: All implementations adjusted.
8269 * ravenscar-thread.c: All implementations adjusted.
8270 * record-btrace.c: All implementations adjusted.
8271 * record-full.c: All implementations adjusted.
8272 * remote-sim.c: All implementations adjusted.
8273 * remote.c: All implementations adjusted.
8274 * s390-linux-nat.c: All implementations adjusted.
8275 * sol-thread.c: All implementations adjusted.
8276 * spu-multiarch.c: All implementations adjusted.
8277 * target-delegates.c: All implementations adjusted.
8278 * target.c: All implementations adjusted.
8279 * target.h: All implementations adjusted.
8280 * tracefile-tfile.c: All implementations adjusted.
8281 * tracefile.c: All implementations adjusted.
8282 * tracefile.h: All implementations adjusted.
8283 * windows-nat.c: All implementations adjusted.
8284 * x86-linux-nat.h: All implementations adjusted.
8285 * x86-nat.h: All implementations adjusted.
8286
8287 2018-05-02 Pedro Alves <palves@redhat.com>
8288
8289 * make-target-delegates (scan_target_h): Don't trim lines here.
8290 Replace sequences of tabs and/or whitespace with a single
8291 whitespace.
8292 (top level, parsing methods): Trim each line before processing it
8293 here.
8294
8295 2018-05-02 Pedro Alves <palves@redhat.com>
8296 John Baldwin <jhb@freebsd.org>
8297
8298 * target.h (enum strata) <debug_stratum>: New.
8299 (struct target_ops) <all delegation methods>: Replace by C++
8300 virtual methods, and drop "to_" prefix. All references updated
8301 throughout.
8302 <to_shortname, to_longname, to_doc, to_data,
8303 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8304 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8305 virtual methods. All references updated throughout.
8306 <can_attach, supports_terminal_ours, can_create_inferior,
8307 get_thread_control_capabilities, attach_no_wait>: New
8308 virtual methods.
8309 <insert_breakpoint, remove_breakpoint>: Now
8310 TARGET_DEFAULT_NORETURN methods.
8311 <info_proc>: Now returns bool.
8312 <to_magic>: Delete.
8313 (OPS_MAGIC): Delete.
8314 (current_target): Delete. All references replaced by references
8315 to ...
8316 (target_stack): ... this. New.
8317 (target_shortname, target_longname): Adjust.
8318 (target_can_run): Now a function declaration.
8319 (default_child_has_all_memory, default_child_has_memory)
8320 (default_child_has_stack, default_child_has_registers)
8321 (default_child_has_execution): Remove target_ops parameter.
8322 (complete_target_initialization): Delete.
8323 (memory_breakpoint_target): New template class.
8324 (test_target_ops): Refactor as a C++ class with virtual methods.
8325 * make-target-delegates (NAME_PART): Tighten.
8326 (POINTER_PART, CP_SYMBOL): New.
8327 (SIMPLE_RETURN_PART): Reimplement.
8328 (VEC_RETURN_PART): Expect less.
8329 (RETURN_PART, VIRTUAL_PART): New.
8330 (METHOD): Adjust to C++ virtual methods.
8331 (scan_target_h): Remove reference to C99.
8332 (dname): Output "target_ops::" prefix.
8333 (write_function_header): Adjust to output a C++ class method.
8334 (write_declaration): New.
8335 (write_delegator): Adjust to output a C++ class method.
8336 (tdname): Output "dummy_target::" prefix.
8337 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8338 method.
8339 (tdefault_names, debug_names): Delete.
8340 (return_types, tdefaults, styles, argtypes_array): New.
8341 (top level): All methods are delegators.
8342 (print_class): New.
8343 (top level): Print dummy_target and debug_target classes.
8344 * target-delegates.c: Regenerate.
8345 * target-debug.h (target_debug_print_enum_info_proc_what)
8346 (target_debug_print_thread_control_capabilities)
8347 (target_debug_print_thread_info_p): New.
8348 * target.c (dummy_target): Delete.
8349 (the_dummy_target, the_debug_target): New.
8350 (target_stack): Now extern.
8351 (set_targetdebug): Push/unpush debug target.
8352 (default_child_has_all_memory, default_child_has_memory)
8353 (default_child_has_stack, default_child_has_registers)
8354 (default_child_has_execution): Remove target_ops parameter.
8355 (complete_target_initialization): Delete.
8356 (add_target_with_completer): No longer call
8357 complete_target_initialization.
8358 (target_supports_terminal_ours): Use regular delegation.
8359 (update_current_target): Delete.
8360 (push_target): No longer check magic number. Don't call
8361 update_current_target.
8362 (unpush_target): Don't call update_current_target.
8363 (target_is_pushed): No longer check magic number.
8364 (target_require_runnable): Skip for all stratums over
8365 process_stratum.
8366 (target_ops::info_proc): New.
8367 (target_info_proc): Use find_target_at and
8368 find_default_run_target.
8369 (target_supports_disable_randomization): Use regular delegation.
8370 (target_get_osdata): Use find_target_at.
8371 (target_ops::open, target_ops::close, target_ops::can_attach)
8372 (target_ops::attach, target_ops::can_create_inferior)
8373 (target_ops::create_inferior, target_ops::can_run)
8374 (target_can_run): New.
8375 (default_fileio_target): Use regular delegation.
8376 (target_ops::fileio_open, target_ops::fileio_pwrite)
8377 (target_ops::fileio_pread, target_ops::fileio_fstat)
8378 (target_ops::fileio_close, target_ops::fileio_unlink)
8379 (target_ops::fileio_readlink): New.
8380 (target_fileio_open_1, target_fileio_unlink)
8381 (target_fileio_readlink): Always call the target method. Handle
8382 FILEIO_ENOSYS.
8383 (return_zero, return_zero_has_execution): Delete.
8384 (init_dummy_target): Delete.
8385 (dummy_target::dummy_target, dummy_target::shortname)
8386 (dummy_target::longname, dummy_target::doc)
8387 (debug_target::debug_target, debug_target::shortname)
8388 (debug_target::longname, debug_target::doc): New.
8389 (target_supports_delete_record): Use regular delegation.
8390 (setup_target_debug): Delete.
8391 (maintenance_print_target_stack): Skip debug_stratum.
8392 (initialize_targets): Instantiate the_dummy_target and
8393 the_debug_target.
8394 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8395 use target_stack.
8396 (target_auxv_search, fprint_target_auxv): Adjust.
8397 (info_auxv_command): Adjust to use target_stack.
8398 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8399 * exceptions.c (print_flush): Handle a NULL target_stack.
8400 * regcache.c (target_ops_no_register): Refactor as class with
8401 virtual methods.
8402
8403 * exec.c (exec_target): New class.
8404 (exec_ops): Now an exec_target.
8405 (exec_open, exec_close_1, exec_get_section_table)
8406 (exec_xfer_partial, exec_files_info, exec_has_memory)
8407 (exec_make_note_section): Refactor as exec_target methods.
8408 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8409 Delete.
8410 (exec_target::find_memory_regions): New.
8411 (_initialize_exec): Don't call init_exec_ops.
8412 * gdbcore.h (exec_file_clear): Delete.
8413
8414 * corefile.c (core_target): Delete.
8415 (core_file_command): Adjust.
8416 * corelow.c (core_target): New class.
8417 (the_core_target): New.
8418 (core_close): Remove target_ops parameter.
8419 (core_close_cleanup): Adjust.
8420 (core_target::close): New.
8421 (core_open, core_detach, get_core_registers, core_files_info)
8422 (core_xfer_partial, core_thread_alive, core_read_description)
8423 (core_pid_to_str, core_thread_name, core_has_memory)
8424 (core_has_stack, core_has_registers, core_info_proc): Rework as
8425 core_target methods.
8426 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8427 (_initialize_corelow): Initialize the_core_target.
8428 * gdbcore.h (core_target): Delete.
8429 (the_core_target): New.
8430
8431 * ctf.c: (ctf_target): New class.
8432 (ctf_ops): Now a ctf_target.
8433 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8434 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8435 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8436 methods.
8437 (init_ctf_ops): Delete.
8438 (_initialize_ctf): Don't call it.
8439 * tracefile-tfile.c (tfile_target): New class.
8440 (tfile_ops): Now a tfile_target.
8441 (tfile_open, tfile_close, tfile_files_info)
8442 (tfile_get_tracepoint_status, tfile_trace_find)
8443 (tfile_fetch_registers, tfile_xfer_partial)
8444 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8445 Refactor as tfile_target methods.
8446 (tfile_xfer_partial_features): Remove target_ops parameter.
8447 (init_tfile_ops): Delete.
8448 (_initialize_tracefile_tfile): Don't call it.
8449 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8450 (tracefile_has_stack, tracefile_has_registers)
8451 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8452 tracefile_target methods.
8453 (init_tracefile_ops): Delete.
8454 (tracefile_target::tracefile_target): New.
8455 * tracefile.h: Include "target.h".
8456 (tracefile_target): New class.
8457 (init_tracefile_ops): Delete.
8458
8459 * spu-multiarch.c (spu_multiarch_target): New class.
8460 (spu_ops): Now a spu_multiarch_target.
8461 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8462 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8463 (spu_search_memory, spu_mourn_inferior): Refactor as
8464 spu_multiarch_target methods.
8465 (init_spu_ops): Delete.
8466 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8467 complete_target_initialization.
8468
8469 * ravenscar-thread.c (ravenscar_thread_target): New class.
8470 (ravenscar_ops): Now a ravenscar_thread_target.
8471 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8472 (ravenscar_thread_alive, ravenscar_pid_to_str)
8473 (ravenscar_fetch_registers, ravenscar_store_registers)
8474 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8475 (ravenscar_stopped_by_hw_breakpoint)
8476 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8477 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8478 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8479 methods.
8480 (init_ravenscar_thread_ops): Delete.
8481 (_initialize_ravenscar): Remove references to
8482 init_ravenscar_thread_ops and complete_target_initialization.
8483
8484 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8485 (bsd_uthread_target): New class.
8486 (bsd_uthread_ops): Now a bsd_uthread_target.
8487 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8488 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8489 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8490 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8491 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8492 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8493 (bsd_uthread_target): Delete function.
8494 (_initialize_bsd_uthread): Remove reference to
8495 complete_target_initialization.
8496
8497 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8498 (target_bfd): ... this new class.
8499 (target_bfd_xfer_partial, target_bfd_get_section_table)
8500 (target_bfd_close): Refactor as target_bfd methods.
8501 (target_bfd::~target_bfd): New.
8502 (target_bfd_reopen): Adjust.
8503 (target_bfd::close): New.
8504
8505 * record-btrace.c (record_btrace_target): New class.
8506 (record_btrace_ops): Now a record_btrace_target.
8507 (record_btrace_open, record_btrace_stop_recording)
8508 (record_btrace_disconnect, record_btrace_close)
8509 (record_btrace_async, record_btrace_info)
8510 (record_btrace_insn_history, record_btrace_insn_history_range)
8511 (record_btrace_insn_history_from, record_btrace_call_history)
8512 (record_btrace_call_history_range)
8513 (record_btrace_call_history_from, record_btrace_record_method)
8514 (record_btrace_is_replaying, record_btrace_will_replay)
8515 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8516 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8517 (record_btrace_store_registers, record_btrace_prepare_to_store)
8518 (record_btrace_to_get_unwinder)
8519 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8520 (record_btrace_commit_resume, record_btrace_wait)
8521 (record_btrace_stop, record_btrace_can_execute_reverse)
8522 (record_btrace_stopped_by_sw_breakpoint)
8523 (record_btrace_supports_stopped_by_sw_breakpoint)
8524 (record_btrace_stopped_by_hw_breakpoint)
8525 (record_btrace_supports_stopped_by_hw_breakpoint)
8526 (record_btrace_update_thread_list, record_btrace_thread_alive)
8527 (record_btrace_goto_begin, record_btrace_goto_end)
8528 (record_btrace_goto, record_btrace_stop_replaying_all)
8529 (record_btrace_execution_direction)
8530 (record_btrace_prepare_to_generate_core)
8531 (record_btrace_done_generating_core): Refactor as
8532 record_btrace_target methods.
8533 (init_record_btrace_ops): Delete.
8534 (_initialize_record_btrace): Remove reference to
8535 init_record_btrace_ops.
8536 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8537 the execution_direction global.
8538 (record_full_base_target, record_full_target)
8539 (record_full_core_target): New classes.
8540 (record_full_ops): Now a record_full_target.
8541 (record_full_core_ops): Now a record_full_core_target.
8542 (record_full_target::detach, record_full_target::disconnect)
8543 (record_full_core_target::disconnect)
8544 (record_full_target::mourn_inferior, record_full_target::kill):
8545 New.
8546 (record_full_open, record_full_close, record_full_async): Refactor
8547 as methods of the record_full_base_target class.
8548 (record_full_resume, record_full_commit_resume): Refactor
8549 as methods of the record_full_target class.
8550 (record_full_wait, record_full_stopped_by_watchpoint)
8551 (record_full_stopped_data_address)
8552 (record_full_stopped_by_sw_breakpoint)
8553 (record_full_supports_stopped_by_sw_breakpoint)
8554 (record_full_stopped_by_hw_breakpoint)
8555 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8556 methods of the record_full_base_target class.
8557 (record_full_store_registers, record_full_xfer_partial)
8558 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8559 Refactor as methods of the record_full_target class.
8560 (record_full_can_execute_reverse, record_full_get_bookmark)
8561 (record_full_goto_bookmark, record_full_execution_direction)
8562 (record_full_record_method, record_full_info, record_full_delete)
8563 (record_full_is_replaying, record_full_will_replay)
8564 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8565 (record_full_stop_replaying): Refactor as methods of the
8566 record_full_base_target class.
8567 (record_full_core_resume, record_full_core_kill)
8568 (record_full_core_fetch_registers)
8569 (record_full_core_prepare_to_store)
8570 (record_full_core_store_registers, record_full_core_xfer_partial)
8571 (record_full_core_insert_breakpoint)
8572 (record_full_core_remove_breakpoint)
8573 (record_full_core_has_execution): Refactor
8574 as methods of the record_full_core_target class.
8575 (record_full_base_target::supports_delete_record): New.
8576 (init_record_full_ops): Delete.
8577 (init_record_full_core_ops): Delete.
8578 (record_full_save): Refactor as method of the
8579 record_full_base_target class.
8580 (_initialize_record_full): Remove references to
8581 init_record_full_ops and init_record_full_core_ops.
8582
8583 * remote.c (remote_target, extended_remote_target): New classes.
8584 (remote_ops): Now a remote_target.
8585 (extended_remote_ops): Now an extended_remote_target.
8586 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8587 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8588 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8589 (remote_pass_signals, remote_set_syscall_catchpoint)
8590 (remote_program_signals, )
8591 (remote_thread_always_alive): Remove target_ops parameter.
8592 (remote_thread_alive, remote_thread_name)
8593 (remote_update_thread_list, remote_threads_extra_info)
8594 (remote_static_tracepoint_marker_at)
8595 (remote_static_tracepoint_markers_by_strid)
8596 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8597 (remote_open): Refactor as methods of remote_target.
8598 (extended_remote_open, extended_remote_detach)
8599 (extended_remote_attach, extended_remote_post_attach):
8600 (extended_remote_supports_disable_randomization)
8601 (extended_remote_create_inferior): : Refactor as method of
8602 extended_remote_target.
8603 (remote_set_permissions, remote_open_1, remote_detach)
8604 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8605 (remote_resume, remote_commit_resume, remote_stop)
8606 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8607 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8608 (remote_prepare_to_store, remote_store_registers)
8609 (remote_flash_erase, remote_flash_done, remote_files_info)
8610 (remote_kill, remote_mourn, remote_insert_breakpoint)
8611 (remote_remove_breakpoint, remote_insert_watchpoint)
8612 (remote_watchpoint_addr_within_range)
8613 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8614 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8615 (remote_supports_stopped_by_sw_breakpoint)
8616 (remote_stopped_by_hw_breakpoint)
8617 (remote_supports_stopped_by_hw_breakpoint)
8618 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8619 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8620 (remote_verify_memory): Refactor as methods of remote_target.
8621 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8622 parameter.
8623 (remote_xfer_partial, remote_get_memory_xfer_limit)
8624 (remote_search_memory, remote_rcmd, remote_memory_map)
8625 (remote_pid_to_str, remote_get_thread_local_address)
8626 (remote_get_tib_address, remote_read_description): Refactor as
8627 methods of remote_target.
8628 (remote_target::fileio_open, remote_target::fileio_pwrite)
8629 (remote_target::fileio_pread, remote_target::fileio_close): New.
8630 (remote_hostio_readlink, remote_hostio_fstat)
8631 (remote_filesystem_is_local, remote_can_execute_reverse)
8632 (remote_supports_non_stop, remote_supports_disable_randomization)
8633 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8634 (remote_supports_enable_disable_tracepoint)
8635 (remote_supports_string_tracing)
8636 (remote_can_run_breakpoint_commands, remote_trace_init)
8637 (remote_download_tracepoint, remote_can_download_tracepoint)
8638 (remote_download_trace_state_variable, remote_enable_tracepoint)
8639 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8640 (remote_trace_start, remote_get_trace_status)
8641 (remote_get_tracepoint_status, remote_trace_stop)
8642 (remote_trace_find, remote_get_trace_state_variable_value)
8643 (remote_save_trace_data, remote_get_raw_trace_data)
8644 (remote_set_disconnected_tracing, remote_core_of_thread)
8645 (remote_set_circular_trace_buffer, remote_traceframe_info)
8646 (remote_get_min_fast_tracepoint_insn_len)
8647 (remote_set_trace_buffer_size, remote_set_trace_notes)
8648 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8649 (remote_disable_btrace, remote_teardown_btrace)
8650 (remote_read_btrace, remote_btrace_conf)
8651 (remote_augmented_libraries_svr4_read, remote_load)
8652 (remote_pid_to_exec_file, remote_can_do_single_step)
8653 (remote_execution_direction, remote_thread_handle_to_thread_info):
8654 Refactor as methods of remote_target.
8655 (init_remote_ops, init_extended_remote_ops): Delete.
8656 (remote_can_async_p, remote_is_async_p, remote_async)
8657 (remote_thread_events, remote_upload_tracepoints)
8658 (remote_upload_trace_state_variables): Refactor as methods of
8659 remote_target.
8660 (_initialize_remote): Remove references to init_remote_ops and
8661 init_extended_remote_ops.
8662
8663 * remote-sim.c (gdbsim_target): New class.
8664 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8665 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8666 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8667 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8668 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8669 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8670 Refactor as methods of gdbsim_target.
8671 (gdbsim_ops): Now a gdbsim_target.
8672 (init_gdbsim_ops): Delete.
8673 (gdbsim_cntrl_c): Adjust.
8674 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8675
8676 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8677 (the_amd64_linux_nat_target): New.
8678 (amd64_linux_fetch_inferior_registers)
8679 (amd64_linux_store_inferior_registers): Refactor as methods of
8680 amd64_linux_nat_target.
8681 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8682 * i386-linux-nat.c: Don't include "linux-nat.h".
8683 (i386_linux_nat_target): New class.
8684 (the_i386_linux_nat_target): New.
8685 (i386_linux_fetch_inferior_registers)
8686 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8687 as methods of i386_linux_nat_target.
8688 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8689 * inf-child.c (inf_child_ops): Delete.
8690 (inf_child_fetch_inferior_registers)
8691 (inf_child_store_inferior_registers): Delete.
8692 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8693 methods of inf_child_target.
8694 (inf_child_target::supports_terminal_ours)
8695 (inf_child_target::terminal_init)
8696 (inf_child_target::terminal_inferior)
8697 (inf_child_target::terminal_ours_for_output)
8698 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8699 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8700 New.
8701 (inf_child_open, inf_child_disconnect, inf_child_close)
8702 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8703 (inf_child_post_startup_inferior, inf_child_can_run)
8704 (inf_child_pid_to_exec_file): Refactor as methods of
8705 inf_child_target.
8706 (inf_child_follow_fork): Delete.
8707 (inf_child_target::can_create_inferior)
8708 (inf_child_target::can_attach): New.
8709 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8710 (inf_child_target::has_stack, inf_child_target::has_registers)
8711 (inf_child_target::has_execution): New.
8712 (inf_child_fileio_open, inf_child_fileio_pwrite)
8713 (inf_child_fileio_pread, inf_child_fileio_fstat)
8714 (inf_child_fileio_close, inf_child_fileio_unlink)
8715 (inf_child_fileio_readlink, inf_child_use_agent)
8716 (inf_child_can_use_agent): Refactor as methods of
8717 inf_child_target.
8718 (return_zero, inf_child_target): Delete.
8719 (inf_child_target::inf_child_target): New.
8720 * inf-child.h: Include "target.h".
8721 (inf_child_target): Delete function prototype.
8722 (inf_child_target): New class.
8723 (inf_child_open_target, inf_child_mourn_inferior)
8724 (inf_child_maybe_unpush_target): Delete.
8725 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8726 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8727 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8728 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8729 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8730 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8731 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8732 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8733 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8734 methods of inf_ptrace_target.
8735 (inf_ptrace_target): Delete function.
8736 * inf-ptrace.h: Include "inf-child.h".
8737 (inf_ptrace_target): Delete function declaration.
8738 (inf_ptrace_target): New class.
8739 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8740 * linux-nat.c (linux_target): New.
8741 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8742 (linux_nat_target::~linux_nat_target): New.
8743 (linux_child_post_attach, linux_child_post_startup_inferior)
8744 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8745 (linux_child_remove_fork_catchpoint)
8746 (linux_child_insert_vfork_catchpoint)
8747 (linux_child_remove_vfork_catchpoint)
8748 (linux_child_insert_exec_catchpoint)
8749 (linux_child_remove_exec_catchpoint)
8750 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8751 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8752 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8753 (linux_nat_stopped_data_address)
8754 (linux_nat_stopped_by_sw_breakpoint)
8755 (linux_nat_supports_stopped_by_sw_breakpoint)
8756 (linux_nat_stopped_by_hw_breakpoint)
8757 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8758 (linux_nat_kill, linux_nat_mourn_inferior)
8759 (linux_nat_xfer_partial, linux_nat_thread_alive)
8760 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8761 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8762 (linux_child_static_tracepoint_markers_by_strid)
8763 (linux_nat_is_async_p, linux_nat_can_async_p)
8764 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8765 (linux_nat_supports_multi_process)
8766 (linux_nat_supports_disable_randomization, linux_nat_async)
8767 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8768 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8769 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8770 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8771 methods of linux_nat_target.
8772 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8773 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8774 parameter.
8775 (check_stopped_by_watchpoint): Adjust.
8776 (linux_xfer_partial): Delete.
8777 (linux_target_install_ops, linux_target, linux_nat_add_target):
8778 Delete.
8779 (linux_nat_target::linux_nat_target): New.
8780 * linux-nat.h: Include "inf-ptrace.h".
8781 (linux_nat_target): New.
8782 (linux_target, linux_target_install_ops, linux_nat_add_target):
8783 Delete function declarations.
8784 (linux_target): Declare global.
8785 * linux-thread-db.c (thread_db_target): New.
8786 (thread_db_target::thread_db_target): New.
8787 (thread_db_ops): Delete.
8788 (the_thread_db_target): New.
8789 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8790 (thread_db_update_thread_list, thread_db_pid_to_str)
8791 (thread_db_extra_thread_info)
8792 (thread_db_thread_handle_to_thread_info)
8793 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8794 (thread_db_resume): Refactor as methods of thread_db_target.
8795 (init_thread_db_ops): Delete.
8796 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8797 * x86-linux-nat.c: Don't include "linux-nat.h".
8798 (super_post_startup_inferior): Delete.
8799 (x86_linux_nat_target::~x86_linux_nat_target): New.
8800 (x86_linux_child_post_startup_inferior)
8801 (x86_linux_read_description, x86_linux_enable_btrace)
8802 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8803 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8804 methods of x86_linux_nat_target.
8805 (x86_linux_create_target): Delete. Bits folded ...
8806 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8807 pointer.
8808 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8809 (x86_linux_nat_target): New class.
8810 (x86_linux_create_target): Delete.
8811 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8812 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8813 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8814 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8815 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8816 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8817 make extern.
8818 (x86_use_watchpoints): Delete.
8819 * x86-nat.h: Include "breakpoint.h" and "target.h".
8820 (x86_use_watchpoints): Delete.
8821 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8822 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8823 (x86_insert_watchpoint, x86_remove_watchpoint)
8824 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8825 (x86_stopped_by_hw_breakpoint): New declarations.
8826 (x86_nat_target): New template class.
8827
8828 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8829 (the_ppc_linux_nat_target): New.
8830 (ppc_linux_fetch_inferior_registers)
8831 (ppc_linux_can_use_hw_breakpoint)
8832 (ppc_linux_region_ok_for_hw_watchpoint)
8833 (ppc_linux_ranged_break_num_registers)
8834 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8835 (ppc_linux_insert_mask_watchpoint)
8836 (ppc_linux_remove_mask_watchpoint)
8837 (ppc_linux_can_accel_watchpoint_condition)
8838 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8839 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8840 (ppc_linux_watchpoint_addr_within_range)
8841 (ppc_linux_masked_watch_num_registers)
8842 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8843 (ppc_linux_read_description): Refactor as methods of
8844 ppc_linux_nat_target.
8845 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8846
8847 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8848 (procfs_target): New class.
8849 (the_procfs_target): New.
8850 (procfs_target): Delete function.
8851 (procfs_auxv_parse, procfs_attach, procfs_detach)
8852 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8853 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8854 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8855 (procfs_create_inferior, procfs_update_thread_list)
8856 (procfs_thread_alive, procfs_pid_to_str)
8857 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8858 (procfs_stopped_data_address, procfs_insert_watchpoint)
8859 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8860 (proc_find_memory_regions, procfs_info_proc)
8861 (procfs_make_note_section): Refactor as methods of procfs_target.
8862 (_initialize_procfs): Adjust.
8863 * sol-thread.c (sol_thread_target): New class.
8864 (sol_thread_ops): Now a sol_thread_target.
8865 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8866 (sol_thread_fetch_registers, sol_thread_store_registers)
8867 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8868 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8869 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8870 (init_sol_thread_ops): Delete.
8871 (_initialize_sol_thread): Adjust. Remove references to
8872 init_sol_thread_ops and complete_target_initialization.
8873
8874 * windows-nat.c (windows_nat_target): New class.
8875 (windows_fetch_inferior_registers)
8876 (windows_store_inferior_registers, windows_resume, windows_wait)
8877 (windows_attach, windows_detach, windows_pid_to_exec_file)
8878 (windows_files_info, windows_create_inferior)
8879 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8880 (windows_close, windows_pid_to_str, windows_xfer_partial)
8881 (windows_get_tib_address, windows_get_ada_task_ptid)
8882 (windows_thread_name, windows_thread_alive): Refactor as
8883 windows_nat_target methods.
8884 (do_initial_windows_stuff): Adjust.
8885 (windows_target): Delete function.
8886 (_initialize_windows_nat): Adjust.
8887
8888 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8889 (darwin_mourn_inferior, darwin_kill_inferior)
8890 (darwin_create_inferior, darwin_attach, darwin_detach)
8891 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8892 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8893 (darwin_supports_multi_process): Refactor as darwin_nat_target
8894 methods.
8895 (darwin_resume_to, darwin_files_info): Delete.
8896 (_initialize_darwin_inferior): Rename to ...
8897 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8898 * darwin-nat.h: Include "inf-child.h".
8899 (darwin_nat_target): New class.
8900 (darwin_complete_target): Delete.
8901 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8902 (darwin_target): New.
8903 (i386_darwin_fetch_inferior_registers)
8904 (i386_darwin_store_inferior_registers): Refactor as methods of
8905 darwin_nat_target.
8906 (darwin_complete_target): Delete, with ...
8907 (_initialize_i386_darwin_nat): ... bits factored out here.
8908
8909 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8910 (the_alpha_linux_nat_target): New.
8911 (alpha_linux_register_u_offset): Refactor as
8912 alpha_linux_nat_target method.
8913 (_initialize_alpha_linux_nat): Adjust.
8914 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8915 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8916 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8917 methods of linux_nat_trad_target.
8918 (linux_trad_target): Delete.
8919 * linux-nat-trad.h (linux_trad_target): Delete function.
8920 (linux_nat_trad_target): New class.
8921 * mips-linux-nat.c (mips_linux_nat_target): New class.
8922 (super_fetch_registers, super_store_registers, super_close):
8923 Delete.
8924 (the_mips_linux_nat_target): New.
8925 (mips64_linux_regsets_fetch_registers)
8926 (mips64_linux_regsets_store_registers)
8927 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8928 (mips_linux_register_u_offset, mips_linux_read_description)
8929 (mips_linux_can_use_hw_breakpoint)
8930 (mips_linux_stopped_by_watchpoint)
8931 (mips_linux_stopped_data_address)
8932 (mips_linux_region_ok_for_hw_watchpoint)
8933 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8934 (mips_linux_close): Refactor as methods of mips_linux_nat.
8935 (_initialize_mips_linux_nat): Adjust to C++ification.
8936
8937 * aix-thread.c (aix_thread_target): New class.
8938 (aix_thread_ops): Now an aix_thread_target.
8939 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8940 (aix_thread_fetch_registers, aix_thread_store_registers)
8941 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8942 (aix_thread_thread_alive, aix_thread_pid_to_str)
8943 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8944 Refactor as methods of aix_thread_target.
8945 (init_aix_thread_ops): Delete.
8946 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8947 and complete_target_initialization.
8948 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8949 (rs6000_nat_target): New class.
8950 (the_rs6000_nat_target): New.
8951 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8952 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8953 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8954 (super_create_inferior): Delete.
8955 (_initialize_rs6000_nat): Adjust to C++ification.
8956
8957 * arm-linux-nat.c (arm_linux_nat_target): New class.
8958 (the_arm_linux_nat_target): New.
8959 (arm_linux_fetch_inferior_registers)
8960 (arm_linux_store_inferior_registers, arm_linux_read_description)
8961 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8962 (arm_linux_remove_hw_breakpoint)
8963 (arm_linux_region_ok_for_hw_watchpoint)
8964 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8965 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8966 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8967 arm_linux_nat_target.
8968 (_initialize_arm_linux_nat): Adjust to C++ification.
8969
8970 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8971 (the_aarch64_linux_nat_target): New.
8972 (aarch64_linux_fetch_inferior_registers)
8973 (aarch64_linux_store_inferior_registers)
8974 (aarch64_linux_child_post_startup_inferior)
8975 (aarch64_linux_read_description)
8976 (aarch64_linux_can_use_hw_breakpoint)
8977 (aarch64_linux_insert_hw_breakpoint)
8978 (aarch64_linux_remove_hw_breakpoint)
8979 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8980 (aarch64_linux_region_ok_for_hw_watchpoint)
8981 (aarch64_linux_stopped_data_address)
8982 (aarch64_linux_stopped_by_watchpoint)
8983 (aarch64_linux_watchpoint_addr_within_range)
8984 (aarch64_linux_can_do_single_step): Refactor as methods of
8985 aarch64_linux_nat_target.
8986 (super_post_startup_inferior): Delete.
8987 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8988
8989 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8990 (the_hppa_linux_nat_target): New.
8991 (hppa_linux_fetch_inferior_registers)
8992 (hppa_linux_store_inferior_registers): Refactor as methods of
8993 hppa_linux_nat_target.
8994 (_initialize_hppa_linux_nat): Adjust to C++ification.
8995
8996 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8997 (the_ia64_linux_nat_target): New.
8998 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8999 (ia64_linux_stopped_data_address)
9000 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9001 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9002 ia64_linux_nat_target methods.
9003 (super_xfer_partial): Delete.
9004 (_initialize_ia64_linux_nat): Adjust to C++ification.
9005
9006 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9007 (the_m32r_linux_nat_target): New.
9008 (m32r_linux_fetch_inferior_registers)
9009 (m32r_linux_store_inferior_registers): Refactor as
9010 m32r_linux_nat_target methods.
9011 (_initialize_m32r_linux_nat): Adjust to C++ification.
9012
9013 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9014 (the_m68k_linux_nat_target): New.
9015 (m68k_linux_fetch_inferior_registers)
9016 (m68k_linux_store_inferior_registers): Refactor as
9017 m68k_linux_nat_target methods.
9018 (_initialize_m68k_linux_nat): Adjust to C++ification.
9019
9020 * s390-linux-nat.c (s390_linux_nat_target): New class.
9021 (the_s390_linux_nat_target): New.
9022 (s390_linux_fetch_inferior_registers)
9023 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9024 (s390_insert_watchpoint, s390_remove_watchpoint)
9025 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9026 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9027 (s390_auxv_parse, s390_read_description): Refactor as methods of
9028 s390_linux_nat_target.
9029 (_initialize_s390_nat): Adjust to C++ification.
9030
9031 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9032 (the_sparc_linux_nat_target): New.
9033 (_initialize_sparc_linux_nat): Adjust to C++ification.
9034 * sparc-nat.c (sparc_fetch_inferior_registers)
9035 (sparc_store_inferior_registers): Remove target_ops parameter.
9036 * sparc-nat.h (sparc_fetch_inferior_registers)
9037 (sparc_store_inferior_registers): Remove target_ops parameter.
9038 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9039 (the_sparc64_linux_nat_target): New.
9040 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9041
9042 * spu-linux-nat.c (spu_linux_nat_target): New class.
9043 (the_spu_linux_nat_target): New.
9044 (spu_child_post_startup_inferior, spu_child_post_attach)
9045 (spu_child_wait, spu_fetch_inferior_registers)
9046 (spu_store_inferior_registers, spu_xfer_partial)
9047 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9048 methods.
9049 (_initialize_spu_nat): Adjust to C++ification.
9050
9051 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9052 (the_tilegx_linux_nat_target): New.
9053 (fetch_inferior_registers, store_inferior_registers):
9054 Refactor as methods.
9055 (_initialize_tile_linux_nat): Adjust to C++ification.
9056
9057 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9058 (the_xtensa_linux_nat_target): New.
9059 (xtensa_linux_fetch_inferior_registers)
9060 (xtensa_linux_store_inferior_registers): Refactor as
9061 xtensa_linux_nat_target methods.
9062 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9063
9064 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9065 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9066 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9067 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9068 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9069 (fbsd_stopped_by_sw_breakpoint)
9070 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9071 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9072 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9073 (fbsd_post_startup_inferior, fbsd_post_attach)
9074 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9075 (fbsd_set_syscall_catchpoint)
9076 (super_xfer_partial, super_resume, super_wait)
9077 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9078 (fbsd_handle_debug_trap): Remove target_ops parameter.
9079 (fbsd_nat_add_target): Delete.
9080 * fbsd-nat.h: Include "inf-ptrace.h".
9081 (fbsd_nat_add_target): Delete.
9082 (USE_SIGTRAP_SIGINFO): Define.
9083 (fbsd_nat_target): New class.
9084
9085 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9086 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9087 (amd64bsd_target): Delete.
9088 * amd64-bsd-nat.h: New file.
9089 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9090 "x86-bsd-nat.h".
9091 (amd64_fbsd_nat_target): New class.
9092 (the_amd64_fbsd_nat_target): New.
9093 (amd64fbsd_read_description): Refactor as method of
9094 amd64_fbsd_nat_target.
9095 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9096 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9097 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9098 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9099 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9100 (i386bsd_target): Delete.
9101 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9102 (i386bsd_fetch_inferior_registers)
9103 (i386bsd_store_inferior_registers): Declare.
9104 (i386_bsd_nat_target): New class.
9105 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9106 (the_i386_fbsd_nat_target): New.
9107 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9108 i386_fbsd_nat_target methods.
9109 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9110 (_initialize_i386fbsd_nat): Adjust to C++ification.
9111 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9112 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9113 (_initialize_x86_bsd_nat): Adjust to C++ification.
9114 * x86-bsd-nat.h: Include "x86-nat.h".
9115 (x86bsd_target): Delete declaration.
9116 (x86bsd_nat_target): New class.
9117
9118 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9119 (the_aarch64_fbsd_nat_target): New.
9120 (aarch64_fbsd_fetch_inferior_registers)
9121 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9122 aarch64_fbsd_nat_target.
9123 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9124 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9125 (the_alpha_bsd_nat_target): New.
9126 (alphabsd_fetch_inferior_registers)
9127 (alphabsd_store_inferior_registers): Refactor as
9128 alpha_bsd_nat_target methods.
9129 (_initialize_alphabsd_nat): Refactor as methods of
9130 alpha_bsd_nat_target.
9131 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9132 (the_amd64_nbsd_nat_target): New.
9133 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9134 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9135 (the_amd64_obsd_nat_target): New.
9136 (_initialize_amd64obsd_nat): Adjust to C++ification.
9137 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9138 (the_arm_fbsd_nat_target): New.
9139 (arm_fbsd_fetch_inferior_registers)
9140 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9141 (_initialize_arm_fbsd_nat): Refactor as methods of
9142 arm_fbsd_nat_target.
9143 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9144 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9145 (the_arm_netbsd_nat_target): New.
9146 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9147 arm_netbsd_nat_target.
9148 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9149 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9150 (the_hppa_nbsd_nat_target): New.
9151 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9152 hppa_nbsd_nat_target methods.
9153 (_initialize_hppanbsd_nat): Adjust to C++ification.
9154 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9155 (the_hppa_obsd_nat_target): New.
9156 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9157 methods of hppa_obsd_nat_target.
9158 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9159 add_target.
9160 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9161 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9162 add_target.
9163 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9164 (_initialize_i386obsd_nat): Use add_target.
9165 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9166 (the_m68k_bsd_nat_target): New.
9167 (m68kbsd_fetch_inferior_registers)
9168 (m68kbsd_store_inferior_registers): Refactor as methods of
9169 m68k_bsd_nat_target.
9170 (_initialize_m68kbsd_nat): Adjust to C++ification.
9171 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9172 (the_mips_fbsd_nat_target): New.
9173 (mips_fbsd_fetch_inferior_registers)
9174 (mips_fbsd_store_inferior_registers): Refactor as methods of
9175 mips_fbsd_nat_target.
9176 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9177 add_target.
9178 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9179 (the_mips_nbsd_nat_target): New.
9180 (mipsnbsd_fetch_inferior_registers)
9181 (mipsnbsd_store_inferior_registers): Refactor as methods of
9182 mips_nbsd_nat_target.
9183 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9184 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9185 (the_mips64_obsd_nat_target): New.
9186 (mips64obsd_fetch_inferior_registers)
9187 (mips64obsd_store_inferior_registers): Refactor as methods of
9188 mips64_obsd_nat_target.
9189 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9190 add_target.
9191 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9192 nbsd_nat_target.
9193 * nbsd-nat.h: Include "inf-ptrace.h".
9194 (nbsd_nat_target): New class.
9195 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9196 (obsd_wait): Refactor as methods of obsd_nat_target.
9197 (obsd_add_target): Delete.
9198 * obsd-nat.h: Include "inf-ptrace.h".
9199 (obsd_nat_target): New class.
9200 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9201 (the_ppc_fbsd_nat_target): New.
9202 (ppcfbsd_fetch_inferior_registers)
9203 (ppcfbsd_store_inferior_registers): Refactor as methods of
9204 ppc_fbsd_nat_target.
9205 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9206 add_target.
9207 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9208 (the_ppc_nbsd_nat_target): New.
9209 (ppcnbsd_fetch_inferior_registers)
9210 (ppcnbsd_store_inferior_registers): Refactor as methods of
9211 ppc_nbsd_nat_target.
9212 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9213 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9214 (the_ppc_obsd_nat_target): New.
9215 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9216 methods of ppc_obsd_nat_target.
9217 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9218 add_target.
9219 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9220 (the_sh_nbsd_nat_target): New.
9221 (shnbsd_fetch_inferior_registers)
9222 (shnbsd_store_inferior_registers): Refactor as methods of
9223 sh_nbsd_nat_target.
9224 (_initialize_shnbsd_nat): Adjust to C++ification.
9225 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9226 (inf_ptrace_xfer_partial): Delete.
9227 (sparc_xfer_partial, sparc_target): Delete.
9228 * sparc-nat.h (sparc_fetch_inferior_registers)
9229 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9230 (sparc_target): Delete function declaration.
9231 (sparc_target): New template class.
9232 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9233 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9234 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9235 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9236 add_target.
9237 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9238 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9239 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9240 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9241 add_target.
9242 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9243 (the_vax_bsd_nat_target): New.
9244 (vaxbsd_fetch_inferior_registers)
9245 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9246 methods.
9247 (_initialize_vaxbsd_nat): Adjust to C++ification.
9248
9249 * bsd-kvm.c (bsd_kvm_target): New class.
9250 (bsd_kvm_ops): Now a bsd_kvm_target.
9251 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9252 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9253 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9254 bsd_kvm_target.
9255 (bsd_kvm_return_one): Delete.
9256 (bsd_kvm_add_target): Adjust to C++ification.
9257
9258 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9259 (nto_procfs_target_procfs): New classes.
9260 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9261 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9262 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9263 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9264 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9265 (procfs_remove_hw_breakpoint, procfs_resume)
9266 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9267 (procfs_kill_inferior, procfs_store_registers)
9268 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9269 as methods of nto_procfs_target.
9270 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9271 (nto_native_ops): Delete.
9272 (procfs_open, procfs_native_open): Delete.
9273 (nto_native_ops): Now an nto_procfs_target_native.
9274 (init_procfs_targets): Adjust to C++ification.
9275 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9276 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9277 Refactor as methods of nto_procfs_target.
9278
9279 * go32-nat.c (go32_nat_target): New class.
9280 (the_go32_nat_target): New.
9281 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9282 (go32_store_registers, go32_xfer_partial, go32_files_info)
9283 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9284 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9285 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9286 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9287 (go32_target): Delete.
9288 (_initialize_go32_nat): Adjust to C++ification.
9289
9290 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9291 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9292 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9293 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9294 gnu_nat_target.
9295 (gnu_target): Delete.
9296 * gnu-nat.h (gnu_target): Delete.
9297 (gnu_nat_target): New class.
9298 * i386-gnu-nat.c (gnu_base_target): New.
9299 (i386_gnu_nat_target): New class.
9300 (the_i386_gnu_nat_target): New.
9301 (_initialize_i386gnu_nat): Adjust to C++ification.
9302
9303 2018-05-02 Pedro Alves <palves@redhat.com>
9304
9305 * bfd-target.c (target_bfd_xclose): Rename to ...
9306 (target_bfd_close): ... this.
9307 (target_bfd_reopen): Adjust.
9308 * target.c (target_close): Remove references to to_xclose.
9309 * target.h (target_ops::to_xclose): Delete.
9310 (target_ops::to_close): Update comments.
9311
9312 2018-05-02 Pedro Alves <palves@redhat.com>
9313
9314 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9315 "linux-nat.h".
9316 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9317 * inf-ptrace.c (inf_ptrace_register_u_offset)
9318 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9319 (inf_ptrace_store_register, inf_ptrace_store_registers)
9320 (inf_ptrace_trad_target): Move to ...
9321 * linux-nat-trad.c: ... this new file.
9322 * linux-nat-trad.h: New file.
9323 * linux-nat.c (linux_target_install_ops): Make extern.
9324 (linux_trad_target): Delete.
9325 * linux-nat.h (linux_trad_target): Delete declaration.
9326 (linux_target_install_ops): Declare.
9327 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9328 "linux-nat.h".
9329
9330 2018-05-02 Pedro Alves <palves@redhat.com>
9331
9332 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9333 procfs_target/add_target here.
9334 * procfs.c (procfs_target): Make static.
9335 (_initialize_procfs): Call add_target here.
9336 * procfs.h (struct target_ops): Remove forward declaration.
9337 (procfs_target): Remove declaration.
9338 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9339
9340 2018-05-02 Pedro Alves <palves@redhat.com>
9341
9342 * procfs.c (procfs_stopped_by_watchpoint)
9343 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9344 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9345 Forward declare.
9346 (procfs_use_watchpoints): Delete, move contents...
9347 (procfs_target): ... here.
9348 * procfs.h (procfs_use_watchpoints): Delete declaration.
9349 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9350 procfs_use_watchpoints.
9351 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9352 procfs_use_watchpoints.
9353
9354 2018-05-02 Tom Tromey <tom@tromey.com>
9355
9356 PR python/20084:
9357 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9358 and var_zuinteger_unlimited.
9359 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9360 and PARAM_ZUINTEGER_UNLIMITED.
9361 (set_parameter_value): Handle var_zuinteger and
9362 var_zuinteger_unlimited.
9363 (add_setshow_generic): Likewise.
9364 (parmpy_init): Likewise.
9365
9366 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9367
9368 PR rust/23124
9369 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9370 pointer is not null before dereferencing it.
9371
9372 2018-04-30 Tom Tromey <tom@tromey.com>
9373
9374 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9375 is_mi_like_p.
9376
9377 2018-04-30 Tom Tromey <tom@tromey.com>
9378
9379 * breakpoint.c (mention): Remove use of is_mi_like_p.
9380 (print_mention_ranged_breakpoint): Likewise.
9381 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9382 of is_mi_like_p.
9383
9384 2018-04-30 Tom Tromey <tom@tromey.com>
9385
9386 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9387
9388 2018-04-30 Tom Tromey <tom@tromey.com>
9389
9390 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9391 (info_spu_event_command): Remove some uses of is_mi_like_p.
9392
9393 2018-04-30 Tom Tromey <tom@tromey.com>
9394
9395 * python/py-framefilter.c (py_print_single_arg)
9396 (enumerate_locals, py_print_args, py_print_frame): Remove some
9397 uses of is_mi_like_p.
9398
9399 2018-04-30 Tom Tromey <tom@tromey.com>
9400
9401 * ui-out.c: Update.
9402 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9403 * ui-out.h (ui_out::is_mi_like_p): Now const.
9404 (ui_out::do_is_mi_like_p): Now const.
9405 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9406
9407 2018-04-30 Tom Tromey <tom@tromey.com>
9408
9409 * varobj.c (varobj_set_visualizer): Use new_reference.
9410 * python/python.c (gdbpy_decode_line): Use new_reference.
9411 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9412 new_reference.
9413
9414 2018-04-30 Tom Tromey <tom@tromey.com>
9415
9416 * varobj.c (install_new_value): Use new_reference.
9417 * value.h (value_incref): Return void. Swap intro comment with
9418 value_decref.
9419 * value.c (set_value_parent): Use new_reference.
9420 (value_incref): Return void. Update intro comment.
9421 (release_value): Use new_reference.
9422 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9423
9424 2018-04-30 Tom Tromey <tom@tromey.com>
9425
9426 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9427 * gdb_bfd.h (new_bfd_ref): Remove.
9428 (gdb_bfd_open): Update comment.
9429 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9430 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9431 (gdb_bfd_fdopenr): Use new_reference.
9432 * exec.c (exec_file_attach): Use new_reference.
9433
9434 2018-04-30 Tom Tromey <tom@tromey.com>
9435
9436 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9437 method.
9438
9439 2018-04-30 Tom Tromey <tom@tromey.com>
9440
9441 * jit.c (jit_read_code_entry): Use type_align.
9442 * i386-tdep.c (i386_gdbarch_init): Don't call
9443 set_gdbarch_long_long_align_bit.
9444 * gdbarch.sh: Remove long_long_align_bit.
9445 * gdbarch.c, gdbarch.h: Rebuild.
9446 * arc-tdep.c (arc_type_align): New function.
9447 (arc_gdbarch_init): Use arc_type_align. Don't call
9448 set_gdbarch_long_long_align_bit.
9449
9450 2018-04-30 Tom Tromey <tom@tromey.com>
9451
9452 * rust-lang.c (rust_type_alignment): Remove.
9453 (rust_composite_type): Use type_align.
9454
9455 2018-04-30 Tom Tromey <tom@tromey.com>
9456
9457 * NEWS: Mention Type.align.
9458 * python/py-type.c (typy_get_alignof): New function.
9459 (type_object_getset): Add "alignof".
9460
9461 2018-04-30 Tom Tromey <tom@tromey.com>
9462
9463 PR exp/17095:
9464 * NEWS: Update.
9465 * std-operator.def (UNOP_ALIGNOF): New operator.
9466 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9467 New.
9468 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9469 * c-lang.c (c_op_print_tab): Add alignof.
9470 * c-exp.y (ALIGNOF): New token.
9471 (exp): Add "ALIGNOF" production.
9472 (ident_tokens): Add _Alignof and alignof.
9473
9474 2018-04-30 Tom Tromey <tom@tromey.com>
9475
9476 * i386-tdep.c (i386_type_align): New function.
9477 (i386_gdbarch_init): Update.
9478 * gdbarch.sh (type_align): New method.
9479 * gdbarch.c, gdbarch.h: Rebuild.
9480 * arch-utils.h (default_type_align): Declare.
9481 * arch-utils.c (default_type_align): New function.
9482 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9483 (struct type) <align_log2>: New field.
9484 <instance_flags>: Now a bitfield.
9485 (TYPE_RAW_ALIGN): New macro.
9486 (type_align, type_raw_align, set_type_align): Declare.
9487 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9488 functions.
9489 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9490 (get_alignment, maybe_set_alignment): New functions.
9491 (read_structure_type, read_enumeration_type, read_array_type)
9492 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9493 (read_subrange_type, read_base_type): Set type alignment.
9494
9495 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9496
9497 * dwarf2read.c (read_index_from_section): Use bool.
9498
9499 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9500
9501 PR gdb/22950
9502 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9503 with #ifdef.
9504
9505 2018-04-29 John Reiser <jreiser@BitWagon.com>
9506
9507 PR build/22873
9508 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9509 last step, and do it atomically.
9510
9511 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9512
9513 * compile/compile-c-types.c (convert_int, convert_float):
9514 Update for C FE v1.
9515
9516 2018-04-27 Tom Tromey <tom@tromey.com>
9517
9518 PR rust/22545:
9519 * rust-lang.c (rust_inclusive_range_type_p): New function.
9520 (rust_range): Handle inclusive ranges.
9521 (rust_compute_range): Likewise.
9522 * rust-exp.y (struct rust_op) <inclusive>: New field.
9523 (DOTDOTEQ): New constant.
9524 (range_expr): Add "..=" productions.
9525 (operator_tokens): Add "..=" token.
9526 (ast_range): Add "inclusive" parameter.
9527 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9528 ranges.
9529 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9530 bounds values.
9531 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9532 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9533 Update comments.
9534 * expprint.c (print_subexp_standard): Handle new bounds values.
9535 (dump_subexp_body_standard): Likewise.
9536
9537 2018-04-27 Tom Tromey <tom@tromey.com>
9538
9539 * configure: Rebuild.
9540 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9541 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9542 "OVERRIDE".
9543 (class symbol_needs_eval_context): Likewise.
9544 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9545 (mock_mapped_index::symbol_name_at): Use "override". Remove
9546 "virtual".
9547 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9548 "override".
9549 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9550 * aarch64-tdep.c (instruction_reader::read): Use "override".
9551 (instruction_reader_test::read): Likewise.
9552 * arm-tdep.c (instruction_reader::read): Use "override".
9553 (instruction_reader_thumb::read): Likewise.
9554
9555 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9556
9557 PR remote/9665
9558 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9559 instead of remote_send.
9560 (remote_send): Remove.
9561
9562 2018-04-26 Pedro Alves <palves@redhat.com>
9563
9564 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9565 find_function_start_sal instead of find_pc_line.
9566
9567 2018-04-26 Pedro Alves <palves@redhat.com>
9568
9569 * breakpoint.c (set_breakpoint_location_function): Handle
9570 mst_data_gnu_ifunc.
9571 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9572 * elfread.c (elf_symtab_read): Give data symbols with
9573 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9574 (elf_rel_plt_read): Update comment.
9575 * linespec.c (convert_linespec_to_sals): Handle
9576 mst_data_gnu_ifunc.
9577 (minsym_found): Handle mst_data_gnu_ifunc.
9578 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9579 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9580 * parse.c (find_minsym_type_and_address): Handle
9581 mst_data_gnu_ifunc.
9582 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9583 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9584 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9585 comment.
9586 <mst_data_gnu_ifunc>: New enumerator.
9587
9588 2018-04-26 Pedro Alves <palves@redhat.com>
9589
9590 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9591 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9592 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9593 Handle it.
9594 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9595 (lookup_minimal_symbol_by_pc): Adjust.
9596 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9597 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9598 * minsyms.h (lookup_msym_prefer): New enum.
9599 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9600 parameter by a lookup_msym_prefer parameter.
9601
9602 2018-04-26 Pedro Alves <palves@redhat.com>
9603
9604 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9605 ends in "@plt" instead of looking at the symbol's section.
9606
9607 2018-04-26 Pedro Alves <palves@redhat.com>
9608
9609 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9610 all references.
9611 (find_pc_partial_function_gnu_ifunc): Rename to ...
9612 (find_pc_partial_function): ... this, and remove references to
9613 'is_gnu_ifunc_p'.
9614 (find_pc_partial_function): Delete old implementation.
9615 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9616
9617 2018-04-26 Pedro Alves <palves@redhat.com>
9618
9619 * linespec.c (struct bound_minimal_symbol_search_key): New.
9620 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9621 skip first line if we found a GNU ifunc minimal symbol by name.
9622 (compare_msymbols): Change parameters to work with a destructured
9623 lhs minsym.
9624 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9625 functions.
9626
9627 2018-04-26 Pedro Alves <palves@redhat.com>
9628
9629 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9630 ifunc targets here. Instead, if we have an ifunc minsym, use its
9631 address/name.
9632 (add_location_to_breakpoint): Store the minsym and the objfile in
9633 the breakpoint location.
9634 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9635 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9636 Record the minsym in the sal.
9637 * symtab.h (symtab_and_line) <msymbol>: New field.
9638
9639 2018-04-26 Pedro Alves <palves@redhat.com>
9640
9641 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9642 unless we actually resolved the ifunc.
9643
9644 2018-04-26 Pedro Alves <palves@redhat.com>
9645
9646 * c-exp.y (variable production): Prefer ifunc minsyms over
9647 regular function symbols.
9648 * symtab.c (find_gnu_ifunc): New function.
9649 * minsyms.h (lookup_msym_prefer): New enum.
9650 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9651 parameter by a lookup_msym_prefer parameter.
9652 * symtab.h (find_gnu_ifunc): New declaration.
9653
9654 2018-04-26 Pedro Alves <palves@redhat.com>
9655
9656 * blockframe.c (find_gnu_ifunc_target_type): New function.
9657 (find_function_type): New.
9658 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9659 return a value with a memory address.
9660 (eval_call): For calls to GNU ifunc functions, try to find the
9661 type of the target function from the type that the resolver
9662 returns.
9663 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9664 symbols.
9665 * infcall.c (find_function_return_type): Delete.
9666 (find_function_addr): Add 'function_type' parameter. For calls to
9667 GNU ifunc functions, try to find the type of the target function
9668 from the type that the resolver returns, and return it via
9669 FUNCTION_TYPE.
9670 (call_function_by_hand_dummy): Adjust to use the function type
9671 returned by find_function_addr.
9672 (find_function_addr): Add 'function_type' parameter and move
9673 description here.
9674 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9675 declarations.
9676
9677 2018-04-26 Pedro Alves <palves@redhat.com>
9678
9679 * c-exp.y (variable production): Skip finding an alias for ifunc
9680 symbols.
9681
9682 2018-04-26 Pedro Alves <palves@redhat.com>
9683
9684 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9685
9686 2018-04-25 Pedro Alves <palves@redhat.com>
9687
9688 * infcmd.c (kill_command): Print the pid as string, not the whole
9689 thread's ptid. Add comment. s/has been killed/killed/ in output
9690 message.
9691 * remote.c (remote_detach_1): Print the pid as string, not the
9692 whole thread's ptid.
9693
9694 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9695 Sergio Durigan Junior <sergiodj@redhat.com>
9696 Pedro Alves <palves@redhat.com>
9697
9698 * infcmd.c (kill_command): Print message when inferior has
9699 been killed.
9700 * inferior.c (print_inferior_events): Remove 'static'. Set as
9701 '1'.
9702 (add_inferior): Improve message printed when
9703 'print_inferior_events' is on.
9704 (exit_inferior): Remove message printed when
9705 'print_inferior_events' is on.
9706 (detach_inferior): Improve message printed when
9707 'print_inferior_events' is on.
9708 (initialize_inferiors): Use 'add_inferior_silent' to set
9709 'current_inferior_'.
9710 * inferior.h (print_inferior_events): Declare here as
9711 'extern'.
9712 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9713 '[Detaching...]' messages when 'print_inferior_events' is on.
9714 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9715 as prefix/suffix for messages. Remove periods. Fix erroneous
9716 'Detaching after fork from child...', replace it by '... from
9717 parent...'.
9718 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9719 prefix/suffix when printing 'Detaching...' messages. Print
9720 them when 'print_inferior_events' is on.
9721 * remote.c (remote_detach_1): Print message when detaching
9722 from inferior and '!is_fork_parent'.
9723
9724 2018-04-24 Tom Tromey <tom@tromey.com>
9725
9726 * cli-out.h: Reindent.
9727
9728 2018-04-24 Tom Tromey <tom@tromey.com>
9729
9730 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9731 (cli_ui_out::do_field_string): Use fputs_filtered.
9732 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9733
9734 2018-04-23 Tom Tromey <tom@tromey.com>
9735
9736 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9737 gdb::unique_xmalloc_ptr.
9738
9739 2018-04-23 Tom Tromey <tom@tromey.com>
9740
9741 * configure: Rebuild.
9742
9743 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9744
9745 PR gdb/23095
9746 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9747 prepare_for_testing. Set normal_bp to r_debug_state if target
9748 is bsd.
9749
9750 2018-04-21 Pedro Alves <palves@redhat.com>
9751 Rajendra SY <rajendra.sy@gmail.com>
9752
9753 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9754 * remote.c (extended_remote_attach): In all-stop mode, mark the
9755 thread as executing.
9756
9757 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9758
9759 * thread.c (thread_apply_all_command): Fix comment.
9760 (thread_command): Fix comment.
9761
9762 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9763
9764 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9765 parameter.
9766 * features/aarch64-core.c (create_feature_aarch64_core):
9767 Regenerate.
9768 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9769 Likewise.
9770 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9771 Likewise.
9772 * features/i386/32bit-avx512.c
9773 (create_feature_i386_32bit_avx512): Likewise.
9774 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9775 Likewise.
9776 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9777 Likewise.
9778 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9779 Likewise.
9780 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9781 Likewise.
9782 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9783 Likewise.
9784 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9785 Likewise.
9786 * features/i386/64bit-avx512.c
9787 (create_feature_i386_64bit_avx512): Likewise.
9788 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9789 Likewise.
9790 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9791 Likewise.
9792 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9793 Likewise.
9794 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9795 Likewise.
9796 * features/i386/64bit-segments.c
9797 (create_feature_i386_64bit_segments): Likewise.
9798 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9799 Likewise.
9800 * features/i386/x32-core.c
9801 (create_feature_i386_x32_core): Likewise.
9802 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9803 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9804 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9805 * target-descriptions.c: In generated code, don't pass xml
9806 filename.
9807
9808 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9809
9810 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9811 (print_xml_feature::visit_post): Likewise.
9812 (print_xml_feature::visit): Likewise.
9813 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9814 (print_xml_feature): Add new class.
9815 * regformats/regdat.sh: Null xmltarget on feature targets.
9816 * target-descriptions.c (struct target_desc): Add xmltarget.
9817 (maintenance_check_tdesc_xml_convert): Add unittest function.
9818 (tdesc_get_features_xml): Add function to get xml.
9819 (maintenance_check_xml_descriptions): Test xml generation.
9820 * xml-tdesc.c (string_read_description_xml): Add function.
9821 * xml-tdesc.h (string_read_description_xml): Add declaration.
9822
9823 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9824
9825 * features/Makefile: Add feature marker to targets with new style
9826 target descriptions.
9827 * regformats/aarch64.dat: Regenerate.
9828 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9829 * regformats/i386/amd64-avx-linux.dat: Likewise.
9830 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9831 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9832 * regformats/i386/amd64-linux.dat: Likewise.
9833 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9834 * regformats/i386/amd64.dat: Likewise.
9835 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9836 * regformats/i386/i386-avx-linux.dat: Likewise.
9837 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9838 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9839 * regformats/i386/i386-linux.dat: Likewise.
9840 * regformats/i386/i386-mmx-linux.dat: Likewise.
9841 * regformats/i386/i386-mpx-linux.dat: Likewise.
9842 * regformats/i386/i386.dat: Likewise.
9843 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9844 * regformats/i386/x32-avx-linux.dat: Likewise.
9845 * regformats/i386/x32-linux.dat: Likewise.
9846 * regformats/tic6x-c62x-linux.dat: Likewise.
9847 * regformats/tic6x-c64x-linux.dat: Likewise.
9848 * regformats/tic6x-c64xp-linux.dat: Likewise.
9849 * regformats/regdat.sh: Parse feature marker.
9850
9851 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9852
9853 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9854 (tdesc_osabi_name): Likewise.
9855 * target-descriptions.c (tdesc_architecture_name): Add new
9856 function.
9857 (tdesc_osabi_name): Likewise.
9858
9859 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9860
9861 * common/tdesc.c (tdesc_predefined_type): Move to here.
9862 (tdesc_named_type): Likewise.
9863 (tdesc_create_vector): Likewise.
9864 (tdesc_create_struct): Likewise.
9865 (tdesc_set_struct_size): Likewise.
9866 (tdesc_create_union): Likewise.
9867 (tdesc_create_flags): Likewise.
9868 (tdesc_create_enum): Likewise.
9869 (tdesc_add_field): Likewise.
9870 (tdesc_add_typed_bitfield): Likewise.
9871 (tdesc_add_bitfield): Likewise.
9872 (tdesc_add_flag): Likewise.
9873 (tdesc_add_enum_value): Likewise.
9874 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9875 (struct tdesc_type_vector): Likewise.
9876 (struct tdesc_type_field): Likewise.
9877 (struct tdesc_type_with_fields): Likewise.
9878 (tdesc_create_enum): Add declaration.
9879 (tdesc_add_typed_bitfield): Likewise.
9880 (tdesc_add_enum_value): Likewise.
9881 * target-descriptions.c (tdesc_type_field): Move from here.
9882 (tdesc_type_builtin): Likewise.
9883 (tdesc_type_vector): Likewise.
9884 (tdesc_type_with_fields): Likewise.
9885 (tdesc_predefined_types): Likewise.
9886 (tdesc_named_type): Likewise.
9887 (tdesc_create_vector): Likewise.
9888 (tdesc_create_struct): Likewise.
9889 (tdesc_set_struct_size): Likewise.
9890 (tdesc_create_union): Likewise.
9891 (tdesc_create_flags): Likewise.
9892 (tdesc_create_enum): Likewise.
9893 (tdesc_add_field): Likewise.
9894 (tdesc_add_typed_bitfield): Likewise.
9895 (tdesc_add_bitfield): Likewise.
9896 (tdesc_add_flag): Likewise.
9897 (tdesc_add_enum_value): Likewise.
9898 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9899 (tdesc_add_typed_bitfield): Likewise.
9900 (tdesc_add_enum_value): Likewise.
9901
9902 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9903
9904 * common/tdesc.c (tdesc_feature::accept): Move to here.
9905 (tdesc_feature::operator==): Likewise.
9906 (tdesc_create_reg): Likewise.
9907 * common/tdesc.h (tdesc_type_kind): Likewise.
9908 (struct tdesc_type): Likewise.
9909 (struct tdesc_feature): Likewise.
9910 * regformats/regdat.sh: Create a feature.
9911 * target-descriptions.c (tdesc_type_kind): Move from here.
9912 (tdesc_type): Likewise.
9913 (tdesc_type_up): Likewise.
9914 (tdesc_feature): Likewise.
9915 (tdesc_create_reg): Likewise.
9916
9917 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9918
9919 * Makefile.in: Add arch/tdesc.c
9920 * common/tdesc.c: New file.
9921 * common/tdesc.h (tdesc_element_visitor): Move to here.
9922 (tdesc_element): Likewise.
9923 (tdesc_reg): Likewise.
9924 (tdesc_reg_up): Likewise.
9925 * regformats/regdef.h (reg): Add offset to constructors.
9926 * target-descriptions.c (tdesc_element_visitor): Move from here.
9927 (tdesc_element): Likewise.
9928 (tdesc_reg): Likewise.
9929 (tdesc_reg_up): Likewise.
9930
9931 2018-04-17 Tom Tromey <tom@tromey.com>
9932
9933 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9934 discriminant field.
9935
9936 2018-04-17 Tom Tromey <tom@tromey.com>
9937
9938 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9939
9940 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9941
9942 * symtab.c (print_symbol_info): Skip printing filename and line
9943 number when `last' is NULL.
9944 (symtab_symbol_info): Use empty string instead of NULL for first
9945 invocation of print_symbol_info.
9946 (rbreak_command): Pass NULL to `last' parameter of
9947 print_symbol_info.
9948
9949 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9950
9951 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9952 instead of nullptr.
9953
9954 2018-04-16 Pedro Alves <palves@redhat.com>
9955
9956 * MAINTAINERS (sh): Remove.
9957 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9958 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9959 (ALLDEPFILES): Remove sh64-tdep.c.
9960 * NEWS: Mentions that support for SH-5/SH64 is removed.
9961 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9962 (sh*-*-openbsd*): Ditto.
9963 (sh64-*-elf*): Remove.
9964 (sh*): Remove.
9965 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9966 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9967 * sh-tdep.c: No longer include "sh64-tdep.h".
9968 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9969 * sh64-tdep.c, sh64-tdep.h: Remove files.
9970
9971 2018-04-16 Pedro Alves <palves@redhat.com>
9972
9973 * MAINTAINERS: Remove m88k.
9974 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9975 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9976 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9977 * NEWS: Mention that support for m88k was removed.
9978 * configure.host (m88*-*-*): Remove support.
9979 * configure.nat (m88k-*-*): Remove support.
9980 * configure.tgt (m88*-*-openbsd*): Remove.
9981 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9982
9983 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9984
9985 * configure.tgt (x86_tobjs): New variable.
9986 (amd64_tobjs, i386_tobjs): Use it.
9987
9988 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9989
9990 * symtab.c (print_symbol_info): Precede the symbol definition by
9991 the line number when available.
9992 * NEWS: Advertise this enhancement.
9993
9994 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9995
9996 * NEWS (New options): announce set/show record btrace cpu.
9997 * btrace.c: Include record-btrace.h.
9998 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9999 the vendor is unknown.
10000 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10001 Maybe overwrite the btrace configuration's cpu.
10002 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10003 (btrace_fetch): Add cpu parameter. Update callers.
10004 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10005 Maybe overwrite the btrace configuration's cpu. Skip enabling
10006 errata workarounds if the vendor is unknown.
10007 * python/py-record-btrace.c: Include record-btrace.h.
10008 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10009 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10010 * record-btrace.c (record_btrace_cpu_state_kind): New.
10011 (record_btrace_cpu): New.
10012 (set_record_btrace_cpu_cmdlist): New.
10013 (record_btrace_get_cpu): New.
10014 (require_btrace_thread, record_btrace_info)
10015 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10016 (cmd_set_record_btrace_cpu_none): New.
10017 (cmd_set_record_btrace_cpu_auto): New.
10018 (cmd_set_record_btrace_cpu): New.
10019 (cmd_show_record_btrace_cpu): New.
10020 (_initialize_record_btrace): Initialize set/show record btrace cpu
10021 commands.
10022 * record-btrace.h (record_btrace_get_cpu): New.
10023
10024 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10025
10026 * record.c (set_record_command): Fix typo in message.
10027
10028 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10029
10030 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10031
10032 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10033
10034 * infrun.c (process_event_stop_test): Call
10035 gdbarch_in_indirect_branch_thunk.
10036 * gdbarch.sh (in_indirect_branch_thunk): New.
10037 * gdbarch.c: Regenerated.
10038 * gdbarch.h: Regenerated.
10039 * x86-tdep.h: New.
10040 * x86-tdep.c: New.
10041 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10042 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10043 (ALLDEPFILES): Add x86-tdep.c.
10044 * arch-utils.h (default_in_indirect_branch_thunk): New.
10045 * arch-utils.c (default_in_indirect_branch_thunk): New.
10046 * i386-tdep: Include x86-tdep.h.
10047 (i386_in_indirect_branch_thunk): New.
10048 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10049 function.
10050 * amd64-tdep: Include x86-tdep.h.
10051 (amd64_in_indirect_branch_thunk): New.
10052 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10053
10054 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10055
10056 PR gdb/23053
10057 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10058 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10059 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10060 regression.
10061
10062 2018-04-12 Tom Tromey <tom@tromey.com>
10063
10064 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10065 (rust_evaluate_subexp): Likewise.
10066
10067 2018-04-12 Pedro Alves <palves@redhat.com>
10068
10069 * procfs.c (procfs_detach): Make forward declaration's prototype
10070 match definition's protototype.
10071 (proc_get_LDT_entry): Remove stale do_cleanups call.
10072
10073 2018-04-12 Pedro Alves <palves@redhat.com>
10074
10075 * target.h (target_ops::to_has_exited): Delete.
10076 (target_has_exited): Delete.
10077 * target-delegates.c: Regenerate.
10078
10079 2018-04-11 Pedro Alves <palves@redhat.com>
10080
10081 * target.c (fileio_fh_t::t): Add comment.
10082 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10083 (target_fileio_close): Handle a NULL target.
10084 (invalidate_fileio_fh): New.
10085 (target_close): Call it.
10086 * remote.c (remote_hostio_send_command): No longer check whether
10087 remote_desc is open.
10088
10089 2018-04-11 Pedro Alves <palves@redhat.com>
10090
10091 * target.c (fileio_fh_t): Make it a named struct instead of a
10092 typedef.
10093 (fileio_fh_t::is_closed): New method.
10094 (DEF_VEC_O (fileio_fh_t)): Remove.
10095 (fileio_fhandles): Now a std::vector.
10096 (is_closed_fileio_fh): Delete.
10097 (acquire_fileio_fd): Adjust. Rename parameters.
10098 (release_fileio_fd): Adjust.
10099 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10100 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10101 (target_fileio_close): Adjust.
10102
10103 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10104
10105 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10106 index.
10107
10108 2018-04-10 Pedro Alves <palves@redhat.com>
10109
10110 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10111 (scoped_finish_thread_state): New class.
10112 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10113 cleanup.
10114 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10115 (fetch_inferior_event, normal_stop): Likewise.
10116 * thread.c (finish_thread_state_cleanup): Delete.
10117
10118 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10119 Pedro Alves <palves@redhat.com>
10120
10121 * value.c: Include "selftest.h" and "common/array-view.h".
10122 (struct range) <operator ==>: New.
10123 (test_ranges_contain): New.
10124 (check_ranges_vector): New.
10125 (test_insert_into_bit_range_vector): New.
10126 (_initialize_values): Register selftests.
10127 * common/array-view.h (operator==, operator!=): New.
10128
10129 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10130
10131 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10132 an iterator.
10133 * inline-frame.c: Include <algorithm>.
10134 (struct inline_state): Add constructor.
10135 (inline_state_s): Remove.
10136 (DEF_VEC_O(inline_state_s)): Remove.
10137 (inline_states): Change type to std::vector.
10138 (find_inline_frame_state): Adjust to std::vector.
10139 (allocate_inline_frame_state): Remove.
10140 (clear_inline_frame_state): Adjust to std::vector.
10141 (skip_inline_frames): Adjust to std::vector.
10142
10143 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10144
10145 * tracepoint.h (struct trace_state_variable): Add constructor.
10146 <name>: Change type to std::string.
10147 * tracepoint.c (tsv_s): Remove.
10148 (DEF_VEC_O(tsv_s)): Remove.
10149 (tvariables): Change to std::vector.
10150 (create_trace_state_variable): Adjust to std::vector.
10151 (find_trace_state_variable): Likewise.
10152 (find_trace_state_variable_by_number): Likewise.
10153 (delete_trace_state_variable): Likewise.
10154 (trace_variable_command): Adjust to std::string.
10155 (delete_trace_variable_command): Likewise.
10156 (tvariables_info_1): Adjust to std::vector.
10157 (save_trace_state_variables): Likewise.
10158 (start_tracing): Likewise.
10159 (merge_uploaded_trace_state_variables): Adjust to std::vector
10160 and std::string.
10161 * target.h (struct target_ops)
10162 <to_download_trace_state_variable>: Pass reference to
10163 trace_state_variable.
10164 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10165 * target-delegates.c: Re-generate.
10166 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10167 (mi_tsv_deleted): Likewise.
10168 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10169 * remote.c (remote_download_trace_state_variable): Change
10170 pointer to reference and adjust.
10171 * make-target-delegates (parse_argtypes): Handle references.
10172 (write_function_header): Likewise.
10173 (munge_type): Likewise.
10174
10175 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10176
10177 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10178 string_view-selftests.c.
10179 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10180 testsuite.
10181 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10182 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10183 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10184 * unittests/basic_string_view/element_access/char/1.cc:
10185 Likewise.
10186 * unittests/basic_string_view/element_access/char/empty.cc:
10187 Likewise.
10188 * unittests/basic_string_view/element_access/char/front_back.cc:
10189 Likewise.
10190 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10191 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10192 Likewise.
10193 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10194 Likewise.
10195 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10196 Likewise.
10197 * unittests/basic_string_view/operations/compare/char/1.cc:
10198 Likewise.
10199 * unittests/basic_string_view/operations/compare/char/13650.cc:
10200 Likewise.
10201 * unittests/basic_string_view/operations/copy/char/1.cc:
10202 Likewise.
10203 * unittests/basic_string_view/operations/data/char/1.cc:
10204 Likewise.
10205 * unittests/basic_string_view/operations/find/char/1.cc:
10206 Likewise.
10207 * unittests/basic_string_view/operations/find/char/2.cc:
10208 Likewise.
10209 * unittests/basic_string_view/operations/find/char/3.cc:
10210 Likewise.
10211 * unittests/basic_string_view/operations/find/char/4.cc:
10212 Likewise.
10213 * unittests/basic_string_view/operations/rfind/char/1.cc:
10214 Likewise.
10215 * unittests/basic_string_view/operations/rfind/char/2.cc:
10216 Likewise.
10217 * unittests/basic_string_view/operations/rfind/char/3.cc:
10218 Likewise.
10219 * unittests/basic_string_view/operations/substr/char/1.cc:
10220 Likewise.
10221 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10222 * unittests/string_view-selftests.c: New file.
10223
10224 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10225
10226 * unittests/basic_string_view/capacity/1.cc: New file.
10227 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10228 * unittests/basic_string_view/cons/char/1.cc: New file.
10229 * unittests/basic_string_view/cons/char/2.cc: New file.
10230 * unittests/basic_string_view/cons/char/3.cc: New file.
10231 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10232 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10233 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10234 * unittests/basic_string_view/element_access/char/1.cc: New file.
10235 * unittests/basic_string_view/element_access/char/2.cc: New file.
10236 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10237 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10238 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10239 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10240 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10241 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10242 * unittests/basic_string_view/include.cc: New file.
10243 * unittests/basic_string_view/inserters/char/1.cc: New file.
10244 * unittests/basic_string_view/inserters/char/2.cc: New file.
10245 * unittests/basic_string_view/inserters/char/3.cc: New file.
10246 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10247 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10248 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10249 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10250 * unittests/basic_string_view/literals/types.cc: New file.
10251 * unittests/basic_string_view/literals/values.cc: New file.
10252 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10253 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10254 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10255 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10256 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10257 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10258 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10259 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10260 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10261 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10262 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10263 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10264 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10265 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10266 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10267 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10268 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10269 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10270 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10271 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10272 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10273 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10274 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10275 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10276 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10277 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10278 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10279 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10280 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10281 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10282 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10283 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10284 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10285 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10286 * unittests/basic_string_view/operators/char/2.cc: New file.
10287 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10288 * unittests/basic_string_view/range_access/char/1.cc: New file.
10289 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10290 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10291 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10292 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10293 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10294 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10295 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10296 * unittests/basic_string_view/typedefs.cc: New file.
10297 * unittests/basic_string_view/types/1.cc: New file.
10298
10299 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10300
10301 * common/gdb_string_view.h: Remove libstdc++ implementation
10302 details, adjust to gdb reality.
10303 * common/gdb_string_view.tcc: Likewise.
10304 * cli/cli-script.c (struct string_view): Remove.
10305 (user_args) <m_args>: Change element type to gdb::string_view.
10306 (user_args::insert_args): Adjust.
10307
10308 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10309
10310 * common/gdb_string_view.h: New file.
10311 * common/gdb_string_view.tcc: New file.
10312
10313 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10314
10315 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10316 * configure: Re-generate.
10317
10318 2018-04-09 Pedro Alves <palves@redhat.com>
10319
10320 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10321 (set_target_gdbarch): Call
10322 gdb::observers::architecture_changed.notify instead of
10323 observer_notify_architecture_changed.
10324
10325 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10326
10327 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10328 (do_restore_current_traceframe_cleanup): Remove.
10329 (restore_current_traceframe_cleanup_dtor): Remove.
10330 (make_cleanup_restore_current_traceframe): Remove.
10331 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10332 New.
10333 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10334 * infrun.c (fetch_inferior_event): Use
10335 scoped_restore_current_traceframe.
10336
10337 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10338
10339 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10340 Remove.
10341 <n_allocated_type_units>: Remove.
10342 <all_type_units>: Change to std::vector.
10343 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10344 to std::vector change.
10345 (dwarf2_per_objfile::get_cutu): Likewise.
10346 (dwarf2_per_objfile::get_tu): Likewise.
10347 (create_signatured_type_table_from_index): Likewise.
10348 (create_signatured_type_table_from_debug_names): Likewise.
10349 (dw2_symtab_iter_next): Likewise.
10350 (dw2_print_stats): Likewise.
10351 (dw2_expand_all_symtabs): Likewise.
10352 (dw2_expand_marked_cus): Likewise.
10353 (dw2_debug_names_iterator::next): Likewise.
10354 (dwarf2_initialize_objfile): Likewise.
10355 (add_signatured_type_cu_to_table): Likewise.
10356 (create_all_type_units): Likewise.
10357 (add_type_unit): Likewise.
10358 (struct tu_abbrev_offset): Add constructor.
10359 (build_type_psymtabs_1): Adjust to std::vector change.
10360 (print_tu_stats): Likewise.
10361 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10362 (write_debug_names): Likewise.
10363
10364 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10365
10366 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10367 Make an std::vector.
10368 <n_comp_units>: Remove.
10369 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10370 to std::vector change.
10371 (dwarf2_per_objfile::get_cutu): Likewise.
10372 (dwarf2_per_objfile::get_cu): Likewise.
10373 (create_cus_from_index): Likewise.
10374 (create_addrmap_from_index): Likewise.
10375 (create_addrmap_from_aranges): Likewise.
10376 (dwarf2_read_index): Likewise.
10377 (dw2_find_last_source_symtab): Likewise.
10378 (dw2_map_symtabs_matching_filename): Likewise.
10379 (dw2_symtab_iter_next): Likewise.
10380 (dw2_print_stats): Likewise.
10381 (dw2_expand_all_symtabs): Likewise.
10382 (dw2_expand_symtabs_with_fullname): Likewise.
10383 (dw2_expand_marked_cus): Likewise.
10384 (dw2_map_symbol_filenames): Likewise.
10385 (create_cus_from_debug_names): Likewise.
10386 (dwarf2_read_debug_names): Likewise.
10387 (dw2_debug_names_iterator::next): Likewise.
10388 (dwarf2_initialize_objfile): Likewise.
10389 (set_partial_user): Likewise.
10390 (dwarf2_build_psymtabs_hard): Likewise.
10391 (read_comp_units_from_section): Remove arguments, adjust to
10392 std::vector change.
10393 (create_all_comp_units): Adjust to std::vector and
10394 read_comp_units_from_section changes.
10395 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10396 change.
10397 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10398 (psyms_seen_size): Likewise.
10399 (write_gdbindex): Likewise.
10400 (write_debug_names): Likewise.
10401
10402 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10403
10404 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10405 with dwarf2_per_objfile.
10406 (create_cus_from_index): Likewise.
10407 (create_signatured_type_table_from_index): Likewise.
10408 (dwarf2_read_index): Likewise.
10409 (dwarf2_initialize_objfile): Likewise.
10410 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10411 per_cu rather than get_dwarf2_per_objfile.
10412
10413 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10414
10415 * dwarf2read.h (struct signatured_type): Forward declare.
10416 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10417 New methods.
10418 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10419 (dw2_get_cutu): ...this.
10420 (dwarf2_per_objfile::get_cu): Rename from...
10421 (dw2_get_cu): ...this.
10422 (dwarf2_per_objfile::get_tu): New.
10423 (create_addrmap_from_index): Adjust.
10424 (create_addrmap_from_aranges): Adjust.
10425 (dw2_find_last_source_symtab): Adjust.
10426 (dw2_map_symtabs_matching_filename): Adjust.
10427 (dw2_symtab_iter_next): Adjust.
10428 (dw2_print_stats): Adjust.
10429 (dw2_expand_all_symtabs): Adjust.
10430 (dw2_expand_symtabs_with_fullname): Adjust.
10431 (dw2_expand_marked_cus): Adjust.
10432 (dw_expand_symtabs_matching_file_matcher): Adjust.
10433 (dw2_map_symbol_filenames): Adjust.
10434 (dw2_debug_names_iterator::next): Adjust.
10435 (dwarf2_initialize_objfile): Adjust.
10436 (set_partial_user): Adjust.
10437 (dwarf2_build_psymtabs_hard): Adjust.
10438
10439 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10440
10441 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10442 Remove unused variables.
10443 (dw2_map_symtabs_matching_filename): Likewise.
10444 (dwarf2_record_block_ranges): Likewise.
10445 (dwarf2_read_addr_index): Likewise.
10446 (follow_die_offset): Likewise.
10447
10448 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10449
10450 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10451 to symbol_file_add_main.
10452
10453 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10454
10455 PR mi/22299
10456 * mi/mi-console.c (do_fputc_async_safe): New.
10457 (mi_console_file::write_async_safe): New.
10458 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10459 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10460 New.
10461 * ui-file.c (ui_file::putstrn): Adjust call to
10462 fputstrn_unfiltered.
10463 * utils.c (printchar): Replace do_fputs and do_fprintf
10464 parameters by do_fputc.
10465 (fputstr_filtered): Adjust call to printchar.
10466 (fputstr_unfiltered): Likewise.
10467 (fputstrn_filtered): Likewise.
10468 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10469 printchar.
10470 * utils.h (do_fputc_ftype): New typedef.
10471 (fputstrn_unfiltered): Add do_fputc parameter.
10472
10473 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10474
10475 * regformats/i386/i386-avx.dat: Remove.
10476
10477 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10478
10479 PR gdb/22979
10480 * amd64-tdep.c (amd64_none_init_abi): New function.
10481 (amd64_x32_none_init_abi): New function.
10482 (_initialize_amd64_tdep): Register handlers for x86-64 and
10483 x64_32 with GDB_OSABI_NONE.
10484 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10485 GDB_OSABI_NONE osabi.
10486
10487 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10488
10489 PR gdb/22980
10490 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10491 GDB_OSABI_NONE.
10492 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10493 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10494
10495 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10496
10497 * common/byte-vector.h (char_vector): New type.
10498 * target.h (target_read_alloc): Return
10499 gdb::optional<byte_vector>.
10500 (target_read_stralloc): Return gdb::optional<char_vector>.
10501 (target_get_osdata): Return gdb::optional<char_vector>.
10502 * target.c (target_read_alloc_1): Templatize. Replacement
10503 manual memory management with vector.
10504 (target_read_alloc): Change return type, adjust.
10505 (target_read_stralloc): Change return type, adjust.
10506 (target_get_osdata): Change return type, adjust.
10507 * auxv.c (struct auxv_info) <length>: Remove.
10508 <data>: Change type to gdb::optional<byte_vector>.
10509 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10510 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10511 (target_auxv_search): Adjust.
10512 (fprint_target_auxv): Adjust.
10513 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10514 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10515 (linux_make_corefile_notes): Adjust.
10516 * osdata.c (get_osdata): Adjust.
10517 * remote.c (remote_get_threads_with_qxfer): Adjust.
10518 (remote_memory_map): Adjust.
10519 (remote_traceframe_info): Adjust.
10520 (btrace_read_config): Adjust.
10521 (remote_read_btrace): Adjust.
10522 (remote_pid_to_exec_file): Adjust.
10523 * solib-aix.c (solib_aix_get_library_list): Adjust.
10524 * solib-dsbt.c (decode_loadmap): Don't free buf.
10525 (dsbt_get_initial_loadmaps): Adjust.
10526 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10527 * solib-target.c (solib_target_current_sos): Adjust.
10528 * tracepoint.c (sdata_make_value): Adjust.
10529 * xml-support.c (xinclude_start_include): Adjust.
10530 (xml_fetch_content_from_file): Adjust.
10531 * xml-support.h (xml_fetch_another): Change return type.
10532 (xml_fetch_content_from_file): Change return type.
10533 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10534 * xml-tdesc.c (file_read_description_xml): Adjust.
10535 (fetch_available_features_from_target): Change return type.
10536 (target_fetch_description_xml): Adjust.
10537 (target_read_description_xml): Adjust.
10538
10539 2018-04-06 Tom Tromey <tom@tromey.com>
10540
10541 * value.c (~value): Update.
10542 (struct value) <contents>: Now unique_xmalloc_ptr.
10543 (value_contents_bits_eq, allocate_value_contents)
10544 (value_contents_raw, value_contents_all_raw)
10545 (value_contents_for_printing, value_contents_for_printing_const)
10546 (set_value_enclosing_type): Update.
10547
10548 2018-04-06 Tom Tromey <tom@tromey.com>
10549
10550 * value.c (range_s): Remove typedef, VEC.
10551 (struct range): Add operator<.
10552 (range_lessthan): Remove.
10553 (ranges_contain): Change type.
10554 (~value): Update.
10555 (struct value) <unavailable, optimized_out>: Now std::vector.
10556 (value_entirely_available)
10557 (value_entirely_covered_by_range_vector)
10558 (value_entirely_unavailable, value_entirely_optimized_out):
10559 Update.
10560 (insert_into_bit_range_vector): Change argument type.
10561 (find_first_range_overlap): Likewise.
10562 (struct ranges_and_idx, value_contents_bits_eq)
10563 (require_not_optimized_out, require_available): Update.
10564 (ranges_copy_adjusted): Change argument types.
10565 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10566
10567 2018-04-06 Tom Tromey <tom@tromey.com>
10568
10569 * value.c (~value): Update.
10570 (struct value) <parent>: Now a value_ref_ptr.
10571 (value_parent, set_value_parent, value_address, value_copy):
10572 Update.
10573
10574 2018-04-06 Tom Tromey <tom@tromey.com>
10575
10576 * value.c (struct value): Add constructor, destructor, and member
10577 initializers.
10578 (allocate_value_lazy, value_decref): Update.
10579
10580 2018-04-06 Tom Tromey <tom@tromey.com>
10581
10582 * value.c (struct value) <released, next>: Remove.
10583 (all_values): Now a std::vector.
10584 (allocate_value_lazy): Update.
10585 (value_next): Remove.
10586 (value_mark, value_free_to_mark, release_value)
10587 (value_release_to_mark): Update.
10588
10589 2018-04-06 Tom Tromey <tom@tromey.com>
10590
10591 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10592 (free_value_chain): Remove.
10593 * value.c (free_value_chain): Remove.
10594 (value_release_to_mark): Return a std::vector.
10595 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10596 std::vector.
10597 (check_condition): Update.
10598 * eval.c (fetch_subexp_value): Change "val_chain" to a
10599 std::vector.
10600 * breakpoint.c (update_watchpoint): Update.
10601 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10602
10603 2018-04-06 Tom Tromey <tom@tromey.com>
10604
10605 * value.h (free_all_values): Remove.
10606 * value.c (free_all_values): Remove.
10607
10608 2018-04-06 Tom Tromey <tom@tromey.com>
10609
10610 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10611 (value_history_chain, value_history_count): Remove.
10612 (value_history): New global.
10613 (record_latest_value, access_value_history, show_values)
10614 (preserve_values): Update.
10615
10616 2018-04-06 Tom Tromey <tom@tromey.com>
10617
10618 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10619 * varobj.c (varobj_set_display_format, varobj_set_value)
10620 (install_default_visualizer, construct_visualizer)
10621 (install_new_value, ~varobj, varobj_get_value_type)
10622 (my_value_of_variable, varobj_editable_p): Update.
10623 * c-varobj.c (c_describe_child, c_value_of_variable)
10624 (cplus_number_of_children, cplus_describe_child): Update.
10625 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10626 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10627 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10628
10629 2018-04-06 Tom Tromey <tom@tromey.com>
10630
10631 * printcmd.c (last_examine_address): Change type to
10632 value_ref_ptr.
10633 (do_examine, x_command): Update.
10634
10635 2018-04-06 Tom Tromey <tom@tromey.com>
10636
10637 * value.c (release_value): Update.
10638 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10639 (struct bpstats) <val>: Now a value_ref_ptr.
10640 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10641 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10642 (~watchpoint, print_it_watchpoint, watch_command_1)
10643 (invalidate_bp_value_on_memory_change): Update.
10644
10645 2018-04-06 Tom Tromey <tom@tromey.com>
10646
10647 * varobj.c (varobj_clear_saved_item)
10648 (update_dynamic_varobj_children, install_new_value, ~varobj):
10649 Update.
10650 * value.h (value_incref): Move declaration earlier.
10651 (value_decref): Rename from value_free.
10652 (struct value_ref_policy): New.
10653 (value_ref_ptr): New typedef.
10654 (struct value_deleter): Remove.
10655 (gdb_value_up): Remove typedef.
10656 (release_value): Change return type.
10657 (release_value_or_incref): Remove.
10658 * value.c (set_value_parent): Update.
10659 (value_incref): Change return type.
10660 (value_decref): Rename from value_free.
10661 (value_free_to_mark, free_all_values, free_value_chain): Update.
10662 (release_value): Return value_ref_ptr.
10663 (release_value_or_incref): Remove.
10664 (record_latest_value, set_internalvar, clear_internalvar):
10665 Update.
10666 * stack.c (info_frame_command): Don't call value_free.
10667 * python/py-value.c (valpy_dealloc, valpy_new)
10668 (value_to_value_object): Update.
10669 * printcmd.c (do_examine): Update.
10670 * opencl-lang.c (lval_func_free_closure): Update.
10671 * mi/mi-main.c (register_changed_p): Don't call value_free.
10672 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10673 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10674 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10675 value_free.
10676 * guile/scm-value.c (vlscm_free_value_smob)
10677 (vlscm_scm_from_value): Update.
10678 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10679 (frame_unwind_register_unsigned, get_frame_register_bytes)
10680 (put_frame_register_bytes): Don't call value_free.
10681 * findvar.c (address_from_register): Don't call value_free.
10682 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10683 * dwarf2loc.c (entry_data_value_free_closure)
10684 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10685 (dwarf2_evaluate_loc_desc_full): Update.
10686 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10687 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10688 (~watchpoint, watch_command_1)
10689 (invalidate_bp_value_on_memory_change): Update.
10690 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10691
10692 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10693
10694 PR gdb/23022
10695 * warning.m4: Add -Wno-error=deprecated-register.
10696 * configure: Re-generate.
10697
10698 2018-04-05 Tom Tromey <tom@tromey.com>
10699
10700 * linespec.h: Remove include of "vec.h".
10701
10702 2018-04-05 Tom Tromey <tom@tromey.com>
10703
10704 * linespec.c (typep): Remove typedef.
10705 (find_methods, find_superclass_methods): Take a std::vector.
10706 (find_method): Use std::vector.
10707
10708 2018-04-05 Tom Tromey <tom@tromey.com>
10709
10710 * utils.c (compare_strings): Remove.
10711 * utils.h (compare_strings): Remove.
10712 * objc-lang.h (find_imps): Update.
10713 * objc-lang.c (find_methods): Take a std::vector.
10714 (uniquify_strings, find_imps): Likewise.
10715 * linespec.c (find_methods): Take a std::vector.
10716 (decode_objc): Use std::vector.
10717 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10718 a std::vector.
10719 (find_method, find_function_symbols): Use std::vector.
10720
10721 2018-04-05 Tom Tromey <tom@tromey.com>
10722
10723 * completer.c (completion_tracker::completion_tracker): Remove
10724 cast.
10725 (completion_tracker::discard_completions): Likewise.
10726 * breakpoint.c (ambiguous_names_p): Remove cast.
10727 * ada-lang.c (_initialize_ada_language): Remove cast.
10728 * utils.h (streq): Update.
10729 (streq_hash): Add new declaration.
10730 * utils.c (streq): Return bool.
10731 (streq_hash): New function.
10732
10733 2018-04-05 Tom Tromey <tom@tromey.com>
10734
10735 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10736 Remove a string copy.
10737
10738 2018-04-05 Tom Tromey <tom@tromey.com>
10739
10740 * linespec.c (filter_results): Use std::vector.
10741 (decode_line_2, decode_line_full): Update.
10742
10743 2018-04-05 Tom Tromey <tom@tromey.com>
10744
10745 * linespec.c (canonical_to_fullform): Return std::string.
10746 (filter_results): Update.
10747 (struct decode_line_2_item): Add constructor.
10748 <fullform, displayform>: Now std::string.
10749 (decode_line_2_compare_items): Now a std::sort comparator.
10750 (decode_line_2): Update.
10751
10752 2018-04-05 Tom Tromey <tom@tromey.com>
10753
10754 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10755 (unexpected_linespec_error): Update.
10756 (linespec_parse_basic, parse_linespec): Update.
10757
10758 2018-04-05 Tom Tromey <tom@tromey.com>
10759
10760 * linespec.c (linespec_parse_basic): Reindent.
10761
10762 2018-04-05 Tom Tromey <tom@tromey.com>
10763
10764 * minsyms.h (iterate_over_minimal_symbols): Update.
10765 * minsyms.c (iterate_over_minimal_symbols): Take a
10766 gdb::function_view.
10767 * linespec.c (struct collect_minsyms): Remove.
10768 (compare_msyms): Now a std::sort comparator.
10769 (add_minsym): Add parameters.
10770 (search_minsyms_for_name): Update. Use std::vector.
10771
10772 2018-04-03 Tom Tromey <tom@tromey.com>
10773
10774 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10775 gdb::byte_vector.
10776
10777 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10778
10779 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10780
10781 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10782
10783 PR gdb/16959
10784 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10785 printing static type.
10786
10787 2018-04-01 Tom Tromey <tom@tromey.com>
10788
10789 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10790 (rs6000_xfer_shared_libraries): Update.
10791
10792 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10793
10794 * common/gdb_vecs.h (char_ptr): Remove.
10795 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10796
10797 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10798
10799 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10800 with std::vector.
10801 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10802
10803 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10804
10805 * tracepoint.h (struct uploaded_tp): Initialize fields.
10806 <actions, step_actions, cmd_strings>: Change type to
10807 std::vector<char *>.
10808 * tracepoint.c (get_uploaded_tp): Allocate with new.
10809 (free_uploaded_tps): Free with delete.
10810 (parse_tracepoint_definition): Adjust to std::vector change.
10811 * breakpoint.c (read_uploaded_action): Likewise.
10812 (create_tracepoint_from_upload): Likewise.
10813 * ctf.c (ctf_write_uploaded_tp): Likewise.
10814 (SET_ARRAY_FIELD): Likewise.
10815 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10816
10817 2018-03-30 Tom Tromey <tom@tromey.com>
10818
10819 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10820 std::unique_ptr.
10821 (svr4_keep_data_in_core): Update.
10822 (svr4_read_so_list): Update.
10823
10824 2018-03-30 Tom Tromey <tom@tromey.com>
10825
10826 * windows-nat.c (handle_output_debug_string, handle_exception):
10827 Update.
10828 * target.h (target_read_string): Update.
10829 * target.c (target_read_string): Change "string" to
10830 unique_xmalloc_ptr.
10831 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10832 Update.
10833 * solib-frv.c (frv_current_sos): Update.
10834 * solib-dsbt.c (dsbt_current_sos): Update.
10835 * solib-darwin.c (darwin_current_sos): Update.
10836 * linux-thread-db.c (inferior_has_bug): Update.
10837 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10838 Update. Remove alloca.
10839 * ada-lang.c (ada_main_name): Update.
10840
10841 2018-03-30 Tom Tromey <tom@tromey.com>
10842
10843 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10844 (struct dwo_file_deleter): New.
10845 (dwo_file_up): New typedef.
10846 (open_and_init_dwo_file): Use dwo_file_up.
10847 (free_dwo_file_cleanup): Remove.
10848
10849 2018-03-30 Tom Tromey <tom@tromey.com>
10850
10851 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10852 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10853
10854 2018-03-30 Tom Tromey <tom@tromey.com>
10855
10856 * dwarf2read.c (class free_cached_comp_units): New class.
10857 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10858 (free_cached_comp_units): Remove function.
10859
10860 2018-03-30 Tom Tromey <tom@tromey.com>
10861
10862 * utils.h (make_cleanup_unpush_target): Remove.
10863 * inf-ptrace.c (struct target_unpusher): New.
10864 (target_unpush_up) New typedef.
10865 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10866 target_unpush_up.
10867 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10868
10869 2018-03-27 Tom Tromey <tom@tromey.com>
10870
10871 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10872
10873 2018-03-27 Pedro Alves <palves@redhat.com>
10874 Tom Tromey <tom@tromey.com>
10875
10876 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10877 destructor. Now a class.
10878 (gdb_readline_wrapper_cleanup): Remove function.
10879 (gdb_readline_wrapper): Remove cleanups.
10880
10881 2018-03-27 Tom Tromey <tom@tromey.com>
10882
10883 * typeprint.h (struct type_print_options) <local_typedefs,
10884 global_typedefs>: Remove "struct" keyword.
10885 (class typedef_hash_table): New class.
10886 (recursively_update_typedef_hash, add_template_parameters)
10887 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10888 (find_typedef_in_hash): Don't declare.
10889 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10890 (typedef_hash_table::recursively_update): Rename from
10891 recursively_update_typedef_hash. Now a member.
10892 (typedef_hash_table::add_template_parameters): Rename from
10893 add_template_parameters. Now a member.
10894 (typedef_hash_table::typedef_hash_table): Now a constructor;
10895 rename from create_typedef_hash.
10896 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10897 rename from free_typedef_hash.
10898 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10899 (do_free_global_table): Remove.
10900 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10901 from copy_type_recursive.
10902 (create_global_typedef_table): Remove.
10903 (typedef_hash_table::find_global_typedef): Now a member of
10904 typedef_hash_table.
10905 (typedef_hash_table::find_typedef): Rename from
10906 find_typedef_in_hash; now a member.
10907 (whatis_exp): Update.
10908 * extension.h (struct ext_lang_type_printers): Add constructor and
10909 destructor.
10910 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10911 declare.
10912 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10913 Now a constructor; rename from start_ext_lang_type_printers.
10914 (ext_lang_type_printers): Now a destructor; rename from
10915 free_ext_lang_type_printers.
10916 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10917 Update.
10918 (c_type_print_base_struct_union): Update. Remove cleanups.
10919
10920 2018-03-27 Tom Tromey <tom@tromey.com>
10921
10922 * dwarf-index-write.c: Include <cmath>.
10923
10924 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10925
10926 * NEWS: Add entry describing new "set|show varsize-limit" command.
10927 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10928 command.
10929 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10930 "set variable".
10931
10932 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10933
10934 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10935 dwarf-index-write.c
10936 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10937 * dwarf-index-common.c: New file.
10938 * dwarf-index-common.h: New file.
10939 * dwarf-index-write.c: New file.
10940 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10941 (struct dwarf2_section_info): Move from here.
10942 (dwarf2_section_info_def): Likewise.
10943 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10944 (offset_type): Likewise.
10945 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10946 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10947 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10948 (byte_swap): Likewise.
10949 (MAYBE_SWAP): Likewise.
10950 (dwarf2_per_cu_ptr): Likewise.
10951 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10952 (struct tu_stats): Likewise.
10953 (struct dwarf2_per_objfile): Likewise.
10954 (struct dwarf2_per_cu_data): Likewise.
10955 (struct signatured_type): Likewise.
10956 (sig_type_ptr): Likewise.
10957 (DEF_VEC_P (sig_type_ptr)): Likewise.
10958 (INDEX4_SUFFIX): Likewise.
10959 (INDEX5_SUFFIX): Likewise.
10960 (DEBUG_STR_SUFFIX): Likewise.
10961 (dwarf2_read_section): Make non-static.
10962 (mapped_index_string_hash): Move from here.
10963 (dwarf5_djb_hash): Likewise.
10964 (file_write): Likewise.
10965 (class data_buf): Likewise.
10966 (struct symtab_index_entry): Likewise.
10967 (struct mapped_symtab): Likewise.
10968 (find_slot): Likewise.
10969 (hash_expand): Likewise.
10970 (add_index_entry): Likewise.
10971 (uniquify_cu_indices): Likewise.
10972 (class c_str_view): Likewise.
10973 (class c_str_view_hasher): Likewise.
10974 (class vector_hasher): Likewise.
10975 (write_hash_table): Likewise.
10976 (psym_index_map): Likewise.
10977 (struct addrmap_index_data): Likewise.
10978 (add_address_entry): Likewise.
10979 (add_address_entry_worker): Likewise.
10980 (write_address_map): Likewise.
10981 (symbol_kind): Likewise.
10982 (write_psymbols): Likewise.
10983 (struct signatured_type_index_data): Likewise.
10984 (write_one_signatured_type): Likewise.
10985 (recursively_count_psymbols): Likewise.
10986 (recursively_write_psymbols): Likewise.
10987 (class debug_names): Likewise.
10988 (check_dwarf64_offsets): Likewise.
10989 (psyms_seen_size): Likewise.
10990 (write_gdbindex): Likewise.
10991 (write_debug_names): Likewise.
10992 (assert_file_size): Likewise.
10993 (write_psymtabs_to_index): Likewise.
10994 (save_gdb_index_command): Likewise.
10995 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10996 command.
10997 * dwarf2read.h: New file.
10998
10999 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11000
11001 PR gdb/22670
11002 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11003 symbol name if the CU's language stores symbol names in linkage
11004 format.
11005 * language.h (struct language_defn)
11006 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11007 all instances of this struct.
11008
11009 2018-03-26 Tom Tromey <tom@tromey.com>
11010
11011 * stack.c (backtrace_command_1): Remove verbose code.
11012
11013 2018-03-26 Tom Tromey <tom@tromey.com>
11014
11015 * python/py-framefilter.c (py_print_type): Don't catch
11016 exceptions. Return void.
11017 (py_print_value): Likewise.
11018 (py_print_single_arg): Likewise.
11019 (enumerate_args): Don't catch exceptions.
11020 (py_print_args): Likewise.
11021 (py_print_frame): Likewise.
11022 (gdbpy_apply_frame_filter): Catch exceptions here.
11023
11024 2018-03-26 Tom Tromey <tom@tromey.com>
11025
11026 * stack.c (_initialize_stack): Remove trailing newlines from help
11027 text. Add "Usage" line to "backtrace" help.
11028
11029 2018-03-26 Tom Tromey <tom@tromey.com>
11030
11031 PR python/16486:
11032 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11033
11034 2018-03-26 Tom Tromey <tom@tromey.com>
11035
11036 * python/py-framefilter.c (py_print_single_arg): Return
11037 EXT_LANG_BT_ERROR from catch.
11038
11039 2018-03-26 Tom Tromey <tom@tromey.com>
11040
11041 PR backtrace/15584:
11042 * stack.c (backtrace_command_1): Move some code into no-filters
11043 "if".
11044
11045 2018-03-26 Tom Tromey <tom@tromey.com>
11046
11047 * python/py-framefilter.c (throw_quit_or_print_exception): New
11048 function.
11049 (gdbpy_apply_frame_filter): Use it.
11050
11051 2018-03-26 Tom Tromey <tom@tromey.com>
11052
11053 PR cli/17716:
11054 * python/py-framefilter.c (py_print_type, py_print_value)
11055 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11056 RETURN_MASK_ERROR.
11057
11058 2018-03-26 Tom Tromey <tom@tromey.com>
11059
11060 * python/py-framefilter.c (enumerate_args): Use
11061 gdb::unique_xmalloc_ptr.
11062
11063 2018-03-26 Tom Tromey <tom@tromey.com>
11064
11065 * python/py-framefilter.c (py_print_frame): Return
11066 EXT_LANG_BT_OK.
11067 (gdbpy_apply_frame_filter): Update comment.
11068 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11069 Remove.
11070 <EXT_LANG_BT_NO_FILTERS>: Change value.
11071
11072 2018-03-26 Tom Tromey <tom@tromey.com>
11073
11074 PR backtrace/15582:
11075 * stack.c (backtrace_command): Parse "hide" argument.
11076 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11077 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11078 constant.
11079
11080 2018-03-26 Tom Tromey <tom@tromey.com>
11081
11082 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11083 add "flags".
11084 (backtrace_command): Remove "fulltrace", add "flags".
11085
11086 2018-03-26 Tom Tromey <tom@tromey.com>
11087
11088 * stack.c (backtrace_command): Rewrite command line parsing.
11089
11090 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11091
11092 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11093
11094 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11095
11096 * filename-seen-cache.h: Add include guard.
11097
11098 2018-03-26 Keith Seitz <keiths@redhat.com>
11099
11100 * symfile.c (place_section): Remove "struct" from section_addr_info
11101 in comment.
11102 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11103 "struct" keyword from section_addr_info.
11104
11105 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11106
11107 * regformats/regdef.h (reg): Add constructors.
11108
11109 2018-03-25 Pedro Alves <palves@redhat.com>
11110
11111 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11112 if then/else bodies in var_func_name extraction.
11113
11114 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11115
11116 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11117 lookup_minimal_symbol() to find symbol entry.
11118 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11119
11120 2018-03-23 Keith Seitz <keiths@redhat.com>
11121
11122 PR c++/22968
11123 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11124 nested type definitions for C++, too.
11125
11126 2018-03-23 Tom Tromey <tom@tromey.com>
11127
11128 * machoread.c (struct oso_el): Add a constructor. Don't define as
11129 a typedef.
11130 (macho_register_oso): Remove.
11131 (macho_symtab_read): Take a std::vector.
11132 (oso_el_compare_name): Now a std::sort comparator.
11133 (macho_symfile_read_all_oso): Take a std::vector.
11134 (macho_symfile_read): Use std::vector. Remove cleanups.
11135
11136 2018-03-22 Tom Tromey <tom@tromey.com>
11137
11138 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11139 (record_full_goto_bookmark): Use std::string.
11140
11141 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11142
11143 PR tdep/18295
11144 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11145 a single mask.
11146
11147 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11148
11149 * rs6000-tdep.c (store_insn_p): New function.
11150 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11151 and cr_reg to their unshifted values. Use store_insn_p to
11152 match LR saves using either R1 or fdata->alloca_reg. Use
11153 store_insn_p to match CR saves. Set alloca_reg_offset
11154 when alloca_reg and framep are set. Remove lr_reg shift
11155 when assigning to fdata->lr_register.
11156
11157 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11158
11159 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11160 command line args instead of emitting a warning.
11161
11162 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11163
11164 * tracepoint.h (struct static_tracepoint_marker): Initialize
11165 fields, define default constructor, move constructor and move
11166 assignment, disable the rest.
11167 <str_id, extra>: Make std::string.
11168 (release_static_tracepoint_marker): Remove.
11169 (free_current_marker): Remove.
11170 * tracepoint.c (free_current_marker): Remove.
11171 (parse_static_tracepoint_marker_definition): Adjust to
11172 std::string, use new hex2str overload.
11173 (release_static_tracepoint_marker): Remove.
11174 (print_one_static_tracepoint_marker): Get marker by reference
11175 and adjust to std::string.
11176 (info_static_tracepoint_markers_command): Adjust to std::vector
11177 changes
11178 * target.h (static_tracepoint_marker_p): Remove typedef.
11179 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11180 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11181 bool.
11182 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11183 * target-debug.h
11184 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11185 (target_debug_print_std_vector_static_tracepoint_marker): New.
11186 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11187 to...
11188 (target_debug_print_static_tracepoint_marker_p): ... this.
11189 * target-delegates.c: Re-generate.
11190 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11191 Make std::string.
11192 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11193 (decode_static_tracepoint_spec): Adjust to std::vector.
11194 (tracepoint_print_one_detail): Adjust to std::string.
11195 (strace_marker_decode_location): Adjust to std::string.
11196 (update_static_tracepoint): Adjust to std::string, remove call
11197 to release_static_tracepoint_marker.
11198 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11199 Adjust to std::vector.
11200 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11201 (remote_static_tracepoint_markers_by_strid): Adjust to
11202 std::vector.
11203 * common/rsp-low.h (hex2str): New overload with explicit count
11204 of bytes.
11205 * common/rsp-low.c (hex2str): New overload with explicit count
11206 of bytes.
11207 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11208 (_initialize_rsp_low_selftests): Add test_hex2str test.
11209 * unittests/tracepoint-selftests.c
11210 (test_parse_static_tracepoint_marker_definition): Adjust to
11211 std::string.
11212
11213 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11214
11215 * tracepoint.c (parse_static_tracepoint_marker_definition):
11216 Consider case where the definition is followed by more
11217 definitions.
11218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11219 tracepoint-selftests.c.
11220 * unittests/tracepoint-selftests.c: New.
11221
11222 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11223
11224 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11225 Carvalho.
11226
11227 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11228
11229 * symtab.c (find_pc_sect_line): fixed indentation.
11230
11231 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11232
11233 * symtab.c (find_pc_sect_line): now uses binary search.
11234
11235 2018-03-19 Tom Tromey <tom@tromey.com>
11236
11237 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11238 "IDENT" production.
11239
11240 2018-03-19 Pedro Alves <palves@redhat.com>
11241 Tom Tromey <tom@tromey.com>
11242
11243 * unittests/observable-selftests.c: New file.
11244 * common/observable.h: New file.
11245 * observable.h: New file.
11246 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11247 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11248 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11249 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11250 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11251 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11252 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11253 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11254 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11255 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11256 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11257 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11258 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11259 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11260 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11261 tui/tui-interp.c, valops.c: Update all users.
11262 * tui/tui-hooks.c (tui_bp_created_observer)
11263 (tui_bp_deleted_observer, tui_bp_modified_observer)
11264 (tui_inferior_exit_observer, tui_before_prompt_observer)
11265 (tui_normal_stop_observer, tui_register_changed_observer):
11266 Remove.
11267 (tui_observers_token): New global.
11268 (attach_or_detach, tui_attach_detach_observers): New functions.
11269 (tui_install_hooks, tui_remove_hooks): Use
11270 tui_attach_detach_observers.
11271 * record-btrace.c (record_btrace_thread_observer): Remove.
11272 (record_btrace_thread_observer_token): New global.
11273 * observer.sh: Remove.
11274 * observer.c: Rename to observable.c.
11275 * observable.c (namespace gdb_observers): Define new objects.
11276 (observer_debug): Move into gdb_observers namespace.
11277 (struct observer, struct observer_list, xalloc_observer_list_node)
11278 (xfree_observer_list_node, generic_observer_attach)
11279 (generic_observer_detach, generic_observer_notify): Remove.
11280 (_initialize_observer): Update.
11281 Don't include observer.inc.
11282 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11283 (clean mostlyclean): Likewise.
11284 (observer.h, observer.inc): Remove targets.
11285 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11286 (COMMON_SFILES): Use observable.c, not observer.c.
11287 * .gitignore: Remove observer.h.
11288
11289 2018-03-18 Tom Tromey <tom@tromey.com>
11290
11291 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11292 gdb::def_vector.
11293 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11294
11295 2018-03-17 Tom Tromey <tom@tromey.com>
11296
11297 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11298
11299 2018-03-17 Tom Tromey <tom@tromey.com>
11300
11301 * target.c (class scoped_target_fd): New.
11302 (target_fileio_close_cleanup): Remove.
11303 (target_fileio_read_alloc_1): Use scoped_target_fd.
11304
11305 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11306
11307 * silent-rules.mk: New.
11308 * Makefile.in: Include silent-rules.mk
11309 (srcdir, VPATH, top_srcdir): Move up.
11310 (COMPILE): Add ECHO_CXX.
11311 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11312 (init.c): Add ECHO_INIT_C.
11313 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11314 (version.c): Add ECHO_GEN.
11315 (printcmd.o): Add ECHO_CXX.
11316 (target-float.o): Add ECHO_CXX.
11317 (ada-exp.o): Add ECHO_CXX.
11318 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11319 (insight$(EXEEXT)): Add ECHO_CXXLD.
11320 * gnulib/configure.ac: Add AM_SILENT_RULES.
11321 * gnulib/aclocal.m4: Re-generate.
11322 * gnulib/configure: Re-generate.
11323 * gnulib/import/Makefile.in: Re-generate.
11324
11325 2018-03-16 Tom Tromey <tom@tromey.com>
11326
11327 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11328 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11329 * utils.c (do_free_section_addr_info)
11330 (make_cleanup_free_section_addr_info): Remove.
11331 * symfile.h (struct other_sections): Add constructor.
11332 (struct section_addr_info): Remove.
11333 (section_addr_info): New typedef.
11334 (struct sym_fns) <sym_offsets>: Change type of parameter.
11335 (build_section_addr_info_from_objfile)
11336 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11337 (default_symfile_offsets, symbol_file_add)
11338 (symbol_file_add_from_bfd)
11339 (build_section_addr_info_from_section_table): Update.
11340 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11341 * symfile.c (alloc_section_addr_info): Remove.
11342 (build_section_addr_info_from_section_table): Change return type.
11343 Update.
11344 (build_section_addr_info_from_bfd)
11345 (build_section_addr_info_from_objfile): Likewise.
11346 (free_section_addr_info): Remove.
11347 (relative_addr_info_to_section_offsets): Change type of "addrs".
11348 (addrs_section_compar): Now a std::sort comparator.
11349 (addrs_section_sort): Change return type.
11350 (addr_info_make_relative): Change type of "addrs". Update.
11351 (default_symfile_offsets, syms_from_objfile_1)
11352 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11353 (symbol_file_add_separate): Update.
11354 (symbol_file_add): Change type of "addrs". Update.
11355 (add_symbol_file_command): Update. Remove cleanups.
11356 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11357 cleanups.
11358 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11359 * solib.c (solib_read_symbols): Update.
11360 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11361 * machoread.c (macho_symfile_offsets): Update.
11362 * jit.c (jit_bfd_try_read_symtab): Update.
11363
11364 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11365
11366 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11367 unittests/utils-selftests.c.
11368 * unittests/utils-selftests.c: New file.
11369
11370 2018-03-14 Tom Tromey <tom@tromey.com>
11371
11372 PR cli/14977:
11373 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11374 for NULL.
11375
11376 2018-03-14 Tom Tromey <tom@tromey.com>
11377
11378 PR cli/19918:
11379 * printcmd.c (printf_pointer): Allow "-" in format.
11380
11381 2018-03-14 Tom Tromey <tom@tromey.com>
11382
11383 * printcmd.c (_initialize_printcmd): Add usage to printf.
11384
11385 2018-03-14 Yao Qi <qiyao@sourceware.org>
11386
11387 * MAINTAINERS: Update my email address.
11388
11389 2018-03-13 Tom Tromey <tom@tromey.com>
11390
11391 * machoread.c (macho_check_dsym): Change filenamep to a
11392 std::string*.
11393 (macho_symfile_read): Update.
11394 * symfile.c (load_command): Use std::string.
11395
11396 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11397
11398 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11399 to error message string.
11400 (riscv_register_name): Use xsnprintf instead of sprintf.
11401 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11402 internal_error.
11403 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11404 error.
11405 (riscv_push_dummy_call): Likewise.
11406
11407 2018-03-12 Tom Tromey <tom@tromey.com>
11408
11409 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11410 Use gdb::byte_vector.
11411 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11412
11413 2018-03-12 Yao Qi <yao.qi@linaro.org>
11414
11415 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11416 parameter type to readable_regcache.
11417 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11418 the declaration.
11419
11420 2018-03-11 Tom Tromey <tom@tromey.com>
11421
11422 * dwarf2read.c (struct nextfield): Add initializers.
11423 (struct nextfnfield): Remove.
11424 (struct fnfieldlist): Add initializers. Remove "length" and
11425 "head", use std::vector.
11426 (struct decl_field_list): Remove.
11427 (struct field_info): Add initializers.
11428 <fields, baseclasses>: Now std::vector.
11429 <nbaseclasses, nfnfields, typedef_field_list_count,
11430 nested_types_list_count>: Remove.
11431 (dwarf2_add_field, dwarf2_add_type_defn)
11432 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11433 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11434 (process_structure_scope): Update.
11435
11436 2018-03-11 Tom Tromey <tom@tromey.com>
11437
11438 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11439 for use by std::sort.
11440 (build_type_psymtabs_1): Use std::vector.
11441
11442 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11443
11444 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11445 and LIBMPFR in the printed configuration.
11446
11447 2018-03-08 Tom Tromey <tom@tromey.com>
11448
11449 * source.c (get_filename_and_charpos): Use scoped_fd.
11450 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11451 (procfs_pidlist): Likewise.
11452 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11453 (iterate_over_mappings): Likewise.
11454
11455 2018-03-08 Tom Tromey <tom@tromey.com>
11456
11457 * infcall.c (struct call_return_meta_info)
11458 <stack_temporaries_enabled>: Remove.
11459 (get_call_return_value, call_function_by_hand_dummy): Update.
11460 * thread.c (disable_thread_stack_temporaries): Remove.
11461 (enable_thread_stack_temporaries): Remove.
11462 (thread_stack_temporaries_enabled_p): Return bool.
11463 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11464 (get_last_thread_stack_temporary): Update.
11465 * eval.c (evaluate_subexp): Update.
11466 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11467 class, not a function.
11468 (value_ptr, value_vec): Remove typedefs.
11469 (class thread_info) <stack_temporaries_enabled>: Now bool.
11470 <stack_temporaries>: Now a std::vector.
11471 (thread_stack_temporaries_enabled_p)
11472 (value_in_thread_stack_temporaries): Return bool.
11473
11474 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11475
11476 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11477 (getpkt_or_notif_sane_1): Likewise.
11478
11479 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11480
11481 * build-id.c (build_id_to_debug_bfd): Use std::string.
11482
11483 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11484
11485 * build-id.c (find_separate_debug_file_by_buildid): Return
11486 std::string.
11487 * build-id.h (find_separate_debug_file_by_buildid): Return
11488 std::string.
11489 * coffread.c (coff_symfile_read): Adjust to std::string.
11490 * elfread.c (elf_symfile_read): Adjust to std::string.
11491 * symfile.c (separate_debug_file_exists): Change parameter to
11492 std::string.
11493 (find_separate_debug_file): Return std::string.
11494 (find_separate_debug_file_by_debuglink): Return std::string.
11495 * symfile.h (find_separate_debug_file_by_debuglink): Return
11496 std::string.
11497
11498 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11499
11500 * common/xml-utils.c (xml_escape_text): Move code to...
11501 (xml_escape_text_append): ... this new function.
11502 * common/xml-utils.h (xml_escape_text_append): New declaration.
11503 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11504 New function.
11505 (_initialize_xml_utils): register test_xml_escape_text_append as
11506 a selftest.
11507
11508 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11509
11510 * defs.h: Remove MAX_REGISTER_SIZE.
11511 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11512 asserts.
11513 * python/py-unwind.c (pyuw_sniffer): Likewise.
11514
11515 2018-03-07 Tom Tromey <tom@tromey.com>
11516
11517 * linux-tdep.c (linux_info_proc): Update.
11518 * target.h (struct target_ops) <to_fileio_readlink>: Return
11519 optional<string>.
11520 (target_fileio_readlink): Return optional<string>.
11521 * remote.c (remote_hostio_readlink): Return optional<string>.
11522 * inf-child.c (inf_child_fileio_readlink): Return
11523 optional<string>.
11524 * target.c (target_fileio_readlink): Return optional<string>.
11525
11526 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11527
11528 * regcache.c (cooked_read_test): Add riscv to the list of
11529 architectures that have a save_reggroup.
11530
11531 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11532
11533 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11534 value is not a dynamic class object.
11535
11536 2018-03-06 Tom Tromey <tom@tromey.com>
11537
11538 * rust-exp.y: Formatting fixes.
11539
11540 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11541
11542 * riscv-tdep.c (riscv_register_name): Remove target description
11543 support.
11544 (riscv_gdbarch_init): Remove target description check.
11545
11546 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11547
11548 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11549 comment.
11550 * riscv-tdep.h: Likewise.
11551
11552 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11553
11554 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11555 (riscv_pseudo_register_write): Delete.
11556 (riscv_gdbarch_init): Remove all use of pseudo registers.
11557
11558 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11559
11560 * record-btrace.c (btrace_print_lines): Replace cleanup
11561 parameter with RAII equivalents.
11562 (btrace_insn_history): Replace cleanup with RAII equivalents.
11563 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11564 make_cleanup_ui_out_tuple_begin_end): Remove.
11565 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11566 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11567 make_cleanup_ui_out_list_begin_end): Remove.
11568
11569 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11570
11571 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11572 parameter types to std::vector. Use bool.
11573 (record_btrace_wait): Replace VEC(tp_t) with
11574 std::vector<thread_info *>.
11575 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11576
11577 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11578
11579 * record-btrace.c (record_btrace_disable_callback): Remove.
11580 (struct scoped_btrace_disable): New.
11581 (record_btrace_open): Use scoped_btrace_disable.
11582
11583 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11584
11585 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11586 reading values from registers.
11587
11588 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11589
11590 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11591 where appropriate.
11592
11593 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11594
11595 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11596 change parameter type. Use GDB's print functions, and use
11597 core_addr_to_string where appropriate.
11598 (riscv_push_dummy_call): Use core_addr_to_string where
11599 appropriate, update call to riscv_print_arg_location, and reindent
11600 a few lines.
11601 (riscv_return_value): Update call to riscv_print_arg_location.
11602
11603 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11604 Tim Newsome <tim@sifive.com>
11605 Albert Ou <a0u@eecs.berkeley.edu>
11606 Darius Rad <darius@bluespec.com>
11607
11608 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11609 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11610 (ALLDEPFILES): Add riscv-tdep.c
11611 * configure.tgt: Add riscv support.
11612 * riscv-tdep.c: New file.
11613 * riscv-tdep.h: New file.
11614 * NEWS: Mention new target.
11615 * MAINTAINERS: Add entry for riscv.
11616
11617 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11618
11619 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11620 fields within aggregates.
11621
11622 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11623
11624 * record-btrace.c (btrace_print_lines): Change type of flags to
11625 gdb_disassembly_flags.
11626
11627 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11628
11629 * fbsd-nat.c: Include "inf-ptrace.h".
11630 (USE_SIGTRAP_SIGINFO): Conditionally define.
11631 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11632 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11633 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11634 function.
11635 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11636 Likewise.
11637 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11638 Likewise.
11639 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11640 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11641 "supports_stopped_by_hw_breakpoint" target methods.
11642
11643 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11644
11645 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11646 * fbsd-nat.c (debug_fbsd_nat): New variable.
11647 (show_fbsd_nat_debug): New function.
11648 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11649 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11650
11651 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11652
11653 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11654 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11655 prototype.
11656 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11657 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11658 method.
11659
11660 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11661
11662 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11663 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11664
11665 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11666
11667 * charset.c (struct charset_vector): New.
11668 (charsets): Change type to charset_vector.
11669 (find_charset_names): Adjust.
11670 (add_one): Adjust.
11671 (_initialize_charset): Adjust.
11672
11673 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11674
11675 * progspace.h (struct program_space) <deleted_solibs>: Change
11676 type to std::vector<std::string>.
11677 * progspace.c (clear_program_space_solib_cache): Adjust.
11678 * breakpoint.c (print_solib_event): Adjust.
11679 (check_status_catch_solib): Adjust.
11680 * solib.c (update_solib_list): Adjust.
11681 * ui-out.h (class ui_out) <field_string>: New overload.
11682 * ui-out.c (ui_out::field_string): New overload.
11683
11684 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11685
11686 * progspace.h (struct program_space): Add constructor and
11687 destructor, initialize fields.
11688 (add_program_space): Remove.
11689 * progspace.c (add_program_space): Rename to...
11690 (program_space::program_space): ... this.
11691 (release_program_space): Rename to...
11692 (program_space::~program_space): ... this.
11693 (delete_program_space): Use delete to delete program_space.
11694 (initialize_progspace): Use new to allocate program_space.
11695 * inferior.c (add_inferior_with_spaces): Likewise.
11696 (clone_inferior_command): Likewise.
11697 * infrun.c (follow_fork_inferior): Likewise.
11698 (handle_vfork_child_exec_or_exit): Likewise.
11699
11700 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11701
11702 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11703 (delim_string_to_char_ptr_vec): Return std::vector of
11704 gdb::unique_xmalloc_ptr.
11705 (dirnames_to_char_ptr_vec_append): Take std::vector of
11706 gdb::unique_xmalloc_ptr.
11707 (dirnames_to_char_ptr_vec): Return std::vector of
11708 gdb::unique_xmalloc_ptr.
11709 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11710 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11711 (delim_string_to_char_ptr_vec): Return an std::vector of
11712 gdb::unique_xmalloc_ptr, adjust the code.
11713 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11714 gdb::unique_xmalloc_ptr, adjust the code.
11715 (dirnames_to_char_ptr_vec): Return an std::vector of
11716 gdb::unique_xmalloc_ptr, adjust the code.
11717 * auto-load.c (auto_load_safe_path_vec): Change type to
11718 std::vector of gdb::unique_xmalloc_ptr.
11719 (auto_load_expand_dir_vars): Return an std::vector of
11720 gdb::unique_xmalloc_ptr, adjust the code.
11721 (auto_load_safe_path_vec_update): Adjust.
11722 (filename_is_in_auto_load_safe_path_vec): Adjust.
11723 (auto_load_objfile_script_1): Adjust.
11724 * build-id.c (build_id_to_debug_bfd): Adjust.
11725 * linux-thread-db.c (thread_db_load_search): Adjust.
11726 * source.c (add_path): Adjust.
11727 (openp): Adjust.
11728 * symfile.c (find_separate_debug_file): Adjust.
11729 * utils.c (do_free_char_ptr_vec): Remove.
11730 (make_cleanup_free_char_ptr_vec): Remove.
11731
11732 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11733
11734 PR gdb/22907
11735 * common/pathstuff.c: Conditionally include "<windows.h>".
11736
11737 2018-03-01 Georg Sauthoff <mail@georg.so>
11738
11739 PR gdb/22888
11740 * gcore.in: Quote variables and switch interpreter to bash.
11741
11742 2018-03-01 Tom Tromey <tom@tromey.com>
11743
11744 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11745 assertion. Add assertion for discriminant_index.
11746 (quirk_rust_enum): Use correct base type name in univariant case.
11747
11748 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11749
11750 * record.c (get_call_history_modifiers): Return a
11751 record_print_flags.
11752 (cmd_record_call_history): Adjust.
11753 * record-btrace.c (record_btrace_call_history): Adjust.
11754 (record_btrace_call_history_range): Adjust.
11755 (record_btrace_call_history_from): Adjust.
11756 * target-debug.h (target_debug_print_record_print_flags): New.
11757 * target-delegates.c: Re-generate.
11758 * target.c (target_call_history): Change flags type.
11759 (target_call_history_from): Likewise.
11760 (target_call_history_range): Likewise.
11761 * target.h (struct target_ops) <target_call_history>: Likewise.
11762 (target_call_history_from): Likewise.
11763 (target_call_history_range): Likewise.
11764
11765 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11766 Simon Marchi <simon.marchi@polymtl.ca>
11767
11768 * common/common-utils.c: Include "sys/stat.h".
11769 (is_regular_file): Move here from "source.c"; change return
11770 type to "bool".
11771 * common/common-utils.h (is_regular_file): New prototype.
11772 * common/pathstuff.c (contains_dir_separator): New function.
11773 * common/pathstuff.h (contains_dir_separator): New prototype.
11774 * source.c: Don't include "sys/stat.h".
11775 (is_regular_file): Move to "common/common-utils.c".
11776
11777 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11778
11779 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11780 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11781 * auto-load.c: Include "common/pathstuff.h".
11782 * common/common-def.h (current_directory): Move here.
11783 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11784 function.
11785 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11786 prototype.
11787 * common/pathstuff.c: New file.
11788 * common/pathstuff.h: New file.
11789 * compile/compile.c: Include "common/pathstuff.h".
11790 * defs.h (current_directory): Move to "common/common-defs.h".
11791 * dwarf2read.c: Include "common/pathstuff.h".
11792 * exec.c: Likewise.
11793 * guile/scm-safe-call.c: Likewise.
11794 * linux-thread-db.c: Likewise.
11795 * main.c: Likewise.
11796 * nto-tdep.c: Likewise.
11797 * objfiles.c: Likewise.
11798 * source.c: Likewise.
11799 * symtab.c: Likewise.
11800 * utils.c: Include "common/pathstuff.h".
11801 (gdb_realpath): Move to "common/pathstuff.c".
11802 (gdb_realpath_keepfile): Likewise.
11803 (gdb_abspath): Likewise.
11804 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11805 (gdb_realpath_keepfile): Likewise.
11806 (gdb_abspath): Likewise.
11807
11808 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11809
11810 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11811 wildcard process pid for super_resume for kernels with a
11812 specific bug.
11813
11814 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11815
11816 * compile/compile.c (get_args): Add additional comments
11817 explaining function.
11818
11819 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11820 Tom Tromey <tom@tromey.com>
11821
11822 * target.h (memory_write_request_s): Remove typedef. Don't define
11823 VEC.
11824 (target_write_memory_blocks): Change argument to std::vector.
11825 (struct memory_write_request): Add constructor.
11826 * target-memory.c (compare_block_starting_address): Return bool.
11827 Change argument types.
11828 (claim_memory): Change arguments to use std::vector.
11829 (split_regular_and_flash_blocks, blocks_to_erase)
11830 (compute_garbled_blocks): Likewise.
11831 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11832 (target_write_memory_blocks): Change argument to std::vector.
11833 * symfile.c (struct load_section_data): Add constructor and
11834 destructor. Use std::vector for "requests".
11835 (struct load_progress_data): Add initializers.
11836 (load_section_callback): Update. Use "new".
11837 (clear_memory_write_data): Remove.
11838 (generic_load): Update.
11839
11840 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11841
11842 * arch/aarch64.h: Use common/tdesc.h.
11843
11844 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11845
11846 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11847 architecture with a 64-bit ABI.
11848
11849 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11850
11851 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11852 ahead of target description loading.
11853
11854 2018-02-26 Tom Tromey <tom@tromey.com>
11855
11856 * stack.c (backtrace_command_1): Update.
11857 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11858 of "flags".
11859 * python/py-framefilter.c (py_print_frame)
11860 (gdbpy_apply_frame_filter): Change type of "flags".
11861 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11862 of "flags".
11863 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11864 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11865 * extension.h (enum frame_filter_flag): Rename from
11866 frame_filter_flags.
11867 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11868 (apply_ext_lang_frame_filter): Change type of "flags".
11869 * extension.c (apply_ext_lang_frame_filter): Change type of
11870 "flags".
11871 * extension-priv.h (struct extension_language_ops)
11872 <apply_frame_filter>: Change type of "flags".
11873
11874 2018-02-26 Tom Tromey <tom@tromey.com>
11875
11876 PR python/16497:
11877 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11878 off-by-one in py_end computation.
11879 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11880 PRINT_MORE_FRAMES.
11881 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11882 constant.
11883
11884 2018-02-26 Tom Tromey <tom@tromey.com>
11885
11886 * dwarf2read.c (struct variant_field): New.
11887 (struct nextfield) <variant>: New field.
11888 (dwarf2_add_field): Handle DW_TAG_variant_part.
11889 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11890 discriminated union.
11891 (read_structure_type): Handle DW_TAG_variant_part.
11892 (handle_struct_member_die): New function, extracted from
11893 process_structure_scope. Handle DW_TAG_variant.
11894 (process_structure_scope): Handle discriminated unions. Call
11895 handle_struct_member_die.
11896
11897 2018-02-26 Tom Tromey <tom@tromey.com>
11898
11899 * rust-lang.h (rust_last_path_segment): Declare.
11900 * rust-lang.c (rust_last_path_segment): Now public. Change
11901 contract.
11902 (struct disr_info): Remove.
11903 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11904 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11905 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11906 (rust_enum_p, rust_enum_variant): New function.
11907 (rust_underscore_fields): Remove "offset" parameter.
11908 (rust_print_enum): New function.
11909 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11910 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11911 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11912 enums.
11913 (rust_internal_print_type): New function, from rust_print_type.
11914 Remove enum code.
11915 (rust_print_type): Call rust_internal_print_type.
11916 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11917 Update enum handling.
11918 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11919 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11920 (rust_union_quirks): New functions.
11921 (process_full_comp_unit, process_full_type_unit): Call
11922 rust_union_quirks.
11923 (process_structure_scope): Update rust_unions if necessary.
11924
11925 2018-02-26 Tom Tromey <tom@tromey.com>
11926
11927 * value.h (value_union_variant): Declare.
11928 * valops.c (value_union_variant): New function.
11929 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11930 (struct discriminant_info): New.
11931 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11932 enumerator.
11933 (struct main_type) <flag_discriminated_union>: New field.
11934
11935 2018-02-26 Tom Tromey <tom@tromey.com>
11936
11937 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11938 unittests/unpack-selftests.c.
11939 * unittests/unpack-selftests.c: New file.
11940 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11941
11942 2018-02-26 Yao Qi <yao.qi@linaro.org>
11943
11944 * dwarf2read.c (struct partial_die_info) <read>: New method.
11945 (read_partial_die): Remove the declaration.
11946 (load_partial_dies): Update.
11947 (partial_die_info::partial_die_info):
11948 (read_partial_die): Change it to partial_die_info::read.
11949
11950 2018-02-26 Yao Qi <yao.qi@linaro.org>
11951
11952 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11953 (fixup_partial_die): Remove declaration.
11954 (scan_partial_symbols): Update.
11955 (partial_die_parent_scope): Likewise.
11956 (partial_die_full_name): Likewise.
11957 (fixup_partial_die): Change it to partial_die_info::fixup.
11958
11959 2018-02-26 Yao Qi <yao.qi@linaro.org>
11960
11961 * dwarf2read.c (read_partial_die): Update the declaration.
11962 (load_partial_dies): Caller update.
11963 (read_partial_die): Remove one argument abbrev_len.
11964
11965 2018-02-26 Yao Qi <yao.qi@linaro.org>
11966
11967 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11968 assignment operator.
11969 (load_partial_dies): Use ctor and copy ctor.
11970 (read_partial_die): Update.
11971 (dwarf2_cu::find_partial_die): Use ctor.
11972
11973 2018-02-26 Yao Qi <yao.qi@linaro.org>
11974
11975 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11976 (find_partial_die_in_comp_unit): Change it to
11977 dwarf2_cu::find_partial_die.
11978 (find_partial_die): Update.
11979
11980 2018-02-26 Yao Qi <yao.qi@linaro.org>
11981
11982 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11983 is NULL.
11984
11985 2018-02-26 Yao Qi <yao.qi@linaro.org>
11986
11987 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11988
11989 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11990
11991 * arch/amd64.h: Use common/tdesc.h.
11992 * arch/i386.c: Likewise.
11993 * arch/i386.h: Likewise.
11994 * arch/tic6x.c: Likewise.
11995 * arch/tdesc.h: Move file from here...
11996 * common/tdesc.h: ...to here.
11997 * features/aarch64-core.c: Regenerate.
11998 * features/aarch64-fpu.c: Regenerate.
11999 * features/i386/32bit-avx.c: Regenerate.
12000 * features/i386/32bit-avx512.c: Regenerate.
12001 * features/i386/32bit-core.c: Regenerate.
12002 * features/i386/32bit-linux.c: Regenerate.
12003 * features/i386/32bit-mpx.c: Regenerate.
12004 * features/i386/32bit-pkeys.c: Regenerate.
12005 * features/i386/32bit-sse.c: Regenerate.
12006 * features/i386/64bit-avx.c: Regenerate.
12007 * features/i386/64bit-avx512.c: Regenerate.
12008 * features/i386/64bit-core.c: Regenerate.
12009 * features/i386/64bit-linux.c: Regenerate.
12010 * features/i386/64bit-mpx.c: Regenerate.
12011 * features/i386/64bit-pkeys.c: Regenerate.
12012 * features/i386/64bit-segments.c: Regenerate.
12013 * features/i386/64bit-sse.c: Regenerate.
12014 * features/i386/x32-core.c: Regenerate.
12015 * features/tic6x-c6xp.c: Regenerate.
12016 * features/tic6x-core.c: Regenerate.
12017 * features/tic6x-gp.c: Regenerate.
12018 * target-descriptions.c: Use common/tdesc.h.
12019 * target-descriptions.h: Likewise.
12020
12021 2018-02-24 Tom Tromey <tom@tromey.com>
12022
12023 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12024 (try_thread_db_load_from_dir, thread_db_load_search): Use
12025 std::string.
12026 (info_auto_load_libthread_db_compare): Return bool. Change
12027 argument types.
12028 (info_auto_load_libthread_db): Use std::vector, std::string.
12029 Remove cleanups.
12030
12031 2018-02-24 Tom Tromey <tom@tromey.com>
12032
12033 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12034 std::string.
12035 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12036 std::string*.
12037 * gdbarch.c: Rebuild.
12038 * gdbarch.h: Rebuild.
12039 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12040 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12041 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12042 std::string*.
12043
12044 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12045
12046 * gdbtypes.h (sect_offset): Change type to uint64_t.
12047 (sect_offset_str): New function.
12048 * dwarf2read.c (create_addrmap_from_aranges): Use
12049 sect_offset_str.
12050 (error_check_comp_unit_head): Likewise.
12051 (create_debug_type_hash_table): Likewise.
12052 (read_cutu_die_from_dwo): Likewise.
12053 (init_cutu_and_read_dies): Likewise.
12054 (init_cutu_and_read_dies_no_follow): Likewise.
12055 (process_psymtab_comp_unit_reader): Likewise.
12056 (partial_die_parent_scope): Likewise.
12057 (peek_die_abbrev): Likewise.
12058 (process_queue): Likewise.
12059 (dwarf2_physname): Likewise.
12060 (read_namespace_alias): Likewise.
12061 (read_import_statement): Likewise.
12062 (create_dwo_cu_reader): Likewise.
12063 (create_cus_hash_table): Likewise.
12064 (lookup_dwo_cutu): Likewise.
12065 (inherit_abstract_dies): Likewise.
12066 (read_func_scope): Likewise.
12067 (read_call_site_scope): Likewise.
12068 (dwarf2_add_member_fn): Likewise.
12069 (read_common_block): Likewise.
12070 (read_module_type): Likewise.
12071 (read_typedef): Likewise.
12072 (read_subrange_type): Likewise.
12073 (load_partial_dies): Likewise.
12074 (read_partial_die): Likewise.
12075 (find_partial_die): Likewise.
12076 (read_str_index): Likewise.
12077 (dwarf2_string_attr): Likewise.
12078 (build_error_marker_type): Likewise.
12079 (lookup_die_type): Likewise.
12080 (dump_die_shallow): Likewise.
12081 (follow_die_ref): Likewise.
12082 (dwarf2_fetch_die_loc_sect_off): Likewise.
12083 (dwarf2_fetch_constant_bytes): Likewise.
12084 (follow_die_sig): Likewise.
12085 (get_signatured_type): Likewise.
12086 (get_DW_AT_signature_type): Likewise.
12087 (dwarf2_find_containing_comp_unit): Likewise.
12088 (set_die_type): Likewise.
12089
12090 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12091
12092 * arch/aarch64.c: Include "common-defs.h".
12093 * arch/amd64.c: Likewise.
12094 * arch/i386.c: Likewise.
12095
12096 2018-02-21 Tom Tromey <tom@tromey.com>
12097
12098 * value.h: (extract_field_op): Update.
12099 * eval.c (extract_field_op): Return a const char *.
12100 * expression.h (parse_expression_for_completion): Update.
12101 * completer.c (complete_expression): Update.
12102 (add_struct_fields): Make fieldname const.
12103 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12104 (mark_completion_tag, parse_exp_in_context_1): Update.
12105 (parse_expression_for_completion): Change "name" to
12106 unique_xmalloc_ptr*.
12107
12108 2018-02-21 Tom Tromey <tom@tromey.com>
12109
12110 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12111
12112 2018-02-21 Yao Qi <yao.qi@linaro.org>
12113
12114 * avr-tdep.c (avr_read_pc): Change parameter type to
12115 readable_regcache.
12116 * gdbarch.sh (read_pc): Likewise.
12117 * gdbarch.c: Re-generated.
12118 * gdbarch.h: Re-generated.
12119 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12120 readable_regcache.
12121 * ia64-tdep.c (ia64_read_pc): Likewise.
12122 * mips-tdep.c (mips_read_pc): Likewise.
12123 * spu-tdep.c (spu_read_pc): Likewise.
12124
12125 2018-02-21 Yao Qi <yao.qi@linaro.org>
12126
12127 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12128 * regcache-dump.c: New file.
12129 * regcache.c: Move register_dump to regcache-dump.c.
12130 (maintenance_print_registers): Likewise.
12131 (maintenance_print_raw_registers): Likewise.
12132 (maintenance_print_cooked_registers): Likewise.
12133 (maintenance_print_register_groups): Likewise.
12134 (maintenance_print_remote_registers): Likewise.
12135 (_initialize_regcache): Likewise.
12136 * regcache.h (register_dump): Moved from regcache.c.
12137
12138 2018-02-21 Yao Qi <yao.qi@linaro.org>
12139
12140 * regcache.c (regcache::regcache): Update.
12141 (regcache::invalidate): Move it to detached_regcache::invalidate.
12142 (get_thread_arch_aspace_regcache): Update.
12143 (regcache::raw_update): Update.
12144 (regcache::cooked_read): Remove some code.
12145 (regcache::cooked_read_value): Likewise.
12146 (regcache::raw_write): Remove assert on m_readonly_p.
12147 (regcache::raw_supply_integer): Move it to
12148 detached_regcache::raw_supply_integer.
12149 (regcache::raw_supply_zeroed): Likewise.
12150 * regcache.h (detached_regcache) <raw_supply_integer>: New
12151 declaration.
12152 <raw_supply_zeroed, invalidate>: Likewise.
12153 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12154 <invalidate>: Likewise.
12155 <m_readonly_p>: Removed.
12156
12157 2018-02-21 Yao Qi <yao.qi@linaro.org>
12158
12159 * infcmd.c (get_return_value): Let stop_regs point to
12160 get_current_regcache.
12161 * regcache.c (regcache::regcache): Remove.
12162 (register_dump_reg_buffer): New class.
12163 (regcache_print): Adjust.
12164 * regcache.h (regcache): Remove constructors.
12165
12166 2018-02-21 Yao Qi <yao.qi@linaro.org>
12167
12168 * regcache.c (class register_dump): New class.
12169 (register_dump_regcache, register_dump_none): New class.
12170 (register_dump_remote, register_dump_groups): New class.
12171 (regcache_print): Update.
12172 * regcache.h (regcache_dump_what): Move it to regcache.c.
12173 (regcache) <dump>: Remove.
12174
12175 2018-02-21 Yao Qi <yao.qi@linaro.org>
12176
12177 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12178 reg_buffer_rw *.
12179 (jit_unwind_reg_set_impl): Call raw_supply.
12180 (jit_frame_sniffer): Use reg_buffer_rw.
12181 * record-full.c (record_full_core_regbuf): Change its type.
12182 (record_full_core_open_1): Use reg_buffer_rw.
12183 (record_full_close): Likewise.
12184 (record_full_core_fetch_registers): Use regcache->raw_supply.
12185 (record_full_core_store_registers): Likewise.
12186 * regcache.c (regcache::get_register_status): Move it to
12187 reg_buffer.
12188 (regcache_raw_set_cached_value): Remove.
12189 (regcache::raw_set_cached_value): Remove.
12190 (regcache::raw_write): Call raw_supply.
12191 (regcache::raw_supply): Move it to reg_buffer_rw.
12192 * regcache.h (regcache_raw_set_cached_value): Remove.
12193 (reg_buffer_rw): New class.
12194
12195 2018-02-21 Yao Qi <yao.qi@linaro.org>
12196
12197 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12198 readonly_detached_regcache.
12199 (dummy_frame_prev_register): Use regcache->cooked_read.
12200 * frame.c (frame_save_as_regcache): Change return type.
12201 (frame_pop): Update.
12202 * frame.h (frame_save_as_regcache): Update declaration.
12203 * inferior.h (get_infcall_suspend_state_regcache): Update
12204 declaration.
12205 * infrun.c (infcall_suspend_state) <registers>: use
12206 readonly_detached_regcache.
12207 (save_infcall_suspend_state): Don't use regcache_dup.
12208 (get_infcall_suspend_state_regcache): Change return type.
12209 * linux-fork.c (struct fork_info) <savedregs>: Change to
12210 readonly_detached_regcache.
12211 <pc>: New field.
12212 (fork_save_infrun_state): Don't use regcache_dup.
12213 (info_checkpoints_command): Adjust.
12214 * mi/mi-main.c (register_changed_p): Update declaration.
12215 (mi_cmd_data_list_changed_registers): Use
12216 readonly_detached_regcache.
12217 (register_changed_p): Change parameter type to
12218 readonly_detached_regcache.
12219 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12220 readonly_detached_regcache.
12221 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12222 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12223 New.
12224 (regcache::save): Move it to reg_buffer.
12225 (regcache::restore): Change parameter type.
12226 (regcache_dup): Remove.
12227 * regcache.h (reg_buffer) <save>: New method.
12228 (readonly_detached_regcache): New class.
12229 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12230 readonly_detached_regcache.
12231 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12232
12233 2018-02-21 Yao Qi <yao.qi@linaro.org>
12234
12235 * frame.c (frame_save_as_regcache): Use regcache method save.
12236 (frame_pop): Use regcache method restore.
12237 * infrun.c (restore_infcall_suspend_state): Likewise.
12238 * linux-fork.c (fork_load_infrun_state): Likewise.
12239 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12240 save.
12241 * regcache.c (regcache_save): Remove.
12242 (regcache::restore): More asserts.
12243 (regcache_cpy): Remove.
12244 * regcache.h (regcache_save): Remove the declaration.
12245 (regcache::restore): Move from private to public.
12246 Remove the friend declaration of regcache_cpy.
12247 (regcache_cpy): Remove declaration.
12248
12249 2018-02-21 Yao Qi <yao.qi@linaro.org>
12250
12251 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12252 parameter type to 'readable_regcache *'.
12253 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12254 * arm-tdep.c (arm_neon_quad_read): Likewise.
12255 (arm_pseudo_read): Likewise.
12256 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12257 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12258 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12259 * gdbarch.c: Re-generated.
12260 * gdbarch.h: Re-generated.
12261 * gdbarch.sh (pseudo_register_read): Change parameter type to
12262 'readable_regcache *'.
12263 (pseudo_register_read_value): Likewise.
12264 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12265 (h8300_pseudo_register_read): Likewise.
12266 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12267 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12268 (i386_pseudo_register_read_into_value): Likewise.
12269 (i386_pseudo_register_read_value): Likewise.
12270 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12271 declaration.
12272 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12273 * m32c-tdep.c (m32c_raw_read): Likewise.
12274 (m32c_read_flg): Likewise.
12275 (m32c_banked_register): Likewise.
12276 (m32c_banked_read): Likewise.
12277 (m32c_sb_read): Likewise.
12278 (m32c_part_read): Likewise.
12279 (m32c_cat_read): Likewise.
12280 (m32c_r3r2r1r0_read): Likewise.
12281 (m32c_pseudo_register_read): Likewise.
12282 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12283 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12284 (mep_pseudo_cr64_read): Likewise.
12285 (mep_pseudo_register_read): Likewise.
12286 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12287 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12288 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12289 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12290 (regcache::cooked_read): Likewise.
12291 (regcache::cooked_read_value): Likewise.
12292 (regcache_cooked_read_signed):
12293 (regcache::cooked_read): Likewise.
12294 * regcache.h (readable_regcache): New class.
12295 (regcache): Inherit readable_regcache. Move some methods to
12296 readable_regcache.
12297 * rl78-tdep.c (rl78_pseudo_register_read): Change
12298 parameter type to 'readable_regcache *'.
12299 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12300 (e500_pseudo_register_read): Change parameter type to
12301 'readable_regcache *'.
12302 (dfp_pseudo_register_read): Likewise.
12303 (vsx_pseudo_register_read): Likewise.
12304 (efpr_pseudo_register_read): Likewise.
12305 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12306 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12307 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12308 (sh64_pseudo_register_read): Likewise.
12309 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12310 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12311 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12312 (spu_pseudo_register_read): Likewise.
12313 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12314 (xtensa_pseudo_register_read): Likewise.
12315
12316 2018-02-21 Yao Qi <yao.qi@linaro.org>
12317
12318 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12319 (regcache::arch): Move it to reg_buffer::arch.
12320 (regcache::register_buffer): Likewise.
12321 (regcache::assert_regnum): Likewise.
12322 (regcache::num_raw_registers): Likewise.
12323 * regcache.h (reg_buffer): New class.
12324 (regcache): Inherit reg_buffer.
12325
12326 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12327
12328 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12329 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12330
12331 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12332
12333 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12334
12335 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12336
12337 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12338 (SFILES): Remove common/*.c files.
12339 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12340 * common/common.host: Add common reference.
12341 * configure.ac: Likewise.
12342 * configure: Regenerate.
12343
12344 2018-02-16 Yao Qi <yao.qi@linaro.org>
12345
12346 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12347 (block_initialize_namespace): Use new.
12348 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12349 (dwarf2_free_objfile): Use delete.
12350 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12351 (copy_type_recursive): Use new.
12352 * gdb_obstack.h (allocate_on_obstack): New.
12353
12354 2018-02-15 Yao Qi <yao.qi@linaro.org>
12355
12356 PR gdb/22849
12357 * inferior.c (exit_inferior_1): Reset inf->control.
12358
12359 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12360
12361 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12362 declaration.
12363
12364 2018-02-14 Pedro Alves <palves@redhat.com>
12365
12366 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12367 frame_cleanup_after_sniffer on exception.
12368
12369 2018-02-14 Tom Tromey <tom@tromey.com>
12370
12371 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12372 const.
12373 (solib_bfd_open): Make pathname const.
12374 * solib.c (solib_bfd_open): Make pathname const.
12375 * solib-spu.c (spu_bfd_fopen): Make name const.
12376 (spu_bfd_open): Make pathname const.
12377 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12378 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12379
12380 2018-02-14 Tom Tromey <tom@tromey.com>
12381
12382 * symfile.c (symfile_bfd_open): Update.
12383 * source.h (openp, source_full_path_of, find_and_open_source):
12384 Change argument type to unique_xmalloc_ptr.
12385 * source.c (openp): Take a unique_xmalloc_ptr.
12386 (source_full_path_of, find_and_open_source): Likewise.
12387 (open_source_file, symtab_to_fullname): Update.
12388 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12389 unique_xmalloc_ptr.
12390 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12391 (exec_file_find): Update.
12392 * psymtab.c (psymtab_to_fullname): Update.
12393 * nto-tdep.h (nto_find_and_open_solib): Update.
12394 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12395 unique_xmalloc_ptr.
12396 * exec.c (exec_file_attach): Update.
12397 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12398 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12399
12400 2018-02-14 Tom Tromey <tom@tromey.com>
12401
12402 * solib.c: Include source.h.
12403 * nto-tdep.c: Include source.h.
12404 * mi/mi-cmd-env.c: Include source.h.
12405 * infcmd.c: Include source.h.
12406 * exec.c: Include source.h.
12407 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12408 (add_path, directory_switch, source_path, init_source_path): Move
12409 declarations...
12410 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12411 (add_path, directory_switch, source_path, init_source_path):
12412 ...here.
12413
12414 2018-02-14 Tom Tromey <tom@tromey.com>
12415
12416 * solist.h (exec_file_find, solib_find): Return
12417 unique_xmalloc_ptr.
12418 (solib_bfd_fopen): Take a const char *.
12419 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12420 (exec_file_find, solib_find): Likewise.
12421 (solib_bfd_fopen): Do not take ownership of "pathname".
12422 (solib_bfd_open): Use unique_xmalloc_ptr.
12423 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12424 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12425 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12426 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12427
12428 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12429
12430 * ada-lang.c (name_match_type_from_name): Remove reference to
12431 ada_name_for_lookup in function's documentation.
12432 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12433
12434 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12435
12436 * defs.h (enum openp_flags): New enum.
12437 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12438 Move to enum openp_flags.
12439 (openp_flags): New enum flags.
12440 (openp): Change parameter type to openp_flags.
12441 * source.c (openp): Change parameter type to openp_flags.
12442 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12443 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12444
12445 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12446
12447 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12448 per-command.
12449
12450 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12451
12452 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12453 into...
12454 (class dwarf2_queue_guard): ...the destructor of this new class.
12455 (dw2_do_instantiate_symtab): Create instance of the new class
12456 dwarf2_queue_guard, remove cleanup.
12457
12458 2018-02-09 Tom Tromey <tom@tromey.com>
12459
12460 * source.c (find_source_lines): Don't reference past the end of
12461 the vector.
12462
12463 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12464
12465 * remote.c (remote_btrace_maybe_reopen): Change error message.
12466 * btrace.c (btrace_enable): Likewise.
12467 (parse_xml_btrace): Likewise.
12468 (parse_xml_btrace_conf): Likewise.
12469
12470 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12471
12472 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12473 (linux_enable_pt, linux_enable_bts): Call
12474 diagnose_perf_event_open_fail.
12475
12476 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12477
12478 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12479 Remove parameter and change return type. Update callers. Move it.
12480 (linux_enable_bts, linux_enable_pt): Improve error message.
12481 (linux_enable_pt): Remove zero buffer size check.
12482 (linux_enable_btrace): Improve error messages. Remove NULL return
12483 check.
12484
12485 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12486
12487 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12488 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12489 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12490 (linux_supports_pt, linux_supports_btrace): Remove.
12491 (linux_enable_bts): Call cpu_supports_bts.
12492 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12493 * remote.c (remote_supports_btrace): Remove.
12494 (init_remote_ops): Remove remote_supports_btrace.
12495 * target-delegates.c: Regenerated.
12496 * target.c (target_supports_btrace): Remove.
12497 * target.h (target_ops) <to_supports_btrace>: Remove
12498 (target_supports_btrace): Remove.
12499 * x86-linux-nat.c (x86_linux_create_target): Remove
12500 linux_supports_btrace.
12501
12502 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12503
12504 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12505 btrace failed.
12506 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12507 exception and use message in own exception.
12508
12509 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12510
12511 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12512 (perf_event_pt_event_type): Use gdb_file_up.
12513 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12514 scoped_fd, and scoped_mmap.
12515
12516 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12517
12518 * common/scoped_mmap.h: New.
12519 * unittests/scoped_mmap-selftest.c: New.
12520 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12521 unittests/scoped_mmap-selftest.c.
12522
12523 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12524
12525 * common/scoped_fd.h: New.
12526 * unittests/scoped_fd-selftest.c: New.
12527 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12528 unittests/scoped_fd-selftest.c.
12529
12530 2018-02-09 Tom Tromey <tom@tromey.com>
12531
12532 * auto-load.c (auto_load_section_scripts): Use
12533 gdb::unique_xmalloc_ptr.
12534
12535 2018-02-09 Tom Tromey <tom@tromey.com>
12536
12537 * auto-load.c (execute_script_contents): Use std::string.
12538
12539 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12540
12541 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12542 Python function, rather than a new command.
12543
12544 2018-02-08 Tom Tromey <tom@tromey.com>
12545
12546 * solib.c (solib_find_1): Use std::string.
12547 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12548
12549 2018-02-08 Tom Tromey <tom@tromey.com>
12550
12551 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12552
12553 2018-02-08 Tom Tromey <tom@tromey.com>
12554
12555 * source.c (find_source_lines): Use gdb::def_vector.
12556
12557 2018-02-08 Tom Tromey <tom@tromey.com>
12558
12559 * macrocmd.c (struct temporary_macro_definition): New.
12560 (macro_define_command): Use temporary_macro_definition. Remove
12561 cleanups.
12562 (free_macro_definition_ptr): Remove.
12563
12564 2018-02-08 Tom Tromey <tom@tromey.com>
12565
12566 * macroexp.c (maybe_expand): Use std::string.
12567
12568 2018-02-08 Tom Tromey <tom@tromey.com>
12569
12570 * macroexp.c (struct macro_buffer): Add initializers for some
12571 members.
12572 (init_buffer, init_shared_buffer, free_buffer)
12573 (free_buffer_return_text): Remove.
12574 (macro_buffer): New constructors.
12575 (~macro_buffer): New destructor.
12576 (macro_buffer::set_shared): New method.
12577 (macro_buffer::resize_buffer, macro_buffer::appendc)
12578 (macro_buffer::appendmem): Now methods, not free functions.
12579 (set_token, append_tokens_without_splicing, stringify)
12580 (macro_stringify): Update.
12581 (gather_arguments): Change return type. Remove argc_p argument,
12582 add args_ptr argument. Use std::vector.
12583 (substitute_args): Remove argc argument. Accept std::vector.
12584 (expand): Update. Use std::vector.
12585 (scan, macro_expand, macro_expand_next): Update.
12586
12587 2018-02-08 Tom Tromey <tom@tromey.com>
12588
12589 * symtab.c (default_collect_symbol_completion_matches_break_on):
12590 Use unique_xmalloc_ptr.
12591 * macroscope.h: (sal_macro_scope, user_macro_scope)
12592 (default_macro_scope): Return unique_xmalloc_ptr.
12593 * macroscope.c (sal_macro_scope, user_macro_scope)
12594 (default_macro_scope): Return unique_xmalloc_ptr.
12595 * macroexp.h (macro_expand, macro_expand_once): Return
12596 unique_xmalloc_ptr.
12597 * macroexp.c (macro_expand, macro_expand_once): Return
12598 unique_xmalloc_ptr.
12599 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12600 (info_macro_command, info_macros_command): Use
12601 unique_xmalloc_ptr.
12602 * compile/compile-c-support.c (write_macro_definitions): Use
12603 unique_xmalloc_ptr.
12604 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12605
12606 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12607
12608 * value.c (value_static_field): Assign field type instead of
12609 containing type when returning an optimized out value.
12610
12611 2018-02-06 Yao Qi <yao.qi@linaro.org>
12612
12613 * ft32-tdep.c (ft32_read_pc): Remove.
12614 (ft32_write_pc): Remove.
12615 (ft32_gdbarch_init): Update.
12616 * m32r-tdep.c (m32r_read_pc): Remove.
12617 (m32r_gdbarch_init): Update.
12618 * mep-tdep.c (mep_read_pc): Remove.
12619 (mep_gdbarch_init): Update.
12620 * microblaze-tdep.c (microblaze_write_pc): Remove.
12621 (microblaze_gdbarch_init): Update.
12622 * mn10300-tdep.c (mn10300_read_pc): Remove.
12623 (mn10300_write_pc): Remove.
12624 (mn10300_gdbarch_init): Update.
12625 * moxie-tdep.c (moxie_read_pc): Remove.
12626 (moxie_write_pc): Remove.
12627 (moxie_gdbarch_init): Update.
12628
12629 2018-02-06 Yao Qi <yao.qi@linaro.org>
12630
12631 * expprint.c (print_subexp_standard): Handle
12632 OP_F77_UNDETERMINED_ARGLIST.
12633 (dump_subexp_body_standard): Likewise.
12634
12635 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12636
12637 * target-descriptions.c (tdesc_element_visitor) Add empty
12638 implementations.
12639 (tdesc_type): Move make_gdb_type from here.
12640 (tdesc_type_builtin): Likewise.
12641 (tdesc_type_vector): Likewise.
12642 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12643 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12644 (make_gdb_type_union): Likewise.
12645 (make_gdb_type_flags): Likewise.
12646 (make_gdb_type_enum): Likewise.
12647 (make_gdb_type): New function.
12648 (tdesc_register_type): Use static make_gdb_type.
12649
12650 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12651
12652 * infcmd.c (default_print_one_register_info): Align natural-format
12653 column values consistently one under another.
12654 (pad_to_column): New function.
12655
12656 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12657
12658 * dwarf2read.c (dwarf2_physname): Move commment.
12659
12660 2018-02-01 Leszek Swirski <leszeks@google.com>
12661
12662 * varobj.c (varobj_formatted_print_options): Allow recursive
12663 pretty printing if pretty printing is enabled.
12664
12665 2018-02-01 Leszek Swirski <leszeks@google.com>
12666
12667 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12668 names after a structop as a filename.
12669
12670 2018-02-01 Yao Qi <yao.qi@linaro.org>
12671
12672 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12673 (arm_record_coproc_data_proc): Likewise.
12674
12675 2018-02-01 Yao Qi <yao.qi@linaro.org>
12676
12677 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12678
12679 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12680
12681 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12682 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12683
12684 2018-01-31 Pedro Alves <palves@redhat.com>
12685
12686 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12687 * inflow.c (child_terminal_save_inferior): Wrap reference to
12688 tcgetpgrp in HAVE_TERMIOS_H.
12689 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12690 _WIN32.
12691 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12692 always iterate over all inferiors.
12693 (gdbsim_cntrl_c): Adjust.
12694 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12695
12696 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12697
12698 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12699 index type is objfile-owned if the element type is as well.
12700
12701 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12702
12703 GDB 8.1 released.
12704
12705 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12706
12707 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12708 "features/s390x-linux64.c".
12709 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12710 s390_linux32 and s390x_linux64.
12711 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12712 default tdesc.
12713 * s390-tdep.c: Include "features/s390-linux32.c" and
12714 "features/s390x-linux64.c".
12715 (s390_tdesc_valid): Add check for tdesc_has_registers.
12716 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12717 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12718 tdesc_s390x_linux64.
12719 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12720 tdesc_s390x_linux64 to...
12721 * s390-tdep.h: ...here.
12722
12723 2018-01-30 Pedro Alves <palves@redhat.com>
12724
12725 PR gdb/13211
12726 * config.in, configure: Regenerate.
12727 * configure.ac: Check for getpgid.
12728 * go32-nat.c (go32_pass_ctrlc): New.
12729 (go32_target): Install it.
12730 * inf-child.c (inf_child_target): Install
12731 child_terminal_save_inferior, child_pass_ctrlc and
12732 child_interrupt.
12733 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12734 (inf_ptrace_target): No longer install it.
12735 * infcmd.c (interrupt_target_1): Adjust.
12736 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12737 (child_interrupt): Declare.
12738 (inferior::terminal_state): New.
12739 * inflow.c (struct terminal_info): Update comments.
12740 (inferior_process_group): Delete.
12741 (terminal_is_ours): Delete.
12742 (gdb_tty_state): New.
12743 (child_terminal_init): Adjust.
12744 (is_gdb_terminal, sharing_input_terminal_1)
12745 (sharing_input_terminal): New functions.
12746 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12747 Set the process's actual process group in the foreground if
12748 possible. Handle is_ours_for_output/is_ours distinction. Don't
12749 mark terminal as the inferior's if not sharing GDB's terminal.
12750 Don't check attach_flag.
12751 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12752 pass down a target_terminal_state.
12753 (child_terminal_save_inferior): New, factored out from ...
12754 (child_terminal_ours_1): ... this. Handle
12755 target_terminal_state::is_ours_for_output.
12756 (child_interrupt, child_pass_ctrlc): New.
12757 (inflow_inferior_exit): Clear the inferior's terminal_state.
12758 (copy_terminal_info): Copy the inferior's terminal state.
12759 (_initialize_inflow): Remove reference to terminal_is_ours.
12760 * inflow.h (inferior_process_group): Delete.
12761 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12762 * procfs.c (procfs_target): Don't install procfs_interrupt.
12763 (procfs_interrupt): Delete.
12764 * remote.c (remote_serial_quit_handler): Adjust.
12765 (remote_interrupt): Remove ptid parameter. Adjust.
12766 * target-delegates.c: Regenerate.
12767 * target.c: Include "terminal.h".
12768 (target_terminal::terminal_state): Rename to ...
12769 (target_terminal::m_terminal_state): ... this.
12770 (target_terminal::init): Adjust.
12771 (target_terminal::inferior): Adjust to per-inferior
12772 terminal_state.
12773 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12774 (target_terminal::ours, target_terminal::ours_for_output): Use
12775 target_terminal_is_ours_kind.
12776 (target_interrupt): Remove ptid parameter. Adjust.
12777 (default_target_pass_ctrlc): Adjust.
12778 * target.h (target_ops::to_terminal_save_inferior): New field.
12779 (target_ops::to_interrupt): Remove ptid_t parameter.
12780 (target_interrupt): Remove ptid_t parameter. Update comment.
12781 (target_pass_ctrlc): Update comment.
12782 * target/target.h (target_terminal_state): New scoped enum,
12783 factored out of ...
12784 (target_terminal::terminal_state): ... here.
12785 (target_terminal::inferior): Update comments.
12786 (target_terminal::restore_inferior): New.
12787 (target_terminal::is_inferior, target_terminal::is_ours)
12788 (target_terminal::is_ours_for_output): Adjust.
12789 (target_terminal::scoped_restore_terminal_state): Adjust to
12790 rename, and call restore_inferior() instead of inferior().
12791 (target_terminal::scoped_restore_terminal_state::m_state): Change
12792 type.
12793 (target_terminal::terminal_state): Rename to ...
12794 (target_terminal::m_terminal_state): ... this and change type.
12795
12796 2018-01-30 Pedro Alves <palves@redhat.com>
12797
12798 * linux-nat.c (wait_for_signal): New function.
12799 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12800 directly.
12801 (async_terminal_is_ours)
12802 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12803 (linux_nat_add_target): Don't override
12804 to_terminal_inferior/to_terminal_ours.
12805
12806 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12807
12808 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12809
12810 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12811
12812 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12813 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12814 dwarf2_per_objfile_free here.
12815 (dwarf2_per_objfile_free): Remove.
12816 (_initialize_dwarf2_read): Don't register
12817 dwarf2_per_objfile_free as a registry cleanup.
12818
12819 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12820
12821 Avoid compilation errors in MinGW native builds
12822
12823 The error is triggered by including python-internal.h, and the
12824 error message is:
12825
12826 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12827 from build-gnulib/import/math.h:27,
12828 from d:/usr/Python26/include/pyport.h:235,
12829 from d:/usr/Python26/include/Python.h:58,
12830 from python/python-internal.h:94,
12831 from python/py-arch.c:24:
12832 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12833 using ::hypot;
12834 ^~~~~
12835
12836 This happens because Python headers define 'hypot' to expand t
12837 '_hypot' in the Windows builds.
12838 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12839 'hypoth'. This avoids a compilation error.
12840
12841 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12842
12843 * MAINTAINERS (Write After Approval): Fix ordering.
12844
12845 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12846
12847 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12848
12849 2018-01-26 Alan Modra <amodra@gmail.com>
12850
12851 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12852 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12853 Remove nop. Make const. Comment.
12854 (powerpc32_plt_stub_so_2): New.
12855 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12856 Correct count. Update uses.
12857 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12858 Move common code reading PLT entry word. Correct
12859 powerpc32_plt_stub PLT address calculation.
12860 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12861 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12862 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12863 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12864 (ppc64_standard_linkage8): Likewise.
12865 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12866 Correct insns description.
12867 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12868
12869 2018-01-24 Pedro Alves <palves@redhat.com>
12870
12871 GCC PR libstdc++/83906
12872 * gdbtypes.c (operator==(const dynamic_prop &,
12873 const dynamic_prop &)): New.
12874 (operator==(const range_bounds &, const range_bounds &)): New.
12875 (check_types_equal): Use them instead of memcmp.
12876 * gdbtypes.h (operator==(const dynamic_prop &,
12877 const dynamic_prop &)): Declare.
12878 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12879 (operator==(const range_bounds &, const range_bounds &)): Declare.
12880 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12881
12882 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12883
12884 * s390-linux-tdep.c (s390_record_address_mask)
12885 (s390_record_calc_disp_common, s390_record_calc_disp)
12886 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12887 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12888 (s390_process_record): Move to s390-tdep.c.
12889 (s390_linux_init_abi_any): Adjust.
12890 * s390-tdep.c (s390_record_address_mask)
12891 (s390_record_calc_disp_common, s390_record_calc_disp)
12892 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12893 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12894 (s390_process_record): Moved from s390-linux-tdep.c
12895 (s390_gdbarch_init): Adjust.
12896
12897 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12898
12899 * s390-linux-nat.c (s390-tdep.h): New include.
12900 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12901 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12902 (ALLDEPFILES): Add s390-tdep.c.
12903 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12904 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12905 * s390-tdep.h: ...this. New file.
12906 * s390-linux-tdep.c (s390-tdep.h): New include.
12907 (_initialize_s390_tdep): Rename to...
12908 (_initialize_s390_linux_tdep): ...this and adjust.
12909 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12910 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12911 s390-tdep.h.
12912 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12913 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12914 (s390_is_partial_instruction, s390_software_single_step)
12915 (is_non_branch_ril, s390_displaced_step_copy_insn)
12916 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12917 (s390_prologue_data, s390_addr, s390_store, s390_load)
12918 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12919 (s390_register_call_saved, s390_guess_tracepoint_registers)
12920 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12921 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12922 (s390_pseudo_register_name, s390_pseudo_register_type)
12923 (s390_pseudo_register_read, s390_pseudo_register_write)
12924 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12925 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12926 (s390_addr_bits_remove, s390_address_class_type_flags)
12927 (s390_address_class_type_flags_to_name)
12928 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12929 (s390_function_arg_float, s390_function_arg_vector)
12930 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12931 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12932 (s390_frame_align, s390_register_return_value, s390_return_value)
12933 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12934 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12935 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12936 (s390_trad_frame_prev_register, s390_unwind_cache)
12937 (s390_prologue_frame_unwind_cache)
12938 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12939 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12940 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12941 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12942 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12943 (s390_frame_base_address, s390_local_base_address)
12944 (s390_frame_base, s390_gcc_target_options)
12945 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12946 (s390_validate_reg_range, s390_tdesc_valid)
12947 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12948 * s390-tdep.c: ...this. New file.
12949
12950 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12951
12952 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12953 (s390_process_record, s390_gdbarch_tdep_alloc)
12954 (s390_linux_init_abi_any): Use/set new hook.
12955
12956 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12957
12958 * s390-linux-tdep.c (osabi.h): New include.
12959 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12960 (s390_linux_init_abi_any): New functions.
12961 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12962
12963 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12964
12965 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12966 tdesc_has_registers check
12967
12968 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12969
12970 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12971 (s390_validate_reg_range): New macro.
12972 (s390_gdbarch_init): Adjust.
12973
12974 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12975
12976 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12977 (s390_gdbarch_tdep_alloc): Adjust.
12978 (s390_gdbarch_init): Adjust.
12979
12980 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12981
12982 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12983 <have_tdb>: Change type to bool.
12984 (s390_gdbarch_tdep_alloc): Adjust.
12985 (s390_gdbarch_init): Adjust.
12986
12987 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12988
12989 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12990 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12991 (s390_gdbarch_tdep_alloc): New function.
12992 (s390_gdbarch_init): Allocate tdep at start and use its fields
12993 instead of separate variables.
12994
12995 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12996
12997 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12998 when looking for cached gdbarch and add comment for remaining.
12999
13000 2018-01-22 Pedro Alves <palves@redhat.com>
13001 Sergio Durigan Junior <sergiodj@redhat.com>
13002
13003 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13004 case.
13005
13006 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13007
13008 * MAINTAINERS: Update my company e-mail address.
13009
13010 2018-01-22 Yao Qi <yao.qi@linaro.org>
13011
13012 * regcache.c (cooked_write_test): New function.
13013 (_initialize_regcache): Register the test.
13014
13015 2018-01-22 Yao Qi <yao.qi@linaro.org>
13016
13017 * ia64-tdep.c (ia64_pseudo_register_read): Call
13018 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13019 * m32c-tdep.c (m32c_cat_read): Likewise.
13020 (m32c_r3r2r1r0_read): Likewise.
13021 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13022 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13023
13024 2018-01-22 Yao Qi <yao.qi@linaro.org>
13025
13026 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13027 method raw_read instead of regcache_raw_read.
13028 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13029 * arm-tdep.c (arm_neon_quad_read): Likewise.
13030 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13031 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13032 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13033 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13034 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13035 (i386_pseudo_register_read_into_value): Likewise.
13036 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13037 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13038 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13039 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13040 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13041 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13042 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13043 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13044 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13045
13046 2018-01-22 Yao Qi <yao.qi@linaro.org>
13047
13048 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13049 * configure.tgt: Remove target mt.
13050 * mt-tdep.c: Remove.
13051 * regcache.c (cooked_read_test): Remove the check for mt.
13052
13053 2018-01-22 Yao Qi <yao.qi@linaro.org>
13054
13055 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13056 instead of gdbarch_pseudo_register_read_value.
13057
13058 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13059
13060 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13061 language is Ada.
13062
13063 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13064
13065 * linespec.c (create_sals_line_offset): Remove code that preserved
13066 the symtab_and_line's line number.
13067
13068 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13069
13070 * varobj.c (varobj_create): Don't set valid_block when creating a
13071 floating varobj.
13072
13073 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13074
13075 * varobj.c (varobj_create): Remove out of date comment.
13076
13077 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13078
13079 PR mi/20395
13080 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13081 updating innermost block.
13082 * parse.c (innermost_block_tracker::update): Take extra type
13083 parameter, and check types match before updating innermost block.
13084 (write_dollar_variable): Update innermost block for registers.
13085 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13086 (innermost_block_tracker::innermost_block_tracker): Initialise
13087 m_types member.
13088 (innermost_block_tracker::reset): Take type parameter.
13089 (innermost_block_tracker::update): Take type parameter, and pass
13090 type through as needed.
13091 (innermost_block_tracker::m_types): New member.
13092 * varobj.c (varobj_create): Pass type when reseting innermost
13093 block.
13094
13095 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13096
13097 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13098 * ada-lang.c (resolve_subexp): Likewise.
13099 * breakpoint.c (set_breakpoint_condition) Likewise.
13100 (watch_command_1) Likewise.
13101 * c-exp.y (variable): Likewise.
13102 * d-exp.y (PrimaryExpression): Likewise.
13103 * f-exp.y (variable): Likewise.
13104 * go-exp.y (variable): Likewise.
13105 * m2-exp.y (variable): Likewise.
13106 * objfiles.c (objfile::~objfile): Likewise.
13107 * p-exp.y (variable): Likewise.
13108 * parse.c (innermost_block): Change type.
13109 * parser-defs.h (class innermost_block_tracker): New.
13110 (innermost_block): Change to innermost_block_tracker.
13111 * printcmd.c (display_command): Switch to innermost_block API.
13112 (do_one_display): Likewise.
13113 * rust-exp.y (do_one_display): Likewise.
13114 * symfile.c (clear_symtab_users): Likewise.
13115 * varobj.c (varobj_create): Switch to innermost_block API, replace
13116 use of innermost_block with block stored on varobj object.
13117
13118 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13119
13120 * expression.h (innermost_block): Remove declaration.
13121 * varobj.c: Add 'parser-defs.h' include.
13122
13123 2018-01-19 Tom Tromey <tom@tromey.com>
13124
13125 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13126 symbols in the static and global blocks.
13127
13128 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13129
13130 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13131 gdb_ptrace.h, and move including gdb_wait.h ...
13132 * nat/linux-ptrace.h: ... to here.
13133
13134 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13135
13136 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13137 inf_ptrace_detach_success.
13138 (inf_ptrace_detach_success): Add inferior parameter, use it
13139 instead of inferior_ptid, pass it to detach_inferior.
13140 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13141 parameter.
13142 * inferior.c (detach_inferior): Add overload that takes an
13143 inferior object.
13144 * inferior.h (detach_inferior): Likewise.
13145 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13146 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13147 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13148
13149 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13150
13151 * target.h (struct target_ops) <to_detach>: Add inferior
13152 parameter.
13153 (target_detach): Likewise.
13154 * target.c (dispose_inferior): Pass inferior down.
13155 (target_detach): Pass inferior down. Assert that it is equal to
13156 the current inferior.
13157 * aix-thread.c (aix_thread_detach): Pass inferior down.
13158 * corefile.c (core_file_command): Pass current_inferior() down.
13159 * corelow.c (core_detach): Add inferior parameter.
13160 * darwin-nat.c (darwin_detach): Likewise.
13161 * gnu-nat.c (gnu_detach): Likewise.
13162 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13163 * infcmd.c (detach_command): Pass current_inferior() down to
13164 target_detach.
13165 * infrun.c (follow_fork_inferior): Pass parent_inf to
13166 target_detach.
13167 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13168 target_detach.
13169 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13170 * linux-thread-db.c (thread_db_detach): Likewise.
13171 * nto-procfs.c (procfs_detach): Likewise.
13172 * procfs.c (procfs_detach): Likewise.
13173 * record.c (record_detach): Likewise.
13174 * record.h (struct inferior): Forward-declare.
13175 (record_detach): Add inferior parameter.
13176 * remote-sim.c (gdbsim_detach): Likewise.
13177 * remote.c (remote_detach_1): Likewise.
13178 (remote_detach): Likewise.
13179 (extended_remote_detach): Likewise.
13180 * sol-thread.c (sol_thread_detach): Likewise.
13181 * target-debug.h (target_debug_print_inferior_p): New macro.
13182 * target-delegates.c: Re-generate.
13183 * top.c (kill_or_detach): Pass inferior down to target_detach.
13184 * windows-nat.c (windows_detach): Add inferior parameter.
13185
13186 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13187
13188 * target.h (struct target_ops) <to_detach>: Remove args
13189 parameter.
13190 (target_detach): Likewise.
13191 * target.c (dispose_inferior): Adjust.
13192 (target_detach): Remove args parameter, adjust.
13193 * aix-thread.c (aix_thread_detach): Adjust.
13194 * corefile.c (core_file_command): Adjust.
13195 * corelow.c (core_detach): Adjust.
13196 * darwin-nat.c (darwin_detach): Adjust.
13197 * gnu-nat.c (gnu_detach): Adjust.
13198 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13199 * infcmd.c (detach_command): Adjust
13200 * infrun.c (follow_fork_inferior): Adjust.
13201 (handle_vfork_child_exec_or_exit): Adjust.
13202 * linux-fork.c (linux_fork_detach): Remove args parameter.
13203 * linux-fork.h (linux_fork_detach): Likewise.
13204 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13205 * linux-thread-db.c (thread_db_detach): Likewise.
13206 * nto-procfs.c (procfs_detach): Likewise.
13207 * procfs.c (procfs_detach): Likewise.
13208 (do_detach): Remove signo parameter.
13209 * record.c (record_detach): Remove args parameter.
13210 * record.h (record_detach): Likewise.
13211 * remote-sim.c (gdbsim_detach): Likewise.
13212 * remote.c (remote_detach_1): Likewise.
13213 (remote_detach): Likewise.
13214 (extended_remote_detach): Likewise.
13215 * sol-thread.c (sol_thread_detach): Likewise.
13216 * target-delegates.c: Re-generate.
13217 * top.c (struct qt_args) <args>: Remove field.
13218 (kill_or_detach): Don't pass args.
13219 (quit_force): Don't set args.
13220 * windows-nat.c (windows_detach): Remove args parameter.
13221
13222 2018-01-19 Yao Qi <yao.qi@linaro.org>
13223
13224 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13225 (arm_linux_init_abi): Install it.
13226
13227 2018-01-19 Yao Qi <yao.qi@linaro.org>
13228
13229 * osabi.c (gdb_osabi_names): Extend the regexp for
13230 arm-linux-gnueabihf.
13231
13232 2018-01-18 Yao Qi <yao.qi@linaro.org>
13233
13234 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13235 m_abbrevs.
13236 (abbrev_table::add_abbrev): Update.
13237 (abbrev_table::lookup_abbrev): Update.
13238
13239 2018-01-18 Yao Qi <yao.qi@linaro.org>
13240
13241 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13242
13243 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13244
13245 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13246 to "std::string".
13247
13248 2018-01-17 Tom Tromey <tom@tromey.com>
13249
13250 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13251
13252 2018-01-17 Tom Tromey <tom@tromey.com>
13253
13254 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13255 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13256 (create_array_type_with_stride): Update.
13257 * dwarf2read.c (set_die_type): Update.
13258
13259 2018-01-17 Tom Tromey <tom@tromey.com>
13260
13261 * dwarf2read.c (delayed_method_info): Remove typedef.
13262 (dwarf2_cu::method_info): Now a std::vector.
13263 (add_to_method_list): Update.
13264 (free_delayed_list): Remove.
13265 (compute_delayed_physnames): Update.
13266 (process_full_comp_unit, process_full_type_unit): Clear the method
13267 list. Remove cleanups.
13268 (psymtab_include_file_name): Add name_holder parameter. Use
13269 unique_xmalloc_ptr.
13270 (dwarf_decode_lines): Update.
13271
13272 2018-01-17 Tom Tromey <tom@tromey.com>
13273 Simon Marchi <simon.marchi@ericsson.com>
13274
13275 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13276 (dwarf2_per_objfile::free_cached_comp_units)
13277 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13278 (init_cutu_and_read_dies_no_follow): Update.
13279 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13280 (dwarf2_cu::~dwarf2_cu): New.
13281 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13282 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13283
13284 2018-01-17 Tom Tromey <tom@tromey.com>
13285 Simon Marchi <simon.marchi@ericsson.com>
13286
13287 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13288 (struct die_reader_specs) <abbrev_table>: New member.
13289 (struct abbrev_table): Add constructor.
13290 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13291 <abbrev_obstack>: Now an auto_obstack.
13292 (abbrev_table_up): New typedef.
13293 (init_cu_die_reader): Add abbrev_table parameter.
13294 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13295 Add result_dwo_abbrev_table.
13296 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13297 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13298 Update.
13299 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13300 parameter.
13301 (skip_children): Update.
13302 (abbrev_table::alloc_abbrev): Rename from
13303 abbrev_table_alloc_abbrev.
13304 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13305 (abbrev_table::lookup_abbrev): Rename from
13306 abbrev_table_lookup_abbrev.
13307 (abbrev_table_read_table): Return abbrev_table_up.
13308 (abbrev_table_free, abbrev_table_free_cleanup)
13309 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13310 (load_partial_dies): Update.
13311
13312 2018-01-17 Tom Tromey <tom@tromey.com>
13313
13314 * dwarf2read.c (dwarf2_compute_name): Update comment.
13315 (read_func_scope, read_variable): Update.
13316 (new_symbol): Remove.
13317 (new_symbol_full): Rename to new_symbol.
13318
13319 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13320
13321 PR gdb/16577
13322 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13323 a warning instead of throwing an error, set section size to 0 and return
13324 NULL.
13325 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13326
13327 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13328
13329 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13330 std::string.
13331 (linux_ptrace_attach_fail_reason_string): Likewise.
13332 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13333 Likewise.
13334 (linux_ptrace_attach_fail_reason_string): Likewise.
13335 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13336
13337 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13338
13339 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13340
13341 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13342
13343 PR gdb/21559
13344 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13345 checking for fs_base/gs_base fields in struct user_regs_struct.
13346 * configure: Regenerate.
13347
13348 2018-01-17 Yao Qi <yao.qi@linaro.org>
13349
13350 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13351 function.
13352 (aarch64_linux_init_abi): Install it to gdbarch hook
13353 gcc_target_options.
13354
13355 2018-01-15 Pedro Alves <palves@redhat.com>
13356
13357 * common/signals-state-save-restore.c
13358 (save_original_signals_state): Fix typos.
13359
13360 2017-01-12 Tom Tromey <tom@tromey.com>
13361 Sergio Durigan Junior <sergiodj@redhat.com>
13362
13363 * Makefile.in (install-only): Install gdb-add-index.
13364
13365 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13366
13367 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13368
13369 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13370
13371 * infrun.c (keep_going_pass_signal): Clear step-over info when
13372 insert_breakpoints fails.
13373
13374 2018-01-11 Pedro Alves <palves@redhat.com>
13375
13376 PR gdb/22583
13377 * infrun.c (resume): Rename to ...
13378 (resume_1): ... this.
13379 (resume): Reimplement as wrapper around resume_1.
13380
13381 2018-01-11 Pedro Alves <palves@redhat.com>
13382
13383 PR remote/22597
13384 * remote.c (remote_parse_stop_reply): Default to the last-set
13385 general thread instead of to 'magic_null_ptid'.
13386
13387 2018-01-10 Pedro Alves <palves@redhat.com>
13388
13389 * language.h (language_get_symbol_name_matcher): Rename ...
13390 (get_symbol_name_matcher): ... this.
13391 * language.c (language_get_symbol_name_matcher): Ditto.
13392 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13393 callers adjusted.
13394
13395 2018-01-10 Pedro Alves <palves@redhat.com>
13396
13397 PR gdb/22670
13398 * dwarf2read.c
13399 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13400 Adjust to use language_get_symbol_name_matcher instead of
13401 language_defn::la_get_symbol_name_matcher.
13402 * language.c (language_get_symbol_name_matcher): If in Ada mode
13403 and the lookup name is a verbatim match, return Ada's matcher.
13404 * language.h (language_get_symbol_name_matcher): Adjust comment.
13405 (ada_lookup_name_info::verbatim_p):: New method.
13406
13407 2018-01-10 Pedro Alves <palves@redhat.com>
13408
13409 PR gdb/22670
13410 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13411 minsym's language is language_auto or language_cplus, pass down
13412 language_ada instead.
13413 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13414
13415 2018-01-10 Pedro Alves <palves@redhat.com>
13416
13417 PR gdb/22670
13418 * minsyms.c (linkage_name_str): New function.
13419 (iterate_over_minimal_symbols): Use it.
13420
13421 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13422
13423 * NEWS: Document that 'info proc' now works on FreeBSD.
13424
13425 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13426
13427 * configure.ac: Check for kinfo_getfile in libutil.
13428 * configure: Regenerate.
13429 * config.in: Regenerate.
13430 * fbsd-nat.c: Include "fbsd-tdep.h".
13431 (fbsd_fetch_cmdline): New.
13432 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13433 rather than calling error.
13434 (fbsd_info_proc): New.
13435 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13436 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13437 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13438
13439 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13440
13441 * fbsd-nat.c (struct free_deleter): Remove.
13442 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13443
13444 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13445
13446 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13447 NULL for an empty pathname.
13448
13449 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13450
13451 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13452 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13453 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13454 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13455 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13456 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13457 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13458 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13459 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13460 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13461 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13462 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13463 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13464 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13465 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13466
13467 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13468
13469 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13470 (gnu_xfer_auxv): New function.
13471 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13472 TARGET_OBJECT_AUXV.
13473
13474 2018-01-08 Yao Qi <yao.qi@linaro.org>
13475 Simon Marchi <simon.marchi@ericsson.com>
13476
13477 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13478 common/selftest.c.
13479 (COMMON_OBS): Remove selftest.o.
13480 * configure.ac: Append selftest-arch.c and common/selftest.c to
13481 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13482 * configure: Re-generated.
13483 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13484 GDB_SELF_TEST.
13485 (maintenance_info_selftests): Likewise.
13486
13487 2018-01-08 Xavier Roirand <roirand@adacore.com>
13488
13489 * ada-valprint.c (val_print_packed_array_elements): Use
13490 proper number of elements when printing an array indexed
13491 by an enumeration type.
13492
13493 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13494
13495 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13496 (dw2_get_file_names_reader): Adjust.
13497 (lookup_dwo_signatured_type): Adjust.
13498 (lookup_dwp_signatured_type): Adjust.
13499 (lookup_signatured_type): Adjust.
13500 (create_type_unit_group): Adjust.
13501 (get_type_unit_group): Adjust.
13502 (process_psymtab_comp_unit_reader): Adjust.
13503 (build_type_psymtabs_reader): Adjust.
13504 (scan_partial_symbols): Adjust.
13505 (add_partial_symbol): Adjust.
13506 (add_partial_subprogram): Adjust.
13507 (peek_die_abbrev): Adjust.
13508 (fixup_go_packaging): Adjust.
13509 (process_imported_unit_die): Adjust.
13510 (dwarf2_compute_name): Adjust.
13511 (dwarf2_physname): Adjust.
13512 (read_import_statement): Adjust.
13513 (handle_DW_AT_stmt_list): Adjust.
13514 (read_file_scope): Adjust.
13515 (read_func_scope): Adjust.
13516 (read_lexical_block_scope): Adjust.
13517 (read_call_site_scope): Adjust.
13518 (read_variable): Adjust.
13519 (dwarf2_rnglists_process): Adjust.
13520 (dwarf2_ranges_process): Adjust.
13521 (dwarf2_ranges_read): Adjust.
13522 (dwarf2_get_pc_bounds): Adjust.
13523 (dwarf2_record_block_ranges): Adjust.
13524 (dwarf2_add_field): Adjust.
13525 (dwarf2_add_member_fn): Adjust.
13526 (read_structure_type): Adjust.
13527 (process_structure_scope): Adjust.
13528 (read_enumeration_type): Adjust.
13529 (read_array_type): Adjust.
13530 (mark_common_block_symbol_computed): Adjust.
13531 (read_common_block): Adjust.
13532 (read_namespace_type): Adjust.
13533 (read_namespace): Adjust.
13534 (read_module_type): Adjust.
13535 (read_tag_pointer_type): Adjust.
13536 (read_tag_ptr_to_member_type): Adjust.
13537 (read_tag_string_type): Adjust.
13538 (read_subroutine_type): Adjust.
13539 (read_typedef): Adjust.
13540 (read_base_type): Adjust.
13541 (attr_to_dynamic_prop): Adjust.
13542 (read_subrange_type): Adjust.
13543 (read_unspecified_type): Adjust.
13544 (dwarf2_read_abbrevs): Adjust.
13545 (load_partial_dies): Adjust.
13546 (read_partial_die): Adjust.
13547 (find_partial_die): Adjust.
13548 (guess_partial_die_structure_name): Adjust.
13549 (fixup_partial_die): Adjust.
13550 (read_attribute_value): Adjust.
13551 (read_addr_index): Adjust.
13552 (read_addr_index_from_leb128): Adjust.
13553 (read_str_index): Adjust.
13554 (dwarf2_string_attr): Adjust.
13555 (get_debug_line_section): Adjust.
13556 (dwarf_decode_line_header): Adjust.
13557 (lnp_state_machine::check_line_address): Adjust.
13558 (dwarf_decode_lines_1): Adjust.
13559 (dwarf_decode_lines): Adjust.
13560 (dwarf2_start_symtab): Adjust.
13561 (var_decode_location): Adjust.
13562 (new_symbol_full): Adjust.
13563 (dwarf2_const_value_data): Adjust.
13564 (dwarf2_const_value_attr): Adjust.
13565 (dwarf2_const_value): Adjust.
13566 (die_type): Adjust.
13567 (die_containing_type): Adjust.
13568 (build_error_marker_type): Adjust.
13569 (lookup_die_type): Adjust.
13570 (guess_full_die_structure_name): Adjust.
13571 (anonymous_struct_prefix): Adjust.
13572 (determine_prefix): Adjust.
13573 (dwarf2_name): Adjust.
13574 (follow_die_ref_or_sig): Adjust.
13575 (follow_die_offset): Adjust.
13576 (follow_die_ref): Adjust.
13577 (follow_die_sig_1): Adjust.
13578 (follow_die_sig): Adjust.
13579 (get_signatured_type): Adjust.
13580 (get_DW_AT_signature_type): Adjust.
13581 (decode_locdesc): Adjust.
13582 (dwarf_decode_macros): Adjust.
13583 (cu_debug_loc_section): Adjust.
13584 (fill_in_loclist_baton): Adjust.
13585 (dwarf2_symbol_mark_computed): Adjust.
13586 (init_one_comp_unit): Don't assign
13587 dwarf2_cu::dwarf2_per_objfile.
13588 (set_die_type): Adjust.
13589
13590 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13591
13592 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13593 <dwarf2_per_objfile>: New field.
13594 (dwarf2_per_objfile): Remove global.
13595 (get_dwarf2_per_objfile): New function.
13596 (set_dwarf2_per_objfile): New function.
13597 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13598 dwarf2_per_objfile.
13599 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13600 (read_abbrev_offset): Likewise.
13601 (read_indirect_string): Likewise.
13602 (read_indirect_line_string): Likewise.
13603 (read_indirect_string_at_offset): Likewise.
13604 (read_indirect_string_from_dwz): Likewise.
13605 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13606 dwarf2_per_objfile.
13607 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13608 (create_all_comp_units): Change objfile parameter to
13609 dwarf2_per_objfile.
13610 (create_all_type_units): Likewise.
13611 (process_queue): Add dwarf2_per_objfile parameter.
13612 (read_and_check_comp_unit_head): Likewise.
13613 (lookup_dwo_unit_in_dwp): Likewise.
13614 (get_dwp_file): Likewise.
13615 (process_cu_includes): Likewise.
13616 (struct free_dwo_file_cleanup_data): New struct.
13617 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13618 set_dwarf2_per_objfile.
13619 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13620 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13621 context, adjust calls.
13622 (dw2_instantiate_symtab): Likewise.
13623 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13624 (dw2_get_cu): Likewise.
13625 (create_cu_from_index_list): Change objfile parameter to
13626 dwarf2_per_objfile.
13627 (create_cus_from_index_list): Get dwarf2_per_objfile from
13628 context, adjust calls.
13629 (create_cus_from_index): Likewise.
13630 (create_signatured_type_table_from_index): Change objfile
13631 parameter to dwarf2_per_objfile.
13632 (create_signatured_type_table_from_debug_names): Change objfile
13633 parameter to dwarf2_per_objfile.
13634 (create_addrmap_from_index): Likewise.
13635 (create_addrmap_from_aranges): Likewise.
13636 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13637 (dw2_setup): Remove.
13638 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13639 context.
13640 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13641 get_dwarf2_per_objfile.
13642 (dw2_forget_cached_source_info): Likewise.
13643 (dw2_map_symtabs_matching_filename): Likewise.
13644 (struct dw2_symtab_iterator) <index>: Remove.
13645 <dwarf2_per_objfile>: New field.
13646 (dw2_symtab_iter_init): Replace index parameter with
13647 dwarf2_per_objfile.
13648 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13649 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13650 (dw2_print_stats): Likewise.
13651 (dw2_dump): Likewise.
13652 (dw2_expand_symtabs_for_function): Likewise.
13653 (dw2_expand_all_symtabs): Likewise.
13654 (dw2_expand_symtabs_with_fullname): Likewise.
13655 (dw2_expand_marked_cus): Replace index and objfile parameters
13656 with dwarf2_per_objfile.
13657 (dw_expand_symtabs_matching_file_matcher): Add
13658 dwarf2_per_objfile parameter and adjust calls.
13659 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13660 adjust calls.
13661 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13662 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13663 adjust calls.
13664 (create_cus_from_debug_names_list): Replace objfile parameter
13665 with dwarf2_per_objfile and adjust calls.
13666 (create_cus_from_debug_names): Likewise.
13667 (dwarf2_read_debug_names): Likewise.
13668 (mapped_debug_names::namei_to_name): Adjust call.
13669 (dw2_debug_names_iterator::next): Likewise.
13670 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13671 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13672 (dw2_debug_names_dump): Likewise.
13673 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13674 (dw2_debug_names_expand_symtabs_matching): Likewise.
13675 (dwarf2_initialize_objfile): Likewise.
13676 (dwarf2_build_psymtabs): Likewise.
13677 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13678 this_cu.
13679 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13680 (read_and_check_comp_unit_head): Likewise.
13681 (read_abbrev_offset): Likewise.
13682 (create_debug_type_hash_table): Likewise.
13683 (create_debug_types_hash_table): Likewise.
13684 (create_all_type_units): Replace objfile parameter with
13685 dwarf2_per_objfile.
13686 (add_type_unit): Add dwarf2_per_objfile parameter.
13687 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13688 with dwarf2_per_objfile.
13689 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13690 (lookup_dwp_signatured_type): Likewise.
13691 (lookup_signatured_type): Likewise.
13692 (read_cutu_die_from_dwo): Likewise.
13693 (init_tu_and_read_dwo_dies): Likewise.
13694 (init_cutu_and_read_dies): Likewise.
13695 (init_cutu_and_read_dies_no_follow): Likewise.
13696 (allocate_type_unit_groups_table): Add objfile parameter.
13697 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13698 (get_type_unit_group): Likewise.
13699 (process_psymtab_comp_unit): Update call.
13700 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13701 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13702 (print_tu_stats): Likewise.
13703 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13704 in void* parameter.
13705 (build_type_psymtabs): Change objfile parameter to
13706 dwarf2_per_objfile.
13707 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13708 passed in void* parameter.
13709 (process_skeletonless_type_units): Change objfile parameter to
13710 dwarf2_per_objfile.
13711 (set_partial_user): Likewise.
13712 (dwarf2_build_psymtabs_hard): Likewise.
13713 (read_comp_units_from_section): Likewise.
13714 (create_all_comp_units): Likewise.
13715 (scan_partial_symbols): Update calls.
13716 (add_partial_symbol): Likewise.
13717 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13718 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13719 (process_queue): Add dwarf2_per_objfile parameter.
13720 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13721 (compute_compunit_symtab_includes): Likewise.
13722 (process_cu_includes): Add dwarf2_per_objfile parameter.
13723 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13724 (process_full_type_unit): Likewise.
13725 (process_imported_unit_die): Update call.
13726 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13727 (read_file_scope): Likewise.
13728 (allocate_dwo_file_hash_table): Add objfile parameter.
13729 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13730 (create_cus_hash_table): Likewise.
13731 (create_dwp_hash_table): Likewise.
13732 (create_dwo_unit_in_dwp_v1): Likewise.
13733 (create_dwp_v2_section): Likewise.
13734 (create_dwo_unit_in_dwp_v2): Likewise.
13735 (lookup_dwo_unit_in_dwp): Likewise.
13736 (try_open_dwop_file): Likewise.
13737 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13738 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13739 cleanup to include a reference to dwarf2_per_objfile.
13740 (open_dwp_file): Add dwarf2_per_objfile parameter.
13741 (open_and_init_dwp_file): Likewise.
13742 (get_dwp_file): Likewise.
13743 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13744 (queue_and_load_all_dwo_tus): Update call.
13745 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13746 data.
13747 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13748 (dwarf2_ranges_process): Likewise.
13749 (dwarf2_get_pc_bounds): Likewise.
13750 (mark_common_block_symbol_computed): Likewise.
13751 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13752 (dwarf2_read_abbrevs): Update call.
13753 (read_partial_die): Use dwarf2_per_objfile from cu.
13754 (find_partial_die): Likewise.
13755 (fixup_partial_die): Likewise.
13756 (read_attribute_value): Likewise.
13757 (read_indirect_string_at_offset_from): Add objfile parameter.
13758 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13759 parameter.
13760 (read_indirect_string_from_dwz): Add objfile parameter.
13761 (read_indirect_string): Add objfile parameter.
13762 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13763 (read_addr_index): Use dwarf2_per_objfile from cu.
13764 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13765 call dw2_setup.
13766 (read_str_index): Use dwarf2_per_objfile from cu.
13767 (get_debug_line_section): Likewise.
13768 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13769 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13770 (new_symbol_full): Use dwarf2_per_objfile from cu.
13771 (build_error_marker_type): Likewise.
13772 (lookup_die_type): Likewise.
13773 (determine_prefix): Likewise.
13774 (follow_die_offset): Likewise.
13775 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13776 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13777 (dwarf2_fetch_die_type_sect_off): Likewise.
13778 (dwarf2_get_die_type): Likewise.
13779 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13780 (get_signatured_type): Likewise.
13781 (get_DW_AT_signature_type): Likewise.
13782 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13783 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13784 (cu_debug_loc_section): Likewise.
13785 (fill_in_loclist_baton): Likewise.
13786 (dwarf2_symbol_mark_computed): Likewise.
13787 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13788 dwarf2_per_objfile.
13789 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13790 parameter.
13791 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13792 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13793 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13794 (set_die_type): Use dwarf2_free_objfile from cu.
13795 (get_die_type_at_offset): Likewise.
13796 (dwarf2_per_objfile_free): Don't assign global variable.
13797 (debug_names) <constructor>: Add dwarf2_per_objfile
13798 parameter, update m_debugstrlookup construction.
13799 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13800 parameter.
13801 <m_dwarf2_per_objfile>: New field.
13802 <lookup>: Use m_dwarf2_per_objfile.
13803 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13804 (psyms_seen_size): Likewise.
13805 (write_gdbindex): Replace objfile parameter with
13806 dwarf2_per_objfile.
13807 (write_debug_names): Likewise.
13808 (write_psymtabs_to_index): Likewise.
13809 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13810 calls.
13811
13812 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13813
13814 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13815 <dwarf2_per_objfile>: New field.
13816 (struct dwarf2_per_cu_data) <objfile>: Remove.
13817 <dwarf2_per_objfile>: New field.
13818 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13819 of objfile.
13820 (create_signatured_type_table_from_index): Likewise.
13821 (create_debug_type_hash_table): Likewise.
13822 (fill_in_sig_entry_from_dwo_entry): Likewise.
13823 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13824 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13825 objfile.
13826 (create_partial_symtab): Access objfile through
13827 dwarf2_per_objfile.
13828 (process_psymtab_comp_unit_reader): Likewise.
13829 (read_comp_units_from_section): Likewise.
13830 (scan_partial_symbols): Likewise.
13831 (add_partial_symbol): Likewise.
13832 (add_partial_subprogram): Likewise.
13833 (peek_die_abbrev): Likewise.
13834 (fixup_go_packaging): Likewise.
13835 (process_full_comp_unit): Likewise.
13836 (process_full_type_unit): Likewise.
13837 (process_imported_unit_die): Likewise.
13838 (dwarf2_compute_name): Likewise.
13839 (dwarf2_physname): Likewise.
13840 (read_import_statement): Likewise.
13841 (create_cus_hash_table): Assign dwarf2_physname instead of
13842 objfile.
13843 (read_func_scope): Access objfile through dwarf2_per_objfile.
13844 (read_lexical_block_scope): Likewise.
13845 (read_call_site_scope): Likewise.
13846 (read_variable): Likewise.
13847 (dwarf2_rnglists_process): Likewise.
13848 (dwarf2_ranges_process): Likewise.
13849 (dwarf2_ranges_read): Likewise.
13850 (dwarf2_record_block_ranges): Likewise.
13851 (dwarf2_add_field): Likewise.
13852 (dwarf2_add_member_fn): Likewise.
13853 (read_structure_type): Likewise.
13854 (process_structure_scope): Likewise.
13855 (read_enumeration_type): Likewise.
13856 (read_array_type): Likewise.
13857 (read_common_block): Likewise.
13858 (read_namespace_type): Likewise.
13859 (read_namespace): Likewise.
13860 (read_module_type): Likewise.
13861 (read_tag_pointer_type): Likewise.
13862 (read_tag_ptr_to_member_type): Likewise.
13863 (read_tag_string_type): Likewise.
13864 (read_subroutine_type): Likewise.
13865 (read_typedef): Likewise.
13866 (read_base_type): Likewise.
13867 (attr_to_dynamic_prop): Likewise.
13868 (read_subrange_type): Likewise.
13869 (read_unspecified_type): Likewise.
13870 (load_partial_dies): Likewise.
13871 (read_partial_die): Likewise.
13872 (find_partial_die): Likewise.
13873 (guess_partial_die_structure_name): Likewise.
13874 (fixup_partial_die): Likewise.
13875 (read_attribute_value): Likewise.
13876 (read_addr_index_from_leb128): Likewise.
13877 (dwarf2_read_addr_index): Likewise.
13878 (dwarf2_string_attr): Likewise.
13879 (lnp_state_machine::check_line_address): Likewise.
13880 (dwarf_decode_lines_1): Likewise.
13881 (dwarf_decode_lines): Likewise.
13882 (dwarf2_start_symtab): Likewise.
13883 (var_decode_location): Likewise.
13884 (new_symbol_full): Likewise.
13885 (dwarf2_const_value_data): Likewise.
13886 (dwarf2_const_value_attr): Likewise.
13887 (dwarf2_const_value): Likewise.
13888 (die_type): Likewise.
13889 (die_containing_type): Likewise.
13890 (lookup_die_type): Likewise.
13891 (guess_full_die_structure_name): Likewise.
13892 (anonymous_struct_prefix): Likewise.
13893 (dwarf2_name): Likewise.
13894 (follow_die_ref_or_sig): Likewise.
13895 (follow_die_offset): Likewise.
13896 (follow_die_ref): Likewise.
13897 (dwarf2_fetch_die_loc_sect_off): Likewise.
13898 (dwarf2_fetch_constant_bytes): Likewise.
13899 (dwarf2_fetch_die_type_sect_off): Likewise.
13900 (dwarf2_get_die_type): Likewise.
13901 (follow_die_sig): Likewise.
13902 (decode_locdesc): Likewise.
13903 (dwarf2_per_cu_objfile): Likewise.
13904 (dwarf2_per_cu_text_offset): Likewise.
13905 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13906 objfile.
13907 (set_die_type): Access objfile through
13908 dwarf2_per_objfile.
13909
13910 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13911
13912 * valprint.c (converted_character_d): Remove typedef.
13913 (DEF_VEC_O (converted_character_d)): Remove.
13914 (count_next_character): Use std::vector.
13915 (print_converted_chars_to_obstack): Likewise.
13916 (generic_printstr): Likewise.
13917
13918 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13919
13920 * xml-support.h (struct gdb_xml_value): Add constructor.
13921 <value>: Change type to unique_xmalloc_ptr.
13922 (gdb_xml_value_s): Remove typedef.
13923 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13924 (gdb_xml_element_start_handler): Change parameter type to
13925 std::vector.
13926 (xml_find_attribute): Likewise.
13927 * xml-support.c (xml_find_attribute): Change parameter type to
13928 std::vector and adjust.
13929 (gdb_xml_values_cleanup): Remove.
13930 (gdb_xml_parser::start_element): Adjust to std::vector.
13931 (xinclude_start_include): Change paraeter type to std::vector
13932 and adjust.
13933 * btrace.c (check_xml_btrace_version): Likewise.
13934 (parse_xml_btrace_block): Likewise.
13935 (parse_xml_btrace_pt_config_cpu): Likewise.
13936 (parse_xml_btrace_pt): Likewise.
13937 (parse_xml_btrace_conf_bts): Likewise.
13938 (parse_xml_btrace_conf_pt): Likewise.
13939 * memory-map.c (memory_map_start_memory): Likewise.
13940 (memory_map_start_property): Likewise.
13941 * osdata.c (osdata_start_osdata): Likewise.
13942 (osdata_start_item): Likewise.
13943 (osdata_start_column): Likewise.
13944 * remote.c (start_thread): Likewise.
13945 * solib-aix.c (library_list_start_library): Likewise.
13946 (library_list_start_list): Likewise.
13947 * solib-svr4.c (library_list_start_library): Likewise.
13948 (svr4_library_list_start_list): Likewise.
13949 * solib-target.c (library_list_start_segment): Likewise.
13950 (library_list_start_section): Likewise.
13951 (library_list_start_library): Likewise.
13952 (library_list_start_list): Likewise.
13953 * tracepoint.c (traceframe_info_start_memory): Likewise.
13954 (traceframe_info_start_tvar): Likewise.
13955 * xml-syscall.c (syscall_start_syscall): Likewise.
13956 * xml-tdesc.c (tdesc_start_target): Likewise.
13957 (tdesc_start_feature): Likewise.
13958 (tdesc_start_reg): Likewise.
13959 (tdesc_start_union): Likewise.
13960 (tdesc_start_struct): Likewise.
13961 (tdesc_start_flags): Likewise.
13962 (tdesc_start_enum): Likewise.
13963 (tdesc_start_field): Likewise.
13964 (tdesc_start_enum_value): Likewise.
13965 (tdesc_start_vector): Likewise.
13966
13967 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13968
13969 * extension.h (struct xmethod_worker) <clone>: Remove.
13970 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13971 Remove.
13972 (python_xmethod_worker::clone): Remove.
13973 * valops.c (find_overload_match): Use std::move instead of
13974 clone.
13975
13976 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13977
13978 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13979 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13980 <free_xmethod_worker_data>: Remove.
13981 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13982 <get_xmethod_arg_types>: Remove.
13983 <get_xmethod_result_type>: Remove.
13984 <invoke_xmethod>: Remove.
13985 * extension.c (new_xmethod_worker): Remove.
13986 (clone_xmethod_worker): Remove.
13987 (get_matching_xmethod_workers): Return void, pass std::vector by
13988 pointer.
13989 (get_xmethod_arg_types): Rename to...
13990 (xmethod_worker::get_arg_types): ... this, and adjust.
13991 (get_xmethod_result_type): Rename to...
13992 (xmethod_worker::get_result_type): ... this, and adjust.
13993 (invoke_xmethod): Remove.
13994 (free_xmethod_worker): Remove.
13995 (free_xmethod_worker_vec): Remove.
13996 * extension.h (enum ext_lang_rc): Move here from
13997 extension-priv.h.
13998 (struct xmethod_worker): Add constructor and destructor.
13999 <data>: Remove.
14000 <value>: Remove.
14001 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14002 virtual pure methods.
14003 <get_arg_types, get_result_type>: New methods.
14004 (xmethod_worker_ptr): Remove typedef.
14005 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14006 (xmethod_worker_vec): Remove typedef.
14007 (xmethod_worker_up): New typedef.
14008 (invoke_xmethod): Remove.
14009 (clone_xmethod_worker): Remove.
14010 (free_xmethod_worker): Remove.
14011 (free_xmethod_worker_vec): Remove.
14012 (get_xmethod_arg_types): Remove.
14013 (get_xmethod_result_type): Remove.
14014 * valops.c (find_method_list): Use std::vector, don't use
14015 intermediate vector.
14016 (value_find_oload_method_list): Use std::vector.
14017 (find_overload_match): Use std::vector.
14018 (find_oload_champ): Use std::vector.
14019 * value.c (value_free): Use operator delete.
14020 (value_of_xmethod): Rename to...
14021 (value_from_xmethod): ... this. Don't assign
14022 xmethod_worker::value, take rvalue-reference.
14023 (result_type_of_xmethod): Adjust.
14024 (call_xmethod): Adjust.
14025 * value.h: Include extension.h.
14026 (struct xmethod_worker): Don't forward-declare.
14027 (value_of_xmethod): Rename to...
14028 (value_from_xmethod): ... this, take rvalue-reference.
14029 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14030 (struct python_xmethod_worker): ... this, add constructor and
14031 destructor.
14032 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14033 (gdbpy_free_xmethod_worker_data): Rename to...
14034 (python_xmethod_worker::~python_xmethod_worker): ... this and
14035 adjust.
14036 (gdbpy_clone_xmethod_worker_data): Rename to...
14037 (python_xmethod_worker::clone): ... this and adjust.
14038 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14039 temporary vector.
14040 (gdbpy_get_xmethod_arg_types): Rename to...
14041 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14042 (gdbpy_get_xmethod_result_type): Rename to...
14043 (python_xmethod_worker::do_get_result_type): ... this and
14044 adjust.
14045 (gdbpy_invoke_xmethod): Rename to...
14046 (python_xmethod_worker::invoke): ... this and adjust.
14047 (new_python_xmethod_worker): Rename to...
14048 (python_xmethod_worker::python_xmethod_worker): ... this and
14049 adjust.
14050 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14051 Remove.
14052 (gdbpy_free_xmethod_worker_data): Remove.
14053 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14054 (gdbpy_get_xmethod_arg_types): Remove.
14055 (gdbpy_get_xmethod_result_type): Remove.
14056 (gdbpy_invoke_xmethod): Remove.
14057 * python/python.c (python_extension_ops): Remove obsolete
14058 callbacks.
14059
14060 2018-01-05 Pedro Alves <palves@redhat.com>
14061
14062 PR gdb/18653
14063 * common/signals-state-save-restore.c
14064 (save_original_signals_state): New parameter 'quiet'. Warn if we
14065 find a custom handler preinstalled, instead of internal erroring.
14066 But only warn if !quiet.
14067 * common/signals-state-save-restore.h
14068 (save_original_signals_state): New parameter 'quiet'.
14069 * main.c (captured_main_1): Move save_original_signals_state call
14070 after option handling, and pass QUIET.
14071
14072 2018-01-05 Pedro Alves <palves@redhat.com>
14073
14074 * spu-tdep.c (spu_catch_start): Pass
14075 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14076
14077 2018-01-05 Pedro Alves <palves@redhat.com>
14078
14079 PR gdb/22670
14080 * ada-lang.c (literal_symbol_name_matcher): New function.
14081 (ada_get_symbol_name_matcher): Use it for
14082 symbol_name_match_type::SEARCH_NAME.
14083 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14084 it down instead of assuming symbol_name_match_type::FULL.
14085 * block.h (block_lookup_symbol): New parameter 'match_type'.
14086 * c-valprint.c (print_unpacked_pointer): Use
14087 lookup_symbol_search_name instead of lookup_symbol.
14088 * compile/compile-object-load.c (get_out_value_type): Pass down
14089 symbol_name_match_type::SEARCH_NAME.
14090 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14091 symbol_name_match_type::FULL.
14092 * cp-support.c (cp_get_symbol_name_matcher): Handle
14093 symbol_name_match_type::SEARCH_NAME.
14094 * infrun.c (insert_exception_resume_breakpoint): Use
14095 lookup_symbol_search_name.
14096 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14097 * psymtab.c (maintenance_check_psymtabs): Use
14098 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14099 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14100 SYMBOL_SEARCH_NAME.
14101 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14102 if symbol_name_match_type::SEARCH_NAME.
14103 (lookup_symbol_in_language): Pass down
14104 symbol_name_match_type::FULL.
14105 (lookup_symbol_search_name): New.
14106 (lookup_language_this): Pass down
14107 symbol_name_match_type::SEARCH_NAME.
14108 (lookup_symbol_aux, lookup_local_symbol): New parameter
14109 'match_type'. Pass it down.
14110 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14111 (lookup_symbol_search_name): New declaration.
14112 (lookup_symbol_in_block): New 'match_type' parameter.
14113
14114 2018-01-05 Pedro Alves <palves@redhat.com>
14115
14116 PR gdb/22670
14117 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14118 ada_lookup_symbol.
14119 (ada_lookup_symbol): Reimplement in terms of
14120 ada_lookup_symbol_list, bits factored out from
14121 ada_lookup_encoded_symbol.
14122
14123 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14124
14125 * ada-exp.y (write_object_renaming): When subscripting an array
14126 using a symbol as the index, pass the block in call to
14127 ada_lookup_encoded_symbol when looking that symbol up.
14128
14129 2018-01-05 Jerome Guitton <guitton@adacore.com>
14130
14131 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14132 TYPE_INDEX_TYPE.
14133
14134 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14135
14136 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14137 the case where VALUE_LVAL (val0) is not lval_memory.
14138
14139 2018-01-05 Xavier Roirand <roirand@adacore.com>
14140
14141 * ada-valprint.c (print_optional_low_bound): Handle
14142 character-indexed array printing like boolean-indexed array
14143 printing.
14144
14145 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14146
14147 * NEWS: Create a new section for the next release branch.
14148 Rename the section of the current branch, now that it has
14149 been cut.
14150
14151 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14152
14153 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14154 * version.in: Bump version to 8.1.50.DATE-git.
14155
14156 2018-01-03 Xavier Roirand <roirand@adacore.com>
14157
14158 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14159 Add field.
14160 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14161 Add field.
14162 (default_exception_support_info) <catch_handlers_sym>: Add field.
14163 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14164 (ada_exception_name_addr_1): Add "catch handlers" handling.
14165 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14166 Update all callers.
14167 (create_excep_cond_exprs) <ex>: Add parameter.
14168 (re_set_exception): Update create_excep_cond_exprs call.
14169 (print_it_exception, print_one_exception, print_mention_exception)
14170 (print_recreate_exception): Add "catch handler" handling.
14171 (allocate_location_catch_handlers, re_set_catch_handlers)
14172 (check_status_catch_handlers, print_it_catch_handlers)
14173 (print_one_catch_handlers, print_mention_catch_handlers)
14174 (print_recreate_catch_handlers): New function.
14175 (catch_handlers_breakpoint_ops): New variable.
14176 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14177 Add parameter. Add "catch handler" handling.
14178 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14179 Add "catch handler" handling.
14180 (ada_exception_catchpoint_cond_string): Add "catch handler"
14181 handling.
14182 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14183 call.
14184 (catch_ada_handlers_command): New function.
14185 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14186 operations structure.
14187 (_initialize_ada_language): Add "catch handlers" command entry.
14188 * NEWS: Document "catch handlers" feature.
14189
14190 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14191
14192 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14193 account when creating the array type of the slice.
14194 (ada_value_slice): Likewise.
14195
14196 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14197
14198 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14199 New enum value.
14200 (create_array_type_with_stride): Add byte_stride_prop parameter.
14201 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14202 New parameter. Update all callers in this file.
14203 (array_type_has_dynamic_stride): New function.
14204 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14205 of arrays with dynamic byte strides.
14206 * dwarf2read.c (read_array_type): Add support for dynamic
14207 DW_AT_byte_stride attributes.
14208
14209 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14210
14211 * dwarf2read.c (read_unspecified_type): Treat
14212 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14213
14214 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14215
14216 Update copyright year range in all GDB files.
14217
14218 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14219
14220 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14221 and gdb/testsuite/gdb.base/step-line.c.
14222
14223 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14224
14225 * copyright.py (main): Dump the contents of
14226 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14227 even if BY_HAND is empty.
14228
14229 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14230
14231 * top.c (print_gdb_version): Update Copyright year in version
14232 message.
14233
14234 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14235
14236 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14237
14238 For older changes see ChangeLog-2017.
14239 \f
14240 Local Variables:
14241 mode: change-log
14242 left-margin: 8
14243 fill-column: 74
14244 version-control: never
14245 coding: utf-8
14246 End:
This page took 0.354669 seconds and 4 git commands to generate.