Avoid undefined behavior in read_signed_leb128
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-03 Tom Tromey <tom@tromey.com>
2
3 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
4
5 2018-10-03 Tom Tromey <tom@tromey.com>
6
7 * c-exp.y (parse_number): Work in unsigned. Remove casts.
8
9 2018-10-03 Tom Tromey <tom@tromey.com>
10
11 * dwarf2read.c (read_subrange_type): Make "negative_mask"
12 unsigned.
13
14 2018-10-03 Tom Tromey <tom@tromey.com>
15
16 * findvar.c (extract_integer): Do work in an unsigned type.
17
18 2018-10-03 Tom Tromey <tom@tromey.com>
19
20 * common/enum-flags.h (enum_flags::operator~): Add static assert.
21 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
22 base type.
23 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
24 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
25 type.
26 * c-lang.h (enum c_string_type_values): Use unsigned as base
27 type.
28 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
29
30 2018-10-03 Tom Tromey <tom@tromey.com>
31
32 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
33 <~dwarf2_frame_state_reg_info>: Update.
34 <dwarf2_frame_state_reg_info>: Update.
35 <alloc_regs>: Add assertion. Update.
36 <reg>: Now a std::vector.
37 <num_regs>: Remove.
38 <swap>: Update.
39 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
40 (execute_cfa_program_test, dwarf2_frame_cache): Update.
41
42 2018-10-03 Tom Tromey <tom@tromey.com>
43
44 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
45
46 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
47
48 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
49
50 2018-10-02 Tom Tromey <tom@tromey.com>
51
52 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
53
54 2018-10-02 John Darrington <john@darrington.wattle.id.au>
55
56 * NEWS: Mention changed commands.
57 * ser-uds.c: New file.
58 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
59 * configure: Regenerate.
60 * Makefile.in: Add new file.
61 * serial.c (serial_open): Check if filename is a socket
62 and lookup the appropriate interface accordingly.
63
64 2018-10-01 Alan Hayward <alan.hayward@arm.com>
65
66 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
67 define.
68 (AARCH64_EXTRA_MAGIC): Likewise.
69 (AARCH64_FPSIMD_MAGIC): Likewise.
70 (AARCH64_SVE_MAGIC): Likewise.
71 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
72 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
73 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
74 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
75 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
76 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
77 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
78 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
79 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
80 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
81 (read_aarch64_ctx): Add function.
82 (aarch64_linux_sigframe_init): Detect FP registers.
83
84 2018-10-01 Alan Hayward <alan.hayward@arm.com>
85
86 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
87 (AARCH64_D0_REGNUM): Likewise.
88 (AARCH64_S0_REGNUM): Likewise.
89 (AARCH64_H0_REGNUM): Likewise.
90 (AARCH64_B0_REGNUM): Likewise.
91 (AARCH64_SVE_V0_REGNUM): Likewise.
92 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
93 (AARCH64_D0_REGNUM): Likewise.
94 (AARCH64_S0_REGNUM): Likewise.
95 (AARCH64_H0_REGNUM): Likewise.
96 (AARCH64_B0_REGNUM): Likewise.
97 (AARCH64_SVE_V0_REGNUM): Likewise.
98
99 2018-10-01 Gary Benson <gbenson@redhat.com>
100
101 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
102 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
103 prfpregset_t instead of gdb_prfpregset_t.
104 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
105 * configure, config.in: Rebuild.
106
107 2018-10-01 Gary Benson <gbenson@redhat.com>
108
109 * common/gdb_proc_service.h: New file, factored out from...
110 * gdb_proc_service.h: Moved common code to the above file.
111 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
112
113 2018-10-01 Gary Benson <gbenson@redhat.com>
114
115 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
116 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
117
118 2018-10-01 Gary Benson <gbenson@redhat.com>
119
120 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
121 (AC_CHECK_HEADERS): Check for linux/elf.h.
122 * configure, config.in: Rebuild.
123 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
124 doesn't define elf_fpregset_t.
125
126 2018-10-01 Gary Benson <gbenson@redhat.com>
127
128 * gdb_proc_service.h: Whitespace change.
129
130 2018-10-01 Tom Tromey <tom@tromey.com>
131
132 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
133 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
134 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
135
136 2018-10-01 Tom Tromey <tom@tromey.com>
137
138 * README: Minor change.
139
140 2018-09-30 Pedro Alves <palves@redhat.com>
141
142 * darwin-nat-info.c (darwin_debug_regions_recurse)
143 (info_mach_exceptions_command): Remove unused local variables.
144 * darwin-nat.c (darwin_decode_notify_message)
145 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
146 (darwin_stop_inferior, darwin_setup_exceptions)
147 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
148 (darwin_nat_target::attach, darwin_nat_target::detach)
149 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
150 local variables.
151 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
152 variables.
153
154 2018-09-29 Tom Tromey <tom@tromey.com>
155
156 * README: Remove some leftover text.
157
158 2018-09-29 Tom Tromey <tom@tromey.com>
159
160 * PROBLEMS: Rewrite.
161 * README: Update.
162
163 2018-09-28 John Baldwin <jhb@FreeBSD.org>
164
165 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
166 case with explicit breakpoint kind.
167 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
168 'additional_info' and related logic.
169 (riscv_debug_breakpoints): New variable.
170 (riscv_breakpoint_kind_from_pc): Use the length of the existing
171 instruction to determine the breakpoint kind.
172 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
173 flag. Update description of 'set/show riscv
174 use-compressed-breakpoints' flag.
175
176 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
177
178 (NEWS): Mention changes to frame related commands.
179 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
180 (add_prefix_cmd_suppress_notification): New function.
181 (add_com_suppress_notification): Call
182 add_cmd_suppress_notification.
183 * command.h (add_cmd_suppress_notification): Declare.
184 (add_prefix_cmd_suppress_notification): Declare.
185 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
186 (parse_frame_specification): Moved from stack.c, with
187 simplification to handle a single argument.
188 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
189 switch to the selected frame. Add a header comment.
190 * stack.c: Remove 'safe-ctype.h' include.
191 (find_frame_for_function): Add declaration.
192 (find_frame_for_address): New function.
193 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
194 (frame_selection_by_function_completer): New function.
195 (info_frame_command): Rename to...
196 (info_frame_command_core): ...this, and update parameter types.
197 (select_frame_command): Rename to...
198 (select_frame_command_core): ...this, and update parameter types.
199 (frame_command): Rename to...
200 (frame_command_core): ...this, and update parameter types.
201 (class frame_command_helper): New class to wrap implementations of
202 frame related sub-commands.
203 (frame_apply_cmd_list): New static global.
204 (frame_cmd_list): Make static.
205 (select_frame_cmd_list): New global for sub-commands.
206 (info_frame_cmd_list): New global for sub-commands.
207 (_initialize_stack): Register sub-commands for 'frame',
208 'select-frame', and 'info frame'. Update 'frame apply' commands
209 to use frame_apply_cmd_list. Move function local static
210 frame_apply_list to file static frame_apply_cmd_list for
211 consistency.
212 * stack.h (select_frame_command): Delete declarationn.
213 (select_frame_for_mi): Declare new function.
214
215 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
216
217 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
218 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
219 and NOP.
220
221 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
222
223 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
224
225 2018-09-26 Tom Tromey <tom@tromey.com>
226
227 * valops.c (auto_abandon): Remove dead code.
228
229 2018-09-26 Tom Tromey <tom@tromey.com>
230
231 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
232
233 2018-09-24 Tom Tromey <tom@tromey.com>
234
235 * common/pathstuff.c (get_standard_cache_dir): Make
236 "xdg_cache_home" and "home" const.
237 * top.c (init_history): Make "tmpenv" const.
238 * main.c (get_init_files): Make "homedir" const.
239
240 2018-09-23 Tom Tromey <tom@tromey.com>
241
242 PR python/18852:
243 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
244
245 2018-09-23 Tom Tromey <tom@tromey.com>
246
247 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
248 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
249 * python/python-internal.h (gdbpy_handle_exception): Declare.
250 * python/py-utils.c (gdbpy_handle_exception): New function.
251
252 2018-09-23 Tom Tromey <tom@tromey.com>
253
254 PR python/17284:
255 * python/py-type.c (typy_template_argument): Check for negative
256 argument number.
257
258 2018-09-23 Tom Tromey <tom@tromey.com>
259
260 PR python/14062:
261 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
262
263 2018-09-23 Tom Tromey <tom@tromey.com>
264
265 PR python/18170:
266 * python/py-value.c (valpy_int): Allow conversion from pointer
267 type.
268
269 2018-09-23 Tom Tromey <tom@tromey.com>
270
271 PR python/20126:
272 * python/py-value.c (valpy_int): Respect type sign.
273
274 2018-09-23 Tom Tromey <tom@tromey.com>
275
276 PR python/18352;
277 * python/py-value.c (valpy_float): Allow conversions from int or
278 char.
279 (valpy_int, valpy_long): Allow conversions from float.
280
281 2018-09-23 Tom Tromey <tom@tromey.com>
282
283 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
284 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
285
286 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
287
288 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
289 __sighndlr.
290 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
291
292 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
293
294 * windows-nat.c (windows_nat_target::wait): Remove a spurious
295 target_terminal::ours().
296
297 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
298
299 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
300 of vl to ULONGEST.
301
302 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
303
304 * breakpoint.c (update_inserted_breakpoint_locations): Remove
305 redundant condition.
306
307 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
308
309 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
310
311 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
312 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
313 * sol-thread.c (ps_pdmodel): Don't guard definition.
314
315 * procfs.c: Fix formatting.
316
317 * procfs.c (sysset_t_alloc): Remove.
318 (create_procinfo): Use XNEW instead of sysset_t_alloc.
319 (procfs_debug_inferior): Likewise.
320 (procfs_set_exec_trap): Likewise.
321 (proc_set_traced_sysentry): Don't allocate argp dynamically.
322 (proc_set_traced_sysexit): Likewise.
323
324 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
325 (dead_procinfo): Likewise.
326 (proc_warn): Likewise.
327 (proc_error): Likewise.
328 (proc_get_LDT_entry): Likewise.
329 (do_attach): Likewise.
330 (procfs_target::pid_to_str): Likewise.
331 (iterate_over_mappings): Likewise.
332
333 * procfs.c (create_procinfo): Fix ARI warning.
334 (proc_get_status): Likewise.
335 (proc_stop_process): Likewise.
336 (proc_run_process): Likewise.
337 (proc_kill): Likewise.
338 (proc_get_LDT_entry): Likewise.
339 (procfs_find_LDT_entry): Likewise.
340 (proc_update_threads): Likewise.
341 (proc_iterate_over_threads): Likewise.
342 (do_attach): Likewise.
343 (procfs_xfer_memory): Likewise.
344 (invalidate_cache): Likewise.
345 (procfs_target::resume): Likewise.
346 (procfs_init_inferior): Likewise.
347 (procfs_set_exec_trap): Likewise.
348 (procfs_target::thread_alive): Likewise.
349 (procfs_target::pid_to_exec_file): Likewise.
350 (iterate_over_mappings): Likewise.
351 (procfs_target::make_corefile_notes): Likewise.
352 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
353
354 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
355 (procfs_find_LDT_entry): Likewise.
356 * sol-thread.c (ps_lgetLDT): Likewise.
357
358 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
359
360 PR tdep/17903
361 * procfs.c (procfs_target): Declare pid_to_exec_file.
362 (procfs_target::pid_to_exec_file): New.
363
364 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
365
366 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
367 renaming.
368 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
369 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
370
371 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
372
373 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
374 (supply_fpregset, fill_fpregset): Move ...
375 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
376 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
377 Remove references to ioctl-based procfs.
378 Include <sys/reg.h>.
379 Remove PR_MODEL_NATIVE guards.
380 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
381 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
382
383 2018-09-19 Xavier Roirand <roirand@adacore.com>
384
385 PR gdb/20981:
386 * solib-darwin.c (darwin_get_dyld_bfd): New function.
387 (darwin_solib_get_all_image_info_addr_at_init): Update call.
388 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
389
390 2018-09-19 John Baldwin <jhb@FreeBSD.org>
391
392 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
393 (fbsd_print_sockaddr_in6): Likewise.
394
395 2018-09-19 Richard Bunt <richard.bunt@arm.com>
396 Chris January <chris.january@arm.com>
397
398 * eval.c (skip_undetermined_arglist): Skip argument list helper.
399 (evaluate_subexp_standard): Return a dummy type when
400 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
401 OP_F77_UNDETERMINED_ARGLIST case.
402 * expression.h (enum noside): Update comment.
403
404 2018-09-19 George Vasick <george.vasick@oracle.com>
405
406 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
407
408 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
409 April Chin <april.chin@oracle.com>
410 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
411
412 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
413 uint_t lwpid_t.
414 (create_procinfo): Print pids in /proc without leading zeros.
415
416 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
417
418 * nios2-tdep.c (nios2_gcc_target_options): New.
419 (nios2_gdb_arch_init): Install new hook.
420
421 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
422
423 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
424 New file.
425 * update-gnulib.sh: Apply patch.
426 * configure: Re-generate.
427
428 2018-09-18 John Baldwin <jhb@FreeBSD.org>
429
430 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
431 description. Make "info proc" command descriptions more
432 consistent.
433
434 2018-09-18 John Baldwin <jhb@FreeBSD.org>
435
436 * NEWS: Mention 'info proc files' command.
437
438 2018-09-18 John Baldwin <jhb@FreeBSD.org>
439
440 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
441 descriptors for IP_FILES and IP_ALL.
442
443 2018-09-18 John Baldwin <jhb@FreeBSD.org>
444
445 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
446 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
447 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
448 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
449 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
450 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
451 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
452 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
453 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
454 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
455 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
456 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
457 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
458 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
459 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
460 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
461 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
462 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
463 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
464 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
465 (struct fbsd_sockaddr_un): New types.
466 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
467 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
468 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
469 (fbsd_core_info_proc_files): New functions.
470 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
471 IP_ALL.
472 * fbsd-tdep.h (fbsd_info_proc_files_header)
473 (fbsd_info_proc_files_entry): New.
474
475 2018-09-18 John Baldwin <jhb@FreeBSD.org>
476
477 * defs.h (enum info_proc_what) [IP_FILES]: New value.
478 * infcmd.c (info_proc_cmd_files): New function.
479 (_initialize_infcmd): Register 'info proc files' command.
480
481 2018-09-18 John Baldwin <jhb@FreeBSD.org>
482
483 * gnulib/aclocal-m4-deps.mk: Re-generate.
484 * gnulib/aclocal.m4: Re-generate.
485 * gnulib/config.in: Re-generate.
486 * gnulib/configure: Re-generate.
487 * gnulib/import/Makefile.am: Re-generate.
488 * gnulib/import/Makefile.in: Re-generate.
489 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
490 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
491 * gnulib/import/arpa_inet.in.h: New file.
492 * gnulib/import/inet_ntop.c: New file.
493 * gnulib/import/m4/arpa_inet_h.m4: New file.
494 * gnulib/import/m4/inet_ntop.m4: New file.
495 * gnulib/import/m4/netinet_in_h.m4: New file.
496 * gnulib/import/m4/socklen.m4: New file.
497 * gnulib/import/m4/sockpfaf.m4: New file.
498 * gnulib/import/m4/stdalign.m4: New file.
499 * gnulib/import/m4/sys_uio_h.m4: New file.
500 * gnulib/import/netinet_in.in.h: New file.
501 * gnulib/import/stdalign.in.h: New file.
502 * gnulib/import/sys_socket.c: New file.
503 * gnulib/import/sys_socket.in.h: New file.
504 * gnulib/import/sys_uio.in.h: New file.
505 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
506 module.
507
508 2018-09-18 John Baldwin <jhb@FreeBSD.org>
509
510 * gnulib/aclocal-m4-deps.mk: New file.
511 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
512 deterministically.
513
514 2018-09-18 John Baldwin <jhb@FreeBSD.org>
515
516 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
517 KVE_PATH.
518
519 2018-09-18 Tom Tromey <tom@tromey.com>
520
521 * compile/compile-object-load.c (struct
522 link_hash_table_cleanup_data): Add constructor and destructor.
523 Use DISABLE_COPY_AND_ASSIGN.
524 (~link_hash_table_cleanup_data): Rename from
525 link_hash_table_free. Now a destructor.
526 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
527
528 2018-09-18 Tom Tromey <tom@tromey.com>
529
530 * compile/compile-object-run.c (do_module_cleanup): Use delete.
531 * compile/compile-object-load.c (struct munmap_list): Move to
532 header file.
533 (munmap_list::add): Rename from munmap_list_add; rewrite.
534 (munmap_list::~munmap_list): Rename from munmap_list_free.
535 (munmap_listp_free_cleanup): Remove.
536 (compile_object_load): Update.
537 * compile/compile-object-load.h (struct munmap_list): Move from
538 compile-object-load.c. Rewrite.
539
540 2018-09-18 Alan Hayward <alan.hayward@arm.com>
541
542 * aarch64-tdep.c (pass_in_v): Use register size.
543 (aarch64_extract_return_value): Likewise.
544 (aarch64_store_return_value): Likewise.
545
546 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
547
548 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
549 rlim_t.
550
551 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
552
553 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
554 Fix short help line.
555
556 2018-09-17 Tom Tromey <tom@tromey.com>
557
558 PR python/20445:
559 * configure: Rebuild.
560 * configure.ac: Conditionally use -DNDEBUG for Python.
561
562 2018-09-17 Tom Tromey <tom@tromey.com>
563
564 * configure: Rebuild.
565 * configure.ac: Use gmp as a library dependency when checking for
566 mpfr.
567
568 2018-09-17 Pedro Alves <palves@redhat.com>
569
570 * python/py-inferior.c (find_inferior_object): Delete.
571
572 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
573
574 * compile/compile-cplus-types.c
575 (compile_cplus_instance::enter_scope): Don't use new_scope after
576 std::move.
577
578 2018-09-17 Tom Tromey <tom@tromey.com>
579
580 * common/pathstuff.c (get_standard_cache_dir): Use
581 ~/Library/Caches on macOS.
582 * common/pathstuff.h (get_standard_cache_dir): Update comment.
583
584 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
585
586 PR python/23669
587 * breakpoint.c (commands_cmd_element): New.
588 (_initialize_breakpoint): Assign commands_cmd_element.
589 * breakpoint.h (commands_cmd_element): New.
590 * cli/cli-script.c (while_cmd_element, if_command,
591 define_cmd_element): New.
592 (command_name_equals): Remove.
593 (process_next_line): Compare commands by pointer, not by name.
594 (_initialize_cli_script): Assign the various cmd_list_element
595 variables.
596 * compile/compile.c (compile_cmd_element): New.
597 (_initialize_compile): Assign compile_cmd_element.
598 * compile/compile.h (compile_cmd_element): New.
599 * guile/guile.c (guile_cmd_element): New.
600 (install_gdb_commands): Assign guile_cmd_element.
601 * guile/guile.h (guile_cmd_element): New.
602 * python/python.c (python_cmd_element): New.
603 (_initialize_python): Assign python_cmd_element.
604 * python/python.h (python_cmd_element): New.
605 * tracepoint.c (while_stepping_cmd_element): New.
606 (_initialize_tracepoint): Assign while_stepping_cmd_element.
607 * tracepoint.h (while_stepping_cmd_element): New.
608
609 2018-09-17 Tom Tromey <tom@tromey.com>
610
611 * infrun.c (save_infcall_suspend_state): Return
612 infcall_suspend_state_up.
613 (save_infcall_control_state): Return infcall_control_state_up.
614 * inferior.h (save_infcall_suspend_state)
615 (save_infcall_control_state): Declare later. Return unique
616 pointers.
617
618 2018-09-17 Tom Tromey <tom@tromey.com>
619
620 * infrun.c (struct stop_context): Declare constructor,
621 destructor, "changed" method.
622 (stop_context::stop_context): Rename from save_stop_context.
623 (stop_context::~stop_context): Rename from
624 release_stop_context_cleanup.
625 (normal_stop): Update.
626 (stop_context::changed): Rename from stop_context_changed. Return
627 bool.
628
629 2018-09-17 Tom Tromey <tom@tromey.com>
630
631 * inferior.h (struct infcall_suspend_state_deleter): New.
632 (infcall_suspend_state_up): New typedef.
633 (struct infcall_control_state_deleter): New.
634 (infcall_control_state_up): New typedef.
635 (make_cleanup_restore_infcall_suspend_state)
636 (make_cleanup_restore_infcall_control_state): Don't declare.
637 * infcall.c (call_function_by_hand_dummy): Update.
638 * infrun.c (do_restore_infcall_suspend_state_cleanup)
639 (make_cleanup_restore_infcall_suspend_state): Remove.
640 (do_restore_infcall_control_state_cleanup)
641 (make_cleanup_restore_infcall_control_state): Remove.
642
643 2018-09-17 Tom Tromey <tom@tromey.com>
644
645 * gdbthread.h (struct thread_control_state): Add initializer.
646 (class thread_info) <control>: Remove initializer.
647 * inferior.h (struct inferior_control_state): Add initializer.
648 (class inferior) <control>: Remove initializer.
649 (exit_inferior_1): Update.
650 * infrun.c (struct infcall_control_state): Add constructors.
651 (save_infcall_control_state): Use new.
652 (restore_infcall_control_state, discard_infcall_control_state):
653 Use delete.
654
655 2018-09-17 Tom Tromey <tom@tromey.com>
656
657 * infrun.c (struct infcall_suspend_state) <registers>: Now a
658 unique_ptr.
659 <siginfo_data>: Now a unique_xmalloc_ptr.
660 (save_infcall_suspend_state, restore_infcall_suspend_state)
661 (discard_infcall_suspend_state)
662 (get_infcall_suspend_state_regcache): Update.
663
664 2018-09-17 Tom Tromey <tom@tromey.com>
665
666 * gdbthread.h (struct thread_suspend_state): Add initializers.
667 (class thread_info) <suspend>: Remove initializer.
668 * infrun.c (struct infcall_suspend_state): Add initializers.
669 (save_infcall_suspend_state): Use new.
670 (discard_infcall_suspend_state): Use delete.
671
672 2018-09-16 Tom Tromey <tom@tromey.com>
673
674 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
675 Remove.
676 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
677 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
678 (py_varobj_iter_new): Likewise.
679 (py_varobj_get_iterator): Use gdbpy_ref.
680
681 2018-09-16 Tom Tromey <tom@tromey.com>
682
683 * python/py-threadevent.c (py_get_event_thread): Simplify.
684 * python/py-inferior.c (infpy_thread_from_thread_handle):
685 Return immediately after calling thread_to_thread_object. Use
686 Py_RETURN_NONE.
687 (thread_to_thread_object): Set the exception on a NULL return.
688
689 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
692
693 2018-09-16 Tom Tromey <tom@tromey.com>
694
695 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
696 Remove.
697
698 2018-09-16 Tom Tromey <tom@tromey.com>
699
700 * python/python-internal.h (thread_to_thread_object): Change
701 return type.
702 * python/py-inferior.c (thread_to_thread_object): Return a new
703 reference.
704 (infpy_thread_from_thread_handle): Update.
705 * python/py-infthread.c (gdbpy_selected_thread): Update.
706 * python/py-stopevent.c (create_stop_event_object): Update.
707 * python/py-threadevent.c (py_get_event_thread): Return a new
708 reference.
709 (py_get_event_thread): Update.
710 * python/py-event.h (py_get_event_thread): Change return type.
711 * python/py-continueevent.c (create_continue_event_object):
712 Update.
713
714 2018-09-16 Tom Tromey <tom@tromey.com>
715
716 * python/py-progspace.c (pspy_get_objfiles): Update.
717 * python/python-internal.h (objfile_to_objfile_object): Change
718 return type.
719 * python/py-newobjfileevent.c (create_new_objfile_event_object):
720 Update.
721 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
722 Update.
723 * python/python.c (gdbpy_get_current_objfile): Update.
724 (gdbpy_objfiles): Update.
725 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
726 Update.
727 (objfile_to_objfile_object): Return a new reference.
728 * python/py-symtab.c (stpy_get_objfile): Update.
729 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
730 Update.
731
732 2018-09-16 Tom Tromey <tom@tromey.com>
733
734 * python/py-inferior.c (infpy_get_progspace): Update.
735 * python/python-internal.h (pspace_to_pspace_object): Change
736 return type.
737 * python/py-newobjfileevent.c
738 (create_clear_objfiles_event_object): Update.
739 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
740 Update.
741 * python/python.c (gdbpy_get_current_progspace): Update.
742 (gdbpy_progspaces): Update.
743 * python/py-progspace.c (pspace_to_pspace_object): Return a new
744 reference.
745 * python/py-objfile.c (objfpy_get_progspace): Update.
746 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
747 Update.
748
749 2018-09-16 Tom Tromey <tom@tromey.com>
750
751 * python/lib/gdb/__init__.py (current_progspace, objfiles)
752 (solib_name, block_for_pc, find_pc_line): New functions.
753 (execute_unwinders): Update.
754 * python/py-block.c (gdbpy_block_for_pc): Remove.
755 * python/py-inferior.c (infpy_get_progspace): New function.
756 (inferior_object_getset) <progspace>: Add.
757 * python/py-progspace.c (pspy_objfiles): Rewrite.
758 (pspy_solib_name, pspy_block_for_pc)
759 (pspy_find_pc_line, pspy_is_valid): New functions.
760 (progspace_object_methods): Add entries for solib_name,
761 block_for_pc, find_pc_line, is_valid.
762 * python/python-internal.h (gdbpy_block_for_pc)
763 (build_objfiles_list): Don't declare.
764 * python/python.c: Don't include solib.h.
765 (gdbpy_solib_name, gdbpy_find_pc_line)
766 (gdbpy_get_current_progspace, build_objfiles_list)
767 (gdbpy_objfiles): Remove.
768 (GdbMethods) <current_progspace, objfiles, block_for_pc,
769 solib_name, find_pc_line>: Remove entries.
770
771 2018-09-16 Tom Tromey <tom@tromey.com>
772
773 * top.c (new_ui_command): Use GNU style for metasyntactic
774 variables.
775 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
776 variables.
777 * maint.c (maintenance_translate_address): Remove "<>" around
778 text.
779 * interps.c (interpreter_exec_cmd): Use GNU style for
780 metasyntactic variables.
781 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
782 metasyntactic variables.
783 * tracepoint.c (tfind_range_command): Use GNU style for
784 metasyntactic variables.
785 (tfind_outside_command): Likewise.
786 (_initialize_tracepoint): Likewise.
787 * remote.c (extended_remote_target::create_inferior): Use GNU
788 style for metasyntactic variables.
789 * sparc64-tdep.c (adi_examine_command): Use GNU style for
790 metasyntactic variables.
791 (adi_assign_command): Likewise.
792
793 2018-09-16 Tom Tromey <tom@tromey.com>
794
795 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
796 metasyntactic variables. Print message if no disassembler options
797 are available.
798
799 2018-09-15 Tom Tromey <tom@tromey.com>
800
801 * infcmd.c (get_inferior_args): Return const char *.
802 * inferior.h (get_inferior_args): Return type now const.
803 * linux-tdep.c (linux_fill_prpsinfo): Update.
804 * procfs.c (procfs_target::make_corefile_notes): Update.
805
806 2018-09-07 Tom Tromey <tom@tromey.com>
807
808 * python/python.c (execute_gdb_command): Call bpstat_do_actions
809 inside the TRY.
810
811 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
812
813 * nios2-tdep.c (nios2_type_align): New.
814 (nios2_gdb_arch_init): Install type_align hook.
815
816 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
817
818 * eval.c (fake_method::fake_method): Call xzalloc directly for a
819 type that is neither object file owned, nor gdbarch owned.
820 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
821 gdbarch is non-NULL.
822 (alloc_type_instance): Allocate non-objfile owned types on the
823 gdbarch obstack.
824 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
825 using TYPE_ALLOC to ensure memory is allocated on the correct
826 obstack.
827 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
828 obstack, or the gdbarch obstack.
829 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
830
831 2018-09-14 Tom Tromey <tom@tromey.com>
832
833 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
834 block.
835
836 2018-09-14 Tom Tromey <tom@tromey.com>
837
838 * nat/fork-inferior.c (get_startup_shell): Remove "static".
839
840 2018-09-13 Tom Tromey <tom@tromey.com>
841
842 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
843 static.
844
845 2018-09-13 Tom Tromey <tom@tromey.com>
846
847 * exec.c (try_open_exec_file): Use std::string.
848
849 2018-09-13 Tom Tromey <tom@tromey.com>
850
851 * utils.h (gdb_bfd_errmsg): Return std::string.
852 * exec.c (exec_file_attach): Update.
853 * compile/compile-object-load.c (compile_object_load): Update.
854 * utils.c (gdb_bfd_errmsg): Return std::string.
855
856 2018-09-13 Tom Tromey <tom@tromey.com>
857
858 * procfs.c (struct procinfo_deleter): New.
859 (procinfo_up): New typedef.
860 (do_destroy_procinfo_cleanup): Remove.
861 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
862
863 2018-09-13 Tom Tromey <tom@tromey.com>
864
865 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
866
867 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
868 2018-09-13 Tom Tromey <tom@tromey.com>
869
870 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
871 (pspy_get_objfiles): New function.
872 (progspace_object_methods): New.
873 (pspace_object_type): Add tp_methods callback.
874 * python/python-internal.h (build_objfiles_list): New
875 declaration.
876 * python/python.c (build_objfiles_list): New function.
877 (gdbpy_objfiles): Implement using build_objfiles_list.
878 * NEWS: Mention the Progspace.objfiles method.
879
880 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
881
882 * python/py-inferior.c (infpy_get_progspace): New function.
883 (inferior_object_getset): Add progspace property.
884 * NEWS: Mention the new property.
885
886 2018-09-13 Tom Tromey <tom@tromey.com>
887
888 PR rust/23650:
889 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
890
891 2018-09-13 Tom Tromey <tom@tromey.com>
892
893 PR rust/23626:
894 * rust-lang.c (rust_enum_variant): Now static.
895 (rust_empty_enum_p): New function.
896 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
897 Handle empty enum.
898
899 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
900
901 * python/py-inferior.c (infpy_repr): New.
902 (inferior_object_type): Register infpy_repr.
903 * python/py-objfile.c (objfpy_repr): New.
904 (objfile_object_type): Register objfpy_repr.
905
906 2018-09-12 John Baldwin <jhb@FreeBSD.org>
907
908 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
909
910 2018-09-12 John Baldwin <jhb@FreeBSD.org>
911
912 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
913 typo.
914
915 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
916
917 * common/common-utils.c: Don't include '<sys/stat.h>'.
918 (is_regular_file): Move to...
919 * common/filestuff.c (is_regular_file): ... here.
920 * common/common-utils.h (is_regular_file): Move to...
921 * common/filestuff.h (is_regular_file): ... here.
922
923 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
924
925 * skip.c (debug_skip): New variable.
926 (skiplist_entry::do_skip_file_p): Add debug output.
927 (skiplist_entry::do_skip_gfile_p): Likewise.
928 (skiplist_entry::skip_function_p): Likewise.
929 (_initialize_step_skip): Create debug command.
930 * NEWS: Mention set/show debug skip.
931
932 2018-09-11 Xavier Roirand <roirand@adacore.com>
933
934 * darwin-nat.c (should_disable_startup_with_shell):
935 New function.
936 (darwin_nat_target::create_inferior): Add call.
937
938 2018-09-11 Xavier Roirand <roirand@adacore.com>
939
940 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
941 inf_port, msg_state>: Initialize.
942 (struct darwin_thread_info) <signaled, single_step>: Change
943 type and initialize.
944 (struct darwin_thread_info) <event>: Initialize.
945
946 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
947
948 PR gdb/23555
949 PR gdb/23558
950 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
951 guesses.
952
953 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
954
955 Revert:
956 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
957
958 PR gdb/23555
959 PR gdb/23558
960 * gnulib/aclocal.m4: Regenerate.
961 * gnulib/config.in: Regenerate.
962 * gnulib/configure: Regenerate.
963 * gnulib/import/Makefile.am: Update.
964 * gnulib/import/Makefile.in: Update.
965 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
966 * gnulib/import/_Noreturn.h: ... this.
967 * gnulib/import/alloca.in.h: Update.
968 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
969 * gnulib/import/arg-nonnull.h: ... this.
970 * gnulib/import/assure.h: Update.
971 * gnulib/import/at-func.c: Update.
972 * gnulib/import/basename-lgpl.c: Update.
973 * gnulib/import/extra/snippet/c++defs.h: Rename to...
974 * gnulib/import/c++defs.h: ... this.
975 * gnulib/import/canonicalize-lgpl.c: Update.
976 * gnulib/import/cdefs.h: Update.
977 * gnulib/import/chdir-long.c: Update.
978 * gnulib/import/chdir-long.h: Update.
979 * gnulib/import/cloexec.c: Update.
980 * gnulib/import/cloexec.h: Update.
981 * gnulib/import/close.c: Update.
982 * gnulib/import/closedir.c: Update.
983 * gnulib/import/config.charset: Update.
984 * gnulib/import/dirent-private.h: Update.
985 * gnulib/import/dirent.in.h: Update.
986 * gnulib/import/dirfd.c: Update.
987 * gnulib/import/dirname-lgpl.c: Update.
988 * gnulib/import/dirname.h: Update.
989 * gnulib/import/dosname.h: Update.
990 * gnulib/import/dup-safer-flag.c: Update.
991 * gnulib/import/dup-safer.c: Update.
992 * gnulib/import/dup.c: Update.
993 * gnulib/import/dup2.c: Update.
994 * gnulib/import/errno.in.h: Update.
995 * gnulib/import/error.c: Update.
996 * gnulib/import/error.h: Update.
997 * gnulib/import/exitfail.c: Update.
998 * gnulib/import/exitfail.h: Update.
999 * gnulib/import/extra/update-copyright: Update.
1000 * gnulib/import/fchdir.c: Update.
1001 * gnulib/import/fcntl.c: Update.
1002 * gnulib/import/fcntl.in.h: Update.
1003 * gnulib/import/fd-hook.c: Update.
1004 * gnulib/import/fd-hook.h: Update.
1005 * gnulib/import/fd-safer-flag.c: Update.
1006 * gnulib/import/fd-safer.c: Update.
1007 * gnulib/import/fdopendir.c: Update.
1008 * gnulib/import/filename.h: Update.
1009 * gnulib/import/filenamecat-lgpl.c: Update.
1010 * gnulib/import/filenamecat.h: Update.
1011 * gnulib/import/flexmember.h: Update.
1012 * gnulib/import/float+.h: Update.
1013 * gnulib/import/float.c: Update.
1014 * gnulib/import/float.in.h: Update.
1015 * gnulib/import/fnmatch.c: Update.
1016 * gnulib/import/fnmatch.in.h: Update.
1017 * gnulib/import/fnmatch_loop.c: Update.
1018 * gnulib/import/fpucw.h: Update.
1019 * gnulib/import/frexp.c: Update.
1020 * gnulib/import/frexpl.c: Update.
1021 * gnulib/import/fstat.c: Update.
1022 * gnulib/import/fstatat.c: Update.
1023 * gnulib/import/getcwd-lgpl.c: Update.
1024 * gnulib/import/getcwd.c: Update.
1025 * gnulib/import/getdtablesize.c: Update.
1026 * gnulib/import/getlogin_r.c: Update.
1027 * gnulib/import/getprogname.c: Update.
1028 * gnulib/import/getprogname.h: Update.
1029 * gnulib/import/gettext.h: Update.
1030 * gnulib/import/gettimeofday.c: Update.
1031 * gnulib/import/glob-libc.h: Update.
1032 * gnulib/import/glob.c: Update.
1033 * gnulib/import/glob.in.h: Update.
1034 * gnulib/import/glob_internal.h: Update.
1035 * gnulib/import/glob_pattern_p.c: Update.
1036 * gnulib/import/globfree.c: Update.
1037 * gnulib/import/hard-locale.c: Update.
1038 * gnulib/import/hard-locale.h: Update.
1039 * gnulib/import/intprops.h: Update.
1040 * gnulib/import/inttypes.in.h: Update.
1041 * gnulib/import/isnan.c: Update.
1042 * gnulib/import/isnand-nolibm.h: Update.
1043 * gnulib/import/isnand.c: Update.
1044 * gnulib/import/isnanl-nolibm.h: Update.
1045 * gnulib/import/isnanl.c: Update.
1046 * gnulib/import/itold.c: Update.
1047 * gnulib/import/libc-config.h: Update.
1048 * gnulib/import/limits.in.h: Update.
1049 * gnulib/import/localcharset.c: Update.
1050 * gnulib/import/localcharset.h: Update.
1051 * gnulib/import/localtime-buffer.c: Update.
1052 * gnulib/import/localtime-buffer.h: Update.
1053 * gnulib/import/lstat.c: Update.
1054 * gnulib/import/m4/00gnulib.m4: Update.
1055 * gnulib/import/m4/__inline.m4: Update.
1056 * gnulib/import/m4/absolute-header.m4: Update.
1057 * gnulib/import/m4/alloca.m4: Update.
1058 * gnulib/import/m4/builtin-expect.m4: Update.
1059 * gnulib/import/m4/canonicalize.m4: Update.
1060 * gnulib/import/m4/chdir-long.m4: Update.
1061 * gnulib/import/m4/close.m4: Update.
1062 * gnulib/import/m4/closedir.m4: Update.
1063 * gnulib/import/m4/configmake.m4: Update.
1064 * gnulib/import/m4/d-ino.m4: Update.
1065 * gnulib/import/m4/d-type.m4: Update.
1066 * gnulib/import/m4/dirent_h.m4: Update.
1067 * gnulib/import/m4/dirfd.m4: Update.
1068 * gnulib/import/m4/dirname.m4: Update.
1069 * gnulib/import/m4/double-slash-root.m4: Update.
1070 * gnulib/import/m4/dup.m4: Update.
1071 * gnulib/import/m4/dup2.m4: Update.
1072 * gnulib/import/m4/eealloc.m4: Update.
1073 * gnulib/import/m4/environ.m4: Update.
1074 * gnulib/import/m4/errno_h.m4: Update.
1075 * gnulib/import/m4/error.m4: Update.
1076 * gnulib/import/m4/exponentd.m4: Update.
1077 * gnulib/import/m4/exponentl.m4: Update.
1078 * gnulib/import/m4/extensions.m4: Update.
1079 * gnulib/import/m4/extern-inline.m4: Update.
1080 * gnulib/import/m4/fchdir.m4: Update.
1081 * gnulib/import/m4/fcntl-o.m4: Update.
1082 * gnulib/import/m4/fcntl.m4: Update.
1083 * gnulib/import/m4/fcntl_h.m4: Update.
1084 * gnulib/import/m4/fdopendir.m4: Update.
1085 * gnulib/import/m4/filenamecat.m4: Update.
1086 * gnulib/import/m4/flexmember.m4: Update.
1087 * gnulib/import/m4/float_h.m4: Update.
1088 * gnulib/import/m4/fnmatch.m4: Update.
1089 * gnulib/import/m4/fnmatch_h.m4: Update.
1090 * gnulib/import/m4/fpieee.m4: Update.
1091 * gnulib/import/m4/frexp.m4: Update.
1092 * gnulib/import/m4/frexpl.m4: Update.
1093 * gnulib/import/m4/fstat.m4: Update.
1094 * gnulib/import/m4/fstatat.m4: Update.
1095 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1096 * gnulib/import/m4/getcwd-path-max.m4: Update.
1097 * gnulib/import/m4/getcwd.m4: Update.
1098 * gnulib/import/m4/getdtablesize.m4: Update.
1099 * gnulib/import/m4/getlogin.m4: Update.
1100 * gnulib/import/m4/getlogin_r.m4: Update.
1101 * gnulib/import/m4/getpagesize.m4: Update.
1102 * gnulib/import/m4/getprogname.m4: Update.
1103 * gnulib/import/m4/gettimeofday.m4: Update.
1104 * gnulib/import/m4/glibc21.m4: Update.
1105 * gnulib/import/m4/glob.m4: Update.
1106 * gnulib/import/m4/glob_h.m4: Update.
1107 * gnulib/import/m4/gnulib-cache.m4: Update.
1108 * gnulib/import/m4/gnulib-common.m4: Update.
1109 * gnulib/import/m4/gnulib-comp.m4: Update.
1110 * gnulib/import/m4/gnulib-tool.m4: Update.
1111 * gnulib/import/m4/hard-locale.m4: Update.
1112 * gnulib/import/m4/include_next.m4: Update.
1113 * gnulib/import/m4/inttypes-pri.m4: Update.
1114 * gnulib/import/m4/inttypes.m4: Update.
1115 * gnulib/import/m4/isnand.m4: Update.
1116 * gnulib/import/m4/isnanl.m4: Update.
1117 * gnulib/import/m4/largefile.m4: Update.
1118 * gnulib/import/m4/limits-h.m4: Update.
1119 * gnulib/import/m4/localcharset.m4: Update.
1120 * gnulib/import/m4/locale-fr.m4: Update.
1121 * gnulib/import/m4/locale-ja.m4: Update.
1122 * gnulib/import/m4/locale-zh.m4: Update.
1123 * gnulib/import/m4/localtime-buffer.m4: Update.
1124 * gnulib/import/m4/longlong.m4: Update.
1125 * gnulib/import/m4/lstat.m4: Update.
1126 * gnulib/import/m4/malloc.m4: Update.
1127 * gnulib/import/m4/malloca.m4: Update.
1128 * gnulib/import/m4/math_h.m4: Update.
1129 * gnulib/import/m4/mbrtowc.m4: Update.
1130 * gnulib/import/m4/mbsinit.m4: Update.
1131 * gnulib/import/m4/mbsrtowcs.m4: Update.
1132 * gnulib/import/m4/mbstate_t.m4: Update.
1133 * gnulib/import/m4/memchr.m4: Update.
1134 * gnulib/import/m4/memmem.m4: Update.
1135 * gnulib/import/m4/mempcpy.m4: Update.
1136 * gnulib/import/m4/memrchr.m4: Update.
1137 * gnulib/import/m4/mkdir.m4: Update.
1138 * gnulib/import/m4/mkstemp.m4: Update.
1139 * gnulib/import/m4/mmap-anon.m4: Update.
1140 * gnulib/import/m4/mode_t.m4: Update.
1141 * gnulib/import/m4/msvc-inval.m4: Update.
1142 * gnulib/import/m4/msvc-nothrow.m4: Update.
1143 * gnulib/import/m4/multiarch.m4: Update.
1144 * gnulib/import/m4/nocrash.m4: Update.
1145 * gnulib/import/m4/off_t.m4: Update.
1146 * gnulib/import/m4/onceonly.m4: Update.
1147 * gnulib/import/m4/open-cloexec.m4: Update.
1148 * gnulib/import/m4/open.m4: Update.
1149 * gnulib/import/m4/openat.m4: Update.
1150 * gnulib/import/m4/opendir.m4: Update.
1151 * gnulib/import/m4/pathmax.m4: Update.
1152 * gnulib/import/m4/rawmemchr.m4: Update.
1153 * gnulib/import/m4/readdir.m4: Update.
1154 * gnulib/import/m4/readlink.m4: Update.
1155 * gnulib/import/m4/realloc.m4: Update.
1156 * gnulib/import/m4/rename.m4: Update.
1157 * gnulib/import/m4/rewinddir.m4: Update.
1158 * gnulib/import/m4/rmdir.m4: Update.
1159 * gnulib/import/m4/save-cwd.m4: Update.
1160 * gnulib/import/m4/secure_getenv.m4: Update.
1161 * gnulib/import/m4/setenv.m4: Update.
1162 * gnulib/import/m4/signal_h.m4: Update.
1163 * gnulib/import/m4/ssize_t.m4: Update.
1164 * gnulib/import/m4/stat-time.m4: Update.
1165 * gnulib/import/m4/stat.m4: Update.
1166 * gnulib/import/m4/std-gnu11.m4: Update.
1167 * gnulib/import/m4/stdbool.m4: Update.
1168 * gnulib/import/m4/stddef_h.m4: Update.
1169 * gnulib/import/m4/stdint.m4: Update.
1170 * gnulib/import/m4/stdio_h.m4: Update.
1171 * gnulib/import/m4/stdlib_h.m4: Update.
1172 * gnulib/import/m4/strchrnul.m4: Update.
1173 * gnulib/import/m4/strdup.m4: Update.
1174 * gnulib/import/m4/strerror.m4: Update.
1175 * gnulib/import/m4/string_h.m4: Update.
1176 * gnulib/import/m4/strstr.m4: Update.
1177 * gnulib/import/m4/strtok_r.m4: Update.
1178 * gnulib/import/m4/sys_socket_h.m4: Update.
1179 * gnulib/import/m4/sys_stat_h.m4: Update.
1180 * gnulib/import/m4/sys_time_h.m4: Update.
1181 * gnulib/import/m4/sys_types_h.m4: Update.
1182 * gnulib/import/m4/tempname.m4: Update.
1183 * gnulib/import/m4/time_h.m4: Update.
1184 * gnulib/import/m4/unistd-safer.m4: Update.
1185 * gnulib/import/m4/unistd_h.m4: Update.
1186 * gnulib/import/m4/warn-on-use.m4: Update.
1187 * gnulib/import/m4/wchar_h.m4: Update.
1188 * gnulib/import/m4/wchar_t.m4: Update.
1189 * gnulib/import/m4/wctype_h.m4: Update.
1190 * gnulib/import/m4/wint_t.m4: Update.
1191 * gnulib/import/malloc.c: Update.
1192 * gnulib/import/malloc/scratch_buffer.h: Update.
1193 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1194 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1195 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1196 * gnulib/import/malloca.c: Update.
1197 * gnulib/import/malloca.h: Update.
1198 * gnulib/import/malloca.valgrind: Update.
1199 * gnulib/import/math.in.h: Update.
1200 * gnulib/import/mbrtowc.c: Update.
1201 * gnulib/import/mbsinit.c: Update.
1202 * gnulib/import/mbsrtowcs-impl.h: Update.
1203 * gnulib/import/mbsrtowcs-state.c: Update.
1204 * gnulib/import/mbsrtowcs.c: Update.
1205 * gnulib/import/memchr.c: Update.
1206 * gnulib/import/memmem.c: Update.
1207 * gnulib/import/mempcpy.c: Update.
1208 * gnulib/import/memrchr.c: Update.
1209 * gnulib/import/mkdir.c: Update.
1210 * gnulib/import/mkstemp.c: Update.
1211 * gnulib/import/msvc-inval.c: Update.
1212 * gnulib/import/msvc-inval.h: Update.
1213 * gnulib/import/msvc-nothrow.c: Update.
1214 * gnulib/import/msvc-nothrow.h: Update.
1215 * gnulib/import/open.c: Update.
1216 * gnulib/import/openat-die.c: Update.
1217 * gnulib/import/openat-priv.h: Update.
1218 * gnulib/import/openat-proc.c: Update.
1219 * gnulib/import/openat.c: Update.
1220 * gnulib/import/openat.h: Update.
1221 * gnulib/import/opendir.c: Update.
1222 * gnulib/import/pathmax.h: Update.
1223 * gnulib/import/pipe-safer.c: Update.
1224 * gnulib/import/rawmemchr.c: Update.
1225 * gnulib/import/readdir.c: Update.
1226 * gnulib/import/readlink.c: Update.
1227 * gnulib/import/realloc.c: Update.
1228 * gnulib/import/ref-add.sin: Update.
1229 * gnulib/import/ref-del.sin: Update.
1230 * gnulib/import/rename.c: Update.
1231 * gnulib/import/rewinddir.c: Update.
1232 * gnulib/import/rmdir.c: Update.
1233 * gnulib/import/same-inode.h: Update.
1234 * gnulib/import/save-cwd.c: Update.
1235 * gnulib/import/save-cwd.h: Update.
1236 * gnulib/import/scratch_buffer.h: Update.
1237 * gnulib/import/secure_getenv.c: Update.
1238 * gnulib/import/setenv.c: Update.
1239 * gnulib/import/signal.in.h: Update.
1240 * gnulib/import/stat-time.c: Update.
1241 * gnulib/import/stat-time.h: Update.
1242 * gnulib/import/stat-w32.c: Update.
1243 * gnulib/import/stat-w32.h: Update.
1244 * gnulib/import/stat.c: Update.
1245 * gnulib/import/stdbool.in.h: Update.
1246 * gnulib/import/stddef.in.h: Update.
1247 * gnulib/import/stdint.in.h: Update.
1248 * gnulib/import/stdio.in.h: Update.
1249 * gnulib/import/stdlib.in.h: Update.
1250 * gnulib/import/str-two-way.h: Update.
1251 * gnulib/import/strchrnul.c: Update.
1252 * gnulib/import/strdup.c: Update.
1253 * gnulib/import/streq.h: Update.
1254 * gnulib/import/strerror-override.c: Update.
1255 * gnulib/import/strerror-override.h: Update.
1256 * gnulib/import/strerror.c: Update.
1257 * gnulib/import/string.in.h: Update.
1258 * gnulib/import/stripslash.c: Update.
1259 * gnulib/import/strnlen1.c: Update.
1260 * gnulib/import/strnlen1.h: Update.
1261 * gnulib/import/strstr.c: Update.
1262 * gnulib/import/strtok_r.c: Update.
1263 * gnulib/import/sys_stat.in.h: Update.
1264 * gnulib/import/sys_time.in.h: Update.
1265 * gnulib/import/sys_types.in.h: Update.
1266 * gnulib/import/tempname.c: Update.
1267 * gnulib/import/tempname.h: Update.
1268 * gnulib/import/time.in.h: Update.
1269 * gnulib/import/unistd--.h: Update.
1270 * gnulib/import/unistd-safer.h: Update.
1271 * gnulib/import/unistd.in.h: Update.
1272 * gnulib/import/unsetenv.c: Update.
1273 * gnulib/import/verify.h: Update.
1274 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1275 * gnulib/import/wchar.in.h: Update.
1276 * gnulib/import/wctype.in.h: Update.
1277 * gnulib/import/xalloc-oversized.h: Update.
1278 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1279 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1280
1281 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * record-btrace.c (get_thread_current_frame): Remove
1284 old_inferior_ptid.
1285
1286 2018-09-10 Jerome Guitton <guitton@adacore.com>
1287
1288 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1289 with check_tag to 1 if and only if the type is tagged and the
1290 component being searched cannot been found in the current
1291 view. Otherwise, always call ada_to_fixed_type with
1292 check_tag to 0.
1293
1294 2018-09-10 Xavier Roirand <roirand@adacore.com>
1295
1296 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1297 declaration.
1298 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1299 * ada-varobj.c (ada_varobj_get_number_of_children,
1300 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1301
1302 2018-09-10 Xavier Roirand <roirand@adacore.com>
1303
1304 * ada-valprint.c (ada_value_print): Use type instead of
1305 enclosing type.
1306
1307 2018-09-10 Xavier Roirand <roirand@adacore.com>
1308
1309 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1310 an array of access to unconstrained array.
1311
1312 2018-09-10 Xavier Roirand <roirand@adacore.com>
1313
1314 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1315 (ada_check_typedef): Use it.
1316
1317 2018-09-10 Xavier Roirand <roirand@adacore.com>
1318
1319 * ada-varobj.c (ada_varobj_describe_struct_child)
1320 (ada_varobj_describe_child): Handle union case like struct one.
1321
1322 2018-09-10 Tom Tromey <tom@tromey.com>
1323
1324 PR python/18380:
1325 * python/python.c (_initialize_python): Make example in "python"
1326 help work in Python 3.
1327
1328 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1329
1330 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1331 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1332 $(EXEEXT) to the script, as it is not a program.
1333
1334 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1335
1336 * python/py-prettyprint.c (pretty_print_one_value): Return
1337 gdbpy_ref<>.
1338 (print_string_repr): Adjust.
1339 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1340 * python/python-internal.h (apply_varobj_pretty_printer): Return
1341 gdbpy_ref<>.
1342 * varobj.c (varobj_value_get_print_value): Adjust.
1343
1344 2018-09-08 Tom Tromey <tom@tromey.com>
1345
1346 PR python/16047:
1347 * python/py-prettyprint.c (pretty_print_one_value): Check for
1348 to_string method.
1349
1350 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1351
1352 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1353 replace_operator_with_call.
1354
1355 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1356
1357 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1358
1359 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1360
1361 * ada-typeprint.c (print_range): Print the bounds using TYPE
1362 rather than its TYPE_TARGET_TYPE.
1363
1364 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1365
1366 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1367 call to ada_to_fixed_value_create.
1368
1369 2018-09-08 Jerome Guitton <guitton@adacore.com>
1370
1371 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1372
1373 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1374
1375 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1376 by calls to error.
1377
1378 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1379
1380 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1381 Move update of loop variable "fi".
1382
1383 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1384
1385 * ada-lang.c (value_assign_to_component): In the case of
1386 big-endian targets, extract the bits of the given VAL
1387 using an src_offset of zero if container is not a scalar.
1388
1389 2018-09-06 Simon Ser <contact@emersion.fr>
1390
1391 PR gdb/23105
1392 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1393 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1394 * fbsd-tdep.c (fbsd_make_note_desc): New.
1395 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1396 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1397 * target.h (enum target_object) Add FreeBSD-specific
1398 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1399
1400 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1401
1402 * compile/compile-c.h (generate_c_for_variable_locations):
1403 Change reference to pointer.
1404 * compile/compile-c-support.c (compile_program) <compute>:
1405 Likewise.
1406 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1407 (generate_c_for_for_one_variable): Likewise
1408 (generate_c_for_variable_locations): Likewise
1409 * compile/compile-c-types.c (compile_c_instance::convert_type):
1410 Likewise
1411 * compile/compile-cplus-symbols.c (convert_one_symbol):
1412 std::move the scope passed to enter_scope.
1413 * compile/compile-cplus-types.c
1414 (compile_cplus_instance::enter_scope): Make parameter
1415 rvalue-reference.
1416 (compile_cplus_instance::new_scope): Change reference to
1417 pointer.
1418 (compile_cplus_instance::convert_type): Likewise
1419 (compile_cplus_convert_typedef): std::move the scope passed to
1420 enter_scope.
1421 (compile_cplus_convert_struct_or_union): Likewise.
1422 (compile_cplus_convert_enum): Likewise.
1423 (compile_cplus_convert_namespace): Likewise.
1424 * compile/compile-cplus.h (compile_cplus_instance)
1425 <enter_scope>: Make parameter rvalue-reference.
1426 * compile/compile-internal.h (compile_instance)
1427 <get_cached_type>: Likewise
1428 * compile/compile-loc2c.c (push): Likewise
1429 (pushf): Likewise
1430 (unary): Likewise
1431 (binary): Likewise
1432 (print_label): Likewise
1433 (pushf_register_address): Likewise
1434 (pushf_register): Likewise
1435 (do_compile_dwarf_expr_to_c): Likewise
1436 (compile_dwarf_expr_to_c): Likewise
1437 (compile_dwarf_bounds_to_c): Likewise
1438 * compile/compile.c (compile_instance::get_cached_type):
1439 Likewise
1440 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1441 (compile_dwarf_bounds_to_c): Likewise
1442 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1443 (dwarf2_compile_property_to_c): Likewise
1444 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1445 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1446 Likewise
1447
1448 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1451 * tui/tui-data.c (init_content_element): Don't initialize it.
1452
1453 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1454
1455 * tui/tui-data.h (struct tui_win_info)
1456 <detail::opaque>: Remove.
1457 * tui/tui-data.c (init_win_info): Remove assignment.
1458
1459 2018-09-05 Tom Tromey <tom@tromey.com>
1460
1461 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1462 -Wformat-nonliteral.
1463 * target-float.c (host_float_ops<T>::to_string)
1464 (host_float_ops<T>::from_string): Use
1465 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1466 * configure: Rebuild.
1467
1468 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1469
1470 * printcmd.c (printf_c_string): Use
1471 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1472 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1473
1474 2018-09-05 Tom Tromey <tom@tromey.com>
1475
1476 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1477
1478 2018-09-05 Tom de Vries <tdevries@suse.de>
1479
1480 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1481 with resolve_abstract_p == true.
1482 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1483 defaulting to false. Propagate resolve_abstract_p to
1484 dwarf2_fetch_die_loc_sect_off.
1485 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1486 parameter, defaulting to false.
1487 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1488 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1489 parameter.
1490 * dwarf2read.h (struct die_info): Forward-declare.
1491 (die_info_ptr): New typedef.
1492 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1493
1494 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1495
1496 GDB 8.2 released.
1497
1498 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1499 Pedro Alves <palves@redhat.com>
1500
1501 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1502 "aclocal-m4-deps.mk". Include file here.
1503 $(srcdir)/aclocal.m4: Add "configure.ac".
1504 * gnulib/aclocal-m4-deps.mk: New file.
1505 * gnulib/update-gnulib.sh: Automatically update
1506 "aclocal-m4-deps.mk".
1507
1508 2018-09-04 Tom Tromey <tom@tromey.com>
1509
1510 * configure: Rebuild.
1511 * configure.ac: Remove multi-ice code.
1512
1513 2018-09-04 Tom Tromey <tom@tromey.com>
1514
1515 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1516 (ada-exp.o): Update.
1517
1518 2018-09-04 Tom Tromey <tom@tromey.com>
1519
1520 * Makefile.in (printcmd.o, target-float.o): Remove.
1521 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1522
1523 2018-09-04 Tom Tromey <tom@tromey.com>
1524
1525 * gnulib/Makefile.in: Remove obsolete comment.
1526 * Makefile.in: Remove obsolete comment.
1527
1528 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1529
1530 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1531 line with '+'.
1532
1533 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1534
1535 * riscv-tdep.c: Add 'prologue-value.h' include.
1536 (struct riscv_unwind_cache): New struct.
1537 (riscv_debug_unwinder): New global.
1538 (riscv_scan_prologue): Update arguments, capture register details
1539 from prologue scan.
1540 (riscv_skip_prologue): Reformat arguments line, move end of
1541 prologue calculation into riscv_scan_prologue.
1542 (riscv_frame_cache): Update return type, create
1543 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1544 details.
1545 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1546 (riscv_frame_prev_register): Use the trad_frame within the
1547 riscv_unwind_cache.
1548 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1549 flag.
1550
1551 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1552
1553 * trad-frame.h (trad_frame_set_realreg): Declare.
1554 (trad_frame_set_addr): Declare.
1555 * trad-frame.c (trad_frame_set_realreg): Define new function.
1556 (trad_frame_set_addr): Define new function.
1557 (trad_frame_set_reg_realreg): Use new function.
1558 (trad_frame_set_reg_addr): Use new function.
1559
1560 2018-09-01 Keith Seitz <keiths@redhat.com>
1561
1562 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1563 pulongest instead of "%lld".
1564 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1565 ATTRIBUTE_UNUSED.
1566
1567 2018-08-31 Tom Tromey <tom@tromey.com>
1568
1569 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1570 variant part type.
1571
1572 2018-08-31 Pedro Alves <palves@redhat.com>
1573
1574 * gdbarch.h: Regenerate.
1575
1576 2018-08-31 Pedro Alves <palves@redhat.com>
1577
1578 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1579 * target.h (Hardware watchpoint interfaces): Describe
1580 continuable/steppable/non-steppable watchpoints.
1581 * gdbarch.h, gdbarch.c: Regenerate.
1582
1583 2018-08-31 Pedro Alves <palves@redhat.com>
1584
1585 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1586 Delete.
1587 * s390-linux-nat.c
1588 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1589 * target.h (target_ops::have_continuable_watchpoint): Delete.
1590 (target_have_continuable_watchpoint): Delete.
1591 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1592 * target-delegates.c: Regenerate.
1593
1594 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1595
1596 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1597 the files present in "gnulib/import/m4/".
1598
1599 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1600
1601 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1602 c.sw, c.swsp, and c.sdsp.
1603
1604 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1605
1606 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1607 (riscv_read_misa_reg): Don't cache value read into inferior data.
1608 (riscv_new_inferior_data): Delete.
1609 (riscv_inferior_data_cleanup): Delete.
1610 (riscv_inferior_data): Delete.
1611 (riscv_invalidate_inferior_data): Delete.
1612 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1613
1614 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1615
1616 * compile/compile-cplus-types.c
1617 (compile_cplus_instance::leave_scope): Take the address of scope
1618 object.
1619 (compile_cplus_instance::convert_qualified_base): Compare quals
1620 to 0.
1621
1622 2018-08-30 Keith Seitz <keiths@redhat.com>
1623
1624 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1625 Use "%s" and host_address_to_string instead of "%p" in printf.
1626
1627 2018-08-29 Keith Seitz <keiths@redhat.com>
1628
1629 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1630 and compile-cplus-types.c.
1631 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1632 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1633 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1634 Declare.
1635 * compile/compile-c-support.c: Include compile-cplus.h.
1636 (load_libcompile): Templatize.
1637 (get_compile_context): "New" function.
1638 (c_get_compile_context): Use get_compile_context.
1639 (cplus_get_compile_context): New function.
1640 (cplus_push_user_expression, cplus_pop_user_expression)
1641 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1642 (cplus_compute_program): Define new structs/functions.
1643 * compile/compile-cplus-symmbols.c: New file.
1644 * compile/compile-cplus-types.c: New file.
1645 * compile/compile-cplus.h: New file.
1646 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1647 Declare.
1648 * compile/compile-object-load.c (get_out_value_type): Use
1649 strncmp_iw when comparing symbol names.
1650 (compile_object_load): Add mst_bss and mst_data.
1651 * compile/compile.c (_initialize_compile): Remove
1652 -Wno-implicit-function-declaration from `compile_args'.
1653 * compile/gcc-cp-plugin.h: New file.
1654 * NEWS: Mention C++ compile support and new debug options.
1655
1656 2018-08-29 Keith Seitz <keiths@redhat.com>
1657
1658 * linespec.c (collect_info::add_symbol): Make virtual.
1659 (struct symbol_searcher_collect_info): New struct.
1660 (symbol_searcher::find_all_symbols): New method.
1661 * symtab.h (class symbol_searcher): New class.
1662
1663 2018-08-29 Keith Seitz <keiths@redhat.com>
1664
1665 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1666 Change to vector of block_symbol. Update all users.
1667 (struct collect_info) <symbols>: Likewise.
1668 (collect_info::add_symbol): Take block_symbol as argument.
1669 Update all callers.
1670 (decode_compound_collector) <m_symbols>: Change type to vector
1671 of block_symbol. Update all users.
1672 (decode_compound_collector::operator ()): Change parameter type
1673 to block_symbol.
1674 (find_method, find_function_symbols, find_linespec_symbols)
1675 (find_label_symbols_in_block, find_label_symbols): Change symbol
1676 vectors to block_symbol vectors.
1677 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1678 block_symbol.
1679
1680 2018-08-29 Keith Seitz <keiths@redhat.com>
1681
1682 * linespec.c (symbolp): Remove typedef and VEC definitions.
1683 (bound_minimal_symbol_d): Likewise.
1684
1685 2018-08-29 Keith Seitz <keiths@redhat.com>
1686
1687 * linespec.c (decode_compound_collector::decode_compound_collector):
1688 Remove initialization for `m_symtabs'.
1689 (decode_compound_collector::release_symbols): Change return type
1690 to std::vector. Update all callers.
1691 (class decode_compound_collector) <m_symbols>: Change type to
1692 std::vector.
1693 (lookup_prefix_sym): Change return type to std::vector. Update all
1694 callers.
1695 (compare_symbols): Remove.
1696 (std_compare_symbols): Rename to `compare_symbols'.
1697 (find_method): Change `sym_classes' parameter to std::vector.
1698 Update all callers. Use std::sort to sort sym_classes.
1699 (find_linespec_symbols): Remove cleanup.
1700
1701 2018-08-29 Keith Seitz <keiths@redhat.com>
1702
1703 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1704 std::vector. Update all users.
1705 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1706 (struct collect_info) <minimal_symbols>: Likewise.
1707 (compare_msymbols): Return bool. Change parameters to const
1708 bound_minimal_symbol references.
1709 (find_method, find_function_symbols, find_linespec_symbols): Change
1710 `minsyms' parameter to std::vector. Update all callers.
1711
1712 2018-08-29 Keith Seitz <keiths@redhat.com>
1713
1714 * linespec.c (struct linespec) <label_symbols>: Change type to
1715 std::vector. Update all users.
1716 (find_label_symbols_in_block): Change `result' parameter to
1717 std::vector. Update all callers.
1718 (find_label_symbols): Return std::vector. Update all callers.
1719
1720 2018-08-29 Keith Seitz <keiths@redhat.com>
1721
1722 * linespec.c (struct linespec) <function_symbols>: Change type to
1723 std::vector. Update all users.
1724 (struct collect_info) <function_symbols>: Likewise.
1725 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1726 (std_compare_symbols): New function.
1727 (find_method, find_function_symbols, find_linespec_symbols)
1728 (find_label_symbols_in_block): Change `symbols' parameter to
1729 std::vector. Update all callers.
1730 (find_label_symbols): Likewise for `function_symbols' and
1731 `label_funcs_ret'.
1732
1733 2018-08-29 Keith Seitz <keiths@redhat.com>
1734
1735 * linespec.c (symtab_vector_up): Define.
1736 (struct linespec) <file_symtabs>: Change type to std::vector *.
1737 Update all uses.
1738 (struct collect_info) <file_symtabs>: Likewise.
1739 (collect_symtabs_from_filename): Return symtab_vector_up.
1740 Update all callers.
1741 (decode_objc): Remove cleanup.
1742 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1743 (symtab_collector::release_symtabs): Return symtab_vector_up.
1744 Update all callers.
1745 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1746 Update all users.
1747 (collect_symtabs_from_filename, symtabs_from_filename): Return
1748 symtab_vector_up. Update all callers.
1749
1750 2018-08-29 Tom Tromey <tom@tromey.com>
1751
1752 * csky-tdep.c (csky_analyze_prologue): Use
1753 core_addr_to_string_nz.
1754
1755 2018-08-29 Tom Tromey <tom@tromey.com>
1756
1757 * windows-nat.c (struct xlate_exception) <them>: Change type to
1758 DWORD.
1759 (xlate): Fix formatting. Remove last entry.
1760 (struct xlate_exception, xlate): Comment out.
1761 (windows_nat_target::resume): Use ranged for.
1762
1763 2018-08-29 Jim Wilson <jimw@sifive.com>
1764
1765 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1766 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1767 of NT_PRFPREG.
1768 (riscv_linux_nat_target::store_registers): Likewise.
1769
1770 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1771
1772 PR gdb/23555
1773 PR gdb/23558
1774 * gnulib/aclocal.m4: Regenerate.
1775 * gnulib/config.in: Regenerate.
1776 * gnulib/configure: Regenerate.
1777 * gnulib/import/Makefile.am: Update.
1778 * gnulib/import/Makefile.in: Update.
1779 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1780 * gnulib/import/_Noreturn.h: ... this.
1781 * gnulib/import/alloca.in.h: Update.
1782 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1783 * gnulib/import/arg-nonnull.h: ... this.
1784 * gnulib/import/assure.h: Update.
1785 * gnulib/import/at-func.c: Update.
1786 * gnulib/import/basename-lgpl.c: Update.
1787 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1788 * gnulib/import/c++defs.h: ... this.
1789 * gnulib/import/canonicalize-lgpl.c: Update.
1790 * gnulib/import/cdefs.h: Update.
1791 * gnulib/import/chdir-long.c: Update.
1792 * gnulib/import/chdir-long.h: Update.
1793 * gnulib/import/cloexec.c: Update.
1794 * gnulib/import/cloexec.h: Update.
1795 * gnulib/import/close.c: Update.
1796 * gnulib/import/closedir.c: Update.
1797 * gnulib/import/config.charset: Update.
1798 * gnulib/import/dirent-private.h: Update.
1799 * gnulib/import/dirent.in.h: Update.
1800 * gnulib/import/dirfd.c: Update.
1801 * gnulib/import/dirname-lgpl.c: Update.
1802 * gnulib/import/dirname.h: Update.
1803 * gnulib/import/dosname.h: Update.
1804 * gnulib/import/dup-safer-flag.c: Update.
1805 * gnulib/import/dup-safer.c: Update.
1806 * gnulib/import/dup.c: Update.
1807 * gnulib/import/dup2.c: Update.
1808 * gnulib/import/errno.in.h: Update.
1809 * gnulib/import/error.c: Update.
1810 * gnulib/import/error.h: Update.
1811 * gnulib/import/exitfail.c: Update.
1812 * gnulib/import/exitfail.h: Update.
1813 * gnulib/import/extra/update-copyright: Update.
1814 * gnulib/import/fchdir.c: Update.
1815 * gnulib/import/fcntl.c: Update.
1816 * gnulib/import/fcntl.in.h: Update.
1817 * gnulib/import/fd-hook.c: Update.
1818 * gnulib/import/fd-hook.h: Update.
1819 * gnulib/import/fd-safer-flag.c: Update.
1820 * gnulib/import/fd-safer.c: Update.
1821 * gnulib/import/fdopendir.c: Update.
1822 * gnulib/import/filename.h: Update.
1823 * gnulib/import/filenamecat-lgpl.c: Update.
1824 * gnulib/import/filenamecat.h: Update.
1825 * gnulib/import/flexmember.h: Update.
1826 * gnulib/import/float+.h: Update.
1827 * gnulib/import/float.c: Update.
1828 * gnulib/import/float.in.h: Update.
1829 * gnulib/import/fnmatch.c: Update.
1830 * gnulib/import/fnmatch.in.h: Update.
1831 * gnulib/import/fnmatch_loop.c: Update.
1832 * gnulib/import/fpucw.h: Update.
1833 * gnulib/import/frexp.c: Update.
1834 * gnulib/import/frexpl.c: Update.
1835 * gnulib/import/fstat.c: Update.
1836 * gnulib/import/fstatat.c: Update.
1837 * gnulib/import/getcwd-lgpl.c: Update.
1838 * gnulib/import/getcwd.c: Update.
1839 * gnulib/import/getdtablesize.c: Update.
1840 * gnulib/import/getlogin_r.c: Update.
1841 * gnulib/import/getprogname.c: Update.
1842 * gnulib/import/getprogname.h: Update.
1843 * gnulib/import/gettext.h: Update.
1844 * gnulib/import/gettimeofday.c: Update.
1845 * gnulib/import/glob-libc.h: Update.
1846 * gnulib/import/glob.c: Update.
1847 * gnulib/import/glob.in.h: Update.
1848 * gnulib/import/glob_internal.h: Update.
1849 * gnulib/import/glob_pattern_p.c: Update.
1850 * gnulib/import/globfree.c: Update.
1851 * gnulib/import/hard-locale.c: Update.
1852 * gnulib/import/hard-locale.h: Update.
1853 * gnulib/import/intprops.h: Update.
1854 * gnulib/import/inttypes.in.h: Update.
1855 * gnulib/import/isnan.c: Update.
1856 * gnulib/import/isnand-nolibm.h: Update.
1857 * gnulib/import/isnand.c: Update.
1858 * gnulib/import/isnanl-nolibm.h: Update.
1859 * gnulib/import/isnanl.c: Update.
1860 * gnulib/import/itold.c: Update.
1861 * gnulib/import/libc-config.h: Update.
1862 * gnulib/import/limits.in.h: Update.
1863 * gnulib/import/localcharset.c: Update.
1864 * gnulib/import/localcharset.h: Update.
1865 * gnulib/import/localtime-buffer.c: Update.
1866 * gnulib/import/localtime-buffer.h: Update.
1867 * gnulib/import/lstat.c: Update.
1868 * gnulib/import/m4/00gnulib.m4: Update.
1869 * gnulib/import/m4/__inline.m4: Update.
1870 * gnulib/import/m4/absolute-header.m4: Update.
1871 * gnulib/import/m4/alloca.m4: Update.
1872 * gnulib/import/m4/builtin-expect.m4: Update.
1873 * gnulib/import/m4/canonicalize.m4: Update.
1874 * gnulib/import/m4/chdir-long.m4: Update.
1875 * gnulib/import/m4/close.m4: Update.
1876 * gnulib/import/m4/closedir.m4: Update.
1877 * gnulib/import/m4/configmake.m4: Update.
1878 * gnulib/import/m4/d-ino.m4: Update.
1879 * gnulib/import/m4/d-type.m4: Update.
1880 * gnulib/import/m4/dirent_h.m4: Update.
1881 * gnulib/import/m4/dirfd.m4: Update.
1882 * gnulib/import/m4/dirname.m4: Update.
1883 * gnulib/import/m4/double-slash-root.m4: Update.
1884 * gnulib/import/m4/dup.m4: Update.
1885 * gnulib/import/m4/dup2.m4: Update.
1886 * gnulib/import/m4/eealloc.m4: Update.
1887 * gnulib/import/m4/environ.m4: Update.
1888 * gnulib/import/m4/errno_h.m4: Update.
1889 * gnulib/import/m4/error.m4: Update.
1890 * gnulib/import/m4/exponentd.m4: Update.
1891 * gnulib/import/m4/exponentl.m4: Update.
1892 * gnulib/import/m4/extensions.m4: Update.
1893 * gnulib/import/m4/extern-inline.m4: Update.
1894 * gnulib/import/m4/fchdir.m4: Update.
1895 * gnulib/import/m4/fcntl-o.m4: Update.
1896 * gnulib/import/m4/fcntl.m4: Update.
1897 * gnulib/import/m4/fcntl_h.m4: Update.
1898 * gnulib/import/m4/fdopendir.m4: Update.
1899 * gnulib/import/m4/filenamecat.m4: Update.
1900 * gnulib/import/m4/flexmember.m4: Update.
1901 * gnulib/import/m4/float_h.m4: Update.
1902 * gnulib/import/m4/fnmatch.m4: Update.
1903 * gnulib/import/m4/fnmatch_h.m4: Update.
1904 * gnulib/import/m4/fpieee.m4: Update.
1905 * gnulib/import/m4/frexp.m4: Update.
1906 * gnulib/import/m4/frexpl.m4: Update.
1907 * gnulib/import/m4/fstat.m4: Update.
1908 * gnulib/import/m4/fstatat.m4: Update.
1909 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1910 * gnulib/import/m4/getcwd-path-max.m4: Update.
1911 * gnulib/import/m4/getcwd.m4: Update.
1912 * gnulib/import/m4/getdtablesize.m4: Update.
1913 * gnulib/import/m4/getlogin.m4: Update.
1914 * gnulib/import/m4/getlogin_r.m4: Update.
1915 * gnulib/import/m4/getpagesize.m4: Update.
1916 * gnulib/import/m4/getprogname.m4: Update.
1917 * gnulib/import/m4/gettimeofday.m4: Update.
1918 * gnulib/import/m4/glibc21.m4: Update.
1919 * gnulib/import/m4/glob.m4: Update.
1920 * gnulib/import/m4/glob_h.m4: Update.
1921 * gnulib/import/m4/gnulib-cache.m4: Update.
1922 * gnulib/import/m4/gnulib-common.m4: Update.
1923 * gnulib/import/m4/gnulib-comp.m4: Update.
1924 * gnulib/import/m4/gnulib-tool.m4: Update.
1925 * gnulib/import/m4/hard-locale.m4: Update.
1926 * gnulib/import/m4/include_next.m4: Update.
1927 * gnulib/import/m4/inttypes-pri.m4: Update.
1928 * gnulib/import/m4/inttypes.m4: Update.
1929 * gnulib/import/m4/isnand.m4: Update.
1930 * gnulib/import/m4/isnanl.m4: Update.
1931 * gnulib/import/m4/largefile.m4: Update.
1932 * gnulib/import/m4/limits-h.m4: Update.
1933 * gnulib/import/m4/localcharset.m4: Update.
1934 * gnulib/import/m4/locale-fr.m4: Update.
1935 * gnulib/import/m4/locale-ja.m4: Update.
1936 * gnulib/import/m4/locale-zh.m4: Update.
1937 * gnulib/import/m4/localtime-buffer.m4: Update.
1938 * gnulib/import/m4/longlong.m4: Update.
1939 * gnulib/import/m4/lstat.m4: Update.
1940 * gnulib/import/m4/malloc.m4: Update.
1941 * gnulib/import/m4/malloca.m4: Update.
1942 * gnulib/import/m4/math_h.m4: Update.
1943 * gnulib/import/m4/mbrtowc.m4: Update.
1944 * gnulib/import/m4/mbsinit.m4: Update.
1945 * gnulib/import/m4/mbsrtowcs.m4: Update.
1946 * gnulib/import/m4/mbstate_t.m4: Update.
1947 * gnulib/import/m4/memchr.m4: Update.
1948 * gnulib/import/m4/memmem.m4: Update.
1949 * gnulib/import/m4/mempcpy.m4: Update.
1950 * gnulib/import/m4/memrchr.m4: Update.
1951 * gnulib/import/m4/mkdir.m4: Update.
1952 * gnulib/import/m4/mkstemp.m4: Update.
1953 * gnulib/import/m4/mmap-anon.m4: Update.
1954 * gnulib/import/m4/mode_t.m4: Update.
1955 * gnulib/import/m4/msvc-inval.m4: Update.
1956 * gnulib/import/m4/msvc-nothrow.m4: Update.
1957 * gnulib/import/m4/multiarch.m4: Update.
1958 * gnulib/import/m4/nocrash.m4: Update.
1959 * gnulib/import/m4/off_t.m4: Update.
1960 * gnulib/import/m4/onceonly.m4: Update.
1961 * gnulib/import/m4/open-cloexec.m4: Update.
1962 * gnulib/import/m4/open.m4: Update.
1963 * gnulib/import/m4/openat.m4: Update.
1964 * gnulib/import/m4/opendir.m4: Update.
1965 * gnulib/import/m4/pathmax.m4: Update.
1966 * gnulib/import/m4/rawmemchr.m4: Update.
1967 * gnulib/import/m4/readdir.m4: Update.
1968 * gnulib/import/m4/readlink.m4: Update.
1969 * gnulib/import/m4/realloc.m4: Update.
1970 * gnulib/import/m4/rename.m4: Update.
1971 * gnulib/import/m4/rewinddir.m4: Update.
1972 * gnulib/import/m4/rmdir.m4: Update.
1973 * gnulib/import/m4/save-cwd.m4: Update.
1974 * gnulib/import/m4/secure_getenv.m4: Update.
1975 * gnulib/import/m4/setenv.m4: Update.
1976 * gnulib/import/m4/signal_h.m4: Update.
1977 * gnulib/import/m4/ssize_t.m4: Update.
1978 * gnulib/import/m4/stat-time.m4: Update.
1979 * gnulib/import/m4/stat.m4: Update.
1980 * gnulib/import/m4/std-gnu11.m4: Update.
1981 * gnulib/import/m4/stdbool.m4: Update.
1982 * gnulib/import/m4/stddef_h.m4: Update.
1983 * gnulib/import/m4/stdint.m4: Update.
1984 * gnulib/import/m4/stdio_h.m4: Update.
1985 * gnulib/import/m4/stdlib_h.m4: Update.
1986 * gnulib/import/m4/strchrnul.m4: Update.
1987 * gnulib/import/m4/strdup.m4: Update.
1988 * gnulib/import/m4/strerror.m4: Update.
1989 * gnulib/import/m4/string_h.m4: Update.
1990 * gnulib/import/m4/strstr.m4: Update.
1991 * gnulib/import/m4/strtok_r.m4: Update.
1992 * gnulib/import/m4/sys_socket_h.m4: Update.
1993 * gnulib/import/m4/sys_stat_h.m4: Update.
1994 * gnulib/import/m4/sys_time_h.m4: Update.
1995 * gnulib/import/m4/sys_types_h.m4: Update.
1996 * gnulib/import/m4/tempname.m4: Update.
1997 * gnulib/import/m4/time_h.m4: Update.
1998 * gnulib/import/m4/unistd-safer.m4: Update.
1999 * gnulib/import/m4/unistd_h.m4: Update.
2000 * gnulib/import/m4/warn-on-use.m4: Update.
2001 * gnulib/import/m4/wchar_h.m4: Update.
2002 * gnulib/import/m4/wchar_t.m4: Update.
2003 * gnulib/import/m4/wctype_h.m4: Update.
2004 * gnulib/import/m4/wint_t.m4: Update.
2005 * gnulib/import/malloc.c: Update.
2006 * gnulib/import/malloc/scratch_buffer.h: Update.
2007 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2008 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2009 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2010 * gnulib/import/malloca.c: Update.
2011 * gnulib/import/malloca.h: Update.
2012 * gnulib/import/malloca.valgrind: Update.
2013 * gnulib/import/math.in.h: Update.
2014 * gnulib/import/mbrtowc.c: Update.
2015 * gnulib/import/mbsinit.c: Update.
2016 * gnulib/import/mbsrtowcs-impl.h: Update.
2017 * gnulib/import/mbsrtowcs-state.c: Update.
2018 * gnulib/import/mbsrtowcs.c: Update.
2019 * gnulib/import/memchr.c: Update.
2020 * gnulib/import/memmem.c: Update.
2021 * gnulib/import/mempcpy.c: Update.
2022 * gnulib/import/memrchr.c: Update.
2023 * gnulib/import/mkdir.c: Update.
2024 * gnulib/import/mkstemp.c: Update.
2025 * gnulib/import/msvc-inval.c: Update.
2026 * gnulib/import/msvc-inval.h: Update.
2027 * gnulib/import/msvc-nothrow.c: Update.
2028 * gnulib/import/msvc-nothrow.h: Update.
2029 * gnulib/import/open.c: Update.
2030 * gnulib/import/openat-die.c: Update.
2031 * gnulib/import/openat-priv.h: Update.
2032 * gnulib/import/openat-proc.c: Update.
2033 * gnulib/import/openat.c: Update.
2034 * gnulib/import/openat.h: Update.
2035 * gnulib/import/opendir.c: Update.
2036 * gnulib/import/pathmax.h: Update.
2037 * gnulib/import/pipe-safer.c: Update.
2038 * gnulib/import/rawmemchr.c: Update.
2039 * gnulib/import/readdir.c: Update.
2040 * gnulib/import/readlink.c: Update.
2041 * gnulib/import/realloc.c: Update.
2042 * gnulib/import/ref-add.sin: Update.
2043 * gnulib/import/ref-del.sin: Update.
2044 * gnulib/import/rename.c: Update.
2045 * gnulib/import/rewinddir.c: Update.
2046 * gnulib/import/rmdir.c: Update.
2047 * gnulib/import/same-inode.h: Update.
2048 * gnulib/import/save-cwd.c: Update.
2049 * gnulib/import/save-cwd.h: Update.
2050 * gnulib/import/scratch_buffer.h: Update.
2051 * gnulib/import/secure_getenv.c: Update.
2052 * gnulib/import/setenv.c: Update.
2053 * gnulib/import/signal.in.h: Update.
2054 * gnulib/import/stat-time.c: Update.
2055 * gnulib/import/stat-time.h: Update.
2056 * gnulib/import/stat-w32.c: Update.
2057 * gnulib/import/stat-w32.h: Update.
2058 * gnulib/import/stat.c: Update.
2059 * gnulib/import/stdbool.in.h: Update.
2060 * gnulib/import/stddef.in.h: Update.
2061 * gnulib/import/stdint.in.h: Update.
2062 * gnulib/import/stdio.in.h: Update.
2063 * gnulib/import/stdlib.in.h: Update.
2064 * gnulib/import/str-two-way.h: Update.
2065 * gnulib/import/strchrnul.c: Update.
2066 * gnulib/import/strdup.c: Update.
2067 * gnulib/import/streq.h: Update.
2068 * gnulib/import/strerror-override.c: Update.
2069 * gnulib/import/strerror-override.h: Update.
2070 * gnulib/import/strerror.c: Update.
2071 * gnulib/import/string.in.h: Update.
2072 * gnulib/import/stripslash.c: Update.
2073 * gnulib/import/strnlen1.c: Update.
2074 * gnulib/import/strnlen1.h: Update.
2075 * gnulib/import/strstr.c: Update.
2076 * gnulib/import/strtok_r.c: Update.
2077 * gnulib/import/sys_stat.in.h: Update.
2078 * gnulib/import/sys_time.in.h: Update.
2079 * gnulib/import/sys_types.in.h: Update.
2080 * gnulib/import/tempname.c: Update.
2081 * gnulib/import/tempname.h: Update.
2082 * gnulib/import/time.in.h: Update.
2083 * gnulib/import/unistd--.h: Update.
2084 * gnulib/import/unistd-safer.h: Update.
2085 * gnulib/import/unistd.in.h: Update.
2086 * gnulib/import/unsetenv.c: Update.
2087 * gnulib/import/verify.h: Update.
2088 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2089 * gnulib/import/wchar.in.h: Update.
2090 * gnulib/import/wctype.in.h: Update.
2091 * gnulib/import/xalloc-oversized.h: Update.
2092 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2093 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2094
2095 2018-08-16 Gary Benson <gbenson@redhat.com>
2096
2097 PR gdb/13000:
2098 * gdb/main.c (captured_main_1): Exit with nonzero status
2099 in batch mode if the last command to be executed failed.
2100 * NEWS: Mention the above.
2101
2102 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2103
2104 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2105 end of warning message.
2106
2107 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2108
2109 PR gdb/22943:
2110 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2111 (aarch64_extract_return_value): Use
2112 aapcs_is_vfp_call_or_return_candidate.
2113 (aarch64_return_in_memory): Likewise.
2114 (aarch64_store_return_value): Likewise.
2115
2116 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2117
2118 * aarch64-tdep.c
2119 (aapcs_is_vfp_call_or_return_candidate): Make static
2120 (pass_in_v_or_stack): Remove function.
2121 (pass_in_v_vfp_candidate): New function.
2122 (aarch64_push_dummy_call): Check for float register candidates.
2123
2124 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2125
2126 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2127 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2128 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2129
2130 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2131
2132 PR build/23399
2133 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2134 (struct ipa_sym_addresses): Rename to...
2135 (struct ipa_sym_addresses_common): ... this.
2136 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2137
2138 2018-08-28 Tom Tromey <tom@tromey.com>
2139
2140 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2141 (token_fifo): Now a std::vector.
2142 (yylex, c_parse): Update.
2143 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2144 (token_fifo): Now a std::vector.
2145 (yylex, d_parse): Update.
2146 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2147 (token_fifo): Now a std::vector.
2148 (yylex, go_parse): Update.
2149
2150 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2151
2152 * parser-defs.h (struct type_stack) <elements>: Change type to
2153 std::vector<union type_stack_elt>.
2154 <depth, size>: Remove.
2155 * parse.c (parse_exp_in_context_1): Adjust.
2156 (type_stack_reserve): Remove.
2157 (check_type_stack_depth): Remove.
2158 (insert_into_type_stack): Adjust to std::vector.
2159 (insert_type): Likewise.
2160 (push_type): Likewise.
2161 (push_type_int): Likewise.
2162 (insert_type_address_space): Likewise.
2163 (pop_type): Likewise.
2164 (pop_type_int): Likewise.
2165 (pop_typelist): Likewise.
2166 (pop_type_stack): Likewise.
2167 (append_type_stack): Likewise.
2168 (push_type_stack): Likewise.
2169 (get_type_stack): Likewise.
2170 (type_stack_cleanup): Likewise.
2171 (push_typelist): Likewise.
2172 (follow_types): Likewise.
2173 (_initialize_parse): Likewise.
2174
2175 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2176
2177 * NEWS: Mention csky target.
2178
2179 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2180 Hafiz Abid Qadeer <abidh@codesourcery.com>
2181 Don Breazeal <donb@codesourcery.com>
2182
2183 * csky-linux-tdep.c: New file.
2184 * csky-tdep.c: Likewise.
2185 * csky-tdep.h: Likewise.
2186 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2187 csky-tdep.o.
2188 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2189 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2190 * configure.tgt: Add csky support.
2191
2192 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2193
2194 * python/py-framefilter.c (py_print_frame): Print frame architecture
2195 when printing on an MI output.
2196
2197 2018-08-27 Tom Tromey <tom@tromey.com>
2198
2199 PR build/23087:
2200 * configure: Rebuild.
2201 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2202
2203 2018-08-27 Tom Tromey <tom@tromey.com>
2204
2205 * aarch64-linux-tdep.c
2206 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2207 casts to int.
2208
2209 2018-08-27 Tom Tromey <tom@tromey.com>
2210
2211 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2212 unsigned.
2213 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2214 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2215 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2216 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2217 unsigned.
2218
2219 2018-08-27 Tom Tromey <tom@tromey.com>
2220
2221 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2222 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2223
2224 2018-08-27 Tom Tromey <tom@tromey.com>
2225
2226 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2227 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2228 ULONGEST_MAX.
2229 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2230 ULONGEST_MAX.
2231 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2232 ULONGEST_MAX.
2233 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2234 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2235 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2236 ULONGEST_MAX.
2237 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2238 (ppc64_linux_sigaction_tramp_frame)
2239 (ppc32_linux_sighandler_tramp_frame)
2240 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2241 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2242 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2243 * mn10300-linux-tdep.c (am33_linux_sigframe)
2244 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2245 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2246 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2247 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2248 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2249 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2250 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2251 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2252 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2253 * microblaze-linux-tdep.c
2254 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2255 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2256 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2257 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2258 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2259 * common/common-types.h (ULONGEST_MAX): New define.
2260 (CORE_ADDR_MAX): Fix formatting.
2261 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2262 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2263 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2264 (arm_linux_rt_sigreturn_tramp_frame)
2265 (arm_eabi_linux_sigreturn_tramp_frame)
2266 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2267 (thumb2_eabi_linux_sigreturn_tramp_frame)
2268 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2269 (arm_linux_restart_syscall_tramp_frame)
2270 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2271 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2272 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2273 ULONGEST_MAX.
2274 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2275
2276 2018-08-27 Tom Tromey <tom@tromey.com>
2277
2278 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2279 CORE_ADDR_MAX.
2280 * mips-tdep.c (mips_deal_with_atomic_sequence)
2281 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2282 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2283 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2284 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2285 CORE_ADDR_MAX.
2286 * aarch64-tdep.c (aarch64_software_single_step): Use
2287 CORE_ADDR_MAX.
2288
2289 2018-08-27 Tom Tromey <tom@tromey.com>
2290
2291 * linespec.c (complete_linespec_component): Add cast to "char".
2292 * completer.c (completion_tracker::build_completion_result): Add
2293 cast to "char".
2294
2295 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2296
2297 * solist.h (struct solist, struct target_so_ops): Fix
2298 indentation.
2299
2300 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2301
2302 * ada-tasks.c (ada_task_info_s): Remove typedef.
2303 (DEF_VEC_O(ada_task_info_s)): Remove.
2304 (struct ada_tasks_inferior_data): Initialize fields.
2305 <task_list>: Make an std::vector.
2306 (get_ada_tasks_inferior_data): Allocate with new.
2307 (ada_get_task_number): Adjust.
2308 (get_task_number_from_id): Likewise.
2309 (valid_task_id): Likewise.
2310 (ada_get_task_info_from_ptid): Likewise.
2311 (iterate_over_live_ada_tasks): Likewise.
2312 (add_ada_task): Likewise.
2313 (read_known_tasks): Likewise.
2314 (ada_build_task_list): Likewise.
2315 (print_ada_task_info): Likewise.
2316 (info_task): Likewise.
2317 (task_command_1): Likewise.
2318
2319 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2320
2321 * ada-lang.c (add_angle_brackets): Return std::string.
2322
2323 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2324
2325 * python/py-threadevent.c (py_get_event_thread): Initialize
2326 pythread.
2327
2328 2018-08-24 Pedro Alves <palves@redhat.com>
2329
2330 * python/py-bpevent.c (create_breakpoint_event_object): Use
2331 copy-initialization.
2332 * python/py-continueevent.c (emit_continue_event): Use
2333 copy-initialization.
2334 * python/py-exitedevent.c (create_exited_event_object): Return a
2335 gdbpy_ref<>.
2336 (emit_exited_event): Use copy-initialization.
2337 * python/py-inferior.c (python_new_inferior)
2338 (python_inferior_deleted, add_thread_object): Use
2339 copy-initialization.
2340 * python/py-infevents.c (create_inferior_call_event_object)
2341 (create_register_changed_event_object)
2342 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2343 (emit_inferior_call_event, emit_memory_changed_event)
2344 (emit_register_changed_event): Use copy-initialization.
2345 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2346 Return a gdbpy_ref<>.
2347 (emit_new_objfile_event): Use copy-initialization.
2348 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2349 (emit_clear_objfiles_event): Use copy-initialization.
2350 * python/py-signalevent.c (create_signal_event_object): Use
2351 copy-initialization.
2352 * python/py-threadevent.c (create_thread_event_object): Use
2353 copy-initialization.
2354
2355 2018-08-24 Pedro Alves <palves@redhat.com>
2356 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 PR gdb/23379
2359 * python/py-continueevent.c: Include "gdbthread.h".
2360 (create_continue_event_object): Add intro comment. Add 'ptid'
2361 parameter. Use it to find thread to pass to
2362 create_thread_event_object.
2363 (emit_continue_event): Pass PTID down to
2364 create_continue_event_object.
2365 * python/py-event.h (py_get_event_thread): Declare.
2366 (create_thread_event_object): Remove default from 'thread'
2367 parameter.
2368 * python/py-stopevent.c (create_stop_event_object): Use
2369 py_get_event_thread.
2370 * python/py-threadevent.c (get_event_thread): Rename to ...
2371 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2372 and use it to find the thread.
2373 (create_thread_event_object): Assert that THREAD isn't null.
2374 Don't find the event thread here.
2375
2376 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2377
2378 * block.h (blockrange, blockranges): New struct declarations.
2379 (struct block): Add new field named `ranges'.
2380 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2381 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2382 macros for accessing ranges in struct block.
2383 (make_blockranges): New declaration.
2384 block.c (make_blockranges): New function.
2385 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2386 for block.
2387 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2388 * blockframe.c (cache_pc_function_block): New static global.
2389 (clear_pc_function_cache): Clear cache_pc_function_block.
2390 (find_pc_partial_function): Move comment to symtab.h. Add
2391 support for non-contiguous blocks.
2392 * cli/cli-cmds.c (block.h): Include.
2393 (print_disassembly): Handle printing of non-contiguous blocks.
2394 (disassemble_current_function): Likewise.
2395 (disassemble_command): Likewise.
2396
2397 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2398 BLOCK_START.
2399 * blockframe.c (get_pc_function_start): Likewise.
2400 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2401 (gcc_symbol_address): Likewise.
2402 * compile/compile-object-run.c (compile_object_run): Likewise.
2403 * compile/compile.c (get_expr_block_and_pc): Likewise.
2404 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2405 (func_addr_to_tail_call_list): Likewise.
2406 * findvar.c (default_read_var_value): Likewise.
2407 * inline-frame.c (inline_frame_this_id): Likewise.
2408 (skip-inline_frames): Likewise.
2409 * infcmd.c (until_next_command): Likewise.
2410 * linespec.c (convert_linespec_to_sals): Likewise.
2411 * parse.c (parse_exp_in_context_1): Likewise.
2412 * printcmd.c (build_address_symbolic): likewise.
2413 (info_address_command): Likewise.
2414 symtab.c (find_function_start_sal): Likewise.
2415 (skip_prologue_sal): Likewise.
2416 (find_function_alias_target): Likewise.
2417 (find_gnu_ifunc): Likewise.
2418 * stack.c (find_frame_funname): Likewise.
2419 * symtab.c (fixup_symbol_section): Likewise.
2420 (find_function_start_sal): Likewise.
2421 (skip_prologue_sal): Likewsie.
2422 (find_function_alias_target): Likewise.
2423 (find_gnu_ifunc): Likewise.
2424 * tracepoint.c (info_scope_command): Likewise.
2425 * value.c (value_fn_field): Likewise.
2426
2427 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2428 in place of find_pc_partial_function.
2429 * blockframe.c (find_function_entry_range_from_pc): New function.
2430 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2431 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2432 for each range in a block.
2433
2434
2435 2018-08-23 Xavier Roirand <roirand@adacore.com>
2436
2437 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2438 incrementation.
2439
2440 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2441
2442 * solib-svr4.c (read_program_headers_from_bfd): Return
2443 gdb::optional<gdb::byte_vector>.
2444 (svr4_exec_displacement): Adjust.
2445
2446 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2447
2448 * solib-svr4.c (read_program_header): Return
2449 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2450 (find_program_interpreter): Return
2451 gdb::optional<gdb::byte_vector>.
2452 (scan_dyntag_auxv): Adjust.
2453 (enable_break): Adjust.
2454 (svr4_exec_displacement): Adjust.
2455
2456 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2457
2458 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2459 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2460
2461 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2462
2463 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2464 string_vprintf.
2465 * guile/scm-utils.c (gdbscm_printf): Likewise.
2466 * serial.c (serial_printf): Likewise.
2467 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2468
2469 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2470
2471 * stack.c (print_frame): Print frame architecture when printing on
2472 an MI output.
2473 * NEWS: Mention new "arch" attribute in frame output.
2474
2475 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2476
2477 * arch/aarch64.h (aarch64_regnum): Update comment.
2478
2479 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2480
2481 * NEWS: Add SVE to 8.2 section.
2482
2483 2018-08-21 Pedro Alves <palves@redhat.com>
2484
2485 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2486 out from gdbscm_parse_function_args.
2487 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2488 gdbscm_parse_function_args_1.
2489
2490 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 PR gdb/17816
2493 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2494 operator.
2495
2496 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2497
2498 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2499
2500 2018-08-19 Michael Spang <spang@google.com>
2501
2502 PR gdb/11786
2503 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2504 for PT_TLS segments.
2505
2506 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2507
2508 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2509 dwarf_variable_value.
2510 * dwarf2-frame.c (class dwarf_expr_executor):
2511 Add override for dwarf_variable_value.
2512 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2513 (class symbol_needs_eval_context): Likewise.
2514 (indirect_synthetic_pointer): Add forward declaration.
2515 (sect_variable_value): New function.
2516 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2517 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2518 for DW_OP_GNU_variable_value.
2519
2520 2018-08-16 Tom Tromey <tom@tromey.com>
2521
2522 * top.c (read_command_file): Update.
2523 (command_line_input): Remove "repeat" argument.
2524 * ada-lang.c (get_selections): Update.
2525 * linespec.c (decode_line_2): Update.
2526 * defs.h (command_line_input): Remove argument.
2527 * cli/cli-script.c (read_next_line): Update.
2528 * python/py-gdb-readline.c: Update.
2529
2530 2018-08-17 Tom Tromey <tom@tromey.com>
2531
2532 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2533 command_line_input.
2534
2535 2018-08-15 Tom Tromey <tom@tromey.com>
2536
2537 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2538
2539 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2540
2541 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2542 If used, use find_pc_partial_function to find address range
2543 to disassemble.
2544 * mi/mi-main.c (mi_cmd_list_features): Report
2545 "data-disassemble-a-option" feature.
2546 * NEWS: Mention new -data-disassemble option -a.
2547
2548 2018-08-13 Tom Tromey <tom@tromey.com>
2549
2550 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2551
2552 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2553
2554 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2555 (aarch64_linux_collect_sve_regset): Likewise.
2556 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2557 * regcache.h (regcache_map_entry_size): New function.
2558
2559 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2560
2561 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2562 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2563 (SVE_HEADER_VL_LENGTH): Likewise.
2564 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2565 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2566 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2567 (SVE_HEADER_SIZE_OFFSET): Likewise.
2568 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2569 (SVE_HEADER_VL_OFFSET): Likewise.
2570 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2571 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2572 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2573 (SVE_HEADER_SIZE): Likewise.
2574 (aarch64_linux_core_read_vq): Add function.
2575 (aarch64_linux_core_read_description): Check for SVE section.
2576
2577 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2578
2579 * aarch64-fbsd-tdep.c
2580 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2581 collect_size.
2582 * aarch64-linux-tdep.c
2583 (aarch64_linux_iterate_over_regset_sections): Likewise.
2584 * alpha-linux-tdep.c
2585 (alpha_linux_iterate_over_regset_sections):
2586 * alpha-nbsd-tdep.c
2587 (alphanbsd_iterate_over_regset_sections): Likewise.
2588 * amd64-fbsd-tdep.c
2589 (amd64fbsd_iterate_over_regset_sections): Likewise.
2590 * amd64-linux-tdep.c
2591 (amd64_linux_iterate_over_regset_sections): Likewise.
2592 * arm-bsd-tdep.c
2593 (armbsd_iterate_over_regset_sections): Likewise.
2594 * arm-fbsd-tdep.c
2595 (arm_fbsd_iterate_over_regset_sections): Likewise.
2596 * arm-linux-tdep.c
2597 (arm_linux_iterate_over_regset_sections): Likewise.
2598 * corelow.c (get_core_registers_cb): Likewise.
2599 (core_target::fetch_registers): Likewise.
2600 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2601 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2602 * gdbarch.h (void): Regenerate.
2603 * gdbarch.sh: Add supply_size and collect_size.
2604 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2605 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2606 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2607 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2608 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2609 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2610 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2611 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2612 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2613 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2614 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2615 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2616 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2617 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2618 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2619 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2620 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2621 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2622 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2623 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2624 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2625 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2626 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2627 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2628 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2629 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2630 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2631 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2632 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2633 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2634
2635 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2638 with string_printf.
2639
2640 2018-08-10 Keith Seitz <keiths@redhat.com>
2641
2642 * compile/compile-c-support.c (add_code_header, add_code_footer):
2643 Move into policy class.
2644 (c_push_user_expression, pop_user_expression_nop)
2645 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2646 (compile_program): New host class.
2647 (c_compile_program): New typedef.
2648 (c_compute_porgram): Use c_compile_program.
2649
2650 2018-08-10 Keith Seitz <keiths@redhat.com>
2651
2652 * compile/compile-internal.h (compile_instance::~compile_instance):
2653 Remove calls to htab_delete.
2654 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2655 * compile.c (compile_instance::compile_instance): Initialize
2656 htab unique pointers.
2657 (compile_instance::get_cached_type, compile_instance::insert_type)
2658 (compile_instance::error_symbol_once): Update for unique_ptr.
2659
2660 2018-08-10 Keith Seitz <keiths@redhat.com>
2661
2662 * compile/compile-c-symbols.c (struct symbol_error)
2663 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2664 (compile_instance::insert_symbol_error)
2665 (compile_instance::error_symbol_once): Move to ...
2666 * compile/compile.c: ... here.
2667
2668 2018-08-10 Keith Seitz <keiths@redhat.com>
2669
2670 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2671 instead of `new_compile_instance'.
2672 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2673 Update description.
2674 If the symbol error map is not initialized, create it.
2675 (generate_c_for_for_one_symbol): Do not check/initialize
2676 the symbol error map.
2677 * compile/compile-c-types.c (compile_c_instance): Make a class.
2678 Update all callers.
2679 (compile_instance::compile_instance): Initialize the type cache.
2680 (get_cached_type): New function.
2681 (insert_type): Update description.
2682 (compile_c_instance::m_default_cflags): Define.
2683 (convert_type): Update description. Use get_cached_type.
2684 (delete_instance): Moved to destructor.
2685 (new_compile_instance): Moved to constructor.
2686 * compile/compile-c.h (compile_c_instance): Make class inheriting
2687 from compile_instance.
2688 <base>: Remove field.
2689 <type_map, symbol_err_map>: Move to base class.
2690 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2691 * compile/compile-internal.h (compile_instance): Make class.
2692 <type_map_t, symbol_err_map_t>: Define.
2693 <fe>: Rename to `m_gcc_fe'.
2694 <scope, block, gcc_target_options>: Add `m_' prefix.
2695 <m_type_map, m_symbol_err_map>: New fields, moved from
2696 compile_c_instance.
2697 <destroy>: Remove.
2698 (convert_type, new_compile_instance): Remove.
2699 * compile/compile.c (cleanup_compile_instance): Remove.
2700 (compile_to_object): Use unique_ptr to eliminate cleanups.
2701 (compile_instance::set_print_callback, compile_instance::version)
2702 (compile_instance::set_verbose)
2703 (compile_instance::set_driver_filename)
2704 (compile_instance::set_triplet_regexp)
2705 (compile_instance::set_arguments)
2706 (compile_instance::set_source_file)
2707 (compile_instance::compile): Define.
2708
2709 2018-08-10 Keith Seitz <keiths@redhat.com>
2710
2711 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2712 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2713 gcc-c-fe.def to define C plugin.
2714 (delete_instance): Delete `c_plugin'.
2715 (new_compile_instance): Initialize `c_plugin'.
2716 * compile/compile-c.h: Include gcc_c_plugin.h.
2717 (struct compile_c_instance) <c_plugin>: New member.
2718 * gcc-c-plugin.h: New file.
2719 Update all callers with API change.
2720
2721 2018-08-10 Keith Seitz <keiths@redhat.com>
2722
2723 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2724 (HFILES_NO_SRCDIR): ... to here.
2725 Add compile-internal.h and compile-c.h.
2726 * compile/compile-c-support.c: Include compile-c.h.
2727 * compile/compile-c-symbols.c: Include compile-c.h.
2728 (generate_c_for_variable_locations): Update comment.
2729 * compile/compile-c-types.c: Include compile-c.h.
2730 * compile/compile-c.h: New file -- moved C language declarations
2731 from other files here.
2732 * compile/compile-internal.h: Do not include hashtab.h or
2733 common/enum-flags.h.
2734 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2735 (gcc_convert_symbol, gcc_symbol_address)
2736 (generate_c_for_variable_locations, c_get_mode_for_size)
2737 (c_get_range_decl_name): Definitions moved to compile-c.h.
2738 * compile/compile-loc2c.c: Include compile-c.h.
2739
2740 2018-08-10 Keith Seitz <keiths@redhat.com>
2741
2742 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2743 (c_symbol_substitution_name): ... this.
2744 Update all callers.
2745
2746 2018-08-10 Keith Seitz <keiths@redhat.com>
2747
2748 * compile/compile-c-support.c (c_compute_program): Use
2749 unique_xmalloc_ptr to eliminate cleanup.
2750 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2751 Return a unique_xmalloc_ptr and eliminate cleanup.
2752 * compile/compile-internal.h (generate_c_for_variable_locations):
2753 Return unique_xmalloc_ptr and update description.
2754
2755 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2756
2757 * corelow.c (core_target::get_core_register_section): Rename
2758 min_size to section_min_size.
2759
2760 2018-08-09 Jim Wilson <jimw@sifive.com>
2761
2762 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2763 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2764 * NEWS: Mention new GNU/Linux RISC-V target.
2765 * configure.host: Add riscv*-*-linux*.
2766 * configure.nat: Add riscv*.
2767 * configure.tgt: Add riscv*-*-linux*.
2768 * riscv-linux-nat.c: New file.
2769 * riscv-linux-tdep.c: New file.
2770
2771 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2772
2773 * infrun.c (resume): Make static, add forward declaration.
2774 (proceed): Update header comment.
2775 * infrun.h (resume): Delete declaration.
2776
2777 2018-08-09 Tom Tromey <tom@tromey.com>
2778
2779 * riscv-tdep.h: Minor formatting fixes.
2780
2781 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2782
2783 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2784 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2785 (test_mkdir_recursive): Likewise.
2786 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2787
2788 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2789
2790 * valarith.c (value_subscripted_rvalue): If an array is not in
2791 memory, and we don't know the upper bound, then we can't know that
2792 the requested element exists or not.
2793
2794 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2795
2796 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2797 (target_options_to_string): Add comment.
2798
2799 2018-08-08 Tom Tromey <tom@tromey.com>
2800
2801 * unittests/scoped_mmap-selftests.c: Check result of "write".
2802
2803 2018-08-08 Jim Wilson <jimw@sifive.com>
2804
2805 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2806 (decode_register_index_short): New.
2807 (decode_j_type_insn, decode_cj_type_insn): New.
2808 (decode_b_type_insn, decode_cb_type_insn): New.
2809 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2810 local xlen. Check xlen when decoding ambiguous compressed insns. In
2811 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2812 is_c_sw_insn instead of is_sw_insn.
2813 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2814 (riscv_software_single_step): New.
2815 * riscv-tdep.h (riscv_software_single_step): Declare.
2816
2817 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2818 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2819
2820 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2821
2822 PR gdb/18050:
2823 * target.c (dispose_inferior): Don't dispose of inferiors that are
2824 already killed.
2825
2826 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2827
2828 * remote.c (remote_target::download_tracepoint): Change char* to
2829 const char*.
2830
2831 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2832
2833 * target.h (target_options_to_string): Return an std::string.
2834 * target.c (str_comma_list_concat_elem): Return void, use
2835 std::string.
2836 (do_option): Likewise.
2837 (target_options_to_string): Return an std::string.
2838 * linux-nat.c (linux_nat_target::wait): Adjust.
2839 * target-debug.h (target_debug_print_options): Adjust.
2840
2841 2018-08-07 Tom Tromey <tom@tromey.com>
2842
2843 * Makefile.in (CPPFLAGS): New variable.
2844 (INTERNAL_CPPFLAGS): Use it.
2845
2846 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2847
2848 * NEWS: Mention the index cache.
2849
2850 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2851
2852 * common/pathstuff.h (get_standard_cache_dir): New.
2853 * common/pathstuff.c (get_standard_cache_dir): New.
2854 * build-id.h (build_id_to_string): New.
2855 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2856 DEBUG_STR_SUFFIX): Move to here.
2857 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2858 DEBUG_STR_SUFFIX): Move from there.
2859 (write_psymtabs_to_index): Make non-static, add basename
2860 parameter. Write to temporary files, rename when done.
2861 (save_gdb_index_command): Adjust call to
2862 write_psymtabs_to_index.
2863 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2864 field.
2865 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2866 (get_gdb_index_contents_from_cache): New.
2867 (get_gdb_index_contents_from_cache_dwz): New.
2868 (dwarf2_initialize_objfile): Read index from cache.
2869 (dwarf2_build_psymtabs): Save to index.
2870 * dwarf-index-cache.h: New file.
2871 * dwarf-index-cache.c: New file.
2872 * dwarf-index-write.h: New file.
2873
2874 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2875
2876 * gnulib/aclocal.m4: Re-generate.
2877 * gnulib/config.in: Re-generate.
2878 * gnulib/configure: Re-generate.
2879 * gnulib/import/Makefile.am: Re-generate.
2880 * gnulib/import/Makefile.in: Re-generate.
2881 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2882 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2883 * gnulib/import/m4/mkdir.m4: New file.
2884 * gnulib/import/mkdir.c: New file.
2885 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2886 module.
2887
2888 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2889
2890 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2891 * common/scoped_mmap.c: New file.
2892 * common/scoped_mmap.h (destroy): New method.
2893 (~scoped_mmap, reset): Use destroy.
2894 (scoped_mmap): New move constructor.
2895 (mmap_file): New declaration.
2896 * unittests/scoped_mmap-selftests.c (test_normal,
2897 test_invalid_filename, run_tests): New functions.
2898 (_initialize_scoped_mmap_selftests): Register selftest.
2899
2900 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2901
2902 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2903 (read_gdb_index_from_buffer): ... this. Remove section
2904 parameter, add buffer parameter.
2905 (get_gdb_index_contents_ftype,
2906 get_gdb_index_contents_dwz_ftype): New typedefs.
2907 (dwarf2_read_gdb_index): Add callback parameters to get the
2908 index contents.
2909 (get_gdb_index_contents_from_section): New.
2910 (dwarf2_initialize_objfile): Update call to
2911 dwarf2_read_gdb_index.
2912
2913 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2914
2915 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2916 (gdb_open_cloexec): Likewise.
2917 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2918 (commandline_from_pid): Likewise.
2919 (linux_xfer_osdata_threads): Likewise.
2920 (linux_xfer_osdata_fds): Likewise.
2921 * ada-lang.c (is_package_name): Likewise.
2922 * auxv.c (procfs_xfer_auxv): Likewise.
2923 * breakpoint.c (print_one_breakpoint_location): Use
2924 uiout::field_fmt.
2925 (print_one_catch_solib): Use string_printf.
2926 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2927 (add_pe_forwarded_sym): Likewise.
2928 * dwarf2read.c (create_type_unit_group): Likewise.
2929 (build_error_marker_type): Likewise.
2930 * infcall.c (get_function_name): Likewise.
2931 * valprint.c (print_converted_chars_to_obstack): Likewise.
2932 * xtensa-tdep.c (xtensa_register_type): Likewise.
2933
2934 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2935
2936 * remote.c (remote_target::download_tracepoint): Fix format
2937 string errors.
2938
2939 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2940
2941 * tracefile.c: Include common/byte-vector.h.
2942 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2943 with trace_regblock_size if needed. Update uses of buf.
2944
2945 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2946
2947 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2948 std::vector<unsigned char>.
2949 * tracepoint.c (collection_list::collection_list): Remove
2950 m_regs_mask initializer from initializer list. Resize
2951 m_regs_mask using the largest remote register number.
2952 (collection_list::add_remote_register): Remove size check on
2953 m_regs_mask. Use at to access element.
2954 (collection_list::stringify): Change type of temp_buf to
2955 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2956 stringify the register mask. Use pack_hex_byte for the register
2957 mask.
2958
2959 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2960
2961 * tracepoint.h (class collection_list) <add_register>: Remove.
2962 <add_remote_register, add_ax_registers, add_local_register>:
2963 Declare.
2964 <add_memrange>: Add scope parameter.
2965 * tracepoint.c (encode_actions_1): Likewise.
2966 (collection_list::add_register): Rename to ...
2967 (collection_list::add_remote_register): ... this. Update
2968 comment.
2969 (collection_list::add_ax_registers, add_local_register): New
2970 methods.
2971 (collection_list::add_memrange): Add scope parameter. Call
2972 add_local_register instead of add_register.
2973 (finalize_tracepoint_aexpr): New function.
2974 (collection_list::collect_symbol): Update calls to add_memrange.
2975 Call add_local_register instead of add_register. Call
2976 add_ax_registers. Call finalize_tracepoint_aexpr.
2977 (encode_actions_1): Get remote regnos for $reg action. Call
2978 add_remote_register, add_ax_registers, and add_local_register.
2979 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2980 (validate_actionline): Call finalize_tracepoint_aexpr.
2981
2982 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2983
2984 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2985 Replace array buf with gdb::char_vector buf, of size
2986 get_remote_packet_size (). Replace references to buf and
2987 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2988 and xsnprintf with snprintf. Raise errors if the buffer is too
2989 small.
2990
2991 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2992
2993 * remote.c (remote_target::download_tracepoint): Fix the has_more
2994 predicate in the QTDP action list iteration.
2995
2996 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2997
2998 * remote.c (remote_target::download_tracepoint): Fix indentation
2999 in for block.
3000
3001 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3002
3003 * proc-api.c (_initialize_proc_api): Remove c, unused.
3004 * procfs.c (procfs_init_inferior): Remove signals, unused.
3005 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3006 unused.
3007
3008 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3009 Andrew Burgess <andrew.burgess@embecosm.com>
3010
3011 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3012 'W_STOPCODE (0)' as this could be ambiguous.
3013
3014 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3015
3016 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3017 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3018 "ai_socktype").
3019
3020 2018-08-02 Tom Tromey <tom@tromey.com>
3021
3022 PR symtab/16842.
3023 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3024 symbols.
3025 (process_structure_scope): Likewise.
3026
3027 2018-08-02 Xavier Roirand <roirand@adacore.com>
3028
3029 PR gdb/22629:
3030 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3031 kill inferior.
3032
3033 2018-08-02 Tom Tromey <tom@tromey.com>
3034
3035 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3036 (darwin_suspend_inferior, darwin_resume_inferior)
3037 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3038 (darwin_check_new_threads): Check result of get_darwin_inferior.
3039
3040 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3041
3042 GDB 8.1.1 released.
3043
3044 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3045
3046 * varobj.c (varobj_get_path_expr_parent): Report an error if
3047 parent is a dynamic varobj.
3048
3049 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3050
3051 * gnulib/aclocal.m4: Re-generate.
3052 * gnulib/config.in: Re-generate.
3053 * gnulib/configure: Re-generate.
3054 * gnulib/import/Makefile.in: Re-generate.
3055 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3056 * gnulib/import/m4/onceonly.m4: Re-generate.
3057
3058 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * target-descriptions.c (struct xml_test_tdesc): New.
3061 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3062 (record_xml_tdesc): Update.
3063 (maintenance_check_xml_descriptions): Update.
3064 * target-descriptions.h (record_xml_tdesc): Update comment.
3065
3066 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3067
3068 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3069 checking array bounds are defined.
3070
3071 2018-07-30 Tom Tromey <tom@tromey.com>
3072
3073 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3074 irreflexivity violation.
3075
3076 2018-07-30 Tom Tromey <tom@tromey.com>
3077
3078 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3079 * value.c (unpack_long): Remove lint code.
3080 * valops.c (value_ind): Remove lint code.
3081 * valarith.c (value_x_binop, value_x_unop, value_equal)
3082 (value_pos): Remove lint code.
3083
3084 2018-07-28 Tom de Vries <tdevries@suse.de>
3085
3086 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3087 with undefined upper bound as <optimized out>.
3088
3089 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3090
3091 * gcore.in: Rename variable "name" to "prefix". Expand
3092 "usage" text.
3093
3094 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3095
3096 * windows-nat.c (windows_nat_target::create_inferior): Update to
3097 call close() in global namespace.
3098
3099 2018-07-26 Tom Tromey <tom@tromey.com>
3100
3101 * dwarf-index-write.c (add_address_entry): Don't add objfile
3102 offsets.
3103 * dbxread.c (find_stab_function): Rename from
3104 find_stab_function_addr. Return a bound_minimal_symbol.
3105 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3106 Don't add objfile offsets.
3107 (end_psymtab): Use raw_text_low, raw_text_high,
3108 MSYMBOL_VALUE_RAW_ADDRESS.
3109 (read_ofile_symtab): Update.
3110 (process_one_symbol): Update.
3111 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3112 offsets.
3113 (dw2_relocate): Remove.
3114 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3115 searching addrmap.
3116 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3117 Update.
3118 (process_psymtab_comp_unit_reader, add_partial_symbol)
3119 (add_partial_subprogram, dwarf2_ranges_read): Update.
3120 (load_partial_dies): Update.
3121 (add_address_entry): Don't add objfile offsets.
3122 (dwarf2_build_include_psymtabs): Update.
3123 (create_addrmap_from_aranges): Don't add objfile offsets.
3124 (dw2_find_pc_sect_compunit_symtab): Update.
3125 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3126 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3127 Update.
3128 (parse_partial_symbols): Don't add objfile offsets. Use
3129 raw_text_low, raw_text_high. Update.
3130 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3131 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3132 or call 'relocate' quick function. Clear psymbol_map.
3133 * psympriv.h (struct partial_symbol) <address>: Add section
3134 offset.
3135 <set_unrelocated_address>: Rename from set_address.
3136 <raw_text_low, raw_text_high>: New methods.
3137 <text_low, text_high>: Add objfile parameter.
3138 (add_psymbol_to_bcache): Add 'section' parameter. Call
3139 set_unrelocated_address.
3140 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3141 (find_pc_psymbol): Update.
3142 (fixup_psymbol_section, relocate_psymtabs): Remove.
3143 (dump_psymtab, psym_functions): Update.
3144 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3145 parameter.
3146 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3147 (start_psymtab_common): Update.
3148 * symfile-debug.c (debug_qf_relocate): Remove.
3149 (debug_sym_quick_functions): Update.
3150 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3151 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3152 Update.
3153
3154 2018-07-26 Tom Tromey <tromey@redhat.com>
3155
3156 * dbxread.c (end_psymtab): Use text_high_valid and
3157 text_low_valid.
3158 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3159 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3160 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3161 Update comment.
3162 <text_low_valid, text_high_valid>: New fields.
3163 <set_text_low, set_text_high>: Update.
3164 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3165
3166 2018-07-26 Tom Tromey <tom@tromey.com>
3167
3168 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3169 Update.
3170 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3171 textlow and texthigh fields.
3172 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3173 Update.
3174 * mdebugread.c (parse_lines, parse_partial_symbols)
3175 (psymtab_to_symtab_1): Update.
3176 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3177 Rename fields. Update comment. Now private.
3178 <text_low, text_high, set_text_low, set_text_high>: New methods.
3179 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3180 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3181 (start_psymtab_common, maintenance_info_psymtabs)
3182 (maintenance_check_psymtabs): Update.
3183 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3184 texthigh fields.
3185 (scan_xcoff_symtab): Update.
3186
3187 2018-07-26 Tom Tromey <tromey@redhat.com>
3188
3189 * psympriv.h (struct partial_symbol) <unrelocated_address,
3190 address, set_address>: New methods.
3191 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3192 (fixup_psymbol_section, relocate_psymtabs): Update.
3193 (print_partial_symbols): Add 'objfile' parameter. Update.
3194 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3195 Update.
3196
3197 2018-07-26 Tom Tromey <tom@tromey.com>
3198
3199 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3200 (debug_names::write_psymbols): Update.
3201 * psympriv.h (struct partial_symbol): Derive from
3202 general_symbol_info.
3203 <obj_section>: New method.
3204 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3205 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3206 (find_pc_sect_psymbol, fixup_psymbol_section)
3207 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3208 (print_partial_symbols, recursively_search_psymtabs)
3209 (compare_psymbols, psymbol_hash, psymbol_compare)
3210 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3211 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3212
3213 2018-07-26 Tom Tromey <tromey@redhat.com>
3214
3215 * dbxread.c (end_psymtab): Remove dead code.
3216
3217 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3218
3219 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3220 DWARF unwinders are disabled.
3221 * dwarf2-frame.c: Add dwarf2read.h include.
3222 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3223 disabled.
3224 (dwarf2_frame_unwinders_enabled_p): Define.
3225 (show_dwarf_unwinders_enabled_p): New function.
3226 (_initialize_dwarf2_frame): Register switch to control DWARF
3227 unwinder use.
3228 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3229 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3230 (show_dwarf_cmdlist): Remove static keyword.
3231 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3232 (show_dwarf_cmdlist): Declare.
3233 * NEWS: Document new feature.
3234
3235 2018-07-26 Tom de Vries <tdevries@suse.de>
3236
3237 PR breakpoints/23366
3238 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3239
3240 2018-07-26 Tom de Vries <tdevries@suse.de>
3241
3242 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3243 DW_AT_count can't be translated to a dynamic prop.
3244
3245 2018-07-25 Tom de Vries <tdevries@suse.de>
3246
3247 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3248 try/catch.
3249
3250 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3251
3252 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3253
3254 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3255
3256 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3257
3258 2018-07-24 Keith Seitz <keiths@redhat.comt
3259
3260 PR symtab/23010
3261 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3262 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3263 instead of add_symbol_to_list.
3264 (read_file_scope): Call prepare_one_comp_unit before reading
3265 any other DIEs.
3266
3267 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3270
3271 2018-07-24 Tom Tromey <tom@tromey.com>
3272
3273 * utils.c (malloc, realloc, free): Don't declare.
3274 * configure, config.in: Rebuild.
3275 * configure.ac: Don't check for declarations of free, malloc, or
3276 realloc.
3277
3278 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * aarch64-linux-nat.c
3281 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3282 variable.
3283 * arm-linux-nat.c (fetch_regs): Likewise.
3284 (store_regs): Likewise.
3285 (fetch_vfp_regs): Likewise.
3286 (store_vfp_regs): Likewise.
3287 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3288 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3289 (arm_linux_nat_target::insert_watchpoint): Likewise.
3290 (arm_linux_nat_target::remove_watchpoint): Likewise.
3291 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3292 Likewise.
3293 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3294 Likewise.
3295 * ppc-linux-nat.c (fetch_register): Likewise.
3296 (fetch_all_gp_regs): Likewise.
3297 (fetch_ppc_registers): Likewise.
3298 (store_all_gp_regs): Likewise.
3299 (store_ppc_registers): Likewise.
3300 (hwdebug_insert_point): Likewise.
3301 (can_use_watchpoint_cond_accel): Likewise.
3302 * remote-sim.c (gdb_os_write_stdout): Likewise.
3303
3304 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3305 Tom Tromey <tom@tromey.com>
3306
3307 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3308 test for it.
3309 * configure: Rebuild.
3310
3311 2018-07-22 Tom Tromey <tom@tromey.com>
3312
3313 * regformats/regdat.sh: Define xmltarget_${name} inside
3314 #ifndef IN_PROCESS_AGENT.
3315
3316 2018-07-22 Tom Tromey <tom@tromey.com>
3317
3318 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3319
3320 2018-07-22 Tom Tromey <tom@tromey.com>
3321
3322 * symfile.c (reread_symbols): Notify iter, not objfile.
3323
3324 2018-07-22 Tom Tromey <tom@tromey.com>
3325
3326 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3327 Use arch_ops.
3328 (ravenscar_thread_target::prepare_to_store): Likewise.
3329
3330 2018-07-22 Tom Tromey <tom@tromey.com>
3331
3332 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3333 unused variable. Call value_fetch_lazy when needed.
3334 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3335 Remove unused variable. Call value_fetch_lazy when needed.
3336
3337 2018-07-22 Tom Tromey <tom@tromey.com>
3338
3339 * m32c-tdep.c (mark_dma): Return void.
3340 (make_regs): Remove unused declarations.
3341
3342 2018-07-22 Tom Tromey <tom@tromey.com>
3343
3344 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3345 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3346 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3347 bkscm_get_valid_block_smob_arg_unsafe for effect.
3348
3349 2018-07-22 Tom Tromey <tom@tromey.com>
3350
3351 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3352 value_type.
3353
3354 2018-07-22 Tom Tromey <tom@tromey.com>
3355
3356 * windows-nat.c (saved_context): Conditionally define.
3357 * remote.c (remote_target::remote_btrace_maybe_reopen):
3358 Conditionally declare "warned".
3359 * inflow.c (sigquit_ours): Conditionally define.
3360 (new_tty): Move "tty" declaration inside #if.
3361 * guile/guile.c (guile_datadir): Conditionally define.
3362 * charset.c (set_be_le_names): Move some declarations inside #if.
3363 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3364 #if.
3365 (parse_xml_btrace_conf): Likewise.
3366
3367 2018-07-22 Tom Tromey <tom@tromey.com>
3368
3369 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3370
3371 2018-07-22 Tom Tromey <tom@tromey.com>
3372
3373 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3374 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3375 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3376 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3377 * stack.c (frame_apply_level_command): Remove unused variable.
3378 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3379 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3380 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3381 unused variable.
3382 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3383 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3384 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3385 variable.
3386 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3387 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3388 variable.
3389 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3390 Remove unused variable.
3391 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3392 variable.
3393 * common/tdesc.c (print_xml_feature::visit): Remove unused
3394 variable.
3395 * compile/compile-object-load.c (store_regs): Remove unused
3396 variables.
3397 * complaints.c (clear_complaints): Remove unused variable.
3398 * corelow.c (core_target_open): Remove unused variable.
3399 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3400 variable.
3401 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3402 variable.
3403 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3404 variable.
3405 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3406 variable.
3407 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3408 variable.
3409 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3410 variable.
3411 * ia64-tdep.c (examine_prologue): Remove unused variable.
3412 * infcall.c (run_inferior_call): Remove unused variable.
3413 * inferior.c (exit_inferior): Remove unused variable.
3414 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3415 * linespec.c (decode_line_2): Remove unused variable.
3416 * linux-nat.c (super_close): Remove.
3417 * linux-tdep.c (linux_info_proc): Remove unused variable.
3418 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3419 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3420 Remove unused variable.
3421 * parse.c (find_minsym_type_and_address): Remove unused variable.
3422 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3423 variable.
3424 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3425 variable.
3426 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3427 variables.
3428 * record-btrace.c (record_btrace_target::store_registers): Remove
3429 unused variable.
3430 (cmd_show_record_btrace_cpu): Remove unused variable.
3431 * riscv-tdep.c (riscv_register_reggroup_p)
3432 (riscv_push_dummy_call, riscv_return_value): Remove unused
3433 variable.
3434 * rust-exp.y (literal): Remove unused variable.
3435 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3436 unused variable.
3437 <STRUCTOP_ANONYMOUS>: Likewise.
3438 * s390-linux-tdep.c (s390_linux_init_abi_31)
3439 (s390_linux_init_abi_64): Remove unused variable.
3440 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3441 (file_select_thread, net_windows_open, _initialize_ser_windows):
3442 Remove unused variables.
3443 * symtab.c (find_pc_sect_line): Remove unused variable.
3444 * target-memory.c (compute_garbled_blocks): Remove unused
3445 variable.
3446 (target_write_memory_blocks): Remove unused variable.
3447 * target.c (target_stack::unpush): Remove unused variables.
3448 * tracepoint.c (start_tracing, all_tracepoint_actions)
3449 (merge_uploaded_trace_state_variables)
3450 (print_one_static_tracepoint_marker): Remove unused variable.
3451 * unittests/basic_string_view/element_access/char/1.cc (test01):
3452 Remove unused variable.
3453 * windows-nat.c (windows_continue, windows_add_all_dlls)
3454 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3455 Remove unused variables.
3456
3457 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3458
3459 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3460 attr_profile in HAVE_ELF.
3461 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3462 HAVE_ELF.
3463
3464 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3465
3466 * frame.c (frame_register_unwind): Change parameter name.
3467 (frame_unwind_register): Likewise.
3468 (frame_unwind_register_value): Likewise.
3469 (frame_unwind_register_signed): Likewise.
3470 (frame_unwind_register_unsigned): Likewise.
3471 * frame.h (frame_register_unwind): Likewise.
3472 (frame_unwind_register): Likewise.
3473 (frame_unwind_register_value): Likewise.
3474 (frame_unwind_register_signed): Likewise.
3475 (frame_unwind_register_unsigned): Likewise.
3476 (frame_unwind_arch): Likewise.
3477
3478 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3479
3480 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3481 ISA maintenance.
3482
3483 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3484
3485 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3486 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3487 hand.
3488
3489 2018-07-20 Keith Seitz <keiths@redhat.com>
3490
3491 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3492 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3493 m_compunit_symtab, m_language>: Add "m_" prefix.
3494 Update all uses.
3495 * buildsym.c: Update all uses.
3496
3497 2018-07-20 Tom Tromey <tom@tromey.com>
3498
3499 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3500 * buildsym.h (record_line_ftype): Remove typedef.
3501
3502 2018-07-20 Tom Tromey <tom@tromey.com>
3503
3504 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3505 (end_expandable_symtab): Likewise.
3506 (end_symtab_get_static_block): Likewise.
3507 (end_symtab_from_static_block): Likewise.
3508 * buildsym-legacy.c (augment_type_symtab): Remove.
3509 (end_expandable_symtab): Remove.
3510 (end_symtab_get_static_block): Remove.
3511 (end_symtab_from_static_block): Remove.
3512
3513 2018-07-20 Tom Tromey <tom@tromey.com>
3514
3515 * dwarf2read.c: Include buildsym.h.
3516 (struct dwarf2_cu) <builder>: New method.
3517 (fixup_go_packaging): Update.
3518 (process_full_comp_unit, process_full_type_unit): Update. Don't
3519 use scoped_free_pendings.
3520 (using_directives): Add "cu" parameter, remove "language".
3521 (read_import_statement, setup_type_unit_groups, )
3522 (read_func_scope, read_lexical_block_scope)
3523 (dwarf2_record_block_ranges, read_namespace): Update.
3524 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3525 (lnp_state_machine::handle_end_sequence): Update.
3526 (class lnp_state_machine) <m_cu>: New member.
3527 <m_record_line_callback>: Remove.
3528 <m_currently_recording_lines>: New member.
3529 (lnp_state_machine::handle_set_file): Update.
3530 (noop_record_line): Remove.
3531 (dwarf_record_line_p): Add cu parameter.
3532 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3533 (lnp_state_machine::record_line)
3534 (lnp_state_machine::lnp_state_machine)
3535 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3536 (dwarf_decode_lines): Update.
3537 (dwarf2_start_subfile): Add cu parameter.
3538 (dwarf2_start_symtab, new_symbol): Update.
3539 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3540 Remove dwarf2_per_objfile parameter.
3541 (dwarf_decode_macros): Update.
3542
3543 2018-07-20 Tom Tromey <tom@tromey.com>
3544
3545 * stabsread.c (define_symbol): Update.
3546 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3547 * dwarf2read.c (new_symbol): Update.
3548 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3549 * cp-namespace.c: Include buildsym.h.
3550 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3551 * buildsym-legacy.c (get_buildsym_compunit): New function.
3552
3553 2018-07-20 Tom Tromey <tom@tromey.com>
3554
3555 * xcoffread.c: Include buildsym-legacy.h.
3556 * windows-nat.c: Include buildsym-legacy.h.
3557 * stabsread.c: Include buildsym-legacy.h.
3558 * mdebugread.c: Include buildsym-legacy.h.
3559 * buildsym-legacy.h: New file.
3560 * buildsym-legacy.c: New file, from buildsym.c.
3561 * go32-nat.c: Include buildsym-legacy.h.
3562 * dwarf2read.c: Include buildsym-legacy.h.
3563 * dbxread.c: Include buildsym-legacy.h.
3564 * cp-namespace.c: Include buildsym-legacy.h.
3565 * coffread.c: Include buildsym-legacy.h.
3566 * buildsym.h: Move some contents to buildsym-legacy.h.
3567 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3568 buildsym-legacy.c.
3569 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3570
3571 2018-07-20 Tom Tromey <tom@tromey.com>
3572
3573 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3574 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3575 (buildsym_compunit::buildsym_compunit)
3576 (buildsym_compunit::~buildsym_compunit)
3577 (buildsym_compunit::get_macro_table): Define.
3578
3579 2018-07-20 Tom Tromey <tom@tromey.com>
3580
3581 * buildsym.c (reset_symtab_globals): Remove.
3582 (buildsym_compunit::end_symtab_from_static_block): Update.
3583 (buildsym_compunit::augment_type_symtab): Update.
3584 (end_symtab_from_static_block): Call free_buildsym_compunit.
3585 (augment_type_symtab, end_symtab, end_expandable_symtab):
3586 Likewise.
3587
3588 2018-07-20 Tom Tromey <tom@tromey.com>
3589
3590 * arch-utils.c: Do not include buildsym.h.
3591 * mipsread.c: Do not include buildsym.h.
3592 * machoread.c: Do not include buildsym.h.
3593 * elfread.c: Do not include buildsym.h.
3594
3595 2018-07-20 Tom Tromey <tom@tromey.com>
3596
3597 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3598 initialization.
3599 (buildsym_compunit): Add new constructor.
3600 (struct buildsym_compunit) <get_last_source_file, finish_block,
3601 record_block_range, start_subfile, patch_subfile_names,
3602 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3603 set_last_source_start_addr, get_last_source_start_addr,
3604 get_local_using_directives, set_local_using_directives,
3605 get_global_using_directives, outermost_context_p,
3606 get_current_context_stack, get_context_stack_depth,
3607 get_current_subfile, get_local_symbols, get_file_symbols,
3608 get_global_symbols, record_debugformat, record_producer,
3609 push_context, pop_context, end_symtab_get_static_block,
3610 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3611 New public methods.
3612 <record_pending_block, finish_block_internal, make_blockvector,
3613 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3614 private methods.
3615 Update all users.
3616
3617 2018-05-22 Tom Tromey <tom@tromey.com>
3618
3619 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3620 parameter.
3621 (finish_block_internal): Update.
3622
3623 2018-07-20 Tom Tromey <tom@tromey.com>
3624
3625 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3626 parameter.
3627 (finish_block_internal): Update.
3628
3629 2018-07-20 Tom Tromey <tom@tromey.com>
3630
3631 * buildsym.h (EXTERN): Don't define or undef.
3632 * buildsym.c (EXTERN): Don't define.
3633
3634 2018-07-20 Tom Tromey <tom@tromey.com>
3635
3636 * buildsym.c: Remove TODO comment.
3637
3638 2018-07-20 Tom Tromey <tom@tromey.com>
3639
3640 * coffread.c (coff_symtab_read): Update.
3641 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3642 (xcoff_new_init): Update.
3643 * mipsread.c (mipscoff_new_init): Update.
3644 * mdebugread.c (mdebug_build_psymtabs): Update.
3645 * elfread.c (elf_new_init): Update.
3646 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3647 Update.
3648 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3649 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3650 (stabsect_build_psymtabs): Update.
3651 * buildsym.h (buildsym_init): Don't declare.
3652 * buildsym.c: Update comment.
3653 (prepare_for_building): Remove.
3654 (start_symtab, restart_symtab): Update.
3655 (reset_symtab_globals): Update comment.
3656 (buildsym_init): Remove.
3657
3658 2018-07-20 Tom Tromey <tom@tromey.com>
3659
3660 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3661 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3662 (read_enum_type, common_block_start, common_block_end)
3663 (cleanup_undefined_types_1, finish_global_stabs): Update.
3664 * mdebugread.c (psymtab_to_symtab_1): Update.
3665 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3666 (read_lexical_block_scope, new_symbol): Update.
3667 * dbxread.c (process_one_symbol): Update.
3668 * coffread.c (coff_symtab_read, process_coff_symbol)
3669 (coff_read_enum_type): Update.
3670 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3671 declare.
3672 (get_local_symbols, get_file_symbols, get_global_symbols): New
3673 functions.
3674 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3675 m_global_symbols.
3676 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3677 (~scoped_free_pendings): Update.
3678 (finish_block, prepare_for_building, reset_symtab_globals)
3679 (end_symtab_get_static_block, end_symtab_with_blockvector)
3680 (augment_type_symtab, push_context): Update.
3681 (get_local_symbols, get_file_symbols, get_global_symbols): New
3682 functions.
3683 (buildsym_init): Update.
3684
3685 2018-07-20 Tom Tromey <tom@tromey.com>
3686
3687 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3688 (process_full_type_unit): Likewise.
3689 (dwarf2_start_symtab): Set list_in_scope.
3690
3691 2018-07-20 Tom Tromey <tom@tromey.com>
3692
3693 * dwarf2read.c (process_psymtab_comp_unit_reader)
3694 (build_type_psymtabs_reader): Do not set list_in_scope.
3695
3696 2018-07-20 Tom Tromey <tom@tromey.com>
3697
3698 * buildsym.c (free_pendings): Remove.
3699 (add_symbol_to_list, scoped_free_pendings)
3700 (finish_block_internal, buildsym_init): Update.
3701
3702 2018-07-20 Tom Tromey <tom@tromey.com>
3703
3704 * xcoffread.c (read_xcoff_symtab): Update.
3705 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3706 Update.
3707 * dbxread.c (process_one_symbol): Update.
3708 * coffread.c (coff_symtab_read): Update.
3709 * buildsym.h (finish_block): Update.
3710 * buildsym.c (finish_block): Remove "listhead" argument.
3711 (end_symtab_get_static_block): Update.
3712
3713 2018-07-20 Tom Tromey <tom@tromey.com>
3714
3715 * buildsym.h (class scoped_free_pendings): Remove constructor.
3716 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3717 method.
3718 <m_pending_block_obstack, m_pending_blocks>: New members.
3719 (pending_block_obstack, pending_blocks): Remove.
3720 (scoped_free_pendings::scoped_free_pendings): Default.
3721 (~scoped_free_pendings): Update.
3722 (free_pending_blocks): Remove.
3723 (finish_block_internal, record_pending_block, make_blockvector)
3724 (end_symtab_get_static_block, augment_type_symtab, push_context)
3725 (buildsym_init): Update.
3726
3727 2018-07-20 Tom Tromey <tom@tromey.com>
3728
3729 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3730 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3731 members.
3732 (pending_addrmap, pending_addrmap_obstack)
3733 (pending_addrmap_interesting): Remove.
3734 (scoped_free_pendings, record_block_range, make_blockvector)
3735 (prepare_for_building, reset_symtab_globals, buildsym_init):
3736 Update.
3737
3738 2018-07-20 Tom Tromey <tom@tromey.com>
3739
3740 * xcoffread.c (process_linenos): Update.
3741 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3742 * mdebugread.c (psymtab_to_symtab_1): Update.
3743 * dwarf2read.c (setup_type_unit_groups)
3744 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3745 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3746 * dbxread.c (process_one_symbol): Update.
3747 * coffread.c (coff_symtab_read, enter_linenos)
3748 (process_coff_symbol): Update.
3749 * buildsym.h (current_subfile): Don't declare.
3750 (get_current_subfile): Declare.
3751 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3752 member.
3753 (start_subfile, free_buildsym_compunit, push_subfile)
3754 (prepare_for_building, start_symtab): Update.
3755 (get_current_subfile): New function.
3756
3757 2018-07-20 Tom Tromey <tom@tromey.com>
3758
3759 * coffread.c (coff_symtab_read): Update.
3760 * xcoffread.c (read_xcoff_symtab): Update.
3761 * dwarf2read.c (new_symbol): Update.
3762 (read_func_scope, read_lexical_block_scope): Update.
3763 * dbxread.c (process_one_symbol): Update.
3764 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3765 (outermost_context_p): Remove macro.
3766 (outermost_context_p, get_current_context_stack)
3767 (get_context_stack_depth): Declare.
3768 (pop_context): Return struct context_stack.
3769 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3770 member.
3771 (context_stack_size): Remove.
3772 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3773 (prepare_for_building, end_symtab_get_static_block)
3774 (augment_type_symtab, push_context): Update.
3775 (pop_context): Return struct context_stack.
3776 (outermost_context_p, get_current_context_stack)
3777 (get_context_stack_depth): New functions.
3778 (buildsym_init): Update.
3779
3780 2018-07-20 Tom Tromey <tom@tromey.com>
3781
3782 * rust-exp.y: Now a pure parser. Update all rules.
3783 (%union): Move earlier.
3784 (current_parser, work_obstack): Remove globals.
3785 (rust_parser, ~rust_parser): Update.
3786 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3787 lex_character, lex_number, lex_string, lex_identifier,
3788 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3789 convert_name, convert_params_to_expression,
3790 convert_ast_to_expression, ast_basic_type, ast_operation,
3791 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3792 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3793 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3794 ast_array_type, ast_slice_type, ast_reference_type,
3795 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3796 (rust_parse): Update.
3797 (rustyyerror, rustyylex): Add parser parameter.
3798 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3799 (rust_lex_stringish_test, rust_lex_test_sequence)
3800 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3801 (rust_lex_test_push_back, rust_lex_tests): Update.
3802
3803 2018-07-19 Pedro Alves <palves@redhat.com>
3804
3805 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3806 gdb::unique_xmalloc_ptr.
3807 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3808 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3809 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3810 copy-initialization.
3811 * guile/scm-pretty-print.c (ppscm_print_children): Use
3812 gdb::unique_xmalloc_ptr instead of cleanups.
3813 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3814 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3815 gdb::unique_xmalloc_ptr.
3816 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3817 Adjust to use gdb::unique_xmalloc_ptr.
3818 * guile/scm-utils.c (extract_arg): Adjust.
3819 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3820 gdb::unique_xmalloc_ptr instead of a cleanup.
3821
3822 2018-07-19 Tom Tromey <tom@tromey.com>
3823
3824 * utils.c (do_value_free_to_mark)
3825 (make_cleanup_value_free_to_mark): Remove.
3826 * utils.h (make_cleanup_value_free_to_mark): Remove.
3827
3828 2018-07-19 Pedro Alves <palves@redhat.com>
3829
3830 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3831 forwarding reference.
3832
3833 2018-07-18 Pedro Alves <palves@redhat.com>
3834
3835 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3836 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3837 cleanup.
3838
3839 2018-07-18 Pedro Alves <palves@redhat.com>
3840
3841 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3842 exceptions.
3843 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3844 (gdbscm_wrap): New.
3845 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3846 directly instead of a cleanup.
3847 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3848 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3849 (vlscm_binop_gdbthrow): New, factored out from ...
3850 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3851 (vlscm_rich_compare): Use gdbscm_wrap.
3852 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3853 instead of a cleanup.
3854 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3855 cleanup.
3856 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3857 Use xfree directly instead of a cleanup.
3858 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3859 Adjust to use gdbscm_wrap and scoped_value_mark.
3860 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3861 (gdbscm_value_address, gdbscm_value_dereference)
3862 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3863 scoped_value_mark.
3864 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3865 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3866 scoped_value_mark.
3867 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3868 gdbscm_wrap and scoped_value_mark.
3869 (gdbscm_value_to_string): Use xfree directly instead of a
3870 cleanup. Move 'buffer' unique_ptr to TRY scope.
3871 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3872 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3873 scoped_value_mark.
3874 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3875 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3876 scoped_value_mark.
3877 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3878 gdbscm_wrap.
3879
3880 2018-07-18 Tom de Vries <tdevries@suse.de>
3881
3882 * findvar.c (default_read_var_value): Also resolve dynamic type for
3883 LOC_OPTIMIZED_OUT vars.
3884
3885 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3886
3887 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3888 decoding.
3889
3890 2018-07-17 Tom Tromey <tom@tromey.com>
3891
3892 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3893 (compute_enum_list, pascm_set_param_value_x)
3894 (gdbscm_parameter_value): Update.
3895 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3896 (gdbscm_scm_to_host_string): Update.
3897 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3898 Update.
3899 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3900 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3901 * guile/scm-string.c (gdbscm_scm_to_string): Return
3902 unique_xmalloc_ptr.
3903 (gdbscm_scm_to_host_string): Likewise.
3904
3905 2018-07-17 Tom Tromey <tom@tromey.com>
3906
3907 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3908 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3909 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3910 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3911 unique_xmalloc_ptr.
3912
3913 2018-07-17 Tom Tromey <tom@tromey.com>
3914
3915 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3916 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3917 Update.
3918 * guile/scm-cmd.c (cmdscm_function): Update.
3919 * guile/scm-pretty-print.c
3920 (ppscm_print_exception_unless_memory_error): Update.
3921 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3922 Return unique_xmalloc_ptr.
3923
3924 2018-07-17 Tom Tromey <tom@tromey.com>
3925
3926 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3927 Use string_printf.
3928
3929 2018-07-17 Jim Wilson <jimw@sifive.com>
3930
3931 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3932 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3933 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3934 unecessary braces after EF_RISCV_RVC test. Delete call to
3935 set_gdbarch_decr_pc_after_break.
3936
3937 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3938 RISCV_LAST_FP_REGNUM + 1.
3939 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3940
3941 2018-07-17 Tom Tromey <tom@tromey.com>
3942
3943 * configure.ac: Remove --disable-gdbcli.
3944 * configure: Rebuild.
3945 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3946 (SUBDIR_CLI_CFLAGS): Remove.
3947 (SFILES): Use SUBDIR_CLI_SRCS.
3948 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3949
3950 2018-07-17 Tom Tromey <tom@tromey.com>
3951
3952 PR gdb/18624:
3953 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3954
3955 2018-07-16 Jim Wilson <jimw@sifive.com>
3956
3957 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3958
3959 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3962 variable.
3963 (libunwind_frame_sniffer): Likewise.
3964 (libunwind_frame_prev_register): Likewise.
3965 (libunwind_sigtramp_frame_sniffer): Likewise.
3966 * ia64-tdep.c (ia64_access_reg): Likewise.
3967 (ia64_access_rse_reg): Likewise.
3968 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3969 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3970
3971 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3974
3975 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * remote-sim.c (gdbsim_target::close,
3978 gdbsim_target::mourn_inferior): Remove unused variables.
3979
3980 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3981
3982 * ia64-tdep.c (ktab_buf): New global.
3983 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3984 (get_kernel_table): Adjust.
3985
3986 2018-07-16 Tom Tromey <tom@tromey.com>
3987
3988 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3989 * dwarf2read.c (using_directives, new_symbol): Use
3990 outermost_context_p.
3991 * dbxread.c (process_one_symbol): Use outermost_context_p.
3992 * coffread.c (coff_symtab_read): Use outermost_context_p.
3993
3994 2018-07-16 Tom Tromey <tom@tromey.com>
3995
3996 * dwarf2read.c (using_directives, read_func_scope)
3997 (read_lexical_block_scope): Update.
3998 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3999 * buildsym.h (local_using_directives, global_using_directives):
4000 Don't declare.
4001 (get_local_using_directives, set_local_using_directives)
4002 (get_global_using_directives): Declare.
4003 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4004 m_global_using_directives>: New members.
4005 (finish_block_internal, prepare_for_building)
4006 (reset_symtab_globals, end_symtab_get_static_block)
4007 (push_context): Update.
4008 (get_local_using_directives, set_local_using_directives)
4009 (get_global_using_directives): New functions.
4010 (buildsym_init): Update.
4011
4012 2018-07-16 Tom Tromey <tom@tromey.com>
4013
4014 * xcoffread.c (xcoff_initial_scan): Don't call
4015 free_pending_blocks.
4016 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4017 * buildsym.h (class scoped_free_pendings): Add constructor.
4018 (free_pending_blocks): Don't declare.
4019 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4020 (free_pending_blocks): Now static.
4021
4022 2018-07-16 Tom Tromey <tom@tromey.com>
4023
4024 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4025 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4026 member.
4027 (struct subfile_stack): Remove.
4028 (subfile_stack): Remove.
4029 (push_subfile, pop_subfile, buildsym_init): Update.
4030
4031 2018-07-16 Tom Tromey <tom@tromey.com>
4032
4033 * buildsym.c (push_subfile): Use gdb_assert.
4034 (pop_subfile): Use gdb_assert.
4035
4036 2018-07-16 Tom Tromey <tom@tromey.com>
4037
4038 * buildsym.h (merge_symbol_lists): Remove.
4039 * buildsym.c (merge_symbol_lists): Remove.
4040
4041 2018-07-16 Tom Tromey <tom@tromey.com>
4042
4043 * stabsread.c (scan_file_globals): Update comment.
4044 * stabsread.h (scan_file_globals): Move from buildsym.h.
4045 * buildsym.h (scan_file_globals): Move to stabsread.h.
4046
4047 2018-07-16 Tom Tromey <tom@tromey.com>
4048
4049 * xcoffread.c (xcoff_new_init): Update.
4050 * mipsread.c (mipscoff_new_init): Update.
4051 * mdebugread.c (mdebug_build_psymtabs): Update.
4052 * elfread.c (elf_new_init): Update.
4053 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4054 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4055 * buildsym.h (buildsym_new_init): Don't declare.
4056 * buildsym.c (buildsym_new_init): Remove.
4057
4058 2018-07-16 Tom Tromey <tom@tromey.com>
4059
4060 * stabsread.h (within_function): Move from buildsym.h.
4061 * stabsread.c (start_stabs): Clear within_function.
4062 * coffread.c (coff_start_symtab): Clear within_function.
4063 * buildsym.h (within_function): Move to stabsread.h.
4064 * buildsym.c (prepare_for_building): Update.
4065
4066 2018-07-16 Tom Tromey <tom@tromey.com>
4067
4068 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4069 * dwarf2read.c (dwarf2_start_symtab): Don't set
4070 processing_gcc_compilation.
4071 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4072
4073 2018-07-16 Tom Tromey <tom@tromey.com>
4074
4075 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4076 (next_symbol_text_func): Move from buildsym.h.
4077 * stabsread.c (hashname): Move from buildsym.c.
4078 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4079 (next_symbol_text_func, hashname): Move to stabsread.h.
4080 * buildsym.c: Don't include bcache.h
4081 (hashname): Move to stasbread.c.
4082
4083 2018-07-16 Tom Tromey <tom@tromey.com>
4084
4085 * buildsym.h (context_stack_size): Don't declare.
4086 * buildsym.c (context_stack_size): New global.
4087
4088 2018-07-16 Tom Tromey <tom@tromey.com>
4089
4090 * dbxread.c (processing_acc_compilation): New global.
4091 * buildsym.h (processing_acc_compilation): Don't declare.
4092
4093 2018-07-16 Tom Tromey <tom@tromey.com>
4094
4095 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4096 * dbxread.c (read_ofile_symtab): Update.
4097 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4098 * buildsym.h (last_source_start_addr): Remove.
4099 (set_last_source_start_addr, get_last_source_start_addr):
4100 Declare.
4101 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4102 parameter.
4103 (struct buildsym_compunit) <m_last_source_start_addr>: New
4104 member.
4105 (prepare_for_building): Remove start_addr parameter.
4106 (start_symtab, restart_symtab, end_symtab_get_static_block)
4107 (end_symtab_with_blockvector): Update.
4108 (set_last_source_start_addr, get_last_source_start_addr): New
4109 functions.
4110
4111 2018-07-16 Tom Tromey <tom@tromey.com>
4112
4113 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4114 member.
4115 (have_line_numbers): Remove.
4116 (record_line, prepare_for_building, end_symtab_get_static_block)
4117 (augment_type_symtab): Update.
4118
4119 2018-07-16 Tom Tromey <tom@tromey.com>
4120
4121 * buildsym.c (~buildsym_compunit): Free the macro table.
4122 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4123 methods.
4124 <m_pending_macros>: New member.
4125 (pending_macros): Remove.
4126 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4127 (reset_symtab_globals, end_symtab_get_static_block)
4128 (end_symtab_with_blockvector, augment_type_symtab)
4129 (buildsym_init): Update.
4130
4131 2018-07-16 Tom Tromey <tom@tromey.com>
4132
4133 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4134 parameter.
4135 (buildsym_compunit::set_last_source_file): New method.
4136 <m_last_source_file>: New member.
4137 (prepare_for_building): Remove "name" parameter.
4138 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4139 (last_source_file): Remove.
4140 (set_last_source_file, get_last_source_file): Update.
4141
4142 2018-07-16 Tom Tromey <tom@tromey.com>
4143
4144 * buildsym.c (prepare_for_building): Add assert.
4145
4146 2018-07-16 Tom Tromey <tom@tromey.com>
4147
4148 * buildsym.c (~buildsym_compunit): Update.
4149 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4150 (start_subfile, patch_subfile_names)
4151 (end_symtab_with_blockvector): Update.
4152
4153 2018-07-16 Tom Tromey <tom@tromey.com>
4154
4155 * buildsym.c (struct buildsym_compunit): Add constructor,
4156 destructor, initializers.
4157 (start_buildsym_compunit): Remove.
4158 (free_buildsym_compunit): Use "delete".
4159 (start_symtab, restart_symtab): Use "new".
4160
4161 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4162
4163 * symfile.c (set_objfile_default_section_offset): Remove struct
4164 keyword.
4165
4166 2018-07-14 Stafford Horne <shorne@gmail.com>
4167
4168 * (Responsible Maintainers): Add myself as or1k maintainer.
4169
4170 2018-07-13 Tom Tromey <tom@tromey.com>
4171
4172 * symfile.c (set_objfile_default_section_offset): Use extra braces
4173 around initializer.
4174
4175 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4176
4177 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4178 non-branching basr.
4179
4180 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4181
4182 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4183 unittests/cli-utils-selftests.c
4184 * unittests/cli-utils-selftests.c: New file.
4185
4186 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4187
4188 * NEWS: Mention new commands. Mention change to 'thread apply'.
4189
4190 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4191
4192 * thread.c (thr_try_catch_cmd): New function.
4193 (thread_apply_all_command): Handle qcs flags.
4194 (thread_apply_command): Handle qcs flags.
4195 (taas_command): New function.
4196 (tfaas_command): New function.
4197 (_initialize_thread): Update to setup the new commands 'taas
4198 and 'tfaas'. Change doc string for 'thread apply'.
4199
4200 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4201
4202 * stack.c: (trailing_outermost_frame): New function, mostly
4203 extracted from backtrace_command_1.
4204 (leading_innermost_frame): New function.
4205 (backtrace_command_1): Update to call trailing_outermost_frame.
4206 (frame_apply_command_count): New function.
4207 (frame_apply_level_command): New function.
4208 (frame_apply_all_command): New function.
4209 (frame_apply_command): New function.
4210 (faas_command): New function.
4211 (frame_cmd_list): New variable.
4212 (_initialize_stack): Update to setup the new commands 'frame apply'
4213 and 'faas'.
4214
4215 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4216
4217 * cli-utils.c (number_or_range_parser::get_number): Only handle
4218 numbers or convenience var as numbers.
4219 (parse_flags): New function.
4220 (parse_flags_qcs): New function.
4221 (number_or_range_parser::finished): Ensure parsing end is detected
4222 before end of string.
4223 * cli-utils.h (parse_flags): New function.
4224 (parse_flags_qcs): New function.
4225 (number_or_range_parser): Remove m_finished bool.
4226 (number_or_range_parser::skip_range): Set m_in_range to false.
4227
4228 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4229
4230 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4231 on Windows.
4232
4233 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4234 Jan Kratochvil <jan.kratochvil@redhat.com>
4235 Paul Fertser <fercerpav@gmail.com>
4236 Tsutomu Seki <sekiriki@gmail.com>
4237 Pedro Alves <palves@redhat.com>
4238
4239 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4240 'unittests/parse-connection-spec-selftests.c'.
4241 (COMMON_SFILES): Add 'common/netstuff.c'.
4242 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4243 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4244 * common/netstuff.c: New file.
4245 * common/netstuff.h: New file.
4246 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4247 (wait_for_connect): Update comment. New parameter
4248 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4249 Use 'sock' directly instead of 'scb->fd'.
4250 (try_connect): New function, with code from 'net_open'.
4251 (net_open): Rewrite main loop to deal with multiple
4252 sockets/addresses. Handle IPv6-style hostnames; implement
4253 support for IPv6 connections.
4254 * unittests/parse-connection-spec-selftests.c: New file.
4255
4256 2018-07-11 Pedro Alves <palves@redhat.com>
4257
4258 PR gdb/23377
4259 * remote.c (remote_target::remote_detach_pid): Call
4260 set_current_process.
4261
4262 2018-07-11 Pedro Alves <palves@redhat.com>
4263
4264 * h8300-tdep.c (h8300_gdbarch_init): Remove
4265 set_gdbarch_ecoff_reg_to_regnum calls.
4266
4267 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4268
4269 PR c++/23373
4270 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4271 offsets/sizes for static members of a class/struct.
4272
4273 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4274
4275 * target-descriptions.c (tdesc_register_bitsize): Rename.
4276 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4277 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4278 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4279
4280 2018-07-10 Tom Tromey <tom@tromey.com>
4281
4282 * breakpoint.c (moribund_locations): Now static and a
4283 std::vector.
4284 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4285 (build_bpstat_chain, update_global_location_list)
4286 (breakpoint_retire_moribund): Update.
4287 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4288 VEC.
4289
4290 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4291
4292 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4293 (riscv_register_reggroup_p): Use new function, remove unneeded
4294 parenthesis.
4295 (riscv_push_dummy_call): Extend assert to compare against xlen or
4296 flen based on register type.
4297
4298 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4299
4300 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4301
4302 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4303
4304 * remote.c (show_hardware_watchpoint_limit): New function.
4305 (show_hardware_watchpoint_length_limit): New function.
4306 (show_hardware_breakpoint_limit): New function.
4307 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4308 where appropriate, update help text.
4309
4310 2018-07-09 Tom Tromey <tom@tromey.com>
4311
4312 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4313 (CLIBS): Don't mention NAT_CLIBS.
4314
4315 2018-07-09 Tom Tromey <tom@tromey.com>
4316
4317 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4318 (LIBGDB_OBS, clean mostlyclean): Update.
4319 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4320
4321 2018-07-09 Tom Tromey <tom@tromey.com>
4322
4323 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4324 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4325 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4326
4327 2018-07-09 Tom Tromey <tom@tromey.com>
4328
4329 * Makefile.in (ALLDEPFILES): Remove exec.c.
4330 (COMMON_OBS): Remove exec.o.
4331 (COMMON_SFILES): Add exec.c.
4332
4333 2018-07-09 Tom Tromey <tom@tromey.com>
4334
4335 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4336
4337 2018-07-09 Tom Tromey <tom@tromey.com>
4338
4339 * Makefile.in (clean mostlyclean): Remove stamp-version.
4340 (version.c): Depend on stamp-version.
4341 (stamp-version): New rule, from version.c rule.
4342
4343 2018-07-09 Tom Tromey <tom@tromey.com>
4344
4345 * Makefile.in (init.c): Depend on stamp-init.
4346 (stamp-init): New rule, from init.c rule.
4347 (clean mostlyclean): Remove stamp-init.
4348
4349 2018-07-09 Tom Tromey <tom@tromey.com>
4350
4351 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4352 SUBDIR_GCC_COMPILE_SRCS.
4353
4354 2018-07-09 Tom Tromey <tom@tromey.com>
4355
4356 * Makefile.in (init.c): Remove some unused sed rules.
4357
4358 2018-07-09 Tom Tromey <tom@tromey.com>
4359
4360 * Makefile.in (TSOBS): Remove.
4361 (INIT_FILES): Update.
4362 (LIBGDB_OBS): Update.
4363 (COMMON_SFILES): Add inflow.c.
4364 (SFILES): Remove inflow.c.
4365
4366 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4367
4368 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4369
4370 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4371
4372 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4373 get_saveloc_name, is_signal_frame_name, step_name,
4374 init_remote_name, create_addr_space_name,
4375 destroy_addr_space_name, search_unwind_table_name,
4376 find_dyn_list_name): Constify.
4377
4378 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4379
4380 * darwin-nat.c (darwin_pthread_kill): New function.
4381 (darwin_resume_thread): Use darwin_pthread_kill.
4382
4383 2018-07-05 Tom de Vries <tdevries@suse.de>
4384
4385 * macroexp.c (macro_buffer) <operator=>: New member function.
4386
4387 2018-07-04 Tom Tromey <tom@tromey.com>
4388
4389 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4390
4391 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4392
4393 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4394 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4395 * maint.c: Likewise.
4396 * top.c: Likewise.
4397
4398 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4399
4400 * NEWS: Create a new section for the next release branch.
4401 Rename the section of the current branch, now that it has
4402 been cut.
4403
4404 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4405
4406 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4407 * version.in: Bump version to 8.2.50.DATE-git.
4408
4409 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4410 Pedro Alves <palves@redhat.com>
4411
4412 * linux-nat.c (linux_init_ptrace): Rename to ...
4413 (linux_init_ptrace_procfs): ... this. Call
4414 linux_proc_init_warnings.
4415 (linux_nat_target::post_attach)
4416 (linux_nat_target::post_startup_inferior): Adjust.
4417 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4418 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4419
4420 2018-07-04 Tom de Vries <tdevries@suse.de>
4421
4422 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4423 check ...
4424 (read_comp_unit_head): ... here.
4425
4426 2018-07-03 Tom Tromey <tom@tromey.com>
4427
4428 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4429 (stop_tracing, tstatus_command)
4430 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4431 (print_one_static_tracepoint_marker): Update.
4432 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4433 std::vector.
4434 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4435 VEC.
4436 (all_tracepoints, static_tracepoints_here): Return std::vector.
4437
4438 2018-07-03 Tom Tromey <tom@tromey.com>
4439
4440 * common/ptid.c (ptid_equal): Remove.
4441 * common/ptid.h (ptid_equal): Don't declare.
4442 * ada-tasks.c: Update.
4443 * breakpoint.c: Update.
4444 * common/agent.c: Update.
4445 * corelow.c: Update.
4446 * darwin-nat-info.c: Update.
4447 * darwin-nat.c: Update.
4448 * dcache.c: Update.
4449 * dtrace-probe.c: Update.
4450 * dummy-frame.c: Update.
4451 * fbsd-nat.c: Update.
4452 * frame.c: Update.
4453 * gdbthread.h: Update.
4454 * gnu-nat.c: Update.
4455 * go32-nat.c: Update.
4456 * inf-loop.c: Update.
4457 * inf-ptrace.c: Update.
4458 * infcall.c: Update.
4459 * infcmd.c: Update.
4460 * inflow.c: Update.
4461 * infrun.c: Update.
4462 * linux-fork.c: Update.
4463 * linux-nat.c: Update.
4464 * linux-thread-db.c: Update.
4465 * mi/mi-cmd-var.c: Update.
4466 * mi/mi-interp.c: Update.
4467 * mi/mi-main.c: Update.
4468 * nto-procfs.c: Update.
4469 * ppc-linux-tdep.c: Update.
4470 * procfs.c: Update.
4471 * python/py-inferior.c: Update.
4472 * python/py-record-btrace.c: Update.
4473 * python/py-record.c: Update.
4474 * ravenscar-thread.c: Update.
4475 * regcache.c: Update.
4476 * remote-sim.c: Update.
4477 * remote.c: Update.
4478 * sol-thread.c: Update.
4479 * solib.c: Update.
4480 * target.c: Update.
4481 * tui/tui-stack.c: Update.
4482 * varobj.c: Update.
4483 * windows-nat.c: Update.
4484 * windows-tdep.c: Update.
4485
4486 2018-07-03 Tom Tromey <tom@tromey.com>
4487
4488 * common/ptid.c (ptid_match): Remove.
4489 * common/ptid.h (ptid_match): Don't declare.
4490 * fbsd-nat.c: Update.
4491 * infcmd.c: Update.
4492 * infrun.c: Update.
4493 * linux-nat.c: Update.
4494 * record-btrace.c: Update.
4495 * regcache.c: Update.
4496 * remote.c: Update.
4497
4498 2018-07-03 Tom Tromey <tom@tromey.com>
4499
4500 * common/ptid.c (ptid_tid_p): Remove.
4501 * common/ptid.h (ptid_tid_p): Don't declare.
4502 * sol-thread.c: Update.
4503
4504 2018-07-03 Tom Tromey <tom@tromey.com>
4505
4506 * common/ptid.c (ptid_lwp_p): Remove.
4507 * common/ptid.h (ptid_lwp_p): Don't declare.
4508 * fbsd-nat.c: Update.
4509 * linux-nat.c: Update.
4510 * nat/linux-procfs.c: Update.
4511 * nat/x86-linux-dregs.c: Update.
4512 * sol-thread.c: Update.
4513
4514 2018-07-03 Tom Tromey <tom@tromey.com>
4515
4516 * common/ptid.c (ptid_is_pid): Remove.
4517 * common/ptid.h (ptid_is_pid): Don't declare.
4518 * infrun.c: Update.
4519 * linux-nat.c: Update.
4520 * mi/mi-interp.c: Update.
4521 * remote.c: Update.
4522 * thread.c: Update.
4523
4524 2018-07-03 Tom Tromey <tom@tromey.com>
4525
4526 * common/ptid.c (ptid_get_tid): Remove.
4527 * common/ptid.h (ptid_get_tid): Don't declare.
4528 * ada-tasks.c: Update.
4529 * aix-thread.c: Update.
4530 * bsd-uthread.c: Update.
4531 * darwin-nat.c: Update.
4532 * fbsd-nat.c: Update.
4533 * i386-darwin-nat.c: Update.
4534 * infrun.c: Update.
4535 * linux-tdep.c: Update.
4536 * nto-procfs.c: Update.
4537 * ppc-ravenscar-thread.c: Update.
4538 * python/py-infthread.c: Update.
4539 * ravenscar-thread.c: Update.
4540 * sol-thread.c: Update.
4541 * sparc-ravenscar-thread.c: Update.
4542 * windows-nat.c: Update.
4543
4544 2018-07-03 Tom Tromey <tom@tromey.com>
4545
4546 * common/ptid.c (ptid_get_lwp): Remove.
4547 * common/ptid.h (ptid_get_lwp): Don't declare.
4548 * aarch64-linux-nat.c: Update.
4549 * ada-tasks.c: Update.
4550 * aix-thread.c: Update.
4551 * amd64-linux-nat.c: Update.
4552 * arm-linux-nat.c: Update.
4553 * corelow.c: Update.
4554 * fbsd-nat.c: Update.
4555 * fbsd-tdep.c: Update.
4556 * gnu-nat.c: Update.
4557 * i386-cygwin-tdep.c: Update.
4558 * i386-gnu-nat.c: Update.
4559 * i386-linux-nat.c: Update.
4560 * ia64-linux-nat.c: Update.
4561 * inf-ptrace.c: Update.
4562 * infrun.c: Update.
4563 * linux-fork.c: Update.
4564 * linux-nat.c: Update.
4565 * linux-tdep.c: Update.
4566 * linux-thread-db.c: Update.
4567 * mips-linux-nat.c: Update.
4568 * nat/aarch64-linux-hw-point.c: Update.
4569 * nat/aarch64-linux.c: Update.
4570 * nat/linux-btrace.c: Update.
4571 * nat/linux-osdata.c: Update.
4572 * nat/linux-procfs.c: Update.
4573 * nat/x86-linux-dregs.c: Update.
4574 * obsd-nat.c: Update.
4575 * ppc-fbsd-nat.c: Update.
4576 * ppc-linux-nat.c: Update.
4577 * procfs.c: Update.
4578 * python/py-infthread.c: Update.
4579 * ravenscar-thread.c: Update.
4580 * remote.c: Update.
4581 * s390-linux-nat.c: Update.
4582 * sol-thread.c: Update.
4583 * sol2-tdep.c: Update.
4584 * spu-linux-nat.c: Update.
4585 * x86-linux-nat.c: Update.
4586 * xtensa-linux-nat.c: Update.
4587
4588 2018-07-03 Tom Tromey <tom@tromey.com>
4589
4590 * common/ptid.c (ptid_get_pid): Remove.
4591 * common/ptid.h (ptid_get_pid): Don't declare.
4592 * aarch64-linux-nat.c: Update.
4593 * ada-lang.c: Update.
4594 * aix-thread.c: Update.
4595 * alpha-bsd-nat.c: Update.
4596 * amd64-fbsd-nat.c: Update.
4597 * amd64-linux-nat.c: Update.
4598 * arm-linux-nat.c: Update.
4599 * arm-nbsd-nat.c: Update.
4600 * auxv.c: Update.
4601 * break-catch-syscall.c: Update.
4602 * breakpoint.c: Update.
4603 * bsd-uthread.c: Update.
4604 * corelow.c: Update.
4605 * ctf.c: Update.
4606 * darwin-nat.c: Update.
4607 * fbsd-nat.c: Update.
4608 * fbsd-tdep.c: Update.
4609 * gcore.c: Update.
4610 * gnu-nat.c: Update.
4611 * hppa-nbsd-nat.c: Update.
4612 * hppa-obsd-nat.c: Update.
4613 * i386-fbsd-nat.c: Update.
4614 * ia64-linux-nat.c: Update.
4615 * inf-ptrace.c: Update.
4616 * infcmd.c: Update.
4617 * inferior.c: Update.
4618 * inferior.h: Update.
4619 * inflow.c: Update.
4620 * infrun.c: Update.
4621 * linux-fork.c: Update.
4622 * linux-nat.c: Update.
4623 * linux-tdep.c: Update.
4624 * linux-thread-db.c: Update.
4625 * m68k-bsd-nat.c: Update.
4626 * mi/mi-interp.c: Update.
4627 * mi/mi-main.c: Update.
4628 * mips-linux-nat.c: Update.
4629 * mips-nbsd-nat.c: Update.
4630 * mips64-obsd-nat.c: Update.
4631 * nat/aarch64-linux-hw-point.c: Update.
4632 * nat/aarch64-linux.c: Update.
4633 * nat/linux-btrace.c: Update.
4634 * nat/linux-osdata.c: Update.
4635 * nat/linux-procfs.c: Update.
4636 * nat/x86-linux-dregs.c: Update.
4637 * nto-procfs.c: Update.
4638 * obsd-nat.c: Update.
4639 * ppc-linux-nat.c: Update.
4640 * ppc-nbsd-nat.c: Update.
4641 * ppc-obsd-nat.c: Update.
4642 * proc-service.c: Update.
4643 * procfs.c: Update.
4644 * python/py-inferior.c: Update.
4645 * python/py-infthread.c: Update.
4646 * ravenscar-thread.c: Update.
4647 * record.c: Update.
4648 * remote-sim.c: Update.
4649 * remote.c: Update.
4650 * rs6000-nat.c: Update.
4651 * s390-linux-nat.c: Update.
4652 * sh-nbsd-nat.c: Update.
4653 * sol-thread.c: Update.
4654 * sparc-nat.c: Update.
4655 * sparc64-tdep.c: Update.
4656 * spu-linux-nat.c: Update.
4657 * spu-tdep.c: Update.
4658 * target-debug.h: Update.
4659 * target.c: Update.
4660 * thread.c: Update.
4661 * tid-parse.c: Update.
4662 * tracefile-tfile.c: Update.
4663 * vax-bsd-nat.c: Update.
4664 * windows-nat.c: Update.
4665 * x86-linux-nat.c: Update.
4666 * x86-nat.c: Update.
4667
4668 2018-07-03 Tom Tromey <tom@tromey.com>
4669
4670 * common/ptid.c (pid_to_ptid): Remove.
4671 * common/ptid.h (pid_to_ptid): Don't declare.
4672 * aix-thread.c: Update.
4673 * arm-linux-nat.c: Update.
4674 * common/ptid.c: Update.
4675 * common/ptid.h: Update.
4676 * corelow.c: Update.
4677 * ctf.c: Update.
4678 * darwin-nat.c: Update.
4679 * fbsd-nat.c: Update.
4680 * fork-child.c: Update.
4681 * gnu-nat.c: Update.
4682 * go32-nat.c: Update.
4683 * inf-ptrace.c: Update.
4684 * infcmd.c: Update.
4685 * inferior.c: Update.
4686 * infrun.c: Update.
4687 * linux-fork.c: Update.
4688 * linux-nat.c: Update.
4689 * nat/aarch64-linux-hw-point.c: Update.
4690 * nat/fork-inferior.c: Update.
4691 * nat/x86-linux-dregs.c: Update.
4692 * nto-procfs.c: Update.
4693 * obsd-nat.c: Update.
4694 * procfs.c: Update.
4695 * progspace.c: Update.
4696 * remote.c: Update.
4697 * rs6000-nat.c: Update.
4698 * s390-linux-nat.c: Update.
4699 * sol-thread.c: Update.
4700 * spu-linux-nat.c: Update.
4701 * target.c: Update.
4702 * top.c: Update.
4703 * tracefile-tfile.c: Update.
4704 * windows-nat.c: Update.
4705
4706 2018-07-03 Tom Tromey <tom@tromey.com>
4707
4708 * common/ptid.h (ptid_build): Don't declare.
4709 * common/ptid.c (ptid_build): Remove.
4710 * aix-thread.c: Update.
4711 * bsd-kvm.c: Update.
4712 * bsd-uthread.c: Update.
4713 * common/agent.c: Update.
4714 * common/ptid.c: Update.
4715 * common/ptid.h: Update.
4716 * corelow.c: Update.
4717 * darwin-nat.c: Update.
4718 * fbsd-nat.c: Update.
4719 * gnu-nat.c: Update.
4720 * linux-fork.c: Update.
4721 * linux-nat.c: Update.
4722 * linux-thread-db.c: Update.
4723 * nat/linux-osdata.c: Update.
4724 * nat/linux-procfs.c: Update.
4725 * nto-procfs.c: Update.
4726 * obsd-nat.c: Update.
4727 * proc-service.c: Update.
4728 * procfs.c: Update.
4729 * ravenscar-thread.c: Update.
4730 * remote-sim.c: Update.
4731 * remote.c: Update.
4732 * sol-thread.c: Update.
4733 * target.c: Update.
4734 * windows-nat.c: Update.
4735
4736 2018-07-03 Tom Tromey <tom@tromey.com>
4737
4738 * infrun.c (follow_exec): Use exit_inferior_silent.
4739 * inferior.c (exit_inferior_num_silent): Remove.
4740 * inferior.h (exit_inferior_num_silent): Don't declare.
4741
4742 2018-07-03 Tom Tromey <tom@tromey.com>
4743
4744 PR cli/23340:
4745 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4746 inferior_ptid on error.
4747
4748 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4749 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 PR tdep/8282
4752 * disasm.h (gdb_disassembler): Add
4753 `m_disassembler_options_holder'. member
4754 * disasm.c (get_all_disassembler_options): New function.
4755 (gdb_disassembler::gdb_disassembler): Use it.
4756 (gdb_buffered_insn_length_init_dis): Likewise.
4757 (gdb_buffered_insn_length): Adjust accordingly.
4758 (set_disassembler_options): Handle options with arguments.
4759 (show_disassembler_options_sfunc): Likewise. Add a leading new
4760 line if showing options with descriptions.
4761 (disassembler_options_completer): Adapt to using the
4762 `disasm_options_and_args_t' structure.
4763 * mips-tdep.c (mips_disassembler_options): New variable.
4764 (mips_disassembler_options_o32): Likewise.
4765 (mips_disassembler_options_n32): Likewise.
4766 (mips_disassembler_options_n64): Likewise.
4767 (gdb_print_insn_mips): Don't set `disassembler_options'.
4768 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4769 functions.
4770 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4771 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4772 `gdbarch_disassembler_options_implicit' and
4773 `gdbarch_valid_disassembler_options'.
4774 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4775 `disasm_options_and_args_t' structure.
4776 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4777 method.
4778 (valid_disassembler_options): Switch from `disasm_options_t' to
4779 the `disasm_options_and_args_t' structure.
4780 * NEWS: Document `set disassembler-options' support for the MIPS
4781 target.
4782 * gdbarch.h: Regenerate.
4783 * gdbarch.c: Regenerate.
4784
4785 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4786
4787 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4788
4789 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4790
4791 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4792 parameter in call to amd64_target_description.
4793 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4794 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4795 (amd64fbsd_init_abi): Likewise.
4796 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4797 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4798 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4799 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4800
4801 2018-06-29 Pedro Alves <palves@redhat.com>
4802
4803 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4804 "segments" parameter.
4805 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4806 (_initialize_amd64_tdep): Update call to
4807 amd64_create_target_description.
4808 (amd64_target_description): Add "segments" parameter. Adjust
4809 the implementation to use it.
4810 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4811 call to amd64_create_target_description.
4812 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4813 * gdb/arch/amd64.h (amd64_create_target_description): Add
4814 "segments" register.
4815 * gdb/arch/amd64.c (amd64_create_target_description): Add
4816 "segments" parameter. Call create_feature_i386_64bit_segments
4817 only if SEGMENTS is true.
4818 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4819 call to amd64_create_target_description.
4820
4821 2018-06-29 Pedro Alves <palves@redhat.com>
4822
4823 * thread.c (thread_target_id_str): New, factored out from ...
4824 (print_thread_info_1): ... here. Use it to compute the max
4825 "Target Id" column width.
4826
4827 2018-06-29 Pedro Alves <palves@redhat.com>
4828
4829 * remote.c (remote_target::extra_thread_info): Delete
4830 'display_buf' and 'n' locals. from the cache, regardless of
4831 packet mechanims is in use. Use cache for qThreadExtra and qP
4832 methods too.
4833
4834 2018-06-29 Pedro Alves <palves@redhat.com>
4835
4836 * blockframe.c (find_pc_sect_containing_function): New function.
4837 * breakpoint.c (print_breakpoint_location): Don't call
4838 find_pc_sect_function.
4839 * linespec.c (create_sals_line_offset): Record the location's
4840 symbol in the sal.
4841 * linespec.c (convert_address_location_to_sals): Fill in sal's
4842 symbol with find_pc_sect_containing_function.
4843 * symtab.c (find_function_start_sal): Rename to ...
4844 (find_function_start_sal_1): ... this.
4845 (find_function_start_sal): Reimplement as wrapper around
4846 find_function_start_sal_1, and use
4847 find_pc_sect_containing_function to fill in the sal's symbol.
4848 (find_function_start_sal(symbol*, bool)): Adjust.
4849 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4850 comments.
4851 (find_pc_sect_containing_function): Declare.
4852
4853 2018-06-29 Pedro Alves <palves@redhat.com>
4854
4855 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4856 true if the the location has no symbol.
4857
4858 2018-06-28 Tom Tromey <tom@tromey.com>
4859
4860 * NEWS: Mention --enable-codesign.
4861 * silent-rules.mk (ECHO_SIGN): New variable.
4862 * configure.ac: Add --enable-codesign.
4863 * configure: Rebuild.
4864 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4865 (gdb$(EXEEXT)): Optionally invoke codesign.
4866
4867 2018-06-28 Pedro Alves <palves@redhat.com>
4868
4869 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4870 comments.
4871 (switch_to_thread_no_regs): Adjust comment.
4872 * infcmd.c (stop_pc): Delete.
4873 (post_create_inferior, info_program_command): Replace references
4874 to stop_pc with references to thread_info->suspend.stop_pc.
4875 * inferior.h (stop_pc): Delete declaration.
4876 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4877 (handle_inferior_event_1, handle_signal_stop)
4878 (process_event_stop_test, keep_going_stepped_thread)
4879 (handle_step_into_function, handle_step_into_function_backward)
4880 (print_stop_location): Replace references to stop_pc with
4881 references to thread_info->suspend.stop_pc.
4882 (struct infcall_suspend_state) <stop_pc>: Delete field.
4883 (save_infcall_suspend_state, restore_infcall_suspend_state):
4884 Remove references to inf_stat->stop_pc.
4885 * linux-fork.c (fork_load_infrun_state): Likewise.
4886 * record-btrace.c (record_btrace_set_replay): Likewise.
4887 * record-full.c (record_full_goto_entry): Likewise.
4888 * remote.c (print_one_stopped_thread): Likewise.
4889 * target.c (target_resume): Extend comment.
4890 * thread.c (set_executing_thread): New.
4891 (set_executing): Use it.
4892 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4893 Remove references to stop_pc.
4894
4895 2018-06-28 Pedro Alves <palves@redhat.com>
4896
4897 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4898 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4899
4900 2018-06-28 Tom Tromey <tom@tromey.com>
4901
4902 * coffread.c (coff_symfile_finish): Update.
4903 * xcoffread.c (xcoff_symfile_finish): Update.
4904 * elfread.c (elf_symfile_finish): Update.
4905 * symfile.h (dwarf2_free_objfile): Don't declare.
4906 * dwarf2read.c (_initialize_dwarf2_read): Use
4907 register_objfile_data_with_cleanup.
4908 (dwarf2_free_objfile): Now static. Change signature.
4909
4910 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4911
4912 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4913 option "-o" to add-symbol-file-load to add an offset to each
4914 section's load address.
4915 * symfile.c (set_objfile_default_section_offset): New function.
4916
4917 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4918
4919 * symfile.c (add_symbol_file_command): Make sure that sections
4920 with the same name are sorted in the same order.
4921
4922 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4923
4924 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4925 require the second argument. If omitted, load sections at the
4926 addresses specified in the file.
4927
4928 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4929
4930 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4931 (_initialize_symfile): Add option "-o" to symbol-file to add an
4932 offset to each section of the symbol file.
4933
4934 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4935
4936 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4937
4938 2018-06-27 Tom Tromey <tom@tromey.com>
4939
4940 * stack.c (_initialize_stack): Update "func" help text.
4941
4942 2018-06-27 Tom Tromey <tom@tromey.com>
4943
4944 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4945 std::vector.
4946 (unwind_infopy_str, pyuw_create_unwind_info)
4947 (unwind_infopy_add_saved_register, pyuw_sniffer)
4948 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4949 Update.
4950 (struct saved_reg): Add constructor.
4951 <value>: Now a gdbpy_ref<>.
4952
4953 2018-06-27 Tom Tromey <tom@tromey.com>
4954
4955 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4956
4957 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4958
4959 * gdb-gdb.py.in: Format using autopep8.
4960
4961 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4964 (type_lookup_function): Recognize CORE_ADDR values.
4965
4966 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4967
4968 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4969 print tag_name.
4970
4971 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4972
4973 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4974 <__lt__>: Add.
4975
4976 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4977
4978 * gdb-gdb.py: Move to...
4979 * gdb-gdb.py.in: ... here.
4980 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4981 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4982 dependencies.
4983 (distclean): Remove gdb-gdb.py when cleaning.
4984 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4985 * configure: Re-generate.
4986
4987 2018-06-27 Pedro Alves <palves@redhat.com>
4988
4989 * proc-service.c (get_ps_regcache): New.
4990 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4991 (ps_lsetfpregs): Use it.
4992
4993 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4994
4995 PR gdb/21695
4996 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4997 (dwarf_decode_lines_1): Adjust.
4998
4999 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5000
5001 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5002 override.
5003 <info_proc>: Likewise.
5004
5005 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5006
5007 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5008 to windows_fetch_one_register, and only handle the case of
5009 fetching one register. Move the code that reloads the context
5010 and iterates over all registers if R is negative to...
5011 (windows_nat_target::fetch_registers): ... here.
5012 (do_windows_store_inferior_registers): Rename to
5013 windows_store_one_register, and only handle the case of storing
5014 one register. Move the code that handles the case where r is
5015 negative to...
5016 (windows_nat_target::store_registers) ... here.
5017
5018 2018-06-26 Tom Tromey <tom@tromey.com>
5019
5020 PR rust/22574:
5021 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5022 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5023 Update.
5024 (rust_internal_print_type): Add podata parameter.
5025 (rust_print_type): Update.
5026
5027 2018-06-26 Tom Tromey <tom@tromey.com>
5028
5029 * typeprint.h (struct print_offset_data) <update, finish,
5030 maybe_print_hole>: New methods.
5031 <indentation>: New constant.
5032 * typeprint.c (print_offset_data::indentation): Define.
5033 (print_offset_data::maybe_print_hole, print_offset_data::update)
5034 (print_offset_data::finish): Move from c-typeprint.c and rename.
5035 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5036 (print_spaces_filtered_with_print_options): Update.
5037 (c_print_type_union_field_offset, maybe_print_hole)
5038 (c_print_type_struct_field_offset): Move to typeprint.c and
5039 rename.
5040 (c_type_print_base_struct_union): Update.
5041
5042 2018-06-25 Pedro Alves <palves@redhat.com>
5043
5044 * gdbthread.h (thread_info_ref, delete_thread)
5045 (delete_thread_silent, first_thread_of_inferior)
5046 (any_thread_of_inferior, switch_to_thread)
5047 (enable_thread_stack_temporaries)
5048 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5049 (get_last_thread_stack_temporary)
5050 (value_in_thread_stack_temporaries, can_access_registers_thread):
5051 Spell out "struct thread_info" instead of just "thread_info".
5052 * inferior.h (notice_new_inferior): Likewise.
5053
5054 2018-06-25 Pedro Alves <palves@redhat.com>
5055
5056 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5057 pass thread_info pointer to delete_thread.
5058 (windows_nat_target::detach): Pass inferior pointer to
5059 detach_inferior.
5060 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5061 delete_thread.
5062 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5063 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5064 and pass a thread_info pointer to delete_thread.
5065 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5066 pass thread_info pointer to delete_thread.
5067 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5068 delete_thread_silent call.
5069 * procfs.c (procfs_target::detach): Pass inferior pointer to
5070 detach_inferior.
5071 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5072 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5073 delete_thread_silent call.
5074 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5075 pass thread_info pointer to delete_thread.
5076 (windows_nat_target::detach): Pass inferior pointer to
5077 delete_inferior.
5078
5079 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5080
5081 * regcache.c (readable_regcache::read_part): Fix asserts.
5082 (reg_buffer::raw_collect_part): New function.
5083 (regcache::write_part): Fix asserts.
5084 (reg_buffer::raw_supply_part): New function.
5085 (regcache::transfer_regset_register): New helper function.
5086 (regcache::transfer_regset): Call new functions.
5087 (regcache_supply_regset): Use gdb_byte*.
5088 (regcache::supply_regset): Likewise.
5089 (regcache_collect_regset): Likewise.
5090 (regcache::collect_regset): Likewise.
5091 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5092 (reg_buffer::raw_supply_part): Likewise.
5093 (regcache::transfer_regset_register): Likewise.
5094 (regcache::transfer_regset): Use gdb_byte*.
5095
5096 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5097
5098 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5099
5100 2018-06-21 Pedro Alves <palves@redhat.com>
5101
5102 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5103 instead of a ptid_t. All callers adjusted.
5104 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5105 adjusted.
5106 (print_ada_task_info, display_current_task_id, task_command_1):
5107 Adjust.
5108 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5109 inferior_thread.
5110 (breakpoint_kind): Adjust.
5111 (remove_breakpoints_pid): Rename to ...
5112 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5113 pointer. All callers adjusted.
5114 (bpstat_clear_actions): Use inferior_thread.
5115 (get_bpstat_thread): New.
5116 (bpstat_do_actions): Use it.
5117 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5118 to take a thread_info pointer. All callers adjusted.
5119 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5120 (breakpoint_re_set_thread): Use inferior_thread.
5121 * breakpoint.h (struct inferior): Forward declare.
5122 (bpstat_stop_status): Update.
5123 (remove_breakpoints_pid): Delete.
5124 (remove_breakpoints_inf): New.
5125 * bsd-uthread.c (bsd_uthread_target::wait)
5126 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5127 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5128 (maint_btrace_packet_history_cmd)
5129 (maint_btrace_clear_packet_history_cmd): Adjust.
5130 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5131 inferior_thread.
5132 * cli/cli-interp.c: Include "inferior.h".
5133 * common/refcounted-object.h (struct
5134 refcounted_object_ref_policy): New.
5135 * compile/compile-object-load.c: Include gdbthread.h.
5136 (store_regs): Use inferior_thread.
5137 * corelow.c (core_target::close): Use current_inferior.
5138 (core_target_open): Adjust to use first_thread_of_inferior and use
5139 the current inferior.
5140 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5141 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5142 <thread>: ... this new field. All references adjusted.
5143 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5144 Take a thread_info pointer instead of a ptid_t.
5145 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5146 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5147 thread_info pointer instead of a ptid_t.
5148 * elfread.c: Include "inferior.h".
5149 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5150 Use inferior_thread.
5151 * eval.c (evaluate_subexp): Likewise.
5152 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5153 inferior_thread.
5154 * gdb_proc_service.h (struct thread_info): Forward declare.
5155 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5156 <thread>: ... this new field. All references adjusted.
5157 * gdbarch.h, gdbarch.c: Regenerate.
5158 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5159 'thread' parameter. All implementations and callers adjusted.
5160 * gdbthread.h (thread_info) <set_running>: New method.
5161 (delete_thread, delete_thread_silent): Take a thread_info pointer
5162 instead of a ptid.
5163 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5164 (first_thread_of_process): Delete, replaced by ...
5165 (first_thread_of_inferior): ... this new function. All callers
5166 adjusted.
5167 (any_live_thread_of_process): Delete, replaced by ...
5168 (any_live_thread_of_inferior): ... this new function. All callers
5169 adjusted.
5170 (switch_to_thread, switch_to_no_thread): Declare.
5171 (is_executing): Delete.
5172 (enable_thread_stack_temporaries): Update comment.
5173 <enable_thread_stack_temporaries>: Take a thread_info pointer
5174 instead of a ptid_t. Incref the thread.
5175 <~enable_thread_stack_temporaries>: Decref the thread.
5176 <m_ptid>: Delete
5177 <m_thr>: New.
5178 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5179 (get_last_thread_stack_temporary)
5180 (value_in_thread_stack_temporaries, can_access_registers_thread):
5181 Take a thread_info pointer instead of a ptid_t. All callers
5182 adjusted.
5183 * infcall.c (get_call_return_value): Use inferior_thread.
5184 (run_inferior_call): Work with thread pointers instead of ptid_t.
5185 (call_function_by_hand_dummy): Work with thread pointers instead
5186 of ptid_t. Use thread_info_ref.
5187 * infcmd.c (proceed_thread_callback): Access thread's state
5188 directly.
5189 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5190 access thread's state directly.
5191 (continue_command): Use inferior_thread.
5192 (info_program_command): Use find_thread_ptid and access thread
5193 state directly.
5194 (proceed_after_attach_callback): Use thread state directly.
5195 (notice_new_inferior): Take a thread_info pointer instead of a
5196 ptid_t. All callers adjusted.
5197 (exit_inferior): Take an inferior pointer instead of a pid. All
5198 callers adjusted.
5199 (exit_inferior_silent): New.
5200 (detach_inferior): Delete.
5201 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5202 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5203 (detach_inferior_command, kill_inferior_command): Use
5204 find_inferior_id instead of valid_gdb_inferior_id and
5205 gdb_inferior_id_to_pid.
5206 (inferior_command): Use inferior and thread pointers.
5207 * inferior.h (struct thread_info): Forward declare.
5208 (notice_new_inferior): Take a thread_info pointer instead of a
5209 ptid_t. All callers adjusted.
5210 (detach_inferior): Delete declaration.
5211 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5212 instead of a pid. All callers adjusted.
5213 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5214 (valid_gdb_inferior_id): Delete.
5215 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5216 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5217 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5218 ...
5219 <inf>: ... this new field.
5220 <step_ptid>: Delete, replaced by ...
5221 <step_thread>: ... this new field.
5222 (get_displaced_stepping_state): Take an inferior pointer instead
5223 of a pid. All callers adjusted.
5224 (displaced_step_in_progress_any_inferior): Adjust.
5225 (displaced_step_in_progress_thread): Take a thread pointer instead
5226 of a ptid_t. All callers adjusted.
5227 (displaced_step_in_progress, add_displaced_stepping_state): Take
5228 an inferior pointer instead of a pid. All callers adjusted.
5229 (get_displaced_step_closure_by_addr): Adjust.
5230 (remove_displaced_stepping_state): Take an inferior pointer
5231 instead of a pid. All callers adjusted.
5232 (displaced_step_prepare_throw, displaced_step_prepare)
5233 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5234 All callers adjusted.
5235 (start_step_over): Adjust.
5236 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5237 displaced step queue.
5238 (do_target_resume): Adjust.
5239 (fetch_inferior_event): Use inferior_thread.
5240 (context_switch, get_inferior_stop_soon): Take an
5241 execution_control_state pointer instead of a ptid_t. All callers
5242 adjusted.
5243 (switch_to_thread_cleanup): Delete.
5244 (stop_all_threads): Use scoped_restore_current_thread.
5245 * inline-frame.c: Include "gdbthread.h".
5246 (inline_state) <inline_state>: Take a thread pointer instead of a
5247 ptid_t. All callers adjusted.
5248 <ptid>: Delete, replaced by ...
5249 <thread>: ... this new field.
5250 (find_inline_frame_state): Take a thread pointer instead of a
5251 ptid_t. All callers adjusted.
5252 (skip_inline_frames, step_into_inline_frame)
5253 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5254 pointer instead of a ptid_t. All callers adjusted.
5255 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5256 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5257 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5258 pointers directly.
5259 * linux-nat.c (get_detach_signal): Likewise.
5260 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5261 (thread_db_notice_clone): Adjust.
5262 (thread_db_find_new_threads_silently)
5263 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5264 a thread pointer instead of a ptid_t. All callers adjusted.
5265 * mi/mi-cmd-var.c: Include "inferior.h".
5266 (mi_cmd_var_update_iter): Update to use thread pointers.
5267 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5268 inferior directly.
5269 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5270 out to ...
5271 (mi_output_running): ... this new function.
5272 (mi_on_resume_1): Adjust to use it.
5273 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5274 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5275 directly.
5276 (interrupt_thread_callback): : Adjust to use thread and inferior
5277 pointers.
5278 * proc-service.c: Include "gdbthread.h".
5279 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5280 * progspace-and-thread.c: Include "inferior.h".
5281 * progspace.c: Include "inferior.h".
5282 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5283 hold a reference to an inferior_object.
5284 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5285 inferior_thread.
5286 * python/py-inferior.c (struct inferior_object): Give the type a
5287 tag name instead of a typedef.
5288 (python_on_normal_stop): No need to check if the current thread is
5289 listed.
5290 (inferior_to_inferior_object): Change return type to
5291 inferior_object. All callers adjusted.
5292 (find_thread_object): Delete, bits factored out to ...
5293 (thread_to_thread_object): ... this new function.
5294 * python/py-infthread.c (create_thread_object): Use
5295 inferior_to_inferior_object.
5296 (thpy_is_stopped): Use thread pointer directly.
5297 (gdbpy_selected_thread): Use inferior_thread.
5298 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5299 field, replaced with ...
5300 <thread>: ... this new field. All users adjusted.
5301 (btpy_insn_or_gap_new): Drop const.
5302 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5303 callers adjusted.
5304 * python/py-record.c: Include "gdbthread.h".
5305 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5306 a ptid_t. All callers adjusted.
5307 (gdbpy_current_recording): Use inferior_thread.
5308 * python/py-record.h (recpy_record_object) <ptid>: Delete
5309 field, replaced with ...
5310 <thread>: ... this new field. All users adjusted.
5311 (recpy_element_object) <ptid>: Delete
5312 field, replaced with ...
5313 <thread>: ... this new field. All users adjusted.
5314 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5315 a ptid_t. All callers adjusted.
5316 * python/py-threadevent.c: Include "gdbthread.h".
5317 (get_event_thread): Use thread_to_thread_object.
5318 * python/python-internal.h (struct inferior_object): Forward
5319 declare.
5320 (find_thread_object, find_inferior_object): Delete declarations.
5321 (thread_to_thread_object, inferior_to_inferior_object): New
5322 declarations.
5323 * record-btrace.c: Include "inferior.h".
5324 (require_btrace_thread): Use inferior_thread.
5325 (record_btrace_frame_sniffer)
5326 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5327 (get_thread_current_frame): Use scoped_restore_current_thread and
5328 switch_to_thread.
5329 (get_thread_current_frame): Use thread pointer directly.
5330 (record_btrace_replay_at_breakpoint): Use thread's inferior
5331 pointer directly.
5332 * record-full.c: Include "inferior.h".
5333 * regcache.c: Include "gdbthread.h".
5334 (get_thread_arch_regcache): Use the inferior's address space
5335 directly.
5336 (get_thread_regcache, registers_changed_thread): New.
5337 * regcache.h (get_thread_regcache(thread_info *thread)): New
5338 overload.
5339 (registers_changed_thread): New.
5340 (remote_target) <remote_detach_1>: Swap order of parameters.
5341 (remote_add_thread): <remote_add_thread>: Return the new thread.
5342 (get_remote_thread_info(ptid_t)): New overload.
5343 (remote_target::remote_notice_new_inferior): Use thread pointers
5344 directly.
5345 (remote_target::process_initial_stop_replies): Use
5346 thread_info::set_running.
5347 (remote_target::remote_detach_1, remote_target::detach)
5348 (extended_remote_target::detach): Adjust.
5349 * stack.c (frame_show_address): Use inferior_thread.
5350 * target-debug.h (target_debug_print_thread_info_pp): New.
5351 * target-delegates.c: Regenerate.
5352 * target.c (default_thread_address_space): Delete.
5353 (memory_xfer_partial_1): Use current_inferior.
5354 (target_detach): Use current_inferior.
5355 (target_thread_address_space): Delete.
5356 (generic_mourn_inferior): Use current_inferior.
5357 * target.h (struct target_ops) <thread_address_space>: Delete.
5358 (target_thread_address_space): Delete.
5359 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5360 pointers directly.
5361 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5362 thread pointer instead of a ptid_t. Adjust all callers.
5363 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5364 (first_thread_of_process): Delete, replaced by ...
5365 (first_thread_of_inferior): ... this new function. All callers
5366 adjusted.
5367 (any_thread_of_process): Rename to ...
5368 (any_thread_of_inferior): ... this, and take an inferior pointer.
5369 (any_live_thread_of_process): Rename to ...
5370 (any_live_thread_of_inferior): ... this, and take an inferior
5371 pointer.
5372 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5373 (value_in_thread_stack_temporaries)
5374 (get_last_thread_stack_temporary): Take a thread pointer instead
5375 of a ptid_t. Adjust all callers.
5376 (thread_info::set_running): New.
5377 (validate_registers_access): Use inferior_thread.
5378 (can_access_registers_ptid): Rename to ...
5379 (can_access_registers_thread): ... this, and take a thread
5380 pointer.
5381 (print_thread_info_1): Adjust to compare thread pointers instead
5382 of ptids.
5383 (switch_to_no_thread, switch_to_thread): Make extern.
5384 (scoped_restore_current_thread::~scoped_restore_current_thread):
5385 Use m_thread pointer directly.
5386 (scoped_restore_current_thread::scoped_restore_current_thread):
5387 Use inferior_thread.
5388 (thread_command): Use thread pointer directly.
5389 (thread_num_make_value_helper): Use inferior_thread.
5390 * top.c (execute_command): Use inferior_thread.
5391 * tui/tui-interp.c: Include "inferior.h".
5392 * varobj.c (varobj_create): Use inferior_thread.
5393 (value_of_root_1): Use find_thread_global_id instead of
5394 global_thread_id_to_ptid.
5395
5396 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5397
5398 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5399 possible.
5400 (regcache::write_part): Likewise.
5401 (readable_regcache::cooked_read_part): Update comment.
5402 (readable_regcache::cooked_write_part): Likewise.
5403 * regcache.h: (readable_regcache::read_part): Likewise.
5404 (regcache::write_part): Likewise.
5405
5406 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5407 Dirk Schubert <dirk.schubert@arm.com>
5408
5409 * aarch64-linux-nat.c (post_attach): New.
5410 (aarch64_linux_nat_target::post_attach): Override post_attach to
5411 record the number of hardware debug registers.
5412
5413 2018-06-20 Tom Tromey <tom@tromey.com>
5414
5415 * python/py-param.c (add_setshow_generic): Make parameters const.
5416 (parmpy_init): Update.
5417
5418 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5419
5420 * regcache.h (regcache_cooked_read_ftype): Rename to...
5421 (register_read_ftype): ...this, change type to function_view.
5422 (class reg_buffer) <save>: Remove src parameter.
5423 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5424 parameter non-const in first overload. Remove src parameter in
5425 second overload.
5426 * regcache.c (do_cooked_read): Remove.
5427 (readonly_detached_regcache::readonly_detached_regcache): Make
5428 parameter non-const, adjust call to other constructor.
5429 (reg_buffer::save): Remove src parameter.
5430 * frame.c (do_frame_register_read): Remove.
5431 (frame_save_as_regcache): Use lambda function.
5432 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5433 parameter to ppu2spu_data *.
5434 (ppu2spu_sniffer): Use lambda function.
5435
5436 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5437
5438 * record-full.c (record_full_target::insert_breakpoint): Remove
5439 "struct" keyword, add const.
5440
5441 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5442
5443 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5444 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5445 * configure.ac: Remove AC_PREREQ, add missing quoting.
5446 * gnulib/configure.ac: Modernize usage of
5447 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5448 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5449 (AUTOMAKE_VERSION): Bump to 1.15.1.
5450 * configure: Re-generate.
5451 * config.in: Re-generate.
5452 * aclocal.m4: Re-generate.
5453 * gnulib/aclocal.m4: Re-generate.
5454 * gnulib/config.in: Re-generate.
5455 * gnulib/configure: Re-generate.
5456 * gnulib/import/Makefile.in: Re-generate.
5457
5458 2018-06-19 Pedro Alves <palves@redhat.com>
5459
5460 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5461 (lookup_minimal_symbol_by_pc_section): ... here with
5462 gdb_assert_not_reached added.
5463
5464 2018-06-19 Pedro Alves <palves@redhat.com>
5465
5466 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5467 parameter with a block parameter. Compare location's block symbol
5468 with the frame's block instead of addresses.
5469 (skip_inline_frames): Pass the current block instead of the
5470 frame's address. Break out as soon as we determine the frame
5471 should not be skipped.
5472
5473 2018-06-18 Tom Tromey <tom@tromey.com>
5474
5475 * solib-aix.c (solib_aix_get_section_offsets): Return
5476 unique_xmalloc_ptr.
5477 (solib_aix_solib_create_inferior_hook): Update.
5478
5479 2018-06-18 Tom Tromey <tom@tromey.com>
5480
5481 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5482
5483 2018-06-18 Tom Tromey <tom@tromey.com>
5484
5485 * solib-frv.c (frv_relocate_main_executable): Use
5486 unique_xmalloc_ptr.
5487 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5488 unique_xmalloc_ptr.
5489
5490 2018-06-18 Tom Tromey <tom@tromey.com>
5491
5492 * objfiles.h (inhibit_section_map_updates): Update.
5493 (resume_section_map_updates, resume_section_map_updates_cleanup):
5494 Remove.
5495 * solib-svr4.c (svr4_handle_solib_event): Update.
5496 * objfiles.c (inhibit_section_map_updates): Return
5497 scoped_restore_tmpl<int>.
5498 (resume_section_map_updates, resume_section_map_updates_cleanup):
5499 Remove.
5500
5501 2018-06-18 Tom Tromey <tom@tromey.com>
5502
5503 * valprint.h (read_string): Update.
5504 * valprint.c (read_string): Change type of "buffer".
5505 (val_print_string): Update.
5506 * python/py-value.c (valpy_string): Update.
5507 * language.h (struct language_defn) <la_get_string>: Change
5508 type of "buffer".
5509 (default_get_string, c_get_string): Update.
5510 * language.c (default_get_string): Change type of "buffer".
5511 * guile/scm-value.c (gdbscm_value_to_string): Update.
5512 * c-lang.c (c_get_string): Change type of "buffer".
5513
5514 2018-06-18 Tom Tromey <tom@tromey.com>
5515
5516 * ser-mingw.c (struct pipe_state_destroyer): New.
5517 (pipe_state_up): New typedef.
5518 (cleanup_pipe_state): Remove.
5519 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5520
5521 2018-06-18 Tom Tromey <tom@tromey.com>
5522
5523 * rust-lang.h (rust_yyerror): Don't declare.
5524 * rust-lang.c (rust_language_defn): Update.
5525 * rust-exp.y (yyerror): Now static.
5526 * parse.c (parse_exp_in_context_1): Update.
5527 * p-lang.h (p_yyerror): Don't declare.
5528 * p-lang.c (p_language_defn): Update.
5529 * p-exp.y (yyerror): Now static.
5530 * opencl-lang.c (opencl_language_defn): Update.
5531 * objc-lang.c (objc_language_defn): Update.
5532 * m2-lang.h (m2_yyerror): Don't declare.
5533 * m2-lang.c (m2_language_defn): Update.
5534 * m2-exp.y (yyerror): Now static.
5535 * language.h (struct language_defn) <la_error>: Remove.
5536 * language.c (unk_lang_error): Remove.
5537 (unknown_language_defn, auto_language_defn): Remove.
5538 * go-lang.h (go_yyerror): Don't declare.
5539 * go-lang.c (go_language_defn): Update.
5540 * go-exp.y (yyerror): Now static.
5541 * f-lang.h (f_yyerror): Don't declare.
5542 * f-lang.c (f_language_defn): Update.
5543 * f-exp.y (yyerror): Now static.
5544 * d-lang.h (d_yyerror): Don't declare.
5545 * d-lang.c (d_language_defn): Update.
5546 * d-exp.y (yyerror): Now static.
5547 * c-lang.h (c_yyerror): Don't declare.
5548 * c-lang.c (c_language_defn, cplus_language_defn)
5549 (asm_language_defn, minimal_language_defn): Update.
5550 * c-exp.y (yyerror): Now static.
5551 * ada-lang.h (ada_yyerror): Don't declare.
5552 * ada-lang.c (ada_language_defn): Update.
5553 * ada-exp.y (yyerror): Now static.
5554
5555 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5556
5557 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5558 (store_sveregs_to_thread): Likewise.
5559 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5560 (aarch64_linux_store_inferior_registers): Likewise.
5561 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5562 function.
5563 (aarch64_sve_regs_copy_to_regcache): Likewise.
5564 (aarch64_sve_regs_copy_from_regcache): Likewise.
5565 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5566 declaration.
5567 (aarch64_sve_regs_copy_to_regcache): Likewise.
5568 (aarch64_sve_regs_copy_from_regcache): Likewise.
5569 (sve_context): Structure from Linux headers.
5570 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5571 (SVE_SIG_ZREG_SIZE): Likewise.
5572 (SVE_SIG_PREG_SIZE): Likewise.
5573 (SVE_SIG_FFR_SIZE): Likewise.
5574 (SVE_SIG_REGS_OFFSET): Likewise.
5575 (SVE_SIG_ZREGS_OFFSET): Likewise.
5576 (SVE_SIG_ZREG_OFFSET): Likewise.
5577 (SVE_SIG_ZREGS_SIZE): Likewise.
5578 (SVE_SIG_PREGS_OFFSET): Likewise.
5579 (SVE_SIG_PREG_OFFSET): Likewise.
5580 (SVE_SIG_PREGS_SIZE): Likewise.
5581 (SVE_SIG_FFR_OFFSET): Likewise.
5582 (SVE_SIG_REGS_SIZE): Likewise.
5583 (SVE_SIG_CONTEXT_SIZE): Likewise.
5584 (SVE_PT_REGS_MASK): Likewise.
5585 (SVE_PT_REGS_FPSIMD): Likewise.
5586 (SVE_PT_REGS_SVE): Likewise.
5587 (SVE_PT_VL_INHERIT): Likewise.
5588 (SVE_PT_VL_ONEXEC): Likewise.
5589 (SVE_PT_REGS_OFFSET): Likewise.
5590 (SVE_PT_FPSIMD_OFFSET): Likewise.
5591 (SVE_PT_FPSIMD_SIZE): Likewise.
5592 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5593 (SVE_PT_SVE_PREG_SIZE): Likewise.
5594 (SVE_PT_SVE_FFR_SIZE): Likewise.
5595 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5596 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5597 (__SVE_SIG_TO_PT): Likewise.
5598 (SVE_PT_SVE_OFFSET): Likewise.
5599 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5600 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5601 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5602 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5603 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5604 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5605 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5606 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5607 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5608 (SVE_PT_SVE_SIZE): Likewise.
5609 (SVE_PT_SIZE): Likewise.
5610 (HAS_SVE_STATE): New define.
5611
5612 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5613
5614 * nat/aarch64-sve-linux-sigcontext.h: New file.
5615 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5616 new files.
5617 (SVE_VQ_MIN): Likewise.
5618 (SVE_VQ_MAX): Likewise.
5619 (SVE_VL_MIN): Likewise.
5620 (SVE_VL_MAX): Likewise.
5621 (SVE_NUM_ZREGS): Likewise.
5622 (SVE_NUM_PREGS): Likewise.
5623 (sve_vl_valid): Likewise.
5624 (struct user_sve_header): Likewise.
5625
5626 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5627 Richard Bunt <Richard.Bunt@arm.com>
5628
5629 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5630 was requested by GDB.
5631
5632 2018-06-15 Tom de Vries <tdevries@suse.de>
5633
5634 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5635
5636 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5637
5638 * gnulib/update-gnulib.sh: Print expected versions of
5639 autoconf/aclocal.
5640
5641 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5642
5643 * arch-utils.c (default_type_align): Use type_length_units.
5644 * gdbtypes.c (type_align): Use type_length_units.
5645
5646 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5647
5648 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5649 of 'define' command.
5650
5651 2018-06-14 Tom de Vries <tdevries@suse.de>
5652
5653 PR cli/22573
5654 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5655 get_no_prettyformat_print_options.
5656
5657 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5658
5659 * sparc-nat.h: Include target.h.
5660 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5661 <fetch_registers>: Remove this argument in function call.
5662 <store_registers>: Remove this argument in function call, remove
5663 extra semicolon.
5664 <low_forget_process>: Call sparc64_forget_process instead of
5665 sparc_forget_process.
5666
5667 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5668
5669 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5670 (procfs_target::make_corefile_notes): Adjust to new
5671 target_read_alloc return type.
5672
5673 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5674 Stephen Roberts <stephen.roberts@arm.com>
5675
5676 PR gdb/22882
5677 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5678 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5679 Move should_notify_stop local into more inner scope.
5680
5681 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5682 Stephen Roberts <stephen.roberts@arm.com>
5683
5684 PR gdb/22882
5685 * infrun.c (resume_1): Add call to mark_async_event_handler.
5686
5687 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5688
5689 * infrun.c (do_target_wait): Change old version of $pc printed.
5690
5691 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5692
5693 * dwarf2read.c (read_index_from_section): Rename to...
5694 (read_gdb_index_from_section): ... this, update all callers.
5695 (dwarf2_read_index): Rename to...
5696 (dwarf2_read_gdb_index): ... this, update all callers.
5697
5698 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5699
5700 * gdb/hppa-linux-nat.c
5701 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5702 hppa_linux_nat_target::fetch_registers.
5703
5704 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5705
5706 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5707 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5708 (AARCH64_DWARF_SVE_FFR): Likewise.
5709 (AARCH64_DWARF_SVE_P0): Likewise.
5710 (AARCH64_DWARF_SVE_Z0): Likewise.
5711
5712 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5713
5714 * common/common-regcache.h (raw_compare): New function.
5715 * regcache.c (regcache::raw_compare): Likewise.
5716 * regcache.h (regcache::raw_compare): New declaration.
5717
5718 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5719
5720 * common/common-regcache.h (reg_buffer_common): New structure.
5721 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5722 (reg_buffer::raw_supply): Likewise.
5723 (reg_buffer::raw_supply_integer): Likewise.
5724 (reg_buffer::raw_supply_zeroed): Likewise.
5725 (reg_buffer::raw_collect): Likewise.
5726 (reg_buffer::raw_collect_integer): Likewise.
5727 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5728 (reg_buffer::raw_supply): Likewise.
5729 (reg_buffer::raw_supply_integer): Likewise.
5730 (reg_buffer::raw_supply_zeroed): Likewise.
5731 (reg_buffer::raw_collect): Likewise.
5732 (reg_buffer::raw_collect_integer): Likewise.
5733
5734 2018-06-10 Tom Tromey <tom@tromey.com>
5735
5736 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5737 (class remote_state) <stop_reply_queue>: Now std::vector.
5738 (remote_state::~remote_state)
5739 (remote_target::stop_reply_queue_length): Update.
5740 (struct queue_iter_param, remove_child_of_pending_fork)
5741 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5742 (check_pending_event_prevents_wildcard_vcont_callback)
5743 (remove_stop_reply_for_inferior)
5744 (remove_stop_reply_of_remote_state)
5745 (remote_notif_remove_once_on_match)
5746 (stop_reply_match_ptid_and_ws)
5747 (remote_kill_child_of_pending_fork): Remove.
5748 (remote_target::remove_new_fork_children)
5749 (remote_target::check_pending_events_prevent_wildcard_vcont)
5750 (remote_target::discard_pending_stop_replies)
5751 (remote_target::discard_pending_stop_replies_in_queue)
5752 (remote_target::remote_notif_remove_queued_reply)
5753 (remote_target::queued_stop_reply)
5754 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5755 (remote_target::wait, remote_target::kill_new_fork_children)
5756 (remote_target::async): Update.
5757
5758 2018-06-10 Tom Tromey <tom@tromey.com>
5759
5760 * record-full.c (record_full_arch_list_cleanups): Remove.
5761 (record_full_message): Use try/catch.
5762 (record_full_wait_cleanups): Remove.
5763 (record_full_wait_1): Use try/catch.
5764 (record_full_restore): Likewise.
5765
5766 2018-06-10 Tom Tromey <tom@tromey.com>
5767
5768 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5769 declare VEC. Add constructor.
5770 <in_target_beneath>: Now bool.
5771 (record_full_breakpoints): Now a std::vector, static.
5772 (record_full_sync_record_breakpoints)
5773 (record_full_init_record_breakpoints)
5774 (record_full_target::insert_breakpoint)
5775 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5776
5777 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5778
5779 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5780 * serial.c (serial_interface_lookup): Remove struct keyword.
5781
5782 2018-06-10 Tom Tromey <tom@tromey.com>
5783
5784 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5785 method.
5786 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5787 a method.
5788 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5789 method.
5790 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5791 "beneath" as a method.
5792 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5793 Use "beneath" as a method.
5794
5795 2018-06-10 Tom Tromey <tom@tromey.com>
5796
5797 * tracefile.c (struct trace_file_writer_deleter): New.
5798 <operator()>: Rename from trace_file_writer_xfree.
5799 (trace_file_writer_up): New typedef.
5800 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5801
5802 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5803
5804 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5805 <m_registers, m_register_status>: Change type to
5806 std::unique_ptr.
5807 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5808 XCNEWVEC.
5809
5810 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * common/common-regcache.h (enum register_status): Add
5813 underlying type "signed char".
5814 * regcache.h (reg_buffer) <m_register_status>: Change type to
5815 register_status *.
5816 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5817 register_status instead of signed char.
5818 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5819 (reg_buffer::get_register_status): Remove cast.
5820 (readable_regcache::raw_read): Remove cast.
5821 (readable_regcache::cooked_read): Remove cast.
5822
5823 2018-06-09 Tom Tromey <tom@tromey.com>
5824
5825 * source.c (reverse_search_command, forward_search_command): Use
5826 scoped_fd.
5827
5828 2018-06-09 Tom Tromey <tom@tromey.com>
5829
5830 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5831 (serial_ops_list): Now static, std::vector.
5832 (serial_interface_lookup, serial_add_interface): Update.
5833
5834 2018-06-09 Tom Tromey <tom@tromey.com>
5835
5836 * dwarf2read.c (process_cu_includes): Update.
5837 (process_full_comp_unit): Update.
5838 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5839 std::vector.
5840
5841 2018-06-08 Paul Koning <paul_koning@dell.com>
5842
5843 PR gdb/23252
5844
5845 * python/python.c (do_start_initialization):
5846 Avoid call to internal Python API.
5847 (init__gdb_module): New function.
5848
5849 2018-06-08 Gary Benson <gbenson@redhat.com>
5850
5851 * linux-thread-db.c (valprint.h): New include.
5852 (struct check_thread_db_info): New structure.
5853 (check_thread_db_on_load, tdb_testinfo): New static globals.
5854 (check_thread_db, check_thread_db_callback): New functions.
5855 (try_thread_db_load_1): Run integrity checks if requested.
5856 (maintenance_check_libthread_db): New function.
5857 (_initialize_thread_db): Register "maint check libthread-db"
5858 and "maint set/show check-libthread-db".
5859 * NEWS: Mention the above new commands.
5860
5861 2018-06-08 Tom Tromey <tom@tromey.com>
5862
5863 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5864 now a method.
5865
5866 2018-06-08 Tom Tromey <tom@tromey.com>
5867
5868 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5869
5870 2018-06-08 Tom Tromey <tom@tromey.com>
5871
5872 * common/btrace-common.h (struct btrace_data): Add constructor,
5873 destructor, move assignment operator.
5874 <empty, clear, fini>: New methods.
5875 <format>: Initialize.
5876 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5877 (btrace_data_empty): Don't declare.
5878 * common/btrace-common.c (btrace_data_init): Remove.
5879 (btrace_data::fini): Rename from btrace_data_fini.
5880 (btrace_data::empty): Rename from btrace_data_empty.
5881 (btrace_data::clear): Rename from btrace_data_clear. Return
5882 bool.
5883 * btrace.h (make_cleanup_btrace_data): Don't declare.
5884 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5885 (parse_xml_btrace): Update.
5886 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5887 (maint_btrace_clear_packet_history_cmd): Update.
5888
5889 2018-06-07 Pedro Alves <palves@redhat.com>
5890
5891 * target.h (target_ops) <beneath>: Now a method. All references
5892 updated.
5893 (class target_stack): New.
5894 * target.c (g_target_stack): New.
5895 (g_current_top_target): Delete.
5896 (current_top_target): Get the top target out of g_target_stack.
5897 (target_stack::push, target_stack::unpush): New.
5898 (push_target, unpush_target): Reimplement.
5899 (target_is_pushed): Reimplement in terms of g_target_stack.
5900 (target_ops::beneath, target_stack::find_beneath): New.
5901
5902 2018-06-07 Pedro Alves <palves@redhat.com>
5903
5904 * target.h (find_target_beneath): Delete declaration.
5905 * target.c (find_target_beneath): Delete definition.
5906 * aix-thread.c: All callers of find_target_beneath adjusted to
5907 call target_ops::beneath instead.
5908 * bsd-uthread.c: Likewise.
5909 * linux-thread-db.c: Likewise.
5910 * ravenscar-thread.c: Likewise.
5911 * sol-thread.c: Likewise.
5912 * spu-multiarch.c: Likewise.
5913
5914 2018-06-07 Pedro Alves <palves@redhat.com>
5915
5916 * target.h (target_ops) <beneath>: Now a method. All references
5917 updated.
5918 (target_ops) <m_beneath>: New.
5919 * target.c (target_ops::beneath): New.
5920 * corelow.c: Adjust all references to target_ops::beneath.
5921 * linux-thread-db.c: Likewise.
5922 * make-target-delegates: Likewise.
5923 * record-btrace.c: Likewise.
5924 * record-full.c: Likewise.
5925 * remote.c: Likewise.
5926 * target.c: Likewise.
5927 * target-delegates.c: Regenerate.
5928
5929 2018-06-07 Pedro Alves <palves@redhat.com>
5930
5931 * target.h (target_stack): Delete.
5932 (current_top_target): Declare function.
5933 * target.c (target_stack): Delete.
5934 (g_current_top_target): New.
5935 (current_top_target): New function.
5936 * auxv.c: Use current_top_target instead of target_stack
5937 throughout.
5938 * avr-tdep.c: Likewise.
5939 * breakpoint.c: Likewise.
5940 * corefile.c: Likewise.
5941 * elfread.c: Likewise.
5942 * eval.c: Likewise.
5943 * exceptions.c: Likewise.
5944 * frame.c: Likewise.
5945 * gdbarch-selftests.c: Likewise.
5946 * gnu-v3-abi.c: Likewise.
5947 * ia64-tdep.c: Likewise.
5948 * ia64-vms-tdep.c: Likewise.
5949 * infcall.c: Likewise.
5950 * infcmd.c: Likewise.
5951 * infrun.c: Likewise.
5952 * linespec.c: Likewise.
5953 * linux-tdep.c: Likewise.
5954 * minsyms.c: Likewise.
5955 * ppc-linux-nat.c: Likewise.
5956 * ppc-linux-tdep.c: Likewise.
5957 * procfs.c: Likewise.
5958 * regcache.c: Likewise.
5959 * remote.c: Likewise.
5960 * rs6000-tdep.c: Likewise.
5961 * s390-linux-nat.c: Likewise.
5962 * s390-tdep.c: Likewise.
5963 * solib-aix.c: Likewise.
5964 * solib-darwin.c: Likewise.
5965 * solib-dsbt.c: Likewise.
5966 * solib-spu.c: Likewise.
5967 * solib-svr4.c: Likewise.
5968 * solib-target.c: Likewise.
5969 * sparc-tdep.c: Likewise.
5970 * sparc64-tdep.c: Likewise.
5971 * spu-tdep.c: Likewise.
5972 * symfile.c: Likewise.
5973 * symtab.c: Likewise.
5974 * target-descriptions.c: Likewise.
5975 * target-memory.c: Likewise.
5976 * target.c: Likewise.
5977 * target.h: Likewise.
5978 * tracefile-tfile.c: Likewise.
5979 * tracepoint.c: Likewise.
5980 * valops.c: Likewise.
5981 * valprint.c: Likewise.
5982 * value.c: Likewise.
5983 * windows-tdep.c: Likewise.
5984 * mi/mi-main.c: Likewise.
5985
5986 2018-06-07 Tom Tromey <tom@tromey.com>
5987
5988 * valprint.h (build_address_symbolic): Declare.
5989 * printcmd.c (print_address_symbolic): Update.
5990 (build_address_symbolic): Change "name" and "filename" to
5991 std::string.
5992 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5993 Update.
5994 * defs.h (build_address_symbolic): Remove declaration.
5995
5996 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5997
5998 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5999 (aarch64_vnv_type): Add function.
6000 (aarch64_pseudo_register_name): Add V regs for SVE.
6001 (aarch64_pseudo_register_type): Likewise.
6002 (aarch64_pseudo_register_reggroup_p): Likewise.
6003 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6004 (aarch64_pseudo_read_value): Add V regs for SVE.
6005 (aarch64_pseudo_write_2): Use V0 offset for SVE
6006 (aarch64_pseudo_write): Add V regs for SVE.
6007 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6008
6009 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6010
6011 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6012 (sve_vl_from_vq): Likewise.
6013
6014 2018-06-05 Tom Tromey <tom@tromey.com>
6015
6016 * cli/cli-cmds.c (show_version): Update.
6017 * top.c (print_gdb_version): Add "interactive" parameter.
6018 Update.
6019 * main.c (captured_main_1): Update.
6020 * top.h (print_gdb_version): Add "interactive" parameter and a
6021 comment.
6022
6023 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6024
6025 * common/enum-flags.h: Add trailing semicolon to example in
6026 comment.
6027
6028 2018-06-05 Tom Tromey <tom@tromey.com>
6029
6030 PR cli/12326:
6031 * NEWS: Add entry about pager.
6032 * utils.c (pagination_disabled_for_command): New global.
6033 (prompt_for_continue): Allow "c" response to prompt.
6034 (reinitialize_more_filter): Clear
6035 pagination_disabled_for_command.
6036 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6037
6038 2018-06-04 Tom Tromey <tom@tromey.com>
6039
6040 * ada-lang.h (ada_lookup_symbol_list): Update.
6041 * ada-lang.c (resolve_subexp): Update.
6042 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6043 parameter.
6044 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6045 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6046 results parameter to std::vector.
6047 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6048 Update.
6049 * ada-exp.y (block_lookup): Update.
6050 (select_possible_type_sym): Change type of syms. Remove nsyms
6051 parameter.
6052 (write_var_or_type, write_name_assoc): Update.
6053
6054 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6055
6056 * windows-nat.c (windows_nat_target::xfer_partial): Return
6057 TARGET_XFER_E_IO if we need to delegate to the target beneath
6058 but BENEATH is NULL.
6059
6060 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * Makefile.in (config.status): Add configure.nat as a
6063 dependency.
6064
6065 2018-06-04 Tom Tromey <tom@tromey.com>
6066
6067 * cp-name-parser.y (cpname_state): Add method declarations.
6068 (HANDLE_QUAL): Update.
6069 (cpname_state::d_grab, cpname_state::fill_comp)
6070 (cpname_state::make_operator, cpname_state::make_dtor)
6071 (cpname_state::make_builtin_type, cpname_state::make_name)
6072 (cpname_state::d_qualify, cpname_state::d_int_type)
6073 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6074 (%union): Move earlier.
6075
6076 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6077
6078 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6079
6080 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6081
6082 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6083 (aarch64_pseudo_write_1): Likewise.
6084 (aarch64_pseudo_read_value): Use helper.
6085 (aarch64_pseudo_write): Likewise.
6086
6087 2018-06-04 Pedro Alves <palves@redhat.com>
6088
6089 * darwin-nat.c (darwin_ops): Delete.
6090 (darwin_attach_pid): Use get_native_target.
6091
6092 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6093
6094 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6095 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6096
6097 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6098
6099 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6100 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6101 (aarch64_gdbarch_init): Check for SVE.
6102 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6103
6104 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6105
6106 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6107 * aarch64-tdep.h (aarch64_read_description): Likewise.
6108 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6109 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6110 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6111 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6112 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6113
6114 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6115
6116 * value.c (value_fetch_lazy_bitfield): New.
6117 (value_fetch_lazy_memory): New.
6118 (value_fetch_lazy_register): New.
6119 (value_fetch_lazy): Factor out to smaller functions.
6120
6121 2018-06-01 Tom Tromey <tom@tromey.com>
6122
6123 * cp-name-parser.y (backslashable, represented): Now const.
6124
6125 2018-06-01 Tom Tromey <tom@tromey.com>
6126
6127 * cp-name-parser.y: Include parser-defs.h.
6128 (parser_fprintf): Remove declaration.
6129
6130 2018-06-01 Tom Tromey <tom@tromey.com>
6131
6132 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6133 %parse-param.
6134 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6135 (global_result): Remove globals.
6136 (struct cpname_state): New.
6137 (yyparse): Don't declare.
6138 (yylex, yyerror): Move declarations after %union.
6139 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6140 (make_name): Add state parameter.
6141 Update all callers.
6142 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6143 parameter.
6144 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6145 Update.
6146 (yylex): Add lvalp, state parameters.
6147 (yyerror): Add state parameter.
6148 (cp_demangled_name_to_comp): Update.
6149
6150 2018-06-01 Tom Tromey <tom@tromey.com>
6151
6152 * cp-name-parser.y (parser_fprintf): Declare.
6153 (GDB_YY_REMAP_PREFIX): Define.
6154 Include yy-remap.h. Don't redefine yy* identifiers.
6155
6156 2018-06-01 Tom Tromey <tom@tromey.com>
6157
6158 * python/py-type.c (typy_legacy_template_argument): Update.
6159 * cp-support.h (cp_demangled_name_to_comp): Update.
6160 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6161 parameter to be a "std::string *".
6162 (main): Update.
6163
6164 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6165
6166 * ada-lex.l: Include "diagnostics.h" instead of
6167 "common/diagnostics.h".
6168 * unittests/environ-selftests.c: Likewise.
6169 * common/diagnostics.h: Moved to ../include.
6170
6171 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6172
6173 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6174 to language_mode_manual while calling breakpoint_re_set_one.
6175
6176 2018-06-01 Tom Tromey <tom@tromey.com>
6177
6178 * valops.c (value_cast_structs, destructor_name_p): Update.
6179 * symtab.c (gdb_mangle_name): Update.
6180 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6181 Update.
6182 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6183 (pascal_object_print_value_fields, pascal_object_print_value):
6184 Update.
6185 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6186 * linespec.c (find_methods): Update.
6187 * gdbtypes.h (type_name_no_tag): Remove.
6188 (type_name_or_error): Rename from type_name_no_tag_or_error.
6189 * gdbtypes.c (type_name_no_tag): Remove.
6190 (type_name_or_error): Rename from type_name_no_tag_or_error.
6191 (lookup_struct_elt_type, check_typedef): Update.
6192 * expprint.c (print_subexp_standard): Update.
6193 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6194 * d-namespace.c (d_lookup_nested_symbol): Update.
6195 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6196 (cp_print_class_member): Update.
6197 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6198 * completer.c (add_struct_fields): Update.
6199 * c-typeprint.c (cp_type_print_derivation_info)
6200 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6201 Update.
6202 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6203 (ada_prefer_type, ada_is_exception_sym): Update.
6204
6205 2018-06-01 Tom Tromey <tom@tromey.com>
6206
6207 * valops.c (enum_constant_from_type, value_namespace_elt)
6208 (value_maybe_namespace_elt): Update.
6209 * valarith.c (find_size_for_pointer_math): Update.
6210 * target-descriptions.c (make_gdb_type): Update.
6211 * symmisc.c (print_symbol): Update.
6212 * stabsread.c (define_symbol, read_type)
6213 (complain_about_struct_wipeout, add_undefined_type)
6214 (cleanup_undefined_types_1): Update.
6215 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6216 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6217 (rust_internal_print_type, rust_composite_type)
6218 (rust_evaluate_funcall, rust_evaluate_subexp)
6219 (rust_inclusive_range_type_p): Update.
6220 * python/py-type.c (typy_get_tag): Update.
6221 * p-typeprint.c (pascal_type_print_base): Update.
6222 * mdebugread.c (parse_symbol, parse_type): Update.
6223 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6224 Update.
6225 * guile/scm-type.c (gdbscm_type_tag): Update.
6226 * go-lang.c (sixg_string_p): Update.
6227 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6228 Update.
6229 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6230 (TYPE_TAG_NAME): Remove.
6231 * gdbtypes.c (type_name_no_tag): Simplify.
6232 (check_typedef, check_types_equal, recursive_dump_type)
6233 (copy_type_recursive, arch_composite_type): Update.
6234 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6235 in summary mode when needed.
6236 * eval.c (evaluate_funcall): Update.
6237 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6238 (process_structure_scope, read_enumeration_type)
6239 (read_namespace_type, read_module_type, determine_prefix): Update.
6240 * cp-support.c (inspect_type): Update.
6241 * coffread.c (process_coff_symbol, decode_base_type): Update.
6242 * c-varobj.c (c_is_path_expr_parent): Update.
6243 * c-typeprint.c (c_type_print_base_struct_union): Update.
6244 (c_type_print_base_1): Update. Print struct/class/union/enum in
6245 summary when using C language.
6246 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6247 (gen_maybe_namespace_elt): Update.
6248 * ada-lang.c (ada_type_name): Simplify.
6249 (empty_record, ada_template_to_fixed_record_type_1)
6250 (template_to_static_fixed_type)
6251 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6252
6253 2018-06-01 Tom Tromey <tom@tromey.com>
6254
6255 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6256 c_print_type.
6257 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6258 (c_print_type): Update.
6259 (c_print_type): New overload.
6260 (c_type_print_varspec_prefix, c_type_print_args)
6261 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6262 (c_type_print_base_struct_union, c_type_print_base_1)
6263 (cp_type_print_method_args): Add "language" parameter.
6264 (c_type_print_base): Update.
6265 * c-lang.h (c_print_type): Add new overload.
6266
6267 2018-06-01 Tom Tromey <tom@tromey.com>
6268
6269 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6270 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6271
6272 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6273
6274 * aarch64-tdep.c (aarch64_sve_register_names): New const
6275 var.
6276 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6277 (AARCH64_SVE_Z_REGS_NUM): New define.
6278 (AARCH64_SVE_P_REGS_NUM): Likewise.
6279 (AARCH64_SVE_NUM_REGS): Likewise.
6280
6281 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6282
6283 * nat/linux-ptrace.h [__alpha__]
6284 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6285 definitions.
6286
6287 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6288
6289 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6290 the endianness selected.
6291 * NEWS: Document `set endian auto' mode operation update.
6292
6293 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6294
6295 * Makefile.in: Add new header.
6296 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6297 (sve_vl_from_vg): Likewise.
6298 (sve_vq_from_vl): Likewise.
6299 (sve_vl_from_vq): Likewise.
6300 (sve_vq_from_vg): Likewise.
6301 (sve_vg_from_vq): Likewise.
6302 * configure.nat: Add new c file.
6303 * nat/aarch64-sve-linux-ptrace.c: New file.
6304 * nat/aarch64-sve-linux-ptrace.h: New file.
6305
6306 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6307
6308 * aarch64-linux-nat.c (aarch64_linux_read_description):
6309 Add parmeter zero.
6310 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6311 Likewise.
6312 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6313 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6314 (aarch64_gdbarch_init): Add parmeter zero.
6315 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6316 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6317 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6318 parmeter.
6319 * doc/gdb.texinfo: Describe SVE feature
6320 * features/aarch64-sve.c: New file.
6321
6322 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6323
6324 PR gdb/23210
6325 * gdbarch.sh (significant_addr_bit): Default to zero when
6326 not set by target architecture.
6327 * gdbarch.c: Re-generated.
6328 * utils.c (address_significant): Update.
6329
6330 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6331
6332 * stack.c (func_command): Remove trailing newline in call to error.
6333
6334 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6335
6336 * regcache.h (regcache_raw_collect): Remove, update callers to
6337 use regcache::raw_collect.
6338 * regcache.c (regcache_raw_collect): Remove.
6339
6340 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6341
6342 * regcache.h (regcache_raw_supply): Remove, update callers to
6343 use detached_regcache::raw_supply.
6344 * regcache.c (regcache_raw_supply): Remove.
6345
6346 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6347
6348 * regcache.h (regcache_cooked_write_part): Remove, update
6349 callers to use regcache::cooked_write_part.
6350 * regcache.c (regcache_cooked_write_part): Remove.
6351
6352 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6353
6354 * regcache.h (regcache_cooked_read_part): Remove, update callers
6355 to use readable_regcache::cooked_read_part.
6356 * regcache.c (regcache_cooked_read_part): Remove.
6357
6358 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6359
6360 * regcache.h (regcache_cooked_read_value): Remove, update
6361 callers to use readable_regcache::cooked_read_value.
6362 * regcache.c (regcache_cooked_read_value): Remove.
6363
6364 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6365
6366 * regcache.h (regcache_cooked_write): Remove, update callers to
6367 use regcache::cooked_write.
6368 * regcache.c (regcache_cooked_write): Remove.
6369
6370 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6371
6372 * regcache.h (regcache_invalidate): Remove, update callers to
6373 use detached_regcache::invalidate instead.
6374 * regcache.c (regcache_invalidate): Remove.
6375
6376 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6377
6378 * regcache.h (regcache_raw_write_part): Remove, update callers
6379 to use regcache::raw_write_part instead.
6380 * regcache.c (regcache_raw_write_part): Remove.
6381
6382 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6383
6384 * regcache.h (regcache_raw_read_part): Remove, update callers to
6385 use readable_regcache::raw_read_part instead.
6386 * regcache.c (regcache_raw_read_part): Remove.
6387
6388 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6389
6390 * regcache.h (regcache_cooked_read): Remove, update callers to
6391 use readable_regcache::cooked_read instead.
6392 * regcache.c (regcache_cooked_read): Remove.
6393
6394 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6395
6396 * regcache.h (regcache_raw_write): Remove, update callers to use
6397 regcache::raw_write instead.
6398 * regcache.c (regcache_raw_write): Remove.
6399
6400 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6401
6402 * regcache.h (regcache_raw_read): Remove, update callers to use
6403 readable_regcache::raw_read instead.
6404 * regcache.c (regcache_raw_read): Remove.
6405
6406 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6407
6408 * regcache.h (regcache_raw_update): Remove, update callers to
6409 use readable_regcache::raw_update instead.
6410 * regcache.c (regcache_raw_update): Remove.
6411
6412 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6413
6414 * regcache.h (regcache_register_status): Remove, update callers
6415 to use reg_buffer::get_register_status directly instead.
6416 * regcache.c (regcache_register_status): Remove.
6417
6418 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6419
6420 * regcache.h (regcache_get_ptid): Remove, update all callers to
6421 call regcache::ptid instead.
6422 * regcache.c (regcache_get_ptid): Remove.
6423
6424 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6425
6426 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6427
6428 2018-05-30 Pedro Alves <palves@redhat.com>
6429
6430 * common/common-exceptions.h (exception_rethrow): Use
6431 ATTRIBUTE_NORETURN.
6432
6433 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6434
6435 * breakpoint.c (print_solib_event, check_status_catch_solib):
6436 Remove struct keyword in range-based for loops.
6437 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6438 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6439 Likewise.
6440 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6441 Likewise.
6442 * symfile.c (addr_info_make_relative): Likewise.
6443 * thread.c (value_in_thread_stack_temporaries): Likewise.
6444
6445 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6446
6447 PR gdb/16841
6448 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6449 aggregate type to get its real type before accessing it.
6450
6451 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6452
6453 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6454 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6455 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6456 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6457 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6458 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6459 * printcmd.c (info_address_command): Likewise.
6460
6461 2018-05-29 Tom Tromey <tom@tromey.com>
6462
6463 * windows-nat.c (handle_exception): Update fall-through comment.
6464
6465 2018-05-29 Tom Tromey <tom@tromey.com>
6466
6467 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6468 (struct program_space) <added_solibs>: Now a std::vector.
6469 * breakpoint.c (print_solib_event): Update.
6470 (check_status_catch_solib): Update.
6471 * progspace.c (clear_program_space_solib_cache): Update.
6472 * solib.c (update_solib_list): Update.
6473
6474 2018-05-29 Tom Tromey <tom@tromey.com>
6475
6476 * python/py-type.c (typy_richcompare): Update.
6477 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6478 * gdbtypes.h (types_deeply_equal): Return bool.
6479 (types_equal): Likewise.
6480 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6481 declare VEC.
6482 (check_types_equal): Change worklist to std::vector. Return
6483 bool.
6484 (struct type_equality_entry): Add constructor.
6485 (compare_maybe_null_strings): Return bool.
6486 (check_types_worklist): Return bool. Change worklist to
6487 std::vector.
6488 (types_deeply_equal): Use std::vector.
6489 (types_equal): Return bool.
6490 (compare_maybe_null_strings): Simplify.
6491
6492 2018-05-29 Tom Tromey <tom@tromey.com>
6493
6494 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6495
6496 2018-05-29 Tom Tromey <tom@tromey.com>
6497
6498 * objc-lang.h: Don't include cp-support.h.
6499 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6500 declare VEC.
6501
6502 2018-05-27 Tom Tromey <tom@tromey.com>
6503
6504 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6505
6506 2018-05-25 Tom Tromey <tom@tromey.com>
6507
6508 * value.c (value::location): Initialize.
6509
6510 2018-05-25 Tom Tromey <tom@tromey.com>
6511
6512 * dbxread.c (init_bincl_list): Remove.
6513 (bincl_list): Now a std::vector.
6514 (bincls_allocated, next_bincl): Remove.
6515 (free_bincl_list, do_free_bincl_list_cleanup)
6516 (make_cleanup_free_bincl_list): Remove.
6517 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6518 unique_xmalloc_ptr.
6519 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6520 (struct header_file_location): Add constructor.
6521 (add_bincl_to_list): Remove.
6522
6523 2018-05-25 Tom Tromey <tom@tromey.com>
6524
6525 * tui/tui.c (tui_enable): Update.
6526 * mi/mi-interp.c (mi_interp::init): Update.
6527 * interps.h (class interp) <name>: New method.
6528 <m_name>: Rename from name.
6529 (~scoped_restore_interp): Update.
6530 * interps.c (interp::interp): Update.
6531 (interp_add, interp_set, interp_lookup_existing)
6532 (current_interp_named_p): Update.
6533
6534 2018-05-25 Tom Tromey <tom@tromey.com>
6535
6536 * interps.c (interp_name): Remove.
6537 * mi/mi-interp.c (mi_interp::init): Update.
6538 * interps.h (interp_name): Remove.
6539 (~scoped_restore_interp): Update.
6540 * tui/tui.c (tui_enable): Update.
6541
6542 2018-05-25 Tom Tromey <tom@tromey.com>
6543
6544 * utils.c (fputs_maybe_filtered): Update.
6545 * linespec.c (decode_line_full): Update.
6546 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6547 (mi_print_breakpoint_for_event, mi_solib_loaded)
6548 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6549 (mi_user_selected_context_changed): Update.
6550 * mi/mi-main.c (mi_execute_command): Update.
6551 * cli/cli-script.c (execute_control_command): Update.
6552 * python/python.c (execute_gdb_command): Update.
6553 * solib.c (info_sharedlibrary_command): Update.
6554 * interps.c (interp_ui_out): Remove.
6555 * interps.h (interp_ui_out): Remove.
6556
6557 2018-05-25 Tom Tromey <tom@tromey.com>
6558
6559 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6560 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6561 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6562
6563 2018-05-25 Tom Tromey <tom@tromey.com>
6564
6565 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6566 * interps.c (interp_exec): Use scoped_restore.
6567
6568 2018-05-25 Tom Tromey <tom@tromey.com>
6569
6570 * remote.c (remote_target::remote_file_get): Use
6571 gdb::byte_vector.
6572 (remote_target::remote_file_put): Likewise.
6573
6574 2018-05-25 Tom Tromey <tom@tromey.com>
6575
6576 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6577 a std::string.
6578 (get_pe_section_index, add_pe_exported_sym): Update.
6579 (read_pe_exported_syms): Use gdb::def_vector.
6580
6581 2018-05-25 Tom Tromey <tom@tromey.com>
6582
6583 * frame.c (remove_prev_frame): Remove.
6584 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6585
6586 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6587
6588 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6589 Remove prototypes.
6590 * mips-linux-nat.c (supply_fpregset): Always call
6591 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6592 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6593 `mips_fill_fpregset'.
6594 * mips-linux-tdep.c (mips_supply_fpregset)
6595 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6596 (mips_fill_fpregset_wrapper): Remove functions.
6597 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6598 (mips_linux_fpregset): Remove variable.
6599 (mips_linux_iterate_over_regset_sections): Use
6600 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6601 (mips_linux_o32_sigframe_init): Remove comment.
6602
6603 2018-05-25 Pedro Alves <palves@redhat.com>
6604
6605 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6606 (struct readahead_cache, struct packet_reg, struct
6607 remote_arch_state, class remote_state): Move higher up in the
6608 file.
6609 (remote_target::m_remote_state): Now an object instead of a pointer.
6610 (remote_target::get_remote_state): Adjust.
6611
6612 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6613
6614 * stack.c (select_and_print_frame): Delete.
6615 (struct function_bounds): Move struct within function.
6616 (func_command): Most content moved into new function
6617 find_frame_for_function, use new function, print result, add
6618 function comment.
6619 (find_frame_for_function): New function, now returns a result.
6620
6621 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6622
6623 * stack.c (iterate_over_block_arg_vars): Fix comment.
6624 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6625
6626 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6627
6628 PR gdb/23203
6629 * frame.c
6630 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6631 Define.
6632 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6633 Define.
6634 * frame.h (class scoped_restore_selected_frame): New class.
6635 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6636 of any exception, use scoped_restore_selected_frame to restore the
6637 frame instead.
6638
6639 2018-05-24 Pedro Alves <palves@redhat.com>
6640
6641 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6642 override.
6643
6644 2018-05-23 Tom Tromey <tom@tromey.com>
6645
6646 * complaints.c (struct complaints): Remove.
6647 (symfile_complaint_book): Remove.
6648 (series): New global.
6649 (complaint_internal): Update.
6650 (clear_complaints): Update.
6651
6652 2018-05-23 Tom Tromey <tom@tromey.com>
6653
6654 * complaints.c (counters): New global.
6655 (struct complain): Remove.
6656 (struct complaints) <root>: Remove.
6657 (complaint_sentinel): Remove.
6658 (symfile_complaint_book): Update.
6659 (find_complaint) Remove.
6660 (complaint_internal, clear_complaints): Update.
6661
6662 2018-05-23 Tom Tromey <tom@tromey.com>
6663
6664 * complaints.c (struct complain) <file, line>: Remove.
6665 (find_complaint): Remove file, line parameters.
6666 (complaint_internal): Update.
6667
6668 2018-05-23 Tom Tromey <tom@tromey.com>
6669
6670 * complaints.c (vcomplaint): Remove.
6671 (complaint_internal) Merge in contents of vcomplaint.
6672
6673 2018-05-23 Tom Tromey <tom@tromey.com>
6674
6675 * complaints.c (struct complaints) <explanation>: Remove.
6676 (symfile_explanations): Remove.
6677 (symfile_complaint_book): Update.
6678 (vcomplaint): Update.
6679 (struct explanation): Remove.
6680
6681 2018-05-23 Tom Tromey <tom@tromey.com>
6682
6683 * complaints.c (symfile_complaints): Remove.
6684 (complaint_internal): Remove "complaints" parameter.
6685 (clear_complaints, vcomplaint): Remove "c" parameter.
6686 (get_complaints): Remove.
6687 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6688 (dwarf2_debug_line_missing_file_complaint)
6689 (dwarf2_debug_line_missing_end_sequence_complaint)
6690 (dwarf2_complex_location_expr_complaint)
6691 (dwarf2_const_value_length_mismatch_complaint)
6692 (dwarf2_section_buffer_overflow_complaint)
6693 (dwarf2_macro_malformed_definition_complaint)
6694 (dwarf2_invalid_attrib_class_complaint)
6695 (create_addrmap_from_index, dw2_symtab_iter_next)
6696 (dw2_expand_marked_cus)
6697 (dw2_debug_names_iterator::find_vec_in_debug_names)
6698 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6699 (create_debug_type_hash_table, init_cutu_and_read_dies)
6700 (partial_die_parent_scope, add_partial_enumeration)
6701 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6702 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6703 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6704 (create_cus_hash_table, create_dwp_hash_table)
6705 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6706 (dwarf2_rnglists_process, dwarf2_ranges_process)
6707 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6708 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6709 (handle_struct_member_die, process_structure_scope)
6710 (read_array_type, read_common_block, read_module_type)
6711 (read_tag_pointer_type, read_typedef, read_base_type)
6712 (read_subrange_type, load_partial_dies, partial_die_info::read)
6713 (partial_die_info::read, partial_die_info::read)
6714 (partial_die_info::read, read_checked_initial_length_and_offset)
6715 (dwarf2_string_attr, read_formatted_entries)
6716 (dwarf_decode_line_header)
6717 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6718 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6719 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6720 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6721 (get_signatured_type, get_DW_AT_signature_type)
6722 (decode_locdesc, file_file_name, consume_improper_spaces)
6723 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6724 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6725 (dwarf2_symbol_mark_computed, set_die_type)
6726 (read_attribute_value): Update.
6727 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6728 Update.
6729 * dbxread.c (unknown_symtype_complaint)
6730 (lbrac_mismatch_complaint, repeated_header_complaint)
6731 (set_namestring, function_outside_compilation_unit_complaint)
6732 (read_dbx_symtab, process_one_symbol): Update.
6733 * gdbtypes.c (stub_noname_complaint): Update.
6734 * windows-nat.c (handle_unload_dll): Update.
6735 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6736 (decode_base_type): Update.
6737 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6738 (eb_complaint, record_include_begin, record_include_end)
6739 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6740 (process_xcoff_symbol, read_symbol)
6741 (function_outside_compilation_unit_complaint)
6742 (scan_xcoff_symtab): Update.
6743 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6744 * buildsym.c (finish_block_internal, make_blockvector)
6745 (end_symtab_get_static_block, augment_type_symtab): Update.
6746 * dtrace-probe.c (dtrace_process_dof)
6747 (dtrace_static_probe_ops::get_probes): Update.
6748 * complaints.h (struct complaint): Don't declare.
6749 (symfile_complaints): Remove.
6750 (complaint_internal): Remove "complaints" parameter.
6751 (complaint): Likewise.
6752 (clear_complaints): Likewise.
6753 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6754 (reread_symbols): Update.
6755 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6756 (dwarf2_frame_cache, decode_frame_entry): Update.
6757 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6758 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6759 (info_selectors_command): Update.
6760 * macrotab.c (macro_include, check_for_redefinition)
6761 (macro_undef): Update.
6762 * objfiles.c (filter_overlapping_sections): Update.
6763 * stabsread.c (invalid_cpp_abbrev_complaint)
6764 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6765 (define_symbol, error_type, read_type, rs6000_builtin_type)
6766 (stabs_method_name_from_physname, read_member_functions)
6767 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6768 (attach_fields_to_type, complain_about_struct_wipeout)
6769 (read_range_type, read_args, common_block_start)
6770 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6771 Update.
6772 * mdebugread.c (index_complaint, unknown_ext_complaint)
6773 (basic_type_complaint, bad_tag_guess_complaint)
6774 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6775 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6776 (parse_procedure, parse_lines)
6777 (function_outside_compilation_unit_complaint)
6778 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6779 (bad_tag_guess_complaint, reg_value_complaint): Update.
6780 * cp-support.c (demangled_name_complaint): Update.
6781 * macroscope.c (sal_macro_scope): Update.
6782 * dwarf-index-write.c (class debug_names): Update.
6783
6784 2018-05-23 Tom Tromey <tom@tromey.com>
6785
6786 * complaints.c (clear_complaints): Remove "noisy" parameter.
6787 * complaints.h (clear_complaints): Update.
6788 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6789 (reread_symbols): Update.
6790
6791 2018-05-23 Tom Tromey <tom@tromey.com>
6792
6793 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6794 SUBSEQUENT_MESSAGE.
6795 (vcomplaint, clear_complaints): Update.
6796 (symfile_explanations): Remove some messages.
6797
6798 2018-05-23 Tom Tromey <tom@tromey.com>
6799
6800 * complaints.c (internal_complaint): Remove.
6801 * complaints.h (internal_complaint): Remove.
6802
6803 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6804
6805 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6806
6807 2018-05-22 Pedro Alves <palves@redhat.com>
6808
6809 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6810 (remote_fileio_badfd, remote_fileio_return_errno)
6811 (remote_fileio_return_success, remote_fileio_func_open)
6812 (remote_fileio_func_open, remote_fileio_func_close)
6813 (remote_fileio_func_read, remote_fileio_func_write)
6814 (remote_fileio_func_lseek, remote_fileio_func_rename)
6815 (remote_fileio_func_unlink, remote_fileio_func_stat)
6816 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6817 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6818 remote_target parameter.
6819 (remote_fio_func_map) <func>: Add remote_target parameter.
6820 (do_remote_fileio_request, remote_fileio_request):
6821 * remote-fileio.h (remote_fileio_request):
6822 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6823 remote_target parameter.
6824 (remote_notif_process, handle_notification): Adjust to pass down
6825 the remote.
6826 (remote_notif_state_allocate): Add remote_target parameter. Save
6827 it.
6828 * remote-notif.h (struct remote_target): Forward declare.
6829 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6830 remote_target parameter.
6831 (struct remote_notif_state) <remote>: New field.
6832 (remote_notif_ack, remote_notif_parse): Add remote_target
6833 parameter.
6834 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6835 remote_target parameter.
6836 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6837 (threads_listing_context, rmt_thread_action, protocol_feature)
6838 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6839 (packet_result, struct threads_listing_context, remote_state):
6840 Move definitions and declarations higher up.
6841 (remote_target) <~remote_target>: Declare.
6842 (remote_download_command_source, remote_file_put, remote_file_get)
6843 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6844 (remote_hostio_pread_vFile, remote_hostio_send_command)
6845 (remote_hostio_set_filesystem, remote_hostio_open)
6846 (remote_hostio_close, remote_hostio_unlink, remote_state)
6847 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6848 (get_memory_write_packet_size, get_memory_read_packet_size)
6849 (append_pending_thread_resumptions, remote_detach_1)
6850 (append_resumption, remote_resume_with_vcont)
6851 (add_current_inferior_and_thread, wait_ns, wait_as)
6852 (process_stop_reply, remote_notice_new_inferior)
6853 (process_initial_stop_replies, remote_add_thread)
6854 (btrace_sync_conf, remote_btrace_maybe_reopen)
6855 (remove_new_fork_children, kill_new_fork_children)
6856 (discard_pending_stop_replies, stop_reply_queue_length)
6857 (check_pending_events_prevent_wildcard_vcont)
6858 (discard_pending_stop_replies_in_queue, stop_reply)
6859 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6860 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6861 (remote_interrupt_as, remote_interrupt_ns)
6862 (remote_get_noisy_reply, remote_query_attached)
6863 (remote_add_inferior, remote_current_thread, get_current_thread)
6864 (set_thread, set_general_thread, set_continue_thread)
6865 (set_general_process, write_ptid)
6866 (remote_unpack_thread_info_response, remote_get_threadinfo)
6867 (parse_threadlist_response, remote_get_threadlist)
6868 (remote_threadlist_iterator, remote_get_threads_with_ql)
6869 (remote_get_threads_with_qxfer)
6870 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6871 (get_offsets, remote_check_symbols, remote_supported_packet)
6872 (remote_query_supported, remote_packet_size)
6873 (remote_serial_quit_handler, remote_detach_pid)
6874 (remote_vcont_probe, remote_resume_with_hc)
6875 (send_interrupt_sequence, interrupt_query)
6876 (remote_notif_get_pending_events, fetch_register_using_p)
6877 (send_g_packet, process_g_packet, fetch_registers_using_g)
6878 (store_register_using_P, store_registers_using_G)
6879 (set_remote_traceframe, check_binary_download)
6880 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6881 (remote_xfer_live_readonly_partial, remote_read_bytes)
6882 (remote_send_printf, remote_flash_write, readchar)
6883 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6884 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6885 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6886 (extended_remote_disable_randomization, extended_remote_run)
6887 (send_environment_packet, extended_remote_environment_support)
6888 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6889 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6890 (packet_command): Now methods of ...
6891 (remote_target): ... this class.
6892 (m_remote_state) <remote_target>: New field.
6893 (struct remote_state) <stop_reply_queue,
6894 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6895 fields.
6896 (remote_state::remote_state): Allocate stop_reply_queue.
6897 (remote_state): Delete global.
6898 (get_remote_state_raw): Delete.
6899 (remote_target::get_remote_state): Allocate m_remote_state on
6900 demand.
6901 (get_current_remote_target): New.
6902 (remote_ops, extended_remote_ops): Delete.
6903 (wait_forever_enabled_p, remote_async_inferior_event_token):
6904 Delete, moved to struct remote_state.
6905 (remote_target::close): Delete self. Destruction bits split to
6906 ...
6907 (remote_target::~remote_target): ... this.
6908 (show_memory_packet_size): Adjust to use
6909 get_current_remote_target.
6910 (struct protocol_feature) <func>: Add remote_target parameter.
6911 All callers adjusted.
6912 (curr_quit_handler_target): New.
6913 (remote_serial_quit_handler): Reimplement.
6914 (remote_target::open_1): Adjust to use get_current_remote_target.
6915 Heap-allocate remote_target/extended_remote_target instances.
6916 (vcont_builder::vcont_builder): Add remote_target parameter, and
6917 save it in m_remote. All callers adjusted.
6918 (vcont_builder::m_remote): New field.
6919 (vcont_builder::restart, vcont_builder::flush)
6920 (vcont_builder::push_action): Use it.
6921 (remote_target::commit_resume): Use it.
6922 (struct queue_iter_param) <remote>: New field.
6923 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6924 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6925 (check_pending_event_prevents_wildcard_vcont_callback)
6926 (remote_target::check_pending_events_prevent_wildcard_vcont)
6927 (remote_target::discard_pending_stop_replies)
6928 (remote_target::discard_pending_stop_replies_in_queue)
6929 (remote_target::remote_notif_remove_queued_reply): Fill in
6930 'remote' field.
6931 (remote_notif_get_pending_events): New.
6932 (remote_target::readchar, remote_target::remote_serial_write):
6933 Save/restore curr_quit_handler_target.
6934 (putpkt): New.
6935 (kill_new_fork_children): Fill in 'remote' field.
6936 (packet_command): Use get_current_remote_target, defer to
6937 remote_target method of same name.
6938 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6939 parameter, and save it in m_remote. All callers adjusted.
6940 (scoped_remote_fd::release): Use m_remote.
6941 (scoped_remote_fd::m_remote): New field.
6942 (remote_file_put, remote_file_get, remote_file_delete): Use
6943 get_current_remote_target, defer to remote_target method of same
6944 name.
6945 (remote_btrace_reset): Add remote_state paremeter. Update all
6946 callers.
6947 (remote_async_inferior_event_handler). Pass down 'data'.
6948 (remote_new_objfile): Use get_current_remote_target.
6949 (remote_target::vcont_r_supported): New.
6950 (set_range_stepping): Use get_current_remote_target and
6951 remote_target::vcont_r_supported.
6952 (_initialize_remote): Don't allocate 'remote_state' and
6953 'stop_reply_queue' globals.
6954 * remote.h (struct remote_target): Forward declare.
6955 (getpkt, putpkt, remote_notif_get_pending_events): Add
6956 'remote_target' parameter.
6957
6958 2018-05-22 Pedro Alves <palves@redhat.com>
6959
6960 * remote.c (vcont_builder): Now a class. Make all data members
6961 private.
6962 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6963 Declare methods.
6964 (vcont_builder_restart): Rename to ...
6965 (vcont_builder::restart): ... this.
6966 (vcont_builder_flush): Rename to ...
6967 (vcont_builder::flush): ... this.
6968 (vcont_builder_push_action): Rename to ...
6969 (vcont_builder::push_action): ... this.
6970 (remote_target::commit_resume): Adjust.
6971
6972 2018-05-22 Pedro Alves <palves@redhat.com>
6973
6974 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6975 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6976 (get_fixed_memory_packet_size): New.
6977 (get_memory_packet_size): Use it.
6978 (set_memory_packet_size): Don't override the config size with
6979 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6980 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6981 Don't refer to get_memory_packet_size if not connected to a remote
6982 target. Show "(default)" if configured size is 0.
6983
6984 2018-05-22 Pedro Alves <palves@redhat.com>
6985
6986 * remote.c (remote_target::mourn_inferior): Move
6987 discard_pending_stop_replies call here from ...
6988 (_initialize_remote): ... here.
6989
6990 2018-05-22 Pedro Alves <palves@redhat.com>
6991
6992 * remote.c (compare_section_command): Remove set_general_process
6993 call.
6994
6995 2018-05-22 Pedro Alves <palves@redhat.com>
6996
6997 * remote.c (struct packet_reg, struct remote_arch_state):
6998 Move higher up in the file.
6999 (remote_state) <m_arch_states>: Store remote_arch_state values
7000 instead of remote_arch_state pointers.
7001 (remote_state::get_remote_arch_state): Adjust.
7002
7003 2018-05-22 Pedro Alves <palves@redhat.com>
7004
7005 * remote.c: Include <unordered_map>.
7006 (remote_state): Now a class.
7007 (remote_state) <get_remote_arch_state>: Declare method.
7008 <get_remote_arch_state>: New field.
7009 (remote_arch_state) <remote_arch_state>: Declare ctor.
7010 <regs>: Now a unique_ptr.
7011 (remote_gdbarch_data_handle): Delete.
7012 (get_remote_arch_state): Delete.
7013 (remote_state::get_remote_arch_state): New.
7014 (get_remote_state): Adjust to call remote_state's
7015 get_remote_arch_state method.
7016 (init_remote_state): Delete, bits factored out to ...
7017 (remote_arch_state::remote_arch_state): ... this new method.
7018 (get_remote_packet_size, get_memory_packet_size)
7019 (process_g_packet, remote_target::fetch_registers)
7020 (remote_target::prepare_to_store, store_registers_using_G)
7021 (remote_target::store_registers, remote_target::get_trace_status):
7022 Adjust to call remote_state's method.
7023 (_initialize_remote): Remove reference to
7024 remote_gdbarch_data_handle.
7025
7026 2018-05-22 Pedro Alves <palves@redhat.com>
7027
7028 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7029 pread>: New method declarations.
7030 (remote_target::open_1): Adjust.
7031 (readahead_cache_invalidate): Rename to ...
7032 (readahead_cache::invalidate): ... this, and adjust to be a class
7033 method.
7034 (readahead_cache_invalidate_fd): Rename to ...
7035 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7036 class method.
7037 (remote_hostio_pwrite): Adjust.
7038 (remote_hostio_pread_from_cache): Rename to ...
7039 (readahead_cache::pread): ... this, and adjust to be a class
7040 method.
7041 (remote_hostio_close): Adjust.
7042
7043 2018-05-22 Pedro Alves <palves@redhat.com>
7044
7045 * remote.c (remote_hostio_close_cleanup): Delete.
7046 (class scoped_remote_fd): New.
7047 (remote_file_put, remote_file_get): Use it.
7048
7049 2018-05-22 Pedro Alves <palves@redhat.com>
7050
7051 (struct vCont_action_support): Use bool and initialize all fields.
7052 (struct readahead_cache): Initialize all fields.
7053 (remote_state): Use bool and initialize all fields.
7054 (remote_state::remote_state, remote_state::~remote_state): New.
7055 (new_remote_state): Delete.
7056 (_initialize_remote): Use new to allocate remote_state.
7057
7058 2018-05-22 Pedro Alves <palves@redhat.com>
7059 張俊芝 <zjz@zjz.name>
7060
7061 PR gdb/22973
7062 * c-exp.y: Include "c-support.h".
7063 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7064 of tolower. Use c_ident_is_alpha to scan names.
7065 * c-lang.c: Include "c-support.h".
7066 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7067 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7068 * c-support.h: New file, with bits factored out from ...
7069 * cp-name-parser.y: ... this file.
7070 Include "c-support.h".
7071 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7072 c-support.h and renamed.
7073 (symbol_end, yylex): Adjust.
7074
7075 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7076
7077 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7078 parameter type to CORE_ADDR.
7079 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7080 parameter type in declaration to CORE_ADDR.
7081 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7082 target_auxv_search to get AT_HWCAP and use the result to get the
7083 target description.
7084 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7085 to CORE_ADDR. Remove the cast of the return value to unsigned
7086 long. Fix error predicate of target_auxv_search.
7087 (ppc_linux_nat_target::read_description): Change the type of the
7088 hwcap variable to CORE_ADDR.
7089
7090 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7091
7092 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7093 if the size of fpscr is larger than 32 bits.
7094
7095 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7096
7097 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7098 (ppc32_linux_vsxregmap): New global.
7099 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7100 regcache_supply_regset, and regcache_collect_regset.
7101 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7102 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7103 (fetch_vsx_register, store_vsx_register): Remove.
7104 (fetch_vsx_registers): Add regno parameter. Get regset using
7105 ppc_linux_vsxregset. Use regset to supply registers.
7106 (store_vsx_registers): Add regno parameter. Get regset using
7107 ppc_linux_vsxregset. Use regset to collect registers.
7108 (fetch_register): Call fetch_vsx_registers instead of
7109 fetch_vsx_register.
7110 (store_register): Call store_vsx_registers instead of
7111 store_vsx_register.
7112 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7113 new regno parameter.
7114 (store_ppc_registers): Call store_vsx_registers with -1 for the
7115 new regno parameter.
7116 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7117 (ppc_collect_vsxregset): Remove.
7118
7119 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7120
7121 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7122 offset fields.
7123 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7124 for vector register offset fields.
7125 (ppc64_fbsd_reg_offsets): Likewise.
7126 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7127 to vector register offset fields.
7128 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7129 to vector register offset fields.
7130 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7131 vector register offset fields.
7132 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7133 initializers for vector register offset fields.
7134 (rs6000_aix64_reg_offsets): Likewise.
7135 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7136 (ppc_supply_vrregset): Remove.
7137 (ppc_collect_vrregset): Remove.
7138 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7139 (ppc_linux_vrregset) : New function.
7140 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7141 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7142 (ppc32_linux_vrregset): Remove.
7143 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7144 and use result instead of ppc32_linux_vrregset.
7145 (ppc32_linux_reg_offsets): Remove initializers for vector register
7146 offset fields.
7147 (ppc64_linux_reg_offsets): Likewise.
7148 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7149 * ppc-linux-nat.c: Include regset.h.
7150 (gdb_vrregset_t): Adjust comment to account for little-endian
7151 mode.
7152 (supply_vrregset, fill_vrregset): Remove.
7153 (fetch_altivec_register, store_altivec_register): Remove.
7154 (fetch_altivec_registers): Add regno parameter. Get regset using
7155 ppc_linux_vrregset. Use regset to supply registers.
7156 (store_altivec_registers): Add regno parameter. Get regset using
7157 ppc_linux_vrregset. Use regset to collect registers.
7158 (fetch_register): Call fetch_altivec_registers instead of
7159 fetch_altivec_register.
7160 (store_register): Call store_altivec_registers instead of
7161 store_altivec_register.
7162 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7163 the new regno parameter.
7164 (store_ppc_registers): Call store_altivec_registers with -1 for
7165 the new regno parameter.
7166
7167 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7168
7169 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7170 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7171 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7172 (gdb_vrregset_t): Change array type size to
7173 PPC_LINUX_SIZEOF_VRREGSET.
7174 (gdb_vsxregset_t): Change array type size to
7175 PPC_LINUX_SIZEOF_VSXREGSET.
7176 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7177 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7178 PPC_LINUX_SIZEOF_VSXREGSET.
7179
7180 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7181
7182 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7183 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7184 nat/ppc-linux.c.
7185 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7186 ppc_linux_target_wordsize with tid.
7187 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7188 wordsize with tid.
7189 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7190 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7191 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7192 tid parameter. Remove static specifier.
7193 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7194 (ppc_linux_target_wordsize): New declaration.
7195
7196 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7197
7198 * arch/ppc-linux-common.c: New file.
7199 * arch/ppc-linux-common.h: New file.
7200 * arch/ppc-linux-tdesc.h: New file.
7201 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7202 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7203 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7204 arch/ppc-linux-tdesc.h.
7205 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7206 arch/ppc-linux-tdesc.h.
7207 (ppc_linux_nat_target::read_description): Remove target
7208 description matching code. Fill a ppc_linux_features struct and
7209 call ppc_linux_match_description with it. Move comment about ISA
7210 2.05 to ppc-linux-common.c.
7211 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7212 arch/ppc-linux-tdesc.h.
7213 (ppc_linux_core_read_description): Remove target description
7214 matching code. Fill a ppc_linux_features struct and call
7215 ppc_linux_match_description with it.
7216 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7217 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7218 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7219 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7220 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7221 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7222 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7223 (tdesc_powerpc_e500l): Remove.
7224
7225 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7226
7227 * ada-lang.c (catch_assert_command): Pass empty string instead
7228 of NULL for excep_string argument.
7229
7230 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7231
7232 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7233 the width of the requested register exceeds the width of the
7234 `ptrace' data type.
7235
7236 2018-05-21 Tom Tromey <tom@tromey.com>
7237
7238 * printcmd.c (output_command): Remove.
7239 (output_command_const): Rename to output_command.
7240 * valprint.h (output_command): Rename from output_command_const.
7241 * tracepoint.c (trace_dump_actions): Call output_command.
7242
7243 2018-05-21 Tom Tromey <tom@tromey.com>
7244
7245 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7246 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7247 * ada-lang.h (create_ada_exception_catchpoint): Update.
7248 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7249 std::string.
7250 (create_excep_cond_exprs, ~ada_catchpoint)
7251 (should_stop_exception, print_one_exception)
7252 (print_mention_exception, print_recreate_exception): Update.
7253 (ada_get_next_arg): Remove.
7254 (catch_ada_exception_command_split): Use std::string. Change type
7255 of "excep_string", "cond_string".
7256 (catch_ada_exception_command): Update.
7257 (create_ada_exception_catchpoint): Change type of excep_string.
7258 (ada_exception_sal): Remove excep_string parameter.
7259 (~ada_catchpoint): Remove.
7260
7261 2018-05-21 Tom Tromey <tom@tromey.com>
7262
7263 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7264 cleanup.
7265
7266 2018-05-21 Tom Tromey <tom@tromey.com>
7267
7268 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7269 Return unique_xmalloc_ptr.
7270 (print_it_exception): Update.
7271
7272 2018-05-21 Tom Tromey <tom@tromey.com>
7273
7274 * tracepoint.c (trace_dump_actions): Use std::string.
7275
7276 2018-05-21 Tom Tromey <tom@tromey.com>
7277
7278 * symfile.c (reread_symbols): Use std::string for original_name.
7279
7280 2018-05-21 Tom Tromey <tom@tromey.com>
7281
7282 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7283 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7284 constructor.
7285
7286 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7287
7288 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7289 instance to...
7290 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7291 * objfiles.c (get_objfile_bfd_data): Allocate
7292 objfile_per_bfd_storage with obstack_new when allocating on
7293 obstack.
7294
7295 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7296
7297 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7298 OBSTACK_ZALLOC.
7299 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7300 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7301 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7302 (add_pending): Likewise.
7303 (parse_symbol): Likewise.
7304 (parse_partial_symbols): Likewise.
7305 (psymtab_to_symtab_1): Likewise.
7306 (new_psymtab): Likewise.
7307 (elfmdebug_build_psymtabs): Likewise.
7308 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7309 * objfiles.c (get_objfile_bfd_data): Likewise.
7310 (objfile_register_static_link): Likewise.
7311 * psymtab.c (allocate_psymtab): Likewise.
7312 * stabsread.c (read_member_functions): Likewise.
7313 * xcoffread.c (xcoff_end_psymtab): Likewise.
7314
7315 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7316
7317 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7318 compiler supports std::is_trivially_constructible.
7319 * common/poison.h: Include obstack.h.
7320 (IsMallocable): Define to is_trivially_constructible if the
7321 compiler supports it, define to true_type otherwise.
7322 (xobnew): New.
7323 (XOBNEW): Redefine.
7324 (xobnewvec): New.
7325 (XOBNEWVEC): Redefine.
7326 * gdb_obstack.h (obstack_zalloc): New.
7327 (OBSTACK_ZALLOC): Redefine.
7328 (obstack_calloc): New.
7329 (OBSTACK_CALLOC): Redefine.
7330 (obstack_new): New.
7331 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7332 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7333 gdbarch.c.
7334 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7335 obstack_calloc/obstack_zalloc.
7336 (gdbarch_obstack_zalloc): Remove.
7337 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7338
7339 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7340
7341 * stack.c (backtrace_command_1): Remove useless variable int i.
7342
7343 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7344
7345 * stack.c (print_frame_info): Fix comment.
7346
7347 2018-05-18 Tom Tromey <tom@tromey.com>
7348
7349 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7350 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7351 (~dwarf2_per_objfile): Update
7352 (dwarf2_get_dwz_file): Use new.
7353 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7354 unique_ptr.
7355
7356 2018-05-18 Tom Tromey <tom@tromey.com>
7357
7358 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7359 unique_ptr.
7360 * dwarf2read.c (struct dwp_file): Add constructor and
7361 initializers.
7362 (open_and_init_dwp_file): Return a unique_ptr.
7363 (dwarf2_per_objfile, create_dwp_hash_table)
7364 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7365 (lookup_dwo_unit_in_dwp): Update.
7366 (open_and_init_dwp_file, get_dwp_file): Update.
7367
7368 2018-05-18 Tom Tromey <tom@tromey.com>
7369
7370 * dwarf2read.c (dwarf2_per_objfile): Update.
7371 (struct mapped_index): Add initializers.
7372 (dwarf2_read_index): Use new.
7373 (dw2_symtab_iter_init): Update.
7374 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7375 unique_ptr.
7376
7377 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7378
7379 * dwarf2read.c (mapped_index) <total_size>: Remove.
7380
7381 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7382
7383 * unittests/format_pieces-selftests.c (test_format_specifier):
7384 Add ARI comments.
7385
7386 2018-05-18 Tom Tromey <tom@tromey.com>
7387
7388 * c-typeprint.c (maybe_print_hole): New function.
7389 (c_print_type_struct_field_offset): Update.
7390 (c_type_print_base_struct_union): Call maybe_print_hole.
7391
7392 2018-05-17 Keith Seitz <keiths@redhat.com>
7393
7394 * breakpoint.c (build_bpstat_chain): New function, moved from
7395 bpstat_stop_status.
7396 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7397 If no stop chain is passed, call build_bpstat_chain to build it.
7398 * breakpoint.h (build_bpstat_chain): Declare.
7399 (bpstat_stop_status): Move documentation here from breakpoint.c.
7400 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7401 build the stop chain and pass it to skip_inline_frames.
7402 Pass this stop chain to bpstat_stop_status.
7403 * inline-frame.c: Include breakpoint.h.
7404 (stopped_by_user_bp_inline_frame): New function.
7405 (skip_inline_frames): Add parameter `stop_chain'.
7406 Move documention to inline-frame.h.
7407 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7408 whether the frame should be elided.
7409 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7410 Add moved documentation and update for new parameter.
7411
7412 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7413
7414 PR cli/14975
7415 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7416 unittests/format_pieces-selftests.c.
7417 * common/format.h (format_piece) <operator==>: New.
7418 (format_pieces) <operator[]>: Remove.
7419 * common/format.c (format_pieces::format_pieces): Handle \e.
7420 * unittests/format_pieces-selftests.c: New.
7421
7422 2018-05-17 Tom Tromey <tom@tromey.com>
7423
7424 PR symtab/23010:
7425 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7426 (dw2_instantiate_symtab): Add skip_partial parameter.
7427 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7428 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7429 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7430 (dw2_expand_symtabs_matching_one)
7431 (dw2_find_pc_sect_compunit_symtab)
7432 (dw2_debug_names_lookup_symbol)
7433 (dw2_debug_names_expand_symtabs_for_function): Update.
7434 (init_cutu_and_read_dies): Add skip_partial parameter.
7435 (process_psymtab_comp_unit, build_type_psymtabs_1)
7436 (process_skeletonless_type_unit, load_partial_comp_unit)
7437 (psymtab_to_symtab_1): Update.
7438 (load_full_comp_unit): Add skip_partial parameter.
7439 (process_imported_unit_die, dwarf2_read_addr_index)
7440 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7441 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7442 (read_signatured_type): Update.
7443
7444 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7445
7446 * value.c (release_value): Remove unused variable.
7447 (record_latest_value): Likewise.
7448 (access_value_history): Likewise.
7449 (preserve_values): Likewise.
7450
7451 2018-05-17 Tom Tromey <tom@tromey.com>
7452
7453 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7454 Initialize.
7455
7456 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7457
7458 PR gdb/22286
7459 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7460 Also handle registers whose width is not a multiple of
7461 PTRACE_TYPE_RET.
7462 (linux_nat_trad_target::store_register): Likewise.
7463
7464 2018-05-16 Tom Tromey <tom@tromey.com>
7465
7466 * gdbcore.h (core_bfd): Redefine.
7467 * corelow.c (core_target::close): Update.
7468 (core_target_open): Update.
7469 * progspace.h (struct program_space) <cbfd>: Now a
7470 gdb_bfd_ref_ptr.
7471
7472 2018-05-16 Tom Tromey <tom@tromey.com>
7473
7474 PR cli/19551:
7475 * symfile-add-flags.h (enum symfile_add_flags)
7476 <SYMFILE_NOT_FILENAME>: New constant.
7477 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7478 objfile name from BFD.
7479 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7480 * minidebug.c (find_separate_debug_file_in_section): Put
7481 ".gnu_debugdata" into BFD's file name.
7482
7483 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7484
7485 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7486 Remove.
7487
7488 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7489
7490 PR binutils/21446
7491 * aarch64-tdep.c (aarch64_analyze_prologue,
7492 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7493 Indicate not interested in errors.
7494
7495 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7496
7497 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7498 Supply the MIPS_ZERO_REGNUM register.
7499
7500 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7501
7502 * mips-tdep.c (mask_address_var): Make variable static.
7503
7504 2018-05-14 Tom Tromey <tom@tromey.com>
7505
7506 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7507
7508 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7509
7510 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7511 FXSAVE_ADDR for the mxcsr register.
7512
7513 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7514
7515 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7516
7517 2018-05-11 Pedro Alves <palves@redhat.com>
7518
7519 * corelow.c (core_target) <core_target>: No longer inline.
7520 Initialize m_core_gdbarch, m_core_vec and build the section table
7521 here.
7522 <~core_target>: New.
7523 <core_gdbarch, get_core_register_section>: New methods.
7524 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7525 factored out from ...
7526 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7527 (core_ops): Delete.
7528 (sniff_core_bfd): Add gdbarch parameter.
7529 (core_close): Delete, merged into ...
7530 (core_target::close): ... here. Delete self.
7531 (core_close_cleanup): Delete.
7532 (core_target_open): Allocate a core_target on the heap. Use a
7533 unique_ptr instead of a cleanup. Bits moved into the core_target
7534 ctor. Adjust to use core_target methods instead of globals.
7535 (get_core_register_section): Rename to ...
7536 (core_target::get_core_register_section): ... this and adjust.
7537 (struct get_core_registers_cb_data): New.
7538 (get_core_registers_cb): Use it. Use bool.
7539 (core_target::fetch_registers, core_target::files_info)
7540 (core_target::xfer_partial, core_target::read_description)
7541 (core_target::pid_to, core_target::thread_name): Adjust to
7542 reference class fields instead of globals.
7543 * target.h (struct target_ops_deleter, target_ops_up): New.
7544
7545 2018-05-11 Pedro Alves <palves@redhat.com>
7546
7547 * corefile.c (core_file_command): Move to corelow.c.
7548 * corelow.c (the_core_target): Delete.
7549 (core_file_command): Moved from corefile.c. Check exec_bfd
7550 instead of the_core_target. Use target_detach instead of calling
7551 into the_core_target directly.
7552 (maybe_say_no_core_file_now): New.
7553 (core_target::detach): Use it.
7554 (_initialize_corelow): Remove references to the_core_target.
7555 * gdbcore.h (the_core_target): Delete.
7556
7557 2018-05-11 Tom Tromey <tromey@redhat.com>
7558 Pedro Alves <palves@redhat.com>
7559
7560 * corefile.c (core_bfd): Remove.
7561 * gdbcore.h (core_bfd): Now a macro.
7562 * progspace.h (struct program_space) <cbfd>: New field.
7563
7564 2018-05-11 Tom Tromey <tom@tromey.com>
7565
7566 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7567 gdb::def_vector.
7568
7569 2018-05-10 Tom Tromey <tom@tromey.com>
7570
7571 * configure: Rebuild.
7572 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7573
7574 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7575
7576 PR server/23158:
7577 * regformats/regdat.sh: Adjust script, following the addition
7578 of the new expedite_regs parameter to init_target_desc.
7579
7580 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7581
7582 PR gdb/23127
7583 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7584 set_gdbarch_significant_addr_bit.
7585 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7586 set_gdbarch_significant_addr_bit.
7587 * utils.c (address_significant): Update to sign extend addr.
7588
7589 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7590
7591 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7592 (xtensa_linux_init_abi): Limit tdep->num_regs by
7593 tdep->num_nopriv_regs.
7594 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7595 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7596 not initialized.
7597
7598 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7599
7600 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7601
7602 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7603
7604 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7605 (I387_MXCSR_INIT_VAL): New constant.
7606 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7607 buffer if it was supplied by the inferior.
7608 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7609 (i387_xsave_get_clear_bv): New function.
7610 (i387_supply_xsave): Only read x87 control registers from the
7611 xsave buffer if the feature is enabled, and the state will have
7612 been written, otherwise, provide a suitable default.
7613 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7614 including x87 control registers. Update control registers if they
7615 have changed from the default value, and mark features as enabled
7616 as required.
7617 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7618
7619 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7620
7621 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7622
7623 2018-05-07 Tom Tromey <tom@tromey.com>
7624
7625 * configure: Rebuild.
7626 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7627
7628 2018-05-07 Tom Tromey <tom@tromey.com>
7629
7630 PR tdep/20362:
7631 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7632 bit. Use correct value for VDIV.
7633
7634 2018-05-04 Tom Tromey <tom@tromey.com>
7635
7636 * configure: Rebuild.
7637 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7638
7639 2018-05-04 Tom Tromey <tom@tromey.com>
7640
7641 * linux-record.c (record_linux_system_call) <case
7642 RECORD_SYS_RECVFROM>: Add "break".
7643
7644 2018-05-04 Tom Tromey <tom@tromey.com>
7645
7646 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7647 Add missing "break".
7648 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7649 Add missing "break".
7650
7651 2018-05-04 Tom Tromey <tom@tromey.com>
7652
7653 * rs6000-tdep.c (ppc_process_record_op4)
7654 (ppc_process_record_op63): Add fall-through comment.
7655
7656 2018-05-04 Tom Tromey <tom@tromey.com>
7657
7658 * i386-tdep.c (i386_process_record): Add fall-through comment.
7659
7660 2018-05-04 Tom Tromey <tom@tromey.com>
7661
7662 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7663 comment.
7664
7665 2018-05-04 Tom Tromey <tom@tromey.com>
7666
7667 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7668 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7669 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7670 comment.
7671 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7672 comment.
7673 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7674 comment.
7675
7676 2018-05-04 Tom Tromey <tom@tromey.com>
7677
7678 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7679
7680 2018-05-04 Tom Tromey <tom@tromey.com>
7681
7682 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7683 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7684 * symfile.c (section_is_mapped): Fix fall-through comment.
7685 * stabsread.c (define_symbol, read_member_functions): Fix
7686 fall-through comment.
7687 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7688 comment.
7689 * remote.c (remote_wait_as): Fix fall-through comment.
7690 * p-exp.y (yylex): Fix fall-through comment.
7691 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7692 comment.
7693 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7694 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7695 * jv-exp.y (yylex): Fix fall-through comment.
7696 * go-exp.y (lex_one_token): Fix fall-through comment.
7697 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7698 fall-through comment.
7699 * f-exp.y (yylex): Fix fall-through comment.
7700 * dwarf2read.c (process_die): Fix fall-through comments.
7701 * dbxread.c (process_one_symbol): Fix fall-through comment.
7702 * d-exp.y (lex_one_token): Fix fall-through comment.
7703 * cp-name-parser.y (yylex): Fix fall-through comment.
7704 * coffread.c (coff_symtab_read): Fix fall-through comment.
7705 * c-exp.y (lex_one_token): Fix fall-through comment.
7706 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7707 comment.
7708 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7709 comment.
7710
7711 2018-05-04 Tom Tromey <tom@tromey.com>
7712
7713 PR python/22730:
7714 * NEWS: Mention gdb.execute change.
7715 * gdbcmd.h (execute_control_command): Don't declare.
7716 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7717 execute_control_commands, execute_control_commands_to_string.
7718 * cli/cli-script.h (execute_control_commands)
7719 (execute_control_commands_to_string): Declare.
7720 (execute_control_command): Add from_tty parameter.
7721 * cli/cli-script.c (execute_control_commands)
7722 (execute_control_commands_to_string): New functions.
7723 (execute_user_command): Use execute_control_commands.
7724 (execute_control_command_1): Add "from_tty" parameter. Update.
7725 (execute_control_command): Likewise.
7726
7727 2018-05-04 Tom Tromey <tom@tromey.com>
7728
7729 PR python/22731:
7730 * NEWS: Mention that breakpoint commands are writable.
7731 * python/py-breakpoint.c (bppy_set_commands): New function.
7732 (breakpoint_object_getset) <"commands">: Use it.
7733
7734 2018-05-04 Tom Tromey <tom@tromey.com>
7735
7736 * tracepoint.c (actions_command): Update.
7737 * mi/mi-cmd-break.c (mi_command_line_array)
7738 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7739 (mi_read_next_line): Remove.
7740 (mi_cmd_break_commands): Update.
7741 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7742 function_view.
7743 * cli/cli-script.c (get_command_line): Update.
7744 (process_next_line): Use function_view. Constify.
7745 (recurse_read_control_structure, read_command_lines)
7746 (read_command_lines_1): Change argument types to function_view.
7747 (do_define_command, document_command): Update.
7748 * breakpoint.h (check_tracepoint_command): Don't declare.
7749 * breakpoint.c (check_tracepoint_command): Remove.
7750 (commands_command_1, create_tracepoint_from_upload): Update.
7751
7752 2018-05-04 Tom Tromey <tom@tromey.com>
7753
7754 PR gdb/11750:
7755 * cli/cli-script.h (enum command_control_type) <define_control>:
7756 New constant.
7757 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7758 (build_command_line, execute_control_command_1)
7759 (process_next_line): Likewise.
7760 (do_define_command): New function, extracted from define_command.
7761 (define_command): Use it.
7762
7763 2018-05-04 Tom Tromey <tom@tromey.com>
7764
7765 * tracepoint.c (actions_command): Update.
7766 * cli/cli-script.h (read_command_lines): Update.
7767 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7768 (MAX_TMPBUF): Remove define.
7769 (define_command): Use string_printf.
7770 (document_command): Likewise.
7771 * breakpoint.c (commands_command_1): Update.
7772
7773 2018-05-04 Tom Tromey <tom@tromey.com>
7774
7775 * top.c (execute_command): Update.
7776 * cli/cli-script.h (print_command_lines): Now varargs.
7777 * cli/cli-script.c (print_command_lines): Now varargs.
7778 (execute_control_command_1) <case while_control, case if_control>:
7779 Update.
7780
7781 2018-05-04 Tom Tromey <tom@tromey.com>
7782
7783 * tracepoint.c (all_tracepoint_actions): Rename from
7784 all_tracepoint_actions_and_cleanup. Change return type.
7785 (actions_command, encode_actions_1, encode_actions)
7786 (trace_dump_actions, tdump_command): Update.
7787 * remote.c (remote_download_command_source): Update.
7788 * python/python.c (gdbpy_eval_from_control_command)
7789 (python_command, python_interactive_command): Update.
7790 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7791 * guile/guile.c (guile_command)
7792 (gdbscm_eval_from_control_command, guile_command): Update.
7793 * compile/compile.c (compile_code_command)
7794 (compile_print_command, compile_to_object): Update.
7795 * cli/cli-script.h (struct command_lines_deleter): New.
7796 (counted_command_line): New typedef.
7797 (struct command_line): Add constructor, destructor.
7798 <body_list>: Remove.
7799 <body_list_0, body_list_1>: New members.
7800 (command_line_up): Remove typedef.
7801 (read_command_lines, read_command_lines_1, get_command_line):
7802 Update.
7803 (copy_command_lines): Don't declare.
7804 * cli/cli-script.c (build_command_line): Use "new".
7805 (get_command_line): Return counted_command_line.
7806 (print_command_lines, execute_user_command)
7807 (execute_control_command_1, while_command, if_command): Update.
7808 (realloc_body_list): Remove.
7809 (process_next_line, recurse_read_control_structure): Update.
7810 (read_command_lines, read_command_lines_1): Return counted_command_line.
7811 (free_command_lines): Use "delete".
7812 (copy_command_lines): Remove.
7813 (define_command, document_command, show_user_1): Update.
7814 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7815 a counted_command_line.
7816 * breakpoint.h (counted_command_line): Remove typedef.
7817 (breakpoint_set_commands): Update.
7818 * breakpoint.c (check_no_tracepoint_commands)
7819 (validate_commands_for_breakpoint): Update.
7820 (breakpoint_set_commands): Change commands to be a
7821 counted_command_line.
7822 (commands_command_1, update_dprintf_command_list)
7823 (create_tracepoint_from_upload): Update.
7824
7825 2018-05-04 Tom Tromey <tom@tromey.com>
7826
7827 * cli/cli-decode.h (cmd_list_element): New constructor.
7828 (~cmd_list_element): New destructor.
7829 (struct cmd_list_element): Add initializers.
7830 * cli/cli-decode.c (do_add_cmd): Use "new".
7831 (delete_cmd): Use "delete".
7832
7833 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7834 Pedro Alves <palves@redhat.com>
7835
7836 PR breakpoints/19806 and support for PR external/20207.
7837 * NEWS: Mention Aarch64 watchpoint improvements.
7838 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7839 watchpoints and PR external/20207 watchpoints.
7840 * nat/aarch64-linux-hw-point.c
7841 (kernel_supports_any_contiguous_range): New.
7842 (aarch64_watchpoint_offset): New.
7843 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7844 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7845 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7846 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7847 next_addr_orig_p. Support PR external/20207 watchpoints.
7848 (aarch64_downgrade_regs): New.
7849 (aarch64_dr_state_insert_one_point): New parameters offset and
7850 addr_orig.
7851 (aarch64_dr_state_remove_one_point): Likewise.
7852 (aarch64_handle_breakpoint): Update caller.
7853 (aarch64_handle_aligned_watchpoint): Likewise.
7854 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7855 aligned_offset.
7856 (aarch64_linux_set_debug_regs): Remove const from state. Call
7857 aarch64_downgrade_regs.
7858 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7859 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7860 (DR_CONTROL_MASK): ... this.
7861 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7862 (unsigned int aarch64_watchpoint_offset): New prototype.
7863 (aarch64_linux_set_debug_regs): Remove const from state.
7864 * utils.c (align_up, align_down): Move to ...
7865 * common/common-utils.c (align_up, align_down): ... here.
7866 * utils.h (align_up, align_down): Move to ...
7867 * common/common-utils.h (align_up, align_down): ... here.
7868
7869 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7870
7871 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7872 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7873 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7874 Re-implement to match the ABI as summarized in GCC's
7875 gcc/config/sparc/sparc.c. All callers updated.
7876 (sparc32_store_arguments): Remove assertion.
7877
7878 2018-05-04 Tom Tromey <tom@tromey.com>
7879
7880 * printcmd.c: Don't include tui.h.
7881 (decode_format): Use skip_spaces.
7882
7883 2018-05-04 Tom Tromey <tom@tromey.com>
7884
7885 PR gdb/22619:
7886 * printcmd.c (last_count): New global.
7887 (x_command): Use saved count when repeating.
7888
7889 2018-05-04 Tom Tromey <tom@tromey.com>
7890
7891 * nto-procfs.c (do_closedir_cleanup): Remove.
7892 (procfs_pidlist): Use gdb_dir_up.
7893 * procfs.c (do_closedir_cleanup): Remove.
7894 (proc_update_threads): Use gdb_dir_up.
7895 * common/filestuff.h (struct gdb_dir_deleter): New.
7896 (gdb_dir_up): New typedef.
7897
7898 2018-05-04 Tom Tromey <tom@tromey.com>
7899
7900 * ada-lang.c (print_mention_exception): Use std::string.
7901
7902 2018-05-04 Tom Tromey <tom@tromey.com>
7903
7904 * ada-lang.c (create_excep_cond_exprs): Update.
7905 (ada_exception_catchpoint_cond_string): Use std::string.
7906
7907 2018-05-04 Tom Tromey <tom@tromey.com>
7908
7909 * ada-lang.c (xget_renaming_scope): Return std::string.
7910 (old_renaming_is_invisible): Update.
7911
7912 2018-05-04 Tom Tromey <tom@tromey.com>
7913
7914 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7915 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7916
7917 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7918
7919 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7920
7921 2018-05-04 Tom Tromey <tom@tromey.com>
7922
7923 * remote.c (remote_query_supported_append): Change type.
7924 (remote_check_symbols): Update.
7925
7926 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7927
7928 PR gdb/11420
7929 * configure.ac: Prepend libpython.
7930 * python/python-config.py: Likewise.
7931 * configure: Regenerate.
7932
7933 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7934
7935 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7936
7937 2018-05-03 Pedro Alves <palves@redhat.com>
7938
7939 * s390-linux-nat.c
7940 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7941 override. Write 'true' instead of '1'.
7942 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7943 declaration.
7944
7945 2018-05-02 Pedro Alves <palves@redhat.com>
7946
7947 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7948 add_inf_child_target.
7949 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7950 add_inf_child_target.
7951 * aix-thread.c (aix_thread_target_info): New.
7952 (aix_thread_target) <shortname, longname, doc>: Delete.
7953 <info>: New.
7954 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7955 add_inf_child_target.
7956 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7957 add_inf_child_target.
7958 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7959 add_inf_child_target.
7960 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7961 add_inf_child_target.
7962 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7963 add_inf_child_target.
7964 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7965 add_inf_child_target.
7966 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7967 add_inf_child_target.
7968 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7969 add_inf_child_target.
7970 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7971 add_inf_child_target.
7972 * bfd-target.c (target_bfd_target_info): New.
7973 (target_bfd) <shortname, longname, doc>: Delete.
7974 <info>: New.
7975 * bsd-kvm.c (bsd_kvm_target_info): New.
7976 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7977 <info>: New.
7978 (bsd_kvm_target::open): Rename to ...
7979 (bsd_kvm_target_open): ... this. Adjust.
7980 * bsd-uthread.c (bsd_uthread_target_info): New.
7981 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7982 <info>: New.
7983 * corefile.c (core_file_command): Adjust.
7984 * corelow.c (core_target_info): New.
7985 (core_target) <shortname, longname, doc>: Delete.
7986 <info>: New.
7987 (core_target::open): Rename to ...
7988 (core_target_open): ... this. Adjust.
7989 * ctf.c (ctf_target_info): New.
7990 (ctf_target) <shortname, longname, doc>: Delete.
7991 <info>: New.
7992 (ctf_target::open): Rename to ...
7993 (ctf_target_open): ... this.
7994 (_initialize_ctf): Adjust.
7995 * exec.c (exec_target_info): New.
7996 (exec_target) <shortname, longname, doc>: Delete.
7997 <info>: New.
7998 (exec_target::open): Rename to ...
7999 (exec_target_open): ... this.
8000 * gdbcore.h (core_target_open): Declare.
8001 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8002 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8003 add_inf_child_target.
8004 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8005 add_inf_child_target.
8006 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8007 add_inf_child_target.
8008 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8009 add_inf_child_target.
8010 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8011 add_inf_child_target.
8012 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8013 add_inf_child_target.
8014 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8015 add_inf_child_target.
8016 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8017 add_inf_child_target.
8018 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8019 add_inf_child_target.
8020 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8021 add_inf_child_target.
8022 * inf-child.c (inf_child_target_info): New.
8023 (inf_child_target::info): New.
8024 (inf_child_open_target): Remove 'target' parameter. Use
8025 get_native_target instead.
8026 (inf_child_target::open): Delete.
8027 (add_inf_child_target): New.
8028 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8029 Delete.
8030 <info>: New.
8031 (add_inf_child_target): Declare.
8032 (inf_child_open_target): Declare.
8033 * linux-thread-db.c (thread_db_target_info): New.
8034 (thread_db_target) <shortname, longname, doc>: Delete.
8035 <info>: New.
8036 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8037 add_inf_child_target.
8038 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8039 add_inf_child_target.
8040 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8041 add_inf_child_target.
8042 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8043 add_inf_child_target.
8044 * make-target-delegates (print_class): Adjust.
8045 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8046 add_inf_child_target.
8047 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8048 add_inf_child_target.
8049 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8050 add_inf_child_target.
8051 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8052 add_inf_child_target.
8053 * nto-procfs.c (nto_native_target_info): New.
8054 (nto_procfs_target_native) <shortname, longname, doc>:
8055 Delete.
8056 <info>: New.
8057 (nto_procfs_target_info): New.
8058 (nto_procfs_target_procfs) <shortname, longname, doc>:
8059 Delete.
8060 <info>: New.
8061 (init_procfs_targets): Adjust.
8062 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8063 add_inf_child_target.
8064 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8065 add_inf_child_target.
8066 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8067 add_inf_child_target.
8068 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8069 add_inf_child_target.
8070 * ravenscar-thread.c (ravenscar_target_info): New.
8071 (ravenscar_thread_target) <shortname, longname, doc>:
8072 Delete.
8073 <info>: New.
8074 * record-btrace.c (record_btrace_target_info):
8075 (record_btrace_target) <shortname, longname, doc>: Delete.
8076 <info>: New.
8077 (record_btrace_target::open): Rename to ...
8078 (record_btrace_target_open): ... this. Adjust.
8079 * record-full.c (record_longname, record_doc): New.
8080 (record_full_base_target) <shortname, longname, doc>: Delete.
8081 <info>: New.
8082 (record_full_target_info): New.
8083 (record_full_target): <shortname>: Delete.
8084 <info>: New.
8085 (record_full_core_open_1, record_full_open_1): Update comments.
8086 (record_full_base_target::open): Rename to ...
8087 (record_full_open): ... this.
8088 (cmd_record_full_restore): Update.
8089 (_initialize_record_full): Update.
8090 * remote-sim.c (remote_sim_target_info): New.
8091 (gdbsim_target) <shortname, longname, doc>: Delete.
8092 <info>: New.
8093 (gdbsim_target::open): Rename to ...
8094 (gdbsim_target_open): ... this.
8095 (_initialize_remote_sim): Adjust.
8096 * remote.c (remote_doc): New.
8097 (remote_target_info): New.
8098 (remote_target) <shortname, longname, doc>: Delete.
8099 <info>: New.
8100 (extended_remote_target_info): New.
8101 (extended_remote_target) <shortname, longname, doc>: Delete.
8102 <info>: New.
8103 (remote_target::open_1): Make static. Adjust.
8104 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8105 * s390-linux-nat.c (_initialize_s390_nat): Use
8106 add_inf_child_target.
8107 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8108 add_inf_child_target.
8109 * sol-thread.c (thread_db_target_info): New.
8110 (sol_thread_target) <shortname, longname, doc>: Delete.
8111 <info>: New.
8112 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8113 add_inf_child_target.
8114 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8115 add_inf_child_target.
8116 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8117 add_inf_child_target.
8118 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8119 add_inf_child_target.
8120 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8121 add_inf_child_target.
8122 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8123 add_inf_child_target.
8124 * spu-linux-nat.c (_initialize_spu_nat): Use
8125 add_inf_child_target.
8126 * spu-multiarch.c (spu_multiarch_target_info): New.
8127 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8128 <info>: New.
8129 * target-delegates.c: Regenerate.
8130 * target.c: Include <unordered_map>.
8131 (target_ops_p): Delete.
8132 (DEF_VEC_P(target_ops_p)): Delete.
8133 (target_factories): New.
8134 (test_target_info): New.
8135 (test_target_ops::info): New.
8136 (open_target): Adjust to use target_factories.
8137 (add_target_with_completer): Rename to ...
8138 (add_target): ... this. Change prototype. Register target_info
8139 and open callback in target_factories. Register target_info in
8140 command context instead of target_ops.
8141 (add_target): Delete old implementation.
8142 (add_deprecated_target_alias): Change prototype. Adjust.
8143 (the_native_target): New.
8144 (set_native_target, get_native_target): New.
8145 (find_default_run_target): Use the_native_target.
8146 (find_attach_target, find_run_target): Simplify.
8147 (target_ops::open): Delete.
8148 (dummy_target_info): New.
8149 (dummy_target::shortname, dummy_target::longname)
8150 (dummy_target::doc): Delete.
8151 (dummy_target::info): New.
8152 (debug_target::shortname, debug_target::longname)
8153 (debug_target::doc): Delete.
8154 (debug_target::info): New.
8155 * target.h (struct target_info): New.
8156 (target_ops::~target_ops): Add comment.
8157 (target_ops::info): New.
8158 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8159 longer virtual. Implement in terms of target_info.
8160 (set_native_target, get_native_target): Declare.
8161 (target_open_ftype): New.
8162 (add_target, add_target_with_completer)
8163 (add_deprecated_target_alias): Change prototype.
8164 (test_target) <shortname, longname, doc>: Delete.
8165 <info>: New.
8166 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8167 add_inf_child_target.
8168 * tracefile-tfile.c (tfile_target_info): New.
8169 (tfile_target) <shortname, longname, doc>: Delete.
8170 <info>: New.
8171 (tfile_target::open): Rename to ...
8172 (tfile_target_open): ... this.
8173 (_initialize_tracefile_tfile): Adjust.
8174 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8175 add_inf_child_target.
8176 * windows-nat.c (_initialize_windows_nat): Use
8177 add_inf_child_target.
8178 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8179 add_inf_child_target.
8180
8181 2018-05-02 Pedro Alves <palves@redhat.com>
8182
8183 * linux-nat.h (linux_nat_target) <low_new_thread,
8184 low_delete_thread, low_new_fork, low_forget_process,
8185 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8186 New virtual methods.
8187 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8188 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8189 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8190 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8191 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8192 Delete.
8193 * linux-fork.c (delete_fork): Adjust to call low method.
8194 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8195 (linux_nat_new_fork, linux_nat_forget_process_hook)
8196 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8197 (linux_nat_status_is_event):
8198 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8199 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8200 to call low method.
8201 (sigtrap_is_event): Rename to ...
8202 (linux_nat_target::low_status_is_event): ... this.
8203 (linux_nat_set_status_is_event): Delete.
8204 (save_stop_reason, linux_nat_wait_1)
8205 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8206 low methods.
8207 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8208 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8209 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8210 (linux_nat_set_prepare_to_resume): Delete.
8211 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8212 low virtual methods.
8213 * amd64-linux-nat.c: Likewise.
8214 * arm-linux-nat.c: Likewise.
8215 * i386-linux-nat.c: Likewise.
8216 * ia64-linux-nat.c: Likewise.
8217 * mips-linux-nat.c: Likewise.
8218 * ppc-linux-nat.c: Likewise.
8219 * s390-linux-nat.c: Likewise.
8220 * sparc64-linux-nat.c: Likewise.
8221 * x86-linux-nat.c: Likewise.
8222 * x86-linux-nat.h: Include "nat/x86-linux.h".
8223 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8224 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8225 Override methods.
8226
8227 2018-05-02 Pedro Alves <palves@redhat.com>
8228
8229 * target.h (target_ops)
8230 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8231 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8232 stopped_by_watchpoint, have_continuable_watchpoint,
8233 stopped_data_address, watchpoint_addr_within_range,
8234 can_accel_watchpoint_condition, can_run, thread_alive,
8235 has_all_memory, has_memory, has_stack, has_registers,
8236 has_execution, can_async_p, is_async_p, supports_non_stop,
8237 always_non_stop_p, can_execute_reverse, supports_multi_process,
8238 supports_enable_disable_tracepoint,
8239 supports_disable_randomization, supports_string_tracing,
8240 supports_evaluation_of_breakpoint_conditions,
8241 can_run_breakpoint_commands, filesystem_is_local,
8242 can_download_tracepoint, get_trace_state_variable_value,
8243 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8244 record_is_replaying, record_will_replay,
8245 augmented_libraries_svr4_read>: Adjust to return bool.
8246 * aarch64-linux-nat.c: All implementations adjusted.
8247 * aix-thread.c: All implementations adjusted.
8248 * arm-linux-nat.c: All implementations adjusted.
8249 * breakpoint.c: All implementations adjusted.
8250 * bsd-kvm.c: All implementations adjusted.
8251 * bsd-uthread.c: All implementations adjusted.
8252 * corelow.c: All implementations adjusted.
8253 * ctf.c: All implementations adjusted.
8254 * darwin-nat.c: All implementations adjusted.
8255 * darwin-nat.h: All implementations adjusted.
8256 * exec.c: All implementations adjusted.
8257 * fbsd-nat.c: All implementations adjusted.
8258 * fbsd-nat.h: All implementations adjusted.
8259 * gnu-nat.c: All implementations adjusted.
8260 * gnu-nat.h: All implementations adjusted.
8261 * go32-nat.c: All implementations adjusted.
8262 * ia64-linux-nat.c: All implementations adjusted.
8263 * inf-child.c: All implementations adjusted.
8264 * inf-child.h: All implementations adjusted.
8265 * inf-ptrace.c: All implementations adjusted.
8266 * inf-ptrace.h: All implementations adjusted.
8267 * linux-nat.c: All implementations adjusted.
8268 * linux-nat.h: All implementations adjusted.
8269 * mips-linux-nat.c: All implementations adjusted.
8270 * nto-procfs.c: All implementations adjusted.
8271 * ppc-linux-nat.c: All implementations adjusted.
8272 * procfs.c: All implementations adjusted.
8273 * ravenscar-thread.c: All implementations adjusted.
8274 * record-btrace.c: All implementations adjusted.
8275 * record-full.c: All implementations adjusted.
8276 * remote-sim.c: All implementations adjusted.
8277 * remote.c: All implementations adjusted.
8278 * s390-linux-nat.c: All implementations adjusted.
8279 * sol-thread.c: All implementations adjusted.
8280 * spu-multiarch.c: All implementations adjusted.
8281 * target-delegates.c: All implementations adjusted.
8282 * target.c: All implementations adjusted.
8283 * target.h: All implementations adjusted.
8284 * tracefile-tfile.c: All implementations adjusted.
8285 * tracefile.c: All implementations adjusted.
8286 * tracefile.h: All implementations adjusted.
8287 * windows-nat.c: All implementations adjusted.
8288 * x86-linux-nat.h: All implementations adjusted.
8289 * x86-nat.h: All implementations adjusted.
8290
8291 2018-05-02 Pedro Alves <palves@redhat.com>
8292
8293 * make-target-delegates (scan_target_h): Don't trim lines here.
8294 Replace sequences of tabs and/or whitespace with a single
8295 whitespace.
8296 (top level, parsing methods): Trim each line before processing it
8297 here.
8298
8299 2018-05-02 Pedro Alves <palves@redhat.com>
8300 John Baldwin <jhb@freebsd.org>
8301
8302 * target.h (enum strata) <debug_stratum>: New.
8303 (struct target_ops) <all delegation methods>: Replace by C++
8304 virtual methods, and drop "to_" prefix. All references updated
8305 throughout.
8306 <to_shortname, to_longname, to_doc, to_data,
8307 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8308 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8309 virtual methods. All references updated throughout.
8310 <can_attach, supports_terminal_ours, can_create_inferior,
8311 get_thread_control_capabilities, attach_no_wait>: New
8312 virtual methods.
8313 <insert_breakpoint, remove_breakpoint>: Now
8314 TARGET_DEFAULT_NORETURN methods.
8315 <info_proc>: Now returns bool.
8316 <to_magic>: Delete.
8317 (OPS_MAGIC): Delete.
8318 (current_target): Delete. All references replaced by references
8319 to ...
8320 (target_stack): ... this. New.
8321 (target_shortname, target_longname): Adjust.
8322 (target_can_run): Now a function declaration.
8323 (default_child_has_all_memory, default_child_has_memory)
8324 (default_child_has_stack, default_child_has_registers)
8325 (default_child_has_execution): Remove target_ops parameter.
8326 (complete_target_initialization): Delete.
8327 (memory_breakpoint_target): New template class.
8328 (test_target_ops): Refactor as a C++ class with virtual methods.
8329 * make-target-delegates (NAME_PART): Tighten.
8330 (POINTER_PART, CP_SYMBOL): New.
8331 (SIMPLE_RETURN_PART): Reimplement.
8332 (VEC_RETURN_PART): Expect less.
8333 (RETURN_PART, VIRTUAL_PART): New.
8334 (METHOD): Adjust to C++ virtual methods.
8335 (scan_target_h): Remove reference to C99.
8336 (dname): Output "target_ops::" prefix.
8337 (write_function_header): Adjust to output a C++ class method.
8338 (write_declaration): New.
8339 (write_delegator): Adjust to output a C++ class method.
8340 (tdname): Output "dummy_target::" prefix.
8341 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8342 method.
8343 (tdefault_names, debug_names): Delete.
8344 (return_types, tdefaults, styles, argtypes_array): New.
8345 (top level): All methods are delegators.
8346 (print_class): New.
8347 (top level): Print dummy_target and debug_target classes.
8348 * target-delegates.c: Regenerate.
8349 * target-debug.h (target_debug_print_enum_info_proc_what)
8350 (target_debug_print_thread_control_capabilities)
8351 (target_debug_print_thread_info_p): New.
8352 * target.c (dummy_target): Delete.
8353 (the_dummy_target, the_debug_target): New.
8354 (target_stack): Now extern.
8355 (set_targetdebug): Push/unpush debug target.
8356 (default_child_has_all_memory, default_child_has_memory)
8357 (default_child_has_stack, default_child_has_registers)
8358 (default_child_has_execution): Remove target_ops parameter.
8359 (complete_target_initialization): Delete.
8360 (add_target_with_completer): No longer call
8361 complete_target_initialization.
8362 (target_supports_terminal_ours): Use regular delegation.
8363 (update_current_target): Delete.
8364 (push_target): No longer check magic number. Don't call
8365 update_current_target.
8366 (unpush_target): Don't call update_current_target.
8367 (target_is_pushed): No longer check magic number.
8368 (target_require_runnable): Skip for all stratums over
8369 process_stratum.
8370 (target_ops::info_proc): New.
8371 (target_info_proc): Use find_target_at and
8372 find_default_run_target.
8373 (target_supports_disable_randomization): Use regular delegation.
8374 (target_get_osdata): Use find_target_at.
8375 (target_ops::open, target_ops::close, target_ops::can_attach)
8376 (target_ops::attach, target_ops::can_create_inferior)
8377 (target_ops::create_inferior, target_ops::can_run)
8378 (target_can_run): New.
8379 (default_fileio_target): Use regular delegation.
8380 (target_ops::fileio_open, target_ops::fileio_pwrite)
8381 (target_ops::fileio_pread, target_ops::fileio_fstat)
8382 (target_ops::fileio_close, target_ops::fileio_unlink)
8383 (target_ops::fileio_readlink): New.
8384 (target_fileio_open_1, target_fileio_unlink)
8385 (target_fileio_readlink): Always call the target method. Handle
8386 FILEIO_ENOSYS.
8387 (return_zero, return_zero_has_execution): Delete.
8388 (init_dummy_target): Delete.
8389 (dummy_target::dummy_target, dummy_target::shortname)
8390 (dummy_target::longname, dummy_target::doc)
8391 (debug_target::debug_target, debug_target::shortname)
8392 (debug_target::longname, debug_target::doc): New.
8393 (target_supports_delete_record): Use regular delegation.
8394 (setup_target_debug): Delete.
8395 (maintenance_print_target_stack): Skip debug_stratum.
8396 (initialize_targets): Instantiate the_dummy_target and
8397 the_debug_target.
8398 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8399 use target_stack.
8400 (target_auxv_search, fprint_target_auxv): Adjust.
8401 (info_auxv_command): Adjust to use target_stack.
8402 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8403 * exceptions.c (print_flush): Handle a NULL target_stack.
8404 * regcache.c (target_ops_no_register): Refactor as class with
8405 virtual methods.
8406
8407 * exec.c (exec_target): New class.
8408 (exec_ops): Now an exec_target.
8409 (exec_open, exec_close_1, exec_get_section_table)
8410 (exec_xfer_partial, exec_files_info, exec_has_memory)
8411 (exec_make_note_section): Refactor as exec_target methods.
8412 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8413 Delete.
8414 (exec_target::find_memory_regions): New.
8415 (_initialize_exec): Don't call init_exec_ops.
8416 * gdbcore.h (exec_file_clear): Delete.
8417
8418 * corefile.c (core_target): Delete.
8419 (core_file_command): Adjust.
8420 * corelow.c (core_target): New class.
8421 (the_core_target): New.
8422 (core_close): Remove target_ops parameter.
8423 (core_close_cleanup): Adjust.
8424 (core_target::close): New.
8425 (core_open, core_detach, get_core_registers, core_files_info)
8426 (core_xfer_partial, core_thread_alive, core_read_description)
8427 (core_pid_to_str, core_thread_name, core_has_memory)
8428 (core_has_stack, core_has_registers, core_info_proc): Rework as
8429 core_target methods.
8430 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8431 (_initialize_corelow): Initialize the_core_target.
8432 * gdbcore.h (core_target): Delete.
8433 (the_core_target): New.
8434
8435 * ctf.c: (ctf_target): New class.
8436 (ctf_ops): Now a ctf_target.
8437 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8438 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8439 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8440 methods.
8441 (init_ctf_ops): Delete.
8442 (_initialize_ctf): Don't call it.
8443 * tracefile-tfile.c (tfile_target): New class.
8444 (tfile_ops): Now a tfile_target.
8445 (tfile_open, tfile_close, tfile_files_info)
8446 (tfile_get_tracepoint_status, tfile_trace_find)
8447 (tfile_fetch_registers, tfile_xfer_partial)
8448 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8449 Refactor as tfile_target methods.
8450 (tfile_xfer_partial_features): Remove target_ops parameter.
8451 (init_tfile_ops): Delete.
8452 (_initialize_tracefile_tfile): Don't call it.
8453 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8454 (tracefile_has_stack, tracefile_has_registers)
8455 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8456 tracefile_target methods.
8457 (init_tracefile_ops): Delete.
8458 (tracefile_target::tracefile_target): New.
8459 * tracefile.h: Include "target.h".
8460 (tracefile_target): New class.
8461 (init_tracefile_ops): Delete.
8462
8463 * spu-multiarch.c (spu_multiarch_target): New class.
8464 (spu_ops): Now a spu_multiarch_target.
8465 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8466 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8467 (spu_search_memory, spu_mourn_inferior): Refactor as
8468 spu_multiarch_target methods.
8469 (init_spu_ops): Delete.
8470 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8471 complete_target_initialization.
8472
8473 * ravenscar-thread.c (ravenscar_thread_target): New class.
8474 (ravenscar_ops): Now a ravenscar_thread_target.
8475 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8476 (ravenscar_thread_alive, ravenscar_pid_to_str)
8477 (ravenscar_fetch_registers, ravenscar_store_registers)
8478 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8479 (ravenscar_stopped_by_hw_breakpoint)
8480 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8481 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8482 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8483 methods.
8484 (init_ravenscar_thread_ops): Delete.
8485 (_initialize_ravenscar): Remove references to
8486 init_ravenscar_thread_ops and complete_target_initialization.
8487
8488 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8489 (bsd_uthread_target): New class.
8490 (bsd_uthread_ops): Now a bsd_uthread_target.
8491 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8492 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8493 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8494 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8495 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8496 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8497 (bsd_uthread_target): Delete function.
8498 (_initialize_bsd_uthread): Remove reference to
8499 complete_target_initialization.
8500
8501 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8502 (target_bfd): ... this new class.
8503 (target_bfd_xfer_partial, target_bfd_get_section_table)
8504 (target_bfd_close): Refactor as target_bfd methods.
8505 (target_bfd::~target_bfd): New.
8506 (target_bfd_reopen): Adjust.
8507 (target_bfd::close): New.
8508
8509 * record-btrace.c (record_btrace_target): New class.
8510 (record_btrace_ops): Now a record_btrace_target.
8511 (record_btrace_open, record_btrace_stop_recording)
8512 (record_btrace_disconnect, record_btrace_close)
8513 (record_btrace_async, record_btrace_info)
8514 (record_btrace_insn_history, record_btrace_insn_history_range)
8515 (record_btrace_insn_history_from, record_btrace_call_history)
8516 (record_btrace_call_history_range)
8517 (record_btrace_call_history_from, record_btrace_record_method)
8518 (record_btrace_is_replaying, record_btrace_will_replay)
8519 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8520 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8521 (record_btrace_store_registers, record_btrace_prepare_to_store)
8522 (record_btrace_to_get_unwinder)
8523 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8524 (record_btrace_commit_resume, record_btrace_wait)
8525 (record_btrace_stop, record_btrace_can_execute_reverse)
8526 (record_btrace_stopped_by_sw_breakpoint)
8527 (record_btrace_supports_stopped_by_sw_breakpoint)
8528 (record_btrace_stopped_by_hw_breakpoint)
8529 (record_btrace_supports_stopped_by_hw_breakpoint)
8530 (record_btrace_update_thread_list, record_btrace_thread_alive)
8531 (record_btrace_goto_begin, record_btrace_goto_end)
8532 (record_btrace_goto, record_btrace_stop_replaying_all)
8533 (record_btrace_execution_direction)
8534 (record_btrace_prepare_to_generate_core)
8535 (record_btrace_done_generating_core): Refactor as
8536 record_btrace_target methods.
8537 (init_record_btrace_ops): Delete.
8538 (_initialize_record_btrace): Remove reference to
8539 init_record_btrace_ops.
8540 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8541 the execution_direction global.
8542 (record_full_base_target, record_full_target)
8543 (record_full_core_target): New classes.
8544 (record_full_ops): Now a record_full_target.
8545 (record_full_core_ops): Now a record_full_core_target.
8546 (record_full_target::detach, record_full_target::disconnect)
8547 (record_full_core_target::disconnect)
8548 (record_full_target::mourn_inferior, record_full_target::kill):
8549 New.
8550 (record_full_open, record_full_close, record_full_async): Refactor
8551 as methods of the record_full_base_target class.
8552 (record_full_resume, record_full_commit_resume): Refactor
8553 as methods of the record_full_target class.
8554 (record_full_wait, record_full_stopped_by_watchpoint)
8555 (record_full_stopped_data_address)
8556 (record_full_stopped_by_sw_breakpoint)
8557 (record_full_supports_stopped_by_sw_breakpoint)
8558 (record_full_stopped_by_hw_breakpoint)
8559 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8560 methods of the record_full_base_target class.
8561 (record_full_store_registers, record_full_xfer_partial)
8562 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8563 Refactor as methods of the record_full_target class.
8564 (record_full_can_execute_reverse, record_full_get_bookmark)
8565 (record_full_goto_bookmark, record_full_execution_direction)
8566 (record_full_record_method, record_full_info, record_full_delete)
8567 (record_full_is_replaying, record_full_will_replay)
8568 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8569 (record_full_stop_replaying): Refactor as methods of the
8570 record_full_base_target class.
8571 (record_full_core_resume, record_full_core_kill)
8572 (record_full_core_fetch_registers)
8573 (record_full_core_prepare_to_store)
8574 (record_full_core_store_registers, record_full_core_xfer_partial)
8575 (record_full_core_insert_breakpoint)
8576 (record_full_core_remove_breakpoint)
8577 (record_full_core_has_execution): Refactor
8578 as methods of the record_full_core_target class.
8579 (record_full_base_target::supports_delete_record): New.
8580 (init_record_full_ops): Delete.
8581 (init_record_full_core_ops): Delete.
8582 (record_full_save): Refactor as method of the
8583 record_full_base_target class.
8584 (_initialize_record_full): Remove references to
8585 init_record_full_ops and init_record_full_core_ops.
8586
8587 * remote.c (remote_target, extended_remote_target): New classes.
8588 (remote_ops): Now a remote_target.
8589 (extended_remote_ops): Now an extended_remote_target.
8590 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8591 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8592 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8593 (remote_pass_signals, remote_set_syscall_catchpoint)
8594 (remote_program_signals, )
8595 (remote_thread_always_alive): Remove target_ops parameter.
8596 (remote_thread_alive, remote_thread_name)
8597 (remote_update_thread_list, remote_threads_extra_info)
8598 (remote_static_tracepoint_marker_at)
8599 (remote_static_tracepoint_markers_by_strid)
8600 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8601 (remote_open): Refactor as methods of remote_target.
8602 (extended_remote_open, extended_remote_detach)
8603 (extended_remote_attach, extended_remote_post_attach):
8604 (extended_remote_supports_disable_randomization)
8605 (extended_remote_create_inferior): : Refactor as method of
8606 extended_remote_target.
8607 (remote_set_permissions, remote_open_1, remote_detach)
8608 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8609 (remote_resume, remote_commit_resume, remote_stop)
8610 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8611 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8612 (remote_prepare_to_store, remote_store_registers)
8613 (remote_flash_erase, remote_flash_done, remote_files_info)
8614 (remote_kill, remote_mourn, remote_insert_breakpoint)
8615 (remote_remove_breakpoint, remote_insert_watchpoint)
8616 (remote_watchpoint_addr_within_range)
8617 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8618 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8619 (remote_supports_stopped_by_sw_breakpoint)
8620 (remote_stopped_by_hw_breakpoint)
8621 (remote_supports_stopped_by_hw_breakpoint)
8622 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8623 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8624 (remote_verify_memory): Refactor as methods of remote_target.
8625 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8626 parameter.
8627 (remote_xfer_partial, remote_get_memory_xfer_limit)
8628 (remote_search_memory, remote_rcmd, remote_memory_map)
8629 (remote_pid_to_str, remote_get_thread_local_address)
8630 (remote_get_tib_address, remote_read_description): Refactor as
8631 methods of remote_target.
8632 (remote_target::fileio_open, remote_target::fileio_pwrite)
8633 (remote_target::fileio_pread, remote_target::fileio_close): New.
8634 (remote_hostio_readlink, remote_hostio_fstat)
8635 (remote_filesystem_is_local, remote_can_execute_reverse)
8636 (remote_supports_non_stop, remote_supports_disable_randomization)
8637 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8638 (remote_supports_enable_disable_tracepoint)
8639 (remote_supports_string_tracing)
8640 (remote_can_run_breakpoint_commands, remote_trace_init)
8641 (remote_download_tracepoint, remote_can_download_tracepoint)
8642 (remote_download_trace_state_variable, remote_enable_tracepoint)
8643 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8644 (remote_trace_start, remote_get_trace_status)
8645 (remote_get_tracepoint_status, remote_trace_stop)
8646 (remote_trace_find, remote_get_trace_state_variable_value)
8647 (remote_save_trace_data, remote_get_raw_trace_data)
8648 (remote_set_disconnected_tracing, remote_core_of_thread)
8649 (remote_set_circular_trace_buffer, remote_traceframe_info)
8650 (remote_get_min_fast_tracepoint_insn_len)
8651 (remote_set_trace_buffer_size, remote_set_trace_notes)
8652 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8653 (remote_disable_btrace, remote_teardown_btrace)
8654 (remote_read_btrace, remote_btrace_conf)
8655 (remote_augmented_libraries_svr4_read, remote_load)
8656 (remote_pid_to_exec_file, remote_can_do_single_step)
8657 (remote_execution_direction, remote_thread_handle_to_thread_info):
8658 Refactor as methods of remote_target.
8659 (init_remote_ops, init_extended_remote_ops): Delete.
8660 (remote_can_async_p, remote_is_async_p, remote_async)
8661 (remote_thread_events, remote_upload_tracepoints)
8662 (remote_upload_trace_state_variables): Refactor as methods of
8663 remote_target.
8664 (_initialize_remote): Remove references to init_remote_ops and
8665 init_extended_remote_ops.
8666
8667 * remote-sim.c (gdbsim_target): New class.
8668 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8669 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8670 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8671 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8672 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8673 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8674 Refactor as methods of gdbsim_target.
8675 (gdbsim_ops): Now a gdbsim_target.
8676 (init_gdbsim_ops): Delete.
8677 (gdbsim_cntrl_c): Adjust.
8678 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8679
8680 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8681 (the_amd64_linux_nat_target): New.
8682 (amd64_linux_fetch_inferior_registers)
8683 (amd64_linux_store_inferior_registers): Refactor as methods of
8684 amd64_linux_nat_target.
8685 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8686 * i386-linux-nat.c: Don't include "linux-nat.h".
8687 (i386_linux_nat_target): New class.
8688 (the_i386_linux_nat_target): New.
8689 (i386_linux_fetch_inferior_registers)
8690 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8691 as methods of i386_linux_nat_target.
8692 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8693 * inf-child.c (inf_child_ops): Delete.
8694 (inf_child_fetch_inferior_registers)
8695 (inf_child_store_inferior_registers): Delete.
8696 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8697 methods of inf_child_target.
8698 (inf_child_target::supports_terminal_ours)
8699 (inf_child_target::terminal_init)
8700 (inf_child_target::terminal_inferior)
8701 (inf_child_target::terminal_ours_for_output)
8702 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8703 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8704 New.
8705 (inf_child_open, inf_child_disconnect, inf_child_close)
8706 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8707 (inf_child_post_startup_inferior, inf_child_can_run)
8708 (inf_child_pid_to_exec_file): Refactor as methods of
8709 inf_child_target.
8710 (inf_child_follow_fork): Delete.
8711 (inf_child_target::can_create_inferior)
8712 (inf_child_target::can_attach): New.
8713 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8714 (inf_child_target::has_stack, inf_child_target::has_registers)
8715 (inf_child_target::has_execution): New.
8716 (inf_child_fileio_open, inf_child_fileio_pwrite)
8717 (inf_child_fileio_pread, inf_child_fileio_fstat)
8718 (inf_child_fileio_close, inf_child_fileio_unlink)
8719 (inf_child_fileio_readlink, inf_child_use_agent)
8720 (inf_child_can_use_agent): Refactor as methods of
8721 inf_child_target.
8722 (return_zero, inf_child_target): Delete.
8723 (inf_child_target::inf_child_target): New.
8724 * inf-child.h: Include "target.h".
8725 (inf_child_target): Delete function prototype.
8726 (inf_child_target): New class.
8727 (inf_child_open_target, inf_child_mourn_inferior)
8728 (inf_child_maybe_unpush_target): Delete.
8729 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8730 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8731 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8732 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8733 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8734 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8735 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8736 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8737 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8738 methods of inf_ptrace_target.
8739 (inf_ptrace_target): Delete function.
8740 * inf-ptrace.h: Include "inf-child.h".
8741 (inf_ptrace_target): Delete function declaration.
8742 (inf_ptrace_target): New class.
8743 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8744 * linux-nat.c (linux_target): New.
8745 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8746 (linux_nat_target::~linux_nat_target): New.
8747 (linux_child_post_attach, linux_child_post_startup_inferior)
8748 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8749 (linux_child_remove_fork_catchpoint)
8750 (linux_child_insert_vfork_catchpoint)
8751 (linux_child_remove_vfork_catchpoint)
8752 (linux_child_insert_exec_catchpoint)
8753 (linux_child_remove_exec_catchpoint)
8754 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8755 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8756 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8757 (linux_nat_stopped_data_address)
8758 (linux_nat_stopped_by_sw_breakpoint)
8759 (linux_nat_supports_stopped_by_sw_breakpoint)
8760 (linux_nat_stopped_by_hw_breakpoint)
8761 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8762 (linux_nat_kill, linux_nat_mourn_inferior)
8763 (linux_nat_xfer_partial, linux_nat_thread_alive)
8764 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8765 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8766 (linux_child_static_tracepoint_markers_by_strid)
8767 (linux_nat_is_async_p, linux_nat_can_async_p)
8768 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8769 (linux_nat_supports_multi_process)
8770 (linux_nat_supports_disable_randomization, linux_nat_async)
8771 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8772 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8773 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8774 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8775 methods of linux_nat_target.
8776 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8777 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8778 parameter.
8779 (check_stopped_by_watchpoint): Adjust.
8780 (linux_xfer_partial): Delete.
8781 (linux_target_install_ops, linux_target, linux_nat_add_target):
8782 Delete.
8783 (linux_nat_target::linux_nat_target): New.
8784 * linux-nat.h: Include "inf-ptrace.h".
8785 (linux_nat_target): New.
8786 (linux_target, linux_target_install_ops, linux_nat_add_target):
8787 Delete function declarations.
8788 (linux_target): Declare global.
8789 * linux-thread-db.c (thread_db_target): New.
8790 (thread_db_target::thread_db_target): New.
8791 (thread_db_ops): Delete.
8792 (the_thread_db_target): New.
8793 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8794 (thread_db_update_thread_list, thread_db_pid_to_str)
8795 (thread_db_extra_thread_info)
8796 (thread_db_thread_handle_to_thread_info)
8797 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8798 (thread_db_resume): Refactor as methods of thread_db_target.
8799 (init_thread_db_ops): Delete.
8800 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8801 * x86-linux-nat.c: Don't include "linux-nat.h".
8802 (super_post_startup_inferior): Delete.
8803 (x86_linux_nat_target::~x86_linux_nat_target): New.
8804 (x86_linux_child_post_startup_inferior)
8805 (x86_linux_read_description, x86_linux_enable_btrace)
8806 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8807 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8808 methods of x86_linux_nat_target.
8809 (x86_linux_create_target): Delete. Bits folded ...
8810 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8811 pointer.
8812 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8813 (x86_linux_nat_target): New class.
8814 (x86_linux_create_target): Delete.
8815 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8816 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8817 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8818 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8819 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8820 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8821 make extern.
8822 (x86_use_watchpoints): Delete.
8823 * x86-nat.h: Include "breakpoint.h" and "target.h".
8824 (x86_use_watchpoints): Delete.
8825 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8826 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8827 (x86_insert_watchpoint, x86_remove_watchpoint)
8828 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8829 (x86_stopped_by_hw_breakpoint): New declarations.
8830 (x86_nat_target): New template class.
8831
8832 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8833 (the_ppc_linux_nat_target): New.
8834 (ppc_linux_fetch_inferior_registers)
8835 (ppc_linux_can_use_hw_breakpoint)
8836 (ppc_linux_region_ok_for_hw_watchpoint)
8837 (ppc_linux_ranged_break_num_registers)
8838 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8839 (ppc_linux_insert_mask_watchpoint)
8840 (ppc_linux_remove_mask_watchpoint)
8841 (ppc_linux_can_accel_watchpoint_condition)
8842 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8843 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8844 (ppc_linux_watchpoint_addr_within_range)
8845 (ppc_linux_masked_watch_num_registers)
8846 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8847 (ppc_linux_read_description): Refactor as methods of
8848 ppc_linux_nat_target.
8849 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8850
8851 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8852 (procfs_target): New class.
8853 (the_procfs_target): New.
8854 (procfs_target): Delete function.
8855 (procfs_auxv_parse, procfs_attach, procfs_detach)
8856 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8857 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8858 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8859 (procfs_create_inferior, procfs_update_thread_list)
8860 (procfs_thread_alive, procfs_pid_to_str)
8861 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8862 (procfs_stopped_data_address, procfs_insert_watchpoint)
8863 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8864 (proc_find_memory_regions, procfs_info_proc)
8865 (procfs_make_note_section): Refactor as methods of procfs_target.
8866 (_initialize_procfs): Adjust.
8867 * sol-thread.c (sol_thread_target): New class.
8868 (sol_thread_ops): Now a sol_thread_target.
8869 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8870 (sol_thread_fetch_registers, sol_thread_store_registers)
8871 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8872 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8873 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8874 (init_sol_thread_ops): Delete.
8875 (_initialize_sol_thread): Adjust. Remove references to
8876 init_sol_thread_ops and complete_target_initialization.
8877
8878 * windows-nat.c (windows_nat_target): New class.
8879 (windows_fetch_inferior_registers)
8880 (windows_store_inferior_registers, windows_resume, windows_wait)
8881 (windows_attach, windows_detach, windows_pid_to_exec_file)
8882 (windows_files_info, windows_create_inferior)
8883 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8884 (windows_close, windows_pid_to_str, windows_xfer_partial)
8885 (windows_get_tib_address, windows_get_ada_task_ptid)
8886 (windows_thread_name, windows_thread_alive): Refactor as
8887 windows_nat_target methods.
8888 (do_initial_windows_stuff): Adjust.
8889 (windows_target): Delete function.
8890 (_initialize_windows_nat): Adjust.
8891
8892 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8893 (darwin_mourn_inferior, darwin_kill_inferior)
8894 (darwin_create_inferior, darwin_attach, darwin_detach)
8895 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8896 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8897 (darwin_supports_multi_process): Refactor as darwin_nat_target
8898 methods.
8899 (darwin_resume_to, darwin_files_info): Delete.
8900 (_initialize_darwin_inferior): Rename to ...
8901 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8902 * darwin-nat.h: Include "inf-child.h".
8903 (darwin_nat_target): New class.
8904 (darwin_complete_target): Delete.
8905 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8906 (darwin_target): New.
8907 (i386_darwin_fetch_inferior_registers)
8908 (i386_darwin_store_inferior_registers): Refactor as methods of
8909 darwin_nat_target.
8910 (darwin_complete_target): Delete, with ...
8911 (_initialize_i386_darwin_nat): ... bits factored out here.
8912
8913 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8914 (the_alpha_linux_nat_target): New.
8915 (alpha_linux_register_u_offset): Refactor as
8916 alpha_linux_nat_target method.
8917 (_initialize_alpha_linux_nat): Adjust.
8918 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8919 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8920 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8921 methods of linux_nat_trad_target.
8922 (linux_trad_target): Delete.
8923 * linux-nat-trad.h (linux_trad_target): Delete function.
8924 (linux_nat_trad_target): New class.
8925 * mips-linux-nat.c (mips_linux_nat_target): New class.
8926 (super_fetch_registers, super_store_registers, super_close):
8927 Delete.
8928 (the_mips_linux_nat_target): New.
8929 (mips64_linux_regsets_fetch_registers)
8930 (mips64_linux_regsets_store_registers)
8931 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8932 (mips_linux_register_u_offset, mips_linux_read_description)
8933 (mips_linux_can_use_hw_breakpoint)
8934 (mips_linux_stopped_by_watchpoint)
8935 (mips_linux_stopped_data_address)
8936 (mips_linux_region_ok_for_hw_watchpoint)
8937 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8938 (mips_linux_close): Refactor as methods of mips_linux_nat.
8939 (_initialize_mips_linux_nat): Adjust to C++ification.
8940
8941 * aix-thread.c (aix_thread_target): New class.
8942 (aix_thread_ops): Now an aix_thread_target.
8943 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8944 (aix_thread_fetch_registers, aix_thread_store_registers)
8945 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8946 (aix_thread_thread_alive, aix_thread_pid_to_str)
8947 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8948 Refactor as methods of aix_thread_target.
8949 (init_aix_thread_ops): Delete.
8950 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8951 and complete_target_initialization.
8952 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8953 (rs6000_nat_target): New class.
8954 (the_rs6000_nat_target): New.
8955 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8956 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8957 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8958 (super_create_inferior): Delete.
8959 (_initialize_rs6000_nat): Adjust to C++ification.
8960
8961 * arm-linux-nat.c (arm_linux_nat_target): New class.
8962 (the_arm_linux_nat_target): New.
8963 (arm_linux_fetch_inferior_registers)
8964 (arm_linux_store_inferior_registers, arm_linux_read_description)
8965 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8966 (arm_linux_remove_hw_breakpoint)
8967 (arm_linux_region_ok_for_hw_watchpoint)
8968 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8969 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8970 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8971 arm_linux_nat_target.
8972 (_initialize_arm_linux_nat): Adjust to C++ification.
8973
8974 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8975 (the_aarch64_linux_nat_target): New.
8976 (aarch64_linux_fetch_inferior_registers)
8977 (aarch64_linux_store_inferior_registers)
8978 (aarch64_linux_child_post_startup_inferior)
8979 (aarch64_linux_read_description)
8980 (aarch64_linux_can_use_hw_breakpoint)
8981 (aarch64_linux_insert_hw_breakpoint)
8982 (aarch64_linux_remove_hw_breakpoint)
8983 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8984 (aarch64_linux_region_ok_for_hw_watchpoint)
8985 (aarch64_linux_stopped_data_address)
8986 (aarch64_linux_stopped_by_watchpoint)
8987 (aarch64_linux_watchpoint_addr_within_range)
8988 (aarch64_linux_can_do_single_step): Refactor as methods of
8989 aarch64_linux_nat_target.
8990 (super_post_startup_inferior): Delete.
8991 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8992
8993 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8994 (the_hppa_linux_nat_target): New.
8995 (hppa_linux_fetch_inferior_registers)
8996 (hppa_linux_store_inferior_registers): Refactor as methods of
8997 hppa_linux_nat_target.
8998 (_initialize_hppa_linux_nat): Adjust to C++ification.
8999
9000 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9001 (the_ia64_linux_nat_target): New.
9002 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9003 (ia64_linux_stopped_data_address)
9004 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9005 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9006 ia64_linux_nat_target methods.
9007 (super_xfer_partial): Delete.
9008 (_initialize_ia64_linux_nat): Adjust to C++ification.
9009
9010 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9011 (the_m32r_linux_nat_target): New.
9012 (m32r_linux_fetch_inferior_registers)
9013 (m32r_linux_store_inferior_registers): Refactor as
9014 m32r_linux_nat_target methods.
9015 (_initialize_m32r_linux_nat): Adjust to C++ification.
9016
9017 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9018 (the_m68k_linux_nat_target): New.
9019 (m68k_linux_fetch_inferior_registers)
9020 (m68k_linux_store_inferior_registers): Refactor as
9021 m68k_linux_nat_target methods.
9022 (_initialize_m68k_linux_nat): Adjust to C++ification.
9023
9024 * s390-linux-nat.c (s390_linux_nat_target): New class.
9025 (the_s390_linux_nat_target): New.
9026 (s390_linux_fetch_inferior_registers)
9027 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9028 (s390_insert_watchpoint, s390_remove_watchpoint)
9029 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9030 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9031 (s390_auxv_parse, s390_read_description): Refactor as methods of
9032 s390_linux_nat_target.
9033 (_initialize_s390_nat): Adjust to C++ification.
9034
9035 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9036 (the_sparc_linux_nat_target): New.
9037 (_initialize_sparc_linux_nat): Adjust to C++ification.
9038 * sparc-nat.c (sparc_fetch_inferior_registers)
9039 (sparc_store_inferior_registers): Remove target_ops parameter.
9040 * sparc-nat.h (sparc_fetch_inferior_registers)
9041 (sparc_store_inferior_registers): Remove target_ops parameter.
9042 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9043 (the_sparc64_linux_nat_target): New.
9044 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9045
9046 * spu-linux-nat.c (spu_linux_nat_target): New class.
9047 (the_spu_linux_nat_target): New.
9048 (spu_child_post_startup_inferior, spu_child_post_attach)
9049 (spu_child_wait, spu_fetch_inferior_registers)
9050 (spu_store_inferior_registers, spu_xfer_partial)
9051 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9052 methods.
9053 (_initialize_spu_nat): Adjust to C++ification.
9054
9055 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9056 (the_tilegx_linux_nat_target): New.
9057 (fetch_inferior_registers, store_inferior_registers):
9058 Refactor as methods.
9059 (_initialize_tile_linux_nat): Adjust to C++ification.
9060
9061 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9062 (the_xtensa_linux_nat_target): New.
9063 (xtensa_linux_fetch_inferior_registers)
9064 (xtensa_linux_store_inferior_registers): Refactor as
9065 xtensa_linux_nat_target methods.
9066 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9067
9068 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9069 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9070 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9071 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9072 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9073 (fbsd_stopped_by_sw_breakpoint)
9074 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9075 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9076 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9077 (fbsd_post_startup_inferior, fbsd_post_attach)
9078 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9079 (fbsd_set_syscall_catchpoint)
9080 (super_xfer_partial, super_resume, super_wait)
9081 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9082 (fbsd_handle_debug_trap): Remove target_ops parameter.
9083 (fbsd_nat_add_target): Delete.
9084 * fbsd-nat.h: Include "inf-ptrace.h".
9085 (fbsd_nat_add_target): Delete.
9086 (USE_SIGTRAP_SIGINFO): Define.
9087 (fbsd_nat_target): New class.
9088
9089 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9090 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9091 (amd64bsd_target): Delete.
9092 * amd64-bsd-nat.h: New file.
9093 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9094 "x86-bsd-nat.h".
9095 (amd64_fbsd_nat_target): New class.
9096 (the_amd64_fbsd_nat_target): New.
9097 (amd64fbsd_read_description): Refactor as method of
9098 amd64_fbsd_nat_target.
9099 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9100 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9101 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9102 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9103 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9104 (i386bsd_target): Delete.
9105 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9106 (i386bsd_fetch_inferior_registers)
9107 (i386bsd_store_inferior_registers): Declare.
9108 (i386_bsd_nat_target): New class.
9109 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9110 (the_i386_fbsd_nat_target): New.
9111 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9112 i386_fbsd_nat_target methods.
9113 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9114 (_initialize_i386fbsd_nat): Adjust to C++ification.
9115 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9116 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9117 (_initialize_x86_bsd_nat): Adjust to C++ification.
9118 * x86-bsd-nat.h: Include "x86-nat.h".
9119 (x86bsd_target): Delete declaration.
9120 (x86bsd_nat_target): New class.
9121
9122 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9123 (the_aarch64_fbsd_nat_target): New.
9124 (aarch64_fbsd_fetch_inferior_registers)
9125 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9126 aarch64_fbsd_nat_target.
9127 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9128 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9129 (the_alpha_bsd_nat_target): New.
9130 (alphabsd_fetch_inferior_registers)
9131 (alphabsd_store_inferior_registers): Refactor as
9132 alpha_bsd_nat_target methods.
9133 (_initialize_alphabsd_nat): Refactor as methods of
9134 alpha_bsd_nat_target.
9135 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9136 (the_amd64_nbsd_nat_target): New.
9137 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9138 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9139 (the_amd64_obsd_nat_target): New.
9140 (_initialize_amd64obsd_nat): Adjust to C++ification.
9141 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9142 (the_arm_fbsd_nat_target): New.
9143 (arm_fbsd_fetch_inferior_registers)
9144 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9145 (_initialize_arm_fbsd_nat): Refactor as methods of
9146 arm_fbsd_nat_target.
9147 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9148 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9149 (the_arm_netbsd_nat_target): New.
9150 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9151 arm_netbsd_nat_target.
9152 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9153 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9154 (the_hppa_nbsd_nat_target): New.
9155 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9156 hppa_nbsd_nat_target methods.
9157 (_initialize_hppanbsd_nat): Adjust to C++ification.
9158 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9159 (the_hppa_obsd_nat_target): New.
9160 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9161 methods of hppa_obsd_nat_target.
9162 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9163 add_target.
9164 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9165 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9166 add_target.
9167 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9168 (_initialize_i386obsd_nat): Use add_target.
9169 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9170 (the_m68k_bsd_nat_target): New.
9171 (m68kbsd_fetch_inferior_registers)
9172 (m68kbsd_store_inferior_registers): Refactor as methods of
9173 m68k_bsd_nat_target.
9174 (_initialize_m68kbsd_nat): Adjust to C++ification.
9175 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9176 (the_mips_fbsd_nat_target): New.
9177 (mips_fbsd_fetch_inferior_registers)
9178 (mips_fbsd_store_inferior_registers): Refactor as methods of
9179 mips_fbsd_nat_target.
9180 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9181 add_target.
9182 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9183 (the_mips_nbsd_nat_target): New.
9184 (mipsnbsd_fetch_inferior_registers)
9185 (mipsnbsd_store_inferior_registers): Refactor as methods of
9186 mips_nbsd_nat_target.
9187 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9188 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9189 (the_mips64_obsd_nat_target): New.
9190 (mips64obsd_fetch_inferior_registers)
9191 (mips64obsd_store_inferior_registers): Refactor as methods of
9192 mips64_obsd_nat_target.
9193 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9194 add_target.
9195 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9196 nbsd_nat_target.
9197 * nbsd-nat.h: Include "inf-ptrace.h".
9198 (nbsd_nat_target): New class.
9199 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9200 (obsd_wait): Refactor as methods of obsd_nat_target.
9201 (obsd_add_target): Delete.
9202 * obsd-nat.h: Include "inf-ptrace.h".
9203 (obsd_nat_target): New class.
9204 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9205 (the_ppc_fbsd_nat_target): New.
9206 (ppcfbsd_fetch_inferior_registers)
9207 (ppcfbsd_store_inferior_registers): Refactor as methods of
9208 ppc_fbsd_nat_target.
9209 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9210 add_target.
9211 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9212 (the_ppc_nbsd_nat_target): New.
9213 (ppcnbsd_fetch_inferior_registers)
9214 (ppcnbsd_store_inferior_registers): Refactor as methods of
9215 ppc_nbsd_nat_target.
9216 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9217 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9218 (the_ppc_obsd_nat_target): New.
9219 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9220 methods of ppc_obsd_nat_target.
9221 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9222 add_target.
9223 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9224 (the_sh_nbsd_nat_target): New.
9225 (shnbsd_fetch_inferior_registers)
9226 (shnbsd_store_inferior_registers): Refactor as methods of
9227 sh_nbsd_nat_target.
9228 (_initialize_shnbsd_nat): Adjust to C++ification.
9229 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9230 (inf_ptrace_xfer_partial): Delete.
9231 (sparc_xfer_partial, sparc_target): Delete.
9232 * sparc-nat.h (sparc_fetch_inferior_registers)
9233 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9234 (sparc_target): Delete function declaration.
9235 (sparc_target): New template class.
9236 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9237 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9238 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9239 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9240 add_target.
9241 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9242 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9243 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9244 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9245 add_target.
9246 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9247 (the_vax_bsd_nat_target): New.
9248 (vaxbsd_fetch_inferior_registers)
9249 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9250 methods.
9251 (_initialize_vaxbsd_nat): Adjust to C++ification.
9252
9253 * bsd-kvm.c (bsd_kvm_target): New class.
9254 (bsd_kvm_ops): Now a bsd_kvm_target.
9255 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9256 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9257 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9258 bsd_kvm_target.
9259 (bsd_kvm_return_one): Delete.
9260 (bsd_kvm_add_target): Adjust to C++ification.
9261
9262 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9263 (nto_procfs_target_procfs): New classes.
9264 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9265 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9266 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9267 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9268 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9269 (procfs_remove_hw_breakpoint, procfs_resume)
9270 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9271 (procfs_kill_inferior, procfs_store_registers)
9272 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9273 as methods of nto_procfs_target.
9274 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9275 (nto_native_ops): Delete.
9276 (procfs_open, procfs_native_open): Delete.
9277 (nto_native_ops): Now an nto_procfs_target_native.
9278 (init_procfs_targets): Adjust to C++ification.
9279 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9280 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9281 Refactor as methods of nto_procfs_target.
9282
9283 * go32-nat.c (go32_nat_target): New class.
9284 (the_go32_nat_target): New.
9285 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9286 (go32_store_registers, go32_xfer_partial, go32_files_info)
9287 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9288 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9289 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9290 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9291 (go32_target): Delete.
9292 (_initialize_go32_nat): Adjust to C++ification.
9293
9294 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9295 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9296 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9297 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9298 gnu_nat_target.
9299 (gnu_target): Delete.
9300 * gnu-nat.h (gnu_target): Delete.
9301 (gnu_nat_target): New class.
9302 * i386-gnu-nat.c (gnu_base_target): New.
9303 (i386_gnu_nat_target): New class.
9304 (the_i386_gnu_nat_target): New.
9305 (_initialize_i386gnu_nat): Adjust to C++ification.
9306
9307 2018-05-02 Pedro Alves <palves@redhat.com>
9308
9309 * bfd-target.c (target_bfd_xclose): Rename to ...
9310 (target_bfd_close): ... this.
9311 (target_bfd_reopen): Adjust.
9312 * target.c (target_close): Remove references to to_xclose.
9313 * target.h (target_ops::to_xclose): Delete.
9314 (target_ops::to_close): Update comments.
9315
9316 2018-05-02 Pedro Alves <palves@redhat.com>
9317
9318 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9319 "linux-nat.h".
9320 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9321 * inf-ptrace.c (inf_ptrace_register_u_offset)
9322 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9323 (inf_ptrace_store_register, inf_ptrace_store_registers)
9324 (inf_ptrace_trad_target): Move to ...
9325 * linux-nat-trad.c: ... this new file.
9326 * linux-nat-trad.h: New file.
9327 * linux-nat.c (linux_target_install_ops): Make extern.
9328 (linux_trad_target): Delete.
9329 * linux-nat.h (linux_trad_target): Delete declaration.
9330 (linux_target_install_ops): Declare.
9331 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9332 "linux-nat.h".
9333
9334 2018-05-02 Pedro Alves <palves@redhat.com>
9335
9336 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9337 procfs_target/add_target here.
9338 * procfs.c (procfs_target): Make static.
9339 (_initialize_procfs): Call add_target here.
9340 * procfs.h (struct target_ops): Remove forward declaration.
9341 (procfs_target): Remove declaration.
9342 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9343
9344 2018-05-02 Pedro Alves <palves@redhat.com>
9345
9346 * procfs.c (procfs_stopped_by_watchpoint)
9347 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9348 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9349 Forward declare.
9350 (procfs_use_watchpoints): Delete, move contents...
9351 (procfs_target): ... here.
9352 * procfs.h (procfs_use_watchpoints): Delete declaration.
9353 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9354 procfs_use_watchpoints.
9355 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9356 procfs_use_watchpoints.
9357
9358 2018-05-02 Tom Tromey <tom@tromey.com>
9359
9360 PR python/20084:
9361 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9362 and var_zuinteger_unlimited.
9363 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9364 and PARAM_ZUINTEGER_UNLIMITED.
9365 (set_parameter_value): Handle var_zuinteger and
9366 var_zuinteger_unlimited.
9367 (add_setshow_generic): Likewise.
9368 (parmpy_init): Likewise.
9369
9370 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9371
9372 PR rust/23124
9373 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9374 pointer is not null before dereferencing it.
9375
9376 2018-04-30 Tom Tromey <tom@tromey.com>
9377
9378 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9379 is_mi_like_p.
9380
9381 2018-04-30 Tom Tromey <tom@tromey.com>
9382
9383 * breakpoint.c (mention): Remove use of is_mi_like_p.
9384 (print_mention_ranged_breakpoint): Likewise.
9385 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9386 of is_mi_like_p.
9387
9388 2018-04-30 Tom Tromey <tom@tromey.com>
9389
9390 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9391
9392 2018-04-30 Tom Tromey <tom@tromey.com>
9393
9394 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9395 (info_spu_event_command): Remove some uses of is_mi_like_p.
9396
9397 2018-04-30 Tom Tromey <tom@tromey.com>
9398
9399 * python/py-framefilter.c (py_print_single_arg)
9400 (enumerate_locals, py_print_args, py_print_frame): Remove some
9401 uses of is_mi_like_p.
9402
9403 2018-04-30 Tom Tromey <tom@tromey.com>
9404
9405 * ui-out.c: Update.
9406 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9407 * ui-out.h (ui_out::is_mi_like_p): Now const.
9408 (ui_out::do_is_mi_like_p): Now const.
9409 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9410
9411 2018-04-30 Tom Tromey <tom@tromey.com>
9412
9413 * varobj.c (varobj_set_visualizer): Use new_reference.
9414 * python/python.c (gdbpy_decode_line): Use new_reference.
9415 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9416 new_reference.
9417
9418 2018-04-30 Tom Tromey <tom@tromey.com>
9419
9420 * varobj.c (install_new_value): Use new_reference.
9421 * value.h (value_incref): Return void. Swap intro comment with
9422 value_decref.
9423 * value.c (set_value_parent): Use new_reference.
9424 (value_incref): Return void. Update intro comment.
9425 (release_value): Use new_reference.
9426 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9427
9428 2018-04-30 Tom Tromey <tom@tromey.com>
9429
9430 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9431 * gdb_bfd.h (new_bfd_ref): Remove.
9432 (gdb_bfd_open): Update comment.
9433 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9434 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9435 (gdb_bfd_fdopenr): Use new_reference.
9436 * exec.c (exec_file_attach): Use new_reference.
9437
9438 2018-04-30 Tom Tromey <tom@tromey.com>
9439
9440 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9441 method.
9442
9443 2018-04-30 Tom Tromey <tom@tromey.com>
9444
9445 * jit.c (jit_read_code_entry): Use type_align.
9446 * i386-tdep.c (i386_gdbarch_init): Don't call
9447 set_gdbarch_long_long_align_bit.
9448 * gdbarch.sh: Remove long_long_align_bit.
9449 * gdbarch.c, gdbarch.h: Rebuild.
9450 * arc-tdep.c (arc_type_align): New function.
9451 (arc_gdbarch_init): Use arc_type_align. Don't call
9452 set_gdbarch_long_long_align_bit.
9453
9454 2018-04-30 Tom Tromey <tom@tromey.com>
9455
9456 * rust-lang.c (rust_type_alignment): Remove.
9457 (rust_composite_type): Use type_align.
9458
9459 2018-04-30 Tom Tromey <tom@tromey.com>
9460
9461 * NEWS: Mention Type.align.
9462 * python/py-type.c (typy_get_alignof): New function.
9463 (type_object_getset): Add "alignof".
9464
9465 2018-04-30 Tom Tromey <tom@tromey.com>
9466
9467 PR exp/17095:
9468 * NEWS: Update.
9469 * std-operator.def (UNOP_ALIGNOF): New operator.
9470 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9471 New.
9472 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9473 * c-lang.c (c_op_print_tab): Add alignof.
9474 * c-exp.y (ALIGNOF): New token.
9475 (exp): Add "ALIGNOF" production.
9476 (ident_tokens): Add _Alignof and alignof.
9477
9478 2018-04-30 Tom Tromey <tom@tromey.com>
9479
9480 * i386-tdep.c (i386_type_align): New function.
9481 (i386_gdbarch_init): Update.
9482 * gdbarch.sh (type_align): New method.
9483 * gdbarch.c, gdbarch.h: Rebuild.
9484 * arch-utils.h (default_type_align): Declare.
9485 * arch-utils.c (default_type_align): New function.
9486 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9487 (struct type) <align_log2>: New field.
9488 <instance_flags>: Now a bitfield.
9489 (TYPE_RAW_ALIGN): New macro.
9490 (type_align, type_raw_align, set_type_align): Declare.
9491 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9492 functions.
9493 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9494 (get_alignment, maybe_set_alignment): New functions.
9495 (read_structure_type, read_enumeration_type, read_array_type)
9496 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9497 (read_subrange_type, read_base_type): Set type alignment.
9498
9499 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9500
9501 * dwarf2read.c (read_index_from_section): Use bool.
9502
9503 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9504
9505 PR gdb/22950
9506 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9507 with #ifdef.
9508
9509 2018-04-29 John Reiser <jreiser@BitWagon.com>
9510
9511 PR build/22873
9512 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9513 last step, and do it atomically.
9514
9515 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9516
9517 * compile/compile-c-types.c (convert_int, convert_float):
9518 Update for C FE v1.
9519
9520 2018-04-27 Tom Tromey <tom@tromey.com>
9521
9522 PR rust/22545:
9523 * rust-lang.c (rust_inclusive_range_type_p): New function.
9524 (rust_range): Handle inclusive ranges.
9525 (rust_compute_range): Likewise.
9526 * rust-exp.y (struct rust_op) <inclusive>: New field.
9527 (DOTDOTEQ): New constant.
9528 (range_expr): Add "..=" productions.
9529 (operator_tokens): Add "..=" token.
9530 (ast_range): Add "inclusive" parameter.
9531 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9532 ranges.
9533 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9534 bounds values.
9535 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9536 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9537 Update comments.
9538 * expprint.c (print_subexp_standard): Handle new bounds values.
9539 (dump_subexp_body_standard): Likewise.
9540
9541 2018-04-27 Tom Tromey <tom@tromey.com>
9542
9543 * configure: Rebuild.
9544 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9545 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9546 "OVERRIDE".
9547 (class symbol_needs_eval_context): Likewise.
9548 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9549 (mock_mapped_index::symbol_name_at): Use "override". Remove
9550 "virtual".
9551 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9552 "override".
9553 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9554 * aarch64-tdep.c (instruction_reader::read): Use "override".
9555 (instruction_reader_test::read): Likewise.
9556 * arm-tdep.c (instruction_reader::read): Use "override".
9557 (instruction_reader_thumb::read): Likewise.
9558
9559 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9560
9561 PR remote/9665
9562 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9563 instead of remote_send.
9564 (remote_send): Remove.
9565
9566 2018-04-26 Pedro Alves <palves@redhat.com>
9567
9568 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9569 find_function_start_sal instead of find_pc_line.
9570
9571 2018-04-26 Pedro Alves <palves@redhat.com>
9572
9573 * breakpoint.c (set_breakpoint_location_function): Handle
9574 mst_data_gnu_ifunc.
9575 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9576 * elfread.c (elf_symtab_read): Give data symbols with
9577 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9578 (elf_rel_plt_read): Update comment.
9579 * linespec.c (convert_linespec_to_sals): Handle
9580 mst_data_gnu_ifunc.
9581 (minsym_found): Handle mst_data_gnu_ifunc.
9582 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9583 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9584 * parse.c (find_minsym_type_and_address): Handle
9585 mst_data_gnu_ifunc.
9586 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9587 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9588 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9589 comment.
9590 <mst_data_gnu_ifunc>: New enumerator.
9591
9592 2018-04-26 Pedro Alves <palves@redhat.com>
9593
9594 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9595 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9596 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9597 Handle it.
9598 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9599 (lookup_minimal_symbol_by_pc): Adjust.
9600 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9601 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9602 * minsyms.h (lookup_msym_prefer): New enum.
9603 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9604 parameter by a lookup_msym_prefer parameter.
9605
9606 2018-04-26 Pedro Alves <palves@redhat.com>
9607
9608 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9609 ends in "@plt" instead of looking at the symbol's section.
9610
9611 2018-04-26 Pedro Alves <palves@redhat.com>
9612
9613 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9614 all references.
9615 (find_pc_partial_function_gnu_ifunc): Rename to ...
9616 (find_pc_partial_function): ... this, and remove references to
9617 'is_gnu_ifunc_p'.
9618 (find_pc_partial_function): Delete old implementation.
9619 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9620
9621 2018-04-26 Pedro Alves <palves@redhat.com>
9622
9623 * linespec.c (struct bound_minimal_symbol_search_key): New.
9624 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9625 skip first line if we found a GNU ifunc minimal symbol by name.
9626 (compare_msymbols): Change parameters to work with a destructured
9627 lhs minsym.
9628 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9629 functions.
9630
9631 2018-04-26 Pedro Alves <palves@redhat.com>
9632
9633 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9634 ifunc targets here. Instead, if we have an ifunc minsym, use its
9635 address/name.
9636 (add_location_to_breakpoint): Store the minsym and the objfile in
9637 the breakpoint location.
9638 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9639 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9640 Record the minsym in the sal.
9641 * symtab.h (symtab_and_line) <msymbol>: New field.
9642
9643 2018-04-26 Pedro Alves <palves@redhat.com>
9644
9645 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9646 unless we actually resolved the ifunc.
9647
9648 2018-04-26 Pedro Alves <palves@redhat.com>
9649
9650 * c-exp.y (variable production): Prefer ifunc minsyms over
9651 regular function symbols.
9652 * symtab.c (find_gnu_ifunc): New function.
9653 * minsyms.h (lookup_msym_prefer): New enum.
9654 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9655 parameter by a lookup_msym_prefer parameter.
9656 * symtab.h (find_gnu_ifunc): New declaration.
9657
9658 2018-04-26 Pedro Alves <palves@redhat.com>
9659
9660 * blockframe.c (find_gnu_ifunc_target_type): New function.
9661 (find_function_type): New.
9662 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9663 return a value with a memory address.
9664 (eval_call): For calls to GNU ifunc functions, try to find the
9665 type of the target function from the type that the resolver
9666 returns.
9667 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9668 symbols.
9669 * infcall.c (find_function_return_type): Delete.
9670 (find_function_addr): Add 'function_type' parameter. For calls to
9671 GNU ifunc functions, try to find the type of the target function
9672 from the type that the resolver returns, and return it via
9673 FUNCTION_TYPE.
9674 (call_function_by_hand_dummy): Adjust to use the function type
9675 returned by find_function_addr.
9676 (find_function_addr): Add 'function_type' parameter and move
9677 description here.
9678 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9679 declarations.
9680
9681 2018-04-26 Pedro Alves <palves@redhat.com>
9682
9683 * c-exp.y (variable production): Skip finding an alias for ifunc
9684 symbols.
9685
9686 2018-04-26 Pedro Alves <palves@redhat.com>
9687
9688 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9689
9690 2018-04-25 Pedro Alves <palves@redhat.com>
9691
9692 * infcmd.c (kill_command): Print the pid as string, not the whole
9693 thread's ptid. Add comment. s/has been killed/killed/ in output
9694 message.
9695 * remote.c (remote_detach_1): Print the pid as string, not the
9696 whole thread's ptid.
9697
9698 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9699 Sergio Durigan Junior <sergiodj@redhat.com>
9700 Pedro Alves <palves@redhat.com>
9701
9702 * infcmd.c (kill_command): Print message when inferior has
9703 been killed.
9704 * inferior.c (print_inferior_events): Remove 'static'. Set as
9705 '1'.
9706 (add_inferior): Improve message printed when
9707 'print_inferior_events' is on.
9708 (exit_inferior): Remove message printed when
9709 'print_inferior_events' is on.
9710 (detach_inferior): Improve message printed when
9711 'print_inferior_events' is on.
9712 (initialize_inferiors): Use 'add_inferior_silent' to set
9713 'current_inferior_'.
9714 * inferior.h (print_inferior_events): Declare here as
9715 'extern'.
9716 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9717 '[Detaching...]' messages when 'print_inferior_events' is on.
9718 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9719 as prefix/suffix for messages. Remove periods. Fix erroneous
9720 'Detaching after fork from child...', replace it by '... from
9721 parent...'.
9722 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9723 prefix/suffix when printing 'Detaching...' messages. Print
9724 them when 'print_inferior_events' is on.
9725 * remote.c (remote_detach_1): Print message when detaching
9726 from inferior and '!is_fork_parent'.
9727
9728 2018-04-24 Tom Tromey <tom@tromey.com>
9729
9730 * cli-out.h: Reindent.
9731
9732 2018-04-24 Tom Tromey <tom@tromey.com>
9733
9734 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9735 (cli_ui_out::do_field_string): Use fputs_filtered.
9736 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9737
9738 2018-04-23 Tom Tromey <tom@tromey.com>
9739
9740 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9741 gdb::unique_xmalloc_ptr.
9742
9743 2018-04-23 Tom Tromey <tom@tromey.com>
9744
9745 * configure: Rebuild.
9746
9747 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9748
9749 PR gdb/23095
9750 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9751 prepare_for_testing. Set normal_bp to r_debug_state if target
9752 is bsd.
9753
9754 2018-04-21 Pedro Alves <palves@redhat.com>
9755 Rajendra SY <rajendra.sy@gmail.com>
9756
9757 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9758 * remote.c (extended_remote_attach): In all-stop mode, mark the
9759 thread as executing.
9760
9761 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9762
9763 * thread.c (thread_apply_all_command): Fix comment.
9764 (thread_command): Fix comment.
9765
9766 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9767
9768 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9769 parameter.
9770 * features/aarch64-core.c (create_feature_aarch64_core):
9771 Regenerate.
9772 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9773 Likewise.
9774 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9775 Likewise.
9776 * features/i386/32bit-avx512.c
9777 (create_feature_i386_32bit_avx512): Likewise.
9778 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9779 Likewise.
9780 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9781 Likewise.
9782 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9783 Likewise.
9784 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9785 Likewise.
9786 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9787 Likewise.
9788 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9789 Likewise.
9790 * features/i386/64bit-avx512.c
9791 (create_feature_i386_64bit_avx512): Likewise.
9792 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9793 Likewise.
9794 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9795 Likewise.
9796 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9797 Likewise.
9798 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9799 Likewise.
9800 * features/i386/64bit-segments.c
9801 (create_feature_i386_64bit_segments): Likewise.
9802 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9803 Likewise.
9804 * features/i386/x32-core.c
9805 (create_feature_i386_x32_core): Likewise.
9806 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9807 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9808 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9809 * target-descriptions.c: In generated code, don't pass xml
9810 filename.
9811
9812 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9813
9814 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9815 (print_xml_feature::visit_post): Likewise.
9816 (print_xml_feature::visit): Likewise.
9817 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9818 (print_xml_feature): Add new class.
9819 * regformats/regdat.sh: Null xmltarget on feature targets.
9820 * target-descriptions.c (struct target_desc): Add xmltarget.
9821 (maintenance_check_tdesc_xml_convert): Add unittest function.
9822 (tdesc_get_features_xml): Add function to get xml.
9823 (maintenance_check_xml_descriptions): Test xml generation.
9824 * xml-tdesc.c (string_read_description_xml): Add function.
9825 * xml-tdesc.h (string_read_description_xml): Add declaration.
9826
9827 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9828
9829 * features/Makefile: Add feature marker to targets with new style
9830 target descriptions.
9831 * regformats/aarch64.dat: Regenerate.
9832 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9833 * regformats/i386/amd64-avx-linux.dat: Likewise.
9834 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9835 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9836 * regformats/i386/amd64-linux.dat: Likewise.
9837 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9838 * regformats/i386/amd64.dat: Likewise.
9839 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9840 * regformats/i386/i386-avx-linux.dat: Likewise.
9841 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9842 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9843 * regformats/i386/i386-linux.dat: Likewise.
9844 * regformats/i386/i386-mmx-linux.dat: Likewise.
9845 * regformats/i386/i386-mpx-linux.dat: Likewise.
9846 * regformats/i386/i386.dat: Likewise.
9847 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9848 * regformats/i386/x32-avx-linux.dat: Likewise.
9849 * regformats/i386/x32-linux.dat: Likewise.
9850 * regformats/tic6x-c62x-linux.dat: Likewise.
9851 * regformats/tic6x-c64x-linux.dat: Likewise.
9852 * regformats/tic6x-c64xp-linux.dat: Likewise.
9853 * regformats/regdat.sh: Parse feature marker.
9854
9855 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9856
9857 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9858 (tdesc_osabi_name): Likewise.
9859 * target-descriptions.c (tdesc_architecture_name): Add new
9860 function.
9861 (tdesc_osabi_name): Likewise.
9862
9863 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9864
9865 * common/tdesc.c (tdesc_predefined_type): Move to here.
9866 (tdesc_named_type): Likewise.
9867 (tdesc_create_vector): Likewise.
9868 (tdesc_create_struct): Likewise.
9869 (tdesc_set_struct_size): Likewise.
9870 (tdesc_create_union): Likewise.
9871 (tdesc_create_flags): Likewise.
9872 (tdesc_create_enum): Likewise.
9873 (tdesc_add_field): Likewise.
9874 (tdesc_add_typed_bitfield): Likewise.
9875 (tdesc_add_bitfield): Likewise.
9876 (tdesc_add_flag): Likewise.
9877 (tdesc_add_enum_value): Likewise.
9878 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9879 (struct tdesc_type_vector): Likewise.
9880 (struct tdesc_type_field): Likewise.
9881 (struct tdesc_type_with_fields): Likewise.
9882 (tdesc_create_enum): Add declaration.
9883 (tdesc_add_typed_bitfield): Likewise.
9884 (tdesc_add_enum_value): Likewise.
9885 * target-descriptions.c (tdesc_type_field): Move from here.
9886 (tdesc_type_builtin): Likewise.
9887 (tdesc_type_vector): Likewise.
9888 (tdesc_type_with_fields): Likewise.
9889 (tdesc_predefined_types): Likewise.
9890 (tdesc_named_type): Likewise.
9891 (tdesc_create_vector): Likewise.
9892 (tdesc_create_struct): Likewise.
9893 (tdesc_set_struct_size): Likewise.
9894 (tdesc_create_union): Likewise.
9895 (tdesc_create_flags): Likewise.
9896 (tdesc_create_enum): Likewise.
9897 (tdesc_add_field): Likewise.
9898 (tdesc_add_typed_bitfield): Likewise.
9899 (tdesc_add_bitfield): Likewise.
9900 (tdesc_add_flag): Likewise.
9901 (tdesc_add_enum_value): Likewise.
9902 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9903 (tdesc_add_typed_bitfield): Likewise.
9904 (tdesc_add_enum_value): Likewise.
9905
9906 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9907
9908 * common/tdesc.c (tdesc_feature::accept): Move to here.
9909 (tdesc_feature::operator==): Likewise.
9910 (tdesc_create_reg): Likewise.
9911 * common/tdesc.h (tdesc_type_kind): Likewise.
9912 (struct tdesc_type): Likewise.
9913 (struct tdesc_feature): Likewise.
9914 * regformats/regdat.sh: Create a feature.
9915 * target-descriptions.c (tdesc_type_kind): Move from here.
9916 (tdesc_type): Likewise.
9917 (tdesc_type_up): Likewise.
9918 (tdesc_feature): Likewise.
9919 (tdesc_create_reg): Likewise.
9920
9921 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9922
9923 * Makefile.in: Add arch/tdesc.c
9924 * common/tdesc.c: New file.
9925 * common/tdesc.h (tdesc_element_visitor): Move to here.
9926 (tdesc_element): Likewise.
9927 (tdesc_reg): Likewise.
9928 (tdesc_reg_up): Likewise.
9929 * regformats/regdef.h (reg): Add offset to constructors.
9930 * target-descriptions.c (tdesc_element_visitor): Move from here.
9931 (tdesc_element): Likewise.
9932 (tdesc_reg): Likewise.
9933 (tdesc_reg_up): Likewise.
9934
9935 2018-04-17 Tom Tromey <tom@tromey.com>
9936
9937 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9938 discriminant field.
9939
9940 2018-04-17 Tom Tromey <tom@tromey.com>
9941
9942 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9943
9944 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9945
9946 * symtab.c (print_symbol_info): Skip printing filename and line
9947 number when `last' is NULL.
9948 (symtab_symbol_info): Use empty string instead of NULL for first
9949 invocation of print_symbol_info.
9950 (rbreak_command): Pass NULL to `last' parameter of
9951 print_symbol_info.
9952
9953 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9954
9955 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9956 instead of nullptr.
9957
9958 2018-04-16 Pedro Alves <palves@redhat.com>
9959
9960 * MAINTAINERS (sh): Remove.
9961 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9962 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9963 (ALLDEPFILES): Remove sh64-tdep.c.
9964 * NEWS: Mentions that support for SH-5/SH64 is removed.
9965 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9966 (sh*-*-openbsd*): Ditto.
9967 (sh64-*-elf*): Remove.
9968 (sh*): Remove.
9969 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9970 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9971 * sh-tdep.c: No longer include "sh64-tdep.h".
9972 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9973 * sh64-tdep.c, sh64-tdep.h: Remove files.
9974
9975 2018-04-16 Pedro Alves <palves@redhat.com>
9976
9977 * MAINTAINERS: Remove m88k.
9978 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9979 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9980 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9981 * NEWS: Mention that support for m88k was removed.
9982 * configure.host (m88*-*-*): Remove support.
9983 * configure.nat (m88k-*-*): Remove support.
9984 * configure.tgt (m88*-*-openbsd*): Remove.
9985 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9986
9987 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9988
9989 * configure.tgt (x86_tobjs): New variable.
9990 (amd64_tobjs, i386_tobjs): Use it.
9991
9992 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9993
9994 * symtab.c (print_symbol_info): Precede the symbol definition by
9995 the line number when available.
9996 * NEWS: Advertise this enhancement.
9997
9998 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9999
10000 * NEWS (New options): announce set/show record btrace cpu.
10001 * btrace.c: Include record-btrace.h.
10002 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10003 the vendor is unknown.
10004 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10005 Maybe overwrite the btrace configuration's cpu.
10006 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10007 (btrace_fetch): Add cpu parameter. Update callers.
10008 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10009 Maybe overwrite the btrace configuration's cpu. Skip enabling
10010 errata workarounds if the vendor is unknown.
10011 * python/py-record-btrace.c: Include record-btrace.h.
10012 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10013 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10014 * record-btrace.c (record_btrace_cpu_state_kind): New.
10015 (record_btrace_cpu): New.
10016 (set_record_btrace_cpu_cmdlist): New.
10017 (record_btrace_get_cpu): New.
10018 (require_btrace_thread, record_btrace_info)
10019 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10020 (cmd_set_record_btrace_cpu_none): New.
10021 (cmd_set_record_btrace_cpu_auto): New.
10022 (cmd_set_record_btrace_cpu): New.
10023 (cmd_show_record_btrace_cpu): New.
10024 (_initialize_record_btrace): Initialize set/show record btrace cpu
10025 commands.
10026 * record-btrace.h (record_btrace_get_cpu): New.
10027
10028 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10029
10030 * record.c (set_record_command): Fix typo in message.
10031
10032 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10033
10034 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10035
10036 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10037
10038 * infrun.c (process_event_stop_test): Call
10039 gdbarch_in_indirect_branch_thunk.
10040 * gdbarch.sh (in_indirect_branch_thunk): New.
10041 * gdbarch.c: Regenerated.
10042 * gdbarch.h: Regenerated.
10043 * x86-tdep.h: New.
10044 * x86-tdep.c: New.
10045 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10046 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10047 (ALLDEPFILES): Add x86-tdep.c.
10048 * arch-utils.h (default_in_indirect_branch_thunk): New.
10049 * arch-utils.c (default_in_indirect_branch_thunk): New.
10050 * i386-tdep: Include x86-tdep.h.
10051 (i386_in_indirect_branch_thunk): New.
10052 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10053 function.
10054 * amd64-tdep: Include x86-tdep.h.
10055 (amd64_in_indirect_branch_thunk): New.
10056 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10057
10058 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10059
10060 PR gdb/23053
10061 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10062 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10063 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10064 regression.
10065
10066 2018-04-12 Tom Tromey <tom@tromey.com>
10067
10068 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10069 (rust_evaluate_subexp): Likewise.
10070
10071 2018-04-12 Pedro Alves <palves@redhat.com>
10072
10073 * procfs.c (procfs_detach): Make forward declaration's prototype
10074 match definition's protototype.
10075 (proc_get_LDT_entry): Remove stale do_cleanups call.
10076
10077 2018-04-12 Pedro Alves <palves@redhat.com>
10078
10079 * target.h (target_ops::to_has_exited): Delete.
10080 (target_has_exited): Delete.
10081 * target-delegates.c: Regenerate.
10082
10083 2018-04-11 Pedro Alves <palves@redhat.com>
10084
10085 * target.c (fileio_fh_t::t): Add comment.
10086 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10087 (target_fileio_close): Handle a NULL target.
10088 (invalidate_fileio_fh): New.
10089 (target_close): Call it.
10090 * remote.c (remote_hostio_send_command): No longer check whether
10091 remote_desc is open.
10092
10093 2018-04-11 Pedro Alves <palves@redhat.com>
10094
10095 * target.c (fileio_fh_t): Make it a named struct instead of a
10096 typedef.
10097 (fileio_fh_t::is_closed): New method.
10098 (DEF_VEC_O (fileio_fh_t)): Remove.
10099 (fileio_fhandles): Now a std::vector.
10100 (is_closed_fileio_fh): Delete.
10101 (acquire_fileio_fd): Adjust. Rename parameters.
10102 (release_fileio_fd): Adjust.
10103 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10104 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10105 (target_fileio_close): Adjust.
10106
10107 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10108
10109 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10110 index.
10111
10112 2018-04-10 Pedro Alves <palves@redhat.com>
10113
10114 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10115 (scoped_finish_thread_state): New class.
10116 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10117 cleanup.
10118 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10119 (fetch_inferior_event, normal_stop): Likewise.
10120 * thread.c (finish_thread_state_cleanup): Delete.
10121
10122 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10123 Pedro Alves <palves@redhat.com>
10124
10125 * value.c: Include "selftest.h" and "common/array-view.h".
10126 (struct range) <operator ==>: New.
10127 (test_ranges_contain): New.
10128 (check_ranges_vector): New.
10129 (test_insert_into_bit_range_vector): New.
10130 (_initialize_values): Register selftests.
10131 * common/array-view.h (operator==, operator!=): New.
10132
10133 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10134
10135 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10136 an iterator.
10137 * inline-frame.c: Include <algorithm>.
10138 (struct inline_state): Add constructor.
10139 (inline_state_s): Remove.
10140 (DEF_VEC_O(inline_state_s)): Remove.
10141 (inline_states): Change type to std::vector.
10142 (find_inline_frame_state): Adjust to std::vector.
10143 (allocate_inline_frame_state): Remove.
10144 (clear_inline_frame_state): Adjust to std::vector.
10145 (skip_inline_frames): Adjust to std::vector.
10146
10147 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10148
10149 * tracepoint.h (struct trace_state_variable): Add constructor.
10150 <name>: Change type to std::string.
10151 * tracepoint.c (tsv_s): Remove.
10152 (DEF_VEC_O(tsv_s)): Remove.
10153 (tvariables): Change to std::vector.
10154 (create_trace_state_variable): Adjust to std::vector.
10155 (find_trace_state_variable): Likewise.
10156 (find_trace_state_variable_by_number): Likewise.
10157 (delete_trace_state_variable): Likewise.
10158 (trace_variable_command): Adjust to std::string.
10159 (delete_trace_variable_command): Likewise.
10160 (tvariables_info_1): Adjust to std::vector.
10161 (save_trace_state_variables): Likewise.
10162 (start_tracing): Likewise.
10163 (merge_uploaded_trace_state_variables): Adjust to std::vector
10164 and std::string.
10165 * target.h (struct target_ops)
10166 <to_download_trace_state_variable>: Pass reference to
10167 trace_state_variable.
10168 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10169 * target-delegates.c: Re-generate.
10170 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10171 (mi_tsv_deleted): Likewise.
10172 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10173 * remote.c (remote_download_trace_state_variable): Change
10174 pointer to reference and adjust.
10175 * make-target-delegates (parse_argtypes): Handle references.
10176 (write_function_header): Likewise.
10177 (munge_type): Likewise.
10178
10179 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10180
10181 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10182 string_view-selftests.c.
10183 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10184 testsuite.
10185 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10186 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10187 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10188 * unittests/basic_string_view/element_access/char/1.cc:
10189 Likewise.
10190 * unittests/basic_string_view/element_access/char/empty.cc:
10191 Likewise.
10192 * unittests/basic_string_view/element_access/char/front_back.cc:
10193 Likewise.
10194 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10195 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10196 Likewise.
10197 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10198 Likewise.
10199 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10200 Likewise.
10201 * unittests/basic_string_view/operations/compare/char/1.cc:
10202 Likewise.
10203 * unittests/basic_string_view/operations/compare/char/13650.cc:
10204 Likewise.
10205 * unittests/basic_string_view/operations/copy/char/1.cc:
10206 Likewise.
10207 * unittests/basic_string_view/operations/data/char/1.cc:
10208 Likewise.
10209 * unittests/basic_string_view/operations/find/char/1.cc:
10210 Likewise.
10211 * unittests/basic_string_view/operations/find/char/2.cc:
10212 Likewise.
10213 * unittests/basic_string_view/operations/find/char/3.cc:
10214 Likewise.
10215 * unittests/basic_string_view/operations/find/char/4.cc:
10216 Likewise.
10217 * unittests/basic_string_view/operations/rfind/char/1.cc:
10218 Likewise.
10219 * unittests/basic_string_view/operations/rfind/char/2.cc:
10220 Likewise.
10221 * unittests/basic_string_view/operations/rfind/char/3.cc:
10222 Likewise.
10223 * unittests/basic_string_view/operations/substr/char/1.cc:
10224 Likewise.
10225 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10226 * unittests/string_view-selftests.c: New file.
10227
10228 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10229
10230 * unittests/basic_string_view/capacity/1.cc: New file.
10231 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10232 * unittests/basic_string_view/cons/char/1.cc: New file.
10233 * unittests/basic_string_view/cons/char/2.cc: New file.
10234 * unittests/basic_string_view/cons/char/3.cc: New file.
10235 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10236 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10237 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10238 * unittests/basic_string_view/element_access/char/1.cc: New file.
10239 * unittests/basic_string_view/element_access/char/2.cc: New file.
10240 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10241 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10242 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10243 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10244 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10245 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10246 * unittests/basic_string_view/include.cc: New file.
10247 * unittests/basic_string_view/inserters/char/1.cc: New file.
10248 * unittests/basic_string_view/inserters/char/2.cc: New file.
10249 * unittests/basic_string_view/inserters/char/3.cc: New file.
10250 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10251 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10252 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10253 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10254 * unittests/basic_string_view/literals/types.cc: New file.
10255 * unittests/basic_string_view/literals/values.cc: New file.
10256 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10257 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10258 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10259 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10260 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10261 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10262 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10263 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10264 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10265 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10266 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10267 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10268 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10269 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10270 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10271 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10272 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10273 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10274 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10275 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10276 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10277 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10278 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10279 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10280 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10281 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10282 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10283 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10284 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10285 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10286 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10287 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10288 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10289 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10290 * unittests/basic_string_view/operators/char/2.cc: New file.
10291 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10292 * unittests/basic_string_view/range_access/char/1.cc: New file.
10293 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10294 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10295 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10296 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10297 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10298 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10299 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10300 * unittests/basic_string_view/typedefs.cc: New file.
10301 * unittests/basic_string_view/types/1.cc: New file.
10302
10303 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10304
10305 * common/gdb_string_view.h: Remove libstdc++ implementation
10306 details, adjust to gdb reality.
10307 * common/gdb_string_view.tcc: Likewise.
10308 * cli/cli-script.c (struct string_view): Remove.
10309 (user_args) <m_args>: Change element type to gdb::string_view.
10310 (user_args::insert_args): Adjust.
10311
10312 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10313
10314 * common/gdb_string_view.h: New file.
10315 * common/gdb_string_view.tcc: New file.
10316
10317 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10318
10319 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10320 * configure: Re-generate.
10321
10322 2018-04-09 Pedro Alves <palves@redhat.com>
10323
10324 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10325 (set_target_gdbarch): Call
10326 gdb::observers::architecture_changed.notify instead of
10327 observer_notify_architecture_changed.
10328
10329 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10330
10331 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10332 (do_restore_current_traceframe_cleanup): Remove.
10333 (restore_current_traceframe_cleanup_dtor): Remove.
10334 (make_cleanup_restore_current_traceframe): Remove.
10335 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10336 New.
10337 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10338 * infrun.c (fetch_inferior_event): Use
10339 scoped_restore_current_traceframe.
10340
10341 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10342
10343 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10344 Remove.
10345 <n_allocated_type_units>: Remove.
10346 <all_type_units>: Change to std::vector.
10347 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10348 to std::vector change.
10349 (dwarf2_per_objfile::get_cutu): Likewise.
10350 (dwarf2_per_objfile::get_tu): Likewise.
10351 (create_signatured_type_table_from_index): Likewise.
10352 (create_signatured_type_table_from_debug_names): Likewise.
10353 (dw2_symtab_iter_next): Likewise.
10354 (dw2_print_stats): Likewise.
10355 (dw2_expand_all_symtabs): Likewise.
10356 (dw2_expand_marked_cus): Likewise.
10357 (dw2_debug_names_iterator::next): Likewise.
10358 (dwarf2_initialize_objfile): Likewise.
10359 (add_signatured_type_cu_to_table): Likewise.
10360 (create_all_type_units): Likewise.
10361 (add_type_unit): Likewise.
10362 (struct tu_abbrev_offset): Add constructor.
10363 (build_type_psymtabs_1): Adjust to std::vector change.
10364 (print_tu_stats): Likewise.
10365 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10366 (write_debug_names): Likewise.
10367
10368 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10369
10370 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10371 Make an std::vector.
10372 <n_comp_units>: Remove.
10373 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10374 to std::vector change.
10375 (dwarf2_per_objfile::get_cutu): Likewise.
10376 (dwarf2_per_objfile::get_cu): Likewise.
10377 (create_cus_from_index): Likewise.
10378 (create_addrmap_from_index): Likewise.
10379 (create_addrmap_from_aranges): Likewise.
10380 (dwarf2_read_index): Likewise.
10381 (dw2_find_last_source_symtab): Likewise.
10382 (dw2_map_symtabs_matching_filename): Likewise.
10383 (dw2_symtab_iter_next): Likewise.
10384 (dw2_print_stats): Likewise.
10385 (dw2_expand_all_symtabs): Likewise.
10386 (dw2_expand_symtabs_with_fullname): Likewise.
10387 (dw2_expand_marked_cus): Likewise.
10388 (dw2_map_symbol_filenames): Likewise.
10389 (create_cus_from_debug_names): Likewise.
10390 (dwarf2_read_debug_names): Likewise.
10391 (dw2_debug_names_iterator::next): Likewise.
10392 (dwarf2_initialize_objfile): Likewise.
10393 (set_partial_user): Likewise.
10394 (dwarf2_build_psymtabs_hard): Likewise.
10395 (read_comp_units_from_section): Remove arguments, adjust to
10396 std::vector change.
10397 (create_all_comp_units): Adjust to std::vector and
10398 read_comp_units_from_section changes.
10399 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10400 change.
10401 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10402 (psyms_seen_size): Likewise.
10403 (write_gdbindex): Likewise.
10404 (write_debug_names): Likewise.
10405
10406 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10407
10408 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10409 with dwarf2_per_objfile.
10410 (create_cus_from_index): Likewise.
10411 (create_signatured_type_table_from_index): Likewise.
10412 (dwarf2_read_index): Likewise.
10413 (dwarf2_initialize_objfile): Likewise.
10414 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10415 per_cu rather than get_dwarf2_per_objfile.
10416
10417 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10418
10419 * dwarf2read.h (struct signatured_type): Forward declare.
10420 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10421 New methods.
10422 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10423 (dw2_get_cutu): ...this.
10424 (dwarf2_per_objfile::get_cu): Rename from...
10425 (dw2_get_cu): ...this.
10426 (dwarf2_per_objfile::get_tu): New.
10427 (create_addrmap_from_index): Adjust.
10428 (create_addrmap_from_aranges): Adjust.
10429 (dw2_find_last_source_symtab): Adjust.
10430 (dw2_map_symtabs_matching_filename): Adjust.
10431 (dw2_symtab_iter_next): Adjust.
10432 (dw2_print_stats): Adjust.
10433 (dw2_expand_all_symtabs): Adjust.
10434 (dw2_expand_symtabs_with_fullname): Adjust.
10435 (dw2_expand_marked_cus): Adjust.
10436 (dw_expand_symtabs_matching_file_matcher): Adjust.
10437 (dw2_map_symbol_filenames): Adjust.
10438 (dw2_debug_names_iterator::next): Adjust.
10439 (dwarf2_initialize_objfile): Adjust.
10440 (set_partial_user): Adjust.
10441 (dwarf2_build_psymtabs_hard): Adjust.
10442
10443 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10444
10445 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10446 Remove unused variables.
10447 (dw2_map_symtabs_matching_filename): Likewise.
10448 (dwarf2_record_block_ranges): Likewise.
10449 (dwarf2_read_addr_index): Likewise.
10450 (follow_die_offset): Likewise.
10451
10452 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10453
10454 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10455 to symbol_file_add_main.
10456
10457 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10458
10459 PR mi/22299
10460 * mi/mi-console.c (do_fputc_async_safe): New.
10461 (mi_console_file::write_async_safe): New.
10462 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10463 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10464 New.
10465 * ui-file.c (ui_file::putstrn): Adjust call to
10466 fputstrn_unfiltered.
10467 * utils.c (printchar): Replace do_fputs and do_fprintf
10468 parameters by do_fputc.
10469 (fputstr_filtered): Adjust call to printchar.
10470 (fputstr_unfiltered): Likewise.
10471 (fputstrn_filtered): Likewise.
10472 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10473 printchar.
10474 * utils.h (do_fputc_ftype): New typedef.
10475 (fputstrn_unfiltered): Add do_fputc parameter.
10476
10477 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10478
10479 * regformats/i386/i386-avx.dat: Remove.
10480
10481 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10482
10483 PR gdb/22979
10484 * amd64-tdep.c (amd64_none_init_abi): New function.
10485 (amd64_x32_none_init_abi): New function.
10486 (_initialize_amd64_tdep): Register handlers for x86-64 and
10487 x64_32 with GDB_OSABI_NONE.
10488 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10489 GDB_OSABI_NONE osabi.
10490
10491 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10492
10493 PR gdb/22980
10494 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10495 GDB_OSABI_NONE.
10496 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10497 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10498
10499 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10500
10501 * common/byte-vector.h (char_vector): New type.
10502 * target.h (target_read_alloc): Return
10503 gdb::optional<byte_vector>.
10504 (target_read_stralloc): Return gdb::optional<char_vector>.
10505 (target_get_osdata): Return gdb::optional<char_vector>.
10506 * target.c (target_read_alloc_1): Templatize. Replacement
10507 manual memory management with vector.
10508 (target_read_alloc): Change return type, adjust.
10509 (target_read_stralloc): Change return type, adjust.
10510 (target_get_osdata): Change return type, adjust.
10511 * auxv.c (struct auxv_info) <length>: Remove.
10512 <data>: Change type to gdb::optional<byte_vector>.
10513 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10514 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10515 (target_auxv_search): Adjust.
10516 (fprint_target_auxv): Adjust.
10517 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10518 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10519 (linux_make_corefile_notes): Adjust.
10520 * osdata.c (get_osdata): Adjust.
10521 * remote.c (remote_get_threads_with_qxfer): Adjust.
10522 (remote_memory_map): Adjust.
10523 (remote_traceframe_info): Adjust.
10524 (btrace_read_config): Adjust.
10525 (remote_read_btrace): Adjust.
10526 (remote_pid_to_exec_file): Adjust.
10527 * solib-aix.c (solib_aix_get_library_list): Adjust.
10528 * solib-dsbt.c (decode_loadmap): Don't free buf.
10529 (dsbt_get_initial_loadmaps): Adjust.
10530 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10531 * solib-target.c (solib_target_current_sos): Adjust.
10532 * tracepoint.c (sdata_make_value): Adjust.
10533 * xml-support.c (xinclude_start_include): Adjust.
10534 (xml_fetch_content_from_file): Adjust.
10535 * xml-support.h (xml_fetch_another): Change return type.
10536 (xml_fetch_content_from_file): Change return type.
10537 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10538 * xml-tdesc.c (file_read_description_xml): Adjust.
10539 (fetch_available_features_from_target): Change return type.
10540 (target_fetch_description_xml): Adjust.
10541 (target_read_description_xml): Adjust.
10542
10543 2018-04-06 Tom Tromey <tom@tromey.com>
10544
10545 * value.c (~value): Update.
10546 (struct value) <contents>: Now unique_xmalloc_ptr.
10547 (value_contents_bits_eq, allocate_value_contents)
10548 (value_contents_raw, value_contents_all_raw)
10549 (value_contents_for_printing, value_contents_for_printing_const)
10550 (set_value_enclosing_type): Update.
10551
10552 2018-04-06 Tom Tromey <tom@tromey.com>
10553
10554 * value.c (range_s): Remove typedef, VEC.
10555 (struct range): Add operator<.
10556 (range_lessthan): Remove.
10557 (ranges_contain): Change type.
10558 (~value): Update.
10559 (struct value) <unavailable, optimized_out>: Now std::vector.
10560 (value_entirely_available)
10561 (value_entirely_covered_by_range_vector)
10562 (value_entirely_unavailable, value_entirely_optimized_out):
10563 Update.
10564 (insert_into_bit_range_vector): Change argument type.
10565 (find_first_range_overlap): Likewise.
10566 (struct ranges_and_idx, value_contents_bits_eq)
10567 (require_not_optimized_out, require_available): Update.
10568 (ranges_copy_adjusted): Change argument types.
10569 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10570
10571 2018-04-06 Tom Tromey <tom@tromey.com>
10572
10573 * value.c (~value): Update.
10574 (struct value) <parent>: Now a value_ref_ptr.
10575 (value_parent, set_value_parent, value_address, value_copy):
10576 Update.
10577
10578 2018-04-06 Tom Tromey <tom@tromey.com>
10579
10580 * value.c (struct value): Add constructor, destructor, and member
10581 initializers.
10582 (allocate_value_lazy, value_decref): Update.
10583
10584 2018-04-06 Tom Tromey <tom@tromey.com>
10585
10586 * value.c (struct value) <released, next>: Remove.
10587 (all_values): Now a std::vector.
10588 (allocate_value_lazy): Update.
10589 (value_next): Remove.
10590 (value_mark, value_free_to_mark, release_value)
10591 (value_release_to_mark): Update.
10592
10593 2018-04-06 Tom Tromey <tom@tromey.com>
10594
10595 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10596 (free_value_chain): Remove.
10597 * value.c (free_value_chain): Remove.
10598 (value_release_to_mark): Return a std::vector.
10599 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10600 std::vector.
10601 (check_condition): Update.
10602 * eval.c (fetch_subexp_value): Change "val_chain" to a
10603 std::vector.
10604 * breakpoint.c (update_watchpoint): Update.
10605 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10606
10607 2018-04-06 Tom Tromey <tom@tromey.com>
10608
10609 * value.h (free_all_values): Remove.
10610 * value.c (free_all_values): Remove.
10611
10612 2018-04-06 Tom Tromey <tom@tromey.com>
10613
10614 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10615 (value_history_chain, value_history_count): Remove.
10616 (value_history): New global.
10617 (record_latest_value, access_value_history, show_values)
10618 (preserve_values): Update.
10619
10620 2018-04-06 Tom Tromey <tom@tromey.com>
10621
10622 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10623 * varobj.c (varobj_set_display_format, varobj_set_value)
10624 (install_default_visualizer, construct_visualizer)
10625 (install_new_value, ~varobj, varobj_get_value_type)
10626 (my_value_of_variable, varobj_editable_p): Update.
10627 * c-varobj.c (c_describe_child, c_value_of_variable)
10628 (cplus_number_of_children, cplus_describe_child): Update.
10629 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10630 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10631 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10632
10633 2018-04-06 Tom Tromey <tom@tromey.com>
10634
10635 * printcmd.c (last_examine_address): Change type to
10636 value_ref_ptr.
10637 (do_examine, x_command): Update.
10638
10639 2018-04-06 Tom Tromey <tom@tromey.com>
10640
10641 * value.c (release_value): Update.
10642 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10643 (struct bpstats) <val>: Now a value_ref_ptr.
10644 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10645 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10646 (~watchpoint, print_it_watchpoint, watch_command_1)
10647 (invalidate_bp_value_on_memory_change): Update.
10648
10649 2018-04-06 Tom Tromey <tom@tromey.com>
10650
10651 * varobj.c (varobj_clear_saved_item)
10652 (update_dynamic_varobj_children, install_new_value, ~varobj):
10653 Update.
10654 * value.h (value_incref): Move declaration earlier.
10655 (value_decref): Rename from value_free.
10656 (struct value_ref_policy): New.
10657 (value_ref_ptr): New typedef.
10658 (struct value_deleter): Remove.
10659 (gdb_value_up): Remove typedef.
10660 (release_value): Change return type.
10661 (release_value_or_incref): Remove.
10662 * value.c (set_value_parent): Update.
10663 (value_incref): Change return type.
10664 (value_decref): Rename from value_free.
10665 (value_free_to_mark, free_all_values, free_value_chain): Update.
10666 (release_value): Return value_ref_ptr.
10667 (release_value_or_incref): Remove.
10668 (record_latest_value, set_internalvar, clear_internalvar):
10669 Update.
10670 * stack.c (info_frame_command): Don't call value_free.
10671 * python/py-value.c (valpy_dealloc, valpy_new)
10672 (value_to_value_object): Update.
10673 * printcmd.c (do_examine): Update.
10674 * opencl-lang.c (lval_func_free_closure): Update.
10675 * mi/mi-main.c (register_changed_p): Don't call value_free.
10676 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10677 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10678 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10679 value_free.
10680 * guile/scm-value.c (vlscm_free_value_smob)
10681 (vlscm_scm_from_value): Update.
10682 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10683 (frame_unwind_register_unsigned, get_frame_register_bytes)
10684 (put_frame_register_bytes): Don't call value_free.
10685 * findvar.c (address_from_register): Don't call value_free.
10686 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10687 * dwarf2loc.c (entry_data_value_free_closure)
10688 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10689 (dwarf2_evaluate_loc_desc_full): Update.
10690 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10691 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10692 (~watchpoint, watch_command_1)
10693 (invalidate_bp_value_on_memory_change): Update.
10694 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10695
10696 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10697
10698 PR gdb/23022
10699 * warning.m4: Add -Wno-error=deprecated-register.
10700 * configure: Re-generate.
10701
10702 2018-04-05 Tom Tromey <tom@tromey.com>
10703
10704 * linespec.h: Remove include of "vec.h".
10705
10706 2018-04-05 Tom Tromey <tom@tromey.com>
10707
10708 * linespec.c (typep): Remove typedef.
10709 (find_methods, find_superclass_methods): Take a std::vector.
10710 (find_method): Use std::vector.
10711
10712 2018-04-05 Tom Tromey <tom@tromey.com>
10713
10714 * utils.c (compare_strings): Remove.
10715 * utils.h (compare_strings): Remove.
10716 * objc-lang.h (find_imps): Update.
10717 * objc-lang.c (find_methods): Take a std::vector.
10718 (uniquify_strings, find_imps): Likewise.
10719 * linespec.c (find_methods): Take a std::vector.
10720 (decode_objc): Use std::vector.
10721 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10722 a std::vector.
10723 (find_method, find_function_symbols): Use std::vector.
10724
10725 2018-04-05 Tom Tromey <tom@tromey.com>
10726
10727 * completer.c (completion_tracker::completion_tracker): Remove
10728 cast.
10729 (completion_tracker::discard_completions): Likewise.
10730 * breakpoint.c (ambiguous_names_p): Remove cast.
10731 * ada-lang.c (_initialize_ada_language): Remove cast.
10732 * utils.h (streq): Update.
10733 (streq_hash): Add new declaration.
10734 * utils.c (streq): Return bool.
10735 (streq_hash): New function.
10736
10737 2018-04-05 Tom Tromey <tom@tromey.com>
10738
10739 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10740 Remove a string copy.
10741
10742 2018-04-05 Tom Tromey <tom@tromey.com>
10743
10744 * linespec.c (filter_results): Use std::vector.
10745 (decode_line_2, decode_line_full): Update.
10746
10747 2018-04-05 Tom Tromey <tom@tromey.com>
10748
10749 * linespec.c (canonical_to_fullform): Return std::string.
10750 (filter_results): Update.
10751 (struct decode_line_2_item): Add constructor.
10752 <fullform, displayform>: Now std::string.
10753 (decode_line_2_compare_items): Now a std::sort comparator.
10754 (decode_line_2): Update.
10755
10756 2018-04-05 Tom Tromey <tom@tromey.com>
10757
10758 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10759 (unexpected_linespec_error): Update.
10760 (linespec_parse_basic, parse_linespec): Update.
10761
10762 2018-04-05 Tom Tromey <tom@tromey.com>
10763
10764 * linespec.c (linespec_parse_basic): Reindent.
10765
10766 2018-04-05 Tom Tromey <tom@tromey.com>
10767
10768 * minsyms.h (iterate_over_minimal_symbols): Update.
10769 * minsyms.c (iterate_over_minimal_symbols): Take a
10770 gdb::function_view.
10771 * linespec.c (struct collect_minsyms): Remove.
10772 (compare_msyms): Now a std::sort comparator.
10773 (add_minsym): Add parameters.
10774 (search_minsyms_for_name): Update. Use std::vector.
10775
10776 2018-04-03 Tom Tromey <tom@tromey.com>
10777
10778 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10779 gdb::byte_vector.
10780
10781 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10782
10783 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10784
10785 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10786
10787 PR gdb/16959
10788 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10789 printing static type.
10790
10791 2018-04-01 Tom Tromey <tom@tromey.com>
10792
10793 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10794 (rs6000_xfer_shared_libraries): Update.
10795
10796 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10797
10798 * common/gdb_vecs.h (char_ptr): Remove.
10799 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10800
10801 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10802
10803 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10804 with std::vector.
10805 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10806
10807 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10808
10809 * tracepoint.h (struct uploaded_tp): Initialize fields.
10810 <actions, step_actions, cmd_strings>: Change type to
10811 std::vector<char *>.
10812 * tracepoint.c (get_uploaded_tp): Allocate with new.
10813 (free_uploaded_tps): Free with delete.
10814 (parse_tracepoint_definition): Adjust to std::vector change.
10815 * breakpoint.c (read_uploaded_action): Likewise.
10816 (create_tracepoint_from_upload): Likewise.
10817 * ctf.c (ctf_write_uploaded_tp): Likewise.
10818 (SET_ARRAY_FIELD): Likewise.
10819 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10820
10821 2018-03-30 Tom Tromey <tom@tromey.com>
10822
10823 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10824 std::unique_ptr.
10825 (svr4_keep_data_in_core): Update.
10826 (svr4_read_so_list): Update.
10827
10828 2018-03-30 Tom Tromey <tom@tromey.com>
10829
10830 * windows-nat.c (handle_output_debug_string, handle_exception):
10831 Update.
10832 * target.h (target_read_string): Update.
10833 * target.c (target_read_string): Change "string" to
10834 unique_xmalloc_ptr.
10835 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10836 Update.
10837 * solib-frv.c (frv_current_sos): Update.
10838 * solib-dsbt.c (dsbt_current_sos): Update.
10839 * solib-darwin.c (darwin_current_sos): Update.
10840 * linux-thread-db.c (inferior_has_bug): Update.
10841 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10842 Update. Remove alloca.
10843 * ada-lang.c (ada_main_name): Update.
10844
10845 2018-03-30 Tom Tromey <tom@tromey.com>
10846
10847 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10848 (struct dwo_file_deleter): New.
10849 (dwo_file_up): New typedef.
10850 (open_and_init_dwo_file): Use dwo_file_up.
10851 (free_dwo_file_cleanup): Remove.
10852
10853 2018-03-30 Tom Tromey <tom@tromey.com>
10854
10855 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10856 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10857
10858 2018-03-30 Tom Tromey <tom@tromey.com>
10859
10860 * dwarf2read.c (class free_cached_comp_units): New class.
10861 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10862 (free_cached_comp_units): Remove function.
10863
10864 2018-03-30 Tom Tromey <tom@tromey.com>
10865
10866 * utils.h (make_cleanup_unpush_target): Remove.
10867 * inf-ptrace.c (struct target_unpusher): New.
10868 (target_unpush_up) New typedef.
10869 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10870 target_unpush_up.
10871 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10872
10873 2018-03-27 Tom Tromey <tom@tromey.com>
10874
10875 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10876
10877 2018-03-27 Pedro Alves <palves@redhat.com>
10878 Tom Tromey <tom@tromey.com>
10879
10880 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10881 destructor. Now a class.
10882 (gdb_readline_wrapper_cleanup): Remove function.
10883 (gdb_readline_wrapper): Remove cleanups.
10884
10885 2018-03-27 Tom Tromey <tom@tromey.com>
10886
10887 * typeprint.h (struct type_print_options) <local_typedefs,
10888 global_typedefs>: Remove "struct" keyword.
10889 (class typedef_hash_table): New class.
10890 (recursively_update_typedef_hash, add_template_parameters)
10891 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10892 (find_typedef_in_hash): Don't declare.
10893 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10894 (typedef_hash_table::recursively_update): Rename from
10895 recursively_update_typedef_hash. Now a member.
10896 (typedef_hash_table::add_template_parameters): Rename from
10897 add_template_parameters. Now a member.
10898 (typedef_hash_table::typedef_hash_table): Now a constructor;
10899 rename from create_typedef_hash.
10900 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10901 rename from free_typedef_hash.
10902 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10903 (do_free_global_table): Remove.
10904 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10905 from copy_type_recursive.
10906 (create_global_typedef_table): Remove.
10907 (typedef_hash_table::find_global_typedef): Now a member of
10908 typedef_hash_table.
10909 (typedef_hash_table::find_typedef): Rename from
10910 find_typedef_in_hash; now a member.
10911 (whatis_exp): Update.
10912 * extension.h (struct ext_lang_type_printers): Add constructor and
10913 destructor.
10914 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10915 declare.
10916 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10917 Now a constructor; rename from start_ext_lang_type_printers.
10918 (ext_lang_type_printers): Now a destructor; rename from
10919 free_ext_lang_type_printers.
10920 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10921 Update.
10922 (c_type_print_base_struct_union): Update. Remove cleanups.
10923
10924 2018-03-27 Tom Tromey <tom@tromey.com>
10925
10926 * dwarf-index-write.c: Include <cmath>.
10927
10928 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10929
10930 * NEWS: Add entry describing new "set|show varsize-limit" command.
10931 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10932 command.
10933 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10934 "set variable".
10935
10936 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10937
10938 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10939 dwarf-index-write.c
10940 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10941 * dwarf-index-common.c: New file.
10942 * dwarf-index-common.h: New file.
10943 * dwarf-index-write.c: New file.
10944 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10945 (struct dwarf2_section_info): Move from here.
10946 (dwarf2_section_info_def): Likewise.
10947 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10948 (offset_type): Likewise.
10949 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10950 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10951 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10952 (byte_swap): Likewise.
10953 (MAYBE_SWAP): Likewise.
10954 (dwarf2_per_cu_ptr): Likewise.
10955 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10956 (struct tu_stats): Likewise.
10957 (struct dwarf2_per_objfile): Likewise.
10958 (struct dwarf2_per_cu_data): Likewise.
10959 (struct signatured_type): Likewise.
10960 (sig_type_ptr): Likewise.
10961 (DEF_VEC_P (sig_type_ptr)): Likewise.
10962 (INDEX4_SUFFIX): Likewise.
10963 (INDEX5_SUFFIX): Likewise.
10964 (DEBUG_STR_SUFFIX): Likewise.
10965 (dwarf2_read_section): Make non-static.
10966 (mapped_index_string_hash): Move from here.
10967 (dwarf5_djb_hash): Likewise.
10968 (file_write): Likewise.
10969 (class data_buf): Likewise.
10970 (struct symtab_index_entry): Likewise.
10971 (struct mapped_symtab): Likewise.
10972 (find_slot): Likewise.
10973 (hash_expand): Likewise.
10974 (add_index_entry): Likewise.
10975 (uniquify_cu_indices): Likewise.
10976 (class c_str_view): Likewise.
10977 (class c_str_view_hasher): Likewise.
10978 (class vector_hasher): Likewise.
10979 (write_hash_table): Likewise.
10980 (psym_index_map): Likewise.
10981 (struct addrmap_index_data): Likewise.
10982 (add_address_entry): Likewise.
10983 (add_address_entry_worker): Likewise.
10984 (write_address_map): Likewise.
10985 (symbol_kind): Likewise.
10986 (write_psymbols): Likewise.
10987 (struct signatured_type_index_data): Likewise.
10988 (write_one_signatured_type): Likewise.
10989 (recursively_count_psymbols): Likewise.
10990 (recursively_write_psymbols): Likewise.
10991 (class debug_names): Likewise.
10992 (check_dwarf64_offsets): Likewise.
10993 (psyms_seen_size): Likewise.
10994 (write_gdbindex): Likewise.
10995 (write_debug_names): Likewise.
10996 (assert_file_size): Likewise.
10997 (write_psymtabs_to_index): Likewise.
10998 (save_gdb_index_command): Likewise.
10999 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11000 command.
11001 * dwarf2read.h: New file.
11002
11003 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11004
11005 PR gdb/22670
11006 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11007 symbol name if the CU's language stores symbol names in linkage
11008 format.
11009 * language.h (struct language_defn)
11010 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11011 all instances of this struct.
11012
11013 2018-03-26 Tom Tromey <tom@tromey.com>
11014
11015 * stack.c (backtrace_command_1): Remove verbose code.
11016
11017 2018-03-26 Tom Tromey <tom@tromey.com>
11018
11019 * python/py-framefilter.c (py_print_type): Don't catch
11020 exceptions. Return void.
11021 (py_print_value): Likewise.
11022 (py_print_single_arg): Likewise.
11023 (enumerate_args): Don't catch exceptions.
11024 (py_print_args): Likewise.
11025 (py_print_frame): Likewise.
11026 (gdbpy_apply_frame_filter): Catch exceptions here.
11027
11028 2018-03-26 Tom Tromey <tom@tromey.com>
11029
11030 * stack.c (_initialize_stack): Remove trailing newlines from help
11031 text. Add "Usage" line to "backtrace" help.
11032
11033 2018-03-26 Tom Tromey <tom@tromey.com>
11034
11035 PR python/16486:
11036 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11037
11038 2018-03-26 Tom Tromey <tom@tromey.com>
11039
11040 * python/py-framefilter.c (py_print_single_arg): Return
11041 EXT_LANG_BT_ERROR from catch.
11042
11043 2018-03-26 Tom Tromey <tom@tromey.com>
11044
11045 PR backtrace/15584:
11046 * stack.c (backtrace_command_1): Move some code into no-filters
11047 "if".
11048
11049 2018-03-26 Tom Tromey <tom@tromey.com>
11050
11051 * python/py-framefilter.c (throw_quit_or_print_exception): New
11052 function.
11053 (gdbpy_apply_frame_filter): Use it.
11054
11055 2018-03-26 Tom Tromey <tom@tromey.com>
11056
11057 PR cli/17716:
11058 * python/py-framefilter.c (py_print_type, py_print_value)
11059 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11060 RETURN_MASK_ERROR.
11061
11062 2018-03-26 Tom Tromey <tom@tromey.com>
11063
11064 * python/py-framefilter.c (enumerate_args): Use
11065 gdb::unique_xmalloc_ptr.
11066
11067 2018-03-26 Tom Tromey <tom@tromey.com>
11068
11069 * python/py-framefilter.c (py_print_frame): Return
11070 EXT_LANG_BT_OK.
11071 (gdbpy_apply_frame_filter): Update comment.
11072 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11073 Remove.
11074 <EXT_LANG_BT_NO_FILTERS>: Change value.
11075
11076 2018-03-26 Tom Tromey <tom@tromey.com>
11077
11078 PR backtrace/15582:
11079 * stack.c (backtrace_command): Parse "hide" argument.
11080 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11081 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11082 constant.
11083
11084 2018-03-26 Tom Tromey <tom@tromey.com>
11085
11086 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11087 add "flags".
11088 (backtrace_command): Remove "fulltrace", add "flags".
11089
11090 2018-03-26 Tom Tromey <tom@tromey.com>
11091
11092 * stack.c (backtrace_command): Rewrite command line parsing.
11093
11094 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11095
11096 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11097
11098 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11099
11100 * filename-seen-cache.h: Add include guard.
11101
11102 2018-03-26 Keith Seitz <keiths@redhat.com>
11103
11104 * symfile.c (place_section): Remove "struct" from section_addr_info
11105 in comment.
11106 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11107 "struct" keyword from section_addr_info.
11108
11109 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11110
11111 * regformats/regdef.h (reg): Add constructors.
11112
11113 2018-03-25 Pedro Alves <palves@redhat.com>
11114
11115 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11116 if then/else bodies in var_func_name extraction.
11117
11118 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11119
11120 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11121 lookup_minimal_symbol() to find symbol entry.
11122 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11123
11124 2018-03-23 Keith Seitz <keiths@redhat.com>
11125
11126 PR c++/22968
11127 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11128 nested type definitions for C++, too.
11129
11130 2018-03-23 Tom Tromey <tom@tromey.com>
11131
11132 * machoread.c (struct oso_el): Add a constructor. Don't define as
11133 a typedef.
11134 (macho_register_oso): Remove.
11135 (macho_symtab_read): Take a std::vector.
11136 (oso_el_compare_name): Now a std::sort comparator.
11137 (macho_symfile_read_all_oso): Take a std::vector.
11138 (macho_symfile_read): Use std::vector. Remove cleanups.
11139
11140 2018-03-22 Tom Tromey <tom@tromey.com>
11141
11142 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11143 (record_full_goto_bookmark): Use std::string.
11144
11145 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11146
11147 PR tdep/18295
11148 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11149 a single mask.
11150
11151 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11152
11153 * rs6000-tdep.c (store_insn_p): New function.
11154 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11155 and cr_reg to their unshifted values. Use store_insn_p to
11156 match LR saves using either R1 or fdata->alloca_reg. Use
11157 store_insn_p to match CR saves. Set alloca_reg_offset
11158 when alloca_reg and framep are set. Remove lr_reg shift
11159 when assigning to fdata->lr_register.
11160
11161 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11162
11163 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11164 command line args instead of emitting a warning.
11165
11166 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11167
11168 * tracepoint.h (struct static_tracepoint_marker): Initialize
11169 fields, define default constructor, move constructor and move
11170 assignment, disable the rest.
11171 <str_id, extra>: Make std::string.
11172 (release_static_tracepoint_marker): Remove.
11173 (free_current_marker): Remove.
11174 * tracepoint.c (free_current_marker): Remove.
11175 (parse_static_tracepoint_marker_definition): Adjust to
11176 std::string, use new hex2str overload.
11177 (release_static_tracepoint_marker): Remove.
11178 (print_one_static_tracepoint_marker): Get marker by reference
11179 and adjust to std::string.
11180 (info_static_tracepoint_markers_command): Adjust to std::vector
11181 changes
11182 * target.h (static_tracepoint_marker_p): Remove typedef.
11183 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11184 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11185 bool.
11186 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11187 * target-debug.h
11188 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11189 (target_debug_print_std_vector_static_tracepoint_marker): New.
11190 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11191 to...
11192 (target_debug_print_static_tracepoint_marker_p): ... this.
11193 * target-delegates.c: Re-generate.
11194 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11195 Make std::string.
11196 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11197 (decode_static_tracepoint_spec): Adjust to std::vector.
11198 (tracepoint_print_one_detail): Adjust to std::string.
11199 (strace_marker_decode_location): Adjust to std::string.
11200 (update_static_tracepoint): Adjust to std::string, remove call
11201 to release_static_tracepoint_marker.
11202 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11203 Adjust to std::vector.
11204 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11205 (remote_static_tracepoint_markers_by_strid): Adjust to
11206 std::vector.
11207 * common/rsp-low.h (hex2str): New overload with explicit count
11208 of bytes.
11209 * common/rsp-low.c (hex2str): New overload with explicit count
11210 of bytes.
11211 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11212 (_initialize_rsp_low_selftests): Add test_hex2str test.
11213 * unittests/tracepoint-selftests.c
11214 (test_parse_static_tracepoint_marker_definition): Adjust to
11215 std::string.
11216
11217 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11218
11219 * tracepoint.c (parse_static_tracepoint_marker_definition):
11220 Consider case where the definition is followed by more
11221 definitions.
11222 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11223 tracepoint-selftests.c.
11224 * unittests/tracepoint-selftests.c: New.
11225
11226 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11227
11228 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11229 Carvalho.
11230
11231 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11232
11233 * symtab.c (find_pc_sect_line): fixed indentation.
11234
11235 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11236
11237 * symtab.c (find_pc_sect_line): now uses binary search.
11238
11239 2018-03-19 Tom Tromey <tom@tromey.com>
11240
11241 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11242 "IDENT" production.
11243
11244 2018-03-19 Pedro Alves <palves@redhat.com>
11245 Tom Tromey <tom@tromey.com>
11246
11247 * unittests/observable-selftests.c: New file.
11248 * common/observable.h: New file.
11249 * observable.h: New file.
11250 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11251 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11252 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11253 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11254 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11255 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11256 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11257 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11258 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11259 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11260 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11261 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11262 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11263 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11264 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11265 tui/tui-interp.c, valops.c: Update all users.
11266 * tui/tui-hooks.c (tui_bp_created_observer)
11267 (tui_bp_deleted_observer, tui_bp_modified_observer)
11268 (tui_inferior_exit_observer, tui_before_prompt_observer)
11269 (tui_normal_stop_observer, tui_register_changed_observer):
11270 Remove.
11271 (tui_observers_token): New global.
11272 (attach_or_detach, tui_attach_detach_observers): New functions.
11273 (tui_install_hooks, tui_remove_hooks): Use
11274 tui_attach_detach_observers.
11275 * record-btrace.c (record_btrace_thread_observer): Remove.
11276 (record_btrace_thread_observer_token): New global.
11277 * observer.sh: Remove.
11278 * observer.c: Rename to observable.c.
11279 * observable.c (namespace gdb_observers): Define new objects.
11280 (observer_debug): Move into gdb_observers namespace.
11281 (struct observer, struct observer_list, xalloc_observer_list_node)
11282 (xfree_observer_list_node, generic_observer_attach)
11283 (generic_observer_detach, generic_observer_notify): Remove.
11284 (_initialize_observer): Update.
11285 Don't include observer.inc.
11286 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11287 (clean mostlyclean): Likewise.
11288 (observer.h, observer.inc): Remove targets.
11289 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11290 (COMMON_SFILES): Use observable.c, not observer.c.
11291 * .gitignore: Remove observer.h.
11292
11293 2018-03-18 Tom Tromey <tom@tromey.com>
11294
11295 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11296 gdb::def_vector.
11297 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11298
11299 2018-03-17 Tom Tromey <tom@tromey.com>
11300
11301 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11302
11303 2018-03-17 Tom Tromey <tom@tromey.com>
11304
11305 * target.c (class scoped_target_fd): New.
11306 (target_fileio_close_cleanup): Remove.
11307 (target_fileio_read_alloc_1): Use scoped_target_fd.
11308
11309 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11310
11311 * silent-rules.mk: New.
11312 * Makefile.in: Include silent-rules.mk
11313 (srcdir, VPATH, top_srcdir): Move up.
11314 (COMPILE): Add ECHO_CXX.
11315 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11316 (init.c): Add ECHO_INIT_C.
11317 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11318 (version.c): Add ECHO_GEN.
11319 (printcmd.o): Add ECHO_CXX.
11320 (target-float.o): Add ECHO_CXX.
11321 (ada-exp.o): Add ECHO_CXX.
11322 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11323 (insight$(EXEEXT)): Add ECHO_CXXLD.
11324 * gnulib/configure.ac: Add AM_SILENT_RULES.
11325 * gnulib/aclocal.m4: Re-generate.
11326 * gnulib/configure: Re-generate.
11327 * gnulib/import/Makefile.in: Re-generate.
11328
11329 2018-03-16 Tom Tromey <tom@tromey.com>
11330
11331 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11332 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11333 * utils.c (do_free_section_addr_info)
11334 (make_cleanup_free_section_addr_info): Remove.
11335 * symfile.h (struct other_sections): Add constructor.
11336 (struct section_addr_info): Remove.
11337 (section_addr_info): New typedef.
11338 (struct sym_fns) <sym_offsets>: Change type of parameter.
11339 (build_section_addr_info_from_objfile)
11340 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11341 (default_symfile_offsets, symbol_file_add)
11342 (symbol_file_add_from_bfd)
11343 (build_section_addr_info_from_section_table): Update.
11344 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11345 * symfile.c (alloc_section_addr_info): Remove.
11346 (build_section_addr_info_from_section_table): Change return type.
11347 Update.
11348 (build_section_addr_info_from_bfd)
11349 (build_section_addr_info_from_objfile): Likewise.
11350 (free_section_addr_info): Remove.
11351 (relative_addr_info_to_section_offsets): Change type of "addrs".
11352 (addrs_section_compar): Now a std::sort comparator.
11353 (addrs_section_sort): Change return type.
11354 (addr_info_make_relative): Change type of "addrs". Update.
11355 (default_symfile_offsets, syms_from_objfile_1)
11356 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11357 (symbol_file_add_separate): Update.
11358 (symbol_file_add): Change type of "addrs". Update.
11359 (add_symbol_file_command): Update. Remove cleanups.
11360 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11361 cleanups.
11362 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11363 * solib.c (solib_read_symbols): Update.
11364 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11365 * machoread.c (macho_symfile_offsets): Update.
11366 * jit.c (jit_bfd_try_read_symtab): Update.
11367
11368 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11369
11370 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11371 unittests/utils-selftests.c.
11372 * unittests/utils-selftests.c: New file.
11373
11374 2018-03-14 Tom Tromey <tom@tromey.com>
11375
11376 PR cli/14977:
11377 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11378 for NULL.
11379
11380 2018-03-14 Tom Tromey <tom@tromey.com>
11381
11382 PR cli/19918:
11383 * printcmd.c (printf_pointer): Allow "-" in format.
11384
11385 2018-03-14 Tom Tromey <tom@tromey.com>
11386
11387 * printcmd.c (_initialize_printcmd): Add usage to printf.
11388
11389 2018-03-14 Yao Qi <qiyao@sourceware.org>
11390
11391 * MAINTAINERS: Update my email address.
11392
11393 2018-03-13 Tom Tromey <tom@tromey.com>
11394
11395 * machoread.c (macho_check_dsym): Change filenamep to a
11396 std::string*.
11397 (macho_symfile_read): Update.
11398 * symfile.c (load_command): Use std::string.
11399
11400 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11401
11402 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11403 to error message string.
11404 (riscv_register_name): Use xsnprintf instead of sprintf.
11405 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11406 internal_error.
11407 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11408 error.
11409 (riscv_push_dummy_call): Likewise.
11410
11411 2018-03-12 Tom Tromey <tom@tromey.com>
11412
11413 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11414 Use gdb::byte_vector.
11415 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11416
11417 2018-03-12 Yao Qi <yao.qi@linaro.org>
11418
11419 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11420 parameter type to readable_regcache.
11421 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11422 the declaration.
11423
11424 2018-03-11 Tom Tromey <tom@tromey.com>
11425
11426 * dwarf2read.c (struct nextfield): Add initializers.
11427 (struct nextfnfield): Remove.
11428 (struct fnfieldlist): Add initializers. Remove "length" and
11429 "head", use std::vector.
11430 (struct decl_field_list): Remove.
11431 (struct field_info): Add initializers.
11432 <fields, baseclasses>: Now std::vector.
11433 <nbaseclasses, nfnfields, typedef_field_list_count,
11434 nested_types_list_count>: Remove.
11435 (dwarf2_add_field, dwarf2_add_type_defn)
11436 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11437 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11438 (process_structure_scope): Update.
11439
11440 2018-03-11 Tom Tromey <tom@tromey.com>
11441
11442 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11443 for use by std::sort.
11444 (build_type_psymtabs_1): Use std::vector.
11445
11446 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11447
11448 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11449 and LIBMPFR in the printed configuration.
11450
11451 2018-03-08 Tom Tromey <tom@tromey.com>
11452
11453 * source.c (get_filename_and_charpos): Use scoped_fd.
11454 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11455 (procfs_pidlist): Likewise.
11456 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11457 (iterate_over_mappings): Likewise.
11458
11459 2018-03-08 Tom Tromey <tom@tromey.com>
11460
11461 * infcall.c (struct call_return_meta_info)
11462 <stack_temporaries_enabled>: Remove.
11463 (get_call_return_value, call_function_by_hand_dummy): Update.
11464 * thread.c (disable_thread_stack_temporaries): Remove.
11465 (enable_thread_stack_temporaries): Remove.
11466 (thread_stack_temporaries_enabled_p): Return bool.
11467 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11468 (get_last_thread_stack_temporary): Update.
11469 * eval.c (evaluate_subexp): Update.
11470 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11471 class, not a function.
11472 (value_ptr, value_vec): Remove typedefs.
11473 (class thread_info) <stack_temporaries_enabled>: Now bool.
11474 <stack_temporaries>: Now a std::vector.
11475 (thread_stack_temporaries_enabled_p)
11476 (value_in_thread_stack_temporaries): Return bool.
11477
11478 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11479
11480 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11481 (getpkt_or_notif_sane_1): Likewise.
11482
11483 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11484
11485 * build-id.c (build_id_to_debug_bfd): Use std::string.
11486
11487 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11488
11489 * build-id.c (find_separate_debug_file_by_buildid): Return
11490 std::string.
11491 * build-id.h (find_separate_debug_file_by_buildid): Return
11492 std::string.
11493 * coffread.c (coff_symfile_read): Adjust to std::string.
11494 * elfread.c (elf_symfile_read): Adjust to std::string.
11495 * symfile.c (separate_debug_file_exists): Change parameter to
11496 std::string.
11497 (find_separate_debug_file): Return std::string.
11498 (find_separate_debug_file_by_debuglink): Return std::string.
11499 * symfile.h (find_separate_debug_file_by_debuglink): Return
11500 std::string.
11501
11502 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11503
11504 * common/xml-utils.c (xml_escape_text): Move code to...
11505 (xml_escape_text_append): ... this new function.
11506 * common/xml-utils.h (xml_escape_text_append): New declaration.
11507 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11508 New function.
11509 (_initialize_xml_utils): register test_xml_escape_text_append as
11510 a selftest.
11511
11512 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11513
11514 * defs.h: Remove MAX_REGISTER_SIZE.
11515 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11516 asserts.
11517 * python/py-unwind.c (pyuw_sniffer): Likewise.
11518
11519 2018-03-07 Tom Tromey <tom@tromey.com>
11520
11521 * linux-tdep.c (linux_info_proc): Update.
11522 * target.h (struct target_ops) <to_fileio_readlink>: Return
11523 optional<string>.
11524 (target_fileio_readlink): Return optional<string>.
11525 * remote.c (remote_hostio_readlink): Return optional<string>.
11526 * inf-child.c (inf_child_fileio_readlink): Return
11527 optional<string>.
11528 * target.c (target_fileio_readlink): Return optional<string>.
11529
11530 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11531
11532 * regcache.c (cooked_read_test): Add riscv to the list of
11533 architectures that have a save_reggroup.
11534
11535 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11536
11537 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11538 value is not a dynamic class object.
11539
11540 2018-03-06 Tom Tromey <tom@tromey.com>
11541
11542 * rust-exp.y: Formatting fixes.
11543
11544 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11545
11546 * riscv-tdep.c (riscv_register_name): Remove target description
11547 support.
11548 (riscv_gdbarch_init): Remove target description check.
11549
11550 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11551
11552 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11553 comment.
11554 * riscv-tdep.h: Likewise.
11555
11556 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11557
11558 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11559 (riscv_pseudo_register_write): Delete.
11560 (riscv_gdbarch_init): Remove all use of pseudo registers.
11561
11562 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11563
11564 * record-btrace.c (btrace_print_lines): Replace cleanup
11565 parameter with RAII equivalents.
11566 (btrace_insn_history): Replace cleanup with RAII equivalents.
11567 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11568 make_cleanup_ui_out_tuple_begin_end): Remove.
11569 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11570 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11571 make_cleanup_ui_out_list_begin_end): Remove.
11572
11573 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11574
11575 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11576 parameter types to std::vector. Use bool.
11577 (record_btrace_wait): Replace VEC(tp_t) with
11578 std::vector<thread_info *>.
11579 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11580
11581 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11582
11583 * record-btrace.c (record_btrace_disable_callback): Remove.
11584 (struct scoped_btrace_disable): New.
11585 (record_btrace_open): Use scoped_btrace_disable.
11586
11587 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11588
11589 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11590 reading values from registers.
11591
11592 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11593
11594 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11595 where appropriate.
11596
11597 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11598
11599 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11600 change parameter type. Use GDB's print functions, and use
11601 core_addr_to_string where appropriate.
11602 (riscv_push_dummy_call): Use core_addr_to_string where
11603 appropriate, update call to riscv_print_arg_location, and reindent
11604 a few lines.
11605 (riscv_return_value): Update call to riscv_print_arg_location.
11606
11607 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11608 Tim Newsome <tim@sifive.com>
11609 Albert Ou <a0u@eecs.berkeley.edu>
11610 Darius Rad <darius@bluespec.com>
11611
11612 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11613 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11614 (ALLDEPFILES): Add riscv-tdep.c
11615 * configure.tgt: Add riscv support.
11616 * riscv-tdep.c: New file.
11617 * riscv-tdep.h: New file.
11618 * NEWS: Mention new target.
11619 * MAINTAINERS: Add entry for riscv.
11620
11621 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11622
11623 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11624 fields within aggregates.
11625
11626 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11627
11628 * record-btrace.c (btrace_print_lines): Change type of flags to
11629 gdb_disassembly_flags.
11630
11631 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11632
11633 * fbsd-nat.c: Include "inf-ptrace.h".
11634 (USE_SIGTRAP_SIGINFO): Conditionally define.
11635 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11636 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11637 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11638 function.
11639 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11640 Likewise.
11641 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11642 Likewise.
11643 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11644 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11645 "supports_stopped_by_hw_breakpoint" target methods.
11646
11647 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11648
11649 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11650 * fbsd-nat.c (debug_fbsd_nat): New variable.
11651 (show_fbsd_nat_debug): New function.
11652 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11653 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11654
11655 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11656
11657 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11658 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11659 prototype.
11660 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11661 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11662 method.
11663
11664 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11665
11666 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11667 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11668
11669 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11670
11671 * charset.c (struct charset_vector): New.
11672 (charsets): Change type to charset_vector.
11673 (find_charset_names): Adjust.
11674 (add_one): Adjust.
11675 (_initialize_charset): Adjust.
11676
11677 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11678
11679 * progspace.h (struct program_space) <deleted_solibs>: Change
11680 type to std::vector<std::string>.
11681 * progspace.c (clear_program_space_solib_cache): Adjust.
11682 * breakpoint.c (print_solib_event): Adjust.
11683 (check_status_catch_solib): Adjust.
11684 * solib.c (update_solib_list): Adjust.
11685 * ui-out.h (class ui_out) <field_string>: New overload.
11686 * ui-out.c (ui_out::field_string): New overload.
11687
11688 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11689
11690 * progspace.h (struct program_space): Add constructor and
11691 destructor, initialize fields.
11692 (add_program_space): Remove.
11693 * progspace.c (add_program_space): Rename to...
11694 (program_space::program_space): ... this.
11695 (release_program_space): Rename to...
11696 (program_space::~program_space): ... this.
11697 (delete_program_space): Use delete to delete program_space.
11698 (initialize_progspace): Use new to allocate program_space.
11699 * inferior.c (add_inferior_with_spaces): Likewise.
11700 (clone_inferior_command): Likewise.
11701 * infrun.c (follow_fork_inferior): Likewise.
11702 (handle_vfork_child_exec_or_exit): Likewise.
11703
11704 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11705
11706 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11707 (delim_string_to_char_ptr_vec): Return std::vector of
11708 gdb::unique_xmalloc_ptr.
11709 (dirnames_to_char_ptr_vec_append): Take std::vector of
11710 gdb::unique_xmalloc_ptr.
11711 (dirnames_to_char_ptr_vec): Return std::vector of
11712 gdb::unique_xmalloc_ptr.
11713 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11714 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11715 (delim_string_to_char_ptr_vec): Return an std::vector of
11716 gdb::unique_xmalloc_ptr, adjust the code.
11717 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11718 gdb::unique_xmalloc_ptr, adjust the code.
11719 (dirnames_to_char_ptr_vec): Return an std::vector of
11720 gdb::unique_xmalloc_ptr, adjust the code.
11721 * auto-load.c (auto_load_safe_path_vec): Change type to
11722 std::vector of gdb::unique_xmalloc_ptr.
11723 (auto_load_expand_dir_vars): Return an std::vector of
11724 gdb::unique_xmalloc_ptr, adjust the code.
11725 (auto_load_safe_path_vec_update): Adjust.
11726 (filename_is_in_auto_load_safe_path_vec): Adjust.
11727 (auto_load_objfile_script_1): Adjust.
11728 * build-id.c (build_id_to_debug_bfd): Adjust.
11729 * linux-thread-db.c (thread_db_load_search): Adjust.
11730 * source.c (add_path): Adjust.
11731 (openp): Adjust.
11732 * symfile.c (find_separate_debug_file): Adjust.
11733 * utils.c (do_free_char_ptr_vec): Remove.
11734 (make_cleanup_free_char_ptr_vec): Remove.
11735
11736 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11737
11738 PR gdb/22907
11739 * common/pathstuff.c: Conditionally include "<windows.h>".
11740
11741 2018-03-01 Georg Sauthoff <mail@georg.so>
11742
11743 PR gdb/22888
11744 * gcore.in: Quote variables and switch interpreter to bash.
11745
11746 2018-03-01 Tom Tromey <tom@tromey.com>
11747
11748 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11749 assertion. Add assertion for discriminant_index.
11750 (quirk_rust_enum): Use correct base type name in univariant case.
11751
11752 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11753
11754 * record.c (get_call_history_modifiers): Return a
11755 record_print_flags.
11756 (cmd_record_call_history): Adjust.
11757 * record-btrace.c (record_btrace_call_history): Adjust.
11758 (record_btrace_call_history_range): Adjust.
11759 (record_btrace_call_history_from): Adjust.
11760 * target-debug.h (target_debug_print_record_print_flags): New.
11761 * target-delegates.c: Re-generate.
11762 * target.c (target_call_history): Change flags type.
11763 (target_call_history_from): Likewise.
11764 (target_call_history_range): Likewise.
11765 * target.h (struct target_ops) <target_call_history>: Likewise.
11766 (target_call_history_from): Likewise.
11767 (target_call_history_range): Likewise.
11768
11769 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11770 Simon Marchi <simon.marchi@polymtl.ca>
11771
11772 * common/common-utils.c: Include "sys/stat.h".
11773 (is_regular_file): Move here from "source.c"; change return
11774 type to "bool".
11775 * common/common-utils.h (is_regular_file): New prototype.
11776 * common/pathstuff.c (contains_dir_separator): New function.
11777 * common/pathstuff.h (contains_dir_separator): New prototype.
11778 * source.c: Don't include "sys/stat.h".
11779 (is_regular_file): Move to "common/common-utils.c".
11780
11781 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11782
11783 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11784 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11785 * auto-load.c: Include "common/pathstuff.h".
11786 * common/common-def.h (current_directory): Move here.
11787 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11788 function.
11789 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11790 prototype.
11791 * common/pathstuff.c: New file.
11792 * common/pathstuff.h: New file.
11793 * compile/compile.c: Include "common/pathstuff.h".
11794 * defs.h (current_directory): Move to "common/common-defs.h".
11795 * dwarf2read.c: Include "common/pathstuff.h".
11796 * exec.c: Likewise.
11797 * guile/scm-safe-call.c: Likewise.
11798 * linux-thread-db.c: Likewise.
11799 * main.c: Likewise.
11800 * nto-tdep.c: Likewise.
11801 * objfiles.c: Likewise.
11802 * source.c: Likewise.
11803 * symtab.c: Likewise.
11804 * utils.c: Include "common/pathstuff.h".
11805 (gdb_realpath): Move to "common/pathstuff.c".
11806 (gdb_realpath_keepfile): Likewise.
11807 (gdb_abspath): Likewise.
11808 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11809 (gdb_realpath_keepfile): Likewise.
11810 (gdb_abspath): Likewise.
11811
11812 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11813
11814 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11815 wildcard process pid for super_resume for kernels with a
11816 specific bug.
11817
11818 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11819
11820 * compile/compile.c (get_args): Add additional comments
11821 explaining function.
11822
11823 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11824 Tom Tromey <tom@tromey.com>
11825
11826 * target.h (memory_write_request_s): Remove typedef. Don't define
11827 VEC.
11828 (target_write_memory_blocks): Change argument to std::vector.
11829 (struct memory_write_request): Add constructor.
11830 * target-memory.c (compare_block_starting_address): Return bool.
11831 Change argument types.
11832 (claim_memory): Change arguments to use std::vector.
11833 (split_regular_and_flash_blocks, blocks_to_erase)
11834 (compute_garbled_blocks): Likewise.
11835 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11836 (target_write_memory_blocks): Change argument to std::vector.
11837 * symfile.c (struct load_section_data): Add constructor and
11838 destructor. Use std::vector for "requests".
11839 (struct load_progress_data): Add initializers.
11840 (load_section_callback): Update. Use "new".
11841 (clear_memory_write_data): Remove.
11842 (generic_load): Update.
11843
11844 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11845
11846 * arch/aarch64.h: Use common/tdesc.h.
11847
11848 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11849
11850 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11851 architecture with a 64-bit ABI.
11852
11853 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11854
11855 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11856 ahead of target description loading.
11857
11858 2018-02-26 Tom Tromey <tom@tromey.com>
11859
11860 * stack.c (backtrace_command_1): Update.
11861 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11862 of "flags".
11863 * python/py-framefilter.c (py_print_frame)
11864 (gdbpy_apply_frame_filter): Change type of "flags".
11865 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11866 of "flags".
11867 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11868 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11869 * extension.h (enum frame_filter_flag): Rename from
11870 frame_filter_flags.
11871 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11872 (apply_ext_lang_frame_filter): Change type of "flags".
11873 * extension.c (apply_ext_lang_frame_filter): Change type of
11874 "flags".
11875 * extension-priv.h (struct extension_language_ops)
11876 <apply_frame_filter>: Change type of "flags".
11877
11878 2018-02-26 Tom Tromey <tom@tromey.com>
11879
11880 PR python/16497:
11881 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11882 off-by-one in py_end computation.
11883 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11884 PRINT_MORE_FRAMES.
11885 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11886 constant.
11887
11888 2018-02-26 Tom Tromey <tom@tromey.com>
11889
11890 * dwarf2read.c (struct variant_field): New.
11891 (struct nextfield) <variant>: New field.
11892 (dwarf2_add_field): Handle DW_TAG_variant_part.
11893 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11894 discriminated union.
11895 (read_structure_type): Handle DW_TAG_variant_part.
11896 (handle_struct_member_die): New function, extracted from
11897 process_structure_scope. Handle DW_TAG_variant.
11898 (process_structure_scope): Handle discriminated unions. Call
11899 handle_struct_member_die.
11900
11901 2018-02-26 Tom Tromey <tom@tromey.com>
11902
11903 * rust-lang.h (rust_last_path_segment): Declare.
11904 * rust-lang.c (rust_last_path_segment): Now public. Change
11905 contract.
11906 (struct disr_info): Remove.
11907 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11908 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11909 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11910 (rust_enum_p, rust_enum_variant): New function.
11911 (rust_underscore_fields): Remove "offset" parameter.
11912 (rust_print_enum): New function.
11913 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11914 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11915 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11916 enums.
11917 (rust_internal_print_type): New function, from rust_print_type.
11918 Remove enum code.
11919 (rust_print_type): Call rust_internal_print_type.
11920 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11921 Update enum handling.
11922 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11923 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11924 (rust_union_quirks): New functions.
11925 (process_full_comp_unit, process_full_type_unit): Call
11926 rust_union_quirks.
11927 (process_structure_scope): Update rust_unions if necessary.
11928
11929 2018-02-26 Tom Tromey <tom@tromey.com>
11930
11931 * value.h (value_union_variant): Declare.
11932 * valops.c (value_union_variant): New function.
11933 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11934 (struct discriminant_info): New.
11935 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11936 enumerator.
11937 (struct main_type) <flag_discriminated_union>: New field.
11938
11939 2018-02-26 Tom Tromey <tom@tromey.com>
11940
11941 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11942 unittests/unpack-selftests.c.
11943 * unittests/unpack-selftests.c: New file.
11944 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11945
11946 2018-02-26 Yao Qi <yao.qi@linaro.org>
11947
11948 * dwarf2read.c (struct partial_die_info) <read>: New method.
11949 (read_partial_die): Remove the declaration.
11950 (load_partial_dies): Update.
11951 (partial_die_info::partial_die_info):
11952 (read_partial_die): Change it to partial_die_info::read.
11953
11954 2018-02-26 Yao Qi <yao.qi@linaro.org>
11955
11956 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11957 (fixup_partial_die): Remove declaration.
11958 (scan_partial_symbols): Update.
11959 (partial_die_parent_scope): Likewise.
11960 (partial_die_full_name): Likewise.
11961 (fixup_partial_die): Change it to partial_die_info::fixup.
11962
11963 2018-02-26 Yao Qi <yao.qi@linaro.org>
11964
11965 * dwarf2read.c (read_partial_die): Update the declaration.
11966 (load_partial_dies): Caller update.
11967 (read_partial_die): Remove one argument abbrev_len.
11968
11969 2018-02-26 Yao Qi <yao.qi@linaro.org>
11970
11971 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11972 assignment operator.
11973 (load_partial_dies): Use ctor and copy ctor.
11974 (read_partial_die): Update.
11975 (dwarf2_cu::find_partial_die): Use ctor.
11976
11977 2018-02-26 Yao Qi <yao.qi@linaro.org>
11978
11979 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11980 (find_partial_die_in_comp_unit): Change it to
11981 dwarf2_cu::find_partial_die.
11982 (find_partial_die): Update.
11983
11984 2018-02-26 Yao Qi <yao.qi@linaro.org>
11985
11986 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11987 is NULL.
11988
11989 2018-02-26 Yao Qi <yao.qi@linaro.org>
11990
11991 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11992
11993 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11994
11995 * arch/amd64.h: Use common/tdesc.h.
11996 * arch/i386.c: Likewise.
11997 * arch/i386.h: Likewise.
11998 * arch/tic6x.c: Likewise.
11999 * arch/tdesc.h: Move file from here...
12000 * common/tdesc.h: ...to here.
12001 * features/aarch64-core.c: Regenerate.
12002 * features/aarch64-fpu.c: Regenerate.
12003 * features/i386/32bit-avx.c: Regenerate.
12004 * features/i386/32bit-avx512.c: Regenerate.
12005 * features/i386/32bit-core.c: Regenerate.
12006 * features/i386/32bit-linux.c: Regenerate.
12007 * features/i386/32bit-mpx.c: Regenerate.
12008 * features/i386/32bit-pkeys.c: Regenerate.
12009 * features/i386/32bit-sse.c: Regenerate.
12010 * features/i386/64bit-avx.c: Regenerate.
12011 * features/i386/64bit-avx512.c: Regenerate.
12012 * features/i386/64bit-core.c: Regenerate.
12013 * features/i386/64bit-linux.c: Regenerate.
12014 * features/i386/64bit-mpx.c: Regenerate.
12015 * features/i386/64bit-pkeys.c: Regenerate.
12016 * features/i386/64bit-segments.c: Regenerate.
12017 * features/i386/64bit-sse.c: Regenerate.
12018 * features/i386/x32-core.c: Regenerate.
12019 * features/tic6x-c6xp.c: Regenerate.
12020 * features/tic6x-core.c: Regenerate.
12021 * features/tic6x-gp.c: Regenerate.
12022 * target-descriptions.c: Use common/tdesc.h.
12023 * target-descriptions.h: Likewise.
12024
12025 2018-02-24 Tom Tromey <tom@tromey.com>
12026
12027 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12028 (try_thread_db_load_from_dir, thread_db_load_search): Use
12029 std::string.
12030 (info_auto_load_libthread_db_compare): Return bool. Change
12031 argument types.
12032 (info_auto_load_libthread_db): Use std::vector, std::string.
12033 Remove cleanups.
12034
12035 2018-02-24 Tom Tromey <tom@tromey.com>
12036
12037 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12038 std::string.
12039 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12040 std::string*.
12041 * gdbarch.c: Rebuild.
12042 * gdbarch.h: Rebuild.
12043 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12044 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12045 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12046 std::string*.
12047
12048 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12049
12050 * gdbtypes.h (sect_offset): Change type to uint64_t.
12051 (sect_offset_str): New function.
12052 * dwarf2read.c (create_addrmap_from_aranges): Use
12053 sect_offset_str.
12054 (error_check_comp_unit_head): Likewise.
12055 (create_debug_type_hash_table): Likewise.
12056 (read_cutu_die_from_dwo): Likewise.
12057 (init_cutu_and_read_dies): Likewise.
12058 (init_cutu_and_read_dies_no_follow): Likewise.
12059 (process_psymtab_comp_unit_reader): Likewise.
12060 (partial_die_parent_scope): Likewise.
12061 (peek_die_abbrev): Likewise.
12062 (process_queue): Likewise.
12063 (dwarf2_physname): Likewise.
12064 (read_namespace_alias): Likewise.
12065 (read_import_statement): Likewise.
12066 (create_dwo_cu_reader): Likewise.
12067 (create_cus_hash_table): Likewise.
12068 (lookup_dwo_cutu): Likewise.
12069 (inherit_abstract_dies): Likewise.
12070 (read_func_scope): Likewise.
12071 (read_call_site_scope): Likewise.
12072 (dwarf2_add_member_fn): Likewise.
12073 (read_common_block): Likewise.
12074 (read_module_type): Likewise.
12075 (read_typedef): Likewise.
12076 (read_subrange_type): Likewise.
12077 (load_partial_dies): Likewise.
12078 (read_partial_die): Likewise.
12079 (find_partial_die): Likewise.
12080 (read_str_index): Likewise.
12081 (dwarf2_string_attr): Likewise.
12082 (build_error_marker_type): Likewise.
12083 (lookup_die_type): Likewise.
12084 (dump_die_shallow): Likewise.
12085 (follow_die_ref): Likewise.
12086 (dwarf2_fetch_die_loc_sect_off): Likewise.
12087 (dwarf2_fetch_constant_bytes): Likewise.
12088 (follow_die_sig): Likewise.
12089 (get_signatured_type): Likewise.
12090 (get_DW_AT_signature_type): Likewise.
12091 (dwarf2_find_containing_comp_unit): Likewise.
12092 (set_die_type): Likewise.
12093
12094 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12095
12096 * arch/aarch64.c: Include "common-defs.h".
12097 * arch/amd64.c: Likewise.
12098 * arch/i386.c: Likewise.
12099
12100 2018-02-21 Tom Tromey <tom@tromey.com>
12101
12102 * value.h: (extract_field_op): Update.
12103 * eval.c (extract_field_op): Return a const char *.
12104 * expression.h (parse_expression_for_completion): Update.
12105 * completer.c (complete_expression): Update.
12106 (add_struct_fields): Make fieldname const.
12107 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12108 (mark_completion_tag, parse_exp_in_context_1): Update.
12109 (parse_expression_for_completion): Change "name" to
12110 unique_xmalloc_ptr*.
12111
12112 2018-02-21 Tom Tromey <tom@tromey.com>
12113
12114 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12115
12116 2018-02-21 Yao Qi <yao.qi@linaro.org>
12117
12118 * avr-tdep.c (avr_read_pc): Change parameter type to
12119 readable_regcache.
12120 * gdbarch.sh (read_pc): Likewise.
12121 * gdbarch.c: Re-generated.
12122 * gdbarch.h: Re-generated.
12123 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12124 readable_regcache.
12125 * ia64-tdep.c (ia64_read_pc): Likewise.
12126 * mips-tdep.c (mips_read_pc): Likewise.
12127 * spu-tdep.c (spu_read_pc): Likewise.
12128
12129 2018-02-21 Yao Qi <yao.qi@linaro.org>
12130
12131 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12132 * regcache-dump.c: New file.
12133 * regcache.c: Move register_dump to regcache-dump.c.
12134 (maintenance_print_registers): Likewise.
12135 (maintenance_print_raw_registers): Likewise.
12136 (maintenance_print_cooked_registers): Likewise.
12137 (maintenance_print_register_groups): Likewise.
12138 (maintenance_print_remote_registers): Likewise.
12139 (_initialize_regcache): Likewise.
12140 * regcache.h (register_dump): Moved from regcache.c.
12141
12142 2018-02-21 Yao Qi <yao.qi@linaro.org>
12143
12144 * regcache.c (regcache::regcache): Update.
12145 (regcache::invalidate): Move it to detached_regcache::invalidate.
12146 (get_thread_arch_aspace_regcache): Update.
12147 (regcache::raw_update): Update.
12148 (regcache::cooked_read): Remove some code.
12149 (regcache::cooked_read_value): Likewise.
12150 (regcache::raw_write): Remove assert on m_readonly_p.
12151 (regcache::raw_supply_integer): Move it to
12152 detached_regcache::raw_supply_integer.
12153 (regcache::raw_supply_zeroed): Likewise.
12154 * regcache.h (detached_regcache) <raw_supply_integer>: New
12155 declaration.
12156 <raw_supply_zeroed, invalidate>: Likewise.
12157 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12158 <invalidate>: Likewise.
12159 <m_readonly_p>: Removed.
12160
12161 2018-02-21 Yao Qi <yao.qi@linaro.org>
12162
12163 * infcmd.c (get_return_value): Let stop_regs point to
12164 get_current_regcache.
12165 * regcache.c (regcache::regcache): Remove.
12166 (register_dump_reg_buffer): New class.
12167 (regcache_print): Adjust.
12168 * regcache.h (regcache): Remove constructors.
12169
12170 2018-02-21 Yao Qi <yao.qi@linaro.org>
12171
12172 * regcache.c (class register_dump): New class.
12173 (register_dump_regcache, register_dump_none): New class.
12174 (register_dump_remote, register_dump_groups): New class.
12175 (regcache_print): Update.
12176 * regcache.h (regcache_dump_what): Move it to regcache.c.
12177 (regcache) <dump>: Remove.
12178
12179 2018-02-21 Yao Qi <yao.qi@linaro.org>
12180
12181 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12182 reg_buffer_rw *.
12183 (jit_unwind_reg_set_impl): Call raw_supply.
12184 (jit_frame_sniffer): Use reg_buffer_rw.
12185 * record-full.c (record_full_core_regbuf): Change its type.
12186 (record_full_core_open_1): Use reg_buffer_rw.
12187 (record_full_close): Likewise.
12188 (record_full_core_fetch_registers): Use regcache->raw_supply.
12189 (record_full_core_store_registers): Likewise.
12190 * regcache.c (regcache::get_register_status): Move it to
12191 reg_buffer.
12192 (regcache_raw_set_cached_value): Remove.
12193 (regcache::raw_set_cached_value): Remove.
12194 (regcache::raw_write): Call raw_supply.
12195 (regcache::raw_supply): Move it to reg_buffer_rw.
12196 * regcache.h (regcache_raw_set_cached_value): Remove.
12197 (reg_buffer_rw): New class.
12198
12199 2018-02-21 Yao Qi <yao.qi@linaro.org>
12200
12201 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12202 readonly_detached_regcache.
12203 (dummy_frame_prev_register): Use regcache->cooked_read.
12204 * frame.c (frame_save_as_regcache): Change return type.
12205 (frame_pop): Update.
12206 * frame.h (frame_save_as_regcache): Update declaration.
12207 * inferior.h (get_infcall_suspend_state_regcache): Update
12208 declaration.
12209 * infrun.c (infcall_suspend_state) <registers>: use
12210 readonly_detached_regcache.
12211 (save_infcall_suspend_state): Don't use regcache_dup.
12212 (get_infcall_suspend_state_regcache): Change return type.
12213 * linux-fork.c (struct fork_info) <savedregs>: Change to
12214 readonly_detached_regcache.
12215 <pc>: New field.
12216 (fork_save_infrun_state): Don't use regcache_dup.
12217 (info_checkpoints_command): Adjust.
12218 * mi/mi-main.c (register_changed_p): Update declaration.
12219 (mi_cmd_data_list_changed_registers): Use
12220 readonly_detached_regcache.
12221 (register_changed_p): Change parameter type to
12222 readonly_detached_regcache.
12223 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12224 readonly_detached_regcache.
12225 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12226 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12227 New.
12228 (regcache::save): Move it to reg_buffer.
12229 (regcache::restore): Change parameter type.
12230 (regcache_dup): Remove.
12231 * regcache.h (reg_buffer) <save>: New method.
12232 (readonly_detached_regcache): New class.
12233 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12234 readonly_detached_regcache.
12235 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12236
12237 2018-02-21 Yao Qi <yao.qi@linaro.org>
12238
12239 * frame.c (frame_save_as_regcache): Use regcache method save.
12240 (frame_pop): Use regcache method restore.
12241 * infrun.c (restore_infcall_suspend_state): Likewise.
12242 * linux-fork.c (fork_load_infrun_state): Likewise.
12243 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12244 save.
12245 * regcache.c (regcache_save): Remove.
12246 (regcache::restore): More asserts.
12247 (regcache_cpy): Remove.
12248 * regcache.h (regcache_save): Remove the declaration.
12249 (regcache::restore): Move from private to public.
12250 Remove the friend declaration of regcache_cpy.
12251 (regcache_cpy): Remove declaration.
12252
12253 2018-02-21 Yao Qi <yao.qi@linaro.org>
12254
12255 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12256 parameter type to 'readable_regcache *'.
12257 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12258 * arm-tdep.c (arm_neon_quad_read): Likewise.
12259 (arm_pseudo_read): Likewise.
12260 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12261 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12262 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12263 * gdbarch.c: Re-generated.
12264 * gdbarch.h: Re-generated.
12265 * gdbarch.sh (pseudo_register_read): Change parameter type to
12266 'readable_regcache *'.
12267 (pseudo_register_read_value): Likewise.
12268 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12269 (h8300_pseudo_register_read): Likewise.
12270 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12271 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12272 (i386_pseudo_register_read_into_value): Likewise.
12273 (i386_pseudo_register_read_value): Likewise.
12274 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12275 declaration.
12276 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12277 * m32c-tdep.c (m32c_raw_read): Likewise.
12278 (m32c_read_flg): Likewise.
12279 (m32c_banked_register): Likewise.
12280 (m32c_banked_read): Likewise.
12281 (m32c_sb_read): Likewise.
12282 (m32c_part_read): Likewise.
12283 (m32c_cat_read): Likewise.
12284 (m32c_r3r2r1r0_read): Likewise.
12285 (m32c_pseudo_register_read): Likewise.
12286 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12287 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12288 (mep_pseudo_cr64_read): Likewise.
12289 (mep_pseudo_register_read): Likewise.
12290 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12291 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12292 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12293 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12294 (regcache::cooked_read): Likewise.
12295 (regcache::cooked_read_value): Likewise.
12296 (regcache_cooked_read_signed):
12297 (regcache::cooked_read): Likewise.
12298 * regcache.h (readable_regcache): New class.
12299 (regcache): Inherit readable_regcache. Move some methods to
12300 readable_regcache.
12301 * rl78-tdep.c (rl78_pseudo_register_read): Change
12302 parameter type to 'readable_regcache *'.
12303 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12304 (e500_pseudo_register_read): Change parameter type to
12305 'readable_regcache *'.
12306 (dfp_pseudo_register_read): Likewise.
12307 (vsx_pseudo_register_read): Likewise.
12308 (efpr_pseudo_register_read): Likewise.
12309 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12310 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12311 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12312 (sh64_pseudo_register_read): Likewise.
12313 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12314 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12315 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12316 (spu_pseudo_register_read): Likewise.
12317 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12318 (xtensa_pseudo_register_read): Likewise.
12319
12320 2018-02-21 Yao Qi <yao.qi@linaro.org>
12321
12322 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12323 (regcache::arch): Move it to reg_buffer::arch.
12324 (regcache::register_buffer): Likewise.
12325 (regcache::assert_regnum): Likewise.
12326 (regcache::num_raw_registers): Likewise.
12327 * regcache.h (reg_buffer): New class.
12328 (regcache): Inherit reg_buffer.
12329
12330 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12331
12332 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12333 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12334
12335 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12336
12337 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12338
12339 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12340
12341 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12342 (SFILES): Remove common/*.c files.
12343 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12344 * common/common.host: Add common reference.
12345 * configure.ac: Likewise.
12346 * configure: Regenerate.
12347
12348 2018-02-16 Yao Qi <yao.qi@linaro.org>
12349
12350 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12351 (block_initialize_namespace): Use new.
12352 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12353 (dwarf2_free_objfile): Use delete.
12354 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12355 (copy_type_recursive): Use new.
12356 * gdb_obstack.h (allocate_on_obstack): New.
12357
12358 2018-02-15 Yao Qi <yao.qi@linaro.org>
12359
12360 PR gdb/22849
12361 * inferior.c (exit_inferior_1): Reset inf->control.
12362
12363 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12364
12365 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12366 declaration.
12367
12368 2018-02-14 Pedro Alves <palves@redhat.com>
12369
12370 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12371 frame_cleanup_after_sniffer on exception.
12372
12373 2018-02-14 Tom Tromey <tom@tromey.com>
12374
12375 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12376 const.
12377 (solib_bfd_open): Make pathname const.
12378 * solib.c (solib_bfd_open): Make pathname const.
12379 * solib-spu.c (spu_bfd_fopen): Make name const.
12380 (spu_bfd_open): Make pathname const.
12381 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12382 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12383
12384 2018-02-14 Tom Tromey <tom@tromey.com>
12385
12386 * symfile.c (symfile_bfd_open): Update.
12387 * source.h (openp, source_full_path_of, find_and_open_source):
12388 Change argument type to unique_xmalloc_ptr.
12389 * source.c (openp): Take a unique_xmalloc_ptr.
12390 (source_full_path_of, find_and_open_source): Likewise.
12391 (open_source_file, symtab_to_fullname): Update.
12392 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12393 unique_xmalloc_ptr.
12394 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12395 (exec_file_find): Update.
12396 * psymtab.c (psymtab_to_fullname): Update.
12397 * nto-tdep.h (nto_find_and_open_solib): Update.
12398 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12399 unique_xmalloc_ptr.
12400 * exec.c (exec_file_attach): Update.
12401 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12402 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12403
12404 2018-02-14 Tom Tromey <tom@tromey.com>
12405
12406 * solib.c: Include source.h.
12407 * nto-tdep.c: Include source.h.
12408 * mi/mi-cmd-env.c: Include source.h.
12409 * infcmd.c: Include source.h.
12410 * exec.c: Include source.h.
12411 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12412 (add_path, directory_switch, source_path, init_source_path): Move
12413 declarations...
12414 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12415 (add_path, directory_switch, source_path, init_source_path):
12416 ...here.
12417
12418 2018-02-14 Tom Tromey <tom@tromey.com>
12419
12420 * solist.h (exec_file_find, solib_find): Return
12421 unique_xmalloc_ptr.
12422 (solib_bfd_fopen): Take a const char *.
12423 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12424 (exec_file_find, solib_find): Likewise.
12425 (solib_bfd_fopen): Do not take ownership of "pathname".
12426 (solib_bfd_open): Use unique_xmalloc_ptr.
12427 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12428 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12429 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12430 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12431
12432 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12433
12434 * ada-lang.c (name_match_type_from_name): Remove reference to
12435 ada_name_for_lookup in function's documentation.
12436 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12437
12438 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12439
12440 * defs.h (enum openp_flags): New enum.
12441 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12442 Move to enum openp_flags.
12443 (openp_flags): New enum flags.
12444 (openp): Change parameter type to openp_flags.
12445 * source.c (openp): Change parameter type to openp_flags.
12446 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12447 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12448
12449 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12450
12451 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12452 per-command.
12453
12454 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12455
12456 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12457 into...
12458 (class dwarf2_queue_guard): ...the destructor of this new class.
12459 (dw2_do_instantiate_symtab): Create instance of the new class
12460 dwarf2_queue_guard, remove cleanup.
12461
12462 2018-02-09 Tom Tromey <tom@tromey.com>
12463
12464 * source.c (find_source_lines): Don't reference past the end of
12465 the vector.
12466
12467 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12468
12469 * remote.c (remote_btrace_maybe_reopen): Change error message.
12470 * btrace.c (btrace_enable): Likewise.
12471 (parse_xml_btrace): Likewise.
12472 (parse_xml_btrace_conf): Likewise.
12473
12474 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12475
12476 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12477 (linux_enable_pt, linux_enable_bts): Call
12478 diagnose_perf_event_open_fail.
12479
12480 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12481
12482 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12483 Remove parameter and change return type. Update callers. Move it.
12484 (linux_enable_bts, linux_enable_pt): Improve error message.
12485 (linux_enable_pt): Remove zero buffer size check.
12486 (linux_enable_btrace): Improve error messages. Remove NULL return
12487 check.
12488
12489 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12490
12491 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12492 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12493 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12494 (linux_supports_pt, linux_supports_btrace): Remove.
12495 (linux_enable_bts): Call cpu_supports_bts.
12496 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12497 * remote.c (remote_supports_btrace): Remove.
12498 (init_remote_ops): Remove remote_supports_btrace.
12499 * target-delegates.c: Regenerated.
12500 * target.c (target_supports_btrace): Remove.
12501 * target.h (target_ops) <to_supports_btrace>: Remove
12502 (target_supports_btrace): Remove.
12503 * x86-linux-nat.c (x86_linux_create_target): Remove
12504 linux_supports_btrace.
12505
12506 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12507
12508 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12509 btrace failed.
12510 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12511 exception and use message in own exception.
12512
12513 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12514
12515 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12516 (perf_event_pt_event_type): Use gdb_file_up.
12517 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12518 scoped_fd, and scoped_mmap.
12519
12520 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12521
12522 * common/scoped_mmap.h: New.
12523 * unittests/scoped_mmap-selftest.c: New.
12524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12525 unittests/scoped_mmap-selftest.c.
12526
12527 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12528
12529 * common/scoped_fd.h: New.
12530 * unittests/scoped_fd-selftest.c: New.
12531 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12532 unittests/scoped_fd-selftest.c.
12533
12534 2018-02-09 Tom Tromey <tom@tromey.com>
12535
12536 * auto-load.c (auto_load_section_scripts): Use
12537 gdb::unique_xmalloc_ptr.
12538
12539 2018-02-09 Tom Tromey <tom@tromey.com>
12540
12541 * auto-load.c (execute_script_contents): Use std::string.
12542
12543 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12544
12545 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12546 Python function, rather than a new command.
12547
12548 2018-02-08 Tom Tromey <tom@tromey.com>
12549
12550 * solib.c (solib_find_1): Use std::string.
12551 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12552
12553 2018-02-08 Tom Tromey <tom@tromey.com>
12554
12555 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12556
12557 2018-02-08 Tom Tromey <tom@tromey.com>
12558
12559 * source.c (find_source_lines): Use gdb::def_vector.
12560
12561 2018-02-08 Tom Tromey <tom@tromey.com>
12562
12563 * macrocmd.c (struct temporary_macro_definition): New.
12564 (macro_define_command): Use temporary_macro_definition. Remove
12565 cleanups.
12566 (free_macro_definition_ptr): Remove.
12567
12568 2018-02-08 Tom Tromey <tom@tromey.com>
12569
12570 * macroexp.c (maybe_expand): Use std::string.
12571
12572 2018-02-08 Tom Tromey <tom@tromey.com>
12573
12574 * macroexp.c (struct macro_buffer): Add initializers for some
12575 members.
12576 (init_buffer, init_shared_buffer, free_buffer)
12577 (free_buffer_return_text): Remove.
12578 (macro_buffer): New constructors.
12579 (~macro_buffer): New destructor.
12580 (macro_buffer::set_shared): New method.
12581 (macro_buffer::resize_buffer, macro_buffer::appendc)
12582 (macro_buffer::appendmem): Now methods, not free functions.
12583 (set_token, append_tokens_without_splicing, stringify)
12584 (macro_stringify): Update.
12585 (gather_arguments): Change return type. Remove argc_p argument,
12586 add args_ptr argument. Use std::vector.
12587 (substitute_args): Remove argc argument. Accept std::vector.
12588 (expand): Update. Use std::vector.
12589 (scan, macro_expand, macro_expand_next): Update.
12590
12591 2018-02-08 Tom Tromey <tom@tromey.com>
12592
12593 * symtab.c (default_collect_symbol_completion_matches_break_on):
12594 Use unique_xmalloc_ptr.
12595 * macroscope.h: (sal_macro_scope, user_macro_scope)
12596 (default_macro_scope): Return unique_xmalloc_ptr.
12597 * macroscope.c (sal_macro_scope, user_macro_scope)
12598 (default_macro_scope): Return unique_xmalloc_ptr.
12599 * macroexp.h (macro_expand, macro_expand_once): Return
12600 unique_xmalloc_ptr.
12601 * macroexp.c (macro_expand, macro_expand_once): Return
12602 unique_xmalloc_ptr.
12603 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12604 (info_macro_command, info_macros_command): Use
12605 unique_xmalloc_ptr.
12606 * compile/compile-c-support.c (write_macro_definitions): Use
12607 unique_xmalloc_ptr.
12608 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12609
12610 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12611
12612 * value.c (value_static_field): Assign field type instead of
12613 containing type when returning an optimized out value.
12614
12615 2018-02-06 Yao Qi <yao.qi@linaro.org>
12616
12617 * ft32-tdep.c (ft32_read_pc): Remove.
12618 (ft32_write_pc): Remove.
12619 (ft32_gdbarch_init): Update.
12620 * m32r-tdep.c (m32r_read_pc): Remove.
12621 (m32r_gdbarch_init): Update.
12622 * mep-tdep.c (mep_read_pc): Remove.
12623 (mep_gdbarch_init): Update.
12624 * microblaze-tdep.c (microblaze_write_pc): Remove.
12625 (microblaze_gdbarch_init): Update.
12626 * mn10300-tdep.c (mn10300_read_pc): Remove.
12627 (mn10300_write_pc): Remove.
12628 (mn10300_gdbarch_init): Update.
12629 * moxie-tdep.c (moxie_read_pc): Remove.
12630 (moxie_write_pc): Remove.
12631 (moxie_gdbarch_init): Update.
12632
12633 2018-02-06 Yao Qi <yao.qi@linaro.org>
12634
12635 * expprint.c (print_subexp_standard): Handle
12636 OP_F77_UNDETERMINED_ARGLIST.
12637 (dump_subexp_body_standard): Likewise.
12638
12639 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12640
12641 * target-descriptions.c (tdesc_element_visitor) Add empty
12642 implementations.
12643 (tdesc_type): Move make_gdb_type from here.
12644 (tdesc_type_builtin): Likewise.
12645 (tdesc_type_vector): Likewise.
12646 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12647 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12648 (make_gdb_type_union): Likewise.
12649 (make_gdb_type_flags): Likewise.
12650 (make_gdb_type_enum): Likewise.
12651 (make_gdb_type): New function.
12652 (tdesc_register_type): Use static make_gdb_type.
12653
12654 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12655
12656 * infcmd.c (default_print_one_register_info): Align natural-format
12657 column values consistently one under another.
12658 (pad_to_column): New function.
12659
12660 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12661
12662 * dwarf2read.c (dwarf2_physname): Move commment.
12663
12664 2018-02-01 Leszek Swirski <leszeks@google.com>
12665
12666 * varobj.c (varobj_formatted_print_options): Allow recursive
12667 pretty printing if pretty printing is enabled.
12668
12669 2018-02-01 Leszek Swirski <leszeks@google.com>
12670
12671 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12672 names after a structop as a filename.
12673
12674 2018-02-01 Yao Qi <yao.qi@linaro.org>
12675
12676 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12677 (arm_record_coproc_data_proc): Likewise.
12678
12679 2018-02-01 Yao Qi <yao.qi@linaro.org>
12680
12681 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12682
12683 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12684
12685 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12686 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12687
12688 2018-01-31 Pedro Alves <palves@redhat.com>
12689
12690 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12691 * inflow.c (child_terminal_save_inferior): Wrap reference to
12692 tcgetpgrp in HAVE_TERMIOS_H.
12693 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12694 _WIN32.
12695 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12696 always iterate over all inferiors.
12697 (gdbsim_cntrl_c): Adjust.
12698 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12699
12700 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12701
12702 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12703 index type is objfile-owned if the element type is as well.
12704
12705 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12706
12707 GDB 8.1 released.
12708
12709 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12710
12711 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12712 "features/s390x-linux64.c".
12713 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12714 s390_linux32 and s390x_linux64.
12715 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12716 default tdesc.
12717 * s390-tdep.c: Include "features/s390-linux32.c" and
12718 "features/s390x-linux64.c".
12719 (s390_tdesc_valid): Add check for tdesc_has_registers.
12720 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12721 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12722 tdesc_s390x_linux64.
12723 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12724 tdesc_s390x_linux64 to...
12725 * s390-tdep.h: ...here.
12726
12727 2018-01-30 Pedro Alves <palves@redhat.com>
12728
12729 PR gdb/13211
12730 * config.in, configure: Regenerate.
12731 * configure.ac: Check for getpgid.
12732 * go32-nat.c (go32_pass_ctrlc): New.
12733 (go32_target): Install it.
12734 * inf-child.c (inf_child_target): Install
12735 child_terminal_save_inferior, child_pass_ctrlc and
12736 child_interrupt.
12737 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12738 (inf_ptrace_target): No longer install it.
12739 * infcmd.c (interrupt_target_1): Adjust.
12740 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12741 (child_interrupt): Declare.
12742 (inferior::terminal_state): New.
12743 * inflow.c (struct terminal_info): Update comments.
12744 (inferior_process_group): Delete.
12745 (terminal_is_ours): Delete.
12746 (gdb_tty_state): New.
12747 (child_terminal_init): Adjust.
12748 (is_gdb_terminal, sharing_input_terminal_1)
12749 (sharing_input_terminal): New functions.
12750 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12751 Set the process's actual process group in the foreground if
12752 possible. Handle is_ours_for_output/is_ours distinction. Don't
12753 mark terminal as the inferior's if not sharing GDB's terminal.
12754 Don't check attach_flag.
12755 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12756 pass down a target_terminal_state.
12757 (child_terminal_save_inferior): New, factored out from ...
12758 (child_terminal_ours_1): ... this. Handle
12759 target_terminal_state::is_ours_for_output.
12760 (child_interrupt, child_pass_ctrlc): New.
12761 (inflow_inferior_exit): Clear the inferior's terminal_state.
12762 (copy_terminal_info): Copy the inferior's terminal state.
12763 (_initialize_inflow): Remove reference to terminal_is_ours.
12764 * inflow.h (inferior_process_group): Delete.
12765 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12766 * procfs.c (procfs_target): Don't install procfs_interrupt.
12767 (procfs_interrupt): Delete.
12768 * remote.c (remote_serial_quit_handler): Adjust.
12769 (remote_interrupt): Remove ptid parameter. Adjust.
12770 * target-delegates.c: Regenerate.
12771 * target.c: Include "terminal.h".
12772 (target_terminal::terminal_state): Rename to ...
12773 (target_terminal::m_terminal_state): ... this.
12774 (target_terminal::init): Adjust.
12775 (target_terminal::inferior): Adjust to per-inferior
12776 terminal_state.
12777 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12778 (target_terminal::ours, target_terminal::ours_for_output): Use
12779 target_terminal_is_ours_kind.
12780 (target_interrupt): Remove ptid parameter. Adjust.
12781 (default_target_pass_ctrlc): Adjust.
12782 * target.h (target_ops::to_terminal_save_inferior): New field.
12783 (target_ops::to_interrupt): Remove ptid_t parameter.
12784 (target_interrupt): Remove ptid_t parameter. Update comment.
12785 (target_pass_ctrlc): Update comment.
12786 * target/target.h (target_terminal_state): New scoped enum,
12787 factored out of ...
12788 (target_terminal::terminal_state): ... here.
12789 (target_terminal::inferior): Update comments.
12790 (target_terminal::restore_inferior): New.
12791 (target_terminal::is_inferior, target_terminal::is_ours)
12792 (target_terminal::is_ours_for_output): Adjust.
12793 (target_terminal::scoped_restore_terminal_state): Adjust to
12794 rename, and call restore_inferior() instead of inferior().
12795 (target_terminal::scoped_restore_terminal_state::m_state): Change
12796 type.
12797 (target_terminal::terminal_state): Rename to ...
12798 (target_terminal::m_terminal_state): ... this and change type.
12799
12800 2018-01-30 Pedro Alves <palves@redhat.com>
12801
12802 * linux-nat.c (wait_for_signal): New function.
12803 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12804 directly.
12805 (async_terminal_is_ours)
12806 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12807 (linux_nat_add_target): Don't override
12808 to_terminal_inferior/to_terminal_ours.
12809
12810 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12811
12812 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12813
12814 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12815
12816 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12817 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12818 dwarf2_per_objfile_free here.
12819 (dwarf2_per_objfile_free): Remove.
12820 (_initialize_dwarf2_read): Don't register
12821 dwarf2_per_objfile_free as a registry cleanup.
12822
12823 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12824
12825 Avoid compilation errors in MinGW native builds
12826
12827 The error is triggered by including python-internal.h, and the
12828 error message is:
12829
12830 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12831 from build-gnulib/import/math.h:27,
12832 from d:/usr/Python26/include/pyport.h:235,
12833 from d:/usr/Python26/include/Python.h:58,
12834 from python/python-internal.h:94,
12835 from python/py-arch.c:24:
12836 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12837 using ::hypot;
12838 ^~~~~
12839
12840 This happens because Python headers define 'hypot' to expand t
12841 '_hypot' in the Windows builds.
12842 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12843 'hypoth'. This avoids a compilation error.
12844
12845 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12846
12847 * MAINTAINERS (Write After Approval): Fix ordering.
12848
12849 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12850
12851 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12852
12853 2018-01-26 Alan Modra <amodra@gmail.com>
12854
12855 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12856 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12857 Remove nop. Make const. Comment.
12858 (powerpc32_plt_stub_so_2): New.
12859 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12860 Correct count. Update uses.
12861 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12862 Move common code reading PLT entry word. Correct
12863 powerpc32_plt_stub PLT address calculation.
12864 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12865 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12866 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12867 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12868 (ppc64_standard_linkage8): Likewise.
12869 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12870 Correct insns description.
12871 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12872
12873 2018-01-24 Pedro Alves <palves@redhat.com>
12874
12875 GCC PR libstdc++/83906
12876 * gdbtypes.c (operator==(const dynamic_prop &,
12877 const dynamic_prop &)): New.
12878 (operator==(const range_bounds &, const range_bounds &)): New.
12879 (check_types_equal): Use them instead of memcmp.
12880 * gdbtypes.h (operator==(const dynamic_prop &,
12881 const dynamic_prop &)): Declare.
12882 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12883 (operator==(const range_bounds &, const range_bounds &)): Declare.
12884 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12885
12886 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12887
12888 * s390-linux-tdep.c (s390_record_address_mask)
12889 (s390_record_calc_disp_common, s390_record_calc_disp)
12890 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12891 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12892 (s390_process_record): Move to s390-tdep.c.
12893 (s390_linux_init_abi_any): Adjust.
12894 * s390-tdep.c (s390_record_address_mask)
12895 (s390_record_calc_disp_common, s390_record_calc_disp)
12896 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12897 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12898 (s390_process_record): Moved from s390-linux-tdep.c
12899 (s390_gdbarch_init): Adjust.
12900
12901 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12902
12903 * s390-linux-nat.c (s390-tdep.h): New include.
12904 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12905 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12906 (ALLDEPFILES): Add s390-tdep.c.
12907 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12908 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12909 * s390-tdep.h: ...this. New file.
12910 * s390-linux-tdep.c (s390-tdep.h): New include.
12911 (_initialize_s390_tdep): Rename to...
12912 (_initialize_s390_linux_tdep): ...this and adjust.
12913 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12914 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12915 s390-tdep.h.
12916 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12917 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12918 (s390_is_partial_instruction, s390_software_single_step)
12919 (is_non_branch_ril, s390_displaced_step_copy_insn)
12920 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12921 (s390_prologue_data, s390_addr, s390_store, s390_load)
12922 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12923 (s390_register_call_saved, s390_guess_tracepoint_registers)
12924 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12925 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12926 (s390_pseudo_register_name, s390_pseudo_register_type)
12927 (s390_pseudo_register_read, s390_pseudo_register_write)
12928 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12929 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12930 (s390_addr_bits_remove, s390_address_class_type_flags)
12931 (s390_address_class_type_flags_to_name)
12932 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12933 (s390_function_arg_float, s390_function_arg_vector)
12934 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12935 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12936 (s390_frame_align, s390_register_return_value, s390_return_value)
12937 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12938 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12939 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12940 (s390_trad_frame_prev_register, s390_unwind_cache)
12941 (s390_prologue_frame_unwind_cache)
12942 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12943 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12944 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12945 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12946 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12947 (s390_frame_base_address, s390_local_base_address)
12948 (s390_frame_base, s390_gcc_target_options)
12949 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12950 (s390_validate_reg_range, s390_tdesc_valid)
12951 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12952 * s390-tdep.c: ...this. New file.
12953
12954 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12955
12956 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12957 (s390_process_record, s390_gdbarch_tdep_alloc)
12958 (s390_linux_init_abi_any): Use/set new hook.
12959
12960 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12961
12962 * s390-linux-tdep.c (osabi.h): New include.
12963 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12964 (s390_linux_init_abi_any): New functions.
12965 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12966
12967 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12968
12969 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12970 tdesc_has_registers check
12971
12972 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12973
12974 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12975 (s390_validate_reg_range): New macro.
12976 (s390_gdbarch_init): Adjust.
12977
12978 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12979
12980 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12981 (s390_gdbarch_tdep_alloc): Adjust.
12982 (s390_gdbarch_init): Adjust.
12983
12984 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12985
12986 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12987 <have_tdb>: Change type to bool.
12988 (s390_gdbarch_tdep_alloc): Adjust.
12989 (s390_gdbarch_init): Adjust.
12990
12991 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12992
12993 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12994 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12995 (s390_gdbarch_tdep_alloc): New function.
12996 (s390_gdbarch_init): Allocate tdep at start and use its fields
12997 instead of separate variables.
12998
12999 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13000
13001 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13002 when looking for cached gdbarch and add comment for remaining.
13003
13004 2018-01-22 Pedro Alves <palves@redhat.com>
13005 Sergio Durigan Junior <sergiodj@redhat.com>
13006
13007 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13008 case.
13009
13010 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13011
13012 * MAINTAINERS: Update my company e-mail address.
13013
13014 2018-01-22 Yao Qi <yao.qi@linaro.org>
13015
13016 * regcache.c (cooked_write_test): New function.
13017 (_initialize_regcache): Register the test.
13018
13019 2018-01-22 Yao Qi <yao.qi@linaro.org>
13020
13021 * ia64-tdep.c (ia64_pseudo_register_read): Call
13022 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13023 * m32c-tdep.c (m32c_cat_read): Likewise.
13024 (m32c_r3r2r1r0_read): Likewise.
13025 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13026 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13027
13028 2018-01-22 Yao Qi <yao.qi@linaro.org>
13029
13030 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13031 method raw_read instead of regcache_raw_read.
13032 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13033 * arm-tdep.c (arm_neon_quad_read): Likewise.
13034 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13035 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13036 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13037 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13038 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13039 (i386_pseudo_register_read_into_value): Likewise.
13040 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13041 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13042 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13043 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13044 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13045 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13046 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13047 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13048 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13049
13050 2018-01-22 Yao Qi <yao.qi@linaro.org>
13051
13052 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13053 * configure.tgt: Remove target mt.
13054 * mt-tdep.c: Remove.
13055 * regcache.c (cooked_read_test): Remove the check for mt.
13056
13057 2018-01-22 Yao Qi <yao.qi@linaro.org>
13058
13059 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13060 instead of gdbarch_pseudo_register_read_value.
13061
13062 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13063
13064 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13065 language is Ada.
13066
13067 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13068
13069 * linespec.c (create_sals_line_offset): Remove code that preserved
13070 the symtab_and_line's line number.
13071
13072 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13073
13074 * varobj.c (varobj_create): Don't set valid_block when creating a
13075 floating varobj.
13076
13077 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13078
13079 * varobj.c (varobj_create): Remove out of date comment.
13080
13081 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13082
13083 PR mi/20395
13084 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13085 updating innermost block.
13086 * parse.c (innermost_block_tracker::update): Take extra type
13087 parameter, and check types match before updating innermost block.
13088 (write_dollar_variable): Update innermost block for registers.
13089 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13090 (innermost_block_tracker::innermost_block_tracker): Initialise
13091 m_types member.
13092 (innermost_block_tracker::reset): Take type parameter.
13093 (innermost_block_tracker::update): Take type parameter, and pass
13094 type through as needed.
13095 (innermost_block_tracker::m_types): New member.
13096 * varobj.c (varobj_create): Pass type when reseting innermost
13097 block.
13098
13099 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13100
13101 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13102 * ada-lang.c (resolve_subexp): Likewise.
13103 * breakpoint.c (set_breakpoint_condition) Likewise.
13104 (watch_command_1) Likewise.
13105 * c-exp.y (variable): Likewise.
13106 * d-exp.y (PrimaryExpression): Likewise.
13107 * f-exp.y (variable): Likewise.
13108 * go-exp.y (variable): Likewise.
13109 * m2-exp.y (variable): Likewise.
13110 * objfiles.c (objfile::~objfile): Likewise.
13111 * p-exp.y (variable): Likewise.
13112 * parse.c (innermost_block): Change type.
13113 * parser-defs.h (class innermost_block_tracker): New.
13114 (innermost_block): Change to innermost_block_tracker.
13115 * printcmd.c (display_command): Switch to innermost_block API.
13116 (do_one_display): Likewise.
13117 * rust-exp.y (do_one_display): Likewise.
13118 * symfile.c (clear_symtab_users): Likewise.
13119 * varobj.c (varobj_create): Switch to innermost_block API, replace
13120 use of innermost_block with block stored on varobj object.
13121
13122 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13123
13124 * expression.h (innermost_block): Remove declaration.
13125 * varobj.c: Add 'parser-defs.h' include.
13126
13127 2018-01-19 Tom Tromey <tom@tromey.com>
13128
13129 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13130 symbols in the static and global blocks.
13131
13132 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13133
13134 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13135 gdb_ptrace.h, and move including gdb_wait.h ...
13136 * nat/linux-ptrace.h: ... to here.
13137
13138 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13139
13140 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13141 inf_ptrace_detach_success.
13142 (inf_ptrace_detach_success): Add inferior parameter, use it
13143 instead of inferior_ptid, pass it to detach_inferior.
13144 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13145 parameter.
13146 * inferior.c (detach_inferior): Add overload that takes an
13147 inferior object.
13148 * inferior.h (detach_inferior): Likewise.
13149 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13150 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13151 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13152
13153 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13154
13155 * target.h (struct target_ops) <to_detach>: Add inferior
13156 parameter.
13157 (target_detach): Likewise.
13158 * target.c (dispose_inferior): Pass inferior down.
13159 (target_detach): Pass inferior down. Assert that it is equal to
13160 the current inferior.
13161 * aix-thread.c (aix_thread_detach): Pass inferior down.
13162 * corefile.c (core_file_command): Pass current_inferior() down.
13163 * corelow.c (core_detach): Add inferior parameter.
13164 * darwin-nat.c (darwin_detach): Likewise.
13165 * gnu-nat.c (gnu_detach): Likewise.
13166 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13167 * infcmd.c (detach_command): Pass current_inferior() down to
13168 target_detach.
13169 * infrun.c (follow_fork_inferior): Pass parent_inf to
13170 target_detach.
13171 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13172 target_detach.
13173 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13174 * linux-thread-db.c (thread_db_detach): Likewise.
13175 * nto-procfs.c (procfs_detach): Likewise.
13176 * procfs.c (procfs_detach): Likewise.
13177 * record.c (record_detach): Likewise.
13178 * record.h (struct inferior): Forward-declare.
13179 (record_detach): Add inferior parameter.
13180 * remote-sim.c (gdbsim_detach): Likewise.
13181 * remote.c (remote_detach_1): Likewise.
13182 (remote_detach): Likewise.
13183 (extended_remote_detach): Likewise.
13184 * sol-thread.c (sol_thread_detach): Likewise.
13185 * target-debug.h (target_debug_print_inferior_p): New macro.
13186 * target-delegates.c: Re-generate.
13187 * top.c (kill_or_detach): Pass inferior down to target_detach.
13188 * windows-nat.c (windows_detach): Add inferior parameter.
13189
13190 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13191
13192 * target.h (struct target_ops) <to_detach>: Remove args
13193 parameter.
13194 (target_detach): Likewise.
13195 * target.c (dispose_inferior): Adjust.
13196 (target_detach): Remove args parameter, adjust.
13197 * aix-thread.c (aix_thread_detach): Adjust.
13198 * corefile.c (core_file_command): Adjust.
13199 * corelow.c (core_detach): Adjust.
13200 * darwin-nat.c (darwin_detach): Adjust.
13201 * gnu-nat.c (gnu_detach): Adjust.
13202 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13203 * infcmd.c (detach_command): Adjust
13204 * infrun.c (follow_fork_inferior): Adjust.
13205 (handle_vfork_child_exec_or_exit): Adjust.
13206 * linux-fork.c (linux_fork_detach): Remove args parameter.
13207 * linux-fork.h (linux_fork_detach): Likewise.
13208 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13209 * linux-thread-db.c (thread_db_detach): Likewise.
13210 * nto-procfs.c (procfs_detach): Likewise.
13211 * procfs.c (procfs_detach): Likewise.
13212 (do_detach): Remove signo parameter.
13213 * record.c (record_detach): Remove args parameter.
13214 * record.h (record_detach): Likewise.
13215 * remote-sim.c (gdbsim_detach): Likewise.
13216 * remote.c (remote_detach_1): Likewise.
13217 (remote_detach): Likewise.
13218 (extended_remote_detach): Likewise.
13219 * sol-thread.c (sol_thread_detach): Likewise.
13220 * target-delegates.c: Re-generate.
13221 * top.c (struct qt_args) <args>: Remove field.
13222 (kill_or_detach): Don't pass args.
13223 (quit_force): Don't set args.
13224 * windows-nat.c (windows_detach): Remove args parameter.
13225
13226 2018-01-19 Yao Qi <yao.qi@linaro.org>
13227
13228 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13229 (arm_linux_init_abi): Install it.
13230
13231 2018-01-19 Yao Qi <yao.qi@linaro.org>
13232
13233 * osabi.c (gdb_osabi_names): Extend the regexp for
13234 arm-linux-gnueabihf.
13235
13236 2018-01-18 Yao Qi <yao.qi@linaro.org>
13237
13238 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13239 m_abbrevs.
13240 (abbrev_table::add_abbrev): Update.
13241 (abbrev_table::lookup_abbrev): Update.
13242
13243 2018-01-18 Yao Qi <yao.qi@linaro.org>
13244
13245 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13246
13247 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13248
13249 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13250 to "std::string".
13251
13252 2018-01-17 Tom Tromey <tom@tromey.com>
13253
13254 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13255
13256 2018-01-17 Tom Tromey <tom@tromey.com>
13257
13258 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13259 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13260 (create_array_type_with_stride): Update.
13261 * dwarf2read.c (set_die_type): Update.
13262
13263 2018-01-17 Tom Tromey <tom@tromey.com>
13264
13265 * dwarf2read.c (delayed_method_info): Remove typedef.
13266 (dwarf2_cu::method_info): Now a std::vector.
13267 (add_to_method_list): Update.
13268 (free_delayed_list): Remove.
13269 (compute_delayed_physnames): Update.
13270 (process_full_comp_unit, process_full_type_unit): Clear the method
13271 list. Remove cleanups.
13272 (psymtab_include_file_name): Add name_holder parameter. Use
13273 unique_xmalloc_ptr.
13274 (dwarf_decode_lines): Update.
13275
13276 2018-01-17 Tom Tromey <tom@tromey.com>
13277 Simon Marchi <simon.marchi@ericsson.com>
13278
13279 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13280 (dwarf2_per_objfile::free_cached_comp_units)
13281 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13282 (init_cutu_and_read_dies_no_follow): Update.
13283 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13284 (dwarf2_cu::~dwarf2_cu): New.
13285 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13286 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13287
13288 2018-01-17 Tom Tromey <tom@tromey.com>
13289 Simon Marchi <simon.marchi@ericsson.com>
13290
13291 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13292 (struct die_reader_specs) <abbrev_table>: New member.
13293 (struct abbrev_table): Add constructor.
13294 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13295 <abbrev_obstack>: Now an auto_obstack.
13296 (abbrev_table_up): New typedef.
13297 (init_cu_die_reader): Add abbrev_table parameter.
13298 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13299 Add result_dwo_abbrev_table.
13300 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13301 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13302 Update.
13303 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13304 parameter.
13305 (skip_children): Update.
13306 (abbrev_table::alloc_abbrev): Rename from
13307 abbrev_table_alloc_abbrev.
13308 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13309 (abbrev_table::lookup_abbrev): Rename from
13310 abbrev_table_lookup_abbrev.
13311 (abbrev_table_read_table): Return abbrev_table_up.
13312 (abbrev_table_free, abbrev_table_free_cleanup)
13313 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13314 (load_partial_dies): Update.
13315
13316 2018-01-17 Tom Tromey <tom@tromey.com>
13317
13318 * dwarf2read.c (dwarf2_compute_name): Update comment.
13319 (read_func_scope, read_variable): Update.
13320 (new_symbol): Remove.
13321 (new_symbol_full): Rename to new_symbol.
13322
13323 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13324
13325 PR gdb/16577
13326 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13327 a warning instead of throwing an error, set section size to 0 and return
13328 NULL.
13329 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13330
13331 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13332
13333 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13334 std::string.
13335 (linux_ptrace_attach_fail_reason_string): Likewise.
13336 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13337 Likewise.
13338 (linux_ptrace_attach_fail_reason_string): Likewise.
13339 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13340
13341 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13342
13343 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13344
13345 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13346
13347 PR gdb/21559
13348 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13349 checking for fs_base/gs_base fields in struct user_regs_struct.
13350 * configure: Regenerate.
13351
13352 2018-01-17 Yao Qi <yao.qi@linaro.org>
13353
13354 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13355 function.
13356 (aarch64_linux_init_abi): Install it to gdbarch hook
13357 gcc_target_options.
13358
13359 2018-01-15 Pedro Alves <palves@redhat.com>
13360
13361 * common/signals-state-save-restore.c
13362 (save_original_signals_state): Fix typos.
13363
13364 2017-01-12 Tom Tromey <tom@tromey.com>
13365 Sergio Durigan Junior <sergiodj@redhat.com>
13366
13367 * Makefile.in (install-only): Install gdb-add-index.
13368
13369 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13370
13371 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13372
13373 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13374
13375 * infrun.c (keep_going_pass_signal): Clear step-over info when
13376 insert_breakpoints fails.
13377
13378 2018-01-11 Pedro Alves <palves@redhat.com>
13379
13380 PR gdb/22583
13381 * infrun.c (resume): Rename to ...
13382 (resume_1): ... this.
13383 (resume): Reimplement as wrapper around resume_1.
13384
13385 2018-01-11 Pedro Alves <palves@redhat.com>
13386
13387 PR remote/22597
13388 * remote.c (remote_parse_stop_reply): Default to the last-set
13389 general thread instead of to 'magic_null_ptid'.
13390
13391 2018-01-10 Pedro Alves <palves@redhat.com>
13392
13393 * language.h (language_get_symbol_name_matcher): Rename ...
13394 (get_symbol_name_matcher): ... this.
13395 * language.c (language_get_symbol_name_matcher): Ditto.
13396 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13397 callers adjusted.
13398
13399 2018-01-10 Pedro Alves <palves@redhat.com>
13400
13401 PR gdb/22670
13402 * dwarf2read.c
13403 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13404 Adjust to use language_get_symbol_name_matcher instead of
13405 language_defn::la_get_symbol_name_matcher.
13406 * language.c (language_get_symbol_name_matcher): If in Ada mode
13407 and the lookup name is a verbatim match, return Ada's matcher.
13408 * language.h (language_get_symbol_name_matcher): Adjust comment.
13409 (ada_lookup_name_info::verbatim_p):: New method.
13410
13411 2018-01-10 Pedro Alves <palves@redhat.com>
13412
13413 PR gdb/22670
13414 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13415 minsym's language is language_auto or language_cplus, pass down
13416 language_ada instead.
13417 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13418
13419 2018-01-10 Pedro Alves <palves@redhat.com>
13420
13421 PR gdb/22670
13422 * minsyms.c (linkage_name_str): New function.
13423 (iterate_over_minimal_symbols): Use it.
13424
13425 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13426
13427 * NEWS: Document that 'info proc' now works on FreeBSD.
13428
13429 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13430
13431 * configure.ac: Check for kinfo_getfile in libutil.
13432 * configure: Regenerate.
13433 * config.in: Regenerate.
13434 * fbsd-nat.c: Include "fbsd-tdep.h".
13435 (fbsd_fetch_cmdline): New.
13436 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13437 rather than calling error.
13438 (fbsd_info_proc): New.
13439 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13440 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13441 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13442
13443 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13444
13445 * fbsd-nat.c (struct free_deleter): Remove.
13446 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13447
13448 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13449
13450 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13451 NULL for an empty pathname.
13452
13453 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13454
13455 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13456 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13457 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13458 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13459 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13460 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13461 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13462 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13463 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13464 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13465 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13466 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13467 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13468 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13469 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13470
13471 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13472
13473 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13474 (gnu_xfer_auxv): New function.
13475 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13476 TARGET_OBJECT_AUXV.
13477
13478 2018-01-08 Yao Qi <yao.qi@linaro.org>
13479 Simon Marchi <simon.marchi@ericsson.com>
13480
13481 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13482 common/selftest.c.
13483 (COMMON_OBS): Remove selftest.o.
13484 * configure.ac: Append selftest-arch.c and common/selftest.c to
13485 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13486 * configure: Re-generated.
13487 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13488 GDB_SELF_TEST.
13489 (maintenance_info_selftests): Likewise.
13490
13491 2018-01-08 Xavier Roirand <roirand@adacore.com>
13492
13493 * ada-valprint.c (val_print_packed_array_elements): Use
13494 proper number of elements when printing an array indexed
13495 by an enumeration type.
13496
13497 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13498
13499 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13500 (dw2_get_file_names_reader): Adjust.
13501 (lookup_dwo_signatured_type): Adjust.
13502 (lookup_dwp_signatured_type): Adjust.
13503 (lookup_signatured_type): Adjust.
13504 (create_type_unit_group): Adjust.
13505 (get_type_unit_group): Adjust.
13506 (process_psymtab_comp_unit_reader): Adjust.
13507 (build_type_psymtabs_reader): Adjust.
13508 (scan_partial_symbols): Adjust.
13509 (add_partial_symbol): Adjust.
13510 (add_partial_subprogram): Adjust.
13511 (peek_die_abbrev): Adjust.
13512 (fixup_go_packaging): Adjust.
13513 (process_imported_unit_die): Adjust.
13514 (dwarf2_compute_name): Adjust.
13515 (dwarf2_physname): Adjust.
13516 (read_import_statement): Adjust.
13517 (handle_DW_AT_stmt_list): Adjust.
13518 (read_file_scope): Adjust.
13519 (read_func_scope): Adjust.
13520 (read_lexical_block_scope): Adjust.
13521 (read_call_site_scope): Adjust.
13522 (read_variable): Adjust.
13523 (dwarf2_rnglists_process): Adjust.
13524 (dwarf2_ranges_process): Adjust.
13525 (dwarf2_ranges_read): Adjust.
13526 (dwarf2_get_pc_bounds): Adjust.
13527 (dwarf2_record_block_ranges): Adjust.
13528 (dwarf2_add_field): Adjust.
13529 (dwarf2_add_member_fn): Adjust.
13530 (read_structure_type): Adjust.
13531 (process_structure_scope): Adjust.
13532 (read_enumeration_type): Adjust.
13533 (read_array_type): Adjust.
13534 (mark_common_block_symbol_computed): Adjust.
13535 (read_common_block): Adjust.
13536 (read_namespace_type): Adjust.
13537 (read_namespace): Adjust.
13538 (read_module_type): Adjust.
13539 (read_tag_pointer_type): Adjust.
13540 (read_tag_ptr_to_member_type): Adjust.
13541 (read_tag_string_type): Adjust.
13542 (read_subroutine_type): Adjust.
13543 (read_typedef): Adjust.
13544 (read_base_type): Adjust.
13545 (attr_to_dynamic_prop): Adjust.
13546 (read_subrange_type): Adjust.
13547 (read_unspecified_type): Adjust.
13548 (dwarf2_read_abbrevs): Adjust.
13549 (load_partial_dies): Adjust.
13550 (read_partial_die): Adjust.
13551 (find_partial_die): Adjust.
13552 (guess_partial_die_structure_name): Adjust.
13553 (fixup_partial_die): Adjust.
13554 (read_attribute_value): Adjust.
13555 (read_addr_index): Adjust.
13556 (read_addr_index_from_leb128): Adjust.
13557 (read_str_index): Adjust.
13558 (dwarf2_string_attr): Adjust.
13559 (get_debug_line_section): Adjust.
13560 (dwarf_decode_line_header): Adjust.
13561 (lnp_state_machine::check_line_address): Adjust.
13562 (dwarf_decode_lines_1): Adjust.
13563 (dwarf_decode_lines): Adjust.
13564 (dwarf2_start_symtab): Adjust.
13565 (var_decode_location): Adjust.
13566 (new_symbol_full): Adjust.
13567 (dwarf2_const_value_data): Adjust.
13568 (dwarf2_const_value_attr): Adjust.
13569 (dwarf2_const_value): Adjust.
13570 (die_type): Adjust.
13571 (die_containing_type): Adjust.
13572 (build_error_marker_type): Adjust.
13573 (lookup_die_type): Adjust.
13574 (guess_full_die_structure_name): Adjust.
13575 (anonymous_struct_prefix): Adjust.
13576 (determine_prefix): Adjust.
13577 (dwarf2_name): Adjust.
13578 (follow_die_ref_or_sig): Adjust.
13579 (follow_die_offset): Adjust.
13580 (follow_die_ref): Adjust.
13581 (follow_die_sig_1): Adjust.
13582 (follow_die_sig): Adjust.
13583 (get_signatured_type): Adjust.
13584 (get_DW_AT_signature_type): Adjust.
13585 (decode_locdesc): Adjust.
13586 (dwarf_decode_macros): Adjust.
13587 (cu_debug_loc_section): Adjust.
13588 (fill_in_loclist_baton): Adjust.
13589 (dwarf2_symbol_mark_computed): Adjust.
13590 (init_one_comp_unit): Don't assign
13591 dwarf2_cu::dwarf2_per_objfile.
13592 (set_die_type): Adjust.
13593
13594 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13595
13596 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13597 <dwarf2_per_objfile>: New field.
13598 (dwarf2_per_objfile): Remove global.
13599 (get_dwarf2_per_objfile): New function.
13600 (set_dwarf2_per_objfile): New function.
13601 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13602 dwarf2_per_objfile.
13603 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13604 (read_abbrev_offset): Likewise.
13605 (read_indirect_string): Likewise.
13606 (read_indirect_line_string): Likewise.
13607 (read_indirect_string_at_offset): Likewise.
13608 (read_indirect_string_from_dwz): Likewise.
13609 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13610 dwarf2_per_objfile.
13611 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13612 (create_all_comp_units): Change objfile parameter to
13613 dwarf2_per_objfile.
13614 (create_all_type_units): Likewise.
13615 (process_queue): Add dwarf2_per_objfile parameter.
13616 (read_and_check_comp_unit_head): Likewise.
13617 (lookup_dwo_unit_in_dwp): Likewise.
13618 (get_dwp_file): Likewise.
13619 (process_cu_includes): Likewise.
13620 (struct free_dwo_file_cleanup_data): New struct.
13621 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13622 set_dwarf2_per_objfile.
13623 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13624 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13625 context, adjust calls.
13626 (dw2_instantiate_symtab): Likewise.
13627 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13628 (dw2_get_cu): Likewise.
13629 (create_cu_from_index_list): Change objfile parameter to
13630 dwarf2_per_objfile.
13631 (create_cus_from_index_list): Get dwarf2_per_objfile from
13632 context, adjust calls.
13633 (create_cus_from_index): Likewise.
13634 (create_signatured_type_table_from_index): Change objfile
13635 parameter to dwarf2_per_objfile.
13636 (create_signatured_type_table_from_debug_names): Change objfile
13637 parameter to dwarf2_per_objfile.
13638 (create_addrmap_from_index): Likewise.
13639 (create_addrmap_from_aranges): Likewise.
13640 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13641 (dw2_setup): Remove.
13642 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13643 context.
13644 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13645 get_dwarf2_per_objfile.
13646 (dw2_forget_cached_source_info): Likewise.
13647 (dw2_map_symtabs_matching_filename): Likewise.
13648 (struct dw2_symtab_iterator) <index>: Remove.
13649 <dwarf2_per_objfile>: New field.
13650 (dw2_symtab_iter_init): Replace index parameter with
13651 dwarf2_per_objfile.
13652 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13653 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13654 (dw2_print_stats): Likewise.
13655 (dw2_dump): Likewise.
13656 (dw2_expand_symtabs_for_function): Likewise.
13657 (dw2_expand_all_symtabs): Likewise.
13658 (dw2_expand_symtabs_with_fullname): Likewise.
13659 (dw2_expand_marked_cus): Replace index and objfile parameters
13660 with dwarf2_per_objfile.
13661 (dw_expand_symtabs_matching_file_matcher): Add
13662 dwarf2_per_objfile parameter and adjust calls.
13663 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13664 adjust calls.
13665 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13666 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13667 adjust calls.
13668 (create_cus_from_debug_names_list): Replace objfile parameter
13669 with dwarf2_per_objfile and adjust calls.
13670 (create_cus_from_debug_names): Likewise.
13671 (dwarf2_read_debug_names): Likewise.
13672 (mapped_debug_names::namei_to_name): Adjust call.
13673 (dw2_debug_names_iterator::next): Likewise.
13674 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13675 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13676 (dw2_debug_names_dump): Likewise.
13677 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13678 (dw2_debug_names_expand_symtabs_matching): Likewise.
13679 (dwarf2_initialize_objfile): Likewise.
13680 (dwarf2_build_psymtabs): Likewise.
13681 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13682 this_cu.
13683 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13684 (read_and_check_comp_unit_head): Likewise.
13685 (read_abbrev_offset): Likewise.
13686 (create_debug_type_hash_table): Likewise.
13687 (create_debug_types_hash_table): Likewise.
13688 (create_all_type_units): Replace objfile parameter with
13689 dwarf2_per_objfile.
13690 (add_type_unit): Add dwarf2_per_objfile parameter.
13691 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13692 with dwarf2_per_objfile.
13693 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13694 (lookup_dwp_signatured_type): Likewise.
13695 (lookup_signatured_type): Likewise.
13696 (read_cutu_die_from_dwo): Likewise.
13697 (init_tu_and_read_dwo_dies): Likewise.
13698 (init_cutu_and_read_dies): Likewise.
13699 (init_cutu_and_read_dies_no_follow): Likewise.
13700 (allocate_type_unit_groups_table): Add objfile parameter.
13701 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13702 (get_type_unit_group): Likewise.
13703 (process_psymtab_comp_unit): Update call.
13704 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13705 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13706 (print_tu_stats): Likewise.
13707 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13708 in void* parameter.
13709 (build_type_psymtabs): Change objfile parameter to
13710 dwarf2_per_objfile.
13711 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13712 passed in void* parameter.
13713 (process_skeletonless_type_units): Change objfile parameter to
13714 dwarf2_per_objfile.
13715 (set_partial_user): Likewise.
13716 (dwarf2_build_psymtabs_hard): Likewise.
13717 (read_comp_units_from_section): Likewise.
13718 (create_all_comp_units): Likewise.
13719 (scan_partial_symbols): Update calls.
13720 (add_partial_symbol): Likewise.
13721 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13722 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13723 (process_queue): Add dwarf2_per_objfile parameter.
13724 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13725 (compute_compunit_symtab_includes): Likewise.
13726 (process_cu_includes): Add dwarf2_per_objfile parameter.
13727 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13728 (process_full_type_unit): Likewise.
13729 (process_imported_unit_die): Update call.
13730 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13731 (read_file_scope): Likewise.
13732 (allocate_dwo_file_hash_table): Add objfile parameter.
13733 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13734 (create_cus_hash_table): Likewise.
13735 (create_dwp_hash_table): Likewise.
13736 (create_dwo_unit_in_dwp_v1): Likewise.
13737 (create_dwp_v2_section): Likewise.
13738 (create_dwo_unit_in_dwp_v2): Likewise.
13739 (lookup_dwo_unit_in_dwp): Likewise.
13740 (try_open_dwop_file): Likewise.
13741 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13742 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13743 cleanup to include a reference to dwarf2_per_objfile.
13744 (open_dwp_file): Add dwarf2_per_objfile parameter.
13745 (open_and_init_dwp_file): Likewise.
13746 (get_dwp_file): Likewise.
13747 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13748 (queue_and_load_all_dwo_tus): Update call.
13749 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13750 data.
13751 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13752 (dwarf2_ranges_process): Likewise.
13753 (dwarf2_get_pc_bounds): Likewise.
13754 (mark_common_block_symbol_computed): Likewise.
13755 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13756 (dwarf2_read_abbrevs): Update call.
13757 (read_partial_die): Use dwarf2_per_objfile from cu.
13758 (find_partial_die): Likewise.
13759 (fixup_partial_die): Likewise.
13760 (read_attribute_value): Likewise.
13761 (read_indirect_string_at_offset_from): Add objfile parameter.
13762 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13763 parameter.
13764 (read_indirect_string_from_dwz): Add objfile parameter.
13765 (read_indirect_string): Add objfile parameter.
13766 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13767 (read_addr_index): Use dwarf2_per_objfile from cu.
13768 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13769 call dw2_setup.
13770 (read_str_index): Use dwarf2_per_objfile from cu.
13771 (get_debug_line_section): Likewise.
13772 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13773 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13774 (new_symbol_full): Use dwarf2_per_objfile from cu.
13775 (build_error_marker_type): Likewise.
13776 (lookup_die_type): Likewise.
13777 (determine_prefix): Likewise.
13778 (follow_die_offset): Likewise.
13779 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13780 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13781 (dwarf2_fetch_die_type_sect_off): Likewise.
13782 (dwarf2_get_die_type): Likewise.
13783 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13784 (get_signatured_type): Likewise.
13785 (get_DW_AT_signature_type): Likewise.
13786 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13787 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13788 (cu_debug_loc_section): Likewise.
13789 (fill_in_loclist_baton): Likewise.
13790 (dwarf2_symbol_mark_computed): Likewise.
13791 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13792 dwarf2_per_objfile.
13793 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13794 parameter.
13795 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13796 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13797 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13798 (set_die_type): Use dwarf2_free_objfile from cu.
13799 (get_die_type_at_offset): Likewise.
13800 (dwarf2_per_objfile_free): Don't assign global variable.
13801 (debug_names) <constructor>: Add dwarf2_per_objfile
13802 parameter, update m_debugstrlookup construction.
13803 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13804 parameter.
13805 <m_dwarf2_per_objfile>: New field.
13806 <lookup>: Use m_dwarf2_per_objfile.
13807 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13808 (psyms_seen_size): Likewise.
13809 (write_gdbindex): Replace objfile parameter with
13810 dwarf2_per_objfile.
13811 (write_debug_names): Likewise.
13812 (write_psymtabs_to_index): Likewise.
13813 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13814 calls.
13815
13816 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13817
13818 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13819 <dwarf2_per_objfile>: New field.
13820 (struct dwarf2_per_cu_data) <objfile>: Remove.
13821 <dwarf2_per_objfile>: New field.
13822 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13823 of objfile.
13824 (create_signatured_type_table_from_index): Likewise.
13825 (create_debug_type_hash_table): Likewise.
13826 (fill_in_sig_entry_from_dwo_entry): Likewise.
13827 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13828 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13829 objfile.
13830 (create_partial_symtab): Access objfile through
13831 dwarf2_per_objfile.
13832 (process_psymtab_comp_unit_reader): Likewise.
13833 (read_comp_units_from_section): Likewise.
13834 (scan_partial_symbols): Likewise.
13835 (add_partial_symbol): Likewise.
13836 (add_partial_subprogram): Likewise.
13837 (peek_die_abbrev): Likewise.
13838 (fixup_go_packaging): Likewise.
13839 (process_full_comp_unit): Likewise.
13840 (process_full_type_unit): Likewise.
13841 (process_imported_unit_die): Likewise.
13842 (dwarf2_compute_name): Likewise.
13843 (dwarf2_physname): Likewise.
13844 (read_import_statement): Likewise.
13845 (create_cus_hash_table): Assign dwarf2_physname instead of
13846 objfile.
13847 (read_func_scope): Access objfile through dwarf2_per_objfile.
13848 (read_lexical_block_scope): Likewise.
13849 (read_call_site_scope): Likewise.
13850 (read_variable): Likewise.
13851 (dwarf2_rnglists_process): Likewise.
13852 (dwarf2_ranges_process): Likewise.
13853 (dwarf2_ranges_read): Likewise.
13854 (dwarf2_record_block_ranges): Likewise.
13855 (dwarf2_add_field): Likewise.
13856 (dwarf2_add_member_fn): Likewise.
13857 (read_structure_type): Likewise.
13858 (process_structure_scope): Likewise.
13859 (read_enumeration_type): Likewise.
13860 (read_array_type): Likewise.
13861 (read_common_block): Likewise.
13862 (read_namespace_type): Likewise.
13863 (read_namespace): Likewise.
13864 (read_module_type): Likewise.
13865 (read_tag_pointer_type): Likewise.
13866 (read_tag_ptr_to_member_type): Likewise.
13867 (read_tag_string_type): Likewise.
13868 (read_subroutine_type): Likewise.
13869 (read_typedef): Likewise.
13870 (read_base_type): Likewise.
13871 (attr_to_dynamic_prop): Likewise.
13872 (read_subrange_type): Likewise.
13873 (read_unspecified_type): Likewise.
13874 (load_partial_dies): Likewise.
13875 (read_partial_die): Likewise.
13876 (find_partial_die): Likewise.
13877 (guess_partial_die_structure_name): Likewise.
13878 (fixup_partial_die): Likewise.
13879 (read_attribute_value): Likewise.
13880 (read_addr_index_from_leb128): Likewise.
13881 (dwarf2_read_addr_index): Likewise.
13882 (dwarf2_string_attr): Likewise.
13883 (lnp_state_machine::check_line_address): Likewise.
13884 (dwarf_decode_lines_1): Likewise.
13885 (dwarf_decode_lines): Likewise.
13886 (dwarf2_start_symtab): Likewise.
13887 (var_decode_location): Likewise.
13888 (new_symbol_full): Likewise.
13889 (dwarf2_const_value_data): Likewise.
13890 (dwarf2_const_value_attr): Likewise.
13891 (dwarf2_const_value): Likewise.
13892 (die_type): Likewise.
13893 (die_containing_type): Likewise.
13894 (lookup_die_type): Likewise.
13895 (guess_full_die_structure_name): Likewise.
13896 (anonymous_struct_prefix): Likewise.
13897 (dwarf2_name): Likewise.
13898 (follow_die_ref_or_sig): Likewise.
13899 (follow_die_offset): Likewise.
13900 (follow_die_ref): Likewise.
13901 (dwarf2_fetch_die_loc_sect_off): Likewise.
13902 (dwarf2_fetch_constant_bytes): Likewise.
13903 (dwarf2_fetch_die_type_sect_off): Likewise.
13904 (dwarf2_get_die_type): Likewise.
13905 (follow_die_sig): Likewise.
13906 (decode_locdesc): Likewise.
13907 (dwarf2_per_cu_objfile): Likewise.
13908 (dwarf2_per_cu_text_offset): Likewise.
13909 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13910 objfile.
13911 (set_die_type): Access objfile through
13912 dwarf2_per_objfile.
13913
13914 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13915
13916 * valprint.c (converted_character_d): Remove typedef.
13917 (DEF_VEC_O (converted_character_d)): Remove.
13918 (count_next_character): Use std::vector.
13919 (print_converted_chars_to_obstack): Likewise.
13920 (generic_printstr): Likewise.
13921
13922 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13923
13924 * xml-support.h (struct gdb_xml_value): Add constructor.
13925 <value>: Change type to unique_xmalloc_ptr.
13926 (gdb_xml_value_s): Remove typedef.
13927 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13928 (gdb_xml_element_start_handler): Change parameter type to
13929 std::vector.
13930 (xml_find_attribute): Likewise.
13931 * xml-support.c (xml_find_attribute): Change parameter type to
13932 std::vector and adjust.
13933 (gdb_xml_values_cleanup): Remove.
13934 (gdb_xml_parser::start_element): Adjust to std::vector.
13935 (xinclude_start_include): Change paraeter type to std::vector
13936 and adjust.
13937 * btrace.c (check_xml_btrace_version): Likewise.
13938 (parse_xml_btrace_block): Likewise.
13939 (parse_xml_btrace_pt_config_cpu): Likewise.
13940 (parse_xml_btrace_pt): Likewise.
13941 (parse_xml_btrace_conf_bts): Likewise.
13942 (parse_xml_btrace_conf_pt): Likewise.
13943 * memory-map.c (memory_map_start_memory): Likewise.
13944 (memory_map_start_property): Likewise.
13945 * osdata.c (osdata_start_osdata): Likewise.
13946 (osdata_start_item): Likewise.
13947 (osdata_start_column): Likewise.
13948 * remote.c (start_thread): Likewise.
13949 * solib-aix.c (library_list_start_library): Likewise.
13950 (library_list_start_list): Likewise.
13951 * solib-svr4.c (library_list_start_library): Likewise.
13952 (svr4_library_list_start_list): Likewise.
13953 * solib-target.c (library_list_start_segment): Likewise.
13954 (library_list_start_section): Likewise.
13955 (library_list_start_library): Likewise.
13956 (library_list_start_list): Likewise.
13957 * tracepoint.c (traceframe_info_start_memory): Likewise.
13958 (traceframe_info_start_tvar): Likewise.
13959 * xml-syscall.c (syscall_start_syscall): Likewise.
13960 * xml-tdesc.c (tdesc_start_target): Likewise.
13961 (tdesc_start_feature): Likewise.
13962 (tdesc_start_reg): Likewise.
13963 (tdesc_start_union): Likewise.
13964 (tdesc_start_struct): Likewise.
13965 (tdesc_start_flags): Likewise.
13966 (tdesc_start_enum): Likewise.
13967 (tdesc_start_field): Likewise.
13968 (tdesc_start_enum_value): Likewise.
13969 (tdesc_start_vector): Likewise.
13970
13971 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13972
13973 * extension.h (struct xmethod_worker) <clone>: Remove.
13974 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13975 Remove.
13976 (python_xmethod_worker::clone): Remove.
13977 * valops.c (find_overload_match): Use std::move instead of
13978 clone.
13979
13980 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13981
13982 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13983 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13984 <free_xmethod_worker_data>: Remove.
13985 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13986 <get_xmethod_arg_types>: Remove.
13987 <get_xmethod_result_type>: Remove.
13988 <invoke_xmethod>: Remove.
13989 * extension.c (new_xmethod_worker): Remove.
13990 (clone_xmethod_worker): Remove.
13991 (get_matching_xmethod_workers): Return void, pass std::vector by
13992 pointer.
13993 (get_xmethod_arg_types): Rename to...
13994 (xmethod_worker::get_arg_types): ... this, and adjust.
13995 (get_xmethod_result_type): Rename to...
13996 (xmethod_worker::get_result_type): ... this, and adjust.
13997 (invoke_xmethod): Remove.
13998 (free_xmethod_worker): Remove.
13999 (free_xmethod_worker_vec): Remove.
14000 * extension.h (enum ext_lang_rc): Move here from
14001 extension-priv.h.
14002 (struct xmethod_worker): Add constructor and destructor.
14003 <data>: Remove.
14004 <value>: Remove.
14005 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14006 virtual pure methods.
14007 <get_arg_types, get_result_type>: New methods.
14008 (xmethod_worker_ptr): Remove typedef.
14009 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14010 (xmethod_worker_vec): Remove typedef.
14011 (xmethod_worker_up): New typedef.
14012 (invoke_xmethod): Remove.
14013 (clone_xmethod_worker): Remove.
14014 (free_xmethod_worker): Remove.
14015 (free_xmethod_worker_vec): Remove.
14016 (get_xmethod_arg_types): Remove.
14017 (get_xmethod_result_type): Remove.
14018 * valops.c (find_method_list): Use std::vector, don't use
14019 intermediate vector.
14020 (value_find_oload_method_list): Use std::vector.
14021 (find_overload_match): Use std::vector.
14022 (find_oload_champ): Use std::vector.
14023 * value.c (value_free): Use operator delete.
14024 (value_of_xmethod): Rename to...
14025 (value_from_xmethod): ... this. Don't assign
14026 xmethod_worker::value, take rvalue-reference.
14027 (result_type_of_xmethod): Adjust.
14028 (call_xmethod): Adjust.
14029 * value.h: Include extension.h.
14030 (struct xmethod_worker): Don't forward-declare.
14031 (value_of_xmethod): Rename to...
14032 (value_from_xmethod): ... this, take rvalue-reference.
14033 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14034 (struct python_xmethod_worker): ... this, add constructor and
14035 destructor.
14036 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14037 (gdbpy_free_xmethod_worker_data): Rename to...
14038 (python_xmethod_worker::~python_xmethod_worker): ... this and
14039 adjust.
14040 (gdbpy_clone_xmethod_worker_data): Rename to...
14041 (python_xmethod_worker::clone): ... this and adjust.
14042 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14043 temporary vector.
14044 (gdbpy_get_xmethod_arg_types): Rename to...
14045 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14046 (gdbpy_get_xmethod_result_type): Rename to...
14047 (python_xmethod_worker::do_get_result_type): ... this and
14048 adjust.
14049 (gdbpy_invoke_xmethod): Rename to...
14050 (python_xmethod_worker::invoke): ... this and adjust.
14051 (new_python_xmethod_worker): Rename to...
14052 (python_xmethod_worker::python_xmethod_worker): ... this and
14053 adjust.
14054 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14055 Remove.
14056 (gdbpy_free_xmethod_worker_data): Remove.
14057 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14058 (gdbpy_get_xmethod_arg_types): Remove.
14059 (gdbpy_get_xmethod_result_type): Remove.
14060 (gdbpy_invoke_xmethod): Remove.
14061 * python/python.c (python_extension_ops): Remove obsolete
14062 callbacks.
14063
14064 2018-01-05 Pedro Alves <palves@redhat.com>
14065
14066 PR gdb/18653
14067 * common/signals-state-save-restore.c
14068 (save_original_signals_state): New parameter 'quiet'. Warn if we
14069 find a custom handler preinstalled, instead of internal erroring.
14070 But only warn if !quiet.
14071 * common/signals-state-save-restore.h
14072 (save_original_signals_state): New parameter 'quiet'.
14073 * main.c (captured_main_1): Move save_original_signals_state call
14074 after option handling, and pass QUIET.
14075
14076 2018-01-05 Pedro Alves <palves@redhat.com>
14077
14078 * spu-tdep.c (spu_catch_start): Pass
14079 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14080
14081 2018-01-05 Pedro Alves <palves@redhat.com>
14082
14083 PR gdb/22670
14084 * ada-lang.c (literal_symbol_name_matcher): New function.
14085 (ada_get_symbol_name_matcher): Use it for
14086 symbol_name_match_type::SEARCH_NAME.
14087 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14088 it down instead of assuming symbol_name_match_type::FULL.
14089 * block.h (block_lookup_symbol): New parameter 'match_type'.
14090 * c-valprint.c (print_unpacked_pointer): Use
14091 lookup_symbol_search_name instead of lookup_symbol.
14092 * compile/compile-object-load.c (get_out_value_type): Pass down
14093 symbol_name_match_type::SEARCH_NAME.
14094 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14095 symbol_name_match_type::FULL.
14096 * cp-support.c (cp_get_symbol_name_matcher): Handle
14097 symbol_name_match_type::SEARCH_NAME.
14098 * infrun.c (insert_exception_resume_breakpoint): Use
14099 lookup_symbol_search_name.
14100 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14101 * psymtab.c (maintenance_check_psymtabs): Use
14102 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14103 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14104 SYMBOL_SEARCH_NAME.
14105 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14106 if symbol_name_match_type::SEARCH_NAME.
14107 (lookup_symbol_in_language): Pass down
14108 symbol_name_match_type::FULL.
14109 (lookup_symbol_search_name): New.
14110 (lookup_language_this): Pass down
14111 symbol_name_match_type::SEARCH_NAME.
14112 (lookup_symbol_aux, lookup_local_symbol): New parameter
14113 'match_type'. Pass it down.
14114 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14115 (lookup_symbol_search_name): New declaration.
14116 (lookup_symbol_in_block): New 'match_type' parameter.
14117
14118 2018-01-05 Pedro Alves <palves@redhat.com>
14119
14120 PR gdb/22670
14121 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14122 ada_lookup_symbol.
14123 (ada_lookup_symbol): Reimplement in terms of
14124 ada_lookup_symbol_list, bits factored out from
14125 ada_lookup_encoded_symbol.
14126
14127 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14128
14129 * ada-exp.y (write_object_renaming): When subscripting an array
14130 using a symbol as the index, pass the block in call to
14131 ada_lookup_encoded_symbol when looking that symbol up.
14132
14133 2018-01-05 Jerome Guitton <guitton@adacore.com>
14134
14135 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14136 TYPE_INDEX_TYPE.
14137
14138 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14139
14140 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14141 the case where VALUE_LVAL (val0) is not lval_memory.
14142
14143 2018-01-05 Xavier Roirand <roirand@adacore.com>
14144
14145 * ada-valprint.c (print_optional_low_bound): Handle
14146 character-indexed array printing like boolean-indexed array
14147 printing.
14148
14149 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14150
14151 * NEWS: Create a new section for the next release branch.
14152 Rename the section of the current branch, now that it has
14153 been cut.
14154
14155 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14156
14157 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14158 * version.in: Bump version to 8.1.50.DATE-git.
14159
14160 2018-01-03 Xavier Roirand <roirand@adacore.com>
14161
14162 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14163 Add field.
14164 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14165 Add field.
14166 (default_exception_support_info) <catch_handlers_sym>: Add field.
14167 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14168 (ada_exception_name_addr_1): Add "catch handlers" handling.
14169 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14170 Update all callers.
14171 (create_excep_cond_exprs) <ex>: Add parameter.
14172 (re_set_exception): Update create_excep_cond_exprs call.
14173 (print_it_exception, print_one_exception, print_mention_exception)
14174 (print_recreate_exception): Add "catch handler" handling.
14175 (allocate_location_catch_handlers, re_set_catch_handlers)
14176 (check_status_catch_handlers, print_it_catch_handlers)
14177 (print_one_catch_handlers, print_mention_catch_handlers)
14178 (print_recreate_catch_handlers): New function.
14179 (catch_handlers_breakpoint_ops): New variable.
14180 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14181 Add parameter. Add "catch handler" handling.
14182 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14183 Add "catch handler" handling.
14184 (ada_exception_catchpoint_cond_string): Add "catch handler"
14185 handling.
14186 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14187 call.
14188 (catch_ada_handlers_command): New function.
14189 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14190 operations structure.
14191 (_initialize_ada_language): Add "catch handlers" command entry.
14192 * NEWS: Document "catch handlers" feature.
14193
14194 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14195
14196 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14197 account when creating the array type of the slice.
14198 (ada_value_slice): Likewise.
14199
14200 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14201
14202 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14203 New enum value.
14204 (create_array_type_with_stride): Add byte_stride_prop parameter.
14205 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14206 New parameter. Update all callers in this file.
14207 (array_type_has_dynamic_stride): New function.
14208 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14209 of arrays with dynamic byte strides.
14210 * dwarf2read.c (read_array_type): Add support for dynamic
14211 DW_AT_byte_stride attributes.
14212
14213 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14214
14215 * dwarf2read.c (read_unspecified_type): Treat
14216 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14217
14218 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14219
14220 Update copyright year range in all GDB files.
14221
14222 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14223
14224 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14225 and gdb/testsuite/gdb.base/step-line.c.
14226
14227 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14228
14229 * copyright.py (main): Dump the contents of
14230 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14231 even if BY_HAND is empty.
14232
14233 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14234
14235 * top.c (print_gdb_version): Update Copyright year in version
14236 message.
14237
14238 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14239
14240 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14241
14242 For older changes see ChangeLog-2017.
14243 \f
14244 Local Variables:
14245 mode: change-log
14246 left-margin: 8
14247 fill-column: 74
14248 version-control: never
14249 coding: utf-8
14250 End: