ce5f82674836ec01af97472c360f818c3b5bbf07
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-01 Gary Benson <gbenson@redhat.com>
2
3 * common/gdb_proc_service.h: New file, factored out from...
4 * gdb_proc_service.h: Moved common code to the above file.
5 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
6
7 2018-10-01 Gary Benson <gbenson@redhat.com>
8
9 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
10 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
11
12 2018-10-01 Gary Benson <gbenson@redhat.com>
13
14 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
15 (AC_CHECK_HEADERS): Check for linux/elf.h.
16 * configure, config.in: Rebuild.
17 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
18 doesn't define elf_fpregset_t.
19
20 2018-10-01 Gary Benson <gbenson@redhat.com>
21
22 * gdb_proc_service.h: Whitespace change.
23
24 2018-10-01 Tom Tromey <tom@tromey.com>
25
26 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
27 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
28 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
29
30 2018-10-01 Tom Tromey <tom@tromey.com>
31
32 * README: Minor change.
33
34 2018-09-30 Pedro Alves <palves@redhat.com>
35
36 * darwin-nat-info.c (darwin_debug_regions_recurse)
37 (info_mach_exceptions_command): Remove unused local variables.
38 * darwin-nat.c (darwin_decode_notify_message)
39 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
40 (darwin_stop_inferior, darwin_setup_exceptions)
41 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
42 (darwin_nat_target::attach, darwin_nat_target::detach)
43 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
44 local variables.
45 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
46 variables.
47
48 2018-09-29 Tom Tromey <tom@tromey.com>
49
50 * README: Remove some leftover text.
51
52 2018-09-29 Tom Tromey <tom@tromey.com>
53
54 * PROBLEMS: Rewrite.
55 * README: Update.
56
57 2018-09-28 John Baldwin <jhb@FreeBSD.org>
58
59 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
60 case with explicit breakpoint kind.
61 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
62 'additional_info' and related logic.
63 (riscv_debug_breakpoints): New variable.
64 (riscv_breakpoint_kind_from_pc): Use the length of the existing
65 instruction to determine the breakpoint kind.
66 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
67 flag. Update description of 'set/show riscv
68 use-compressed-breakpoints' flag.
69
70 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
71
72 (NEWS): Mention changes to frame related commands.
73 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
74 (add_prefix_cmd_suppress_notification): New function.
75 (add_com_suppress_notification): Call
76 add_cmd_suppress_notification.
77 * command.h (add_cmd_suppress_notification): Declare.
78 (add_prefix_cmd_suppress_notification): Declare.
79 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
80 (parse_frame_specification): Moved from stack.c, with
81 simplification to handle a single argument.
82 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
83 switch to the selected frame. Add a header comment.
84 * stack.c: Remove 'safe-ctype.h' include.
85 (find_frame_for_function): Add declaration.
86 (find_frame_for_address): New function.
87 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
88 (frame_selection_by_function_completer): New function.
89 (info_frame_command): Rename to...
90 (info_frame_command_core): ...this, and update parameter types.
91 (select_frame_command): Rename to...
92 (select_frame_command_core): ...this, and update parameter types.
93 (frame_command): Rename to...
94 (frame_command_core): ...this, and update parameter types.
95 (class frame_command_helper): New class to wrap implementations of
96 frame related sub-commands.
97 (frame_apply_cmd_list): New static global.
98 (frame_cmd_list): Make static.
99 (select_frame_cmd_list): New global for sub-commands.
100 (info_frame_cmd_list): New global for sub-commands.
101 (_initialize_stack): Register sub-commands for 'frame',
102 'select-frame', and 'info frame'. Update 'frame apply' commands
103 to use frame_apply_cmd_list. Move function local static
104 frame_apply_list to file static frame_apply_cmd_list for
105 consistency.
106 * stack.h (select_frame_command): Delete declarationn.
107 (select_frame_for_mi): Declare new function.
108
109 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
110
111 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
112 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
113 and NOP.
114
115 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
116
117 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
118
119 2018-09-26 Tom Tromey <tom@tromey.com>
120
121 * valops.c (auto_abandon): Remove dead code.
122
123 2018-09-26 Tom Tromey <tom@tromey.com>
124
125 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
126
127 2018-09-24 Tom Tromey <tom@tromey.com>
128
129 * common/pathstuff.c (get_standard_cache_dir): Make
130 "xdg_cache_home" and "home" const.
131 * top.c (init_history): Make "tmpenv" const.
132 * main.c (get_init_files): Make "homedir" const.
133
134 2018-09-23 Tom Tromey <tom@tromey.com>
135
136 PR python/18852:
137 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
138
139 2018-09-23 Tom Tromey <tom@tromey.com>
140
141 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
142 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
143 * python/python-internal.h (gdbpy_handle_exception): Declare.
144 * python/py-utils.c (gdbpy_handle_exception): New function.
145
146 2018-09-23 Tom Tromey <tom@tromey.com>
147
148 PR python/17284:
149 * python/py-type.c (typy_template_argument): Check for negative
150 argument number.
151
152 2018-09-23 Tom Tromey <tom@tromey.com>
153
154 PR python/14062:
155 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
156
157 2018-09-23 Tom Tromey <tom@tromey.com>
158
159 PR python/18170:
160 * python/py-value.c (valpy_int): Allow conversion from pointer
161 type.
162
163 2018-09-23 Tom Tromey <tom@tromey.com>
164
165 PR python/20126:
166 * python/py-value.c (valpy_int): Respect type sign.
167
168 2018-09-23 Tom Tromey <tom@tromey.com>
169
170 PR python/18352;
171 * python/py-value.c (valpy_float): Allow conversions from int or
172 char.
173 (valpy_int, valpy_long): Allow conversions from float.
174
175 2018-09-23 Tom Tromey <tom@tromey.com>
176
177 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
178 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
179
180 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
181
182 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
183 __sighndlr.
184 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
185
186 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
187
188 * windows-nat.c (windows_nat_target::wait): Remove a spurious
189 target_terminal::ours().
190
191 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
192
193 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
194 of vl to ULONGEST.
195
196 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
197
198 * breakpoint.c (update_inserted_breakpoint_locations): Remove
199 redundant condition.
200
201 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
202
203 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
204
205 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
206 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
207 * sol-thread.c (ps_pdmodel): Don't guard definition.
208
209 * procfs.c: Fix formatting.
210
211 * procfs.c (sysset_t_alloc): Remove.
212 (create_procinfo): Use XNEW instead of sysset_t_alloc.
213 (procfs_debug_inferior): Likewise.
214 (procfs_set_exec_trap): Likewise.
215 (proc_set_traced_sysentry): Don't allocate argp dynamically.
216 (proc_set_traced_sysexit): Likewise.
217
218 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
219 (dead_procinfo): Likewise.
220 (proc_warn): Likewise.
221 (proc_error): Likewise.
222 (proc_get_LDT_entry): Likewise.
223 (do_attach): Likewise.
224 (procfs_target::pid_to_str): Likewise.
225 (iterate_over_mappings): Likewise.
226
227 * procfs.c (create_procinfo): Fix ARI warning.
228 (proc_get_status): Likewise.
229 (proc_stop_process): Likewise.
230 (proc_run_process): Likewise.
231 (proc_kill): Likewise.
232 (proc_get_LDT_entry): Likewise.
233 (procfs_find_LDT_entry): Likewise.
234 (proc_update_threads): Likewise.
235 (proc_iterate_over_threads): Likewise.
236 (do_attach): Likewise.
237 (procfs_xfer_memory): Likewise.
238 (invalidate_cache): Likewise.
239 (procfs_target::resume): Likewise.
240 (procfs_init_inferior): Likewise.
241 (procfs_set_exec_trap): Likewise.
242 (procfs_target::thread_alive): Likewise.
243 (procfs_target::pid_to_exec_file): Likewise.
244 (iterate_over_mappings): Likewise.
245 (procfs_target::make_corefile_notes): Likewise.
246 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
247
248 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
249 (procfs_find_LDT_entry): Likewise.
250 * sol-thread.c (ps_lgetLDT): Likewise.
251
252 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
253
254 PR tdep/17903
255 * procfs.c (procfs_target): Declare pid_to_exec_file.
256 (procfs_target::pid_to_exec_file): New.
257
258 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
259
260 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
261 renaming.
262 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
263 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
264
265 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
266
267 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
268 (supply_fpregset, fill_fpregset): Move ...
269 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
270 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
271 Remove references to ioctl-based procfs.
272 Include <sys/reg.h>.
273 Remove PR_MODEL_NATIVE guards.
274 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
275 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
276
277 2018-09-19 Xavier Roirand <roirand@adacore.com>
278
279 PR gdb/20981:
280 * solib-darwin.c (darwin_get_dyld_bfd): New function.
281 (darwin_solib_get_all_image_info_addr_at_init): Update call.
282 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
283
284 2018-09-19 John Baldwin <jhb@FreeBSD.org>
285
286 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
287 (fbsd_print_sockaddr_in6): Likewise.
288
289 2018-09-19 Richard Bunt <richard.bunt@arm.com>
290 Chris January <chris.january@arm.com>
291
292 * eval.c (skip_undetermined_arglist): Skip argument list helper.
293 (evaluate_subexp_standard): Return a dummy type when
294 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
295 OP_F77_UNDETERMINED_ARGLIST case.
296 * expression.h (enum noside): Update comment.
297
298 2018-09-19 George Vasick <george.vasick@oracle.com>
299
300 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
301
302 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
303 April Chin <april.chin@oracle.com>
304 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
305
306 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
307 uint_t lwpid_t.
308 (create_procinfo): Print pids in /proc without leading zeros.
309
310 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
311
312 * nios2-tdep.c (nios2_gcc_target_options): New.
313 (nios2_gdb_arch_init): Install new hook.
314
315 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
316
317 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
318 New file.
319 * update-gnulib.sh: Apply patch.
320 * configure: Re-generate.
321
322 2018-09-18 John Baldwin <jhb@FreeBSD.org>
323
324 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
325 description. Make "info proc" command descriptions more
326 consistent.
327
328 2018-09-18 John Baldwin <jhb@FreeBSD.org>
329
330 * NEWS: Mention 'info proc files' command.
331
332 2018-09-18 John Baldwin <jhb@FreeBSD.org>
333
334 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
335 descriptors for IP_FILES and IP_ALL.
336
337 2018-09-18 John Baldwin <jhb@FreeBSD.org>
338
339 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
340 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
341 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
342 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
343 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
344 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
345 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
346 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
347 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
348 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
349 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
350 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
351 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
352 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
353 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
354 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
355 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
356 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
357 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
358 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
359 (struct fbsd_sockaddr_un): New types.
360 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
361 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
362 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
363 (fbsd_core_info_proc_files): New functions.
364 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
365 IP_ALL.
366 * fbsd-tdep.h (fbsd_info_proc_files_header)
367 (fbsd_info_proc_files_entry): New.
368
369 2018-09-18 John Baldwin <jhb@FreeBSD.org>
370
371 * defs.h (enum info_proc_what) [IP_FILES]: New value.
372 * infcmd.c (info_proc_cmd_files): New function.
373 (_initialize_infcmd): Register 'info proc files' command.
374
375 2018-09-18 John Baldwin <jhb@FreeBSD.org>
376
377 * gnulib/aclocal-m4-deps.mk: Re-generate.
378 * gnulib/aclocal.m4: Re-generate.
379 * gnulib/config.in: Re-generate.
380 * gnulib/configure: Re-generate.
381 * gnulib/import/Makefile.am: Re-generate.
382 * gnulib/import/Makefile.in: Re-generate.
383 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
384 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
385 * gnulib/import/arpa_inet.in.h: New file.
386 * gnulib/import/inet_ntop.c: New file.
387 * gnulib/import/m4/arpa_inet_h.m4: New file.
388 * gnulib/import/m4/inet_ntop.m4: New file.
389 * gnulib/import/m4/netinet_in_h.m4: New file.
390 * gnulib/import/m4/socklen.m4: New file.
391 * gnulib/import/m4/sockpfaf.m4: New file.
392 * gnulib/import/m4/stdalign.m4: New file.
393 * gnulib/import/m4/sys_uio_h.m4: New file.
394 * gnulib/import/netinet_in.in.h: New file.
395 * gnulib/import/stdalign.in.h: New file.
396 * gnulib/import/sys_socket.c: New file.
397 * gnulib/import/sys_socket.in.h: New file.
398 * gnulib/import/sys_uio.in.h: New file.
399 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
400 module.
401
402 2018-09-18 John Baldwin <jhb@FreeBSD.org>
403
404 * gnulib/aclocal-m4-deps.mk: New file.
405 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
406 deterministically.
407
408 2018-09-18 John Baldwin <jhb@FreeBSD.org>
409
410 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
411 KVE_PATH.
412
413 2018-09-18 Tom Tromey <tom@tromey.com>
414
415 * compile/compile-object-load.c (struct
416 link_hash_table_cleanup_data): Add constructor and destructor.
417 Use DISABLE_COPY_AND_ASSIGN.
418 (~link_hash_table_cleanup_data): Rename from
419 link_hash_table_free. Now a destructor.
420 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
421
422 2018-09-18 Tom Tromey <tom@tromey.com>
423
424 * compile/compile-object-run.c (do_module_cleanup): Use delete.
425 * compile/compile-object-load.c (struct munmap_list): Move to
426 header file.
427 (munmap_list::add): Rename from munmap_list_add; rewrite.
428 (munmap_list::~munmap_list): Rename from munmap_list_free.
429 (munmap_listp_free_cleanup): Remove.
430 (compile_object_load): Update.
431 * compile/compile-object-load.h (struct munmap_list): Move from
432 compile-object-load.c. Rewrite.
433
434 2018-09-18 Alan Hayward <alan.hayward@arm.com>
435
436 * aarch64-tdep.c (pass_in_v): Use register size.
437 (aarch64_extract_return_value): Likewise.
438 (aarch64_store_return_value): Likewise.
439
440 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
441
442 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
443 rlim_t.
444
445 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
446
447 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
448 Fix short help line.
449
450 2018-09-17 Tom Tromey <tom@tromey.com>
451
452 PR python/20445:
453 * configure: Rebuild.
454 * configure.ac: Conditionally use -DNDEBUG for Python.
455
456 2018-09-17 Tom Tromey <tom@tromey.com>
457
458 * configure: Rebuild.
459 * configure.ac: Use gmp as a library dependency when checking for
460 mpfr.
461
462 2018-09-17 Pedro Alves <palves@redhat.com>
463
464 * python/py-inferior.c (find_inferior_object): Delete.
465
466 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
467
468 * compile/compile-cplus-types.c
469 (compile_cplus_instance::enter_scope): Don't use new_scope after
470 std::move.
471
472 2018-09-17 Tom Tromey <tom@tromey.com>
473
474 * common/pathstuff.c (get_standard_cache_dir): Use
475 ~/Library/Caches on macOS.
476 * common/pathstuff.h (get_standard_cache_dir): Update comment.
477
478 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
479
480 PR python/23669
481 * breakpoint.c (commands_cmd_element): New.
482 (_initialize_breakpoint): Assign commands_cmd_element.
483 * breakpoint.h (commands_cmd_element): New.
484 * cli/cli-script.c (while_cmd_element, if_command,
485 define_cmd_element): New.
486 (command_name_equals): Remove.
487 (process_next_line): Compare commands by pointer, not by name.
488 (_initialize_cli_script): Assign the various cmd_list_element
489 variables.
490 * compile/compile.c (compile_cmd_element): New.
491 (_initialize_compile): Assign compile_cmd_element.
492 * compile/compile.h (compile_cmd_element): New.
493 * guile/guile.c (guile_cmd_element): New.
494 (install_gdb_commands): Assign guile_cmd_element.
495 * guile/guile.h (guile_cmd_element): New.
496 * python/python.c (python_cmd_element): New.
497 (_initialize_python): Assign python_cmd_element.
498 * python/python.h (python_cmd_element): New.
499 * tracepoint.c (while_stepping_cmd_element): New.
500 (_initialize_tracepoint): Assign while_stepping_cmd_element.
501 * tracepoint.h (while_stepping_cmd_element): New.
502
503 2018-09-17 Tom Tromey <tom@tromey.com>
504
505 * infrun.c (save_infcall_suspend_state): Return
506 infcall_suspend_state_up.
507 (save_infcall_control_state): Return infcall_control_state_up.
508 * inferior.h (save_infcall_suspend_state)
509 (save_infcall_control_state): Declare later. Return unique
510 pointers.
511
512 2018-09-17 Tom Tromey <tom@tromey.com>
513
514 * infrun.c (struct stop_context): Declare constructor,
515 destructor, "changed" method.
516 (stop_context::stop_context): Rename from save_stop_context.
517 (stop_context::~stop_context): Rename from
518 release_stop_context_cleanup.
519 (normal_stop): Update.
520 (stop_context::changed): Rename from stop_context_changed. Return
521 bool.
522
523 2018-09-17 Tom Tromey <tom@tromey.com>
524
525 * inferior.h (struct infcall_suspend_state_deleter): New.
526 (infcall_suspend_state_up): New typedef.
527 (struct infcall_control_state_deleter): New.
528 (infcall_control_state_up): New typedef.
529 (make_cleanup_restore_infcall_suspend_state)
530 (make_cleanup_restore_infcall_control_state): Don't declare.
531 * infcall.c (call_function_by_hand_dummy): Update.
532 * infrun.c (do_restore_infcall_suspend_state_cleanup)
533 (make_cleanup_restore_infcall_suspend_state): Remove.
534 (do_restore_infcall_control_state_cleanup)
535 (make_cleanup_restore_infcall_control_state): Remove.
536
537 2018-09-17 Tom Tromey <tom@tromey.com>
538
539 * gdbthread.h (struct thread_control_state): Add initializer.
540 (class thread_info) <control>: Remove initializer.
541 * inferior.h (struct inferior_control_state): Add initializer.
542 (class inferior) <control>: Remove initializer.
543 (exit_inferior_1): Update.
544 * infrun.c (struct infcall_control_state): Add constructors.
545 (save_infcall_control_state): Use new.
546 (restore_infcall_control_state, discard_infcall_control_state):
547 Use delete.
548
549 2018-09-17 Tom Tromey <tom@tromey.com>
550
551 * infrun.c (struct infcall_suspend_state) <registers>: Now a
552 unique_ptr.
553 <siginfo_data>: Now a unique_xmalloc_ptr.
554 (save_infcall_suspend_state, restore_infcall_suspend_state)
555 (discard_infcall_suspend_state)
556 (get_infcall_suspend_state_regcache): Update.
557
558 2018-09-17 Tom Tromey <tom@tromey.com>
559
560 * gdbthread.h (struct thread_suspend_state): Add initializers.
561 (class thread_info) <suspend>: Remove initializer.
562 * infrun.c (struct infcall_suspend_state): Add initializers.
563 (save_infcall_suspend_state): Use new.
564 (discard_infcall_suspend_state): Use delete.
565
566 2018-09-16 Tom Tromey <tom@tromey.com>
567
568 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
569 Remove.
570 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
571 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
572 (py_varobj_iter_new): Likewise.
573 (py_varobj_get_iterator): Use gdbpy_ref.
574
575 2018-09-16 Tom Tromey <tom@tromey.com>
576
577 * python/py-threadevent.c (py_get_event_thread): Simplify.
578 * python/py-inferior.c (infpy_thread_from_thread_handle):
579 Return immediately after calling thread_to_thread_object. Use
580 Py_RETURN_NONE.
581 (thread_to_thread_object): Set the exception on a NULL return.
582
583 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
584
585 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
586
587 2018-09-16 Tom Tromey <tom@tromey.com>
588
589 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
590 Remove.
591
592 2018-09-16 Tom Tromey <tom@tromey.com>
593
594 * python/python-internal.h (thread_to_thread_object): Change
595 return type.
596 * python/py-inferior.c (thread_to_thread_object): Return a new
597 reference.
598 (infpy_thread_from_thread_handle): Update.
599 * python/py-infthread.c (gdbpy_selected_thread): Update.
600 * python/py-stopevent.c (create_stop_event_object): Update.
601 * python/py-threadevent.c (py_get_event_thread): Return a new
602 reference.
603 (py_get_event_thread): Update.
604 * python/py-event.h (py_get_event_thread): Change return type.
605 * python/py-continueevent.c (create_continue_event_object):
606 Update.
607
608 2018-09-16 Tom Tromey <tom@tromey.com>
609
610 * python/py-progspace.c (pspy_get_objfiles): Update.
611 * python/python-internal.h (objfile_to_objfile_object): Change
612 return type.
613 * python/py-newobjfileevent.c (create_new_objfile_event_object):
614 Update.
615 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
616 Update.
617 * python/python.c (gdbpy_get_current_objfile): Update.
618 (gdbpy_objfiles): Update.
619 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
620 Update.
621 (objfile_to_objfile_object): Return a new reference.
622 * python/py-symtab.c (stpy_get_objfile): Update.
623 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
624 Update.
625
626 2018-09-16 Tom Tromey <tom@tromey.com>
627
628 * python/py-inferior.c (infpy_get_progspace): Update.
629 * python/python-internal.h (pspace_to_pspace_object): Change
630 return type.
631 * python/py-newobjfileevent.c
632 (create_clear_objfiles_event_object): Update.
633 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
634 Update.
635 * python/python.c (gdbpy_get_current_progspace): Update.
636 (gdbpy_progspaces): Update.
637 * python/py-progspace.c (pspace_to_pspace_object): Return a new
638 reference.
639 * python/py-objfile.c (objfpy_get_progspace): Update.
640 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
641 Update.
642
643 2018-09-16 Tom Tromey <tom@tromey.com>
644
645 * python/lib/gdb/__init__.py (current_progspace, objfiles)
646 (solib_name, block_for_pc, find_pc_line): New functions.
647 (execute_unwinders): Update.
648 * python/py-block.c (gdbpy_block_for_pc): Remove.
649 * python/py-inferior.c (infpy_get_progspace): New function.
650 (inferior_object_getset) <progspace>: Add.
651 * python/py-progspace.c (pspy_objfiles): Rewrite.
652 (pspy_solib_name, pspy_block_for_pc)
653 (pspy_find_pc_line, pspy_is_valid): New functions.
654 (progspace_object_methods): Add entries for solib_name,
655 block_for_pc, find_pc_line, is_valid.
656 * python/python-internal.h (gdbpy_block_for_pc)
657 (build_objfiles_list): Don't declare.
658 * python/python.c: Don't include solib.h.
659 (gdbpy_solib_name, gdbpy_find_pc_line)
660 (gdbpy_get_current_progspace, build_objfiles_list)
661 (gdbpy_objfiles): Remove.
662 (GdbMethods) <current_progspace, objfiles, block_for_pc,
663 solib_name, find_pc_line>: Remove entries.
664
665 2018-09-16 Tom Tromey <tom@tromey.com>
666
667 * top.c (new_ui_command): Use GNU style for metasyntactic
668 variables.
669 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
670 variables.
671 * maint.c (maintenance_translate_address): Remove "<>" around
672 text.
673 * interps.c (interpreter_exec_cmd): Use GNU style for
674 metasyntactic variables.
675 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
676 metasyntactic variables.
677 * tracepoint.c (tfind_range_command): Use GNU style for
678 metasyntactic variables.
679 (tfind_outside_command): Likewise.
680 (_initialize_tracepoint): Likewise.
681 * remote.c (extended_remote_target::create_inferior): Use GNU
682 style for metasyntactic variables.
683 * sparc64-tdep.c (adi_examine_command): Use GNU style for
684 metasyntactic variables.
685 (adi_assign_command): Likewise.
686
687 2018-09-16 Tom Tromey <tom@tromey.com>
688
689 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
690 metasyntactic variables. Print message if no disassembler options
691 are available.
692
693 2018-09-15 Tom Tromey <tom@tromey.com>
694
695 * infcmd.c (get_inferior_args): Return const char *.
696 * inferior.h (get_inferior_args): Return type now const.
697 * linux-tdep.c (linux_fill_prpsinfo): Update.
698 * procfs.c (procfs_target::make_corefile_notes): Update.
699
700 2018-09-07 Tom Tromey <tom@tromey.com>
701
702 * python/python.c (execute_gdb_command): Call bpstat_do_actions
703 inside the TRY.
704
705 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
706
707 * nios2-tdep.c (nios2_type_align): New.
708 (nios2_gdb_arch_init): Install type_align hook.
709
710 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
711
712 * eval.c (fake_method::fake_method): Call xzalloc directly for a
713 type that is neither object file owned, nor gdbarch owned.
714 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
715 gdbarch is non-NULL.
716 (alloc_type_instance): Allocate non-objfile owned types on the
717 gdbarch obstack.
718 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
719 using TYPE_ALLOC to ensure memory is allocated on the correct
720 obstack.
721 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
722 obstack, or the gdbarch obstack.
723 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
724
725 2018-09-14 Tom Tromey <tom@tromey.com>
726
727 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
728 block.
729
730 2018-09-14 Tom Tromey <tom@tromey.com>
731
732 * nat/fork-inferior.c (get_startup_shell): Remove "static".
733
734 2018-09-13 Tom Tromey <tom@tromey.com>
735
736 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
737 static.
738
739 2018-09-13 Tom Tromey <tom@tromey.com>
740
741 * exec.c (try_open_exec_file): Use std::string.
742
743 2018-09-13 Tom Tromey <tom@tromey.com>
744
745 * utils.h (gdb_bfd_errmsg): Return std::string.
746 * exec.c (exec_file_attach): Update.
747 * compile/compile-object-load.c (compile_object_load): Update.
748 * utils.c (gdb_bfd_errmsg): Return std::string.
749
750 2018-09-13 Tom Tromey <tom@tromey.com>
751
752 * procfs.c (struct procinfo_deleter): New.
753 (procinfo_up): New typedef.
754 (do_destroy_procinfo_cleanup): Remove.
755 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
756
757 2018-09-13 Tom Tromey <tom@tromey.com>
758
759 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
760
761 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
762 2018-09-13 Tom Tromey <tom@tromey.com>
763
764 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
765 (pspy_get_objfiles): New function.
766 (progspace_object_methods): New.
767 (pspace_object_type): Add tp_methods callback.
768 * python/python-internal.h (build_objfiles_list): New
769 declaration.
770 * python/python.c (build_objfiles_list): New function.
771 (gdbpy_objfiles): Implement using build_objfiles_list.
772 * NEWS: Mention the Progspace.objfiles method.
773
774 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
775
776 * python/py-inferior.c (infpy_get_progspace): New function.
777 (inferior_object_getset): Add progspace property.
778 * NEWS: Mention the new property.
779
780 2018-09-13 Tom Tromey <tom@tromey.com>
781
782 PR rust/23650:
783 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
784
785 2018-09-13 Tom Tromey <tom@tromey.com>
786
787 PR rust/23626:
788 * rust-lang.c (rust_enum_variant): Now static.
789 (rust_empty_enum_p): New function.
790 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
791 Handle empty enum.
792
793 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
794
795 * python/py-inferior.c (infpy_repr): New.
796 (inferior_object_type): Register infpy_repr.
797 * python/py-objfile.c (objfpy_repr): New.
798 (objfile_object_type): Register objfpy_repr.
799
800 2018-09-12 John Baldwin <jhb@FreeBSD.org>
801
802 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
803
804 2018-09-12 John Baldwin <jhb@FreeBSD.org>
805
806 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
807 typo.
808
809 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
810
811 * common/common-utils.c: Don't include '<sys/stat.h>'.
812 (is_regular_file): Move to...
813 * common/filestuff.c (is_regular_file): ... here.
814 * common/common-utils.h (is_regular_file): Move to...
815 * common/filestuff.h (is_regular_file): ... here.
816
817 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
818
819 * skip.c (debug_skip): New variable.
820 (skiplist_entry::do_skip_file_p): Add debug output.
821 (skiplist_entry::do_skip_gfile_p): Likewise.
822 (skiplist_entry::skip_function_p): Likewise.
823 (_initialize_step_skip): Create debug command.
824 * NEWS: Mention set/show debug skip.
825
826 2018-09-11 Xavier Roirand <roirand@adacore.com>
827
828 * darwin-nat.c (should_disable_startup_with_shell):
829 New function.
830 (darwin_nat_target::create_inferior): Add call.
831
832 2018-09-11 Xavier Roirand <roirand@adacore.com>
833
834 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
835 inf_port, msg_state>: Initialize.
836 (struct darwin_thread_info) <signaled, single_step>: Change
837 type and initialize.
838 (struct darwin_thread_info) <event>: Initialize.
839
840 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
841
842 PR gdb/23555
843 PR gdb/23558
844 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
845 guesses.
846
847 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
848
849 Revert:
850 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
851
852 PR gdb/23555
853 PR gdb/23558
854 * gnulib/aclocal.m4: Regenerate.
855 * gnulib/config.in: Regenerate.
856 * gnulib/configure: Regenerate.
857 * gnulib/import/Makefile.am: Update.
858 * gnulib/import/Makefile.in: Update.
859 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
860 * gnulib/import/_Noreturn.h: ... this.
861 * gnulib/import/alloca.in.h: Update.
862 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
863 * gnulib/import/arg-nonnull.h: ... this.
864 * gnulib/import/assure.h: Update.
865 * gnulib/import/at-func.c: Update.
866 * gnulib/import/basename-lgpl.c: Update.
867 * gnulib/import/extra/snippet/c++defs.h: Rename to...
868 * gnulib/import/c++defs.h: ... this.
869 * gnulib/import/canonicalize-lgpl.c: Update.
870 * gnulib/import/cdefs.h: Update.
871 * gnulib/import/chdir-long.c: Update.
872 * gnulib/import/chdir-long.h: Update.
873 * gnulib/import/cloexec.c: Update.
874 * gnulib/import/cloexec.h: Update.
875 * gnulib/import/close.c: Update.
876 * gnulib/import/closedir.c: Update.
877 * gnulib/import/config.charset: Update.
878 * gnulib/import/dirent-private.h: Update.
879 * gnulib/import/dirent.in.h: Update.
880 * gnulib/import/dirfd.c: Update.
881 * gnulib/import/dirname-lgpl.c: Update.
882 * gnulib/import/dirname.h: Update.
883 * gnulib/import/dosname.h: Update.
884 * gnulib/import/dup-safer-flag.c: Update.
885 * gnulib/import/dup-safer.c: Update.
886 * gnulib/import/dup.c: Update.
887 * gnulib/import/dup2.c: Update.
888 * gnulib/import/errno.in.h: Update.
889 * gnulib/import/error.c: Update.
890 * gnulib/import/error.h: Update.
891 * gnulib/import/exitfail.c: Update.
892 * gnulib/import/exitfail.h: Update.
893 * gnulib/import/extra/update-copyright: Update.
894 * gnulib/import/fchdir.c: Update.
895 * gnulib/import/fcntl.c: Update.
896 * gnulib/import/fcntl.in.h: Update.
897 * gnulib/import/fd-hook.c: Update.
898 * gnulib/import/fd-hook.h: Update.
899 * gnulib/import/fd-safer-flag.c: Update.
900 * gnulib/import/fd-safer.c: Update.
901 * gnulib/import/fdopendir.c: Update.
902 * gnulib/import/filename.h: Update.
903 * gnulib/import/filenamecat-lgpl.c: Update.
904 * gnulib/import/filenamecat.h: Update.
905 * gnulib/import/flexmember.h: Update.
906 * gnulib/import/float+.h: Update.
907 * gnulib/import/float.c: Update.
908 * gnulib/import/float.in.h: Update.
909 * gnulib/import/fnmatch.c: Update.
910 * gnulib/import/fnmatch.in.h: Update.
911 * gnulib/import/fnmatch_loop.c: Update.
912 * gnulib/import/fpucw.h: Update.
913 * gnulib/import/frexp.c: Update.
914 * gnulib/import/frexpl.c: Update.
915 * gnulib/import/fstat.c: Update.
916 * gnulib/import/fstatat.c: Update.
917 * gnulib/import/getcwd-lgpl.c: Update.
918 * gnulib/import/getcwd.c: Update.
919 * gnulib/import/getdtablesize.c: Update.
920 * gnulib/import/getlogin_r.c: Update.
921 * gnulib/import/getprogname.c: Update.
922 * gnulib/import/getprogname.h: Update.
923 * gnulib/import/gettext.h: Update.
924 * gnulib/import/gettimeofday.c: Update.
925 * gnulib/import/glob-libc.h: Update.
926 * gnulib/import/glob.c: Update.
927 * gnulib/import/glob.in.h: Update.
928 * gnulib/import/glob_internal.h: Update.
929 * gnulib/import/glob_pattern_p.c: Update.
930 * gnulib/import/globfree.c: Update.
931 * gnulib/import/hard-locale.c: Update.
932 * gnulib/import/hard-locale.h: Update.
933 * gnulib/import/intprops.h: Update.
934 * gnulib/import/inttypes.in.h: Update.
935 * gnulib/import/isnan.c: Update.
936 * gnulib/import/isnand-nolibm.h: Update.
937 * gnulib/import/isnand.c: Update.
938 * gnulib/import/isnanl-nolibm.h: Update.
939 * gnulib/import/isnanl.c: Update.
940 * gnulib/import/itold.c: Update.
941 * gnulib/import/libc-config.h: Update.
942 * gnulib/import/limits.in.h: Update.
943 * gnulib/import/localcharset.c: Update.
944 * gnulib/import/localcharset.h: Update.
945 * gnulib/import/localtime-buffer.c: Update.
946 * gnulib/import/localtime-buffer.h: Update.
947 * gnulib/import/lstat.c: Update.
948 * gnulib/import/m4/00gnulib.m4: Update.
949 * gnulib/import/m4/__inline.m4: Update.
950 * gnulib/import/m4/absolute-header.m4: Update.
951 * gnulib/import/m4/alloca.m4: Update.
952 * gnulib/import/m4/builtin-expect.m4: Update.
953 * gnulib/import/m4/canonicalize.m4: Update.
954 * gnulib/import/m4/chdir-long.m4: Update.
955 * gnulib/import/m4/close.m4: Update.
956 * gnulib/import/m4/closedir.m4: Update.
957 * gnulib/import/m4/configmake.m4: Update.
958 * gnulib/import/m4/d-ino.m4: Update.
959 * gnulib/import/m4/d-type.m4: Update.
960 * gnulib/import/m4/dirent_h.m4: Update.
961 * gnulib/import/m4/dirfd.m4: Update.
962 * gnulib/import/m4/dirname.m4: Update.
963 * gnulib/import/m4/double-slash-root.m4: Update.
964 * gnulib/import/m4/dup.m4: Update.
965 * gnulib/import/m4/dup2.m4: Update.
966 * gnulib/import/m4/eealloc.m4: Update.
967 * gnulib/import/m4/environ.m4: Update.
968 * gnulib/import/m4/errno_h.m4: Update.
969 * gnulib/import/m4/error.m4: Update.
970 * gnulib/import/m4/exponentd.m4: Update.
971 * gnulib/import/m4/exponentl.m4: Update.
972 * gnulib/import/m4/extensions.m4: Update.
973 * gnulib/import/m4/extern-inline.m4: Update.
974 * gnulib/import/m4/fchdir.m4: Update.
975 * gnulib/import/m4/fcntl-o.m4: Update.
976 * gnulib/import/m4/fcntl.m4: Update.
977 * gnulib/import/m4/fcntl_h.m4: Update.
978 * gnulib/import/m4/fdopendir.m4: Update.
979 * gnulib/import/m4/filenamecat.m4: Update.
980 * gnulib/import/m4/flexmember.m4: Update.
981 * gnulib/import/m4/float_h.m4: Update.
982 * gnulib/import/m4/fnmatch.m4: Update.
983 * gnulib/import/m4/fnmatch_h.m4: Update.
984 * gnulib/import/m4/fpieee.m4: Update.
985 * gnulib/import/m4/frexp.m4: Update.
986 * gnulib/import/m4/frexpl.m4: Update.
987 * gnulib/import/m4/fstat.m4: Update.
988 * gnulib/import/m4/fstatat.m4: Update.
989 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
990 * gnulib/import/m4/getcwd-path-max.m4: Update.
991 * gnulib/import/m4/getcwd.m4: Update.
992 * gnulib/import/m4/getdtablesize.m4: Update.
993 * gnulib/import/m4/getlogin.m4: Update.
994 * gnulib/import/m4/getlogin_r.m4: Update.
995 * gnulib/import/m4/getpagesize.m4: Update.
996 * gnulib/import/m4/getprogname.m4: Update.
997 * gnulib/import/m4/gettimeofday.m4: Update.
998 * gnulib/import/m4/glibc21.m4: Update.
999 * gnulib/import/m4/glob.m4: Update.
1000 * gnulib/import/m4/glob_h.m4: Update.
1001 * gnulib/import/m4/gnulib-cache.m4: Update.
1002 * gnulib/import/m4/gnulib-common.m4: Update.
1003 * gnulib/import/m4/gnulib-comp.m4: Update.
1004 * gnulib/import/m4/gnulib-tool.m4: Update.
1005 * gnulib/import/m4/hard-locale.m4: Update.
1006 * gnulib/import/m4/include_next.m4: Update.
1007 * gnulib/import/m4/inttypes-pri.m4: Update.
1008 * gnulib/import/m4/inttypes.m4: Update.
1009 * gnulib/import/m4/isnand.m4: Update.
1010 * gnulib/import/m4/isnanl.m4: Update.
1011 * gnulib/import/m4/largefile.m4: Update.
1012 * gnulib/import/m4/limits-h.m4: Update.
1013 * gnulib/import/m4/localcharset.m4: Update.
1014 * gnulib/import/m4/locale-fr.m4: Update.
1015 * gnulib/import/m4/locale-ja.m4: Update.
1016 * gnulib/import/m4/locale-zh.m4: Update.
1017 * gnulib/import/m4/localtime-buffer.m4: Update.
1018 * gnulib/import/m4/longlong.m4: Update.
1019 * gnulib/import/m4/lstat.m4: Update.
1020 * gnulib/import/m4/malloc.m4: Update.
1021 * gnulib/import/m4/malloca.m4: Update.
1022 * gnulib/import/m4/math_h.m4: Update.
1023 * gnulib/import/m4/mbrtowc.m4: Update.
1024 * gnulib/import/m4/mbsinit.m4: Update.
1025 * gnulib/import/m4/mbsrtowcs.m4: Update.
1026 * gnulib/import/m4/mbstate_t.m4: Update.
1027 * gnulib/import/m4/memchr.m4: Update.
1028 * gnulib/import/m4/memmem.m4: Update.
1029 * gnulib/import/m4/mempcpy.m4: Update.
1030 * gnulib/import/m4/memrchr.m4: Update.
1031 * gnulib/import/m4/mkdir.m4: Update.
1032 * gnulib/import/m4/mkstemp.m4: Update.
1033 * gnulib/import/m4/mmap-anon.m4: Update.
1034 * gnulib/import/m4/mode_t.m4: Update.
1035 * gnulib/import/m4/msvc-inval.m4: Update.
1036 * gnulib/import/m4/msvc-nothrow.m4: Update.
1037 * gnulib/import/m4/multiarch.m4: Update.
1038 * gnulib/import/m4/nocrash.m4: Update.
1039 * gnulib/import/m4/off_t.m4: Update.
1040 * gnulib/import/m4/onceonly.m4: Update.
1041 * gnulib/import/m4/open-cloexec.m4: Update.
1042 * gnulib/import/m4/open.m4: Update.
1043 * gnulib/import/m4/openat.m4: Update.
1044 * gnulib/import/m4/opendir.m4: Update.
1045 * gnulib/import/m4/pathmax.m4: Update.
1046 * gnulib/import/m4/rawmemchr.m4: Update.
1047 * gnulib/import/m4/readdir.m4: Update.
1048 * gnulib/import/m4/readlink.m4: Update.
1049 * gnulib/import/m4/realloc.m4: Update.
1050 * gnulib/import/m4/rename.m4: Update.
1051 * gnulib/import/m4/rewinddir.m4: Update.
1052 * gnulib/import/m4/rmdir.m4: Update.
1053 * gnulib/import/m4/save-cwd.m4: Update.
1054 * gnulib/import/m4/secure_getenv.m4: Update.
1055 * gnulib/import/m4/setenv.m4: Update.
1056 * gnulib/import/m4/signal_h.m4: Update.
1057 * gnulib/import/m4/ssize_t.m4: Update.
1058 * gnulib/import/m4/stat-time.m4: Update.
1059 * gnulib/import/m4/stat.m4: Update.
1060 * gnulib/import/m4/std-gnu11.m4: Update.
1061 * gnulib/import/m4/stdbool.m4: Update.
1062 * gnulib/import/m4/stddef_h.m4: Update.
1063 * gnulib/import/m4/stdint.m4: Update.
1064 * gnulib/import/m4/stdio_h.m4: Update.
1065 * gnulib/import/m4/stdlib_h.m4: Update.
1066 * gnulib/import/m4/strchrnul.m4: Update.
1067 * gnulib/import/m4/strdup.m4: Update.
1068 * gnulib/import/m4/strerror.m4: Update.
1069 * gnulib/import/m4/string_h.m4: Update.
1070 * gnulib/import/m4/strstr.m4: Update.
1071 * gnulib/import/m4/strtok_r.m4: Update.
1072 * gnulib/import/m4/sys_socket_h.m4: Update.
1073 * gnulib/import/m4/sys_stat_h.m4: Update.
1074 * gnulib/import/m4/sys_time_h.m4: Update.
1075 * gnulib/import/m4/sys_types_h.m4: Update.
1076 * gnulib/import/m4/tempname.m4: Update.
1077 * gnulib/import/m4/time_h.m4: Update.
1078 * gnulib/import/m4/unistd-safer.m4: Update.
1079 * gnulib/import/m4/unistd_h.m4: Update.
1080 * gnulib/import/m4/warn-on-use.m4: Update.
1081 * gnulib/import/m4/wchar_h.m4: Update.
1082 * gnulib/import/m4/wchar_t.m4: Update.
1083 * gnulib/import/m4/wctype_h.m4: Update.
1084 * gnulib/import/m4/wint_t.m4: Update.
1085 * gnulib/import/malloc.c: Update.
1086 * gnulib/import/malloc/scratch_buffer.h: Update.
1087 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1088 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1089 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1090 * gnulib/import/malloca.c: Update.
1091 * gnulib/import/malloca.h: Update.
1092 * gnulib/import/malloca.valgrind: Update.
1093 * gnulib/import/math.in.h: Update.
1094 * gnulib/import/mbrtowc.c: Update.
1095 * gnulib/import/mbsinit.c: Update.
1096 * gnulib/import/mbsrtowcs-impl.h: Update.
1097 * gnulib/import/mbsrtowcs-state.c: Update.
1098 * gnulib/import/mbsrtowcs.c: Update.
1099 * gnulib/import/memchr.c: Update.
1100 * gnulib/import/memmem.c: Update.
1101 * gnulib/import/mempcpy.c: Update.
1102 * gnulib/import/memrchr.c: Update.
1103 * gnulib/import/mkdir.c: Update.
1104 * gnulib/import/mkstemp.c: Update.
1105 * gnulib/import/msvc-inval.c: Update.
1106 * gnulib/import/msvc-inval.h: Update.
1107 * gnulib/import/msvc-nothrow.c: Update.
1108 * gnulib/import/msvc-nothrow.h: Update.
1109 * gnulib/import/open.c: Update.
1110 * gnulib/import/openat-die.c: Update.
1111 * gnulib/import/openat-priv.h: Update.
1112 * gnulib/import/openat-proc.c: Update.
1113 * gnulib/import/openat.c: Update.
1114 * gnulib/import/openat.h: Update.
1115 * gnulib/import/opendir.c: Update.
1116 * gnulib/import/pathmax.h: Update.
1117 * gnulib/import/pipe-safer.c: Update.
1118 * gnulib/import/rawmemchr.c: Update.
1119 * gnulib/import/readdir.c: Update.
1120 * gnulib/import/readlink.c: Update.
1121 * gnulib/import/realloc.c: Update.
1122 * gnulib/import/ref-add.sin: Update.
1123 * gnulib/import/ref-del.sin: Update.
1124 * gnulib/import/rename.c: Update.
1125 * gnulib/import/rewinddir.c: Update.
1126 * gnulib/import/rmdir.c: Update.
1127 * gnulib/import/same-inode.h: Update.
1128 * gnulib/import/save-cwd.c: Update.
1129 * gnulib/import/save-cwd.h: Update.
1130 * gnulib/import/scratch_buffer.h: Update.
1131 * gnulib/import/secure_getenv.c: Update.
1132 * gnulib/import/setenv.c: Update.
1133 * gnulib/import/signal.in.h: Update.
1134 * gnulib/import/stat-time.c: Update.
1135 * gnulib/import/stat-time.h: Update.
1136 * gnulib/import/stat-w32.c: Update.
1137 * gnulib/import/stat-w32.h: Update.
1138 * gnulib/import/stat.c: Update.
1139 * gnulib/import/stdbool.in.h: Update.
1140 * gnulib/import/stddef.in.h: Update.
1141 * gnulib/import/stdint.in.h: Update.
1142 * gnulib/import/stdio.in.h: Update.
1143 * gnulib/import/stdlib.in.h: Update.
1144 * gnulib/import/str-two-way.h: Update.
1145 * gnulib/import/strchrnul.c: Update.
1146 * gnulib/import/strdup.c: Update.
1147 * gnulib/import/streq.h: Update.
1148 * gnulib/import/strerror-override.c: Update.
1149 * gnulib/import/strerror-override.h: Update.
1150 * gnulib/import/strerror.c: Update.
1151 * gnulib/import/string.in.h: Update.
1152 * gnulib/import/stripslash.c: Update.
1153 * gnulib/import/strnlen1.c: Update.
1154 * gnulib/import/strnlen1.h: Update.
1155 * gnulib/import/strstr.c: Update.
1156 * gnulib/import/strtok_r.c: Update.
1157 * gnulib/import/sys_stat.in.h: Update.
1158 * gnulib/import/sys_time.in.h: Update.
1159 * gnulib/import/sys_types.in.h: Update.
1160 * gnulib/import/tempname.c: Update.
1161 * gnulib/import/tempname.h: Update.
1162 * gnulib/import/time.in.h: Update.
1163 * gnulib/import/unistd--.h: Update.
1164 * gnulib/import/unistd-safer.h: Update.
1165 * gnulib/import/unistd.in.h: Update.
1166 * gnulib/import/unsetenv.c: Update.
1167 * gnulib/import/verify.h: Update.
1168 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1169 * gnulib/import/wchar.in.h: Update.
1170 * gnulib/import/wctype.in.h: Update.
1171 * gnulib/import/xalloc-oversized.h: Update.
1172 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1173 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1174
1175 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1176
1177 * record-btrace.c (get_thread_current_frame): Remove
1178 old_inferior_ptid.
1179
1180 2018-09-10 Jerome Guitton <guitton@adacore.com>
1181
1182 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1183 with check_tag to 1 if and only if the type is tagged and the
1184 component being searched cannot been found in the current
1185 view. Otherwise, always call ada_to_fixed_type with
1186 check_tag to 0.
1187
1188 2018-09-10 Xavier Roirand <roirand@adacore.com>
1189
1190 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1191 declaration.
1192 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1193 * ada-varobj.c (ada_varobj_get_number_of_children,
1194 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1195
1196 2018-09-10 Xavier Roirand <roirand@adacore.com>
1197
1198 * ada-valprint.c (ada_value_print): Use type instead of
1199 enclosing type.
1200
1201 2018-09-10 Xavier Roirand <roirand@adacore.com>
1202
1203 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1204 an array of access to unconstrained array.
1205
1206 2018-09-10 Xavier Roirand <roirand@adacore.com>
1207
1208 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1209 (ada_check_typedef): Use it.
1210
1211 2018-09-10 Xavier Roirand <roirand@adacore.com>
1212
1213 * ada-varobj.c (ada_varobj_describe_struct_child)
1214 (ada_varobj_describe_child): Handle union case like struct one.
1215
1216 2018-09-10 Tom Tromey <tom@tromey.com>
1217
1218 PR python/18380:
1219 * python/python.c (_initialize_python): Make example in "python"
1220 help work in Python 3.
1221
1222 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1223
1224 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1225 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1226 $(EXEEXT) to the script, as it is not a program.
1227
1228 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1229
1230 * python/py-prettyprint.c (pretty_print_one_value): Return
1231 gdbpy_ref<>.
1232 (print_string_repr): Adjust.
1233 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1234 * python/python-internal.h (apply_varobj_pretty_printer): Return
1235 gdbpy_ref<>.
1236 * varobj.c (varobj_value_get_print_value): Adjust.
1237
1238 2018-09-08 Tom Tromey <tom@tromey.com>
1239
1240 PR python/16047:
1241 * python/py-prettyprint.c (pretty_print_one_value): Check for
1242 to_string method.
1243
1244 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1245
1246 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1247 replace_operator_with_call.
1248
1249 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1250
1251 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1252
1253 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1254
1255 * ada-typeprint.c (print_range): Print the bounds using TYPE
1256 rather than its TYPE_TARGET_TYPE.
1257
1258 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1259
1260 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1261 call to ada_to_fixed_value_create.
1262
1263 2018-09-08 Jerome Guitton <guitton@adacore.com>
1264
1265 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1266
1267 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1268
1269 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1270 by calls to error.
1271
1272 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1273
1274 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1275 Move update of loop variable "fi".
1276
1277 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1278
1279 * ada-lang.c (value_assign_to_component): In the case of
1280 big-endian targets, extract the bits of the given VAL
1281 using an src_offset of zero if container is not a scalar.
1282
1283 2018-09-06 Simon Ser <contact@emersion.fr>
1284
1285 PR gdb/23105
1286 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1287 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1288 * fbsd-tdep.c (fbsd_make_note_desc): New.
1289 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1290 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1291 * target.h (enum target_object) Add FreeBSD-specific
1292 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1293
1294 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * compile/compile-c.h (generate_c_for_variable_locations):
1297 Change reference to pointer.
1298 * compile/compile-c-support.c (compile_program) <compute>:
1299 Likewise.
1300 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1301 (generate_c_for_for_one_variable): Likewise
1302 (generate_c_for_variable_locations): Likewise
1303 * compile/compile-c-types.c (compile_c_instance::convert_type):
1304 Likewise
1305 * compile/compile-cplus-symbols.c (convert_one_symbol):
1306 std::move the scope passed to enter_scope.
1307 * compile/compile-cplus-types.c
1308 (compile_cplus_instance::enter_scope): Make parameter
1309 rvalue-reference.
1310 (compile_cplus_instance::new_scope): Change reference to
1311 pointer.
1312 (compile_cplus_instance::convert_type): Likewise
1313 (compile_cplus_convert_typedef): std::move the scope passed to
1314 enter_scope.
1315 (compile_cplus_convert_struct_or_union): Likewise.
1316 (compile_cplus_convert_enum): Likewise.
1317 (compile_cplus_convert_namespace): Likewise.
1318 * compile/compile-cplus.h (compile_cplus_instance)
1319 <enter_scope>: Make parameter rvalue-reference.
1320 * compile/compile-internal.h (compile_instance)
1321 <get_cached_type>: Likewise
1322 * compile/compile-loc2c.c (push): Likewise
1323 (pushf): Likewise
1324 (unary): Likewise
1325 (binary): Likewise
1326 (print_label): Likewise
1327 (pushf_register_address): Likewise
1328 (pushf_register): Likewise
1329 (do_compile_dwarf_expr_to_c): Likewise
1330 (compile_dwarf_expr_to_c): Likewise
1331 (compile_dwarf_bounds_to_c): Likewise
1332 * compile/compile.c (compile_instance::get_cached_type):
1333 Likewise
1334 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1335 (compile_dwarf_bounds_to_c): Likewise
1336 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1337 (dwarf2_compile_property_to_c): Likewise
1338 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1339 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1340 Likewise
1341
1342 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1345 * tui/tui-data.c (init_content_element): Don't initialize it.
1346
1347 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * tui/tui-data.h (struct tui_win_info)
1350 <detail::opaque>: Remove.
1351 * tui/tui-data.c (init_win_info): Remove assignment.
1352
1353 2018-09-05 Tom Tromey <tom@tromey.com>
1354
1355 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1356 -Wformat-nonliteral.
1357 * target-float.c (host_float_ops<T>::to_string)
1358 (host_float_ops<T>::from_string): Use
1359 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1360 * configure: Rebuild.
1361
1362 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * printcmd.c (printf_c_string): Use
1365 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1366 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1367
1368 2018-09-05 Tom Tromey <tom@tromey.com>
1369
1370 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1371
1372 2018-09-05 Tom de Vries <tdevries@suse.de>
1373
1374 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1375 with resolve_abstract_p == true.
1376 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1377 defaulting to false. Propagate resolve_abstract_p to
1378 dwarf2_fetch_die_loc_sect_off.
1379 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1380 parameter, defaulting to false.
1381 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1382 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1383 parameter.
1384 * dwarf2read.h (struct die_info): Forward-declare.
1385 (die_info_ptr): New typedef.
1386 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1387
1388 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1389
1390 GDB 8.2 released.
1391
1392 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1393 Pedro Alves <palves@redhat.com>
1394
1395 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1396 "aclocal-m4-deps.mk". Include file here.
1397 $(srcdir)/aclocal.m4: Add "configure.ac".
1398 * gnulib/aclocal-m4-deps.mk: New file.
1399 * gnulib/update-gnulib.sh: Automatically update
1400 "aclocal-m4-deps.mk".
1401
1402 2018-09-04 Tom Tromey <tom@tromey.com>
1403
1404 * configure: Rebuild.
1405 * configure.ac: Remove multi-ice code.
1406
1407 2018-09-04 Tom Tromey <tom@tromey.com>
1408
1409 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1410 (ada-exp.o): Update.
1411
1412 2018-09-04 Tom Tromey <tom@tromey.com>
1413
1414 * Makefile.in (printcmd.o, target-float.o): Remove.
1415 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1416
1417 2018-09-04 Tom Tromey <tom@tromey.com>
1418
1419 * gnulib/Makefile.in: Remove obsolete comment.
1420 * Makefile.in: Remove obsolete comment.
1421
1422 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1423
1424 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1425 line with '+'.
1426
1427 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1428
1429 * riscv-tdep.c: Add 'prologue-value.h' include.
1430 (struct riscv_unwind_cache): New struct.
1431 (riscv_debug_unwinder): New global.
1432 (riscv_scan_prologue): Update arguments, capture register details
1433 from prologue scan.
1434 (riscv_skip_prologue): Reformat arguments line, move end of
1435 prologue calculation into riscv_scan_prologue.
1436 (riscv_frame_cache): Update return type, create
1437 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1438 details.
1439 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1440 (riscv_frame_prev_register): Use the trad_frame within the
1441 riscv_unwind_cache.
1442 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1443 flag.
1444
1445 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1446
1447 * trad-frame.h (trad_frame_set_realreg): Declare.
1448 (trad_frame_set_addr): Declare.
1449 * trad-frame.c (trad_frame_set_realreg): Define new function.
1450 (trad_frame_set_addr): Define new function.
1451 (trad_frame_set_reg_realreg): Use new function.
1452 (trad_frame_set_reg_addr): Use new function.
1453
1454 2018-09-01 Keith Seitz <keiths@redhat.com>
1455
1456 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1457 pulongest instead of "%lld".
1458 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1459 ATTRIBUTE_UNUSED.
1460
1461 2018-08-31 Tom Tromey <tom@tromey.com>
1462
1463 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1464 variant part type.
1465
1466 2018-08-31 Pedro Alves <palves@redhat.com>
1467
1468 * gdbarch.h: Regenerate.
1469
1470 2018-08-31 Pedro Alves <palves@redhat.com>
1471
1472 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1473 * target.h (Hardware watchpoint interfaces): Describe
1474 continuable/steppable/non-steppable watchpoints.
1475 * gdbarch.h, gdbarch.c: Regenerate.
1476
1477 2018-08-31 Pedro Alves <palves@redhat.com>
1478
1479 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1480 Delete.
1481 * s390-linux-nat.c
1482 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1483 * target.h (target_ops::have_continuable_watchpoint): Delete.
1484 (target_have_continuable_watchpoint): Delete.
1485 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1486 * target-delegates.c: Regenerate.
1487
1488 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1489
1490 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1491 the files present in "gnulib/import/m4/".
1492
1493 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1494
1495 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1496 c.sw, c.swsp, and c.sdsp.
1497
1498 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1499
1500 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1501 (riscv_read_misa_reg): Don't cache value read into inferior data.
1502 (riscv_new_inferior_data): Delete.
1503 (riscv_inferior_data_cleanup): Delete.
1504 (riscv_inferior_data): Delete.
1505 (riscv_invalidate_inferior_data): Delete.
1506 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1507
1508 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1509
1510 * compile/compile-cplus-types.c
1511 (compile_cplus_instance::leave_scope): Take the address of scope
1512 object.
1513 (compile_cplus_instance::convert_qualified_base): Compare quals
1514 to 0.
1515
1516 2018-08-30 Keith Seitz <keiths@redhat.com>
1517
1518 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1519 Use "%s" and host_address_to_string instead of "%p" in printf.
1520
1521 2018-08-29 Keith Seitz <keiths@redhat.com>
1522
1523 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1524 and compile-cplus-types.c.
1525 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1526 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1527 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1528 Declare.
1529 * compile/compile-c-support.c: Include compile-cplus.h.
1530 (load_libcompile): Templatize.
1531 (get_compile_context): "New" function.
1532 (c_get_compile_context): Use get_compile_context.
1533 (cplus_get_compile_context): New function.
1534 (cplus_push_user_expression, cplus_pop_user_expression)
1535 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1536 (cplus_compute_program): Define new structs/functions.
1537 * compile/compile-cplus-symmbols.c: New file.
1538 * compile/compile-cplus-types.c: New file.
1539 * compile/compile-cplus.h: New file.
1540 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1541 Declare.
1542 * compile/compile-object-load.c (get_out_value_type): Use
1543 strncmp_iw when comparing symbol names.
1544 (compile_object_load): Add mst_bss and mst_data.
1545 * compile/compile.c (_initialize_compile): Remove
1546 -Wno-implicit-function-declaration from `compile_args'.
1547 * compile/gcc-cp-plugin.h: New file.
1548 * NEWS: Mention C++ compile support and new debug options.
1549
1550 2018-08-29 Keith Seitz <keiths@redhat.com>
1551
1552 * linespec.c (collect_info::add_symbol): Make virtual.
1553 (struct symbol_searcher_collect_info): New struct.
1554 (symbol_searcher::find_all_symbols): New method.
1555 * symtab.h (class symbol_searcher): New class.
1556
1557 2018-08-29 Keith Seitz <keiths@redhat.com>
1558
1559 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1560 Change to vector of block_symbol. Update all users.
1561 (struct collect_info) <symbols>: Likewise.
1562 (collect_info::add_symbol): Take block_symbol as argument.
1563 Update all callers.
1564 (decode_compound_collector) <m_symbols>: Change type to vector
1565 of block_symbol. Update all users.
1566 (decode_compound_collector::operator ()): Change parameter type
1567 to block_symbol.
1568 (find_method, find_function_symbols, find_linespec_symbols)
1569 (find_label_symbols_in_block, find_label_symbols): Change symbol
1570 vectors to block_symbol vectors.
1571 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1572 block_symbol.
1573
1574 2018-08-29 Keith Seitz <keiths@redhat.com>
1575
1576 * linespec.c (symbolp): Remove typedef and VEC definitions.
1577 (bound_minimal_symbol_d): Likewise.
1578
1579 2018-08-29 Keith Seitz <keiths@redhat.com>
1580
1581 * linespec.c (decode_compound_collector::decode_compound_collector):
1582 Remove initialization for `m_symtabs'.
1583 (decode_compound_collector::release_symbols): Change return type
1584 to std::vector. Update all callers.
1585 (class decode_compound_collector) <m_symbols>: Change type to
1586 std::vector.
1587 (lookup_prefix_sym): Change return type to std::vector. Update all
1588 callers.
1589 (compare_symbols): Remove.
1590 (std_compare_symbols): Rename to `compare_symbols'.
1591 (find_method): Change `sym_classes' parameter to std::vector.
1592 Update all callers. Use std::sort to sort sym_classes.
1593 (find_linespec_symbols): Remove cleanup.
1594
1595 2018-08-29 Keith Seitz <keiths@redhat.com>
1596
1597 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1598 std::vector. Update all users.
1599 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1600 (struct collect_info) <minimal_symbols>: Likewise.
1601 (compare_msymbols): Return bool. Change parameters to const
1602 bound_minimal_symbol references.
1603 (find_method, find_function_symbols, find_linespec_symbols): Change
1604 `minsyms' parameter to std::vector. Update all callers.
1605
1606 2018-08-29 Keith Seitz <keiths@redhat.com>
1607
1608 * linespec.c (struct linespec) <label_symbols>: Change type to
1609 std::vector. Update all users.
1610 (find_label_symbols_in_block): Change `result' parameter to
1611 std::vector. Update all callers.
1612 (find_label_symbols): Return std::vector. Update all callers.
1613
1614 2018-08-29 Keith Seitz <keiths@redhat.com>
1615
1616 * linespec.c (struct linespec) <function_symbols>: Change type to
1617 std::vector. Update all users.
1618 (struct collect_info) <function_symbols>: Likewise.
1619 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1620 (std_compare_symbols): New function.
1621 (find_method, find_function_symbols, find_linespec_symbols)
1622 (find_label_symbols_in_block): Change `symbols' parameter to
1623 std::vector. Update all callers.
1624 (find_label_symbols): Likewise for `function_symbols' and
1625 `label_funcs_ret'.
1626
1627 2018-08-29 Keith Seitz <keiths@redhat.com>
1628
1629 * linespec.c (symtab_vector_up): Define.
1630 (struct linespec) <file_symtabs>: Change type to std::vector *.
1631 Update all uses.
1632 (struct collect_info) <file_symtabs>: Likewise.
1633 (collect_symtabs_from_filename): Return symtab_vector_up.
1634 Update all callers.
1635 (decode_objc): Remove cleanup.
1636 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1637 (symtab_collector::release_symtabs): Return symtab_vector_up.
1638 Update all callers.
1639 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1640 Update all users.
1641 (collect_symtabs_from_filename, symtabs_from_filename): Return
1642 symtab_vector_up. Update all callers.
1643
1644 2018-08-29 Tom Tromey <tom@tromey.com>
1645
1646 * csky-tdep.c (csky_analyze_prologue): Use
1647 core_addr_to_string_nz.
1648
1649 2018-08-29 Tom Tromey <tom@tromey.com>
1650
1651 * windows-nat.c (struct xlate_exception) <them>: Change type to
1652 DWORD.
1653 (xlate): Fix formatting. Remove last entry.
1654 (struct xlate_exception, xlate): Comment out.
1655 (windows_nat_target::resume): Use ranged for.
1656
1657 2018-08-29 Jim Wilson <jimw@sifive.com>
1658
1659 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1660 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1661 of NT_PRFPREG.
1662 (riscv_linux_nat_target::store_registers): Likewise.
1663
1664 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1665
1666 PR gdb/23555
1667 PR gdb/23558
1668 * gnulib/aclocal.m4: Regenerate.
1669 * gnulib/config.in: Regenerate.
1670 * gnulib/configure: Regenerate.
1671 * gnulib/import/Makefile.am: Update.
1672 * gnulib/import/Makefile.in: Update.
1673 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1674 * gnulib/import/_Noreturn.h: ... this.
1675 * gnulib/import/alloca.in.h: Update.
1676 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1677 * gnulib/import/arg-nonnull.h: ... this.
1678 * gnulib/import/assure.h: Update.
1679 * gnulib/import/at-func.c: Update.
1680 * gnulib/import/basename-lgpl.c: Update.
1681 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1682 * gnulib/import/c++defs.h: ... this.
1683 * gnulib/import/canonicalize-lgpl.c: Update.
1684 * gnulib/import/cdefs.h: Update.
1685 * gnulib/import/chdir-long.c: Update.
1686 * gnulib/import/chdir-long.h: Update.
1687 * gnulib/import/cloexec.c: Update.
1688 * gnulib/import/cloexec.h: Update.
1689 * gnulib/import/close.c: Update.
1690 * gnulib/import/closedir.c: Update.
1691 * gnulib/import/config.charset: Update.
1692 * gnulib/import/dirent-private.h: Update.
1693 * gnulib/import/dirent.in.h: Update.
1694 * gnulib/import/dirfd.c: Update.
1695 * gnulib/import/dirname-lgpl.c: Update.
1696 * gnulib/import/dirname.h: Update.
1697 * gnulib/import/dosname.h: Update.
1698 * gnulib/import/dup-safer-flag.c: Update.
1699 * gnulib/import/dup-safer.c: Update.
1700 * gnulib/import/dup.c: Update.
1701 * gnulib/import/dup2.c: Update.
1702 * gnulib/import/errno.in.h: Update.
1703 * gnulib/import/error.c: Update.
1704 * gnulib/import/error.h: Update.
1705 * gnulib/import/exitfail.c: Update.
1706 * gnulib/import/exitfail.h: Update.
1707 * gnulib/import/extra/update-copyright: Update.
1708 * gnulib/import/fchdir.c: Update.
1709 * gnulib/import/fcntl.c: Update.
1710 * gnulib/import/fcntl.in.h: Update.
1711 * gnulib/import/fd-hook.c: Update.
1712 * gnulib/import/fd-hook.h: Update.
1713 * gnulib/import/fd-safer-flag.c: Update.
1714 * gnulib/import/fd-safer.c: Update.
1715 * gnulib/import/fdopendir.c: Update.
1716 * gnulib/import/filename.h: Update.
1717 * gnulib/import/filenamecat-lgpl.c: Update.
1718 * gnulib/import/filenamecat.h: Update.
1719 * gnulib/import/flexmember.h: Update.
1720 * gnulib/import/float+.h: Update.
1721 * gnulib/import/float.c: Update.
1722 * gnulib/import/float.in.h: Update.
1723 * gnulib/import/fnmatch.c: Update.
1724 * gnulib/import/fnmatch.in.h: Update.
1725 * gnulib/import/fnmatch_loop.c: Update.
1726 * gnulib/import/fpucw.h: Update.
1727 * gnulib/import/frexp.c: Update.
1728 * gnulib/import/frexpl.c: Update.
1729 * gnulib/import/fstat.c: Update.
1730 * gnulib/import/fstatat.c: Update.
1731 * gnulib/import/getcwd-lgpl.c: Update.
1732 * gnulib/import/getcwd.c: Update.
1733 * gnulib/import/getdtablesize.c: Update.
1734 * gnulib/import/getlogin_r.c: Update.
1735 * gnulib/import/getprogname.c: Update.
1736 * gnulib/import/getprogname.h: Update.
1737 * gnulib/import/gettext.h: Update.
1738 * gnulib/import/gettimeofday.c: Update.
1739 * gnulib/import/glob-libc.h: Update.
1740 * gnulib/import/glob.c: Update.
1741 * gnulib/import/glob.in.h: Update.
1742 * gnulib/import/glob_internal.h: Update.
1743 * gnulib/import/glob_pattern_p.c: Update.
1744 * gnulib/import/globfree.c: Update.
1745 * gnulib/import/hard-locale.c: Update.
1746 * gnulib/import/hard-locale.h: Update.
1747 * gnulib/import/intprops.h: Update.
1748 * gnulib/import/inttypes.in.h: Update.
1749 * gnulib/import/isnan.c: Update.
1750 * gnulib/import/isnand-nolibm.h: Update.
1751 * gnulib/import/isnand.c: Update.
1752 * gnulib/import/isnanl-nolibm.h: Update.
1753 * gnulib/import/isnanl.c: Update.
1754 * gnulib/import/itold.c: Update.
1755 * gnulib/import/libc-config.h: Update.
1756 * gnulib/import/limits.in.h: Update.
1757 * gnulib/import/localcharset.c: Update.
1758 * gnulib/import/localcharset.h: Update.
1759 * gnulib/import/localtime-buffer.c: Update.
1760 * gnulib/import/localtime-buffer.h: Update.
1761 * gnulib/import/lstat.c: Update.
1762 * gnulib/import/m4/00gnulib.m4: Update.
1763 * gnulib/import/m4/__inline.m4: Update.
1764 * gnulib/import/m4/absolute-header.m4: Update.
1765 * gnulib/import/m4/alloca.m4: Update.
1766 * gnulib/import/m4/builtin-expect.m4: Update.
1767 * gnulib/import/m4/canonicalize.m4: Update.
1768 * gnulib/import/m4/chdir-long.m4: Update.
1769 * gnulib/import/m4/close.m4: Update.
1770 * gnulib/import/m4/closedir.m4: Update.
1771 * gnulib/import/m4/configmake.m4: Update.
1772 * gnulib/import/m4/d-ino.m4: Update.
1773 * gnulib/import/m4/d-type.m4: Update.
1774 * gnulib/import/m4/dirent_h.m4: Update.
1775 * gnulib/import/m4/dirfd.m4: Update.
1776 * gnulib/import/m4/dirname.m4: Update.
1777 * gnulib/import/m4/double-slash-root.m4: Update.
1778 * gnulib/import/m4/dup.m4: Update.
1779 * gnulib/import/m4/dup2.m4: Update.
1780 * gnulib/import/m4/eealloc.m4: Update.
1781 * gnulib/import/m4/environ.m4: Update.
1782 * gnulib/import/m4/errno_h.m4: Update.
1783 * gnulib/import/m4/error.m4: Update.
1784 * gnulib/import/m4/exponentd.m4: Update.
1785 * gnulib/import/m4/exponentl.m4: Update.
1786 * gnulib/import/m4/extensions.m4: Update.
1787 * gnulib/import/m4/extern-inline.m4: Update.
1788 * gnulib/import/m4/fchdir.m4: Update.
1789 * gnulib/import/m4/fcntl-o.m4: Update.
1790 * gnulib/import/m4/fcntl.m4: Update.
1791 * gnulib/import/m4/fcntl_h.m4: Update.
1792 * gnulib/import/m4/fdopendir.m4: Update.
1793 * gnulib/import/m4/filenamecat.m4: Update.
1794 * gnulib/import/m4/flexmember.m4: Update.
1795 * gnulib/import/m4/float_h.m4: Update.
1796 * gnulib/import/m4/fnmatch.m4: Update.
1797 * gnulib/import/m4/fnmatch_h.m4: Update.
1798 * gnulib/import/m4/fpieee.m4: Update.
1799 * gnulib/import/m4/frexp.m4: Update.
1800 * gnulib/import/m4/frexpl.m4: Update.
1801 * gnulib/import/m4/fstat.m4: Update.
1802 * gnulib/import/m4/fstatat.m4: Update.
1803 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1804 * gnulib/import/m4/getcwd-path-max.m4: Update.
1805 * gnulib/import/m4/getcwd.m4: Update.
1806 * gnulib/import/m4/getdtablesize.m4: Update.
1807 * gnulib/import/m4/getlogin.m4: Update.
1808 * gnulib/import/m4/getlogin_r.m4: Update.
1809 * gnulib/import/m4/getpagesize.m4: Update.
1810 * gnulib/import/m4/getprogname.m4: Update.
1811 * gnulib/import/m4/gettimeofday.m4: Update.
1812 * gnulib/import/m4/glibc21.m4: Update.
1813 * gnulib/import/m4/glob.m4: Update.
1814 * gnulib/import/m4/glob_h.m4: Update.
1815 * gnulib/import/m4/gnulib-cache.m4: Update.
1816 * gnulib/import/m4/gnulib-common.m4: Update.
1817 * gnulib/import/m4/gnulib-comp.m4: Update.
1818 * gnulib/import/m4/gnulib-tool.m4: Update.
1819 * gnulib/import/m4/hard-locale.m4: Update.
1820 * gnulib/import/m4/include_next.m4: Update.
1821 * gnulib/import/m4/inttypes-pri.m4: Update.
1822 * gnulib/import/m4/inttypes.m4: Update.
1823 * gnulib/import/m4/isnand.m4: Update.
1824 * gnulib/import/m4/isnanl.m4: Update.
1825 * gnulib/import/m4/largefile.m4: Update.
1826 * gnulib/import/m4/limits-h.m4: Update.
1827 * gnulib/import/m4/localcharset.m4: Update.
1828 * gnulib/import/m4/locale-fr.m4: Update.
1829 * gnulib/import/m4/locale-ja.m4: Update.
1830 * gnulib/import/m4/locale-zh.m4: Update.
1831 * gnulib/import/m4/localtime-buffer.m4: Update.
1832 * gnulib/import/m4/longlong.m4: Update.
1833 * gnulib/import/m4/lstat.m4: Update.
1834 * gnulib/import/m4/malloc.m4: Update.
1835 * gnulib/import/m4/malloca.m4: Update.
1836 * gnulib/import/m4/math_h.m4: Update.
1837 * gnulib/import/m4/mbrtowc.m4: Update.
1838 * gnulib/import/m4/mbsinit.m4: Update.
1839 * gnulib/import/m4/mbsrtowcs.m4: Update.
1840 * gnulib/import/m4/mbstate_t.m4: Update.
1841 * gnulib/import/m4/memchr.m4: Update.
1842 * gnulib/import/m4/memmem.m4: Update.
1843 * gnulib/import/m4/mempcpy.m4: Update.
1844 * gnulib/import/m4/memrchr.m4: Update.
1845 * gnulib/import/m4/mkdir.m4: Update.
1846 * gnulib/import/m4/mkstemp.m4: Update.
1847 * gnulib/import/m4/mmap-anon.m4: Update.
1848 * gnulib/import/m4/mode_t.m4: Update.
1849 * gnulib/import/m4/msvc-inval.m4: Update.
1850 * gnulib/import/m4/msvc-nothrow.m4: Update.
1851 * gnulib/import/m4/multiarch.m4: Update.
1852 * gnulib/import/m4/nocrash.m4: Update.
1853 * gnulib/import/m4/off_t.m4: Update.
1854 * gnulib/import/m4/onceonly.m4: Update.
1855 * gnulib/import/m4/open-cloexec.m4: Update.
1856 * gnulib/import/m4/open.m4: Update.
1857 * gnulib/import/m4/openat.m4: Update.
1858 * gnulib/import/m4/opendir.m4: Update.
1859 * gnulib/import/m4/pathmax.m4: Update.
1860 * gnulib/import/m4/rawmemchr.m4: Update.
1861 * gnulib/import/m4/readdir.m4: Update.
1862 * gnulib/import/m4/readlink.m4: Update.
1863 * gnulib/import/m4/realloc.m4: Update.
1864 * gnulib/import/m4/rename.m4: Update.
1865 * gnulib/import/m4/rewinddir.m4: Update.
1866 * gnulib/import/m4/rmdir.m4: Update.
1867 * gnulib/import/m4/save-cwd.m4: Update.
1868 * gnulib/import/m4/secure_getenv.m4: Update.
1869 * gnulib/import/m4/setenv.m4: Update.
1870 * gnulib/import/m4/signal_h.m4: Update.
1871 * gnulib/import/m4/ssize_t.m4: Update.
1872 * gnulib/import/m4/stat-time.m4: Update.
1873 * gnulib/import/m4/stat.m4: Update.
1874 * gnulib/import/m4/std-gnu11.m4: Update.
1875 * gnulib/import/m4/stdbool.m4: Update.
1876 * gnulib/import/m4/stddef_h.m4: Update.
1877 * gnulib/import/m4/stdint.m4: Update.
1878 * gnulib/import/m4/stdio_h.m4: Update.
1879 * gnulib/import/m4/stdlib_h.m4: Update.
1880 * gnulib/import/m4/strchrnul.m4: Update.
1881 * gnulib/import/m4/strdup.m4: Update.
1882 * gnulib/import/m4/strerror.m4: Update.
1883 * gnulib/import/m4/string_h.m4: Update.
1884 * gnulib/import/m4/strstr.m4: Update.
1885 * gnulib/import/m4/strtok_r.m4: Update.
1886 * gnulib/import/m4/sys_socket_h.m4: Update.
1887 * gnulib/import/m4/sys_stat_h.m4: Update.
1888 * gnulib/import/m4/sys_time_h.m4: Update.
1889 * gnulib/import/m4/sys_types_h.m4: Update.
1890 * gnulib/import/m4/tempname.m4: Update.
1891 * gnulib/import/m4/time_h.m4: Update.
1892 * gnulib/import/m4/unistd-safer.m4: Update.
1893 * gnulib/import/m4/unistd_h.m4: Update.
1894 * gnulib/import/m4/warn-on-use.m4: Update.
1895 * gnulib/import/m4/wchar_h.m4: Update.
1896 * gnulib/import/m4/wchar_t.m4: Update.
1897 * gnulib/import/m4/wctype_h.m4: Update.
1898 * gnulib/import/m4/wint_t.m4: Update.
1899 * gnulib/import/malloc.c: Update.
1900 * gnulib/import/malloc/scratch_buffer.h: Update.
1901 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1902 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1903 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1904 * gnulib/import/malloca.c: Update.
1905 * gnulib/import/malloca.h: Update.
1906 * gnulib/import/malloca.valgrind: Update.
1907 * gnulib/import/math.in.h: Update.
1908 * gnulib/import/mbrtowc.c: Update.
1909 * gnulib/import/mbsinit.c: Update.
1910 * gnulib/import/mbsrtowcs-impl.h: Update.
1911 * gnulib/import/mbsrtowcs-state.c: Update.
1912 * gnulib/import/mbsrtowcs.c: Update.
1913 * gnulib/import/memchr.c: Update.
1914 * gnulib/import/memmem.c: Update.
1915 * gnulib/import/mempcpy.c: Update.
1916 * gnulib/import/memrchr.c: Update.
1917 * gnulib/import/mkdir.c: Update.
1918 * gnulib/import/mkstemp.c: Update.
1919 * gnulib/import/msvc-inval.c: Update.
1920 * gnulib/import/msvc-inval.h: Update.
1921 * gnulib/import/msvc-nothrow.c: Update.
1922 * gnulib/import/msvc-nothrow.h: Update.
1923 * gnulib/import/open.c: Update.
1924 * gnulib/import/openat-die.c: Update.
1925 * gnulib/import/openat-priv.h: Update.
1926 * gnulib/import/openat-proc.c: Update.
1927 * gnulib/import/openat.c: Update.
1928 * gnulib/import/openat.h: Update.
1929 * gnulib/import/opendir.c: Update.
1930 * gnulib/import/pathmax.h: Update.
1931 * gnulib/import/pipe-safer.c: Update.
1932 * gnulib/import/rawmemchr.c: Update.
1933 * gnulib/import/readdir.c: Update.
1934 * gnulib/import/readlink.c: Update.
1935 * gnulib/import/realloc.c: Update.
1936 * gnulib/import/ref-add.sin: Update.
1937 * gnulib/import/ref-del.sin: Update.
1938 * gnulib/import/rename.c: Update.
1939 * gnulib/import/rewinddir.c: Update.
1940 * gnulib/import/rmdir.c: Update.
1941 * gnulib/import/same-inode.h: Update.
1942 * gnulib/import/save-cwd.c: Update.
1943 * gnulib/import/save-cwd.h: Update.
1944 * gnulib/import/scratch_buffer.h: Update.
1945 * gnulib/import/secure_getenv.c: Update.
1946 * gnulib/import/setenv.c: Update.
1947 * gnulib/import/signal.in.h: Update.
1948 * gnulib/import/stat-time.c: Update.
1949 * gnulib/import/stat-time.h: Update.
1950 * gnulib/import/stat-w32.c: Update.
1951 * gnulib/import/stat-w32.h: Update.
1952 * gnulib/import/stat.c: Update.
1953 * gnulib/import/stdbool.in.h: Update.
1954 * gnulib/import/stddef.in.h: Update.
1955 * gnulib/import/stdint.in.h: Update.
1956 * gnulib/import/stdio.in.h: Update.
1957 * gnulib/import/stdlib.in.h: Update.
1958 * gnulib/import/str-two-way.h: Update.
1959 * gnulib/import/strchrnul.c: Update.
1960 * gnulib/import/strdup.c: Update.
1961 * gnulib/import/streq.h: Update.
1962 * gnulib/import/strerror-override.c: Update.
1963 * gnulib/import/strerror-override.h: Update.
1964 * gnulib/import/strerror.c: Update.
1965 * gnulib/import/string.in.h: Update.
1966 * gnulib/import/stripslash.c: Update.
1967 * gnulib/import/strnlen1.c: Update.
1968 * gnulib/import/strnlen1.h: Update.
1969 * gnulib/import/strstr.c: Update.
1970 * gnulib/import/strtok_r.c: Update.
1971 * gnulib/import/sys_stat.in.h: Update.
1972 * gnulib/import/sys_time.in.h: Update.
1973 * gnulib/import/sys_types.in.h: Update.
1974 * gnulib/import/tempname.c: Update.
1975 * gnulib/import/tempname.h: Update.
1976 * gnulib/import/time.in.h: Update.
1977 * gnulib/import/unistd--.h: Update.
1978 * gnulib/import/unistd-safer.h: Update.
1979 * gnulib/import/unistd.in.h: Update.
1980 * gnulib/import/unsetenv.c: Update.
1981 * gnulib/import/verify.h: Update.
1982 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1983 * gnulib/import/wchar.in.h: Update.
1984 * gnulib/import/wctype.in.h: Update.
1985 * gnulib/import/xalloc-oversized.h: Update.
1986 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1987 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1988
1989 2018-08-16 Gary Benson <gbenson@redhat.com>
1990
1991 PR gdb/13000:
1992 * gdb/main.c (captured_main_1): Exit with nonzero status
1993 in batch mode if the last command to be executed failed.
1994 * NEWS: Mention the above.
1995
1996 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1997
1998 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1999 end of warning message.
2000
2001 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2002
2003 PR gdb/22943:
2004 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2005 (aarch64_extract_return_value): Use
2006 aapcs_is_vfp_call_or_return_candidate.
2007 (aarch64_return_in_memory): Likewise.
2008 (aarch64_store_return_value): Likewise.
2009
2010 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2011
2012 * aarch64-tdep.c
2013 (aapcs_is_vfp_call_or_return_candidate): Make static
2014 (pass_in_v_or_stack): Remove function.
2015 (pass_in_v_vfp_candidate): New function.
2016 (aarch64_push_dummy_call): Check for float register candidates.
2017
2018 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2019
2020 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2021 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2022 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2023
2024 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2025
2026 PR build/23399
2027 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2028 (struct ipa_sym_addresses): Rename to...
2029 (struct ipa_sym_addresses_common): ... this.
2030 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2031
2032 2018-08-28 Tom Tromey <tom@tromey.com>
2033
2034 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2035 (token_fifo): Now a std::vector.
2036 (yylex, c_parse): Update.
2037 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2038 (token_fifo): Now a std::vector.
2039 (yylex, d_parse): Update.
2040 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2041 (token_fifo): Now a std::vector.
2042 (yylex, go_parse): Update.
2043
2044 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2045
2046 * parser-defs.h (struct type_stack) <elements>: Change type to
2047 std::vector<union type_stack_elt>.
2048 <depth, size>: Remove.
2049 * parse.c (parse_exp_in_context_1): Adjust.
2050 (type_stack_reserve): Remove.
2051 (check_type_stack_depth): Remove.
2052 (insert_into_type_stack): Adjust to std::vector.
2053 (insert_type): Likewise.
2054 (push_type): Likewise.
2055 (push_type_int): Likewise.
2056 (insert_type_address_space): Likewise.
2057 (pop_type): Likewise.
2058 (pop_type_int): Likewise.
2059 (pop_typelist): Likewise.
2060 (pop_type_stack): Likewise.
2061 (append_type_stack): Likewise.
2062 (push_type_stack): Likewise.
2063 (get_type_stack): Likewise.
2064 (type_stack_cleanup): Likewise.
2065 (push_typelist): Likewise.
2066 (follow_types): Likewise.
2067 (_initialize_parse): Likewise.
2068
2069 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2070
2071 * NEWS: Mention csky target.
2072
2073 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2074 Hafiz Abid Qadeer <abidh@codesourcery.com>
2075 Don Breazeal <donb@codesourcery.com>
2076
2077 * csky-linux-tdep.c: New file.
2078 * csky-tdep.c: Likewise.
2079 * csky-tdep.h: Likewise.
2080 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2081 csky-tdep.o.
2082 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2083 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2084 * configure.tgt: Add csky support.
2085
2086 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2087
2088 * python/py-framefilter.c (py_print_frame): Print frame architecture
2089 when printing on an MI output.
2090
2091 2018-08-27 Tom Tromey <tom@tromey.com>
2092
2093 PR build/23087:
2094 * configure: Rebuild.
2095 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2096
2097 2018-08-27 Tom Tromey <tom@tromey.com>
2098
2099 * aarch64-linux-tdep.c
2100 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2101 casts to int.
2102
2103 2018-08-27 Tom Tromey <tom@tromey.com>
2104
2105 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2106 unsigned.
2107 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2108 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2109 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2110 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2111 unsigned.
2112
2113 2018-08-27 Tom Tromey <tom@tromey.com>
2114
2115 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2116 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2117
2118 2018-08-27 Tom Tromey <tom@tromey.com>
2119
2120 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2121 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2122 ULONGEST_MAX.
2123 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2124 ULONGEST_MAX.
2125 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2126 ULONGEST_MAX.
2127 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2128 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2129 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2130 ULONGEST_MAX.
2131 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2132 (ppc64_linux_sigaction_tramp_frame)
2133 (ppc32_linux_sighandler_tramp_frame)
2134 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2135 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2136 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2137 * mn10300-linux-tdep.c (am33_linux_sigframe)
2138 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2139 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2140 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2141 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2142 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2143 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2144 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2145 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2146 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2147 * microblaze-linux-tdep.c
2148 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2149 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2150 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2151 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2152 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2153 * common/common-types.h (ULONGEST_MAX): New define.
2154 (CORE_ADDR_MAX): Fix formatting.
2155 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2156 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2157 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2158 (arm_linux_rt_sigreturn_tramp_frame)
2159 (arm_eabi_linux_sigreturn_tramp_frame)
2160 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2161 (thumb2_eabi_linux_sigreturn_tramp_frame)
2162 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2163 (arm_linux_restart_syscall_tramp_frame)
2164 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2165 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2166 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2167 ULONGEST_MAX.
2168 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2169
2170 2018-08-27 Tom Tromey <tom@tromey.com>
2171
2172 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2173 CORE_ADDR_MAX.
2174 * mips-tdep.c (mips_deal_with_atomic_sequence)
2175 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2176 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2177 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2178 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2179 CORE_ADDR_MAX.
2180 * aarch64-tdep.c (aarch64_software_single_step): Use
2181 CORE_ADDR_MAX.
2182
2183 2018-08-27 Tom Tromey <tom@tromey.com>
2184
2185 * linespec.c (complete_linespec_component): Add cast to "char".
2186 * completer.c (completion_tracker::build_completion_result): Add
2187 cast to "char".
2188
2189 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2190
2191 * solist.h (struct solist, struct target_so_ops): Fix
2192 indentation.
2193
2194 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2195
2196 * ada-tasks.c (ada_task_info_s): Remove typedef.
2197 (DEF_VEC_O(ada_task_info_s)): Remove.
2198 (struct ada_tasks_inferior_data): Initialize fields.
2199 <task_list>: Make an std::vector.
2200 (get_ada_tasks_inferior_data): Allocate with new.
2201 (ada_get_task_number): Adjust.
2202 (get_task_number_from_id): Likewise.
2203 (valid_task_id): Likewise.
2204 (ada_get_task_info_from_ptid): Likewise.
2205 (iterate_over_live_ada_tasks): Likewise.
2206 (add_ada_task): Likewise.
2207 (read_known_tasks): Likewise.
2208 (ada_build_task_list): Likewise.
2209 (print_ada_task_info): Likewise.
2210 (info_task): Likewise.
2211 (task_command_1): Likewise.
2212
2213 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2214
2215 * ada-lang.c (add_angle_brackets): Return std::string.
2216
2217 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2218
2219 * python/py-threadevent.c (py_get_event_thread): Initialize
2220 pythread.
2221
2222 2018-08-24 Pedro Alves <palves@redhat.com>
2223
2224 * python/py-bpevent.c (create_breakpoint_event_object): Use
2225 copy-initialization.
2226 * python/py-continueevent.c (emit_continue_event): Use
2227 copy-initialization.
2228 * python/py-exitedevent.c (create_exited_event_object): Return a
2229 gdbpy_ref<>.
2230 (emit_exited_event): Use copy-initialization.
2231 * python/py-inferior.c (python_new_inferior)
2232 (python_inferior_deleted, add_thread_object): Use
2233 copy-initialization.
2234 * python/py-infevents.c (create_inferior_call_event_object)
2235 (create_register_changed_event_object)
2236 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2237 (emit_inferior_call_event, emit_memory_changed_event)
2238 (emit_register_changed_event): Use copy-initialization.
2239 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2240 Return a gdbpy_ref<>.
2241 (emit_new_objfile_event): Use copy-initialization.
2242 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2243 (emit_clear_objfiles_event): Use copy-initialization.
2244 * python/py-signalevent.c (create_signal_event_object): Use
2245 copy-initialization.
2246 * python/py-threadevent.c (create_thread_event_object): Use
2247 copy-initialization.
2248
2249 2018-08-24 Pedro Alves <palves@redhat.com>
2250 Simon Marchi <simon.marchi@ericsson.com>
2251
2252 PR gdb/23379
2253 * python/py-continueevent.c: Include "gdbthread.h".
2254 (create_continue_event_object): Add intro comment. Add 'ptid'
2255 parameter. Use it to find thread to pass to
2256 create_thread_event_object.
2257 (emit_continue_event): Pass PTID down to
2258 create_continue_event_object.
2259 * python/py-event.h (py_get_event_thread): Declare.
2260 (create_thread_event_object): Remove default from 'thread'
2261 parameter.
2262 * python/py-stopevent.c (create_stop_event_object): Use
2263 py_get_event_thread.
2264 * python/py-threadevent.c (get_event_thread): Rename to ...
2265 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2266 and use it to find the thread.
2267 (create_thread_event_object): Assert that THREAD isn't null.
2268 Don't find the event thread here.
2269
2270 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2271
2272 * block.h (blockrange, blockranges): New struct declarations.
2273 (struct block): Add new field named `ranges'.
2274 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2275 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2276 macros for accessing ranges in struct block.
2277 (make_blockranges): New declaration.
2278 block.c (make_blockranges): New function.
2279 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2280 for block.
2281 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2282 * blockframe.c (cache_pc_function_block): New static global.
2283 (clear_pc_function_cache): Clear cache_pc_function_block.
2284 (find_pc_partial_function): Move comment to symtab.h. Add
2285 support for non-contiguous blocks.
2286 * cli/cli-cmds.c (block.h): Include.
2287 (print_disassembly): Handle printing of non-contiguous blocks.
2288 (disassemble_current_function): Likewise.
2289 (disassemble_command): Likewise.
2290
2291 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2292 BLOCK_START.
2293 * blockframe.c (get_pc_function_start): Likewise.
2294 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2295 (gcc_symbol_address): Likewise.
2296 * compile/compile-object-run.c (compile_object_run): Likewise.
2297 * compile/compile.c (get_expr_block_and_pc): Likewise.
2298 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2299 (func_addr_to_tail_call_list): Likewise.
2300 * findvar.c (default_read_var_value): Likewise.
2301 * inline-frame.c (inline_frame_this_id): Likewise.
2302 (skip-inline_frames): Likewise.
2303 * infcmd.c (until_next_command): Likewise.
2304 * linespec.c (convert_linespec_to_sals): Likewise.
2305 * parse.c (parse_exp_in_context_1): Likewise.
2306 * printcmd.c (build_address_symbolic): likewise.
2307 (info_address_command): Likewise.
2308 symtab.c (find_function_start_sal): Likewise.
2309 (skip_prologue_sal): Likewise.
2310 (find_function_alias_target): Likewise.
2311 (find_gnu_ifunc): Likewise.
2312 * stack.c (find_frame_funname): Likewise.
2313 * symtab.c (fixup_symbol_section): Likewise.
2314 (find_function_start_sal): Likewise.
2315 (skip_prologue_sal): Likewsie.
2316 (find_function_alias_target): Likewise.
2317 (find_gnu_ifunc): Likewise.
2318 * tracepoint.c (info_scope_command): Likewise.
2319 * value.c (value_fn_field): Likewise.
2320
2321 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2322 in place of find_pc_partial_function.
2323 * blockframe.c (find_function_entry_range_from_pc): New function.
2324 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2325 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2326 for each range in a block.
2327
2328
2329 2018-08-23 Xavier Roirand <roirand@adacore.com>
2330
2331 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2332 incrementation.
2333
2334 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2335
2336 * solib-svr4.c (read_program_headers_from_bfd): Return
2337 gdb::optional<gdb::byte_vector>.
2338 (svr4_exec_displacement): Adjust.
2339
2340 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2341
2342 * solib-svr4.c (read_program_header): Return
2343 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2344 (find_program_interpreter): Return
2345 gdb::optional<gdb::byte_vector>.
2346 (scan_dyntag_auxv): Adjust.
2347 (enable_break): Adjust.
2348 (svr4_exec_displacement): Adjust.
2349
2350 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2351
2352 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2353 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2354
2355 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2356
2357 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2358 string_vprintf.
2359 * guile/scm-utils.c (gdbscm_printf): Likewise.
2360 * serial.c (serial_printf): Likewise.
2361 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2362
2363 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2364
2365 * stack.c (print_frame): Print frame architecture when printing on
2366 an MI output.
2367 * NEWS: Mention new "arch" attribute in frame output.
2368
2369 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2370
2371 * arch/aarch64.h (aarch64_regnum): Update comment.
2372
2373 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2374
2375 * NEWS: Add SVE to 8.2 section.
2376
2377 2018-08-21 Pedro Alves <palves@redhat.com>
2378
2379 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2380 out from gdbscm_parse_function_args.
2381 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2382 gdbscm_parse_function_args_1.
2383
2384 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2385
2386 PR gdb/17816
2387 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2388 operator.
2389
2390 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2391
2392 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2393
2394 2018-08-19 Michael Spang <spang@google.com>
2395
2396 PR gdb/11786
2397 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2398 for PT_TLS segments.
2399
2400 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2401
2402 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2403 dwarf_variable_value.
2404 * dwarf2-frame.c (class dwarf_expr_executor):
2405 Add override for dwarf_variable_value.
2406 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2407 (class symbol_needs_eval_context): Likewise.
2408 (indirect_synthetic_pointer): Add forward declaration.
2409 (sect_variable_value): New function.
2410 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2411 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2412 for DW_OP_GNU_variable_value.
2413
2414 2018-08-16 Tom Tromey <tom@tromey.com>
2415
2416 * top.c (read_command_file): Update.
2417 (command_line_input): Remove "repeat" argument.
2418 * ada-lang.c (get_selections): Update.
2419 * linespec.c (decode_line_2): Update.
2420 * defs.h (command_line_input): Remove argument.
2421 * cli/cli-script.c (read_next_line): Update.
2422 * python/py-gdb-readline.c: Update.
2423
2424 2018-08-17 Tom Tromey <tom@tromey.com>
2425
2426 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2427 command_line_input.
2428
2429 2018-08-15 Tom Tromey <tom@tromey.com>
2430
2431 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2432
2433 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2434
2435 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2436 If used, use find_pc_partial_function to find address range
2437 to disassemble.
2438 * mi/mi-main.c (mi_cmd_list_features): Report
2439 "data-disassemble-a-option" feature.
2440 * NEWS: Mention new -data-disassemble option -a.
2441
2442 2018-08-13 Tom Tromey <tom@tromey.com>
2443
2444 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2445
2446 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2447
2448 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2449 (aarch64_linux_collect_sve_regset): Likewise.
2450 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2451 * regcache.h (regcache_map_entry_size): New function.
2452
2453 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2454
2455 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2456 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2457 (SVE_HEADER_VL_LENGTH): Likewise.
2458 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2459 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2460 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2461 (SVE_HEADER_SIZE_OFFSET): Likewise.
2462 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2463 (SVE_HEADER_VL_OFFSET): Likewise.
2464 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2465 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2466 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2467 (SVE_HEADER_SIZE): Likewise.
2468 (aarch64_linux_core_read_vq): Add function.
2469 (aarch64_linux_core_read_description): Check for SVE section.
2470
2471 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2472
2473 * aarch64-fbsd-tdep.c
2474 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2475 collect_size.
2476 * aarch64-linux-tdep.c
2477 (aarch64_linux_iterate_over_regset_sections): Likewise.
2478 * alpha-linux-tdep.c
2479 (alpha_linux_iterate_over_regset_sections):
2480 * alpha-nbsd-tdep.c
2481 (alphanbsd_iterate_over_regset_sections): Likewise.
2482 * amd64-fbsd-tdep.c
2483 (amd64fbsd_iterate_over_regset_sections): Likewise.
2484 * amd64-linux-tdep.c
2485 (amd64_linux_iterate_over_regset_sections): Likewise.
2486 * arm-bsd-tdep.c
2487 (armbsd_iterate_over_regset_sections): Likewise.
2488 * arm-fbsd-tdep.c
2489 (arm_fbsd_iterate_over_regset_sections): Likewise.
2490 * arm-linux-tdep.c
2491 (arm_linux_iterate_over_regset_sections): Likewise.
2492 * corelow.c (get_core_registers_cb): Likewise.
2493 (core_target::fetch_registers): Likewise.
2494 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2495 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2496 * gdbarch.h (void): Regenerate.
2497 * gdbarch.sh: Add supply_size and collect_size.
2498 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2499 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2500 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2501 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2502 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2503 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2504 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2505 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2506 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2507 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2508 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2509 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2510 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2511 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2512 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2513 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2514 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2515 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2516 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2517 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2518 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2519 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2520 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2521 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2522 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2523 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2524 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2525 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2526 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2527 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2528
2529 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2530
2531 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2532 with string_printf.
2533
2534 2018-08-10 Keith Seitz <keiths@redhat.com>
2535
2536 * compile/compile-c-support.c (add_code_header, add_code_footer):
2537 Move into policy class.
2538 (c_push_user_expression, pop_user_expression_nop)
2539 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2540 (compile_program): New host class.
2541 (c_compile_program): New typedef.
2542 (c_compute_porgram): Use c_compile_program.
2543
2544 2018-08-10 Keith Seitz <keiths@redhat.com>
2545
2546 * compile/compile-internal.h (compile_instance::~compile_instance):
2547 Remove calls to htab_delete.
2548 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2549 * compile.c (compile_instance::compile_instance): Initialize
2550 htab unique pointers.
2551 (compile_instance::get_cached_type, compile_instance::insert_type)
2552 (compile_instance::error_symbol_once): Update for unique_ptr.
2553
2554 2018-08-10 Keith Seitz <keiths@redhat.com>
2555
2556 * compile/compile-c-symbols.c (struct symbol_error)
2557 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2558 (compile_instance::insert_symbol_error)
2559 (compile_instance::error_symbol_once): Move to ...
2560 * compile/compile.c: ... here.
2561
2562 2018-08-10 Keith Seitz <keiths@redhat.com>
2563
2564 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2565 instead of `new_compile_instance'.
2566 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2567 Update description.
2568 If the symbol error map is not initialized, create it.
2569 (generate_c_for_for_one_symbol): Do not check/initialize
2570 the symbol error map.
2571 * compile/compile-c-types.c (compile_c_instance): Make a class.
2572 Update all callers.
2573 (compile_instance::compile_instance): Initialize the type cache.
2574 (get_cached_type): New function.
2575 (insert_type): Update description.
2576 (compile_c_instance::m_default_cflags): Define.
2577 (convert_type): Update description. Use get_cached_type.
2578 (delete_instance): Moved to destructor.
2579 (new_compile_instance): Moved to constructor.
2580 * compile/compile-c.h (compile_c_instance): Make class inheriting
2581 from compile_instance.
2582 <base>: Remove field.
2583 <type_map, symbol_err_map>: Move to base class.
2584 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2585 * compile/compile-internal.h (compile_instance): Make class.
2586 <type_map_t, symbol_err_map_t>: Define.
2587 <fe>: Rename to `m_gcc_fe'.
2588 <scope, block, gcc_target_options>: Add `m_' prefix.
2589 <m_type_map, m_symbol_err_map>: New fields, moved from
2590 compile_c_instance.
2591 <destroy>: Remove.
2592 (convert_type, new_compile_instance): Remove.
2593 * compile/compile.c (cleanup_compile_instance): Remove.
2594 (compile_to_object): Use unique_ptr to eliminate cleanups.
2595 (compile_instance::set_print_callback, compile_instance::version)
2596 (compile_instance::set_verbose)
2597 (compile_instance::set_driver_filename)
2598 (compile_instance::set_triplet_regexp)
2599 (compile_instance::set_arguments)
2600 (compile_instance::set_source_file)
2601 (compile_instance::compile): Define.
2602
2603 2018-08-10 Keith Seitz <keiths@redhat.com>
2604
2605 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2606 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2607 gcc-c-fe.def to define C plugin.
2608 (delete_instance): Delete `c_plugin'.
2609 (new_compile_instance): Initialize `c_plugin'.
2610 * compile/compile-c.h: Include gcc_c_plugin.h.
2611 (struct compile_c_instance) <c_plugin>: New member.
2612 * gcc-c-plugin.h: New file.
2613 Update all callers with API change.
2614
2615 2018-08-10 Keith Seitz <keiths@redhat.com>
2616
2617 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2618 (HFILES_NO_SRCDIR): ... to here.
2619 Add compile-internal.h and compile-c.h.
2620 * compile/compile-c-support.c: Include compile-c.h.
2621 * compile/compile-c-symbols.c: Include compile-c.h.
2622 (generate_c_for_variable_locations): Update comment.
2623 * compile/compile-c-types.c: Include compile-c.h.
2624 * compile/compile-c.h: New file -- moved C language declarations
2625 from other files here.
2626 * compile/compile-internal.h: Do not include hashtab.h or
2627 common/enum-flags.h.
2628 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2629 (gcc_convert_symbol, gcc_symbol_address)
2630 (generate_c_for_variable_locations, c_get_mode_for_size)
2631 (c_get_range_decl_name): Definitions moved to compile-c.h.
2632 * compile/compile-loc2c.c: Include compile-c.h.
2633
2634 2018-08-10 Keith Seitz <keiths@redhat.com>
2635
2636 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2637 (c_symbol_substitution_name): ... this.
2638 Update all callers.
2639
2640 2018-08-10 Keith Seitz <keiths@redhat.com>
2641
2642 * compile/compile-c-support.c (c_compute_program): Use
2643 unique_xmalloc_ptr to eliminate cleanup.
2644 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2645 Return a unique_xmalloc_ptr and eliminate cleanup.
2646 * compile/compile-internal.h (generate_c_for_variable_locations):
2647 Return unique_xmalloc_ptr and update description.
2648
2649 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2650
2651 * corelow.c (core_target::get_core_register_section): Rename
2652 min_size to section_min_size.
2653
2654 2018-08-09 Jim Wilson <jimw@sifive.com>
2655
2656 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2657 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2658 * NEWS: Mention new GNU/Linux RISC-V target.
2659 * configure.host: Add riscv*-*-linux*.
2660 * configure.nat: Add riscv*.
2661 * configure.tgt: Add riscv*-*-linux*.
2662 * riscv-linux-nat.c: New file.
2663 * riscv-linux-tdep.c: New file.
2664
2665 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2666
2667 * infrun.c (resume): Make static, add forward declaration.
2668 (proceed): Update header comment.
2669 * infrun.h (resume): Delete declaration.
2670
2671 2018-08-09 Tom Tromey <tom@tromey.com>
2672
2673 * riscv-tdep.h: Minor formatting fixes.
2674
2675 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2676
2677 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2678 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2679 (test_mkdir_recursive): Likewise.
2680 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2681
2682 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2683
2684 * valarith.c (value_subscripted_rvalue): If an array is not in
2685 memory, and we don't know the upper bound, then we can't know that
2686 the requested element exists or not.
2687
2688 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2689
2690 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2691 (target_options_to_string): Add comment.
2692
2693 2018-08-08 Tom Tromey <tom@tromey.com>
2694
2695 * unittests/scoped_mmap-selftests.c: Check result of "write".
2696
2697 2018-08-08 Jim Wilson <jimw@sifive.com>
2698
2699 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2700 (decode_register_index_short): New.
2701 (decode_j_type_insn, decode_cj_type_insn): New.
2702 (decode_b_type_insn, decode_cb_type_insn): New.
2703 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2704 local xlen. Check xlen when decoding ambiguous compressed insns. In
2705 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2706 is_c_sw_insn instead of is_sw_insn.
2707 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2708 (riscv_software_single_step): New.
2709 * riscv-tdep.h (riscv_software_single_step): Declare.
2710
2711 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2712 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2713
2714 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2715
2716 PR gdb/18050:
2717 * target.c (dispose_inferior): Don't dispose of inferiors that are
2718 already killed.
2719
2720 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2721
2722 * remote.c (remote_target::download_tracepoint): Change char* to
2723 const char*.
2724
2725 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2726
2727 * target.h (target_options_to_string): Return an std::string.
2728 * target.c (str_comma_list_concat_elem): Return void, use
2729 std::string.
2730 (do_option): Likewise.
2731 (target_options_to_string): Return an std::string.
2732 * linux-nat.c (linux_nat_target::wait): Adjust.
2733 * target-debug.h (target_debug_print_options): Adjust.
2734
2735 2018-08-07 Tom Tromey <tom@tromey.com>
2736
2737 * Makefile.in (CPPFLAGS): New variable.
2738 (INTERNAL_CPPFLAGS): Use it.
2739
2740 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * NEWS: Mention the index cache.
2743
2744 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2745
2746 * common/pathstuff.h (get_standard_cache_dir): New.
2747 * common/pathstuff.c (get_standard_cache_dir): New.
2748 * build-id.h (build_id_to_string): New.
2749 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2750 DEBUG_STR_SUFFIX): Move to here.
2751 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2752 DEBUG_STR_SUFFIX): Move from there.
2753 (write_psymtabs_to_index): Make non-static, add basename
2754 parameter. Write to temporary files, rename when done.
2755 (save_gdb_index_command): Adjust call to
2756 write_psymtabs_to_index.
2757 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2758 field.
2759 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2760 (get_gdb_index_contents_from_cache): New.
2761 (get_gdb_index_contents_from_cache_dwz): New.
2762 (dwarf2_initialize_objfile): Read index from cache.
2763 (dwarf2_build_psymtabs): Save to index.
2764 * dwarf-index-cache.h: New file.
2765 * dwarf-index-cache.c: New file.
2766 * dwarf-index-write.h: New file.
2767
2768 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * gnulib/aclocal.m4: Re-generate.
2771 * gnulib/config.in: Re-generate.
2772 * gnulib/configure: Re-generate.
2773 * gnulib/import/Makefile.am: Re-generate.
2774 * gnulib/import/Makefile.in: Re-generate.
2775 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2776 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2777 * gnulib/import/m4/mkdir.m4: New file.
2778 * gnulib/import/mkdir.c: New file.
2779 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2780 module.
2781
2782 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2783
2784 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2785 * common/scoped_mmap.c: New file.
2786 * common/scoped_mmap.h (destroy): New method.
2787 (~scoped_mmap, reset): Use destroy.
2788 (scoped_mmap): New move constructor.
2789 (mmap_file): New declaration.
2790 * unittests/scoped_mmap-selftests.c (test_normal,
2791 test_invalid_filename, run_tests): New functions.
2792 (_initialize_scoped_mmap_selftests): Register selftest.
2793
2794 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2795
2796 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2797 (read_gdb_index_from_buffer): ... this. Remove section
2798 parameter, add buffer parameter.
2799 (get_gdb_index_contents_ftype,
2800 get_gdb_index_contents_dwz_ftype): New typedefs.
2801 (dwarf2_read_gdb_index): Add callback parameters to get the
2802 index contents.
2803 (get_gdb_index_contents_from_section): New.
2804 (dwarf2_initialize_objfile): Update call to
2805 dwarf2_read_gdb_index.
2806
2807 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2808
2809 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2810 (gdb_open_cloexec): Likewise.
2811 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2812 (commandline_from_pid): Likewise.
2813 (linux_xfer_osdata_threads): Likewise.
2814 (linux_xfer_osdata_fds): Likewise.
2815 * ada-lang.c (is_package_name): Likewise.
2816 * auxv.c (procfs_xfer_auxv): Likewise.
2817 * breakpoint.c (print_one_breakpoint_location): Use
2818 uiout::field_fmt.
2819 (print_one_catch_solib): Use string_printf.
2820 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2821 (add_pe_forwarded_sym): Likewise.
2822 * dwarf2read.c (create_type_unit_group): Likewise.
2823 (build_error_marker_type): Likewise.
2824 * infcall.c (get_function_name): Likewise.
2825 * valprint.c (print_converted_chars_to_obstack): Likewise.
2826 * xtensa-tdep.c (xtensa_register_type): Likewise.
2827
2828 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * remote.c (remote_target::download_tracepoint): Fix format
2831 string errors.
2832
2833 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2834
2835 * tracefile.c: Include common/byte-vector.h.
2836 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2837 with trace_regblock_size if needed. Update uses of buf.
2838
2839 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2840
2841 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2842 std::vector<unsigned char>.
2843 * tracepoint.c (collection_list::collection_list): Remove
2844 m_regs_mask initializer from initializer list. Resize
2845 m_regs_mask using the largest remote register number.
2846 (collection_list::add_remote_register): Remove size check on
2847 m_regs_mask. Use at to access element.
2848 (collection_list::stringify): Change type of temp_buf to
2849 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2850 stringify the register mask. Use pack_hex_byte for the register
2851 mask.
2852
2853 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2854
2855 * tracepoint.h (class collection_list) <add_register>: Remove.
2856 <add_remote_register, add_ax_registers, add_local_register>:
2857 Declare.
2858 <add_memrange>: Add scope parameter.
2859 * tracepoint.c (encode_actions_1): Likewise.
2860 (collection_list::add_register): Rename to ...
2861 (collection_list::add_remote_register): ... this. Update
2862 comment.
2863 (collection_list::add_ax_registers, add_local_register): New
2864 methods.
2865 (collection_list::add_memrange): Add scope parameter. Call
2866 add_local_register instead of add_register.
2867 (finalize_tracepoint_aexpr): New function.
2868 (collection_list::collect_symbol): Update calls to add_memrange.
2869 Call add_local_register instead of add_register. Call
2870 add_ax_registers. Call finalize_tracepoint_aexpr.
2871 (encode_actions_1): Get remote regnos for $reg action. Call
2872 add_remote_register, add_ax_registers, and add_local_register.
2873 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2874 (validate_actionline): Call finalize_tracepoint_aexpr.
2875
2876 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2877
2878 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2879 Replace array buf with gdb::char_vector buf, of size
2880 get_remote_packet_size (). Replace references to buf and
2881 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2882 and xsnprintf with snprintf. Raise errors if the buffer is too
2883 small.
2884
2885 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2886
2887 * remote.c (remote_target::download_tracepoint): Fix the has_more
2888 predicate in the QTDP action list iteration.
2889
2890 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2891
2892 * remote.c (remote_target::download_tracepoint): Fix indentation
2893 in for block.
2894
2895 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2896
2897 * proc-api.c (_initialize_proc_api): Remove c, unused.
2898 * procfs.c (procfs_init_inferior): Remove signals, unused.
2899 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2900 unused.
2901
2902 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2903 Andrew Burgess <andrew.burgess@embecosm.com>
2904
2905 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2906 'W_STOPCODE (0)' as this could be ambiguous.
2907
2908 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2909
2910 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2911 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2912 "ai_socktype").
2913
2914 2018-08-02 Tom Tromey <tom@tromey.com>
2915
2916 PR symtab/16842.
2917 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2918 symbols.
2919 (process_structure_scope): Likewise.
2920
2921 2018-08-02 Xavier Roirand <roirand@adacore.com>
2922
2923 PR gdb/22629:
2924 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2925 kill inferior.
2926
2927 2018-08-02 Tom Tromey <tom@tromey.com>
2928
2929 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2930 (darwin_suspend_inferior, darwin_resume_inferior)
2931 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2932 (darwin_check_new_threads): Check result of get_darwin_inferior.
2933
2934 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2935
2936 GDB 8.1.1 released.
2937
2938 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2939
2940 * varobj.c (varobj_get_path_expr_parent): Report an error if
2941 parent is a dynamic varobj.
2942
2943 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2944
2945 * gnulib/aclocal.m4: Re-generate.
2946 * gnulib/config.in: Re-generate.
2947 * gnulib/configure: Re-generate.
2948 * gnulib/import/Makefile.in: Re-generate.
2949 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2950 * gnulib/import/m4/onceonly.m4: Re-generate.
2951
2952 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * target-descriptions.c (struct xml_test_tdesc): New.
2955 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2956 (record_xml_tdesc): Update.
2957 (maintenance_check_xml_descriptions): Update.
2958 * target-descriptions.h (record_xml_tdesc): Update comment.
2959
2960 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2961
2962 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2963 checking array bounds are defined.
2964
2965 2018-07-30 Tom Tromey <tom@tromey.com>
2966
2967 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2968 irreflexivity violation.
2969
2970 2018-07-30 Tom Tromey <tom@tromey.com>
2971
2972 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2973 * value.c (unpack_long): Remove lint code.
2974 * valops.c (value_ind): Remove lint code.
2975 * valarith.c (value_x_binop, value_x_unop, value_equal)
2976 (value_pos): Remove lint code.
2977
2978 2018-07-28 Tom de Vries <tdevries@suse.de>
2979
2980 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2981 with undefined upper bound as <optimized out>.
2982
2983 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2984
2985 * gcore.in: Rename variable "name" to "prefix". Expand
2986 "usage" text.
2987
2988 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2989
2990 * windows-nat.c (windows_nat_target::create_inferior): Update to
2991 call close() in global namespace.
2992
2993 2018-07-26 Tom Tromey <tom@tromey.com>
2994
2995 * dwarf-index-write.c (add_address_entry): Don't add objfile
2996 offsets.
2997 * dbxread.c (find_stab_function): Rename from
2998 find_stab_function_addr. Return a bound_minimal_symbol.
2999 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3000 Don't add objfile offsets.
3001 (end_psymtab): Use raw_text_low, raw_text_high,
3002 MSYMBOL_VALUE_RAW_ADDRESS.
3003 (read_ofile_symtab): Update.
3004 (process_one_symbol): Update.
3005 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3006 offsets.
3007 (dw2_relocate): Remove.
3008 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3009 searching addrmap.
3010 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3011 Update.
3012 (process_psymtab_comp_unit_reader, add_partial_symbol)
3013 (add_partial_subprogram, dwarf2_ranges_read): Update.
3014 (load_partial_dies): Update.
3015 (add_address_entry): Don't add objfile offsets.
3016 (dwarf2_build_include_psymtabs): Update.
3017 (create_addrmap_from_aranges): Don't add objfile offsets.
3018 (dw2_find_pc_sect_compunit_symtab): Update.
3019 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3020 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3021 Update.
3022 (parse_partial_symbols): Don't add objfile offsets. Use
3023 raw_text_low, raw_text_high. Update.
3024 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3025 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3026 or call 'relocate' quick function. Clear psymbol_map.
3027 * psympriv.h (struct partial_symbol) <address>: Add section
3028 offset.
3029 <set_unrelocated_address>: Rename from set_address.
3030 <raw_text_low, raw_text_high>: New methods.
3031 <text_low, text_high>: Add objfile parameter.
3032 (add_psymbol_to_bcache): Add 'section' parameter. Call
3033 set_unrelocated_address.
3034 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3035 (find_pc_psymbol): Update.
3036 (fixup_psymbol_section, relocate_psymtabs): Remove.
3037 (dump_psymtab, psym_functions): Update.
3038 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3039 parameter.
3040 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3041 (start_psymtab_common): Update.
3042 * symfile-debug.c (debug_qf_relocate): Remove.
3043 (debug_sym_quick_functions): Update.
3044 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3045 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3046 Update.
3047
3048 2018-07-26 Tom Tromey <tromey@redhat.com>
3049
3050 * dbxread.c (end_psymtab): Use text_high_valid and
3051 text_low_valid.
3052 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3053 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3054 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3055 Update comment.
3056 <text_low_valid, text_high_valid>: New fields.
3057 <set_text_low, set_text_high>: Update.
3058 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3059
3060 2018-07-26 Tom Tromey <tom@tromey.com>
3061
3062 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3063 Update.
3064 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3065 textlow and texthigh fields.
3066 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3067 Update.
3068 * mdebugread.c (parse_lines, parse_partial_symbols)
3069 (psymtab_to_symtab_1): Update.
3070 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3071 Rename fields. Update comment. Now private.
3072 <text_low, text_high, set_text_low, set_text_high>: New methods.
3073 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3074 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3075 (start_psymtab_common, maintenance_info_psymtabs)
3076 (maintenance_check_psymtabs): Update.
3077 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3078 texthigh fields.
3079 (scan_xcoff_symtab): Update.
3080
3081 2018-07-26 Tom Tromey <tromey@redhat.com>
3082
3083 * psympriv.h (struct partial_symbol) <unrelocated_address,
3084 address, set_address>: New methods.
3085 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3086 (fixup_psymbol_section, relocate_psymtabs): Update.
3087 (print_partial_symbols): Add 'objfile' parameter. Update.
3088 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3089 Update.
3090
3091 2018-07-26 Tom Tromey <tom@tromey.com>
3092
3093 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3094 (debug_names::write_psymbols): Update.
3095 * psympriv.h (struct partial_symbol): Derive from
3096 general_symbol_info.
3097 <obj_section>: New method.
3098 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3099 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3100 (find_pc_sect_psymbol, fixup_psymbol_section)
3101 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3102 (print_partial_symbols, recursively_search_psymtabs)
3103 (compare_psymbols, psymbol_hash, psymbol_compare)
3104 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3105 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3106
3107 2018-07-26 Tom Tromey <tromey@redhat.com>
3108
3109 * dbxread.c (end_psymtab): Remove dead code.
3110
3111 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3112
3113 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3114 DWARF unwinders are disabled.
3115 * dwarf2-frame.c: Add dwarf2read.h include.
3116 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3117 disabled.
3118 (dwarf2_frame_unwinders_enabled_p): Define.
3119 (show_dwarf_unwinders_enabled_p): New function.
3120 (_initialize_dwarf2_frame): Register switch to control DWARF
3121 unwinder use.
3122 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3123 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3124 (show_dwarf_cmdlist): Remove static keyword.
3125 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3126 (show_dwarf_cmdlist): Declare.
3127 * NEWS: Document new feature.
3128
3129 2018-07-26 Tom de Vries <tdevries@suse.de>
3130
3131 PR breakpoints/23366
3132 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3133
3134 2018-07-26 Tom de Vries <tdevries@suse.de>
3135
3136 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3137 DW_AT_count can't be translated to a dynamic prop.
3138
3139 2018-07-25 Tom de Vries <tdevries@suse.de>
3140
3141 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3142 try/catch.
3143
3144 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3145
3146 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3147
3148 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3149
3150 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3151
3152 2018-07-24 Keith Seitz <keiths@redhat.comt
3153
3154 PR symtab/23010
3155 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3156 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3157 instead of add_symbol_to_list.
3158 (read_file_scope): Call prepare_one_comp_unit before reading
3159 any other DIEs.
3160
3161 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3162
3163 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3164
3165 2018-07-24 Tom Tromey <tom@tromey.com>
3166
3167 * utils.c (malloc, realloc, free): Don't declare.
3168 * configure, config.in: Rebuild.
3169 * configure.ac: Don't check for declarations of free, malloc, or
3170 realloc.
3171
3172 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3173
3174 * aarch64-linux-nat.c
3175 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3176 variable.
3177 * arm-linux-nat.c (fetch_regs): Likewise.
3178 (store_regs): Likewise.
3179 (fetch_vfp_regs): Likewise.
3180 (store_vfp_regs): Likewise.
3181 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3182 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3183 (arm_linux_nat_target::insert_watchpoint): Likewise.
3184 (arm_linux_nat_target::remove_watchpoint): Likewise.
3185 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3186 Likewise.
3187 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3188 Likewise.
3189 * ppc-linux-nat.c (fetch_register): Likewise.
3190 (fetch_all_gp_regs): Likewise.
3191 (fetch_ppc_registers): Likewise.
3192 (store_all_gp_regs): Likewise.
3193 (store_ppc_registers): Likewise.
3194 (hwdebug_insert_point): Likewise.
3195 (can_use_watchpoint_cond_accel): Likewise.
3196 * remote-sim.c (gdb_os_write_stdout): Likewise.
3197
3198 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3199 Tom Tromey <tom@tromey.com>
3200
3201 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3202 test for it.
3203 * configure: Rebuild.
3204
3205 2018-07-22 Tom Tromey <tom@tromey.com>
3206
3207 * regformats/regdat.sh: Define xmltarget_${name} inside
3208 #ifndef IN_PROCESS_AGENT.
3209
3210 2018-07-22 Tom Tromey <tom@tromey.com>
3211
3212 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3213
3214 2018-07-22 Tom Tromey <tom@tromey.com>
3215
3216 * symfile.c (reread_symbols): Notify iter, not objfile.
3217
3218 2018-07-22 Tom Tromey <tom@tromey.com>
3219
3220 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3221 Use arch_ops.
3222 (ravenscar_thread_target::prepare_to_store): Likewise.
3223
3224 2018-07-22 Tom Tromey <tom@tromey.com>
3225
3226 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3227 unused variable. Call value_fetch_lazy when needed.
3228 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3229 Remove unused variable. Call value_fetch_lazy when needed.
3230
3231 2018-07-22 Tom Tromey <tom@tromey.com>
3232
3233 * m32c-tdep.c (mark_dma): Return void.
3234 (make_regs): Remove unused declarations.
3235
3236 2018-07-22 Tom Tromey <tom@tromey.com>
3237
3238 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3239 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3240 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3241 bkscm_get_valid_block_smob_arg_unsafe for effect.
3242
3243 2018-07-22 Tom Tromey <tom@tromey.com>
3244
3245 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3246 value_type.
3247
3248 2018-07-22 Tom Tromey <tom@tromey.com>
3249
3250 * windows-nat.c (saved_context): Conditionally define.
3251 * remote.c (remote_target::remote_btrace_maybe_reopen):
3252 Conditionally declare "warned".
3253 * inflow.c (sigquit_ours): Conditionally define.
3254 (new_tty): Move "tty" declaration inside #if.
3255 * guile/guile.c (guile_datadir): Conditionally define.
3256 * charset.c (set_be_le_names): Move some declarations inside #if.
3257 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3258 #if.
3259 (parse_xml_btrace_conf): Likewise.
3260
3261 2018-07-22 Tom Tromey <tom@tromey.com>
3262
3263 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3264
3265 2018-07-22 Tom Tromey <tom@tromey.com>
3266
3267 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3268 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3269 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3270 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3271 * stack.c (frame_apply_level_command): Remove unused variable.
3272 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3273 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3274 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3275 unused variable.
3276 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3277 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3278 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3279 variable.
3280 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3281 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3282 variable.
3283 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3284 Remove unused variable.
3285 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3286 variable.
3287 * common/tdesc.c (print_xml_feature::visit): Remove unused
3288 variable.
3289 * compile/compile-object-load.c (store_regs): Remove unused
3290 variables.
3291 * complaints.c (clear_complaints): Remove unused variable.
3292 * corelow.c (core_target_open): Remove unused variable.
3293 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3294 variable.
3295 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3296 variable.
3297 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3298 variable.
3299 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3300 variable.
3301 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3302 variable.
3303 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3304 variable.
3305 * ia64-tdep.c (examine_prologue): Remove unused variable.
3306 * infcall.c (run_inferior_call): Remove unused variable.
3307 * inferior.c (exit_inferior): Remove unused variable.
3308 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3309 * linespec.c (decode_line_2): Remove unused variable.
3310 * linux-nat.c (super_close): Remove.
3311 * linux-tdep.c (linux_info_proc): Remove unused variable.
3312 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3313 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3314 Remove unused variable.
3315 * parse.c (find_minsym_type_and_address): Remove unused variable.
3316 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3317 variable.
3318 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3319 variable.
3320 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3321 variables.
3322 * record-btrace.c (record_btrace_target::store_registers): Remove
3323 unused variable.
3324 (cmd_show_record_btrace_cpu): Remove unused variable.
3325 * riscv-tdep.c (riscv_register_reggroup_p)
3326 (riscv_push_dummy_call, riscv_return_value): Remove unused
3327 variable.
3328 * rust-exp.y (literal): Remove unused variable.
3329 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3330 unused variable.
3331 <STRUCTOP_ANONYMOUS>: Likewise.
3332 * s390-linux-tdep.c (s390_linux_init_abi_31)
3333 (s390_linux_init_abi_64): Remove unused variable.
3334 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3335 (file_select_thread, net_windows_open, _initialize_ser_windows):
3336 Remove unused variables.
3337 * symtab.c (find_pc_sect_line): Remove unused variable.
3338 * target-memory.c (compute_garbled_blocks): Remove unused
3339 variable.
3340 (target_write_memory_blocks): Remove unused variable.
3341 * target.c (target_stack::unpush): Remove unused variables.
3342 * tracepoint.c (start_tracing, all_tracepoint_actions)
3343 (merge_uploaded_trace_state_variables)
3344 (print_one_static_tracepoint_marker): Remove unused variable.
3345 * unittests/basic_string_view/element_access/char/1.cc (test01):
3346 Remove unused variable.
3347 * windows-nat.c (windows_continue, windows_add_all_dlls)
3348 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3349 Remove unused variables.
3350
3351 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3352
3353 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3354 attr_profile in HAVE_ELF.
3355 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3356 HAVE_ELF.
3357
3358 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3359
3360 * frame.c (frame_register_unwind): Change parameter name.
3361 (frame_unwind_register): Likewise.
3362 (frame_unwind_register_value): Likewise.
3363 (frame_unwind_register_signed): Likewise.
3364 (frame_unwind_register_unsigned): Likewise.
3365 * frame.h (frame_register_unwind): Likewise.
3366 (frame_unwind_register): Likewise.
3367 (frame_unwind_register_value): Likewise.
3368 (frame_unwind_register_signed): Likewise.
3369 (frame_unwind_register_unsigned): Likewise.
3370 (frame_unwind_arch): Likewise.
3371
3372 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3373
3374 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3375 ISA maintenance.
3376
3377 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3378
3379 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3380 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3381 hand.
3382
3383 2018-07-20 Keith Seitz <keiths@redhat.com>
3384
3385 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3386 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3387 m_compunit_symtab, m_language>: Add "m_" prefix.
3388 Update all uses.
3389 * buildsym.c: Update all uses.
3390
3391 2018-07-20 Tom Tromey <tom@tromey.com>
3392
3393 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3394 * buildsym.h (record_line_ftype): Remove typedef.
3395
3396 2018-07-20 Tom Tromey <tom@tromey.com>
3397
3398 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3399 (end_expandable_symtab): Likewise.
3400 (end_symtab_get_static_block): Likewise.
3401 (end_symtab_from_static_block): Likewise.
3402 * buildsym-legacy.c (augment_type_symtab): Remove.
3403 (end_expandable_symtab): Remove.
3404 (end_symtab_get_static_block): Remove.
3405 (end_symtab_from_static_block): Remove.
3406
3407 2018-07-20 Tom Tromey <tom@tromey.com>
3408
3409 * dwarf2read.c: Include buildsym.h.
3410 (struct dwarf2_cu) <builder>: New method.
3411 (fixup_go_packaging): Update.
3412 (process_full_comp_unit, process_full_type_unit): Update. Don't
3413 use scoped_free_pendings.
3414 (using_directives): Add "cu" parameter, remove "language".
3415 (read_import_statement, setup_type_unit_groups, )
3416 (read_func_scope, read_lexical_block_scope)
3417 (dwarf2_record_block_ranges, read_namespace): Update.
3418 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3419 (lnp_state_machine::handle_end_sequence): Update.
3420 (class lnp_state_machine) <m_cu>: New member.
3421 <m_record_line_callback>: Remove.
3422 <m_currently_recording_lines>: New member.
3423 (lnp_state_machine::handle_set_file): Update.
3424 (noop_record_line): Remove.
3425 (dwarf_record_line_p): Add cu parameter.
3426 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3427 (lnp_state_machine::record_line)
3428 (lnp_state_machine::lnp_state_machine)
3429 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3430 (dwarf_decode_lines): Update.
3431 (dwarf2_start_subfile): Add cu parameter.
3432 (dwarf2_start_symtab, new_symbol): Update.
3433 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3434 Remove dwarf2_per_objfile parameter.
3435 (dwarf_decode_macros): Update.
3436
3437 2018-07-20 Tom Tromey <tom@tromey.com>
3438
3439 * stabsread.c (define_symbol): Update.
3440 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3441 * dwarf2read.c (new_symbol): Update.
3442 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3443 * cp-namespace.c: Include buildsym.h.
3444 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3445 * buildsym-legacy.c (get_buildsym_compunit): New function.
3446
3447 2018-07-20 Tom Tromey <tom@tromey.com>
3448
3449 * xcoffread.c: Include buildsym-legacy.h.
3450 * windows-nat.c: Include buildsym-legacy.h.
3451 * stabsread.c: Include buildsym-legacy.h.
3452 * mdebugread.c: Include buildsym-legacy.h.
3453 * buildsym-legacy.h: New file.
3454 * buildsym-legacy.c: New file, from buildsym.c.
3455 * go32-nat.c: Include buildsym-legacy.h.
3456 * dwarf2read.c: Include buildsym-legacy.h.
3457 * dbxread.c: Include buildsym-legacy.h.
3458 * cp-namespace.c: Include buildsym-legacy.h.
3459 * coffread.c: Include buildsym-legacy.h.
3460 * buildsym.h: Move some contents to buildsym-legacy.h.
3461 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3462 buildsym-legacy.c.
3463 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3464
3465 2018-07-20 Tom Tromey <tom@tromey.com>
3466
3467 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3468 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3469 (buildsym_compunit::buildsym_compunit)
3470 (buildsym_compunit::~buildsym_compunit)
3471 (buildsym_compunit::get_macro_table): Define.
3472
3473 2018-07-20 Tom Tromey <tom@tromey.com>
3474
3475 * buildsym.c (reset_symtab_globals): Remove.
3476 (buildsym_compunit::end_symtab_from_static_block): Update.
3477 (buildsym_compunit::augment_type_symtab): Update.
3478 (end_symtab_from_static_block): Call free_buildsym_compunit.
3479 (augment_type_symtab, end_symtab, end_expandable_symtab):
3480 Likewise.
3481
3482 2018-07-20 Tom Tromey <tom@tromey.com>
3483
3484 * arch-utils.c: Do not include buildsym.h.
3485 * mipsread.c: Do not include buildsym.h.
3486 * machoread.c: Do not include buildsym.h.
3487 * elfread.c: Do not include buildsym.h.
3488
3489 2018-07-20 Tom Tromey <tom@tromey.com>
3490
3491 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3492 initialization.
3493 (buildsym_compunit): Add new constructor.
3494 (struct buildsym_compunit) <get_last_source_file, finish_block,
3495 record_block_range, start_subfile, patch_subfile_names,
3496 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3497 set_last_source_start_addr, get_last_source_start_addr,
3498 get_local_using_directives, set_local_using_directives,
3499 get_global_using_directives, outermost_context_p,
3500 get_current_context_stack, get_context_stack_depth,
3501 get_current_subfile, get_local_symbols, get_file_symbols,
3502 get_global_symbols, record_debugformat, record_producer,
3503 push_context, pop_context, end_symtab_get_static_block,
3504 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3505 New public methods.
3506 <record_pending_block, finish_block_internal, make_blockvector,
3507 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3508 private methods.
3509 Update all users.
3510
3511 2018-05-22 Tom Tromey <tom@tromey.com>
3512
3513 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3514 parameter.
3515 (finish_block_internal): Update.
3516
3517 2018-07-20 Tom Tromey <tom@tromey.com>
3518
3519 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3520 parameter.
3521 (finish_block_internal): Update.
3522
3523 2018-07-20 Tom Tromey <tom@tromey.com>
3524
3525 * buildsym.h (EXTERN): Don't define or undef.
3526 * buildsym.c (EXTERN): Don't define.
3527
3528 2018-07-20 Tom Tromey <tom@tromey.com>
3529
3530 * buildsym.c: Remove TODO comment.
3531
3532 2018-07-20 Tom Tromey <tom@tromey.com>
3533
3534 * coffread.c (coff_symtab_read): Update.
3535 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3536 (xcoff_new_init): Update.
3537 * mipsread.c (mipscoff_new_init): Update.
3538 * mdebugread.c (mdebug_build_psymtabs): Update.
3539 * elfread.c (elf_new_init): Update.
3540 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3541 Update.
3542 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3543 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3544 (stabsect_build_psymtabs): Update.
3545 * buildsym.h (buildsym_init): Don't declare.
3546 * buildsym.c: Update comment.
3547 (prepare_for_building): Remove.
3548 (start_symtab, restart_symtab): Update.
3549 (reset_symtab_globals): Update comment.
3550 (buildsym_init): Remove.
3551
3552 2018-07-20 Tom Tromey <tom@tromey.com>
3553
3554 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3555 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3556 (read_enum_type, common_block_start, common_block_end)
3557 (cleanup_undefined_types_1, finish_global_stabs): Update.
3558 * mdebugread.c (psymtab_to_symtab_1): Update.
3559 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3560 (read_lexical_block_scope, new_symbol): Update.
3561 * dbxread.c (process_one_symbol): Update.
3562 * coffread.c (coff_symtab_read, process_coff_symbol)
3563 (coff_read_enum_type): Update.
3564 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3565 declare.
3566 (get_local_symbols, get_file_symbols, get_global_symbols): New
3567 functions.
3568 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3569 m_global_symbols.
3570 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3571 (~scoped_free_pendings): Update.
3572 (finish_block, prepare_for_building, reset_symtab_globals)
3573 (end_symtab_get_static_block, end_symtab_with_blockvector)
3574 (augment_type_symtab, push_context): Update.
3575 (get_local_symbols, get_file_symbols, get_global_symbols): New
3576 functions.
3577 (buildsym_init): Update.
3578
3579 2018-07-20 Tom Tromey <tom@tromey.com>
3580
3581 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3582 (process_full_type_unit): Likewise.
3583 (dwarf2_start_symtab): Set list_in_scope.
3584
3585 2018-07-20 Tom Tromey <tom@tromey.com>
3586
3587 * dwarf2read.c (process_psymtab_comp_unit_reader)
3588 (build_type_psymtabs_reader): Do not set list_in_scope.
3589
3590 2018-07-20 Tom Tromey <tom@tromey.com>
3591
3592 * buildsym.c (free_pendings): Remove.
3593 (add_symbol_to_list, scoped_free_pendings)
3594 (finish_block_internal, buildsym_init): Update.
3595
3596 2018-07-20 Tom Tromey <tom@tromey.com>
3597
3598 * xcoffread.c (read_xcoff_symtab): Update.
3599 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3600 Update.
3601 * dbxread.c (process_one_symbol): Update.
3602 * coffread.c (coff_symtab_read): Update.
3603 * buildsym.h (finish_block): Update.
3604 * buildsym.c (finish_block): Remove "listhead" argument.
3605 (end_symtab_get_static_block): Update.
3606
3607 2018-07-20 Tom Tromey <tom@tromey.com>
3608
3609 * buildsym.h (class scoped_free_pendings): Remove constructor.
3610 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3611 method.
3612 <m_pending_block_obstack, m_pending_blocks>: New members.
3613 (pending_block_obstack, pending_blocks): Remove.
3614 (scoped_free_pendings::scoped_free_pendings): Default.
3615 (~scoped_free_pendings): Update.
3616 (free_pending_blocks): Remove.
3617 (finish_block_internal, record_pending_block, make_blockvector)
3618 (end_symtab_get_static_block, augment_type_symtab, push_context)
3619 (buildsym_init): Update.
3620
3621 2018-07-20 Tom Tromey <tom@tromey.com>
3622
3623 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3624 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3625 members.
3626 (pending_addrmap, pending_addrmap_obstack)
3627 (pending_addrmap_interesting): Remove.
3628 (scoped_free_pendings, record_block_range, make_blockvector)
3629 (prepare_for_building, reset_symtab_globals, buildsym_init):
3630 Update.
3631
3632 2018-07-20 Tom Tromey <tom@tromey.com>
3633
3634 * xcoffread.c (process_linenos): Update.
3635 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3636 * mdebugread.c (psymtab_to_symtab_1): Update.
3637 * dwarf2read.c (setup_type_unit_groups)
3638 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3639 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3640 * dbxread.c (process_one_symbol): Update.
3641 * coffread.c (coff_symtab_read, enter_linenos)
3642 (process_coff_symbol): Update.
3643 * buildsym.h (current_subfile): Don't declare.
3644 (get_current_subfile): Declare.
3645 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3646 member.
3647 (start_subfile, free_buildsym_compunit, push_subfile)
3648 (prepare_for_building, start_symtab): Update.
3649 (get_current_subfile): New function.
3650
3651 2018-07-20 Tom Tromey <tom@tromey.com>
3652
3653 * coffread.c (coff_symtab_read): Update.
3654 * xcoffread.c (read_xcoff_symtab): Update.
3655 * dwarf2read.c (new_symbol): Update.
3656 (read_func_scope, read_lexical_block_scope): Update.
3657 * dbxread.c (process_one_symbol): Update.
3658 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3659 (outermost_context_p): Remove macro.
3660 (outermost_context_p, get_current_context_stack)
3661 (get_context_stack_depth): Declare.
3662 (pop_context): Return struct context_stack.
3663 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3664 member.
3665 (context_stack_size): Remove.
3666 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3667 (prepare_for_building, end_symtab_get_static_block)
3668 (augment_type_symtab, push_context): Update.
3669 (pop_context): Return struct context_stack.
3670 (outermost_context_p, get_current_context_stack)
3671 (get_context_stack_depth): New functions.
3672 (buildsym_init): Update.
3673
3674 2018-07-20 Tom Tromey <tom@tromey.com>
3675
3676 * rust-exp.y: Now a pure parser. Update all rules.
3677 (%union): Move earlier.
3678 (current_parser, work_obstack): Remove globals.
3679 (rust_parser, ~rust_parser): Update.
3680 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3681 lex_character, lex_number, lex_string, lex_identifier,
3682 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3683 convert_name, convert_params_to_expression,
3684 convert_ast_to_expression, ast_basic_type, ast_operation,
3685 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3686 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3687 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3688 ast_array_type, ast_slice_type, ast_reference_type,
3689 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3690 (rust_parse): Update.
3691 (rustyyerror, rustyylex): Add parser parameter.
3692 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3693 (rust_lex_stringish_test, rust_lex_test_sequence)
3694 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3695 (rust_lex_test_push_back, rust_lex_tests): Update.
3696
3697 2018-07-19 Pedro Alves <palves@redhat.com>
3698
3699 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3700 gdb::unique_xmalloc_ptr.
3701 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3702 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3703 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3704 copy-initialization.
3705 * guile/scm-pretty-print.c (ppscm_print_children): Use
3706 gdb::unique_xmalloc_ptr instead of cleanups.
3707 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3708 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3709 gdb::unique_xmalloc_ptr.
3710 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3711 Adjust to use gdb::unique_xmalloc_ptr.
3712 * guile/scm-utils.c (extract_arg): Adjust.
3713 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3714 gdb::unique_xmalloc_ptr instead of a cleanup.
3715
3716 2018-07-19 Tom Tromey <tom@tromey.com>
3717
3718 * utils.c (do_value_free_to_mark)
3719 (make_cleanup_value_free_to_mark): Remove.
3720 * utils.h (make_cleanup_value_free_to_mark): Remove.
3721
3722 2018-07-19 Pedro Alves <palves@redhat.com>
3723
3724 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3725 forwarding reference.
3726
3727 2018-07-18 Pedro Alves <palves@redhat.com>
3728
3729 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3730 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3731 cleanup.
3732
3733 2018-07-18 Pedro Alves <palves@redhat.com>
3734
3735 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3736 exceptions.
3737 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3738 (gdbscm_wrap): New.
3739 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3740 directly instead of a cleanup.
3741 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3742 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3743 (vlscm_binop_gdbthrow): New, factored out from ...
3744 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3745 (vlscm_rich_compare): Use gdbscm_wrap.
3746 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3747 instead of a cleanup.
3748 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3749 cleanup.
3750 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3751 Use xfree directly instead of a cleanup.
3752 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3753 Adjust to use gdbscm_wrap and scoped_value_mark.
3754 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3755 (gdbscm_value_address, gdbscm_value_dereference)
3756 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3757 scoped_value_mark.
3758 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3759 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3760 scoped_value_mark.
3761 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3762 gdbscm_wrap and scoped_value_mark.
3763 (gdbscm_value_to_string): Use xfree directly instead of a
3764 cleanup. Move 'buffer' unique_ptr to TRY scope.
3765 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3766 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3767 scoped_value_mark.
3768 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3769 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3770 scoped_value_mark.
3771 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3772 gdbscm_wrap.
3773
3774 2018-07-18 Tom de Vries <tdevries@suse.de>
3775
3776 * findvar.c (default_read_var_value): Also resolve dynamic type for
3777 LOC_OPTIMIZED_OUT vars.
3778
3779 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3780
3781 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3782 decoding.
3783
3784 2018-07-17 Tom Tromey <tom@tromey.com>
3785
3786 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3787 (compute_enum_list, pascm_set_param_value_x)
3788 (gdbscm_parameter_value): Update.
3789 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3790 (gdbscm_scm_to_host_string): Update.
3791 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3792 Update.
3793 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3794 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3795 * guile/scm-string.c (gdbscm_scm_to_string): Return
3796 unique_xmalloc_ptr.
3797 (gdbscm_scm_to_host_string): Likewise.
3798
3799 2018-07-17 Tom Tromey <tom@tromey.com>
3800
3801 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3802 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3803 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3804 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3805 unique_xmalloc_ptr.
3806
3807 2018-07-17 Tom Tromey <tom@tromey.com>
3808
3809 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3810 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3811 Update.
3812 * guile/scm-cmd.c (cmdscm_function): Update.
3813 * guile/scm-pretty-print.c
3814 (ppscm_print_exception_unless_memory_error): Update.
3815 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3816 Return unique_xmalloc_ptr.
3817
3818 2018-07-17 Tom Tromey <tom@tromey.com>
3819
3820 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3821 Use string_printf.
3822
3823 2018-07-17 Jim Wilson <jimw@sifive.com>
3824
3825 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3826 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3827 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3828 unecessary braces after EF_RISCV_RVC test. Delete call to
3829 set_gdbarch_decr_pc_after_break.
3830
3831 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3832 RISCV_LAST_FP_REGNUM + 1.
3833 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3834
3835 2018-07-17 Tom Tromey <tom@tromey.com>
3836
3837 * configure.ac: Remove --disable-gdbcli.
3838 * configure: Rebuild.
3839 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3840 (SUBDIR_CLI_CFLAGS): Remove.
3841 (SFILES): Use SUBDIR_CLI_SRCS.
3842 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3843
3844 2018-07-17 Tom Tromey <tom@tromey.com>
3845
3846 PR gdb/18624:
3847 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3848
3849 2018-07-16 Jim Wilson <jimw@sifive.com>
3850
3851 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3852
3853 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3856 variable.
3857 (libunwind_frame_sniffer): Likewise.
3858 (libunwind_frame_prev_register): Likewise.
3859 (libunwind_sigtramp_frame_sniffer): Likewise.
3860 * ia64-tdep.c (ia64_access_reg): Likewise.
3861 (ia64_access_rse_reg): Likewise.
3862 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3863 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3864
3865 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3866
3867 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3868
3869 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3870
3871 * remote-sim.c (gdbsim_target::close,
3872 gdbsim_target::mourn_inferior): Remove unused variables.
3873
3874 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3875
3876 * ia64-tdep.c (ktab_buf): New global.
3877 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3878 (get_kernel_table): Adjust.
3879
3880 2018-07-16 Tom Tromey <tom@tromey.com>
3881
3882 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3883 * dwarf2read.c (using_directives, new_symbol): Use
3884 outermost_context_p.
3885 * dbxread.c (process_one_symbol): Use outermost_context_p.
3886 * coffread.c (coff_symtab_read): Use outermost_context_p.
3887
3888 2018-07-16 Tom Tromey <tom@tromey.com>
3889
3890 * dwarf2read.c (using_directives, read_func_scope)
3891 (read_lexical_block_scope): Update.
3892 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3893 * buildsym.h (local_using_directives, global_using_directives):
3894 Don't declare.
3895 (get_local_using_directives, set_local_using_directives)
3896 (get_global_using_directives): Declare.
3897 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3898 m_global_using_directives>: New members.
3899 (finish_block_internal, prepare_for_building)
3900 (reset_symtab_globals, end_symtab_get_static_block)
3901 (push_context): Update.
3902 (get_local_using_directives, set_local_using_directives)
3903 (get_global_using_directives): New functions.
3904 (buildsym_init): Update.
3905
3906 2018-07-16 Tom Tromey <tom@tromey.com>
3907
3908 * xcoffread.c (xcoff_initial_scan): Don't call
3909 free_pending_blocks.
3910 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3911 * buildsym.h (class scoped_free_pendings): Add constructor.
3912 (free_pending_blocks): Don't declare.
3913 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3914 (free_pending_blocks): Now static.
3915
3916 2018-07-16 Tom Tromey <tom@tromey.com>
3917
3918 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3919 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3920 member.
3921 (struct subfile_stack): Remove.
3922 (subfile_stack): Remove.
3923 (push_subfile, pop_subfile, buildsym_init): Update.
3924
3925 2018-07-16 Tom Tromey <tom@tromey.com>
3926
3927 * buildsym.c (push_subfile): Use gdb_assert.
3928 (pop_subfile): Use gdb_assert.
3929
3930 2018-07-16 Tom Tromey <tom@tromey.com>
3931
3932 * buildsym.h (merge_symbol_lists): Remove.
3933 * buildsym.c (merge_symbol_lists): Remove.
3934
3935 2018-07-16 Tom Tromey <tom@tromey.com>
3936
3937 * stabsread.c (scan_file_globals): Update comment.
3938 * stabsread.h (scan_file_globals): Move from buildsym.h.
3939 * buildsym.h (scan_file_globals): Move to stabsread.h.
3940
3941 2018-07-16 Tom Tromey <tom@tromey.com>
3942
3943 * xcoffread.c (xcoff_new_init): Update.
3944 * mipsread.c (mipscoff_new_init): Update.
3945 * mdebugread.c (mdebug_build_psymtabs): Update.
3946 * elfread.c (elf_new_init): Update.
3947 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3948 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3949 * buildsym.h (buildsym_new_init): Don't declare.
3950 * buildsym.c (buildsym_new_init): Remove.
3951
3952 2018-07-16 Tom Tromey <tom@tromey.com>
3953
3954 * stabsread.h (within_function): Move from buildsym.h.
3955 * stabsread.c (start_stabs): Clear within_function.
3956 * coffread.c (coff_start_symtab): Clear within_function.
3957 * buildsym.h (within_function): Move to stabsread.h.
3958 * buildsym.c (prepare_for_building): Update.
3959
3960 2018-07-16 Tom Tromey <tom@tromey.com>
3961
3962 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3963 * dwarf2read.c (dwarf2_start_symtab): Don't set
3964 processing_gcc_compilation.
3965 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3966
3967 2018-07-16 Tom Tromey <tom@tromey.com>
3968
3969 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3970 (next_symbol_text_func): Move from buildsym.h.
3971 * stabsread.c (hashname): Move from buildsym.c.
3972 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3973 (next_symbol_text_func, hashname): Move to stabsread.h.
3974 * buildsym.c: Don't include bcache.h
3975 (hashname): Move to stasbread.c.
3976
3977 2018-07-16 Tom Tromey <tom@tromey.com>
3978
3979 * buildsym.h (context_stack_size): Don't declare.
3980 * buildsym.c (context_stack_size): New global.
3981
3982 2018-07-16 Tom Tromey <tom@tromey.com>
3983
3984 * dbxread.c (processing_acc_compilation): New global.
3985 * buildsym.h (processing_acc_compilation): Don't declare.
3986
3987 2018-07-16 Tom Tromey <tom@tromey.com>
3988
3989 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3990 * dbxread.c (read_ofile_symtab): Update.
3991 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3992 * buildsym.h (last_source_start_addr): Remove.
3993 (set_last_source_start_addr, get_last_source_start_addr):
3994 Declare.
3995 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3996 parameter.
3997 (struct buildsym_compunit) <m_last_source_start_addr>: New
3998 member.
3999 (prepare_for_building): Remove start_addr parameter.
4000 (start_symtab, restart_symtab, end_symtab_get_static_block)
4001 (end_symtab_with_blockvector): Update.
4002 (set_last_source_start_addr, get_last_source_start_addr): New
4003 functions.
4004
4005 2018-07-16 Tom Tromey <tom@tromey.com>
4006
4007 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4008 member.
4009 (have_line_numbers): Remove.
4010 (record_line, prepare_for_building, end_symtab_get_static_block)
4011 (augment_type_symtab): Update.
4012
4013 2018-07-16 Tom Tromey <tom@tromey.com>
4014
4015 * buildsym.c (~buildsym_compunit): Free the macro table.
4016 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4017 methods.
4018 <m_pending_macros>: New member.
4019 (pending_macros): Remove.
4020 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4021 (reset_symtab_globals, end_symtab_get_static_block)
4022 (end_symtab_with_blockvector, augment_type_symtab)
4023 (buildsym_init): Update.
4024
4025 2018-07-16 Tom Tromey <tom@tromey.com>
4026
4027 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4028 parameter.
4029 (buildsym_compunit::set_last_source_file): New method.
4030 <m_last_source_file>: New member.
4031 (prepare_for_building): Remove "name" parameter.
4032 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4033 (last_source_file): Remove.
4034 (set_last_source_file, get_last_source_file): Update.
4035
4036 2018-07-16 Tom Tromey <tom@tromey.com>
4037
4038 * buildsym.c (prepare_for_building): Add assert.
4039
4040 2018-07-16 Tom Tromey <tom@tromey.com>
4041
4042 * buildsym.c (~buildsym_compunit): Update.
4043 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4044 (start_subfile, patch_subfile_names)
4045 (end_symtab_with_blockvector): Update.
4046
4047 2018-07-16 Tom Tromey <tom@tromey.com>
4048
4049 * buildsym.c (struct buildsym_compunit): Add constructor,
4050 destructor, initializers.
4051 (start_buildsym_compunit): Remove.
4052 (free_buildsym_compunit): Use "delete".
4053 (start_symtab, restart_symtab): Use "new".
4054
4055 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4056
4057 * symfile.c (set_objfile_default_section_offset): Remove struct
4058 keyword.
4059
4060 2018-07-14 Stafford Horne <shorne@gmail.com>
4061
4062 * (Responsible Maintainers): Add myself as or1k maintainer.
4063
4064 2018-07-13 Tom Tromey <tom@tromey.com>
4065
4066 * symfile.c (set_objfile_default_section_offset): Use extra braces
4067 around initializer.
4068
4069 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4070
4071 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4072 non-branching basr.
4073
4074 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4075
4076 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4077 unittests/cli-utils-selftests.c
4078 * unittests/cli-utils-selftests.c: New file.
4079
4080 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4081
4082 * NEWS: Mention new commands. Mention change to 'thread apply'.
4083
4084 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4085
4086 * thread.c (thr_try_catch_cmd): New function.
4087 (thread_apply_all_command): Handle qcs flags.
4088 (thread_apply_command): Handle qcs flags.
4089 (taas_command): New function.
4090 (tfaas_command): New function.
4091 (_initialize_thread): Update to setup the new commands 'taas
4092 and 'tfaas'. Change doc string for 'thread apply'.
4093
4094 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4095
4096 * stack.c: (trailing_outermost_frame): New function, mostly
4097 extracted from backtrace_command_1.
4098 (leading_innermost_frame): New function.
4099 (backtrace_command_1): Update to call trailing_outermost_frame.
4100 (frame_apply_command_count): New function.
4101 (frame_apply_level_command): New function.
4102 (frame_apply_all_command): New function.
4103 (frame_apply_command): New function.
4104 (faas_command): New function.
4105 (frame_cmd_list): New variable.
4106 (_initialize_stack): Update to setup the new commands 'frame apply'
4107 and 'faas'.
4108
4109 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4110
4111 * cli-utils.c (number_or_range_parser::get_number): Only handle
4112 numbers or convenience var as numbers.
4113 (parse_flags): New function.
4114 (parse_flags_qcs): New function.
4115 (number_or_range_parser::finished): Ensure parsing end is detected
4116 before end of string.
4117 * cli-utils.h (parse_flags): New function.
4118 (parse_flags_qcs): New function.
4119 (number_or_range_parser): Remove m_finished bool.
4120 (number_or_range_parser::skip_range): Set m_in_range to false.
4121
4122 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4123
4124 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4125 on Windows.
4126
4127 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4128 Jan Kratochvil <jan.kratochvil@redhat.com>
4129 Paul Fertser <fercerpav@gmail.com>
4130 Tsutomu Seki <sekiriki@gmail.com>
4131 Pedro Alves <palves@redhat.com>
4132
4133 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4134 'unittests/parse-connection-spec-selftests.c'.
4135 (COMMON_SFILES): Add 'common/netstuff.c'.
4136 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4137 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4138 * common/netstuff.c: New file.
4139 * common/netstuff.h: New file.
4140 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4141 (wait_for_connect): Update comment. New parameter
4142 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4143 Use 'sock' directly instead of 'scb->fd'.
4144 (try_connect): New function, with code from 'net_open'.
4145 (net_open): Rewrite main loop to deal with multiple
4146 sockets/addresses. Handle IPv6-style hostnames; implement
4147 support for IPv6 connections.
4148 * unittests/parse-connection-spec-selftests.c: New file.
4149
4150 2018-07-11 Pedro Alves <palves@redhat.com>
4151
4152 PR gdb/23377
4153 * remote.c (remote_target::remote_detach_pid): Call
4154 set_current_process.
4155
4156 2018-07-11 Pedro Alves <palves@redhat.com>
4157
4158 * h8300-tdep.c (h8300_gdbarch_init): Remove
4159 set_gdbarch_ecoff_reg_to_regnum calls.
4160
4161 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4162
4163 PR c++/23373
4164 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4165 offsets/sizes for static members of a class/struct.
4166
4167 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4168
4169 * target-descriptions.c (tdesc_register_bitsize): Rename.
4170 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4171 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4172 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4173
4174 2018-07-10 Tom Tromey <tom@tromey.com>
4175
4176 * breakpoint.c (moribund_locations): Now static and a
4177 std::vector.
4178 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4179 (build_bpstat_chain, update_global_location_list)
4180 (breakpoint_retire_moribund): Update.
4181 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4182 VEC.
4183
4184 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4185
4186 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4187 (riscv_register_reggroup_p): Use new function, remove unneeded
4188 parenthesis.
4189 (riscv_push_dummy_call): Extend assert to compare against xlen or
4190 flen based on register type.
4191
4192 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4193
4194 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4195
4196 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4197
4198 * remote.c (show_hardware_watchpoint_limit): New function.
4199 (show_hardware_watchpoint_length_limit): New function.
4200 (show_hardware_breakpoint_limit): New function.
4201 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4202 where appropriate, update help text.
4203
4204 2018-07-09 Tom Tromey <tom@tromey.com>
4205
4206 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4207 (CLIBS): Don't mention NAT_CLIBS.
4208
4209 2018-07-09 Tom Tromey <tom@tromey.com>
4210
4211 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4212 (LIBGDB_OBS, clean mostlyclean): Update.
4213 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4214
4215 2018-07-09 Tom Tromey <tom@tromey.com>
4216
4217 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4218 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4219 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4220
4221 2018-07-09 Tom Tromey <tom@tromey.com>
4222
4223 * Makefile.in (ALLDEPFILES): Remove exec.c.
4224 (COMMON_OBS): Remove exec.o.
4225 (COMMON_SFILES): Add exec.c.
4226
4227 2018-07-09 Tom Tromey <tom@tromey.com>
4228
4229 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4230
4231 2018-07-09 Tom Tromey <tom@tromey.com>
4232
4233 * Makefile.in (clean mostlyclean): Remove stamp-version.
4234 (version.c): Depend on stamp-version.
4235 (stamp-version): New rule, from version.c rule.
4236
4237 2018-07-09 Tom Tromey <tom@tromey.com>
4238
4239 * Makefile.in (init.c): Depend on stamp-init.
4240 (stamp-init): New rule, from init.c rule.
4241 (clean mostlyclean): Remove stamp-init.
4242
4243 2018-07-09 Tom Tromey <tom@tromey.com>
4244
4245 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4246 SUBDIR_GCC_COMPILE_SRCS.
4247
4248 2018-07-09 Tom Tromey <tom@tromey.com>
4249
4250 * Makefile.in (init.c): Remove some unused sed rules.
4251
4252 2018-07-09 Tom Tromey <tom@tromey.com>
4253
4254 * Makefile.in (TSOBS): Remove.
4255 (INIT_FILES): Update.
4256 (LIBGDB_OBS): Update.
4257 (COMMON_SFILES): Add inflow.c.
4258 (SFILES): Remove inflow.c.
4259
4260 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4261
4262 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4263
4264 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4265
4266 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4267 get_saveloc_name, is_signal_frame_name, step_name,
4268 init_remote_name, create_addr_space_name,
4269 destroy_addr_space_name, search_unwind_table_name,
4270 find_dyn_list_name): Constify.
4271
4272 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4273
4274 * darwin-nat.c (darwin_pthread_kill): New function.
4275 (darwin_resume_thread): Use darwin_pthread_kill.
4276
4277 2018-07-05 Tom de Vries <tdevries@suse.de>
4278
4279 * macroexp.c (macro_buffer) <operator=>: New member function.
4280
4281 2018-07-04 Tom Tromey <tom@tromey.com>
4282
4283 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4284
4285 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4286
4287 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4288 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4289 * maint.c: Likewise.
4290 * top.c: Likewise.
4291
4292 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4293
4294 * NEWS: Create a new section for the next release branch.
4295 Rename the section of the current branch, now that it has
4296 been cut.
4297
4298 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4299
4300 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4301 * version.in: Bump version to 8.2.50.DATE-git.
4302
4303 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4304 Pedro Alves <palves@redhat.com>
4305
4306 * linux-nat.c (linux_init_ptrace): Rename to ...
4307 (linux_init_ptrace_procfs): ... this. Call
4308 linux_proc_init_warnings.
4309 (linux_nat_target::post_attach)
4310 (linux_nat_target::post_startup_inferior): Adjust.
4311 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4312 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4313
4314 2018-07-04 Tom de Vries <tdevries@suse.de>
4315
4316 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4317 check ...
4318 (read_comp_unit_head): ... here.
4319
4320 2018-07-03 Tom Tromey <tom@tromey.com>
4321
4322 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4323 (stop_tracing, tstatus_command)
4324 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4325 (print_one_static_tracepoint_marker): Update.
4326 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4327 std::vector.
4328 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4329 VEC.
4330 (all_tracepoints, static_tracepoints_here): Return std::vector.
4331
4332 2018-07-03 Tom Tromey <tom@tromey.com>
4333
4334 * common/ptid.c (ptid_equal): Remove.
4335 * common/ptid.h (ptid_equal): Don't declare.
4336 * ada-tasks.c: Update.
4337 * breakpoint.c: Update.
4338 * common/agent.c: Update.
4339 * corelow.c: Update.
4340 * darwin-nat-info.c: Update.
4341 * darwin-nat.c: Update.
4342 * dcache.c: Update.
4343 * dtrace-probe.c: Update.
4344 * dummy-frame.c: Update.
4345 * fbsd-nat.c: Update.
4346 * frame.c: Update.
4347 * gdbthread.h: Update.
4348 * gnu-nat.c: Update.
4349 * go32-nat.c: Update.
4350 * inf-loop.c: Update.
4351 * inf-ptrace.c: Update.
4352 * infcall.c: Update.
4353 * infcmd.c: Update.
4354 * inflow.c: Update.
4355 * infrun.c: Update.
4356 * linux-fork.c: Update.
4357 * linux-nat.c: Update.
4358 * linux-thread-db.c: Update.
4359 * mi/mi-cmd-var.c: Update.
4360 * mi/mi-interp.c: Update.
4361 * mi/mi-main.c: Update.
4362 * nto-procfs.c: Update.
4363 * ppc-linux-tdep.c: Update.
4364 * procfs.c: Update.
4365 * python/py-inferior.c: Update.
4366 * python/py-record-btrace.c: Update.
4367 * python/py-record.c: Update.
4368 * ravenscar-thread.c: Update.
4369 * regcache.c: Update.
4370 * remote-sim.c: Update.
4371 * remote.c: Update.
4372 * sol-thread.c: Update.
4373 * solib.c: Update.
4374 * target.c: Update.
4375 * tui/tui-stack.c: Update.
4376 * varobj.c: Update.
4377 * windows-nat.c: Update.
4378 * windows-tdep.c: Update.
4379
4380 2018-07-03 Tom Tromey <tom@tromey.com>
4381
4382 * common/ptid.c (ptid_match): Remove.
4383 * common/ptid.h (ptid_match): Don't declare.
4384 * fbsd-nat.c: Update.
4385 * infcmd.c: Update.
4386 * infrun.c: Update.
4387 * linux-nat.c: Update.
4388 * record-btrace.c: Update.
4389 * regcache.c: Update.
4390 * remote.c: Update.
4391
4392 2018-07-03 Tom Tromey <tom@tromey.com>
4393
4394 * common/ptid.c (ptid_tid_p): Remove.
4395 * common/ptid.h (ptid_tid_p): Don't declare.
4396 * sol-thread.c: Update.
4397
4398 2018-07-03 Tom Tromey <tom@tromey.com>
4399
4400 * common/ptid.c (ptid_lwp_p): Remove.
4401 * common/ptid.h (ptid_lwp_p): Don't declare.
4402 * fbsd-nat.c: Update.
4403 * linux-nat.c: Update.
4404 * nat/linux-procfs.c: Update.
4405 * nat/x86-linux-dregs.c: Update.
4406 * sol-thread.c: Update.
4407
4408 2018-07-03 Tom Tromey <tom@tromey.com>
4409
4410 * common/ptid.c (ptid_is_pid): Remove.
4411 * common/ptid.h (ptid_is_pid): Don't declare.
4412 * infrun.c: Update.
4413 * linux-nat.c: Update.
4414 * mi/mi-interp.c: Update.
4415 * remote.c: Update.
4416 * thread.c: Update.
4417
4418 2018-07-03 Tom Tromey <tom@tromey.com>
4419
4420 * common/ptid.c (ptid_get_tid): Remove.
4421 * common/ptid.h (ptid_get_tid): Don't declare.
4422 * ada-tasks.c: Update.
4423 * aix-thread.c: Update.
4424 * bsd-uthread.c: Update.
4425 * darwin-nat.c: Update.
4426 * fbsd-nat.c: Update.
4427 * i386-darwin-nat.c: Update.
4428 * infrun.c: Update.
4429 * linux-tdep.c: Update.
4430 * nto-procfs.c: Update.
4431 * ppc-ravenscar-thread.c: Update.
4432 * python/py-infthread.c: Update.
4433 * ravenscar-thread.c: Update.
4434 * sol-thread.c: Update.
4435 * sparc-ravenscar-thread.c: Update.
4436 * windows-nat.c: Update.
4437
4438 2018-07-03 Tom Tromey <tom@tromey.com>
4439
4440 * common/ptid.c (ptid_get_lwp): Remove.
4441 * common/ptid.h (ptid_get_lwp): Don't declare.
4442 * aarch64-linux-nat.c: Update.
4443 * ada-tasks.c: Update.
4444 * aix-thread.c: Update.
4445 * amd64-linux-nat.c: Update.
4446 * arm-linux-nat.c: Update.
4447 * corelow.c: Update.
4448 * fbsd-nat.c: Update.
4449 * fbsd-tdep.c: Update.
4450 * gnu-nat.c: Update.
4451 * i386-cygwin-tdep.c: Update.
4452 * i386-gnu-nat.c: Update.
4453 * i386-linux-nat.c: Update.
4454 * ia64-linux-nat.c: Update.
4455 * inf-ptrace.c: Update.
4456 * infrun.c: Update.
4457 * linux-fork.c: Update.
4458 * linux-nat.c: Update.
4459 * linux-tdep.c: Update.
4460 * linux-thread-db.c: Update.
4461 * mips-linux-nat.c: Update.
4462 * nat/aarch64-linux-hw-point.c: Update.
4463 * nat/aarch64-linux.c: Update.
4464 * nat/linux-btrace.c: Update.
4465 * nat/linux-osdata.c: Update.
4466 * nat/linux-procfs.c: Update.
4467 * nat/x86-linux-dregs.c: Update.
4468 * obsd-nat.c: Update.
4469 * ppc-fbsd-nat.c: Update.
4470 * ppc-linux-nat.c: Update.
4471 * procfs.c: Update.
4472 * python/py-infthread.c: Update.
4473 * ravenscar-thread.c: Update.
4474 * remote.c: Update.
4475 * s390-linux-nat.c: Update.
4476 * sol-thread.c: Update.
4477 * sol2-tdep.c: Update.
4478 * spu-linux-nat.c: Update.
4479 * x86-linux-nat.c: Update.
4480 * xtensa-linux-nat.c: Update.
4481
4482 2018-07-03 Tom Tromey <tom@tromey.com>
4483
4484 * common/ptid.c (ptid_get_pid): Remove.
4485 * common/ptid.h (ptid_get_pid): Don't declare.
4486 * aarch64-linux-nat.c: Update.
4487 * ada-lang.c: Update.
4488 * aix-thread.c: Update.
4489 * alpha-bsd-nat.c: Update.
4490 * amd64-fbsd-nat.c: Update.
4491 * amd64-linux-nat.c: Update.
4492 * arm-linux-nat.c: Update.
4493 * arm-nbsd-nat.c: Update.
4494 * auxv.c: Update.
4495 * break-catch-syscall.c: Update.
4496 * breakpoint.c: Update.
4497 * bsd-uthread.c: Update.
4498 * corelow.c: Update.
4499 * ctf.c: Update.
4500 * darwin-nat.c: Update.
4501 * fbsd-nat.c: Update.
4502 * fbsd-tdep.c: Update.
4503 * gcore.c: Update.
4504 * gnu-nat.c: Update.
4505 * hppa-nbsd-nat.c: Update.
4506 * hppa-obsd-nat.c: Update.
4507 * i386-fbsd-nat.c: Update.
4508 * ia64-linux-nat.c: Update.
4509 * inf-ptrace.c: Update.
4510 * infcmd.c: Update.
4511 * inferior.c: Update.
4512 * inferior.h: Update.
4513 * inflow.c: Update.
4514 * infrun.c: Update.
4515 * linux-fork.c: Update.
4516 * linux-nat.c: Update.
4517 * linux-tdep.c: Update.
4518 * linux-thread-db.c: Update.
4519 * m68k-bsd-nat.c: Update.
4520 * mi/mi-interp.c: Update.
4521 * mi/mi-main.c: Update.
4522 * mips-linux-nat.c: Update.
4523 * mips-nbsd-nat.c: Update.
4524 * mips64-obsd-nat.c: Update.
4525 * nat/aarch64-linux-hw-point.c: Update.
4526 * nat/aarch64-linux.c: Update.
4527 * nat/linux-btrace.c: Update.
4528 * nat/linux-osdata.c: Update.
4529 * nat/linux-procfs.c: Update.
4530 * nat/x86-linux-dregs.c: Update.
4531 * nto-procfs.c: Update.
4532 * obsd-nat.c: Update.
4533 * ppc-linux-nat.c: Update.
4534 * ppc-nbsd-nat.c: Update.
4535 * ppc-obsd-nat.c: Update.
4536 * proc-service.c: Update.
4537 * procfs.c: Update.
4538 * python/py-inferior.c: Update.
4539 * python/py-infthread.c: Update.
4540 * ravenscar-thread.c: Update.
4541 * record.c: Update.
4542 * remote-sim.c: Update.
4543 * remote.c: Update.
4544 * rs6000-nat.c: Update.
4545 * s390-linux-nat.c: Update.
4546 * sh-nbsd-nat.c: Update.
4547 * sol-thread.c: Update.
4548 * sparc-nat.c: Update.
4549 * sparc64-tdep.c: Update.
4550 * spu-linux-nat.c: Update.
4551 * spu-tdep.c: Update.
4552 * target-debug.h: Update.
4553 * target.c: Update.
4554 * thread.c: Update.
4555 * tid-parse.c: Update.
4556 * tracefile-tfile.c: Update.
4557 * vax-bsd-nat.c: Update.
4558 * windows-nat.c: Update.
4559 * x86-linux-nat.c: Update.
4560 * x86-nat.c: Update.
4561
4562 2018-07-03 Tom Tromey <tom@tromey.com>
4563
4564 * common/ptid.c (pid_to_ptid): Remove.
4565 * common/ptid.h (pid_to_ptid): Don't declare.
4566 * aix-thread.c: Update.
4567 * arm-linux-nat.c: Update.
4568 * common/ptid.c: Update.
4569 * common/ptid.h: Update.
4570 * corelow.c: Update.
4571 * ctf.c: Update.
4572 * darwin-nat.c: Update.
4573 * fbsd-nat.c: Update.
4574 * fork-child.c: Update.
4575 * gnu-nat.c: Update.
4576 * go32-nat.c: Update.
4577 * inf-ptrace.c: Update.
4578 * infcmd.c: Update.
4579 * inferior.c: Update.
4580 * infrun.c: Update.
4581 * linux-fork.c: Update.
4582 * linux-nat.c: Update.
4583 * nat/aarch64-linux-hw-point.c: Update.
4584 * nat/fork-inferior.c: Update.
4585 * nat/x86-linux-dregs.c: Update.
4586 * nto-procfs.c: Update.
4587 * obsd-nat.c: Update.
4588 * procfs.c: Update.
4589 * progspace.c: Update.
4590 * remote.c: Update.
4591 * rs6000-nat.c: Update.
4592 * s390-linux-nat.c: Update.
4593 * sol-thread.c: Update.
4594 * spu-linux-nat.c: Update.
4595 * target.c: Update.
4596 * top.c: Update.
4597 * tracefile-tfile.c: Update.
4598 * windows-nat.c: Update.
4599
4600 2018-07-03 Tom Tromey <tom@tromey.com>
4601
4602 * common/ptid.h (ptid_build): Don't declare.
4603 * common/ptid.c (ptid_build): Remove.
4604 * aix-thread.c: Update.
4605 * bsd-kvm.c: Update.
4606 * bsd-uthread.c: Update.
4607 * common/agent.c: Update.
4608 * common/ptid.c: Update.
4609 * common/ptid.h: Update.
4610 * corelow.c: Update.
4611 * darwin-nat.c: Update.
4612 * fbsd-nat.c: Update.
4613 * gnu-nat.c: Update.
4614 * linux-fork.c: Update.
4615 * linux-nat.c: Update.
4616 * linux-thread-db.c: Update.
4617 * nat/linux-osdata.c: Update.
4618 * nat/linux-procfs.c: Update.
4619 * nto-procfs.c: Update.
4620 * obsd-nat.c: Update.
4621 * proc-service.c: Update.
4622 * procfs.c: Update.
4623 * ravenscar-thread.c: Update.
4624 * remote-sim.c: Update.
4625 * remote.c: Update.
4626 * sol-thread.c: Update.
4627 * target.c: Update.
4628 * windows-nat.c: Update.
4629
4630 2018-07-03 Tom Tromey <tom@tromey.com>
4631
4632 * infrun.c (follow_exec): Use exit_inferior_silent.
4633 * inferior.c (exit_inferior_num_silent): Remove.
4634 * inferior.h (exit_inferior_num_silent): Don't declare.
4635
4636 2018-07-03 Tom Tromey <tom@tromey.com>
4637
4638 PR cli/23340:
4639 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4640 inferior_ptid on error.
4641
4642 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4643 Simon Marchi <simon.marchi@polymtl.ca>
4644
4645 PR tdep/8282
4646 * disasm.h (gdb_disassembler): Add
4647 `m_disassembler_options_holder'. member
4648 * disasm.c (get_all_disassembler_options): New function.
4649 (gdb_disassembler::gdb_disassembler): Use it.
4650 (gdb_buffered_insn_length_init_dis): Likewise.
4651 (gdb_buffered_insn_length): Adjust accordingly.
4652 (set_disassembler_options): Handle options with arguments.
4653 (show_disassembler_options_sfunc): Likewise. Add a leading new
4654 line if showing options with descriptions.
4655 (disassembler_options_completer): Adapt to using the
4656 `disasm_options_and_args_t' structure.
4657 * mips-tdep.c (mips_disassembler_options): New variable.
4658 (mips_disassembler_options_o32): Likewise.
4659 (mips_disassembler_options_n32): Likewise.
4660 (mips_disassembler_options_n64): Likewise.
4661 (gdb_print_insn_mips): Don't set `disassembler_options'.
4662 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4663 functions.
4664 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4665 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4666 `gdbarch_disassembler_options_implicit' and
4667 `gdbarch_valid_disassembler_options'.
4668 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4669 `disasm_options_and_args_t' structure.
4670 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4671 method.
4672 (valid_disassembler_options): Switch from `disasm_options_t' to
4673 the `disasm_options_and_args_t' structure.
4674 * NEWS: Document `set disassembler-options' support for the MIPS
4675 target.
4676 * gdbarch.h: Regenerate.
4677 * gdbarch.c: Regenerate.
4678
4679 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4680
4681 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4682
4683 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4684
4685 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4686 parameter in call to amd64_target_description.
4687 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4688 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4689 (amd64fbsd_init_abi): Likewise.
4690 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4691 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4692 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4693 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4694
4695 2018-06-29 Pedro Alves <palves@redhat.com>
4696
4697 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4698 "segments" parameter.
4699 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4700 (_initialize_amd64_tdep): Update call to
4701 amd64_create_target_description.
4702 (amd64_target_description): Add "segments" parameter. Adjust
4703 the implementation to use it.
4704 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4705 call to amd64_create_target_description.
4706 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4707 * gdb/arch/amd64.h (amd64_create_target_description): Add
4708 "segments" register.
4709 * gdb/arch/amd64.c (amd64_create_target_description): Add
4710 "segments" parameter. Call create_feature_i386_64bit_segments
4711 only if SEGMENTS is true.
4712 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4713 call to amd64_create_target_description.
4714
4715 2018-06-29 Pedro Alves <palves@redhat.com>
4716
4717 * thread.c (thread_target_id_str): New, factored out from ...
4718 (print_thread_info_1): ... here. Use it to compute the max
4719 "Target Id" column width.
4720
4721 2018-06-29 Pedro Alves <palves@redhat.com>
4722
4723 * remote.c (remote_target::extra_thread_info): Delete
4724 'display_buf' and 'n' locals. from the cache, regardless of
4725 packet mechanims is in use. Use cache for qThreadExtra and qP
4726 methods too.
4727
4728 2018-06-29 Pedro Alves <palves@redhat.com>
4729
4730 * blockframe.c (find_pc_sect_containing_function): New function.
4731 * breakpoint.c (print_breakpoint_location): Don't call
4732 find_pc_sect_function.
4733 * linespec.c (create_sals_line_offset): Record the location's
4734 symbol in the sal.
4735 * linespec.c (convert_address_location_to_sals): Fill in sal's
4736 symbol with find_pc_sect_containing_function.
4737 * symtab.c (find_function_start_sal): Rename to ...
4738 (find_function_start_sal_1): ... this.
4739 (find_function_start_sal): Reimplement as wrapper around
4740 find_function_start_sal_1, and use
4741 find_pc_sect_containing_function to fill in the sal's symbol.
4742 (find_function_start_sal(symbol*, bool)): Adjust.
4743 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4744 comments.
4745 (find_pc_sect_containing_function): Declare.
4746
4747 2018-06-29 Pedro Alves <palves@redhat.com>
4748
4749 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4750 true if the the location has no symbol.
4751
4752 2018-06-28 Tom Tromey <tom@tromey.com>
4753
4754 * NEWS: Mention --enable-codesign.
4755 * silent-rules.mk (ECHO_SIGN): New variable.
4756 * configure.ac: Add --enable-codesign.
4757 * configure: Rebuild.
4758 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4759 (gdb$(EXEEXT)): Optionally invoke codesign.
4760
4761 2018-06-28 Pedro Alves <palves@redhat.com>
4762
4763 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4764 comments.
4765 (switch_to_thread_no_regs): Adjust comment.
4766 * infcmd.c (stop_pc): Delete.
4767 (post_create_inferior, info_program_command): Replace references
4768 to stop_pc with references to thread_info->suspend.stop_pc.
4769 * inferior.h (stop_pc): Delete declaration.
4770 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4771 (handle_inferior_event_1, handle_signal_stop)
4772 (process_event_stop_test, keep_going_stepped_thread)
4773 (handle_step_into_function, handle_step_into_function_backward)
4774 (print_stop_location): Replace references to stop_pc with
4775 references to thread_info->suspend.stop_pc.
4776 (struct infcall_suspend_state) <stop_pc>: Delete field.
4777 (save_infcall_suspend_state, restore_infcall_suspend_state):
4778 Remove references to inf_stat->stop_pc.
4779 * linux-fork.c (fork_load_infrun_state): Likewise.
4780 * record-btrace.c (record_btrace_set_replay): Likewise.
4781 * record-full.c (record_full_goto_entry): Likewise.
4782 * remote.c (print_one_stopped_thread): Likewise.
4783 * target.c (target_resume): Extend comment.
4784 * thread.c (set_executing_thread): New.
4785 (set_executing): Use it.
4786 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4787 Remove references to stop_pc.
4788
4789 2018-06-28 Pedro Alves <palves@redhat.com>
4790
4791 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4792 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4793
4794 2018-06-28 Tom Tromey <tom@tromey.com>
4795
4796 * coffread.c (coff_symfile_finish): Update.
4797 * xcoffread.c (xcoff_symfile_finish): Update.
4798 * elfread.c (elf_symfile_finish): Update.
4799 * symfile.h (dwarf2_free_objfile): Don't declare.
4800 * dwarf2read.c (_initialize_dwarf2_read): Use
4801 register_objfile_data_with_cleanup.
4802 (dwarf2_free_objfile): Now static. Change signature.
4803
4804 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4805
4806 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4807 option "-o" to add-symbol-file-load to add an offset to each
4808 section's load address.
4809 * symfile.c (set_objfile_default_section_offset): New function.
4810
4811 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4812
4813 * symfile.c (add_symbol_file_command): Make sure that sections
4814 with the same name are sorted in the same order.
4815
4816 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4817
4818 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4819 require the second argument. If omitted, load sections at the
4820 addresses specified in the file.
4821
4822 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4823
4824 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4825 (_initialize_symfile): Add option "-o" to symbol-file to add an
4826 offset to each section of the symbol file.
4827
4828 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4829
4830 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4831
4832 2018-06-27 Tom Tromey <tom@tromey.com>
4833
4834 * stack.c (_initialize_stack): Update "func" help text.
4835
4836 2018-06-27 Tom Tromey <tom@tromey.com>
4837
4838 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4839 std::vector.
4840 (unwind_infopy_str, pyuw_create_unwind_info)
4841 (unwind_infopy_add_saved_register, pyuw_sniffer)
4842 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4843 Update.
4844 (struct saved_reg): Add constructor.
4845 <value>: Now a gdbpy_ref<>.
4846
4847 2018-06-27 Tom Tromey <tom@tromey.com>
4848
4849 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4850
4851 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4852
4853 * gdb-gdb.py.in: Format using autopep8.
4854
4855 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4856
4857 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4858 (type_lookup_function): Recognize CORE_ADDR values.
4859
4860 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4861
4862 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4863 print tag_name.
4864
4865 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4866
4867 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4868 <__lt__>: Add.
4869
4870 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4871
4872 * gdb-gdb.py: Move to...
4873 * gdb-gdb.py.in: ... here.
4874 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4875 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4876 dependencies.
4877 (distclean): Remove gdb-gdb.py when cleaning.
4878 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4879 * configure: Re-generate.
4880
4881 2018-06-27 Pedro Alves <palves@redhat.com>
4882
4883 * proc-service.c (get_ps_regcache): New.
4884 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4885 (ps_lsetfpregs): Use it.
4886
4887 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4888
4889 PR gdb/21695
4890 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4891 (dwarf_decode_lines_1): Adjust.
4892
4893 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4896 override.
4897 <info_proc>: Likewise.
4898
4899 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4900
4901 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4902 to windows_fetch_one_register, and only handle the case of
4903 fetching one register. Move the code that reloads the context
4904 and iterates over all registers if R is negative to...
4905 (windows_nat_target::fetch_registers): ... here.
4906 (do_windows_store_inferior_registers): Rename to
4907 windows_store_one_register, and only handle the case of storing
4908 one register. Move the code that handles the case where r is
4909 negative to...
4910 (windows_nat_target::store_registers) ... here.
4911
4912 2018-06-26 Tom Tromey <tom@tromey.com>
4913
4914 PR rust/22574:
4915 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4916 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4917 Update.
4918 (rust_internal_print_type): Add podata parameter.
4919 (rust_print_type): Update.
4920
4921 2018-06-26 Tom Tromey <tom@tromey.com>
4922
4923 * typeprint.h (struct print_offset_data) <update, finish,
4924 maybe_print_hole>: New methods.
4925 <indentation>: New constant.
4926 * typeprint.c (print_offset_data::indentation): Define.
4927 (print_offset_data::maybe_print_hole, print_offset_data::update)
4928 (print_offset_data::finish): Move from c-typeprint.c and rename.
4929 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4930 (print_spaces_filtered_with_print_options): Update.
4931 (c_print_type_union_field_offset, maybe_print_hole)
4932 (c_print_type_struct_field_offset): Move to typeprint.c and
4933 rename.
4934 (c_type_print_base_struct_union): Update.
4935
4936 2018-06-25 Pedro Alves <palves@redhat.com>
4937
4938 * gdbthread.h (thread_info_ref, delete_thread)
4939 (delete_thread_silent, first_thread_of_inferior)
4940 (any_thread_of_inferior, switch_to_thread)
4941 (enable_thread_stack_temporaries)
4942 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4943 (get_last_thread_stack_temporary)
4944 (value_in_thread_stack_temporaries, can_access_registers_thread):
4945 Spell out "struct thread_info" instead of just "thread_info".
4946 * inferior.h (notice_new_inferior): Likewise.
4947
4948 2018-06-25 Pedro Alves <palves@redhat.com>
4949
4950 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4951 pass thread_info pointer to delete_thread.
4952 (windows_nat_target::detach): Pass inferior pointer to
4953 detach_inferior.
4954 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4955 delete_thread.
4956 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4957 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4958 and pass a thread_info pointer to delete_thread.
4959 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4960 pass thread_info pointer to delete_thread.
4961 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4962 delete_thread_silent call.
4963 * procfs.c (procfs_target::detach): Pass inferior pointer to
4964 detach_inferior.
4965 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4966 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4967 delete_thread_silent call.
4968 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4969 pass thread_info pointer to delete_thread.
4970 (windows_nat_target::detach): Pass inferior pointer to
4971 delete_inferior.
4972
4973 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4974
4975 * regcache.c (readable_regcache::read_part): Fix asserts.
4976 (reg_buffer::raw_collect_part): New function.
4977 (regcache::write_part): Fix asserts.
4978 (reg_buffer::raw_supply_part): New function.
4979 (regcache::transfer_regset_register): New helper function.
4980 (regcache::transfer_regset): Call new functions.
4981 (regcache_supply_regset): Use gdb_byte*.
4982 (regcache::supply_regset): Likewise.
4983 (regcache_collect_regset): Likewise.
4984 (regcache::collect_regset): Likewise.
4985 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4986 (reg_buffer::raw_supply_part): Likewise.
4987 (regcache::transfer_regset_register): Likewise.
4988 (regcache::transfer_regset): Use gdb_byte*.
4989
4990 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4991
4992 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4993
4994 2018-06-21 Pedro Alves <palves@redhat.com>
4995
4996 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4997 instead of a ptid_t. All callers adjusted.
4998 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4999 adjusted.
5000 (print_ada_task_info, display_current_task_id, task_command_1):
5001 Adjust.
5002 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5003 inferior_thread.
5004 (breakpoint_kind): Adjust.
5005 (remove_breakpoints_pid): Rename to ...
5006 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5007 pointer. All callers adjusted.
5008 (bpstat_clear_actions): Use inferior_thread.
5009 (get_bpstat_thread): New.
5010 (bpstat_do_actions): Use it.
5011 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5012 to take a thread_info pointer. All callers adjusted.
5013 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5014 (breakpoint_re_set_thread): Use inferior_thread.
5015 * breakpoint.h (struct inferior): Forward declare.
5016 (bpstat_stop_status): Update.
5017 (remove_breakpoints_pid): Delete.
5018 (remove_breakpoints_inf): New.
5019 * bsd-uthread.c (bsd_uthread_target::wait)
5020 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5021 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5022 (maint_btrace_packet_history_cmd)
5023 (maint_btrace_clear_packet_history_cmd): Adjust.
5024 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5025 inferior_thread.
5026 * cli/cli-interp.c: Include "inferior.h".
5027 * common/refcounted-object.h (struct
5028 refcounted_object_ref_policy): New.
5029 * compile/compile-object-load.c: Include gdbthread.h.
5030 (store_regs): Use inferior_thread.
5031 * corelow.c (core_target::close): Use current_inferior.
5032 (core_target_open): Adjust to use first_thread_of_inferior and use
5033 the current inferior.
5034 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5035 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5036 <thread>: ... this new field. All references adjusted.
5037 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5038 Take a thread_info pointer instead of a ptid_t.
5039 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5040 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5041 thread_info pointer instead of a ptid_t.
5042 * elfread.c: Include "inferior.h".
5043 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5044 Use inferior_thread.
5045 * eval.c (evaluate_subexp): Likewise.
5046 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5047 inferior_thread.
5048 * gdb_proc_service.h (struct thread_info): Forward declare.
5049 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5050 <thread>: ... this new field. All references adjusted.
5051 * gdbarch.h, gdbarch.c: Regenerate.
5052 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5053 'thread' parameter. All implementations and callers adjusted.
5054 * gdbthread.h (thread_info) <set_running>: New method.
5055 (delete_thread, delete_thread_silent): Take a thread_info pointer
5056 instead of a ptid.
5057 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5058 (first_thread_of_process): Delete, replaced by ...
5059 (first_thread_of_inferior): ... this new function. All callers
5060 adjusted.
5061 (any_live_thread_of_process): Delete, replaced by ...
5062 (any_live_thread_of_inferior): ... this new function. All callers
5063 adjusted.
5064 (switch_to_thread, switch_to_no_thread): Declare.
5065 (is_executing): Delete.
5066 (enable_thread_stack_temporaries): Update comment.
5067 <enable_thread_stack_temporaries>: Take a thread_info pointer
5068 instead of a ptid_t. Incref the thread.
5069 <~enable_thread_stack_temporaries>: Decref the thread.
5070 <m_ptid>: Delete
5071 <m_thr>: New.
5072 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5073 (get_last_thread_stack_temporary)
5074 (value_in_thread_stack_temporaries, can_access_registers_thread):
5075 Take a thread_info pointer instead of a ptid_t. All callers
5076 adjusted.
5077 * infcall.c (get_call_return_value): Use inferior_thread.
5078 (run_inferior_call): Work with thread pointers instead of ptid_t.
5079 (call_function_by_hand_dummy): Work with thread pointers instead
5080 of ptid_t. Use thread_info_ref.
5081 * infcmd.c (proceed_thread_callback): Access thread's state
5082 directly.
5083 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5084 access thread's state directly.
5085 (continue_command): Use inferior_thread.
5086 (info_program_command): Use find_thread_ptid and access thread
5087 state directly.
5088 (proceed_after_attach_callback): Use thread state directly.
5089 (notice_new_inferior): Take a thread_info pointer instead of a
5090 ptid_t. All callers adjusted.
5091 (exit_inferior): Take an inferior pointer instead of a pid. All
5092 callers adjusted.
5093 (exit_inferior_silent): New.
5094 (detach_inferior): Delete.
5095 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5096 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5097 (detach_inferior_command, kill_inferior_command): Use
5098 find_inferior_id instead of valid_gdb_inferior_id and
5099 gdb_inferior_id_to_pid.
5100 (inferior_command): Use inferior and thread pointers.
5101 * inferior.h (struct thread_info): Forward declare.
5102 (notice_new_inferior): Take a thread_info pointer instead of a
5103 ptid_t. All callers adjusted.
5104 (detach_inferior): Delete declaration.
5105 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5106 instead of a pid. All callers adjusted.
5107 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5108 (valid_gdb_inferior_id): Delete.
5109 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5110 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5111 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5112 ...
5113 <inf>: ... this new field.
5114 <step_ptid>: Delete, replaced by ...
5115 <step_thread>: ... this new field.
5116 (get_displaced_stepping_state): Take an inferior pointer instead
5117 of a pid. All callers adjusted.
5118 (displaced_step_in_progress_any_inferior): Adjust.
5119 (displaced_step_in_progress_thread): Take a thread pointer instead
5120 of a ptid_t. All callers adjusted.
5121 (displaced_step_in_progress, add_displaced_stepping_state): Take
5122 an inferior pointer instead of a pid. All callers adjusted.
5123 (get_displaced_step_closure_by_addr): Adjust.
5124 (remove_displaced_stepping_state): Take an inferior pointer
5125 instead of a pid. All callers adjusted.
5126 (displaced_step_prepare_throw, displaced_step_prepare)
5127 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5128 All callers adjusted.
5129 (start_step_over): Adjust.
5130 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5131 displaced step queue.
5132 (do_target_resume): Adjust.
5133 (fetch_inferior_event): Use inferior_thread.
5134 (context_switch, get_inferior_stop_soon): Take an
5135 execution_control_state pointer instead of a ptid_t. All callers
5136 adjusted.
5137 (switch_to_thread_cleanup): Delete.
5138 (stop_all_threads): Use scoped_restore_current_thread.
5139 * inline-frame.c: Include "gdbthread.h".
5140 (inline_state) <inline_state>: Take a thread pointer instead of a
5141 ptid_t. All callers adjusted.
5142 <ptid>: Delete, replaced by ...
5143 <thread>: ... this new field.
5144 (find_inline_frame_state): Take a thread pointer instead of a
5145 ptid_t. All callers adjusted.
5146 (skip_inline_frames, step_into_inline_frame)
5147 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5148 pointer instead of a ptid_t. All callers adjusted.
5149 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5150 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5151 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5152 pointers directly.
5153 * linux-nat.c (get_detach_signal): Likewise.
5154 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5155 (thread_db_notice_clone): Adjust.
5156 (thread_db_find_new_threads_silently)
5157 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5158 a thread pointer instead of a ptid_t. All callers adjusted.
5159 * mi/mi-cmd-var.c: Include "inferior.h".
5160 (mi_cmd_var_update_iter): Update to use thread pointers.
5161 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5162 inferior directly.
5163 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5164 out to ...
5165 (mi_output_running): ... this new function.
5166 (mi_on_resume_1): Adjust to use it.
5167 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5168 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5169 directly.
5170 (interrupt_thread_callback): : Adjust to use thread and inferior
5171 pointers.
5172 * proc-service.c: Include "gdbthread.h".
5173 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5174 * progspace-and-thread.c: Include "inferior.h".
5175 * progspace.c: Include "inferior.h".
5176 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5177 hold a reference to an inferior_object.
5178 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5179 inferior_thread.
5180 * python/py-inferior.c (struct inferior_object): Give the type a
5181 tag name instead of a typedef.
5182 (python_on_normal_stop): No need to check if the current thread is
5183 listed.
5184 (inferior_to_inferior_object): Change return type to
5185 inferior_object. All callers adjusted.
5186 (find_thread_object): Delete, bits factored out to ...
5187 (thread_to_thread_object): ... this new function.
5188 * python/py-infthread.c (create_thread_object): Use
5189 inferior_to_inferior_object.
5190 (thpy_is_stopped): Use thread pointer directly.
5191 (gdbpy_selected_thread): Use inferior_thread.
5192 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5193 field, replaced with ...
5194 <thread>: ... this new field. All users adjusted.
5195 (btpy_insn_or_gap_new): Drop const.
5196 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5197 callers adjusted.
5198 * python/py-record.c: Include "gdbthread.h".
5199 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5200 a ptid_t. All callers adjusted.
5201 (gdbpy_current_recording): Use inferior_thread.
5202 * python/py-record.h (recpy_record_object) <ptid>: Delete
5203 field, replaced with ...
5204 <thread>: ... this new field. All users adjusted.
5205 (recpy_element_object) <ptid>: Delete
5206 field, replaced with ...
5207 <thread>: ... this new field. All users adjusted.
5208 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5209 a ptid_t. All callers adjusted.
5210 * python/py-threadevent.c: Include "gdbthread.h".
5211 (get_event_thread): Use thread_to_thread_object.
5212 * python/python-internal.h (struct inferior_object): Forward
5213 declare.
5214 (find_thread_object, find_inferior_object): Delete declarations.
5215 (thread_to_thread_object, inferior_to_inferior_object): New
5216 declarations.
5217 * record-btrace.c: Include "inferior.h".
5218 (require_btrace_thread): Use inferior_thread.
5219 (record_btrace_frame_sniffer)
5220 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5221 (get_thread_current_frame): Use scoped_restore_current_thread and
5222 switch_to_thread.
5223 (get_thread_current_frame): Use thread pointer directly.
5224 (record_btrace_replay_at_breakpoint): Use thread's inferior
5225 pointer directly.
5226 * record-full.c: Include "inferior.h".
5227 * regcache.c: Include "gdbthread.h".
5228 (get_thread_arch_regcache): Use the inferior's address space
5229 directly.
5230 (get_thread_regcache, registers_changed_thread): New.
5231 * regcache.h (get_thread_regcache(thread_info *thread)): New
5232 overload.
5233 (registers_changed_thread): New.
5234 (remote_target) <remote_detach_1>: Swap order of parameters.
5235 (remote_add_thread): <remote_add_thread>: Return the new thread.
5236 (get_remote_thread_info(ptid_t)): New overload.
5237 (remote_target::remote_notice_new_inferior): Use thread pointers
5238 directly.
5239 (remote_target::process_initial_stop_replies): Use
5240 thread_info::set_running.
5241 (remote_target::remote_detach_1, remote_target::detach)
5242 (extended_remote_target::detach): Adjust.
5243 * stack.c (frame_show_address): Use inferior_thread.
5244 * target-debug.h (target_debug_print_thread_info_pp): New.
5245 * target-delegates.c: Regenerate.
5246 * target.c (default_thread_address_space): Delete.
5247 (memory_xfer_partial_1): Use current_inferior.
5248 (target_detach): Use current_inferior.
5249 (target_thread_address_space): Delete.
5250 (generic_mourn_inferior): Use current_inferior.
5251 * target.h (struct target_ops) <thread_address_space>: Delete.
5252 (target_thread_address_space): Delete.
5253 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5254 pointers directly.
5255 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5256 thread pointer instead of a ptid_t. Adjust all callers.
5257 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5258 (first_thread_of_process): Delete, replaced by ...
5259 (first_thread_of_inferior): ... this new function. All callers
5260 adjusted.
5261 (any_thread_of_process): Rename to ...
5262 (any_thread_of_inferior): ... this, and take an inferior pointer.
5263 (any_live_thread_of_process): Rename to ...
5264 (any_live_thread_of_inferior): ... this, and take an inferior
5265 pointer.
5266 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5267 (value_in_thread_stack_temporaries)
5268 (get_last_thread_stack_temporary): Take a thread pointer instead
5269 of a ptid_t. Adjust all callers.
5270 (thread_info::set_running): New.
5271 (validate_registers_access): Use inferior_thread.
5272 (can_access_registers_ptid): Rename to ...
5273 (can_access_registers_thread): ... this, and take a thread
5274 pointer.
5275 (print_thread_info_1): Adjust to compare thread pointers instead
5276 of ptids.
5277 (switch_to_no_thread, switch_to_thread): Make extern.
5278 (scoped_restore_current_thread::~scoped_restore_current_thread):
5279 Use m_thread pointer directly.
5280 (scoped_restore_current_thread::scoped_restore_current_thread):
5281 Use inferior_thread.
5282 (thread_command): Use thread pointer directly.
5283 (thread_num_make_value_helper): Use inferior_thread.
5284 * top.c (execute_command): Use inferior_thread.
5285 * tui/tui-interp.c: Include "inferior.h".
5286 * varobj.c (varobj_create): Use inferior_thread.
5287 (value_of_root_1): Use find_thread_global_id instead of
5288 global_thread_id_to_ptid.
5289
5290 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5291
5292 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5293 possible.
5294 (regcache::write_part): Likewise.
5295 (readable_regcache::cooked_read_part): Update comment.
5296 (readable_regcache::cooked_write_part): Likewise.
5297 * regcache.h: (readable_regcache::read_part): Likewise.
5298 (regcache::write_part): Likewise.
5299
5300 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5301 Dirk Schubert <dirk.schubert@arm.com>
5302
5303 * aarch64-linux-nat.c (post_attach): New.
5304 (aarch64_linux_nat_target::post_attach): Override post_attach to
5305 record the number of hardware debug registers.
5306
5307 2018-06-20 Tom Tromey <tom@tromey.com>
5308
5309 * python/py-param.c (add_setshow_generic): Make parameters const.
5310 (parmpy_init): Update.
5311
5312 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5313
5314 * regcache.h (regcache_cooked_read_ftype): Rename to...
5315 (register_read_ftype): ...this, change type to function_view.
5316 (class reg_buffer) <save>: Remove src parameter.
5317 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5318 parameter non-const in first overload. Remove src parameter in
5319 second overload.
5320 * regcache.c (do_cooked_read): Remove.
5321 (readonly_detached_regcache::readonly_detached_regcache): Make
5322 parameter non-const, adjust call to other constructor.
5323 (reg_buffer::save): Remove src parameter.
5324 * frame.c (do_frame_register_read): Remove.
5325 (frame_save_as_regcache): Use lambda function.
5326 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5327 parameter to ppu2spu_data *.
5328 (ppu2spu_sniffer): Use lambda function.
5329
5330 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5331
5332 * record-full.c (record_full_target::insert_breakpoint): Remove
5333 "struct" keyword, add const.
5334
5335 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5336
5337 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5338 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5339 * configure.ac: Remove AC_PREREQ, add missing quoting.
5340 * gnulib/configure.ac: Modernize usage of
5341 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5342 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5343 (AUTOMAKE_VERSION): Bump to 1.15.1.
5344 * configure: Re-generate.
5345 * config.in: Re-generate.
5346 * aclocal.m4: Re-generate.
5347 * gnulib/aclocal.m4: Re-generate.
5348 * gnulib/config.in: Re-generate.
5349 * gnulib/configure: Re-generate.
5350 * gnulib/import/Makefile.in: Re-generate.
5351
5352 2018-06-19 Pedro Alves <palves@redhat.com>
5353
5354 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5355 (lookup_minimal_symbol_by_pc_section): ... here with
5356 gdb_assert_not_reached added.
5357
5358 2018-06-19 Pedro Alves <palves@redhat.com>
5359
5360 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5361 parameter with a block parameter. Compare location's block symbol
5362 with the frame's block instead of addresses.
5363 (skip_inline_frames): Pass the current block instead of the
5364 frame's address. Break out as soon as we determine the frame
5365 should not be skipped.
5366
5367 2018-06-18 Tom Tromey <tom@tromey.com>
5368
5369 * solib-aix.c (solib_aix_get_section_offsets): Return
5370 unique_xmalloc_ptr.
5371 (solib_aix_solib_create_inferior_hook): Update.
5372
5373 2018-06-18 Tom Tromey <tom@tromey.com>
5374
5375 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5376
5377 2018-06-18 Tom Tromey <tom@tromey.com>
5378
5379 * solib-frv.c (frv_relocate_main_executable): Use
5380 unique_xmalloc_ptr.
5381 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5382 unique_xmalloc_ptr.
5383
5384 2018-06-18 Tom Tromey <tom@tromey.com>
5385
5386 * objfiles.h (inhibit_section_map_updates): Update.
5387 (resume_section_map_updates, resume_section_map_updates_cleanup):
5388 Remove.
5389 * solib-svr4.c (svr4_handle_solib_event): Update.
5390 * objfiles.c (inhibit_section_map_updates): Return
5391 scoped_restore_tmpl<int>.
5392 (resume_section_map_updates, resume_section_map_updates_cleanup):
5393 Remove.
5394
5395 2018-06-18 Tom Tromey <tom@tromey.com>
5396
5397 * valprint.h (read_string): Update.
5398 * valprint.c (read_string): Change type of "buffer".
5399 (val_print_string): Update.
5400 * python/py-value.c (valpy_string): Update.
5401 * language.h (struct language_defn) <la_get_string>: Change
5402 type of "buffer".
5403 (default_get_string, c_get_string): Update.
5404 * language.c (default_get_string): Change type of "buffer".
5405 * guile/scm-value.c (gdbscm_value_to_string): Update.
5406 * c-lang.c (c_get_string): Change type of "buffer".
5407
5408 2018-06-18 Tom Tromey <tom@tromey.com>
5409
5410 * ser-mingw.c (struct pipe_state_destroyer): New.
5411 (pipe_state_up): New typedef.
5412 (cleanup_pipe_state): Remove.
5413 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5414
5415 2018-06-18 Tom Tromey <tom@tromey.com>
5416
5417 * rust-lang.h (rust_yyerror): Don't declare.
5418 * rust-lang.c (rust_language_defn): Update.
5419 * rust-exp.y (yyerror): Now static.
5420 * parse.c (parse_exp_in_context_1): Update.
5421 * p-lang.h (p_yyerror): Don't declare.
5422 * p-lang.c (p_language_defn): Update.
5423 * p-exp.y (yyerror): Now static.
5424 * opencl-lang.c (opencl_language_defn): Update.
5425 * objc-lang.c (objc_language_defn): Update.
5426 * m2-lang.h (m2_yyerror): Don't declare.
5427 * m2-lang.c (m2_language_defn): Update.
5428 * m2-exp.y (yyerror): Now static.
5429 * language.h (struct language_defn) <la_error>: Remove.
5430 * language.c (unk_lang_error): Remove.
5431 (unknown_language_defn, auto_language_defn): Remove.
5432 * go-lang.h (go_yyerror): Don't declare.
5433 * go-lang.c (go_language_defn): Update.
5434 * go-exp.y (yyerror): Now static.
5435 * f-lang.h (f_yyerror): Don't declare.
5436 * f-lang.c (f_language_defn): Update.
5437 * f-exp.y (yyerror): Now static.
5438 * d-lang.h (d_yyerror): Don't declare.
5439 * d-lang.c (d_language_defn): Update.
5440 * d-exp.y (yyerror): Now static.
5441 * c-lang.h (c_yyerror): Don't declare.
5442 * c-lang.c (c_language_defn, cplus_language_defn)
5443 (asm_language_defn, minimal_language_defn): Update.
5444 * c-exp.y (yyerror): Now static.
5445 * ada-lang.h (ada_yyerror): Don't declare.
5446 * ada-lang.c (ada_language_defn): Update.
5447 * ada-exp.y (yyerror): Now static.
5448
5449 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5450
5451 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5452 (store_sveregs_to_thread): Likewise.
5453 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5454 (aarch64_linux_store_inferior_registers): Likewise.
5455 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5456 function.
5457 (aarch64_sve_regs_copy_to_regcache): Likewise.
5458 (aarch64_sve_regs_copy_from_regcache): Likewise.
5459 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5460 declaration.
5461 (aarch64_sve_regs_copy_to_regcache): Likewise.
5462 (aarch64_sve_regs_copy_from_regcache): Likewise.
5463 (sve_context): Structure from Linux headers.
5464 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5465 (SVE_SIG_ZREG_SIZE): Likewise.
5466 (SVE_SIG_PREG_SIZE): Likewise.
5467 (SVE_SIG_FFR_SIZE): Likewise.
5468 (SVE_SIG_REGS_OFFSET): Likewise.
5469 (SVE_SIG_ZREGS_OFFSET): Likewise.
5470 (SVE_SIG_ZREG_OFFSET): Likewise.
5471 (SVE_SIG_ZREGS_SIZE): Likewise.
5472 (SVE_SIG_PREGS_OFFSET): Likewise.
5473 (SVE_SIG_PREG_OFFSET): Likewise.
5474 (SVE_SIG_PREGS_SIZE): Likewise.
5475 (SVE_SIG_FFR_OFFSET): Likewise.
5476 (SVE_SIG_REGS_SIZE): Likewise.
5477 (SVE_SIG_CONTEXT_SIZE): Likewise.
5478 (SVE_PT_REGS_MASK): Likewise.
5479 (SVE_PT_REGS_FPSIMD): Likewise.
5480 (SVE_PT_REGS_SVE): Likewise.
5481 (SVE_PT_VL_INHERIT): Likewise.
5482 (SVE_PT_VL_ONEXEC): Likewise.
5483 (SVE_PT_REGS_OFFSET): Likewise.
5484 (SVE_PT_FPSIMD_OFFSET): Likewise.
5485 (SVE_PT_FPSIMD_SIZE): Likewise.
5486 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5487 (SVE_PT_SVE_PREG_SIZE): Likewise.
5488 (SVE_PT_SVE_FFR_SIZE): Likewise.
5489 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5490 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5491 (__SVE_SIG_TO_PT): Likewise.
5492 (SVE_PT_SVE_OFFSET): Likewise.
5493 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5494 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5495 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5496 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5497 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5498 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5499 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5500 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5501 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5502 (SVE_PT_SVE_SIZE): Likewise.
5503 (SVE_PT_SIZE): Likewise.
5504 (HAS_SVE_STATE): New define.
5505
5506 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5507
5508 * nat/aarch64-sve-linux-sigcontext.h: New file.
5509 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5510 new files.
5511 (SVE_VQ_MIN): Likewise.
5512 (SVE_VQ_MAX): Likewise.
5513 (SVE_VL_MIN): Likewise.
5514 (SVE_VL_MAX): Likewise.
5515 (SVE_NUM_ZREGS): Likewise.
5516 (SVE_NUM_PREGS): Likewise.
5517 (sve_vl_valid): Likewise.
5518 (struct user_sve_header): Likewise.
5519
5520 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5521 Richard Bunt <Richard.Bunt@arm.com>
5522
5523 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5524 was requested by GDB.
5525
5526 2018-06-15 Tom de Vries <tdevries@suse.de>
5527
5528 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5529
5530 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5531
5532 * gnulib/update-gnulib.sh: Print expected versions of
5533 autoconf/aclocal.
5534
5535 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5536
5537 * arch-utils.c (default_type_align): Use type_length_units.
5538 * gdbtypes.c (type_align): Use type_length_units.
5539
5540 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5541
5542 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5543 of 'define' command.
5544
5545 2018-06-14 Tom de Vries <tdevries@suse.de>
5546
5547 PR cli/22573
5548 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5549 get_no_prettyformat_print_options.
5550
5551 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * sparc-nat.h: Include target.h.
5554 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5555 <fetch_registers>: Remove this argument in function call.
5556 <store_registers>: Remove this argument in function call, remove
5557 extra semicolon.
5558 <low_forget_process>: Call sparc64_forget_process instead of
5559 sparc_forget_process.
5560
5561 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5562
5563 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5564 (procfs_target::make_corefile_notes): Adjust to new
5565 target_read_alloc return type.
5566
5567 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5568 Stephen Roberts <stephen.roberts@arm.com>
5569
5570 PR gdb/22882
5571 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5572 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5573 Move should_notify_stop local into more inner scope.
5574
5575 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5576 Stephen Roberts <stephen.roberts@arm.com>
5577
5578 PR gdb/22882
5579 * infrun.c (resume_1): Add call to mark_async_event_handler.
5580
5581 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5582
5583 * infrun.c (do_target_wait): Change old version of $pc printed.
5584
5585 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5586
5587 * dwarf2read.c (read_index_from_section): Rename to...
5588 (read_gdb_index_from_section): ... this, update all callers.
5589 (dwarf2_read_index): Rename to...
5590 (dwarf2_read_gdb_index): ... this, update all callers.
5591
5592 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5593
5594 * gdb/hppa-linux-nat.c
5595 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5596 hppa_linux_nat_target::fetch_registers.
5597
5598 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5599
5600 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5601 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5602 (AARCH64_DWARF_SVE_FFR): Likewise.
5603 (AARCH64_DWARF_SVE_P0): Likewise.
5604 (AARCH64_DWARF_SVE_Z0): Likewise.
5605
5606 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5607
5608 * common/common-regcache.h (raw_compare): New function.
5609 * regcache.c (regcache::raw_compare): Likewise.
5610 * regcache.h (regcache::raw_compare): New declaration.
5611
5612 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5613
5614 * common/common-regcache.h (reg_buffer_common): New structure.
5615 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5616 (reg_buffer::raw_supply): Likewise.
5617 (reg_buffer::raw_supply_integer): Likewise.
5618 (reg_buffer::raw_supply_zeroed): Likewise.
5619 (reg_buffer::raw_collect): Likewise.
5620 (reg_buffer::raw_collect_integer): Likewise.
5621 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5622 (reg_buffer::raw_supply): Likewise.
5623 (reg_buffer::raw_supply_integer): Likewise.
5624 (reg_buffer::raw_supply_zeroed): Likewise.
5625 (reg_buffer::raw_collect): Likewise.
5626 (reg_buffer::raw_collect_integer): Likewise.
5627
5628 2018-06-10 Tom Tromey <tom@tromey.com>
5629
5630 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5631 (class remote_state) <stop_reply_queue>: Now std::vector.
5632 (remote_state::~remote_state)
5633 (remote_target::stop_reply_queue_length): Update.
5634 (struct queue_iter_param, remove_child_of_pending_fork)
5635 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5636 (check_pending_event_prevents_wildcard_vcont_callback)
5637 (remove_stop_reply_for_inferior)
5638 (remove_stop_reply_of_remote_state)
5639 (remote_notif_remove_once_on_match)
5640 (stop_reply_match_ptid_and_ws)
5641 (remote_kill_child_of_pending_fork): Remove.
5642 (remote_target::remove_new_fork_children)
5643 (remote_target::check_pending_events_prevent_wildcard_vcont)
5644 (remote_target::discard_pending_stop_replies)
5645 (remote_target::discard_pending_stop_replies_in_queue)
5646 (remote_target::remote_notif_remove_queued_reply)
5647 (remote_target::queued_stop_reply)
5648 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5649 (remote_target::wait, remote_target::kill_new_fork_children)
5650 (remote_target::async): Update.
5651
5652 2018-06-10 Tom Tromey <tom@tromey.com>
5653
5654 * record-full.c (record_full_arch_list_cleanups): Remove.
5655 (record_full_message): Use try/catch.
5656 (record_full_wait_cleanups): Remove.
5657 (record_full_wait_1): Use try/catch.
5658 (record_full_restore): Likewise.
5659
5660 2018-06-10 Tom Tromey <tom@tromey.com>
5661
5662 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5663 declare VEC. Add constructor.
5664 <in_target_beneath>: Now bool.
5665 (record_full_breakpoints): Now a std::vector, static.
5666 (record_full_sync_record_breakpoints)
5667 (record_full_init_record_breakpoints)
5668 (record_full_target::insert_breakpoint)
5669 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5670
5671 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5672
5673 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5674 * serial.c (serial_interface_lookup): Remove struct keyword.
5675
5676 2018-06-10 Tom Tromey <tom@tromey.com>
5677
5678 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5679 method.
5680 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5681 a method.
5682 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5683 method.
5684 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5685 "beneath" as a method.
5686 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5687 Use "beneath" as a method.
5688
5689 2018-06-10 Tom Tromey <tom@tromey.com>
5690
5691 * tracefile.c (struct trace_file_writer_deleter): New.
5692 <operator()>: Rename from trace_file_writer_xfree.
5693 (trace_file_writer_up): New typedef.
5694 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5695
5696 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5697
5698 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5699 <m_registers, m_register_status>: Change type to
5700 std::unique_ptr.
5701 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5702 XCNEWVEC.
5703
5704 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * common/common-regcache.h (enum register_status): Add
5707 underlying type "signed char".
5708 * regcache.h (reg_buffer) <m_register_status>: Change type to
5709 register_status *.
5710 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5711 register_status instead of signed char.
5712 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5713 (reg_buffer::get_register_status): Remove cast.
5714 (readable_regcache::raw_read): Remove cast.
5715 (readable_regcache::cooked_read): Remove cast.
5716
5717 2018-06-09 Tom Tromey <tom@tromey.com>
5718
5719 * source.c (reverse_search_command, forward_search_command): Use
5720 scoped_fd.
5721
5722 2018-06-09 Tom Tromey <tom@tromey.com>
5723
5724 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5725 (serial_ops_list): Now static, std::vector.
5726 (serial_interface_lookup, serial_add_interface): Update.
5727
5728 2018-06-09 Tom Tromey <tom@tromey.com>
5729
5730 * dwarf2read.c (process_cu_includes): Update.
5731 (process_full_comp_unit): Update.
5732 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5733 std::vector.
5734
5735 2018-06-08 Paul Koning <paul_koning@dell.com>
5736
5737 PR gdb/23252
5738
5739 * python/python.c (do_start_initialization):
5740 Avoid call to internal Python API.
5741 (init__gdb_module): New function.
5742
5743 2018-06-08 Gary Benson <gbenson@redhat.com>
5744
5745 * linux-thread-db.c (valprint.h): New include.
5746 (struct check_thread_db_info): New structure.
5747 (check_thread_db_on_load, tdb_testinfo): New static globals.
5748 (check_thread_db, check_thread_db_callback): New functions.
5749 (try_thread_db_load_1): Run integrity checks if requested.
5750 (maintenance_check_libthread_db): New function.
5751 (_initialize_thread_db): Register "maint check libthread-db"
5752 and "maint set/show check-libthread-db".
5753 * NEWS: Mention the above new commands.
5754
5755 2018-06-08 Tom Tromey <tom@tromey.com>
5756
5757 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5758 now a method.
5759
5760 2018-06-08 Tom Tromey <tom@tromey.com>
5761
5762 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5763
5764 2018-06-08 Tom Tromey <tom@tromey.com>
5765
5766 * common/btrace-common.h (struct btrace_data): Add constructor,
5767 destructor, move assignment operator.
5768 <empty, clear, fini>: New methods.
5769 <format>: Initialize.
5770 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5771 (btrace_data_empty): Don't declare.
5772 * common/btrace-common.c (btrace_data_init): Remove.
5773 (btrace_data::fini): Rename from btrace_data_fini.
5774 (btrace_data::empty): Rename from btrace_data_empty.
5775 (btrace_data::clear): Rename from btrace_data_clear. Return
5776 bool.
5777 * btrace.h (make_cleanup_btrace_data): Don't declare.
5778 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5779 (parse_xml_btrace): Update.
5780 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5781 (maint_btrace_clear_packet_history_cmd): Update.
5782
5783 2018-06-07 Pedro Alves <palves@redhat.com>
5784
5785 * target.h (target_ops) <beneath>: Now a method. All references
5786 updated.
5787 (class target_stack): New.
5788 * target.c (g_target_stack): New.
5789 (g_current_top_target): Delete.
5790 (current_top_target): Get the top target out of g_target_stack.
5791 (target_stack::push, target_stack::unpush): New.
5792 (push_target, unpush_target): Reimplement.
5793 (target_is_pushed): Reimplement in terms of g_target_stack.
5794 (target_ops::beneath, target_stack::find_beneath): New.
5795
5796 2018-06-07 Pedro Alves <palves@redhat.com>
5797
5798 * target.h (find_target_beneath): Delete declaration.
5799 * target.c (find_target_beneath): Delete definition.
5800 * aix-thread.c: All callers of find_target_beneath adjusted to
5801 call target_ops::beneath instead.
5802 * bsd-uthread.c: Likewise.
5803 * linux-thread-db.c: Likewise.
5804 * ravenscar-thread.c: Likewise.
5805 * sol-thread.c: Likewise.
5806 * spu-multiarch.c: Likewise.
5807
5808 2018-06-07 Pedro Alves <palves@redhat.com>
5809
5810 * target.h (target_ops) <beneath>: Now a method. All references
5811 updated.
5812 (target_ops) <m_beneath>: New.
5813 * target.c (target_ops::beneath): New.
5814 * corelow.c: Adjust all references to target_ops::beneath.
5815 * linux-thread-db.c: Likewise.
5816 * make-target-delegates: Likewise.
5817 * record-btrace.c: Likewise.
5818 * record-full.c: Likewise.
5819 * remote.c: Likewise.
5820 * target.c: Likewise.
5821 * target-delegates.c: Regenerate.
5822
5823 2018-06-07 Pedro Alves <palves@redhat.com>
5824
5825 * target.h (target_stack): Delete.
5826 (current_top_target): Declare function.
5827 * target.c (target_stack): Delete.
5828 (g_current_top_target): New.
5829 (current_top_target): New function.
5830 * auxv.c: Use current_top_target instead of target_stack
5831 throughout.
5832 * avr-tdep.c: Likewise.
5833 * breakpoint.c: Likewise.
5834 * corefile.c: Likewise.
5835 * elfread.c: Likewise.
5836 * eval.c: Likewise.
5837 * exceptions.c: Likewise.
5838 * frame.c: Likewise.
5839 * gdbarch-selftests.c: Likewise.
5840 * gnu-v3-abi.c: Likewise.
5841 * ia64-tdep.c: Likewise.
5842 * ia64-vms-tdep.c: Likewise.
5843 * infcall.c: Likewise.
5844 * infcmd.c: Likewise.
5845 * infrun.c: Likewise.
5846 * linespec.c: Likewise.
5847 * linux-tdep.c: Likewise.
5848 * minsyms.c: Likewise.
5849 * ppc-linux-nat.c: Likewise.
5850 * ppc-linux-tdep.c: Likewise.
5851 * procfs.c: Likewise.
5852 * regcache.c: Likewise.
5853 * remote.c: Likewise.
5854 * rs6000-tdep.c: Likewise.
5855 * s390-linux-nat.c: Likewise.
5856 * s390-tdep.c: Likewise.
5857 * solib-aix.c: Likewise.
5858 * solib-darwin.c: Likewise.
5859 * solib-dsbt.c: Likewise.
5860 * solib-spu.c: Likewise.
5861 * solib-svr4.c: Likewise.
5862 * solib-target.c: Likewise.
5863 * sparc-tdep.c: Likewise.
5864 * sparc64-tdep.c: Likewise.
5865 * spu-tdep.c: Likewise.
5866 * symfile.c: Likewise.
5867 * symtab.c: Likewise.
5868 * target-descriptions.c: Likewise.
5869 * target-memory.c: Likewise.
5870 * target.c: Likewise.
5871 * target.h: Likewise.
5872 * tracefile-tfile.c: Likewise.
5873 * tracepoint.c: Likewise.
5874 * valops.c: Likewise.
5875 * valprint.c: Likewise.
5876 * value.c: Likewise.
5877 * windows-tdep.c: Likewise.
5878 * mi/mi-main.c: Likewise.
5879
5880 2018-06-07 Tom Tromey <tom@tromey.com>
5881
5882 * valprint.h (build_address_symbolic): Declare.
5883 * printcmd.c (print_address_symbolic): Update.
5884 (build_address_symbolic): Change "name" and "filename" to
5885 std::string.
5886 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5887 Update.
5888 * defs.h (build_address_symbolic): Remove declaration.
5889
5890 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5891
5892 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5893 (aarch64_vnv_type): Add function.
5894 (aarch64_pseudo_register_name): Add V regs for SVE.
5895 (aarch64_pseudo_register_type): Likewise.
5896 (aarch64_pseudo_register_reggroup_p): Likewise.
5897 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5898 (aarch64_pseudo_read_value): Add V regs for SVE.
5899 (aarch64_pseudo_write_2): Use V0 offset for SVE
5900 (aarch64_pseudo_write): Add V regs for SVE.
5901 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5902
5903 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5904
5905 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5906 (sve_vl_from_vq): Likewise.
5907
5908 2018-06-05 Tom Tromey <tom@tromey.com>
5909
5910 * cli/cli-cmds.c (show_version): Update.
5911 * top.c (print_gdb_version): Add "interactive" parameter.
5912 Update.
5913 * main.c (captured_main_1): Update.
5914 * top.h (print_gdb_version): Add "interactive" parameter and a
5915 comment.
5916
5917 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5918
5919 * common/enum-flags.h: Add trailing semicolon to example in
5920 comment.
5921
5922 2018-06-05 Tom Tromey <tom@tromey.com>
5923
5924 PR cli/12326:
5925 * NEWS: Add entry about pager.
5926 * utils.c (pagination_disabled_for_command): New global.
5927 (prompt_for_continue): Allow "c" response to prompt.
5928 (reinitialize_more_filter): Clear
5929 pagination_disabled_for_command.
5930 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5931
5932 2018-06-04 Tom Tromey <tom@tromey.com>
5933
5934 * ada-lang.h (ada_lookup_symbol_list): Update.
5935 * ada-lang.c (resolve_subexp): Update.
5936 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5937 parameter.
5938 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5939 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5940 results parameter to std::vector.
5941 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5942 Update.
5943 * ada-exp.y (block_lookup): Update.
5944 (select_possible_type_sym): Change type of syms. Remove nsyms
5945 parameter.
5946 (write_var_or_type, write_name_assoc): Update.
5947
5948 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5949
5950 * windows-nat.c (windows_nat_target::xfer_partial): Return
5951 TARGET_XFER_E_IO if we need to delegate to the target beneath
5952 but BENEATH is NULL.
5953
5954 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5955
5956 * Makefile.in (config.status): Add configure.nat as a
5957 dependency.
5958
5959 2018-06-04 Tom Tromey <tom@tromey.com>
5960
5961 * cp-name-parser.y (cpname_state): Add method declarations.
5962 (HANDLE_QUAL): Update.
5963 (cpname_state::d_grab, cpname_state::fill_comp)
5964 (cpname_state::make_operator, cpname_state::make_dtor)
5965 (cpname_state::make_builtin_type, cpname_state::make_name)
5966 (cpname_state::d_qualify, cpname_state::d_int_type)
5967 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5968 (%union): Move earlier.
5969
5970 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5971
5972 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5973
5974 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5975
5976 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5977 (aarch64_pseudo_write_1): Likewise.
5978 (aarch64_pseudo_read_value): Use helper.
5979 (aarch64_pseudo_write): Likewise.
5980
5981 2018-06-04 Pedro Alves <palves@redhat.com>
5982
5983 * darwin-nat.c (darwin_ops): Delete.
5984 (darwin_attach_pid): Use get_native_target.
5985
5986 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5987
5988 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5989 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5990
5991 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5992
5993 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5994 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5995 (aarch64_gdbarch_init): Check for SVE.
5996 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5997
5998 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5999
6000 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6001 * aarch64-tdep.h (aarch64_read_description): Likewise.
6002 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6003 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6004 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6005 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6006 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6007
6008 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6009
6010 * value.c (value_fetch_lazy_bitfield): New.
6011 (value_fetch_lazy_memory): New.
6012 (value_fetch_lazy_register): New.
6013 (value_fetch_lazy): Factor out to smaller functions.
6014
6015 2018-06-01 Tom Tromey <tom@tromey.com>
6016
6017 * cp-name-parser.y (backslashable, represented): Now const.
6018
6019 2018-06-01 Tom Tromey <tom@tromey.com>
6020
6021 * cp-name-parser.y: Include parser-defs.h.
6022 (parser_fprintf): Remove declaration.
6023
6024 2018-06-01 Tom Tromey <tom@tromey.com>
6025
6026 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6027 %parse-param.
6028 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6029 (global_result): Remove globals.
6030 (struct cpname_state): New.
6031 (yyparse): Don't declare.
6032 (yylex, yyerror): Move declarations after %union.
6033 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6034 (make_name): Add state parameter.
6035 Update all callers.
6036 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6037 parameter.
6038 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6039 Update.
6040 (yylex): Add lvalp, state parameters.
6041 (yyerror): Add state parameter.
6042 (cp_demangled_name_to_comp): Update.
6043
6044 2018-06-01 Tom Tromey <tom@tromey.com>
6045
6046 * cp-name-parser.y (parser_fprintf): Declare.
6047 (GDB_YY_REMAP_PREFIX): Define.
6048 Include yy-remap.h. Don't redefine yy* identifiers.
6049
6050 2018-06-01 Tom Tromey <tom@tromey.com>
6051
6052 * python/py-type.c (typy_legacy_template_argument): Update.
6053 * cp-support.h (cp_demangled_name_to_comp): Update.
6054 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6055 parameter to be a "std::string *".
6056 (main): Update.
6057
6058 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6059
6060 * ada-lex.l: Include "diagnostics.h" instead of
6061 "common/diagnostics.h".
6062 * unittests/environ-selftests.c: Likewise.
6063 * common/diagnostics.h: Moved to ../include.
6064
6065 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6066
6067 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6068 to language_mode_manual while calling breakpoint_re_set_one.
6069
6070 2018-06-01 Tom Tromey <tom@tromey.com>
6071
6072 * valops.c (value_cast_structs, destructor_name_p): Update.
6073 * symtab.c (gdb_mangle_name): Update.
6074 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6075 Update.
6076 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6077 (pascal_object_print_value_fields, pascal_object_print_value):
6078 Update.
6079 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6080 * linespec.c (find_methods): Update.
6081 * gdbtypes.h (type_name_no_tag): Remove.
6082 (type_name_or_error): Rename from type_name_no_tag_or_error.
6083 * gdbtypes.c (type_name_no_tag): Remove.
6084 (type_name_or_error): Rename from type_name_no_tag_or_error.
6085 (lookup_struct_elt_type, check_typedef): Update.
6086 * expprint.c (print_subexp_standard): Update.
6087 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6088 * d-namespace.c (d_lookup_nested_symbol): Update.
6089 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6090 (cp_print_class_member): Update.
6091 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6092 * completer.c (add_struct_fields): Update.
6093 * c-typeprint.c (cp_type_print_derivation_info)
6094 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6095 Update.
6096 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6097 (ada_prefer_type, ada_is_exception_sym): Update.
6098
6099 2018-06-01 Tom Tromey <tom@tromey.com>
6100
6101 * valops.c (enum_constant_from_type, value_namespace_elt)
6102 (value_maybe_namespace_elt): Update.
6103 * valarith.c (find_size_for_pointer_math): Update.
6104 * target-descriptions.c (make_gdb_type): Update.
6105 * symmisc.c (print_symbol): Update.
6106 * stabsread.c (define_symbol, read_type)
6107 (complain_about_struct_wipeout, add_undefined_type)
6108 (cleanup_undefined_types_1): Update.
6109 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6110 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6111 (rust_internal_print_type, rust_composite_type)
6112 (rust_evaluate_funcall, rust_evaluate_subexp)
6113 (rust_inclusive_range_type_p): Update.
6114 * python/py-type.c (typy_get_tag): Update.
6115 * p-typeprint.c (pascal_type_print_base): Update.
6116 * mdebugread.c (parse_symbol, parse_type): Update.
6117 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6118 Update.
6119 * guile/scm-type.c (gdbscm_type_tag): Update.
6120 * go-lang.c (sixg_string_p): Update.
6121 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6122 Update.
6123 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6124 (TYPE_TAG_NAME): Remove.
6125 * gdbtypes.c (type_name_no_tag): Simplify.
6126 (check_typedef, check_types_equal, recursive_dump_type)
6127 (copy_type_recursive, arch_composite_type): Update.
6128 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6129 in summary mode when needed.
6130 * eval.c (evaluate_funcall): Update.
6131 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6132 (process_structure_scope, read_enumeration_type)
6133 (read_namespace_type, read_module_type, determine_prefix): Update.
6134 * cp-support.c (inspect_type): Update.
6135 * coffread.c (process_coff_symbol, decode_base_type): Update.
6136 * c-varobj.c (c_is_path_expr_parent): Update.
6137 * c-typeprint.c (c_type_print_base_struct_union): Update.
6138 (c_type_print_base_1): Update. Print struct/class/union/enum in
6139 summary when using C language.
6140 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6141 (gen_maybe_namespace_elt): Update.
6142 * ada-lang.c (ada_type_name): Simplify.
6143 (empty_record, ada_template_to_fixed_record_type_1)
6144 (template_to_static_fixed_type)
6145 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6146
6147 2018-06-01 Tom Tromey <tom@tromey.com>
6148
6149 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6150 c_print_type.
6151 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6152 (c_print_type): Update.
6153 (c_print_type): New overload.
6154 (c_type_print_varspec_prefix, c_type_print_args)
6155 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6156 (c_type_print_base_struct_union, c_type_print_base_1)
6157 (cp_type_print_method_args): Add "language" parameter.
6158 (c_type_print_base): Update.
6159 * c-lang.h (c_print_type): Add new overload.
6160
6161 2018-06-01 Tom Tromey <tom@tromey.com>
6162
6163 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6164 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6165
6166 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6167
6168 * aarch64-tdep.c (aarch64_sve_register_names): New const
6169 var.
6170 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6171 (AARCH64_SVE_Z_REGS_NUM): New define.
6172 (AARCH64_SVE_P_REGS_NUM): Likewise.
6173 (AARCH64_SVE_NUM_REGS): Likewise.
6174
6175 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6176
6177 * nat/linux-ptrace.h [__alpha__]
6178 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6179 definitions.
6180
6181 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6182
6183 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6184 the endianness selected.
6185 * NEWS: Document `set endian auto' mode operation update.
6186
6187 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6188
6189 * Makefile.in: Add new header.
6190 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6191 (sve_vl_from_vg): Likewise.
6192 (sve_vq_from_vl): Likewise.
6193 (sve_vl_from_vq): Likewise.
6194 (sve_vq_from_vg): Likewise.
6195 (sve_vg_from_vq): Likewise.
6196 * configure.nat: Add new c file.
6197 * nat/aarch64-sve-linux-ptrace.c: New file.
6198 * nat/aarch64-sve-linux-ptrace.h: New file.
6199
6200 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6201
6202 * aarch64-linux-nat.c (aarch64_linux_read_description):
6203 Add parmeter zero.
6204 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6205 Likewise.
6206 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6207 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6208 (aarch64_gdbarch_init): Add parmeter zero.
6209 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6210 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6211 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6212 parmeter.
6213 * doc/gdb.texinfo: Describe SVE feature
6214 * features/aarch64-sve.c: New file.
6215
6216 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6217
6218 PR gdb/23210
6219 * gdbarch.sh (significant_addr_bit): Default to zero when
6220 not set by target architecture.
6221 * gdbarch.c: Re-generated.
6222 * utils.c (address_significant): Update.
6223
6224 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6225
6226 * stack.c (func_command): Remove trailing newline in call to error.
6227
6228 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6229
6230 * regcache.h (regcache_raw_collect): Remove, update callers to
6231 use regcache::raw_collect.
6232 * regcache.c (regcache_raw_collect): Remove.
6233
6234 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6235
6236 * regcache.h (regcache_raw_supply): Remove, update callers to
6237 use detached_regcache::raw_supply.
6238 * regcache.c (regcache_raw_supply): Remove.
6239
6240 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6241
6242 * regcache.h (regcache_cooked_write_part): Remove, update
6243 callers to use regcache::cooked_write_part.
6244 * regcache.c (regcache_cooked_write_part): Remove.
6245
6246 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6247
6248 * regcache.h (regcache_cooked_read_part): Remove, update callers
6249 to use readable_regcache::cooked_read_part.
6250 * regcache.c (regcache_cooked_read_part): Remove.
6251
6252 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6253
6254 * regcache.h (regcache_cooked_read_value): Remove, update
6255 callers to use readable_regcache::cooked_read_value.
6256 * regcache.c (regcache_cooked_read_value): Remove.
6257
6258 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6259
6260 * regcache.h (regcache_cooked_write): Remove, update callers to
6261 use regcache::cooked_write.
6262 * regcache.c (regcache_cooked_write): Remove.
6263
6264 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6265
6266 * regcache.h (regcache_invalidate): Remove, update callers to
6267 use detached_regcache::invalidate instead.
6268 * regcache.c (regcache_invalidate): Remove.
6269
6270 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6271
6272 * regcache.h (regcache_raw_write_part): Remove, update callers
6273 to use regcache::raw_write_part instead.
6274 * regcache.c (regcache_raw_write_part): Remove.
6275
6276 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6277
6278 * regcache.h (regcache_raw_read_part): Remove, update callers to
6279 use readable_regcache::raw_read_part instead.
6280 * regcache.c (regcache_raw_read_part): Remove.
6281
6282 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6283
6284 * regcache.h (regcache_cooked_read): Remove, update callers to
6285 use readable_regcache::cooked_read instead.
6286 * regcache.c (regcache_cooked_read): Remove.
6287
6288 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6289
6290 * regcache.h (regcache_raw_write): Remove, update callers to use
6291 regcache::raw_write instead.
6292 * regcache.c (regcache_raw_write): Remove.
6293
6294 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6295
6296 * regcache.h (regcache_raw_read): Remove, update callers to use
6297 readable_regcache::raw_read instead.
6298 * regcache.c (regcache_raw_read): Remove.
6299
6300 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6301
6302 * regcache.h (regcache_raw_update): Remove, update callers to
6303 use readable_regcache::raw_update instead.
6304 * regcache.c (regcache_raw_update): Remove.
6305
6306 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6307
6308 * regcache.h (regcache_register_status): Remove, update callers
6309 to use reg_buffer::get_register_status directly instead.
6310 * regcache.c (regcache_register_status): Remove.
6311
6312 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6313
6314 * regcache.h (regcache_get_ptid): Remove, update all callers to
6315 call regcache::ptid instead.
6316 * regcache.c (regcache_get_ptid): Remove.
6317
6318 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6321
6322 2018-05-30 Pedro Alves <palves@redhat.com>
6323
6324 * common/common-exceptions.h (exception_rethrow): Use
6325 ATTRIBUTE_NORETURN.
6326
6327 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6328
6329 * breakpoint.c (print_solib_event, check_status_catch_solib):
6330 Remove struct keyword in range-based for loops.
6331 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6332 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6333 Likewise.
6334 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6335 Likewise.
6336 * symfile.c (addr_info_make_relative): Likewise.
6337 * thread.c (value_in_thread_stack_temporaries): Likewise.
6338
6339 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6340
6341 PR gdb/16841
6342 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6343 aggregate type to get its real type before accessing it.
6344
6345 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6346
6347 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6348 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6349 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6350 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6351 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6352 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6353 * printcmd.c (info_address_command): Likewise.
6354
6355 2018-05-29 Tom Tromey <tom@tromey.com>
6356
6357 * windows-nat.c (handle_exception): Update fall-through comment.
6358
6359 2018-05-29 Tom Tromey <tom@tromey.com>
6360
6361 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6362 (struct program_space) <added_solibs>: Now a std::vector.
6363 * breakpoint.c (print_solib_event): Update.
6364 (check_status_catch_solib): Update.
6365 * progspace.c (clear_program_space_solib_cache): Update.
6366 * solib.c (update_solib_list): Update.
6367
6368 2018-05-29 Tom Tromey <tom@tromey.com>
6369
6370 * python/py-type.c (typy_richcompare): Update.
6371 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6372 * gdbtypes.h (types_deeply_equal): Return bool.
6373 (types_equal): Likewise.
6374 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6375 declare VEC.
6376 (check_types_equal): Change worklist to std::vector. Return
6377 bool.
6378 (struct type_equality_entry): Add constructor.
6379 (compare_maybe_null_strings): Return bool.
6380 (check_types_worklist): Return bool. Change worklist to
6381 std::vector.
6382 (types_deeply_equal): Use std::vector.
6383 (types_equal): Return bool.
6384 (compare_maybe_null_strings): Simplify.
6385
6386 2018-05-29 Tom Tromey <tom@tromey.com>
6387
6388 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6389
6390 2018-05-29 Tom Tromey <tom@tromey.com>
6391
6392 * objc-lang.h: Don't include cp-support.h.
6393 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6394 declare VEC.
6395
6396 2018-05-27 Tom Tromey <tom@tromey.com>
6397
6398 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6399
6400 2018-05-25 Tom Tromey <tom@tromey.com>
6401
6402 * value.c (value::location): Initialize.
6403
6404 2018-05-25 Tom Tromey <tom@tromey.com>
6405
6406 * dbxread.c (init_bincl_list): Remove.
6407 (bincl_list): Now a std::vector.
6408 (bincls_allocated, next_bincl): Remove.
6409 (free_bincl_list, do_free_bincl_list_cleanup)
6410 (make_cleanup_free_bincl_list): Remove.
6411 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6412 unique_xmalloc_ptr.
6413 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6414 (struct header_file_location): Add constructor.
6415 (add_bincl_to_list): Remove.
6416
6417 2018-05-25 Tom Tromey <tom@tromey.com>
6418
6419 * tui/tui.c (tui_enable): Update.
6420 * mi/mi-interp.c (mi_interp::init): Update.
6421 * interps.h (class interp) <name>: New method.
6422 <m_name>: Rename from name.
6423 (~scoped_restore_interp): Update.
6424 * interps.c (interp::interp): Update.
6425 (interp_add, interp_set, interp_lookup_existing)
6426 (current_interp_named_p): Update.
6427
6428 2018-05-25 Tom Tromey <tom@tromey.com>
6429
6430 * interps.c (interp_name): Remove.
6431 * mi/mi-interp.c (mi_interp::init): Update.
6432 * interps.h (interp_name): Remove.
6433 (~scoped_restore_interp): Update.
6434 * tui/tui.c (tui_enable): Update.
6435
6436 2018-05-25 Tom Tromey <tom@tromey.com>
6437
6438 * utils.c (fputs_maybe_filtered): Update.
6439 * linespec.c (decode_line_full): Update.
6440 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6441 (mi_print_breakpoint_for_event, mi_solib_loaded)
6442 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6443 (mi_user_selected_context_changed): Update.
6444 * mi/mi-main.c (mi_execute_command): Update.
6445 * cli/cli-script.c (execute_control_command): Update.
6446 * python/python.c (execute_gdb_command): Update.
6447 * solib.c (info_sharedlibrary_command): Update.
6448 * interps.c (interp_ui_out): Remove.
6449 * interps.h (interp_ui_out): Remove.
6450
6451 2018-05-25 Tom Tromey <tom@tromey.com>
6452
6453 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6454 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6455 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6456
6457 2018-05-25 Tom Tromey <tom@tromey.com>
6458
6459 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6460 * interps.c (interp_exec): Use scoped_restore.
6461
6462 2018-05-25 Tom Tromey <tom@tromey.com>
6463
6464 * remote.c (remote_target::remote_file_get): Use
6465 gdb::byte_vector.
6466 (remote_target::remote_file_put): Likewise.
6467
6468 2018-05-25 Tom Tromey <tom@tromey.com>
6469
6470 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6471 a std::string.
6472 (get_pe_section_index, add_pe_exported_sym): Update.
6473 (read_pe_exported_syms): Use gdb::def_vector.
6474
6475 2018-05-25 Tom Tromey <tom@tromey.com>
6476
6477 * frame.c (remove_prev_frame): Remove.
6478 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6479
6480 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6481
6482 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6483 Remove prototypes.
6484 * mips-linux-nat.c (supply_fpregset): Always call
6485 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6486 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6487 `mips_fill_fpregset'.
6488 * mips-linux-tdep.c (mips_supply_fpregset)
6489 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6490 (mips_fill_fpregset_wrapper): Remove functions.
6491 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6492 (mips_linux_fpregset): Remove variable.
6493 (mips_linux_iterate_over_regset_sections): Use
6494 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6495 (mips_linux_o32_sigframe_init): Remove comment.
6496
6497 2018-05-25 Pedro Alves <palves@redhat.com>
6498
6499 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6500 (struct readahead_cache, struct packet_reg, struct
6501 remote_arch_state, class remote_state): Move higher up in the
6502 file.
6503 (remote_target::m_remote_state): Now an object instead of a pointer.
6504 (remote_target::get_remote_state): Adjust.
6505
6506 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6507
6508 * stack.c (select_and_print_frame): Delete.
6509 (struct function_bounds): Move struct within function.
6510 (func_command): Most content moved into new function
6511 find_frame_for_function, use new function, print result, add
6512 function comment.
6513 (find_frame_for_function): New function, now returns a result.
6514
6515 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6516
6517 * stack.c (iterate_over_block_arg_vars): Fix comment.
6518 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6519
6520 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6521
6522 PR gdb/23203
6523 * frame.c
6524 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6525 Define.
6526 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6527 Define.
6528 * frame.h (class scoped_restore_selected_frame): New class.
6529 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6530 of any exception, use scoped_restore_selected_frame to restore the
6531 frame instead.
6532
6533 2018-05-24 Pedro Alves <palves@redhat.com>
6534
6535 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6536 override.
6537
6538 2018-05-23 Tom Tromey <tom@tromey.com>
6539
6540 * complaints.c (struct complaints): Remove.
6541 (symfile_complaint_book): Remove.
6542 (series): New global.
6543 (complaint_internal): Update.
6544 (clear_complaints): Update.
6545
6546 2018-05-23 Tom Tromey <tom@tromey.com>
6547
6548 * complaints.c (counters): New global.
6549 (struct complain): Remove.
6550 (struct complaints) <root>: Remove.
6551 (complaint_sentinel): Remove.
6552 (symfile_complaint_book): Update.
6553 (find_complaint) Remove.
6554 (complaint_internal, clear_complaints): Update.
6555
6556 2018-05-23 Tom Tromey <tom@tromey.com>
6557
6558 * complaints.c (struct complain) <file, line>: Remove.
6559 (find_complaint): Remove file, line parameters.
6560 (complaint_internal): Update.
6561
6562 2018-05-23 Tom Tromey <tom@tromey.com>
6563
6564 * complaints.c (vcomplaint): Remove.
6565 (complaint_internal) Merge in contents of vcomplaint.
6566
6567 2018-05-23 Tom Tromey <tom@tromey.com>
6568
6569 * complaints.c (struct complaints) <explanation>: Remove.
6570 (symfile_explanations): Remove.
6571 (symfile_complaint_book): Update.
6572 (vcomplaint): Update.
6573 (struct explanation): Remove.
6574
6575 2018-05-23 Tom Tromey <tom@tromey.com>
6576
6577 * complaints.c (symfile_complaints): Remove.
6578 (complaint_internal): Remove "complaints" parameter.
6579 (clear_complaints, vcomplaint): Remove "c" parameter.
6580 (get_complaints): Remove.
6581 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6582 (dwarf2_debug_line_missing_file_complaint)
6583 (dwarf2_debug_line_missing_end_sequence_complaint)
6584 (dwarf2_complex_location_expr_complaint)
6585 (dwarf2_const_value_length_mismatch_complaint)
6586 (dwarf2_section_buffer_overflow_complaint)
6587 (dwarf2_macro_malformed_definition_complaint)
6588 (dwarf2_invalid_attrib_class_complaint)
6589 (create_addrmap_from_index, dw2_symtab_iter_next)
6590 (dw2_expand_marked_cus)
6591 (dw2_debug_names_iterator::find_vec_in_debug_names)
6592 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6593 (create_debug_type_hash_table, init_cutu_and_read_dies)
6594 (partial_die_parent_scope, add_partial_enumeration)
6595 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6596 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6597 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6598 (create_cus_hash_table, create_dwp_hash_table)
6599 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6600 (dwarf2_rnglists_process, dwarf2_ranges_process)
6601 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6602 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6603 (handle_struct_member_die, process_structure_scope)
6604 (read_array_type, read_common_block, read_module_type)
6605 (read_tag_pointer_type, read_typedef, read_base_type)
6606 (read_subrange_type, load_partial_dies, partial_die_info::read)
6607 (partial_die_info::read, partial_die_info::read)
6608 (partial_die_info::read, read_checked_initial_length_and_offset)
6609 (dwarf2_string_attr, read_formatted_entries)
6610 (dwarf_decode_line_header)
6611 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6612 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6613 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6614 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6615 (get_signatured_type, get_DW_AT_signature_type)
6616 (decode_locdesc, file_file_name, consume_improper_spaces)
6617 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6618 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6619 (dwarf2_symbol_mark_computed, set_die_type)
6620 (read_attribute_value): Update.
6621 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6622 Update.
6623 * dbxread.c (unknown_symtype_complaint)
6624 (lbrac_mismatch_complaint, repeated_header_complaint)
6625 (set_namestring, function_outside_compilation_unit_complaint)
6626 (read_dbx_symtab, process_one_symbol): Update.
6627 * gdbtypes.c (stub_noname_complaint): Update.
6628 * windows-nat.c (handle_unload_dll): Update.
6629 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6630 (decode_base_type): Update.
6631 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6632 (eb_complaint, record_include_begin, record_include_end)
6633 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6634 (process_xcoff_symbol, read_symbol)
6635 (function_outside_compilation_unit_complaint)
6636 (scan_xcoff_symtab): Update.
6637 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6638 * buildsym.c (finish_block_internal, make_blockvector)
6639 (end_symtab_get_static_block, augment_type_symtab): Update.
6640 * dtrace-probe.c (dtrace_process_dof)
6641 (dtrace_static_probe_ops::get_probes): Update.
6642 * complaints.h (struct complaint): Don't declare.
6643 (symfile_complaints): Remove.
6644 (complaint_internal): Remove "complaints" parameter.
6645 (complaint): Likewise.
6646 (clear_complaints): Likewise.
6647 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6648 (reread_symbols): Update.
6649 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6650 (dwarf2_frame_cache, decode_frame_entry): Update.
6651 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6652 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6653 (info_selectors_command): Update.
6654 * macrotab.c (macro_include, check_for_redefinition)
6655 (macro_undef): Update.
6656 * objfiles.c (filter_overlapping_sections): Update.
6657 * stabsread.c (invalid_cpp_abbrev_complaint)
6658 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6659 (define_symbol, error_type, read_type, rs6000_builtin_type)
6660 (stabs_method_name_from_physname, read_member_functions)
6661 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6662 (attach_fields_to_type, complain_about_struct_wipeout)
6663 (read_range_type, read_args, common_block_start)
6664 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6665 Update.
6666 * mdebugread.c (index_complaint, unknown_ext_complaint)
6667 (basic_type_complaint, bad_tag_guess_complaint)
6668 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6669 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6670 (parse_procedure, parse_lines)
6671 (function_outside_compilation_unit_complaint)
6672 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6673 (bad_tag_guess_complaint, reg_value_complaint): Update.
6674 * cp-support.c (demangled_name_complaint): Update.
6675 * macroscope.c (sal_macro_scope): Update.
6676 * dwarf-index-write.c (class debug_names): Update.
6677
6678 2018-05-23 Tom Tromey <tom@tromey.com>
6679
6680 * complaints.c (clear_complaints): Remove "noisy" parameter.
6681 * complaints.h (clear_complaints): Update.
6682 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6683 (reread_symbols): Update.
6684
6685 2018-05-23 Tom Tromey <tom@tromey.com>
6686
6687 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6688 SUBSEQUENT_MESSAGE.
6689 (vcomplaint, clear_complaints): Update.
6690 (symfile_explanations): Remove some messages.
6691
6692 2018-05-23 Tom Tromey <tom@tromey.com>
6693
6694 * complaints.c (internal_complaint): Remove.
6695 * complaints.h (internal_complaint): Remove.
6696
6697 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6698
6699 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6700
6701 2018-05-22 Pedro Alves <palves@redhat.com>
6702
6703 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6704 (remote_fileio_badfd, remote_fileio_return_errno)
6705 (remote_fileio_return_success, remote_fileio_func_open)
6706 (remote_fileio_func_open, remote_fileio_func_close)
6707 (remote_fileio_func_read, remote_fileio_func_write)
6708 (remote_fileio_func_lseek, remote_fileio_func_rename)
6709 (remote_fileio_func_unlink, remote_fileio_func_stat)
6710 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6711 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6712 remote_target parameter.
6713 (remote_fio_func_map) <func>: Add remote_target parameter.
6714 (do_remote_fileio_request, remote_fileio_request):
6715 * remote-fileio.h (remote_fileio_request):
6716 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6717 remote_target parameter.
6718 (remote_notif_process, handle_notification): Adjust to pass down
6719 the remote.
6720 (remote_notif_state_allocate): Add remote_target parameter. Save
6721 it.
6722 * remote-notif.h (struct remote_target): Forward declare.
6723 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6724 remote_target parameter.
6725 (struct remote_notif_state) <remote>: New field.
6726 (remote_notif_ack, remote_notif_parse): Add remote_target
6727 parameter.
6728 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6729 remote_target parameter.
6730 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6731 (threads_listing_context, rmt_thread_action, protocol_feature)
6732 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6733 (packet_result, struct threads_listing_context, remote_state):
6734 Move definitions and declarations higher up.
6735 (remote_target) <~remote_target>: Declare.
6736 (remote_download_command_source, remote_file_put, remote_file_get)
6737 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6738 (remote_hostio_pread_vFile, remote_hostio_send_command)
6739 (remote_hostio_set_filesystem, remote_hostio_open)
6740 (remote_hostio_close, remote_hostio_unlink, remote_state)
6741 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6742 (get_memory_write_packet_size, get_memory_read_packet_size)
6743 (append_pending_thread_resumptions, remote_detach_1)
6744 (append_resumption, remote_resume_with_vcont)
6745 (add_current_inferior_and_thread, wait_ns, wait_as)
6746 (process_stop_reply, remote_notice_new_inferior)
6747 (process_initial_stop_replies, remote_add_thread)
6748 (btrace_sync_conf, remote_btrace_maybe_reopen)
6749 (remove_new_fork_children, kill_new_fork_children)
6750 (discard_pending_stop_replies, stop_reply_queue_length)
6751 (check_pending_events_prevent_wildcard_vcont)
6752 (discard_pending_stop_replies_in_queue, stop_reply)
6753 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6754 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6755 (remote_interrupt_as, remote_interrupt_ns)
6756 (remote_get_noisy_reply, remote_query_attached)
6757 (remote_add_inferior, remote_current_thread, get_current_thread)
6758 (set_thread, set_general_thread, set_continue_thread)
6759 (set_general_process, write_ptid)
6760 (remote_unpack_thread_info_response, remote_get_threadinfo)
6761 (parse_threadlist_response, remote_get_threadlist)
6762 (remote_threadlist_iterator, remote_get_threads_with_ql)
6763 (remote_get_threads_with_qxfer)
6764 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6765 (get_offsets, remote_check_symbols, remote_supported_packet)
6766 (remote_query_supported, remote_packet_size)
6767 (remote_serial_quit_handler, remote_detach_pid)
6768 (remote_vcont_probe, remote_resume_with_hc)
6769 (send_interrupt_sequence, interrupt_query)
6770 (remote_notif_get_pending_events, fetch_register_using_p)
6771 (send_g_packet, process_g_packet, fetch_registers_using_g)
6772 (store_register_using_P, store_registers_using_G)
6773 (set_remote_traceframe, check_binary_download)
6774 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6775 (remote_xfer_live_readonly_partial, remote_read_bytes)
6776 (remote_send_printf, remote_flash_write, readchar)
6777 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6778 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6779 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6780 (extended_remote_disable_randomization, extended_remote_run)
6781 (send_environment_packet, extended_remote_environment_support)
6782 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6783 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6784 (packet_command): Now methods of ...
6785 (remote_target): ... this class.
6786 (m_remote_state) <remote_target>: New field.
6787 (struct remote_state) <stop_reply_queue,
6788 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6789 fields.
6790 (remote_state::remote_state): Allocate stop_reply_queue.
6791 (remote_state): Delete global.
6792 (get_remote_state_raw): Delete.
6793 (remote_target::get_remote_state): Allocate m_remote_state on
6794 demand.
6795 (get_current_remote_target): New.
6796 (remote_ops, extended_remote_ops): Delete.
6797 (wait_forever_enabled_p, remote_async_inferior_event_token):
6798 Delete, moved to struct remote_state.
6799 (remote_target::close): Delete self. Destruction bits split to
6800 ...
6801 (remote_target::~remote_target): ... this.
6802 (show_memory_packet_size): Adjust to use
6803 get_current_remote_target.
6804 (struct protocol_feature) <func>: Add remote_target parameter.
6805 All callers adjusted.
6806 (curr_quit_handler_target): New.
6807 (remote_serial_quit_handler): Reimplement.
6808 (remote_target::open_1): Adjust to use get_current_remote_target.
6809 Heap-allocate remote_target/extended_remote_target instances.
6810 (vcont_builder::vcont_builder): Add remote_target parameter, and
6811 save it in m_remote. All callers adjusted.
6812 (vcont_builder::m_remote): New field.
6813 (vcont_builder::restart, vcont_builder::flush)
6814 (vcont_builder::push_action): Use it.
6815 (remote_target::commit_resume): Use it.
6816 (struct queue_iter_param) <remote>: New field.
6817 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6818 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6819 (check_pending_event_prevents_wildcard_vcont_callback)
6820 (remote_target::check_pending_events_prevent_wildcard_vcont)
6821 (remote_target::discard_pending_stop_replies)
6822 (remote_target::discard_pending_stop_replies_in_queue)
6823 (remote_target::remote_notif_remove_queued_reply): Fill in
6824 'remote' field.
6825 (remote_notif_get_pending_events): New.
6826 (remote_target::readchar, remote_target::remote_serial_write):
6827 Save/restore curr_quit_handler_target.
6828 (putpkt): New.
6829 (kill_new_fork_children): Fill in 'remote' field.
6830 (packet_command): Use get_current_remote_target, defer to
6831 remote_target method of same name.
6832 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6833 parameter, and save it in m_remote. All callers adjusted.
6834 (scoped_remote_fd::release): Use m_remote.
6835 (scoped_remote_fd::m_remote): New field.
6836 (remote_file_put, remote_file_get, remote_file_delete): Use
6837 get_current_remote_target, defer to remote_target method of same
6838 name.
6839 (remote_btrace_reset): Add remote_state paremeter. Update all
6840 callers.
6841 (remote_async_inferior_event_handler). Pass down 'data'.
6842 (remote_new_objfile): Use get_current_remote_target.
6843 (remote_target::vcont_r_supported): New.
6844 (set_range_stepping): Use get_current_remote_target and
6845 remote_target::vcont_r_supported.
6846 (_initialize_remote): Don't allocate 'remote_state' and
6847 'stop_reply_queue' globals.
6848 * remote.h (struct remote_target): Forward declare.
6849 (getpkt, putpkt, remote_notif_get_pending_events): Add
6850 'remote_target' parameter.
6851
6852 2018-05-22 Pedro Alves <palves@redhat.com>
6853
6854 * remote.c (vcont_builder): Now a class. Make all data members
6855 private.
6856 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6857 Declare methods.
6858 (vcont_builder_restart): Rename to ...
6859 (vcont_builder::restart): ... this.
6860 (vcont_builder_flush): Rename to ...
6861 (vcont_builder::flush): ... this.
6862 (vcont_builder_push_action): Rename to ...
6863 (vcont_builder::push_action): ... this.
6864 (remote_target::commit_resume): Adjust.
6865
6866 2018-05-22 Pedro Alves <palves@redhat.com>
6867
6868 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6869 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6870 (get_fixed_memory_packet_size): New.
6871 (get_memory_packet_size): Use it.
6872 (set_memory_packet_size): Don't override the config size with
6873 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6874 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6875 Don't refer to get_memory_packet_size if not connected to a remote
6876 target. Show "(default)" if configured size is 0.
6877
6878 2018-05-22 Pedro Alves <palves@redhat.com>
6879
6880 * remote.c (remote_target::mourn_inferior): Move
6881 discard_pending_stop_replies call here from ...
6882 (_initialize_remote): ... here.
6883
6884 2018-05-22 Pedro Alves <palves@redhat.com>
6885
6886 * remote.c (compare_section_command): Remove set_general_process
6887 call.
6888
6889 2018-05-22 Pedro Alves <palves@redhat.com>
6890
6891 * remote.c (struct packet_reg, struct remote_arch_state):
6892 Move higher up in the file.
6893 (remote_state) <m_arch_states>: Store remote_arch_state values
6894 instead of remote_arch_state pointers.
6895 (remote_state::get_remote_arch_state): Adjust.
6896
6897 2018-05-22 Pedro Alves <palves@redhat.com>
6898
6899 * remote.c: Include <unordered_map>.
6900 (remote_state): Now a class.
6901 (remote_state) <get_remote_arch_state>: Declare method.
6902 <get_remote_arch_state>: New field.
6903 (remote_arch_state) <remote_arch_state>: Declare ctor.
6904 <regs>: Now a unique_ptr.
6905 (remote_gdbarch_data_handle): Delete.
6906 (get_remote_arch_state): Delete.
6907 (remote_state::get_remote_arch_state): New.
6908 (get_remote_state): Adjust to call remote_state's
6909 get_remote_arch_state method.
6910 (init_remote_state): Delete, bits factored out to ...
6911 (remote_arch_state::remote_arch_state): ... this new method.
6912 (get_remote_packet_size, get_memory_packet_size)
6913 (process_g_packet, remote_target::fetch_registers)
6914 (remote_target::prepare_to_store, store_registers_using_G)
6915 (remote_target::store_registers, remote_target::get_trace_status):
6916 Adjust to call remote_state's method.
6917 (_initialize_remote): Remove reference to
6918 remote_gdbarch_data_handle.
6919
6920 2018-05-22 Pedro Alves <palves@redhat.com>
6921
6922 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6923 pread>: New method declarations.
6924 (remote_target::open_1): Adjust.
6925 (readahead_cache_invalidate): Rename to ...
6926 (readahead_cache::invalidate): ... this, and adjust to be a class
6927 method.
6928 (readahead_cache_invalidate_fd): Rename to ...
6929 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6930 class method.
6931 (remote_hostio_pwrite): Adjust.
6932 (remote_hostio_pread_from_cache): Rename to ...
6933 (readahead_cache::pread): ... this, and adjust to be a class
6934 method.
6935 (remote_hostio_close): Adjust.
6936
6937 2018-05-22 Pedro Alves <palves@redhat.com>
6938
6939 * remote.c (remote_hostio_close_cleanup): Delete.
6940 (class scoped_remote_fd): New.
6941 (remote_file_put, remote_file_get): Use it.
6942
6943 2018-05-22 Pedro Alves <palves@redhat.com>
6944
6945 (struct vCont_action_support): Use bool and initialize all fields.
6946 (struct readahead_cache): Initialize all fields.
6947 (remote_state): Use bool and initialize all fields.
6948 (remote_state::remote_state, remote_state::~remote_state): New.
6949 (new_remote_state): Delete.
6950 (_initialize_remote): Use new to allocate remote_state.
6951
6952 2018-05-22 Pedro Alves <palves@redhat.com>
6953 張俊芝 <zjz@zjz.name>
6954
6955 PR gdb/22973
6956 * c-exp.y: Include "c-support.h".
6957 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6958 of tolower. Use c_ident_is_alpha to scan names.
6959 * c-lang.c: Include "c-support.h".
6960 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6961 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6962 * c-support.h: New file, with bits factored out from ...
6963 * cp-name-parser.y: ... this file.
6964 Include "c-support.h".
6965 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6966 c-support.h and renamed.
6967 (symbol_end, yylex): Adjust.
6968
6969 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6970
6971 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6972 parameter type to CORE_ADDR.
6973 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6974 parameter type in declaration to CORE_ADDR.
6975 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6976 target_auxv_search to get AT_HWCAP and use the result to get the
6977 target description.
6978 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6979 to CORE_ADDR. Remove the cast of the return value to unsigned
6980 long. Fix error predicate of target_auxv_search.
6981 (ppc_linux_nat_target::read_description): Change the type of the
6982 hwcap variable to CORE_ADDR.
6983
6984 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6985
6986 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6987 if the size of fpscr is larger than 32 bits.
6988
6989 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6990
6991 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6992 (ppc32_linux_vsxregmap): New global.
6993 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6994 regcache_supply_regset, and regcache_collect_regset.
6995 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6996 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6997 (fetch_vsx_register, store_vsx_register): Remove.
6998 (fetch_vsx_registers): Add regno parameter. Get regset using
6999 ppc_linux_vsxregset. Use regset to supply registers.
7000 (store_vsx_registers): Add regno parameter. Get regset using
7001 ppc_linux_vsxregset. Use regset to collect registers.
7002 (fetch_register): Call fetch_vsx_registers instead of
7003 fetch_vsx_register.
7004 (store_register): Call store_vsx_registers instead of
7005 store_vsx_register.
7006 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7007 new regno parameter.
7008 (store_ppc_registers): Call store_vsx_registers with -1 for the
7009 new regno parameter.
7010 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7011 (ppc_collect_vsxregset): Remove.
7012
7013 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7014
7015 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7016 offset fields.
7017 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7018 for vector register offset fields.
7019 (ppc64_fbsd_reg_offsets): Likewise.
7020 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7021 to vector register offset fields.
7022 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7023 to vector register offset fields.
7024 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7025 vector register offset fields.
7026 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7027 initializers for vector register offset fields.
7028 (rs6000_aix64_reg_offsets): Likewise.
7029 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7030 (ppc_supply_vrregset): Remove.
7031 (ppc_collect_vrregset): Remove.
7032 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7033 (ppc_linux_vrregset) : New function.
7034 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7035 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7036 (ppc32_linux_vrregset): Remove.
7037 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7038 and use result instead of ppc32_linux_vrregset.
7039 (ppc32_linux_reg_offsets): Remove initializers for vector register
7040 offset fields.
7041 (ppc64_linux_reg_offsets): Likewise.
7042 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7043 * ppc-linux-nat.c: Include regset.h.
7044 (gdb_vrregset_t): Adjust comment to account for little-endian
7045 mode.
7046 (supply_vrregset, fill_vrregset): Remove.
7047 (fetch_altivec_register, store_altivec_register): Remove.
7048 (fetch_altivec_registers): Add regno parameter. Get regset using
7049 ppc_linux_vrregset. Use regset to supply registers.
7050 (store_altivec_registers): Add regno parameter. Get regset using
7051 ppc_linux_vrregset. Use regset to collect registers.
7052 (fetch_register): Call fetch_altivec_registers instead of
7053 fetch_altivec_register.
7054 (store_register): Call store_altivec_registers instead of
7055 store_altivec_register.
7056 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7057 the new regno parameter.
7058 (store_ppc_registers): Call store_altivec_registers with -1 for
7059 the new regno parameter.
7060
7061 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7062
7063 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7064 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7065 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7066 (gdb_vrregset_t): Change array type size to
7067 PPC_LINUX_SIZEOF_VRREGSET.
7068 (gdb_vsxregset_t): Change array type size to
7069 PPC_LINUX_SIZEOF_VSXREGSET.
7070 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7071 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7072 PPC_LINUX_SIZEOF_VSXREGSET.
7073
7074 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7075
7076 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7077 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7078 nat/ppc-linux.c.
7079 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7080 ppc_linux_target_wordsize with tid.
7081 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7082 wordsize with tid.
7083 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7084 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7085 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7086 tid parameter. Remove static specifier.
7087 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7088 (ppc_linux_target_wordsize): New declaration.
7089
7090 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7091
7092 * arch/ppc-linux-common.c: New file.
7093 * arch/ppc-linux-common.h: New file.
7094 * arch/ppc-linux-tdesc.h: New file.
7095 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7096 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7097 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7098 arch/ppc-linux-tdesc.h.
7099 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7100 arch/ppc-linux-tdesc.h.
7101 (ppc_linux_nat_target::read_description): Remove target
7102 description matching code. Fill a ppc_linux_features struct and
7103 call ppc_linux_match_description with it. Move comment about ISA
7104 2.05 to ppc-linux-common.c.
7105 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7106 arch/ppc-linux-tdesc.h.
7107 (ppc_linux_core_read_description): Remove target description
7108 matching code. Fill a ppc_linux_features struct and call
7109 ppc_linux_match_description with it.
7110 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7111 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7112 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7113 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7114 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7115 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7116 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7117 (tdesc_powerpc_e500l): Remove.
7118
7119 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7120
7121 * ada-lang.c (catch_assert_command): Pass empty string instead
7122 of NULL for excep_string argument.
7123
7124 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7125
7126 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7127 the width of the requested register exceeds the width of the
7128 `ptrace' data type.
7129
7130 2018-05-21 Tom Tromey <tom@tromey.com>
7131
7132 * printcmd.c (output_command): Remove.
7133 (output_command_const): Rename to output_command.
7134 * valprint.h (output_command): Rename from output_command_const.
7135 * tracepoint.c (trace_dump_actions): Call output_command.
7136
7137 2018-05-21 Tom Tromey <tom@tromey.com>
7138
7139 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7140 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7141 * ada-lang.h (create_ada_exception_catchpoint): Update.
7142 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7143 std::string.
7144 (create_excep_cond_exprs, ~ada_catchpoint)
7145 (should_stop_exception, print_one_exception)
7146 (print_mention_exception, print_recreate_exception): Update.
7147 (ada_get_next_arg): Remove.
7148 (catch_ada_exception_command_split): Use std::string. Change type
7149 of "excep_string", "cond_string".
7150 (catch_ada_exception_command): Update.
7151 (create_ada_exception_catchpoint): Change type of excep_string.
7152 (ada_exception_sal): Remove excep_string parameter.
7153 (~ada_catchpoint): Remove.
7154
7155 2018-05-21 Tom Tromey <tom@tromey.com>
7156
7157 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7158 cleanup.
7159
7160 2018-05-21 Tom Tromey <tom@tromey.com>
7161
7162 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7163 Return unique_xmalloc_ptr.
7164 (print_it_exception): Update.
7165
7166 2018-05-21 Tom Tromey <tom@tromey.com>
7167
7168 * tracepoint.c (trace_dump_actions): Use std::string.
7169
7170 2018-05-21 Tom Tromey <tom@tromey.com>
7171
7172 * symfile.c (reread_symbols): Use std::string for original_name.
7173
7174 2018-05-21 Tom Tromey <tom@tromey.com>
7175
7176 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7177 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7178 constructor.
7179
7180 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7181
7182 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7183 instance to...
7184 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7185 * objfiles.c (get_objfile_bfd_data): Allocate
7186 objfile_per_bfd_storage with obstack_new when allocating on
7187 obstack.
7188
7189 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7190
7191 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7192 OBSTACK_ZALLOC.
7193 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7194 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7195 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7196 (add_pending): Likewise.
7197 (parse_symbol): Likewise.
7198 (parse_partial_symbols): Likewise.
7199 (psymtab_to_symtab_1): Likewise.
7200 (new_psymtab): Likewise.
7201 (elfmdebug_build_psymtabs): Likewise.
7202 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7203 * objfiles.c (get_objfile_bfd_data): Likewise.
7204 (objfile_register_static_link): Likewise.
7205 * psymtab.c (allocate_psymtab): Likewise.
7206 * stabsread.c (read_member_functions): Likewise.
7207 * xcoffread.c (xcoff_end_psymtab): Likewise.
7208
7209 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7210
7211 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7212 compiler supports std::is_trivially_constructible.
7213 * common/poison.h: Include obstack.h.
7214 (IsMallocable): Define to is_trivially_constructible if the
7215 compiler supports it, define to true_type otherwise.
7216 (xobnew): New.
7217 (XOBNEW): Redefine.
7218 (xobnewvec): New.
7219 (XOBNEWVEC): Redefine.
7220 * gdb_obstack.h (obstack_zalloc): New.
7221 (OBSTACK_ZALLOC): Redefine.
7222 (obstack_calloc): New.
7223 (OBSTACK_CALLOC): Redefine.
7224 (obstack_new): New.
7225 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7226 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7227 gdbarch.c.
7228 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7229 obstack_calloc/obstack_zalloc.
7230 (gdbarch_obstack_zalloc): Remove.
7231 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7232
7233 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7234
7235 * stack.c (backtrace_command_1): Remove useless variable int i.
7236
7237 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7238
7239 * stack.c (print_frame_info): Fix comment.
7240
7241 2018-05-18 Tom Tromey <tom@tromey.com>
7242
7243 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7244 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7245 (~dwarf2_per_objfile): Update
7246 (dwarf2_get_dwz_file): Use new.
7247 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7248 unique_ptr.
7249
7250 2018-05-18 Tom Tromey <tom@tromey.com>
7251
7252 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7253 unique_ptr.
7254 * dwarf2read.c (struct dwp_file): Add constructor and
7255 initializers.
7256 (open_and_init_dwp_file): Return a unique_ptr.
7257 (dwarf2_per_objfile, create_dwp_hash_table)
7258 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7259 (lookup_dwo_unit_in_dwp): Update.
7260 (open_and_init_dwp_file, get_dwp_file): Update.
7261
7262 2018-05-18 Tom Tromey <tom@tromey.com>
7263
7264 * dwarf2read.c (dwarf2_per_objfile): Update.
7265 (struct mapped_index): Add initializers.
7266 (dwarf2_read_index): Use new.
7267 (dw2_symtab_iter_init): Update.
7268 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7269 unique_ptr.
7270
7271 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7272
7273 * dwarf2read.c (mapped_index) <total_size>: Remove.
7274
7275 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7276
7277 * unittests/format_pieces-selftests.c (test_format_specifier):
7278 Add ARI comments.
7279
7280 2018-05-18 Tom Tromey <tom@tromey.com>
7281
7282 * c-typeprint.c (maybe_print_hole): New function.
7283 (c_print_type_struct_field_offset): Update.
7284 (c_type_print_base_struct_union): Call maybe_print_hole.
7285
7286 2018-05-17 Keith Seitz <keiths@redhat.com>
7287
7288 * breakpoint.c (build_bpstat_chain): New function, moved from
7289 bpstat_stop_status.
7290 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7291 If no stop chain is passed, call build_bpstat_chain to build it.
7292 * breakpoint.h (build_bpstat_chain): Declare.
7293 (bpstat_stop_status): Move documentation here from breakpoint.c.
7294 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7295 build the stop chain and pass it to skip_inline_frames.
7296 Pass this stop chain to bpstat_stop_status.
7297 * inline-frame.c: Include breakpoint.h.
7298 (stopped_by_user_bp_inline_frame): New function.
7299 (skip_inline_frames): Add parameter `stop_chain'.
7300 Move documention to inline-frame.h.
7301 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7302 whether the frame should be elided.
7303 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7304 Add moved documentation and update for new parameter.
7305
7306 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7307
7308 PR cli/14975
7309 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7310 unittests/format_pieces-selftests.c.
7311 * common/format.h (format_piece) <operator==>: New.
7312 (format_pieces) <operator[]>: Remove.
7313 * common/format.c (format_pieces::format_pieces): Handle \e.
7314 * unittests/format_pieces-selftests.c: New.
7315
7316 2018-05-17 Tom Tromey <tom@tromey.com>
7317
7318 PR symtab/23010:
7319 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7320 (dw2_instantiate_symtab): Add skip_partial parameter.
7321 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7322 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7323 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7324 (dw2_expand_symtabs_matching_one)
7325 (dw2_find_pc_sect_compunit_symtab)
7326 (dw2_debug_names_lookup_symbol)
7327 (dw2_debug_names_expand_symtabs_for_function): Update.
7328 (init_cutu_and_read_dies): Add skip_partial parameter.
7329 (process_psymtab_comp_unit, build_type_psymtabs_1)
7330 (process_skeletonless_type_unit, load_partial_comp_unit)
7331 (psymtab_to_symtab_1): Update.
7332 (load_full_comp_unit): Add skip_partial parameter.
7333 (process_imported_unit_die, dwarf2_read_addr_index)
7334 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7335 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7336 (read_signatured_type): Update.
7337
7338 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7339
7340 * value.c (release_value): Remove unused variable.
7341 (record_latest_value): Likewise.
7342 (access_value_history): Likewise.
7343 (preserve_values): Likewise.
7344
7345 2018-05-17 Tom Tromey <tom@tromey.com>
7346
7347 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7348 Initialize.
7349
7350 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7351
7352 PR gdb/22286
7353 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7354 Also handle registers whose width is not a multiple of
7355 PTRACE_TYPE_RET.
7356 (linux_nat_trad_target::store_register): Likewise.
7357
7358 2018-05-16 Tom Tromey <tom@tromey.com>
7359
7360 * gdbcore.h (core_bfd): Redefine.
7361 * corelow.c (core_target::close): Update.
7362 (core_target_open): Update.
7363 * progspace.h (struct program_space) <cbfd>: Now a
7364 gdb_bfd_ref_ptr.
7365
7366 2018-05-16 Tom Tromey <tom@tromey.com>
7367
7368 PR cli/19551:
7369 * symfile-add-flags.h (enum symfile_add_flags)
7370 <SYMFILE_NOT_FILENAME>: New constant.
7371 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7372 objfile name from BFD.
7373 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7374 * minidebug.c (find_separate_debug_file_in_section): Put
7375 ".gnu_debugdata" into BFD's file name.
7376
7377 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7378
7379 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7380 Remove.
7381
7382 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7383
7384 PR binutils/21446
7385 * aarch64-tdep.c (aarch64_analyze_prologue,
7386 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7387 Indicate not interested in errors.
7388
7389 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7390
7391 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7392 Supply the MIPS_ZERO_REGNUM register.
7393
7394 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7395
7396 * mips-tdep.c (mask_address_var): Make variable static.
7397
7398 2018-05-14 Tom Tromey <tom@tromey.com>
7399
7400 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7401
7402 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7403
7404 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7405 FXSAVE_ADDR for the mxcsr register.
7406
7407 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7408
7409 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7410
7411 2018-05-11 Pedro Alves <palves@redhat.com>
7412
7413 * corelow.c (core_target) <core_target>: No longer inline.
7414 Initialize m_core_gdbarch, m_core_vec and build the section table
7415 here.
7416 <~core_target>: New.
7417 <core_gdbarch, get_core_register_section>: New methods.
7418 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7419 factored out from ...
7420 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7421 (core_ops): Delete.
7422 (sniff_core_bfd): Add gdbarch parameter.
7423 (core_close): Delete, merged into ...
7424 (core_target::close): ... here. Delete self.
7425 (core_close_cleanup): Delete.
7426 (core_target_open): Allocate a core_target on the heap. Use a
7427 unique_ptr instead of a cleanup. Bits moved into the core_target
7428 ctor. Adjust to use core_target methods instead of globals.
7429 (get_core_register_section): Rename to ...
7430 (core_target::get_core_register_section): ... this and adjust.
7431 (struct get_core_registers_cb_data): New.
7432 (get_core_registers_cb): Use it. Use bool.
7433 (core_target::fetch_registers, core_target::files_info)
7434 (core_target::xfer_partial, core_target::read_description)
7435 (core_target::pid_to, core_target::thread_name): Adjust to
7436 reference class fields instead of globals.
7437 * target.h (struct target_ops_deleter, target_ops_up): New.
7438
7439 2018-05-11 Pedro Alves <palves@redhat.com>
7440
7441 * corefile.c (core_file_command): Move to corelow.c.
7442 * corelow.c (the_core_target): Delete.
7443 (core_file_command): Moved from corefile.c. Check exec_bfd
7444 instead of the_core_target. Use target_detach instead of calling
7445 into the_core_target directly.
7446 (maybe_say_no_core_file_now): New.
7447 (core_target::detach): Use it.
7448 (_initialize_corelow): Remove references to the_core_target.
7449 * gdbcore.h (the_core_target): Delete.
7450
7451 2018-05-11 Tom Tromey <tromey@redhat.com>
7452 Pedro Alves <palves@redhat.com>
7453
7454 * corefile.c (core_bfd): Remove.
7455 * gdbcore.h (core_bfd): Now a macro.
7456 * progspace.h (struct program_space) <cbfd>: New field.
7457
7458 2018-05-11 Tom Tromey <tom@tromey.com>
7459
7460 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7461 gdb::def_vector.
7462
7463 2018-05-10 Tom Tromey <tom@tromey.com>
7464
7465 * configure: Rebuild.
7466 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7467
7468 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7469
7470 PR server/23158:
7471 * regformats/regdat.sh: Adjust script, following the addition
7472 of the new expedite_regs parameter to init_target_desc.
7473
7474 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7475
7476 PR gdb/23127
7477 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7478 set_gdbarch_significant_addr_bit.
7479 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7480 set_gdbarch_significant_addr_bit.
7481 * utils.c (address_significant): Update to sign extend addr.
7482
7483 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7484
7485 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7486 (xtensa_linux_init_abi): Limit tdep->num_regs by
7487 tdep->num_nopriv_regs.
7488 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7489 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7490 not initialized.
7491
7492 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7493
7494 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7495
7496 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7497
7498 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7499 (I387_MXCSR_INIT_VAL): New constant.
7500 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7501 buffer if it was supplied by the inferior.
7502 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7503 (i387_xsave_get_clear_bv): New function.
7504 (i387_supply_xsave): Only read x87 control registers from the
7505 xsave buffer if the feature is enabled, and the state will have
7506 been written, otherwise, provide a suitable default.
7507 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7508 including x87 control registers. Update control registers if they
7509 have changed from the default value, and mark features as enabled
7510 as required.
7511 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7512
7513 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7514
7515 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7516
7517 2018-05-07 Tom Tromey <tom@tromey.com>
7518
7519 * configure: Rebuild.
7520 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7521
7522 2018-05-07 Tom Tromey <tom@tromey.com>
7523
7524 PR tdep/20362:
7525 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7526 bit. Use correct value for VDIV.
7527
7528 2018-05-04 Tom Tromey <tom@tromey.com>
7529
7530 * configure: Rebuild.
7531 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7532
7533 2018-05-04 Tom Tromey <tom@tromey.com>
7534
7535 * linux-record.c (record_linux_system_call) <case
7536 RECORD_SYS_RECVFROM>: Add "break".
7537
7538 2018-05-04 Tom Tromey <tom@tromey.com>
7539
7540 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7541 Add missing "break".
7542 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7543 Add missing "break".
7544
7545 2018-05-04 Tom Tromey <tom@tromey.com>
7546
7547 * rs6000-tdep.c (ppc_process_record_op4)
7548 (ppc_process_record_op63): Add fall-through comment.
7549
7550 2018-05-04 Tom Tromey <tom@tromey.com>
7551
7552 * i386-tdep.c (i386_process_record): Add fall-through comment.
7553
7554 2018-05-04 Tom Tromey <tom@tromey.com>
7555
7556 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7557 comment.
7558
7559 2018-05-04 Tom Tromey <tom@tromey.com>
7560
7561 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7562 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7563 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7564 comment.
7565 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7566 comment.
7567 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7568 comment.
7569
7570 2018-05-04 Tom Tromey <tom@tromey.com>
7571
7572 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7573
7574 2018-05-04 Tom Tromey <tom@tromey.com>
7575
7576 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7577 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7578 * symfile.c (section_is_mapped): Fix fall-through comment.
7579 * stabsread.c (define_symbol, read_member_functions): Fix
7580 fall-through comment.
7581 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7582 comment.
7583 * remote.c (remote_wait_as): Fix fall-through comment.
7584 * p-exp.y (yylex): Fix fall-through comment.
7585 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7586 comment.
7587 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7588 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7589 * jv-exp.y (yylex): Fix fall-through comment.
7590 * go-exp.y (lex_one_token): Fix fall-through comment.
7591 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7592 fall-through comment.
7593 * f-exp.y (yylex): Fix fall-through comment.
7594 * dwarf2read.c (process_die): Fix fall-through comments.
7595 * dbxread.c (process_one_symbol): Fix fall-through comment.
7596 * d-exp.y (lex_one_token): Fix fall-through comment.
7597 * cp-name-parser.y (yylex): Fix fall-through comment.
7598 * coffread.c (coff_symtab_read): Fix fall-through comment.
7599 * c-exp.y (lex_one_token): Fix fall-through comment.
7600 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7601 comment.
7602 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7603 comment.
7604
7605 2018-05-04 Tom Tromey <tom@tromey.com>
7606
7607 PR python/22730:
7608 * NEWS: Mention gdb.execute change.
7609 * gdbcmd.h (execute_control_command): Don't declare.
7610 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7611 execute_control_commands, execute_control_commands_to_string.
7612 * cli/cli-script.h (execute_control_commands)
7613 (execute_control_commands_to_string): Declare.
7614 (execute_control_command): Add from_tty parameter.
7615 * cli/cli-script.c (execute_control_commands)
7616 (execute_control_commands_to_string): New functions.
7617 (execute_user_command): Use execute_control_commands.
7618 (execute_control_command_1): Add "from_tty" parameter. Update.
7619 (execute_control_command): Likewise.
7620
7621 2018-05-04 Tom Tromey <tom@tromey.com>
7622
7623 PR python/22731:
7624 * NEWS: Mention that breakpoint commands are writable.
7625 * python/py-breakpoint.c (bppy_set_commands): New function.
7626 (breakpoint_object_getset) <"commands">: Use it.
7627
7628 2018-05-04 Tom Tromey <tom@tromey.com>
7629
7630 * tracepoint.c (actions_command): Update.
7631 * mi/mi-cmd-break.c (mi_command_line_array)
7632 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7633 (mi_read_next_line): Remove.
7634 (mi_cmd_break_commands): Update.
7635 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7636 function_view.
7637 * cli/cli-script.c (get_command_line): Update.
7638 (process_next_line): Use function_view. Constify.
7639 (recurse_read_control_structure, read_command_lines)
7640 (read_command_lines_1): Change argument types to function_view.
7641 (do_define_command, document_command): Update.
7642 * breakpoint.h (check_tracepoint_command): Don't declare.
7643 * breakpoint.c (check_tracepoint_command): Remove.
7644 (commands_command_1, create_tracepoint_from_upload): Update.
7645
7646 2018-05-04 Tom Tromey <tom@tromey.com>
7647
7648 PR gdb/11750:
7649 * cli/cli-script.h (enum command_control_type) <define_control>:
7650 New constant.
7651 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7652 (build_command_line, execute_control_command_1)
7653 (process_next_line): Likewise.
7654 (do_define_command): New function, extracted from define_command.
7655 (define_command): Use it.
7656
7657 2018-05-04 Tom Tromey <tom@tromey.com>
7658
7659 * tracepoint.c (actions_command): Update.
7660 * cli/cli-script.h (read_command_lines): Update.
7661 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7662 (MAX_TMPBUF): Remove define.
7663 (define_command): Use string_printf.
7664 (document_command): Likewise.
7665 * breakpoint.c (commands_command_1): Update.
7666
7667 2018-05-04 Tom Tromey <tom@tromey.com>
7668
7669 * top.c (execute_command): Update.
7670 * cli/cli-script.h (print_command_lines): Now varargs.
7671 * cli/cli-script.c (print_command_lines): Now varargs.
7672 (execute_control_command_1) <case while_control, case if_control>:
7673 Update.
7674
7675 2018-05-04 Tom Tromey <tom@tromey.com>
7676
7677 * tracepoint.c (all_tracepoint_actions): Rename from
7678 all_tracepoint_actions_and_cleanup. Change return type.
7679 (actions_command, encode_actions_1, encode_actions)
7680 (trace_dump_actions, tdump_command): Update.
7681 * remote.c (remote_download_command_source): Update.
7682 * python/python.c (gdbpy_eval_from_control_command)
7683 (python_command, python_interactive_command): Update.
7684 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7685 * guile/guile.c (guile_command)
7686 (gdbscm_eval_from_control_command, guile_command): Update.
7687 * compile/compile.c (compile_code_command)
7688 (compile_print_command, compile_to_object): Update.
7689 * cli/cli-script.h (struct command_lines_deleter): New.
7690 (counted_command_line): New typedef.
7691 (struct command_line): Add constructor, destructor.
7692 <body_list>: Remove.
7693 <body_list_0, body_list_1>: New members.
7694 (command_line_up): Remove typedef.
7695 (read_command_lines, read_command_lines_1, get_command_line):
7696 Update.
7697 (copy_command_lines): Don't declare.
7698 * cli/cli-script.c (build_command_line): Use "new".
7699 (get_command_line): Return counted_command_line.
7700 (print_command_lines, execute_user_command)
7701 (execute_control_command_1, while_command, if_command): Update.
7702 (realloc_body_list): Remove.
7703 (process_next_line, recurse_read_control_structure): Update.
7704 (read_command_lines, read_command_lines_1): Return counted_command_line.
7705 (free_command_lines): Use "delete".
7706 (copy_command_lines): Remove.
7707 (define_command, document_command, show_user_1): Update.
7708 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7709 a counted_command_line.
7710 * breakpoint.h (counted_command_line): Remove typedef.
7711 (breakpoint_set_commands): Update.
7712 * breakpoint.c (check_no_tracepoint_commands)
7713 (validate_commands_for_breakpoint): Update.
7714 (breakpoint_set_commands): Change commands to be a
7715 counted_command_line.
7716 (commands_command_1, update_dprintf_command_list)
7717 (create_tracepoint_from_upload): Update.
7718
7719 2018-05-04 Tom Tromey <tom@tromey.com>
7720
7721 * cli/cli-decode.h (cmd_list_element): New constructor.
7722 (~cmd_list_element): New destructor.
7723 (struct cmd_list_element): Add initializers.
7724 * cli/cli-decode.c (do_add_cmd): Use "new".
7725 (delete_cmd): Use "delete".
7726
7727 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7728 Pedro Alves <palves@redhat.com>
7729
7730 PR breakpoints/19806 and support for PR external/20207.
7731 * NEWS: Mention Aarch64 watchpoint improvements.
7732 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7733 watchpoints and PR external/20207 watchpoints.
7734 * nat/aarch64-linux-hw-point.c
7735 (kernel_supports_any_contiguous_range): New.
7736 (aarch64_watchpoint_offset): New.
7737 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7738 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7739 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7740 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7741 next_addr_orig_p. Support PR external/20207 watchpoints.
7742 (aarch64_downgrade_regs): New.
7743 (aarch64_dr_state_insert_one_point): New parameters offset and
7744 addr_orig.
7745 (aarch64_dr_state_remove_one_point): Likewise.
7746 (aarch64_handle_breakpoint): Update caller.
7747 (aarch64_handle_aligned_watchpoint): Likewise.
7748 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7749 aligned_offset.
7750 (aarch64_linux_set_debug_regs): Remove const from state. Call
7751 aarch64_downgrade_regs.
7752 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7753 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7754 (DR_CONTROL_MASK): ... this.
7755 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7756 (unsigned int aarch64_watchpoint_offset): New prototype.
7757 (aarch64_linux_set_debug_regs): Remove const from state.
7758 * utils.c (align_up, align_down): Move to ...
7759 * common/common-utils.c (align_up, align_down): ... here.
7760 * utils.h (align_up, align_down): Move to ...
7761 * common/common-utils.h (align_up, align_down): ... here.
7762
7763 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7764
7765 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7766 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7767 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7768 Re-implement to match the ABI as summarized in GCC's
7769 gcc/config/sparc/sparc.c. All callers updated.
7770 (sparc32_store_arguments): Remove assertion.
7771
7772 2018-05-04 Tom Tromey <tom@tromey.com>
7773
7774 * printcmd.c: Don't include tui.h.
7775 (decode_format): Use skip_spaces.
7776
7777 2018-05-04 Tom Tromey <tom@tromey.com>
7778
7779 PR gdb/22619:
7780 * printcmd.c (last_count): New global.
7781 (x_command): Use saved count when repeating.
7782
7783 2018-05-04 Tom Tromey <tom@tromey.com>
7784
7785 * nto-procfs.c (do_closedir_cleanup): Remove.
7786 (procfs_pidlist): Use gdb_dir_up.
7787 * procfs.c (do_closedir_cleanup): Remove.
7788 (proc_update_threads): Use gdb_dir_up.
7789 * common/filestuff.h (struct gdb_dir_deleter): New.
7790 (gdb_dir_up): New typedef.
7791
7792 2018-05-04 Tom Tromey <tom@tromey.com>
7793
7794 * ada-lang.c (print_mention_exception): Use std::string.
7795
7796 2018-05-04 Tom Tromey <tom@tromey.com>
7797
7798 * ada-lang.c (create_excep_cond_exprs): Update.
7799 (ada_exception_catchpoint_cond_string): Use std::string.
7800
7801 2018-05-04 Tom Tromey <tom@tromey.com>
7802
7803 * ada-lang.c (xget_renaming_scope): Return std::string.
7804 (old_renaming_is_invisible): Update.
7805
7806 2018-05-04 Tom Tromey <tom@tromey.com>
7807
7808 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7809 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7810
7811 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7812
7813 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7814
7815 2018-05-04 Tom Tromey <tom@tromey.com>
7816
7817 * remote.c (remote_query_supported_append): Change type.
7818 (remote_check_symbols): Update.
7819
7820 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7821
7822 PR gdb/11420
7823 * configure.ac: Prepend libpython.
7824 * python/python-config.py: Likewise.
7825 * configure: Regenerate.
7826
7827 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7828
7829 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7830
7831 2018-05-03 Pedro Alves <palves@redhat.com>
7832
7833 * s390-linux-nat.c
7834 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7835 override. Write 'true' instead of '1'.
7836 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7837 declaration.
7838
7839 2018-05-02 Pedro Alves <palves@redhat.com>
7840
7841 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7842 add_inf_child_target.
7843 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7844 add_inf_child_target.
7845 * aix-thread.c (aix_thread_target_info): New.
7846 (aix_thread_target) <shortname, longname, doc>: Delete.
7847 <info>: New.
7848 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7849 add_inf_child_target.
7850 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7851 add_inf_child_target.
7852 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7853 add_inf_child_target.
7854 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7855 add_inf_child_target.
7856 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7857 add_inf_child_target.
7858 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7859 add_inf_child_target.
7860 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7861 add_inf_child_target.
7862 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7863 add_inf_child_target.
7864 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7865 add_inf_child_target.
7866 * bfd-target.c (target_bfd_target_info): New.
7867 (target_bfd) <shortname, longname, doc>: Delete.
7868 <info>: New.
7869 * bsd-kvm.c (bsd_kvm_target_info): New.
7870 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7871 <info>: New.
7872 (bsd_kvm_target::open): Rename to ...
7873 (bsd_kvm_target_open): ... this. Adjust.
7874 * bsd-uthread.c (bsd_uthread_target_info): New.
7875 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7876 <info>: New.
7877 * corefile.c (core_file_command): Adjust.
7878 * corelow.c (core_target_info): New.
7879 (core_target) <shortname, longname, doc>: Delete.
7880 <info>: New.
7881 (core_target::open): Rename to ...
7882 (core_target_open): ... this. Adjust.
7883 * ctf.c (ctf_target_info): New.
7884 (ctf_target) <shortname, longname, doc>: Delete.
7885 <info>: New.
7886 (ctf_target::open): Rename to ...
7887 (ctf_target_open): ... this.
7888 (_initialize_ctf): Adjust.
7889 * exec.c (exec_target_info): New.
7890 (exec_target) <shortname, longname, doc>: Delete.
7891 <info>: New.
7892 (exec_target::open): Rename to ...
7893 (exec_target_open): ... this.
7894 * gdbcore.h (core_target_open): Declare.
7895 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7896 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7897 add_inf_child_target.
7898 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7899 add_inf_child_target.
7900 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7901 add_inf_child_target.
7902 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7903 add_inf_child_target.
7904 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7905 add_inf_child_target.
7906 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7907 add_inf_child_target.
7908 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7909 add_inf_child_target.
7910 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7911 add_inf_child_target.
7912 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7913 add_inf_child_target.
7914 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7915 add_inf_child_target.
7916 * inf-child.c (inf_child_target_info): New.
7917 (inf_child_target::info): New.
7918 (inf_child_open_target): Remove 'target' parameter. Use
7919 get_native_target instead.
7920 (inf_child_target::open): Delete.
7921 (add_inf_child_target): New.
7922 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7923 Delete.
7924 <info>: New.
7925 (add_inf_child_target): Declare.
7926 (inf_child_open_target): Declare.
7927 * linux-thread-db.c (thread_db_target_info): New.
7928 (thread_db_target) <shortname, longname, doc>: Delete.
7929 <info>: New.
7930 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7931 add_inf_child_target.
7932 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7933 add_inf_child_target.
7934 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7935 add_inf_child_target.
7936 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7937 add_inf_child_target.
7938 * make-target-delegates (print_class): Adjust.
7939 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7940 add_inf_child_target.
7941 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7942 add_inf_child_target.
7943 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7944 add_inf_child_target.
7945 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7946 add_inf_child_target.
7947 * nto-procfs.c (nto_native_target_info): New.
7948 (nto_procfs_target_native) <shortname, longname, doc>:
7949 Delete.
7950 <info>: New.
7951 (nto_procfs_target_info): New.
7952 (nto_procfs_target_procfs) <shortname, longname, doc>:
7953 Delete.
7954 <info>: New.
7955 (init_procfs_targets): Adjust.
7956 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7957 add_inf_child_target.
7958 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7959 add_inf_child_target.
7960 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7961 add_inf_child_target.
7962 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7963 add_inf_child_target.
7964 * ravenscar-thread.c (ravenscar_target_info): New.
7965 (ravenscar_thread_target) <shortname, longname, doc>:
7966 Delete.
7967 <info>: New.
7968 * record-btrace.c (record_btrace_target_info):
7969 (record_btrace_target) <shortname, longname, doc>: Delete.
7970 <info>: New.
7971 (record_btrace_target::open): Rename to ...
7972 (record_btrace_target_open): ... this. Adjust.
7973 * record-full.c (record_longname, record_doc): New.
7974 (record_full_base_target) <shortname, longname, doc>: Delete.
7975 <info>: New.
7976 (record_full_target_info): New.
7977 (record_full_target): <shortname>: Delete.
7978 <info>: New.
7979 (record_full_core_open_1, record_full_open_1): Update comments.
7980 (record_full_base_target::open): Rename to ...
7981 (record_full_open): ... this.
7982 (cmd_record_full_restore): Update.
7983 (_initialize_record_full): Update.
7984 * remote-sim.c (remote_sim_target_info): New.
7985 (gdbsim_target) <shortname, longname, doc>: Delete.
7986 <info>: New.
7987 (gdbsim_target::open): Rename to ...
7988 (gdbsim_target_open): ... this.
7989 (_initialize_remote_sim): Adjust.
7990 * remote.c (remote_doc): New.
7991 (remote_target_info): New.
7992 (remote_target) <shortname, longname, doc>: Delete.
7993 <info>: New.
7994 (extended_remote_target_info): New.
7995 (extended_remote_target) <shortname, longname, doc>: Delete.
7996 <info>: New.
7997 (remote_target::open_1): Make static. Adjust.
7998 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7999 * s390-linux-nat.c (_initialize_s390_nat): Use
8000 add_inf_child_target.
8001 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8002 add_inf_child_target.
8003 * sol-thread.c (thread_db_target_info): New.
8004 (sol_thread_target) <shortname, longname, doc>: Delete.
8005 <info>: New.
8006 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8007 add_inf_child_target.
8008 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8009 add_inf_child_target.
8010 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8011 add_inf_child_target.
8012 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8013 add_inf_child_target.
8014 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8015 add_inf_child_target.
8016 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8017 add_inf_child_target.
8018 * spu-linux-nat.c (_initialize_spu_nat): Use
8019 add_inf_child_target.
8020 * spu-multiarch.c (spu_multiarch_target_info): New.
8021 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8022 <info>: New.
8023 * target-delegates.c: Regenerate.
8024 * target.c: Include <unordered_map>.
8025 (target_ops_p): Delete.
8026 (DEF_VEC_P(target_ops_p)): Delete.
8027 (target_factories): New.
8028 (test_target_info): New.
8029 (test_target_ops::info): New.
8030 (open_target): Adjust to use target_factories.
8031 (add_target_with_completer): Rename to ...
8032 (add_target): ... this. Change prototype. Register target_info
8033 and open callback in target_factories. Register target_info in
8034 command context instead of target_ops.
8035 (add_target): Delete old implementation.
8036 (add_deprecated_target_alias): Change prototype. Adjust.
8037 (the_native_target): New.
8038 (set_native_target, get_native_target): New.
8039 (find_default_run_target): Use the_native_target.
8040 (find_attach_target, find_run_target): Simplify.
8041 (target_ops::open): Delete.
8042 (dummy_target_info): New.
8043 (dummy_target::shortname, dummy_target::longname)
8044 (dummy_target::doc): Delete.
8045 (dummy_target::info): New.
8046 (debug_target::shortname, debug_target::longname)
8047 (debug_target::doc): Delete.
8048 (debug_target::info): New.
8049 * target.h (struct target_info): New.
8050 (target_ops::~target_ops): Add comment.
8051 (target_ops::info): New.
8052 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8053 longer virtual. Implement in terms of target_info.
8054 (set_native_target, get_native_target): Declare.
8055 (target_open_ftype): New.
8056 (add_target, add_target_with_completer)
8057 (add_deprecated_target_alias): Change prototype.
8058 (test_target) <shortname, longname, doc>: Delete.
8059 <info>: New.
8060 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8061 add_inf_child_target.
8062 * tracefile-tfile.c (tfile_target_info): New.
8063 (tfile_target) <shortname, longname, doc>: Delete.
8064 <info>: New.
8065 (tfile_target::open): Rename to ...
8066 (tfile_target_open): ... this.
8067 (_initialize_tracefile_tfile): Adjust.
8068 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8069 add_inf_child_target.
8070 * windows-nat.c (_initialize_windows_nat): Use
8071 add_inf_child_target.
8072 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8073 add_inf_child_target.
8074
8075 2018-05-02 Pedro Alves <palves@redhat.com>
8076
8077 * linux-nat.h (linux_nat_target) <low_new_thread,
8078 low_delete_thread, low_new_fork, low_forget_process,
8079 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8080 New virtual methods.
8081 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8082 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8083 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8084 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8085 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8086 Delete.
8087 * linux-fork.c (delete_fork): Adjust to call low method.
8088 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8089 (linux_nat_new_fork, linux_nat_forget_process_hook)
8090 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8091 (linux_nat_status_is_event):
8092 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8093 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8094 to call low method.
8095 (sigtrap_is_event): Rename to ...
8096 (linux_nat_target::low_status_is_event): ... this.
8097 (linux_nat_set_status_is_event): Delete.
8098 (save_stop_reason, linux_nat_wait_1)
8099 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8100 low methods.
8101 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8102 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8103 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8104 (linux_nat_set_prepare_to_resume): Delete.
8105 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8106 low virtual methods.
8107 * amd64-linux-nat.c: Likewise.
8108 * arm-linux-nat.c: Likewise.
8109 * i386-linux-nat.c: Likewise.
8110 * ia64-linux-nat.c: Likewise.
8111 * mips-linux-nat.c: Likewise.
8112 * ppc-linux-nat.c: Likewise.
8113 * s390-linux-nat.c: Likewise.
8114 * sparc64-linux-nat.c: Likewise.
8115 * x86-linux-nat.c: Likewise.
8116 * x86-linux-nat.h: Include "nat/x86-linux.h".
8117 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8118 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8119 Override methods.
8120
8121 2018-05-02 Pedro Alves <palves@redhat.com>
8122
8123 * target.h (target_ops)
8124 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8125 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8126 stopped_by_watchpoint, have_continuable_watchpoint,
8127 stopped_data_address, watchpoint_addr_within_range,
8128 can_accel_watchpoint_condition, can_run, thread_alive,
8129 has_all_memory, has_memory, has_stack, has_registers,
8130 has_execution, can_async_p, is_async_p, supports_non_stop,
8131 always_non_stop_p, can_execute_reverse, supports_multi_process,
8132 supports_enable_disable_tracepoint,
8133 supports_disable_randomization, supports_string_tracing,
8134 supports_evaluation_of_breakpoint_conditions,
8135 can_run_breakpoint_commands, filesystem_is_local,
8136 can_download_tracepoint, get_trace_state_variable_value,
8137 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8138 record_is_replaying, record_will_replay,
8139 augmented_libraries_svr4_read>: Adjust to return bool.
8140 * aarch64-linux-nat.c: All implementations adjusted.
8141 * aix-thread.c: All implementations adjusted.
8142 * arm-linux-nat.c: All implementations adjusted.
8143 * breakpoint.c: All implementations adjusted.
8144 * bsd-kvm.c: All implementations adjusted.
8145 * bsd-uthread.c: All implementations adjusted.
8146 * corelow.c: All implementations adjusted.
8147 * ctf.c: All implementations adjusted.
8148 * darwin-nat.c: All implementations adjusted.
8149 * darwin-nat.h: All implementations adjusted.
8150 * exec.c: All implementations adjusted.
8151 * fbsd-nat.c: All implementations adjusted.
8152 * fbsd-nat.h: All implementations adjusted.
8153 * gnu-nat.c: All implementations adjusted.
8154 * gnu-nat.h: All implementations adjusted.
8155 * go32-nat.c: All implementations adjusted.
8156 * ia64-linux-nat.c: All implementations adjusted.
8157 * inf-child.c: All implementations adjusted.
8158 * inf-child.h: All implementations adjusted.
8159 * inf-ptrace.c: All implementations adjusted.
8160 * inf-ptrace.h: All implementations adjusted.
8161 * linux-nat.c: All implementations adjusted.
8162 * linux-nat.h: All implementations adjusted.
8163 * mips-linux-nat.c: All implementations adjusted.
8164 * nto-procfs.c: All implementations adjusted.
8165 * ppc-linux-nat.c: All implementations adjusted.
8166 * procfs.c: All implementations adjusted.
8167 * ravenscar-thread.c: All implementations adjusted.
8168 * record-btrace.c: All implementations adjusted.
8169 * record-full.c: All implementations adjusted.
8170 * remote-sim.c: All implementations adjusted.
8171 * remote.c: All implementations adjusted.
8172 * s390-linux-nat.c: All implementations adjusted.
8173 * sol-thread.c: All implementations adjusted.
8174 * spu-multiarch.c: All implementations adjusted.
8175 * target-delegates.c: All implementations adjusted.
8176 * target.c: All implementations adjusted.
8177 * target.h: All implementations adjusted.
8178 * tracefile-tfile.c: All implementations adjusted.
8179 * tracefile.c: All implementations adjusted.
8180 * tracefile.h: All implementations adjusted.
8181 * windows-nat.c: All implementations adjusted.
8182 * x86-linux-nat.h: All implementations adjusted.
8183 * x86-nat.h: All implementations adjusted.
8184
8185 2018-05-02 Pedro Alves <palves@redhat.com>
8186
8187 * make-target-delegates (scan_target_h): Don't trim lines here.
8188 Replace sequences of tabs and/or whitespace with a single
8189 whitespace.
8190 (top level, parsing methods): Trim each line before processing it
8191 here.
8192
8193 2018-05-02 Pedro Alves <palves@redhat.com>
8194 John Baldwin <jhb@freebsd.org>
8195
8196 * target.h (enum strata) <debug_stratum>: New.
8197 (struct target_ops) <all delegation methods>: Replace by C++
8198 virtual methods, and drop "to_" prefix. All references updated
8199 throughout.
8200 <to_shortname, to_longname, to_doc, to_data,
8201 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8202 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8203 virtual methods. All references updated throughout.
8204 <can_attach, supports_terminal_ours, can_create_inferior,
8205 get_thread_control_capabilities, attach_no_wait>: New
8206 virtual methods.
8207 <insert_breakpoint, remove_breakpoint>: Now
8208 TARGET_DEFAULT_NORETURN methods.
8209 <info_proc>: Now returns bool.
8210 <to_magic>: Delete.
8211 (OPS_MAGIC): Delete.
8212 (current_target): Delete. All references replaced by references
8213 to ...
8214 (target_stack): ... this. New.
8215 (target_shortname, target_longname): Adjust.
8216 (target_can_run): Now a function declaration.
8217 (default_child_has_all_memory, default_child_has_memory)
8218 (default_child_has_stack, default_child_has_registers)
8219 (default_child_has_execution): Remove target_ops parameter.
8220 (complete_target_initialization): Delete.
8221 (memory_breakpoint_target): New template class.
8222 (test_target_ops): Refactor as a C++ class with virtual methods.
8223 * make-target-delegates (NAME_PART): Tighten.
8224 (POINTER_PART, CP_SYMBOL): New.
8225 (SIMPLE_RETURN_PART): Reimplement.
8226 (VEC_RETURN_PART): Expect less.
8227 (RETURN_PART, VIRTUAL_PART): New.
8228 (METHOD): Adjust to C++ virtual methods.
8229 (scan_target_h): Remove reference to C99.
8230 (dname): Output "target_ops::" prefix.
8231 (write_function_header): Adjust to output a C++ class method.
8232 (write_declaration): New.
8233 (write_delegator): Adjust to output a C++ class method.
8234 (tdname): Output "dummy_target::" prefix.
8235 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8236 method.
8237 (tdefault_names, debug_names): Delete.
8238 (return_types, tdefaults, styles, argtypes_array): New.
8239 (top level): All methods are delegators.
8240 (print_class): New.
8241 (top level): Print dummy_target and debug_target classes.
8242 * target-delegates.c: Regenerate.
8243 * target-debug.h (target_debug_print_enum_info_proc_what)
8244 (target_debug_print_thread_control_capabilities)
8245 (target_debug_print_thread_info_p): New.
8246 * target.c (dummy_target): Delete.
8247 (the_dummy_target, the_debug_target): New.
8248 (target_stack): Now extern.
8249 (set_targetdebug): Push/unpush debug target.
8250 (default_child_has_all_memory, default_child_has_memory)
8251 (default_child_has_stack, default_child_has_registers)
8252 (default_child_has_execution): Remove target_ops parameter.
8253 (complete_target_initialization): Delete.
8254 (add_target_with_completer): No longer call
8255 complete_target_initialization.
8256 (target_supports_terminal_ours): Use regular delegation.
8257 (update_current_target): Delete.
8258 (push_target): No longer check magic number. Don't call
8259 update_current_target.
8260 (unpush_target): Don't call update_current_target.
8261 (target_is_pushed): No longer check magic number.
8262 (target_require_runnable): Skip for all stratums over
8263 process_stratum.
8264 (target_ops::info_proc): New.
8265 (target_info_proc): Use find_target_at and
8266 find_default_run_target.
8267 (target_supports_disable_randomization): Use regular delegation.
8268 (target_get_osdata): Use find_target_at.
8269 (target_ops::open, target_ops::close, target_ops::can_attach)
8270 (target_ops::attach, target_ops::can_create_inferior)
8271 (target_ops::create_inferior, target_ops::can_run)
8272 (target_can_run): New.
8273 (default_fileio_target): Use regular delegation.
8274 (target_ops::fileio_open, target_ops::fileio_pwrite)
8275 (target_ops::fileio_pread, target_ops::fileio_fstat)
8276 (target_ops::fileio_close, target_ops::fileio_unlink)
8277 (target_ops::fileio_readlink): New.
8278 (target_fileio_open_1, target_fileio_unlink)
8279 (target_fileio_readlink): Always call the target method. Handle
8280 FILEIO_ENOSYS.
8281 (return_zero, return_zero_has_execution): Delete.
8282 (init_dummy_target): Delete.
8283 (dummy_target::dummy_target, dummy_target::shortname)
8284 (dummy_target::longname, dummy_target::doc)
8285 (debug_target::debug_target, debug_target::shortname)
8286 (debug_target::longname, debug_target::doc): New.
8287 (target_supports_delete_record): Use regular delegation.
8288 (setup_target_debug): Delete.
8289 (maintenance_print_target_stack): Skip debug_stratum.
8290 (initialize_targets): Instantiate the_dummy_target and
8291 the_debug_target.
8292 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8293 use target_stack.
8294 (target_auxv_search, fprint_target_auxv): Adjust.
8295 (info_auxv_command): Adjust to use target_stack.
8296 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8297 * exceptions.c (print_flush): Handle a NULL target_stack.
8298 * regcache.c (target_ops_no_register): Refactor as class with
8299 virtual methods.
8300
8301 * exec.c (exec_target): New class.
8302 (exec_ops): Now an exec_target.
8303 (exec_open, exec_close_1, exec_get_section_table)
8304 (exec_xfer_partial, exec_files_info, exec_has_memory)
8305 (exec_make_note_section): Refactor as exec_target methods.
8306 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8307 Delete.
8308 (exec_target::find_memory_regions): New.
8309 (_initialize_exec): Don't call init_exec_ops.
8310 * gdbcore.h (exec_file_clear): Delete.
8311
8312 * corefile.c (core_target): Delete.
8313 (core_file_command): Adjust.
8314 * corelow.c (core_target): New class.
8315 (the_core_target): New.
8316 (core_close): Remove target_ops parameter.
8317 (core_close_cleanup): Adjust.
8318 (core_target::close): New.
8319 (core_open, core_detach, get_core_registers, core_files_info)
8320 (core_xfer_partial, core_thread_alive, core_read_description)
8321 (core_pid_to_str, core_thread_name, core_has_memory)
8322 (core_has_stack, core_has_registers, core_info_proc): Rework as
8323 core_target methods.
8324 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8325 (_initialize_corelow): Initialize the_core_target.
8326 * gdbcore.h (core_target): Delete.
8327 (the_core_target): New.
8328
8329 * ctf.c: (ctf_target): New class.
8330 (ctf_ops): Now a ctf_target.
8331 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8332 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8333 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8334 methods.
8335 (init_ctf_ops): Delete.
8336 (_initialize_ctf): Don't call it.
8337 * tracefile-tfile.c (tfile_target): New class.
8338 (tfile_ops): Now a tfile_target.
8339 (tfile_open, tfile_close, tfile_files_info)
8340 (tfile_get_tracepoint_status, tfile_trace_find)
8341 (tfile_fetch_registers, tfile_xfer_partial)
8342 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8343 Refactor as tfile_target methods.
8344 (tfile_xfer_partial_features): Remove target_ops parameter.
8345 (init_tfile_ops): Delete.
8346 (_initialize_tracefile_tfile): Don't call it.
8347 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8348 (tracefile_has_stack, tracefile_has_registers)
8349 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8350 tracefile_target methods.
8351 (init_tracefile_ops): Delete.
8352 (tracefile_target::tracefile_target): New.
8353 * tracefile.h: Include "target.h".
8354 (tracefile_target): New class.
8355 (init_tracefile_ops): Delete.
8356
8357 * spu-multiarch.c (spu_multiarch_target): New class.
8358 (spu_ops): Now a spu_multiarch_target.
8359 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8360 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8361 (spu_search_memory, spu_mourn_inferior): Refactor as
8362 spu_multiarch_target methods.
8363 (init_spu_ops): Delete.
8364 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8365 complete_target_initialization.
8366
8367 * ravenscar-thread.c (ravenscar_thread_target): New class.
8368 (ravenscar_ops): Now a ravenscar_thread_target.
8369 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8370 (ravenscar_thread_alive, ravenscar_pid_to_str)
8371 (ravenscar_fetch_registers, ravenscar_store_registers)
8372 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8373 (ravenscar_stopped_by_hw_breakpoint)
8374 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8375 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8376 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8377 methods.
8378 (init_ravenscar_thread_ops): Delete.
8379 (_initialize_ravenscar): Remove references to
8380 init_ravenscar_thread_ops and complete_target_initialization.
8381
8382 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8383 (bsd_uthread_target): New class.
8384 (bsd_uthread_ops): Now a bsd_uthread_target.
8385 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8386 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8387 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8388 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8389 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8390 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8391 (bsd_uthread_target): Delete function.
8392 (_initialize_bsd_uthread): Remove reference to
8393 complete_target_initialization.
8394
8395 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8396 (target_bfd): ... this new class.
8397 (target_bfd_xfer_partial, target_bfd_get_section_table)
8398 (target_bfd_close): Refactor as target_bfd methods.
8399 (target_bfd::~target_bfd): New.
8400 (target_bfd_reopen): Adjust.
8401 (target_bfd::close): New.
8402
8403 * record-btrace.c (record_btrace_target): New class.
8404 (record_btrace_ops): Now a record_btrace_target.
8405 (record_btrace_open, record_btrace_stop_recording)
8406 (record_btrace_disconnect, record_btrace_close)
8407 (record_btrace_async, record_btrace_info)
8408 (record_btrace_insn_history, record_btrace_insn_history_range)
8409 (record_btrace_insn_history_from, record_btrace_call_history)
8410 (record_btrace_call_history_range)
8411 (record_btrace_call_history_from, record_btrace_record_method)
8412 (record_btrace_is_replaying, record_btrace_will_replay)
8413 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8414 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8415 (record_btrace_store_registers, record_btrace_prepare_to_store)
8416 (record_btrace_to_get_unwinder)
8417 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8418 (record_btrace_commit_resume, record_btrace_wait)
8419 (record_btrace_stop, record_btrace_can_execute_reverse)
8420 (record_btrace_stopped_by_sw_breakpoint)
8421 (record_btrace_supports_stopped_by_sw_breakpoint)
8422 (record_btrace_stopped_by_hw_breakpoint)
8423 (record_btrace_supports_stopped_by_hw_breakpoint)
8424 (record_btrace_update_thread_list, record_btrace_thread_alive)
8425 (record_btrace_goto_begin, record_btrace_goto_end)
8426 (record_btrace_goto, record_btrace_stop_replaying_all)
8427 (record_btrace_execution_direction)
8428 (record_btrace_prepare_to_generate_core)
8429 (record_btrace_done_generating_core): Refactor as
8430 record_btrace_target methods.
8431 (init_record_btrace_ops): Delete.
8432 (_initialize_record_btrace): Remove reference to
8433 init_record_btrace_ops.
8434 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8435 the execution_direction global.
8436 (record_full_base_target, record_full_target)
8437 (record_full_core_target): New classes.
8438 (record_full_ops): Now a record_full_target.
8439 (record_full_core_ops): Now a record_full_core_target.
8440 (record_full_target::detach, record_full_target::disconnect)
8441 (record_full_core_target::disconnect)
8442 (record_full_target::mourn_inferior, record_full_target::kill):
8443 New.
8444 (record_full_open, record_full_close, record_full_async): Refactor
8445 as methods of the record_full_base_target class.
8446 (record_full_resume, record_full_commit_resume): Refactor
8447 as methods of the record_full_target class.
8448 (record_full_wait, record_full_stopped_by_watchpoint)
8449 (record_full_stopped_data_address)
8450 (record_full_stopped_by_sw_breakpoint)
8451 (record_full_supports_stopped_by_sw_breakpoint)
8452 (record_full_stopped_by_hw_breakpoint)
8453 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8454 methods of the record_full_base_target class.
8455 (record_full_store_registers, record_full_xfer_partial)
8456 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8457 Refactor as methods of the record_full_target class.
8458 (record_full_can_execute_reverse, record_full_get_bookmark)
8459 (record_full_goto_bookmark, record_full_execution_direction)
8460 (record_full_record_method, record_full_info, record_full_delete)
8461 (record_full_is_replaying, record_full_will_replay)
8462 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8463 (record_full_stop_replaying): Refactor as methods of the
8464 record_full_base_target class.
8465 (record_full_core_resume, record_full_core_kill)
8466 (record_full_core_fetch_registers)
8467 (record_full_core_prepare_to_store)
8468 (record_full_core_store_registers, record_full_core_xfer_partial)
8469 (record_full_core_insert_breakpoint)
8470 (record_full_core_remove_breakpoint)
8471 (record_full_core_has_execution): Refactor
8472 as methods of the record_full_core_target class.
8473 (record_full_base_target::supports_delete_record): New.
8474 (init_record_full_ops): Delete.
8475 (init_record_full_core_ops): Delete.
8476 (record_full_save): Refactor as method of the
8477 record_full_base_target class.
8478 (_initialize_record_full): Remove references to
8479 init_record_full_ops and init_record_full_core_ops.
8480
8481 * remote.c (remote_target, extended_remote_target): New classes.
8482 (remote_ops): Now a remote_target.
8483 (extended_remote_ops): Now an extended_remote_target.
8484 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8485 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8486 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8487 (remote_pass_signals, remote_set_syscall_catchpoint)
8488 (remote_program_signals, )
8489 (remote_thread_always_alive): Remove target_ops parameter.
8490 (remote_thread_alive, remote_thread_name)
8491 (remote_update_thread_list, remote_threads_extra_info)
8492 (remote_static_tracepoint_marker_at)
8493 (remote_static_tracepoint_markers_by_strid)
8494 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8495 (remote_open): Refactor as methods of remote_target.
8496 (extended_remote_open, extended_remote_detach)
8497 (extended_remote_attach, extended_remote_post_attach):
8498 (extended_remote_supports_disable_randomization)
8499 (extended_remote_create_inferior): : Refactor as method of
8500 extended_remote_target.
8501 (remote_set_permissions, remote_open_1, remote_detach)
8502 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8503 (remote_resume, remote_commit_resume, remote_stop)
8504 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8505 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8506 (remote_prepare_to_store, remote_store_registers)
8507 (remote_flash_erase, remote_flash_done, remote_files_info)
8508 (remote_kill, remote_mourn, remote_insert_breakpoint)
8509 (remote_remove_breakpoint, remote_insert_watchpoint)
8510 (remote_watchpoint_addr_within_range)
8511 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8512 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8513 (remote_supports_stopped_by_sw_breakpoint)
8514 (remote_stopped_by_hw_breakpoint)
8515 (remote_supports_stopped_by_hw_breakpoint)
8516 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8517 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8518 (remote_verify_memory): Refactor as methods of remote_target.
8519 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8520 parameter.
8521 (remote_xfer_partial, remote_get_memory_xfer_limit)
8522 (remote_search_memory, remote_rcmd, remote_memory_map)
8523 (remote_pid_to_str, remote_get_thread_local_address)
8524 (remote_get_tib_address, remote_read_description): Refactor as
8525 methods of remote_target.
8526 (remote_target::fileio_open, remote_target::fileio_pwrite)
8527 (remote_target::fileio_pread, remote_target::fileio_close): New.
8528 (remote_hostio_readlink, remote_hostio_fstat)
8529 (remote_filesystem_is_local, remote_can_execute_reverse)
8530 (remote_supports_non_stop, remote_supports_disable_randomization)
8531 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8532 (remote_supports_enable_disable_tracepoint)
8533 (remote_supports_string_tracing)
8534 (remote_can_run_breakpoint_commands, remote_trace_init)
8535 (remote_download_tracepoint, remote_can_download_tracepoint)
8536 (remote_download_trace_state_variable, remote_enable_tracepoint)
8537 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8538 (remote_trace_start, remote_get_trace_status)
8539 (remote_get_tracepoint_status, remote_trace_stop)
8540 (remote_trace_find, remote_get_trace_state_variable_value)
8541 (remote_save_trace_data, remote_get_raw_trace_data)
8542 (remote_set_disconnected_tracing, remote_core_of_thread)
8543 (remote_set_circular_trace_buffer, remote_traceframe_info)
8544 (remote_get_min_fast_tracepoint_insn_len)
8545 (remote_set_trace_buffer_size, remote_set_trace_notes)
8546 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8547 (remote_disable_btrace, remote_teardown_btrace)
8548 (remote_read_btrace, remote_btrace_conf)
8549 (remote_augmented_libraries_svr4_read, remote_load)
8550 (remote_pid_to_exec_file, remote_can_do_single_step)
8551 (remote_execution_direction, remote_thread_handle_to_thread_info):
8552 Refactor as methods of remote_target.
8553 (init_remote_ops, init_extended_remote_ops): Delete.
8554 (remote_can_async_p, remote_is_async_p, remote_async)
8555 (remote_thread_events, remote_upload_tracepoints)
8556 (remote_upload_trace_state_variables): Refactor as methods of
8557 remote_target.
8558 (_initialize_remote): Remove references to init_remote_ops and
8559 init_extended_remote_ops.
8560
8561 * remote-sim.c (gdbsim_target): New class.
8562 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8563 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8564 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8565 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8566 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8567 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8568 Refactor as methods of gdbsim_target.
8569 (gdbsim_ops): Now a gdbsim_target.
8570 (init_gdbsim_ops): Delete.
8571 (gdbsim_cntrl_c): Adjust.
8572 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8573
8574 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8575 (the_amd64_linux_nat_target): New.
8576 (amd64_linux_fetch_inferior_registers)
8577 (amd64_linux_store_inferior_registers): Refactor as methods of
8578 amd64_linux_nat_target.
8579 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8580 * i386-linux-nat.c: Don't include "linux-nat.h".
8581 (i386_linux_nat_target): New class.
8582 (the_i386_linux_nat_target): New.
8583 (i386_linux_fetch_inferior_registers)
8584 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8585 as methods of i386_linux_nat_target.
8586 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8587 * inf-child.c (inf_child_ops): Delete.
8588 (inf_child_fetch_inferior_registers)
8589 (inf_child_store_inferior_registers): Delete.
8590 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8591 methods of inf_child_target.
8592 (inf_child_target::supports_terminal_ours)
8593 (inf_child_target::terminal_init)
8594 (inf_child_target::terminal_inferior)
8595 (inf_child_target::terminal_ours_for_output)
8596 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8597 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8598 New.
8599 (inf_child_open, inf_child_disconnect, inf_child_close)
8600 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8601 (inf_child_post_startup_inferior, inf_child_can_run)
8602 (inf_child_pid_to_exec_file): Refactor as methods of
8603 inf_child_target.
8604 (inf_child_follow_fork): Delete.
8605 (inf_child_target::can_create_inferior)
8606 (inf_child_target::can_attach): New.
8607 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8608 (inf_child_target::has_stack, inf_child_target::has_registers)
8609 (inf_child_target::has_execution): New.
8610 (inf_child_fileio_open, inf_child_fileio_pwrite)
8611 (inf_child_fileio_pread, inf_child_fileio_fstat)
8612 (inf_child_fileio_close, inf_child_fileio_unlink)
8613 (inf_child_fileio_readlink, inf_child_use_agent)
8614 (inf_child_can_use_agent): Refactor as methods of
8615 inf_child_target.
8616 (return_zero, inf_child_target): Delete.
8617 (inf_child_target::inf_child_target): New.
8618 * inf-child.h: Include "target.h".
8619 (inf_child_target): Delete function prototype.
8620 (inf_child_target): New class.
8621 (inf_child_open_target, inf_child_mourn_inferior)
8622 (inf_child_maybe_unpush_target): Delete.
8623 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8624 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8625 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8626 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8627 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8628 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8629 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8630 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8631 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8632 methods of inf_ptrace_target.
8633 (inf_ptrace_target): Delete function.
8634 * inf-ptrace.h: Include "inf-child.h".
8635 (inf_ptrace_target): Delete function declaration.
8636 (inf_ptrace_target): New class.
8637 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8638 * linux-nat.c (linux_target): New.
8639 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8640 (linux_nat_target::~linux_nat_target): New.
8641 (linux_child_post_attach, linux_child_post_startup_inferior)
8642 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8643 (linux_child_remove_fork_catchpoint)
8644 (linux_child_insert_vfork_catchpoint)
8645 (linux_child_remove_vfork_catchpoint)
8646 (linux_child_insert_exec_catchpoint)
8647 (linux_child_remove_exec_catchpoint)
8648 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8649 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8650 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8651 (linux_nat_stopped_data_address)
8652 (linux_nat_stopped_by_sw_breakpoint)
8653 (linux_nat_supports_stopped_by_sw_breakpoint)
8654 (linux_nat_stopped_by_hw_breakpoint)
8655 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8656 (linux_nat_kill, linux_nat_mourn_inferior)
8657 (linux_nat_xfer_partial, linux_nat_thread_alive)
8658 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8659 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8660 (linux_child_static_tracepoint_markers_by_strid)
8661 (linux_nat_is_async_p, linux_nat_can_async_p)
8662 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8663 (linux_nat_supports_multi_process)
8664 (linux_nat_supports_disable_randomization, linux_nat_async)
8665 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8666 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8667 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8668 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8669 methods of linux_nat_target.
8670 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8671 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8672 parameter.
8673 (check_stopped_by_watchpoint): Adjust.
8674 (linux_xfer_partial): Delete.
8675 (linux_target_install_ops, linux_target, linux_nat_add_target):
8676 Delete.
8677 (linux_nat_target::linux_nat_target): New.
8678 * linux-nat.h: Include "inf-ptrace.h".
8679 (linux_nat_target): New.
8680 (linux_target, linux_target_install_ops, linux_nat_add_target):
8681 Delete function declarations.
8682 (linux_target): Declare global.
8683 * linux-thread-db.c (thread_db_target): New.
8684 (thread_db_target::thread_db_target): New.
8685 (thread_db_ops): Delete.
8686 (the_thread_db_target): New.
8687 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8688 (thread_db_update_thread_list, thread_db_pid_to_str)
8689 (thread_db_extra_thread_info)
8690 (thread_db_thread_handle_to_thread_info)
8691 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8692 (thread_db_resume): Refactor as methods of thread_db_target.
8693 (init_thread_db_ops): Delete.
8694 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8695 * x86-linux-nat.c: Don't include "linux-nat.h".
8696 (super_post_startup_inferior): Delete.
8697 (x86_linux_nat_target::~x86_linux_nat_target): New.
8698 (x86_linux_child_post_startup_inferior)
8699 (x86_linux_read_description, x86_linux_enable_btrace)
8700 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8701 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8702 methods of x86_linux_nat_target.
8703 (x86_linux_create_target): Delete. Bits folded ...
8704 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8705 pointer.
8706 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8707 (x86_linux_nat_target): New class.
8708 (x86_linux_create_target): Delete.
8709 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8710 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8711 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8712 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8713 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8714 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8715 make extern.
8716 (x86_use_watchpoints): Delete.
8717 * x86-nat.h: Include "breakpoint.h" and "target.h".
8718 (x86_use_watchpoints): Delete.
8719 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8720 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8721 (x86_insert_watchpoint, x86_remove_watchpoint)
8722 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8723 (x86_stopped_by_hw_breakpoint): New declarations.
8724 (x86_nat_target): New template class.
8725
8726 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8727 (the_ppc_linux_nat_target): New.
8728 (ppc_linux_fetch_inferior_registers)
8729 (ppc_linux_can_use_hw_breakpoint)
8730 (ppc_linux_region_ok_for_hw_watchpoint)
8731 (ppc_linux_ranged_break_num_registers)
8732 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8733 (ppc_linux_insert_mask_watchpoint)
8734 (ppc_linux_remove_mask_watchpoint)
8735 (ppc_linux_can_accel_watchpoint_condition)
8736 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8737 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8738 (ppc_linux_watchpoint_addr_within_range)
8739 (ppc_linux_masked_watch_num_registers)
8740 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8741 (ppc_linux_read_description): Refactor as methods of
8742 ppc_linux_nat_target.
8743 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8744
8745 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8746 (procfs_target): New class.
8747 (the_procfs_target): New.
8748 (procfs_target): Delete function.
8749 (procfs_auxv_parse, procfs_attach, procfs_detach)
8750 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8751 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8752 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8753 (procfs_create_inferior, procfs_update_thread_list)
8754 (procfs_thread_alive, procfs_pid_to_str)
8755 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8756 (procfs_stopped_data_address, procfs_insert_watchpoint)
8757 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8758 (proc_find_memory_regions, procfs_info_proc)
8759 (procfs_make_note_section): Refactor as methods of procfs_target.
8760 (_initialize_procfs): Adjust.
8761 * sol-thread.c (sol_thread_target): New class.
8762 (sol_thread_ops): Now a sol_thread_target.
8763 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8764 (sol_thread_fetch_registers, sol_thread_store_registers)
8765 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8766 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8767 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8768 (init_sol_thread_ops): Delete.
8769 (_initialize_sol_thread): Adjust. Remove references to
8770 init_sol_thread_ops and complete_target_initialization.
8771
8772 * windows-nat.c (windows_nat_target): New class.
8773 (windows_fetch_inferior_registers)
8774 (windows_store_inferior_registers, windows_resume, windows_wait)
8775 (windows_attach, windows_detach, windows_pid_to_exec_file)
8776 (windows_files_info, windows_create_inferior)
8777 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8778 (windows_close, windows_pid_to_str, windows_xfer_partial)
8779 (windows_get_tib_address, windows_get_ada_task_ptid)
8780 (windows_thread_name, windows_thread_alive): Refactor as
8781 windows_nat_target methods.
8782 (do_initial_windows_stuff): Adjust.
8783 (windows_target): Delete function.
8784 (_initialize_windows_nat): Adjust.
8785
8786 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8787 (darwin_mourn_inferior, darwin_kill_inferior)
8788 (darwin_create_inferior, darwin_attach, darwin_detach)
8789 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8790 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8791 (darwin_supports_multi_process): Refactor as darwin_nat_target
8792 methods.
8793 (darwin_resume_to, darwin_files_info): Delete.
8794 (_initialize_darwin_inferior): Rename to ...
8795 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8796 * darwin-nat.h: Include "inf-child.h".
8797 (darwin_nat_target): New class.
8798 (darwin_complete_target): Delete.
8799 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8800 (darwin_target): New.
8801 (i386_darwin_fetch_inferior_registers)
8802 (i386_darwin_store_inferior_registers): Refactor as methods of
8803 darwin_nat_target.
8804 (darwin_complete_target): Delete, with ...
8805 (_initialize_i386_darwin_nat): ... bits factored out here.
8806
8807 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8808 (the_alpha_linux_nat_target): New.
8809 (alpha_linux_register_u_offset): Refactor as
8810 alpha_linux_nat_target method.
8811 (_initialize_alpha_linux_nat): Adjust.
8812 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8813 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8814 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8815 methods of linux_nat_trad_target.
8816 (linux_trad_target): Delete.
8817 * linux-nat-trad.h (linux_trad_target): Delete function.
8818 (linux_nat_trad_target): New class.
8819 * mips-linux-nat.c (mips_linux_nat_target): New class.
8820 (super_fetch_registers, super_store_registers, super_close):
8821 Delete.
8822 (the_mips_linux_nat_target): New.
8823 (mips64_linux_regsets_fetch_registers)
8824 (mips64_linux_regsets_store_registers)
8825 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8826 (mips_linux_register_u_offset, mips_linux_read_description)
8827 (mips_linux_can_use_hw_breakpoint)
8828 (mips_linux_stopped_by_watchpoint)
8829 (mips_linux_stopped_data_address)
8830 (mips_linux_region_ok_for_hw_watchpoint)
8831 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8832 (mips_linux_close): Refactor as methods of mips_linux_nat.
8833 (_initialize_mips_linux_nat): Adjust to C++ification.
8834
8835 * aix-thread.c (aix_thread_target): New class.
8836 (aix_thread_ops): Now an aix_thread_target.
8837 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8838 (aix_thread_fetch_registers, aix_thread_store_registers)
8839 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8840 (aix_thread_thread_alive, aix_thread_pid_to_str)
8841 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8842 Refactor as methods of aix_thread_target.
8843 (init_aix_thread_ops): Delete.
8844 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8845 and complete_target_initialization.
8846 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8847 (rs6000_nat_target): New class.
8848 (the_rs6000_nat_target): New.
8849 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8850 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8851 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8852 (super_create_inferior): Delete.
8853 (_initialize_rs6000_nat): Adjust to C++ification.
8854
8855 * arm-linux-nat.c (arm_linux_nat_target): New class.
8856 (the_arm_linux_nat_target): New.
8857 (arm_linux_fetch_inferior_registers)
8858 (arm_linux_store_inferior_registers, arm_linux_read_description)
8859 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8860 (arm_linux_remove_hw_breakpoint)
8861 (arm_linux_region_ok_for_hw_watchpoint)
8862 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8863 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8864 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8865 arm_linux_nat_target.
8866 (_initialize_arm_linux_nat): Adjust to C++ification.
8867
8868 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8869 (the_aarch64_linux_nat_target): New.
8870 (aarch64_linux_fetch_inferior_registers)
8871 (aarch64_linux_store_inferior_registers)
8872 (aarch64_linux_child_post_startup_inferior)
8873 (aarch64_linux_read_description)
8874 (aarch64_linux_can_use_hw_breakpoint)
8875 (aarch64_linux_insert_hw_breakpoint)
8876 (aarch64_linux_remove_hw_breakpoint)
8877 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8878 (aarch64_linux_region_ok_for_hw_watchpoint)
8879 (aarch64_linux_stopped_data_address)
8880 (aarch64_linux_stopped_by_watchpoint)
8881 (aarch64_linux_watchpoint_addr_within_range)
8882 (aarch64_linux_can_do_single_step): Refactor as methods of
8883 aarch64_linux_nat_target.
8884 (super_post_startup_inferior): Delete.
8885 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8886
8887 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8888 (the_hppa_linux_nat_target): New.
8889 (hppa_linux_fetch_inferior_registers)
8890 (hppa_linux_store_inferior_registers): Refactor as methods of
8891 hppa_linux_nat_target.
8892 (_initialize_hppa_linux_nat): Adjust to C++ification.
8893
8894 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8895 (the_ia64_linux_nat_target): New.
8896 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8897 (ia64_linux_stopped_data_address)
8898 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8899 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8900 ia64_linux_nat_target methods.
8901 (super_xfer_partial): Delete.
8902 (_initialize_ia64_linux_nat): Adjust to C++ification.
8903
8904 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8905 (the_m32r_linux_nat_target): New.
8906 (m32r_linux_fetch_inferior_registers)
8907 (m32r_linux_store_inferior_registers): Refactor as
8908 m32r_linux_nat_target methods.
8909 (_initialize_m32r_linux_nat): Adjust to C++ification.
8910
8911 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8912 (the_m68k_linux_nat_target): New.
8913 (m68k_linux_fetch_inferior_registers)
8914 (m68k_linux_store_inferior_registers): Refactor as
8915 m68k_linux_nat_target methods.
8916 (_initialize_m68k_linux_nat): Adjust to C++ification.
8917
8918 * s390-linux-nat.c (s390_linux_nat_target): New class.
8919 (the_s390_linux_nat_target): New.
8920 (s390_linux_fetch_inferior_registers)
8921 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8922 (s390_insert_watchpoint, s390_remove_watchpoint)
8923 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8924 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8925 (s390_auxv_parse, s390_read_description): Refactor as methods of
8926 s390_linux_nat_target.
8927 (_initialize_s390_nat): Adjust to C++ification.
8928
8929 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8930 (the_sparc_linux_nat_target): New.
8931 (_initialize_sparc_linux_nat): Adjust to C++ification.
8932 * sparc-nat.c (sparc_fetch_inferior_registers)
8933 (sparc_store_inferior_registers): Remove target_ops parameter.
8934 * sparc-nat.h (sparc_fetch_inferior_registers)
8935 (sparc_store_inferior_registers): Remove target_ops parameter.
8936 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8937 (the_sparc64_linux_nat_target): New.
8938 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8939
8940 * spu-linux-nat.c (spu_linux_nat_target): New class.
8941 (the_spu_linux_nat_target): New.
8942 (spu_child_post_startup_inferior, spu_child_post_attach)
8943 (spu_child_wait, spu_fetch_inferior_registers)
8944 (spu_store_inferior_registers, spu_xfer_partial)
8945 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8946 methods.
8947 (_initialize_spu_nat): Adjust to C++ification.
8948
8949 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8950 (the_tilegx_linux_nat_target): New.
8951 (fetch_inferior_registers, store_inferior_registers):
8952 Refactor as methods.
8953 (_initialize_tile_linux_nat): Adjust to C++ification.
8954
8955 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8956 (the_xtensa_linux_nat_target): New.
8957 (xtensa_linux_fetch_inferior_registers)
8958 (xtensa_linux_store_inferior_registers): Refactor as
8959 xtensa_linux_nat_target methods.
8960 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8961
8962 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8963 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8964 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8965 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8966 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8967 (fbsd_stopped_by_sw_breakpoint)
8968 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8969 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8970 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8971 (fbsd_post_startup_inferior, fbsd_post_attach)
8972 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8973 (fbsd_set_syscall_catchpoint)
8974 (super_xfer_partial, super_resume, super_wait)
8975 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8976 (fbsd_handle_debug_trap): Remove target_ops parameter.
8977 (fbsd_nat_add_target): Delete.
8978 * fbsd-nat.h: Include "inf-ptrace.h".
8979 (fbsd_nat_add_target): Delete.
8980 (USE_SIGTRAP_SIGINFO): Define.
8981 (fbsd_nat_target): New class.
8982
8983 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8984 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8985 (amd64bsd_target): Delete.
8986 * amd64-bsd-nat.h: New file.
8987 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8988 "x86-bsd-nat.h".
8989 (amd64_fbsd_nat_target): New class.
8990 (the_amd64_fbsd_nat_target): New.
8991 (amd64fbsd_read_description): Refactor as method of
8992 amd64_fbsd_nat_target.
8993 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8994 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8995 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8996 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8997 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8998 (i386bsd_target): Delete.
8999 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9000 (i386bsd_fetch_inferior_registers)
9001 (i386bsd_store_inferior_registers): Declare.
9002 (i386_bsd_nat_target): New class.
9003 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9004 (the_i386_fbsd_nat_target): New.
9005 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9006 i386_fbsd_nat_target methods.
9007 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9008 (_initialize_i386fbsd_nat): Adjust to C++ification.
9009 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9010 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9011 (_initialize_x86_bsd_nat): Adjust to C++ification.
9012 * x86-bsd-nat.h: Include "x86-nat.h".
9013 (x86bsd_target): Delete declaration.
9014 (x86bsd_nat_target): New class.
9015
9016 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9017 (the_aarch64_fbsd_nat_target): New.
9018 (aarch64_fbsd_fetch_inferior_registers)
9019 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9020 aarch64_fbsd_nat_target.
9021 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9022 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9023 (the_alpha_bsd_nat_target): New.
9024 (alphabsd_fetch_inferior_registers)
9025 (alphabsd_store_inferior_registers): Refactor as
9026 alpha_bsd_nat_target methods.
9027 (_initialize_alphabsd_nat): Refactor as methods of
9028 alpha_bsd_nat_target.
9029 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9030 (the_amd64_nbsd_nat_target): New.
9031 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9032 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9033 (the_amd64_obsd_nat_target): New.
9034 (_initialize_amd64obsd_nat): Adjust to C++ification.
9035 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9036 (the_arm_fbsd_nat_target): New.
9037 (arm_fbsd_fetch_inferior_registers)
9038 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9039 (_initialize_arm_fbsd_nat): Refactor as methods of
9040 arm_fbsd_nat_target.
9041 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9042 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9043 (the_arm_netbsd_nat_target): New.
9044 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9045 arm_netbsd_nat_target.
9046 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9047 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9048 (the_hppa_nbsd_nat_target): New.
9049 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9050 hppa_nbsd_nat_target methods.
9051 (_initialize_hppanbsd_nat): Adjust to C++ification.
9052 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9053 (the_hppa_obsd_nat_target): New.
9054 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9055 methods of hppa_obsd_nat_target.
9056 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9057 add_target.
9058 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9059 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9060 add_target.
9061 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9062 (_initialize_i386obsd_nat): Use add_target.
9063 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9064 (the_m68k_bsd_nat_target): New.
9065 (m68kbsd_fetch_inferior_registers)
9066 (m68kbsd_store_inferior_registers): Refactor as methods of
9067 m68k_bsd_nat_target.
9068 (_initialize_m68kbsd_nat): Adjust to C++ification.
9069 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9070 (the_mips_fbsd_nat_target): New.
9071 (mips_fbsd_fetch_inferior_registers)
9072 (mips_fbsd_store_inferior_registers): Refactor as methods of
9073 mips_fbsd_nat_target.
9074 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9075 add_target.
9076 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9077 (the_mips_nbsd_nat_target): New.
9078 (mipsnbsd_fetch_inferior_registers)
9079 (mipsnbsd_store_inferior_registers): Refactor as methods of
9080 mips_nbsd_nat_target.
9081 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9082 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9083 (the_mips64_obsd_nat_target): New.
9084 (mips64obsd_fetch_inferior_registers)
9085 (mips64obsd_store_inferior_registers): Refactor as methods of
9086 mips64_obsd_nat_target.
9087 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9088 add_target.
9089 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9090 nbsd_nat_target.
9091 * nbsd-nat.h: Include "inf-ptrace.h".
9092 (nbsd_nat_target): New class.
9093 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9094 (obsd_wait): Refactor as methods of obsd_nat_target.
9095 (obsd_add_target): Delete.
9096 * obsd-nat.h: Include "inf-ptrace.h".
9097 (obsd_nat_target): New class.
9098 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9099 (the_ppc_fbsd_nat_target): New.
9100 (ppcfbsd_fetch_inferior_registers)
9101 (ppcfbsd_store_inferior_registers): Refactor as methods of
9102 ppc_fbsd_nat_target.
9103 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9104 add_target.
9105 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9106 (the_ppc_nbsd_nat_target): New.
9107 (ppcnbsd_fetch_inferior_registers)
9108 (ppcnbsd_store_inferior_registers): Refactor as methods of
9109 ppc_nbsd_nat_target.
9110 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9111 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9112 (the_ppc_obsd_nat_target): New.
9113 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9114 methods of ppc_obsd_nat_target.
9115 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9116 add_target.
9117 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9118 (the_sh_nbsd_nat_target): New.
9119 (shnbsd_fetch_inferior_registers)
9120 (shnbsd_store_inferior_registers): Refactor as methods of
9121 sh_nbsd_nat_target.
9122 (_initialize_shnbsd_nat): Adjust to C++ification.
9123 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9124 (inf_ptrace_xfer_partial): Delete.
9125 (sparc_xfer_partial, sparc_target): Delete.
9126 * sparc-nat.h (sparc_fetch_inferior_registers)
9127 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9128 (sparc_target): Delete function declaration.
9129 (sparc_target): New template class.
9130 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9131 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9132 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9133 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9134 add_target.
9135 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9136 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9137 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9138 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9139 add_target.
9140 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9141 (the_vax_bsd_nat_target): New.
9142 (vaxbsd_fetch_inferior_registers)
9143 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9144 methods.
9145 (_initialize_vaxbsd_nat): Adjust to C++ification.
9146
9147 * bsd-kvm.c (bsd_kvm_target): New class.
9148 (bsd_kvm_ops): Now a bsd_kvm_target.
9149 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9150 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9151 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9152 bsd_kvm_target.
9153 (bsd_kvm_return_one): Delete.
9154 (bsd_kvm_add_target): Adjust to C++ification.
9155
9156 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9157 (nto_procfs_target_procfs): New classes.
9158 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9159 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9160 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9161 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9162 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9163 (procfs_remove_hw_breakpoint, procfs_resume)
9164 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9165 (procfs_kill_inferior, procfs_store_registers)
9166 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9167 as methods of nto_procfs_target.
9168 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9169 (nto_native_ops): Delete.
9170 (procfs_open, procfs_native_open): Delete.
9171 (nto_native_ops): Now an nto_procfs_target_native.
9172 (init_procfs_targets): Adjust to C++ification.
9173 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9174 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9175 Refactor as methods of nto_procfs_target.
9176
9177 * go32-nat.c (go32_nat_target): New class.
9178 (the_go32_nat_target): New.
9179 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9180 (go32_store_registers, go32_xfer_partial, go32_files_info)
9181 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9182 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9183 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9184 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9185 (go32_target): Delete.
9186 (_initialize_go32_nat): Adjust to C++ification.
9187
9188 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9189 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9190 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9191 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9192 gnu_nat_target.
9193 (gnu_target): Delete.
9194 * gnu-nat.h (gnu_target): Delete.
9195 (gnu_nat_target): New class.
9196 * i386-gnu-nat.c (gnu_base_target): New.
9197 (i386_gnu_nat_target): New class.
9198 (the_i386_gnu_nat_target): New.
9199 (_initialize_i386gnu_nat): Adjust to C++ification.
9200
9201 2018-05-02 Pedro Alves <palves@redhat.com>
9202
9203 * bfd-target.c (target_bfd_xclose): Rename to ...
9204 (target_bfd_close): ... this.
9205 (target_bfd_reopen): Adjust.
9206 * target.c (target_close): Remove references to to_xclose.
9207 * target.h (target_ops::to_xclose): Delete.
9208 (target_ops::to_close): Update comments.
9209
9210 2018-05-02 Pedro Alves <palves@redhat.com>
9211
9212 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9213 "linux-nat.h".
9214 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9215 * inf-ptrace.c (inf_ptrace_register_u_offset)
9216 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9217 (inf_ptrace_store_register, inf_ptrace_store_registers)
9218 (inf_ptrace_trad_target): Move to ...
9219 * linux-nat-trad.c: ... this new file.
9220 * linux-nat-trad.h: New file.
9221 * linux-nat.c (linux_target_install_ops): Make extern.
9222 (linux_trad_target): Delete.
9223 * linux-nat.h (linux_trad_target): Delete declaration.
9224 (linux_target_install_ops): Declare.
9225 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9226 "linux-nat.h".
9227
9228 2018-05-02 Pedro Alves <palves@redhat.com>
9229
9230 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9231 procfs_target/add_target here.
9232 * procfs.c (procfs_target): Make static.
9233 (_initialize_procfs): Call add_target here.
9234 * procfs.h (struct target_ops): Remove forward declaration.
9235 (procfs_target): Remove declaration.
9236 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9237
9238 2018-05-02 Pedro Alves <palves@redhat.com>
9239
9240 * procfs.c (procfs_stopped_by_watchpoint)
9241 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9242 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9243 Forward declare.
9244 (procfs_use_watchpoints): Delete, move contents...
9245 (procfs_target): ... here.
9246 * procfs.h (procfs_use_watchpoints): Delete declaration.
9247 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9248 procfs_use_watchpoints.
9249 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9250 procfs_use_watchpoints.
9251
9252 2018-05-02 Tom Tromey <tom@tromey.com>
9253
9254 PR python/20084:
9255 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9256 and var_zuinteger_unlimited.
9257 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9258 and PARAM_ZUINTEGER_UNLIMITED.
9259 (set_parameter_value): Handle var_zuinteger and
9260 var_zuinteger_unlimited.
9261 (add_setshow_generic): Likewise.
9262 (parmpy_init): Likewise.
9263
9264 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9265
9266 PR rust/23124
9267 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9268 pointer is not null before dereferencing it.
9269
9270 2018-04-30 Tom Tromey <tom@tromey.com>
9271
9272 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9273 is_mi_like_p.
9274
9275 2018-04-30 Tom Tromey <tom@tromey.com>
9276
9277 * breakpoint.c (mention): Remove use of is_mi_like_p.
9278 (print_mention_ranged_breakpoint): Likewise.
9279 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9280 of is_mi_like_p.
9281
9282 2018-04-30 Tom Tromey <tom@tromey.com>
9283
9284 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9285
9286 2018-04-30 Tom Tromey <tom@tromey.com>
9287
9288 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9289 (info_spu_event_command): Remove some uses of is_mi_like_p.
9290
9291 2018-04-30 Tom Tromey <tom@tromey.com>
9292
9293 * python/py-framefilter.c (py_print_single_arg)
9294 (enumerate_locals, py_print_args, py_print_frame): Remove some
9295 uses of is_mi_like_p.
9296
9297 2018-04-30 Tom Tromey <tom@tromey.com>
9298
9299 * ui-out.c: Update.
9300 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9301 * ui-out.h (ui_out::is_mi_like_p): Now const.
9302 (ui_out::do_is_mi_like_p): Now const.
9303 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9304
9305 2018-04-30 Tom Tromey <tom@tromey.com>
9306
9307 * varobj.c (varobj_set_visualizer): Use new_reference.
9308 * python/python.c (gdbpy_decode_line): Use new_reference.
9309 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9310 new_reference.
9311
9312 2018-04-30 Tom Tromey <tom@tromey.com>
9313
9314 * varobj.c (install_new_value): Use new_reference.
9315 * value.h (value_incref): Return void. Swap intro comment with
9316 value_decref.
9317 * value.c (set_value_parent): Use new_reference.
9318 (value_incref): Return void. Update intro comment.
9319 (release_value): Use new_reference.
9320 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9321
9322 2018-04-30 Tom Tromey <tom@tromey.com>
9323
9324 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9325 * gdb_bfd.h (new_bfd_ref): Remove.
9326 (gdb_bfd_open): Update comment.
9327 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9328 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9329 (gdb_bfd_fdopenr): Use new_reference.
9330 * exec.c (exec_file_attach): Use new_reference.
9331
9332 2018-04-30 Tom Tromey <tom@tromey.com>
9333
9334 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9335 method.
9336
9337 2018-04-30 Tom Tromey <tom@tromey.com>
9338
9339 * jit.c (jit_read_code_entry): Use type_align.
9340 * i386-tdep.c (i386_gdbarch_init): Don't call
9341 set_gdbarch_long_long_align_bit.
9342 * gdbarch.sh: Remove long_long_align_bit.
9343 * gdbarch.c, gdbarch.h: Rebuild.
9344 * arc-tdep.c (arc_type_align): New function.
9345 (arc_gdbarch_init): Use arc_type_align. Don't call
9346 set_gdbarch_long_long_align_bit.
9347
9348 2018-04-30 Tom Tromey <tom@tromey.com>
9349
9350 * rust-lang.c (rust_type_alignment): Remove.
9351 (rust_composite_type): Use type_align.
9352
9353 2018-04-30 Tom Tromey <tom@tromey.com>
9354
9355 * NEWS: Mention Type.align.
9356 * python/py-type.c (typy_get_alignof): New function.
9357 (type_object_getset): Add "alignof".
9358
9359 2018-04-30 Tom Tromey <tom@tromey.com>
9360
9361 PR exp/17095:
9362 * NEWS: Update.
9363 * std-operator.def (UNOP_ALIGNOF): New operator.
9364 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9365 New.
9366 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9367 * c-lang.c (c_op_print_tab): Add alignof.
9368 * c-exp.y (ALIGNOF): New token.
9369 (exp): Add "ALIGNOF" production.
9370 (ident_tokens): Add _Alignof and alignof.
9371
9372 2018-04-30 Tom Tromey <tom@tromey.com>
9373
9374 * i386-tdep.c (i386_type_align): New function.
9375 (i386_gdbarch_init): Update.
9376 * gdbarch.sh (type_align): New method.
9377 * gdbarch.c, gdbarch.h: Rebuild.
9378 * arch-utils.h (default_type_align): Declare.
9379 * arch-utils.c (default_type_align): New function.
9380 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9381 (struct type) <align_log2>: New field.
9382 <instance_flags>: Now a bitfield.
9383 (TYPE_RAW_ALIGN): New macro.
9384 (type_align, type_raw_align, set_type_align): Declare.
9385 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9386 functions.
9387 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9388 (get_alignment, maybe_set_alignment): New functions.
9389 (read_structure_type, read_enumeration_type, read_array_type)
9390 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9391 (read_subrange_type, read_base_type): Set type alignment.
9392
9393 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9394
9395 * dwarf2read.c (read_index_from_section): Use bool.
9396
9397 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9398
9399 PR gdb/22950
9400 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9401 with #ifdef.
9402
9403 2018-04-29 John Reiser <jreiser@BitWagon.com>
9404
9405 PR build/22873
9406 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9407 last step, and do it atomically.
9408
9409 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9410
9411 * compile/compile-c-types.c (convert_int, convert_float):
9412 Update for C FE v1.
9413
9414 2018-04-27 Tom Tromey <tom@tromey.com>
9415
9416 PR rust/22545:
9417 * rust-lang.c (rust_inclusive_range_type_p): New function.
9418 (rust_range): Handle inclusive ranges.
9419 (rust_compute_range): Likewise.
9420 * rust-exp.y (struct rust_op) <inclusive>: New field.
9421 (DOTDOTEQ): New constant.
9422 (range_expr): Add "..=" productions.
9423 (operator_tokens): Add "..=" token.
9424 (ast_range): Add "inclusive" parameter.
9425 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9426 ranges.
9427 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9428 bounds values.
9429 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9430 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9431 Update comments.
9432 * expprint.c (print_subexp_standard): Handle new bounds values.
9433 (dump_subexp_body_standard): Likewise.
9434
9435 2018-04-27 Tom Tromey <tom@tromey.com>
9436
9437 * configure: Rebuild.
9438 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9439 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9440 "OVERRIDE".
9441 (class symbol_needs_eval_context): Likewise.
9442 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9443 (mock_mapped_index::symbol_name_at): Use "override". Remove
9444 "virtual".
9445 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9446 "override".
9447 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9448 * aarch64-tdep.c (instruction_reader::read): Use "override".
9449 (instruction_reader_test::read): Likewise.
9450 * arm-tdep.c (instruction_reader::read): Use "override".
9451 (instruction_reader_thumb::read): Likewise.
9452
9453 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9454
9455 PR remote/9665
9456 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9457 instead of remote_send.
9458 (remote_send): Remove.
9459
9460 2018-04-26 Pedro Alves <palves@redhat.com>
9461
9462 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9463 find_function_start_sal instead of find_pc_line.
9464
9465 2018-04-26 Pedro Alves <palves@redhat.com>
9466
9467 * breakpoint.c (set_breakpoint_location_function): Handle
9468 mst_data_gnu_ifunc.
9469 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9470 * elfread.c (elf_symtab_read): Give data symbols with
9471 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9472 (elf_rel_plt_read): Update comment.
9473 * linespec.c (convert_linespec_to_sals): Handle
9474 mst_data_gnu_ifunc.
9475 (minsym_found): Handle mst_data_gnu_ifunc.
9476 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9477 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9478 * parse.c (find_minsym_type_and_address): Handle
9479 mst_data_gnu_ifunc.
9480 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9481 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9482 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9483 comment.
9484 <mst_data_gnu_ifunc>: New enumerator.
9485
9486 2018-04-26 Pedro Alves <palves@redhat.com>
9487
9488 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9489 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9490 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9491 Handle it.
9492 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9493 (lookup_minimal_symbol_by_pc): Adjust.
9494 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9495 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9496 * minsyms.h (lookup_msym_prefer): New enum.
9497 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9498 parameter by a lookup_msym_prefer parameter.
9499
9500 2018-04-26 Pedro Alves <palves@redhat.com>
9501
9502 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9503 ends in "@plt" instead of looking at the symbol's section.
9504
9505 2018-04-26 Pedro Alves <palves@redhat.com>
9506
9507 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9508 all references.
9509 (find_pc_partial_function_gnu_ifunc): Rename to ...
9510 (find_pc_partial_function): ... this, and remove references to
9511 'is_gnu_ifunc_p'.
9512 (find_pc_partial_function): Delete old implementation.
9513 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9514
9515 2018-04-26 Pedro Alves <palves@redhat.com>
9516
9517 * linespec.c (struct bound_minimal_symbol_search_key): New.
9518 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9519 skip first line if we found a GNU ifunc minimal symbol by name.
9520 (compare_msymbols): Change parameters to work with a destructured
9521 lhs minsym.
9522 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9523 functions.
9524
9525 2018-04-26 Pedro Alves <palves@redhat.com>
9526
9527 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9528 ifunc targets here. Instead, if we have an ifunc minsym, use its
9529 address/name.
9530 (add_location_to_breakpoint): Store the minsym and the objfile in
9531 the breakpoint location.
9532 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9533 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9534 Record the minsym in the sal.
9535 * symtab.h (symtab_and_line) <msymbol>: New field.
9536
9537 2018-04-26 Pedro Alves <palves@redhat.com>
9538
9539 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9540 unless we actually resolved the ifunc.
9541
9542 2018-04-26 Pedro Alves <palves@redhat.com>
9543
9544 * c-exp.y (variable production): Prefer ifunc minsyms over
9545 regular function symbols.
9546 * symtab.c (find_gnu_ifunc): New function.
9547 * minsyms.h (lookup_msym_prefer): New enum.
9548 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9549 parameter by a lookup_msym_prefer parameter.
9550 * symtab.h (find_gnu_ifunc): New declaration.
9551
9552 2018-04-26 Pedro Alves <palves@redhat.com>
9553
9554 * blockframe.c (find_gnu_ifunc_target_type): New function.
9555 (find_function_type): New.
9556 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9557 return a value with a memory address.
9558 (eval_call): For calls to GNU ifunc functions, try to find the
9559 type of the target function from the type that the resolver
9560 returns.
9561 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9562 symbols.
9563 * infcall.c (find_function_return_type): Delete.
9564 (find_function_addr): Add 'function_type' parameter. For calls to
9565 GNU ifunc functions, try to find the type of the target function
9566 from the type that the resolver returns, and return it via
9567 FUNCTION_TYPE.
9568 (call_function_by_hand_dummy): Adjust to use the function type
9569 returned by find_function_addr.
9570 (find_function_addr): Add 'function_type' parameter and move
9571 description here.
9572 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9573 declarations.
9574
9575 2018-04-26 Pedro Alves <palves@redhat.com>
9576
9577 * c-exp.y (variable production): Skip finding an alias for ifunc
9578 symbols.
9579
9580 2018-04-26 Pedro Alves <palves@redhat.com>
9581
9582 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9583
9584 2018-04-25 Pedro Alves <palves@redhat.com>
9585
9586 * infcmd.c (kill_command): Print the pid as string, not the whole
9587 thread's ptid. Add comment. s/has been killed/killed/ in output
9588 message.
9589 * remote.c (remote_detach_1): Print the pid as string, not the
9590 whole thread's ptid.
9591
9592 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9593 Sergio Durigan Junior <sergiodj@redhat.com>
9594 Pedro Alves <palves@redhat.com>
9595
9596 * infcmd.c (kill_command): Print message when inferior has
9597 been killed.
9598 * inferior.c (print_inferior_events): Remove 'static'. Set as
9599 '1'.
9600 (add_inferior): Improve message printed when
9601 'print_inferior_events' is on.
9602 (exit_inferior): Remove message printed when
9603 'print_inferior_events' is on.
9604 (detach_inferior): Improve message printed when
9605 'print_inferior_events' is on.
9606 (initialize_inferiors): Use 'add_inferior_silent' to set
9607 'current_inferior_'.
9608 * inferior.h (print_inferior_events): Declare here as
9609 'extern'.
9610 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9611 '[Detaching...]' messages when 'print_inferior_events' is on.
9612 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9613 as prefix/suffix for messages. Remove periods. Fix erroneous
9614 'Detaching after fork from child...', replace it by '... from
9615 parent...'.
9616 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9617 prefix/suffix when printing 'Detaching...' messages. Print
9618 them when 'print_inferior_events' is on.
9619 * remote.c (remote_detach_1): Print message when detaching
9620 from inferior and '!is_fork_parent'.
9621
9622 2018-04-24 Tom Tromey <tom@tromey.com>
9623
9624 * cli-out.h: Reindent.
9625
9626 2018-04-24 Tom Tromey <tom@tromey.com>
9627
9628 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9629 (cli_ui_out::do_field_string): Use fputs_filtered.
9630 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9631
9632 2018-04-23 Tom Tromey <tom@tromey.com>
9633
9634 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9635 gdb::unique_xmalloc_ptr.
9636
9637 2018-04-23 Tom Tromey <tom@tromey.com>
9638
9639 * configure: Rebuild.
9640
9641 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9642
9643 PR gdb/23095
9644 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9645 prepare_for_testing. Set normal_bp to r_debug_state if target
9646 is bsd.
9647
9648 2018-04-21 Pedro Alves <palves@redhat.com>
9649 Rajendra SY <rajendra.sy@gmail.com>
9650
9651 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9652 * remote.c (extended_remote_attach): In all-stop mode, mark the
9653 thread as executing.
9654
9655 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9656
9657 * thread.c (thread_apply_all_command): Fix comment.
9658 (thread_command): Fix comment.
9659
9660 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9661
9662 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9663 parameter.
9664 * features/aarch64-core.c (create_feature_aarch64_core):
9665 Regenerate.
9666 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9667 Likewise.
9668 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9669 Likewise.
9670 * features/i386/32bit-avx512.c
9671 (create_feature_i386_32bit_avx512): Likewise.
9672 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9673 Likewise.
9674 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9675 Likewise.
9676 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9677 Likewise.
9678 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9679 Likewise.
9680 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9681 Likewise.
9682 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9683 Likewise.
9684 * features/i386/64bit-avx512.c
9685 (create_feature_i386_64bit_avx512): Likewise.
9686 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9687 Likewise.
9688 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9689 Likewise.
9690 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9691 Likewise.
9692 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9693 Likewise.
9694 * features/i386/64bit-segments.c
9695 (create_feature_i386_64bit_segments): Likewise.
9696 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9697 Likewise.
9698 * features/i386/x32-core.c
9699 (create_feature_i386_x32_core): Likewise.
9700 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9701 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9702 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9703 * target-descriptions.c: In generated code, don't pass xml
9704 filename.
9705
9706 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9707
9708 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9709 (print_xml_feature::visit_post): Likewise.
9710 (print_xml_feature::visit): Likewise.
9711 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9712 (print_xml_feature): Add new class.
9713 * regformats/regdat.sh: Null xmltarget on feature targets.
9714 * target-descriptions.c (struct target_desc): Add xmltarget.
9715 (maintenance_check_tdesc_xml_convert): Add unittest function.
9716 (tdesc_get_features_xml): Add function to get xml.
9717 (maintenance_check_xml_descriptions): Test xml generation.
9718 * xml-tdesc.c (string_read_description_xml): Add function.
9719 * xml-tdesc.h (string_read_description_xml): Add declaration.
9720
9721 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9722
9723 * features/Makefile: Add feature marker to targets with new style
9724 target descriptions.
9725 * regformats/aarch64.dat: Regenerate.
9726 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9727 * regformats/i386/amd64-avx-linux.dat: Likewise.
9728 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9729 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9730 * regformats/i386/amd64-linux.dat: Likewise.
9731 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9732 * regformats/i386/amd64.dat: Likewise.
9733 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9734 * regformats/i386/i386-avx-linux.dat: Likewise.
9735 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9736 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9737 * regformats/i386/i386-linux.dat: Likewise.
9738 * regformats/i386/i386-mmx-linux.dat: Likewise.
9739 * regformats/i386/i386-mpx-linux.dat: Likewise.
9740 * regformats/i386/i386.dat: Likewise.
9741 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9742 * regformats/i386/x32-avx-linux.dat: Likewise.
9743 * regformats/i386/x32-linux.dat: Likewise.
9744 * regformats/tic6x-c62x-linux.dat: Likewise.
9745 * regformats/tic6x-c64x-linux.dat: Likewise.
9746 * regformats/tic6x-c64xp-linux.dat: Likewise.
9747 * regformats/regdat.sh: Parse feature marker.
9748
9749 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9750
9751 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9752 (tdesc_osabi_name): Likewise.
9753 * target-descriptions.c (tdesc_architecture_name): Add new
9754 function.
9755 (tdesc_osabi_name): Likewise.
9756
9757 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9758
9759 * common/tdesc.c (tdesc_predefined_type): Move to here.
9760 (tdesc_named_type): Likewise.
9761 (tdesc_create_vector): Likewise.
9762 (tdesc_create_struct): Likewise.
9763 (tdesc_set_struct_size): Likewise.
9764 (tdesc_create_union): Likewise.
9765 (tdesc_create_flags): Likewise.
9766 (tdesc_create_enum): Likewise.
9767 (tdesc_add_field): Likewise.
9768 (tdesc_add_typed_bitfield): Likewise.
9769 (tdesc_add_bitfield): Likewise.
9770 (tdesc_add_flag): Likewise.
9771 (tdesc_add_enum_value): Likewise.
9772 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9773 (struct tdesc_type_vector): Likewise.
9774 (struct tdesc_type_field): Likewise.
9775 (struct tdesc_type_with_fields): Likewise.
9776 (tdesc_create_enum): Add declaration.
9777 (tdesc_add_typed_bitfield): Likewise.
9778 (tdesc_add_enum_value): Likewise.
9779 * target-descriptions.c (tdesc_type_field): Move from here.
9780 (tdesc_type_builtin): Likewise.
9781 (tdesc_type_vector): Likewise.
9782 (tdesc_type_with_fields): Likewise.
9783 (tdesc_predefined_types): Likewise.
9784 (tdesc_named_type): Likewise.
9785 (tdesc_create_vector): Likewise.
9786 (tdesc_create_struct): Likewise.
9787 (tdesc_set_struct_size): Likewise.
9788 (tdesc_create_union): Likewise.
9789 (tdesc_create_flags): Likewise.
9790 (tdesc_create_enum): Likewise.
9791 (tdesc_add_field): Likewise.
9792 (tdesc_add_typed_bitfield): Likewise.
9793 (tdesc_add_bitfield): Likewise.
9794 (tdesc_add_flag): Likewise.
9795 (tdesc_add_enum_value): Likewise.
9796 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9797 (tdesc_add_typed_bitfield): Likewise.
9798 (tdesc_add_enum_value): Likewise.
9799
9800 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9801
9802 * common/tdesc.c (tdesc_feature::accept): Move to here.
9803 (tdesc_feature::operator==): Likewise.
9804 (tdesc_create_reg): Likewise.
9805 * common/tdesc.h (tdesc_type_kind): Likewise.
9806 (struct tdesc_type): Likewise.
9807 (struct tdesc_feature): Likewise.
9808 * regformats/regdat.sh: Create a feature.
9809 * target-descriptions.c (tdesc_type_kind): Move from here.
9810 (tdesc_type): Likewise.
9811 (tdesc_type_up): Likewise.
9812 (tdesc_feature): Likewise.
9813 (tdesc_create_reg): Likewise.
9814
9815 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9816
9817 * Makefile.in: Add arch/tdesc.c
9818 * common/tdesc.c: New file.
9819 * common/tdesc.h (tdesc_element_visitor): Move to here.
9820 (tdesc_element): Likewise.
9821 (tdesc_reg): Likewise.
9822 (tdesc_reg_up): Likewise.
9823 * regformats/regdef.h (reg): Add offset to constructors.
9824 * target-descriptions.c (tdesc_element_visitor): Move from here.
9825 (tdesc_element): Likewise.
9826 (tdesc_reg): Likewise.
9827 (tdesc_reg_up): Likewise.
9828
9829 2018-04-17 Tom Tromey <tom@tromey.com>
9830
9831 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9832 discriminant field.
9833
9834 2018-04-17 Tom Tromey <tom@tromey.com>
9835
9836 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9837
9838 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9839
9840 * symtab.c (print_symbol_info): Skip printing filename and line
9841 number when `last' is NULL.
9842 (symtab_symbol_info): Use empty string instead of NULL for first
9843 invocation of print_symbol_info.
9844 (rbreak_command): Pass NULL to `last' parameter of
9845 print_symbol_info.
9846
9847 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9848
9849 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9850 instead of nullptr.
9851
9852 2018-04-16 Pedro Alves <palves@redhat.com>
9853
9854 * MAINTAINERS (sh): Remove.
9855 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9856 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9857 (ALLDEPFILES): Remove sh64-tdep.c.
9858 * NEWS: Mentions that support for SH-5/SH64 is removed.
9859 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9860 (sh*-*-openbsd*): Ditto.
9861 (sh64-*-elf*): Remove.
9862 (sh*): Remove.
9863 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9864 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9865 * sh-tdep.c: No longer include "sh64-tdep.h".
9866 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9867 * sh64-tdep.c, sh64-tdep.h: Remove files.
9868
9869 2018-04-16 Pedro Alves <palves@redhat.com>
9870
9871 * MAINTAINERS: Remove m88k.
9872 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9873 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9874 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9875 * NEWS: Mention that support for m88k was removed.
9876 * configure.host (m88*-*-*): Remove support.
9877 * configure.nat (m88k-*-*): Remove support.
9878 * configure.tgt (m88*-*-openbsd*): Remove.
9879 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9880
9881 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9882
9883 * configure.tgt (x86_tobjs): New variable.
9884 (amd64_tobjs, i386_tobjs): Use it.
9885
9886 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9887
9888 * symtab.c (print_symbol_info): Precede the symbol definition by
9889 the line number when available.
9890 * NEWS: Advertise this enhancement.
9891
9892 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9893
9894 * NEWS (New options): announce set/show record btrace cpu.
9895 * btrace.c: Include record-btrace.h.
9896 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9897 the vendor is unknown.
9898 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9899 Maybe overwrite the btrace configuration's cpu.
9900 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9901 (btrace_fetch): Add cpu parameter. Update callers.
9902 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9903 Maybe overwrite the btrace configuration's cpu. Skip enabling
9904 errata workarounds if the vendor is unknown.
9905 * python/py-record-btrace.c: Include record-btrace.h.
9906 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9907 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9908 * record-btrace.c (record_btrace_cpu_state_kind): New.
9909 (record_btrace_cpu): New.
9910 (set_record_btrace_cpu_cmdlist): New.
9911 (record_btrace_get_cpu): New.
9912 (require_btrace_thread, record_btrace_info)
9913 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9914 (cmd_set_record_btrace_cpu_none): New.
9915 (cmd_set_record_btrace_cpu_auto): New.
9916 (cmd_set_record_btrace_cpu): New.
9917 (cmd_show_record_btrace_cpu): New.
9918 (_initialize_record_btrace): Initialize set/show record btrace cpu
9919 commands.
9920 * record-btrace.h (record_btrace_get_cpu): New.
9921
9922 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9923
9924 * record.c (set_record_command): Fix typo in message.
9925
9926 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9927
9928 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9929
9930 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9931
9932 * infrun.c (process_event_stop_test): Call
9933 gdbarch_in_indirect_branch_thunk.
9934 * gdbarch.sh (in_indirect_branch_thunk): New.
9935 * gdbarch.c: Regenerated.
9936 * gdbarch.h: Regenerated.
9937 * x86-tdep.h: New.
9938 * x86-tdep.c: New.
9939 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9940 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9941 (ALLDEPFILES): Add x86-tdep.c.
9942 * arch-utils.h (default_in_indirect_branch_thunk): New.
9943 * arch-utils.c (default_in_indirect_branch_thunk): New.
9944 * i386-tdep: Include x86-tdep.h.
9945 (i386_in_indirect_branch_thunk): New.
9946 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9947 function.
9948 * amd64-tdep: Include x86-tdep.h.
9949 (amd64_in_indirect_branch_thunk): New.
9950 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9951
9952 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9953
9954 PR gdb/23053
9955 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9956 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9957 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9958 regression.
9959
9960 2018-04-12 Tom Tromey <tom@tromey.com>
9961
9962 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9963 (rust_evaluate_subexp): Likewise.
9964
9965 2018-04-12 Pedro Alves <palves@redhat.com>
9966
9967 * procfs.c (procfs_detach): Make forward declaration's prototype
9968 match definition's protototype.
9969 (proc_get_LDT_entry): Remove stale do_cleanups call.
9970
9971 2018-04-12 Pedro Alves <palves@redhat.com>
9972
9973 * target.h (target_ops::to_has_exited): Delete.
9974 (target_has_exited): Delete.
9975 * target-delegates.c: Regenerate.
9976
9977 2018-04-11 Pedro Alves <palves@redhat.com>
9978
9979 * target.c (fileio_fh_t::t): Add comment.
9980 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9981 (target_fileio_close): Handle a NULL target.
9982 (invalidate_fileio_fh): New.
9983 (target_close): Call it.
9984 * remote.c (remote_hostio_send_command): No longer check whether
9985 remote_desc is open.
9986
9987 2018-04-11 Pedro Alves <palves@redhat.com>
9988
9989 * target.c (fileio_fh_t): Make it a named struct instead of a
9990 typedef.
9991 (fileio_fh_t::is_closed): New method.
9992 (DEF_VEC_O (fileio_fh_t)): Remove.
9993 (fileio_fhandles): Now a std::vector.
9994 (is_closed_fileio_fh): Delete.
9995 (acquire_fileio_fd): Adjust. Rename parameters.
9996 (release_fileio_fd): Adjust.
9997 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9998 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9999 (target_fileio_close): Adjust.
10000
10001 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10002
10003 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10004 index.
10005
10006 2018-04-10 Pedro Alves <palves@redhat.com>
10007
10008 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10009 (scoped_finish_thread_state): New class.
10010 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10011 cleanup.
10012 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10013 (fetch_inferior_event, normal_stop): Likewise.
10014 * thread.c (finish_thread_state_cleanup): Delete.
10015
10016 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10017 Pedro Alves <palves@redhat.com>
10018
10019 * value.c: Include "selftest.h" and "common/array-view.h".
10020 (struct range) <operator ==>: New.
10021 (test_ranges_contain): New.
10022 (check_ranges_vector): New.
10023 (test_insert_into_bit_range_vector): New.
10024 (_initialize_values): Register selftests.
10025 * common/array-view.h (operator==, operator!=): New.
10026
10027 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10028
10029 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10030 an iterator.
10031 * inline-frame.c: Include <algorithm>.
10032 (struct inline_state): Add constructor.
10033 (inline_state_s): Remove.
10034 (DEF_VEC_O(inline_state_s)): Remove.
10035 (inline_states): Change type to std::vector.
10036 (find_inline_frame_state): Adjust to std::vector.
10037 (allocate_inline_frame_state): Remove.
10038 (clear_inline_frame_state): Adjust to std::vector.
10039 (skip_inline_frames): Adjust to std::vector.
10040
10041 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10042
10043 * tracepoint.h (struct trace_state_variable): Add constructor.
10044 <name>: Change type to std::string.
10045 * tracepoint.c (tsv_s): Remove.
10046 (DEF_VEC_O(tsv_s)): Remove.
10047 (tvariables): Change to std::vector.
10048 (create_trace_state_variable): Adjust to std::vector.
10049 (find_trace_state_variable): Likewise.
10050 (find_trace_state_variable_by_number): Likewise.
10051 (delete_trace_state_variable): Likewise.
10052 (trace_variable_command): Adjust to std::string.
10053 (delete_trace_variable_command): Likewise.
10054 (tvariables_info_1): Adjust to std::vector.
10055 (save_trace_state_variables): Likewise.
10056 (start_tracing): Likewise.
10057 (merge_uploaded_trace_state_variables): Adjust to std::vector
10058 and std::string.
10059 * target.h (struct target_ops)
10060 <to_download_trace_state_variable>: Pass reference to
10061 trace_state_variable.
10062 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10063 * target-delegates.c: Re-generate.
10064 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10065 (mi_tsv_deleted): Likewise.
10066 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10067 * remote.c (remote_download_trace_state_variable): Change
10068 pointer to reference and adjust.
10069 * make-target-delegates (parse_argtypes): Handle references.
10070 (write_function_header): Likewise.
10071 (munge_type): Likewise.
10072
10073 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10074
10075 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10076 string_view-selftests.c.
10077 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10078 testsuite.
10079 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10080 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10081 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10082 * unittests/basic_string_view/element_access/char/1.cc:
10083 Likewise.
10084 * unittests/basic_string_view/element_access/char/empty.cc:
10085 Likewise.
10086 * unittests/basic_string_view/element_access/char/front_back.cc:
10087 Likewise.
10088 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10089 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10090 Likewise.
10091 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10092 Likewise.
10093 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10094 Likewise.
10095 * unittests/basic_string_view/operations/compare/char/1.cc:
10096 Likewise.
10097 * unittests/basic_string_view/operations/compare/char/13650.cc:
10098 Likewise.
10099 * unittests/basic_string_view/operations/copy/char/1.cc:
10100 Likewise.
10101 * unittests/basic_string_view/operations/data/char/1.cc:
10102 Likewise.
10103 * unittests/basic_string_view/operations/find/char/1.cc:
10104 Likewise.
10105 * unittests/basic_string_view/operations/find/char/2.cc:
10106 Likewise.
10107 * unittests/basic_string_view/operations/find/char/3.cc:
10108 Likewise.
10109 * unittests/basic_string_view/operations/find/char/4.cc:
10110 Likewise.
10111 * unittests/basic_string_view/operations/rfind/char/1.cc:
10112 Likewise.
10113 * unittests/basic_string_view/operations/rfind/char/2.cc:
10114 Likewise.
10115 * unittests/basic_string_view/operations/rfind/char/3.cc:
10116 Likewise.
10117 * unittests/basic_string_view/operations/substr/char/1.cc:
10118 Likewise.
10119 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10120 * unittests/string_view-selftests.c: New file.
10121
10122 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10123
10124 * unittests/basic_string_view/capacity/1.cc: New file.
10125 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10126 * unittests/basic_string_view/cons/char/1.cc: New file.
10127 * unittests/basic_string_view/cons/char/2.cc: New file.
10128 * unittests/basic_string_view/cons/char/3.cc: New file.
10129 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10130 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10131 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10132 * unittests/basic_string_view/element_access/char/1.cc: New file.
10133 * unittests/basic_string_view/element_access/char/2.cc: New file.
10134 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10135 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10136 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10137 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10138 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10139 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10140 * unittests/basic_string_view/include.cc: New file.
10141 * unittests/basic_string_view/inserters/char/1.cc: New file.
10142 * unittests/basic_string_view/inserters/char/2.cc: New file.
10143 * unittests/basic_string_view/inserters/char/3.cc: New file.
10144 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10145 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10146 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10147 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10148 * unittests/basic_string_view/literals/types.cc: New file.
10149 * unittests/basic_string_view/literals/values.cc: New file.
10150 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10151 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10152 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10153 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10154 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10155 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10156 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10157 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10158 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10159 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10160 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10161 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10162 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10163 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10164 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10165 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10166 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10167 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10168 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10169 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10170 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10171 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10172 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10173 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10174 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10175 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10176 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10177 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10178 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10179 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10180 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10181 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10182 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10183 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10184 * unittests/basic_string_view/operators/char/2.cc: New file.
10185 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10186 * unittests/basic_string_view/range_access/char/1.cc: New file.
10187 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10188 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10189 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10190 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10191 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10192 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10193 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10194 * unittests/basic_string_view/typedefs.cc: New file.
10195 * unittests/basic_string_view/types/1.cc: New file.
10196
10197 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10198
10199 * common/gdb_string_view.h: Remove libstdc++ implementation
10200 details, adjust to gdb reality.
10201 * common/gdb_string_view.tcc: Likewise.
10202 * cli/cli-script.c (struct string_view): Remove.
10203 (user_args) <m_args>: Change element type to gdb::string_view.
10204 (user_args::insert_args): Adjust.
10205
10206 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10207
10208 * common/gdb_string_view.h: New file.
10209 * common/gdb_string_view.tcc: New file.
10210
10211 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10212
10213 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10214 * configure: Re-generate.
10215
10216 2018-04-09 Pedro Alves <palves@redhat.com>
10217
10218 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10219 (set_target_gdbarch): Call
10220 gdb::observers::architecture_changed.notify instead of
10221 observer_notify_architecture_changed.
10222
10223 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10224
10225 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10226 (do_restore_current_traceframe_cleanup): Remove.
10227 (restore_current_traceframe_cleanup_dtor): Remove.
10228 (make_cleanup_restore_current_traceframe): Remove.
10229 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10230 New.
10231 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10232 * infrun.c (fetch_inferior_event): Use
10233 scoped_restore_current_traceframe.
10234
10235 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10236
10237 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10238 Remove.
10239 <n_allocated_type_units>: Remove.
10240 <all_type_units>: Change to std::vector.
10241 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10242 to std::vector change.
10243 (dwarf2_per_objfile::get_cutu): Likewise.
10244 (dwarf2_per_objfile::get_tu): Likewise.
10245 (create_signatured_type_table_from_index): Likewise.
10246 (create_signatured_type_table_from_debug_names): Likewise.
10247 (dw2_symtab_iter_next): Likewise.
10248 (dw2_print_stats): Likewise.
10249 (dw2_expand_all_symtabs): Likewise.
10250 (dw2_expand_marked_cus): Likewise.
10251 (dw2_debug_names_iterator::next): Likewise.
10252 (dwarf2_initialize_objfile): Likewise.
10253 (add_signatured_type_cu_to_table): Likewise.
10254 (create_all_type_units): Likewise.
10255 (add_type_unit): Likewise.
10256 (struct tu_abbrev_offset): Add constructor.
10257 (build_type_psymtabs_1): Adjust to std::vector change.
10258 (print_tu_stats): Likewise.
10259 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10260 (write_debug_names): Likewise.
10261
10262 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10263
10264 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10265 Make an std::vector.
10266 <n_comp_units>: Remove.
10267 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10268 to std::vector change.
10269 (dwarf2_per_objfile::get_cutu): Likewise.
10270 (dwarf2_per_objfile::get_cu): Likewise.
10271 (create_cus_from_index): Likewise.
10272 (create_addrmap_from_index): Likewise.
10273 (create_addrmap_from_aranges): Likewise.
10274 (dwarf2_read_index): Likewise.
10275 (dw2_find_last_source_symtab): Likewise.
10276 (dw2_map_symtabs_matching_filename): Likewise.
10277 (dw2_symtab_iter_next): Likewise.
10278 (dw2_print_stats): Likewise.
10279 (dw2_expand_all_symtabs): Likewise.
10280 (dw2_expand_symtabs_with_fullname): Likewise.
10281 (dw2_expand_marked_cus): Likewise.
10282 (dw2_map_symbol_filenames): Likewise.
10283 (create_cus_from_debug_names): Likewise.
10284 (dwarf2_read_debug_names): Likewise.
10285 (dw2_debug_names_iterator::next): Likewise.
10286 (dwarf2_initialize_objfile): Likewise.
10287 (set_partial_user): Likewise.
10288 (dwarf2_build_psymtabs_hard): Likewise.
10289 (read_comp_units_from_section): Remove arguments, adjust to
10290 std::vector change.
10291 (create_all_comp_units): Adjust to std::vector and
10292 read_comp_units_from_section changes.
10293 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10294 change.
10295 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10296 (psyms_seen_size): Likewise.
10297 (write_gdbindex): Likewise.
10298 (write_debug_names): Likewise.
10299
10300 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10301
10302 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10303 with dwarf2_per_objfile.
10304 (create_cus_from_index): Likewise.
10305 (create_signatured_type_table_from_index): Likewise.
10306 (dwarf2_read_index): Likewise.
10307 (dwarf2_initialize_objfile): Likewise.
10308 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10309 per_cu rather than get_dwarf2_per_objfile.
10310
10311 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10312
10313 * dwarf2read.h (struct signatured_type): Forward declare.
10314 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10315 New methods.
10316 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10317 (dw2_get_cutu): ...this.
10318 (dwarf2_per_objfile::get_cu): Rename from...
10319 (dw2_get_cu): ...this.
10320 (dwarf2_per_objfile::get_tu): New.
10321 (create_addrmap_from_index): Adjust.
10322 (create_addrmap_from_aranges): Adjust.
10323 (dw2_find_last_source_symtab): Adjust.
10324 (dw2_map_symtabs_matching_filename): Adjust.
10325 (dw2_symtab_iter_next): Adjust.
10326 (dw2_print_stats): Adjust.
10327 (dw2_expand_all_symtabs): Adjust.
10328 (dw2_expand_symtabs_with_fullname): Adjust.
10329 (dw2_expand_marked_cus): Adjust.
10330 (dw_expand_symtabs_matching_file_matcher): Adjust.
10331 (dw2_map_symbol_filenames): Adjust.
10332 (dw2_debug_names_iterator::next): Adjust.
10333 (dwarf2_initialize_objfile): Adjust.
10334 (set_partial_user): Adjust.
10335 (dwarf2_build_psymtabs_hard): Adjust.
10336
10337 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10338
10339 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10340 Remove unused variables.
10341 (dw2_map_symtabs_matching_filename): Likewise.
10342 (dwarf2_record_block_ranges): Likewise.
10343 (dwarf2_read_addr_index): Likewise.
10344 (follow_die_offset): Likewise.
10345
10346 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10347
10348 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10349 to symbol_file_add_main.
10350
10351 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10352
10353 PR mi/22299
10354 * mi/mi-console.c (do_fputc_async_safe): New.
10355 (mi_console_file::write_async_safe): New.
10356 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10357 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10358 New.
10359 * ui-file.c (ui_file::putstrn): Adjust call to
10360 fputstrn_unfiltered.
10361 * utils.c (printchar): Replace do_fputs and do_fprintf
10362 parameters by do_fputc.
10363 (fputstr_filtered): Adjust call to printchar.
10364 (fputstr_unfiltered): Likewise.
10365 (fputstrn_filtered): Likewise.
10366 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10367 printchar.
10368 * utils.h (do_fputc_ftype): New typedef.
10369 (fputstrn_unfiltered): Add do_fputc parameter.
10370
10371 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10372
10373 * regformats/i386/i386-avx.dat: Remove.
10374
10375 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10376
10377 PR gdb/22979
10378 * amd64-tdep.c (amd64_none_init_abi): New function.
10379 (amd64_x32_none_init_abi): New function.
10380 (_initialize_amd64_tdep): Register handlers for x86-64 and
10381 x64_32 with GDB_OSABI_NONE.
10382 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10383 GDB_OSABI_NONE osabi.
10384
10385 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10386
10387 PR gdb/22980
10388 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10389 GDB_OSABI_NONE.
10390 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10391 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10392
10393 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10394
10395 * common/byte-vector.h (char_vector): New type.
10396 * target.h (target_read_alloc): Return
10397 gdb::optional<byte_vector>.
10398 (target_read_stralloc): Return gdb::optional<char_vector>.
10399 (target_get_osdata): Return gdb::optional<char_vector>.
10400 * target.c (target_read_alloc_1): Templatize. Replacement
10401 manual memory management with vector.
10402 (target_read_alloc): Change return type, adjust.
10403 (target_read_stralloc): Change return type, adjust.
10404 (target_get_osdata): Change return type, adjust.
10405 * auxv.c (struct auxv_info) <length>: Remove.
10406 <data>: Change type to gdb::optional<byte_vector>.
10407 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10408 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10409 (target_auxv_search): Adjust.
10410 (fprint_target_auxv): Adjust.
10411 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10412 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10413 (linux_make_corefile_notes): Adjust.
10414 * osdata.c (get_osdata): Adjust.
10415 * remote.c (remote_get_threads_with_qxfer): Adjust.
10416 (remote_memory_map): Adjust.
10417 (remote_traceframe_info): Adjust.
10418 (btrace_read_config): Adjust.
10419 (remote_read_btrace): Adjust.
10420 (remote_pid_to_exec_file): Adjust.
10421 * solib-aix.c (solib_aix_get_library_list): Adjust.
10422 * solib-dsbt.c (decode_loadmap): Don't free buf.
10423 (dsbt_get_initial_loadmaps): Adjust.
10424 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10425 * solib-target.c (solib_target_current_sos): Adjust.
10426 * tracepoint.c (sdata_make_value): Adjust.
10427 * xml-support.c (xinclude_start_include): Adjust.
10428 (xml_fetch_content_from_file): Adjust.
10429 * xml-support.h (xml_fetch_another): Change return type.
10430 (xml_fetch_content_from_file): Change return type.
10431 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10432 * xml-tdesc.c (file_read_description_xml): Adjust.
10433 (fetch_available_features_from_target): Change return type.
10434 (target_fetch_description_xml): Adjust.
10435 (target_read_description_xml): Adjust.
10436
10437 2018-04-06 Tom Tromey <tom@tromey.com>
10438
10439 * value.c (~value): Update.
10440 (struct value) <contents>: Now unique_xmalloc_ptr.
10441 (value_contents_bits_eq, allocate_value_contents)
10442 (value_contents_raw, value_contents_all_raw)
10443 (value_contents_for_printing, value_contents_for_printing_const)
10444 (set_value_enclosing_type): Update.
10445
10446 2018-04-06 Tom Tromey <tom@tromey.com>
10447
10448 * value.c (range_s): Remove typedef, VEC.
10449 (struct range): Add operator<.
10450 (range_lessthan): Remove.
10451 (ranges_contain): Change type.
10452 (~value): Update.
10453 (struct value) <unavailable, optimized_out>: Now std::vector.
10454 (value_entirely_available)
10455 (value_entirely_covered_by_range_vector)
10456 (value_entirely_unavailable, value_entirely_optimized_out):
10457 Update.
10458 (insert_into_bit_range_vector): Change argument type.
10459 (find_first_range_overlap): Likewise.
10460 (struct ranges_and_idx, value_contents_bits_eq)
10461 (require_not_optimized_out, require_available): Update.
10462 (ranges_copy_adjusted): Change argument types.
10463 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10464
10465 2018-04-06 Tom Tromey <tom@tromey.com>
10466
10467 * value.c (~value): Update.
10468 (struct value) <parent>: Now a value_ref_ptr.
10469 (value_parent, set_value_parent, value_address, value_copy):
10470 Update.
10471
10472 2018-04-06 Tom Tromey <tom@tromey.com>
10473
10474 * value.c (struct value): Add constructor, destructor, and member
10475 initializers.
10476 (allocate_value_lazy, value_decref): Update.
10477
10478 2018-04-06 Tom Tromey <tom@tromey.com>
10479
10480 * value.c (struct value) <released, next>: Remove.
10481 (all_values): Now a std::vector.
10482 (allocate_value_lazy): Update.
10483 (value_next): Remove.
10484 (value_mark, value_free_to_mark, release_value)
10485 (value_release_to_mark): Update.
10486
10487 2018-04-06 Tom Tromey <tom@tromey.com>
10488
10489 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10490 (free_value_chain): Remove.
10491 * value.c (free_value_chain): Remove.
10492 (value_release_to_mark): Return a std::vector.
10493 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10494 std::vector.
10495 (check_condition): Update.
10496 * eval.c (fetch_subexp_value): Change "val_chain" to a
10497 std::vector.
10498 * breakpoint.c (update_watchpoint): Update.
10499 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10500
10501 2018-04-06 Tom Tromey <tom@tromey.com>
10502
10503 * value.h (free_all_values): Remove.
10504 * value.c (free_all_values): Remove.
10505
10506 2018-04-06 Tom Tromey <tom@tromey.com>
10507
10508 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10509 (value_history_chain, value_history_count): Remove.
10510 (value_history): New global.
10511 (record_latest_value, access_value_history, show_values)
10512 (preserve_values): Update.
10513
10514 2018-04-06 Tom Tromey <tom@tromey.com>
10515
10516 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10517 * varobj.c (varobj_set_display_format, varobj_set_value)
10518 (install_default_visualizer, construct_visualizer)
10519 (install_new_value, ~varobj, varobj_get_value_type)
10520 (my_value_of_variable, varobj_editable_p): Update.
10521 * c-varobj.c (c_describe_child, c_value_of_variable)
10522 (cplus_number_of_children, cplus_describe_child): Update.
10523 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10524 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10525 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10526
10527 2018-04-06 Tom Tromey <tom@tromey.com>
10528
10529 * printcmd.c (last_examine_address): Change type to
10530 value_ref_ptr.
10531 (do_examine, x_command): Update.
10532
10533 2018-04-06 Tom Tromey <tom@tromey.com>
10534
10535 * value.c (release_value): Update.
10536 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10537 (struct bpstats) <val>: Now a value_ref_ptr.
10538 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10539 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10540 (~watchpoint, print_it_watchpoint, watch_command_1)
10541 (invalidate_bp_value_on_memory_change): Update.
10542
10543 2018-04-06 Tom Tromey <tom@tromey.com>
10544
10545 * varobj.c (varobj_clear_saved_item)
10546 (update_dynamic_varobj_children, install_new_value, ~varobj):
10547 Update.
10548 * value.h (value_incref): Move declaration earlier.
10549 (value_decref): Rename from value_free.
10550 (struct value_ref_policy): New.
10551 (value_ref_ptr): New typedef.
10552 (struct value_deleter): Remove.
10553 (gdb_value_up): Remove typedef.
10554 (release_value): Change return type.
10555 (release_value_or_incref): Remove.
10556 * value.c (set_value_parent): Update.
10557 (value_incref): Change return type.
10558 (value_decref): Rename from value_free.
10559 (value_free_to_mark, free_all_values, free_value_chain): Update.
10560 (release_value): Return value_ref_ptr.
10561 (release_value_or_incref): Remove.
10562 (record_latest_value, set_internalvar, clear_internalvar):
10563 Update.
10564 * stack.c (info_frame_command): Don't call value_free.
10565 * python/py-value.c (valpy_dealloc, valpy_new)
10566 (value_to_value_object): Update.
10567 * printcmd.c (do_examine): Update.
10568 * opencl-lang.c (lval_func_free_closure): Update.
10569 * mi/mi-main.c (register_changed_p): Don't call value_free.
10570 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10571 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10572 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10573 value_free.
10574 * guile/scm-value.c (vlscm_free_value_smob)
10575 (vlscm_scm_from_value): Update.
10576 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10577 (frame_unwind_register_unsigned, get_frame_register_bytes)
10578 (put_frame_register_bytes): Don't call value_free.
10579 * findvar.c (address_from_register): Don't call value_free.
10580 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10581 * dwarf2loc.c (entry_data_value_free_closure)
10582 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10583 (dwarf2_evaluate_loc_desc_full): Update.
10584 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10585 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10586 (~watchpoint, watch_command_1)
10587 (invalidate_bp_value_on_memory_change): Update.
10588 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10589
10590 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10591
10592 PR gdb/23022
10593 * warning.m4: Add -Wno-error=deprecated-register.
10594 * configure: Re-generate.
10595
10596 2018-04-05 Tom Tromey <tom@tromey.com>
10597
10598 * linespec.h: Remove include of "vec.h".
10599
10600 2018-04-05 Tom Tromey <tom@tromey.com>
10601
10602 * linespec.c (typep): Remove typedef.
10603 (find_methods, find_superclass_methods): Take a std::vector.
10604 (find_method): Use std::vector.
10605
10606 2018-04-05 Tom Tromey <tom@tromey.com>
10607
10608 * utils.c (compare_strings): Remove.
10609 * utils.h (compare_strings): Remove.
10610 * objc-lang.h (find_imps): Update.
10611 * objc-lang.c (find_methods): Take a std::vector.
10612 (uniquify_strings, find_imps): Likewise.
10613 * linespec.c (find_methods): Take a std::vector.
10614 (decode_objc): Use std::vector.
10615 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10616 a std::vector.
10617 (find_method, find_function_symbols): Use std::vector.
10618
10619 2018-04-05 Tom Tromey <tom@tromey.com>
10620
10621 * completer.c (completion_tracker::completion_tracker): Remove
10622 cast.
10623 (completion_tracker::discard_completions): Likewise.
10624 * breakpoint.c (ambiguous_names_p): Remove cast.
10625 * ada-lang.c (_initialize_ada_language): Remove cast.
10626 * utils.h (streq): Update.
10627 (streq_hash): Add new declaration.
10628 * utils.c (streq): Return bool.
10629 (streq_hash): New function.
10630
10631 2018-04-05 Tom Tromey <tom@tromey.com>
10632
10633 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10634 Remove a string copy.
10635
10636 2018-04-05 Tom Tromey <tom@tromey.com>
10637
10638 * linespec.c (filter_results): Use std::vector.
10639 (decode_line_2, decode_line_full): Update.
10640
10641 2018-04-05 Tom Tromey <tom@tromey.com>
10642
10643 * linespec.c (canonical_to_fullform): Return std::string.
10644 (filter_results): Update.
10645 (struct decode_line_2_item): Add constructor.
10646 <fullform, displayform>: Now std::string.
10647 (decode_line_2_compare_items): Now a std::sort comparator.
10648 (decode_line_2): Update.
10649
10650 2018-04-05 Tom Tromey <tom@tromey.com>
10651
10652 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10653 (unexpected_linespec_error): Update.
10654 (linespec_parse_basic, parse_linespec): Update.
10655
10656 2018-04-05 Tom Tromey <tom@tromey.com>
10657
10658 * linespec.c (linespec_parse_basic): Reindent.
10659
10660 2018-04-05 Tom Tromey <tom@tromey.com>
10661
10662 * minsyms.h (iterate_over_minimal_symbols): Update.
10663 * minsyms.c (iterate_over_minimal_symbols): Take a
10664 gdb::function_view.
10665 * linespec.c (struct collect_minsyms): Remove.
10666 (compare_msyms): Now a std::sort comparator.
10667 (add_minsym): Add parameters.
10668 (search_minsyms_for_name): Update. Use std::vector.
10669
10670 2018-04-03 Tom Tromey <tom@tromey.com>
10671
10672 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10673 gdb::byte_vector.
10674
10675 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10676
10677 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10678
10679 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10680
10681 PR gdb/16959
10682 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10683 printing static type.
10684
10685 2018-04-01 Tom Tromey <tom@tromey.com>
10686
10687 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10688 (rs6000_xfer_shared_libraries): Update.
10689
10690 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10691
10692 * common/gdb_vecs.h (char_ptr): Remove.
10693 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10694
10695 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10696
10697 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10698 with std::vector.
10699 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10700
10701 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10702
10703 * tracepoint.h (struct uploaded_tp): Initialize fields.
10704 <actions, step_actions, cmd_strings>: Change type to
10705 std::vector<char *>.
10706 * tracepoint.c (get_uploaded_tp): Allocate with new.
10707 (free_uploaded_tps): Free with delete.
10708 (parse_tracepoint_definition): Adjust to std::vector change.
10709 * breakpoint.c (read_uploaded_action): Likewise.
10710 (create_tracepoint_from_upload): Likewise.
10711 * ctf.c (ctf_write_uploaded_tp): Likewise.
10712 (SET_ARRAY_FIELD): Likewise.
10713 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10714
10715 2018-03-30 Tom Tromey <tom@tromey.com>
10716
10717 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10718 std::unique_ptr.
10719 (svr4_keep_data_in_core): Update.
10720 (svr4_read_so_list): Update.
10721
10722 2018-03-30 Tom Tromey <tom@tromey.com>
10723
10724 * windows-nat.c (handle_output_debug_string, handle_exception):
10725 Update.
10726 * target.h (target_read_string): Update.
10727 * target.c (target_read_string): Change "string" to
10728 unique_xmalloc_ptr.
10729 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10730 Update.
10731 * solib-frv.c (frv_current_sos): Update.
10732 * solib-dsbt.c (dsbt_current_sos): Update.
10733 * solib-darwin.c (darwin_current_sos): Update.
10734 * linux-thread-db.c (inferior_has_bug): Update.
10735 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10736 Update. Remove alloca.
10737 * ada-lang.c (ada_main_name): Update.
10738
10739 2018-03-30 Tom Tromey <tom@tromey.com>
10740
10741 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10742 (struct dwo_file_deleter): New.
10743 (dwo_file_up): New typedef.
10744 (open_and_init_dwo_file): Use dwo_file_up.
10745 (free_dwo_file_cleanup): Remove.
10746
10747 2018-03-30 Tom Tromey <tom@tromey.com>
10748
10749 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10750 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10751
10752 2018-03-30 Tom Tromey <tom@tromey.com>
10753
10754 * dwarf2read.c (class free_cached_comp_units): New class.
10755 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10756 (free_cached_comp_units): Remove function.
10757
10758 2018-03-30 Tom Tromey <tom@tromey.com>
10759
10760 * utils.h (make_cleanup_unpush_target): Remove.
10761 * inf-ptrace.c (struct target_unpusher): New.
10762 (target_unpush_up) New typedef.
10763 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10764 target_unpush_up.
10765 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10766
10767 2018-03-27 Tom Tromey <tom@tromey.com>
10768
10769 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10770
10771 2018-03-27 Pedro Alves <palves@redhat.com>
10772 Tom Tromey <tom@tromey.com>
10773
10774 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10775 destructor. Now a class.
10776 (gdb_readline_wrapper_cleanup): Remove function.
10777 (gdb_readline_wrapper): Remove cleanups.
10778
10779 2018-03-27 Tom Tromey <tom@tromey.com>
10780
10781 * typeprint.h (struct type_print_options) <local_typedefs,
10782 global_typedefs>: Remove "struct" keyword.
10783 (class typedef_hash_table): New class.
10784 (recursively_update_typedef_hash, add_template_parameters)
10785 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10786 (find_typedef_in_hash): Don't declare.
10787 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10788 (typedef_hash_table::recursively_update): Rename from
10789 recursively_update_typedef_hash. Now a member.
10790 (typedef_hash_table::add_template_parameters): Rename from
10791 add_template_parameters. Now a member.
10792 (typedef_hash_table::typedef_hash_table): Now a constructor;
10793 rename from create_typedef_hash.
10794 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10795 rename from free_typedef_hash.
10796 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10797 (do_free_global_table): Remove.
10798 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10799 from copy_type_recursive.
10800 (create_global_typedef_table): Remove.
10801 (typedef_hash_table::find_global_typedef): Now a member of
10802 typedef_hash_table.
10803 (typedef_hash_table::find_typedef): Rename from
10804 find_typedef_in_hash; now a member.
10805 (whatis_exp): Update.
10806 * extension.h (struct ext_lang_type_printers): Add constructor and
10807 destructor.
10808 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10809 declare.
10810 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10811 Now a constructor; rename from start_ext_lang_type_printers.
10812 (ext_lang_type_printers): Now a destructor; rename from
10813 free_ext_lang_type_printers.
10814 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10815 Update.
10816 (c_type_print_base_struct_union): Update. Remove cleanups.
10817
10818 2018-03-27 Tom Tromey <tom@tromey.com>
10819
10820 * dwarf-index-write.c: Include <cmath>.
10821
10822 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10823
10824 * NEWS: Add entry describing new "set|show varsize-limit" command.
10825 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10826 command.
10827 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10828 "set variable".
10829
10830 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10831
10832 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10833 dwarf-index-write.c
10834 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10835 * dwarf-index-common.c: New file.
10836 * dwarf-index-common.h: New file.
10837 * dwarf-index-write.c: New file.
10838 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10839 (struct dwarf2_section_info): Move from here.
10840 (dwarf2_section_info_def): Likewise.
10841 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10842 (offset_type): Likewise.
10843 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10844 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10845 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10846 (byte_swap): Likewise.
10847 (MAYBE_SWAP): Likewise.
10848 (dwarf2_per_cu_ptr): Likewise.
10849 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10850 (struct tu_stats): Likewise.
10851 (struct dwarf2_per_objfile): Likewise.
10852 (struct dwarf2_per_cu_data): Likewise.
10853 (struct signatured_type): Likewise.
10854 (sig_type_ptr): Likewise.
10855 (DEF_VEC_P (sig_type_ptr)): Likewise.
10856 (INDEX4_SUFFIX): Likewise.
10857 (INDEX5_SUFFIX): Likewise.
10858 (DEBUG_STR_SUFFIX): Likewise.
10859 (dwarf2_read_section): Make non-static.
10860 (mapped_index_string_hash): Move from here.
10861 (dwarf5_djb_hash): Likewise.
10862 (file_write): Likewise.
10863 (class data_buf): Likewise.
10864 (struct symtab_index_entry): Likewise.
10865 (struct mapped_symtab): Likewise.
10866 (find_slot): Likewise.
10867 (hash_expand): Likewise.
10868 (add_index_entry): Likewise.
10869 (uniquify_cu_indices): Likewise.
10870 (class c_str_view): Likewise.
10871 (class c_str_view_hasher): Likewise.
10872 (class vector_hasher): Likewise.
10873 (write_hash_table): Likewise.
10874 (psym_index_map): Likewise.
10875 (struct addrmap_index_data): Likewise.
10876 (add_address_entry): Likewise.
10877 (add_address_entry_worker): Likewise.
10878 (write_address_map): Likewise.
10879 (symbol_kind): Likewise.
10880 (write_psymbols): Likewise.
10881 (struct signatured_type_index_data): Likewise.
10882 (write_one_signatured_type): Likewise.
10883 (recursively_count_psymbols): Likewise.
10884 (recursively_write_psymbols): Likewise.
10885 (class debug_names): Likewise.
10886 (check_dwarf64_offsets): Likewise.
10887 (psyms_seen_size): Likewise.
10888 (write_gdbindex): Likewise.
10889 (write_debug_names): Likewise.
10890 (assert_file_size): Likewise.
10891 (write_psymtabs_to_index): Likewise.
10892 (save_gdb_index_command): Likewise.
10893 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10894 command.
10895 * dwarf2read.h: New file.
10896
10897 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10898
10899 PR gdb/22670
10900 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10901 symbol name if the CU's language stores symbol names in linkage
10902 format.
10903 * language.h (struct language_defn)
10904 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10905 all instances of this struct.
10906
10907 2018-03-26 Tom Tromey <tom@tromey.com>
10908
10909 * stack.c (backtrace_command_1): Remove verbose code.
10910
10911 2018-03-26 Tom Tromey <tom@tromey.com>
10912
10913 * python/py-framefilter.c (py_print_type): Don't catch
10914 exceptions. Return void.
10915 (py_print_value): Likewise.
10916 (py_print_single_arg): Likewise.
10917 (enumerate_args): Don't catch exceptions.
10918 (py_print_args): Likewise.
10919 (py_print_frame): Likewise.
10920 (gdbpy_apply_frame_filter): Catch exceptions here.
10921
10922 2018-03-26 Tom Tromey <tom@tromey.com>
10923
10924 * stack.c (_initialize_stack): Remove trailing newlines from help
10925 text. Add "Usage" line to "backtrace" help.
10926
10927 2018-03-26 Tom Tromey <tom@tromey.com>
10928
10929 PR python/16486:
10930 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10931
10932 2018-03-26 Tom Tromey <tom@tromey.com>
10933
10934 * python/py-framefilter.c (py_print_single_arg): Return
10935 EXT_LANG_BT_ERROR from catch.
10936
10937 2018-03-26 Tom Tromey <tom@tromey.com>
10938
10939 PR backtrace/15584:
10940 * stack.c (backtrace_command_1): Move some code into no-filters
10941 "if".
10942
10943 2018-03-26 Tom Tromey <tom@tromey.com>
10944
10945 * python/py-framefilter.c (throw_quit_or_print_exception): New
10946 function.
10947 (gdbpy_apply_frame_filter): Use it.
10948
10949 2018-03-26 Tom Tromey <tom@tromey.com>
10950
10951 PR cli/17716:
10952 * python/py-framefilter.c (py_print_type, py_print_value)
10953 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10954 RETURN_MASK_ERROR.
10955
10956 2018-03-26 Tom Tromey <tom@tromey.com>
10957
10958 * python/py-framefilter.c (enumerate_args): Use
10959 gdb::unique_xmalloc_ptr.
10960
10961 2018-03-26 Tom Tromey <tom@tromey.com>
10962
10963 * python/py-framefilter.c (py_print_frame): Return
10964 EXT_LANG_BT_OK.
10965 (gdbpy_apply_frame_filter): Update comment.
10966 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10967 Remove.
10968 <EXT_LANG_BT_NO_FILTERS>: Change value.
10969
10970 2018-03-26 Tom Tromey <tom@tromey.com>
10971
10972 PR backtrace/15582:
10973 * stack.c (backtrace_command): Parse "hide" argument.
10974 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10975 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10976 constant.
10977
10978 2018-03-26 Tom Tromey <tom@tromey.com>
10979
10980 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10981 add "flags".
10982 (backtrace_command): Remove "fulltrace", add "flags".
10983
10984 2018-03-26 Tom Tromey <tom@tromey.com>
10985
10986 * stack.c (backtrace_command): Rewrite command line parsing.
10987
10988 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10989
10990 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10991
10992 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10993
10994 * filename-seen-cache.h: Add include guard.
10995
10996 2018-03-26 Keith Seitz <keiths@redhat.com>
10997
10998 * symfile.c (place_section): Remove "struct" from section_addr_info
10999 in comment.
11000 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11001 "struct" keyword from section_addr_info.
11002
11003 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11004
11005 * regformats/regdef.h (reg): Add constructors.
11006
11007 2018-03-25 Pedro Alves <palves@redhat.com>
11008
11009 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11010 if then/else bodies in var_func_name extraction.
11011
11012 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11013
11014 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11015 lookup_minimal_symbol() to find symbol entry.
11016 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11017
11018 2018-03-23 Keith Seitz <keiths@redhat.com>
11019
11020 PR c++/22968
11021 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11022 nested type definitions for C++, too.
11023
11024 2018-03-23 Tom Tromey <tom@tromey.com>
11025
11026 * machoread.c (struct oso_el): Add a constructor. Don't define as
11027 a typedef.
11028 (macho_register_oso): Remove.
11029 (macho_symtab_read): Take a std::vector.
11030 (oso_el_compare_name): Now a std::sort comparator.
11031 (macho_symfile_read_all_oso): Take a std::vector.
11032 (macho_symfile_read): Use std::vector. Remove cleanups.
11033
11034 2018-03-22 Tom Tromey <tom@tromey.com>
11035
11036 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11037 (record_full_goto_bookmark): Use std::string.
11038
11039 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11040
11041 PR tdep/18295
11042 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11043 a single mask.
11044
11045 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11046
11047 * rs6000-tdep.c (store_insn_p): New function.
11048 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11049 and cr_reg to their unshifted values. Use store_insn_p to
11050 match LR saves using either R1 or fdata->alloca_reg. Use
11051 store_insn_p to match CR saves. Set alloca_reg_offset
11052 when alloca_reg and framep are set. Remove lr_reg shift
11053 when assigning to fdata->lr_register.
11054
11055 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11056
11057 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11058 command line args instead of emitting a warning.
11059
11060 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11061
11062 * tracepoint.h (struct static_tracepoint_marker): Initialize
11063 fields, define default constructor, move constructor and move
11064 assignment, disable the rest.
11065 <str_id, extra>: Make std::string.
11066 (release_static_tracepoint_marker): Remove.
11067 (free_current_marker): Remove.
11068 * tracepoint.c (free_current_marker): Remove.
11069 (parse_static_tracepoint_marker_definition): Adjust to
11070 std::string, use new hex2str overload.
11071 (release_static_tracepoint_marker): Remove.
11072 (print_one_static_tracepoint_marker): Get marker by reference
11073 and adjust to std::string.
11074 (info_static_tracepoint_markers_command): Adjust to std::vector
11075 changes
11076 * target.h (static_tracepoint_marker_p): Remove typedef.
11077 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11078 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11079 bool.
11080 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11081 * target-debug.h
11082 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11083 (target_debug_print_std_vector_static_tracepoint_marker): New.
11084 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11085 to...
11086 (target_debug_print_static_tracepoint_marker_p): ... this.
11087 * target-delegates.c: Re-generate.
11088 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11089 Make std::string.
11090 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11091 (decode_static_tracepoint_spec): Adjust to std::vector.
11092 (tracepoint_print_one_detail): Adjust to std::string.
11093 (strace_marker_decode_location): Adjust to std::string.
11094 (update_static_tracepoint): Adjust to std::string, remove call
11095 to release_static_tracepoint_marker.
11096 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11097 Adjust to std::vector.
11098 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11099 (remote_static_tracepoint_markers_by_strid): Adjust to
11100 std::vector.
11101 * common/rsp-low.h (hex2str): New overload with explicit count
11102 of bytes.
11103 * common/rsp-low.c (hex2str): New overload with explicit count
11104 of bytes.
11105 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11106 (_initialize_rsp_low_selftests): Add test_hex2str test.
11107 * unittests/tracepoint-selftests.c
11108 (test_parse_static_tracepoint_marker_definition): Adjust to
11109 std::string.
11110
11111 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11112
11113 * tracepoint.c (parse_static_tracepoint_marker_definition):
11114 Consider case where the definition is followed by more
11115 definitions.
11116 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11117 tracepoint-selftests.c.
11118 * unittests/tracepoint-selftests.c: New.
11119
11120 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11121
11122 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11123 Carvalho.
11124
11125 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11126
11127 * symtab.c (find_pc_sect_line): fixed indentation.
11128
11129 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11130
11131 * symtab.c (find_pc_sect_line): now uses binary search.
11132
11133 2018-03-19 Tom Tromey <tom@tromey.com>
11134
11135 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11136 "IDENT" production.
11137
11138 2018-03-19 Pedro Alves <palves@redhat.com>
11139 Tom Tromey <tom@tromey.com>
11140
11141 * unittests/observable-selftests.c: New file.
11142 * common/observable.h: New file.
11143 * observable.h: New file.
11144 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11145 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11146 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11147 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11148 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11149 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11150 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11151 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11152 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11153 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11154 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11155 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11156 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11157 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11158 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11159 tui/tui-interp.c, valops.c: Update all users.
11160 * tui/tui-hooks.c (tui_bp_created_observer)
11161 (tui_bp_deleted_observer, tui_bp_modified_observer)
11162 (tui_inferior_exit_observer, tui_before_prompt_observer)
11163 (tui_normal_stop_observer, tui_register_changed_observer):
11164 Remove.
11165 (tui_observers_token): New global.
11166 (attach_or_detach, tui_attach_detach_observers): New functions.
11167 (tui_install_hooks, tui_remove_hooks): Use
11168 tui_attach_detach_observers.
11169 * record-btrace.c (record_btrace_thread_observer): Remove.
11170 (record_btrace_thread_observer_token): New global.
11171 * observer.sh: Remove.
11172 * observer.c: Rename to observable.c.
11173 * observable.c (namespace gdb_observers): Define new objects.
11174 (observer_debug): Move into gdb_observers namespace.
11175 (struct observer, struct observer_list, xalloc_observer_list_node)
11176 (xfree_observer_list_node, generic_observer_attach)
11177 (generic_observer_detach, generic_observer_notify): Remove.
11178 (_initialize_observer): Update.
11179 Don't include observer.inc.
11180 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11181 (clean mostlyclean): Likewise.
11182 (observer.h, observer.inc): Remove targets.
11183 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11184 (COMMON_SFILES): Use observable.c, not observer.c.
11185 * .gitignore: Remove observer.h.
11186
11187 2018-03-18 Tom Tromey <tom@tromey.com>
11188
11189 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11190 gdb::def_vector.
11191 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11192
11193 2018-03-17 Tom Tromey <tom@tromey.com>
11194
11195 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11196
11197 2018-03-17 Tom Tromey <tom@tromey.com>
11198
11199 * target.c (class scoped_target_fd): New.
11200 (target_fileio_close_cleanup): Remove.
11201 (target_fileio_read_alloc_1): Use scoped_target_fd.
11202
11203 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11204
11205 * silent-rules.mk: New.
11206 * Makefile.in: Include silent-rules.mk
11207 (srcdir, VPATH, top_srcdir): Move up.
11208 (COMPILE): Add ECHO_CXX.
11209 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11210 (init.c): Add ECHO_INIT_C.
11211 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11212 (version.c): Add ECHO_GEN.
11213 (printcmd.o): Add ECHO_CXX.
11214 (target-float.o): Add ECHO_CXX.
11215 (ada-exp.o): Add ECHO_CXX.
11216 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11217 (insight$(EXEEXT)): Add ECHO_CXXLD.
11218 * gnulib/configure.ac: Add AM_SILENT_RULES.
11219 * gnulib/aclocal.m4: Re-generate.
11220 * gnulib/configure: Re-generate.
11221 * gnulib/import/Makefile.in: Re-generate.
11222
11223 2018-03-16 Tom Tromey <tom@tromey.com>
11224
11225 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11226 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11227 * utils.c (do_free_section_addr_info)
11228 (make_cleanup_free_section_addr_info): Remove.
11229 * symfile.h (struct other_sections): Add constructor.
11230 (struct section_addr_info): Remove.
11231 (section_addr_info): New typedef.
11232 (struct sym_fns) <sym_offsets>: Change type of parameter.
11233 (build_section_addr_info_from_objfile)
11234 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11235 (default_symfile_offsets, symbol_file_add)
11236 (symbol_file_add_from_bfd)
11237 (build_section_addr_info_from_section_table): Update.
11238 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11239 * symfile.c (alloc_section_addr_info): Remove.
11240 (build_section_addr_info_from_section_table): Change return type.
11241 Update.
11242 (build_section_addr_info_from_bfd)
11243 (build_section_addr_info_from_objfile): Likewise.
11244 (free_section_addr_info): Remove.
11245 (relative_addr_info_to_section_offsets): Change type of "addrs".
11246 (addrs_section_compar): Now a std::sort comparator.
11247 (addrs_section_sort): Change return type.
11248 (addr_info_make_relative): Change type of "addrs". Update.
11249 (default_symfile_offsets, syms_from_objfile_1)
11250 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11251 (symbol_file_add_separate): Update.
11252 (symbol_file_add): Change type of "addrs". Update.
11253 (add_symbol_file_command): Update. Remove cleanups.
11254 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11255 cleanups.
11256 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11257 * solib.c (solib_read_symbols): Update.
11258 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11259 * machoread.c (macho_symfile_offsets): Update.
11260 * jit.c (jit_bfd_try_read_symtab): Update.
11261
11262 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11263
11264 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11265 unittests/utils-selftests.c.
11266 * unittests/utils-selftests.c: New file.
11267
11268 2018-03-14 Tom Tromey <tom@tromey.com>
11269
11270 PR cli/14977:
11271 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11272 for NULL.
11273
11274 2018-03-14 Tom Tromey <tom@tromey.com>
11275
11276 PR cli/19918:
11277 * printcmd.c (printf_pointer): Allow "-" in format.
11278
11279 2018-03-14 Tom Tromey <tom@tromey.com>
11280
11281 * printcmd.c (_initialize_printcmd): Add usage to printf.
11282
11283 2018-03-14 Yao Qi <qiyao@sourceware.org>
11284
11285 * MAINTAINERS: Update my email address.
11286
11287 2018-03-13 Tom Tromey <tom@tromey.com>
11288
11289 * machoread.c (macho_check_dsym): Change filenamep to a
11290 std::string*.
11291 (macho_symfile_read): Update.
11292 * symfile.c (load_command): Use std::string.
11293
11294 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11295
11296 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11297 to error message string.
11298 (riscv_register_name): Use xsnprintf instead of sprintf.
11299 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11300 internal_error.
11301 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11302 error.
11303 (riscv_push_dummy_call): Likewise.
11304
11305 2018-03-12 Tom Tromey <tom@tromey.com>
11306
11307 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11308 Use gdb::byte_vector.
11309 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11310
11311 2018-03-12 Yao Qi <yao.qi@linaro.org>
11312
11313 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11314 parameter type to readable_regcache.
11315 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11316 the declaration.
11317
11318 2018-03-11 Tom Tromey <tom@tromey.com>
11319
11320 * dwarf2read.c (struct nextfield): Add initializers.
11321 (struct nextfnfield): Remove.
11322 (struct fnfieldlist): Add initializers. Remove "length" and
11323 "head", use std::vector.
11324 (struct decl_field_list): Remove.
11325 (struct field_info): Add initializers.
11326 <fields, baseclasses>: Now std::vector.
11327 <nbaseclasses, nfnfields, typedef_field_list_count,
11328 nested_types_list_count>: Remove.
11329 (dwarf2_add_field, dwarf2_add_type_defn)
11330 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11331 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11332 (process_structure_scope): Update.
11333
11334 2018-03-11 Tom Tromey <tom@tromey.com>
11335
11336 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11337 for use by std::sort.
11338 (build_type_psymtabs_1): Use std::vector.
11339
11340 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11341
11342 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11343 and LIBMPFR in the printed configuration.
11344
11345 2018-03-08 Tom Tromey <tom@tromey.com>
11346
11347 * source.c (get_filename_and_charpos): Use scoped_fd.
11348 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11349 (procfs_pidlist): Likewise.
11350 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11351 (iterate_over_mappings): Likewise.
11352
11353 2018-03-08 Tom Tromey <tom@tromey.com>
11354
11355 * infcall.c (struct call_return_meta_info)
11356 <stack_temporaries_enabled>: Remove.
11357 (get_call_return_value, call_function_by_hand_dummy): Update.
11358 * thread.c (disable_thread_stack_temporaries): Remove.
11359 (enable_thread_stack_temporaries): Remove.
11360 (thread_stack_temporaries_enabled_p): Return bool.
11361 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11362 (get_last_thread_stack_temporary): Update.
11363 * eval.c (evaluate_subexp): Update.
11364 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11365 class, not a function.
11366 (value_ptr, value_vec): Remove typedefs.
11367 (class thread_info) <stack_temporaries_enabled>: Now bool.
11368 <stack_temporaries>: Now a std::vector.
11369 (thread_stack_temporaries_enabled_p)
11370 (value_in_thread_stack_temporaries): Return bool.
11371
11372 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11373
11374 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11375 (getpkt_or_notif_sane_1): Likewise.
11376
11377 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11378
11379 * build-id.c (build_id_to_debug_bfd): Use std::string.
11380
11381 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11382
11383 * build-id.c (find_separate_debug_file_by_buildid): Return
11384 std::string.
11385 * build-id.h (find_separate_debug_file_by_buildid): Return
11386 std::string.
11387 * coffread.c (coff_symfile_read): Adjust to std::string.
11388 * elfread.c (elf_symfile_read): Adjust to std::string.
11389 * symfile.c (separate_debug_file_exists): Change parameter to
11390 std::string.
11391 (find_separate_debug_file): Return std::string.
11392 (find_separate_debug_file_by_debuglink): Return std::string.
11393 * symfile.h (find_separate_debug_file_by_debuglink): Return
11394 std::string.
11395
11396 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11397
11398 * common/xml-utils.c (xml_escape_text): Move code to...
11399 (xml_escape_text_append): ... this new function.
11400 * common/xml-utils.h (xml_escape_text_append): New declaration.
11401 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11402 New function.
11403 (_initialize_xml_utils): register test_xml_escape_text_append as
11404 a selftest.
11405
11406 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11407
11408 * defs.h: Remove MAX_REGISTER_SIZE.
11409 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11410 asserts.
11411 * python/py-unwind.c (pyuw_sniffer): Likewise.
11412
11413 2018-03-07 Tom Tromey <tom@tromey.com>
11414
11415 * linux-tdep.c (linux_info_proc): Update.
11416 * target.h (struct target_ops) <to_fileio_readlink>: Return
11417 optional<string>.
11418 (target_fileio_readlink): Return optional<string>.
11419 * remote.c (remote_hostio_readlink): Return optional<string>.
11420 * inf-child.c (inf_child_fileio_readlink): Return
11421 optional<string>.
11422 * target.c (target_fileio_readlink): Return optional<string>.
11423
11424 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11425
11426 * regcache.c (cooked_read_test): Add riscv to the list of
11427 architectures that have a save_reggroup.
11428
11429 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11430
11431 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11432 value is not a dynamic class object.
11433
11434 2018-03-06 Tom Tromey <tom@tromey.com>
11435
11436 * rust-exp.y: Formatting fixes.
11437
11438 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11439
11440 * riscv-tdep.c (riscv_register_name): Remove target description
11441 support.
11442 (riscv_gdbarch_init): Remove target description check.
11443
11444 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11445
11446 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11447 comment.
11448 * riscv-tdep.h: Likewise.
11449
11450 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11451
11452 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11453 (riscv_pseudo_register_write): Delete.
11454 (riscv_gdbarch_init): Remove all use of pseudo registers.
11455
11456 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11457
11458 * record-btrace.c (btrace_print_lines): Replace cleanup
11459 parameter with RAII equivalents.
11460 (btrace_insn_history): Replace cleanup with RAII equivalents.
11461 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11462 make_cleanup_ui_out_tuple_begin_end): Remove.
11463 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11464 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11465 make_cleanup_ui_out_list_begin_end): Remove.
11466
11467 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11468
11469 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11470 parameter types to std::vector. Use bool.
11471 (record_btrace_wait): Replace VEC(tp_t) with
11472 std::vector<thread_info *>.
11473 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11474
11475 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11476
11477 * record-btrace.c (record_btrace_disable_callback): Remove.
11478 (struct scoped_btrace_disable): New.
11479 (record_btrace_open): Use scoped_btrace_disable.
11480
11481 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11482
11483 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11484 reading values from registers.
11485
11486 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11487
11488 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11489 where appropriate.
11490
11491 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11492
11493 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11494 change parameter type. Use GDB's print functions, and use
11495 core_addr_to_string where appropriate.
11496 (riscv_push_dummy_call): Use core_addr_to_string where
11497 appropriate, update call to riscv_print_arg_location, and reindent
11498 a few lines.
11499 (riscv_return_value): Update call to riscv_print_arg_location.
11500
11501 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11502 Tim Newsome <tim@sifive.com>
11503 Albert Ou <a0u@eecs.berkeley.edu>
11504 Darius Rad <darius@bluespec.com>
11505
11506 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11507 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11508 (ALLDEPFILES): Add riscv-tdep.c
11509 * configure.tgt: Add riscv support.
11510 * riscv-tdep.c: New file.
11511 * riscv-tdep.h: New file.
11512 * NEWS: Mention new target.
11513 * MAINTAINERS: Add entry for riscv.
11514
11515 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11516
11517 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11518 fields within aggregates.
11519
11520 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11521
11522 * record-btrace.c (btrace_print_lines): Change type of flags to
11523 gdb_disassembly_flags.
11524
11525 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11526
11527 * fbsd-nat.c: Include "inf-ptrace.h".
11528 (USE_SIGTRAP_SIGINFO): Conditionally define.
11529 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11530 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11531 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11532 function.
11533 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11534 Likewise.
11535 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11536 Likewise.
11537 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11538 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11539 "supports_stopped_by_hw_breakpoint" target methods.
11540
11541 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11542
11543 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11544 * fbsd-nat.c (debug_fbsd_nat): New variable.
11545 (show_fbsd_nat_debug): New function.
11546 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11547 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11548
11549 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11550
11551 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11552 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11553 prototype.
11554 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11555 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11556 method.
11557
11558 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11559
11560 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11561 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11562
11563 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11564
11565 * charset.c (struct charset_vector): New.
11566 (charsets): Change type to charset_vector.
11567 (find_charset_names): Adjust.
11568 (add_one): Adjust.
11569 (_initialize_charset): Adjust.
11570
11571 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11572
11573 * progspace.h (struct program_space) <deleted_solibs>: Change
11574 type to std::vector<std::string>.
11575 * progspace.c (clear_program_space_solib_cache): Adjust.
11576 * breakpoint.c (print_solib_event): Adjust.
11577 (check_status_catch_solib): Adjust.
11578 * solib.c (update_solib_list): Adjust.
11579 * ui-out.h (class ui_out) <field_string>: New overload.
11580 * ui-out.c (ui_out::field_string): New overload.
11581
11582 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11583
11584 * progspace.h (struct program_space): Add constructor and
11585 destructor, initialize fields.
11586 (add_program_space): Remove.
11587 * progspace.c (add_program_space): Rename to...
11588 (program_space::program_space): ... this.
11589 (release_program_space): Rename to...
11590 (program_space::~program_space): ... this.
11591 (delete_program_space): Use delete to delete program_space.
11592 (initialize_progspace): Use new to allocate program_space.
11593 * inferior.c (add_inferior_with_spaces): Likewise.
11594 (clone_inferior_command): Likewise.
11595 * infrun.c (follow_fork_inferior): Likewise.
11596 (handle_vfork_child_exec_or_exit): Likewise.
11597
11598 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11599
11600 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11601 (delim_string_to_char_ptr_vec): Return std::vector of
11602 gdb::unique_xmalloc_ptr.
11603 (dirnames_to_char_ptr_vec_append): Take std::vector of
11604 gdb::unique_xmalloc_ptr.
11605 (dirnames_to_char_ptr_vec): Return std::vector of
11606 gdb::unique_xmalloc_ptr.
11607 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11608 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11609 (delim_string_to_char_ptr_vec): Return an std::vector of
11610 gdb::unique_xmalloc_ptr, adjust the code.
11611 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11612 gdb::unique_xmalloc_ptr, adjust the code.
11613 (dirnames_to_char_ptr_vec): Return an std::vector of
11614 gdb::unique_xmalloc_ptr, adjust the code.
11615 * auto-load.c (auto_load_safe_path_vec): Change type to
11616 std::vector of gdb::unique_xmalloc_ptr.
11617 (auto_load_expand_dir_vars): Return an std::vector of
11618 gdb::unique_xmalloc_ptr, adjust the code.
11619 (auto_load_safe_path_vec_update): Adjust.
11620 (filename_is_in_auto_load_safe_path_vec): Adjust.
11621 (auto_load_objfile_script_1): Adjust.
11622 * build-id.c (build_id_to_debug_bfd): Adjust.
11623 * linux-thread-db.c (thread_db_load_search): Adjust.
11624 * source.c (add_path): Adjust.
11625 (openp): Adjust.
11626 * symfile.c (find_separate_debug_file): Adjust.
11627 * utils.c (do_free_char_ptr_vec): Remove.
11628 (make_cleanup_free_char_ptr_vec): Remove.
11629
11630 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11631
11632 PR gdb/22907
11633 * common/pathstuff.c: Conditionally include "<windows.h>".
11634
11635 2018-03-01 Georg Sauthoff <mail@georg.so>
11636
11637 PR gdb/22888
11638 * gcore.in: Quote variables and switch interpreter to bash.
11639
11640 2018-03-01 Tom Tromey <tom@tromey.com>
11641
11642 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11643 assertion. Add assertion for discriminant_index.
11644 (quirk_rust_enum): Use correct base type name in univariant case.
11645
11646 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11647
11648 * record.c (get_call_history_modifiers): Return a
11649 record_print_flags.
11650 (cmd_record_call_history): Adjust.
11651 * record-btrace.c (record_btrace_call_history): Adjust.
11652 (record_btrace_call_history_range): Adjust.
11653 (record_btrace_call_history_from): Adjust.
11654 * target-debug.h (target_debug_print_record_print_flags): New.
11655 * target-delegates.c: Re-generate.
11656 * target.c (target_call_history): Change flags type.
11657 (target_call_history_from): Likewise.
11658 (target_call_history_range): Likewise.
11659 * target.h (struct target_ops) <target_call_history>: Likewise.
11660 (target_call_history_from): Likewise.
11661 (target_call_history_range): Likewise.
11662
11663 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11664 Simon Marchi <simon.marchi@polymtl.ca>
11665
11666 * common/common-utils.c: Include "sys/stat.h".
11667 (is_regular_file): Move here from "source.c"; change return
11668 type to "bool".
11669 * common/common-utils.h (is_regular_file): New prototype.
11670 * common/pathstuff.c (contains_dir_separator): New function.
11671 * common/pathstuff.h (contains_dir_separator): New prototype.
11672 * source.c: Don't include "sys/stat.h".
11673 (is_regular_file): Move to "common/common-utils.c".
11674
11675 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11676
11677 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11678 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11679 * auto-load.c: Include "common/pathstuff.h".
11680 * common/common-def.h (current_directory): Move here.
11681 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11682 function.
11683 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11684 prototype.
11685 * common/pathstuff.c: New file.
11686 * common/pathstuff.h: New file.
11687 * compile/compile.c: Include "common/pathstuff.h".
11688 * defs.h (current_directory): Move to "common/common-defs.h".
11689 * dwarf2read.c: Include "common/pathstuff.h".
11690 * exec.c: Likewise.
11691 * guile/scm-safe-call.c: Likewise.
11692 * linux-thread-db.c: Likewise.
11693 * main.c: Likewise.
11694 * nto-tdep.c: Likewise.
11695 * objfiles.c: Likewise.
11696 * source.c: Likewise.
11697 * symtab.c: Likewise.
11698 * utils.c: Include "common/pathstuff.h".
11699 (gdb_realpath): Move to "common/pathstuff.c".
11700 (gdb_realpath_keepfile): Likewise.
11701 (gdb_abspath): Likewise.
11702 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11703 (gdb_realpath_keepfile): Likewise.
11704 (gdb_abspath): Likewise.
11705
11706 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11707
11708 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11709 wildcard process pid for super_resume for kernels with a
11710 specific bug.
11711
11712 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11713
11714 * compile/compile.c (get_args): Add additional comments
11715 explaining function.
11716
11717 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11718 Tom Tromey <tom@tromey.com>
11719
11720 * target.h (memory_write_request_s): Remove typedef. Don't define
11721 VEC.
11722 (target_write_memory_blocks): Change argument to std::vector.
11723 (struct memory_write_request): Add constructor.
11724 * target-memory.c (compare_block_starting_address): Return bool.
11725 Change argument types.
11726 (claim_memory): Change arguments to use std::vector.
11727 (split_regular_and_flash_blocks, blocks_to_erase)
11728 (compute_garbled_blocks): Likewise.
11729 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11730 (target_write_memory_blocks): Change argument to std::vector.
11731 * symfile.c (struct load_section_data): Add constructor and
11732 destructor. Use std::vector for "requests".
11733 (struct load_progress_data): Add initializers.
11734 (load_section_callback): Update. Use "new".
11735 (clear_memory_write_data): Remove.
11736 (generic_load): Update.
11737
11738 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11739
11740 * arch/aarch64.h: Use common/tdesc.h.
11741
11742 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11743
11744 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11745 architecture with a 64-bit ABI.
11746
11747 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11748
11749 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11750 ahead of target description loading.
11751
11752 2018-02-26 Tom Tromey <tom@tromey.com>
11753
11754 * stack.c (backtrace_command_1): Update.
11755 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11756 of "flags".
11757 * python/py-framefilter.c (py_print_frame)
11758 (gdbpy_apply_frame_filter): Change type of "flags".
11759 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11760 of "flags".
11761 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11762 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11763 * extension.h (enum frame_filter_flag): Rename from
11764 frame_filter_flags.
11765 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11766 (apply_ext_lang_frame_filter): Change type of "flags".
11767 * extension.c (apply_ext_lang_frame_filter): Change type of
11768 "flags".
11769 * extension-priv.h (struct extension_language_ops)
11770 <apply_frame_filter>: Change type of "flags".
11771
11772 2018-02-26 Tom Tromey <tom@tromey.com>
11773
11774 PR python/16497:
11775 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11776 off-by-one in py_end computation.
11777 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11778 PRINT_MORE_FRAMES.
11779 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11780 constant.
11781
11782 2018-02-26 Tom Tromey <tom@tromey.com>
11783
11784 * dwarf2read.c (struct variant_field): New.
11785 (struct nextfield) <variant>: New field.
11786 (dwarf2_add_field): Handle DW_TAG_variant_part.
11787 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11788 discriminated union.
11789 (read_structure_type): Handle DW_TAG_variant_part.
11790 (handle_struct_member_die): New function, extracted from
11791 process_structure_scope. Handle DW_TAG_variant.
11792 (process_structure_scope): Handle discriminated unions. Call
11793 handle_struct_member_die.
11794
11795 2018-02-26 Tom Tromey <tom@tromey.com>
11796
11797 * rust-lang.h (rust_last_path_segment): Declare.
11798 * rust-lang.c (rust_last_path_segment): Now public. Change
11799 contract.
11800 (struct disr_info): Remove.
11801 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11802 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11803 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11804 (rust_enum_p, rust_enum_variant): New function.
11805 (rust_underscore_fields): Remove "offset" parameter.
11806 (rust_print_enum): New function.
11807 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11808 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11809 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11810 enums.
11811 (rust_internal_print_type): New function, from rust_print_type.
11812 Remove enum code.
11813 (rust_print_type): Call rust_internal_print_type.
11814 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11815 Update enum handling.
11816 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11817 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11818 (rust_union_quirks): New functions.
11819 (process_full_comp_unit, process_full_type_unit): Call
11820 rust_union_quirks.
11821 (process_structure_scope): Update rust_unions if necessary.
11822
11823 2018-02-26 Tom Tromey <tom@tromey.com>
11824
11825 * value.h (value_union_variant): Declare.
11826 * valops.c (value_union_variant): New function.
11827 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11828 (struct discriminant_info): New.
11829 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11830 enumerator.
11831 (struct main_type) <flag_discriminated_union>: New field.
11832
11833 2018-02-26 Tom Tromey <tom@tromey.com>
11834
11835 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11836 unittests/unpack-selftests.c.
11837 * unittests/unpack-selftests.c: New file.
11838 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11839
11840 2018-02-26 Yao Qi <yao.qi@linaro.org>
11841
11842 * dwarf2read.c (struct partial_die_info) <read>: New method.
11843 (read_partial_die): Remove the declaration.
11844 (load_partial_dies): Update.
11845 (partial_die_info::partial_die_info):
11846 (read_partial_die): Change it to partial_die_info::read.
11847
11848 2018-02-26 Yao Qi <yao.qi@linaro.org>
11849
11850 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11851 (fixup_partial_die): Remove declaration.
11852 (scan_partial_symbols): Update.
11853 (partial_die_parent_scope): Likewise.
11854 (partial_die_full_name): Likewise.
11855 (fixup_partial_die): Change it to partial_die_info::fixup.
11856
11857 2018-02-26 Yao Qi <yao.qi@linaro.org>
11858
11859 * dwarf2read.c (read_partial_die): Update the declaration.
11860 (load_partial_dies): Caller update.
11861 (read_partial_die): Remove one argument abbrev_len.
11862
11863 2018-02-26 Yao Qi <yao.qi@linaro.org>
11864
11865 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11866 assignment operator.
11867 (load_partial_dies): Use ctor and copy ctor.
11868 (read_partial_die): Update.
11869 (dwarf2_cu::find_partial_die): Use ctor.
11870
11871 2018-02-26 Yao Qi <yao.qi@linaro.org>
11872
11873 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11874 (find_partial_die_in_comp_unit): Change it to
11875 dwarf2_cu::find_partial_die.
11876 (find_partial_die): Update.
11877
11878 2018-02-26 Yao Qi <yao.qi@linaro.org>
11879
11880 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11881 is NULL.
11882
11883 2018-02-26 Yao Qi <yao.qi@linaro.org>
11884
11885 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11886
11887 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11888
11889 * arch/amd64.h: Use common/tdesc.h.
11890 * arch/i386.c: Likewise.
11891 * arch/i386.h: Likewise.
11892 * arch/tic6x.c: Likewise.
11893 * arch/tdesc.h: Move file from here...
11894 * common/tdesc.h: ...to here.
11895 * features/aarch64-core.c: Regenerate.
11896 * features/aarch64-fpu.c: Regenerate.
11897 * features/i386/32bit-avx.c: Regenerate.
11898 * features/i386/32bit-avx512.c: Regenerate.
11899 * features/i386/32bit-core.c: Regenerate.
11900 * features/i386/32bit-linux.c: Regenerate.
11901 * features/i386/32bit-mpx.c: Regenerate.
11902 * features/i386/32bit-pkeys.c: Regenerate.
11903 * features/i386/32bit-sse.c: Regenerate.
11904 * features/i386/64bit-avx.c: Regenerate.
11905 * features/i386/64bit-avx512.c: Regenerate.
11906 * features/i386/64bit-core.c: Regenerate.
11907 * features/i386/64bit-linux.c: Regenerate.
11908 * features/i386/64bit-mpx.c: Regenerate.
11909 * features/i386/64bit-pkeys.c: Regenerate.
11910 * features/i386/64bit-segments.c: Regenerate.
11911 * features/i386/64bit-sse.c: Regenerate.
11912 * features/i386/x32-core.c: Regenerate.
11913 * features/tic6x-c6xp.c: Regenerate.
11914 * features/tic6x-core.c: Regenerate.
11915 * features/tic6x-gp.c: Regenerate.
11916 * target-descriptions.c: Use common/tdesc.h.
11917 * target-descriptions.h: Likewise.
11918
11919 2018-02-24 Tom Tromey <tom@tromey.com>
11920
11921 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11922 (try_thread_db_load_from_dir, thread_db_load_search): Use
11923 std::string.
11924 (info_auto_load_libthread_db_compare): Return bool. Change
11925 argument types.
11926 (info_auto_load_libthread_db): Use std::vector, std::string.
11927 Remove cleanups.
11928
11929 2018-02-24 Tom Tromey <tom@tromey.com>
11930
11931 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11932 std::string.
11933 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11934 std::string*.
11935 * gdbarch.c: Rebuild.
11936 * gdbarch.h: Rebuild.
11937 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11938 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11939 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11940 std::string*.
11941
11942 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11943
11944 * gdbtypes.h (sect_offset): Change type to uint64_t.
11945 (sect_offset_str): New function.
11946 * dwarf2read.c (create_addrmap_from_aranges): Use
11947 sect_offset_str.
11948 (error_check_comp_unit_head): Likewise.
11949 (create_debug_type_hash_table): Likewise.
11950 (read_cutu_die_from_dwo): Likewise.
11951 (init_cutu_and_read_dies): Likewise.
11952 (init_cutu_and_read_dies_no_follow): Likewise.
11953 (process_psymtab_comp_unit_reader): Likewise.
11954 (partial_die_parent_scope): Likewise.
11955 (peek_die_abbrev): Likewise.
11956 (process_queue): Likewise.
11957 (dwarf2_physname): Likewise.
11958 (read_namespace_alias): Likewise.
11959 (read_import_statement): Likewise.
11960 (create_dwo_cu_reader): Likewise.
11961 (create_cus_hash_table): Likewise.
11962 (lookup_dwo_cutu): Likewise.
11963 (inherit_abstract_dies): Likewise.
11964 (read_func_scope): Likewise.
11965 (read_call_site_scope): Likewise.
11966 (dwarf2_add_member_fn): Likewise.
11967 (read_common_block): Likewise.
11968 (read_module_type): Likewise.
11969 (read_typedef): Likewise.
11970 (read_subrange_type): Likewise.
11971 (load_partial_dies): Likewise.
11972 (read_partial_die): Likewise.
11973 (find_partial_die): Likewise.
11974 (read_str_index): Likewise.
11975 (dwarf2_string_attr): Likewise.
11976 (build_error_marker_type): Likewise.
11977 (lookup_die_type): Likewise.
11978 (dump_die_shallow): Likewise.
11979 (follow_die_ref): Likewise.
11980 (dwarf2_fetch_die_loc_sect_off): Likewise.
11981 (dwarf2_fetch_constant_bytes): Likewise.
11982 (follow_die_sig): Likewise.
11983 (get_signatured_type): Likewise.
11984 (get_DW_AT_signature_type): Likewise.
11985 (dwarf2_find_containing_comp_unit): Likewise.
11986 (set_die_type): Likewise.
11987
11988 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11989
11990 * arch/aarch64.c: Include "common-defs.h".
11991 * arch/amd64.c: Likewise.
11992 * arch/i386.c: Likewise.
11993
11994 2018-02-21 Tom Tromey <tom@tromey.com>
11995
11996 * value.h: (extract_field_op): Update.
11997 * eval.c (extract_field_op): Return a const char *.
11998 * expression.h (parse_expression_for_completion): Update.
11999 * completer.c (complete_expression): Update.
12000 (add_struct_fields): Make fieldname const.
12001 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12002 (mark_completion_tag, parse_exp_in_context_1): Update.
12003 (parse_expression_for_completion): Change "name" to
12004 unique_xmalloc_ptr*.
12005
12006 2018-02-21 Tom Tromey <tom@tromey.com>
12007
12008 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12009
12010 2018-02-21 Yao Qi <yao.qi@linaro.org>
12011
12012 * avr-tdep.c (avr_read_pc): Change parameter type to
12013 readable_regcache.
12014 * gdbarch.sh (read_pc): Likewise.
12015 * gdbarch.c: Re-generated.
12016 * gdbarch.h: Re-generated.
12017 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12018 readable_regcache.
12019 * ia64-tdep.c (ia64_read_pc): Likewise.
12020 * mips-tdep.c (mips_read_pc): Likewise.
12021 * spu-tdep.c (spu_read_pc): Likewise.
12022
12023 2018-02-21 Yao Qi <yao.qi@linaro.org>
12024
12025 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12026 * regcache-dump.c: New file.
12027 * regcache.c: Move register_dump to regcache-dump.c.
12028 (maintenance_print_registers): Likewise.
12029 (maintenance_print_raw_registers): Likewise.
12030 (maintenance_print_cooked_registers): Likewise.
12031 (maintenance_print_register_groups): Likewise.
12032 (maintenance_print_remote_registers): Likewise.
12033 (_initialize_regcache): Likewise.
12034 * regcache.h (register_dump): Moved from regcache.c.
12035
12036 2018-02-21 Yao Qi <yao.qi@linaro.org>
12037
12038 * regcache.c (regcache::regcache): Update.
12039 (regcache::invalidate): Move it to detached_regcache::invalidate.
12040 (get_thread_arch_aspace_regcache): Update.
12041 (regcache::raw_update): Update.
12042 (regcache::cooked_read): Remove some code.
12043 (regcache::cooked_read_value): Likewise.
12044 (regcache::raw_write): Remove assert on m_readonly_p.
12045 (regcache::raw_supply_integer): Move it to
12046 detached_regcache::raw_supply_integer.
12047 (regcache::raw_supply_zeroed): Likewise.
12048 * regcache.h (detached_regcache) <raw_supply_integer>: New
12049 declaration.
12050 <raw_supply_zeroed, invalidate>: Likewise.
12051 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12052 <invalidate>: Likewise.
12053 <m_readonly_p>: Removed.
12054
12055 2018-02-21 Yao Qi <yao.qi@linaro.org>
12056
12057 * infcmd.c (get_return_value): Let stop_regs point to
12058 get_current_regcache.
12059 * regcache.c (regcache::regcache): Remove.
12060 (register_dump_reg_buffer): New class.
12061 (regcache_print): Adjust.
12062 * regcache.h (regcache): Remove constructors.
12063
12064 2018-02-21 Yao Qi <yao.qi@linaro.org>
12065
12066 * regcache.c (class register_dump): New class.
12067 (register_dump_regcache, register_dump_none): New class.
12068 (register_dump_remote, register_dump_groups): New class.
12069 (regcache_print): Update.
12070 * regcache.h (regcache_dump_what): Move it to regcache.c.
12071 (regcache) <dump>: Remove.
12072
12073 2018-02-21 Yao Qi <yao.qi@linaro.org>
12074
12075 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12076 reg_buffer_rw *.
12077 (jit_unwind_reg_set_impl): Call raw_supply.
12078 (jit_frame_sniffer): Use reg_buffer_rw.
12079 * record-full.c (record_full_core_regbuf): Change its type.
12080 (record_full_core_open_1): Use reg_buffer_rw.
12081 (record_full_close): Likewise.
12082 (record_full_core_fetch_registers): Use regcache->raw_supply.
12083 (record_full_core_store_registers): Likewise.
12084 * regcache.c (regcache::get_register_status): Move it to
12085 reg_buffer.
12086 (regcache_raw_set_cached_value): Remove.
12087 (regcache::raw_set_cached_value): Remove.
12088 (regcache::raw_write): Call raw_supply.
12089 (regcache::raw_supply): Move it to reg_buffer_rw.
12090 * regcache.h (regcache_raw_set_cached_value): Remove.
12091 (reg_buffer_rw): New class.
12092
12093 2018-02-21 Yao Qi <yao.qi@linaro.org>
12094
12095 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12096 readonly_detached_regcache.
12097 (dummy_frame_prev_register): Use regcache->cooked_read.
12098 * frame.c (frame_save_as_regcache): Change return type.
12099 (frame_pop): Update.
12100 * frame.h (frame_save_as_regcache): Update declaration.
12101 * inferior.h (get_infcall_suspend_state_regcache): Update
12102 declaration.
12103 * infrun.c (infcall_suspend_state) <registers>: use
12104 readonly_detached_regcache.
12105 (save_infcall_suspend_state): Don't use regcache_dup.
12106 (get_infcall_suspend_state_regcache): Change return type.
12107 * linux-fork.c (struct fork_info) <savedregs>: Change to
12108 readonly_detached_regcache.
12109 <pc>: New field.
12110 (fork_save_infrun_state): Don't use regcache_dup.
12111 (info_checkpoints_command): Adjust.
12112 * mi/mi-main.c (register_changed_p): Update declaration.
12113 (mi_cmd_data_list_changed_registers): Use
12114 readonly_detached_regcache.
12115 (register_changed_p): Change parameter type to
12116 readonly_detached_regcache.
12117 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12118 readonly_detached_regcache.
12119 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12120 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12121 New.
12122 (regcache::save): Move it to reg_buffer.
12123 (regcache::restore): Change parameter type.
12124 (regcache_dup): Remove.
12125 * regcache.h (reg_buffer) <save>: New method.
12126 (readonly_detached_regcache): New class.
12127 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12128 readonly_detached_regcache.
12129 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12130
12131 2018-02-21 Yao Qi <yao.qi@linaro.org>
12132
12133 * frame.c (frame_save_as_regcache): Use regcache method save.
12134 (frame_pop): Use regcache method restore.
12135 * infrun.c (restore_infcall_suspend_state): Likewise.
12136 * linux-fork.c (fork_load_infrun_state): Likewise.
12137 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12138 save.
12139 * regcache.c (regcache_save): Remove.
12140 (regcache::restore): More asserts.
12141 (regcache_cpy): Remove.
12142 * regcache.h (regcache_save): Remove the declaration.
12143 (regcache::restore): Move from private to public.
12144 Remove the friend declaration of regcache_cpy.
12145 (regcache_cpy): Remove declaration.
12146
12147 2018-02-21 Yao Qi <yao.qi@linaro.org>
12148
12149 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12150 parameter type to 'readable_regcache *'.
12151 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12152 * arm-tdep.c (arm_neon_quad_read): Likewise.
12153 (arm_pseudo_read): Likewise.
12154 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12155 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12156 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12157 * gdbarch.c: Re-generated.
12158 * gdbarch.h: Re-generated.
12159 * gdbarch.sh (pseudo_register_read): Change parameter type to
12160 'readable_regcache *'.
12161 (pseudo_register_read_value): Likewise.
12162 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12163 (h8300_pseudo_register_read): Likewise.
12164 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12165 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12166 (i386_pseudo_register_read_into_value): Likewise.
12167 (i386_pseudo_register_read_value): Likewise.
12168 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12169 declaration.
12170 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12171 * m32c-tdep.c (m32c_raw_read): Likewise.
12172 (m32c_read_flg): Likewise.
12173 (m32c_banked_register): Likewise.
12174 (m32c_banked_read): Likewise.
12175 (m32c_sb_read): Likewise.
12176 (m32c_part_read): Likewise.
12177 (m32c_cat_read): Likewise.
12178 (m32c_r3r2r1r0_read): Likewise.
12179 (m32c_pseudo_register_read): Likewise.
12180 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12181 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12182 (mep_pseudo_cr64_read): Likewise.
12183 (mep_pseudo_register_read): Likewise.
12184 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12185 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12186 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12187 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12188 (regcache::cooked_read): Likewise.
12189 (regcache::cooked_read_value): Likewise.
12190 (regcache_cooked_read_signed):
12191 (regcache::cooked_read): Likewise.
12192 * regcache.h (readable_regcache): New class.
12193 (regcache): Inherit readable_regcache. Move some methods to
12194 readable_regcache.
12195 * rl78-tdep.c (rl78_pseudo_register_read): Change
12196 parameter type to 'readable_regcache *'.
12197 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12198 (e500_pseudo_register_read): Change parameter type to
12199 'readable_regcache *'.
12200 (dfp_pseudo_register_read): Likewise.
12201 (vsx_pseudo_register_read): Likewise.
12202 (efpr_pseudo_register_read): Likewise.
12203 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12204 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12205 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12206 (sh64_pseudo_register_read): Likewise.
12207 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12208 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12209 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12210 (spu_pseudo_register_read): Likewise.
12211 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12212 (xtensa_pseudo_register_read): Likewise.
12213
12214 2018-02-21 Yao Qi <yao.qi@linaro.org>
12215
12216 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12217 (regcache::arch): Move it to reg_buffer::arch.
12218 (regcache::register_buffer): Likewise.
12219 (regcache::assert_regnum): Likewise.
12220 (regcache::num_raw_registers): Likewise.
12221 * regcache.h (reg_buffer): New class.
12222 (regcache): Inherit reg_buffer.
12223
12224 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12225
12226 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12227 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12228
12229 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12230
12231 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12232
12233 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12234
12235 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12236 (SFILES): Remove common/*.c files.
12237 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12238 * common/common.host: Add common reference.
12239 * configure.ac: Likewise.
12240 * configure: Regenerate.
12241
12242 2018-02-16 Yao Qi <yao.qi@linaro.org>
12243
12244 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12245 (block_initialize_namespace): Use new.
12246 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12247 (dwarf2_free_objfile): Use delete.
12248 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12249 (copy_type_recursive): Use new.
12250 * gdb_obstack.h (allocate_on_obstack): New.
12251
12252 2018-02-15 Yao Qi <yao.qi@linaro.org>
12253
12254 PR gdb/22849
12255 * inferior.c (exit_inferior_1): Reset inf->control.
12256
12257 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12258
12259 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12260 declaration.
12261
12262 2018-02-14 Pedro Alves <palves@redhat.com>
12263
12264 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12265 frame_cleanup_after_sniffer on exception.
12266
12267 2018-02-14 Tom Tromey <tom@tromey.com>
12268
12269 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12270 const.
12271 (solib_bfd_open): Make pathname const.
12272 * solib.c (solib_bfd_open): Make pathname const.
12273 * solib-spu.c (spu_bfd_fopen): Make name const.
12274 (spu_bfd_open): Make pathname const.
12275 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12276 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12277
12278 2018-02-14 Tom Tromey <tom@tromey.com>
12279
12280 * symfile.c (symfile_bfd_open): Update.
12281 * source.h (openp, source_full_path_of, find_and_open_source):
12282 Change argument type to unique_xmalloc_ptr.
12283 * source.c (openp): Take a unique_xmalloc_ptr.
12284 (source_full_path_of, find_and_open_source): Likewise.
12285 (open_source_file, symtab_to_fullname): Update.
12286 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12287 unique_xmalloc_ptr.
12288 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12289 (exec_file_find): Update.
12290 * psymtab.c (psymtab_to_fullname): Update.
12291 * nto-tdep.h (nto_find_and_open_solib): Update.
12292 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12293 unique_xmalloc_ptr.
12294 * exec.c (exec_file_attach): Update.
12295 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12296 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12297
12298 2018-02-14 Tom Tromey <tom@tromey.com>
12299
12300 * solib.c: Include source.h.
12301 * nto-tdep.c: Include source.h.
12302 * mi/mi-cmd-env.c: Include source.h.
12303 * infcmd.c: Include source.h.
12304 * exec.c: Include source.h.
12305 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12306 (add_path, directory_switch, source_path, init_source_path): Move
12307 declarations...
12308 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12309 (add_path, directory_switch, source_path, init_source_path):
12310 ...here.
12311
12312 2018-02-14 Tom Tromey <tom@tromey.com>
12313
12314 * solist.h (exec_file_find, solib_find): Return
12315 unique_xmalloc_ptr.
12316 (solib_bfd_fopen): Take a const char *.
12317 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12318 (exec_file_find, solib_find): Likewise.
12319 (solib_bfd_fopen): Do not take ownership of "pathname".
12320 (solib_bfd_open): Use unique_xmalloc_ptr.
12321 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12322 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12323 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12324 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12325
12326 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12327
12328 * ada-lang.c (name_match_type_from_name): Remove reference to
12329 ada_name_for_lookup in function's documentation.
12330 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12331
12332 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12333
12334 * defs.h (enum openp_flags): New enum.
12335 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12336 Move to enum openp_flags.
12337 (openp_flags): New enum flags.
12338 (openp): Change parameter type to openp_flags.
12339 * source.c (openp): Change parameter type to openp_flags.
12340 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12341 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12342
12343 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12344
12345 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12346 per-command.
12347
12348 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12349
12350 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12351 into...
12352 (class dwarf2_queue_guard): ...the destructor of this new class.
12353 (dw2_do_instantiate_symtab): Create instance of the new class
12354 dwarf2_queue_guard, remove cleanup.
12355
12356 2018-02-09 Tom Tromey <tom@tromey.com>
12357
12358 * source.c (find_source_lines): Don't reference past the end of
12359 the vector.
12360
12361 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12362
12363 * remote.c (remote_btrace_maybe_reopen): Change error message.
12364 * btrace.c (btrace_enable): Likewise.
12365 (parse_xml_btrace): Likewise.
12366 (parse_xml_btrace_conf): Likewise.
12367
12368 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12369
12370 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12371 (linux_enable_pt, linux_enable_bts): Call
12372 diagnose_perf_event_open_fail.
12373
12374 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12375
12376 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12377 Remove parameter and change return type. Update callers. Move it.
12378 (linux_enable_bts, linux_enable_pt): Improve error message.
12379 (linux_enable_pt): Remove zero buffer size check.
12380 (linux_enable_btrace): Improve error messages. Remove NULL return
12381 check.
12382
12383 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12384
12385 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12386 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12387 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12388 (linux_supports_pt, linux_supports_btrace): Remove.
12389 (linux_enable_bts): Call cpu_supports_bts.
12390 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12391 * remote.c (remote_supports_btrace): Remove.
12392 (init_remote_ops): Remove remote_supports_btrace.
12393 * target-delegates.c: Regenerated.
12394 * target.c (target_supports_btrace): Remove.
12395 * target.h (target_ops) <to_supports_btrace>: Remove
12396 (target_supports_btrace): Remove.
12397 * x86-linux-nat.c (x86_linux_create_target): Remove
12398 linux_supports_btrace.
12399
12400 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12401
12402 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12403 btrace failed.
12404 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12405 exception and use message in own exception.
12406
12407 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12408
12409 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12410 (perf_event_pt_event_type): Use gdb_file_up.
12411 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12412 scoped_fd, and scoped_mmap.
12413
12414 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12415
12416 * common/scoped_mmap.h: New.
12417 * unittests/scoped_mmap-selftest.c: New.
12418 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12419 unittests/scoped_mmap-selftest.c.
12420
12421 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12422
12423 * common/scoped_fd.h: New.
12424 * unittests/scoped_fd-selftest.c: New.
12425 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12426 unittests/scoped_fd-selftest.c.
12427
12428 2018-02-09 Tom Tromey <tom@tromey.com>
12429
12430 * auto-load.c (auto_load_section_scripts): Use
12431 gdb::unique_xmalloc_ptr.
12432
12433 2018-02-09 Tom Tromey <tom@tromey.com>
12434
12435 * auto-load.c (execute_script_contents): Use std::string.
12436
12437 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12438
12439 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12440 Python function, rather than a new command.
12441
12442 2018-02-08 Tom Tromey <tom@tromey.com>
12443
12444 * solib.c (solib_find_1): Use std::string.
12445 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12446
12447 2018-02-08 Tom Tromey <tom@tromey.com>
12448
12449 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12450
12451 2018-02-08 Tom Tromey <tom@tromey.com>
12452
12453 * source.c (find_source_lines): Use gdb::def_vector.
12454
12455 2018-02-08 Tom Tromey <tom@tromey.com>
12456
12457 * macrocmd.c (struct temporary_macro_definition): New.
12458 (macro_define_command): Use temporary_macro_definition. Remove
12459 cleanups.
12460 (free_macro_definition_ptr): Remove.
12461
12462 2018-02-08 Tom Tromey <tom@tromey.com>
12463
12464 * macroexp.c (maybe_expand): Use std::string.
12465
12466 2018-02-08 Tom Tromey <tom@tromey.com>
12467
12468 * macroexp.c (struct macro_buffer): Add initializers for some
12469 members.
12470 (init_buffer, init_shared_buffer, free_buffer)
12471 (free_buffer_return_text): Remove.
12472 (macro_buffer): New constructors.
12473 (~macro_buffer): New destructor.
12474 (macro_buffer::set_shared): New method.
12475 (macro_buffer::resize_buffer, macro_buffer::appendc)
12476 (macro_buffer::appendmem): Now methods, not free functions.
12477 (set_token, append_tokens_without_splicing, stringify)
12478 (macro_stringify): Update.
12479 (gather_arguments): Change return type. Remove argc_p argument,
12480 add args_ptr argument. Use std::vector.
12481 (substitute_args): Remove argc argument. Accept std::vector.
12482 (expand): Update. Use std::vector.
12483 (scan, macro_expand, macro_expand_next): Update.
12484
12485 2018-02-08 Tom Tromey <tom@tromey.com>
12486
12487 * symtab.c (default_collect_symbol_completion_matches_break_on):
12488 Use unique_xmalloc_ptr.
12489 * macroscope.h: (sal_macro_scope, user_macro_scope)
12490 (default_macro_scope): Return unique_xmalloc_ptr.
12491 * macroscope.c (sal_macro_scope, user_macro_scope)
12492 (default_macro_scope): Return unique_xmalloc_ptr.
12493 * macroexp.h (macro_expand, macro_expand_once): Return
12494 unique_xmalloc_ptr.
12495 * macroexp.c (macro_expand, macro_expand_once): Return
12496 unique_xmalloc_ptr.
12497 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12498 (info_macro_command, info_macros_command): Use
12499 unique_xmalloc_ptr.
12500 * compile/compile-c-support.c (write_macro_definitions): Use
12501 unique_xmalloc_ptr.
12502 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12503
12504 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12505
12506 * value.c (value_static_field): Assign field type instead of
12507 containing type when returning an optimized out value.
12508
12509 2018-02-06 Yao Qi <yao.qi@linaro.org>
12510
12511 * ft32-tdep.c (ft32_read_pc): Remove.
12512 (ft32_write_pc): Remove.
12513 (ft32_gdbarch_init): Update.
12514 * m32r-tdep.c (m32r_read_pc): Remove.
12515 (m32r_gdbarch_init): Update.
12516 * mep-tdep.c (mep_read_pc): Remove.
12517 (mep_gdbarch_init): Update.
12518 * microblaze-tdep.c (microblaze_write_pc): Remove.
12519 (microblaze_gdbarch_init): Update.
12520 * mn10300-tdep.c (mn10300_read_pc): Remove.
12521 (mn10300_write_pc): Remove.
12522 (mn10300_gdbarch_init): Update.
12523 * moxie-tdep.c (moxie_read_pc): Remove.
12524 (moxie_write_pc): Remove.
12525 (moxie_gdbarch_init): Update.
12526
12527 2018-02-06 Yao Qi <yao.qi@linaro.org>
12528
12529 * expprint.c (print_subexp_standard): Handle
12530 OP_F77_UNDETERMINED_ARGLIST.
12531 (dump_subexp_body_standard): Likewise.
12532
12533 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12534
12535 * target-descriptions.c (tdesc_element_visitor) Add empty
12536 implementations.
12537 (tdesc_type): Move make_gdb_type from here.
12538 (tdesc_type_builtin): Likewise.
12539 (tdesc_type_vector): Likewise.
12540 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12541 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12542 (make_gdb_type_union): Likewise.
12543 (make_gdb_type_flags): Likewise.
12544 (make_gdb_type_enum): Likewise.
12545 (make_gdb_type): New function.
12546 (tdesc_register_type): Use static make_gdb_type.
12547
12548 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12549
12550 * infcmd.c (default_print_one_register_info): Align natural-format
12551 column values consistently one under another.
12552 (pad_to_column): New function.
12553
12554 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12555
12556 * dwarf2read.c (dwarf2_physname): Move commment.
12557
12558 2018-02-01 Leszek Swirski <leszeks@google.com>
12559
12560 * varobj.c (varobj_formatted_print_options): Allow recursive
12561 pretty printing if pretty printing is enabled.
12562
12563 2018-02-01 Leszek Swirski <leszeks@google.com>
12564
12565 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12566 names after a structop as a filename.
12567
12568 2018-02-01 Yao Qi <yao.qi@linaro.org>
12569
12570 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12571 (arm_record_coproc_data_proc): Likewise.
12572
12573 2018-02-01 Yao Qi <yao.qi@linaro.org>
12574
12575 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12576
12577 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12578
12579 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12580 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12581
12582 2018-01-31 Pedro Alves <palves@redhat.com>
12583
12584 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12585 * inflow.c (child_terminal_save_inferior): Wrap reference to
12586 tcgetpgrp in HAVE_TERMIOS_H.
12587 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12588 _WIN32.
12589 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12590 always iterate over all inferiors.
12591 (gdbsim_cntrl_c): Adjust.
12592 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12593
12594 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12595
12596 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12597 index type is objfile-owned if the element type is as well.
12598
12599 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12600
12601 GDB 8.1 released.
12602
12603 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12604
12605 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12606 "features/s390x-linux64.c".
12607 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12608 s390_linux32 and s390x_linux64.
12609 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12610 default tdesc.
12611 * s390-tdep.c: Include "features/s390-linux32.c" and
12612 "features/s390x-linux64.c".
12613 (s390_tdesc_valid): Add check for tdesc_has_registers.
12614 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12615 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12616 tdesc_s390x_linux64.
12617 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12618 tdesc_s390x_linux64 to...
12619 * s390-tdep.h: ...here.
12620
12621 2018-01-30 Pedro Alves <palves@redhat.com>
12622
12623 PR gdb/13211
12624 * config.in, configure: Regenerate.
12625 * configure.ac: Check for getpgid.
12626 * go32-nat.c (go32_pass_ctrlc): New.
12627 (go32_target): Install it.
12628 * inf-child.c (inf_child_target): Install
12629 child_terminal_save_inferior, child_pass_ctrlc and
12630 child_interrupt.
12631 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12632 (inf_ptrace_target): No longer install it.
12633 * infcmd.c (interrupt_target_1): Adjust.
12634 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12635 (child_interrupt): Declare.
12636 (inferior::terminal_state): New.
12637 * inflow.c (struct terminal_info): Update comments.
12638 (inferior_process_group): Delete.
12639 (terminal_is_ours): Delete.
12640 (gdb_tty_state): New.
12641 (child_terminal_init): Adjust.
12642 (is_gdb_terminal, sharing_input_terminal_1)
12643 (sharing_input_terminal): New functions.
12644 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12645 Set the process's actual process group in the foreground if
12646 possible. Handle is_ours_for_output/is_ours distinction. Don't
12647 mark terminal as the inferior's if not sharing GDB's terminal.
12648 Don't check attach_flag.
12649 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12650 pass down a target_terminal_state.
12651 (child_terminal_save_inferior): New, factored out from ...
12652 (child_terminal_ours_1): ... this. Handle
12653 target_terminal_state::is_ours_for_output.
12654 (child_interrupt, child_pass_ctrlc): New.
12655 (inflow_inferior_exit): Clear the inferior's terminal_state.
12656 (copy_terminal_info): Copy the inferior's terminal state.
12657 (_initialize_inflow): Remove reference to terminal_is_ours.
12658 * inflow.h (inferior_process_group): Delete.
12659 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12660 * procfs.c (procfs_target): Don't install procfs_interrupt.
12661 (procfs_interrupt): Delete.
12662 * remote.c (remote_serial_quit_handler): Adjust.
12663 (remote_interrupt): Remove ptid parameter. Adjust.
12664 * target-delegates.c: Regenerate.
12665 * target.c: Include "terminal.h".
12666 (target_terminal::terminal_state): Rename to ...
12667 (target_terminal::m_terminal_state): ... this.
12668 (target_terminal::init): Adjust.
12669 (target_terminal::inferior): Adjust to per-inferior
12670 terminal_state.
12671 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12672 (target_terminal::ours, target_terminal::ours_for_output): Use
12673 target_terminal_is_ours_kind.
12674 (target_interrupt): Remove ptid parameter. Adjust.
12675 (default_target_pass_ctrlc): Adjust.
12676 * target.h (target_ops::to_terminal_save_inferior): New field.
12677 (target_ops::to_interrupt): Remove ptid_t parameter.
12678 (target_interrupt): Remove ptid_t parameter. Update comment.
12679 (target_pass_ctrlc): Update comment.
12680 * target/target.h (target_terminal_state): New scoped enum,
12681 factored out of ...
12682 (target_terminal::terminal_state): ... here.
12683 (target_terminal::inferior): Update comments.
12684 (target_terminal::restore_inferior): New.
12685 (target_terminal::is_inferior, target_terminal::is_ours)
12686 (target_terminal::is_ours_for_output): Adjust.
12687 (target_terminal::scoped_restore_terminal_state): Adjust to
12688 rename, and call restore_inferior() instead of inferior().
12689 (target_terminal::scoped_restore_terminal_state::m_state): Change
12690 type.
12691 (target_terminal::terminal_state): Rename to ...
12692 (target_terminal::m_terminal_state): ... this and change type.
12693
12694 2018-01-30 Pedro Alves <palves@redhat.com>
12695
12696 * linux-nat.c (wait_for_signal): New function.
12697 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12698 directly.
12699 (async_terminal_is_ours)
12700 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12701 (linux_nat_add_target): Don't override
12702 to_terminal_inferior/to_terminal_ours.
12703
12704 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12705
12706 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12707
12708 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12709
12710 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12711 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12712 dwarf2_per_objfile_free here.
12713 (dwarf2_per_objfile_free): Remove.
12714 (_initialize_dwarf2_read): Don't register
12715 dwarf2_per_objfile_free as a registry cleanup.
12716
12717 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12718
12719 Avoid compilation errors in MinGW native builds
12720
12721 The error is triggered by including python-internal.h, and the
12722 error message is:
12723
12724 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12725 from build-gnulib/import/math.h:27,
12726 from d:/usr/Python26/include/pyport.h:235,
12727 from d:/usr/Python26/include/Python.h:58,
12728 from python/python-internal.h:94,
12729 from python/py-arch.c:24:
12730 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12731 using ::hypot;
12732 ^~~~~
12733
12734 This happens because Python headers define 'hypot' to expand t
12735 '_hypot' in the Windows builds.
12736 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12737 'hypoth'. This avoids a compilation error.
12738
12739 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12740
12741 * MAINTAINERS (Write After Approval): Fix ordering.
12742
12743 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12744
12745 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12746
12747 2018-01-26 Alan Modra <amodra@gmail.com>
12748
12749 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12750 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12751 Remove nop. Make const. Comment.
12752 (powerpc32_plt_stub_so_2): New.
12753 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12754 Correct count. Update uses.
12755 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12756 Move common code reading PLT entry word. Correct
12757 powerpc32_plt_stub PLT address calculation.
12758 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12759 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12760 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12761 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12762 (ppc64_standard_linkage8): Likewise.
12763 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12764 Correct insns description.
12765 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12766
12767 2018-01-24 Pedro Alves <palves@redhat.com>
12768
12769 GCC PR libstdc++/83906
12770 * gdbtypes.c (operator==(const dynamic_prop &,
12771 const dynamic_prop &)): New.
12772 (operator==(const range_bounds &, const range_bounds &)): New.
12773 (check_types_equal): Use them instead of memcmp.
12774 * gdbtypes.h (operator==(const dynamic_prop &,
12775 const dynamic_prop &)): Declare.
12776 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12777 (operator==(const range_bounds &, const range_bounds &)): Declare.
12778 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12779
12780 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12781
12782 * s390-linux-tdep.c (s390_record_address_mask)
12783 (s390_record_calc_disp_common, s390_record_calc_disp)
12784 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12785 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12786 (s390_process_record): Move to s390-tdep.c.
12787 (s390_linux_init_abi_any): Adjust.
12788 * s390-tdep.c (s390_record_address_mask)
12789 (s390_record_calc_disp_common, s390_record_calc_disp)
12790 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12791 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12792 (s390_process_record): Moved from s390-linux-tdep.c
12793 (s390_gdbarch_init): Adjust.
12794
12795 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12796
12797 * s390-linux-nat.c (s390-tdep.h): New include.
12798 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12799 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12800 (ALLDEPFILES): Add s390-tdep.c.
12801 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12802 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12803 * s390-tdep.h: ...this. New file.
12804 * s390-linux-tdep.c (s390-tdep.h): New include.
12805 (_initialize_s390_tdep): Rename to...
12806 (_initialize_s390_linux_tdep): ...this and adjust.
12807 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12808 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12809 s390-tdep.h.
12810 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12811 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12812 (s390_is_partial_instruction, s390_software_single_step)
12813 (is_non_branch_ril, s390_displaced_step_copy_insn)
12814 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12815 (s390_prologue_data, s390_addr, s390_store, s390_load)
12816 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12817 (s390_register_call_saved, s390_guess_tracepoint_registers)
12818 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12819 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12820 (s390_pseudo_register_name, s390_pseudo_register_type)
12821 (s390_pseudo_register_read, s390_pseudo_register_write)
12822 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12823 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12824 (s390_addr_bits_remove, s390_address_class_type_flags)
12825 (s390_address_class_type_flags_to_name)
12826 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12827 (s390_function_arg_float, s390_function_arg_vector)
12828 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12829 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12830 (s390_frame_align, s390_register_return_value, s390_return_value)
12831 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12832 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12833 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12834 (s390_trad_frame_prev_register, s390_unwind_cache)
12835 (s390_prologue_frame_unwind_cache)
12836 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12837 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12838 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12839 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12840 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12841 (s390_frame_base_address, s390_local_base_address)
12842 (s390_frame_base, s390_gcc_target_options)
12843 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12844 (s390_validate_reg_range, s390_tdesc_valid)
12845 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12846 * s390-tdep.c: ...this. New file.
12847
12848 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12849
12850 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12851 (s390_process_record, s390_gdbarch_tdep_alloc)
12852 (s390_linux_init_abi_any): Use/set new hook.
12853
12854 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12855
12856 * s390-linux-tdep.c (osabi.h): New include.
12857 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12858 (s390_linux_init_abi_any): New functions.
12859 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12860
12861 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12862
12863 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12864 tdesc_has_registers check
12865
12866 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12867
12868 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12869 (s390_validate_reg_range): New macro.
12870 (s390_gdbarch_init): Adjust.
12871
12872 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12873
12874 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12875 (s390_gdbarch_tdep_alloc): Adjust.
12876 (s390_gdbarch_init): Adjust.
12877
12878 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12879
12880 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12881 <have_tdb>: Change type to bool.
12882 (s390_gdbarch_tdep_alloc): Adjust.
12883 (s390_gdbarch_init): Adjust.
12884
12885 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12886
12887 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12888 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12889 (s390_gdbarch_tdep_alloc): New function.
12890 (s390_gdbarch_init): Allocate tdep at start and use its fields
12891 instead of separate variables.
12892
12893 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12894
12895 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12896 when looking for cached gdbarch and add comment for remaining.
12897
12898 2018-01-22 Pedro Alves <palves@redhat.com>
12899 Sergio Durigan Junior <sergiodj@redhat.com>
12900
12901 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12902 case.
12903
12904 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12905
12906 * MAINTAINERS: Update my company e-mail address.
12907
12908 2018-01-22 Yao Qi <yao.qi@linaro.org>
12909
12910 * regcache.c (cooked_write_test): New function.
12911 (_initialize_regcache): Register the test.
12912
12913 2018-01-22 Yao Qi <yao.qi@linaro.org>
12914
12915 * ia64-tdep.c (ia64_pseudo_register_read): Call
12916 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12917 * m32c-tdep.c (m32c_cat_read): Likewise.
12918 (m32c_r3r2r1r0_read): Likewise.
12919 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12920 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12921
12922 2018-01-22 Yao Qi <yao.qi@linaro.org>
12923
12924 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12925 method raw_read instead of regcache_raw_read.
12926 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12927 * arm-tdep.c (arm_neon_quad_read): Likewise.
12928 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12929 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12930 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12931 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12932 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12933 (i386_pseudo_register_read_into_value): Likewise.
12934 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12935 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12936 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12937 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12938 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12939 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12940 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12941 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12942 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12943
12944 2018-01-22 Yao Qi <yao.qi@linaro.org>
12945
12946 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12947 * configure.tgt: Remove target mt.
12948 * mt-tdep.c: Remove.
12949 * regcache.c (cooked_read_test): Remove the check for mt.
12950
12951 2018-01-22 Yao Qi <yao.qi@linaro.org>
12952
12953 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12954 instead of gdbarch_pseudo_register_read_value.
12955
12956 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12957
12958 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12959 language is Ada.
12960
12961 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12962
12963 * linespec.c (create_sals_line_offset): Remove code that preserved
12964 the symtab_and_line's line number.
12965
12966 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12967
12968 * varobj.c (varobj_create): Don't set valid_block when creating a
12969 floating varobj.
12970
12971 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12972
12973 * varobj.c (varobj_create): Remove out of date comment.
12974
12975 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12976
12977 PR mi/20395
12978 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12979 updating innermost block.
12980 * parse.c (innermost_block_tracker::update): Take extra type
12981 parameter, and check types match before updating innermost block.
12982 (write_dollar_variable): Update innermost block for registers.
12983 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12984 (innermost_block_tracker::innermost_block_tracker): Initialise
12985 m_types member.
12986 (innermost_block_tracker::reset): Take type parameter.
12987 (innermost_block_tracker::update): Take type parameter, and pass
12988 type through as needed.
12989 (innermost_block_tracker::m_types): New member.
12990 * varobj.c (varobj_create): Pass type when reseting innermost
12991 block.
12992
12993 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12994
12995 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12996 * ada-lang.c (resolve_subexp): Likewise.
12997 * breakpoint.c (set_breakpoint_condition) Likewise.
12998 (watch_command_1) Likewise.
12999 * c-exp.y (variable): Likewise.
13000 * d-exp.y (PrimaryExpression): Likewise.
13001 * f-exp.y (variable): Likewise.
13002 * go-exp.y (variable): Likewise.
13003 * m2-exp.y (variable): Likewise.
13004 * objfiles.c (objfile::~objfile): Likewise.
13005 * p-exp.y (variable): Likewise.
13006 * parse.c (innermost_block): Change type.
13007 * parser-defs.h (class innermost_block_tracker): New.
13008 (innermost_block): Change to innermost_block_tracker.
13009 * printcmd.c (display_command): Switch to innermost_block API.
13010 (do_one_display): Likewise.
13011 * rust-exp.y (do_one_display): Likewise.
13012 * symfile.c (clear_symtab_users): Likewise.
13013 * varobj.c (varobj_create): Switch to innermost_block API, replace
13014 use of innermost_block with block stored on varobj object.
13015
13016 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13017
13018 * expression.h (innermost_block): Remove declaration.
13019 * varobj.c: Add 'parser-defs.h' include.
13020
13021 2018-01-19 Tom Tromey <tom@tromey.com>
13022
13023 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13024 symbols in the static and global blocks.
13025
13026 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13027
13028 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13029 gdb_ptrace.h, and move including gdb_wait.h ...
13030 * nat/linux-ptrace.h: ... to here.
13031
13032 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13033
13034 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13035 inf_ptrace_detach_success.
13036 (inf_ptrace_detach_success): Add inferior parameter, use it
13037 instead of inferior_ptid, pass it to detach_inferior.
13038 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13039 parameter.
13040 * inferior.c (detach_inferior): Add overload that takes an
13041 inferior object.
13042 * inferior.h (detach_inferior): Likewise.
13043 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13044 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13045 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13046
13047 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13048
13049 * target.h (struct target_ops) <to_detach>: Add inferior
13050 parameter.
13051 (target_detach): Likewise.
13052 * target.c (dispose_inferior): Pass inferior down.
13053 (target_detach): Pass inferior down. Assert that it is equal to
13054 the current inferior.
13055 * aix-thread.c (aix_thread_detach): Pass inferior down.
13056 * corefile.c (core_file_command): Pass current_inferior() down.
13057 * corelow.c (core_detach): Add inferior parameter.
13058 * darwin-nat.c (darwin_detach): Likewise.
13059 * gnu-nat.c (gnu_detach): Likewise.
13060 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13061 * infcmd.c (detach_command): Pass current_inferior() down to
13062 target_detach.
13063 * infrun.c (follow_fork_inferior): Pass parent_inf to
13064 target_detach.
13065 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13066 target_detach.
13067 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13068 * linux-thread-db.c (thread_db_detach): Likewise.
13069 * nto-procfs.c (procfs_detach): Likewise.
13070 * procfs.c (procfs_detach): Likewise.
13071 * record.c (record_detach): Likewise.
13072 * record.h (struct inferior): Forward-declare.
13073 (record_detach): Add inferior parameter.
13074 * remote-sim.c (gdbsim_detach): Likewise.
13075 * remote.c (remote_detach_1): Likewise.
13076 (remote_detach): Likewise.
13077 (extended_remote_detach): Likewise.
13078 * sol-thread.c (sol_thread_detach): Likewise.
13079 * target-debug.h (target_debug_print_inferior_p): New macro.
13080 * target-delegates.c: Re-generate.
13081 * top.c (kill_or_detach): Pass inferior down to target_detach.
13082 * windows-nat.c (windows_detach): Add inferior parameter.
13083
13084 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13085
13086 * target.h (struct target_ops) <to_detach>: Remove args
13087 parameter.
13088 (target_detach): Likewise.
13089 * target.c (dispose_inferior): Adjust.
13090 (target_detach): Remove args parameter, adjust.
13091 * aix-thread.c (aix_thread_detach): Adjust.
13092 * corefile.c (core_file_command): Adjust.
13093 * corelow.c (core_detach): Adjust.
13094 * darwin-nat.c (darwin_detach): Adjust.
13095 * gnu-nat.c (gnu_detach): Adjust.
13096 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13097 * infcmd.c (detach_command): Adjust
13098 * infrun.c (follow_fork_inferior): Adjust.
13099 (handle_vfork_child_exec_or_exit): Adjust.
13100 * linux-fork.c (linux_fork_detach): Remove args parameter.
13101 * linux-fork.h (linux_fork_detach): Likewise.
13102 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13103 * linux-thread-db.c (thread_db_detach): Likewise.
13104 * nto-procfs.c (procfs_detach): Likewise.
13105 * procfs.c (procfs_detach): Likewise.
13106 (do_detach): Remove signo parameter.
13107 * record.c (record_detach): Remove args parameter.
13108 * record.h (record_detach): Likewise.
13109 * remote-sim.c (gdbsim_detach): Likewise.
13110 * remote.c (remote_detach_1): Likewise.
13111 (remote_detach): Likewise.
13112 (extended_remote_detach): Likewise.
13113 * sol-thread.c (sol_thread_detach): Likewise.
13114 * target-delegates.c: Re-generate.
13115 * top.c (struct qt_args) <args>: Remove field.
13116 (kill_or_detach): Don't pass args.
13117 (quit_force): Don't set args.
13118 * windows-nat.c (windows_detach): Remove args parameter.
13119
13120 2018-01-19 Yao Qi <yao.qi@linaro.org>
13121
13122 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13123 (arm_linux_init_abi): Install it.
13124
13125 2018-01-19 Yao Qi <yao.qi@linaro.org>
13126
13127 * osabi.c (gdb_osabi_names): Extend the regexp for
13128 arm-linux-gnueabihf.
13129
13130 2018-01-18 Yao Qi <yao.qi@linaro.org>
13131
13132 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13133 m_abbrevs.
13134 (abbrev_table::add_abbrev): Update.
13135 (abbrev_table::lookup_abbrev): Update.
13136
13137 2018-01-18 Yao Qi <yao.qi@linaro.org>
13138
13139 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13140
13141 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13142
13143 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13144 to "std::string".
13145
13146 2018-01-17 Tom Tromey <tom@tromey.com>
13147
13148 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13149
13150 2018-01-17 Tom Tromey <tom@tromey.com>
13151
13152 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13153 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13154 (create_array_type_with_stride): Update.
13155 * dwarf2read.c (set_die_type): Update.
13156
13157 2018-01-17 Tom Tromey <tom@tromey.com>
13158
13159 * dwarf2read.c (delayed_method_info): Remove typedef.
13160 (dwarf2_cu::method_info): Now a std::vector.
13161 (add_to_method_list): Update.
13162 (free_delayed_list): Remove.
13163 (compute_delayed_physnames): Update.
13164 (process_full_comp_unit, process_full_type_unit): Clear the method
13165 list. Remove cleanups.
13166 (psymtab_include_file_name): Add name_holder parameter. Use
13167 unique_xmalloc_ptr.
13168 (dwarf_decode_lines): Update.
13169
13170 2018-01-17 Tom Tromey <tom@tromey.com>
13171 Simon Marchi <simon.marchi@ericsson.com>
13172
13173 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13174 (dwarf2_per_objfile::free_cached_comp_units)
13175 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13176 (init_cutu_and_read_dies_no_follow): Update.
13177 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13178 (dwarf2_cu::~dwarf2_cu): New.
13179 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13180 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13181
13182 2018-01-17 Tom Tromey <tom@tromey.com>
13183 Simon Marchi <simon.marchi@ericsson.com>
13184
13185 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13186 (struct die_reader_specs) <abbrev_table>: New member.
13187 (struct abbrev_table): Add constructor.
13188 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13189 <abbrev_obstack>: Now an auto_obstack.
13190 (abbrev_table_up): New typedef.
13191 (init_cu_die_reader): Add abbrev_table parameter.
13192 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13193 Add result_dwo_abbrev_table.
13194 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13195 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13196 Update.
13197 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13198 parameter.
13199 (skip_children): Update.
13200 (abbrev_table::alloc_abbrev): Rename from
13201 abbrev_table_alloc_abbrev.
13202 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13203 (abbrev_table::lookup_abbrev): Rename from
13204 abbrev_table_lookup_abbrev.
13205 (abbrev_table_read_table): Return abbrev_table_up.
13206 (abbrev_table_free, abbrev_table_free_cleanup)
13207 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13208 (load_partial_dies): Update.
13209
13210 2018-01-17 Tom Tromey <tom@tromey.com>
13211
13212 * dwarf2read.c (dwarf2_compute_name): Update comment.
13213 (read_func_scope, read_variable): Update.
13214 (new_symbol): Remove.
13215 (new_symbol_full): Rename to new_symbol.
13216
13217 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13218
13219 PR gdb/16577
13220 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13221 a warning instead of throwing an error, set section size to 0 and return
13222 NULL.
13223 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13224
13225 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13226
13227 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13228 std::string.
13229 (linux_ptrace_attach_fail_reason_string): Likewise.
13230 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13231 Likewise.
13232 (linux_ptrace_attach_fail_reason_string): Likewise.
13233 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13234
13235 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13236
13237 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13238
13239 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13240
13241 PR gdb/21559
13242 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13243 checking for fs_base/gs_base fields in struct user_regs_struct.
13244 * configure: Regenerate.
13245
13246 2018-01-17 Yao Qi <yao.qi@linaro.org>
13247
13248 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13249 function.
13250 (aarch64_linux_init_abi): Install it to gdbarch hook
13251 gcc_target_options.
13252
13253 2018-01-15 Pedro Alves <palves@redhat.com>
13254
13255 * common/signals-state-save-restore.c
13256 (save_original_signals_state): Fix typos.
13257
13258 2017-01-12 Tom Tromey <tom@tromey.com>
13259 Sergio Durigan Junior <sergiodj@redhat.com>
13260
13261 * Makefile.in (install-only): Install gdb-add-index.
13262
13263 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13264
13265 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13266
13267 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13268
13269 * infrun.c (keep_going_pass_signal): Clear step-over info when
13270 insert_breakpoints fails.
13271
13272 2018-01-11 Pedro Alves <palves@redhat.com>
13273
13274 PR gdb/22583
13275 * infrun.c (resume): Rename to ...
13276 (resume_1): ... this.
13277 (resume): Reimplement as wrapper around resume_1.
13278
13279 2018-01-11 Pedro Alves <palves@redhat.com>
13280
13281 PR remote/22597
13282 * remote.c (remote_parse_stop_reply): Default to the last-set
13283 general thread instead of to 'magic_null_ptid'.
13284
13285 2018-01-10 Pedro Alves <palves@redhat.com>
13286
13287 * language.h (language_get_symbol_name_matcher): Rename ...
13288 (get_symbol_name_matcher): ... this.
13289 * language.c (language_get_symbol_name_matcher): Ditto.
13290 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13291 callers adjusted.
13292
13293 2018-01-10 Pedro Alves <palves@redhat.com>
13294
13295 PR gdb/22670
13296 * dwarf2read.c
13297 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13298 Adjust to use language_get_symbol_name_matcher instead of
13299 language_defn::la_get_symbol_name_matcher.
13300 * language.c (language_get_symbol_name_matcher): If in Ada mode
13301 and the lookup name is a verbatim match, return Ada's matcher.
13302 * language.h (language_get_symbol_name_matcher): Adjust comment.
13303 (ada_lookup_name_info::verbatim_p):: New method.
13304
13305 2018-01-10 Pedro Alves <palves@redhat.com>
13306
13307 PR gdb/22670
13308 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13309 minsym's language is language_auto or language_cplus, pass down
13310 language_ada instead.
13311 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13312
13313 2018-01-10 Pedro Alves <palves@redhat.com>
13314
13315 PR gdb/22670
13316 * minsyms.c (linkage_name_str): New function.
13317 (iterate_over_minimal_symbols): Use it.
13318
13319 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13320
13321 * NEWS: Document that 'info proc' now works on FreeBSD.
13322
13323 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13324
13325 * configure.ac: Check for kinfo_getfile in libutil.
13326 * configure: Regenerate.
13327 * config.in: Regenerate.
13328 * fbsd-nat.c: Include "fbsd-tdep.h".
13329 (fbsd_fetch_cmdline): New.
13330 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13331 rather than calling error.
13332 (fbsd_info_proc): New.
13333 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13334 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13335 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13336
13337 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13338
13339 * fbsd-nat.c (struct free_deleter): Remove.
13340 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13341
13342 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13343
13344 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13345 NULL for an empty pathname.
13346
13347 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13348
13349 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13350 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13351 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13352 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13353 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13354 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13355 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13356 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13357 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13358 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13359 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13360 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13361 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13362 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13363 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13364
13365 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13366
13367 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13368 (gnu_xfer_auxv): New function.
13369 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13370 TARGET_OBJECT_AUXV.
13371
13372 2018-01-08 Yao Qi <yao.qi@linaro.org>
13373 Simon Marchi <simon.marchi@ericsson.com>
13374
13375 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13376 common/selftest.c.
13377 (COMMON_OBS): Remove selftest.o.
13378 * configure.ac: Append selftest-arch.c and common/selftest.c to
13379 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13380 * configure: Re-generated.
13381 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13382 GDB_SELF_TEST.
13383 (maintenance_info_selftests): Likewise.
13384
13385 2018-01-08 Xavier Roirand <roirand@adacore.com>
13386
13387 * ada-valprint.c (val_print_packed_array_elements): Use
13388 proper number of elements when printing an array indexed
13389 by an enumeration type.
13390
13391 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13392
13393 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13394 (dw2_get_file_names_reader): Adjust.
13395 (lookup_dwo_signatured_type): Adjust.
13396 (lookup_dwp_signatured_type): Adjust.
13397 (lookup_signatured_type): Adjust.
13398 (create_type_unit_group): Adjust.
13399 (get_type_unit_group): Adjust.
13400 (process_psymtab_comp_unit_reader): Adjust.
13401 (build_type_psymtabs_reader): Adjust.
13402 (scan_partial_symbols): Adjust.
13403 (add_partial_symbol): Adjust.
13404 (add_partial_subprogram): Adjust.
13405 (peek_die_abbrev): Adjust.
13406 (fixup_go_packaging): Adjust.
13407 (process_imported_unit_die): Adjust.
13408 (dwarf2_compute_name): Adjust.
13409 (dwarf2_physname): Adjust.
13410 (read_import_statement): Adjust.
13411 (handle_DW_AT_stmt_list): Adjust.
13412 (read_file_scope): Adjust.
13413 (read_func_scope): Adjust.
13414 (read_lexical_block_scope): Adjust.
13415 (read_call_site_scope): Adjust.
13416 (read_variable): Adjust.
13417 (dwarf2_rnglists_process): Adjust.
13418 (dwarf2_ranges_process): Adjust.
13419 (dwarf2_ranges_read): Adjust.
13420 (dwarf2_get_pc_bounds): Adjust.
13421 (dwarf2_record_block_ranges): Adjust.
13422 (dwarf2_add_field): Adjust.
13423 (dwarf2_add_member_fn): Adjust.
13424 (read_structure_type): Adjust.
13425 (process_structure_scope): Adjust.
13426 (read_enumeration_type): Adjust.
13427 (read_array_type): Adjust.
13428 (mark_common_block_symbol_computed): Adjust.
13429 (read_common_block): Adjust.
13430 (read_namespace_type): Adjust.
13431 (read_namespace): Adjust.
13432 (read_module_type): Adjust.
13433 (read_tag_pointer_type): Adjust.
13434 (read_tag_ptr_to_member_type): Adjust.
13435 (read_tag_string_type): Adjust.
13436 (read_subroutine_type): Adjust.
13437 (read_typedef): Adjust.
13438 (read_base_type): Adjust.
13439 (attr_to_dynamic_prop): Adjust.
13440 (read_subrange_type): Adjust.
13441 (read_unspecified_type): Adjust.
13442 (dwarf2_read_abbrevs): Adjust.
13443 (load_partial_dies): Adjust.
13444 (read_partial_die): Adjust.
13445 (find_partial_die): Adjust.
13446 (guess_partial_die_structure_name): Adjust.
13447 (fixup_partial_die): Adjust.
13448 (read_attribute_value): Adjust.
13449 (read_addr_index): Adjust.
13450 (read_addr_index_from_leb128): Adjust.
13451 (read_str_index): Adjust.
13452 (dwarf2_string_attr): Adjust.
13453 (get_debug_line_section): Adjust.
13454 (dwarf_decode_line_header): Adjust.
13455 (lnp_state_machine::check_line_address): Adjust.
13456 (dwarf_decode_lines_1): Adjust.
13457 (dwarf_decode_lines): Adjust.
13458 (dwarf2_start_symtab): Adjust.
13459 (var_decode_location): Adjust.
13460 (new_symbol_full): Adjust.
13461 (dwarf2_const_value_data): Adjust.
13462 (dwarf2_const_value_attr): Adjust.
13463 (dwarf2_const_value): Adjust.
13464 (die_type): Adjust.
13465 (die_containing_type): Adjust.
13466 (build_error_marker_type): Adjust.
13467 (lookup_die_type): Adjust.
13468 (guess_full_die_structure_name): Adjust.
13469 (anonymous_struct_prefix): Adjust.
13470 (determine_prefix): Adjust.
13471 (dwarf2_name): Adjust.
13472 (follow_die_ref_or_sig): Adjust.
13473 (follow_die_offset): Adjust.
13474 (follow_die_ref): Adjust.
13475 (follow_die_sig_1): Adjust.
13476 (follow_die_sig): Adjust.
13477 (get_signatured_type): Adjust.
13478 (get_DW_AT_signature_type): Adjust.
13479 (decode_locdesc): Adjust.
13480 (dwarf_decode_macros): Adjust.
13481 (cu_debug_loc_section): Adjust.
13482 (fill_in_loclist_baton): Adjust.
13483 (dwarf2_symbol_mark_computed): Adjust.
13484 (init_one_comp_unit): Don't assign
13485 dwarf2_cu::dwarf2_per_objfile.
13486 (set_die_type): Adjust.
13487
13488 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13489
13490 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13491 <dwarf2_per_objfile>: New field.
13492 (dwarf2_per_objfile): Remove global.
13493 (get_dwarf2_per_objfile): New function.
13494 (set_dwarf2_per_objfile): New function.
13495 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13496 dwarf2_per_objfile.
13497 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13498 (read_abbrev_offset): Likewise.
13499 (read_indirect_string): Likewise.
13500 (read_indirect_line_string): Likewise.
13501 (read_indirect_string_at_offset): Likewise.
13502 (read_indirect_string_from_dwz): Likewise.
13503 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13504 dwarf2_per_objfile.
13505 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13506 (create_all_comp_units): Change objfile parameter to
13507 dwarf2_per_objfile.
13508 (create_all_type_units): Likewise.
13509 (process_queue): Add dwarf2_per_objfile parameter.
13510 (read_and_check_comp_unit_head): Likewise.
13511 (lookup_dwo_unit_in_dwp): Likewise.
13512 (get_dwp_file): Likewise.
13513 (process_cu_includes): Likewise.
13514 (struct free_dwo_file_cleanup_data): New struct.
13515 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13516 set_dwarf2_per_objfile.
13517 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13518 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13519 context, adjust calls.
13520 (dw2_instantiate_symtab): Likewise.
13521 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13522 (dw2_get_cu): Likewise.
13523 (create_cu_from_index_list): Change objfile parameter to
13524 dwarf2_per_objfile.
13525 (create_cus_from_index_list): Get dwarf2_per_objfile from
13526 context, adjust calls.
13527 (create_cus_from_index): Likewise.
13528 (create_signatured_type_table_from_index): Change objfile
13529 parameter to dwarf2_per_objfile.
13530 (create_signatured_type_table_from_debug_names): Change objfile
13531 parameter to dwarf2_per_objfile.
13532 (create_addrmap_from_index): Likewise.
13533 (create_addrmap_from_aranges): Likewise.
13534 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13535 (dw2_setup): Remove.
13536 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13537 context.
13538 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13539 get_dwarf2_per_objfile.
13540 (dw2_forget_cached_source_info): Likewise.
13541 (dw2_map_symtabs_matching_filename): Likewise.
13542 (struct dw2_symtab_iterator) <index>: Remove.
13543 <dwarf2_per_objfile>: New field.
13544 (dw2_symtab_iter_init): Replace index parameter with
13545 dwarf2_per_objfile.
13546 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13547 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13548 (dw2_print_stats): Likewise.
13549 (dw2_dump): Likewise.
13550 (dw2_expand_symtabs_for_function): Likewise.
13551 (dw2_expand_all_symtabs): Likewise.
13552 (dw2_expand_symtabs_with_fullname): Likewise.
13553 (dw2_expand_marked_cus): Replace index and objfile parameters
13554 with dwarf2_per_objfile.
13555 (dw_expand_symtabs_matching_file_matcher): Add
13556 dwarf2_per_objfile parameter and adjust calls.
13557 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13558 adjust calls.
13559 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13560 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13561 adjust calls.
13562 (create_cus_from_debug_names_list): Replace objfile parameter
13563 with dwarf2_per_objfile and adjust calls.
13564 (create_cus_from_debug_names): Likewise.
13565 (dwarf2_read_debug_names): Likewise.
13566 (mapped_debug_names::namei_to_name): Adjust call.
13567 (dw2_debug_names_iterator::next): Likewise.
13568 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13569 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13570 (dw2_debug_names_dump): Likewise.
13571 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13572 (dw2_debug_names_expand_symtabs_matching): Likewise.
13573 (dwarf2_initialize_objfile): Likewise.
13574 (dwarf2_build_psymtabs): Likewise.
13575 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13576 this_cu.
13577 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13578 (read_and_check_comp_unit_head): Likewise.
13579 (read_abbrev_offset): Likewise.
13580 (create_debug_type_hash_table): Likewise.
13581 (create_debug_types_hash_table): Likewise.
13582 (create_all_type_units): Replace objfile parameter with
13583 dwarf2_per_objfile.
13584 (add_type_unit): Add dwarf2_per_objfile parameter.
13585 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13586 with dwarf2_per_objfile.
13587 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13588 (lookup_dwp_signatured_type): Likewise.
13589 (lookup_signatured_type): Likewise.
13590 (read_cutu_die_from_dwo): Likewise.
13591 (init_tu_and_read_dwo_dies): Likewise.
13592 (init_cutu_and_read_dies): Likewise.
13593 (init_cutu_and_read_dies_no_follow): Likewise.
13594 (allocate_type_unit_groups_table): Add objfile parameter.
13595 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13596 (get_type_unit_group): Likewise.
13597 (process_psymtab_comp_unit): Update call.
13598 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13599 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13600 (print_tu_stats): Likewise.
13601 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13602 in void* parameter.
13603 (build_type_psymtabs): Change objfile parameter to
13604 dwarf2_per_objfile.
13605 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13606 passed in void* parameter.
13607 (process_skeletonless_type_units): Change objfile parameter to
13608 dwarf2_per_objfile.
13609 (set_partial_user): Likewise.
13610 (dwarf2_build_psymtabs_hard): Likewise.
13611 (read_comp_units_from_section): Likewise.
13612 (create_all_comp_units): Likewise.
13613 (scan_partial_symbols): Update calls.
13614 (add_partial_symbol): Likewise.
13615 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13616 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13617 (process_queue): Add dwarf2_per_objfile parameter.
13618 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13619 (compute_compunit_symtab_includes): Likewise.
13620 (process_cu_includes): Add dwarf2_per_objfile parameter.
13621 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13622 (process_full_type_unit): Likewise.
13623 (process_imported_unit_die): Update call.
13624 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13625 (read_file_scope): Likewise.
13626 (allocate_dwo_file_hash_table): Add objfile parameter.
13627 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13628 (create_cus_hash_table): Likewise.
13629 (create_dwp_hash_table): Likewise.
13630 (create_dwo_unit_in_dwp_v1): Likewise.
13631 (create_dwp_v2_section): Likewise.
13632 (create_dwo_unit_in_dwp_v2): Likewise.
13633 (lookup_dwo_unit_in_dwp): Likewise.
13634 (try_open_dwop_file): Likewise.
13635 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13636 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13637 cleanup to include a reference to dwarf2_per_objfile.
13638 (open_dwp_file): Add dwarf2_per_objfile parameter.
13639 (open_and_init_dwp_file): Likewise.
13640 (get_dwp_file): Likewise.
13641 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13642 (queue_and_load_all_dwo_tus): Update call.
13643 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13644 data.
13645 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13646 (dwarf2_ranges_process): Likewise.
13647 (dwarf2_get_pc_bounds): Likewise.
13648 (mark_common_block_symbol_computed): Likewise.
13649 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13650 (dwarf2_read_abbrevs): Update call.
13651 (read_partial_die): Use dwarf2_per_objfile from cu.
13652 (find_partial_die): Likewise.
13653 (fixup_partial_die): Likewise.
13654 (read_attribute_value): Likewise.
13655 (read_indirect_string_at_offset_from): Add objfile parameter.
13656 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13657 parameter.
13658 (read_indirect_string_from_dwz): Add objfile parameter.
13659 (read_indirect_string): Add objfile parameter.
13660 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13661 (read_addr_index): Use dwarf2_per_objfile from cu.
13662 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13663 call dw2_setup.
13664 (read_str_index): Use dwarf2_per_objfile from cu.
13665 (get_debug_line_section): Likewise.
13666 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13667 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13668 (new_symbol_full): Use dwarf2_per_objfile from cu.
13669 (build_error_marker_type): Likewise.
13670 (lookup_die_type): Likewise.
13671 (determine_prefix): Likewise.
13672 (follow_die_offset): Likewise.
13673 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13674 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13675 (dwarf2_fetch_die_type_sect_off): Likewise.
13676 (dwarf2_get_die_type): Likewise.
13677 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13678 (get_signatured_type): Likewise.
13679 (get_DW_AT_signature_type): Likewise.
13680 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13681 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13682 (cu_debug_loc_section): Likewise.
13683 (fill_in_loclist_baton): Likewise.
13684 (dwarf2_symbol_mark_computed): Likewise.
13685 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13686 dwarf2_per_objfile.
13687 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13688 parameter.
13689 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13690 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13691 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13692 (set_die_type): Use dwarf2_free_objfile from cu.
13693 (get_die_type_at_offset): Likewise.
13694 (dwarf2_per_objfile_free): Don't assign global variable.
13695 (debug_names) <constructor>: Add dwarf2_per_objfile
13696 parameter, update m_debugstrlookup construction.
13697 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13698 parameter.
13699 <m_dwarf2_per_objfile>: New field.
13700 <lookup>: Use m_dwarf2_per_objfile.
13701 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13702 (psyms_seen_size): Likewise.
13703 (write_gdbindex): Replace objfile parameter with
13704 dwarf2_per_objfile.
13705 (write_debug_names): Likewise.
13706 (write_psymtabs_to_index): Likewise.
13707 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13708 calls.
13709
13710 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13711
13712 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13713 <dwarf2_per_objfile>: New field.
13714 (struct dwarf2_per_cu_data) <objfile>: Remove.
13715 <dwarf2_per_objfile>: New field.
13716 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13717 of objfile.
13718 (create_signatured_type_table_from_index): Likewise.
13719 (create_debug_type_hash_table): Likewise.
13720 (fill_in_sig_entry_from_dwo_entry): Likewise.
13721 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13722 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13723 objfile.
13724 (create_partial_symtab): Access objfile through
13725 dwarf2_per_objfile.
13726 (process_psymtab_comp_unit_reader): Likewise.
13727 (read_comp_units_from_section): Likewise.
13728 (scan_partial_symbols): Likewise.
13729 (add_partial_symbol): Likewise.
13730 (add_partial_subprogram): Likewise.
13731 (peek_die_abbrev): Likewise.
13732 (fixup_go_packaging): Likewise.
13733 (process_full_comp_unit): Likewise.
13734 (process_full_type_unit): Likewise.
13735 (process_imported_unit_die): Likewise.
13736 (dwarf2_compute_name): Likewise.
13737 (dwarf2_physname): Likewise.
13738 (read_import_statement): Likewise.
13739 (create_cus_hash_table): Assign dwarf2_physname instead of
13740 objfile.
13741 (read_func_scope): Access objfile through dwarf2_per_objfile.
13742 (read_lexical_block_scope): Likewise.
13743 (read_call_site_scope): Likewise.
13744 (read_variable): Likewise.
13745 (dwarf2_rnglists_process): Likewise.
13746 (dwarf2_ranges_process): Likewise.
13747 (dwarf2_ranges_read): Likewise.
13748 (dwarf2_record_block_ranges): Likewise.
13749 (dwarf2_add_field): Likewise.
13750 (dwarf2_add_member_fn): Likewise.
13751 (read_structure_type): Likewise.
13752 (process_structure_scope): Likewise.
13753 (read_enumeration_type): Likewise.
13754 (read_array_type): Likewise.
13755 (read_common_block): Likewise.
13756 (read_namespace_type): Likewise.
13757 (read_namespace): Likewise.
13758 (read_module_type): Likewise.
13759 (read_tag_pointer_type): Likewise.
13760 (read_tag_ptr_to_member_type): Likewise.
13761 (read_tag_string_type): Likewise.
13762 (read_subroutine_type): Likewise.
13763 (read_typedef): Likewise.
13764 (read_base_type): Likewise.
13765 (attr_to_dynamic_prop): Likewise.
13766 (read_subrange_type): Likewise.
13767 (read_unspecified_type): Likewise.
13768 (load_partial_dies): Likewise.
13769 (read_partial_die): Likewise.
13770 (find_partial_die): Likewise.
13771 (guess_partial_die_structure_name): Likewise.
13772 (fixup_partial_die): Likewise.
13773 (read_attribute_value): Likewise.
13774 (read_addr_index_from_leb128): Likewise.
13775 (dwarf2_read_addr_index): Likewise.
13776 (dwarf2_string_attr): Likewise.
13777 (lnp_state_machine::check_line_address): Likewise.
13778 (dwarf_decode_lines_1): Likewise.
13779 (dwarf_decode_lines): Likewise.
13780 (dwarf2_start_symtab): Likewise.
13781 (var_decode_location): Likewise.
13782 (new_symbol_full): Likewise.
13783 (dwarf2_const_value_data): Likewise.
13784 (dwarf2_const_value_attr): Likewise.
13785 (dwarf2_const_value): Likewise.
13786 (die_type): Likewise.
13787 (die_containing_type): Likewise.
13788 (lookup_die_type): Likewise.
13789 (guess_full_die_structure_name): Likewise.
13790 (anonymous_struct_prefix): Likewise.
13791 (dwarf2_name): Likewise.
13792 (follow_die_ref_or_sig): Likewise.
13793 (follow_die_offset): Likewise.
13794 (follow_die_ref): Likewise.
13795 (dwarf2_fetch_die_loc_sect_off): Likewise.
13796 (dwarf2_fetch_constant_bytes): Likewise.
13797 (dwarf2_fetch_die_type_sect_off): Likewise.
13798 (dwarf2_get_die_type): Likewise.
13799 (follow_die_sig): Likewise.
13800 (decode_locdesc): Likewise.
13801 (dwarf2_per_cu_objfile): Likewise.
13802 (dwarf2_per_cu_text_offset): Likewise.
13803 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13804 objfile.
13805 (set_die_type): Access objfile through
13806 dwarf2_per_objfile.
13807
13808 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13809
13810 * valprint.c (converted_character_d): Remove typedef.
13811 (DEF_VEC_O (converted_character_d)): Remove.
13812 (count_next_character): Use std::vector.
13813 (print_converted_chars_to_obstack): Likewise.
13814 (generic_printstr): Likewise.
13815
13816 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13817
13818 * xml-support.h (struct gdb_xml_value): Add constructor.
13819 <value>: Change type to unique_xmalloc_ptr.
13820 (gdb_xml_value_s): Remove typedef.
13821 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13822 (gdb_xml_element_start_handler): Change parameter type to
13823 std::vector.
13824 (xml_find_attribute): Likewise.
13825 * xml-support.c (xml_find_attribute): Change parameter type to
13826 std::vector and adjust.
13827 (gdb_xml_values_cleanup): Remove.
13828 (gdb_xml_parser::start_element): Adjust to std::vector.
13829 (xinclude_start_include): Change paraeter type to std::vector
13830 and adjust.
13831 * btrace.c (check_xml_btrace_version): Likewise.
13832 (parse_xml_btrace_block): Likewise.
13833 (parse_xml_btrace_pt_config_cpu): Likewise.
13834 (parse_xml_btrace_pt): Likewise.
13835 (parse_xml_btrace_conf_bts): Likewise.
13836 (parse_xml_btrace_conf_pt): Likewise.
13837 * memory-map.c (memory_map_start_memory): Likewise.
13838 (memory_map_start_property): Likewise.
13839 * osdata.c (osdata_start_osdata): Likewise.
13840 (osdata_start_item): Likewise.
13841 (osdata_start_column): Likewise.
13842 * remote.c (start_thread): Likewise.
13843 * solib-aix.c (library_list_start_library): Likewise.
13844 (library_list_start_list): Likewise.
13845 * solib-svr4.c (library_list_start_library): Likewise.
13846 (svr4_library_list_start_list): Likewise.
13847 * solib-target.c (library_list_start_segment): Likewise.
13848 (library_list_start_section): Likewise.
13849 (library_list_start_library): Likewise.
13850 (library_list_start_list): Likewise.
13851 * tracepoint.c (traceframe_info_start_memory): Likewise.
13852 (traceframe_info_start_tvar): Likewise.
13853 * xml-syscall.c (syscall_start_syscall): Likewise.
13854 * xml-tdesc.c (tdesc_start_target): Likewise.
13855 (tdesc_start_feature): Likewise.
13856 (tdesc_start_reg): Likewise.
13857 (tdesc_start_union): Likewise.
13858 (tdesc_start_struct): Likewise.
13859 (tdesc_start_flags): Likewise.
13860 (tdesc_start_enum): Likewise.
13861 (tdesc_start_field): Likewise.
13862 (tdesc_start_enum_value): Likewise.
13863 (tdesc_start_vector): Likewise.
13864
13865 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13866
13867 * extension.h (struct xmethod_worker) <clone>: Remove.
13868 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13869 Remove.
13870 (python_xmethod_worker::clone): Remove.
13871 * valops.c (find_overload_match): Use std::move instead of
13872 clone.
13873
13874 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13875
13876 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13877 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13878 <free_xmethod_worker_data>: Remove.
13879 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13880 <get_xmethod_arg_types>: Remove.
13881 <get_xmethod_result_type>: Remove.
13882 <invoke_xmethod>: Remove.
13883 * extension.c (new_xmethod_worker): Remove.
13884 (clone_xmethod_worker): Remove.
13885 (get_matching_xmethod_workers): Return void, pass std::vector by
13886 pointer.
13887 (get_xmethod_arg_types): Rename to...
13888 (xmethod_worker::get_arg_types): ... this, and adjust.
13889 (get_xmethod_result_type): Rename to...
13890 (xmethod_worker::get_result_type): ... this, and adjust.
13891 (invoke_xmethod): Remove.
13892 (free_xmethod_worker): Remove.
13893 (free_xmethod_worker_vec): Remove.
13894 * extension.h (enum ext_lang_rc): Move here from
13895 extension-priv.h.
13896 (struct xmethod_worker): Add constructor and destructor.
13897 <data>: Remove.
13898 <value>: Remove.
13899 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13900 virtual pure methods.
13901 <get_arg_types, get_result_type>: New methods.
13902 (xmethod_worker_ptr): Remove typedef.
13903 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13904 (xmethod_worker_vec): Remove typedef.
13905 (xmethod_worker_up): New typedef.
13906 (invoke_xmethod): Remove.
13907 (clone_xmethod_worker): Remove.
13908 (free_xmethod_worker): Remove.
13909 (free_xmethod_worker_vec): Remove.
13910 (get_xmethod_arg_types): Remove.
13911 (get_xmethod_result_type): Remove.
13912 * valops.c (find_method_list): Use std::vector, don't use
13913 intermediate vector.
13914 (value_find_oload_method_list): Use std::vector.
13915 (find_overload_match): Use std::vector.
13916 (find_oload_champ): Use std::vector.
13917 * value.c (value_free): Use operator delete.
13918 (value_of_xmethod): Rename to...
13919 (value_from_xmethod): ... this. Don't assign
13920 xmethod_worker::value, take rvalue-reference.
13921 (result_type_of_xmethod): Adjust.
13922 (call_xmethod): Adjust.
13923 * value.h: Include extension.h.
13924 (struct xmethod_worker): Don't forward-declare.
13925 (value_of_xmethod): Rename to...
13926 (value_from_xmethod): ... this, take rvalue-reference.
13927 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13928 (struct python_xmethod_worker): ... this, add constructor and
13929 destructor.
13930 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13931 (gdbpy_free_xmethod_worker_data): Rename to...
13932 (python_xmethod_worker::~python_xmethod_worker): ... this and
13933 adjust.
13934 (gdbpy_clone_xmethod_worker_data): Rename to...
13935 (python_xmethod_worker::clone): ... this and adjust.
13936 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13937 temporary vector.
13938 (gdbpy_get_xmethod_arg_types): Rename to...
13939 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13940 (gdbpy_get_xmethod_result_type): Rename to...
13941 (python_xmethod_worker::do_get_result_type): ... this and
13942 adjust.
13943 (gdbpy_invoke_xmethod): Rename to...
13944 (python_xmethod_worker::invoke): ... this and adjust.
13945 (new_python_xmethod_worker): Rename to...
13946 (python_xmethod_worker::python_xmethod_worker): ... this and
13947 adjust.
13948 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13949 Remove.
13950 (gdbpy_free_xmethod_worker_data): Remove.
13951 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13952 (gdbpy_get_xmethod_arg_types): Remove.
13953 (gdbpy_get_xmethod_result_type): Remove.
13954 (gdbpy_invoke_xmethod): Remove.
13955 * python/python.c (python_extension_ops): Remove obsolete
13956 callbacks.
13957
13958 2018-01-05 Pedro Alves <palves@redhat.com>
13959
13960 PR gdb/18653
13961 * common/signals-state-save-restore.c
13962 (save_original_signals_state): New parameter 'quiet'. Warn if we
13963 find a custom handler preinstalled, instead of internal erroring.
13964 But only warn if !quiet.
13965 * common/signals-state-save-restore.h
13966 (save_original_signals_state): New parameter 'quiet'.
13967 * main.c (captured_main_1): Move save_original_signals_state call
13968 after option handling, and pass QUIET.
13969
13970 2018-01-05 Pedro Alves <palves@redhat.com>
13971
13972 * spu-tdep.c (spu_catch_start): Pass
13973 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13974
13975 2018-01-05 Pedro Alves <palves@redhat.com>
13976
13977 PR gdb/22670
13978 * ada-lang.c (literal_symbol_name_matcher): New function.
13979 (ada_get_symbol_name_matcher): Use it for
13980 symbol_name_match_type::SEARCH_NAME.
13981 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13982 it down instead of assuming symbol_name_match_type::FULL.
13983 * block.h (block_lookup_symbol): New parameter 'match_type'.
13984 * c-valprint.c (print_unpacked_pointer): Use
13985 lookup_symbol_search_name instead of lookup_symbol.
13986 * compile/compile-object-load.c (get_out_value_type): Pass down
13987 symbol_name_match_type::SEARCH_NAME.
13988 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13989 symbol_name_match_type::FULL.
13990 * cp-support.c (cp_get_symbol_name_matcher): Handle
13991 symbol_name_match_type::SEARCH_NAME.
13992 * infrun.c (insert_exception_resume_breakpoint): Use
13993 lookup_symbol_search_name.
13994 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13995 * psymtab.c (maintenance_check_psymtabs): Use
13996 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13997 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13998 SYMBOL_SEARCH_NAME.
13999 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14000 if symbol_name_match_type::SEARCH_NAME.
14001 (lookup_symbol_in_language): Pass down
14002 symbol_name_match_type::FULL.
14003 (lookup_symbol_search_name): New.
14004 (lookup_language_this): Pass down
14005 symbol_name_match_type::SEARCH_NAME.
14006 (lookup_symbol_aux, lookup_local_symbol): New parameter
14007 'match_type'. Pass it down.
14008 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14009 (lookup_symbol_search_name): New declaration.
14010 (lookup_symbol_in_block): New 'match_type' parameter.
14011
14012 2018-01-05 Pedro Alves <palves@redhat.com>
14013
14014 PR gdb/22670
14015 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14016 ada_lookup_symbol.
14017 (ada_lookup_symbol): Reimplement in terms of
14018 ada_lookup_symbol_list, bits factored out from
14019 ada_lookup_encoded_symbol.
14020
14021 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14022
14023 * ada-exp.y (write_object_renaming): When subscripting an array
14024 using a symbol as the index, pass the block in call to
14025 ada_lookup_encoded_symbol when looking that symbol up.
14026
14027 2018-01-05 Jerome Guitton <guitton@adacore.com>
14028
14029 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14030 TYPE_INDEX_TYPE.
14031
14032 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14033
14034 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14035 the case where VALUE_LVAL (val0) is not lval_memory.
14036
14037 2018-01-05 Xavier Roirand <roirand@adacore.com>
14038
14039 * ada-valprint.c (print_optional_low_bound): Handle
14040 character-indexed array printing like boolean-indexed array
14041 printing.
14042
14043 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14044
14045 * NEWS: Create a new section for the next release branch.
14046 Rename the section of the current branch, now that it has
14047 been cut.
14048
14049 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14050
14051 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14052 * version.in: Bump version to 8.1.50.DATE-git.
14053
14054 2018-01-03 Xavier Roirand <roirand@adacore.com>
14055
14056 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14057 Add field.
14058 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14059 Add field.
14060 (default_exception_support_info) <catch_handlers_sym>: Add field.
14061 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14062 (ada_exception_name_addr_1): Add "catch handlers" handling.
14063 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14064 Update all callers.
14065 (create_excep_cond_exprs) <ex>: Add parameter.
14066 (re_set_exception): Update create_excep_cond_exprs call.
14067 (print_it_exception, print_one_exception, print_mention_exception)
14068 (print_recreate_exception): Add "catch handler" handling.
14069 (allocate_location_catch_handlers, re_set_catch_handlers)
14070 (check_status_catch_handlers, print_it_catch_handlers)
14071 (print_one_catch_handlers, print_mention_catch_handlers)
14072 (print_recreate_catch_handlers): New function.
14073 (catch_handlers_breakpoint_ops): New variable.
14074 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14075 Add parameter. Add "catch handler" handling.
14076 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14077 Add "catch handler" handling.
14078 (ada_exception_catchpoint_cond_string): Add "catch handler"
14079 handling.
14080 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14081 call.
14082 (catch_ada_handlers_command): New function.
14083 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14084 operations structure.
14085 (_initialize_ada_language): Add "catch handlers" command entry.
14086 * NEWS: Document "catch handlers" feature.
14087
14088 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14089
14090 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14091 account when creating the array type of the slice.
14092 (ada_value_slice): Likewise.
14093
14094 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14095
14096 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14097 New enum value.
14098 (create_array_type_with_stride): Add byte_stride_prop parameter.
14099 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14100 New parameter. Update all callers in this file.
14101 (array_type_has_dynamic_stride): New function.
14102 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14103 of arrays with dynamic byte strides.
14104 * dwarf2read.c (read_array_type): Add support for dynamic
14105 DW_AT_byte_stride attributes.
14106
14107 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14108
14109 * dwarf2read.c (read_unspecified_type): Treat
14110 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14111
14112 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14113
14114 Update copyright year range in all GDB files.
14115
14116 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14117
14118 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14119 and gdb/testsuite/gdb.base/step-line.c.
14120
14121 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14122
14123 * copyright.py (main): Dump the contents of
14124 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14125 even if BY_HAND is empty.
14126
14127 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14128
14129 * top.c (print_gdb_version): Update Copyright year in version
14130 message.
14131
14132 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14133
14134 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14135
14136 For older changes see ChangeLog-2017.
14137 \f
14138 Local Variables:
14139 mode: change-log
14140 left-margin: 8
14141 fill-column: 74
14142 version-control: never
14143 coding: utf-8
14144 End:
This page took 0.380885 seconds and 3 git commands to generate.