]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Fix /proc pathname sizes on Solaris
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
2 April Chin <april.chin@oracle.com>
3 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4
5 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
6 uint_t lwpid_t.
7 (create_procinfo): Print pids in /proc without leading zeros.
8
9 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
10
11 * nios2-tdep.c (nios2_gcc_target_options): New.
12 (nios2_gdb_arch_init): Install new hook.
13
14 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
15
16 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
17 New file.
18 * update-gnulib.sh: Apply patch.
19 * configure: Re-generate.
20
21 2018-09-18 John Baldwin <jhb@FreeBSD.org>
22
23 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
24 description. Make "info proc" command descriptions more
25 consistent.
26
27 2018-09-18 John Baldwin <jhb@FreeBSD.org>
28
29 * NEWS: Mention 'info proc files' command.
30
31 2018-09-18 John Baldwin <jhb@FreeBSD.org>
32
33 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
34 descriptors for IP_FILES and IP_ALL.
35
36 2018-09-18 John Baldwin <jhb@FreeBSD.org>
37
38 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
39 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
40 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
41 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
42 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
43 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
44 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
45 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
46 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
47 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
48 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
49 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
50 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
51 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
52 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
53 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
54 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
55 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
56 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
57 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
58 (struct fbsd_sockaddr_un): New types.
59 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
60 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
61 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
62 (fbsd_core_info_proc_files): New functions.
63 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
64 IP_ALL.
65 * fbsd-tdep.h (fbsd_info_proc_files_header)
66 (fbsd_info_proc_files_entry): New.
67
68 2018-09-18 John Baldwin <jhb@FreeBSD.org>
69
70 * defs.h (enum info_proc_what) [IP_FILES]: New value.
71 * infcmd.c (info_proc_cmd_files): New function.
72 (_initialize_infcmd): Register 'info proc files' command.
73
74 2018-09-18 John Baldwin <jhb@FreeBSD.org>
75
76 * gnulib/aclocal-m4-deps.mk: Re-generate.
77 * gnulib/aclocal.m4: Re-generate.
78 * gnulib/config.in: Re-generate.
79 * gnulib/configure: Re-generate.
80 * gnulib/import/Makefile.am: Re-generate.
81 * gnulib/import/Makefile.in: Re-generate.
82 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
83 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
84 * gnulib/import/arpa_inet.in.h: New file.
85 * gnulib/import/inet_ntop.c: New file.
86 * gnulib/import/m4/arpa_inet_h.m4: New file.
87 * gnulib/import/m4/inet_ntop.m4: New file.
88 * gnulib/import/m4/netinet_in_h.m4: New file.
89 * gnulib/import/m4/socklen.m4: New file.
90 * gnulib/import/m4/sockpfaf.m4: New file.
91 * gnulib/import/m4/stdalign.m4: New file.
92 * gnulib/import/m4/sys_uio_h.m4: New file.
93 * gnulib/import/netinet_in.in.h: New file.
94 * gnulib/import/stdalign.in.h: New file.
95 * gnulib/import/sys_socket.c: New file.
96 * gnulib/import/sys_socket.in.h: New file.
97 * gnulib/import/sys_uio.in.h: New file.
98 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
99 module.
100
101 2018-09-18 John Baldwin <jhb@FreeBSD.org>
102
103 * gnulib/aclocal-m4-deps.mk: New file.
104 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
105 deterministically.
106
107 2018-09-18 John Baldwin <jhb@FreeBSD.org>
108
109 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
110 KVE_PATH.
111
112 2018-09-18 Tom Tromey <tom@tromey.com>
113
114 * compile/compile-object-load.c (struct
115 link_hash_table_cleanup_data): Add constructor and destructor.
116 Use DISABLE_COPY_AND_ASSIGN.
117 (~link_hash_table_cleanup_data): Rename from
118 link_hash_table_free. Now a destructor.
119 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
120
121 2018-09-18 Tom Tromey <tom@tromey.com>
122
123 * compile/compile-object-run.c (do_module_cleanup): Use delete.
124 * compile/compile-object-load.c (struct munmap_list): Move to
125 header file.
126 (munmap_list::add): Rename from munmap_list_add; rewrite.
127 (munmap_list::~munmap_list): Rename from munmap_list_free.
128 (munmap_listp_free_cleanup): Remove.
129 (compile_object_load): Update.
130 * compile/compile-object-load.h (struct munmap_list): Move from
131 compile-object-load.c. Rewrite.
132
133 2018-09-18 Alan Hayward <alan.hayward@arm.com>
134
135 * aarch64-tdep.c (pass_in_v): Use register size.
136 (aarch64_extract_return_value): Likewise.
137 (aarch64_store_return_value): Likewise.
138
139 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
140
141 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
142 rlim_t.
143
144 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
145
146 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
147 Fix short help line.
148
149 2018-09-17 Tom Tromey <tom@tromey.com>
150
151 PR python/20445:
152 * configure: Rebuild.
153 * configure.ac: Conditionally use -DNDEBUG for Python.
154
155 2018-09-17 Tom Tromey <tom@tromey.com>
156
157 * configure: Rebuild.
158 * configure.ac: Use gmp as a library dependency when checking for
159 mpfr.
160
161 2018-09-17 Pedro Alves <palves@redhat.com>
162
163 * python/py-inferior.c (find_inferior_object): Delete.
164
165 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
166
167 * compile/compile-cplus-types.c
168 (compile_cplus_instance::enter_scope): Don't use new_scope after
169 std::move.
170
171 2018-09-17 Tom Tromey <tom@tromey.com>
172
173 * common/pathstuff.c (get_standard_cache_dir): Use
174 ~/Library/Caches on macOS.
175 * common/pathstuff.h (get_standard_cache_dir): Update comment.
176
177 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
178
179 PR python/23669
180 * breakpoint.c (commands_cmd_element): New.
181 (_initialize_breakpoint): Assign commands_cmd_element.
182 * breakpoint.h (commands_cmd_element): New.
183 * cli/cli-script.c (while_cmd_element, if_command,
184 define_cmd_element): New.
185 (command_name_equals): Remove.
186 (process_next_line): Compare commands by pointer, not by name.
187 (_initialize_cli_script): Assign the various cmd_list_element
188 variables.
189 * compile/compile.c (compile_cmd_element): New.
190 (_initialize_compile): Assign compile_cmd_element.
191 * compile/compile.h (compile_cmd_element): New.
192 * guile/guile.c (guile_cmd_element): New.
193 (install_gdb_commands): Assign guile_cmd_element.
194 * guile/guile.h (guile_cmd_element): New.
195 * python/python.c (python_cmd_element): New.
196 (_initialize_python): Assign python_cmd_element.
197 * python/python.h (python_cmd_element): New.
198 * tracepoint.c (while_stepping_cmd_element): New.
199 (_initialize_tracepoint): Assign while_stepping_cmd_element.
200 * tracepoint.h (while_stepping_cmd_element): New.
201
202 2018-09-17 Tom Tromey <tom@tromey.com>
203
204 * infrun.c (save_infcall_suspend_state): Return
205 infcall_suspend_state_up.
206 (save_infcall_control_state): Return infcall_control_state_up.
207 * inferior.h (save_infcall_suspend_state)
208 (save_infcall_control_state): Declare later. Return unique
209 pointers.
210
211 2018-09-17 Tom Tromey <tom@tromey.com>
212
213 * infrun.c (struct stop_context): Declare constructor,
214 destructor, "changed" method.
215 (stop_context::stop_context): Rename from save_stop_context.
216 (stop_context::~stop_context): Rename from
217 release_stop_context_cleanup.
218 (normal_stop): Update.
219 (stop_context::changed): Rename from stop_context_changed. Return
220 bool.
221
222 2018-09-17 Tom Tromey <tom@tromey.com>
223
224 * inferior.h (struct infcall_suspend_state_deleter): New.
225 (infcall_suspend_state_up): New typedef.
226 (struct infcall_control_state_deleter): New.
227 (infcall_control_state_up): New typedef.
228 (make_cleanup_restore_infcall_suspend_state)
229 (make_cleanup_restore_infcall_control_state): Don't declare.
230 * infcall.c (call_function_by_hand_dummy): Update.
231 * infrun.c (do_restore_infcall_suspend_state_cleanup)
232 (make_cleanup_restore_infcall_suspend_state): Remove.
233 (do_restore_infcall_control_state_cleanup)
234 (make_cleanup_restore_infcall_control_state): Remove.
235
236 2018-09-17 Tom Tromey <tom@tromey.com>
237
238 * gdbthread.h (struct thread_control_state): Add initializer.
239 (class thread_info) <control>: Remove initializer.
240 * inferior.h (struct inferior_control_state): Add initializer.
241 (class inferior) <control>: Remove initializer.
242 (exit_inferior_1): Update.
243 * infrun.c (struct infcall_control_state): Add constructors.
244 (save_infcall_control_state): Use new.
245 (restore_infcall_control_state, discard_infcall_control_state):
246 Use delete.
247
248 2018-09-17 Tom Tromey <tom@tromey.com>
249
250 * infrun.c (struct infcall_suspend_state) <registers>: Now a
251 unique_ptr.
252 <siginfo_data>: Now a unique_xmalloc_ptr.
253 (save_infcall_suspend_state, restore_infcall_suspend_state)
254 (discard_infcall_suspend_state)
255 (get_infcall_suspend_state_regcache): Update.
256
257 2018-09-17 Tom Tromey <tom@tromey.com>
258
259 * gdbthread.h (struct thread_suspend_state): Add initializers.
260 (class thread_info) <suspend>: Remove initializer.
261 * infrun.c (struct infcall_suspend_state): Add initializers.
262 (save_infcall_suspend_state): Use new.
263 (discard_infcall_suspend_state): Use delete.
264
265 2018-09-16 Tom Tromey <tom@tromey.com>
266
267 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
268 Remove.
269 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
270 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
271 (py_varobj_iter_new): Likewise.
272 (py_varobj_get_iterator): Use gdbpy_ref.
273
274 2018-09-16 Tom Tromey <tom@tromey.com>
275
276 * python/py-threadevent.c (py_get_event_thread): Simplify.
277 * python/py-inferior.c (infpy_thread_from_thread_handle):
278 Return immediately after calling thread_to_thread_object. Use
279 Py_RETURN_NONE.
280 (thread_to_thread_object): Set the exception on a NULL return.
281
282 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
283
284 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
285
286 2018-09-16 Tom Tromey <tom@tromey.com>
287
288 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
289 Remove.
290
291 2018-09-16 Tom Tromey <tom@tromey.com>
292
293 * python/python-internal.h (thread_to_thread_object): Change
294 return type.
295 * python/py-inferior.c (thread_to_thread_object): Return a new
296 reference.
297 (infpy_thread_from_thread_handle): Update.
298 * python/py-infthread.c (gdbpy_selected_thread): Update.
299 * python/py-stopevent.c (create_stop_event_object): Update.
300 * python/py-threadevent.c (py_get_event_thread): Return a new
301 reference.
302 (py_get_event_thread): Update.
303 * python/py-event.h (py_get_event_thread): Change return type.
304 * python/py-continueevent.c (create_continue_event_object):
305 Update.
306
307 2018-09-16 Tom Tromey <tom@tromey.com>
308
309 * python/py-progspace.c (pspy_get_objfiles): Update.
310 * python/python-internal.h (objfile_to_objfile_object): Change
311 return type.
312 * python/py-newobjfileevent.c (create_new_objfile_event_object):
313 Update.
314 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
315 Update.
316 * python/python.c (gdbpy_get_current_objfile): Update.
317 (gdbpy_objfiles): Update.
318 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
319 Update.
320 (objfile_to_objfile_object): Return a new reference.
321 * python/py-symtab.c (stpy_get_objfile): Update.
322 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
323 Update.
324
325 2018-09-16 Tom Tromey <tom@tromey.com>
326
327 * python/py-inferior.c (infpy_get_progspace): Update.
328 * python/python-internal.h (pspace_to_pspace_object): Change
329 return type.
330 * python/py-newobjfileevent.c
331 (create_clear_objfiles_event_object): Update.
332 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
333 Update.
334 * python/python.c (gdbpy_get_current_progspace): Update.
335 (gdbpy_progspaces): Update.
336 * python/py-progspace.c (pspace_to_pspace_object): Return a new
337 reference.
338 * python/py-objfile.c (objfpy_get_progspace): Update.
339 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
340 Update.
341
342 2018-09-16 Tom Tromey <tom@tromey.com>
343
344 * python/lib/gdb/__init__.py (current_progspace, objfiles)
345 (solib_name, block_for_pc, find_pc_line): New functions.
346 (execute_unwinders): Update.
347 * python/py-block.c (gdbpy_block_for_pc): Remove.
348 * python/py-inferior.c (infpy_get_progspace): New function.
349 (inferior_object_getset) <progspace>: Add.
350 * python/py-progspace.c (pspy_objfiles): Rewrite.
351 (pspy_solib_name, pspy_block_for_pc)
352 (pspy_find_pc_line, pspy_is_valid): New functions.
353 (progspace_object_methods): Add entries for solib_name,
354 block_for_pc, find_pc_line, is_valid.
355 * python/python-internal.h (gdbpy_block_for_pc)
356 (build_objfiles_list): Don't declare.
357 * python/python.c: Don't include solib.h.
358 (gdbpy_solib_name, gdbpy_find_pc_line)
359 (gdbpy_get_current_progspace, build_objfiles_list)
360 (gdbpy_objfiles): Remove.
361 (GdbMethods) <current_progspace, objfiles, block_for_pc,
362 solib_name, find_pc_line>: Remove entries.
363
364 2018-09-16 Tom Tromey <tom@tromey.com>
365
366 * top.c (new_ui_command): Use GNU style for metasyntactic
367 variables.
368 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
369 variables.
370 * maint.c (maintenance_translate_address): Remove "<>" around
371 text.
372 * interps.c (interpreter_exec_cmd): Use GNU style for
373 metasyntactic variables.
374 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
375 metasyntactic variables.
376 * tracepoint.c (tfind_range_command): Use GNU style for
377 metasyntactic variables.
378 (tfind_outside_command): Likewise.
379 (_initialize_tracepoint): Likewise.
380 * remote.c (extended_remote_target::create_inferior): Use GNU
381 style for metasyntactic variables.
382 * sparc64-tdep.c (adi_examine_command): Use GNU style for
383 metasyntactic variables.
384 (adi_assign_command): Likewise.
385
386 2018-09-16 Tom Tromey <tom@tromey.com>
387
388 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
389 metasyntactic variables. Print message if no disassembler options
390 are available.
391
392 2018-09-15 Tom Tromey <tom@tromey.com>
393
394 * infcmd.c (get_inferior_args): Return const char *.
395 * inferior.h (get_inferior_args): Return type now const.
396 * linux-tdep.c (linux_fill_prpsinfo): Update.
397 * procfs.c (procfs_target::make_corefile_notes): Update.
398
399 2018-09-07 Tom Tromey <tom@tromey.com>
400
401 * python/python.c (execute_gdb_command): Call bpstat_do_actions
402 inside the TRY.
403
404 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
405
406 * nios2-tdep.c (nios2_type_align): New.
407 (nios2_gdb_arch_init): Install type_align hook.
408
409 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
410
411 * eval.c (fake_method::fake_method): Call xzalloc directly for a
412 type that is neither object file owned, nor gdbarch owned.
413 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
414 gdbarch is non-NULL.
415 (alloc_type_instance): Allocate non-objfile owned types on the
416 gdbarch obstack.
417 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
418 using TYPE_ALLOC to ensure memory is allocated on the correct
419 obstack.
420 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
421 obstack, or the gdbarch obstack.
422 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
423
424 2018-09-14 Tom Tromey <tom@tromey.com>
425
426 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
427 block.
428
429 2018-09-14 Tom Tromey <tom@tromey.com>
430
431 * nat/fork-inferior.c (get_startup_shell): Remove "static".
432
433 2018-09-13 Tom Tromey <tom@tromey.com>
434
435 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
436 static.
437
438 2018-09-13 Tom Tromey <tom@tromey.com>
439
440 * exec.c (try_open_exec_file): Use std::string.
441
442 2018-09-13 Tom Tromey <tom@tromey.com>
443
444 * utils.h (gdb_bfd_errmsg): Return std::string.
445 * exec.c (exec_file_attach): Update.
446 * compile/compile-object-load.c (compile_object_load): Update.
447 * utils.c (gdb_bfd_errmsg): Return std::string.
448
449 2018-09-13 Tom Tromey <tom@tromey.com>
450
451 * procfs.c (struct procinfo_deleter): New.
452 (procinfo_up): New typedef.
453 (do_destroy_procinfo_cleanup): Remove.
454 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
455
456 2018-09-13 Tom Tromey <tom@tromey.com>
457
458 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
459
460 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
461 2018-09-13 Tom Tromey <tom@tromey.com>
462
463 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
464 (pspy_get_objfiles): New function.
465 (progspace_object_methods): New.
466 (pspace_object_type): Add tp_methods callback.
467 * python/python-internal.h (build_objfiles_list): New
468 declaration.
469 * python/python.c (build_objfiles_list): New function.
470 (gdbpy_objfiles): Implement using build_objfiles_list.
471 * NEWS: Mention the Progspace.objfiles method.
472
473 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
474
475 * python/py-inferior.c (infpy_get_progspace): New function.
476 (inferior_object_getset): Add progspace property.
477 * NEWS: Mention the new property.
478
479 2018-09-13 Tom Tromey <tom@tromey.com>
480
481 PR rust/23650:
482 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
483
484 2018-09-13 Tom Tromey <tom@tromey.com>
485
486 PR rust/23626:
487 * rust-lang.c (rust_enum_variant): Now static.
488 (rust_empty_enum_p): New function.
489 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
490 Handle empty enum.
491
492 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
493
494 * python/py-inferior.c (infpy_repr): New.
495 (inferior_object_type): Register infpy_repr.
496 * python/py-objfile.c (objfpy_repr): New.
497 (objfile_object_type): Register objfpy_repr.
498
499 2018-09-12 John Baldwin <jhb@FreeBSD.org>
500
501 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
502
503 2018-09-12 John Baldwin <jhb@FreeBSD.org>
504
505 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
506 typo.
507
508 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
509
510 * common/common-utils.c: Don't include '<sys/stat.h>'.
511 (is_regular_file): Move to...
512 * common/filestuff.c (is_regular_file): ... here.
513 * common/common-utils.h (is_regular_file): Move to...
514 * common/filestuff.h (is_regular_file): ... here.
515
516 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
517
518 * skip.c (debug_skip): New variable.
519 (skiplist_entry::do_skip_file_p): Add debug output.
520 (skiplist_entry::do_skip_gfile_p): Likewise.
521 (skiplist_entry::skip_function_p): Likewise.
522 (_initialize_step_skip): Create debug command.
523 * NEWS: Mention set/show debug skip.
524
525 2018-09-11 Xavier Roirand <roirand@adacore.com>
526
527 * darwin-nat.c (should_disable_startup_with_shell):
528 New function.
529 (darwin_nat_target::create_inferior): Add call.
530
531 2018-09-11 Xavier Roirand <roirand@adacore.com>
532
533 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
534 inf_port, msg_state>: Initialize.
535 (struct darwin_thread_info) <signaled, single_step>: Change
536 type and initialize.
537 (struct darwin_thread_info) <event>: Initialize.
538
539 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
540
541 PR gdb/23555
542 PR gdb/23558
543 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
544 guesses.
545
546 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
547
548 Revert:
549 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
550
551 PR gdb/23555
552 PR gdb/23558
553 * gnulib/aclocal.m4: Regenerate.
554 * gnulib/config.in: Regenerate.
555 * gnulib/configure: Regenerate.
556 * gnulib/import/Makefile.am: Update.
557 * gnulib/import/Makefile.in: Update.
558 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
559 * gnulib/import/_Noreturn.h: ... this.
560 * gnulib/import/alloca.in.h: Update.
561 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
562 * gnulib/import/arg-nonnull.h: ... this.
563 * gnulib/import/assure.h: Update.
564 * gnulib/import/at-func.c: Update.
565 * gnulib/import/basename-lgpl.c: Update.
566 * gnulib/import/extra/snippet/c++defs.h: Rename to...
567 * gnulib/import/c++defs.h: ... this.
568 * gnulib/import/canonicalize-lgpl.c: Update.
569 * gnulib/import/cdefs.h: Update.
570 * gnulib/import/chdir-long.c: Update.
571 * gnulib/import/chdir-long.h: Update.
572 * gnulib/import/cloexec.c: Update.
573 * gnulib/import/cloexec.h: Update.
574 * gnulib/import/close.c: Update.
575 * gnulib/import/closedir.c: Update.
576 * gnulib/import/config.charset: Update.
577 * gnulib/import/dirent-private.h: Update.
578 * gnulib/import/dirent.in.h: Update.
579 * gnulib/import/dirfd.c: Update.
580 * gnulib/import/dirname-lgpl.c: Update.
581 * gnulib/import/dirname.h: Update.
582 * gnulib/import/dosname.h: Update.
583 * gnulib/import/dup-safer-flag.c: Update.
584 * gnulib/import/dup-safer.c: Update.
585 * gnulib/import/dup.c: Update.
586 * gnulib/import/dup2.c: Update.
587 * gnulib/import/errno.in.h: Update.
588 * gnulib/import/error.c: Update.
589 * gnulib/import/error.h: Update.
590 * gnulib/import/exitfail.c: Update.
591 * gnulib/import/exitfail.h: Update.
592 * gnulib/import/extra/update-copyright: Update.
593 * gnulib/import/fchdir.c: Update.
594 * gnulib/import/fcntl.c: Update.
595 * gnulib/import/fcntl.in.h: Update.
596 * gnulib/import/fd-hook.c: Update.
597 * gnulib/import/fd-hook.h: Update.
598 * gnulib/import/fd-safer-flag.c: Update.
599 * gnulib/import/fd-safer.c: Update.
600 * gnulib/import/fdopendir.c: Update.
601 * gnulib/import/filename.h: Update.
602 * gnulib/import/filenamecat-lgpl.c: Update.
603 * gnulib/import/filenamecat.h: Update.
604 * gnulib/import/flexmember.h: Update.
605 * gnulib/import/float+.h: Update.
606 * gnulib/import/float.c: Update.
607 * gnulib/import/float.in.h: Update.
608 * gnulib/import/fnmatch.c: Update.
609 * gnulib/import/fnmatch.in.h: Update.
610 * gnulib/import/fnmatch_loop.c: Update.
611 * gnulib/import/fpucw.h: Update.
612 * gnulib/import/frexp.c: Update.
613 * gnulib/import/frexpl.c: Update.
614 * gnulib/import/fstat.c: Update.
615 * gnulib/import/fstatat.c: Update.
616 * gnulib/import/getcwd-lgpl.c: Update.
617 * gnulib/import/getcwd.c: Update.
618 * gnulib/import/getdtablesize.c: Update.
619 * gnulib/import/getlogin_r.c: Update.
620 * gnulib/import/getprogname.c: Update.
621 * gnulib/import/getprogname.h: Update.
622 * gnulib/import/gettext.h: Update.
623 * gnulib/import/gettimeofday.c: Update.
624 * gnulib/import/glob-libc.h: Update.
625 * gnulib/import/glob.c: Update.
626 * gnulib/import/glob.in.h: Update.
627 * gnulib/import/glob_internal.h: Update.
628 * gnulib/import/glob_pattern_p.c: Update.
629 * gnulib/import/globfree.c: Update.
630 * gnulib/import/hard-locale.c: Update.
631 * gnulib/import/hard-locale.h: Update.
632 * gnulib/import/intprops.h: Update.
633 * gnulib/import/inttypes.in.h: Update.
634 * gnulib/import/isnan.c: Update.
635 * gnulib/import/isnand-nolibm.h: Update.
636 * gnulib/import/isnand.c: Update.
637 * gnulib/import/isnanl-nolibm.h: Update.
638 * gnulib/import/isnanl.c: Update.
639 * gnulib/import/itold.c: Update.
640 * gnulib/import/libc-config.h: Update.
641 * gnulib/import/limits.in.h: Update.
642 * gnulib/import/localcharset.c: Update.
643 * gnulib/import/localcharset.h: Update.
644 * gnulib/import/localtime-buffer.c: Update.
645 * gnulib/import/localtime-buffer.h: Update.
646 * gnulib/import/lstat.c: Update.
647 * gnulib/import/m4/00gnulib.m4: Update.
648 * gnulib/import/m4/__inline.m4: Update.
649 * gnulib/import/m4/absolute-header.m4: Update.
650 * gnulib/import/m4/alloca.m4: Update.
651 * gnulib/import/m4/builtin-expect.m4: Update.
652 * gnulib/import/m4/canonicalize.m4: Update.
653 * gnulib/import/m4/chdir-long.m4: Update.
654 * gnulib/import/m4/close.m4: Update.
655 * gnulib/import/m4/closedir.m4: Update.
656 * gnulib/import/m4/configmake.m4: Update.
657 * gnulib/import/m4/d-ino.m4: Update.
658 * gnulib/import/m4/d-type.m4: Update.
659 * gnulib/import/m4/dirent_h.m4: Update.
660 * gnulib/import/m4/dirfd.m4: Update.
661 * gnulib/import/m4/dirname.m4: Update.
662 * gnulib/import/m4/double-slash-root.m4: Update.
663 * gnulib/import/m4/dup.m4: Update.
664 * gnulib/import/m4/dup2.m4: Update.
665 * gnulib/import/m4/eealloc.m4: Update.
666 * gnulib/import/m4/environ.m4: Update.
667 * gnulib/import/m4/errno_h.m4: Update.
668 * gnulib/import/m4/error.m4: Update.
669 * gnulib/import/m4/exponentd.m4: Update.
670 * gnulib/import/m4/exponentl.m4: Update.
671 * gnulib/import/m4/extensions.m4: Update.
672 * gnulib/import/m4/extern-inline.m4: Update.
673 * gnulib/import/m4/fchdir.m4: Update.
674 * gnulib/import/m4/fcntl-o.m4: Update.
675 * gnulib/import/m4/fcntl.m4: Update.
676 * gnulib/import/m4/fcntl_h.m4: Update.
677 * gnulib/import/m4/fdopendir.m4: Update.
678 * gnulib/import/m4/filenamecat.m4: Update.
679 * gnulib/import/m4/flexmember.m4: Update.
680 * gnulib/import/m4/float_h.m4: Update.
681 * gnulib/import/m4/fnmatch.m4: Update.
682 * gnulib/import/m4/fnmatch_h.m4: Update.
683 * gnulib/import/m4/fpieee.m4: Update.
684 * gnulib/import/m4/frexp.m4: Update.
685 * gnulib/import/m4/frexpl.m4: Update.
686 * gnulib/import/m4/fstat.m4: Update.
687 * gnulib/import/m4/fstatat.m4: Update.
688 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
689 * gnulib/import/m4/getcwd-path-max.m4: Update.
690 * gnulib/import/m4/getcwd.m4: Update.
691 * gnulib/import/m4/getdtablesize.m4: Update.
692 * gnulib/import/m4/getlogin.m4: Update.
693 * gnulib/import/m4/getlogin_r.m4: Update.
694 * gnulib/import/m4/getpagesize.m4: Update.
695 * gnulib/import/m4/getprogname.m4: Update.
696 * gnulib/import/m4/gettimeofday.m4: Update.
697 * gnulib/import/m4/glibc21.m4: Update.
698 * gnulib/import/m4/glob.m4: Update.
699 * gnulib/import/m4/glob_h.m4: Update.
700 * gnulib/import/m4/gnulib-cache.m4: Update.
701 * gnulib/import/m4/gnulib-common.m4: Update.
702 * gnulib/import/m4/gnulib-comp.m4: Update.
703 * gnulib/import/m4/gnulib-tool.m4: Update.
704 * gnulib/import/m4/hard-locale.m4: Update.
705 * gnulib/import/m4/include_next.m4: Update.
706 * gnulib/import/m4/inttypes-pri.m4: Update.
707 * gnulib/import/m4/inttypes.m4: Update.
708 * gnulib/import/m4/isnand.m4: Update.
709 * gnulib/import/m4/isnanl.m4: Update.
710 * gnulib/import/m4/largefile.m4: Update.
711 * gnulib/import/m4/limits-h.m4: Update.
712 * gnulib/import/m4/localcharset.m4: Update.
713 * gnulib/import/m4/locale-fr.m4: Update.
714 * gnulib/import/m4/locale-ja.m4: Update.
715 * gnulib/import/m4/locale-zh.m4: Update.
716 * gnulib/import/m4/localtime-buffer.m4: Update.
717 * gnulib/import/m4/longlong.m4: Update.
718 * gnulib/import/m4/lstat.m4: Update.
719 * gnulib/import/m4/malloc.m4: Update.
720 * gnulib/import/m4/malloca.m4: Update.
721 * gnulib/import/m4/math_h.m4: Update.
722 * gnulib/import/m4/mbrtowc.m4: Update.
723 * gnulib/import/m4/mbsinit.m4: Update.
724 * gnulib/import/m4/mbsrtowcs.m4: Update.
725 * gnulib/import/m4/mbstate_t.m4: Update.
726 * gnulib/import/m4/memchr.m4: Update.
727 * gnulib/import/m4/memmem.m4: Update.
728 * gnulib/import/m4/mempcpy.m4: Update.
729 * gnulib/import/m4/memrchr.m4: Update.
730 * gnulib/import/m4/mkdir.m4: Update.
731 * gnulib/import/m4/mkstemp.m4: Update.
732 * gnulib/import/m4/mmap-anon.m4: Update.
733 * gnulib/import/m4/mode_t.m4: Update.
734 * gnulib/import/m4/msvc-inval.m4: Update.
735 * gnulib/import/m4/msvc-nothrow.m4: Update.
736 * gnulib/import/m4/multiarch.m4: Update.
737 * gnulib/import/m4/nocrash.m4: Update.
738 * gnulib/import/m4/off_t.m4: Update.
739 * gnulib/import/m4/onceonly.m4: Update.
740 * gnulib/import/m4/open-cloexec.m4: Update.
741 * gnulib/import/m4/open.m4: Update.
742 * gnulib/import/m4/openat.m4: Update.
743 * gnulib/import/m4/opendir.m4: Update.
744 * gnulib/import/m4/pathmax.m4: Update.
745 * gnulib/import/m4/rawmemchr.m4: Update.
746 * gnulib/import/m4/readdir.m4: Update.
747 * gnulib/import/m4/readlink.m4: Update.
748 * gnulib/import/m4/realloc.m4: Update.
749 * gnulib/import/m4/rename.m4: Update.
750 * gnulib/import/m4/rewinddir.m4: Update.
751 * gnulib/import/m4/rmdir.m4: Update.
752 * gnulib/import/m4/save-cwd.m4: Update.
753 * gnulib/import/m4/secure_getenv.m4: Update.
754 * gnulib/import/m4/setenv.m4: Update.
755 * gnulib/import/m4/signal_h.m4: Update.
756 * gnulib/import/m4/ssize_t.m4: Update.
757 * gnulib/import/m4/stat-time.m4: Update.
758 * gnulib/import/m4/stat.m4: Update.
759 * gnulib/import/m4/std-gnu11.m4: Update.
760 * gnulib/import/m4/stdbool.m4: Update.
761 * gnulib/import/m4/stddef_h.m4: Update.
762 * gnulib/import/m4/stdint.m4: Update.
763 * gnulib/import/m4/stdio_h.m4: Update.
764 * gnulib/import/m4/stdlib_h.m4: Update.
765 * gnulib/import/m4/strchrnul.m4: Update.
766 * gnulib/import/m4/strdup.m4: Update.
767 * gnulib/import/m4/strerror.m4: Update.
768 * gnulib/import/m4/string_h.m4: Update.
769 * gnulib/import/m4/strstr.m4: Update.
770 * gnulib/import/m4/strtok_r.m4: Update.
771 * gnulib/import/m4/sys_socket_h.m4: Update.
772 * gnulib/import/m4/sys_stat_h.m4: Update.
773 * gnulib/import/m4/sys_time_h.m4: Update.
774 * gnulib/import/m4/sys_types_h.m4: Update.
775 * gnulib/import/m4/tempname.m4: Update.
776 * gnulib/import/m4/time_h.m4: Update.
777 * gnulib/import/m4/unistd-safer.m4: Update.
778 * gnulib/import/m4/unistd_h.m4: Update.
779 * gnulib/import/m4/warn-on-use.m4: Update.
780 * gnulib/import/m4/wchar_h.m4: Update.
781 * gnulib/import/m4/wchar_t.m4: Update.
782 * gnulib/import/m4/wctype_h.m4: Update.
783 * gnulib/import/m4/wint_t.m4: Update.
784 * gnulib/import/malloc.c: Update.
785 * gnulib/import/malloc/scratch_buffer.h: Update.
786 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
787 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
788 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
789 * gnulib/import/malloca.c: Update.
790 * gnulib/import/malloca.h: Update.
791 * gnulib/import/malloca.valgrind: Update.
792 * gnulib/import/math.in.h: Update.
793 * gnulib/import/mbrtowc.c: Update.
794 * gnulib/import/mbsinit.c: Update.
795 * gnulib/import/mbsrtowcs-impl.h: Update.
796 * gnulib/import/mbsrtowcs-state.c: Update.
797 * gnulib/import/mbsrtowcs.c: Update.
798 * gnulib/import/memchr.c: Update.
799 * gnulib/import/memmem.c: Update.
800 * gnulib/import/mempcpy.c: Update.
801 * gnulib/import/memrchr.c: Update.
802 * gnulib/import/mkdir.c: Update.
803 * gnulib/import/mkstemp.c: Update.
804 * gnulib/import/msvc-inval.c: Update.
805 * gnulib/import/msvc-inval.h: Update.
806 * gnulib/import/msvc-nothrow.c: Update.
807 * gnulib/import/msvc-nothrow.h: Update.
808 * gnulib/import/open.c: Update.
809 * gnulib/import/openat-die.c: Update.
810 * gnulib/import/openat-priv.h: Update.
811 * gnulib/import/openat-proc.c: Update.
812 * gnulib/import/openat.c: Update.
813 * gnulib/import/openat.h: Update.
814 * gnulib/import/opendir.c: Update.
815 * gnulib/import/pathmax.h: Update.
816 * gnulib/import/pipe-safer.c: Update.
817 * gnulib/import/rawmemchr.c: Update.
818 * gnulib/import/readdir.c: Update.
819 * gnulib/import/readlink.c: Update.
820 * gnulib/import/realloc.c: Update.
821 * gnulib/import/ref-add.sin: Update.
822 * gnulib/import/ref-del.sin: Update.
823 * gnulib/import/rename.c: Update.
824 * gnulib/import/rewinddir.c: Update.
825 * gnulib/import/rmdir.c: Update.
826 * gnulib/import/same-inode.h: Update.
827 * gnulib/import/save-cwd.c: Update.
828 * gnulib/import/save-cwd.h: Update.
829 * gnulib/import/scratch_buffer.h: Update.
830 * gnulib/import/secure_getenv.c: Update.
831 * gnulib/import/setenv.c: Update.
832 * gnulib/import/signal.in.h: Update.
833 * gnulib/import/stat-time.c: Update.
834 * gnulib/import/stat-time.h: Update.
835 * gnulib/import/stat-w32.c: Update.
836 * gnulib/import/stat-w32.h: Update.
837 * gnulib/import/stat.c: Update.
838 * gnulib/import/stdbool.in.h: Update.
839 * gnulib/import/stddef.in.h: Update.
840 * gnulib/import/stdint.in.h: Update.
841 * gnulib/import/stdio.in.h: Update.
842 * gnulib/import/stdlib.in.h: Update.
843 * gnulib/import/str-two-way.h: Update.
844 * gnulib/import/strchrnul.c: Update.
845 * gnulib/import/strdup.c: Update.
846 * gnulib/import/streq.h: Update.
847 * gnulib/import/strerror-override.c: Update.
848 * gnulib/import/strerror-override.h: Update.
849 * gnulib/import/strerror.c: Update.
850 * gnulib/import/string.in.h: Update.
851 * gnulib/import/stripslash.c: Update.
852 * gnulib/import/strnlen1.c: Update.
853 * gnulib/import/strnlen1.h: Update.
854 * gnulib/import/strstr.c: Update.
855 * gnulib/import/strtok_r.c: Update.
856 * gnulib/import/sys_stat.in.h: Update.
857 * gnulib/import/sys_time.in.h: Update.
858 * gnulib/import/sys_types.in.h: Update.
859 * gnulib/import/tempname.c: Update.
860 * gnulib/import/tempname.h: Update.
861 * gnulib/import/time.in.h: Update.
862 * gnulib/import/unistd--.h: Update.
863 * gnulib/import/unistd-safer.h: Update.
864 * gnulib/import/unistd.in.h: Update.
865 * gnulib/import/unsetenv.c: Update.
866 * gnulib/import/verify.h: Update.
867 * gnulib/import/extra/snippet/warn-on-use.h: Update.
868 * gnulib/import/wchar.in.h: Update.
869 * gnulib/import/wctype.in.h: Update.
870 * gnulib/import/xalloc-oversized.h: Update.
871 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
872 "53e2c179f26a890fa6685af4b6c1397ee370433b".
873
874 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
875
876 * record-btrace.c (get_thread_current_frame): Remove
877 old_inferior_ptid.
878
879 2018-09-10 Jerome Guitton <guitton@adacore.com>
880
881 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
882 with check_tag to 1 if and only if the type is tagged and the
883 component being searched cannot been found in the current
884 view. Otherwise, always call ada_to_fixed_type with
885 check_tag to 0.
886
887 2018-09-10 Xavier Roirand <roirand@adacore.com>
888
889 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
890 declaration.
891 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
892 * ada-varobj.c (ada_varobj_get_number_of_children,
893 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
894
895 2018-09-10 Xavier Roirand <roirand@adacore.com>
896
897 * ada-valprint.c (ada_value_print): Use type instead of
898 enclosing type.
899
900 2018-09-10 Xavier Roirand <roirand@adacore.com>
901
902 * ada-lang.c (ada_value_subscript): Handle case when parameter is
903 an array of access to unconstrained array.
904
905 2018-09-10 Xavier Roirand <roirand@adacore.com>
906
907 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
908 (ada_check_typedef): Use it.
909
910 2018-09-10 Xavier Roirand <roirand@adacore.com>
911
912 * ada-varobj.c (ada_varobj_describe_struct_child)
913 (ada_varobj_describe_child): Handle union case like struct one.
914
915 2018-09-10 Tom Tromey <tom@tromey.com>
916
917 PR python/18380:
918 * python/python.c (_initialize_python): Make example in "python"
919 help work in Python 3.
920
921 2018-09-10 Eli Zaretskii <eliz@gnu.org>
922
923 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
924 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
925 $(EXEEXT) to the script, as it is not a program.
926
927 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
928
929 * python/py-prettyprint.c (pretty_print_one_value): Return
930 gdbpy_ref<>.
931 (print_string_repr): Adjust.
932 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
933 * python/python-internal.h (apply_varobj_pretty_printer): Return
934 gdbpy_ref<>.
935 * varobj.c (varobj_value_get_print_value): Adjust.
936
937 2018-09-08 Tom Tromey <tom@tromey.com>
938
939 PR python/16047:
940 * python/py-prettyprint.c (pretty_print_one_value): Check for
941 to_string method.
942
943 2018-09-08 Joel Brobecker <brobecker@adacore.com>
944
945 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
946 replace_operator_with_call.
947
948 2018-09-08 Joel Brobecker <brobecker@adacore.com>
949
950 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
951
952 2018-09-08 Joel Brobecker <brobecker@adacore.com>
953
954 * ada-typeprint.c (print_range): Print the bounds using TYPE
955 rather than its TYPE_TARGET_TYPE.
956
957 2018-09-08 Joel Brobecker <brobecker@adacore.com>
958
959 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
960 call to ada_to_fixed_value_create.
961
962 2018-09-08 Jerome Guitton <guitton@adacore.com>
963
964 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
965
966 2018-09-08 Joel Brobecker <brobecker@adacore.com>
967
968 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
969 by calls to error.
970
971 2018-09-08 Joel Brobecker <brobecker@adacore.com>
972
973 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
974 Move update of loop variable "fi".
975
976 2018-09-08 Joel Brobecker <brobecker@adacore.com>
977
978 * ada-lang.c (value_assign_to_component): In the case of
979 big-endian targets, extract the bits of the given VAL
980 using an src_offset of zero if container is not a scalar.
981
982 2018-09-06 Simon Ser <contact@emersion.fr>
983
984 PR gdb/23105
985 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
986 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
987 * fbsd-tdep.c (fbsd_make_note_desc): New.
988 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
989 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
990 * target.h (enum target_object) Add FreeBSD-specific
991 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
992
993 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
994
995 * compile/compile-c.h (generate_c_for_variable_locations):
996 Change reference to pointer.
997 * compile/compile-c-support.c (compile_program) <compute>:
998 Likewise.
999 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1000 (generate_c_for_for_one_variable): Likewise
1001 (generate_c_for_variable_locations): Likewise
1002 * compile/compile-c-types.c (compile_c_instance::convert_type):
1003 Likewise
1004 * compile/compile-cplus-symbols.c (convert_one_symbol):
1005 std::move the scope passed to enter_scope.
1006 * compile/compile-cplus-types.c
1007 (compile_cplus_instance::enter_scope): Make parameter
1008 rvalue-reference.
1009 (compile_cplus_instance::new_scope): Change reference to
1010 pointer.
1011 (compile_cplus_instance::convert_type): Likewise
1012 (compile_cplus_convert_typedef): std::move the scope passed to
1013 enter_scope.
1014 (compile_cplus_convert_struct_or_union): Likewise.
1015 (compile_cplus_convert_enum): Likewise.
1016 (compile_cplus_convert_namespace): Likewise.
1017 * compile/compile-cplus.h (compile_cplus_instance)
1018 <enter_scope>: Make parameter rvalue-reference.
1019 * compile/compile-internal.h (compile_instance)
1020 <get_cached_type>: Likewise
1021 * compile/compile-loc2c.c (push): Likewise
1022 (pushf): Likewise
1023 (unary): Likewise
1024 (binary): Likewise
1025 (print_label): Likewise
1026 (pushf_register_address): Likewise
1027 (pushf_register): Likewise
1028 (do_compile_dwarf_expr_to_c): Likewise
1029 (compile_dwarf_expr_to_c): Likewise
1030 (compile_dwarf_bounds_to_c): Likewise
1031 * compile/compile.c (compile_instance::get_cached_type):
1032 Likewise
1033 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1034 (compile_dwarf_bounds_to_c): Likewise
1035 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1036 (dwarf2_compile_property_to_c): Likewise
1037 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1038 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1039 Likewise
1040
1041 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1044 * tui/tui-data.c (init_content_element): Don't initialize it.
1045
1046 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 * tui/tui-data.h (struct tui_win_info)
1049 <detail::opaque>: Remove.
1050 * tui/tui-data.c (init_win_info): Remove assignment.
1051
1052 2018-09-05 Tom Tromey <tom@tromey.com>
1053
1054 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1055 -Wformat-nonliteral.
1056 * target-float.c (host_float_ops<T>::to_string)
1057 (host_float_ops<T>::from_string): Use
1058 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1059 * configure: Rebuild.
1060
1061 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1062
1063 * printcmd.c (printf_c_string): Use
1064 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1065 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1066
1067 2018-09-05 Tom Tromey <tom@tromey.com>
1068
1069 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1070
1071 2018-09-05 Tom de Vries <tdevries@suse.de>
1072
1073 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1074 with resolve_abstract_p == true.
1075 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1076 defaulting to false. Propagate resolve_abstract_p to
1077 dwarf2_fetch_die_loc_sect_off.
1078 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1079 parameter, defaulting to false.
1080 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1081 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1082 parameter.
1083 * dwarf2read.h (struct die_info): Forward-declare.
1084 (die_info_ptr): New typedef.
1085 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1086
1087 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1088
1089 GDB 8.2 released.
1090
1091 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1092 Pedro Alves <palves@redhat.com>
1093
1094 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1095 "aclocal-m4-deps.mk". Include file here.
1096 $(srcdir)/aclocal.m4: Add "configure.ac".
1097 * gnulib/aclocal-m4-deps.mk: New file.
1098 * gnulib/update-gnulib.sh: Automatically update
1099 "aclocal-m4-deps.mk".
1100
1101 2018-09-04 Tom Tromey <tom@tromey.com>
1102
1103 * configure: Rebuild.
1104 * configure.ac: Remove multi-ice code.
1105
1106 2018-09-04 Tom Tromey <tom@tromey.com>
1107
1108 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1109 (ada-exp.o): Update.
1110
1111 2018-09-04 Tom Tromey <tom@tromey.com>
1112
1113 * Makefile.in (printcmd.o, target-float.o): Remove.
1114 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1115
1116 2018-09-04 Tom Tromey <tom@tromey.com>
1117
1118 * gnulib/Makefile.in: Remove obsolete comment.
1119 * Makefile.in: Remove obsolete comment.
1120
1121 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1122
1123 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1124 line with '+'.
1125
1126 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1127
1128 * riscv-tdep.c: Add 'prologue-value.h' include.
1129 (struct riscv_unwind_cache): New struct.
1130 (riscv_debug_unwinder): New global.
1131 (riscv_scan_prologue): Update arguments, capture register details
1132 from prologue scan.
1133 (riscv_skip_prologue): Reformat arguments line, move end of
1134 prologue calculation into riscv_scan_prologue.
1135 (riscv_frame_cache): Update return type, create
1136 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1137 details.
1138 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1139 (riscv_frame_prev_register): Use the trad_frame within the
1140 riscv_unwind_cache.
1141 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1142 flag.
1143
1144 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1145
1146 * trad-frame.h (trad_frame_set_realreg): Declare.
1147 (trad_frame_set_addr): Declare.
1148 * trad-frame.c (trad_frame_set_realreg): Define new function.
1149 (trad_frame_set_addr): Define new function.
1150 (trad_frame_set_reg_realreg): Use new function.
1151 (trad_frame_set_reg_addr): Use new function.
1152
1153 2018-09-01 Keith Seitz <keiths@redhat.com>
1154
1155 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1156 pulongest instead of "%lld".
1157 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1158 ATTRIBUTE_UNUSED.
1159
1160 2018-08-31 Tom Tromey <tom@tromey.com>
1161
1162 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1163 variant part type.
1164
1165 2018-08-31 Pedro Alves <palves@redhat.com>
1166
1167 * gdbarch.h: Regenerate.
1168
1169 2018-08-31 Pedro Alves <palves@redhat.com>
1170
1171 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1172 * target.h (Hardware watchpoint interfaces): Describe
1173 continuable/steppable/non-steppable watchpoints.
1174 * gdbarch.h, gdbarch.c: Regenerate.
1175
1176 2018-08-31 Pedro Alves <palves@redhat.com>
1177
1178 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1179 Delete.
1180 * s390-linux-nat.c
1181 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1182 * target.h (target_ops::have_continuable_watchpoint): Delete.
1183 (target_have_continuable_watchpoint): Delete.
1184 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1185 * target-delegates.c: Regenerate.
1186
1187 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1190 the files present in "gnulib/import/m4/".
1191
1192 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1193
1194 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1195 c.sw, c.swsp, and c.sdsp.
1196
1197 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1198
1199 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1200 (riscv_read_misa_reg): Don't cache value read into inferior data.
1201 (riscv_new_inferior_data): Delete.
1202 (riscv_inferior_data_cleanup): Delete.
1203 (riscv_inferior_data): Delete.
1204 (riscv_invalidate_inferior_data): Delete.
1205 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1206
1207 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1208
1209 * compile/compile-cplus-types.c
1210 (compile_cplus_instance::leave_scope): Take the address of scope
1211 object.
1212 (compile_cplus_instance::convert_qualified_base): Compare quals
1213 to 0.
1214
1215 2018-08-30 Keith Seitz <keiths@redhat.com>
1216
1217 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1218 Use "%s" and host_address_to_string instead of "%p" in printf.
1219
1220 2018-08-29 Keith Seitz <keiths@redhat.com>
1221
1222 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1223 and compile-cplus-types.c.
1224 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1225 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1226 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1227 Declare.
1228 * compile/compile-c-support.c: Include compile-cplus.h.
1229 (load_libcompile): Templatize.
1230 (get_compile_context): "New" function.
1231 (c_get_compile_context): Use get_compile_context.
1232 (cplus_get_compile_context): New function.
1233 (cplus_push_user_expression, cplus_pop_user_expression)
1234 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1235 (cplus_compute_program): Define new structs/functions.
1236 * compile/compile-cplus-symmbols.c: New file.
1237 * compile/compile-cplus-types.c: New file.
1238 * compile/compile-cplus.h: New file.
1239 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1240 Declare.
1241 * compile/compile-object-load.c (get_out_value_type): Use
1242 strncmp_iw when comparing symbol names.
1243 (compile_object_load): Add mst_bss and mst_data.
1244 * compile/compile.c (_initialize_compile): Remove
1245 -Wno-implicit-function-declaration from `compile_args'.
1246 * compile/gcc-cp-plugin.h: New file.
1247 * NEWS: Mention C++ compile support and new debug options.
1248
1249 2018-08-29 Keith Seitz <keiths@redhat.com>
1250
1251 * linespec.c (collect_info::add_symbol): Make virtual.
1252 (struct symbol_searcher_collect_info): New struct.
1253 (symbol_searcher::find_all_symbols): New method.
1254 * symtab.h (class symbol_searcher): New class.
1255
1256 2018-08-29 Keith Seitz <keiths@redhat.com>
1257
1258 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1259 Change to vector of block_symbol. Update all users.
1260 (struct collect_info) <symbols>: Likewise.
1261 (collect_info::add_symbol): Take block_symbol as argument.
1262 Update all callers.
1263 (decode_compound_collector) <m_symbols>: Change type to vector
1264 of block_symbol. Update all users.
1265 (decode_compound_collector::operator ()): Change parameter type
1266 to block_symbol.
1267 (find_method, find_function_symbols, find_linespec_symbols)
1268 (find_label_symbols_in_block, find_label_symbols): Change symbol
1269 vectors to block_symbol vectors.
1270 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1271 block_symbol.
1272
1273 2018-08-29 Keith Seitz <keiths@redhat.com>
1274
1275 * linespec.c (symbolp): Remove typedef and VEC definitions.
1276 (bound_minimal_symbol_d): Likewise.
1277
1278 2018-08-29 Keith Seitz <keiths@redhat.com>
1279
1280 * linespec.c (decode_compound_collector::decode_compound_collector):
1281 Remove initialization for `m_symtabs'.
1282 (decode_compound_collector::release_symbols): Change return type
1283 to std::vector. Update all callers.
1284 (class decode_compound_collector) <m_symbols>: Change type to
1285 std::vector.
1286 (lookup_prefix_sym): Change return type to std::vector. Update all
1287 callers.
1288 (compare_symbols): Remove.
1289 (std_compare_symbols): Rename to `compare_symbols'.
1290 (find_method): Change `sym_classes' parameter to std::vector.
1291 Update all callers. Use std::sort to sort sym_classes.
1292 (find_linespec_symbols): Remove cleanup.
1293
1294 2018-08-29 Keith Seitz <keiths@redhat.com>
1295
1296 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1297 std::vector. Update all users.
1298 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1299 (struct collect_info) <minimal_symbols>: Likewise.
1300 (compare_msymbols): Return bool. Change parameters to const
1301 bound_minimal_symbol references.
1302 (find_method, find_function_symbols, find_linespec_symbols): Change
1303 `minsyms' parameter to std::vector. Update all callers.
1304
1305 2018-08-29 Keith Seitz <keiths@redhat.com>
1306
1307 * linespec.c (struct linespec) <label_symbols>: Change type to
1308 std::vector. Update all users.
1309 (find_label_symbols_in_block): Change `result' parameter to
1310 std::vector. Update all callers.
1311 (find_label_symbols): Return std::vector. Update all callers.
1312
1313 2018-08-29 Keith Seitz <keiths@redhat.com>
1314
1315 * linespec.c (struct linespec) <function_symbols>: Change type to
1316 std::vector. Update all users.
1317 (struct collect_info) <function_symbols>: Likewise.
1318 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1319 (std_compare_symbols): New function.
1320 (find_method, find_function_symbols, find_linespec_symbols)
1321 (find_label_symbols_in_block): Change `symbols' parameter to
1322 std::vector. Update all callers.
1323 (find_label_symbols): Likewise for `function_symbols' and
1324 `label_funcs_ret'.
1325
1326 2018-08-29 Keith Seitz <keiths@redhat.com>
1327
1328 * linespec.c (symtab_vector_up): Define.
1329 (struct linespec) <file_symtabs>: Change type to std::vector *.
1330 Update all uses.
1331 (struct collect_info) <file_symtabs>: Likewise.
1332 (collect_symtabs_from_filename): Return symtab_vector_up.
1333 Update all callers.
1334 (decode_objc): Remove cleanup.
1335 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1336 (symtab_collector::release_symtabs): Return symtab_vector_up.
1337 Update all callers.
1338 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1339 Update all users.
1340 (collect_symtabs_from_filename, symtabs_from_filename): Return
1341 symtab_vector_up. Update all callers.
1342
1343 2018-08-29 Tom Tromey <tom@tromey.com>
1344
1345 * csky-tdep.c (csky_analyze_prologue): Use
1346 core_addr_to_string_nz.
1347
1348 2018-08-29 Tom Tromey <tom@tromey.com>
1349
1350 * windows-nat.c (struct xlate_exception) <them>: Change type to
1351 DWORD.
1352 (xlate): Fix formatting. Remove last entry.
1353 (struct xlate_exception, xlate): Comment out.
1354 (windows_nat_target::resume): Use ranged for.
1355
1356 2018-08-29 Jim Wilson <jimw@sifive.com>
1357
1358 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1359 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1360 of NT_PRFPREG.
1361 (riscv_linux_nat_target::store_registers): Likewise.
1362
1363 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1364
1365 PR gdb/23555
1366 PR gdb/23558
1367 * gnulib/aclocal.m4: Regenerate.
1368 * gnulib/config.in: Regenerate.
1369 * gnulib/configure: Regenerate.
1370 * gnulib/import/Makefile.am: Update.
1371 * gnulib/import/Makefile.in: Update.
1372 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1373 * gnulib/import/_Noreturn.h: ... this.
1374 * gnulib/import/alloca.in.h: Update.
1375 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1376 * gnulib/import/arg-nonnull.h: ... this.
1377 * gnulib/import/assure.h: Update.
1378 * gnulib/import/at-func.c: Update.
1379 * gnulib/import/basename-lgpl.c: Update.
1380 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1381 * gnulib/import/c++defs.h: ... this.
1382 * gnulib/import/canonicalize-lgpl.c: Update.
1383 * gnulib/import/cdefs.h: Update.
1384 * gnulib/import/chdir-long.c: Update.
1385 * gnulib/import/chdir-long.h: Update.
1386 * gnulib/import/cloexec.c: Update.
1387 * gnulib/import/cloexec.h: Update.
1388 * gnulib/import/close.c: Update.
1389 * gnulib/import/closedir.c: Update.
1390 * gnulib/import/config.charset: Update.
1391 * gnulib/import/dirent-private.h: Update.
1392 * gnulib/import/dirent.in.h: Update.
1393 * gnulib/import/dirfd.c: Update.
1394 * gnulib/import/dirname-lgpl.c: Update.
1395 * gnulib/import/dirname.h: Update.
1396 * gnulib/import/dosname.h: Update.
1397 * gnulib/import/dup-safer-flag.c: Update.
1398 * gnulib/import/dup-safer.c: Update.
1399 * gnulib/import/dup.c: Update.
1400 * gnulib/import/dup2.c: Update.
1401 * gnulib/import/errno.in.h: Update.
1402 * gnulib/import/error.c: Update.
1403 * gnulib/import/error.h: Update.
1404 * gnulib/import/exitfail.c: Update.
1405 * gnulib/import/exitfail.h: Update.
1406 * gnulib/import/extra/update-copyright: Update.
1407 * gnulib/import/fchdir.c: Update.
1408 * gnulib/import/fcntl.c: Update.
1409 * gnulib/import/fcntl.in.h: Update.
1410 * gnulib/import/fd-hook.c: Update.
1411 * gnulib/import/fd-hook.h: Update.
1412 * gnulib/import/fd-safer-flag.c: Update.
1413 * gnulib/import/fd-safer.c: Update.
1414 * gnulib/import/fdopendir.c: Update.
1415 * gnulib/import/filename.h: Update.
1416 * gnulib/import/filenamecat-lgpl.c: Update.
1417 * gnulib/import/filenamecat.h: Update.
1418 * gnulib/import/flexmember.h: Update.
1419 * gnulib/import/float+.h: Update.
1420 * gnulib/import/float.c: Update.
1421 * gnulib/import/float.in.h: Update.
1422 * gnulib/import/fnmatch.c: Update.
1423 * gnulib/import/fnmatch.in.h: Update.
1424 * gnulib/import/fnmatch_loop.c: Update.
1425 * gnulib/import/fpucw.h: Update.
1426 * gnulib/import/frexp.c: Update.
1427 * gnulib/import/frexpl.c: Update.
1428 * gnulib/import/fstat.c: Update.
1429 * gnulib/import/fstatat.c: Update.
1430 * gnulib/import/getcwd-lgpl.c: Update.
1431 * gnulib/import/getcwd.c: Update.
1432 * gnulib/import/getdtablesize.c: Update.
1433 * gnulib/import/getlogin_r.c: Update.
1434 * gnulib/import/getprogname.c: Update.
1435 * gnulib/import/getprogname.h: Update.
1436 * gnulib/import/gettext.h: Update.
1437 * gnulib/import/gettimeofday.c: Update.
1438 * gnulib/import/glob-libc.h: Update.
1439 * gnulib/import/glob.c: Update.
1440 * gnulib/import/glob.in.h: Update.
1441 * gnulib/import/glob_internal.h: Update.
1442 * gnulib/import/glob_pattern_p.c: Update.
1443 * gnulib/import/globfree.c: Update.
1444 * gnulib/import/hard-locale.c: Update.
1445 * gnulib/import/hard-locale.h: Update.
1446 * gnulib/import/intprops.h: Update.
1447 * gnulib/import/inttypes.in.h: Update.
1448 * gnulib/import/isnan.c: Update.
1449 * gnulib/import/isnand-nolibm.h: Update.
1450 * gnulib/import/isnand.c: Update.
1451 * gnulib/import/isnanl-nolibm.h: Update.
1452 * gnulib/import/isnanl.c: Update.
1453 * gnulib/import/itold.c: Update.
1454 * gnulib/import/libc-config.h: Update.
1455 * gnulib/import/limits.in.h: Update.
1456 * gnulib/import/localcharset.c: Update.
1457 * gnulib/import/localcharset.h: Update.
1458 * gnulib/import/localtime-buffer.c: Update.
1459 * gnulib/import/localtime-buffer.h: Update.
1460 * gnulib/import/lstat.c: Update.
1461 * gnulib/import/m4/00gnulib.m4: Update.
1462 * gnulib/import/m4/__inline.m4: Update.
1463 * gnulib/import/m4/absolute-header.m4: Update.
1464 * gnulib/import/m4/alloca.m4: Update.
1465 * gnulib/import/m4/builtin-expect.m4: Update.
1466 * gnulib/import/m4/canonicalize.m4: Update.
1467 * gnulib/import/m4/chdir-long.m4: Update.
1468 * gnulib/import/m4/close.m4: Update.
1469 * gnulib/import/m4/closedir.m4: Update.
1470 * gnulib/import/m4/configmake.m4: Update.
1471 * gnulib/import/m4/d-ino.m4: Update.
1472 * gnulib/import/m4/d-type.m4: Update.
1473 * gnulib/import/m4/dirent_h.m4: Update.
1474 * gnulib/import/m4/dirfd.m4: Update.
1475 * gnulib/import/m4/dirname.m4: Update.
1476 * gnulib/import/m4/double-slash-root.m4: Update.
1477 * gnulib/import/m4/dup.m4: Update.
1478 * gnulib/import/m4/dup2.m4: Update.
1479 * gnulib/import/m4/eealloc.m4: Update.
1480 * gnulib/import/m4/environ.m4: Update.
1481 * gnulib/import/m4/errno_h.m4: Update.
1482 * gnulib/import/m4/error.m4: Update.
1483 * gnulib/import/m4/exponentd.m4: Update.
1484 * gnulib/import/m4/exponentl.m4: Update.
1485 * gnulib/import/m4/extensions.m4: Update.
1486 * gnulib/import/m4/extern-inline.m4: Update.
1487 * gnulib/import/m4/fchdir.m4: Update.
1488 * gnulib/import/m4/fcntl-o.m4: Update.
1489 * gnulib/import/m4/fcntl.m4: Update.
1490 * gnulib/import/m4/fcntl_h.m4: Update.
1491 * gnulib/import/m4/fdopendir.m4: Update.
1492 * gnulib/import/m4/filenamecat.m4: Update.
1493 * gnulib/import/m4/flexmember.m4: Update.
1494 * gnulib/import/m4/float_h.m4: Update.
1495 * gnulib/import/m4/fnmatch.m4: Update.
1496 * gnulib/import/m4/fnmatch_h.m4: Update.
1497 * gnulib/import/m4/fpieee.m4: Update.
1498 * gnulib/import/m4/frexp.m4: Update.
1499 * gnulib/import/m4/frexpl.m4: Update.
1500 * gnulib/import/m4/fstat.m4: Update.
1501 * gnulib/import/m4/fstatat.m4: Update.
1502 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1503 * gnulib/import/m4/getcwd-path-max.m4: Update.
1504 * gnulib/import/m4/getcwd.m4: Update.
1505 * gnulib/import/m4/getdtablesize.m4: Update.
1506 * gnulib/import/m4/getlogin.m4: Update.
1507 * gnulib/import/m4/getlogin_r.m4: Update.
1508 * gnulib/import/m4/getpagesize.m4: Update.
1509 * gnulib/import/m4/getprogname.m4: Update.
1510 * gnulib/import/m4/gettimeofday.m4: Update.
1511 * gnulib/import/m4/glibc21.m4: Update.
1512 * gnulib/import/m4/glob.m4: Update.
1513 * gnulib/import/m4/glob_h.m4: Update.
1514 * gnulib/import/m4/gnulib-cache.m4: Update.
1515 * gnulib/import/m4/gnulib-common.m4: Update.
1516 * gnulib/import/m4/gnulib-comp.m4: Update.
1517 * gnulib/import/m4/gnulib-tool.m4: Update.
1518 * gnulib/import/m4/hard-locale.m4: Update.
1519 * gnulib/import/m4/include_next.m4: Update.
1520 * gnulib/import/m4/inttypes-pri.m4: Update.
1521 * gnulib/import/m4/inttypes.m4: Update.
1522 * gnulib/import/m4/isnand.m4: Update.
1523 * gnulib/import/m4/isnanl.m4: Update.
1524 * gnulib/import/m4/largefile.m4: Update.
1525 * gnulib/import/m4/limits-h.m4: Update.
1526 * gnulib/import/m4/localcharset.m4: Update.
1527 * gnulib/import/m4/locale-fr.m4: Update.
1528 * gnulib/import/m4/locale-ja.m4: Update.
1529 * gnulib/import/m4/locale-zh.m4: Update.
1530 * gnulib/import/m4/localtime-buffer.m4: Update.
1531 * gnulib/import/m4/longlong.m4: Update.
1532 * gnulib/import/m4/lstat.m4: Update.
1533 * gnulib/import/m4/malloc.m4: Update.
1534 * gnulib/import/m4/malloca.m4: Update.
1535 * gnulib/import/m4/math_h.m4: Update.
1536 * gnulib/import/m4/mbrtowc.m4: Update.
1537 * gnulib/import/m4/mbsinit.m4: Update.
1538 * gnulib/import/m4/mbsrtowcs.m4: Update.
1539 * gnulib/import/m4/mbstate_t.m4: Update.
1540 * gnulib/import/m4/memchr.m4: Update.
1541 * gnulib/import/m4/memmem.m4: Update.
1542 * gnulib/import/m4/mempcpy.m4: Update.
1543 * gnulib/import/m4/memrchr.m4: Update.
1544 * gnulib/import/m4/mkdir.m4: Update.
1545 * gnulib/import/m4/mkstemp.m4: Update.
1546 * gnulib/import/m4/mmap-anon.m4: Update.
1547 * gnulib/import/m4/mode_t.m4: Update.
1548 * gnulib/import/m4/msvc-inval.m4: Update.
1549 * gnulib/import/m4/msvc-nothrow.m4: Update.
1550 * gnulib/import/m4/multiarch.m4: Update.
1551 * gnulib/import/m4/nocrash.m4: Update.
1552 * gnulib/import/m4/off_t.m4: Update.
1553 * gnulib/import/m4/onceonly.m4: Update.
1554 * gnulib/import/m4/open-cloexec.m4: Update.
1555 * gnulib/import/m4/open.m4: Update.
1556 * gnulib/import/m4/openat.m4: Update.
1557 * gnulib/import/m4/opendir.m4: Update.
1558 * gnulib/import/m4/pathmax.m4: Update.
1559 * gnulib/import/m4/rawmemchr.m4: Update.
1560 * gnulib/import/m4/readdir.m4: Update.
1561 * gnulib/import/m4/readlink.m4: Update.
1562 * gnulib/import/m4/realloc.m4: Update.
1563 * gnulib/import/m4/rename.m4: Update.
1564 * gnulib/import/m4/rewinddir.m4: Update.
1565 * gnulib/import/m4/rmdir.m4: Update.
1566 * gnulib/import/m4/save-cwd.m4: Update.
1567 * gnulib/import/m4/secure_getenv.m4: Update.
1568 * gnulib/import/m4/setenv.m4: Update.
1569 * gnulib/import/m4/signal_h.m4: Update.
1570 * gnulib/import/m4/ssize_t.m4: Update.
1571 * gnulib/import/m4/stat-time.m4: Update.
1572 * gnulib/import/m4/stat.m4: Update.
1573 * gnulib/import/m4/std-gnu11.m4: Update.
1574 * gnulib/import/m4/stdbool.m4: Update.
1575 * gnulib/import/m4/stddef_h.m4: Update.
1576 * gnulib/import/m4/stdint.m4: Update.
1577 * gnulib/import/m4/stdio_h.m4: Update.
1578 * gnulib/import/m4/stdlib_h.m4: Update.
1579 * gnulib/import/m4/strchrnul.m4: Update.
1580 * gnulib/import/m4/strdup.m4: Update.
1581 * gnulib/import/m4/strerror.m4: Update.
1582 * gnulib/import/m4/string_h.m4: Update.
1583 * gnulib/import/m4/strstr.m4: Update.
1584 * gnulib/import/m4/strtok_r.m4: Update.
1585 * gnulib/import/m4/sys_socket_h.m4: Update.
1586 * gnulib/import/m4/sys_stat_h.m4: Update.
1587 * gnulib/import/m4/sys_time_h.m4: Update.
1588 * gnulib/import/m4/sys_types_h.m4: Update.
1589 * gnulib/import/m4/tempname.m4: Update.
1590 * gnulib/import/m4/time_h.m4: Update.
1591 * gnulib/import/m4/unistd-safer.m4: Update.
1592 * gnulib/import/m4/unistd_h.m4: Update.
1593 * gnulib/import/m4/warn-on-use.m4: Update.
1594 * gnulib/import/m4/wchar_h.m4: Update.
1595 * gnulib/import/m4/wchar_t.m4: Update.
1596 * gnulib/import/m4/wctype_h.m4: Update.
1597 * gnulib/import/m4/wint_t.m4: Update.
1598 * gnulib/import/malloc.c: Update.
1599 * gnulib/import/malloc/scratch_buffer.h: Update.
1600 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1601 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1602 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1603 * gnulib/import/malloca.c: Update.
1604 * gnulib/import/malloca.h: Update.
1605 * gnulib/import/malloca.valgrind: Update.
1606 * gnulib/import/math.in.h: Update.
1607 * gnulib/import/mbrtowc.c: Update.
1608 * gnulib/import/mbsinit.c: Update.
1609 * gnulib/import/mbsrtowcs-impl.h: Update.
1610 * gnulib/import/mbsrtowcs-state.c: Update.
1611 * gnulib/import/mbsrtowcs.c: Update.
1612 * gnulib/import/memchr.c: Update.
1613 * gnulib/import/memmem.c: Update.
1614 * gnulib/import/mempcpy.c: Update.
1615 * gnulib/import/memrchr.c: Update.
1616 * gnulib/import/mkdir.c: Update.
1617 * gnulib/import/mkstemp.c: Update.
1618 * gnulib/import/msvc-inval.c: Update.
1619 * gnulib/import/msvc-inval.h: Update.
1620 * gnulib/import/msvc-nothrow.c: Update.
1621 * gnulib/import/msvc-nothrow.h: Update.
1622 * gnulib/import/open.c: Update.
1623 * gnulib/import/openat-die.c: Update.
1624 * gnulib/import/openat-priv.h: Update.
1625 * gnulib/import/openat-proc.c: Update.
1626 * gnulib/import/openat.c: Update.
1627 * gnulib/import/openat.h: Update.
1628 * gnulib/import/opendir.c: Update.
1629 * gnulib/import/pathmax.h: Update.
1630 * gnulib/import/pipe-safer.c: Update.
1631 * gnulib/import/rawmemchr.c: Update.
1632 * gnulib/import/readdir.c: Update.
1633 * gnulib/import/readlink.c: Update.
1634 * gnulib/import/realloc.c: Update.
1635 * gnulib/import/ref-add.sin: Update.
1636 * gnulib/import/ref-del.sin: Update.
1637 * gnulib/import/rename.c: Update.
1638 * gnulib/import/rewinddir.c: Update.
1639 * gnulib/import/rmdir.c: Update.
1640 * gnulib/import/same-inode.h: Update.
1641 * gnulib/import/save-cwd.c: Update.
1642 * gnulib/import/save-cwd.h: Update.
1643 * gnulib/import/scratch_buffer.h: Update.
1644 * gnulib/import/secure_getenv.c: Update.
1645 * gnulib/import/setenv.c: Update.
1646 * gnulib/import/signal.in.h: Update.
1647 * gnulib/import/stat-time.c: Update.
1648 * gnulib/import/stat-time.h: Update.
1649 * gnulib/import/stat-w32.c: Update.
1650 * gnulib/import/stat-w32.h: Update.
1651 * gnulib/import/stat.c: Update.
1652 * gnulib/import/stdbool.in.h: Update.
1653 * gnulib/import/stddef.in.h: Update.
1654 * gnulib/import/stdint.in.h: Update.
1655 * gnulib/import/stdio.in.h: Update.
1656 * gnulib/import/stdlib.in.h: Update.
1657 * gnulib/import/str-two-way.h: Update.
1658 * gnulib/import/strchrnul.c: Update.
1659 * gnulib/import/strdup.c: Update.
1660 * gnulib/import/streq.h: Update.
1661 * gnulib/import/strerror-override.c: Update.
1662 * gnulib/import/strerror-override.h: Update.
1663 * gnulib/import/strerror.c: Update.
1664 * gnulib/import/string.in.h: Update.
1665 * gnulib/import/stripslash.c: Update.
1666 * gnulib/import/strnlen1.c: Update.
1667 * gnulib/import/strnlen1.h: Update.
1668 * gnulib/import/strstr.c: Update.
1669 * gnulib/import/strtok_r.c: Update.
1670 * gnulib/import/sys_stat.in.h: Update.
1671 * gnulib/import/sys_time.in.h: Update.
1672 * gnulib/import/sys_types.in.h: Update.
1673 * gnulib/import/tempname.c: Update.
1674 * gnulib/import/tempname.h: Update.
1675 * gnulib/import/time.in.h: Update.
1676 * gnulib/import/unistd--.h: Update.
1677 * gnulib/import/unistd-safer.h: Update.
1678 * gnulib/import/unistd.in.h: Update.
1679 * gnulib/import/unsetenv.c: Update.
1680 * gnulib/import/verify.h: Update.
1681 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1682 * gnulib/import/wchar.in.h: Update.
1683 * gnulib/import/wctype.in.h: Update.
1684 * gnulib/import/xalloc-oversized.h: Update.
1685 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1686 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1687
1688 2018-08-16 Gary Benson <gbenson@redhat.com>
1689
1690 PR gdb/13000:
1691 * gdb/main.c (captured_main_1): Exit with nonzero status
1692 in batch mode if the last command to be executed failed.
1693 * NEWS: Mention the above.
1694
1695 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1698 end of warning message.
1699
1700 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1701
1702 PR gdb/22943:
1703 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1704 (aarch64_extract_return_value): Use
1705 aapcs_is_vfp_call_or_return_candidate.
1706 (aarch64_return_in_memory): Likewise.
1707 (aarch64_store_return_value): Likewise.
1708
1709 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1710
1711 * aarch64-tdep.c
1712 (aapcs_is_vfp_call_or_return_candidate): Make static
1713 (pass_in_v_or_stack): Remove function.
1714 (pass_in_v_vfp_candidate): New function.
1715 (aarch64_push_dummy_call): Check for float register candidates.
1716
1717 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1718
1719 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1720 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1721 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1722
1723 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 PR build/23399
1726 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1727 (struct ipa_sym_addresses): Rename to...
1728 (struct ipa_sym_addresses_common): ... this.
1729 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1730
1731 2018-08-28 Tom Tromey <tom@tromey.com>
1732
1733 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1734 (token_fifo): Now a std::vector.
1735 (yylex, c_parse): Update.
1736 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1737 (token_fifo): Now a std::vector.
1738 (yylex, d_parse): Update.
1739 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1740 (token_fifo): Now a std::vector.
1741 (yylex, go_parse): Update.
1742
1743 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1744
1745 * parser-defs.h (struct type_stack) <elements>: Change type to
1746 std::vector<union type_stack_elt>.
1747 <depth, size>: Remove.
1748 * parse.c (parse_exp_in_context_1): Adjust.
1749 (type_stack_reserve): Remove.
1750 (check_type_stack_depth): Remove.
1751 (insert_into_type_stack): Adjust to std::vector.
1752 (insert_type): Likewise.
1753 (push_type): Likewise.
1754 (push_type_int): Likewise.
1755 (insert_type_address_space): Likewise.
1756 (pop_type): Likewise.
1757 (pop_type_int): Likewise.
1758 (pop_typelist): Likewise.
1759 (pop_type_stack): Likewise.
1760 (append_type_stack): Likewise.
1761 (push_type_stack): Likewise.
1762 (get_type_stack): Likewise.
1763 (type_stack_cleanup): Likewise.
1764 (push_typelist): Likewise.
1765 (follow_types): Likewise.
1766 (_initialize_parse): Likewise.
1767
1768 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1769
1770 * NEWS: Mention csky target.
1771
1772 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1773 Hafiz Abid Qadeer <abidh@codesourcery.com>
1774 Don Breazeal <donb@codesourcery.com>
1775
1776 * csky-linux-tdep.c: New file.
1777 * csky-tdep.c: Likewise.
1778 * csky-tdep.h: Likewise.
1779 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1780 csky-tdep.o.
1781 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1782 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1783 * configure.tgt: Add csky support.
1784
1785 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1786
1787 * python/py-framefilter.c (py_print_frame): Print frame architecture
1788 when printing on an MI output.
1789
1790 2018-08-27 Tom Tromey <tom@tromey.com>
1791
1792 PR build/23087:
1793 * configure: Rebuild.
1794 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1795
1796 2018-08-27 Tom Tromey <tom@tromey.com>
1797
1798 * aarch64-linux-tdep.c
1799 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1800 casts to int.
1801
1802 2018-08-27 Tom Tromey <tom@tromey.com>
1803
1804 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1805 unsigned.
1806 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1807 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1808 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1809 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1810 unsigned.
1811
1812 2018-08-27 Tom Tromey <tom@tromey.com>
1813
1814 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1815 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1816
1817 2018-08-27 Tom Tromey <tom@tromey.com>
1818
1819 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1820 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1821 ULONGEST_MAX.
1822 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1823 ULONGEST_MAX.
1824 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1825 ULONGEST_MAX.
1826 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1827 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1828 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1829 ULONGEST_MAX.
1830 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1831 (ppc64_linux_sigaction_tramp_frame)
1832 (ppc32_linux_sighandler_tramp_frame)
1833 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1834 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1835 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1836 * mn10300-linux-tdep.c (am33_linux_sigframe)
1837 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1838 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1839 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1840 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1841 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1842 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1843 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1844 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1845 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1846 * microblaze-linux-tdep.c
1847 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1848 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1849 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1850 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1851 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1852 * common/common-types.h (ULONGEST_MAX): New define.
1853 (CORE_ADDR_MAX): Fix formatting.
1854 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1855 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1856 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1857 (arm_linux_rt_sigreturn_tramp_frame)
1858 (arm_eabi_linux_sigreturn_tramp_frame)
1859 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1860 (thumb2_eabi_linux_sigreturn_tramp_frame)
1861 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1862 (arm_linux_restart_syscall_tramp_frame)
1863 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1864 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1865 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1866 ULONGEST_MAX.
1867 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1868
1869 2018-08-27 Tom Tromey <tom@tromey.com>
1870
1871 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1872 CORE_ADDR_MAX.
1873 * mips-tdep.c (mips_deal_with_atomic_sequence)
1874 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1875 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1876 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1877 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1878 CORE_ADDR_MAX.
1879 * aarch64-tdep.c (aarch64_software_single_step): Use
1880 CORE_ADDR_MAX.
1881
1882 2018-08-27 Tom Tromey <tom@tromey.com>
1883
1884 * linespec.c (complete_linespec_component): Add cast to "char".
1885 * completer.c (completion_tracker::build_completion_result): Add
1886 cast to "char".
1887
1888 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * solist.h (struct solist, struct target_so_ops): Fix
1891 indentation.
1892
1893 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1894
1895 * ada-tasks.c (ada_task_info_s): Remove typedef.
1896 (DEF_VEC_O(ada_task_info_s)): Remove.
1897 (struct ada_tasks_inferior_data): Initialize fields.
1898 <task_list>: Make an std::vector.
1899 (get_ada_tasks_inferior_data): Allocate with new.
1900 (ada_get_task_number): Adjust.
1901 (get_task_number_from_id): Likewise.
1902 (valid_task_id): Likewise.
1903 (ada_get_task_info_from_ptid): Likewise.
1904 (iterate_over_live_ada_tasks): Likewise.
1905 (add_ada_task): Likewise.
1906 (read_known_tasks): Likewise.
1907 (ada_build_task_list): Likewise.
1908 (print_ada_task_info): Likewise.
1909 (info_task): Likewise.
1910 (task_command_1): Likewise.
1911
1912 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1913
1914 * ada-lang.c (add_angle_brackets): Return std::string.
1915
1916 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * python/py-threadevent.c (py_get_event_thread): Initialize
1919 pythread.
1920
1921 2018-08-24 Pedro Alves <palves@redhat.com>
1922
1923 * python/py-bpevent.c (create_breakpoint_event_object): Use
1924 copy-initialization.
1925 * python/py-continueevent.c (emit_continue_event): Use
1926 copy-initialization.
1927 * python/py-exitedevent.c (create_exited_event_object): Return a
1928 gdbpy_ref<>.
1929 (emit_exited_event): Use copy-initialization.
1930 * python/py-inferior.c (python_new_inferior)
1931 (python_inferior_deleted, add_thread_object): Use
1932 copy-initialization.
1933 * python/py-infevents.c (create_inferior_call_event_object)
1934 (create_register_changed_event_object)
1935 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1936 (emit_inferior_call_event, emit_memory_changed_event)
1937 (emit_register_changed_event): Use copy-initialization.
1938 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1939 Return a gdbpy_ref<>.
1940 (emit_new_objfile_event): Use copy-initialization.
1941 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1942 (emit_clear_objfiles_event): Use copy-initialization.
1943 * python/py-signalevent.c (create_signal_event_object): Use
1944 copy-initialization.
1945 * python/py-threadevent.c (create_thread_event_object): Use
1946 copy-initialization.
1947
1948 2018-08-24 Pedro Alves <palves@redhat.com>
1949 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 PR gdb/23379
1952 * python/py-continueevent.c: Include "gdbthread.h".
1953 (create_continue_event_object): Add intro comment. Add 'ptid'
1954 parameter. Use it to find thread to pass to
1955 create_thread_event_object.
1956 (emit_continue_event): Pass PTID down to
1957 create_continue_event_object.
1958 * python/py-event.h (py_get_event_thread): Declare.
1959 (create_thread_event_object): Remove default from 'thread'
1960 parameter.
1961 * python/py-stopevent.c (create_stop_event_object): Use
1962 py_get_event_thread.
1963 * python/py-threadevent.c (get_event_thread): Rename to ...
1964 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1965 and use it to find the thread.
1966 (create_thread_event_object): Assert that THREAD isn't null.
1967 Don't find the event thread here.
1968
1969 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1970
1971 * block.h (blockrange, blockranges): New struct declarations.
1972 (struct block): Add new field named `ranges'.
1973 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1974 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1975 macros for accessing ranges in struct block.
1976 (make_blockranges): New declaration.
1977 block.c (make_blockranges): New function.
1978 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1979 for block.
1980 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1981 * blockframe.c (cache_pc_function_block): New static global.
1982 (clear_pc_function_cache): Clear cache_pc_function_block.
1983 (find_pc_partial_function): Move comment to symtab.h. Add
1984 support for non-contiguous blocks.
1985 * cli/cli-cmds.c (block.h): Include.
1986 (print_disassembly): Handle printing of non-contiguous blocks.
1987 (disassemble_current_function): Likewise.
1988 (disassemble_command): Likewise.
1989
1990 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1991 BLOCK_START.
1992 * blockframe.c (get_pc_function_start): Likewise.
1993 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1994 (gcc_symbol_address): Likewise.
1995 * compile/compile-object-run.c (compile_object_run): Likewise.
1996 * compile/compile.c (get_expr_block_and_pc): Likewise.
1997 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1998 (func_addr_to_tail_call_list): Likewise.
1999 * findvar.c (default_read_var_value): Likewise.
2000 * inline-frame.c (inline_frame_this_id): Likewise.
2001 (skip-inline_frames): Likewise.
2002 * infcmd.c (until_next_command): Likewise.
2003 * linespec.c (convert_linespec_to_sals): Likewise.
2004 * parse.c (parse_exp_in_context_1): Likewise.
2005 * printcmd.c (build_address_symbolic): likewise.
2006 (info_address_command): Likewise.
2007 symtab.c (find_function_start_sal): Likewise.
2008 (skip_prologue_sal): Likewise.
2009 (find_function_alias_target): Likewise.
2010 (find_gnu_ifunc): Likewise.
2011 * stack.c (find_frame_funname): Likewise.
2012 * symtab.c (fixup_symbol_section): Likewise.
2013 (find_function_start_sal): Likewise.
2014 (skip_prologue_sal): Likewsie.
2015 (find_function_alias_target): Likewise.
2016 (find_gnu_ifunc): Likewise.
2017 * tracepoint.c (info_scope_command): Likewise.
2018 * value.c (value_fn_field): Likewise.
2019
2020 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2021 in place of find_pc_partial_function.
2022 * blockframe.c (find_function_entry_range_from_pc): New function.
2023 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2024 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2025 for each range in a block.
2026
2027
2028 2018-08-23 Xavier Roirand <roirand@adacore.com>
2029
2030 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2031 incrementation.
2032
2033 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2034
2035 * solib-svr4.c (read_program_headers_from_bfd): Return
2036 gdb::optional<gdb::byte_vector>.
2037 (svr4_exec_displacement): Adjust.
2038
2039 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2040
2041 * solib-svr4.c (read_program_header): Return
2042 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2043 (find_program_interpreter): Return
2044 gdb::optional<gdb::byte_vector>.
2045 (scan_dyntag_auxv): Adjust.
2046 (enable_break): Adjust.
2047 (svr4_exec_displacement): Adjust.
2048
2049 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2050
2051 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2052 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2053
2054 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2055
2056 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2057 string_vprintf.
2058 * guile/scm-utils.c (gdbscm_printf): Likewise.
2059 * serial.c (serial_printf): Likewise.
2060 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2061
2062 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2063
2064 * stack.c (print_frame): Print frame architecture when printing on
2065 an MI output.
2066 * NEWS: Mention new "arch" attribute in frame output.
2067
2068 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2069
2070 * arch/aarch64.h (aarch64_regnum): Update comment.
2071
2072 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2073
2074 * NEWS: Add SVE to 8.2 section.
2075
2076 2018-08-21 Pedro Alves <palves@redhat.com>
2077
2078 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2079 out from gdbscm_parse_function_args.
2080 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2081 gdbscm_parse_function_args_1.
2082
2083 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2084
2085 PR gdb/17816
2086 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2087 operator.
2088
2089 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2090
2091 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2092
2093 2018-08-19 Michael Spang <spang@google.com>
2094
2095 PR gdb/11786
2096 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2097 for PT_TLS segments.
2098
2099 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2100
2101 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2102 dwarf_variable_value.
2103 * dwarf2-frame.c (class dwarf_expr_executor):
2104 Add override for dwarf_variable_value.
2105 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2106 (class symbol_needs_eval_context): Likewise.
2107 (indirect_synthetic_pointer): Add forward declaration.
2108 (sect_variable_value): New function.
2109 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2110 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2111 for DW_OP_GNU_variable_value.
2112
2113 2018-08-16 Tom Tromey <tom@tromey.com>
2114
2115 * top.c (read_command_file): Update.
2116 (command_line_input): Remove "repeat" argument.
2117 * ada-lang.c (get_selections): Update.
2118 * linespec.c (decode_line_2): Update.
2119 * defs.h (command_line_input): Remove argument.
2120 * cli/cli-script.c (read_next_line): Update.
2121 * python/py-gdb-readline.c: Update.
2122
2123 2018-08-17 Tom Tromey <tom@tromey.com>
2124
2125 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2126 command_line_input.
2127
2128 2018-08-15 Tom Tromey <tom@tromey.com>
2129
2130 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2131
2132 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2133
2134 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2135 If used, use find_pc_partial_function to find address range
2136 to disassemble.
2137 * mi/mi-main.c (mi_cmd_list_features): Report
2138 "data-disassemble-a-option" feature.
2139 * NEWS: Mention new -data-disassemble option -a.
2140
2141 2018-08-13 Tom Tromey <tom@tromey.com>
2142
2143 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2144
2145 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2146
2147 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2148 (aarch64_linux_collect_sve_regset): Likewise.
2149 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2150 * regcache.h (regcache_map_entry_size): New function.
2151
2152 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2153
2154 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2155 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2156 (SVE_HEADER_VL_LENGTH): Likewise.
2157 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2158 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2159 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2160 (SVE_HEADER_SIZE_OFFSET): Likewise.
2161 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2162 (SVE_HEADER_VL_OFFSET): Likewise.
2163 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2164 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2165 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2166 (SVE_HEADER_SIZE): Likewise.
2167 (aarch64_linux_core_read_vq): Add function.
2168 (aarch64_linux_core_read_description): Check for SVE section.
2169
2170 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2171
2172 * aarch64-fbsd-tdep.c
2173 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2174 collect_size.
2175 * aarch64-linux-tdep.c
2176 (aarch64_linux_iterate_over_regset_sections): Likewise.
2177 * alpha-linux-tdep.c
2178 (alpha_linux_iterate_over_regset_sections):
2179 * alpha-nbsd-tdep.c
2180 (alphanbsd_iterate_over_regset_sections): Likewise.
2181 * amd64-fbsd-tdep.c
2182 (amd64fbsd_iterate_over_regset_sections): Likewise.
2183 * amd64-linux-tdep.c
2184 (amd64_linux_iterate_over_regset_sections): Likewise.
2185 * arm-bsd-tdep.c
2186 (armbsd_iterate_over_regset_sections): Likewise.
2187 * arm-fbsd-tdep.c
2188 (arm_fbsd_iterate_over_regset_sections): Likewise.
2189 * arm-linux-tdep.c
2190 (arm_linux_iterate_over_regset_sections): Likewise.
2191 * corelow.c (get_core_registers_cb): Likewise.
2192 (core_target::fetch_registers): Likewise.
2193 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2194 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2195 * gdbarch.h (void): Regenerate.
2196 * gdbarch.sh: Add supply_size and collect_size.
2197 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2198 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2199 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2200 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2201 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2202 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2203 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2204 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2205 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2206 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2207 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2208 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2209 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2210 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2211 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2212 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2213 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2214 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2215 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2216 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2217 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2218 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2219 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2220 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2221 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2222 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2223 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2224 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2225 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2226 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2227
2228 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2229
2230 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2231 with string_printf.
2232
2233 2018-08-10 Keith Seitz <keiths@redhat.com>
2234
2235 * compile/compile-c-support.c (add_code_header, add_code_footer):
2236 Move into policy class.
2237 (c_push_user_expression, pop_user_expression_nop)
2238 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2239 (compile_program): New host class.
2240 (c_compile_program): New typedef.
2241 (c_compute_porgram): Use c_compile_program.
2242
2243 2018-08-10 Keith Seitz <keiths@redhat.com>
2244
2245 * compile/compile-internal.h (compile_instance::~compile_instance):
2246 Remove calls to htab_delete.
2247 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2248 * compile.c (compile_instance::compile_instance): Initialize
2249 htab unique pointers.
2250 (compile_instance::get_cached_type, compile_instance::insert_type)
2251 (compile_instance::error_symbol_once): Update for unique_ptr.
2252
2253 2018-08-10 Keith Seitz <keiths@redhat.com>
2254
2255 * compile/compile-c-symbols.c (struct symbol_error)
2256 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2257 (compile_instance::insert_symbol_error)
2258 (compile_instance::error_symbol_once): Move to ...
2259 * compile/compile.c: ... here.
2260
2261 2018-08-10 Keith Seitz <keiths@redhat.com>
2262
2263 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2264 instead of `new_compile_instance'.
2265 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2266 Update description.
2267 If the symbol error map is not initialized, create it.
2268 (generate_c_for_for_one_symbol): Do not check/initialize
2269 the symbol error map.
2270 * compile/compile-c-types.c (compile_c_instance): Make a class.
2271 Update all callers.
2272 (compile_instance::compile_instance): Initialize the type cache.
2273 (get_cached_type): New function.
2274 (insert_type): Update description.
2275 (compile_c_instance::m_default_cflags): Define.
2276 (convert_type): Update description. Use get_cached_type.
2277 (delete_instance): Moved to destructor.
2278 (new_compile_instance): Moved to constructor.
2279 * compile/compile-c.h (compile_c_instance): Make class inheriting
2280 from compile_instance.
2281 <base>: Remove field.
2282 <type_map, symbol_err_map>: Move to base class.
2283 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2284 * compile/compile-internal.h (compile_instance): Make class.
2285 <type_map_t, symbol_err_map_t>: Define.
2286 <fe>: Rename to `m_gcc_fe'.
2287 <scope, block, gcc_target_options>: Add `m_' prefix.
2288 <m_type_map, m_symbol_err_map>: New fields, moved from
2289 compile_c_instance.
2290 <destroy>: Remove.
2291 (convert_type, new_compile_instance): Remove.
2292 * compile/compile.c (cleanup_compile_instance): Remove.
2293 (compile_to_object): Use unique_ptr to eliminate cleanups.
2294 (compile_instance::set_print_callback, compile_instance::version)
2295 (compile_instance::set_verbose)
2296 (compile_instance::set_driver_filename)
2297 (compile_instance::set_triplet_regexp)
2298 (compile_instance::set_arguments)
2299 (compile_instance::set_source_file)
2300 (compile_instance::compile): Define.
2301
2302 2018-08-10 Keith Seitz <keiths@redhat.com>
2303
2304 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2305 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2306 gcc-c-fe.def to define C plugin.
2307 (delete_instance): Delete `c_plugin'.
2308 (new_compile_instance): Initialize `c_plugin'.
2309 * compile/compile-c.h: Include gcc_c_plugin.h.
2310 (struct compile_c_instance) <c_plugin>: New member.
2311 * gcc-c-plugin.h: New file.
2312 Update all callers with API change.
2313
2314 2018-08-10 Keith Seitz <keiths@redhat.com>
2315
2316 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2317 (HFILES_NO_SRCDIR): ... to here.
2318 Add compile-internal.h and compile-c.h.
2319 * compile/compile-c-support.c: Include compile-c.h.
2320 * compile/compile-c-symbols.c: Include compile-c.h.
2321 (generate_c_for_variable_locations): Update comment.
2322 * compile/compile-c-types.c: Include compile-c.h.
2323 * compile/compile-c.h: New file -- moved C language declarations
2324 from other files here.
2325 * compile/compile-internal.h: Do not include hashtab.h or
2326 common/enum-flags.h.
2327 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2328 (gcc_convert_symbol, gcc_symbol_address)
2329 (generate_c_for_variable_locations, c_get_mode_for_size)
2330 (c_get_range_decl_name): Definitions moved to compile-c.h.
2331 * compile/compile-loc2c.c: Include compile-c.h.
2332
2333 2018-08-10 Keith Seitz <keiths@redhat.com>
2334
2335 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2336 (c_symbol_substitution_name): ... this.
2337 Update all callers.
2338
2339 2018-08-10 Keith Seitz <keiths@redhat.com>
2340
2341 * compile/compile-c-support.c (c_compute_program): Use
2342 unique_xmalloc_ptr to eliminate cleanup.
2343 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2344 Return a unique_xmalloc_ptr and eliminate cleanup.
2345 * compile/compile-internal.h (generate_c_for_variable_locations):
2346 Return unique_xmalloc_ptr and update description.
2347
2348 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2349
2350 * corelow.c (core_target::get_core_register_section): Rename
2351 min_size to section_min_size.
2352
2353 2018-08-09 Jim Wilson <jimw@sifive.com>
2354
2355 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2356 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2357 * NEWS: Mention new GNU/Linux RISC-V target.
2358 * configure.host: Add riscv*-*-linux*.
2359 * configure.nat: Add riscv*.
2360 * configure.tgt: Add riscv*-*-linux*.
2361 * riscv-linux-nat.c: New file.
2362 * riscv-linux-tdep.c: New file.
2363
2364 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2365
2366 * infrun.c (resume): Make static, add forward declaration.
2367 (proceed): Update header comment.
2368 * infrun.h (resume): Delete declaration.
2369
2370 2018-08-09 Tom Tromey <tom@tromey.com>
2371
2372 * riscv-tdep.h: Minor formatting fixes.
2373
2374 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2375
2376 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2377 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2378 (test_mkdir_recursive): Likewise.
2379 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2380
2381 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2382
2383 * valarith.c (value_subscripted_rvalue): If an array is not in
2384 memory, and we don't know the upper bound, then we can't know that
2385 the requested element exists or not.
2386
2387 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2390 (target_options_to_string): Add comment.
2391
2392 2018-08-08 Tom Tromey <tom@tromey.com>
2393
2394 * unittests/scoped_mmap-selftests.c: Check result of "write".
2395
2396 2018-08-08 Jim Wilson <jimw@sifive.com>
2397
2398 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2399 (decode_register_index_short): New.
2400 (decode_j_type_insn, decode_cj_type_insn): New.
2401 (decode_b_type_insn, decode_cb_type_insn): New.
2402 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2403 local xlen. Check xlen when decoding ambiguous compressed insns. In
2404 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2405 is_c_sw_insn instead of is_sw_insn.
2406 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2407 (riscv_software_single_step): New.
2408 * riscv-tdep.h (riscv_software_single_step): Declare.
2409
2410 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2411 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2412
2413 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2414
2415 PR gdb/18050:
2416 * target.c (dispose_inferior): Don't dispose of inferiors that are
2417 already killed.
2418
2419 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2420
2421 * remote.c (remote_target::download_tracepoint): Change char* to
2422 const char*.
2423
2424 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2425
2426 * target.h (target_options_to_string): Return an std::string.
2427 * target.c (str_comma_list_concat_elem): Return void, use
2428 std::string.
2429 (do_option): Likewise.
2430 (target_options_to_string): Return an std::string.
2431 * linux-nat.c (linux_nat_target::wait): Adjust.
2432 * target-debug.h (target_debug_print_options): Adjust.
2433
2434 2018-08-07 Tom Tromey <tom@tromey.com>
2435
2436 * Makefile.in (CPPFLAGS): New variable.
2437 (INTERNAL_CPPFLAGS): Use it.
2438
2439 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * NEWS: Mention the index cache.
2442
2443 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * common/pathstuff.h (get_standard_cache_dir): New.
2446 * common/pathstuff.c (get_standard_cache_dir): New.
2447 * build-id.h (build_id_to_string): New.
2448 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2449 DEBUG_STR_SUFFIX): Move to here.
2450 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2451 DEBUG_STR_SUFFIX): Move from there.
2452 (write_psymtabs_to_index): Make non-static, add basename
2453 parameter. Write to temporary files, rename when done.
2454 (save_gdb_index_command): Adjust call to
2455 write_psymtabs_to_index.
2456 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2457 field.
2458 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2459 (get_gdb_index_contents_from_cache): New.
2460 (get_gdb_index_contents_from_cache_dwz): New.
2461 (dwarf2_initialize_objfile): Read index from cache.
2462 (dwarf2_build_psymtabs): Save to index.
2463 * dwarf-index-cache.h: New file.
2464 * dwarf-index-cache.c: New file.
2465 * dwarf-index-write.h: New file.
2466
2467 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2468
2469 * gnulib/aclocal.m4: Re-generate.
2470 * gnulib/config.in: Re-generate.
2471 * gnulib/configure: Re-generate.
2472 * gnulib/import/Makefile.am: Re-generate.
2473 * gnulib/import/Makefile.in: Re-generate.
2474 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2475 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2476 * gnulib/import/m4/mkdir.m4: New file.
2477 * gnulib/import/mkdir.c: New file.
2478 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2479 module.
2480
2481 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2482
2483 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2484 * common/scoped_mmap.c: New file.
2485 * common/scoped_mmap.h (destroy): New method.
2486 (~scoped_mmap, reset): Use destroy.
2487 (scoped_mmap): New move constructor.
2488 (mmap_file): New declaration.
2489 * unittests/scoped_mmap-selftests.c (test_normal,
2490 test_invalid_filename, run_tests): New functions.
2491 (_initialize_scoped_mmap_selftests): Register selftest.
2492
2493 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2494
2495 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2496 (read_gdb_index_from_buffer): ... this. Remove section
2497 parameter, add buffer parameter.
2498 (get_gdb_index_contents_ftype,
2499 get_gdb_index_contents_dwz_ftype): New typedefs.
2500 (dwarf2_read_gdb_index): Add callback parameters to get the
2501 index contents.
2502 (get_gdb_index_contents_from_section): New.
2503 (dwarf2_initialize_objfile): Update call to
2504 dwarf2_read_gdb_index.
2505
2506 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2507
2508 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2509 (gdb_open_cloexec): Likewise.
2510 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2511 (commandline_from_pid): Likewise.
2512 (linux_xfer_osdata_threads): Likewise.
2513 (linux_xfer_osdata_fds): Likewise.
2514 * ada-lang.c (is_package_name): Likewise.
2515 * auxv.c (procfs_xfer_auxv): Likewise.
2516 * breakpoint.c (print_one_breakpoint_location): Use
2517 uiout::field_fmt.
2518 (print_one_catch_solib): Use string_printf.
2519 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2520 (add_pe_forwarded_sym): Likewise.
2521 * dwarf2read.c (create_type_unit_group): Likewise.
2522 (build_error_marker_type): Likewise.
2523 * infcall.c (get_function_name): Likewise.
2524 * valprint.c (print_converted_chars_to_obstack): Likewise.
2525 * xtensa-tdep.c (xtensa_register_type): Likewise.
2526
2527 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2528
2529 * remote.c (remote_target::download_tracepoint): Fix format
2530 string errors.
2531
2532 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2533
2534 * tracefile.c: Include common/byte-vector.h.
2535 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2536 with trace_regblock_size if needed. Update uses of buf.
2537
2538 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2539
2540 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2541 std::vector<unsigned char>.
2542 * tracepoint.c (collection_list::collection_list): Remove
2543 m_regs_mask initializer from initializer list. Resize
2544 m_regs_mask using the largest remote register number.
2545 (collection_list::add_remote_register): Remove size check on
2546 m_regs_mask. Use at to access element.
2547 (collection_list::stringify): Change type of temp_buf to
2548 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2549 stringify the register mask. Use pack_hex_byte for the register
2550 mask.
2551
2552 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2553
2554 * tracepoint.h (class collection_list) <add_register>: Remove.
2555 <add_remote_register, add_ax_registers, add_local_register>:
2556 Declare.
2557 <add_memrange>: Add scope parameter.
2558 * tracepoint.c (encode_actions_1): Likewise.
2559 (collection_list::add_register): Rename to ...
2560 (collection_list::add_remote_register): ... this. Update
2561 comment.
2562 (collection_list::add_ax_registers, add_local_register): New
2563 methods.
2564 (collection_list::add_memrange): Add scope parameter. Call
2565 add_local_register instead of add_register.
2566 (finalize_tracepoint_aexpr): New function.
2567 (collection_list::collect_symbol): Update calls to add_memrange.
2568 Call add_local_register instead of add_register. Call
2569 add_ax_registers. Call finalize_tracepoint_aexpr.
2570 (encode_actions_1): Get remote regnos for $reg action. Call
2571 add_remote_register, add_ax_registers, and add_local_register.
2572 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2573 (validate_actionline): Call finalize_tracepoint_aexpr.
2574
2575 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2576
2577 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2578 Replace array buf with gdb::char_vector buf, of size
2579 get_remote_packet_size (). Replace references to buf and
2580 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2581 and xsnprintf with snprintf. Raise errors if the buffer is too
2582 small.
2583
2584 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2585
2586 * remote.c (remote_target::download_tracepoint): Fix the has_more
2587 predicate in the QTDP action list iteration.
2588
2589 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2590
2591 * remote.c (remote_target::download_tracepoint): Fix indentation
2592 in for block.
2593
2594 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2595
2596 * proc-api.c (_initialize_proc_api): Remove c, unused.
2597 * procfs.c (procfs_init_inferior): Remove signals, unused.
2598 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2599 unused.
2600
2601 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2602 Andrew Burgess <andrew.burgess@embecosm.com>
2603
2604 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2605 'W_STOPCODE (0)' as this could be ambiguous.
2606
2607 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2608
2609 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2610 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2611 "ai_socktype").
2612
2613 2018-08-02 Tom Tromey <tom@tromey.com>
2614
2615 PR symtab/16842.
2616 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2617 symbols.
2618 (process_structure_scope): Likewise.
2619
2620 2018-08-02 Xavier Roirand <roirand@adacore.com>
2621
2622 PR gdb/22629:
2623 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2624 kill inferior.
2625
2626 2018-08-02 Tom Tromey <tom@tromey.com>
2627
2628 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2629 (darwin_suspend_inferior, darwin_resume_inferior)
2630 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2631 (darwin_check_new_threads): Check result of get_darwin_inferior.
2632
2633 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2634
2635 GDB 8.1.1 released.
2636
2637 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2638
2639 * varobj.c (varobj_get_path_expr_parent): Report an error if
2640 parent is a dynamic varobj.
2641
2642 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2643
2644 * gnulib/aclocal.m4: Re-generate.
2645 * gnulib/config.in: Re-generate.
2646 * gnulib/configure: Re-generate.
2647 * gnulib/import/Makefile.in: Re-generate.
2648 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2649 * gnulib/import/m4/onceonly.m4: Re-generate.
2650
2651 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2652
2653 * target-descriptions.c (struct xml_test_tdesc): New.
2654 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2655 (record_xml_tdesc): Update.
2656 (maintenance_check_xml_descriptions): Update.
2657 * target-descriptions.h (record_xml_tdesc): Update comment.
2658
2659 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2660
2661 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2662 checking array bounds are defined.
2663
2664 2018-07-30 Tom Tromey <tom@tromey.com>
2665
2666 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2667 irreflexivity violation.
2668
2669 2018-07-30 Tom Tromey <tom@tromey.com>
2670
2671 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2672 * value.c (unpack_long): Remove lint code.
2673 * valops.c (value_ind): Remove lint code.
2674 * valarith.c (value_x_binop, value_x_unop, value_equal)
2675 (value_pos): Remove lint code.
2676
2677 2018-07-28 Tom de Vries <tdevries@suse.de>
2678
2679 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2680 with undefined upper bound as <optimized out>.
2681
2682 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2683
2684 * gcore.in: Rename variable "name" to "prefix". Expand
2685 "usage" text.
2686
2687 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2688
2689 * windows-nat.c (windows_nat_target::create_inferior): Update to
2690 call close() in global namespace.
2691
2692 2018-07-26 Tom Tromey <tom@tromey.com>
2693
2694 * dwarf-index-write.c (add_address_entry): Don't add objfile
2695 offsets.
2696 * dbxread.c (find_stab_function): Rename from
2697 find_stab_function_addr. Return a bound_minimal_symbol.
2698 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2699 Don't add objfile offsets.
2700 (end_psymtab): Use raw_text_low, raw_text_high,
2701 MSYMBOL_VALUE_RAW_ADDRESS.
2702 (read_ofile_symtab): Update.
2703 (process_one_symbol): Update.
2704 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2705 offsets.
2706 (dw2_relocate): Remove.
2707 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2708 searching addrmap.
2709 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2710 Update.
2711 (process_psymtab_comp_unit_reader, add_partial_symbol)
2712 (add_partial_subprogram, dwarf2_ranges_read): Update.
2713 (load_partial_dies): Update.
2714 (add_address_entry): Don't add objfile offsets.
2715 (dwarf2_build_include_psymtabs): Update.
2716 (create_addrmap_from_aranges): Don't add objfile offsets.
2717 (dw2_find_pc_sect_compunit_symtab): Update.
2718 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2719 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2720 Update.
2721 (parse_partial_symbols): Don't add objfile offsets. Use
2722 raw_text_low, raw_text_high. Update.
2723 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2724 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2725 or call 'relocate' quick function. Clear psymbol_map.
2726 * psympriv.h (struct partial_symbol) <address>: Add section
2727 offset.
2728 <set_unrelocated_address>: Rename from set_address.
2729 <raw_text_low, raw_text_high>: New methods.
2730 <text_low, text_high>: Add objfile parameter.
2731 (add_psymbol_to_bcache): Add 'section' parameter. Call
2732 set_unrelocated_address.
2733 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2734 (find_pc_psymbol): Update.
2735 (fixup_psymbol_section, relocate_psymtabs): Remove.
2736 (dump_psymtab, psym_functions): Update.
2737 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2738 parameter.
2739 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2740 (start_psymtab_common): Update.
2741 * symfile-debug.c (debug_qf_relocate): Remove.
2742 (debug_sym_quick_functions): Update.
2743 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2744 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2745 Update.
2746
2747 2018-07-26 Tom Tromey <tromey@redhat.com>
2748
2749 * dbxread.c (end_psymtab): Use text_high_valid and
2750 text_low_valid.
2751 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2752 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2753 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2754 Update comment.
2755 <text_low_valid, text_high_valid>: New fields.
2756 <set_text_low, set_text_high>: Update.
2757 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2758
2759 2018-07-26 Tom Tromey <tom@tromey.com>
2760
2761 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2762 Update.
2763 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2764 textlow and texthigh fields.
2765 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2766 Update.
2767 * mdebugread.c (parse_lines, parse_partial_symbols)
2768 (psymtab_to_symtab_1): Update.
2769 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2770 Rename fields. Update comment. Now private.
2771 <text_low, text_high, set_text_low, set_text_high>: New methods.
2772 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2773 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2774 (start_psymtab_common, maintenance_info_psymtabs)
2775 (maintenance_check_psymtabs): Update.
2776 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2777 texthigh fields.
2778 (scan_xcoff_symtab): Update.
2779
2780 2018-07-26 Tom Tromey <tromey@redhat.com>
2781
2782 * psympriv.h (struct partial_symbol) <unrelocated_address,
2783 address, set_address>: New methods.
2784 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2785 (fixup_psymbol_section, relocate_psymtabs): Update.
2786 (print_partial_symbols): Add 'objfile' parameter. Update.
2787 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2788 Update.
2789
2790 2018-07-26 Tom Tromey <tom@tromey.com>
2791
2792 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2793 (debug_names::write_psymbols): Update.
2794 * psympriv.h (struct partial_symbol): Derive from
2795 general_symbol_info.
2796 <obj_section>: New method.
2797 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2798 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2799 (find_pc_sect_psymbol, fixup_psymbol_section)
2800 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2801 (print_partial_symbols, recursively_search_psymtabs)
2802 (compare_psymbols, psymbol_hash, psymbol_compare)
2803 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2804 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2805
2806 2018-07-26 Tom Tromey <tromey@redhat.com>
2807
2808 * dbxread.c (end_psymtab): Remove dead code.
2809
2810 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2811
2812 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2813 DWARF unwinders are disabled.
2814 * dwarf2-frame.c: Add dwarf2read.h include.
2815 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2816 disabled.
2817 (dwarf2_frame_unwinders_enabled_p): Define.
2818 (show_dwarf_unwinders_enabled_p): New function.
2819 (_initialize_dwarf2_frame): Register switch to control DWARF
2820 unwinder use.
2821 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2822 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2823 (show_dwarf_cmdlist): Remove static keyword.
2824 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2825 (show_dwarf_cmdlist): Declare.
2826 * NEWS: Document new feature.
2827
2828 2018-07-26 Tom de Vries <tdevries@suse.de>
2829
2830 PR breakpoints/23366
2831 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2832
2833 2018-07-26 Tom de Vries <tdevries@suse.de>
2834
2835 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2836 DW_AT_count can't be translated to a dynamic prop.
2837
2838 2018-07-25 Tom de Vries <tdevries@suse.de>
2839
2840 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2841 try/catch.
2842
2843 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2844
2845 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2846
2847 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2848
2849 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2850
2851 2018-07-24 Keith Seitz <keiths@redhat.comt
2852
2853 PR symtab/23010
2854 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2855 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2856 instead of add_symbol_to_list.
2857 (read_file_scope): Call prepare_one_comp_unit before reading
2858 any other DIEs.
2859
2860 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2861
2862 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2863
2864 2018-07-24 Tom Tromey <tom@tromey.com>
2865
2866 * utils.c (malloc, realloc, free): Don't declare.
2867 * configure, config.in: Rebuild.
2868 * configure.ac: Don't check for declarations of free, malloc, or
2869 realloc.
2870
2871 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2872
2873 * aarch64-linux-nat.c
2874 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2875 variable.
2876 * arm-linux-nat.c (fetch_regs): Likewise.
2877 (store_regs): Likewise.
2878 (fetch_vfp_regs): Likewise.
2879 (store_vfp_regs): Likewise.
2880 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2881 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2882 (arm_linux_nat_target::insert_watchpoint): Likewise.
2883 (arm_linux_nat_target::remove_watchpoint): Likewise.
2884 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2885 Likewise.
2886 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2887 Likewise.
2888 * ppc-linux-nat.c (fetch_register): Likewise.
2889 (fetch_all_gp_regs): Likewise.
2890 (fetch_ppc_registers): Likewise.
2891 (store_all_gp_regs): Likewise.
2892 (store_ppc_registers): Likewise.
2893 (hwdebug_insert_point): Likewise.
2894 (can_use_watchpoint_cond_accel): Likewise.
2895 * remote-sim.c (gdb_os_write_stdout): Likewise.
2896
2897 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2898 Tom Tromey <tom@tromey.com>
2899
2900 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2901 test for it.
2902 * configure: Rebuild.
2903
2904 2018-07-22 Tom Tromey <tom@tromey.com>
2905
2906 * regformats/regdat.sh: Define xmltarget_${name} inside
2907 #ifndef IN_PROCESS_AGENT.
2908
2909 2018-07-22 Tom Tromey <tom@tromey.com>
2910
2911 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2912
2913 2018-07-22 Tom Tromey <tom@tromey.com>
2914
2915 * symfile.c (reread_symbols): Notify iter, not objfile.
2916
2917 2018-07-22 Tom Tromey <tom@tromey.com>
2918
2919 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2920 Use arch_ops.
2921 (ravenscar_thread_target::prepare_to_store): Likewise.
2922
2923 2018-07-22 Tom Tromey <tom@tromey.com>
2924
2925 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2926 unused variable. Call value_fetch_lazy when needed.
2927 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2928 Remove unused variable. Call value_fetch_lazy when needed.
2929
2930 2018-07-22 Tom Tromey <tom@tromey.com>
2931
2932 * m32c-tdep.c (mark_dma): Return void.
2933 (make_regs): Remove unused declarations.
2934
2935 2018-07-22 Tom Tromey <tom@tromey.com>
2936
2937 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2938 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2939 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2940 bkscm_get_valid_block_smob_arg_unsafe for effect.
2941
2942 2018-07-22 Tom Tromey <tom@tromey.com>
2943
2944 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2945 value_type.
2946
2947 2018-07-22 Tom Tromey <tom@tromey.com>
2948
2949 * windows-nat.c (saved_context): Conditionally define.
2950 * remote.c (remote_target::remote_btrace_maybe_reopen):
2951 Conditionally declare "warned".
2952 * inflow.c (sigquit_ours): Conditionally define.
2953 (new_tty): Move "tty" declaration inside #if.
2954 * guile/guile.c (guile_datadir): Conditionally define.
2955 * charset.c (set_be_le_names): Move some declarations inside #if.
2956 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2957 #if.
2958 (parse_xml_btrace_conf): Likewise.
2959
2960 2018-07-22 Tom Tromey <tom@tromey.com>
2961
2962 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2963
2964 2018-07-22 Tom Tromey <tom@tromey.com>
2965
2966 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2967 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2968 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2969 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2970 * stack.c (frame_apply_level_command): Remove unused variable.
2971 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2972 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2973 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2974 unused variable.
2975 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2976 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2977 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2978 variable.
2979 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2980 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2981 variable.
2982 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2983 Remove unused variable.
2984 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2985 variable.
2986 * common/tdesc.c (print_xml_feature::visit): Remove unused
2987 variable.
2988 * compile/compile-object-load.c (store_regs): Remove unused
2989 variables.
2990 * complaints.c (clear_complaints): Remove unused variable.
2991 * corelow.c (core_target_open): Remove unused variable.
2992 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2993 variable.
2994 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2995 variable.
2996 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2997 variable.
2998 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2999 variable.
3000 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3001 variable.
3002 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3003 variable.
3004 * ia64-tdep.c (examine_prologue): Remove unused variable.
3005 * infcall.c (run_inferior_call): Remove unused variable.
3006 * inferior.c (exit_inferior): Remove unused variable.
3007 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3008 * linespec.c (decode_line_2): Remove unused variable.
3009 * linux-nat.c (super_close): Remove.
3010 * linux-tdep.c (linux_info_proc): Remove unused variable.
3011 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3012 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3013 Remove unused variable.
3014 * parse.c (find_minsym_type_and_address): Remove unused variable.
3015 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3016 variable.
3017 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3018 variable.
3019 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3020 variables.
3021 * record-btrace.c (record_btrace_target::store_registers): Remove
3022 unused variable.
3023 (cmd_show_record_btrace_cpu): Remove unused variable.
3024 * riscv-tdep.c (riscv_register_reggroup_p)
3025 (riscv_push_dummy_call, riscv_return_value): Remove unused
3026 variable.
3027 * rust-exp.y (literal): Remove unused variable.
3028 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3029 unused variable.
3030 <STRUCTOP_ANONYMOUS>: Likewise.
3031 * s390-linux-tdep.c (s390_linux_init_abi_31)
3032 (s390_linux_init_abi_64): Remove unused variable.
3033 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3034 (file_select_thread, net_windows_open, _initialize_ser_windows):
3035 Remove unused variables.
3036 * symtab.c (find_pc_sect_line): Remove unused variable.
3037 * target-memory.c (compute_garbled_blocks): Remove unused
3038 variable.
3039 (target_write_memory_blocks): Remove unused variable.
3040 * target.c (target_stack::unpush): Remove unused variables.
3041 * tracepoint.c (start_tracing, all_tracepoint_actions)
3042 (merge_uploaded_trace_state_variables)
3043 (print_one_static_tracepoint_marker): Remove unused variable.
3044 * unittests/basic_string_view/element_access/char/1.cc (test01):
3045 Remove unused variable.
3046 * windows-nat.c (windows_continue, windows_add_all_dlls)
3047 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3048 Remove unused variables.
3049
3050 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3051
3052 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3053 attr_profile in HAVE_ELF.
3054 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3055 HAVE_ELF.
3056
3057 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * frame.c (frame_register_unwind): Change parameter name.
3060 (frame_unwind_register): Likewise.
3061 (frame_unwind_register_value): Likewise.
3062 (frame_unwind_register_signed): Likewise.
3063 (frame_unwind_register_unsigned): Likewise.
3064 * frame.h (frame_register_unwind): Likewise.
3065 (frame_unwind_register): Likewise.
3066 (frame_unwind_register_value): Likewise.
3067 (frame_unwind_register_signed): Likewise.
3068 (frame_unwind_register_unsigned): Likewise.
3069 (frame_unwind_arch): Likewise.
3070
3071 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3072
3073 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3074 ISA maintenance.
3075
3076 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3077
3078 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3079 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3080 hand.
3081
3082 2018-07-20 Keith Seitz <keiths@redhat.com>
3083
3084 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3085 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3086 m_compunit_symtab, m_language>: Add "m_" prefix.
3087 Update all uses.
3088 * buildsym.c: Update all uses.
3089
3090 2018-07-20 Tom Tromey <tom@tromey.com>
3091
3092 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3093 * buildsym.h (record_line_ftype): Remove typedef.
3094
3095 2018-07-20 Tom Tromey <tom@tromey.com>
3096
3097 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3098 (end_expandable_symtab): Likewise.
3099 (end_symtab_get_static_block): Likewise.
3100 (end_symtab_from_static_block): Likewise.
3101 * buildsym-legacy.c (augment_type_symtab): Remove.
3102 (end_expandable_symtab): Remove.
3103 (end_symtab_get_static_block): Remove.
3104 (end_symtab_from_static_block): Remove.
3105
3106 2018-07-20 Tom Tromey <tom@tromey.com>
3107
3108 * dwarf2read.c: Include buildsym.h.
3109 (struct dwarf2_cu) <builder>: New method.
3110 (fixup_go_packaging): Update.
3111 (process_full_comp_unit, process_full_type_unit): Update. Don't
3112 use scoped_free_pendings.
3113 (using_directives): Add "cu" parameter, remove "language".
3114 (read_import_statement, setup_type_unit_groups, )
3115 (read_func_scope, read_lexical_block_scope)
3116 (dwarf2_record_block_ranges, read_namespace): Update.
3117 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3118 (lnp_state_machine::handle_end_sequence): Update.
3119 (class lnp_state_machine) <m_cu>: New member.
3120 <m_record_line_callback>: Remove.
3121 <m_currently_recording_lines>: New member.
3122 (lnp_state_machine::handle_set_file): Update.
3123 (noop_record_line): Remove.
3124 (dwarf_record_line_p): Add cu parameter.
3125 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3126 (lnp_state_machine::record_line)
3127 (lnp_state_machine::lnp_state_machine)
3128 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3129 (dwarf_decode_lines): Update.
3130 (dwarf2_start_subfile): Add cu parameter.
3131 (dwarf2_start_symtab, new_symbol): Update.
3132 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3133 Remove dwarf2_per_objfile parameter.
3134 (dwarf_decode_macros): Update.
3135
3136 2018-07-20 Tom Tromey <tom@tromey.com>
3137
3138 * stabsread.c (define_symbol): Update.
3139 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3140 * dwarf2read.c (new_symbol): Update.
3141 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3142 * cp-namespace.c: Include buildsym.h.
3143 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3144 * buildsym-legacy.c (get_buildsym_compunit): New function.
3145
3146 2018-07-20 Tom Tromey <tom@tromey.com>
3147
3148 * xcoffread.c: Include buildsym-legacy.h.
3149 * windows-nat.c: Include buildsym-legacy.h.
3150 * stabsread.c: Include buildsym-legacy.h.
3151 * mdebugread.c: Include buildsym-legacy.h.
3152 * buildsym-legacy.h: New file.
3153 * buildsym-legacy.c: New file, from buildsym.c.
3154 * go32-nat.c: Include buildsym-legacy.h.
3155 * dwarf2read.c: Include buildsym-legacy.h.
3156 * dbxread.c: Include buildsym-legacy.h.
3157 * cp-namespace.c: Include buildsym-legacy.h.
3158 * coffread.c: Include buildsym-legacy.h.
3159 * buildsym.h: Move some contents to buildsym-legacy.h.
3160 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3161 buildsym-legacy.c.
3162 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3163
3164 2018-07-20 Tom Tromey <tom@tromey.com>
3165
3166 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3167 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3168 (buildsym_compunit::buildsym_compunit)
3169 (buildsym_compunit::~buildsym_compunit)
3170 (buildsym_compunit::get_macro_table): Define.
3171
3172 2018-07-20 Tom Tromey <tom@tromey.com>
3173
3174 * buildsym.c (reset_symtab_globals): Remove.
3175 (buildsym_compunit::end_symtab_from_static_block): Update.
3176 (buildsym_compunit::augment_type_symtab): Update.
3177 (end_symtab_from_static_block): Call free_buildsym_compunit.
3178 (augment_type_symtab, end_symtab, end_expandable_symtab):
3179 Likewise.
3180
3181 2018-07-20 Tom Tromey <tom@tromey.com>
3182
3183 * arch-utils.c: Do not include buildsym.h.
3184 * mipsread.c: Do not include buildsym.h.
3185 * machoread.c: Do not include buildsym.h.
3186 * elfread.c: Do not include buildsym.h.
3187
3188 2018-07-20 Tom Tromey <tom@tromey.com>
3189
3190 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3191 initialization.
3192 (buildsym_compunit): Add new constructor.
3193 (struct buildsym_compunit) <get_last_source_file, finish_block,
3194 record_block_range, start_subfile, patch_subfile_names,
3195 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3196 set_last_source_start_addr, get_last_source_start_addr,
3197 get_local_using_directives, set_local_using_directives,
3198 get_global_using_directives, outermost_context_p,
3199 get_current_context_stack, get_context_stack_depth,
3200 get_current_subfile, get_local_symbols, get_file_symbols,
3201 get_global_symbols, record_debugformat, record_producer,
3202 push_context, pop_context, end_symtab_get_static_block,
3203 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3204 New public methods.
3205 <record_pending_block, finish_block_internal, make_blockvector,
3206 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3207 private methods.
3208 Update all users.
3209
3210 2018-05-22 Tom Tromey <tom@tromey.com>
3211
3212 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3213 parameter.
3214 (finish_block_internal): Update.
3215
3216 2018-07-20 Tom Tromey <tom@tromey.com>
3217
3218 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3219 parameter.
3220 (finish_block_internal): Update.
3221
3222 2018-07-20 Tom Tromey <tom@tromey.com>
3223
3224 * buildsym.h (EXTERN): Don't define or undef.
3225 * buildsym.c (EXTERN): Don't define.
3226
3227 2018-07-20 Tom Tromey <tom@tromey.com>
3228
3229 * buildsym.c: Remove TODO comment.
3230
3231 2018-07-20 Tom Tromey <tom@tromey.com>
3232
3233 * coffread.c (coff_symtab_read): Update.
3234 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3235 (xcoff_new_init): Update.
3236 * mipsread.c (mipscoff_new_init): Update.
3237 * mdebugread.c (mdebug_build_psymtabs): Update.
3238 * elfread.c (elf_new_init): Update.
3239 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3240 Update.
3241 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3242 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3243 (stabsect_build_psymtabs): Update.
3244 * buildsym.h (buildsym_init): Don't declare.
3245 * buildsym.c: Update comment.
3246 (prepare_for_building): Remove.
3247 (start_symtab, restart_symtab): Update.
3248 (reset_symtab_globals): Update comment.
3249 (buildsym_init): Remove.
3250
3251 2018-07-20 Tom Tromey <tom@tromey.com>
3252
3253 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3254 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3255 (read_enum_type, common_block_start, common_block_end)
3256 (cleanup_undefined_types_1, finish_global_stabs): Update.
3257 * mdebugread.c (psymtab_to_symtab_1): Update.
3258 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3259 (read_lexical_block_scope, new_symbol): Update.
3260 * dbxread.c (process_one_symbol): Update.
3261 * coffread.c (coff_symtab_read, process_coff_symbol)
3262 (coff_read_enum_type): Update.
3263 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3264 declare.
3265 (get_local_symbols, get_file_symbols, get_global_symbols): New
3266 functions.
3267 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3268 m_global_symbols.
3269 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3270 (~scoped_free_pendings): Update.
3271 (finish_block, prepare_for_building, reset_symtab_globals)
3272 (end_symtab_get_static_block, end_symtab_with_blockvector)
3273 (augment_type_symtab, push_context): Update.
3274 (get_local_symbols, get_file_symbols, get_global_symbols): New
3275 functions.
3276 (buildsym_init): Update.
3277
3278 2018-07-20 Tom Tromey <tom@tromey.com>
3279
3280 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3281 (process_full_type_unit): Likewise.
3282 (dwarf2_start_symtab): Set list_in_scope.
3283
3284 2018-07-20 Tom Tromey <tom@tromey.com>
3285
3286 * dwarf2read.c (process_psymtab_comp_unit_reader)
3287 (build_type_psymtabs_reader): Do not set list_in_scope.
3288
3289 2018-07-20 Tom Tromey <tom@tromey.com>
3290
3291 * buildsym.c (free_pendings): Remove.
3292 (add_symbol_to_list, scoped_free_pendings)
3293 (finish_block_internal, buildsym_init): Update.
3294
3295 2018-07-20 Tom Tromey <tom@tromey.com>
3296
3297 * xcoffread.c (read_xcoff_symtab): Update.
3298 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3299 Update.
3300 * dbxread.c (process_one_symbol): Update.
3301 * coffread.c (coff_symtab_read): Update.
3302 * buildsym.h (finish_block): Update.
3303 * buildsym.c (finish_block): Remove "listhead" argument.
3304 (end_symtab_get_static_block): Update.
3305
3306 2018-07-20 Tom Tromey <tom@tromey.com>
3307
3308 * buildsym.h (class scoped_free_pendings): Remove constructor.
3309 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3310 method.
3311 <m_pending_block_obstack, m_pending_blocks>: New members.
3312 (pending_block_obstack, pending_blocks): Remove.
3313 (scoped_free_pendings::scoped_free_pendings): Default.
3314 (~scoped_free_pendings): Update.
3315 (free_pending_blocks): Remove.
3316 (finish_block_internal, record_pending_block, make_blockvector)
3317 (end_symtab_get_static_block, augment_type_symtab, push_context)
3318 (buildsym_init): Update.
3319
3320 2018-07-20 Tom Tromey <tom@tromey.com>
3321
3322 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3323 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3324 members.
3325 (pending_addrmap, pending_addrmap_obstack)
3326 (pending_addrmap_interesting): Remove.
3327 (scoped_free_pendings, record_block_range, make_blockvector)
3328 (prepare_for_building, reset_symtab_globals, buildsym_init):
3329 Update.
3330
3331 2018-07-20 Tom Tromey <tom@tromey.com>
3332
3333 * xcoffread.c (process_linenos): Update.
3334 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3335 * mdebugread.c (psymtab_to_symtab_1): Update.
3336 * dwarf2read.c (setup_type_unit_groups)
3337 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3338 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3339 * dbxread.c (process_one_symbol): Update.
3340 * coffread.c (coff_symtab_read, enter_linenos)
3341 (process_coff_symbol): Update.
3342 * buildsym.h (current_subfile): Don't declare.
3343 (get_current_subfile): Declare.
3344 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3345 member.
3346 (start_subfile, free_buildsym_compunit, push_subfile)
3347 (prepare_for_building, start_symtab): Update.
3348 (get_current_subfile): New function.
3349
3350 2018-07-20 Tom Tromey <tom@tromey.com>
3351
3352 * coffread.c (coff_symtab_read): Update.
3353 * xcoffread.c (read_xcoff_symtab): Update.
3354 * dwarf2read.c (new_symbol): Update.
3355 (read_func_scope, read_lexical_block_scope): Update.
3356 * dbxread.c (process_one_symbol): Update.
3357 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3358 (outermost_context_p): Remove macro.
3359 (outermost_context_p, get_current_context_stack)
3360 (get_context_stack_depth): Declare.
3361 (pop_context): Return struct context_stack.
3362 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3363 member.
3364 (context_stack_size): Remove.
3365 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3366 (prepare_for_building, end_symtab_get_static_block)
3367 (augment_type_symtab, push_context): Update.
3368 (pop_context): Return struct context_stack.
3369 (outermost_context_p, get_current_context_stack)
3370 (get_context_stack_depth): New functions.
3371 (buildsym_init): Update.
3372
3373 2018-07-20 Tom Tromey <tom@tromey.com>
3374
3375 * rust-exp.y: Now a pure parser. Update all rules.
3376 (%union): Move earlier.
3377 (current_parser, work_obstack): Remove globals.
3378 (rust_parser, ~rust_parser): Update.
3379 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3380 lex_character, lex_number, lex_string, lex_identifier,
3381 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3382 convert_name, convert_params_to_expression,
3383 convert_ast_to_expression, ast_basic_type, ast_operation,
3384 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3385 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3386 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3387 ast_array_type, ast_slice_type, ast_reference_type,
3388 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3389 (rust_parse): Update.
3390 (rustyyerror, rustyylex): Add parser parameter.
3391 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3392 (rust_lex_stringish_test, rust_lex_test_sequence)
3393 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3394 (rust_lex_test_push_back, rust_lex_tests): Update.
3395
3396 2018-07-19 Pedro Alves <palves@redhat.com>
3397
3398 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3399 gdb::unique_xmalloc_ptr.
3400 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3401 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3402 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3403 copy-initialization.
3404 * guile/scm-pretty-print.c (ppscm_print_children): Use
3405 gdb::unique_xmalloc_ptr instead of cleanups.
3406 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3407 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3408 gdb::unique_xmalloc_ptr.
3409 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3410 Adjust to use gdb::unique_xmalloc_ptr.
3411 * guile/scm-utils.c (extract_arg): Adjust.
3412 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3413 gdb::unique_xmalloc_ptr instead of a cleanup.
3414
3415 2018-07-19 Tom Tromey <tom@tromey.com>
3416
3417 * utils.c (do_value_free_to_mark)
3418 (make_cleanup_value_free_to_mark): Remove.
3419 * utils.h (make_cleanup_value_free_to_mark): Remove.
3420
3421 2018-07-19 Pedro Alves <palves@redhat.com>
3422
3423 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3424 forwarding reference.
3425
3426 2018-07-18 Pedro Alves <palves@redhat.com>
3427
3428 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3429 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3430 cleanup.
3431
3432 2018-07-18 Pedro Alves <palves@redhat.com>
3433
3434 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3435 exceptions.
3436 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3437 (gdbscm_wrap): New.
3438 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3439 directly instead of a cleanup.
3440 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3441 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3442 (vlscm_binop_gdbthrow): New, factored out from ...
3443 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3444 (vlscm_rich_compare): Use gdbscm_wrap.
3445 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3446 instead of a cleanup.
3447 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3448 cleanup.
3449 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3450 Use xfree directly instead of a cleanup.
3451 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3452 Adjust to use gdbscm_wrap and scoped_value_mark.
3453 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3454 (gdbscm_value_address, gdbscm_value_dereference)
3455 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3456 scoped_value_mark.
3457 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3458 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3459 scoped_value_mark.
3460 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3461 gdbscm_wrap and scoped_value_mark.
3462 (gdbscm_value_to_string): Use xfree directly instead of a
3463 cleanup. Move 'buffer' unique_ptr to TRY scope.
3464 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3465 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3466 scoped_value_mark.
3467 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3468 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3469 scoped_value_mark.
3470 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3471 gdbscm_wrap.
3472
3473 2018-07-18 Tom de Vries <tdevries@suse.de>
3474
3475 * findvar.c (default_read_var_value): Also resolve dynamic type for
3476 LOC_OPTIMIZED_OUT vars.
3477
3478 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3479
3480 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3481 decoding.
3482
3483 2018-07-17 Tom Tromey <tom@tromey.com>
3484
3485 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3486 (compute_enum_list, pascm_set_param_value_x)
3487 (gdbscm_parameter_value): Update.
3488 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3489 (gdbscm_scm_to_host_string): Update.
3490 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3491 Update.
3492 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3493 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3494 * guile/scm-string.c (gdbscm_scm_to_string): Return
3495 unique_xmalloc_ptr.
3496 (gdbscm_scm_to_host_string): Likewise.
3497
3498 2018-07-17 Tom Tromey <tom@tromey.com>
3499
3500 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3501 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3502 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3503 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3504 unique_xmalloc_ptr.
3505
3506 2018-07-17 Tom Tromey <tom@tromey.com>
3507
3508 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3509 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3510 Update.
3511 * guile/scm-cmd.c (cmdscm_function): Update.
3512 * guile/scm-pretty-print.c
3513 (ppscm_print_exception_unless_memory_error): Update.
3514 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3515 Return unique_xmalloc_ptr.
3516
3517 2018-07-17 Tom Tromey <tom@tromey.com>
3518
3519 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3520 Use string_printf.
3521
3522 2018-07-17 Jim Wilson <jimw@sifive.com>
3523
3524 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3525 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3526 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3527 unecessary braces after EF_RISCV_RVC test. Delete call to
3528 set_gdbarch_decr_pc_after_break.
3529
3530 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3531 RISCV_LAST_FP_REGNUM + 1.
3532 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3533
3534 2018-07-17 Tom Tromey <tom@tromey.com>
3535
3536 * configure.ac: Remove --disable-gdbcli.
3537 * configure: Rebuild.
3538 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3539 (SUBDIR_CLI_CFLAGS): Remove.
3540 (SFILES): Use SUBDIR_CLI_SRCS.
3541 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3542
3543 2018-07-17 Tom Tromey <tom@tromey.com>
3544
3545 PR gdb/18624:
3546 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3547
3548 2018-07-16 Jim Wilson <jimw@sifive.com>
3549
3550 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3551
3552 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3553
3554 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3555 variable.
3556 (libunwind_frame_sniffer): Likewise.
3557 (libunwind_frame_prev_register): Likewise.
3558 (libunwind_sigtramp_frame_sniffer): Likewise.
3559 * ia64-tdep.c (ia64_access_reg): Likewise.
3560 (ia64_access_rse_reg): Likewise.
3561 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3562 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3563
3564 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3565
3566 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3567
3568 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3569
3570 * remote-sim.c (gdbsim_target::close,
3571 gdbsim_target::mourn_inferior): Remove unused variables.
3572
3573 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3574
3575 * ia64-tdep.c (ktab_buf): New global.
3576 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3577 (get_kernel_table): Adjust.
3578
3579 2018-07-16 Tom Tromey <tom@tromey.com>
3580
3581 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3582 * dwarf2read.c (using_directives, new_symbol): Use
3583 outermost_context_p.
3584 * dbxread.c (process_one_symbol): Use outermost_context_p.
3585 * coffread.c (coff_symtab_read): Use outermost_context_p.
3586
3587 2018-07-16 Tom Tromey <tom@tromey.com>
3588
3589 * dwarf2read.c (using_directives, read_func_scope)
3590 (read_lexical_block_scope): Update.
3591 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3592 * buildsym.h (local_using_directives, global_using_directives):
3593 Don't declare.
3594 (get_local_using_directives, set_local_using_directives)
3595 (get_global_using_directives): Declare.
3596 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3597 m_global_using_directives>: New members.
3598 (finish_block_internal, prepare_for_building)
3599 (reset_symtab_globals, end_symtab_get_static_block)
3600 (push_context): Update.
3601 (get_local_using_directives, set_local_using_directives)
3602 (get_global_using_directives): New functions.
3603 (buildsym_init): Update.
3604
3605 2018-07-16 Tom Tromey <tom@tromey.com>
3606
3607 * xcoffread.c (xcoff_initial_scan): Don't call
3608 free_pending_blocks.
3609 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3610 * buildsym.h (class scoped_free_pendings): Add constructor.
3611 (free_pending_blocks): Don't declare.
3612 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3613 (free_pending_blocks): Now static.
3614
3615 2018-07-16 Tom Tromey <tom@tromey.com>
3616
3617 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3618 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3619 member.
3620 (struct subfile_stack): Remove.
3621 (subfile_stack): Remove.
3622 (push_subfile, pop_subfile, buildsym_init): Update.
3623
3624 2018-07-16 Tom Tromey <tom@tromey.com>
3625
3626 * buildsym.c (push_subfile): Use gdb_assert.
3627 (pop_subfile): Use gdb_assert.
3628
3629 2018-07-16 Tom Tromey <tom@tromey.com>
3630
3631 * buildsym.h (merge_symbol_lists): Remove.
3632 * buildsym.c (merge_symbol_lists): Remove.
3633
3634 2018-07-16 Tom Tromey <tom@tromey.com>
3635
3636 * stabsread.c (scan_file_globals): Update comment.
3637 * stabsread.h (scan_file_globals): Move from buildsym.h.
3638 * buildsym.h (scan_file_globals): Move to stabsread.h.
3639
3640 2018-07-16 Tom Tromey <tom@tromey.com>
3641
3642 * xcoffread.c (xcoff_new_init): Update.
3643 * mipsread.c (mipscoff_new_init): Update.
3644 * mdebugread.c (mdebug_build_psymtabs): Update.
3645 * elfread.c (elf_new_init): Update.
3646 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3647 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3648 * buildsym.h (buildsym_new_init): Don't declare.
3649 * buildsym.c (buildsym_new_init): Remove.
3650
3651 2018-07-16 Tom Tromey <tom@tromey.com>
3652
3653 * stabsread.h (within_function): Move from buildsym.h.
3654 * stabsread.c (start_stabs): Clear within_function.
3655 * coffread.c (coff_start_symtab): Clear within_function.
3656 * buildsym.h (within_function): Move to stabsread.h.
3657 * buildsym.c (prepare_for_building): Update.
3658
3659 2018-07-16 Tom Tromey <tom@tromey.com>
3660
3661 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3662 * dwarf2read.c (dwarf2_start_symtab): Don't set
3663 processing_gcc_compilation.
3664 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3665
3666 2018-07-16 Tom Tromey <tom@tromey.com>
3667
3668 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3669 (next_symbol_text_func): Move from buildsym.h.
3670 * stabsread.c (hashname): Move from buildsym.c.
3671 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3672 (next_symbol_text_func, hashname): Move to stabsread.h.
3673 * buildsym.c: Don't include bcache.h
3674 (hashname): Move to stasbread.c.
3675
3676 2018-07-16 Tom Tromey <tom@tromey.com>
3677
3678 * buildsym.h (context_stack_size): Don't declare.
3679 * buildsym.c (context_stack_size): New global.
3680
3681 2018-07-16 Tom Tromey <tom@tromey.com>
3682
3683 * dbxread.c (processing_acc_compilation): New global.
3684 * buildsym.h (processing_acc_compilation): Don't declare.
3685
3686 2018-07-16 Tom Tromey <tom@tromey.com>
3687
3688 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3689 * dbxread.c (read_ofile_symtab): Update.
3690 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3691 * buildsym.h (last_source_start_addr): Remove.
3692 (set_last_source_start_addr, get_last_source_start_addr):
3693 Declare.
3694 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3695 parameter.
3696 (struct buildsym_compunit) <m_last_source_start_addr>: New
3697 member.
3698 (prepare_for_building): Remove start_addr parameter.
3699 (start_symtab, restart_symtab, end_symtab_get_static_block)
3700 (end_symtab_with_blockvector): Update.
3701 (set_last_source_start_addr, get_last_source_start_addr): New
3702 functions.
3703
3704 2018-07-16 Tom Tromey <tom@tromey.com>
3705
3706 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3707 member.
3708 (have_line_numbers): Remove.
3709 (record_line, prepare_for_building, end_symtab_get_static_block)
3710 (augment_type_symtab): Update.
3711
3712 2018-07-16 Tom Tromey <tom@tromey.com>
3713
3714 * buildsym.c (~buildsym_compunit): Free the macro table.
3715 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3716 methods.
3717 <m_pending_macros>: New member.
3718 (pending_macros): Remove.
3719 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3720 (reset_symtab_globals, end_symtab_get_static_block)
3721 (end_symtab_with_blockvector, augment_type_symtab)
3722 (buildsym_init): Update.
3723
3724 2018-07-16 Tom Tromey <tom@tromey.com>
3725
3726 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3727 parameter.
3728 (buildsym_compunit::set_last_source_file): New method.
3729 <m_last_source_file>: New member.
3730 (prepare_for_building): Remove "name" parameter.
3731 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3732 (last_source_file): Remove.
3733 (set_last_source_file, get_last_source_file): Update.
3734
3735 2018-07-16 Tom Tromey <tom@tromey.com>
3736
3737 * buildsym.c (prepare_for_building): Add assert.
3738
3739 2018-07-16 Tom Tromey <tom@tromey.com>
3740
3741 * buildsym.c (~buildsym_compunit): Update.
3742 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3743 (start_subfile, patch_subfile_names)
3744 (end_symtab_with_blockvector): Update.
3745
3746 2018-07-16 Tom Tromey <tom@tromey.com>
3747
3748 * buildsym.c (struct buildsym_compunit): Add constructor,
3749 destructor, initializers.
3750 (start_buildsym_compunit): Remove.
3751 (free_buildsym_compunit): Use "delete".
3752 (start_symtab, restart_symtab): Use "new".
3753
3754 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3755
3756 * symfile.c (set_objfile_default_section_offset): Remove struct
3757 keyword.
3758
3759 2018-07-14 Stafford Horne <shorne@gmail.com>
3760
3761 * (Responsible Maintainers): Add myself as or1k maintainer.
3762
3763 2018-07-13 Tom Tromey <tom@tromey.com>
3764
3765 * symfile.c (set_objfile_default_section_offset): Use extra braces
3766 around initializer.
3767
3768 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3769
3770 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3771 non-branching basr.
3772
3773 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3774
3775 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3776 unittests/cli-utils-selftests.c
3777 * unittests/cli-utils-selftests.c: New file.
3778
3779 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3780
3781 * NEWS: Mention new commands. Mention change to 'thread apply'.
3782
3783 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3784
3785 * thread.c (thr_try_catch_cmd): New function.
3786 (thread_apply_all_command): Handle qcs flags.
3787 (thread_apply_command): Handle qcs flags.
3788 (taas_command): New function.
3789 (tfaas_command): New function.
3790 (_initialize_thread): Update to setup the new commands 'taas
3791 and 'tfaas'. Change doc string for 'thread apply'.
3792
3793 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3794
3795 * stack.c: (trailing_outermost_frame): New function, mostly
3796 extracted from backtrace_command_1.
3797 (leading_innermost_frame): New function.
3798 (backtrace_command_1): Update to call trailing_outermost_frame.
3799 (frame_apply_command_count): New function.
3800 (frame_apply_level_command): New function.
3801 (frame_apply_all_command): New function.
3802 (frame_apply_command): New function.
3803 (faas_command): New function.
3804 (frame_cmd_list): New variable.
3805 (_initialize_stack): Update to setup the new commands 'frame apply'
3806 and 'faas'.
3807
3808 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3809
3810 * cli-utils.c (number_or_range_parser::get_number): Only handle
3811 numbers or convenience var as numbers.
3812 (parse_flags): New function.
3813 (parse_flags_qcs): New function.
3814 (number_or_range_parser::finished): Ensure parsing end is detected
3815 before end of string.
3816 * cli-utils.h (parse_flags): New function.
3817 (parse_flags_qcs): New function.
3818 (number_or_range_parser): Remove m_finished bool.
3819 (number_or_range_parser::skip_range): Set m_in_range to false.
3820
3821 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3822
3823 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3824 on Windows.
3825
3826 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3827 Jan Kratochvil <jan.kratochvil@redhat.com>
3828 Paul Fertser <fercerpav@gmail.com>
3829 Tsutomu Seki <sekiriki@gmail.com>
3830 Pedro Alves <palves@redhat.com>
3831
3832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3833 'unittests/parse-connection-spec-selftests.c'.
3834 (COMMON_SFILES): Add 'common/netstuff.c'.
3835 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3836 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3837 * common/netstuff.c: New file.
3838 * common/netstuff.h: New file.
3839 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3840 (wait_for_connect): Update comment. New parameter
3841 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3842 Use 'sock' directly instead of 'scb->fd'.
3843 (try_connect): New function, with code from 'net_open'.
3844 (net_open): Rewrite main loop to deal with multiple
3845 sockets/addresses. Handle IPv6-style hostnames; implement
3846 support for IPv6 connections.
3847 * unittests/parse-connection-spec-selftests.c: New file.
3848
3849 2018-07-11 Pedro Alves <palves@redhat.com>
3850
3851 PR gdb/23377
3852 * remote.c (remote_target::remote_detach_pid): Call
3853 set_current_process.
3854
3855 2018-07-11 Pedro Alves <palves@redhat.com>
3856
3857 * h8300-tdep.c (h8300_gdbarch_init): Remove
3858 set_gdbarch_ecoff_reg_to_regnum calls.
3859
3860 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3861
3862 PR c++/23373
3863 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3864 offsets/sizes for static members of a class/struct.
3865
3866 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3867
3868 * target-descriptions.c (tdesc_register_bitsize): Rename.
3869 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3870 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3871 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3872
3873 2018-07-10 Tom Tromey <tom@tromey.com>
3874
3875 * breakpoint.c (moribund_locations): Now static and a
3876 std::vector.
3877 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3878 (build_bpstat_chain, update_global_location_list)
3879 (breakpoint_retire_moribund): Update.
3880 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3881 VEC.
3882
3883 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3884
3885 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3886 (riscv_register_reggroup_p): Use new function, remove unneeded
3887 parenthesis.
3888 (riscv_push_dummy_call): Extend assert to compare against xlen or
3889 flen based on register type.
3890
3891 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3892
3893 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3894
3895 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3896
3897 * remote.c (show_hardware_watchpoint_limit): New function.
3898 (show_hardware_watchpoint_length_limit): New function.
3899 (show_hardware_breakpoint_limit): New function.
3900 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3901 where appropriate, update help text.
3902
3903 2018-07-09 Tom Tromey <tom@tromey.com>
3904
3905 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3906 (CLIBS): Don't mention NAT_CLIBS.
3907
3908 2018-07-09 Tom Tromey <tom@tromey.com>
3909
3910 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3911 (LIBGDB_OBS, clean mostlyclean): Update.
3912 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3913
3914 2018-07-09 Tom Tromey <tom@tromey.com>
3915
3916 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3917 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3918 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3919
3920 2018-07-09 Tom Tromey <tom@tromey.com>
3921
3922 * Makefile.in (ALLDEPFILES): Remove exec.c.
3923 (COMMON_OBS): Remove exec.o.
3924 (COMMON_SFILES): Add exec.c.
3925
3926 2018-07-09 Tom Tromey <tom@tromey.com>
3927
3928 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3929
3930 2018-07-09 Tom Tromey <tom@tromey.com>
3931
3932 * Makefile.in (clean mostlyclean): Remove stamp-version.
3933 (version.c): Depend on stamp-version.
3934 (stamp-version): New rule, from version.c rule.
3935
3936 2018-07-09 Tom Tromey <tom@tromey.com>
3937
3938 * Makefile.in (init.c): Depend on stamp-init.
3939 (stamp-init): New rule, from init.c rule.
3940 (clean mostlyclean): Remove stamp-init.
3941
3942 2018-07-09 Tom Tromey <tom@tromey.com>
3943
3944 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3945 SUBDIR_GCC_COMPILE_SRCS.
3946
3947 2018-07-09 Tom Tromey <tom@tromey.com>
3948
3949 * Makefile.in (init.c): Remove some unused sed rules.
3950
3951 2018-07-09 Tom Tromey <tom@tromey.com>
3952
3953 * Makefile.in (TSOBS): Remove.
3954 (INIT_FILES): Update.
3955 (LIBGDB_OBS): Update.
3956 (COMMON_SFILES): Add inflow.c.
3957 (SFILES): Remove inflow.c.
3958
3959 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3960
3961 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3962
3963 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3964
3965 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3966 get_saveloc_name, is_signal_frame_name, step_name,
3967 init_remote_name, create_addr_space_name,
3968 destroy_addr_space_name, search_unwind_table_name,
3969 find_dyn_list_name): Constify.
3970
3971 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3972
3973 * darwin-nat.c (darwin_pthread_kill): New function.
3974 (darwin_resume_thread): Use darwin_pthread_kill.
3975
3976 2018-07-05 Tom de Vries <tdevries@suse.de>
3977
3978 * macroexp.c (macro_buffer) <operator=>: New member function.
3979
3980 2018-07-04 Tom Tromey <tom@tromey.com>
3981
3982 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3983
3984 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3985
3986 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3987 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3988 * maint.c: Likewise.
3989 * top.c: Likewise.
3990
3991 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3992
3993 * NEWS: Create a new section for the next release branch.
3994 Rename the section of the current branch, now that it has
3995 been cut.
3996
3997 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3998
3999 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4000 * version.in: Bump version to 8.2.50.DATE-git.
4001
4002 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4003 Pedro Alves <palves@redhat.com>
4004
4005 * linux-nat.c (linux_init_ptrace): Rename to ...
4006 (linux_init_ptrace_procfs): ... this. Call
4007 linux_proc_init_warnings.
4008 (linux_nat_target::post_attach)
4009 (linux_nat_target::post_startup_inferior): Adjust.
4010 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4011 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4012
4013 2018-07-04 Tom de Vries <tdevries@suse.de>
4014
4015 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4016 check ...
4017 (read_comp_unit_head): ... here.
4018
4019 2018-07-03 Tom Tromey <tom@tromey.com>
4020
4021 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4022 (stop_tracing, tstatus_command)
4023 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4024 (print_one_static_tracepoint_marker): Update.
4025 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4026 std::vector.
4027 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4028 VEC.
4029 (all_tracepoints, static_tracepoints_here): Return std::vector.
4030
4031 2018-07-03 Tom Tromey <tom@tromey.com>
4032
4033 * common/ptid.c (ptid_equal): Remove.
4034 * common/ptid.h (ptid_equal): Don't declare.
4035 * ada-tasks.c: Update.
4036 * breakpoint.c: Update.
4037 * common/agent.c: Update.
4038 * corelow.c: Update.
4039 * darwin-nat-info.c: Update.
4040 * darwin-nat.c: Update.
4041 * dcache.c: Update.
4042 * dtrace-probe.c: Update.
4043 * dummy-frame.c: Update.
4044 * fbsd-nat.c: Update.
4045 * frame.c: Update.
4046 * gdbthread.h: Update.
4047 * gnu-nat.c: Update.
4048 * go32-nat.c: Update.
4049 * inf-loop.c: Update.
4050 * inf-ptrace.c: Update.
4051 * infcall.c: Update.
4052 * infcmd.c: Update.
4053 * inflow.c: Update.
4054 * infrun.c: Update.
4055 * linux-fork.c: Update.
4056 * linux-nat.c: Update.
4057 * linux-thread-db.c: Update.
4058 * mi/mi-cmd-var.c: Update.
4059 * mi/mi-interp.c: Update.
4060 * mi/mi-main.c: Update.
4061 * nto-procfs.c: Update.
4062 * ppc-linux-tdep.c: Update.
4063 * procfs.c: Update.
4064 * python/py-inferior.c: Update.
4065 * python/py-record-btrace.c: Update.
4066 * python/py-record.c: Update.
4067 * ravenscar-thread.c: Update.
4068 * regcache.c: Update.
4069 * remote-sim.c: Update.
4070 * remote.c: Update.
4071 * sol-thread.c: Update.
4072 * solib.c: Update.
4073 * target.c: Update.
4074 * tui/tui-stack.c: Update.
4075 * varobj.c: Update.
4076 * windows-nat.c: Update.
4077 * windows-tdep.c: Update.
4078
4079 2018-07-03 Tom Tromey <tom@tromey.com>
4080
4081 * common/ptid.c (ptid_match): Remove.
4082 * common/ptid.h (ptid_match): Don't declare.
4083 * fbsd-nat.c: Update.
4084 * infcmd.c: Update.
4085 * infrun.c: Update.
4086 * linux-nat.c: Update.
4087 * record-btrace.c: Update.
4088 * regcache.c: Update.
4089 * remote.c: Update.
4090
4091 2018-07-03 Tom Tromey <tom@tromey.com>
4092
4093 * common/ptid.c (ptid_tid_p): Remove.
4094 * common/ptid.h (ptid_tid_p): Don't declare.
4095 * sol-thread.c: Update.
4096
4097 2018-07-03 Tom Tromey <tom@tromey.com>
4098
4099 * common/ptid.c (ptid_lwp_p): Remove.
4100 * common/ptid.h (ptid_lwp_p): Don't declare.
4101 * fbsd-nat.c: Update.
4102 * linux-nat.c: Update.
4103 * nat/linux-procfs.c: Update.
4104 * nat/x86-linux-dregs.c: Update.
4105 * sol-thread.c: Update.
4106
4107 2018-07-03 Tom Tromey <tom@tromey.com>
4108
4109 * common/ptid.c (ptid_is_pid): Remove.
4110 * common/ptid.h (ptid_is_pid): Don't declare.
4111 * infrun.c: Update.
4112 * linux-nat.c: Update.
4113 * mi/mi-interp.c: Update.
4114 * remote.c: Update.
4115 * thread.c: Update.
4116
4117 2018-07-03 Tom Tromey <tom@tromey.com>
4118
4119 * common/ptid.c (ptid_get_tid): Remove.
4120 * common/ptid.h (ptid_get_tid): Don't declare.
4121 * ada-tasks.c: Update.
4122 * aix-thread.c: Update.
4123 * bsd-uthread.c: Update.
4124 * darwin-nat.c: Update.
4125 * fbsd-nat.c: Update.
4126 * i386-darwin-nat.c: Update.
4127 * infrun.c: Update.
4128 * linux-tdep.c: Update.
4129 * nto-procfs.c: Update.
4130 * ppc-ravenscar-thread.c: Update.
4131 * python/py-infthread.c: Update.
4132 * ravenscar-thread.c: Update.
4133 * sol-thread.c: Update.
4134 * sparc-ravenscar-thread.c: Update.
4135 * windows-nat.c: Update.
4136
4137 2018-07-03 Tom Tromey <tom@tromey.com>
4138
4139 * common/ptid.c (ptid_get_lwp): Remove.
4140 * common/ptid.h (ptid_get_lwp): Don't declare.
4141 * aarch64-linux-nat.c: Update.
4142 * ada-tasks.c: Update.
4143 * aix-thread.c: Update.
4144 * amd64-linux-nat.c: Update.
4145 * arm-linux-nat.c: Update.
4146 * corelow.c: Update.
4147 * fbsd-nat.c: Update.
4148 * fbsd-tdep.c: Update.
4149 * gnu-nat.c: Update.
4150 * i386-cygwin-tdep.c: Update.
4151 * i386-gnu-nat.c: Update.
4152 * i386-linux-nat.c: Update.
4153 * ia64-linux-nat.c: Update.
4154 * inf-ptrace.c: Update.
4155 * infrun.c: Update.
4156 * linux-fork.c: Update.
4157 * linux-nat.c: Update.
4158 * linux-tdep.c: Update.
4159 * linux-thread-db.c: Update.
4160 * mips-linux-nat.c: Update.
4161 * nat/aarch64-linux-hw-point.c: Update.
4162 * nat/aarch64-linux.c: Update.
4163 * nat/linux-btrace.c: Update.
4164 * nat/linux-osdata.c: Update.
4165 * nat/linux-procfs.c: Update.
4166 * nat/x86-linux-dregs.c: Update.
4167 * obsd-nat.c: Update.
4168 * ppc-fbsd-nat.c: Update.
4169 * ppc-linux-nat.c: Update.
4170 * procfs.c: Update.
4171 * python/py-infthread.c: Update.
4172 * ravenscar-thread.c: Update.
4173 * remote.c: Update.
4174 * s390-linux-nat.c: Update.
4175 * sol-thread.c: Update.
4176 * sol2-tdep.c: Update.
4177 * spu-linux-nat.c: Update.
4178 * x86-linux-nat.c: Update.
4179 * xtensa-linux-nat.c: Update.
4180
4181 2018-07-03 Tom Tromey <tom@tromey.com>
4182
4183 * common/ptid.c (ptid_get_pid): Remove.
4184 * common/ptid.h (ptid_get_pid): Don't declare.
4185 * aarch64-linux-nat.c: Update.
4186 * ada-lang.c: Update.
4187 * aix-thread.c: Update.
4188 * alpha-bsd-nat.c: Update.
4189 * amd64-fbsd-nat.c: Update.
4190 * amd64-linux-nat.c: Update.
4191 * arm-linux-nat.c: Update.
4192 * arm-nbsd-nat.c: Update.
4193 * auxv.c: Update.
4194 * break-catch-syscall.c: Update.
4195 * breakpoint.c: Update.
4196 * bsd-uthread.c: Update.
4197 * corelow.c: Update.
4198 * ctf.c: Update.
4199 * darwin-nat.c: Update.
4200 * fbsd-nat.c: Update.
4201 * fbsd-tdep.c: Update.
4202 * gcore.c: Update.
4203 * gnu-nat.c: Update.
4204 * hppa-nbsd-nat.c: Update.
4205 * hppa-obsd-nat.c: Update.
4206 * i386-fbsd-nat.c: Update.
4207 * ia64-linux-nat.c: Update.
4208 * inf-ptrace.c: Update.
4209 * infcmd.c: Update.
4210 * inferior.c: Update.
4211 * inferior.h: Update.
4212 * inflow.c: Update.
4213 * infrun.c: Update.
4214 * linux-fork.c: Update.
4215 * linux-nat.c: Update.
4216 * linux-tdep.c: Update.
4217 * linux-thread-db.c: Update.
4218 * m68k-bsd-nat.c: Update.
4219 * mi/mi-interp.c: Update.
4220 * mi/mi-main.c: Update.
4221 * mips-linux-nat.c: Update.
4222 * mips-nbsd-nat.c: Update.
4223 * mips64-obsd-nat.c: Update.
4224 * nat/aarch64-linux-hw-point.c: Update.
4225 * nat/aarch64-linux.c: Update.
4226 * nat/linux-btrace.c: Update.
4227 * nat/linux-osdata.c: Update.
4228 * nat/linux-procfs.c: Update.
4229 * nat/x86-linux-dregs.c: Update.
4230 * nto-procfs.c: Update.
4231 * obsd-nat.c: Update.
4232 * ppc-linux-nat.c: Update.
4233 * ppc-nbsd-nat.c: Update.
4234 * ppc-obsd-nat.c: Update.
4235 * proc-service.c: Update.
4236 * procfs.c: Update.
4237 * python/py-inferior.c: Update.
4238 * python/py-infthread.c: Update.
4239 * ravenscar-thread.c: Update.
4240 * record.c: Update.
4241 * remote-sim.c: Update.
4242 * remote.c: Update.
4243 * rs6000-nat.c: Update.
4244 * s390-linux-nat.c: Update.
4245 * sh-nbsd-nat.c: Update.
4246 * sol-thread.c: Update.
4247 * sparc-nat.c: Update.
4248 * sparc64-tdep.c: Update.
4249 * spu-linux-nat.c: Update.
4250 * spu-tdep.c: Update.
4251 * target-debug.h: Update.
4252 * target.c: Update.
4253 * thread.c: Update.
4254 * tid-parse.c: Update.
4255 * tracefile-tfile.c: Update.
4256 * vax-bsd-nat.c: Update.
4257 * windows-nat.c: Update.
4258 * x86-linux-nat.c: Update.
4259 * x86-nat.c: Update.
4260
4261 2018-07-03 Tom Tromey <tom@tromey.com>
4262
4263 * common/ptid.c (pid_to_ptid): Remove.
4264 * common/ptid.h (pid_to_ptid): Don't declare.
4265 * aix-thread.c: Update.
4266 * arm-linux-nat.c: Update.
4267 * common/ptid.c: Update.
4268 * common/ptid.h: Update.
4269 * corelow.c: Update.
4270 * ctf.c: Update.
4271 * darwin-nat.c: Update.
4272 * fbsd-nat.c: Update.
4273 * fork-child.c: Update.
4274 * gnu-nat.c: Update.
4275 * go32-nat.c: Update.
4276 * inf-ptrace.c: Update.
4277 * infcmd.c: Update.
4278 * inferior.c: Update.
4279 * infrun.c: Update.
4280 * linux-fork.c: Update.
4281 * linux-nat.c: Update.
4282 * nat/aarch64-linux-hw-point.c: Update.
4283 * nat/fork-inferior.c: Update.
4284 * nat/x86-linux-dregs.c: Update.
4285 * nto-procfs.c: Update.
4286 * obsd-nat.c: Update.
4287 * procfs.c: Update.
4288 * progspace.c: Update.
4289 * remote.c: Update.
4290 * rs6000-nat.c: Update.
4291 * s390-linux-nat.c: Update.
4292 * sol-thread.c: Update.
4293 * spu-linux-nat.c: Update.
4294 * target.c: Update.
4295 * top.c: Update.
4296 * tracefile-tfile.c: Update.
4297 * windows-nat.c: Update.
4298
4299 2018-07-03 Tom Tromey <tom@tromey.com>
4300
4301 * common/ptid.h (ptid_build): Don't declare.
4302 * common/ptid.c (ptid_build): Remove.
4303 * aix-thread.c: Update.
4304 * bsd-kvm.c: Update.
4305 * bsd-uthread.c: Update.
4306 * common/agent.c: Update.
4307 * common/ptid.c: Update.
4308 * common/ptid.h: Update.
4309 * corelow.c: Update.
4310 * darwin-nat.c: Update.
4311 * fbsd-nat.c: Update.
4312 * gnu-nat.c: Update.
4313 * linux-fork.c: Update.
4314 * linux-nat.c: Update.
4315 * linux-thread-db.c: Update.
4316 * nat/linux-osdata.c: Update.
4317 * nat/linux-procfs.c: Update.
4318 * nto-procfs.c: Update.
4319 * obsd-nat.c: Update.
4320 * proc-service.c: Update.
4321 * procfs.c: Update.
4322 * ravenscar-thread.c: Update.
4323 * remote-sim.c: Update.
4324 * remote.c: Update.
4325 * sol-thread.c: Update.
4326 * target.c: Update.
4327 * windows-nat.c: Update.
4328
4329 2018-07-03 Tom Tromey <tom@tromey.com>
4330
4331 * infrun.c (follow_exec): Use exit_inferior_silent.
4332 * inferior.c (exit_inferior_num_silent): Remove.
4333 * inferior.h (exit_inferior_num_silent): Don't declare.
4334
4335 2018-07-03 Tom Tromey <tom@tromey.com>
4336
4337 PR cli/23340:
4338 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4339 inferior_ptid on error.
4340
4341 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4342 Simon Marchi <simon.marchi@polymtl.ca>
4343
4344 PR tdep/8282
4345 * disasm.h (gdb_disassembler): Add
4346 `m_disassembler_options_holder'. member
4347 * disasm.c (get_all_disassembler_options): New function.
4348 (gdb_disassembler::gdb_disassembler): Use it.
4349 (gdb_buffered_insn_length_init_dis): Likewise.
4350 (gdb_buffered_insn_length): Adjust accordingly.
4351 (set_disassembler_options): Handle options with arguments.
4352 (show_disassembler_options_sfunc): Likewise. Add a leading new
4353 line if showing options with descriptions.
4354 (disassembler_options_completer): Adapt to using the
4355 `disasm_options_and_args_t' structure.
4356 * mips-tdep.c (mips_disassembler_options): New variable.
4357 (mips_disassembler_options_o32): Likewise.
4358 (mips_disassembler_options_n32): Likewise.
4359 (mips_disassembler_options_n64): Likewise.
4360 (gdb_print_insn_mips): Don't set `disassembler_options'.
4361 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4362 functions.
4363 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4364 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4365 `gdbarch_disassembler_options_implicit' and
4366 `gdbarch_valid_disassembler_options'.
4367 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4368 `disasm_options_and_args_t' structure.
4369 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4370 method.
4371 (valid_disassembler_options): Switch from `disasm_options_t' to
4372 the `disasm_options_and_args_t' structure.
4373 * NEWS: Document `set disassembler-options' support for the MIPS
4374 target.
4375 * gdbarch.h: Regenerate.
4376 * gdbarch.c: Regenerate.
4377
4378 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4379
4380 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4381
4382 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4383
4384 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4385 parameter in call to amd64_target_description.
4386 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4387 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4388 (amd64fbsd_init_abi): Likewise.
4389 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4390 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4391 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4392 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4393
4394 2018-06-29 Pedro Alves <palves@redhat.com>
4395
4396 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4397 "segments" parameter.
4398 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4399 (_initialize_amd64_tdep): Update call to
4400 amd64_create_target_description.
4401 (amd64_target_description): Add "segments" parameter. Adjust
4402 the implementation to use it.
4403 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4404 call to amd64_create_target_description.
4405 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4406 * gdb/arch/amd64.h (amd64_create_target_description): Add
4407 "segments" register.
4408 * gdb/arch/amd64.c (amd64_create_target_description): Add
4409 "segments" parameter. Call create_feature_i386_64bit_segments
4410 only if SEGMENTS is true.
4411 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4412 call to amd64_create_target_description.
4413
4414 2018-06-29 Pedro Alves <palves@redhat.com>
4415
4416 * thread.c (thread_target_id_str): New, factored out from ...
4417 (print_thread_info_1): ... here. Use it to compute the max
4418 "Target Id" column width.
4419
4420 2018-06-29 Pedro Alves <palves@redhat.com>
4421
4422 * remote.c (remote_target::extra_thread_info): Delete
4423 'display_buf' and 'n' locals. from the cache, regardless of
4424 packet mechanims is in use. Use cache for qThreadExtra and qP
4425 methods too.
4426
4427 2018-06-29 Pedro Alves <palves@redhat.com>
4428
4429 * blockframe.c (find_pc_sect_containing_function): New function.
4430 * breakpoint.c (print_breakpoint_location): Don't call
4431 find_pc_sect_function.
4432 * linespec.c (create_sals_line_offset): Record the location's
4433 symbol in the sal.
4434 * linespec.c (convert_address_location_to_sals): Fill in sal's
4435 symbol with find_pc_sect_containing_function.
4436 * symtab.c (find_function_start_sal): Rename to ...
4437 (find_function_start_sal_1): ... this.
4438 (find_function_start_sal): Reimplement as wrapper around
4439 find_function_start_sal_1, and use
4440 find_pc_sect_containing_function to fill in the sal's symbol.
4441 (find_function_start_sal(symbol*, bool)): Adjust.
4442 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4443 comments.
4444 (find_pc_sect_containing_function): Declare.
4445
4446 2018-06-29 Pedro Alves <palves@redhat.com>
4447
4448 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4449 true if the the location has no symbol.
4450
4451 2018-06-28 Tom Tromey <tom@tromey.com>
4452
4453 * NEWS: Mention --enable-codesign.
4454 * silent-rules.mk (ECHO_SIGN): New variable.
4455 * configure.ac: Add --enable-codesign.
4456 * configure: Rebuild.
4457 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4458 (gdb$(EXEEXT)): Optionally invoke codesign.
4459
4460 2018-06-28 Pedro Alves <palves@redhat.com>
4461
4462 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4463 comments.
4464 (switch_to_thread_no_regs): Adjust comment.
4465 * infcmd.c (stop_pc): Delete.
4466 (post_create_inferior, info_program_command): Replace references
4467 to stop_pc with references to thread_info->suspend.stop_pc.
4468 * inferior.h (stop_pc): Delete declaration.
4469 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4470 (handle_inferior_event_1, handle_signal_stop)
4471 (process_event_stop_test, keep_going_stepped_thread)
4472 (handle_step_into_function, handle_step_into_function_backward)
4473 (print_stop_location): Replace references to stop_pc with
4474 references to thread_info->suspend.stop_pc.
4475 (struct infcall_suspend_state) <stop_pc>: Delete field.
4476 (save_infcall_suspend_state, restore_infcall_suspend_state):
4477 Remove references to inf_stat->stop_pc.
4478 * linux-fork.c (fork_load_infrun_state): Likewise.
4479 * record-btrace.c (record_btrace_set_replay): Likewise.
4480 * record-full.c (record_full_goto_entry): Likewise.
4481 * remote.c (print_one_stopped_thread): Likewise.
4482 * target.c (target_resume): Extend comment.
4483 * thread.c (set_executing_thread): New.
4484 (set_executing): Use it.
4485 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4486 Remove references to stop_pc.
4487
4488 2018-06-28 Pedro Alves <palves@redhat.com>
4489
4490 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4491 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4492
4493 2018-06-28 Tom Tromey <tom@tromey.com>
4494
4495 * coffread.c (coff_symfile_finish): Update.
4496 * xcoffread.c (xcoff_symfile_finish): Update.
4497 * elfread.c (elf_symfile_finish): Update.
4498 * symfile.h (dwarf2_free_objfile): Don't declare.
4499 * dwarf2read.c (_initialize_dwarf2_read): Use
4500 register_objfile_data_with_cleanup.
4501 (dwarf2_free_objfile): Now static. Change signature.
4502
4503 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4504
4505 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4506 option "-o" to add-symbol-file-load to add an offset to each
4507 section's load address.
4508 * symfile.c (set_objfile_default_section_offset): New function.
4509
4510 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4511
4512 * symfile.c (add_symbol_file_command): Make sure that sections
4513 with the same name are sorted in the same order.
4514
4515 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4516
4517 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4518 require the second argument. If omitted, load sections at the
4519 addresses specified in the file.
4520
4521 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4522
4523 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4524 (_initialize_symfile): Add option "-o" to symbol-file to add an
4525 offset to each section of the symbol file.
4526
4527 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4528
4529 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4530
4531 2018-06-27 Tom Tromey <tom@tromey.com>
4532
4533 * stack.c (_initialize_stack): Update "func" help text.
4534
4535 2018-06-27 Tom Tromey <tom@tromey.com>
4536
4537 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4538 std::vector.
4539 (unwind_infopy_str, pyuw_create_unwind_info)
4540 (unwind_infopy_add_saved_register, pyuw_sniffer)
4541 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4542 Update.
4543 (struct saved_reg): Add constructor.
4544 <value>: Now a gdbpy_ref<>.
4545
4546 2018-06-27 Tom Tromey <tom@tromey.com>
4547
4548 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4549
4550 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * gdb-gdb.py.in: Format using autopep8.
4553
4554 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4555
4556 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4557 (type_lookup_function): Recognize CORE_ADDR values.
4558
4559 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4560
4561 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4562 print tag_name.
4563
4564 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4565
4566 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4567 <__lt__>: Add.
4568
4569 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4570
4571 * gdb-gdb.py: Move to...
4572 * gdb-gdb.py.in: ... here.
4573 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4574 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4575 dependencies.
4576 (distclean): Remove gdb-gdb.py when cleaning.
4577 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4578 * configure: Re-generate.
4579
4580 2018-06-27 Pedro Alves <palves@redhat.com>
4581
4582 * proc-service.c (get_ps_regcache): New.
4583 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4584 (ps_lsetfpregs): Use it.
4585
4586 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4587
4588 PR gdb/21695
4589 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4590 (dwarf_decode_lines_1): Adjust.
4591
4592 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4593
4594 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4595 override.
4596 <info_proc>: Likewise.
4597
4598 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4599
4600 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4601 to windows_fetch_one_register, and only handle the case of
4602 fetching one register. Move the code that reloads the context
4603 and iterates over all registers if R is negative to...
4604 (windows_nat_target::fetch_registers): ... here.
4605 (do_windows_store_inferior_registers): Rename to
4606 windows_store_one_register, and only handle the case of storing
4607 one register. Move the code that handles the case where r is
4608 negative to...
4609 (windows_nat_target::store_registers) ... here.
4610
4611 2018-06-26 Tom Tromey <tom@tromey.com>
4612
4613 PR rust/22574:
4614 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4615 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4616 Update.
4617 (rust_internal_print_type): Add podata parameter.
4618 (rust_print_type): Update.
4619
4620 2018-06-26 Tom Tromey <tom@tromey.com>
4621
4622 * typeprint.h (struct print_offset_data) <update, finish,
4623 maybe_print_hole>: New methods.
4624 <indentation>: New constant.
4625 * typeprint.c (print_offset_data::indentation): Define.
4626 (print_offset_data::maybe_print_hole, print_offset_data::update)
4627 (print_offset_data::finish): Move from c-typeprint.c and rename.
4628 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4629 (print_spaces_filtered_with_print_options): Update.
4630 (c_print_type_union_field_offset, maybe_print_hole)
4631 (c_print_type_struct_field_offset): Move to typeprint.c and
4632 rename.
4633 (c_type_print_base_struct_union): Update.
4634
4635 2018-06-25 Pedro Alves <palves@redhat.com>
4636
4637 * gdbthread.h (thread_info_ref, delete_thread)
4638 (delete_thread_silent, first_thread_of_inferior)
4639 (any_thread_of_inferior, switch_to_thread)
4640 (enable_thread_stack_temporaries)
4641 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4642 (get_last_thread_stack_temporary)
4643 (value_in_thread_stack_temporaries, can_access_registers_thread):
4644 Spell out "struct thread_info" instead of just "thread_info".
4645 * inferior.h (notice_new_inferior): Likewise.
4646
4647 2018-06-25 Pedro Alves <palves@redhat.com>
4648
4649 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4650 pass thread_info pointer to delete_thread.
4651 (windows_nat_target::detach): Pass inferior pointer to
4652 detach_inferior.
4653 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4654 delete_thread.
4655 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4656 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4657 and pass a thread_info pointer to delete_thread.
4658 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4659 pass thread_info pointer to delete_thread.
4660 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4661 delete_thread_silent call.
4662 * procfs.c (procfs_target::detach): Pass inferior pointer to
4663 detach_inferior.
4664 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4665 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4666 delete_thread_silent call.
4667 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4668 pass thread_info pointer to delete_thread.
4669 (windows_nat_target::detach): Pass inferior pointer to
4670 delete_inferior.
4671
4672 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4673
4674 * regcache.c (readable_regcache::read_part): Fix asserts.
4675 (reg_buffer::raw_collect_part): New function.
4676 (regcache::write_part): Fix asserts.
4677 (reg_buffer::raw_supply_part): New function.
4678 (regcache::transfer_regset_register): New helper function.
4679 (regcache::transfer_regset): Call new functions.
4680 (regcache_supply_regset): Use gdb_byte*.
4681 (regcache::supply_regset): Likewise.
4682 (regcache_collect_regset): Likewise.
4683 (regcache::collect_regset): Likewise.
4684 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4685 (reg_buffer::raw_supply_part): Likewise.
4686 (regcache::transfer_regset_register): Likewise.
4687 (regcache::transfer_regset): Use gdb_byte*.
4688
4689 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4690
4691 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4692
4693 2018-06-21 Pedro Alves <palves@redhat.com>
4694
4695 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4696 instead of a ptid_t. All callers adjusted.
4697 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4698 adjusted.
4699 (print_ada_task_info, display_current_task_id, task_command_1):
4700 Adjust.
4701 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4702 inferior_thread.
4703 (breakpoint_kind): Adjust.
4704 (remove_breakpoints_pid): Rename to ...
4705 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4706 pointer. All callers adjusted.
4707 (bpstat_clear_actions): Use inferior_thread.
4708 (get_bpstat_thread): New.
4709 (bpstat_do_actions): Use it.
4710 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4711 to take a thread_info pointer. All callers adjusted.
4712 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4713 (breakpoint_re_set_thread): Use inferior_thread.
4714 * breakpoint.h (struct inferior): Forward declare.
4715 (bpstat_stop_status): Update.
4716 (remove_breakpoints_pid): Delete.
4717 (remove_breakpoints_inf): New.
4718 * bsd-uthread.c (bsd_uthread_target::wait)
4719 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4720 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4721 (maint_btrace_packet_history_cmd)
4722 (maint_btrace_clear_packet_history_cmd): Adjust.
4723 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4724 inferior_thread.
4725 * cli/cli-interp.c: Include "inferior.h".
4726 * common/refcounted-object.h (struct
4727 refcounted_object_ref_policy): New.
4728 * compile/compile-object-load.c: Include gdbthread.h.
4729 (store_regs): Use inferior_thread.
4730 * corelow.c (core_target::close): Use current_inferior.
4731 (core_target_open): Adjust to use first_thread_of_inferior and use
4732 the current inferior.
4733 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4734 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4735 <thread>: ... this new field. All references adjusted.
4736 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4737 Take a thread_info pointer instead of a ptid_t.
4738 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4739 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4740 thread_info pointer instead of a ptid_t.
4741 * elfread.c: Include "inferior.h".
4742 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4743 Use inferior_thread.
4744 * eval.c (evaluate_subexp): Likewise.
4745 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4746 inferior_thread.
4747 * gdb_proc_service.h (struct thread_info): Forward declare.
4748 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4749 <thread>: ... this new field. All references adjusted.
4750 * gdbarch.h, gdbarch.c: Regenerate.
4751 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4752 'thread' parameter. All implementations and callers adjusted.
4753 * gdbthread.h (thread_info) <set_running>: New method.
4754 (delete_thread, delete_thread_silent): Take a thread_info pointer
4755 instead of a ptid.
4756 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4757 (first_thread_of_process): Delete, replaced by ...
4758 (first_thread_of_inferior): ... this new function. All callers
4759 adjusted.
4760 (any_live_thread_of_process): Delete, replaced by ...
4761 (any_live_thread_of_inferior): ... this new function. All callers
4762 adjusted.
4763 (switch_to_thread, switch_to_no_thread): Declare.
4764 (is_executing): Delete.
4765 (enable_thread_stack_temporaries): Update comment.
4766 <enable_thread_stack_temporaries>: Take a thread_info pointer
4767 instead of a ptid_t. Incref the thread.
4768 <~enable_thread_stack_temporaries>: Decref the thread.
4769 <m_ptid>: Delete
4770 <m_thr>: New.
4771 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4772 (get_last_thread_stack_temporary)
4773 (value_in_thread_stack_temporaries, can_access_registers_thread):
4774 Take a thread_info pointer instead of a ptid_t. All callers
4775 adjusted.
4776 * infcall.c (get_call_return_value): Use inferior_thread.
4777 (run_inferior_call): Work with thread pointers instead of ptid_t.
4778 (call_function_by_hand_dummy): Work with thread pointers instead
4779 of ptid_t. Use thread_info_ref.
4780 * infcmd.c (proceed_thread_callback): Access thread's state
4781 directly.
4782 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4783 access thread's state directly.
4784 (continue_command): Use inferior_thread.
4785 (info_program_command): Use find_thread_ptid and access thread
4786 state directly.
4787 (proceed_after_attach_callback): Use thread state directly.
4788 (notice_new_inferior): Take a thread_info pointer instead of a
4789 ptid_t. All callers adjusted.
4790 (exit_inferior): Take an inferior pointer instead of a pid. All
4791 callers adjusted.
4792 (exit_inferior_silent): New.
4793 (detach_inferior): Delete.
4794 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4795 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4796 (detach_inferior_command, kill_inferior_command): Use
4797 find_inferior_id instead of valid_gdb_inferior_id and
4798 gdb_inferior_id_to_pid.
4799 (inferior_command): Use inferior and thread pointers.
4800 * inferior.h (struct thread_info): Forward declare.
4801 (notice_new_inferior): Take a thread_info pointer instead of a
4802 ptid_t. All callers adjusted.
4803 (detach_inferior): Delete declaration.
4804 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4805 instead of a pid. All callers adjusted.
4806 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4807 (valid_gdb_inferior_id): Delete.
4808 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4809 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4810 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4811 ...
4812 <inf>: ... this new field.
4813 <step_ptid>: Delete, replaced by ...
4814 <step_thread>: ... this new field.
4815 (get_displaced_stepping_state): Take an inferior pointer instead
4816 of a pid. All callers adjusted.
4817 (displaced_step_in_progress_any_inferior): Adjust.
4818 (displaced_step_in_progress_thread): Take a thread pointer instead
4819 of a ptid_t. All callers adjusted.
4820 (displaced_step_in_progress, add_displaced_stepping_state): Take
4821 an inferior pointer instead of a pid. All callers adjusted.
4822 (get_displaced_step_closure_by_addr): Adjust.
4823 (remove_displaced_stepping_state): Take an inferior pointer
4824 instead of a pid. All callers adjusted.
4825 (displaced_step_prepare_throw, displaced_step_prepare)
4826 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4827 All callers adjusted.
4828 (start_step_over): Adjust.
4829 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4830 displaced step queue.
4831 (do_target_resume): Adjust.
4832 (fetch_inferior_event): Use inferior_thread.
4833 (context_switch, get_inferior_stop_soon): Take an
4834 execution_control_state pointer instead of a ptid_t. All callers
4835 adjusted.
4836 (switch_to_thread_cleanup): Delete.
4837 (stop_all_threads): Use scoped_restore_current_thread.
4838 * inline-frame.c: Include "gdbthread.h".
4839 (inline_state) <inline_state>: Take a thread pointer instead of a
4840 ptid_t. All callers adjusted.
4841 <ptid>: Delete, replaced by ...
4842 <thread>: ... this new field.
4843 (find_inline_frame_state): Take a thread pointer instead of a
4844 ptid_t. All callers adjusted.
4845 (skip_inline_frames, step_into_inline_frame)
4846 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4847 pointer instead of a ptid_t. All callers adjusted.
4848 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4849 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4850 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4851 pointers directly.
4852 * linux-nat.c (get_detach_signal): Likewise.
4853 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4854 (thread_db_notice_clone): Adjust.
4855 (thread_db_find_new_threads_silently)
4856 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4857 a thread pointer instead of a ptid_t. All callers adjusted.
4858 * mi/mi-cmd-var.c: Include "inferior.h".
4859 (mi_cmd_var_update_iter): Update to use thread pointers.
4860 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4861 inferior directly.
4862 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4863 out to ...
4864 (mi_output_running): ... this new function.
4865 (mi_on_resume_1): Adjust to use it.
4866 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4867 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4868 directly.
4869 (interrupt_thread_callback): : Adjust to use thread and inferior
4870 pointers.
4871 * proc-service.c: Include "gdbthread.h".
4872 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4873 * progspace-and-thread.c: Include "inferior.h".
4874 * progspace.c: Include "inferior.h".
4875 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4876 hold a reference to an inferior_object.
4877 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4878 inferior_thread.
4879 * python/py-inferior.c (struct inferior_object): Give the type a
4880 tag name instead of a typedef.
4881 (python_on_normal_stop): No need to check if the current thread is
4882 listed.
4883 (inferior_to_inferior_object): Change return type to
4884 inferior_object. All callers adjusted.
4885 (find_thread_object): Delete, bits factored out to ...
4886 (thread_to_thread_object): ... this new function.
4887 * python/py-infthread.c (create_thread_object): Use
4888 inferior_to_inferior_object.
4889 (thpy_is_stopped): Use thread pointer directly.
4890 (gdbpy_selected_thread): Use inferior_thread.
4891 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4892 field, replaced with ...
4893 <thread>: ... this new field. All users adjusted.
4894 (btpy_insn_or_gap_new): Drop const.
4895 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4896 callers adjusted.
4897 * python/py-record.c: Include "gdbthread.h".
4898 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4899 a ptid_t. All callers adjusted.
4900 (gdbpy_current_recording): Use inferior_thread.
4901 * python/py-record.h (recpy_record_object) <ptid>: Delete
4902 field, replaced with ...
4903 <thread>: ... this new field. All users adjusted.
4904 (recpy_element_object) <ptid>: Delete
4905 field, replaced with ...
4906 <thread>: ... this new field. All users adjusted.
4907 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4908 a ptid_t. All callers adjusted.
4909 * python/py-threadevent.c: Include "gdbthread.h".
4910 (get_event_thread): Use thread_to_thread_object.
4911 * python/python-internal.h (struct inferior_object): Forward
4912 declare.
4913 (find_thread_object, find_inferior_object): Delete declarations.
4914 (thread_to_thread_object, inferior_to_inferior_object): New
4915 declarations.
4916 * record-btrace.c: Include "inferior.h".
4917 (require_btrace_thread): Use inferior_thread.
4918 (record_btrace_frame_sniffer)
4919 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4920 (get_thread_current_frame): Use scoped_restore_current_thread and
4921 switch_to_thread.
4922 (get_thread_current_frame): Use thread pointer directly.
4923 (record_btrace_replay_at_breakpoint): Use thread's inferior
4924 pointer directly.
4925 * record-full.c: Include "inferior.h".
4926 * regcache.c: Include "gdbthread.h".
4927 (get_thread_arch_regcache): Use the inferior's address space
4928 directly.
4929 (get_thread_regcache, registers_changed_thread): New.
4930 * regcache.h (get_thread_regcache(thread_info *thread)): New
4931 overload.
4932 (registers_changed_thread): New.
4933 (remote_target) <remote_detach_1>: Swap order of parameters.
4934 (remote_add_thread): <remote_add_thread>: Return the new thread.
4935 (get_remote_thread_info(ptid_t)): New overload.
4936 (remote_target::remote_notice_new_inferior): Use thread pointers
4937 directly.
4938 (remote_target::process_initial_stop_replies): Use
4939 thread_info::set_running.
4940 (remote_target::remote_detach_1, remote_target::detach)
4941 (extended_remote_target::detach): Adjust.
4942 * stack.c (frame_show_address): Use inferior_thread.
4943 * target-debug.h (target_debug_print_thread_info_pp): New.
4944 * target-delegates.c: Regenerate.
4945 * target.c (default_thread_address_space): Delete.
4946 (memory_xfer_partial_1): Use current_inferior.
4947 (target_detach): Use current_inferior.
4948 (target_thread_address_space): Delete.
4949 (generic_mourn_inferior): Use current_inferior.
4950 * target.h (struct target_ops) <thread_address_space>: Delete.
4951 (target_thread_address_space): Delete.
4952 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4953 pointers directly.
4954 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4955 thread pointer instead of a ptid_t. Adjust all callers.
4956 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4957 (first_thread_of_process): Delete, replaced by ...
4958 (first_thread_of_inferior): ... this new function. All callers
4959 adjusted.
4960 (any_thread_of_process): Rename to ...
4961 (any_thread_of_inferior): ... this, and take an inferior pointer.
4962 (any_live_thread_of_process): Rename to ...
4963 (any_live_thread_of_inferior): ... this, and take an inferior
4964 pointer.
4965 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4966 (value_in_thread_stack_temporaries)
4967 (get_last_thread_stack_temporary): Take a thread pointer instead
4968 of a ptid_t. Adjust all callers.
4969 (thread_info::set_running): New.
4970 (validate_registers_access): Use inferior_thread.
4971 (can_access_registers_ptid): Rename to ...
4972 (can_access_registers_thread): ... this, and take a thread
4973 pointer.
4974 (print_thread_info_1): Adjust to compare thread pointers instead
4975 of ptids.
4976 (switch_to_no_thread, switch_to_thread): Make extern.
4977 (scoped_restore_current_thread::~scoped_restore_current_thread):
4978 Use m_thread pointer directly.
4979 (scoped_restore_current_thread::scoped_restore_current_thread):
4980 Use inferior_thread.
4981 (thread_command): Use thread pointer directly.
4982 (thread_num_make_value_helper): Use inferior_thread.
4983 * top.c (execute_command): Use inferior_thread.
4984 * tui/tui-interp.c: Include "inferior.h".
4985 * varobj.c (varobj_create): Use inferior_thread.
4986 (value_of_root_1): Use find_thread_global_id instead of
4987 global_thread_id_to_ptid.
4988
4989 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4990
4991 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4992 possible.
4993 (regcache::write_part): Likewise.
4994 (readable_regcache::cooked_read_part): Update comment.
4995 (readable_regcache::cooked_write_part): Likewise.
4996 * regcache.h: (readable_regcache::read_part): Likewise.
4997 (regcache::write_part): Likewise.
4998
4999 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5000 Dirk Schubert <dirk.schubert@arm.com>
5001
5002 * aarch64-linux-nat.c (post_attach): New.
5003 (aarch64_linux_nat_target::post_attach): Override post_attach to
5004 record the number of hardware debug registers.
5005
5006 2018-06-20 Tom Tromey <tom@tromey.com>
5007
5008 * python/py-param.c (add_setshow_generic): Make parameters const.
5009 (parmpy_init): Update.
5010
5011 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5012
5013 * regcache.h (regcache_cooked_read_ftype): Rename to...
5014 (register_read_ftype): ...this, change type to function_view.
5015 (class reg_buffer) <save>: Remove src parameter.
5016 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5017 parameter non-const in first overload. Remove src parameter in
5018 second overload.
5019 * regcache.c (do_cooked_read): Remove.
5020 (readonly_detached_regcache::readonly_detached_regcache): Make
5021 parameter non-const, adjust call to other constructor.
5022 (reg_buffer::save): Remove src parameter.
5023 * frame.c (do_frame_register_read): Remove.
5024 (frame_save_as_regcache): Use lambda function.
5025 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5026 parameter to ppu2spu_data *.
5027 (ppu2spu_sniffer): Use lambda function.
5028
5029 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5030
5031 * record-full.c (record_full_target::insert_breakpoint): Remove
5032 "struct" keyword, add const.
5033
5034 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5035
5036 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5037 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5038 * configure.ac: Remove AC_PREREQ, add missing quoting.
5039 * gnulib/configure.ac: Modernize usage of
5040 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5041 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5042 (AUTOMAKE_VERSION): Bump to 1.15.1.
5043 * configure: Re-generate.
5044 * config.in: Re-generate.
5045 * aclocal.m4: Re-generate.
5046 * gnulib/aclocal.m4: Re-generate.
5047 * gnulib/config.in: Re-generate.
5048 * gnulib/configure: Re-generate.
5049 * gnulib/import/Makefile.in: Re-generate.
5050
5051 2018-06-19 Pedro Alves <palves@redhat.com>
5052
5053 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5054 (lookup_minimal_symbol_by_pc_section): ... here with
5055 gdb_assert_not_reached added.
5056
5057 2018-06-19 Pedro Alves <palves@redhat.com>
5058
5059 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5060 parameter with a block parameter. Compare location's block symbol
5061 with the frame's block instead of addresses.
5062 (skip_inline_frames): Pass the current block instead of the
5063 frame's address. Break out as soon as we determine the frame
5064 should not be skipped.
5065
5066 2018-06-18 Tom Tromey <tom@tromey.com>
5067
5068 * solib-aix.c (solib_aix_get_section_offsets): Return
5069 unique_xmalloc_ptr.
5070 (solib_aix_solib_create_inferior_hook): Update.
5071
5072 2018-06-18 Tom Tromey <tom@tromey.com>
5073
5074 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5075
5076 2018-06-18 Tom Tromey <tom@tromey.com>
5077
5078 * solib-frv.c (frv_relocate_main_executable): Use
5079 unique_xmalloc_ptr.
5080 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5081 unique_xmalloc_ptr.
5082
5083 2018-06-18 Tom Tromey <tom@tromey.com>
5084
5085 * objfiles.h (inhibit_section_map_updates): Update.
5086 (resume_section_map_updates, resume_section_map_updates_cleanup):
5087 Remove.
5088 * solib-svr4.c (svr4_handle_solib_event): Update.
5089 * objfiles.c (inhibit_section_map_updates): Return
5090 scoped_restore_tmpl<int>.
5091 (resume_section_map_updates, resume_section_map_updates_cleanup):
5092 Remove.
5093
5094 2018-06-18 Tom Tromey <tom@tromey.com>
5095
5096 * valprint.h (read_string): Update.
5097 * valprint.c (read_string): Change type of "buffer".
5098 (val_print_string): Update.
5099 * python/py-value.c (valpy_string): Update.
5100 * language.h (struct language_defn) <la_get_string>: Change
5101 type of "buffer".
5102 (default_get_string, c_get_string): Update.
5103 * language.c (default_get_string): Change type of "buffer".
5104 * guile/scm-value.c (gdbscm_value_to_string): Update.
5105 * c-lang.c (c_get_string): Change type of "buffer".
5106
5107 2018-06-18 Tom Tromey <tom@tromey.com>
5108
5109 * ser-mingw.c (struct pipe_state_destroyer): New.
5110 (pipe_state_up): New typedef.
5111 (cleanup_pipe_state): Remove.
5112 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5113
5114 2018-06-18 Tom Tromey <tom@tromey.com>
5115
5116 * rust-lang.h (rust_yyerror): Don't declare.
5117 * rust-lang.c (rust_language_defn): Update.
5118 * rust-exp.y (yyerror): Now static.
5119 * parse.c (parse_exp_in_context_1): Update.
5120 * p-lang.h (p_yyerror): Don't declare.
5121 * p-lang.c (p_language_defn): Update.
5122 * p-exp.y (yyerror): Now static.
5123 * opencl-lang.c (opencl_language_defn): Update.
5124 * objc-lang.c (objc_language_defn): Update.
5125 * m2-lang.h (m2_yyerror): Don't declare.
5126 * m2-lang.c (m2_language_defn): Update.
5127 * m2-exp.y (yyerror): Now static.
5128 * language.h (struct language_defn) <la_error>: Remove.
5129 * language.c (unk_lang_error): Remove.
5130 (unknown_language_defn, auto_language_defn): Remove.
5131 * go-lang.h (go_yyerror): Don't declare.
5132 * go-lang.c (go_language_defn): Update.
5133 * go-exp.y (yyerror): Now static.
5134 * f-lang.h (f_yyerror): Don't declare.
5135 * f-lang.c (f_language_defn): Update.
5136 * f-exp.y (yyerror): Now static.
5137 * d-lang.h (d_yyerror): Don't declare.
5138 * d-lang.c (d_language_defn): Update.
5139 * d-exp.y (yyerror): Now static.
5140 * c-lang.h (c_yyerror): Don't declare.
5141 * c-lang.c (c_language_defn, cplus_language_defn)
5142 (asm_language_defn, minimal_language_defn): Update.
5143 * c-exp.y (yyerror): Now static.
5144 * ada-lang.h (ada_yyerror): Don't declare.
5145 * ada-lang.c (ada_language_defn): Update.
5146 * ada-exp.y (yyerror): Now static.
5147
5148 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5149
5150 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5151 (store_sveregs_to_thread): Likewise.
5152 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5153 (aarch64_linux_store_inferior_registers): Likewise.
5154 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5155 function.
5156 (aarch64_sve_regs_copy_to_regcache): Likewise.
5157 (aarch64_sve_regs_copy_from_regcache): Likewise.
5158 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5159 declaration.
5160 (aarch64_sve_regs_copy_to_regcache): Likewise.
5161 (aarch64_sve_regs_copy_from_regcache): Likewise.
5162 (sve_context): Structure from Linux headers.
5163 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5164 (SVE_SIG_ZREG_SIZE): Likewise.
5165 (SVE_SIG_PREG_SIZE): Likewise.
5166 (SVE_SIG_FFR_SIZE): Likewise.
5167 (SVE_SIG_REGS_OFFSET): Likewise.
5168 (SVE_SIG_ZREGS_OFFSET): Likewise.
5169 (SVE_SIG_ZREG_OFFSET): Likewise.
5170 (SVE_SIG_ZREGS_SIZE): Likewise.
5171 (SVE_SIG_PREGS_OFFSET): Likewise.
5172 (SVE_SIG_PREG_OFFSET): Likewise.
5173 (SVE_SIG_PREGS_SIZE): Likewise.
5174 (SVE_SIG_FFR_OFFSET): Likewise.
5175 (SVE_SIG_REGS_SIZE): Likewise.
5176 (SVE_SIG_CONTEXT_SIZE): Likewise.
5177 (SVE_PT_REGS_MASK): Likewise.
5178 (SVE_PT_REGS_FPSIMD): Likewise.
5179 (SVE_PT_REGS_SVE): Likewise.
5180 (SVE_PT_VL_INHERIT): Likewise.
5181 (SVE_PT_VL_ONEXEC): Likewise.
5182 (SVE_PT_REGS_OFFSET): Likewise.
5183 (SVE_PT_FPSIMD_OFFSET): Likewise.
5184 (SVE_PT_FPSIMD_SIZE): Likewise.
5185 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5186 (SVE_PT_SVE_PREG_SIZE): Likewise.
5187 (SVE_PT_SVE_FFR_SIZE): Likewise.
5188 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5189 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5190 (__SVE_SIG_TO_PT): Likewise.
5191 (SVE_PT_SVE_OFFSET): Likewise.
5192 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5193 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5194 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5195 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5196 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5197 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5198 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5199 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5200 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5201 (SVE_PT_SVE_SIZE): Likewise.
5202 (SVE_PT_SIZE): Likewise.
5203 (HAS_SVE_STATE): New define.
5204
5205 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5206
5207 * nat/aarch64-sve-linux-sigcontext.h: New file.
5208 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5209 new files.
5210 (SVE_VQ_MIN): Likewise.
5211 (SVE_VQ_MAX): Likewise.
5212 (SVE_VL_MIN): Likewise.
5213 (SVE_VL_MAX): Likewise.
5214 (SVE_NUM_ZREGS): Likewise.
5215 (SVE_NUM_PREGS): Likewise.
5216 (sve_vl_valid): Likewise.
5217 (struct user_sve_header): Likewise.
5218
5219 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5220 Richard Bunt <Richard.Bunt@arm.com>
5221
5222 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5223 was requested by GDB.
5224
5225 2018-06-15 Tom de Vries <tdevries@suse.de>
5226
5227 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5228
5229 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5230
5231 * gnulib/update-gnulib.sh: Print expected versions of
5232 autoconf/aclocal.
5233
5234 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5235
5236 * arch-utils.c (default_type_align): Use type_length_units.
5237 * gdbtypes.c (type_align): Use type_length_units.
5238
5239 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5240
5241 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5242 of 'define' command.
5243
5244 2018-06-14 Tom de Vries <tdevries@suse.de>
5245
5246 PR cli/22573
5247 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5248 get_no_prettyformat_print_options.
5249
5250 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5251
5252 * sparc-nat.h: Include target.h.
5253 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5254 <fetch_registers>: Remove this argument in function call.
5255 <store_registers>: Remove this argument in function call, remove
5256 extra semicolon.
5257 <low_forget_process>: Call sparc64_forget_process instead of
5258 sparc_forget_process.
5259
5260 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5261
5262 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5263 (procfs_target::make_corefile_notes): Adjust to new
5264 target_read_alloc return type.
5265
5266 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5267 Stephen Roberts <stephen.roberts@arm.com>
5268
5269 PR gdb/22882
5270 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5271 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5272 Move should_notify_stop local into more inner scope.
5273
5274 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5275 Stephen Roberts <stephen.roberts@arm.com>
5276
5277 PR gdb/22882
5278 * infrun.c (resume_1): Add call to mark_async_event_handler.
5279
5280 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5281
5282 * infrun.c (do_target_wait): Change old version of $pc printed.
5283
5284 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5285
5286 * dwarf2read.c (read_index_from_section): Rename to...
5287 (read_gdb_index_from_section): ... this, update all callers.
5288 (dwarf2_read_index): Rename to...
5289 (dwarf2_read_gdb_index): ... this, update all callers.
5290
5291 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5292
5293 * gdb/hppa-linux-nat.c
5294 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5295 hppa_linux_nat_target::fetch_registers.
5296
5297 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5298
5299 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5300 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5301 (AARCH64_DWARF_SVE_FFR): Likewise.
5302 (AARCH64_DWARF_SVE_P0): Likewise.
5303 (AARCH64_DWARF_SVE_Z0): Likewise.
5304
5305 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5306
5307 * common/common-regcache.h (raw_compare): New function.
5308 * regcache.c (regcache::raw_compare): Likewise.
5309 * regcache.h (regcache::raw_compare): New declaration.
5310
5311 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5312
5313 * common/common-regcache.h (reg_buffer_common): New structure.
5314 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5315 (reg_buffer::raw_supply): Likewise.
5316 (reg_buffer::raw_supply_integer): Likewise.
5317 (reg_buffer::raw_supply_zeroed): Likewise.
5318 (reg_buffer::raw_collect): Likewise.
5319 (reg_buffer::raw_collect_integer): Likewise.
5320 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5321 (reg_buffer::raw_supply): Likewise.
5322 (reg_buffer::raw_supply_integer): Likewise.
5323 (reg_buffer::raw_supply_zeroed): Likewise.
5324 (reg_buffer::raw_collect): Likewise.
5325 (reg_buffer::raw_collect_integer): Likewise.
5326
5327 2018-06-10 Tom Tromey <tom@tromey.com>
5328
5329 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5330 (class remote_state) <stop_reply_queue>: Now std::vector.
5331 (remote_state::~remote_state)
5332 (remote_target::stop_reply_queue_length): Update.
5333 (struct queue_iter_param, remove_child_of_pending_fork)
5334 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5335 (check_pending_event_prevents_wildcard_vcont_callback)
5336 (remove_stop_reply_for_inferior)
5337 (remove_stop_reply_of_remote_state)
5338 (remote_notif_remove_once_on_match)
5339 (stop_reply_match_ptid_and_ws)
5340 (remote_kill_child_of_pending_fork): Remove.
5341 (remote_target::remove_new_fork_children)
5342 (remote_target::check_pending_events_prevent_wildcard_vcont)
5343 (remote_target::discard_pending_stop_replies)
5344 (remote_target::discard_pending_stop_replies_in_queue)
5345 (remote_target::remote_notif_remove_queued_reply)
5346 (remote_target::queued_stop_reply)
5347 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5348 (remote_target::wait, remote_target::kill_new_fork_children)
5349 (remote_target::async): Update.
5350
5351 2018-06-10 Tom Tromey <tom@tromey.com>
5352
5353 * record-full.c (record_full_arch_list_cleanups): Remove.
5354 (record_full_message): Use try/catch.
5355 (record_full_wait_cleanups): Remove.
5356 (record_full_wait_1): Use try/catch.
5357 (record_full_restore): Likewise.
5358
5359 2018-06-10 Tom Tromey <tom@tromey.com>
5360
5361 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5362 declare VEC. Add constructor.
5363 <in_target_beneath>: Now bool.
5364 (record_full_breakpoints): Now a std::vector, static.
5365 (record_full_sync_record_breakpoints)
5366 (record_full_init_record_breakpoints)
5367 (record_full_target::insert_breakpoint)
5368 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5369
5370 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5371
5372 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5373 * serial.c (serial_interface_lookup): Remove struct keyword.
5374
5375 2018-06-10 Tom Tromey <tom@tromey.com>
5376
5377 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5378 method.
5379 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5380 a method.
5381 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5382 method.
5383 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5384 "beneath" as a method.
5385 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5386 Use "beneath" as a method.
5387
5388 2018-06-10 Tom Tromey <tom@tromey.com>
5389
5390 * tracefile.c (struct trace_file_writer_deleter): New.
5391 <operator()>: Rename from trace_file_writer_xfree.
5392 (trace_file_writer_up): New typedef.
5393 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5394
5395 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5396
5397 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5398 <m_registers, m_register_status>: Change type to
5399 std::unique_ptr.
5400 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5401 XCNEWVEC.
5402
5403 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5404
5405 * common/common-regcache.h (enum register_status): Add
5406 underlying type "signed char".
5407 * regcache.h (reg_buffer) <m_register_status>: Change type to
5408 register_status *.
5409 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5410 register_status instead of signed char.
5411 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5412 (reg_buffer::get_register_status): Remove cast.
5413 (readable_regcache::raw_read): Remove cast.
5414 (readable_regcache::cooked_read): Remove cast.
5415
5416 2018-06-09 Tom Tromey <tom@tromey.com>
5417
5418 * source.c (reverse_search_command, forward_search_command): Use
5419 scoped_fd.
5420
5421 2018-06-09 Tom Tromey <tom@tromey.com>
5422
5423 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5424 (serial_ops_list): Now static, std::vector.
5425 (serial_interface_lookup, serial_add_interface): Update.
5426
5427 2018-06-09 Tom Tromey <tom@tromey.com>
5428
5429 * dwarf2read.c (process_cu_includes): Update.
5430 (process_full_comp_unit): Update.
5431 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5432 std::vector.
5433
5434 2018-06-08 Paul Koning <paul_koning@dell.com>
5435
5436 PR gdb/23252
5437
5438 * python/python.c (do_start_initialization):
5439 Avoid call to internal Python API.
5440 (init__gdb_module): New function.
5441
5442 2018-06-08 Gary Benson <gbenson@redhat.com>
5443
5444 * linux-thread-db.c (valprint.h): New include.
5445 (struct check_thread_db_info): New structure.
5446 (check_thread_db_on_load, tdb_testinfo): New static globals.
5447 (check_thread_db, check_thread_db_callback): New functions.
5448 (try_thread_db_load_1): Run integrity checks if requested.
5449 (maintenance_check_libthread_db): New function.
5450 (_initialize_thread_db): Register "maint check libthread-db"
5451 and "maint set/show check-libthread-db".
5452 * NEWS: Mention the above new commands.
5453
5454 2018-06-08 Tom Tromey <tom@tromey.com>
5455
5456 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5457 now a method.
5458
5459 2018-06-08 Tom Tromey <tom@tromey.com>
5460
5461 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5462
5463 2018-06-08 Tom Tromey <tom@tromey.com>
5464
5465 * common/btrace-common.h (struct btrace_data): Add constructor,
5466 destructor, move assignment operator.
5467 <empty, clear, fini>: New methods.
5468 <format>: Initialize.
5469 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5470 (btrace_data_empty): Don't declare.
5471 * common/btrace-common.c (btrace_data_init): Remove.
5472 (btrace_data::fini): Rename from btrace_data_fini.
5473 (btrace_data::empty): Rename from btrace_data_empty.
5474 (btrace_data::clear): Rename from btrace_data_clear. Return
5475 bool.
5476 * btrace.h (make_cleanup_btrace_data): Don't declare.
5477 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5478 (parse_xml_btrace): Update.
5479 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5480 (maint_btrace_clear_packet_history_cmd): Update.
5481
5482 2018-06-07 Pedro Alves <palves@redhat.com>
5483
5484 * target.h (target_ops) <beneath>: Now a method. All references
5485 updated.
5486 (class target_stack): New.
5487 * target.c (g_target_stack): New.
5488 (g_current_top_target): Delete.
5489 (current_top_target): Get the top target out of g_target_stack.
5490 (target_stack::push, target_stack::unpush): New.
5491 (push_target, unpush_target): Reimplement.
5492 (target_is_pushed): Reimplement in terms of g_target_stack.
5493 (target_ops::beneath, target_stack::find_beneath): New.
5494
5495 2018-06-07 Pedro Alves <palves@redhat.com>
5496
5497 * target.h (find_target_beneath): Delete declaration.
5498 * target.c (find_target_beneath): Delete definition.
5499 * aix-thread.c: All callers of find_target_beneath adjusted to
5500 call target_ops::beneath instead.
5501 * bsd-uthread.c: Likewise.
5502 * linux-thread-db.c: Likewise.
5503 * ravenscar-thread.c: Likewise.
5504 * sol-thread.c: Likewise.
5505 * spu-multiarch.c: Likewise.
5506
5507 2018-06-07 Pedro Alves <palves@redhat.com>
5508
5509 * target.h (target_ops) <beneath>: Now a method. All references
5510 updated.
5511 (target_ops) <m_beneath>: New.
5512 * target.c (target_ops::beneath): New.
5513 * corelow.c: Adjust all references to target_ops::beneath.
5514 * linux-thread-db.c: Likewise.
5515 * make-target-delegates: Likewise.
5516 * record-btrace.c: Likewise.
5517 * record-full.c: Likewise.
5518 * remote.c: Likewise.
5519 * target.c: Likewise.
5520 * target-delegates.c: Regenerate.
5521
5522 2018-06-07 Pedro Alves <palves@redhat.com>
5523
5524 * target.h (target_stack): Delete.
5525 (current_top_target): Declare function.
5526 * target.c (target_stack): Delete.
5527 (g_current_top_target): New.
5528 (current_top_target): New function.
5529 * auxv.c: Use current_top_target instead of target_stack
5530 throughout.
5531 * avr-tdep.c: Likewise.
5532 * breakpoint.c: Likewise.
5533 * corefile.c: Likewise.
5534 * elfread.c: Likewise.
5535 * eval.c: Likewise.
5536 * exceptions.c: Likewise.
5537 * frame.c: Likewise.
5538 * gdbarch-selftests.c: Likewise.
5539 * gnu-v3-abi.c: Likewise.
5540 * ia64-tdep.c: Likewise.
5541 * ia64-vms-tdep.c: Likewise.
5542 * infcall.c: Likewise.
5543 * infcmd.c: Likewise.
5544 * infrun.c: Likewise.
5545 * linespec.c: Likewise.
5546 * linux-tdep.c: Likewise.
5547 * minsyms.c: Likewise.
5548 * ppc-linux-nat.c: Likewise.
5549 * ppc-linux-tdep.c: Likewise.
5550 * procfs.c: Likewise.
5551 * regcache.c: Likewise.
5552 * remote.c: Likewise.
5553 * rs6000-tdep.c: Likewise.
5554 * s390-linux-nat.c: Likewise.
5555 * s390-tdep.c: Likewise.
5556 * solib-aix.c: Likewise.
5557 * solib-darwin.c: Likewise.
5558 * solib-dsbt.c: Likewise.
5559 * solib-spu.c: Likewise.
5560 * solib-svr4.c: Likewise.
5561 * solib-target.c: Likewise.
5562 * sparc-tdep.c: Likewise.
5563 * sparc64-tdep.c: Likewise.
5564 * spu-tdep.c: Likewise.
5565 * symfile.c: Likewise.
5566 * symtab.c: Likewise.
5567 * target-descriptions.c: Likewise.
5568 * target-memory.c: Likewise.
5569 * target.c: Likewise.
5570 * target.h: Likewise.
5571 * tracefile-tfile.c: Likewise.
5572 * tracepoint.c: Likewise.
5573 * valops.c: Likewise.
5574 * valprint.c: Likewise.
5575 * value.c: Likewise.
5576 * windows-tdep.c: Likewise.
5577 * mi/mi-main.c: Likewise.
5578
5579 2018-06-07 Tom Tromey <tom@tromey.com>
5580
5581 * valprint.h (build_address_symbolic): Declare.
5582 * printcmd.c (print_address_symbolic): Update.
5583 (build_address_symbolic): Change "name" and "filename" to
5584 std::string.
5585 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5586 Update.
5587 * defs.h (build_address_symbolic): Remove declaration.
5588
5589 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5590
5591 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5592 (aarch64_vnv_type): Add function.
5593 (aarch64_pseudo_register_name): Add V regs for SVE.
5594 (aarch64_pseudo_register_type): Likewise.
5595 (aarch64_pseudo_register_reggroup_p): Likewise.
5596 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5597 (aarch64_pseudo_read_value): Add V regs for SVE.
5598 (aarch64_pseudo_write_2): Use V0 offset for SVE
5599 (aarch64_pseudo_write): Add V regs for SVE.
5600 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5601
5602 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5603
5604 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5605 (sve_vl_from_vq): Likewise.
5606
5607 2018-06-05 Tom Tromey <tom@tromey.com>
5608
5609 * cli/cli-cmds.c (show_version): Update.
5610 * top.c (print_gdb_version): Add "interactive" parameter.
5611 Update.
5612 * main.c (captured_main_1): Update.
5613 * top.h (print_gdb_version): Add "interactive" parameter and a
5614 comment.
5615
5616 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5617
5618 * common/enum-flags.h: Add trailing semicolon to example in
5619 comment.
5620
5621 2018-06-05 Tom Tromey <tom@tromey.com>
5622
5623 PR cli/12326:
5624 * NEWS: Add entry about pager.
5625 * utils.c (pagination_disabled_for_command): New global.
5626 (prompt_for_continue): Allow "c" response to prompt.
5627 (reinitialize_more_filter): Clear
5628 pagination_disabled_for_command.
5629 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5630
5631 2018-06-04 Tom Tromey <tom@tromey.com>
5632
5633 * ada-lang.h (ada_lookup_symbol_list): Update.
5634 * ada-lang.c (resolve_subexp): Update.
5635 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5636 parameter.
5637 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5638 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5639 results parameter to std::vector.
5640 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5641 Update.
5642 * ada-exp.y (block_lookup): Update.
5643 (select_possible_type_sym): Change type of syms. Remove nsyms
5644 parameter.
5645 (write_var_or_type, write_name_assoc): Update.
5646
5647 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5648
5649 * windows-nat.c (windows_nat_target::xfer_partial): Return
5650 TARGET_XFER_E_IO if we need to delegate to the target beneath
5651 but BENEATH is NULL.
5652
5653 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5654
5655 * Makefile.in (config.status): Add configure.nat as a
5656 dependency.
5657
5658 2018-06-04 Tom Tromey <tom@tromey.com>
5659
5660 * cp-name-parser.y (cpname_state): Add method declarations.
5661 (HANDLE_QUAL): Update.
5662 (cpname_state::d_grab, cpname_state::fill_comp)
5663 (cpname_state::make_operator, cpname_state::make_dtor)
5664 (cpname_state::make_builtin_type, cpname_state::make_name)
5665 (cpname_state::d_qualify, cpname_state::d_int_type)
5666 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5667 (%union): Move earlier.
5668
5669 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5670
5671 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5672
5673 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5674
5675 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5676 (aarch64_pseudo_write_1): Likewise.
5677 (aarch64_pseudo_read_value): Use helper.
5678 (aarch64_pseudo_write): Likewise.
5679
5680 2018-06-04 Pedro Alves <palves@redhat.com>
5681
5682 * darwin-nat.c (darwin_ops): Delete.
5683 (darwin_attach_pid): Use get_native_target.
5684
5685 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5686
5687 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5688 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5689
5690 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5691
5692 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5693 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5694 (aarch64_gdbarch_init): Check for SVE.
5695 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5696
5697 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5698
5699 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5700 * aarch64-tdep.h (aarch64_read_description): Likewise.
5701 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5702 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5703 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5704 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5705 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5706
5707 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5708
5709 * value.c (value_fetch_lazy_bitfield): New.
5710 (value_fetch_lazy_memory): New.
5711 (value_fetch_lazy_register): New.
5712 (value_fetch_lazy): Factor out to smaller functions.
5713
5714 2018-06-01 Tom Tromey <tom@tromey.com>
5715
5716 * cp-name-parser.y (backslashable, represented): Now const.
5717
5718 2018-06-01 Tom Tromey <tom@tromey.com>
5719
5720 * cp-name-parser.y: Include parser-defs.h.
5721 (parser_fprintf): Remove declaration.
5722
5723 2018-06-01 Tom Tromey <tom@tromey.com>
5724
5725 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5726 %parse-param.
5727 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5728 (global_result): Remove globals.
5729 (struct cpname_state): New.
5730 (yyparse): Don't declare.
5731 (yylex, yyerror): Move declarations after %union.
5732 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5733 (make_name): Add state parameter.
5734 Update all callers.
5735 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5736 parameter.
5737 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5738 Update.
5739 (yylex): Add lvalp, state parameters.
5740 (yyerror): Add state parameter.
5741 (cp_demangled_name_to_comp): Update.
5742
5743 2018-06-01 Tom Tromey <tom@tromey.com>
5744
5745 * cp-name-parser.y (parser_fprintf): Declare.
5746 (GDB_YY_REMAP_PREFIX): Define.
5747 Include yy-remap.h. Don't redefine yy* identifiers.
5748
5749 2018-06-01 Tom Tromey <tom@tromey.com>
5750
5751 * python/py-type.c (typy_legacy_template_argument): Update.
5752 * cp-support.h (cp_demangled_name_to_comp): Update.
5753 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5754 parameter to be a "std::string *".
5755 (main): Update.
5756
5757 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5758
5759 * ada-lex.l: Include "diagnostics.h" instead of
5760 "common/diagnostics.h".
5761 * unittests/environ-selftests.c: Likewise.
5762 * common/diagnostics.h: Moved to ../include.
5763
5764 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5765
5766 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5767 to language_mode_manual while calling breakpoint_re_set_one.
5768
5769 2018-06-01 Tom Tromey <tom@tromey.com>
5770
5771 * valops.c (value_cast_structs, destructor_name_p): Update.
5772 * symtab.c (gdb_mangle_name): Update.
5773 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5774 Update.
5775 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5776 (pascal_object_print_value_fields, pascal_object_print_value):
5777 Update.
5778 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5779 * linespec.c (find_methods): Update.
5780 * gdbtypes.h (type_name_no_tag): Remove.
5781 (type_name_or_error): Rename from type_name_no_tag_or_error.
5782 * gdbtypes.c (type_name_no_tag): Remove.
5783 (type_name_or_error): Rename from type_name_no_tag_or_error.
5784 (lookup_struct_elt_type, check_typedef): Update.
5785 * expprint.c (print_subexp_standard): Update.
5786 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5787 * d-namespace.c (d_lookup_nested_symbol): Update.
5788 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5789 (cp_print_class_member): Update.
5790 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5791 * completer.c (add_struct_fields): Update.
5792 * c-typeprint.c (cp_type_print_derivation_info)
5793 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5794 Update.
5795 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5796 (ada_prefer_type, ada_is_exception_sym): Update.
5797
5798 2018-06-01 Tom Tromey <tom@tromey.com>
5799
5800 * valops.c (enum_constant_from_type, value_namespace_elt)
5801 (value_maybe_namespace_elt): Update.
5802 * valarith.c (find_size_for_pointer_math): Update.
5803 * target-descriptions.c (make_gdb_type): Update.
5804 * symmisc.c (print_symbol): Update.
5805 * stabsread.c (define_symbol, read_type)
5806 (complain_about_struct_wipeout, add_undefined_type)
5807 (cleanup_undefined_types_1): Update.
5808 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5809 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5810 (rust_internal_print_type, rust_composite_type)
5811 (rust_evaluate_funcall, rust_evaluate_subexp)
5812 (rust_inclusive_range_type_p): Update.
5813 * python/py-type.c (typy_get_tag): Update.
5814 * p-typeprint.c (pascal_type_print_base): Update.
5815 * mdebugread.c (parse_symbol, parse_type): Update.
5816 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5817 Update.
5818 * guile/scm-type.c (gdbscm_type_tag): Update.
5819 * go-lang.c (sixg_string_p): Update.
5820 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5821 Update.
5822 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5823 (TYPE_TAG_NAME): Remove.
5824 * gdbtypes.c (type_name_no_tag): Simplify.
5825 (check_typedef, check_types_equal, recursive_dump_type)
5826 (copy_type_recursive, arch_composite_type): Update.
5827 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5828 in summary mode when needed.
5829 * eval.c (evaluate_funcall): Update.
5830 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5831 (process_structure_scope, read_enumeration_type)
5832 (read_namespace_type, read_module_type, determine_prefix): Update.
5833 * cp-support.c (inspect_type): Update.
5834 * coffread.c (process_coff_symbol, decode_base_type): Update.
5835 * c-varobj.c (c_is_path_expr_parent): Update.
5836 * c-typeprint.c (c_type_print_base_struct_union): Update.
5837 (c_type_print_base_1): Update. Print struct/class/union/enum in
5838 summary when using C language.
5839 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5840 (gen_maybe_namespace_elt): Update.
5841 * ada-lang.c (ada_type_name): Simplify.
5842 (empty_record, ada_template_to_fixed_record_type_1)
5843 (template_to_static_fixed_type)
5844 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5845
5846 2018-06-01 Tom Tromey <tom@tromey.com>
5847
5848 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5849 c_print_type.
5850 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5851 (c_print_type): Update.
5852 (c_print_type): New overload.
5853 (c_type_print_varspec_prefix, c_type_print_args)
5854 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5855 (c_type_print_base_struct_union, c_type_print_base_1)
5856 (cp_type_print_method_args): Add "language" parameter.
5857 (c_type_print_base): Update.
5858 * c-lang.h (c_print_type): Add new overload.
5859
5860 2018-06-01 Tom Tromey <tom@tromey.com>
5861
5862 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5863 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5864
5865 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5866
5867 * aarch64-tdep.c (aarch64_sve_register_names): New const
5868 var.
5869 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5870 (AARCH64_SVE_Z_REGS_NUM): New define.
5871 (AARCH64_SVE_P_REGS_NUM): Likewise.
5872 (AARCH64_SVE_NUM_REGS): Likewise.
5873
5874 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5875
5876 * nat/linux-ptrace.h [__alpha__]
5877 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5878 definitions.
5879
5880 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5881
5882 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5883 the endianness selected.
5884 * NEWS: Document `set endian auto' mode operation update.
5885
5886 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5887
5888 * Makefile.in: Add new header.
5889 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5890 (sve_vl_from_vg): Likewise.
5891 (sve_vq_from_vl): Likewise.
5892 (sve_vl_from_vq): Likewise.
5893 (sve_vq_from_vg): Likewise.
5894 (sve_vg_from_vq): Likewise.
5895 * configure.nat: Add new c file.
5896 * nat/aarch64-sve-linux-ptrace.c: New file.
5897 * nat/aarch64-sve-linux-ptrace.h: New file.
5898
5899 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5900
5901 * aarch64-linux-nat.c (aarch64_linux_read_description):
5902 Add parmeter zero.
5903 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5904 Likewise.
5905 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5906 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5907 (aarch64_gdbarch_init): Add parmeter zero.
5908 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5909 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5910 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5911 parmeter.
5912 * doc/gdb.texinfo: Describe SVE feature
5913 * features/aarch64-sve.c: New file.
5914
5915 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5916
5917 PR gdb/23210
5918 * gdbarch.sh (significant_addr_bit): Default to zero when
5919 not set by target architecture.
5920 * gdbarch.c: Re-generated.
5921 * utils.c (address_significant): Update.
5922
5923 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5924
5925 * stack.c (func_command): Remove trailing newline in call to error.
5926
5927 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5928
5929 * regcache.h (regcache_raw_collect): Remove, update callers to
5930 use regcache::raw_collect.
5931 * regcache.c (regcache_raw_collect): Remove.
5932
5933 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * regcache.h (regcache_raw_supply): Remove, update callers to
5936 use detached_regcache::raw_supply.
5937 * regcache.c (regcache_raw_supply): Remove.
5938
5939 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5940
5941 * regcache.h (regcache_cooked_write_part): Remove, update
5942 callers to use regcache::cooked_write_part.
5943 * regcache.c (regcache_cooked_write_part): Remove.
5944
5945 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5946
5947 * regcache.h (regcache_cooked_read_part): Remove, update callers
5948 to use readable_regcache::cooked_read_part.
5949 * regcache.c (regcache_cooked_read_part): Remove.
5950
5951 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5952
5953 * regcache.h (regcache_cooked_read_value): Remove, update
5954 callers to use readable_regcache::cooked_read_value.
5955 * regcache.c (regcache_cooked_read_value): Remove.
5956
5957 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5958
5959 * regcache.h (regcache_cooked_write): Remove, update callers to
5960 use regcache::cooked_write.
5961 * regcache.c (regcache_cooked_write): Remove.
5962
5963 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5964
5965 * regcache.h (regcache_invalidate): Remove, update callers to
5966 use detached_regcache::invalidate instead.
5967 * regcache.c (regcache_invalidate): Remove.
5968
5969 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5970
5971 * regcache.h (regcache_raw_write_part): Remove, update callers
5972 to use regcache::raw_write_part instead.
5973 * regcache.c (regcache_raw_write_part): Remove.
5974
5975 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5976
5977 * regcache.h (regcache_raw_read_part): Remove, update callers to
5978 use readable_regcache::raw_read_part instead.
5979 * regcache.c (regcache_raw_read_part): Remove.
5980
5981 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5982
5983 * regcache.h (regcache_cooked_read): Remove, update callers to
5984 use readable_regcache::cooked_read instead.
5985 * regcache.c (regcache_cooked_read): Remove.
5986
5987 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5988
5989 * regcache.h (regcache_raw_write): Remove, update callers to use
5990 regcache::raw_write instead.
5991 * regcache.c (regcache_raw_write): Remove.
5992
5993 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5994
5995 * regcache.h (regcache_raw_read): Remove, update callers to use
5996 readable_regcache::raw_read instead.
5997 * regcache.c (regcache_raw_read): Remove.
5998
5999 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6000
6001 * regcache.h (regcache_raw_update): Remove, update callers to
6002 use readable_regcache::raw_update instead.
6003 * regcache.c (regcache_raw_update): Remove.
6004
6005 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6006
6007 * regcache.h (regcache_register_status): Remove, update callers
6008 to use reg_buffer::get_register_status directly instead.
6009 * regcache.c (regcache_register_status): Remove.
6010
6011 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6012
6013 * regcache.h (regcache_get_ptid): Remove, update all callers to
6014 call regcache::ptid instead.
6015 * regcache.c (regcache_get_ptid): Remove.
6016
6017 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6018
6019 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6020
6021 2018-05-30 Pedro Alves <palves@redhat.com>
6022
6023 * common/common-exceptions.h (exception_rethrow): Use
6024 ATTRIBUTE_NORETURN.
6025
6026 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6027
6028 * breakpoint.c (print_solib_event, check_status_catch_solib):
6029 Remove struct keyword in range-based for loops.
6030 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6031 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6032 Likewise.
6033 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6034 Likewise.
6035 * symfile.c (addr_info_make_relative): Likewise.
6036 * thread.c (value_in_thread_stack_temporaries): Likewise.
6037
6038 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6039
6040 PR gdb/16841
6041 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6042 aggregate type to get its real type before accessing it.
6043
6044 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6045
6046 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6047 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6048 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6049 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6050 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6051 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6052 * printcmd.c (info_address_command): Likewise.
6053
6054 2018-05-29 Tom Tromey <tom@tromey.com>
6055
6056 * windows-nat.c (handle_exception): Update fall-through comment.
6057
6058 2018-05-29 Tom Tromey <tom@tromey.com>
6059
6060 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6061 (struct program_space) <added_solibs>: Now a std::vector.
6062 * breakpoint.c (print_solib_event): Update.
6063 (check_status_catch_solib): Update.
6064 * progspace.c (clear_program_space_solib_cache): Update.
6065 * solib.c (update_solib_list): Update.
6066
6067 2018-05-29 Tom Tromey <tom@tromey.com>
6068
6069 * python/py-type.c (typy_richcompare): Update.
6070 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6071 * gdbtypes.h (types_deeply_equal): Return bool.
6072 (types_equal): Likewise.
6073 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6074 declare VEC.
6075 (check_types_equal): Change worklist to std::vector. Return
6076 bool.
6077 (struct type_equality_entry): Add constructor.
6078 (compare_maybe_null_strings): Return bool.
6079 (check_types_worklist): Return bool. Change worklist to
6080 std::vector.
6081 (types_deeply_equal): Use std::vector.
6082 (types_equal): Return bool.
6083 (compare_maybe_null_strings): Simplify.
6084
6085 2018-05-29 Tom Tromey <tom@tromey.com>
6086
6087 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6088
6089 2018-05-29 Tom Tromey <tom@tromey.com>
6090
6091 * objc-lang.h: Don't include cp-support.h.
6092 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6093 declare VEC.
6094
6095 2018-05-27 Tom Tromey <tom@tromey.com>
6096
6097 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6098
6099 2018-05-25 Tom Tromey <tom@tromey.com>
6100
6101 * value.c (value::location): Initialize.
6102
6103 2018-05-25 Tom Tromey <tom@tromey.com>
6104
6105 * dbxread.c (init_bincl_list): Remove.
6106 (bincl_list): Now a std::vector.
6107 (bincls_allocated, next_bincl): Remove.
6108 (free_bincl_list, do_free_bincl_list_cleanup)
6109 (make_cleanup_free_bincl_list): Remove.
6110 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6111 unique_xmalloc_ptr.
6112 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6113 (struct header_file_location): Add constructor.
6114 (add_bincl_to_list): Remove.
6115
6116 2018-05-25 Tom Tromey <tom@tromey.com>
6117
6118 * tui/tui.c (tui_enable): Update.
6119 * mi/mi-interp.c (mi_interp::init): Update.
6120 * interps.h (class interp) <name>: New method.
6121 <m_name>: Rename from name.
6122 (~scoped_restore_interp): Update.
6123 * interps.c (interp::interp): Update.
6124 (interp_add, interp_set, interp_lookup_existing)
6125 (current_interp_named_p): Update.
6126
6127 2018-05-25 Tom Tromey <tom@tromey.com>
6128
6129 * interps.c (interp_name): Remove.
6130 * mi/mi-interp.c (mi_interp::init): Update.
6131 * interps.h (interp_name): Remove.
6132 (~scoped_restore_interp): Update.
6133 * tui/tui.c (tui_enable): Update.
6134
6135 2018-05-25 Tom Tromey <tom@tromey.com>
6136
6137 * utils.c (fputs_maybe_filtered): Update.
6138 * linespec.c (decode_line_full): Update.
6139 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6140 (mi_print_breakpoint_for_event, mi_solib_loaded)
6141 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6142 (mi_user_selected_context_changed): Update.
6143 * mi/mi-main.c (mi_execute_command): Update.
6144 * cli/cli-script.c (execute_control_command): Update.
6145 * python/python.c (execute_gdb_command): Update.
6146 * solib.c (info_sharedlibrary_command): Update.
6147 * interps.c (interp_ui_out): Remove.
6148 * interps.h (interp_ui_out): Remove.
6149
6150 2018-05-25 Tom Tromey <tom@tromey.com>
6151
6152 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6153 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6154 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6155
6156 2018-05-25 Tom Tromey <tom@tromey.com>
6157
6158 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6159 * interps.c (interp_exec): Use scoped_restore.
6160
6161 2018-05-25 Tom Tromey <tom@tromey.com>
6162
6163 * remote.c (remote_target::remote_file_get): Use
6164 gdb::byte_vector.
6165 (remote_target::remote_file_put): Likewise.
6166
6167 2018-05-25 Tom Tromey <tom@tromey.com>
6168
6169 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6170 a std::string.
6171 (get_pe_section_index, add_pe_exported_sym): Update.
6172 (read_pe_exported_syms): Use gdb::def_vector.
6173
6174 2018-05-25 Tom Tromey <tom@tromey.com>
6175
6176 * frame.c (remove_prev_frame): Remove.
6177 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6178
6179 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6180
6181 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6182 Remove prototypes.
6183 * mips-linux-nat.c (supply_fpregset): Always call
6184 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6185 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6186 `mips_fill_fpregset'.
6187 * mips-linux-tdep.c (mips_supply_fpregset)
6188 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6189 (mips_fill_fpregset_wrapper): Remove functions.
6190 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6191 (mips_linux_fpregset): Remove variable.
6192 (mips_linux_iterate_over_regset_sections): Use
6193 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6194 (mips_linux_o32_sigframe_init): Remove comment.
6195
6196 2018-05-25 Pedro Alves <palves@redhat.com>
6197
6198 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6199 (struct readahead_cache, struct packet_reg, struct
6200 remote_arch_state, class remote_state): Move higher up in the
6201 file.
6202 (remote_target::m_remote_state): Now an object instead of a pointer.
6203 (remote_target::get_remote_state): Adjust.
6204
6205 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6206
6207 * stack.c (select_and_print_frame): Delete.
6208 (struct function_bounds): Move struct within function.
6209 (func_command): Most content moved into new function
6210 find_frame_for_function, use new function, print result, add
6211 function comment.
6212 (find_frame_for_function): New function, now returns a result.
6213
6214 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6215
6216 * stack.c (iterate_over_block_arg_vars): Fix comment.
6217 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6218
6219 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6220
6221 PR gdb/23203
6222 * frame.c
6223 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6224 Define.
6225 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6226 Define.
6227 * frame.h (class scoped_restore_selected_frame): New class.
6228 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6229 of any exception, use scoped_restore_selected_frame to restore the
6230 frame instead.
6231
6232 2018-05-24 Pedro Alves <palves@redhat.com>
6233
6234 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6235 override.
6236
6237 2018-05-23 Tom Tromey <tom@tromey.com>
6238
6239 * complaints.c (struct complaints): Remove.
6240 (symfile_complaint_book): Remove.
6241 (series): New global.
6242 (complaint_internal): Update.
6243 (clear_complaints): Update.
6244
6245 2018-05-23 Tom Tromey <tom@tromey.com>
6246
6247 * complaints.c (counters): New global.
6248 (struct complain): Remove.
6249 (struct complaints) <root>: Remove.
6250 (complaint_sentinel): Remove.
6251 (symfile_complaint_book): Update.
6252 (find_complaint) Remove.
6253 (complaint_internal, clear_complaints): Update.
6254
6255 2018-05-23 Tom Tromey <tom@tromey.com>
6256
6257 * complaints.c (struct complain) <file, line>: Remove.
6258 (find_complaint): Remove file, line parameters.
6259 (complaint_internal): Update.
6260
6261 2018-05-23 Tom Tromey <tom@tromey.com>
6262
6263 * complaints.c (vcomplaint): Remove.
6264 (complaint_internal) Merge in contents of vcomplaint.
6265
6266 2018-05-23 Tom Tromey <tom@tromey.com>
6267
6268 * complaints.c (struct complaints) <explanation>: Remove.
6269 (symfile_explanations): Remove.
6270 (symfile_complaint_book): Update.
6271 (vcomplaint): Update.
6272 (struct explanation): Remove.
6273
6274 2018-05-23 Tom Tromey <tom@tromey.com>
6275
6276 * complaints.c (symfile_complaints): Remove.
6277 (complaint_internal): Remove "complaints" parameter.
6278 (clear_complaints, vcomplaint): Remove "c" parameter.
6279 (get_complaints): Remove.
6280 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6281 (dwarf2_debug_line_missing_file_complaint)
6282 (dwarf2_debug_line_missing_end_sequence_complaint)
6283 (dwarf2_complex_location_expr_complaint)
6284 (dwarf2_const_value_length_mismatch_complaint)
6285 (dwarf2_section_buffer_overflow_complaint)
6286 (dwarf2_macro_malformed_definition_complaint)
6287 (dwarf2_invalid_attrib_class_complaint)
6288 (create_addrmap_from_index, dw2_symtab_iter_next)
6289 (dw2_expand_marked_cus)
6290 (dw2_debug_names_iterator::find_vec_in_debug_names)
6291 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6292 (create_debug_type_hash_table, init_cutu_and_read_dies)
6293 (partial_die_parent_scope, add_partial_enumeration)
6294 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6295 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6296 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6297 (create_cus_hash_table, create_dwp_hash_table)
6298 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6299 (dwarf2_rnglists_process, dwarf2_ranges_process)
6300 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6301 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6302 (handle_struct_member_die, process_structure_scope)
6303 (read_array_type, read_common_block, read_module_type)
6304 (read_tag_pointer_type, read_typedef, read_base_type)
6305 (read_subrange_type, load_partial_dies, partial_die_info::read)
6306 (partial_die_info::read, partial_die_info::read)
6307 (partial_die_info::read, read_checked_initial_length_and_offset)
6308 (dwarf2_string_attr, read_formatted_entries)
6309 (dwarf_decode_line_header)
6310 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6311 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6312 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6313 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6314 (get_signatured_type, get_DW_AT_signature_type)
6315 (decode_locdesc, file_file_name, consume_improper_spaces)
6316 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6317 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6318 (dwarf2_symbol_mark_computed, set_die_type)
6319 (read_attribute_value): Update.
6320 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6321 Update.
6322 * dbxread.c (unknown_symtype_complaint)
6323 (lbrac_mismatch_complaint, repeated_header_complaint)
6324 (set_namestring, function_outside_compilation_unit_complaint)
6325 (read_dbx_symtab, process_one_symbol): Update.
6326 * gdbtypes.c (stub_noname_complaint): Update.
6327 * windows-nat.c (handle_unload_dll): Update.
6328 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6329 (decode_base_type): Update.
6330 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6331 (eb_complaint, record_include_begin, record_include_end)
6332 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6333 (process_xcoff_symbol, read_symbol)
6334 (function_outside_compilation_unit_complaint)
6335 (scan_xcoff_symtab): Update.
6336 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6337 * buildsym.c (finish_block_internal, make_blockvector)
6338 (end_symtab_get_static_block, augment_type_symtab): Update.
6339 * dtrace-probe.c (dtrace_process_dof)
6340 (dtrace_static_probe_ops::get_probes): Update.
6341 * complaints.h (struct complaint): Don't declare.
6342 (symfile_complaints): Remove.
6343 (complaint_internal): Remove "complaints" parameter.
6344 (complaint): Likewise.
6345 (clear_complaints): Likewise.
6346 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6347 (reread_symbols): Update.
6348 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6349 (dwarf2_frame_cache, decode_frame_entry): Update.
6350 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6351 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6352 (info_selectors_command): Update.
6353 * macrotab.c (macro_include, check_for_redefinition)
6354 (macro_undef): Update.
6355 * objfiles.c (filter_overlapping_sections): Update.
6356 * stabsread.c (invalid_cpp_abbrev_complaint)
6357 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6358 (define_symbol, error_type, read_type, rs6000_builtin_type)
6359 (stabs_method_name_from_physname, read_member_functions)
6360 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6361 (attach_fields_to_type, complain_about_struct_wipeout)
6362 (read_range_type, read_args, common_block_start)
6363 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6364 Update.
6365 * mdebugread.c (index_complaint, unknown_ext_complaint)
6366 (basic_type_complaint, bad_tag_guess_complaint)
6367 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6368 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6369 (parse_procedure, parse_lines)
6370 (function_outside_compilation_unit_complaint)
6371 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6372 (bad_tag_guess_complaint, reg_value_complaint): Update.
6373 * cp-support.c (demangled_name_complaint): Update.
6374 * macroscope.c (sal_macro_scope): Update.
6375 * dwarf-index-write.c (class debug_names): Update.
6376
6377 2018-05-23 Tom Tromey <tom@tromey.com>
6378
6379 * complaints.c (clear_complaints): Remove "noisy" parameter.
6380 * complaints.h (clear_complaints): Update.
6381 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6382 (reread_symbols): Update.
6383
6384 2018-05-23 Tom Tromey <tom@tromey.com>
6385
6386 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6387 SUBSEQUENT_MESSAGE.
6388 (vcomplaint, clear_complaints): Update.
6389 (symfile_explanations): Remove some messages.
6390
6391 2018-05-23 Tom Tromey <tom@tromey.com>
6392
6393 * complaints.c (internal_complaint): Remove.
6394 * complaints.h (internal_complaint): Remove.
6395
6396 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6397
6398 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6399
6400 2018-05-22 Pedro Alves <palves@redhat.com>
6401
6402 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6403 (remote_fileio_badfd, remote_fileio_return_errno)
6404 (remote_fileio_return_success, remote_fileio_func_open)
6405 (remote_fileio_func_open, remote_fileio_func_close)
6406 (remote_fileio_func_read, remote_fileio_func_write)
6407 (remote_fileio_func_lseek, remote_fileio_func_rename)
6408 (remote_fileio_func_unlink, remote_fileio_func_stat)
6409 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6410 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6411 remote_target parameter.
6412 (remote_fio_func_map) <func>: Add remote_target parameter.
6413 (do_remote_fileio_request, remote_fileio_request):
6414 * remote-fileio.h (remote_fileio_request):
6415 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6416 remote_target parameter.
6417 (remote_notif_process, handle_notification): Adjust to pass down
6418 the remote.
6419 (remote_notif_state_allocate): Add remote_target parameter. Save
6420 it.
6421 * remote-notif.h (struct remote_target): Forward declare.
6422 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6423 remote_target parameter.
6424 (struct remote_notif_state) <remote>: New field.
6425 (remote_notif_ack, remote_notif_parse): Add remote_target
6426 parameter.
6427 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6428 remote_target parameter.
6429 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6430 (threads_listing_context, rmt_thread_action, protocol_feature)
6431 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6432 (packet_result, struct threads_listing_context, remote_state):
6433 Move definitions and declarations higher up.
6434 (remote_target) <~remote_target>: Declare.
6435 (remote_download_command_source, remote_file_put, remote_file_get)
6436 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6437 (remote_hostio_pread_vFile, remote_hostio_send_command)
6438 (remote_hostio_set_filesystem, remote_hostio_open)
6439 (remote_hostio_close, remote_hostio_unlink, remote_state)
6440 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6441 (get_memory_write_packet_size, get_memory_read_packet_size)
6442 (append_pending_thread_resumptions, remote_detach_1)
6443 (append_resumption, remote_resume_with_vcont)
6444 (add_current_inferior_and_thread, wait_ns, wait_as)
6445 (process_stop_reply, remote_notice_new_inferior)
6446 (process_initial_stop_replies, remote_add_thread)
6447 (btrace_sync_conf, remote_btrace_maybe_reopen)
6448 (remove_new_fork_children, kill_new_fork_children)
6449 (discard_pending_stop_replies, stop_reply_queue_length)
6450 (check_pending_events_prevent_wildcard_vcont)
6451 (discard_pending_stop_replies_in_queue, stop_reply)
6452 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6453 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6454 (remote_interrupt_as, remote_interrupt_ns)
6455 (remote_get_noisy_reply, remote_query_attached)
6456 (remote_add_inferior, remote_current_thread, get_current_thread)
6457 (set_thread, set_general_thread, set_continue_thread)
6458 (set_general_process, write_ptid)
6459 (remote_unpack_thread_info_response, remote_get_threadinfo)
6460 (parse_threadlist_response, remote_get_threadlist)
6461 (remote_threadlist_iterator, remote_get_threads_with_ql)
6462 (remote_get_threads_with_qxfer)
6463 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6464 (get_offsets, remote_check_symbols, remote_supported_packet)
6465 (remote_query_supported, remote_packet_size)
6466 (remote_serial_quit_handler, remote_detach_pid)
6467 (remote_vcont_probe, remote_resume_with_hc)
6468 (send_interrupt_sequence, interrupt_query)
6469 (remote_notif_get_pending_events, fetch_register_using_p)
6470 (send_g_packet, process_g_packet, fetch_registers_using_g)
6471 (store_register_using_P, store_registers_using_G)
6472 (set_remote_traceframe, check_binary_download)
6473 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6474 (remote_xfer_live_readonly_partial, remote_read_bytes)
6475 (remote_send_printf, remote_flash_write, readchar)
6476 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6477 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6478 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6479 (extended_remote_disable_randomization, extended_remote_run)
6480 (send_environment_packet, extended_remote_environment_support)
6481 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6482 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6483 (packet_command): Now methods of ...
6484 (remote_target): ... this class.
6485 (m_remote_state) <remote_target>: New field.
6486 (struct remote_state) <stop_reply_queue,
6487 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6488 fields.
6489 (remote_state::remote_state): Allocate stop_reply_queue.
6490 (remote_state): Delete global.
6491 (get_remote_state_raw): Delete.
6492 (remote_target::get_remote_state): Allocate m_remote_state on
6493 demand.
6494 (get_current_remote_target): New.
6495 (remote_ops, extended_remote_ops): Delete.
6496 (wait_forever_enabled_p, remote_async_inferior_event_token):
6497 Delete, moved to struct remote_state.
6498 (remote_target::close): Delete self. Destruction bits split to
6499 ...
6500 (remote_target::~remote_target): ... this.
6501 (show_memory_packet_size): Adjust to use
6502 get_current_remote_target.
6503 (struct protocol_feature) <func>: Add remote_target parameter.
6504 All callers adjusted.
6505 (curr_quit_handler_target): New.
6506 (remote_serial_quit_handler): Reimplement.
6507 (remote_target::open_1): Adjust to use get_current_remote_target.
6508 Heap-allocate remote_target/extended_remote_target instances.
6509 (vcont_builder::vcont_builder): Add remote_target parameter, and
6510 save it in m_remote. All callers adjusted.
6511 (vcont_builder::m_remote): New field.
6512 (vcont_builder::restart, vcont_builder::flush)
6513 (vcont_builder::push_action): Use it.
6514 (remote_target::commit_resume): Use it.
6515 (struct queue_iter_param) <remote>: New field.
6516 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6517 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6518 (check_pending_event_prevents_wildcard_vcont_callback)
6519 (remote_target::check_pending_events_prevent_wildcard_vcont)
6520 (remote_target::discard_pending_stop_replies)
6521 (remote_target::discard_pending_stop_replies_in_queue)
6522 (remote_target::remote_notif_remove_queued_reply): Fill in
6523 'remote' field.
6524 (remote_notif_get_pending_events): New.
6525 (remote_target::readchar, remote_target::remote_serial_write):
6526 Save/restore curr_quit_handler_target.
6527 (putpkt): New.
6528 (kill_new_fork_children): Fill in 'remote' field.
6529 (packet_command): Use get_current_remote_target, defer to
6530 remote_target method of same name.
6531 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6532 parameter, and save it in m_remote. All callers adjusted.
6533 (scoped_remote_fd::release): Use m_remote.
6534 (scoped_remote_fd::m_remote): New field.
6535 (remote_file_put, remote_file_get, remote_file_delete): Use
6536 get_current_remote_target, defer to remote_target method of same
6537 name.
6538 (remote_btrace_reset): Add remote_state paremeter. Update all
6539 callers.
6540 (remote_async_inferior_event_handler). Pass down 'data'.
6541 (remote_new_objfile): Use get_current_remote_target.
6542 (remote_target::vcont_r_supported): New.
6543 (set_range_stepping): Use get_current_remote_target and
6544 remote_target::vcont_r_supported.
6545 (_initialize_remote): Don't allocate 'remote_state' and
6546 'stop_reply_queue' globals.
6547 * remote.h (struct remote_target): Forward declare.
6548 (getpkt, putpkt, remote_notif_get_pending_events): Add
6549 'remote_target' parameter.
6550
6551 2018-05-22 Pedro Alves <palves@redhat.com>
6552
6553 * remote.c (vcont_builder): Now a class. Make all data members
6554 private.
6555 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6556 Declare methods.
6557 (vcont_builder_restart): Rename to ...
6558 (vcont_builder::restart): ... this.
6559 (vcont_builder_flush): Rename to ...
6560 (vcont_builder::flush): ... this.
6561 (vcont_builder_push_action): Rename to ...
6562 (vcont_builder::push_action): ... this.
6563 (remote_target::commit_resume): Adjust.
6564
6565 2018-05-22 Pedro Alves <palves@redhat.com>
6566
6567 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6568 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6569 (get_fixed_memory_packet_size): New.
6570 (get_memory_packet_size): Use it.
6571 (set_memory_packet_size): Don't override the config size with
6572 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6573 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6574 Don't refer to get_memory_packet_size if not connected to a remote
6575 target. Show "(default)" if configured size is 0.
6576
6577 2018-05-22 Pedro Alves <palves@redhat.com>
6578
6579 * remote.c (remote_target::mourn_inferior): Move
6580 discard_pending_stop_replies call here from ...
6581 (_initialize_remote): ... here.
6582
6583 2018-05-22 Pedro Alves <palves@redhat.com>
6584
6585 * remote.c (compare_section_command): Remove set_general_process
6586 call.
6587
6588 2018-05-22 Pedro Alves <palves@redhat.com>
6589
6590 * remote.c (struct packet_reg, struct remote_arch_state):
6591 Move higher up in the file.
6592 (remote_state) <m_arch_states>: Store remote_arch_state values
6593 instead of remote_arch_state pointers.
6594 (remote_state::get_remote_arch_state): Adjust.
6595
6596 2018-05-22 Pedro Alves <palves@redhat.com>
6597
6598 * remote.c: Include <unordered_map>.
6599 (remote_state): Now a class.
6600 (remote_state) <get_remote_arch_state>: Declare method.
6601 <get_remote_arch_state>: New field.
6602 (remote_arch_state) <remote_arch_state>: Declare ctor.
6603 <regs>: Now a unique_ptr.
6604 (remote_gdbarch_data_handle): Delete.
6605 (get_remote_arch_state): Delete.
6606 (remote_state::get_remote_arch_state): New.
6607 (get_remote_state): Adjust to call remote_state's
6608 get_remote_arch_state method.
6609 (init_remote_state): Delete, bits factored out to ...
6610 (remote_arch_state::remote_arch_state): ... this new method.
6611 (get_remote_packet_size, get_memory_packet_size)
6612 (process_g_packet, remote_target::fetch_registers)
6613 (remote_target::prepare_to_store, store_registers_using_G)
6614 (remote_target::store_registers, remote_target::get_trace_status):
6615 Adjust to call remote_state's method.
6616 (_initialize_remote): Remove reference to
6617 remote_gdbarch_data_handle.
6618
6619 2018-05-22 Pedro Alves <palves@redhat.com>
6620
6621 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6622 pread>: New method declarations.
6623 (remote_target::open_1): Adjust.
6624 (readahead_cache_invalidate): Rename to ...
6625 (readahead_cache::invalidate): ... this, and adjust to be a class
6626 method.
6627 (readahead_cache_invalidate_fd): Rename to ...
6628 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6629 class method.
6630 (remote_hostio_pwrite): Adjust.
6631 (remote_hostio_pread_from_cache): Rename to ...
6632 (readahead_cache::pread): ... this, and adjust to be a class
6633 method.
6634 (remote_hostio_close): Adjust.
6635
6636 2018-05-22 Pedro Alves <palves@redhat.com>
6637
6638 * remote.c (remote_hostio_close_cleanup): Delete.
6639 (class scoped_remote_fd): New.
6640 (remote_file_put, remote_file_get): Use it.
6641
6642 2018-05-22 Pedro Alves <palves@redhat.com>
6643
6644 (struct vCont_action_support): Use bool and initialize all fields.
6645 (struct readahead_cache): Initialize all fields.
6646 (remote_state): Use bool and initialize all fields.
6647 (remote_state::remote_state, remote_state::~remote_state): New.
6648 (new_remote_state): Delete.
6649 (_initialize_remote): Use new to allocate remote_state.
6650
6651 2018-05-22 Pedro Alves <palves@redhat.com>
6652 張俊芝 <zjz@zjz.name>
6653
6654 PR gdb/22973
6655 * c-exp.y: Include "c-support.h".
6656 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6657 of tolower. Use c_ident_is_alpha to scan names.
6658 * c-lang.c: Include "c-support.h".
6659 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6660 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6661 * c-support.h: New file, with bits factored out from ...
6662 * cp-name-parser.y: ... this file.
6663 Include "c-support.h".
6664 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6665 c-support.h and renamed.
6666 (symbol_end, yylex): Adjust.
6667
6668 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6669
6670 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6671 parameter type to CORE_ADDR.
6672 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6673 parameter type in declaration to CORE_ADDR.
6674 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6675 target_auxv_search to get AT_HWCAP and use the result to get the
6676 target description.
6677 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6678 to CORE_ADDR. Remove the cast of the return value to unsigned
6679 long. Fix error predicate of target_auxv_search.
6680 (ppc_linux_nat_target::read_description): Change the type of the
6681 hwcap variable to CORE_ADDR.
6682
6683 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6684
6685 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6686 if the size of fpscr is larger than 32 bits.
6687
6688 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6689
6690 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6691 (ppc32_linux_vsxregmap): New global.
6692 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6693 regcache_supply_regset, and regcache_collect_regset.
6694 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6695 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6696 (fetch_vsx_register, store_vsx_register): Remove.
6697 (fetch_vsx_registers): Add regno parameter. Get regset using
6698 ppc_linux_vsxregset. Use regset to supply registers.
6699 (store_vsx_registers): Add regno parameter. Get regset using
6700 ppc_linux_vsxregset. Use regset to collect registers.
6701 (fetch_register): Call fetch_vsx_registers instead of
6702 fetch_vsx_register.
6703 (store_register): Call store_vsx_registers instead of
6704 store_vsx_register.
6705 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6706 new regno parameter.
6707 (store_ppc_registers): Call store_vsx_registers with -1 for the
6708 new regno parameter.
6709 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6710 (ppc_collect_vsxregset): Remove.
6711
6712 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6713
6714 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6715 offset fields.
6716 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6717 for vector register offset fields.
6718 (ppc64_fbsd_reg_offsets): Likewise.
6719 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6720 to vector register offset fields.
6721 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6722 to vector register offset fields.
6723 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6724 vector register offset fields.
6725 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6726 initializers for vector register offset fields.
6727 (rs6000_aix64_reg_offsets): Likewise.
6728 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6729 (ppc_supply_vrregset): Remove.
6730 (ppc_collect_vrregset): Remove.
6731 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6732 (ppc_linux_vrregset) : New function.
6733 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6734 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6735 (ppc32_linux_vrregset): Remove.
6736 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6737 and use result instead of ppc32_linux_vrregset.
6738 (ppc32_linux_reg_offsets): Remove initializers for vector register
6739 offset fields.
6740 (ppc64_linux_reg_offsets): Likewise.
6741 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6742 * ppc-linux-nat.c: Include regset.h.
6743 (gdb_vrregset_t): Adjust comment to account for little-endian
6744 mode.
6745 (supply_vrregset, fill_vrregset): Remove.
6746 (fetch_altivec_register, store_altivec_register): Remove.
6747 (fetch_altivec_registers): Add regno parameter. Get regset using
6748 ppc_linux_vrregset. Use regset to supply registers.
6749 (store_altivec_registers): Add regno parameter. Get regset using
6750 ppc_linux_vrregset. Use regset to collect registers.
6751 (fetch_register): Call fetch_altivec_registers instead of
6752 fetch_altivec_register.
6753 (store_register): Call store_altivec_registers instead of
6754 store_altivec_register.
6755 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6756 the new regno parameter.
6757 (store_ppc_registers): Call store_altivec_registers with -1 for
6758 the new regno parameter.
6759
6760 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6761
6762 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6763 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6764 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6765 (gdb_vrregset_t): Change array type size to
6766 PPC_LINUX_SIZEOF_VRREGSET.
6767 (gdb_vsxregset_t): Change array type size to
6768 PPC_LINUX_SIZEOF_VSXREGSET.
6769 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6770 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6771 PPC_LINUX_SIZEOF_VSXREGSET.
6772
6773 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6774
6775 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6776 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6777 nat/ppc-linux.c.
6778 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6779 ppc_linux_target_wordsize with tid.
6780 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6781 wordsize with tid.
6782 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6783 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6784 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6785 tid parameter. Remove static specifier.
6786 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6787 (ppc_linux_target_wordsize): New declaration.
6788
6789 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6790
6791 * arch/ppc-linux-common.c: New file.
6792 * arch/ppc-linux-common.h: New file.
6793 * arch/ppc-linux-tdesc.h: New file.
6794 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6795 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6796 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6797 arch/ppc-linux-tdesc.h.
6798 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6799 arch/ppc-linux-tdesc.h.
6800 (ppc_linux_nat_target::read_description): Remove target
6801 description matching code. Fill a ppc_linux_features struct and
6802 call ppc_linux_match_description with it. Move comment about ISA
6803 2.05 to ppc-linux-common.c.
6804 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6805 arch/ppc-linux-tdesc.h.
6806 (ppc_linux_core_read_description): Remove target description
6807 matching code. Fill a ppc_linux_features struct and call
6808 ppc_linux_match_description with it.
6809 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6810 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6811 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6812 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6813 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6814 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6815 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6816 (tdesc_powerpc_e500l): Remove.
6817
6818 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6819
6820 * ada-lang.c (catch_assert_command): Pass empty string instead
6821 of NULL for excep_string argument.
6822
6823 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6824
6825 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6826 the width of the requested register exceeds the width of the
6827 `ptrace' data type.
6828
6829 2018-05-21 Tom Tromey <tom@tromey.com>
6830
6831 * printcmd.c (output_command): Remove.
6832 (output_command_const): Rename to output_command.
6833 * valprint.h (output_command): Rename from output_command_const.
6834 * tracepoint.c (trace_dump_actions): Call output_command.
6835
6836 2018-05-21 Tom Tromey <tom@tromey.com>
6837
6838 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6839 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6840 * ada-lang.h (create_ada_exception_catchpoint): Update.
6841 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6842 std::string.
6843 (create_excep_cond_exprs, ~ada_catchpoint)
6844 (should_stop_exception, print_one_exception)
6845 (print_mention_exception, print_recreate_exception): Update.
6846 (ada_get_next_arg): Remove.
6847 (catch_ada_exception_command_split): Use std::string. Change type
6848 of "excep_string", "cond_string".
6849 (catch_ada_exception_command): Update.
6850 (create_ada_exception_catchpoint): Change type of excep_string.
6851 (ada_exception_sal): Remove excep_string parameter.
6852 (~ada_catchpoint): Remove.
6853
6854 2018-05-21 Tom Tromey <tom@tromey.com>
6855
6856 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6857 cleanup.
6858
6859 2018-05-21 Tom Tromey <tom@tromey.com>
6860
6861 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6862 Return unique_xmalloc_ptr.
6863 (print_it_exception): Update.
6864
6865 2018-05-21 Tom Tromey <tom@tromey.com>
6866
6867 * tracepoint.c (trace_dump_actions): Use std::string.
6868
6869 2018-05-21 Tom Tromey <tom@tromey.com>
6870
6871 * symfile.c (reread_symbols): Use std::string for original_name.
6872
6873 2018-05-21 Tom Tromey <tom@tromey.com>
6874
6875 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6876 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6877 constructor.
6878
6879 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6880
6881 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6882 instance to...
6883 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6884 * objfiles.c (get_objfile_bfd_data): Allocate
6885 objfile_per_bfd_storage with obstack_new when allocating on
6886 obstack.
6887
6888 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6889
6890 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6891 OBSTACK_ZALLOC.
6892 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6893 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6894 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6895 (add_pending): Likewise.
6896 (parse_symbol): Likewise.
6897 (parse_partial_symbols): Likewise.
6898 (psymtab_to_symtab_1): Likewise.
6899 (new_psymtab): Likewise.
6900 (elfmdebug_build_psymtabs): Likewise.
6901 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6902 * objfiles.c (get_objfile_bfd_data): Likewise.
6903 (objfile_register_static_link): Likewise.
6904 * psymtab.c (allocate_psymtab): Likewise.
6905 * stabsread.c (read_member_functions): Likewise.
6906 * xcoffread.c (xcoff_end_psymtab): Likewise.
6907
6908 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6909
6910 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6911 compiler supports std::is_trivially_constructible.
6912 * common/poison.h: Include obstack.h.
6913 (IsMallocable): Define to is_trivially_constructible if the
6914 compiler supports it, define to true_type otherwise.
6915 (xobnew): New.
6916 (XOBNEW): Redefine.
6917 (xobnewvec): New.
6918 (XOBNEWVEC): Redefine.
6919 * gdb_obstack.h (obstack_zalloc): New.
6920 (OBSTACK_ZALLOC): Redefine.
6921 (obstack_calloc): New.
6922 (OBSTACK_CALLOC): Redefine.
6923 (obstack_new): New.
6924 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6925 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6926 gdbarch.c.
6927 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6928 obstack_calloc/obstack_zalloc.
6929 (gdbarch_obstack_zalloc): Remove.
6930 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6931
6932 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6933
6934 * stack.c (backtrace_command_1): Remove useless variable int i.
6935
6936 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6937
6938 * stack.c (print_frame_info): Fix comment.
6939
6940 2018-05-18 Tom Tromey <tom@tromey.com>
6941
6942 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6943 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6944 (~dwarf2_per_objfile): Update
6945 (dwarf2_get_dwz_file): Use new.
6946 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6947 unique_ptr.
6948
6949 2018-05-18 Tom Tromey <tom@tromey.com>
6950
6951 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6952 unique_ptr.
6953 * dwarf2read.c (struct dwp_file): Add constructor and
6954 initializers.
6955 (open_and_init_dwp_file): Return a unique_ptr.
6956 (dwarf2_per_objfile, create_dwp_hash_table)
6957 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6958 (lookup_dwo_unit_in_dwp): Update.
6959 (open_and_init_dwp_file, get_dwp_file): Update.
6960
6961 2018-05-18 Tom Tromey <tom@tromey.com>
6962
6963 * dwarf2read.c (dwarf2_per_objfile): Update.
6964 (struct mapped_index): Add initializers.
6965 (dwarf2_read_index): Use new.
6966 (dw2_symtab_iter_init): Update.
6967 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6968 unique_ptr.
6969
6970 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6971
6972 * dwarf2read.c (mapped_index) <total_size>: Remove.
6973
6974 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6975
6976 * unittests/format_pieces-selftests.c (test_format_specifier):
6977 Add ARI comments.
6978
6979 2018-05-18 Tom Tromey <tom@tromey.com>
6980
6981 * c-typeprint.c (maybe_print_hole): New function.
6982 (c_print_type_struct_field_offset): Update.
6983 (c_type_print_base_struct_union): Call maybe_print_hole.
6984
6985 2018-05-17 Keith Seitz <keiths@redhat.com>
6986
6987 * breakpoint.c (build_bpstat_chain): New function, moved from
6988 bpstat_stop_status.
6989 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6990 If no stop chain is passed, call build_bpstat_chain to build it.
6991 * breakpoint.h (build_bpstat_chain): Declare.
6992 (bpstat_stop_status): Move documentation here from breakpoint.c.
6993 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6994 build the stop chain and pass it to skip_inline_frames.
6995 Pass this stop chain to bpstat_stop_status.
6996 * inline-frame.c: Include breakpoint.h.
6997 (stopped_by_user_bp_inline_frame): New function.
6998 (skip_inline_frames): Add parameter `stop_chain'.
6999 Move documention to inline-frame.h.
7000 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7001 whether the frame should be elided.
7002 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7003 Add moved documentation and update for new parameter.
7004
7005 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7006
7007 PR cli/14975
7008 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7009 unittests/format_pieces-selftests.c.
7010 * common/format.h (format_piece) <operator==>: New.
7011 (format_pieces) <operator[]>: Remove.
7012 * common/format.c (format_pieces::format_pieces): Handle \e.
7013 * unittests/format_pieces-selftests.c: New.
7014
7015 2018-05-17 Tom Tromey <tom@tromey.com>
7016
7017 PR symtab/23010:
7018 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7019 (dw2_instantiate_symtab): Add skip_partial parameter.
7020 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7021 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7022 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7023 (dw2_expand_symtabs_matching_one)
7024 (dw2_find_pc_sect_compunit_symtab)
7025 (dw2_debug_names_lookup_symbol)
7026 (dw2_debug_names_expand_symtabs_for_function): Update.
7027 (init_cutu_and_read_dies): Add skip_partial parameter.
7028 (process_psymtab_comp_unit, build_type_psymtabs_1)
7029 (process_skeletonless_type_unit, load_partial_comp_unit)
7030 (psymtab_to_symtab_1): Update.
7031 (load_full_comp_unit): Add skip_partial parameter.
7032 (process_imported_unit_die, dwarf2_read_addr_index)
7033 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7034 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7035 (read_signatured_type): Update.
7036
7037 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7038
7039 * value.c (release_value): Remove unused variable.
7040 (record_latest_value): Likewise.
7041 (access_value_history): Likewise.
7042 (preserve_values): Likewise.
7043
7044 2018-05-17 Tom Tromey <tom@tromey.com>
7045
7046 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7047 Initialize.
7048
7049 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7050
7051 PR gdb/22286
7052 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7053 Also handle registers whose width is not a multiple of
7054 PTRACE_TYPE_RET.
7055 (linux_nat_trad_target::store_register): Likewise.
7056
7057 2018-05-16 Tom Tromey <tom@tromey.com>
7058
7059 * gdbcore.h (core_bfd): Redefine.
7060 * corelow.c (core_target::close): Update.
7061 (core_target_open): Update.
7062 * progspace.h (struct program_space) <cbfd>: Now a
7063 gdb_bfd_ref_ptr.
7064
7065 2018-05-16 Tom Tromey <tom@tromey.com>
7066
7067 PR cli/19551:
7068 * symfile-add-flags.h (enum symfile_add_flags)
7069 <SYMFILE_NOT_FILENAME>: New constant.
7070 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7071 objfile name from BFD.
7072 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7073 * minidebug.c (find_separate_debug_file_in_section): Put
7074 ".gnu_debugdata" into BFD's file name.
7075
7076 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7077
7078 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7079 Remove.
7080
7081 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7082
7083 PR binutils/21446
7084 * aarch64-tdep.c (aarch64_analyze_prologue,
7085 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7086 Indicate not interested in errors.
7087
7088 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7089
7090 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7091 Supply the MIPS_ZERO_REGNUM register.
7092
7093 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7094
7095 * mips-tdep.c (mask_address_var): Make variable static.
7096
7097 2018-05-14 Tom Tromey <tom@tromey.com>
7098
7099 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7100
7101 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7102
7103 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7104 FXSAVE_ADDR for the mxcsr register.
7105
7106 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7107
7108 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7109
7110 2018-05-11 Pedro Alves <palves@redhat.com>
7111
7112 * corelow.c (core_target) <core_target>: No longer inline.
7113 Initialize m_core_gdbarch, m_core_vec and build the section table
7114 here.
7115 <~core_target>: New.
7116 <core_gdbarch, get_core_register_section>: New methods.
7117 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7118 factored out from ...
7119 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7120 (core_ops): Delete.
7121 (sniff_core_bfd): Add gdbarch parameter.
7122 (core_close): Delete, merged into ...
7123 (core_target::close): ... here. Delete self.
7124 (core_close_cleanup): Delete.
7125 (core_target_open): Allocate a core_target on the heap. Use a
7126 unique_ptr instead of a cleanup. Bits moved into the core_target
7127 ctor. Adjust to use core_target methods instead of globals.
7128 (get_core_register_section): Rename to ...
7129 (core_target::get_core_register_section): ... this and adjust.
7130 (struct get_core_registers_cb_data): New.
7131 (get_core_registers_cb): Use it. Use bool.
7132 (core_target::fetch_registers, core_target::files_info)
7133 (core_target::xfer_partial, core_target::read_description)
7134 (core_target::pid_to, core_target::thread_name): Adjust to
7135 reference class fields instead of globals.
7136 * target.h (struct target_ops_deleter, target_ops_up): New.
7137
7138 2018-05-11 Pedro Alves <palves@redhat.com>
7139
7140 * corefile.c (core_file_command): Move to corelow.c.
7141 * corelow.c (the_core_target): Delete.
7142 (core_file_command): Moved from corefile.c. Check exec_bfd
7143 instead of the_core_target. Use target_detach instead of calling
7144 into the_core_target directly.
7145 (maybe_say_no_core_file_now): New.
7146 (core_target::detach): Use it.
7147 (_initialize_corelow): Remove references to the_core_target.
7148 * gdbcore.h (the_core_target): Delete.
7149
7150 2018-05-11 Tom Tromey <tromey@redhat.com>
7151 Pedro Alves <palves@redhat.com>
7152
7153 * corefile.c (core_bfd): Remove.
7154 * gdbcore.h (core_bfd): Now a macro.
7155 * progspace.h (struct program_space) <cbfd>: New field.
7156
7157 2018-05-11 Tom Tromey <tom@tromey.com>
7158
7159 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7160 gdb::def_vector.
7161
7162 2018-05-10 Tom Tromey <tom@tromey.com>
7163
7164 * configure: Rebuild.
7165 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7166
7167 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7168
7169 PR server/23158:
7170 * regformats/regdat.sh: Adjust script, following the addition
7171 of the new expedite_regs parameter to init_target_desc.
7172
7173 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7174
7175 PR gdb/23127
7176 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7177 set_gdbarch_significant_addr_bit.
7178 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7179 set_gdbarch_significant_addr_bit.
7180 * utils.c (address_significant): Update to sign extend addr.
7181
7182 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7183
7184 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7185 (xtensa_linux_init_abi): Limit tdep->num_regs by
7186 tdep->num_nopriv_regs.
7187 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7188 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7189 not initialized.
7190
7191 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7192
7193 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7194
7195 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7196
7197 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7198 (I387_MXCSR_INIT_VAL): New constant.
7199 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7200 buffer if it was supplied by the inferior.
7201 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7202 (i387_xsave_get_clear_bv): New function.
7203 (i387_supply_xsave): Only read x87 control registers from the
7204 xsave buffer if the feature is enabled, and the state will have
7205 been written, otherwise, provide a suitable default.
7206 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7207 including x87 control registers. Update control registers if they
7208 have changed from the default value, and mark features as enabled
7209 as required.
7210 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7211
7212 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7213
7214 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7215
7216 2018-05-07 Tom Tromey <tom@tromey.com>
7217
7218 * configure: Rebuild.
7219 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7220
7221 2018-05-07 Tom Tromey <tom@tromey.com>
7222
7223 PR tdep/20362:
7224 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7225 bit. Use correct value for VDIV.
7226
7227 2018-05-04 Tom Tromey <tom@tromey.com>
7228
7229 * configure: Rebuild.
7230 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7231
7232 2018-05-04 Tom Tromey <tom@tromey.com>
7233
7234 * linux-record.c (record_linux_system_call) <case
7235 RECORD_SYS_RECVFROM>: Add "break".
7236
7237 2018-05-04 Tom Tromey <tom@tromey.com>
7238
7239 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7240 Add missing "break".
7241 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7242 Add missing "break".
7243
7244 2018-05-04 Tom Tromey <tom@tromey.com>
7245
7246 * rs6000-tdep.c (ppc_process_record_op4)
7247 (ppc_process_record_op63): Add fall-through comment.
7248
7249 2018-05-04 Tom Tromey <tom@tromey.com>
7250
7251 * i386-tdep.c (i386_process_record): Add fall-through comment.
7252
7253 2018-05-04 Tom Tromey <tom@tromey.com>
7254
7255 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7256 comment.
7257
7258 2018-05-04 Tom Tromey <tom@tromey.com>
7259
7260 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7261 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7262 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7263 comment.
7264 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7265 comment.
7266 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7267 comment.
7268
7269 2018-05-04 Tom Tromey <tom@tromey.com>
7270
7271 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7272
7273 2018-05-04 Tom Tromey <tom@tromey.com>
7274
7275 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7276 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7277 * symfile.c (section_is_mapped): Fix fall-through comment.
7278 * stabsread.c (define_symbol, read_member_functions): Fix
7279 fall-through comment.
7280 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7281 comment.
7282 * remote.c (remote_wait_as): Fix fall-through comment.
7283 * p-exp.y (yylex): Fix fall-through comment.
7284 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7285 comment.
7286 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7287 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7288 * jv-exp.y (yylex): Fix fall-through comment.
7289 * go-exp.y (lex_one_token): Fix fall-through comment.
7290 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7291 fall-through comment.
7292 * f-exp.y (yylex): Fix fall-through comment.
7293 * dwarf2read.c (process_die): Fix fall-through comments.
7294 * dbxread.c (process_one_symbol): Fix fall-through comment.
7295 * d-exp.y (lex_one_token): Fix fall-through comment.
7296 * cp-name-parser.y (yylex): Fix fall-through comment.
7297 * coffread.c (coff_symtab_read): Fix fall-through comment.
7298 * c-exp.y (lex_one_token): Fix fall-through comment.
7299 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7300 comment.
7301 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7302 comment.
7303
7304 2018-05-04 Tom Tromey <tom@tromey.com>
7305
7306 PR python/22730:
7307 * NEWS: Mention gdb.execute change.
7308 * gdbcmd.h (execute_control_command): Don't declare.
7309 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7310 execute_control_commands, execute_control_commands_to_string.
7311 * cli/cli-script.h (execute_control_commands)
7312 (execute_control_commands_to_string): Declare.
7313 (execute_control_command): Add from_tty parameter.
7314 * cli/cli-script.c (execute_control_commands)
7315 (execute_control_commands_to_string): New functions.
7316 (execute_user_command): Use execute_control_commands.
7317 (execute_control_command_1): Add "from_tty" parameter. Update.
7318 (execute_control_command): Likewise.
7319
7320 2018-05-04 Tom Tromey <tom@tromey.com>
7321
7322 PR python/22731:
7323 * NEWS: Mention that breakpoint commands are writable.
7324 * python/py-breakpoint.c (bppy_set_commands): New function.
7325 (breakpoint_object_getset) <"commands">: Use it.
7326
7327 2018-05-04 Tom Tromey <tom@tromey.com>
7328
7329 * tracepoint.c (actions_command): Update.
7330 * mi/mi-cmd-break.c (mi_command_line_array)
7331 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7332 (mi_read_next_line): Remove.
7333 (mi_cmd_break_commands): Update.
7334 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7335 function_view.
7336 * cli/cli-script.c (get_command_line): Update.
7337 (process_next_line): Use function_view. Constify.
7338 (recurse_read_control_structure, read_command_lines)
7339 (read_command_lines_1): Change argument types to function_view.
7340 (do_define_command, document_command): Update.
7341 * breakpoint.h (check_tracepoint_command): Don't declare.
7342 * breakpoint.c (check_tracepoint_command): Remove.
7343 (commands_command_1, create_tracepoint_from_upload): Update.
7344
7345 2018-05-04 Tom Tromey <tom@tromey.com>
7346
7347 PR gdb/11750:
7348 * cli/cli-script.h (enum command_control_type) <define_control>:
7349 New constant.
7350 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7351 (build_command_line, execute_control_command_1)
7352 (process_next_line): Likewise.
7353 (do_define_command): New function, extracted from define_command.
7354 (define_command): Use it.
7355
7356 2018-05-04 Tom Tromey <tom@tromey.com>
7357
7358 * tracepoint.c (actions_command): Update.
7359 * cli/cli-script.h (read_command_lines): Update.
7360 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7361 (MAX_TMPBUF): Remove define.
7362 (define_command): Use string_printf.
7363 (document_command): Likewise.
7364 * breakpoint.c (commands_command_1): Update.
7365
7366 2018-05-04 Tom Tromey <tom@tromey.com>
7367
7368 * top.c (execute_command): Update.
7369 * cli/cli-script.h (print_command_lines): Now varargs.
7370 * cli/cli-script.c (print_command_lines): Now varargs.
7371 (execute_control_command_1) <case while_control, case if_control>:
7372 Update.
7373
7374 2018-05-04 Tom Tromey <tom@tromey.com>
7375
7376 * tracepoint.c (all_tracepoint_actions): Rename from
7377 all_tracepoint_actions_and_cleanup. Change return type.
7378 (actions_command, encode_actions_1, encode_actions)
7379 (trace_dump_actions, tdump_command): Update.
7380 * remote.c (remote_download_command_source): Update.
7381 * python/python.c (gdbpy_eval_from_control_command)
7382 (python_command, python_interactive_command): Update.
7383 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7384 * guile/guile.c (guile_command)
7385 (gdbscm_eval_from_control_command, guile_command): Update.
7386 * compile/compile.c (compile_code_command)
7387 (compile_print_command, compile_to_object): Update.
7388 * cli/cli-script.h (struct command_lines_deleter): New.
7389 (counted_command_line): New typedef.
7390 (struct command_line): Add constructor, destructor.
7391 <body_list>: Remove.
7392 <body_list_0, body_list_1>: New members.
7393 (command_line_up): Remove typedef.
7394 (read_command_lines, read_command_lines_1, get_command_line):
7395 Update.
7396 (copy_command_lines): Don't declare.
7397 * cli/cli-script.c (build_command_line): Use "new".
7398 (get_command_line): Return counted_command_line.
7399 (print_command_lines, execute_user_command)
7400 (execute_control_command_1, while_command, if_command): Update.
7401 (realloc_body_list): Remove.
7402 (process_next_line, recurse_read_control_structure): Update.
7403 (read_command_lines, read_command_lines_1): Return counted_command_line.
7404 (free_command_lines): Use "delete".
7405 (copy_command_lines): Remove.
7406 (define_command, document_command, show_user_1): Update.
7407 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7408 a counted_command_line.
7409 * breakpoint.h (counted_command_line): Remove typedef.
7410 (breakpoint_set_commands): Update.
7411 * breakpoint.c (check_no_tracepoint_commands)
7412 (validate_commands_for_breakpoint): Update.
7413 (breakpoint_set_commands): Change commands to be a
7414 counted_command_line.
7415 (commands_command_1, update_dprintf_command_list)
7416 (create_tracepoint_from_upload): Update.
7417
7418 2018-05-04 Tom Tromey <tom@tromey.com>
7419
7420 * cli/cli-decode.h (cmd_list_element): New constructor.
7421 (~cmd_list_element): New destructor.
7422 (struct cmd_list_element): Add initializers.
7423 * cli/cli-decode.c (do_add_cmd): Use "new".
7424 (delete_cmd): Use "delete".
7425
7426 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7427 Pedro Alves <palves@redhat.com>
7428
7429 PR breakpoints/19806 and support for PR external/20207.
7430 * NEWS: Mention Aarch64 watchpoint improvements.
7431 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7432 watchpoints and PR external/20207 watchpoints.
7433 * nat/aarch64-linux-hw-point.c
7434 (kernel_supports_any_contiguous_range): New.
7435 (aarch64_watchpoint_offset): New.
7436 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7437 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7438 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7439 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7440 next_addr_orig_p. Support PR external/20207 watchpoints.
7441 (aarch64_downgrade_regs): New.
7442 (aarch64_dr_state_insert_one_point): New parameters offset and
7443 addr_orig.
7444 (aarch64_dr_state_remove_one_point): Likewise.
7445 (aarch64_handle_breakpoint): Update caller.
7446 (aarch64_handle_aligned_watchpoint): Likewise.
7447 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7448 aligned_offset.
7449 (aarch64_linux_set_debug_regs): Remove const from state. Call
7450 aarch64_downgrade_regs.
7451 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7452 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7453 (DR_CONTROL_MASK): ... this.
7454 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7455 (unsigned int aarch64_watchpoint_offset): New prototype.
7456 (aarch64_linux_set_debug_regs): Remove const from state.
7457 * utils.c (align_up, align_down): Move to ...
7458 * common/common-utils.c (align_up, align_down): ... here.
7459 * utils.h (align_up, align_down): Move to ...
7460 * common/common-utils.h (align_up, align_down): ... here.
7461
7462 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7463
7464 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7465 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7466 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7467 Re-implement to match the ABI as summarized in GCC's
7468 gcc/config/sparc/sparc.c. All callers updated.
7469 (sparc32_store_arguments): Remove assertion.
7470
7471 2018-05-04 Tom Tromey <tom@tromey.com>
7472
7473 * printcmd.c: Don't include tui.h.
7474 (decode_format): Use skip_spaces.
7475
7476 2018-05-04 Tom Tromey <tom@tromey.com>
7477
7478 PR gdb/22619:
7479 * printcmd.c (last_count): New global.
7480 (x_command): Use saved count when repeating.
7481
7482 2018-05-04 Tom Tromey <tom@tromey.com>
7483
7484 * nto-procfs.c (do_closedir_cleanup): Remove.
7485 (procfs_pidlist): Use gdb_dir_up.
7486 * procfs.c (do_closedir_cleanup): Remove.
7487 (proc_update_threads): Use gdb_dir_up.
7488 * common/filestuff.h (struct gdb_dir_deleter): New.
7489 (gdb_dir_up): New typedef.
7490
7491 2018-05-04 Tom Tromey <tom@tromey.com>
7492
7493 * ada-lang.c (print_mention_exception): Use std::string.
7494
7495 2018-05-04 Tom Tromey <tom@tromey.com>
7496
7497 * ada-lang.c (create_excep_cond_exprs): Update.
7498 (ada_exception_catchpoint_cond_string): Use std::string.
7499
7500 2018-05-04 Tom Tromey <tom@tromey.com>
7501
7502 * ada-lang.c (xget_renaming_scope): Return std::string.
7503 (old_renaming_is_invisible): Update.
7504
7505 2018-05-04 Tom Tromey <tom@tromey.com>
7506
7507 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7508 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7509
7510 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7511
7512 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7513
7514 2018-05-04 Tom Tromey <tom@tromey.com>
7515
7516 * remote.c (remote_query_supported_append): Change type.
7517 (remote_check_symbols): Update.
7518
7519 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7520
7521 PR gdb/11420
7522 * configure.ac: Prepend libpython.
7523 * python/python-config.py: Likewise.
7524 * configure: Regenerate.
7525
7526 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7527
7528 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7529
7530 2018-05-03 Pedro Alves <palves@redhat.com>
7531
7532 * s390-linux-nat.c
7533 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7534 override. Write 'true' instead of '1'.
7535 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7536 declaration.
7537
7538 2018-05-02 Pedro Alves <palves@redhat.com>
7539
7540 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7541 add_inf_child_target.
7542 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7543 add_inf_child_target.
7544 * aix-thread.c (aix_thread_target_info): New.
7545 (aix_thread_target) <shortname, longname, doc>: Delete.
7546 <info>: New.
7547 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7548 add_inf_child_target.
7549 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7550 add_inf_child_target.
7551 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7552 add_inf_child_target.
7553 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7554 add_inf_child_target.
7555 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7556 add_inf_child_target.
7557 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7558 add_inf_child_target.
7559 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7560 add_inf_child_target.
7561 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7562 add_inf_child_target.
7563 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7564 add_inf_child_target.
7565 * bfd-target.c (target_bfd_target_info): New.
7566 (target_bfd) <shortname, longname, doc>: Delete.
7567 <info>: New.
7568 * bsd-kvm.c (bsd_kvm_target_info): New.
7569 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7570 <info>: New.
7571 (bsd_kvm_target::open): Rename to ...
7572 (bsd_kvm_target_open): ... this. Adjust.
7573 * bsd-uthread.c (bsd_uthread_target_info): New.
7574 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7575 <info>: New.
7576 * corefile.c (core_file_command): Adjust.
7577 * corelow.c (core_target_info): New.
7578 (core_target) <shortname, longname, doc>: Delete.
7579 <info>: New.
7580 (core_target::open): Rename to ...
7581 (core_target_open): ... this. Adjust.
7582 * ctf.c (ctf_target_info): New.
7583 (ctf_target) <shortname, longname, doc>: Delete.
7584 <info>: New.
7585 (ctf_target::open): Rename to ...
7586 (ctf_target_open): ... this.
7587 (_initialize_ctf): Adjust.
7588 * exec.c (exec_target_info): New.
7589 (exec_target) <shortname, longname, doc>: Delete.
7590 <info>: New.
7591 (exec_target::open): Rename to ...
7592 (exec_target_open): ... this.
7593 * gdbcore.h (core_target_open): Declare.
7594 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7595 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7596 add_inf_child_target.
7597 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7598 add_inf_child_target.
7599 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7600 add_inf_child_target.
7601 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7602 add_inf_child_target.
7603 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7604 add_inf_child_target.
7605 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7606 add_inf_child_target.
7607 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7608 add_inf_child_target.
7609 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7610 add_inf_child_target.
7611 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7612 add_inf_child_target.
7613 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7614 add_inf_child_target.
7615 * inf-child.c (inf_child_target_info): New.
7616 (inf_child_target::info): New.
7617 (inf_child_open_target): Remove 'target' parameter. Use
7618 get_native_target instead.
7619 (inf_child_target::open): Delete.
7620 (add_inf_child_target): New.
7621 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7622 Delete.
7623 <info>: New.
7624 (add_inf_child_target): Declare.
7625 (inf_child_open_target): Declare.
7626 * linux-thread-db.c (thread_db_target_info): New.
7627 (thread_db_target) <shortname, longname, doc>: Delete.
7628 <info>: New.
7629 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7630 add_inf_child_target.
7631 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7632 add_inf_child_target.
7633 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7634 add_inf_child_target.
7635 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7636 add_inf_child_target.
7637 * make-target-delegates (print_class): Adjust.
7638 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7639 add_inf_child_target.
7640 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7641 add_inf_child_target.
7642 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7643 add_inf_child_target.
7644 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7645 add_inf_child_target.
7646 * nto-procfs.c (nto_native_target_info): New.
7647 (nto_procfs_target_native) <shortname, longname, doc>:
7648 Delete.
7649 <info>: New.
7650 (nto_procfs_target_info): New.
7651 (nto_procfs_target_procfs) <shortname, longname, doc>:
7652 Delete.
7653 <info>: New.
7654 (init_procfs_targets): Adjust.
7655 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7656 add_inf_child_target.
7657 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7658 add_inf_child_target.
7659 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7660 add_inf_child_target.
7661 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7662 add_inf_child_target.
7663 * ravenscar-thread.c (ravenscar_target_info): New.
7664 (ravenscar_thread_target) <shortname, longname, doc>:
7665 Delete.
7666 <info>: New.
7667 * record-btrace.c (record_btrace_target_info):
7668 (record_btrace_target) <shortname, longname, doc>: Delete.
7669 <info>: New.
7670 (record_btrace_target::open): Rename to ...
7671 (record_btrace_target_open): ... this. Adjust.
7672 * record-full.c (record_longname, record_doc): New.
7673 (record_full_base_target) <shortname, longname, doc>: Delete.
7674 <info>: New.
7675 (record_full_target_info): New.
7676 (record_full_target): <shortname>: Delete.
7677 <info>: New.
7678 (record_full_core_open_1, record_full_open_1): Update comments.
7679 (record_full_base_target::open): Rename to ...
7680 (record_full_open): ... this.
7681 (cmd_record_full_restore): Update.
7682 (_initialize_record_full): Update.
7683 * remote-sim.c (remote_sim_target_info): New.
7684 (gdbsim_target) <shortname, longname, doc>: Delete.
7685 <info>: New.
7686 (gdbsim_target::open): Rename to ...
7687 (gdbsim_target_open): ... this.
7688 (_initialize_remote_sim): Adjust.
7689 * remote.c (remote_doc): New.
7690 (remote_target_info): New.
7691 (remote_target) <shortname, longname, doc>: Delete.
7692 <info>: New.
7693 (extended_remote_target_info): New.
7694 (extended_remote_target) <shortname, longname, doc>: Delete.
7695 <info>: New.
7696 (remote_target::open_1): Make static. Adjust.
7697 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7698 * s390-linux-nat.c (_initialize_s390_nat): Use
7699 add_inf_child_target.
7700 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7701 add_inf_child_target.
7702 * sol-thread.c (thread_db_target_info): New.
7703 (sol_thread_target) <shortname, longname, doc>: Delete.
7704 <info>: New.
7705 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7706 add_inf_child_target.
7707 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7708 add_inf_child_target.
7709 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7710 add_inf_child_target.
7711 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7712 add_inf_child_target.
7713 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7714 add_inf_child_target.
7715 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7716 add_inf_child_target.
7717 * spu-linux-nat.c (_initialize_spu_nat): Use
7718 add_inf_child_target.
7719 * spu-multiarch.c (spu_multiarch_target_info): New.
7720 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7721 <info>: New.
7722 * target-delegates.c: Regenerate.
7723 * target.c: Include <unordered_map>.
7724 (target_ops_p): Delete.
7725 (DEF_VEC_P(target_ops_p)): Delete.
7726 (target_factories): New.
7727 (test_target_info): New.
7728 (test_target_ops::info): New.
7729 (open_target): Adjust to use target_factories.
7730 (add_target_with_completer): Rename to ...
7731 (add_target): ... this. Change prototype. Register target_info
7732 and open callback in target_factories. Register target_info in
7733 command context instead of target_ops.
7734 (add_target): Delete old implementation.
7735 (add_deprecated_target_alias): Change prototype. Adjust.
7736 (the_native_target): New.
7737 (set_native_target, get_native_target): New.
7738 (find_default_run_target): Use the_native_target.
7739 (find_attach_target, find_run_target): Simplify.
7740 (target_ops::open): Delete.
7741 (dummy_target_info): New.
7742 (dummy_target::shortname, dummy_target::longname)
7743 (dummy_target::doc): Delete.
7744 (dummy_target::info): New.
7745 (debug_target::shortname, debug_target::longname)
7746 (debug_target::doc): Delete.
7747 (debug_target::info): New.
7748 * target.h (struct target_info): New.
7749 (target_ops::~target_ops): Add comment.
7750 (target_ops::info): New.
7751 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7752 longer virtual. Implement in terms of target_info.
7753 (set_native_target, get_native_target): Declare.
7754 (target_open_ftype): New.
7755 (add_target, add_target_with_completer)
7756 (add_deprecated_target_alias): Change prototype.
7757 (test_target) <shortname, longname, doc>: Delete.
7758 <info>: New.
7759 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7760 add_inf_child_target.
7761 * tracefile-tfile.c (tfile_target_info): New.
7762 (tfile_target) <shortname, longname, doc>: Delete.
7763 <info>: New.
7764 (tfile_target::open): Rename to ...
7765 (tfile_target_open): ... this.
7766 (_initialize_tracefile_tfile): Adjust.
7767 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7768 add_inf_child_target.
7769 * windows-nat.c (_initialize_windows_nat): Use
7770 add_inf_child_target.
7771 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7772 add_inf_child_target.
7773
7774 2018-05-02 Pedro Alves <palves@redhat.com>
7775
7776 * linux-nat.h (linux_nat_target) <low_new_thread,
7777 low_delete_thread, low_new_fork, low_forget_process,
7778 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7779 New virtual methods.
7780 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7781 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7782 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7783 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7784 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7785 Delete.
7786 * linux-fork.c (delete_fork): Adjust to call low method.
7787 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7788 (linux_nat_new_fork, linux_nat_forget_process_hook)
7789 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7790 (linux_nat_status_is_event):
7791 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7792 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7793 to call low method.
7794 (sigtrap_is_event): Rename to ...
7795 (linux_nat_target::low_status_is_event): ... this.
7796 (linux_nat_set_status_is_event): Delete.
7797 (save_stop_reason, linux_nat_wait_1)
7798 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7799 low methods.
7800 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7801 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7802 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7803 (linux_nat_set_prepare_to_resume): Delete.
7804 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7805 low virtual methods.
7806 * amd64-linux-nat.c: Likewise.
7807 * arm-linux-nat.c: Likewise.
7808 * i386-linux-nat.c: Likewise.
7809 * ia64-linux-nat.c: Likewise.
7810 * mips-linux-nat.c: Likewise.
7811 * ppc-linux-nat.c: Likewise.
7812 * s390-linux-nat.c: Likewise.
7813 * sparc64-linux-nat.c: Likewise.
7814 * x86-linux-nat.c: Likewise.
7815 * x86-linux-nat.h: Include "nat/x86-linux.h".
7816 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7817 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7818 Override methods.
7819
7820 2018-05-02 Pedro Alves <palves@redhat.com>
7821
7822 * target.h (target_ops)
7823 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7824 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7825 stopped_by_watchpoint, have_continuable_watchpoint,
7826 stopped_data_address, watchpoint_addr_within_range,
7827 can_accel_watchpoint_condition, can_run, thread_alive,
7828 has_all_memory, has_memory, has_stack, has_registers,
7829 has_execution, can_async_p, is_async_p, supports_non_stop,
7830 always_non_stop_p, can_execute_reverse, supports_multi_process,
7831 supports_enable_disable_tracepoint,
7832 supports_disable_randomization, supports_string_tracing,
7833 supports_evaluation_of_breakpoint_conditions,
7834 can_run_breakpoint_commands, filesystem_is_local,
7835 can_download_tracepoint, get_trace_state_variable_value,
7836 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7837 record_is_replaying, record_will_replay,
7838 augmented_libraries_svr4_read>: Adjust to return bool.
7839 * aarch64-linux-nat.c: All implementations adjusted.
7840 * aix-thread.c: All implementations adjusted.
7841 * arm-linux-nat.c: All implementations adjusted.
7842 * breakpoint.c: All implementations adjusted.
7843 * bsd-kvm.c: All implementations adjusted.
7844 * bsd-uthread.c: All implementations adjusted.
7845 * corelow.c: All implementations adjusted.
7846 * ctf.c: All implementations adjusted.
7847 * darwin-nat.c: All implementations adjusted.
7848 * darwin-nat.h: All implementations adjusted.
7849 * exec.c: All implementations adjusted.
7850 * fbsd-nat.c: All implementations adjusted.
7851 * fbsd-nat.h: All implementations adjusted.
7852 * gnu-nat.c: All implementations adjusted.
7853 * gnu-nat.h: All implementations adjusted.
7854 * go32-nat.c: All implementations adjusted.
7855 * ia64-linux-nat.c: All implementations adjusted.
7856 * inf-child.c: All implementations adjusted.
7857 * inf-child.h: All implementations adjusted.
7858 * inf-ptrace.c: All implementations adjusted.
7859 * inf-ptrace.h: All implementations adjusted.
7860 * linux-nat.c: All implementations adjusted.
7861 * linux-nat.h: All implementations adjusted.
7862 * mips-linux-nat.c: All implementations adjusted.
7863 * nto-procfs.c: All implementations adjusted.
7864 * ppc-linux-nat.c: All implementations adjusted.
7865 * procfs.c: All implementations adjusted.
7866 * ravenscar-thread.c: All implementations adjusted.
7867 * record-btrace.c: All implementations adjusted.
7868 * record-full.c: All implementations adjusted.
7869 * remote-sim.c: All implementations adjusted.
7870 * remote.c: All implementations adjusted.
7871 * s390-linux-nat.c: All implementations adjusted.
7872 * sol-thread.c: All implementations adjusted.
7873 * spu-multiarch.c: All implementations adjusted.
7874 * target-delegates.c: All implementations adjusted.
7875 * target.c: All implementations adjusted.
7876 * target.h: All implementations adjusted.
7877 * tracefile-tfile.c: All implementations adjusted.
7878 * tracefile.c: All implementations adjusted.
7879 * tracefile.h: All implementations adjusted.
7880 * windows-nat.c: All implementations adjusted.
7881 * x86-linux-nat.h: All implementations adjusted.
7882 * x86-nat.h: All implementations adjusted.
7883
7884 2018-05-02 Pedro Alves <palves@redhat.com>
7885
7886 * make-target-delegates (scan_target_h): Don't trim lines here.
7887 Replace sequences of tabs and/or whitespace with a single
7888 whitespace.
7889 (top level, parsing methods): Trim each line before processing it
7890 here.
7891
7892 2018-05-02 Pedro Alves <palves@redhat.com>
7893 John Baldwin <jhb@freebsd.org>
7894
7895 * target.h (enum strata) <debug_stratum>: New.
7896 (struct target_ops) <all delegation methods>: Replace by C++
7897 virtual methods, and drop "to_" prefix. All references updated
7898 throughout.
7899 <to_shortname, to_longname, to_doc, to_data,
7900 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7901 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7902 virtual methods. All references updated throughout.
7903 <can_attach, supports_terminal_ours, can_create_inferior,
7904 get_thread_control_capabilities, attach_no_wait>: New
7905 virtual methods.
7906 <insert_breakpoint, remove_breakpoint>: Now
7907 TARGET_DEFAULT_NORETURN methods.
7908 <info_proc>: Now returns bool.
7909 <to_magic>: Delete.
7910 (OPS_MAGIC): Delete.
7911 (current_target): Delete. All references replaced by references
7912 to ...
7913 (target_stack): ... this. New.
7914 (target_shortname, target_longname): Adjust.
7915 (target_can_run): Now a function declaration.
7916 (default_child_has_all_memory, default_child_has_memory)
7917 (default_child_has_stack, default_child_has_registers)
7918 (default_child_has_execution): Remove target_ops parameter.
7919 (complete_target_initialization): Delete.
7920 (memory_breakpoint_target): New template class.
7921 (test_target_ops): Refactor as a C++ class with virtual methods.
7922 * make-target-delegates (NAME_PART): Tighten.
7923 (POINTER_PART, CP_SYMBOL): New.
7924 (SIMPLE_RETURN_PART): Reimplement.
7925 (VEC_RETURN_PART): Expect less.
7926 (RETURN_PART, VIRTUAL_PART): New.
7927 (METHOD): Adjust to C++ virtual methods.
7928 (scan_target_h): Remove reference to C99.
7929 (dname): Output "target_ops::" prefix.
7930 (write_function_header): Adjust to output a C++ class method.
7931 (write_declaration): New.
7932 (write_delegator): Adjust to output a C++ class method.
7933 (tdname): Output "dummy_target::" prefix.
7934 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7935 method.
7936 (tdefault_names, debug_names): Delete.
7937 (return_types, tdefaults, styles, argtypes_array): New.
7938 (top level): All methods are delegators.
7939 (print_class): New.
7940 (top level): Print dummy_target and debug_target classes.
7941 * target-delegates.c: Regenerate.
7942 * target-debug.h (target_debug_print_enum_info_proc_what)
7943 (target_debug_print_thread_control_capabilities)
7944 (target_debug_print_thread_info_p): New.
7945 * target.c (dummy_target): Delete.
7946 (the_dummy_target, the_debug_target): New.
7947 (target_stack): Now extern.
7948 (set_targetdebug): Push/unpush debug target.
7949 (default_child_has_all_memory, default_child_has_memory)
7950 (default_child_has_stack, default_child_has_registers)
7951 (default_child_has_execution): Remove target_ops parameter.
7952 (complete_target_initialization): Delete.
7953 (add_target_with_completer): No longer call
7954 complete_target_initialization.
7955 (target_supports_terminal_ours): Use regular delegation.
7956 (update_current_target): Delete.
7957 (push_target): No longer check magic number. Don't call
7958 update_current_target.
7959 (unpush_target): Don't call update_current_target.
7960 (target_is_pushed): No longer check magic number.
7961 (target_require_runnable): Skip for all stratums over
7962 process_stratum.
7963 (target_ops::info_proc): New.
7964 (target_info_proc): Use find_target_at and
7965 find_default_run_target.
7966 (target_supports_disable_randomization): Use regular delegation.
7967 (target_get_osdata): Use find_target_at.
7968 (target_ops::open, target_ops::close, target_ops::can_attach)
7969 (target_ops::attach, target_ops::can_create_inferior)
7970 (target_ops::create_inferior, target_ops::can_run)
7971 (target_can_run): New.
7972 (default_fileio_target): Use regular delegation.
7973 (target_ops::fileio_open, target_ops::fileio_pwrite)
7974 (target_ops::fileio_pread, target_ops::fileio_fstat)
7975 (target_ops::fileio_close, target_ops::fileio_unlink)
7976 (target_ops::fileio_readlink): New.
7977 (target_fileio_open_1, target_fileio_unlink)
7978 (target_fileio_readlink): Always call the target method. Handle
7979 FILEIO_ENOSYS.
7980 (return_zero, return_zero_has_execution): Delete.
7981 (init_dummy_target): Delete.
7982 (dummy_target::dummy_target, dummy_target::shortname)
7983 (dummy_target::longname, dummy_target::doc)
7984 (debug_target::debug_target, debug_target::shortname)
7985 (debug_target::longname, debug_target::doc): New.
7986 (target_supports_delete_record): Use regular delegation.
7987 (setup_target_debug): Delete.
7988 (maintenance_print_target_stack): Skip debug_stratum.
7989 (initialize_targets): Instantiate the_dummy_target and
7990 the_debug_target.
7991 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7992 use target_stack.
7993 (target_auxv_search, fprint_target_auxv): Adjust.
7994 (info_auxv_command): Adjust to use target_stack.
7995 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7996 * exceptions.c (print_flush): Handle a NULL target_stack.
7997 * regcache.c (target_ops_no_register): Refactor as class with
7998 virtual methods.
7999
8000 * exec.c (exec_target): New class.
8001 (exec_ops): Now an exec_target.
8002 (exec_open, exec_close_1, exec_get_section_table)
8003 (exec_xfer_partial, exec_files_info, exec_has_memory)
8004 (exec_make_note_section): Refactor as exec_target methods.
8005 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8006 Delete.
8007 (exec_target::find_memory_regions): New.
8008 (_initialize_exec): Don't call init_exec_ops.
8009 * gdbcore.h (exec_file_clear): Delete.
8010
8011 * corefile.c (core_target): Delete.
8012 (core_file_command): Adjust.
8013 * corelow.c (core_target): New class.
8014 (the_core_target): New.
8015 (core_close): Remove target_ops parameter.
8016 (core_close_cleanup): Adjust.
8017 (core_target::close): New.
8018 (core_open, core_detach, get_core_registers, core_files_info)
8019 (core_xfer_partial, core_thread_alive, core_read_description)
8020 (core_pid_to_str, core_thread_name, core_has_memory)
8021 (core_has_stack, core_has_registers, core_info_proc): Rework as
8022 core_target methods.
8023 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8024 (_initialize_corelow): Initialize the_core_target.
8025 * gdbcore.h (core_target): Delete.
8026 (the_core_target): New.
8027
8028 * ctf.c: (ctf_target): New class.
8029 (ctf_ops): Now a ctf_target.
8030 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8031 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8032 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8033 methods.
8034 (init_ctf_ops): Delete.
8035 (_initialize_ctf): Don't call it.
8036 * tracefile-tfile.c (tfile_target): New class.
8037 (tfile_ops): Now a tfile_target.
8038 (tfile_open, tfile_close, tfile_files_info)
8039 (tfile_get_tracepoint_status, tfile_trace_find)
8040 (tfile_fetch_registers, tfile_xfer_partial)
8041 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8042 Refactor as tfile_target methods.
8043 (tfile_xfer_partial_features): Remove target_ops parameter.
8044 (init_tfile_ops): Delete.
8045 (_initialize_tracefile_tfile): Don't call it.
8046 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8047 (tracefile_has_stack, tracefile_has_registers)
8048 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8049 tracefile_target methods.
8050 (init_tracefile_ops): Delete.
8051 (tracefile_target::tracefile_target): New.
8052 * tracefile.h: Include "target.h".
8053 (tracefile_target): New class.
8054 (init_tracefile_ops): Delete.
8055
8056 * spu-multiarch.c (spu_multiarch_target): New class.
8057 (spu_ops): Now a spu_multiarch_target.
8058 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8059 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8060 (spu_search_memory, spu_mourn_inferior): Refactor as
8061 spu_multiarch_target methods.
8062 (init_spu_ops): Delete.
8063 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8064 complete_target_initialization.
8065
8066 * ravenscar-thread.c (ravenscar_thread_target): New class.
8067 (ravenscar_ops): Now a ravenscar_thread_target.
8068 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8069 (ravenscar_thread_alive, ravenscar_pid_to_str)
8070 (ravenscar_fetch_registers, ravenscar_store_registers)
8071 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8072 (ravenscar_stopped_by_hw_breakpoint)
8073 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8074 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8075 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8076 methods.
8077 (init_ravenscar_thread_ops): Delete.
8078 (_initialize_ravenscar): Remove references to
8079 init_ravenscar_thread_ops and complete_target_initialization.
8080
8081 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8082 (bsd_uthread_target): New class.
8083 (bsd_uthread_ops): Now a bsd_uthread_target.
8084 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8085 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8086 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8087 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8088 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8089 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8090 (bsd_uthread_target): Delete function.
8091 (_initialize_bsd_uthread): Remove reference to
8092 complete_target_initialization.
8093
8094 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8095 (target_bfd): ... this new class.
8096 (target_bfd_xfer_partial, target_bfd_get_section_table)
8097 (target_bfd_close): Refactor as target_bfd methods.
8098 (target_bfd::~target_bfd): New.
8099 (target_bfd_reopen): Adjust.
8100 (target_bfd::close): New.
8101
8102 * record-btrace.c (record_btrace_target): New class.
8103 (record_btrace_ops): Now a record_btrace_target.
8104 (record_btrace_open, record_btrace_stop_recording)
8105 (record_btrace_disconnect, record_btrace_close)
8106 (record_btrace_async, record_btrace_info)
8107 (record_btrace_insn_history, record_btrace_insn_history_range)
8108 (record_btrace_insn_history_from, record_btrace_call_history)
8109 (record_btrace_call_history_range)
8110 (record_btrace_call_history_from, record_btrace_record_method)
8111 (record_btrace_is_replaying, record_btrace_will_replay)
8112 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8113 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8114 (record_btrace_store_registers, record_btrace_prepare_to_store)
8115 (record_btrace_to_get_unwinder)
8116 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8117 (record_btrace_commit_resume, record_btrace_wait)
8118 (record_btrace_stop, record_btrace_can_execute_reverse)
8119 (record_btrace_stopped_by_sw_breakpoint)
8120 (record_btrace_supports_stopped_by_sw_breakpoint)
8121 (record_btrace_stopped_by_hw_breakpoint)
8122 (record_btrace_supports_stopped_by_hw_breakpoint)
8123 (record_btrace_update_thread_list, record_btrace_thread_alive)
8124 (record_btrace_goto_begin, record_btrace_goto_end)
8125 (record_btrace_goto, record_btrace_stop_replaying_all)
8126 (record_btrace_execution_direction)
8127 (record_btrace_prepare_to_generate_core)
8128 (record_btrace_done_generating_core): Refactor as
8129 record_btrace_target methods.
8130 (init_record_btrace_ops): Delete.
8131 (_initialize_record_btrace): Remove reference to
8132 init_record_btrace_ops.
8133 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8134 the execution_direction global.
8135 (record_full_base_target, record_full_target)
8136 (record_full_core_target): New classes.
8137 (record_full_ops): Now a record_full_target.
8138 (record_full_core_ops): Now a record_full_core_target.
8139 (record_full_target::detach, record_full_target::disconnect)
8140 (record_full_core_target::disconnect)
8141 (record_full_target::mourn_inferior, record_full_target::kill):
8142 New.
8143 (record_full_open, record_full_close, record_full_async): Refactor
8144 as methods of the record_full_base_target class.
8145 (record_full_resume, record_full_commit_resume): Refactor
8146 as methods of the record_full_target class.
8147 (record_full_wait, record_full_stopped_by_watchpoint)
8148 (record_full_stopped_data_address)
8149 (record_full_stopped_by_sw_breakpoint)
8150 (record_full_supports_stopped_by_sw_breakpoint)
8151 (record_full_stopped_by_hw_breakpoint)
8152 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8153 methods of the record_full_base_target class.
8154 (record_full_store_registers, record_full_xfer_partial)
8155 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8156 Refactor as methods of the record_full_target class.
8157 (record_full_can_execute_reverse, record_full_get_bookmark)
8158 (record_full_goto_bookmark, record_full_execution_direction)
8159 (record_full_record_method, record_full_info, record_full_delete)
8160 (record_full_is_replaying, record_full_will_replay)
8161 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8162 (record_full_stop_replaying): Refactor as methods of the
8163 record_full_base_target class.
8164 (record_full_core_resume, record_full_core_kill)
8165 (record_full_core_fetch_registers)
8166 (record_full_core_prepare_to_store)
8167 (record_full_core_store_registers, record_full_core_xfer_partial)
8168 (record_full_core_insert_breakpoint)
8169 (record_full_core_remove_breakpoint)
8170 (record_full_core_has_execution): Refactor
8171 as methods of the record_full_core_target class.
8172 (record_full_base_target::supports_delete_record): New.
8173 (init_record_full_ops): Delete.
8174 (init_record_full_core_ops): Delete.
8175 (record_full_save): Refactor as method of the
8176 record_full_base_target class.
8177 (_initialize_record_full): Remove references to
8178 init_record_full_ops and init_record_full_core_ops.
8179
8180 * remote.c (remote_target, extended_remote_target): New classes.
8181 (remote_ops): Now a remote_target.
8182 (extended_remote_ops): Now an extended_remote_target.
8183 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8184 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8185 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8186 (remote_pass_signals, remote_set_syscall_catchpoint)
8187 (remote_program_signals, )
8188 (remote_thread_always_alive): Remove target_ops parameter.
8189 (remote_thread_alive, remote_thread_name)
8190 (remote_update_thread_list, remote_threads_extra_info)
8191 (remote_static_tracepoint_marker_at)
8192 (remote_static_tracepoint_markers_by_strid)
8193 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8194 (remote_open): Refactor as methods of remote_target.
8195 (extended_remote_open, extended_remote_detach)
8196 (extended_remote_attach, extended_remote_post_attach):
8197 (extended_remote_supports_disable_randomization)
8198 (extended_remote_create_inferior): : Refactor as method of
8199 extended_remote_target.
8200 (remote_set_permissions, remote_open_1, remote_detach)
8201 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8202 (remote_resume, remote_commit_resume, remote_stop)
8203 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8204 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8205 (remote_prepare_to_store, remote_store_registers)
8206 (remote_flash_erase, remote_flash_done, remote_files_info)
8207 (remote_kill, remote_mourn, remote_insert_breakpoint)
8208 (remote_remove_breakpoint, remote_insert_watchpoint)
8209 (remote_watchpoint_addr_within_range)
8210 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8211 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8212 (remote_supports_stopped_by_sw_breakpoint)
8213 (remote_stopped_by_hw_breakpoint)
8214 (remote_supports_stopped_by_hw_breakpoint)
8215 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8216 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8217 (remote_verify_memory): Refactor as methods of remote_target.
8218 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8219 parameter.
8220 (remote_xfer_partial, remote_get_memory_xfer_limit)
8221 (remote_search_memory, remote_rcmd, remote_memory_map)
8222 (remote_pid_to_str, remote_get_thread_local_address)
8223 (remote_get_tib_address, remote_read_description): Refactor as
8224 methods of remote_target.
8225 (remote_target::fileio_open, remote_target::fileio_pwrite)
8226 (remote_target::fileio_pread, remote_target::fileio_close): New.
8227 (remote_hostio_readlink, remote_hostio_fstat)
8228 (remote_filesystem_is_local, remote_can_execute_reverse)
8229 (remote_supports_non_stop, remote_supports_disable_randomization)
8230 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8231 (remote_supports_enable_disable_tracepoint)
8232 (remote_supports_string_tracing)
8233 (remote_can_run_breakpoint_commands, remote_trace_init)
8234 (remote_download_tracepoint, remote_can_download_tracepoint)
8235 (remote_download_trace_state_variable, remote_enable_tracepoint)
8236 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8237 (remote_trace_start, remote_get_trace_status)
8238 (remote_get_tracepoint_status, remote_trace_stop)
8239 (remote_trace_find, remote_get_trace_state_variable_value)
8240 (remote_save_trace_data, remote_get_raw_trace_data)
8241 (remote_set_disconnected_tracing, remote_core_of_thread)
8242 (remote_set_circular_trace_buffer, remote_traceframe_info)
8243 (remote_get_min_fast_tracepoint_insn_len)
8244 (remote_set_trace_buffer_size, remote_set_trace_notes)
8245 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8246 (remote_disable_btrace, remote_teardown_btrace)
8247 (remote_read_btrace, remote_btrace_conf)
8248 (remote_augmented_libraries_svr4_read, remote_load)
8249 (remote_pid_to_exec_file, remote_can_do_single_step)
8250 (remote_execution_direction, remote_thread_handle_to_thread_info):
8251 Refactor as methods of remote_target.
8252 (init_remote_ops, init_extended_remote_ops): Delete.
8253 (remote_can_async_p, remote_is_async_p, remote_async)
8254 (remote_thread_events, remote_upload_tracepoints)
8255 (remote_upload_trace_state_variables): Refactor as methods of
8256 remote_target.
8257 (_initialize_remote): Remove references to init_remote_ops and
8258 init_extended_remote_ops.
8259
8260 * remote-sim.c (gdbsim_target): New class.
8261 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8262 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8263 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8264 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8265 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8266 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8267 Refactor as methods of gdbsim_target.
8268 (gdbsim_ops): Now a gdbsim_target.
8269 (init_gdbsim_ops): Delete.
8270 (gdbsim_cntrl_c): Adjust.
8271 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8272
8273 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8274 (the_amd64_linux_nat_target): New.
8275 (amd64_linux_fetch_inferior_registers)
8276 (amd64_linux_store_inferior_registers): Refactor as methods of
8277 amd64_linux_nat_target.
8278 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8279 * i386-linux-nat.c: Don't include "linux-nat.h".
8280 (i386_linux_nat_target): New class.
8281 (the_i386_linux_nat_target): New.
8282 (i386_linux_fetch_inferior_registers)
8283 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8284 as methods of i386_linux_nat_target.
8285 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8286 * inf-child.c (inf_child_ops): Delete.
8287 (inf_child_fetch_inferior_registers)
8288 (inf_child_store_inferior_registers): Delete.
8289 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8290 methods of inf_child_target.
8291 (inf_child_target::supports_terminal_ours)
8292 (inf_child_target::terminal_init)
8293 (inf_child_target::terminal_inferior)
8294 (inf_child_target::terminal_ours_for_output)
8295 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8296 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8297 New.
8298 (inf_child_open, inf_child_disconnect, inf_child_close)
8299 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8300 (inf_child_post_startup_inferior, inf_child_can_run)
8301 (inf_child_pid_to_exec_file): Refactor as methods of
8302 inf_child_target.
8303 (inf_child_follow_fork): Delete.
8304 (inf_child_target::can_create_inferior)
8305 (inf_child_target::can_attach): New.
8306 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8307 (inf_child_target::has_stack, inf_child_target::has_registers)
8308 (inf_child_target::has_execution): New.
8309 (inf_child_fileio_open, inf_child_fileio_pwrite)
8310 (inf_child_fileio_pread, inf_child_fileio_fstat)
8311 (inf_child_fileio_close, inf_child_fileio_unlink)
8312 (inf_child_fileio_readlink, inf_child_use_agent)
8313 (inf_child_can_use_agent): Refactor as methods of
8314 inf_child_target.
8315 (return_zero, inf_child_target): Delete.
8316 (inf_child_target::inf_child_target): New.
8317 * inf-child.h: Include "target.h".
8318 (inf_child_target): Delete function prototype.
8319 (inf_child_target): New class.
8320 (inf_child_open_target, inf_child_mourn_inferior)
8321 (inf_child_maybe_unpush_target): Delete.
8322 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8323 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8324 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8325 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8326 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8327 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8328 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8329 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8330 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8331 methods of inf_ptrace_target.
8332 (inf_ptrace_target): Delete function.
8333 * inf-ptrace.h: Include "inf-child.h".
8334 (inf_ptrace_target): Delete function declaration.
8335 (inf_ptrace_target): New class.
8336 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8337 * linux-nat.c (linux_target): New.
8338 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8339 (linux_nat_target::~linux_nat_target): New.
8340 (linux_child_post_attach, linux_child_post_startup_inferior)
8341 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8342 (linux_child_remove_fork_catchpoint)
8343 (linux_child_insert_vfork_catchpoint)
8344 (linux_child_remove_vfork_catchpoint)
8345 (linux_child_insert_exec_catchpoint)
8346 (linux_child_remove_exec_catchpoint)
8347 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8348 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8349 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8350 (linux_nat_stopped_data_address)
8351 (linux_nat_stopped_by_sw_breakpoint)
8352 (linux_nat_supports_stopped_by_sw_breakpoint)
8353 (linux_nat_stopped_by_hw_breakpoint)
8354 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8355 (linux_nat_kill, linux_nat_mourn_inferior)
8356 (linux_nat_xfer_partial, linux_nat_thread_alive)
8357 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8358 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8359 (linux_child_static_tracepoint_markers_by_strid)
8360 (linux_nat_is_async_p, linux_nat_can_async_p)
8361 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8362 (linux_nat_supports_multi_process)
8363 (linux_nat_supports_disable_randomization, linux_nat_async)
8364 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8365 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8366 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8367 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8368 methods of linux_nat_target.
8369 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8370 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8371 parameter.
8372 (check_stopped_by_watchpoint): Adjust.
8373 (linux_xfer_partial): Delete.
8374 (linux_target_install_ops, linux_target, linux_nat_add_target):
8375 Delete.
8376 (linux_nat_target::linux_nat_target): New.
8377 * linux-nat.h: Include "inf-ptrace.h".
8378 (linux_nat_target): New.
8379 (linux_target, linux_target_install_ops, linux_nat_add_target):
8380 Delete function declarations.
8381 (linux_target): Declare global.
8382 * linux-thread-db.c (thread_db_target): New.
8383 (thread_db_target::thread_db_target): New.
8384 (thread_db_ops): Delete.
8385 (the_thread_db_target): New.
8386 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8387 (thread_db_update_thread_list, thread_db_pid_to_str)
8388 (thread_db_extra_thread_info)
8389 (thread_db_thread_handle_to_thread_info)
8390 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8391 (thread_db_resume): Refactor as methods of thread_db_target.
8392 (init_thread_db_ops): Delete.
8393 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8394 * x86-linux-nat.c: Don't include "linux-nat.h".
8395 (super_post_startup_inferior): Delete.
8396 (x86_linux_nat_target::~x86_linux_nat_target): New.
8397 (x86_linux_child_post_startup_inferior)
8398 (x86_linux_read_description, x86_linux_enable_btrace)
8399 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8400 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8401 methods of x86_linux_nat_target.
8402 (x86_linux_create_target): Delete. Bits folded ...
8403 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8404 pointer.
8405 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8406 (x86_linux_nat_target): New class.
8407 (x86_linux_create_target): Delete.
8408 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8409 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8410 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8411 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8412 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8413 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8414 make extern.
8415 (x86_use_watchpoints): Delete.
8416 * x86-nat.h: Include "breakpoint.h" and "target.h".
8417 (x86_use_watchpoints): Delete.
8418 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8419 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8420 (x86_insert_watchpoint, x86_remove_watchpoint)
8421 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8422 (x86_stopped_by_hw_breakpoint): New declarations.
8423 (x86_nat_target): New template class.
8424
8425 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8426 (the_ppc_linux_nat_target): New.
8427 (ppc_linux_fetch_inferior_registers)
8428 (ppc_linux_can_use_hw_breakpoint)
8429 (ppc_linux_region_ok_for_hw_watchpoint)
8430 (ppc_linux_ranged_break_num_registers)
8431 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8432 (ppc_linux_insert_mask_watchpoint)
8433 (ppc_linux_remove_mask_watchpoint)
8434 (ppc_linux_can_accel_watchpoint_condition)
8435 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8436 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8437 (ppc_linux_watchpoint_addr_within_range)
8438 (ppc_linux_masked_watch_num_registers)
8439 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8440 (ppc_linux_read_description): Refactor as methods of
8441 ppc_linux_nat_target.
8442 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8443
8444 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8445 (procfs_target): New class.
8446 (the_procfs_target): New.
8447 (procfs_target): Delete function.
8448 (procfs_auxv_parse, procfs_attach, procfs_detach)
8449 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8450 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8451 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8452 (procfs_create_inferior, procfs_update_thread_list)
8453 (procfs_thread_alive, procfs_pid_to_str)
8454 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8455 (procfs_stopped_data_address, procfs_insert_watchpoint)
8456 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8457 (proc_find_memory_regions, procfs_info_proc)
8458 (procfs_make_note_section): Refactor as methods of procfs_target.
8459 (_initialize_procfs): Adjust.
8460 * sol-thread.c (sol_thread_target): New class.
8461 (sol_thread_ops): Now a sol_thread_target.
8462 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8463 (sol_thread_fetch_registers, sol_thread_store_registers)
8464 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8465 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8466 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8467 (init_sol_thread_ops): Delete.
8468 (_initialize_sol_thread): Adjust. Remove references to
8469 init_sol_thread_ops and complete_target_initialization.
8470
8471 * windows-nat.c (windows_nat_target): New class.
8472 (windows_fetch_inferior_registers)
8473 (windows_store_inferior_registers, windows_resume, windows_wait)
8474 (windows_attach, windows_detach, windows_pid_to_exec_file)
8475 (windows_files_info, windows_create_inferior)
8476 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8477 (windows_close, windows_pid_to_str, windows_xfer_partial)
8478 (windows_get_tib_address, windows_get_ada_task_ptid)
8479 (windows_thread_name, windows_thread_alive): Refactor as
8480 windows_nat_target methods.
8481 (do_initial_windows_stuff): Adjust.
8482 (windows_target): Delete function.
8483 (_initialize_windows_nat): Adjust.
8484
8485 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8486 (darwin_mourn_inferior, darwin_kill_inferior)
8487 (darwin_create_inferior, darwin_attach, darwin_detach)
8488 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8489 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8490 (darwin_supports_multi_process): Refactor as darwin_nat_target
8491 methods.
8492 (darwin_resume_to, darwin_files_info): Delete.
8493 (_initialize_darwin_inferior): Rename to ...
8494 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8495 * darwin-nat.h: Include "inf-child.h".
8496 (darwin_nat_target): New class.
8497 (darwin_complete_target): Delete.
8498 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8499 (darwin_target): New.
8500 (i386_darwin_fetch_inferior_registers)
8501 (i386_darwin_store_inferior_registers): Refactor as methods of
8502 darwin_nat_target.
8503 (darwin_complete_target): Delete, with ...
8504 (_initialize_i386_darwin_nat): ... bits factored out here.
8505
8506 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8507 (the_alpha_linux_nat_target): New.
8508 (alpha_linux_register_u_offset): Refactor as
8509 alpha_linux_nat_target method.
8510 (_initialize_alpha_linux_nat): Adjust.
8511 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8512 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8513 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8514 methods of linux_nat_trad_target.
8515 (linux_trad_target): Delete.
8516 * linux-nat-trad.h (linux_trad_target): Delete function.
8517 (linux_nat_trad_target): New class.
8518 * mips-linux-nat.c (mips_linux_nat_target): New class.
8519 (super_fetch_registers, super_store_registers, super_close):
8520 Delete.
8521 (the_mips_linux_nat_target): New.
8522 (mips64_linux_regsets_fetch_registers)
8523 (mips64_linux_regsets_store_registers)
8524 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8525 (mips_linux_register_u_offset, mips_linux_read_description)
8526 (mips_linux_can_use_hw_breakpoint)
8527 (mips_linux_stopped_by_watchpoint)
8528 (mips_linux_stopped_data_address)
8529 (mips_linux_region_ok_for_hw_watchpoint)
8530 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8531 (mips_linux_close): Refactor as methods of mips_linux_nat.
8532 (_initialize_mips_linux_nat): Adjust to C++ification.
8533
8534 * aix-thread.c (aix_thread_target): New class.
8535 (aix_thread_ops): Now an aix_thread_target.
8536 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8537 (aix_thread_fetch_registers, aix_thread_store_registers)
8538 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8539 (aix_thread_thread_alive, aix_thread_pid_to_str)
8540 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8541 Refactor as methods of aix_thread_target.
8542 (init_aix_thread_ops): Delete.
8543 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8544 and complete_target_initialization.
8545 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8546 (rs6000_nat_target): New class.
8547 (the_rs6000_nat_target): New.
8548 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8549 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8550 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8551 (super_create_inferior): Delete.
8552 (_initialize_rs6000_nat): Adjust to C++ification.
8553
8554 * arm-linux-nat.c (arm_linux_nat_target): New class.
8555 (the_arm_linux_nat_target): New.
8556 (arm_linux_fetch_inferior_registers)
8557 (arm_linux_store_inferior_registers, arm_linux_read_description)
8558 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8559 (arm_linux_remove_hw_breakpoint)
8560 (arm_linux_region_ok_for_hw_watchpoint)
8561 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8562 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8563 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8564 arm_linux_nat_target.
8565 (_initialize_arm_linux_nat): Adjust to C++ification.
8566
8567 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8568 (the_aarch64_linux_nat_target): New.
8569 (aarch64_linux_fetch_inferior_registers)
8570 (aarch64_linux_store_inferior_registers)
8571 (aarch64_linux_child_post_startup_inferior)
8572 (aarch64_linux_read_description)
8573 (aarch64_linux_can_use_hw_breakpoint)
8574 (aarch64_linux_insert_hw_breakpoint)
8575 (aarch64_linux_remove_hw_breakpoint)
8576 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8577 (aarch64_linux_region_ok_for_hw_watchpoint)
8578 (aarch64_linux_stopped_data_address)
8579 (aarch64_linux_stopped_by_watchpoint)
8580 (aarch64_linux_watchpoint_addr_within_range)
8581 (aarch64_linux_can_do_single_step): Refactor as methods of
8582 aarch64_linux_nat_target.
8583 (super_post_startup_inferior): Delete.
8584 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8585
8586 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8587 (the_hppa_linux_nat_target): New.
8588 (hppa_linux_fetch_inferior_registers)
8589 (hppa_linux_store_inferior_registers): Refactor as methods of
8590 hppa_linux_nat_target.
8591 (_initialize_hppa_linux_nat): Adjust to C++ification.
8592
8593 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8594 (the_ia64_linux_nat_target): New.
8595 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8596 (ia64_linux_stopped_data_address)
8597 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8598 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8599 ia64_linux_nat_target methods.
8600 (super_xfer_partial): Delete.
8601 (_initialize_ia64_linux_nat): Adjust to C++ification.
8602
8603 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8604 (the_m32r_linux_nat_target): New.
8605 (m32r_linux_fetch_inferior_registers)
8606 (m32r_linux_store_inferior_registers): Refactor as
8607 m32r_linux_nat_target methods.
8608 (_initialize_m32r_linux_nat): Adjust to C++ification.
8609
8610 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8611 (the_m68k_linux_nat_target): New.
8612 (m68k_linux_fetch_inferior_registers)
8613 (m68k_linux_store_inferior_registers): Refactor as
8614 m68k_linux_nat_target methods.
8615 (_initialize_m68k_linux_nat): Adjust to C++ification.
8616
8617 * s390-linux-nat.c (s390_linux_nat_target): New class.
8618 (the_s390_linux_nat_target): New.
8619 (s390_linux_fetch_inferior_registers)
8620 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8621 (s390_insert_watchpoint, s390_remove_watchpoint)
8622 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8623 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8624 (s390_auxv_parse, s390_read_description): Refactor as methods of
8625 s390_linux_nat_target.
8626 (_initialize_s390_nat): Adjust to C++ification.
8627
8628 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8629 (the_sparc_linux_nat_target): New.
8630 (_initialize_sparc_linux_nat): Adjust to C++ification.
8631 * sparc-nat.c (sparc_fetch_inferior_registers)
8632 (sparc_store_inferior_registers): Remove target_ops parameter.
8633 * sparc-nat.h (sparc_fetch_inferior_registers)
8634 (sparc_store_inferior_registers): Remove target_ops parameter.
8635 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8636 (the_sparc64_linux_nat_target): New.
8637 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8638
8639 * spu-linux-nat.c (spu_linux_nat_target): New class.
8640 (the_spu_linux_nat_target): New.
8641 (spu_child_post_startup_inferior, spu_child_post_attach)
8642 (spu_child_wait, spu_fetch_inferior_registers)
8643 (spu_store_inferior_registers, spu_xfer_partial)
8644 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8645 methods.
8646 (_initialize_spu_nat): Adjust to C++ification.
8647
8648 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8649 (the_tilegx_linux_nat_target): New.
8650 (fetch_inferior_registers, store_inferior_registers):
8651 Refactor as methods.
8652 (_initialize_tile_linux_nat): Adjust to C++ification.
8653
8654 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8655 (the_xtensa_linux_nat_target): New.
8656 (xtensa_linux_fetch_inferior_registers)
8657 (xtensa_linux_store_inferior_registers): Refactor as
8658 xtensa_linux_nat_target methods.
8659 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8660
8661 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8662 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8663 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8664 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8665 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8666 (fbsd_stopped_by_sw_breakpoint)
8667 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8668 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8669 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8670 (fbsd_post_startup_inferior, fbsd_post_attach)
8671 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8672 (fbsd_set_syscall_catchpoint)
8673 (super_xfer_partial, super_resume, super_wait)
8674 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8675 (fbsd_handle_debug_trap): Remove target_ops parameter.
8676 (fbsd_nat_add_target): Delete.
8677 * fbsd-nat.h: Include "inf-ptrace.h".
8678 (fbsd_nat_add_target): Delete.
8679 (USE_SIGTRAP_SIGINFO): Define.
8680 (fbsd_nat_target): New class.
8681
8682 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8683 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8684 (amd64bsd_target): Delete.
8685 * amd64-bsd-nat.h: New file.
8686 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8687 "x86-bsd-nat.h".
8688 (amd64_fbsd_nat_target): New class.
8689 (the_amd64_fbsd_nat_target): New.
8690 (amd64fbsd_read_description): Refactor as method of
8691 amd64_fbsd_nat_target.
8692 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8693 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8694 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8695 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8696 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8697 (i386bsd_target): Delete.
8698 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8699 (i386bsd_fetch_inferior_registers)
8700 (i386bsd_store_inferior_registers): Declare.
8701 (i386_bsd_nat_target): New class.
8702 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8703 (the_i386_fbsd_nat_target): New.
8704 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8705 i386_fbsd_nat_target methods.
8706 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8707 (_initialize_i386fbsd_nat): Adjust to C++ification.
8708 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8709 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8710 (_initialize_x86_bsd_nat): Adjust to C++ification.
8711 * x86-bsd-nat.h: Include "x86-nat.h".
8712 (x86bsd_target): Delete declaration.
8713 (x86bsd_nat_target): New class.
8714
8715 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8716 (the_aarch64_fbsd_nat_target): New.
8717 (aarch64_fbsd_fetch_inferior_registers)
8718 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8719 aarch64_fbsd_nat_target.
8720 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8721 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8722 (the_alpha_bsd_nat_target): New.
8723 (alphabsd_fetch_inferior_registers)
8724 (alphabsd_store_inferior_registers): Refactor as
8725 alpha_bsd_nat_target methods.
8726 (_initialize_alphabsd_nat): Refactor as methods of
8727 alpha_bsd_nat_target.
8728 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8729 (the_amd64_nbsd_nat_target): New.
8730 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8731 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8732 (the_amd64_obsd_nat_target): New.
8733 (_initialize_amd64obsd_nat): Adjust to C++ification.
8734 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8735 (the_arm_fbsd_nat_target): New.
8736 (arm_fbsd_fetch_inferior_registers)
8737 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8738 (_initialize_arm_fbsd_nat): Refactor as methods of
8739 arm_fbsd_nat_target.
8740 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8741 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8742 (the_arm_netbsd_nat_target): New.
8743 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8744 arm_netbsd_nat_target.
8745 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8746 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8747 (the_hppa_nbsd_nat_target): New.
8748 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8749 hppa_nbsd_nat_target methods.
8750 (_initialize_hppanbsd_nat): Adjust to C++ification.
8751 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8752 (the_hppa_obsd_nat_target): New.
8753 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8754 methods of hppa_obsd_nat_target.
8755 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8756 add_target.
8757 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8758 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8759 add_target.
8760 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8761 (_initialize_i386obsd_nat): Use add_target.
8762 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8763 (the_m68k_bsd_nat_target): New.
8764 (m68kbsd_fetch_inferior_registers)
8765 (m68kbsd_store_inferior_registers): Refactor as methods of
8766 m68k_bsd_nat_target.
8767 (_initialize_m68kbsd_nat): Adjust to C++ification.
8768 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8769 (the_mips_fbsd_nat_target): New.
8770 (mips_fbsd_fetch_inferior_registers)
8771 (mips_fbsd_store_inferior_registers): Refactor as methods of
8772 mips_fbsd_nat_target.
8773 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8774 add_target.
8775 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8776 (the_mips_nbsd_nat_target): New.
8777 (mipsnbsd_fetch_inferior_registers)
8778 (mipsnbsd_store_inferior_registers): Refactor as methods of
8779 mips_nbsd_nat_target.
8780 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8781 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8782 (the_mips64_obsd_nat_target): New.
8783 (mips64obsd_fetch_inferior_registers)
8784 (mips64obsd_store_inferior_registers): Refactor as methods of
8785 mips64_obsd_nat_target.
8786 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8787 add_target.
8788 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8789 nbsd_nat_target.
8790 * nbsd-nat.h: Include "inf-ptrace.h".
8791 (nbsd_nat_target): New class.
8792 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8793 (obsd_wait): Refactor as methods of obsd_nat_target.
8794 (obsd_add_target): Delete.
8795 * obsd-nat.h: Include "inf-ptrace.h".
8796 (obsd_nat_target): New class.
8797 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8798 (the_ppc_fbsd_nat_target): New.
8799 (ppcfbsd_fetch_inferior_registers)
8800 (ppcfbsd_store_inferior_registers): Refactor as methods of
8801 ppc_fbsd_nat_target.
8802 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8803 add_target.
8804 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8805 (the_ppc_nbsd_nat_target): New.
8806 (ppcnbsd_fetch_inferior_registers)
8807 (ppcnbsd_store_inferior_registers): Refactor as methods of
8808 ppc_nbsd_nat_target.
8809 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8810 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8811 (the_ppc_obsd_nat_target): New.
8812 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8813 methods of ppc_obsd_nat_target.
8814 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8815 add_target.
8816 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8817 (the_sh_nbsd_nat_target): New.
8818 (shnbsd_fetch_inferior_registers)
8819 (shnbsd_store_inferior_registers): Refactor as methods of
8820 sh_nbsd_nat_target.
8821 (_initialize_shnbsd_nat): Adjust to C++ification.
8822 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8823 (inf_ptrace_xfer_partial): Delete.
8824 (sparc_xfer_partial, sparc_target): Delete.
8825 * sparc-nat.h (sparc_fetch_inferior_registers)
8826 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8827 (sparc_target): Delete function declaration.
8828 (sparc_target): New template class.
8829 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8830 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8831 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8832 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8833 add_target.
8834 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8835 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8836 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8837 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8838 add_target.
8839 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8840 (the_vax_bsd_nat_target): New.
8841 (vaxbsd_fetch_inferior_registers)
8842 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8843 methods.
8844 (_initialize_vaxbsd_nat): Adjust to C++ification.
8845
8846 * bsd-kvm.c (bsd_kvm_target): New class.
8847 (bsd_kvm_ops): Now a bsd_kvm_target.
8848 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8849 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8850 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8851 bsd_kvm_target.
8852 (bsd_kvm_return_one): Delete.
8853 (bsd_kvm_add_target): Adjust to C++ification.
8854
8855 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8856 (nto_procfs_target_procfs): New classes.
8857 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8858 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8859 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8860 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8861 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8862 (procfs_remove_hw_breakpoint, procfs_resume)
8863 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8864 (procfs_kill_inferior, procfs_store_registers)
8865 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8866 as methods of nto_procfs_target.
8867 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8868 (nto_native_ops): Delete.
8869 (procfs_open, procfs_native_open): Delete.
8870 (nto_native_ops): Now an nto_procfs_target_native.
8871 (init_procfs_targets): Adjust to C++ification.
8872 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8873 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8874 Refactor as methods of nto_procfs_target.
8875
8876 * go32-nat.c (go32_nat_target): New class.
8877 (the_go32_nat_target): New.
8878 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8879 (go32_store_registers, go32_xfer_partial, go32_files_info)
8880 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8881 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8882 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8883 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8884 (go32_target): Delete.
8885 (_initialize_go32_nat): Adjust to C++ification.
8886
8887 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8888 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8889 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8890 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8891 gnu_nat_target.
8892 (gnu_target): Delete.
8893 * gnu-nat.h (gnu_target): Delete.
8894 (gnu_nat_target): New class.
8895 * i386-gnu-nat.c (gnu_base_target): New.
8896 (i386_gnu_nat_target): New class.
8897 (the_i386_gnu_nat_target): New.
8898 (_initialize_i386gnu_nat): Adjust to C++ification.
8899
8900 2018-05-02 Pedro Alves <palves@redhat.com>
8901
8902 * bfd-target.c (target_bfd_xclose): Rename to ...
8903 (target_bfd_close): ... this.
8904 (target_bfd_reopen): Adjust.
8905 * target.c (target_close): Remove references to to_xclose.
8906 * target.h (target_ops::to_xclose): Delete.
8907 (target_ops::to_close): Update comments.
8908
8909 2018-05-02 Pedro Alves <palves@redhat.com>
8910
8911 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8912 "linux-nat.h".
8913 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8914 * inf-ptrace.c (inf_ptrace_register_u_offset)
8915 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8916 (inf_ptrace_store_register, inf_ptrace_store_registers)
8917 (inf_ptrace_trad_target): Move to ...
8918 * linux-nat-trad.c: ... this new file.
8919 * linux-nat-trad.h: New file.
8920 * linux-nat.c (linux_target_install_ops): Make extern.
8921 (linux_trad_target): Delete.
8922 * linux-nat.h (linux_trad_target): Delete declaration.
8923 (linux_target_install_ops): Declare.
8924 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8925 "linux-nat.h".
8926
8927 2018-05-02 Pedro Alves <palves@redhat.com>
8928
8929 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8930 procfs_target/add_target here.
8931 * procfs.c (procfs_target): Make static.
8932 (_initialize_procfs): Call add_target here.
8933 * procfs.h (struct target_ops): Remove forward declaration.
8934 (procfs_target): Remove declaration.
8935 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8936
8937 2018-05-02 Pedro Alves <palves@redhat.com>
8938
8939 * procfs.c (procfs_stopped_by_watchpoint)
8940 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8941 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8942 Forward declare.
8943 (procfs_use_watchpoints): Delete, move contents...
8944 (procfs_target): ... here.
8945 * procfs.h (procfs_use_watchpoints): Delete declaration.
8946 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8947 procfs_use_watchpoints.
8948 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8949 procfs_use_watchpoints.
8950
8951 2018-05-02 Tom Tromey <tom@tromey.com>
8952
8953 PR python/20084:
8954 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8955 and var_zuinteger_unlimited.
8956 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8957 and PARAM_ZUINTEGER_UNLIMITED.
8958 (set_parameter_value): Handle var_zuinteger and
8959 var_zuinteger_unlimited.
8960 (add_setshow_generic): Likewise.
8961 (parmpy_init): Likewise.
8962
8963 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8964
8965 PR rust/23124
8966 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8967 pointer is not null before dereferencing it.
8968
8969 2018-04-30 Tom Tromey <tom@tromey.com>
8970
8971 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8972 is_mi_like_p.
8973
8974 2018-04-30 Tom Tromey <tom@tromey.com>
8975
8976 * breakpoint.c (mention): Remove use of is_mi_like_p.
8977 (print_mention_ranged_breakpoint): Likewise.
8978 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8979 of is_mi_like_p.
8980
8981 2018-04-30 Tom Tromey <tom@tromey.com>
8982
8983 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8984
8985 2018-04-30 Tom Tromey <tom@tromey.com>
8986
8987 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8988 (info_spu_event_command): Remove some uses of is_mi_like_p.
8989
8990 2018-04-30 Tom Tromey <tom@tromey.com>
8991
8992 * python/py-framefilter.c (py_print_single_arg)
8993 (enumerate_locals, py_print_args, py_print_frame): Remove some
8994 uses of is_mi_like_p.
8995
8996 2018-04-30 Tom Tromey <tom@tromey.com>
8997
8998 * ui-out.c: Update.
8999 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9000 * ui-out.h (ui_out::is_mi_like_p): Now const.
9001 (ui_out::do_is_mi_like_p): Now const.
9002 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9003
9004 2018-04-30 Tom Tromey <tom@tromey.com>
9005
9006 * varobj.c (varobj_set_visualizer): Use new_reference.
9007 * python/python.c (gdbpy_decode_line): Use new_reference.
9008 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9009 new_reference.
9010
9011 2018-04-30 Tom Tromey <tom@tromey.com>
9012
9013 * varobj.c (install_new_value): Use new_reference.
9014 * value.h (value_incref): Return void. Swap intro comment with
9015 value_decref.
9016 * value.c (set_value_parent): Use new_reference.
9017 (value_incref): Return void. Update intro comment.
9018 (release_value): Use new_reference.
9019 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9020
9021 2018-04-30 Tom Tromey <tom@tromey.com>
9022
9023 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9024 * gdb_bfd.h (new_bfd_ref): Remove.
9025 (gdb_bfd_open): Update comment.
9026 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9027 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9028 (gdb_bfd_fdopenr): Use new_reference.
9029 * exec.c (exec_file_attach): Use new_reference.
9030
9031 2018-04-30 Tom Tromey <tom@tromey.com>
9032
9033 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9034 method.
9035
9036 2018-04-30 Tom Tromey <tom@tromey.com>
9037
9038 * jit.c (jit_read_code_entry): Use type_align.
9039 * i386-tdep.c (i386_gdbarch_init): Don't call
9040 set_gdbarch_long_long_align_bit.
9041 * gdbarch.sh: Remove long_long_align_bit.
9042 * gdbarch.c, gdbarch.h: Rebuild.
9043 * arc-tdep.c (arc_type_align): New function.
9044 (arc_gdbarch_init): Use arc_type_align. Don't call
9045 set_gdbarch_long_long_align_bit.
9046
9047 2018-04-30 Tom Tromey <tom@tromey.com>
9048
9049 * rust-lang.c (rust_type_alignment): Remove.
9050 (rust_composite_type): Use type_align.
9051
9052 2018-04-30 Tom Tromey <tom@tromey.com>
9053
9054 * NEWS: Mention Type.align.
9055 * python/py-type.c (typy_get_alignof): New function.
9056 (type_object_getset): Add "alignof".
9057
9058 2018-04-30 Tom Tromey <tom@tromey.com>
9059
9060 PR exp/17095:
9061 * NEWS: Update.
9062 * std-operator.def (UNOP_ALIGNOF): New operator.
9063 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9064 New.
9065 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9066 * c-lang.c (c_op_print_tab): Add alignof.
9067 * c-exp.y (ALIGNOF): New token.
9068 (exp): Add "ALIGNOF" production.
9069 (ident_tokens): Add _Alignof and alignof.
9070
9071 2018-04-30 Tom Tromey <tom@tromey.com>
9072
9073 * i386-tdep.c (i386_type_align): New function.
9074 (i386_gdbarch_init): Update.
9075 * gdbarch.sh (type_align): New method.
9076 * gdbarch.c, gdbarch.h: Rebuild.
9077 * arch-utils.h (default_type_align): Declare.
9078 * arch-utils.c (default_type_align): New function.
9079 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9080 (struct type) <align_log2>: New field.
9081 <instance_flags>: Now a bitfield.
9082 (TYPE_RAW_ALIGN): New macro.
9083 (type_align, type_raw_align, set_type_align): Declare.
9084 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9085 functions.
9086 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9087 (get_alignment, maybe_set_alignment): New functions.
9088 (read_structure_type, read_enumeration_type, read_array_type)
9089 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9090 (read_subrange_type, read_base_type): Set type alignment.
9091
9092 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9093
9094 * dwarf2read.c (read_index_from_section): Use bool.
9095
9096 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9097
9098 PR gdb/22950
9099 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9100 with #ifdef.
9101
9102 2018-04-29 John Reiser <jreiser@BitWagon.com>
9103
9104 PR build/22873
9105 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9106 last step, and do it atomically.
9107
9108 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9109
9110 * compile/compile-c-types.c (convert_int, convert_float):
9111 Update for C FE v1.
9112
9113 2018-04-27 Tom Tromey <tom@tromey.com>
9114
9115 PR rust/22545:
9116 * rust-lang.c (rust_inclusive_range_type_p): New function.
9117 (rust_range): Handle inclusive ranges.
9118 (rust_compute_range): Likewise.
9119 * rust-exp.y (struct rust_op) <inclusive>: New field.
9120 (DOTDOTEQ): New constant.
9121 (range_expr): Add "..=" productions.
9122 (operator_tokens): Add "..=" token.
9123 (ast_range): Add "inclusive" parameter.
9124 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9125 ranges.
9126 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9127 bounds values.
9128 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9129 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9130 Update comments.
9131 * expprint.c (print_subexp_standard): Handle new bounds values.
9132 (dump_subexp_body_standard): Likewise.
9133
9134 2018-04-27 Tom Tromey <tom@tromey.com>
9135
9136 * configure: Rebuild.
9137 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9138 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9139 "OVERRIDE".
9140 (class symbol_needs_eval_context): Likewise.
9141 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9142 (mock_mapped_index::symbol_name_at): Use "override". Remove
9143 "virtual".
9144 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9145 "override".
9146 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9147 * aarch64-tdep.c (instruction_reader::read): Use "override".
9148 (instruction_reader_test::read): Likewise.
9149 * arm-tdep.c (instruction_reader::read): Use "override".
9150 (instruction_reader_thumb::read): Likewise.
9151
9152 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9153
9154 PR remote/9665
9155 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9156 instead of remote_send.
9157 (remote_send): Remove.
9158
9159 2018-04-26 Pedro Alves <palves@redhat.com>
9160
9161 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9162 find_function_start_sal instead of find_pc_line.
9163
9164 2018-04-26 Pedro Alves <palves@redhat.com>
9165
9166 * breakpoint.c (set_breakpoint_location_function): Handle
9167 mst_data_gnu_ifunc.
9168 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9169 * elfread.c (elf_symtab_read): Give data symbols with
9170 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9171 (elf_rel_plt_read): Update comment.
9172 * linespec.c (convert_linespec_to_sals): Handle
9173 mst_data_gnu_ifunc.
9174 (minsym_found): Handle mst_data_gnu_ifunc.
9175 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9176 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9177 * parse.c (find_minsym_type_and_address): Handle
9178 mst_data_gnu_ifunc.
9179 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9180 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9181 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9182 comment.
9183 <mst_data_gnu_ifunc>: New enumerator.
9184
9185 2018-04-26 Pedro Alves <palves@redhat.com>
9186
9187 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9188 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9189 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9190 Handle it.
9191 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9192 (lookup_minimal_symbol_by_pc): Adjust.
9193 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9194 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9195 * minsyms.h (lookup_msym_prefer): New enum.
9196 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9197 parameter by a lookup_msym_prefer parameter.
9198
9199 2018-04-26 Pedro Alves <palves@redhat.com>
9200
9201 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9202 ends in "@plt" instead of looking at the symbol's section.
9203
9204 2018-04-26 Pedro Alves <palves@redhat.com>
9205
9206 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9207 all references.
9208 (find_pc_partial_function_gnu_ifunc): Rename to ...
9209 (find_pc_partial_function): ... this, and remove references to
9210 'is_gnu_ifunc_p'.
9211 (find_pc_partial_function): Delete old implementation.
9212 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9213
9214 2018-04-26 Pedro Alves <palves@redhat.com>
9215
9216 * linespec.c (struct bound_minimal_symbol_search_key): New.
9217 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9218 skip first line if we found a GNU ifunc minimal symbol by name.
9219 (compare_msymbols): Change parameters to work with a destructured
9220 lhs minsym.
9221 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9222 functions.
9223
9224 2018-04-26 Pedro Alves <palves@redhat.com>
9225
9226 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9227 ifunc targets here. Instead, if we have an ifunc minsym, use its
9228 address/name.
9229 (add_location_to_breakpoint): Store the minsym and the objfile in
9230 the breakpoint location.
9231 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9232 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9233 Record the minsym in the sal.
9234 * symtab.h (symtab_and_line) <msymbol>: New field.
9235
9236 2018-04-26 Pedro Alves <palves@redhat.com>
9237
9238 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9239 unless we actually resolved the ifunc.
9240
9241 2018-04-26 Pedro Alves <palves@redhat.com>
9242
9243 * c-exp.y (variable production): Prefer ifunc minsyms over
9244 regular function symbols.
9245 * symtab.c (find_gnu_ifunc): New function.
9246 * minsyms.h (lookup_msym_prefer): New enum.
9247 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9248 parameter by a lookup_msym_prefer parameter.
9249 * symtab.h (find_gnu_ifunc): New declaration.
9250
9251 2018-04-26 Pedro Alves <palves@redhat.com>
9252
9253 * blockframe.c (find_gnu_ifunc_target_type): New function.
9254 (find_function_type): New.
9255 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9256 return a value with a memory address.
9257 (eval_call): For calls to GNU ifunc functions, try to find the
9258 type of the target function from the type that the resolver
9259 returns.
9260 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9261 symbols.
9262 * infcall.c (find_function_return_type): Delete.
9263 (find_function_addr): Add 'function_type' parameter. For calls to
9264 GNU ifunc functions, try to find the type of the target function
9265 from the type that the resolver returns, and return it via
9266 FUNCTION_TYPE.
9267 (call_function_by_hand_dummy): Adjust to use the function type
9268 returned by find_function_addr.
9269 (find_function_addr): Add 'function_type' parameter and move
9270 description here.
9271 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9272 declarations.
9273
9274 2018-04-26 Pedro Alves <palves@redhat.com>
9275
9276 * c-exp.y (variable production): Skip finding an alias for ifunc
9277 symbols.
9278
9279 2018-04-26 Pedro Alves <palves@redhat.com>
9280
9281 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9282
9283 2018-04-25 Pedro Alves <palves@redhat.com>
9284
9285 * infcmd.c (kill_command): Print the pid as string, not the whole
9286 thread's ptid. Add comment. s/has been killed/killed/ in output
9287 message.
9288 * remote.c (remote_detach_1): Print the pid as string, not the
9289 whole thread's ptid.
9290
9291 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9292 Sergio Durigan Junior <sergiodj@redhat.com>
9293 Pedro Alves <palves@redhat.com>
9294
9295 * infcmd.c (kill_command): Print message when inferior has
9296 been killed.
9297 * inferior.c (print_inferior_events): Remove 'static'. Set as
9298 '1'.
9299 (add_inferior): Improve message printed when
9300 'print_inferior_events' is on.
9301 (exit_inferior): Remove message printed when
9302 'print_inferior_events' is on.
9303 (detach_inferior): Improve message printed when
9304 'print_inferior_events' is on.
9305 (initialize_inferiors): Use 'add_inferior_silent' to set
9306 'current_inferior_'.
9307 * inferior.h (print_inferior_events): Declare here as
9308 'extern'.
9309 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9310 '[Detaching...]' messages when 'print_inferior_events' is on.
9311 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9312 as prefix/suffix for messages. Remove periods. Fix erroneous
9313 'Detaching after fork from child...', replace it by '... from
9314 parent...'.
9315 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9316 prefix/suffix when printing 'Detaching...' messages. Print
9317 them when 'print_inferior_events' is on.
9318 * remote.c (remote_detach_1): Print message when detaching
9319 from inferior and '!is_fork_parent'.
9320
9321 2018-04-24 Tom Tromey <tom@tromey.com>
9322
9323 * cli-out.h: Reindent.
9324
9325 2018-04-24 Tom Tromey <tom@tromey.com>
9326
9327 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9328 (cli_ui_out::do_field_string): Use fputs_filtered.
9329 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9330
9331 2018-04-23 Tom Tromey <tom@tromey.com>
9332
9333 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9334 gdb::unique_xmalloc_ptr.
9335
9336 2018-04-23 Tom Tromey <tom@tromey.com>
9337
9338 * configure: Rebuild.
9339
9340 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9341
9342 PR gdb/23095
9343 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9344 prepare_for_testing. Set normal_bp to r_debug_state if target
9345 is bsd.
9346
9347 2018-04-21 Pedro Alves <palves@redhat.com>
9348 Rajendra SY <rajendra.sy@gmail.com>
9349
9350 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9351 * remote.c (extended_remote_attach): In all-stop mode, mark the
9352 thread as executing.
9353
9354 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9355
9356 * thread.c (thread_apply_all_command): Fix comment.
9357 (thread_command): Fix comment.
9358
9359 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9360
9361 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9362 parameter.
9363 * features/aarch64-core.c (create_feature_aarch64_core):
9364 Regenerate.
9365 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9366 Likewise.
9367 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9368 Likewise.
9369 * features/i386/32bit-avx512.c
9370 (create_feature_i386_32bit_avx512): Likewise.
9371 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9372 Likewise.
9373 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9374 Likewise.
9375 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9376 Likewise.
9377 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9378 Likewise.
9379 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9380 Likewise.
9381 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9382 Likewise.
9383 * features/i386/64bit-avx512.c
9384 (create_feature_i386_64bit_avx512): Likewise.
9385 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9386 Likewise.
9387 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9388 Likewise.
9389 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9390 Likewise.
9391 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9392 Likewise.
9393 * features/i386/64bit-segments.c
9394 (create_feature_i386_64bit_segments): Likewise.
9395 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9396 Likewise.
9397 * features/i386/x32-core.c
9398 (create_feature_i386_x32_core): Likewise.
9399 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9400 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9401 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9402 * target-descriptions.c: In generated code, don't pass xml
9403 filename.
9404
9405 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9406
9407 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9408 (print_xml_feature::visit_post): Likewise.
9409 (print_xml_feature::visit): Likewise.
9410 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9411 (print_xml_feature): Add new class.
9412 * regformats/regdat.sh: Null xmltarget on feature targets.
9413 * target-descriptions.c (struct target_desc): Add xmltarget.
9414 (maintenance_check_tdesc_xml_convert): Add unittest function.
9415 (tdesc_get_features_xml): Add function to get xml.
9416 (maintenance_check_xml_descriptions): Test xml generation.
9417 * xml-tdesc.c (string_read_description_xml): Add function.
9418 * xml-tdesc.h (string_read_description_xml): Add declaration.
9419
9420 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9421
9422 * features/Makefile: Add feature marker to targets with new style
9423 target descriptions.
9424 * regformats/aarch64.dat: Regenerate.
9425 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9426 * regformats/i386/amd64-avx-linux.dat: Likewise.
9427 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9428 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9429 * regformats/i386/amd64-linux.dat: Likewise.
9430 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9431 * regformats/i386/amd64.dat: Likewise.
9432 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9433 * regformats/i386/i386-avx-linux.dat: Likewise.
9434 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9435 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9436 * regformats/i386/i386-linux.dat: Likewise.
9437 * regformats/i386/i386-mmx-linux.dat: Likewise.
9438 * regformats/i386/i386-mpx-linux.dat: Likewise.
9439 * regformats/i386/i386.dat: Likewise.
9440 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9441 * regformats/i386/x32-avx-linux.dat: Likewise.
9442 * regformats/i386/x32-linux.dat: Likewise.
9443 * regformats/tic6x-c62x-linux.dat: Likewise.
9444 * regformats/tic6x-c64x-linux.dat: Likewise.
9445 * regformats/tic6x-c64xp-linux.dat: Likewise.
9446 * regformats/regdat.sh: Parse feature marker.
9447
9448 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9449
9450 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9451 (tdesc_osabi_name): Likewise.
9452 * target-descriptions.c (tdesc_architecture_name): Add new
9453 function.
9454 (tdesc_osabi_name): Likewise.
9455
9456 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9457
9458 * common/tdesc.c (tdesc_predefined_type): Move to here.
9459 (tdesc_named_type): Likewise.
9460 (tdesc_create_vector): Likewise.
9461 (tdesc_create_struct): Likewise.
9462 (tdesc_set_struct_size): Likewise.
9463 (tdesc_create_union): Likewise.
9464 (tdesc_create_flags): Likewise.
9465 (tdesc_create_enum): Likewise.
9466 (tdesc_add_field): Likewise.
9467 (tdesc_add_typed_bitfield): Likewise.
9468 (tdesc_add_bitfield): Likewise.
9469 (tdesc_add_flag): Likewise.
9470 (tdesc_add_enum_value): Likewise.
9471 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9472 (struct tdesc_type_vector): Likewise.
9473 (struct tdesc_type_field): Likewise.
9474 (struct tdesc_type_with_fields): Likewise.
9475 (tdesc_create_enum): Add declaration.
9476 (tdesc_add_typed_bitfield): Likewise.
9477 (tdesc_add_enum_value): Likewise.
9478 * target-descriptions.c (tdesc_type_field): Move from here.
9479 (tdesc_type_builtin): Likewise.
9480 (tdesc_type_vector): Likewise.
9481 (tdesc_type_with_fields): Likewise.
9482 (tdesc_predefined_types): Likewise.
9483 (tdesc_named_type): Likewise.
9484 (tdesc_create_vector): Likewise.
9485 (tdesc_create_struct): Likewise.
9486 (tdesc_set_struct_size): Likewise.
9487 (tdesc_create_union): Likewise.
9488 (tdesc_create_flags): Likewise.
9489 (tdesc_create_enum): Likewise.
9490 (tdesc_add_field): Likewise.
9491 (tdesc_add_typed_bitfield): Likewise.
9492 (tdesc_add_bitfield): Likewise.
9493 (tdesc_add_flag): Likewise.
9494 (tdesc_add_enum_value): Likewise.
9495 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9496 (tdesc_add_typed_bitfield): Likewise.
9497 (tdesc_add_enum_value): Likewise.
9498
9499 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9500
9501 * common/tdesc.c (tdesc_feature::accept): Move to here.
9502 (tdesc_feature::operator==): Likewise.
9503 (tdesc_create_reg): Likewise.
9504 * common/tdesc.h (tdesc_type_kind): Likewise.
9505 (struct tdesc_type): Likewise.
9506 (struct tdesc_feature): Likewise.
9507 * regformats/regdat.sh: Create a feature.
9508 * target-descriptions.c (tdesc_type_kind): Move from here.
9509 (tdesc_type): Likewise.
9510 (tdesc_type_up): Likewise.
9511 (tdesc_feature): Likewise.
9512 (tdesc_create_reg): Likewise.
9513
9514 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9515
9516 * Makefile.in: Add arch/tdesc.c
9517 * common/tdesc.c: New file.
9518 * common/tdesc.h (tdesc_element_visitor): Move to here.
9519 (tdesc_element): Likewise.
9520 (tdesc_reg): Likewise.
9521 (tdesc_reg_up): Likewise.
9522 * regformats/regdef.h (reg): Add offset to constructors.
9523 * target-descriptions.c (tdesc_element_visitor): Move from here.
9524 (tdesc_element): Likewise.
9525 (tdesc_reg): Likewise.
9526 (tdesc_reg_up): Likewise.
9527
9528 2018-04-17 Tom Tromey <tom@tromey.com>
9529
9530 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9531 discriminant field.
9532
9533 2018-04-17 Tom Tromey <tom@tromey.com>
9534
9535 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9536
9537 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9538
9539 * symtab.c (print_symbol_info): Skip printing filename and line
9540 number when `last' is NULL.
9541 (symtab_symbol_info): Use empty string instead of NULL for first
9542 invocation of print_symbol_info.
9543 (rbreak_command): Pass NULL to `last' parameter of
9544 print_symbol_info.
9545
9546 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9547
9548 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9549 instead of nullptr.
9550
9551 2018-04-16 Pedro Alves <palves@redhat.com>
9552
9553 * MAINTAINERS (sh): Remove.
9554 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9555 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9556 (ALLDEPFILES): Remove sh64-tdep.c.
9557 * NEWS: Mentions that support for SH-5/SH64 is removed.
9558 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9559 (sh*-*-openbsd*): Ditto.
9560 (sh64-*-elf*): Remove.
9561 (sh*): Remove.
9562 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9563 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9564 * sh-tdep.c: No longer include "sh64-tdep.h".
9565 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9566 * sh64-tdep.c, sh64-tdep.h: Remove files.
9567
9568 2018-04-16 Pedro Alves <palves@redhat.com>
9569
9570 * MAINTAINERS: Remove m88k.
9571 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9572 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9573 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9574 * NEWS: Mention that support for m88k was removed.
9575 * configure.host (m88*-*-*): Remove support.
9576 * configure.nat (m88k-*-*): Remove support.
9577 * configure.tgt (m88*-*-openbsd*): Remove.
9578 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9579
9580 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9581
9582 * configure.tgt (x86_tobjs): New variable.
9583 (amd64_tobjs, i386_tobjs): Use it.
9584
9585 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9586
9587 * symtab.c (print_symbol_info): Precede the symbol definition by
9588 the line number when available.
9589 * NEWS: Advertise this enhancement.
9590
9591 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9592
9593 * NEWS (New options): announce set/show record btrace cpu.
9594 * btrace.c: Include record-btrace.h.
9595 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9596 the vendor is unknown.
9597 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9598 Maybe overwrite the btrace configuration's cpu.
9599 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9600 (btrace_fetch): Add cpu parameter. Update callers.
9601 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9602 Maybe overwrite the btrace configuration's cpu. Skip enabling
9603 errata workarounds if the vendor is unknown.
9604 * python/py-record-btrace.c: Include record-btrace.h.
9605 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9606 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9607 * record-btrace.c (record_btrace_cpu_state_kind): New.
9608 (record_btrace_cpu): New.
9609 (set_record_btrace_cpu_cmdlist): New.
9610 (record_btrace_get_cpu): New.
9611 (require_btrace_thread, record_btrace_info)
9612 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9613 (cmd_set_record_btrace_cpu_none): New.
9614 (cmd_set_record_btrace_cpu_auto): New.
9615 (cmd_set_record_btrace_cpu): New.
9616 (cmd_show_record_btrace_cpu): New.
9617 (_initialize_record_btrace): Initialize set/show record btrace cpu
9618 commands.
9619 * record-btrace.h (record_btrace_get_cpu): New.
9620
9621 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9622
9623 * record.c (set_record_command): Fix typo in message.
9624
9625 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9626
9627 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9628
9629 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9630
9631 * infrun.c (process_event_stop_test): Call
9632 gdbarch_in_indirect_branch_thunk.
9633 * gdbarch.sh (in_indirect_branch_thunk): New.
9634 * gdbarch.c: Regenerated.
9635 * gdbarch.h: Regenerated.
9636 * x86-tdep.h: New.
9637 * x86-tdep.c: New.
9638 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9639 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9640 (ALLDEPFILES): Add x86-tdep.c.
9641 * arch-utils.h (default_in_indirect_branch_thunk): New.
9642 * arch-utils.c (default_in_indirect_branch_thunk): New.
9643 * i386-tdep: Include x86-tdep.h.
9644 (i386_in_indirect_branch_thunk): New.
9645 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9646 function.
9647 * amd64-tdep: Include x86-tdep.h.
9648 (amd64_in_indirect_branch_thunk): New.
9649 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9650
9651 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9652
9653 PR gdb/23053
9654 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9655 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9656 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9657 regression.
9658
9659 2018-04-12 Tom Tromey <tom@tromey.com>
9660
9661 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9662 (rust_evaluate_subexp): Likewise.
9663
9664 2018-04-12 Pedro Alves <palves@redhat.com>
9665
9666 * procfs.c (procfs_detach): Make forward declaration's prototype
9667 match definition's protototype.
9668 (proc_get_LDT_entry): Remove stale do_cleanups call.
9669
9670 2018-04-12 Pedro Alves <palves@redhat.com>
9671
9672 * target.h (target_ops::to_has_exited): Delete.
9673 (target_has_exited): Delete.
9674 * target-delegates.c: Regenerate.
9675
9676 2018-04-11 Pedro Alves <palves@redhat.com>
9677
9678 * target.c (fileio_fh_t::t): Add comment.
9679 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9680 (target_fileio_close): Handle a NULL target.
9681 (invalidate_fileio_fh): New.
9682 (target_close): Call it.
9683 * remote.c (remote_hostio_send_command): No longer check whether
9684 remote_desc is open.
9685
9686 2018-04-11 Pedro Alves <palves@redhat.com>
9687
9688 * target.c (fileio_fh_t): Make it a named struct instead of a
9689 typedef.
9690 (fileio_fh_t::is_closed): New method.
9691 (DEF_VEC_O (fileio_fh_t)): Remove.
9692 (fileio_fhandles): Now a std::vector.
9693 (is_closed_fileio_fh): Delete.
9694 (acquire_fileio_fd): Adjust. Rename parameters.
9695 (release_fileio_fd): Adjust.
9696 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9697 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9698 (target_fileio_close): Adjust.
9699
9700 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9701
9702 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9703 index.
9704
9705 2018-04-10 Pedro Alves <palves@redhat.com>
9706
9707 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9708 (scoped_finish_thread_state): New class.
9709 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9710 cleanup.
9711 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9712 (fetch_inferior_event, normal_stop): Likewise.
9713 * thread.c (finish_thread_state_cleanup): Delete.
9714
9715 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9716 Pedro Alves <palves@redhat.com>
9717
9718 * value.c: Include "selftest.h" and "common/array-view.h".
9719 (struct range) <operator ==>: New.
9720 (test_ranges_contain): New.
9721 (check_ranges_vector): New.
9722 (test_insert_into_bit_range_vector): New.
9723 (_initialize_values): Register selftests.
9724 * common/array-view.h (operator==, operator!=): New.
9725
9726 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9727
9728 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9729 an iterator.
9730 * inline-frame.c: Include <algorithm>.
9731 (struct inline_state): Add constructor.
9732 (inline_state_s): Remove.
9733 (DEF_VEC_O(inline_state_s)): Remove.
9734 (inline_states): Change type to std::vector.
9735 (find_inline_frame_state): Adjust to std::vector.
9736 (allocate_inline_frame_state): Remove.
9737 (clear_inline_frame_state): Adjust to std::vector.
9738 (skip_inline_frames): Adjust to std::vector.
9739
9740 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9741
9742 * tracepoint.h (struct trace_state_variable): Add constructor.
9743 <name>: Change type to std::string.
9744 * tracepoint.c (tsv_s): Remove.
9745 (DEF_VEC_O(tsv_s)): Remove.
9746 (tvariables): Change to std::vector.
9747 (create_trace_state_variable): Adjust to std::vector.
9748 (find_trace_state_variable): Likewise.
9749 (find_trace_state_variable_by_number): Likewise.
9750 (delete_trace_state_variable): Likewise.
9751 (trace_variable_command): Adjust to std::string.
9752 (delete_trace_variable_command): Likewise.
9753 (tvariables_info_1): Adjust to std::vector.
9754 (save_trace_state_variables): Likewise.
9755 (start_tracing): Likewise.
9756 (merge_uploaded_trace_state_variables): Adjust to std::vector
9757 and std::string.
9758 * target.h (struct target_ops)
9759 <to_download_trace_state_variable>: Pass reference to
9760 trace_state_variable.
9761 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9762 * target-delegates.c: Re-generate.
9763 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9764 (mi_tsv_deleted): Likewise.
9765 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9766 * remote.c (remote_download_trace_state_variable): Change
9767 pointer to reference and adjust.
9768 * make-target-delegates (parse_argtypes): Handle references.
9769 (write_function_header): Likewise.
9770 (munge_type): Likewise.
9771
9772 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9773
9774 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9775 string_view-selftests.c.
9776 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9777 testsuite.
9778 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9779 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9780 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9781 * unittests/basic_string_view/element_access/char/1.cc:
9782 Likewise.
9783 * unittests/basic_string_view/element_access/char/empty.cc:
9784 Likewise.
9785 * unittests/basic_string_view/element_access/char/front_back.cc:
9786 Likewise.
9787 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9788 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9789 Likewise.
9790 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9791 Likewise.
9792 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9793 Likewise.
9794 * unittests/basic_string_view/operations/compare/char/1.cc:
9795 Likewise.
9796 * unittests/basic_string_view/operations/compare/char/13650.cc:
9797 Likewise.
9798 * unittests/basic_string_view/operations/copy/char/1.cc:
9799 Likewise.
9800 * unittests/basic_string_view/operations/data/char/1.cc:
9801 Likewise.
9802 * unittests/basic_string_view/operations/find/char/1.cc:
9803 Likewise.
9804 * unittests/basic_string_view/operations/find/char/2.cc:
9805 Likewise.
9806 * unittests/basic_string_view/operations/find/char/3.cc:
9807 Likewise.
9808 * unittests/basic_string_view/operations/find/char/4.cc:
9809 Likewise.
9810 * unittests/basic_string_view/operations/rfind/char/1.cc:
9811 Likewise.
9812 * unittests/basic_string_view/operations/rfind/char/2.cc:
9813 Likewise.
9814 * unittests/basic_string_view/operations/rfind/char/3.cc:
9815 Likewise.
9816 * unittests/basic_string_view/operations/substr/char/1.cc:
9817 Likewise.
9818 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9819 * unittests/string_view-selftests.c: New file.
9820
9821 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9822
9823 * unittests/basic_string_view/capacity/1.cc: New file.
9824 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9825 * unittests/basic_string_view/cons/char/1.cc: New file.
9826 * unittests/basic_string_view/cons/char/2.cc: New file.
9827 * unittests/basic_string_view/cons/char/3.cc: New file.
9828 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9829 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9830 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9831 * unittests/basic_string_view/element_access/char/1.cc: New file.
9832 * unittests/basic_string_view/element_access/char/2.cc: New file.
9833 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9834 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9835 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9836 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9837 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9838 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9839 * unittests/basic_string_view/include.cc: New file.
9840 * unittests/basic_string_view/inserters/char/1.cc: New file.
9841 * unittests/basic_string_view/inserters/char/2.cc: New file.
9842 * unittests/basic_string_view/inserters/char/3.cc: New file.
9843 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9844 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9845 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9846 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9847 * unittests/basic_string_view/literals/types.cc: New file.
9848 * unittests/basic_string_view/literals/values.cc: New file.
9849 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9850 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9851 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9852 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9853 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9854 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9855 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9856 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9857 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9858 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9859 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9860 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9861 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9862 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9863 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9864 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9865 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9866 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9867 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9868 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9869 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9870 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9871 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9872 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9873 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9874 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9875 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9876 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9877 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9878 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9879 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9880 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9881 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9882 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9883 * unittests/basic_string_view/operators/char/2.cc: New file.
9884 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9885 * unittests/basic_string_view/range_access/char/1.cc: New file.
9886 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9887 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9888 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9889 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9890 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9891 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9892 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9893 * unittests/basic_string_view/typedefs.cc: New file.
9894 * unittests/basic_string_view/types/1.cc: New file.
9895
9896 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9897
9898 * common/gdb_string_view.h: Remove libstdc++ implementation
9899 details, adjust to gdb reality.
9900 * common/gdb_string_view.tcc: Likewise.
9901 * cli/cli-script.c (struct string_view): Remove.
9902 (user_args) <m_args>: Change element type to gdb::string_view.
9903 (user_args::insert_args): Adjust.
9904
9905 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9906
9907 * common/gdb_string_view.h: New file.
9908 * common/gdb_string_view.tcc: New file.
9909
9910 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9911
9912 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9913 * configure: Re-generate.
9914
9915 2018-04-09 Pedro Alves <palves@redhat.com>
9916
9917 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9918 (set_target_gdbarch): Call
9919 gdb::observers::architecture_changed.notify instead of
9920 observer_notify_architecture_changed.
9921
9922 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9923
9924 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9925 (do_restore_current_traceframe_cleanup): Remove.
9926 (restore_current_traceframe_cleanup_dtor): Remove.
9927 (make_cleanup_restore_current_traceframe): Remove.
9928 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9929 New.
9930 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9931 * infrun.c (fetch_inferior_event): Use
9932 scoped_restore_current_traceframe.
9933
9934 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9935
9936 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9937 Remove.
9938 <n_allocated_type_units>: Remove.
9939 <all_type_units>: Change to std::vector.
9940 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9941 to std::vector change.
9942 (dwarf2_per_objfile::get_cutu): Likewise.
9943 (dwarf2_per_objfile::get_tu): Likewise.
9944 (create_signatured_type_table_from_index): Likewise.
9945 (create_signatured_type_table_from_debug_names): Likewise.
9946 (dw2_symtab_iter_next): Likewise.
9947 (dw2_print_stats): Likewise.
9948 (dw2_expand_all_symtabs): Likewise.
9949 (dw2_expand_marked_cus): Likewise.
9950 (dw2_debug_names_iterator::next): Likewise.
9951 (dwarf2_initialize_objfile): Likewise.
9952 (add_signatured_type_cu_to_table): Likewise.
9953 (create_all_type_units): Likewise.
9954 (add_type_unit): Likewise.
9955 (struct tu_abbrev_offset): Add constructor.
9956 (build_type_psymtabs_1): Adjust to std::vector change.
9957 (print_tu_stats): Likewise.
9958 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9959 (write_debug_names): Likewise.
9960
9961 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9962
9963 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9964 Make an std::vector.
9965 <n_comp_units>: Remove.
9966 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9967 to std::vector change.
9968 (dwarf2_per_objfile::get_cutu): Likewise.
9969 (dwarf2_per_objfile::get_cu): Likewise.
9970 (create_cus_from_index): Likewise.
9971 (create_addrmap_from_index): Likewise.
9972 (create_addrmap_from_aranges): Likewise.
9973 (dwarf2_read_index): Likewise.
9974 (dw2_find_last_source_symtab): Likewise.
9975 (dw2_map_symtabs_matching_filename): Likewise.
9976 (dw2_symtab_iter_next): Likewise.
9977 (dw2_print_stats): Likewise.
9978 (dw2_expand_all_symtabs): Likewise.
9979 (dw2_expand_symtabs_with_fullname): Likewise.
9980 (dw2_expand_marked_cus): Likewise.
9981 (dw2_map_symbol_filenames): Likewise.
9982 (create_cus_from_debug_names): Likewise.
9983 (dwarf2_read_debug_names): Likewise.
9984 (dw2_debug_names_iterator::next): Likewise.
9985 (dwarf2_initialize_objfile): Likewise.
9986 (set_partial_user): Likewise.
9987 (dwarf2_build_psymtabs_hard): Likewise.
9988 (read_comp_units_from_section): Remove arguments, adjust to
9989 std::vector change.
9990 (create_all_comp_units): Adjust to std::vector and
9991 read_comp_units_from_section changes.
9992 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9993 change.
9994 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9995 (psyms_seen_size): Likewise.
9996 (write_gdbindex): Likewise.
9997 (write_debug_names): Likewise.
9998
9999 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10000
10001 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10002 with dwarf2_per_objfile.
10003 (create_cus_from_index): Likewise.
10004 (create_signatured_type_table_from_index): Likewise.
10005 (dwarf2_read_index): Likewise.
10006 (dwarf2_initialize_objfile): Likewise.
10007 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10008 per_cu rather than get_dwarf2_per_objfile.
10009
10010 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10011
10012 * dwarf2read.h (struct signatured_type): Forward declare.
10013 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10014 New methods.
10015 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10016 (dw2_get_cutu): ...this.
10017 (dwarf2_per_objfile::get_cu): Rename from...
10018 (dw2_get_cu): ...this.
10019 (dwarf2_per_objfile::get_tu): New.
10020 (create_addrmap_from_index): Adjust.
10021 (create_addrmap_from_aranges): Adjust.
10022 (dw2_find_last_source_symtab): Adjust.
10023 (dw2_map_symtabs_matching_filename): Adjust.
10024 (dw2_symtab_iter_next): Adjust.
10025 (dw2_print_stats): Adjust.
10026 (dw2_expand_all_symtabs): Adjust.
10027 (dw2_expand_symtabs_with_fullname): Adjust.
10028 (dw2_expand_marked_cus): Adjust.
10029 (dw_expand_symtabs_matching_file_matcher): Adjust.
10030 (dw2_map_symbol_filenames): Adjust.
10031 (dw2_debug_names_iterator::next): Adjust.
10032 (dwarf2_initialize_objfile): Adjust.
10033 (set_partial_user): Adjust.
10034 (dwarf2_build_psymtabs_hard): Adjust.
10035
10036 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10037
10038 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10039 Remove unused variables.
10040 (dw2_map_symtabs_matching_filename): Likewise.
10041 (dwarf2_record_block_ranges): Likewise.
10042 (dwarf2_read_addr_index): Likewise.
10043 (follow_die_offset): Likewise.
10044
10045 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10046
10047 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10048 to symbol_file_add_main.
10049
10050 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10051
10052 PR mi/22299
10053 * mi/mi-console.c (do_fputc_async_safe): New.
10054 (mi_console_file::write_async_safe): New.
10055 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10056 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10057 New.
10058 * ui-file.c (ui_file::putstrn): Adjust call to
10059 fputstrn_unfiltered.
10060 * utils.c (printchar): Replace do_fputs and do_fprintf
10061 parameters by do_fputc.
10062 (fputstr_filtered): Adjust call to printchar.
10063 (fputstr_unfiltered): Likewise.
10064 (fputstrn_filtered): Likewise.
10065 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10066 printchar.
10067 * utils.h (do_fputc_ftype): New typedef.
10068 (fputstrn_unfiltered): Add do_fputc parameter.
10069
10070 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10071
10072 * regformats/i386/i386-avx.dat: Remove.
10073
10074 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10075
10076 PR gdb/22979
10077 * amd64-tdep.c (amd64_none_init_abi): New function.
10078 (amd64_x32_none_init_abi): New function.
10079 (_initialize_amd64_tdep): Register handlers for x86-64 and
10080 x64_32 with GDB_OSABI_NONE.
10081 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10082 GDB_OSABI_NONE osabi.
10083
10084 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10085
10086 PR gdb/22980
10087 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10088 GDB_OSABI_NONE.
10089 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10090 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10091
10092 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10093
10094 * common/byte-vector.h (char_vector): New type.
10095 * target.h (target_read_alloc): Return
10096 gdb::optional<byte_vector>.
10097 (target_read_stralloc): Return gdb::optional<char_vector>.
10098 (target_get_osdata): Return gdb::optional<char_vector>.
10099 * target.c (target_read_alloc_1): Templatize. Replacement
10100 manual memory management with vector.
10101 (target_read_alloc): Change return type, adjust.
10102 (target_read_stralloc): Change return type, adjust.
10103 (target_get_osdata): Change return type, adjust.
10104 * auxv.c (struct auxv_info) <length>: Remove.
10105 <data>: Change type to gdb::optional<byte_vector>.
10106 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10107 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10108 (target_auxv_search): Adjust.
10109 (fprint_target_auxv): Adjust.
10110 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10111 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10112 (linux_make_corefile_notes): Adjust.
10113 * osdata.c (get_osdata): Adjust.
10114 * remote.c (remote_get_threads_with_qxfer): Adjust.
10115 (remote_memory_map): Adjust.
10116 (remote_traceframe_info): Adjust.
10117 (btrace_read_config): Adjust.
10118 (remote_read_btrace): Adjust.
10119 (remote_pid_to_exec_file): Adjust.
10120 * solib-aix.c (solib_aix_get_library_list): Adjust.
10121 * solib-dsbt.c (decode_loadmap): Don't free buf.
10122 (dsbt_get_initial_loadmaps): Adjust.
10123 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10124 * solib-target.c (solib_target_current_sos): Adjust.
10125 * tracepoint.c (sdata_make_value): Adjust.
10126 * xml-support.c (xinclude_start_include): Adjust.
10127 (xml_fetch_content_from_file): Adjust.
10128 * xml-support.h (xml_fetch_another): Change return type.
10129 (xml_fetch_content_from_file): Change return type.
10130 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10131 * xml-tdesc.c (file_read_description_xml): Adjust.
10132 (fetch_available_features_from_target): Change return type.
10133 (target_fetch_description_xml): Adjust.
10134 (target_read_description_xml): Adjust.
10135
10136 2018-04-06 Tom Tromey <tom@tromey.com>
10137
10138 * value.c (~value): Update.
10139 (struct value) <contents>: Now unique_xmalloc_ptr.
10140 (value_contents_bits_eq, allocate_value_contents)
10141 (value_contents_raw, value_contents_all_raw)
10142 (value_contents_for_printing, value_contents_for_printing_const)
10143 (set_value_enclosing_type): Update.
10144
10145 2018-04-06 Tom Tromey <tom@tromey.com>
10146
10147 * value.c (range_s): Remove typedef, VEC.
10148 (struct range): Add operator<.
10149 (range_lessthan): Remove.
10150 (ranges_contain): Change type.
10151 (~value): Update.
10152 (struct value) <unavailable, optimized_out>: Now std::vector.
10153 (value_entirely_available)
10154 (value_entirely_covered_by_range_vector)
10155 (value_entirely_unavailable, value_entirely_optimized_out):
10156 Update.
10157 (insert_into_bit_range_vector): Change argument type.
10158 (find_first_range_overlap): Likewise.
10159 (struct ranges_and_idx, value_contents_bits_eq)
10160 (require_not_optimized_out, require_available): Update.
10161 (ranges_copy_adjusted): Change argument types.
10162 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10163
10164 2018-04-06 Tom Tromey <tom@tromey.com>
10165
10166 * value.c (~value): Update.
10167 (struct value) <parent>: Now a value_ref_ptr.
10168 (value_parent, set_value_parent, value_address, value_copy):
10169 Update.
10170
10171 2018-04-06 Tom Tromey <tom@tromey.com>
10172
10173 * value.c (struct value): Add constructor, destructor, and member
10174 initializers.
10175 (allocate_value_lazy, value_decref): Update.
10176
10177 2018-04-06 Tom Tromey <tom@tromey.com>
10178
10179 * value.c (struct value) <released, next>: Remove.
10180 (all_values): Now a std::vector.
10181 (allocate_value_lazy): Update.
10182 (value_next): Remove.
10183 (value_mark, value_free_to_mark, release_value)
10184 (value_release_to_mark): Update.
10185
10186 2018-04-06 Tom Tromey <tom@tromey.com>
10187
10188 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10189 (free_value_chain): Remove.
10190 * value.c (free_value_chain): Remove.
10191 (value_release_to_mark): Return a std::vector.
10192 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10193 std::vector.
10194 (check_condition): Update.
10195 * eval.c (fetch_subexp_value): Change "val_chain" to a
10196 std::vector.
10197 * breakpoint.c (update_watchpoint): Update.
10198 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10199
10200 2018-04-06 Tom Tromey <tom@tromey.com>
10201
10202 * value.h (free_all_values): Remove.
10203 * value.c (free_all_values): Remove.
10204
10205 2018-04-06 Tom Tromey <tom@tromey.com>
10206
10207 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10208 (value_history_chain, value_history_count): Remove.
10209 (value_history): New global.
10210 (record_latest_value, access_value_history, show_values)
10211 (preserve_values): Update.
10212
10213 2018-04-06 Tom Tromey <tom@tromey.com>
10214
10215 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10216 * varobj.c (varobj_set_display_format, varobj_set_value)
10217 (install_default_visualizer, construct_visualizer)
10218 (install_new_value, ~varobj, varobj_get_value_type)
10219 (my_value_of_variable, varobj_editable_p): Update.
10220 * c-varobj.c (c_describe_child, c_value_of_variable)
10221 (cplus_number_of_children, cplus_describe_child): Update.
10222 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10223 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10224 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10225
10226 2018-04-06 Tom Tromey <tom@tromey.com>
10227
10228 * printcmd.c (last_examine_address): Change type to
10229 value_ref_ptr.
10230 (do_examine, x_command): Update.
10231
10232 2018-04-06 Tom Tromey <tom@tromey.com>
10233
10234 * value.c (release_value): Update.
10235 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10236 (struct bpstats) <val>: Now a value_ref_ptr.
10237 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10238 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10239 (~watchpoint, print_it_watchpoint, watch_command_1)
10240 (invalidate_bp_value_on_memory_change): Update.
10241
10242 2018-04-06 Tom Tromey <tom@tromey.com>
10243
10244 * varobj.c (varobj_clear_saved_item)
10245 (update_dynamic_varobj_children, install_new_value, ~varobj):
10246 Update.
10247 * value.h (value_incref): Move declaration earlier.
10248 (value_decref): Rename from value_free.
10249 (struct value_ref_policy): New.
10250 (value_ref_ptr): New typedef.
10251 (struct value_deleter): Remove.
10252 (gdb_value_up): Remove typedef.
10253 (release_value): Change return type.
10254 (release_value_or_incref): Remove.
10255 * value.c (set_value_parent): Update.
10256 (value_incref): Change return type.
10257 (value_decref): Rename from value_free.
10258 (value_free_to_mark, free_all_values, free_value_chain): Update.
10259 (release_value): Return value_ref_ptr.
10260 (release_value_or_incref): Remove.
10261 (record_latest_value, set_internalvar, clear_internalvar):
10262 Update.
10263 * stack.c (info_frame_command): Don't call value_free.
10264 * python/py-value.c (valpy_dealloc, valpy_new)
10265 (value_to_value_object): Update.
10266 * printcmd.c (do_examine): Update.
10267 * opencl-lang.c (lval_func_free_closure): Update.
10268 * mi/mi-main.c (register_changed_p): Don't call value_free.
10269 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10270 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10271 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10272 value_free.
10273 * guile/scm-value.c (vlscm_free_value_smob)
10274 (vlscm_scm_from_value): Update.
10275 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10276 (frame_unwind_register_unsigned, get_frame_register_bytes)
10277 (put_frame_register_bytes): Don't call value_free.
10278 * findvar.c (address_from_register): Don't call value_free.
10279 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10280 * dwarf2loc.c (entry_data_value_free_closure)
10281 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10282 (dwarf2_evaluate_loc_desc_full): Update.
10283 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10284 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10285 (~watchpoint, watch_command_1)
10286 (invalidate_bp_value_on_memory_change): Update.
10287 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10288
10289 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10290
10291 PR gdb/23022
10292 * warning.m4: Add -Wno-error=deprecated-register.
10293 * configure: Re-generate.
10294
10295 2018-04-05 Tom Tromey <tom@tromey.com>
10296
10297 * linespec.h: Remove include of "vec.h".
10298
10299 2018-04-05 Tom Tromey <tom@tromey.com>
10300
10301 * linespec.c (typep): Remove typedef.
10302 (find_methods, find_superclass_methods): Take a std::vector.
10303 (find_method): Use std::vector.
10304
10305 2018-04-05 Tom Tromey <tom@tromey.com>
10306
10307 * utils.c (compare_strings): Remove.
10308 * utils.h (compare_strings): Remove.
10309 * objc-lang.h (find_imps): Update.
10310 * objc-lang.c (find_methods): Take a std::vector.
10311 (uniquify_strings, find_imps): Likewise.
10312 * linespec.c (find_methods): Take a std::vector.
10313 (decode_objc): Use std::vector.
10314 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10315 a std::vector.
10316 (find_method, find_function_symbols): Use std::vector.
10317
10318 2018-04-05 Tom Tromey <tom@tromey.com>
10319
10320 * completer.c (completion_tracker::completion_tracker): Remove
10321 cast.
10322 (completion_tracker::discard_completions): Likewise.
10323 * breakpoint.c (ambiguous_names_p): Remove cast.
10324 * ada-lang.c (_initialize_ada_language): Remove cast.
10325 * utils.h (streq): Update.
10326 (streq_hash): Add new declaration.
10327 * utils.c (streq): Return bool.
10328 (streq_hash): New function.
10329
10330 2018-04-05 Tom Tromey <tom@tromey.com>
10331
10332 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10333 Remove a string copy.
10334
10335 2018-04-05 Tom Tromey <tom@tromey.com>
10336
10337 * linespec.c (filter_results): Use std::vector.
10338 (decode_line_2, decode_line_full): Update.
10339
10340 2018-04-05 Tom Tromey <tom@tromey.com>
10341
10342 * linespec.c (canonical_to_fullform): Return std::string.
10343 (filter_results): Update.
10344 (struct decode_line_2_item): Add constructor.
10345 <fullform, displayform>: Now std::string.
10346 (decode_line_2_compare_items): Now a std::sort comparator.
10347 (decode_line_2): Update.
10348
10349 2018-04-05 Tom Tromey <tom@tromey.com>
10350
10351 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10352 (unexpected_linespec_error): Update.
10353 (linespec_parse_basic, parse_linespec): Update.
10354
10355 2018-04-05 Tom Tromey <tom@tromey.com>
10356
10357 * linespec.c (linespec_parse_basic): Reindent.
10358
10359 2018-04-05 Tom Tromey <tom@tromey.com>
10360
10361 * minsyms.h (iterate_over_minimal_symbols): Update.
10362 * minsyms.c (iterate_over_minimal_symbols): Take a
10363 gdb::function_view.
10364 * linespec.c (struct collect_minsyms): Remove.
10365 (compare_msyms): Now a std::sort comparator.
10366 (add_minsym): Add parameters.
10367 (search_minsyms_for_name): Update. Use std::vector.
10368
10369 2018-04-03 Tom Tromey <tom@tromey.com>
10370
10371 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10372 gdb::byte_vector.
10373
10374 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10375
10376 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10377
10378 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10379
10380 PR gdb/16959
10381 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10382 printing static type.
10383
10384 2018-04-01 Tom Tromey <tom@tromey.com>
10385
10386 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10387 (rs6000_xfer_shared_libraries): Update.
10388
10389 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10390
10391 * common/gdb_vecs.h (char_ptr): Remove.
10392 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10393
10394 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10395
10396 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10397 with std::vector.
10398 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10399
10400 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10401
10402 * tracepoint.h (struct uploaded_tp): Initialize fields.
10403 <actions, step_actions, cmd_strings>: Change type to
10404 std::vector<char *>.
10405 * tracepoint.c (get_uploaded_tp): Allocate with new.
10406 (free_uploaded_tps): Free with delete.
10407 (parse_tracepoint_definition): Adjust to std::vector change.
10408 * breakpoint.c (read_uploaded_action): Likewise.
10409 (create_tracepoint_from_upload): Likewise.
10410 * ctf.c (ctf_write_uploaded_tp): Likewise.
10411 (SET_ARRAY_FIELD): Likewise.
10412 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10413
10414 2018-03-30 Tom Tromey <tom@tromey.com>
10415
10416 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10417 std::unique_ptr.
10418 (svr4_keep_data_in_core): Update.
10419 (svr4_read_so_list): Update.
10420
10421 2018-03-30 Tom Tromey <tom@tromey.com>
10422
10423 * windows-nat.c (handle_output_debug_string, handle_exception):
10424 Update.
10425 * target.h (target_read_string): Update.
10426 * target.c (target_read_string): Change "string" to
10427 unique_xmalloc_ptr.
10428 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10429 Update.
10430 * solib-frv.c (frv_current_sos): Update.
10431 * solib-dsbt.c (dsbt_current_sos): Update.
10432 * solib-darwin.c (darwin_current_sos): Update.
10433 * linux-thread-db.c (inferior_has_bug): Update.
10434 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10435 Update. Remove alloca.
10436 * ada-lang.c (ada_main_name): Update.
10437
10438 2018-03-30 Tom Tromey <tom@tromey.com>
10439
10440 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10441 (struct dwo_file_deleter): New.
10442 (dwo_file_up): New typedef.
10443 (open_and_init_dwo_file): Use dwo_file_up.
10444 (free_dwo_file_cleanup): Remove.
10445
10446 2018-03-30 Tom Tromey <tom@tromey.com>
10447
10448 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10449 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10450
10451 2018-03-30 Tom Tromey <tom@tromey.com>
10452
10453 * dwarf2read.c (class free_cached_comp_units): New class.
10454 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10455 (free_cached_comp_units): Remove function.
10456
10457 2018-03-30 Tom Tromey <tom@tromey.com>
10458
10459 * utils.h (make_cleanup_unpush_target): Remove.
10460 * inf-ptrace.c (struct target_unpusher): New.
10461 (target_unpush_up) New typedef.
10462 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10463 target_unpush_up.
10464 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10465
10466 2018-03-27 Tom Tromey <tom@tromey.com>
10467
10468 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10469
10470 2018-03-27 Pedro Alves <palves@redhat.com>
10471 Tom Tromey <tom@tromey.com>
10472
10473 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10474 destructor. Now a class.
10475 (gdb_readline_wrapper_cleanup): Remove function.
10476 (gdb_readline_wrapper): Remove cleanups.
10477
10478 2018-03-27 Tom Tromey <tom@tromey.com>
10479
10480 * typeprint.h (struct type_print_options) <local_typedefs,
10481 global_typedefs>: Remove "struct" keyword.
10482 (class typedef_hash_table): New class.
10483 (recursively_update_typedef_hash, add_template_parameters)
10484 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10485 (find_typedef_in_hash): Don't declare.
10486 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10487 (typedef_hash_table::recursively_update): Rename from
10488 recursively_update_typedef_hash. Now a member.
10489 (typedef_hash_table::add_template_parameters): Rename from
10490 add_template_parameters. Now a member.
10491 (typedef_hash_table::typedef_hash_table): Now a constructor;
10492 rename from create_typedef_hash.
10493 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10494 rename from free_typedef_hash.
10495 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10496 (do_free_global_table): Remove.
10497 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10498 from copy_type_recursive.
10499 (create_global_typedef_table): Remove.
10500 (typedef_hash_table::find_global_typedef): Now a member of
10501 typedef_hash_table.
10502 (typedef_hash_table::find_typedef): Rename from
10503 find_typedef_in_hash; now a member.
10504 (whatis_exp): Update.
10505 * extension.h (struct ext_lang_type_printers): Add constructor and
10506 destructor.
10507 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10508 declare.
10509 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10510 Now a constructor; rename from start_ext_lang_type_printers.
10511 (ext_lang_type_printers): Now a destructor; rename from
10512 free_ext_lang_type_printers.
10513 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10514 Update.
10515 (c_type_print_base_struct_union): Update. Remove cleanups.
10516
10517 2018-03-27 Tom Tromey <tom@tromey.com>
10518
10519 * dwarf-index-write.c: Include <cmath>.
10520
10521 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10522
10523 * NEWS: Add entry describing new "set|show varsize-limit" command.
10524 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10525 command.
10526 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10527 "set variable".
10528
10529 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10530
10531 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10532 dwarf-index-write.c
10533 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10534 * dwarf-index-common.c: New file.
10535 * dwarf-index-common.h: New file.
10536 * dwarf-index-write.c: New file.
10537 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10538 (struct dwarf2_section_info): Move from here.
10539 (dwarf2_section_info_def): Likewise.
10540 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10541 (offset_type): Likewise.
10542 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10543 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10544 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10545 (byte_swap): Likewise.
10546 (MAYBE_SWAP): Likewise.
10547 (dwarf2_per_cu_ptr): Likewise.
10548 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10549 (struct tu_stats): Likewise.
10550 (struct dwarf2_per_objfile): Likewise.
10551 (struct dwarf2_per_cu_data): Likewise.
10552 (struct signatured_type): Likewise.
10553 (sig_type_ptr): Likewise.
10554 (DEF_VEC_P (sig_type_ptr)): Likewise.
10555 (INDEX4_SUFFIX): Likewise.
10556 (INDEX5_SUFFIX): Likewise.
10557 (DEBUG_STR_SUFFIX): Likewise.
10558 (dwarf2_read_section): Make non-static.
10559 (mapped_index_string_hash): Move from here.
10560 (dwarf5_djb_hash): Likewise.
10561 (file_write): Likewise.
10562 (class data_buf): Likewise.
10563 (struct symtab_index_entry): Likewise.
10564 (struct mapped_symtab): Likewise.
10565 (find_slot): Likewise.
10566 (hash_expand): Likewise.
10567 (add_index_entry): Likewise.
10568 (uniquify_cu_indices): Likewise.
10569 (class c_str_view): Likewise.
10570 (class c_str_view_hasher): Likewise.
10571 (class vector_hasher): Likewise.
10572 (write_hash_table): Likewise.
10573 (psym_index_map): Likewise.
10574 (struct addrmap_index_data): Likewise.
10575 (add_address_entry): Likewise.
10576 (add_address_entry_worker): Likewise.
10577 (write_address_map): Likewise.
10578 (symbol_kind): Likewise.
10579 (write_psymbols): Likewise.
10580 (struct signatured_type_index_data): Likewise.
10581 (write_one_signatured_type): Likewise.
10582 (recursively_count_psymbols): Likewise.
10583 (recursively_write_psymbols): Likewise.
10584 (class debug_names): Likewise.
10585 (check_dwarf64_offsets): Likewise.
10586 (psyms_seen_size): Likewise.
10587 (write_gdbindex): Likewise.
10588 (write_debug_names): Likewise.
10589 (assert_file_size): Likewise.
10590 (write_psymtabs_to_index): Likewise.
10591 (save_gdb_index_command): Likewise.
10592 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10593 command.
10594 * dwarf2read.h: New file.
10595
10596 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10597
10598 PR gdb/22670
10599 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10600 symbol name if the CU's language stores symbol names in linkage
10601 format.
10602 * language.h (struct language_defn)
10603 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10604 all instances of this struct.
10605
10606 2018-03-26 Tom Tromey <tom@tromey.com>
10607
10608 * stack.c (backtrace_command_1): Remove verbose code.
10609
10610 2018-03-26 Tom Tromey <tom@tromey.com>
10611
10612 * python/py-framefilter.c (py_print_type): Don't catch
10613 exceptions. Return void.
10614 (py_print_value): Likewise.
10615 (py_print_single_arg): Likewise.
10616 (enumerate_args): Don't catch exceptions.
10617 (py_print_args): Likewise.
10618 (py_print_frame): Likewise.
10619 (gdbpy_apply_frame_filter): Catch exceptions here.
10620
10621 2018-03-26 Tom Tromey <tom@tromey.com>
10622
10623 * stack.c (_initialize_stack): Remove trailing newlines from help
10624 text. Add "Usage" line to "backtrace" help.
10625
10626 2018-03-26 Tom Tromey <tom@tromey.com>
10627
10628 PR python/16486:
10629 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10630
10631 2018-03-26 Tom Tromey <tom@tromey.com>
10632
10633 * python/py-framefilter.c (py_print_single_arg): Return
10634 EXT_LANG_BT_ERROR from catch.
10635
10636 2018-03-26 Tom Tromey <tom@tromey.com>
10637
10638 PR backtrace/15584:
10639 * stack.c (backtrace_command_1): Move some code into no-filters
10640 "if".
10641
10642 2018-03-26 Tom Tromey <tom@tromey.com>
10643
10644 * python/py-framefilter.c (throw_quit_or_print_exception): New
10645 function.
10646 (gdbpy_apply_frame_filter): Use it.
10647
10648 2018-03-26 Tom Tromey <tom@tromey.com>
10649
10650 PR cli/17716:
10651 * python/py-framefilter.c (py_print_type, py_print_value)
10652 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10653 RETURN_MASK_ERROR.
10654
10655 2018-03-26 Tom Tromey <tom@tromey.com>
10656
10657 * python/py-framefilter.c (enumerate_args): Use
10658 gdb::unique_xmalloc_ptr.
10659
10660 2018-03-26 Tom Tromey <tom@tromey.com>
10661
10662 * python/py-framefilter.c (py_print_frame): Return
10663 EXT_LANG_BT_OK.
10664 (gdbpy_apply_frame_filter): Update comment.
10665 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10666 Remove.
10667 <EXT_LANG_BT_NO_FILTERS>: Change value.
10668
10669 2018-03-26 Tom Tromey <tom@tromey.com>
10670
10671 PR backtrace/15582:
10672 * stack.c (backtrace_command): Parse "hide" argument.
10673 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10674 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10675 constant.
10676
10677 2018-03-26 Tom Tromey <tom@tromey.com>
10678
10679 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10680 add "flags".
10681 (backtrace_command): Remove "fulltrace", add "flags".
10682
10683 2018-03-26 Tom Tromey <tom@tromey.com>
10684
10685 * stack.c (backtrace_command): Rewrite command line parsing.
10686
10687 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10688
10689 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10690
10691 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10692
10693 * filename-seen-cache.h: Add include guard.
10694
10695 2018-03-26 Keith Seitz <keiths@redhat.com>
10696
10697 * symfile.c (place_section): Remove "struct" from section_addr_info
10698 in comment.
10699 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10700 "struct" keyword from section_addr_info.
10701
10702 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10703
10704 * regformats/regdef.h (reg): Add constructors.
10705
10706 2018-03-25 Pedro Alves <palves@redhat.com>
10707
10708 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10709 if then/else bodies in var_func_name extraction.
10710
10711 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10712
10713 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10714 lookup_minimal_symbol() to find symbol entry.
10715 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10716
10717 2018-03-23 Keith Seitz <keiths@redhat.com>
10718
10719 PR c++/22968
10720 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10721 nested type definitions for C++, too.
10722
10723 2018-03-23 Tom Tromey <tom@tromey.com>
10724
10725 * machoread.c (struct oso_el): Add a constructor. Don't define as
10726 a typedef.
10727 (macho_register_oso): Remove.
10728 (macho_symtab_read): Take a std::vector.
10729 (oso_el_compare_name): Now a std::sort comparator.
10730 (macho_symfile_read_all_oso): Take a std::vector.
10731 (macho_symfile_read): Use std::vector. Remove cleanups.
10732
10733 2018-03-22 Tom Tromey <tom@tromey.com>
10734
10735 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10736 (record_full_goto_bookmark): Use std::string.
10737
10738 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10739
10740 PR tdep/18295
10741 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10742 a single mask.
10743
10744 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10745
10746 * rs6000-tdep.c (store_insn_p): New function.
10747 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10748 and cr_reg to their unshifted values. Use store_insn_p to
10749 match LR saves using either R1 or fdata->alloca_reg. Use
10750 store_insn_p to match CR saves. Set alloca_reg_offset
10751 when alloca_reg and framep are set. Remove lr_reg shift
10752 when assigning to fdata->lr_register.
10753
10754 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10755
10756 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10757 command line args instead of emitting a warning.
10758
10759 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10760
10761 * tracepoint.h (struct static_tracepoint_marker): Initialize
10762 fields, define default constructor, move constructor and move
10763 assignment, disable the rest.
10764 <str_id, extra>: Make std::string.
10765 (release_static_tracepoint_marker): Remove.
10766 (free_current_marker): Remove.
10767 * tracepoint.c (free_current_marker): Remove.
10768 (parse_static_tracepoint_marker_definition): Adjust to
10769 std::string, use new hex2str overload.
10770 (release_static_tracepoint_marker): Remove.
10771 (print_one_static_tracepoint_marker): Get marker by reference
10772 and adjust to std::string.
10773 (info_static_tracepoint_markers_command): Adjust to std::vector
10774 changes
10775 * target.h (static_tracepoint_marker_p): Remove typedef.
10776 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10777 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10778 bool.
10779 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10780 * target-debug.h
10781 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10782 (target_debug_print_std_vector_static_tracepoint_marker): New.
10783 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10784 to...
10785 (target_debug_print_static_tracepoint_marker_p): ... this.
10786 * target-delegates.c: Re-generate.
10787 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10788 Make std::string.
10789 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10790 (decode_static_tracepoint_spec): Adjust to std::vector.
10791 (tracepoint_print_one_detail): Adjust to std::string.
10792 (strace_marker_decode_location): Adjust to std::string.
10793 (update_static_tracepoint): Adjust to std::string, remove call
10794 to release_static_tracepoint_marker.
10795 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10796 Adjust to std::vector.
10797 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10798 (remote_static_tracepoint_markers_by_strid): Adjust to
10799 std::vector.
10800 * common/rsp-low.h (hex2str): New overload with explicit count
10801 of bytes.
10802 * common/rsp-low.c (hex2str): New overload with explicit count
10803 of bytes.
10804 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10805 (_initialize_rsp_low_selftests): Add test_hex2str test.
10806 * unittests/tracepoint-selftests.c
10807 (test_parse_static_tracepoint_marker_definition): Adjust to
10808 std::string.
10809
10810 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10811
10812 * tracepoint.c (parse_static_tracepoint_marker_definition):
10813 Consider case where the definition is followed by more
10814 definitions.
10815 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10816 tracepoint-selftests.c.
10817 * unittests/tracepoint-selftests.c: New.
10818
10819 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10820
10821 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10822 Carvalho.
10823
10824 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10825
10826 * symtab.c (find_pc_sect_line): fixed indentation.
10827
10828 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10829
10830 * symtab.c (find_pc_sect_line): now uses binary search.
10831
10832 2018-03-19 Tom Tromey <tom@tromey.com>
10833
10834 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10835 "IDENT" production.
10836
10837 2018-03-19 Pedro Alves <palves@redhat.com>
10838 Tom Tromey <tom@tromey.com>
10839
10840 * unittests/observable-selftests.c: New file.
10841 * common/observable.h: New file.
10842 * observable.h: New file.
10843 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10844 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10845 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10846 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10847 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10848 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10849 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10850 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10851 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10852 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10853 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10854 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10855 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10856 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10857 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10858 tui/tui-interp.c, valops.c: Update all users.
10859 * tui/tui-hooks.c (tui_bp_created_observer)
10860 (tui_bp_deleted_observer, tui_bp_modified_observer)
10861 (tui_inferior_exit_observer, tui_before_prompt_observer)
10862 (tui_normal_stop_observer, tui_register_changed_observer):
10863 Remove.
10864 (tui_observers_token): New global.
10865 (attach_or_detach, tui_attach_detach_observers): New functions.
10866 (tui_install_hooks, tui_remove_hooks): Use
10867 tui_attach_detach_observers.
10868 * record-btrace.c (record_btrace_thread_observer): Remove.
10869 (record_btrace_thread_observer_token): New global.
10870 * observer.sh: Remove.
10871 * observer.c: Rename to observable.c.
10872 * observable.c (namespace gdb_observers): Define new objects.
10873 (observer_debug): Move into gdb_observers namespace.
10874 (struct observer, struct observer_list, xalloc_observer_list_node)
10875 (xfree_observer_list_node, generic_observer_attach)
10876 (generic_observer_detach, generic_observer_notify): Remove.
10877 (_initialize_observer): Update.
10878 Don't include observer.inc.
10879 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10880 (clean mostlyclean): Likewise.
10881 (observer.h, observer.inc): Remove targets.
10882 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10883 (COMMON_SFILES): Use observable.c, not observer.c.
10884 * .gitignore: Remove observer.h.
10885
10886 2018-03-18 Tom Tromey <tom@tromey.com>
10887
10888 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10889 gdb::def_vector.
10890 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10891
10892 2018-03-17 Tom Tromey <tom@tromey.com>
10893
10894 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10895
10896 2018-03-17 Tom Tromey <tom@tromey.com>
10897
10898 * target.c (class scoped_target_fd): New.
10899 (target_fileio_close_cleanup): Remove.
10900 (target_fileio_read_alloc_1): Use scoped_target_fd.
10901
10902 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10903
10904 * silent-rules.mk: New.
10905 * Makefile.in: Include silent-rules.mk
10906 (srcdir, VPATH, top_srcdir): Move up.
10907 (COMPILE): Add ECHO_CXX.
10908 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10909 (init.c): Add ECHO_INIT_C.
10910 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10911 (version.c): Add ECHO_GEN.
10912 (printcmd.o): Add ECHO_CXX.
10913 (target-float.o): Add ECHO_CXX.
10914 (ada-exp.o): Add ECHO_CXX.
10915 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10916 (insight$(EXEEXT)): Add ECHO_CXXLD.
10917 * gnulib/configure.ac: Add AM_SILENT_RULES.
10918 * gnulib/aclocal.m4: Re-generate.
10919 * gnulib/configure: Re-generate.
10920 * gnulib/import/Makefile.in: Re-generate.
10921
10922 2018-03-16 Tom Tromey <tom@tromey.com>
10923
10924 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10925 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10926 * utils.c (do_free_section_addr_info)
10927 (make_cleanup_free_section_addr_info): Remove.
10928 * symfile.h (struct other_sections): Add constructor.
10929 (struct section_addr_info): Remove.
10930 (section_addr_info): New typedef.
10931 (struct sym_fns) <sym_offsets>: Change type of parameter.
10932 (build_section_addr_info_from_objfile)
10933 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10934 (default_symfile_offsets, symbol_file_add)
10935 (symbol_file_add_from_bfd)
10936 (build_section_addr_info_from_section_table): Update.
10937 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10938 * symfile.c (alloc_section_addr_info): Remove.
10939 (build_section_addr_info_from_section_table): Change return type.
10940 Update.
10941 (build_section_addr_info_from_bfd)
10942 (build_section_addr_info_from_objfile): Likewise.
10943 (free_section_addr_info): Remove.
10944 (relative_addr_info_to_section_offsets): Change type of "addrs".
10945 (addrs_section_compar): Now a std::sort comparator.
10946 (addrs_section_sort): Change return type.
10947 (addr_info_make_relative): Change type of "addrs". Update.
10948 (default_symfile_offsets, syms_from_objfile_1)
10949 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10950 (symbol_file_add_separate): Update.
10951 (symbol_file_add): Change type of "addrs". Update.
10952 (add_symbol_file_command): Update. Remove cleanups.
10953 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10954 cleanups.
10955 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10956 * solib.c (solib_read_symbols): Update.
10957 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10958 * machoread.c (macho_symfile_offsets): Update.
10959 * jit.c (jit_bfd_try_read_symtab): Update.
10960
10961 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10962
10963 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10964 unittests/utils-selftests.c.
10965 * unittests/utils-selftests.c: New file.
10966
10967 2018-03-14 Tom Tromey <tom@tromey.com>
10968
10969 PR cli/14977:
10970 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10971 for NULL.
10972
10973 2018-03-14 Tom Tromey <tom@tromey.com>
10974
10975 PR cli/19918:
10976 * printcmd.c (printf_pointer): Allow "-" in format.
10977
10978 2018-03-14 Tom Tromey <tom@tromey.com>
10979
10980 * printcmd.c (_initialize_printcmd): Add usage to printf.
10981
10982 2018-03-14 Yao Qi <qiyao@sourceware.org>
10983
10984 * MAINTAINERS: Update my email address.
10985
10986 2018-03-13 Tom Tromey <tom@tromey.com>
10987
10988 * machoread.c (macho_check_dsym): Change filenamep to a
10989 std::string*.
10990 (macho_symfile_read): Update.
10991 * symfile.c (load_command): Use std::string.
10992
10993 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10994
10995 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10996 to error message string.
10997 (riscv_register_name): Use xsnprintf instead of sprintf.
10998 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10999 internal_error.
11000 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11001 error.
11002 (riscv_push_dummy_call): Likewise.
11003
11004 2018-03-12 Tom Tromey <tom@tromey.com>
11005
11006 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11007 Use gdb::byte_vector.
11008 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11009
11010 2018-03-12 Yao Qi <yao.qi@linaro.org>
11011
11012 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11013 parameter type to readable_regcache.
11014 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11015 the declaration.
11016
11017 2018-03-11 Tom Tromey <tom@tromey.com>
11018
11019 * dwarf2read.c (struct nextfield): Add initializers.
11020 (struct nextfnfield): Remove.
11021 (struct fnfieldlist): Add initializers. Remove "length" and
11022 "head", use std::vector.
11023 (struct decl_field_list): Remove.
11024 (struct field_info): Add initializers.
11025 <fields, baseclasses>: Now std::vector.
11026 <nbaseclasses, nfnfields, typedef_field_list_count,
11027 nested_types_list_count>: Remove.
11028 (dwarf2_add_field, dwarf2_add_type_defn)
11029 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11030 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11031 (process_structure_scope): Update.
11032
11033 2018-03-11 Tom Tromey <tom@tromey.com>
11034
11035 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11036 for use by std::sort.
11037 (build_type_psymtabs_1): Use std::vector.
11038
11039 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11040
11041 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11042 and LIBMPFR in the printed configuration.
11043
11044 2018-03-08 Tom Tromey <tom@tromey.com>
11045
11046 * source.c (get_filename_and_charpos): Use scoped_fd.
11047 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11048 (procfs_pidlist): Likewise.
11049 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11050 (iterate_over_mappings): Likewise.
11051
11052 2018-03-08 Tom Tromey <tom@tromey.com>
11053
11054 * infcall.c (struct call_return_meta_info)
11055 <stack_temporaries_enabled>: Remove.
11056 (get_call_return_value, call_function_by_hand_dummy): Update.
11057 * thread.c (disable_thread_stack_temporaries): Remove.
11058 (enable_thread_stack_temporaries): Remove.
11059 (thread_stack_temporaries_enabled_p): Return bool.
11060 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11061 (get_last_thread_stack_temporary): Update.
11062 * eval.c (evaluate_subexp): Update.
11063 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11064 class, not a function.
11065 (value_ptr, value_vec): Remove typedefs.
11066 (class thread_info) <stack_temporaries_enabled>: Now bool.
11067 <stack_temporaries>: Now a std::vector.
11068 (thread_stack_temporaries_enabled_p)
11069 (value_in_thread_stack_temporaries): Return bool.
11070
11071 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11072
11073 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11074 (getpkt_or_notif_sane_1): Likewise.
11075
11076 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11077
11078 * build-id.c (build_id_to_debug_bfd): Use std::string.
11079
11080 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11081
11082 * build-id.c (find_separate_debug_file_by_buildid): Return
11083 std::string.
11084 * build-id.h (find_separate_debug_file_by_buildid): Return
11085 std::string.
11086 * coffread.c (coff_symfile_read): Adjust to std::string.
11087 * elfread.c (elf_symfile_read): Adjust to std::string.
11088 * symfile.c (separate_debug_file_exists): Change parameter to
11089 std::string.
11090 (find_separate_debug_file): Return std::string.
11091 (find_separate_debug_file_by_debuglink): Return std::string.
11092 * symfile.h (find_separate_debug_file_by_debuglink): Return
11093 std::string.
11094
11095 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11096
11097 * common/xml-utils.c (xml_escape_text): Move code to...
11098 (xml_escape_text_append): ... this new function.
11099 * common/xml-utils.h (xml_escape_text_append): New declaration.
11100 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11101 New function.
11102 (_initialize_xml_utils): register test_xml_escape_text_append as
11103 a selftest.
11104
11105 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11106
11107 * defs.h: Remove MAX_REGISTER_SIZE.
11108 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11109 asserts.
11110 * python/py-unwind.c (pyuw_sniffer): Likewise.
11111
11112 2018-03-07 Tom Tromey <tom@tromey.com>
11113
11114 * linux-tdep.c (linux_info_proc): Update.
11115 * target.h (struct target_ops) <to_fileio_readlink>: Return
11116 optional<string>.
11117 (target_fileio_readlink): Return optional<string>.
11118 * remote.c (remote_hostio_readlink): Return optional<string>.
11119 * inf-child.c (inf_child_fileio_readlink): Return
11120 optional<string>.
11121 * target.c (target_fileio_readlink): Return optional<string>.
11122
11123 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11124
11125 * regcache.c (cooked_read_test): Add riscv to the list of
11126 architectures that have a save_reggroup.
11127
11128 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11129
11130 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11131 value is not a dynamic class object.
11132
11133 2018-03-06 Tom Tromey <tom@tromey.com>
11134
11135 * rust-exp.y: Formatting fixes.
11136
11137 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11138
11139 * riscv-tdep.c (riscv_register_name): Remove target description
11140 support.
11141 (riscv_gdbarch_init): Remove target description check.
11142
11143 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11144
11145 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11146 comment.
11147 * riscv-tdep.h: Likewise.
11148
11149 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11150
11151 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11152 (riscv_pseudo_register_write): Delete.
11153 (riscv_gdbarch_init): Remove all use of pseudo registers.
11154
11155 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11156
11157 * record-btrace.c (btrace_print_lines): Replace cleanup
11158 parameter with RAII equivalents.
11159 (btrace_insn_history): Replace cleanup with RAII equivalents.
11160 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11161 make_cleanup_ui_out_tuple_begin_end): Remove.
11162 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11163 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11164 make_cleanup_ui_out_list_begin_end): Remove.
11165
11166 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11167
11168 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11169 parameter types to std::vector. Use bool.
11170 (record_btrace_wait): Replace VEC(tp_t) with
11171 std::vector<thread_info *>.
11172 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11173
11174 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11175
11176 * record-btrace.c (record_btrace_disable_callback): Remove.
11177 (struct scoped_btrace_disable): New.
11178 (record_btrace_open): Use scoped_btrace_disable.
11179
11180 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11181
11182 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11183 reading values from registers.
11184
11185 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11186
11187 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11188 where appropriate.
11189
11190 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11191
11192 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11193 change parameter type. Use GDB's print functions, and use
11194 core_addr_to_string where appropriate.
11195 (riscv_push_dummy_call): Use core_addr_to_string where
11196 appropriate, update call to riscv_print_arg_location, and reindent
11197 a few lines.
11198 (riscv_return_value): Update call to riscv_print_arg_location.
11199
11200 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11201 Tim Newsome <tim@sifive.com>
11202 Albert Ou <a0u@eecs.berkeley.edu>
11203 Darius Rad <darius@bluespec.com>
11204
11205 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11206 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11207 (ALLDEPFILES): Add riscv-tdep.c
11208 * configure.tgt: Add riscv support.
11209 * riscv-tdep.c: New file.
11210 * riscv-tdep.h: New file.
11211 * NEWS: Mention new target.
11212 * MAINTAINERS: Add entry for riscv.
11213
11214 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11215
11216 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11217 fields within aggregates.
11218
11219 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11220
11221 * record-btrace.c (btrace_print_lines): Change type of flags to
11222 gdb_disassembly_flags.
11223
11224 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11225
11226 * fbsd-nat.c: Include "inf-ptrace.h".
11227 (USE_SIGTRAP_SIGINFO): Conditionally define.
11228 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11229 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11230 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11231 function.
11232 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11233 Likewise.
11234 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11235 Likewise.
11236 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11237 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11238 "supports_stopped_by_hw_breakpoint" target methods.
11239
11240 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11241
11242 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11243 * fbsd-nat.c (debug_fbsd_nat): New variable.
11244 (show_fbsd_nat_debug): New function.
11245 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11246 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11247
11248 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11249
11250 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11251 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11252 prototype.
11253 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11254 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11255 method.
11256
11257 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11258
11259 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11260 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11261
11262 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11263
11264 * charset.c (struct charset_vector): New.
11265 (charsets): Change type to charset_vector.
11266 (find_charset_names): Adjust.
11267 (add_one): Adjust.
11268 (_initialize_charset): Adjust.
11269
11270 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11271
11272 * progspace.h (struct program_space) <deleted_solibs>: Change
11273 type to std::vector<std::string>.
11274 * progspace.c (clear_program_space_solib_cache): Adjust.
11275 * breakpoint.c (print_solib_event): Adjust.
11276 (check_status_catch_solib): Adjust.
11277 * solib.c (update_solib_list): Adjust.
11278 * ui-out.h (class ui_out) <field_string>: New overload.
11279 * ui-out.c (ui_out::field_string): New overload.
11280
11281 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11282
11283 * progspace.h (struct program_space): Add constructor and
11284 destructor, initialize fields.
11285 (add_program_space): Remove.
11286 * progspace.c (add_program_space): Rename to...
11287 (program_space::program_space): ... this.
11288 (release_program_space): Rename to...
11289 (program_space::~program_space): ... this.
11290 (delete_program_space): Use delete to delete program_space.
11291 (initialize_progspace): Use new to allocate program_space.
11292 * inferior.c (add_inferior_with_spaces): Likewise.
11293 (clone_inferior_command): Likewise.
11294 * infrun.c (follow_fork_inferior): Likewise.
11295 (handle_vfork_child_exec_or_exit): Likewise.
11296
11297 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11298
11299 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11300 (delim_string_to_char_ptr_vec): Return std::vector of
11301 gdb::unique_xmalloc_ptr.
11302 (dirnames_to_char_ptr_vec_append): Take std::vector of
11303 gdb::unique_xmalloc_ptr.
11304 (dirnames_to_char_ptr_vec): Return std::vector of
11305 gdb::unique_xmalloc_ptr.
11306 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11307 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11308 (delim_string_to_char_ptr_vec): Return an std::vector of
11309 gdb::unique_xmalloc_ptr, adjust the code.
11310 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11311 gdb::unique_xmalloc_ptr, adjust the code.
11312 (dirnames_to_char_ptr_vec): Return an std::vector of
11313 gdb::unique_xmalloc_ptr, adjust the code.
11314 * auto-load.c (auto_load_safe_path_vec): Change type to
11315 std::vector of gdb::unique_xmalloc_ptr.
11316 (auto_load_expand_dir_vars): Return an std::vector of
11317 gdb::unique_xmalloc_ptr, adjust the code.
11318 (auto_load_safe_path_vec_update): Adjust.
11319 (filename_is_in_auto_load_safe_path_vec): Adjust.
11320 (auto_load_objfile_script_1): Adjust.
11321 * build-id.c (build_id_to_debug_bfd): Adjust.
11322 * linux-thread-db.c (thread_db_load_search): Adjust.
11323 * source.c (add_path): Adjust.
11324 (openp): Adjust.
11325 * symfile.c (find_separate_debug_file): Adjust.
11326 * utils.c (do_free_char_ptr_vec): Remove.
11327 (make_cleanup_free_char_ptr_vec): Remove.
11328
11329 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11330
11331 PR gdb/22907
11332 * common/pathstuff.c: Conditionally include "<windows.h>".
11333
11334 2018-03-01 Georg Sauthoff <mail@georg.so>
11335
11336 PR gdb/22888
11337 * gcore.in: Quote variables and switch interpreter to bash.
11338
11339 2018-03-01 Tom Tromey <tom@tromey.com>
11340
11341 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11342 assertion. Add assertion for discriminant_index.
11343 (quirk_rust_enum): Use correct base type name in univariant case.
11344
11345 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11346
11347 * record.c (get_call_history_modifiers): Return a
11348 record_print_flags.
11349 (cmd_record_call_history): Adjust.
11350 * record-btrace.c (record_btrace_call_history): Adjust.
11351 (record_btrace_call_history_range): Adjust.
11352 (record_btrace_call_history_from): Adjust.
11353 * target-debug.h (target_debug_print_record_print_flags): New.
11354 * target-delegates.c: Re-generate.
11355 * target.c (target_call_history): Change flags type.
11356 (target_call_history_from): Likewise.
11357 (target_call_history_range): Likewise.
11358 * target.h (struct target_ops) <target_call_history>: Likewise.
11359 (target_call_history_from): Likewise.
11360 (target_call_history_range): Likewise.
11361
11362 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11363 Simon Marchi <simon.marchi@polymtl.ca>
11364
11365 * common/common-utils.c: Include "sys/stat.h".
11366 (is_regular_file): Move here from "source.c"; change return
11367 type to "bool".
11368 * common/common-utils.h (is_regular_file): New prototype.
11369 * common/pathstuff.c (contains_dir_separator): New function.
11370 * common/pathstuff.h (contains_dir_separator): New prototype.
11371 * source.c: Don't include "sys/stat.h".
11372 (is_regular_file): Move to "common/common-utils.c".
11373
11374 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11375
11376 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11377 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11378 * auto-load.c: Include "common/pathstuff.h".
11379 * common/common-def.h (current_directory): Move here.
11380 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11381 function.
11382 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11383 prototype.
11384 * common/pathstuff.c: New file.
11385 * common/pathstuff.h: New file.
11386 * compile/compile.c: Include "common/pathstuff.h".
11387 * defs.h (current_directory): Move to "common/common-defs.h".
11388 * dwarf2read.c: Include "common/pathstuff.h".
11389 * exec.c: Likewise.
11390 * guile/scm-safe-call.c: Likewise.
11391 * linux-thread-db.c: Likewise.
11392 * main.c: Likewise.
11393 * nto-tdep.c: Likewise.
11394 * objfiles.c: Likewise.
11395 * source.c: Likewise.
11396 * symtab.c: Likewise.
11397 * utils.c: Include "common/pathstuff.h".
11398 (gdb_realpath): Move to "common/pathstuff.c".
11399 (gdb_realpath_keepfile): Likewise.
11400 (gdb_abspath): Likewise.
11401 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11402 (gdb_realpath_keepfile): Likewise.
11403 (gdb_abspath): Likewise.
11404
11405 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11406
11407 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11408 wildcard process pid for super_resume for kernels with a
11409 specific bug.
11410
11411 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11412
11413 * compile/compile.c (get_args): Add additional comments
11414 explaining function.
11415
11416 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11417 Tom Tromey <tom@tromey.com>
11418
11419 * target.h (memory_write_request_s): Remove typedef. Don't define
11420 VEC.
11421 (target_write_memory_blocks): Change argument to std::vector.
11422 (struct memory_write_request): Add constructor.
11423 * target-memory.c (compare_block_starting_address): Return bool.
11424 Change argument types.
11425 (claim_memory): Change arguments to use std::vector.
11426 (split_regular_and_flash_blocks, blocks_to_erase)
11427 (compute_garbled_blocks): Likewise.
11428 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11429 (target_write_memory_blocks): Change argument to std::vector.
11430 * symfile.c (struct load_section_data): Add constructor and
11431 destructor. Use std::vector for "requests".
11432 (struct load_progress_data): Add initializers.
11433 (load_section_callback): Update. Use "new".
11434 (clear_memory_write_data): Remove.
11435 (generic_load): Update.
11436
11437 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11438
11439 * arch/aarch64.h: Use common/tdesc.h.
11440
11441 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11442
11443 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11444 architecture with a 64-bit ABI.
11445
11446 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11447
11448 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11449 ahead of target description loading.
11450
11451 2018-02-26 Tom Tromey <tom@tromey.com>
11452
11453 * stack.c (backtrace_command_1): Update.
11454 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11455 of "flags".
11456 * python/py-framefilter.c (py_print_frame)
11457 (gdbpy_apply_frame_filter): Change type of "flags".
11458 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11459 of "flags".
11460 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11461 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11462 * extension.h (enum frame_filter_flag): Rename from
11463 frame_filter_flags.
11464 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11465 (apply_ext_lang_frame_filter): Change type of "flags".
11466 * extension.c (apply_ext_lang_frame_filter): Change type of
11467 "flags".
11468 * extension-priv.h (struct extension_language_ops)
11469 <apply_frame_filter>: Change type of "flags".
11470
11471 2018-02-26 Tom Tromey <tom@tromey.com>
11472
11473 PR python/16497:
11474 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11475 off-by-one in py_end computation.
11476 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11477 PRINT_MORE_FRAMES.
11478 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11479 constant.
11480
11481 2018-02-26 Tom Tromey <tom@tromey.com>
11482
11483 * dwarf2read.c (struct variant_field): New.
11484 (struct nextfield) <variant>: New field.
11485 (dwarf2_add_field): Handle DW_TAG_variant_part.
11486 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11487 discriminated union.
11488 (read_structure_type): Handle DW_TAG_variant_part.
11489 (handle_struct_member_die): New function, extracted from
11490 process_structure_scope. Handle DW_TAG_variant.
11491 (process_structure_scope): Handle discriminated unions. Call
11492 handle_struct_member_die.
11493
11494 2018-02-26 Tom Tromey <tom@tromey.com>
11495
11496 * rust-lang.h (rust_last_path_segment): Declare.
11497 * rust-lang.c (rust_last_path_segment): Now public. Change
11498 contract.
11499 (struct disr_info): Remove.
11500 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11501 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11502 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11503 (rust_enum_p, rust_enum_variant): New function.
11504 (rust_underscore_fields): Remove "offset" parameter.
11505 (rust_print_enum): New function.
11506 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11507 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11508 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11509 enums.
11510 (rust_internal_print_type): New function, from rust_print_type.
11511 Remove enum code.
11512 (rust_print_type): Call rust_internal_print_type.
11513 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11514 Update enum handling.
11515 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11516 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11517 (rust_union_quirks): New functions.
11518 (process_full_comp_unit, process_full_type_unit): Call
11519 rust_union_quirks.
11520 (process_structure_scope): Update rust_unions if necessary.
11521
11522 2018-02-26 Tom Tromey <tom@tromey.com>
11523
11524 * value.h (value_union_variant): Declare.
11525 * valops.c (value_union_variant): New function.
11526 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11527 (struct discriminant_info): New.
11528 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11529 enumerator.
11530 (struct main_type) <flag_discriminated_union>: New field.
11531
11532 2018-02-26 Tom Tromey <tom@tromey.com>
11533
11534 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11535 unittests/unpack-selftests.c.
11536 * unittests/unpack-selftests.c: New file.
11537 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11538
11539 2018-02-26 Yao Qi <yao.qi@linaro.org>
11540
11541 * dwarf2read.c (struct partial_die_info) <read>: New method.
11542 (read_partial_die): Remove the declaration.
11543 (load_partial_dies): Update.
11544 (partial_die_info::partial_die_info):
11545 (read_partial_die): Change it to partial_die_info::read.
11546
11547 2018-02-26 Yao Qi <yao.qi@linaro.org>
11548
11549 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11550 (fixup_partial_die): Remove declaration.
11551 (scan_partial_symbols): Update.
11552 (partial_die_parent_scope): Likewise.
11553 (partial_die_full_name): Likewise.
11554 (fixup_partial_die): Change it to partial_die_info::fixup.
11555
11556 2018-02-26 Yao Qi <yao.qi@linaro.org>
11557
11558 * dwarf2read.c (read_partial_die): Update the declaration.
11559 (load_partial_dies): Caller update.
11560 (read_partial_die): Remove one argument abbrev_len.
11561
11562 2018-02-26 Yao Qi <yao.qi@linaro.org>
11563
11564 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11565 assignment operator.
11566 (load_partial_dies): Use ctor and copy ctor.
11567 (read_partial_die): Update.
11568 (dwarf2_cu::find_partial_die): Use ctor.
11569
11570 2018-02-26 Yao Qi <yao.qi@linaro.org>
11571
11572 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11573 (find_partial_die_in_comp_unit): Change it to
11574 dwarf2_cu::find_partial_die.
11575 (find_partial_die): Update.
11576
11577 2018-02-26 Yao Qi <yao.qi@linaro.org>
11578
11579 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11580 is NULL.
11581
11582 2018-02-26 Yao Qi <yao.qi@linaro.org>
11583
11584 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11585
11586 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11587
11588 * arch/amd64.h: Use common/tdesc.h.
11589 * arch/i386.c: Likewise.
11590 * arch/i386.h: Likewise.
11591 * arch/tic6x.c: Likewise.
11592 * arch/tdesc.h: Move file from here...
11593 * common/tdesc.h: ...to here.
11594 * features/aarch64-core.c: Regenerate.
11595 * features/aarch64-fpu.c: Regenerate.
11596 * features/i386/32bit-avx.c: Regenerate.
11597 * features/i386/32bit-avx512.c: Regenerate.
11598 * features/i386/32bit-core.c: Regenerate.
11599 * features/i386/32bit-linux.c: Regenerate.
11600 * features/i386/32bit-mpx.c: Regenerate.
11601 * features/i386/32bit-pkeys.c: Regenerate.
11602 * features/i386/32bit-sse.c: Regenerate.
11603 * features/i386/64bit-avx.c: Regenerate.
11604 * features/i386/64bit-avx512.c: Regenerate.
11605 * features/i386/64bit-core.c: Regenerate.
11606 * features/i386/64bit-linux.c: Regenerate.
11607 * features/i386/64bit-mpx.c: Regenerate.
11608 * features/i386/64bit-pkeys.c: Regenerate.
11609 * features/i386/64bit-segments.c: Regenerate.
11610 * features/i386/64bit-sse.c: Regenerate.
11611 * features/i386/x32-core.c: Regenerate.
11612 * features/tic6x-c6xp.c: Regenerate.
11613 * features/tic6x-core.c: Regenerate.
11614 * features/tic6x-gp.c: Regenerate.
11615 * target-descriptions.c: Use common/tdesc.h.
11616 * target-descriptions.h: Likewise.
11617
11618 2018-02-24 Tom Tromey <tom@tromey.com>
11619
11620 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11621 (try_thread_db_load_from_dir, thread_db_load_search): Use
11622 std::string.
11623 (info_auto_load_libthread_db_compare): Return bool. Change
11624 argument types.
11625 (info_auto_load_libthread_db): Use std::vector, std::string.
11626 Remove cleanups.
11627
11628 2018-02-24 Tom Tromey <tom@tromey.com>
11629
11630 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11631 std::string.
11632 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11633 std::string*.
11634 * gdbarch.c: Rebuild.
11635 * gdbarch.h: Rebuild.
11636 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11637 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11638 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11639 std::string*.
11640
11641 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11642
11643 * gdbtypes.h (sect_offset): Change type to uint64_t.
11644 (sect_offset_str): New function.
11645 * dwarf2read.c (create_addrmap_from_aranges): Use
11646 sect_offset_str.
11647 (error_check_comp_unit_head): Likewise.
11648 (create_debug_type_hash_table): Likewise.
11649 (read_cutu_die_from_dwo): Likewise.
11650 (init_cutu_and_read_dies): Likewise.
11651 (init_cutu_and_read_dies_no_follow): Likewise.
11652 (process_psymtab_comp_unit_reader): Likewise.
11653 (partial_die_parent_scope): Likewise.
11654 (peek_die_abbrev): Likewise.
11655 (process_queue): Likewise.
11656 (dwarf2_physname): Likewise.
11657 (read_namespace_alias): Likewise.
11658 (read_import_statement): Likewise.
11659 (create_dwo_cu_reader): Likewise.
11660 (create_cus_hash_table): Likewise.
11661 (lookup_dwo_cutu): Likewise.
11662 (inherit_abstract_dies): Likewise.
11663 (read_func_scope): Likewise.
11664 (read_call_site_scope): Likewise.
11665 (dwarf2_add_member_fn): Likewise.
11666 (read_common_block): Likewise.
11667 (read_module_type): Likewise.
11668 (read_typedef): Likewise.
11669 (read_subrange_type): Likewise.
11670 (load_partial_dies): Likewise.
11671 (read_partial_die): Likewise.
11672 (find_partial_die): Likewise.
11673 (read_str_index): Likewise.
11674 (dwarf2_string_attr): Likewise.
11675 (build_error_marker_type): Likewise.
11676 (lookup_die_type): Likewise.
11677 (dump_die_shallow): Likewise.
11678 (follow_die_ref): Likewise.
11679 (dwarf2_fetch_die_loc_sect_off): Likewise.
11680 (dwarf2_fetch_constant_bytes): Likewise.
11681 (follow_die_sig): Likewise.
11682 (get_signatured_type): Likewise.
11683 (get_DW_AT_signature_type): Likewise.
11684 (dwarf2_find_containing_comp_unit): Likewise.
11685 (set_die_type): Likewise.
11686
11687 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11688
11689 * arch/aarch64.c: Include "common-defs.h".
11690 * arch/amd64.c: Likewise.
11691 * arch/i386.c: Likewise.
11692
11693 2018-02-21 Tom Tromey <tom@tromey.com>
11694
11695 * value.h: (extract_field_op): Update.
11696 * eval.c (extract_field_op): Return a const char *.
11697 * expression.h (parse_expression_for_completion): Update.
11698 * completer.c (complete_expression): Update.
11699 (add_struct_fields): Make fieldname const.
11700 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11701 (mark_completion_tag, parse_exp_in_context_1): Update.
11702 (parse_expression_for_completion): Change "name" to
11703 unique_xmalloc_ptr*.
11704
11705 2018-02-21 Tom Tromey <tom@tromey.com>
11706
11707 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11708
11709 2018-02-21 Yao Qi <yao.qi@linaro.org>
11710
11711 * avr-tdep.c (avr_read_pc): Change parameter type to
11712 readable_regcache.
11713 * gdbarch.sh (read_pc): Likewise.
11714 * gdbarch.c: Re-generated.
11715 * gdbarch.h: Re-generated.
11716 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11717 readable_regcache.
11718 * ia64-tdep.c (ia64_read_pc): Likewise.
11719 * mips-tdep.c (mips_read_pc): Likewise.
11720 * spu-tdep.c (spu_read_pc): Likewise.
11721
11722 2018-02-21 Yao Qi <yao.qi@linaro.org>
11723
11724 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11725 * regcache-dump.c: New file.
11726 * regcache.c: Move register_dump to regcache-dump.c.
11727 (maintenance_print_registers): Likewise.
11728 (maintenance_print_raw_registers): Likewise.
11729 (maintenance_print_cooked_registers): Likewise.
11730 (maintenance_print_register_groups): Likewise.
11731 (maintenance_print_remote_registers): Likewise.
11732 (_initialize_regcache): Likewise.
11733 * regcache.h (register_dump): Moved from regcache.c.
11734
11735 2018-02-21 Yao Qi <yao.qi@linaro.org>
11736
11737 * regcache.c (regcache::regcache): Update.
11738 (regcache::invalidate): Move it to detached_regcache::invalidate.
11739 (get_thread_arch_aspace_regcache): Update.
11740 (regcache::raw_update): Update.
11741 (regcache::cooked_read): Remove some code.
11742 (regcache::cooked_read_value): Likewise.
11743 (regcache::raw_write): Remove assert on m_readonly_p.
11744 (regcache::raw_supply_integer): Move it to
11745 detached_regcache::raw_supply_integer.
11746 (regcache::raw_supply_zeroed): Likewise.
11747 * regcache.h (detached_regcache) <raw_supply_integer>: New
11748 declaration.
11749 <raw_supply_zeroed, invalidate>: Likewise.
11750 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11751 <invalidate>: Likewise.
11752 <m_readonly_p>: Removed.
11753
11754 2018-02-21 Yao Qi <yao.qi@linaro.org>
11755
11756 * infcmd.c (get_return_value): Let stop_regs point to
11757 get_current_regcache.
11758 * regcache.c (regcache::regcache): Remove.
11759 (register_dump_reg_buffer): New class.
11760 (regcache_print): Adjust.
11761 * regcache.h (regcache): Remove constructors.
11762
11763 2018-02-21 Yao Qi <yao.qi@linaro.org>
11764
11765 * regcache.c (class register_dump): New class.
11766 (register_dump_regcache, register_dump_none): New class.
11767 (register_dump_remote, register_dump_groups): New class.
11768 (regcache_print): Update.
11769 * regcache.h (regcache_dump_what): Move it to regcache.c.
11770 (regcache) <dump>: Remove.
11771
11772 2018-02-21 Yao Qi <yao.qi@linaro.org>
11773
11774 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11775 reg_buffer_rw *.
11776 (jit_unwind_reg_set_impl): Call raw_supply.
11777 (jit_frame_sniffer): Use reg_buffer_rw.
11778 * record-full.c (record_full_core_regbuf): Change its type.
11779 (record_full_core_open_1): Use reg_buffer_rw.
11780 (record_full_close): Likewise.
11781 (record_full_core_fetch_registers): Use regcache->raw_supply.
11782 (record_full_core_store_registers): Likewise.
11783 * regcache.c (regcache::get_register_status): Move it to
11784 reg_buffer.
11785 (regcache_raw_set_cached_value): Remove.
11786 (regcache::raw_set_cached_value): Remove.
11787 (regcache::raw_write): Call raw_supply.
11788 (regcache::raw_supply): Move it to reg_buffer_rw.
11789 * regcache.h (regcache_raw_set_cached_value): Remove.
11790 (reg_buffer_rw): New class.
11791
11792 2018-02-21 Yao Qi <yao.qi@linaro.org>
11793
11794 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11795 readonly_detached_regcache.
11796 (dummy_frame_prev_register): Use regcache->cooked_read.
11797 * frame.c (frame_save_as_regcache): Change return type.
11798 (frame_pop): Update.
11799 * frame.h (frame_save_as_regcache): Update declaration.
11800 * inferior.h (get_infcall_suspend_state_regcache): Update
11801 declaration.
11802 * infrun.c (infcall_suspend_state) <registers>: use
11803 readonly_detached_regcache.
11804 (save_infcall_suspend_state): Don't use regcache_dup.
11805 (get_infcall_suspend_state_regcache): Change return type.
11806 * linux-fork.c (struct fork_info) <savedregs>: Change to
11807 readonly_detached_regcache.
11808 <pc>: New field.
11809 (fork_save_infrun_state): Don't use regcache_dup.
11810 (info_checkpoints_command): Adjust.
11811 * mi/mi-main.c (register_changed_p): Update declaration.
11812 (mi_cmd_data_list_changed_registers): Use
11813 readonly_detached_regcache.
11814 (register_changed_p): Change parameter type to
11815 readonly_detached_regcache.
11816 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11817 readonly_detached_regcache.
11818 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11819 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11820 New.
11821 (regcache::save): Move it to reg_buffer.
11822 (regcache::restore): Change parameter type.
11823 (regcache_dup): Remove.
11824 * regcache.h (reg_buffer) <save>: New method.
11825 (readonly_detached_regcache): New class.
11826 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11827 readonly_detached_regcache.
11828 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11829
11830 2018-02-21 Yao Qi <yao.qi@linaro.org>
11831
11832 * frame.c (frame_save_as_regcache): Use regcache method save.
11833 (frame_pop): Use regcache method restore.
11834 * infrun.c (restore_infcall_suspend_state): Likewise.
11835 * linux-fork.c (fork_load_infrun_state): Likewise.
11836 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11837 save.
11838 * regcache.c (regcache_save): Remove.
11839 (regcache::restore): More asserts.
11840 (regcache_cpy): Remove.
11841 * regcache.h (regcache_save): Remove the declaration.
11842 (regcache::restore): Move from private to public.
11843 Remove the friend declaration of regcache_cpy.
11844 (regcache_cpy): Remove declaration.
11845
11846 2018-02-21 Yao Qi <yao.qi@linaro.org>
11847
11848 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11849 parameter type to 'readable_regcache *'.
11850 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11851 * arm-tdep.c (arm_neon_quad_read): Likewise.
11852 (arm_pseudo_read): Likewise.
11853 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11854 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11855 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11856 * gdbarch.c: Re-generated.
11857 * gdbarch.h: Re-generated.
11858 * gdbarch.sh (pseudo_register_read): Change parameter type to
11859 'readable_regcache *'.
11860 (pseudo_register_read_value): Likewise.
11861 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11862 (h8300_pseudo_register_read): Likewise.
11863 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11864 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11865 (i386_pseudo_register_read_into_value): Likewise.
11866 (i386_pseudo_register_read_value): Likewise.
11867 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11868 declaration.
11869 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11870 * m32c-tdep.c (m32c_raw_read): Likewise.
11871 (m32c_read_flg): Likewise.
11872 (m32c_banked_register): Likewise.
11873 (m32c_banked_read): Likewise.
11874 (m32c_sb_read): Likewise.
11875 (m32c_part_read): Likewise.
11876 (m32c_cat_read): Likewise.
11877 (m32c_r3r2r1r0_read): Likewise.
11878 (m32c_pseudo_register_read): Likewise.
11879 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11880 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11881 (mep_pseudo_cr64_read): Likewise.
11882 (mep_pseudo_register_read): Likewise.
11883 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11884 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11885 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11886 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11887 (regcache::cooked_read): Likewise.
11888 (regcache::cooked_read_value): Likewise.
11889 (regcache_cooked_read_signed):
11890 (regcache::cooked_read): Likewise.
11891 * regcache.h (readable_regcache): New class.
11892 (regcache): Inherit readable_regcache. Move some methods to
11893 readable_regcache.
11894 * rl78-tdep.c (rl78_pseudo_register_read): Change
11895 parameter type to 'readable_regcache *'.
11896 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11897 (e500_pseudo_register_read): Change parameter type to
11898 'readable_regcache *'.
11899 (dfp_pseudo_register_read): Likewise.
11900 (vsx_pseudo_register_read): Likewise.
11901 (efpr_pseudo_register_read): Likewise.
11902 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11903 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11904 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11905 (sh64_pseudo_register_read): Likewise.
11906 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11907 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11908 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11909 (spu_pseudo_register_read): Likewise.
11910 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11911 (xtensa_pseudo_register_read): Likewise.
11912
11913 2018-02-21 Yao Qi <yao.qi@linaro.org>
11914
11915 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11916 (regcache::arch): Move it to reg_buffer::arch.
11917 (regcache::register_buffer): Likewise.
11918 (regcache::assert_regnum): Likewise.
11919 (regcache::num_raw_registers): Likewise.
11920 * regcache.h (reg_buffer): New class.
11921 (regcache): Inherit reg_buffer.
11922
11923 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11924
11925 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11926 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11927
11928 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11929
11930 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11931
11932 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11933
11934 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11935 (SFILES): Remove common/*.c files.
11936 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11937 * common/common.host: Add common reference.
11938 * configure.ac: Likewise.
11939 * configure: Regenerate.
11940
11941 2018-02-16 Yao Qi <yao.qi@linaro.org>
11942
11943 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11944 (block_initialize_namespace): Use new.
11945 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11946 (dwarf2_free_objfile): Use delete.
11947 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11948 (copy_type_recursive): Use new.
11949 * gdb_obstack.h (allocate_on_obstack): New.
11950
11951 2018-02-15 Yao Qi <yao.qi@linaro.org>
11952
11953 PR gdb/22849
11954 * inferior.c (exit_inferior_1): Reset inf->control.
11955
11956 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11957
11958 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11959 declaration.
11960
11961 2018-02-14 Pedro Alves <palves@redhat.com>
11962
11963 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11964 frame_cleanup_after_sniffer on exception.
11965
11966 2018-02-14 Tom Tromey <tom@tromey.com>
11967
11968 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11969 const.
11970 (solib_bfd_open): Make pathname const.
11971 * solib.c (solib_bfd_open): Make pathname const.
11972 * solib-spu.c (spu_bfd_fopen): Make name const.
11973 (spu_bfd_open): Make pathname const.
11974 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11975 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11976
11977 2018-02-14 Tom Tromey <tom@tromey.com>
11978
11979 * symfile.c (symfile_bfd_open): Update.
11980 * source.h (openp, source_full_path_of, find_and_open_source):
11981 Change argument type to unique_xmalloc_ptr.
11982 * source.c (openp): Take a unique_xmalloc_ptr.
11983 (source_full_path_of, find_and_open_source): Likewise.
11984 (open_source_file, symtab_to_fullname): Update.
11985 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11986 unique_xmalloc_ptr.
11987 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11988 (exec_file_find): Update.
11989 * psymtab.c (psymtab_to_fullname): Update.
11990 * nto-tdep.h (nto_find_and_open_solib): Update.
11991 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11992 unique_xmalloc_ptr.
11993 * exec.c (exec_file_attach): Update.
11994 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11995 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11996
11997 2018-02-14 Tom Tromey <tom@tromey.com>
11998
11999 * solib.c: Include source.h.
12000 * nto-tdep.c: Include source.h.
12001 * mi/mi-cmd-env.c: Include source.h.
12002 * infcmd.c: Include source.h.
12003 * exec.c: Include source.h.
12004 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12005 (add_path, directory_switch, source_path, init_source_path): Move
12006 declarations...
12007 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12008 (add_path, directory_switch, source_path, init_source_path):
12009 ...here.
12010
12011 2018-02-14 Tom Tromey <tom@tromey.com>
12012
12013 * solist.h (exec_file_find, solib_find): Return
12014 unique_xmalloc_ptr.
12015 (solib_bfd_fopen): Take a const char *.
12016 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12017 (exec_file_find, solib_find): Likewise.
12018 (solib_bfd_fopen): Do not take ownership of "pathname".
12019 (solib_bfd_open): Use unique_xmalloc_ptr.
12020 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12021 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12022 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12023 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12024
12025 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12026
12027 * ada-lang.c (name_match_type_from_name): Remove reference to
12028 ada_name_for_lookup in function's documentation.
12029 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12030
12031 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12032
12033 * defs.h (enum openp_flags): New enum.
12034 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12035 Move to enum openp_flags.
12036 (openp_flags): New enum flags.
12037 (openp): Change parameter type to openp_flags.
12038 * source.c (openp): Change parameter type to openp_flags.
12039 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12040 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12041
12042 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12043
12044 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12045 per-command.
12046
12047 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12048
12049 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12050 into...
12051 (class dwarf2_queue_guard): ...the destructor of this new class.
12052 (dw2_do_instantiate_symtab): Create instance of the new class
12053 dwarf2_queue_guard, remove cleanup.
12054
12055 2018-02-09 Tom Tromey <tom@tromey.com>
12056
12057 * source.c (find_source_lines): Don't reference past the end of
12058 the vector.
12059
12060 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12061
12062 * remote.c (remote_btrace_maybe_reopen): Change error message.
12063 * btrace.c (btrace_enable): Likewise.
12064 (parse_xml_btrace): Likewise.
12065 (parse_xml_btrace_conf): Likewise.
12066
12067 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12068
12069 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12070 (linux_enable_pt, linux_enable_bts): Call
12071 diagnose_perf_event_open_fail.
12072
12073 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12074
12075 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12076 Remove parameter and change return type. Update callers. Move it.
12077 (linux_enable_bts, linux_enable_pt): Improve error message.
12078 (linux_enable_pt): Remove zero buffer size check.
12079 (linux_enable_btrace): Improve error messages. Remove NULL return
12080 check.
12081
12082 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12083
12084 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12085 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12086 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12087 (linux_supports_pt, linux_supports_btrace): Remove.
12088 (linux_enable_bts): Call cpu_supports_bts.
12089 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12090 * remote.c (remote_supports_btrace): Remove.
12091 (init_remote_ops): Remove remote_supports_btrace.
12092 * target-delegates.c: Regenerated.
12093 * target.c (target_supports_btrace): Remove.
12094 * target.h (target_ops) <to_supports_btrace>: Remove
12095 (target_supports_btrace): Remove.
12096 * x86-linux-nat.c (x86_linux_create_target): Remove
12097 linux_supports_btrace.
12098
12099 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12100
12101 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12102 btrace failed.
12103 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12104 exception and use message in own exception.
12105
12106 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12107
12108 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12109 (perf_event_pt_event_type): Use gdb_file_up.
12110 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12111 scoped_fd, and scoped_mmap.
12112
12113 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12114
12115 * common/scoped_mmap.h: New.
12116 * unittests/scoped_mmap-selftest.c: New.
12117 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12118 unittests/scoped_mmap-selftest.c.
12119
12120 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12121
12122 * common/scoped_fd.h: New.
12123 * unittests/scoped_fd-selftest.c: New.
12124 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12125 unittests/scoped_fd-selftest.c.
12126
12127 2018-02-09 Tom Tromey <tom@tromey.com>
12128
12129 * auto-load.c (auto_load_section_scripts): Use
12130 gdb::unique_xmalloc_ptr.
12131
12132 2018-02-09 Tom Tromey <tom@tromey.com>
12133
12134 * auto-load.c (execute_script_contents): Use std::string.
12135
12136 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12137
12138 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12139 Python function, rather than a new command.
12140
12141 2018-02-08 Tom Tromey <tom@tromey.com>
12142
12143 * solib.c (solib_find_1): Use std::string.
12144 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12145
12146 2018-02-08 Tom Tromey <tom@tromey.com>
12147
12148 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12149
12150 2018-02-08 Tom Tromey <tom@tromey.com>
12151
12152 * source.c (find_source_lines): Use gdb::def_vector.
12153
12154 2018-02-08 Tom Tromey <tom@tromey.com>
12155
12156 * macrocmd.c (struct temporary_macro_definition): New.
12157 (macro_define_command): Use temporary_macro_definition. Remove
12158 cleanups.
12159 (free_macro_definition_ptr): Remove.
12160
12161 2018-02-08 Tom Tromey <tom@tromey.com>
12162
12163 * macroexp.c (maybe_expand): Use std::string.
12164
12165 2018-02-08 Tom Tromey <tom@tromey.com>
12166
12167 * macroexp.c (struct macro_buffer): Add initializers for some
12168 members.
12169 (init_buffer, init_shared_buffer, free_buffer)
12170 (free_buffer_return_text): Remove.
12171 (macro_buffer): New constructors.
12172 (~macro_buffer): New destructor.
12173 (macro_buffer::set_shared): New method.
12174 (macro_buffer::resize_buffer, macro_buffer::appendc)
12175 (macro_buffer::appendmem): Now methods, not free functions.
12176 (set_token, append_tokens_without_splicing, stringify)
12177 (macro_stringify): Update.
12178 (gather_arguments): Change return type. Remove argc_p argument,
12179 add args_ptr argument. Use std::vector.
12180 (substitute_args): Remove argc argument. Accept std::vector.
12181 (expand): Update. Use std::vector.
12182 (scan, macro_expand, macro_expand_next): Update.
12183
12184 2018-02-08 Tom Tromey <tom@tromey.com>
12185
12186 * symtab.c (default_collect_symbol_completion_matches_break_on):
12187 Use unique_xmalloc_ptr.
12188 * macroscope.h: (sal_macro_scope, user_macro_scope)
12189 (default_macro_scope): Return unique_xmalloc_ptr.
12190 * macroscope.c (sal_macro_scope, user_macro_scope)
12191 (default_macro_scope): Return unique_xmalloc_ptr.
12192 * macroexp.h (macro_expand, macro_expand_once): Return
12193 unique_xmalloc_ptr.
12194 * macroexp.c (macro_expand, macro_expand_once): Return
12195 unique_xmalloc_ptr.
12196 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12197 (info_macro_command, info_macros_command): Use
12198 unique_xmalloc_ptr.
12199 * compile/compile-c-support.c (write_macro_definitions): Use
12200 unique_xmalloc_ptr.
12201 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12202
12203 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12204
12205 * value.c (value_static_field): Assign field type instead of
12206 containing type when returning an optimized out value.
12207
12208 2018-02-06 Yao Qi <yao.qi@linaro.org>
12209
12210 * ft32-tdep.c (ft32_read_pc): Remove.
12211 (ft32_write_pc): Remove.
12212 (ft32_gdbarch_init): Update.
12213 * m32r-tdep.c (m32r_read_pc): Remove.
12214 (m32r_gdbarch_init): Update.
12215 * mep-tdep.c (mep_read_pc): Remove.
12216 (mep_gdbarch_init): Update.
12217 * microblaze-tdep.c (microblaze_write_pc): Remove.
12218 (microblaze_gdbarch_init): Update.
12219 * mn10300-tdep.c (mn10300_read_pc): Remove.
12220 (mn10300_write_pc): Remove.
12221 (mn10300_gdbarch_init): Update.
12222 * moxie-tdep.c (moxie_read_pc): Remove.
12223 (moxie_write_pc): Remove.
12224 (moxie_gdbarch_init): Update.
12225
12226 2018-02-06 Yao Qi <yao.qi@linaro.org>
12227
12228 * expprint.c (print_subexp_standard): Handle
12229 OP_F77_UNDETERMINED_ARGLIST.
12230 (dump_subexp_body_standard): Likewise.
12231
12232 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12233
12234 * target-descriptions.c (tdesc_element_visitor) Add empty
12235 implementations.
12236 (tdesc_type): Move make_gdb_type from here.
12237 (tdesc_type_builtin): Likewise.
12238 (tdesc_type_vector): Likewise.
12239 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12240 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12241 (make_gdb_type_union): Likewise.
12242 (make_gdb_type_flags): Likewise.
12243 (make_gdb_type_enum): Likewise.
12244 (make_gdb_type): New function.
12245 (tdesc_register_type): Use static make_gdb_type.
12246
12247 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12248
12249 * infcmd.c (default_print_one_register_info): Align natural-format
12250 column values consistently one under another.
12251 (pad_to_column): New function.
12252
12253 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12254
12255 * dwarf2read.c (dwarf2_physname): Move commment.
12256
12257 2018-02-01 Leszek Swirski <leszeks@google.com>
12258
12259 * varobj.c (varobj_formatted_print_options): Allow recursive
12260 pretty printing if pretty printing is enabled.
12261
12262 2018-02-01 Leszek Swirski <leszeks@google.com>
12263
12264 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12265 names after a structop as a filename.
12266
12267 2018-02-01 Yao Qi <yao.qi@linaro.org>
12268
12269 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12270 (arm_record_coproc_data_proc): Likewise.
12271
12272 2018-02-01 Yao Qi <yao.qi@linaro.org>
12273
12274 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12275
12276 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12277
12278 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12279 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12280
12281 2018-01-31 Pedro Alves <palves@redhat.com>
12282
12283 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12284 * inflow.c (child_terminal_save_inferior): Wrap reference to
12285 tcgetpgrp in HAVE_TERMIOS_H.
12286 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12287 _WIN32.
12288 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12289 always iterate over all inferiors.
12290 (gdbsim_cntrl_c): Adjust.
12291 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12292
12293 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12294
12295 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12296 index type is objfile-owned if the element type is as well.
12297
12298 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12299
12300 GDB 8.1 released.
12301
12302 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12303
12304 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12305 "features/s390x-linux64.c".
12306 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12307 s390_linux32 and s390x_linux64.
12308 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12309 default tdesc.
12310 * s390-tdep.c: Include "features/s390-linux32.c" and
12311 "features/s390x-linux64.c".
12312 (s390_tdesc_valid): Add check for tdesc_has_registers.
12313 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12314 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12315 tdesc_s390x_linux64.
12316 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12317 tdesc_s390x_linux64 to...
12318 * s390-tdep.h: ...here.
12319
12320 2018-01-30 Pedro Alves <palves@redhat.com>
12321
12322 PR gdb/13211
12323 * config.in, configure: Regenerate.
12324 * configure.ac: Check for getpgid.
12325 * go32-nat.c (go32_pass_ctrlc): New.
12326 (go32_target): Install it.
12327 * inf-child.c (inf_child_target): Install
12328 child_terminal_save_inferior, child_pass_ctrlc and
12329 child_interrupt.
12330 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12331 (inf_ptrace_target): No longer install it.
12332 * infcmd.c (interrupt_target_1): Adjust.
12333 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12334 (child_interrupt): Declare.
12335 (inferior::terminal_state): New.
12336 * inflow.c (struct terminal_info): Update comments.
12337 (inferior_process_group): Delete.
12338 (terminal_is_ours): Delete.
12339 (gdb_tty_state): New.
12340 (child_terminal_init): Adjust.
12341 (is_gdb_terminal, sharing_input_terminal_1)
12342 (sharing_input_terminal): New functions.
12343 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12344 Set the process's actual process group in the foreground if
12345 possible. Handle is_ours_for_output/is_ours distinction. Don't
12346 mark terminal as the inferior's if not sharing GDB's terminal.
12347 Don't check attach_flag.
12348 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12349 pass down a target_terminal_state.
12350 (child_terminal_save_inferior): New, factored out from ...
12351 (child_terminal_ours_1): ... this. Handle
12352 target_terminal_state::is_ours_for_output.
12353 (child_interrupt, child_pass_ctrlc): New.
12354 (inflow_inferior_exit): Clear the inferior's terminal_state.
12355 (copy_terminal_info): Copy the inferior's terminal state.
12356 (_initialize_inflow): Remove reference to terminal_is_ours.
12357 * inflow.h (inferior_process_group): Delete.
12358 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12359 * procfs.c (procfs_target): Don't install procfs_interrupt.
12360 (procfs_interrupt): Delete.
12361 * remote.c (remote_serial_quit_handler): Adjust.
12362 (remote_interrupt): Remove ptid parameter. Adjust.
12363 * target-delegates.c: Regenerate.
12364 * target.c: Include "terminal.h".
12365 (target_terminal::terminal_state): Rename to ...
12366 (target_terminal::m_terminal_state): ... this.
12367 (target_terminal::init): Adjust.
12368 (target_terminal::inferior): Adjust to per-inferior
12369 terminal_state.
12370 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12371 (target_terminal::ours, target_terminal::ours_for_output): Use
12372 target_terminal_is_ours_kind.
12373 (target_interrupt): Remove ptid parameter. Adjust.
12374 (default_target_pass_ctrlc): Adjust.
12375 * target.h (target_ops::to_terminal_save_inferior): New field.
12376 (target_ops::to_interrupt): Remove ptid_t parameter.
12377 (target_interrupt): Remove ptid_t parameter. Update comment.
12378 (target_pass_ctrlc): Update comment.
12379 * target/target.h (target_terminal_state): New scoped enum,
12380 factored out of ...
12381 (target_terminal::terminal_state): ... here.
12382 (target_terminal::inferior): Update comments.
12383 (target_terminal::restore_inferior): New.
12384 (target_terminal::is_inferior, target_terminal::is_ours)
12385 (target_terminal::is_ours_for_output): Adjust.
12386 (target_terminal::scoped_restore_terminal_state): Adjust to
12387 rename, and call restore_inferior() instead of inferior().
12388 (target_terminal::scoped_restore_terminal_state::m_state): Change
12389 type.
12390 (target_terminal::terminal_state): Rename to ...
12391 (target_terminal::m_terminal_state): ... this and change type.
12392
12393 2018-01-30 Pedro Alves <palves@redhat.com>
12394
12395 * linux-nat.c (wait_for_signal): New function.
12396 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12397 directly.
12398 (async_terminal_is_ours)
12399 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12400 (linux_nat_add_target): Don't override
12401 to_terminal_inferior/to_terminal_ours.
12402
12403 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12404
12405 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12406
12407 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12408
12409 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12410 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12411 dwarf2_per_objfile_free here.
12412 (dwarf2_per_objfile_free): Remove.
12413 (_initialize_dwarf2_read): Don't register
12414 dwarf2_per_objfile_free as a registry cleanup.
12415
12416 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12417
12418 Avoid compilation errors in MinGW native builds
12419
12420 The error is triggered by including python-internal.h, and the
12421 error message is:
12422
12423 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12424 from build-gnulib/import/math.h:27,
12425 from d:/usr/Python26/include/pyport.h:235,
12426 from d:/usr/Python26/include/Python.h:58,
12427 from python/python-internal.h:94,
12428 from python/py-arch.c:24:
12429 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12430 using ::hypot;
12431 ^~~~~
12432
12433 This happens because Python headers define 'hypot' to expand t
12434 '_hypot' in the Windows builds.
12435 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12436 'hypoth'. This avoids a compilation error.
12437
12438 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12439
12440 * MAINTAINERS (Write After Approval): Fix ordering.
12441
12442 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12443
12444 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12445
12446 2018-01-26 Alan Modra <amodra@gmail.com>
12447
12448 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12449 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12450 Remove nop. Make const. Comment.
12451 (powerpc32_plt_stub_so_2): New.
12452 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12453 Correct count. Update uses.
12454 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12455 Move common code reading PLT entry word. Correct
12456 powerpc32_plt_stub PLT address calculation.
12457 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12458 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12459 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12460 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12461 (ppc64_standard_linkage8): Likewise.
12462 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12463 Correct insns description.
12464 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12465
12466 2018-01-24 Pedro Alves <palves@redhat.com>
12467
12468 GCC PR libstdc++/83906
12469 * gdbtypes.c (operator==(const dynamic_prop &,
12470 const dynamic_prop &)): New.
12471 (operator==(const range_bounds &, const range_bounds &)): New.
12472 (check_types_equal): Use them instead of memcmp.
12473 * gdbtypes.h (operator==(const dynamic_prop &,
12474 const dynamic_prop &)): Declare.
12475 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12476 (operator==(const range_bounds &, const range_bounds &)): Declare.
12477 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12478
12479 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12480
12481 * s390-linux-tdep.c (s390_record_address_mask)
12482 (s390_record_calc_disp_common, s390_record_calc_disp)
12483 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12484 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12485 (s390_process_record): Move to s390-tdep.c.
12486 (s390_linux_init_abi_any): Adjust.
12487 * s390-tdep.c (s390_record_address_mask)
12488 (s390_record_calc_disp_common, s390_record_calc_disp)
12489 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12490 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12491 (s390_process_record): Moved from s390-linux-tdep.c
12492 (s390_gdbarch_init): Adjust.
12493
12494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12495
12496 * s390-linux-nat.c (s390-tdep.h): New include.
12497 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12498 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12499 (ALLDEPFILES): Add s390-tdep.c.
12500 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12501 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12502 * s390-tdep.h: ...this. New file.
12503 * s390-linux-tdep.c (s390-tdep.h): New include.
12504 (_initialize_s390_tdep): Rename to...
12505 (_initialize_s390_linux_tdep): ...this and adjust.
12506 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12507 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12508 s390-tdep.h.
12509 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12510 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12511 (s390_is_partial_instruction, s390_software_single_step)
12512 (is_non_branch_ril, s390_displaced_step_copy_insn)
12513 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12514 (s390_prologue_data, s390_addr, s390_store, s390_load)
12515 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12516 (s390_register_call_saved, s390_guess_tracepoint_registers)
12517 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12518 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12519 (s390_pseudo_register_name, s390_pseudo_register_type)
12520 (s390_pseudo_register_read, s390_pseudo_register_write)
12521 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12522 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12523 (s390_addr_bits_remove, s390_address_class_type_flags)
12524 (s390_address_class_type_flags_to_name)
12525 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12526 (s390_function_arg_float, s390_function_arg_vector)
12527 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12528 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12529 (s390_frame_align, s390_register_return_value, s390_return_value)
12530 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12531 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12532 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12533 (s390_trad_frame_prev_register, s390_unwind_cache)
12534 (s390_prologue_frame_unwind_cache)
12535 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12536 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12537 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12538 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12539 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12540 (s390_frame_base_address, s390_local_base_address)
12541 (s390_frame_base, s390_gcc_target_options)
12542 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12543 (s390_validate_reg_range, s390_tdesc_valid)
12544 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12545 * s390-tdep.c: ...this. New file.
12546
12547 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12548
12549 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12550 (s390_process_record, s390_gdbarch_tdep_alloc)
12551 (s390_linux_init_abi_any): Use/set new hook.
12552
12553 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12554
12555 * s390-linux-tdep.c (osabi.h): New include.
12556 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12557 (s390_linux_init_abi_any): New functions.
12558 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12559
12560 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12561
12562 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12563 tdesc_has_registers check
12564
12565 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12566
12567 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12568 (s390_validate_reg_range): New macro.
12569 (s390_gdbarch_init): Adjust.
12570
12571 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12572
12573 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12574 (s390_gdbarch_tdep_alloc): Adjust.
12575 (s390_gdbarch_init): Adjust.
12576
12577 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12578
12579 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12580 <have_tdb>: Change type to bool.
12581 (s390_gdbarch_tdep_alloc): Adjust.
12582 (s390_gdbarch_init): Adjust.
12583
12584 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12585
12586 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12587 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12588 (s390_gdbarch_tdep_alloc): New function.
12589 (s390_gdbarch_init): Allocate tdep at start and use its fields
12590 instead of separate variables.
12591
12592 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12593
12594 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12595 when looking for cached gdbarch and add comment for remaining.
12596
12597 2018-01-22 Pedro Alves <palves@redhat.com>
12598 Sergio Durigan Junior <sergiodj@redhat.com>
12599
12600 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12601 case.
12602
12603 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12604
12605 * MAINTAINERS: Update my company e-mail address.
12606
12607 2018-01-22 Yao Qi <yao.qi@linaro.org>
12608
12609 * regcache.c (cooked_write_test): New function.
12610 (_initialize_regcache): Register the test.
12611
12612 2018-01-22 Yao Qi <yao.qi@linaro.org>
12613
12614 * ia64-tdep.c (ia64_pseudo_register_read): Call
12615 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12616 * m32c-tdep.c (m32c_cat_read): Likewise.
12617 (m32c_r3r2r1r0_read): Likewise.
12618 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12619 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12620
12621 2018-01-22 Yao Qi <yao.qi@linaro.org>
12622
12623 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12624 method raw_read instead of regcache_raw_read.
12625 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12626 * arm-tdep.c (arm_neon_quad_read): Likewise.
12627 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12628 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12629 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12630 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12631 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12632 (i386_pseudo_register_read_into_value): Likewise.
12633 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12634 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12635 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12636 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12637 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12638 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12639 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12640 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12641 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12642
12643 2018-01-22 Yao Qi <yao.qi@linaro.org>
12644
12645 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12646 * configure.tgt: Remove target mt.
12647 * mt-tdep.c: Remove.
12648 * regcache.c (cooked_read_test): Remove the check for mt.
12649
12650 2018-01-22 Yao Qi <yao.qi@linaro.org>
12651
12652 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12653 instead of gdbarch_pseudo_register_read_value.
12654
12655 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12656
12657 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12658 language is Ada.
12659
12660 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12661
12662 * linespec.c (create_sals_line_offset): Remove code that preserved
12663 the symtab_and_line's line number.
12664
12665 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12666
12667 * varobj.c (varobj_create): Don't set valid_block when creating a
12668 floating varobj.
12669
12670 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12671
12672 * varobj.c (varobj_create): Remove out of date comment.
12673
12674 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12675
12676 PR mi/20395
12677 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12678 updating innermost block.
12679 * parse.c (innermost_block_tracker::update): Take extra type
12680 parameter, and check types match before updating innermost block.
12681 (write_dollar_variable): Update innermost block for registers.
12682 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12683 (innermost_block_tracker::innermost_block_tracker): Initialise
12684 m_types member.
12685 (innermost_block_tracker::reset): Take type parameter.
12686 (innermost_block_tracker::update): Take type parameter, and pass
12687 type through as needed.
12688 (innermost_block_tracker::m_types): New member.
12689 * varobj.c (varobj_create): Pass type when reseting innermost
12690 block.
12691
12692 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12693
12694 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12695 * ada-lang.c (resolve_subexp): Likewise.
12696 * breakpoint.c (set_breakpoint_condition) Likewise.
12697 (watch_command_1) Likewise.
12698 * c-exp.y (variable): Likewise.
12699 * d-exp.y (PrimaryExpression): Likewise.
12700 * f-exp.y (variable): Likewise.
12701 * go-exp.y (variable): Likewise.
12702 * m2-exp.y (variable): Likewise.
12703 * objfiles.c (objfile::~objfile): Likewise.
12704 * p-exp.y (variable): Likewise.
12705 * parse.c (innermost_block): Change type.
12706 * parser-defs.h (class innermost_block_tracker): New.
12707 (innermost_block): Change to innermost_block_tracker.
12708 * printcmd.c (display_command): Switch to innermost_block API.
12709 (do_one_display): Likewise.
12710 * rust-exp.y (do_one_display): Likewise.
12711 * symfile.c (clear_symtab_users): Likewise.
12712 * varobj.c (varobj_create): Switch to innermost_block API, replace
12713 use of innermost_block with block stored on varobj object.
12714
12715 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12716
12717 * expression.h (innermost_block): Remove declaration.
12718 * varobj.c: Add 'parser-defs.h' include.
12719
12720 2018-01-19 Tom Tromey <tom@tromey.com>
12721
12722 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12723 symbols in the static and global blocks.
12724
12725 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12726
12727 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12728 gdb_ptrace.h, and move including gdb_wait.h ...
12729 * nat/linux-ptrace.h: ... to here.
12730
12731 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12732
12733 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12734 inf_ptrace_detach_success.
12735 (inf_ptrace_detach_success): Add inferior parameter, use it
12736 instead of inferior_ptid, pass it to detach_inferior.
12737 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12738 parameter.
12739 * inferior.c (detach_inferior): Add overload that takes an
12740 inferior object.
12741 * inferior.h (detach_inferior): Likewise.
12742 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12743 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12744 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12745
12746 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12747
12748 * target.h (struct target_ops) <to_detach>: Add inferior
12749 parameter.
12750 (target_detach): Likewise.
12751 * target.c (dispose_inferior): Pass inferior down.
12752 (target_detach): Pass inferior down. Assert that it is equal to
12753 the current inferior.
12754 * aix-thread.c (aix_thread_detach): Pass inferior down.
12755 * corefile.c (core_file_command): Pass current_inferior() down.
12756 * corelow.c (core_detach): Add inferior parameter.
12757 * darwin-nat.c (darwin_detach): Likewise.
12758 * gnu-nat.c (gnu_detach): Likewise.
12759 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12760 * infcmd.c (detach_command): Pass current_inferior() down to
12761 target_detach.
12762 * infrun.c (follow_fork_inferior): Pass parent_inf to
12763 target_detach.
12764 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12765 target_detach.
12766 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12767 * linux-thread-db.c (thread_db_detach): Likewise.
12768 * nto-procfs.c (procfs_detach): Likewise.
12769 * procfs.c (procfs_detach): Likewise.
12770 * record.c (record_detach): Likewise.
12771 * record.h (struct inferior): Forward-declare.
12772 (record_detach): Add inferior parameter.
12773 * remote-sim.c (gdbsim_detach): Likewise.
12774 * remote.c (remote_detach_1): Likewise.
12775 (remote_detach): Likewise.
12776 (extended_remote_detach): Likewise.
12777 * sol-thread.c (sol_thread_detach): Likewise.
12778 * target-debug.h (target_debug_print_inferior_p): New macro.
12779 * target-delegates.c: Re-generate.
12780 * top.c (kill_or_detach): Pass inferior down to target_detach.
12781 * windows-nat.c (windows_detach): Add inferior parameter.
12782
12783 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12784
12785 * target.h (struct target_ops) <to_detach>: Remove args
12786 parameter.
12787 (target_detach): Likewise.
12788 * target.c (dispose_inferior): Adjust.
12789 (target_detach): Remove args parameter, adjust.
12790 * aix-thread.c (aix_thread_detach): Adjust.
12791 * corefile.c (core_file_command): Adjust.
12792 * corelow.c (core_detach): Adjust.
12793 * darwin-nat.c (darwin_detach): Adjust.
12794 * gnu-nat.c (gnu_detach): Adjust.
12795 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12796 * infcmd.c (detach_command): Adjust
12797 * infrun.c (follow_fork_inferior): Adjust.
12798 (handle_vfork_child_exec_or_exit): Adjust.
12799 * linux-fork.c (linux_fork_detach): Remove args parameter.
12800 * linux-fork.h (linux_fork_detach): Likewise.
12801 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12802 * linux-thread-db.c (thread_db_detach): Likewise.
12803 * nto-procfs.c (procfs_detach): Likewise.
12804 * procfs.c (procfs_detach): Likewise.
12805 (do_detach): Remove signo parameter.
12806 * record.c (record_detach): Remove args parameter.
12807 * record.h (record_detach): Likewise.
12808 * remote-sim.c (gdbsim_detach): Likewise.
12809 * remote.c (remote_detach_1): Likewise.
12810 (remote_detach): Likewise.
12811 (extended_remote_detach): Likewise.
12812 * sol-thread.c (sol_thread_detach): Likewise.
12813 * target-delegates.c: Re-generate.
12814 * top.c (struct qt_args) <args>: Remove field.
12815 (kill_or_detach): Don't pass args.
12816 (quit_force): Don't set args.
12817 * windows-nat.c (windows_detach): Remove args parameter.
12818
12819 2018-01-19 Yao Qi <yao.qi@linaro.org>
12820
12821 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12822 (arm_linux_init_abi): Install it.
12823
12824 2018-01-19 Yao Qi <yao.qi@linaro.org>
12825
12826 * osabi.c (gdb_osabi_names): Extend the regexp for
12827 arm-linux-gnueabihf.
12828
12829 2018-01-18 Yao Qi <yao.qi@linaro.org>
12830
12831 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12832 m_abbrevs.
12833 (abbrev_table::add_abbrev): Update.
12834 (abbrev_table::lookup_abbrev): Update.
12835
12836 2018-01-18 Yao Qi <yao.qi@linaro.org>
12837
12838 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12839
12840 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12841
12842 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12843 to "std::string".
12844
12845 2018-01-17 Tom Tromey <tom@tromey.com>
12846
12847 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12848
12849 2018-01-17 Tom Tromey <tom@tromey.com>
12850
12851 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12852 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12853 (create_array_type_with_stride): Update.
12854 * dwarf2read.c (set_die_type): Update.
12855
12856 2018-01-17 Tom Tromey <tom@tromey.com>
12857
12858 * dwarf2read.c (delayed_method_info): Remove typedef.
12859 (dwarf2_cu::method_info): Now a std::vector.
12860 (add_to_method_list): Update.
12861 (free_delayed_list): Remove.
12862 (compute_delayed_physnames): Update.
12863 (process_full_comp_unit, process_full_type_unit): Clear the method
12864 list. Remove cleanups.
12865 (psymtab_include_file_name): Add name_holder parameter. Use
12866 unique_xmalloc_ptr.
12867 (dwarf_decode_lines): Update.
12868
12869 2018-01-17 Tom Tromey <tom@tromey.com>
12870 Simon Marchi <simon.marchi@ericsson.com>
12871
12872 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12873 (dwarf2_per_objfile::free_cached_comp_units)
12874 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12875 (init_cutu_and_read_dies_no_follow): Update.
12876 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12877 (dwarf2_cu::~dwarf2_cu): New.
12878 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12879 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12880
12881 2018-01-17 Tom Tromey <tom@tromey.com>
12882 Simon Marchi <simon.marchi@ericsson.com>
12883
12884 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12885 (struct die_reader_specs) <abbrev_table>: New member.
12886 (struct abbrev_table): Add constructor.
12887 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12888 <abbrev_obstack>: Now an auto_obstack.
12889 (abbrev_table_up): New typedef.
12890 (init_cu_die_reader): Add abbrev_table parameter.
12891 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12892 Add result_dwo_abbrev_table.
12893 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12894 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12895 Update.
12896 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12897 parameter.
12898 (skip_children): Update.
12899 (abbrev_table::alloc_abbrev): Rename from
12900 abbrev_table_alloc_abbrev.
12901 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12902 (abbrev_table::lookup_abbrev): Rename from
12903 abbrev_table_lookup_abbrev.
12904 (abbrev_table_read_table): Return abbrev_table_up.
12905 (abbrev_table_free, abbrev_table_free_cleanup)
12906 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12907 (load_partial_dies): Update.
12908
12909 2018-01-17 Tom Tromey <tom@tromey.com>
12910
12911 * dwarf2read.c (dwarf2_compute_name): Update comment.
12912 (read_func_scope, read_variable): Update.
12913 (new_symbol): Remove.
12914 (new_symbol_full): Rename to new_symbol.
12915
12916 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12917
12918 PR gdb/16577
12919 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12920 a warning instead of throwing an error, set section size to 0 and return
12921 NULL.
12922 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12923
12924 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12925
12926 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12927 std::string.
12928 (linux_ptrace_attach_fail_reason_string): Likewise.
12929 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12930 Likewise.
12931 (linux_ptrace_attach_fail_reason_string): Likewise.
12932 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12933
12934 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12935
12936 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12937
12938 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12939
12940 PR gdb/21559
12941 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12942 checking for fs_base/gs_base fields in struct user_regs_struct.
12943 * configure: Regenerate.
12944
12945 2018-01-17 Yao Qi <yao.qi@linaro.org>
12946
12947 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12948 function.
12949 (aarch64_linux_init_abi): Install it to gdbarch hook
12950 gcc_target_options.
12951
12952 2018-01-15 Pedro Alves <palves@redhat.com>
12953
12954 * common/signals-state-save-restore.c
12955 (save_original_signals_state): Fix typos.
12956
12957 2017-01-12 Tom Tromey <tom@tromey.com>
12958 Sergio Durigan Junior <sergiodj@redhat.com>
12959
12960 * Makefile.in (install-only): Install gdb-add-index.
12961
12962 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12963
12964 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12965
12966 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12967
12968 * infrun.c (keep_going_pass_signal): Clear step-over info when
12969 insert_breakpoints fails.
12970
12971 2018-01-11 Pedro Alves <palves@redhat.com>
12972
12973 PR gdb/22583
12974 * infrun.c (resume): Rename to ...
12975 (resume_1): ... this.
12976 (resume): Reimplement as wrapper around resume_1.
12977
12978 2018-01-11 Pedro Alves <palves@redhat.com>
12979
12980 PR remote/22597
12981 * remote.c (remote_parse_stop_reply): Default to the last-set
12982 general thread instead of to 'magic_null_ptid'.
12983
12984 2018-01-10 Pedro Alves <palves@redhat.com>
12985
12986 * language.h (language_get_symbol_name_matcher): Rename ...
12987 (get_symbol_name_matcher): ... this.
12988 * language.c (language_get_symbol_name_matcher): Ditto.
12989 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12990 callers adjusted.
12991
12992 2018-01-10 Pedro Alves <palves@redhat.com>
12993
12994 PR gdb/22670
12995 * dwarf2read.c
12996 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12997 Adjust to use language_get_symbol_name_matcher instead of
12998 language_defn::la_get_symbol_name_matcher.
12999 * language.c (language_get_symbol_name_matcher): If in Ada mode
13000 and the lookup name is a verbatim match, return Ada's matcher.
13001 * language.h (language_get_symbol_name_matcher): Adjust comment.
13002 (ada_lookup_name_info::verbatim_p):: New method.
13003
13004 2018-01-10 Pedro Alves <palves@redhat.com>
13005
13006 PR gdb/22670
13007 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13008 minsym's language is language_auto or language_cplus, pass down
13009 language_ada instead.
13010 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13011
13012 2018-01-10 Pedro Alves <palves@redhat.com>
13013
13014 PR gdb/22670
13015 * minsyms.c (linkage_name_str): New function.
13016 (iterate_over_minimal_symbols): Use it.
13017
13018 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13019
13020 * NEWS: Document that 'info proc' now works on FreeBSD.
13021
13022 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13023
13024 * configure.ac: Check for kinfo_getfile in libutil.
13025 * configure: Regenerate.
13026 * config.in: Regenerate.
13027 * fbsd-nat.c: Include "fbsd-tdep.h".
13028 (fbsd_fetch_cmdline): New.
13029 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13030 rather than calling error.
13031 (fbsd_info_proc): New.
13032 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13033 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13034 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13035
13036 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13037
13038 * fbsd-nat.c (struct free_deleter): Remove.
13039 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13040
13041 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13042
13043 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13044 NULL for an empty pathname.
13045
13046 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13047
13048 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13049 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13050 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13051 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13052 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13053 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13054 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13055 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13056 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13057 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13058 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13059 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13060 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13061 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13062 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13063
13064 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13065
13066 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13067 (gnu_xfer_auxv): New function.
13068 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13069 TARGET_OBJECT_AUXV.
13070
13071 2018-01-08 Yao Qi <yao.qi@linaro.org>
13072 Simon Marchi <simon.marchi@ericsson.com>
13073
13074 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13075 common/selftest.c.
13076 (COMMON_OBS): Remove selftest.o.
13077 * configure.ac: Append selftest-arch.c and common/selftest.c to
13078 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13079 * configure: Re-generated.
13080 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13081 GDB_SELF_TEST.
13082 (maintenance_info_selftests): Likewise.
13083
13084 2018-01-08 Xavier Roirand <roirand@adacore.com>
13085
13086 * ada-valprint.c (val_print_packed_array_elements): Use
13087 proper number of elements when printing an array indexed
13088 by an enumeration type.
13089
13090 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13091
13092 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13093 (dw2_get_file_names_reader): Adjust.
13094 (lookup_dwo_signatured_type): Adjust.
13095 (lookup_dwp_signatured_type): Adjust.
13096 (lookup_signatured_type): Adjust.
13097 (create_type_unit_group): Adjust.
13098 (get_type_unit_group): Adjust.
13099 (process_psymtab_comp_unit_reader): Adjust.
13100 (build_type_psymtabs_reader): Adjust.
13101 (scan_partial_symbols): Adjust.
13102 (add_partial_symbol): Adjust.
13103 (add_partial_subprogram): Adjust.
13104 (peek_die_abbrev): Adjust.
13105 (fixup_go_packaging): Adjust.
13106 (process_imported_unit_die): Adjust.
13107 (dwarf2_compute_name): Adjust.
13108 (dwarf2_physname): Adjust.
13109 (read_import_statement): Adjust.
13110 (handle_DW_AT_stmt_list): Adjust.
13111 (read_file_scope): Adjust.
13112 (read_func_scope): Adjust.
13113 (read_lexical_block_scope): Adjust.
13114 (read_call_site_scope): Adjust.
13115 (read_variable): Adjust.
13116 (dwarf2_rnglists_process): Adjust.
13117 (dwarf2_ranges_process): Adjust.
13118 (dwarf2_ranges_read): Adjust.
13119 (dwarf2_get_pc_bounds): Adjust.
13120 (dwarf2_record_block_ranges): Adjust.
13121 (dwarf2_add_field): Adjust.
13122 (dwarf2_add_member_fn): Adjust.
13123 (read_structure_type): Adjust.
13124 (process_structure_scope): Adjust.
13125 (read_enumeration_type): Adjust.
13126 (read_array_type): Adjust.
13127 (mark_common_block_symbol_computed): Adjust.
13128 (read_common_block): Adjust.
13129 (read_namespace_type): Adjust.
13130 (read_namespace): Adjust.
13131 (read_module_type): Adjust.
13132 (read_tag_pointer_type): Adjust.
13133 (read_tag_ptr_to_member_type): Adjust.
13134 (read_tag_string_type): Adjust.
13135 (read_subroutine_type): Adjust.
13136 (read_typedef): Adjust.
13137 (read_base_type): Adjust.
13138 (attr_to_dynamic_prop): Adjust.
13139 (read_subrange_type): Adjust.
13140 (read_unspecified_type): Adjust.
13141 (dwarf2_read_abbrevs): Adjust.
13142 (load_partial_dies): Adjust.
13143 (read_partial_die): Adjust.
13144 (find_partial_die): Adjust.
13145 (guess_partial_die_structure_name): Adjust.
13146 (fixup_partial_die): Adjust.
13147 (read_attribute_value): Adjust.
13148 (read_addr_index): Adjust.
13149 (read_addr_index_from_leb128): Adjust.
13150 (read_str_index): Adjust.
13151 (dwarf2_string_attr): Adjust.
13152 (get_debug_line_section): Adjust.
13153 (dwarf_decode_line_header): Adjust.
13154 (lnp_state_machine::check_line_address): Adjust.
13155 (dwarf_decode_lines_1): Adjust.
13156 (dwarf_decode_lines): Adjust.
13157 (dwarf2_start_symtab): Adjust.
13158 (var_decode_location): Adjust.
13159 (new_symbol_full): Adjust.
13160 (dwarf2_const_value_data): Adjust.
13161 (dwarf2_const_value_attr): Adjust.
13162 (dwarf2_const_value): Adjust.
13163 (die_type): Adjust.
13164 (die_containing_type): Adjust.
13165 (build_error_marker_type): Adjust.
13166 (lookup_die_type): Adjust.
13167 (guess_full_die_structure_name): Adjust.
13168 (anonymous_struct_prefix): Adjust.
13169 (determine_prefix): Adjust.
13170 (dwarf2_name): Adjust.
13171 (follow_die_ref_or_sig): Adjust.
13172 (follow_die_offset): Adjust.
13173 (follow_die_ref): Adjust.
13174 (follow_die_sig_1): Adjust.
13175 (follow_die_sig): Adjust.
13176 (get_signatured_type): Adjust.
13177 (get_DW_AT_signature_type): Adjust.
13178 (decode_locdesc): Adjust.
13179 (dwarf_decode_macros): Adjust.
13180 (cu_debug_loc_section): Adjust.
13181 (fill_in_loclist_baton): Adjust.
13182 (dwarf2_symbol_mark_computed): Adjust.
13183 (init_one_comp_unit): Don't assign
13184 dwarf2_cu::dwarf2_per_objfile.
13185 (set_die_type): Adjust.
13186
13187 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13188
13189 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13190 <dwarf2_per_objfile>: New field.
13191 (dwarf2_per_objfile): Remove global.
13192 (get_dwarf2_per_objfile): New function.
13193 (set_dwarf2_per_objfile): New function.
13194 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13195 dwarf2_per_objfile.
13196 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13197 (read_abbrev_offset): Likewise.
13198 (read_indirect_string): Likewise.
13199 (read_indirect_line_string): Likewise.
13200 (read_indirect_string_at_offset): Likewise.
13201 (read_indirect_string_from_dwz): Likewise.
13202 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13203 dwarf2_per_objfile.
13204 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13205 (create_all_comp_units): Change objfile parameter to
13206 dwarf2_per_objfile.
13207 (create_all_type_units): Likewise.
13208 (process_queue): Add dwarf2_per_objfile parameter.
13209 (read_and_check_comp_unit_head): Likewise.
13210 (lookup_dwo_unit_in_dwp): Likewise.
13211 (get_dwp_file): Likewise.
13212 (process_cu_includes): Likewise.
13213 (struct free_dwo_file_cleanup_data): New struct.
13214 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13215 set_dwarf2_per_objfile.
13216 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13217 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13218 context, adjust calls.
13219 (dw2_instantiate_symtab): Likewise.
13220 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13221 (dw2_get_cu): Likewise.
13222 (create_cu_from_index_list): Change objfile parameter to
13223 dwarf2_per_objfile.
13224 (create_cus_from_index_list): Get dwarf2_per_objfile from
13225 context, adjust calls.
13226 (create_cus_from_index): Likewise.
13227 (create_signatured_type_table_from_index): Change objfile
13228 parameter to dwarf2_per_objfile.
13229 (create_signatured_type_table_from_debug_names): Change objfile
13230 parameter to dwarf2_per_objfile.
13231 (create_addrmap_from_index): Likewise.
13232 (create_addrmap_from_aranges): Likewise.
13233 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13234 (dw2_setup): Remove.
13235 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13236 context.
13237 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13238 get_dwarf2_per_objfile.
13239 (dw2_forget_cached_source_info): Likewise.
13240 (dw2_map_symtabs_matching_filename): Likewise.
13241 (struct dw2_symtab_iterator) <index>: Remove.
13242 <dwarf2_per_objfile>: New field.
13243 (dw2_symtab_iter_init): Replace index parameter with
13244 dwarf2_per_objfile.
13245 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13246 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13247 (dw2_print_stats): Likewise.
13248 (dw2_dump): Likewise.
13249 (dw2_expand_symtabs_for_function): Likewise.
13250 (dw2_expand_all_symtabs): Likewise.
13251 (dw2_expand_symtabs_with_fullname): Likewise.
13252 (dw2_expand_marked_cus): Replace index and objfile parameters
13253 with dwarf2_per_objfile.
13254 (dw_expand_symtabs_matching_file_matcher): Add
13255 dwarf2_per_objfile parameter and adjust calls.
13256 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13257 adjust calls.
13258 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13259 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13260 adjust calls.
13261 (create_cus_from_debug_names_list): Replace objfile parameter
13262 with dwarf2_per_objfile and adjust calls.
13263 (create_cus_from_debug_names): Likewise.
13264 (dwarf2_read_debug_names): Likewise.
13265 (mapped_debug_names::namei_to_name): Adjust call.
13266 (dw2_debug_names_iterator::next): Likewise.
13267 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13268 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13269 (dw2_debug_names_dump): Likewise.
13270 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13271 (dw2_debug_names_expand_symtabs_matching): Likewise.
13272 (dwarf2_initialize_objfile): Likewise.
13273 (dwarf2_build_psymtabs): Likewise.
13274 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13275 this_cu.
13276 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13277 (read_and_check_comp_unit_head): Likewise.
13278 (read_abbrev_offset): Likewise.
13279 (create_debug_type_hash_table): Likewise.
13280 (create_debug_types_hash_table): Likewise.
13281 (create_all_type_units): Replace objfile parameter with
13282 dwarf2_per_objfile.
13283 (add_type_unit): Add dwarf2_per_objfile parameter.
13284 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13285 with dwarf2_per_objfile.
13286 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13287 (lookup_dwp_signatured_type): Likewise.
13288 (lookup_signatured_type): Likewise.
13289 (read_cutu_die_from_dwo): Likewise.
13290 (init_tu_and_read_dwo_dies): Likewise.
13291 (init_cutu_and_read_dies): Likewise.
13292 (init_cutu_and_read_dies_no_follow): Likewise.
13293 (allocate_type_unit_groups_table): Add objfile parameter.
13294 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13295 (get_type_unit_group): Likewise.
13296 (process_psymtab_comp_unit): Update call.
13297 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13298 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13299 (print_tu_stats): Likewise.
13300 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13301 in void* parameter.
13302 (build_type_psymtabs): Change objfile parameter to
13303 dwarf2_per_objfile.
13304 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13305 passed in void* parameter.
13306 (process_skeletonless_type_units): Change objfile parameter to
13307 dwarf2_per_objfile.
13308 (set_partial_user): Likewise.
13309 (dwarf2_build_psymtabs_hard): Likewise.
13310 (read_comp_units_from_section): Likewise.
13311 (create_all_comp_units): Likewise.
13312 (scan_partial_symbols): Update calls.
13313 (add_partial_symbol): Likewise.
13314 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13315 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13316 (process_queue): Add dwarf2_per_objfile parameter.
13317 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13318 (compute_compunit_symtab_includes): Likewise.
13319 (process_cu_includes): Add dwarf2_per_objfile parameter.
13320 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13321 (process_full_type_unit): Likewise.
13322 (process_imported_unit_die): Update call.
13323 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13324 (read_file_scope): Likewise.
13325 (allocate_dwo_file_hash_table): Add objfile parameter.
13326 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13327 (create_cus_hash_table): Likewise.
13328 (create_dwp_hash_table): Likewise.
13329 (create_dwo_unit_in_dwp_v1): Likewise.
13330 (create_dwp_v2_section): Likewise.
13331 (create_dwo_unit_in_dwp_v2): Likewise.
13332 (lookup_dwo_unit_in_dwp): Likewise.
13333 (try_open_dwop_file): Likewise.
13334 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13335 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13336 cleanup to include a reference to dwarf2_per_objfile.
13337 (open_dwp_file): Add dwarf2_per_objfile parameter.
13338 (open_and_init_dwp_file): Likewise.
13339 (get_dwp_file): Likewise.
13340 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13341 (queue_and_load_all_dwo_tus): Update call.
13342 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13343 data.
13344 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13345 (dwarf2_ranges_process): Likewise.
13346 (dwarf2_get_pc_bounds): Likewise.
13347 (mark_common_block_symbol_computed): Likewise.
13348 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13349 (dwarf2_read_abbrevs): Update call.
13350 (read_partial_die): Use dwarf2_per_objfile from cu.
13351 (find_partial_die): Likewise.
13352 (fixup_partial_die): Likewise.
13353 (read_attribute_value): Likewise.
13354 (read_indirect_string_at_offset_from): Add objfile parameter.
13355 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13356 parameter.
13357 (read_indirect_string_from_dwz): Add objfile parameter.
13358 (read_indirect_string): Add objfile parameter.
13359 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13360 (read_addr_index): Use dwarf2_per_objfile from cu.
13361 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13362 call dw2_setup.
13363 (read_str_index): Use dwarf2_per_objfile from cu.
13364 (get_debug_line_section): Likewise.
13365 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13366 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13367 (new_symbol_full): Use dwarf2_per_objfile from cu.
13368 (build_error_marker_type): Likewise.
13369 (lookup_die_type): Likewise.
13370 (determine_prefix): Likewise.
13371 (follow_die_offset): Likewise.
13372 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13373 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13374 (dwarf2_fetch_die_type_sect_off): Likewise.
13375 (dwarf2_get_die_type): Likewise.
13376 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13377 (get_signatured_type): Likewise.
13378 (get_DW_AT_signature_type): Likewise.
13379 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13380 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13381 (cu_debug_loc_section): Likewise.
13382 (fill_in_loclist_baton): Likewise.
13383 (dwarf2_symbol_mark_computed): Likewise.
13384 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13385 dwarf2_per_objfile.
13386 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13387 parameter.
13388 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13389 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13390 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13391 (set_die_type): Use dwarf2_free_objfile from cu.
13392 (get_die_type_at_offset): Likewise.
13393 (dwarf2_per_objfile_free): Don't assign global variable.
13394 (debug_names) <constructor>: Add dwarf2_per_objfile
13395 parameter, update m_debugstrlookup construction.
13396 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13397 parameter.
13398 <m_dwarf2_per_objfile>: New field.
13399 <lookup>: Use m_dwarf2_per_objfile.
13400 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13401 (psyms_seen_size): Likewise.
13402 (write_gdbindex): Replace objfile parameter with
13403 dwarf2_per_objfile.
13404 (write_debug_names): Likewise.
13405 (write_psymtabs_to_index): Likewise.
13406 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13407 calls.
13408
13409 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13410
13411 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13412 <dwarf2_per_objfile>: New field.
13413 (struct dwarf2_per_cu_data) <objfile>: Remove.
13414 <dwarf2_per_objfile>: New field.
13415 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13416 of objfile.
13417 (create_signatured_type_table_from_index): Likewise.
13418 (create_debug_type_hash_table): Likewise.
13419 (fill_in_sig_entry_from_dwo_entry): Likewise.
13420 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13421 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13422 objfile.
13423 (create_partial_symtab): Access objfile through
13424 dwarf2_per_objfile.
13425 (process_psymtab_comp_unit_reader): Likewise.
13426 (read_comp_units_from_section): Likewise.
13427 (scan_partial_symbols): Likewise.
13428 (add_partial_symbol): Likewise.
13429 (add_partial_subprogram): Likewise.
13430 (peek_die_abbrev): Likewise.
13431 (fixup_go_packaging): Likewise.
13432 (process_full_comp_unit): Likewise.
13433 (process_full_type_unit): Likewise.
13434 (process_imported_unit_die): Likewise.
13435 (dwarf2_compute_name): Likewise.
13436 (dwarf2_physname): Likewise.
13437 (read_import_statement): Likewise.
13438 (create_cus_hash_table): Assign dwarf2_physname instead of
13439 objfile.
13440 (read_func_scope): Access objfile through dwarf2_per_objfile.
13441 (read_lexical_block_scope): Likewise.
13442 (read_call_site_scope): Likewise.
13443 (read_variable): Likewise.
13444 (dwarf2_rnglists_process): Likewise.
13445 (dwarf2_ranges_process): Likewise.
13446 (dwarf2_ranges_read): Likewise.
13447 (dwarf2_record_block_ranges): Likewise.
13448 (dwarf2_add_field): Likewise.
13449 (dwarf2_add_member_fn): Likewise.
13450 (read_structure_type): Likewise.
13451 (process_structure_scope): Likewise.
13452 (read_enumeration_type): Likewise.
13453 (read_array_type): Likewise.
13454 (read_common_block): Likewise.
13455 (read_namespace_type): Likewise.
13456 (read_namespace): Likewise.
13457 (read_module_type): Likewise.
13458 (read_tag_pointer_type): Likewise.
13459 (read_tag_ptr_to_member_type): Likewise.
13460 (read_tag_string_type): Likewise.
13461 (read_subroutine_type): Likewise.
13462 (read_typedef): Likewise.
13463 (read_base_type): Likewise.
13464 (attr_to_dynamic_prop): Likewise.
13465 (read_subrange_type): Likewise.
13466 (read_unspecified_type): Likewise.
13467 (load_partial_dies): Likewise.
13468 (read_partial_die): Likewise.
13469 (find_partial_die): Likewise.
13470 (guess_partial_die_structure_name): Likewise.
13471 (fixup_partial_die): Likewise.
13472 (read_attribute_value): Likewise.
13473 (read_addr_index_from_leb128): Likewise.
13474 (dwarf2_read_addr_index): Likewise.
13475 (dwarf2_string_attr): Likewise.
13476 (lnp_state_machine::check_line_address): Likewise.
13477 (dwarf_decode_lines_1): Likewise.
13478 (dwarf_decode_lines): Likewise.
13479 (dwarf2_start_symtab): Likewise.
13480 (var_decode_location): Likewise.
13481 (new_symbol_full): Likewise.
13482 (dwarf2_const_value_data): Likewise.
13483 (dwarf2_const_value_attr): Likewise.
13484 (dwarf2_const_value): Likewise.
13485 (die_type): Likewise.
13486 (die_containing_type): Likewise.
13487 (lookup_die_type): Likewise.
13488 (guess_full_die_structure_name): Likewise.
13489 (anonymous_struct_prefix): Likewise.
13490 (dwarf2_name): Likewise.
13491 (follow_die_ref_or_sig): Likewise.
13492 (follow_die_offset): Likewise.
13493 (follow_die_ref): Likewise.
13494 (dwarf2_fetch_die_loc_sect_off): Likewise.
13495 (dwarf2_fetch_constant_bytes): Likewise.
13496 (dwarf2_fetch_die_type_sect_off): Likewise.
13497 (dwarf2_get_die_type): Likewise.
13498 (follow_die_sig): Likewise.
13499 (decode_locdesc): Likewise.
13500 (dwarf2_per_cu_objfile): Likewise.
13501 (dwarf2_per_cu_text_offset): Likewise.
13502 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13503 objfile.
13504 (set_die_type): Access objfile through
13505 dwarf2_per_objfile.
13506
13507 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13508
13509 * valprint.c (converted_character_d): Remove typedef.
13510 (DEF_VEC_O (converted_character_d)): Remove.
13511 (count_next_character): Use std::vector.
13512 (print_converted_chars_to_obstack): Likewise.
13513 (generic_printstr): Likewise.
13514
13515 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13516
13517 * xml-support.h (struct gdb_xml_value): Add constructor.
13518 <value>: Change type to unique_xmalloc_ptr.
13519 (gdb_xml_value_s): Remove typedef.
13520 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13521 (gdb_xml_element_start_handler): Change parameter type to
13522 std::vector.
13523 (xml_find_attribute): Likewise.
13524 * xml-support.c (xml_find_attribute): Change parameter type to
13525 std::vector and adjust.
13526 (gdb_xml_values_cleanup): Remove.
13527 (gdb_xml_parser::start_element): Adjust to std::vector.
13528 (xinclude_start_include): Change paraeter type to std::vector
13529 and adjust.
13530 * btrace.c (check_xml_btrace_version): Likewise.
13531 (parse_xml_btrace_block): Likewise.
13532 (parse_xml_btrace_pt_config_cpu): Likewise.
13533 (parse_xml_btrace_pt): Likewise.
13534 (parse_xml_btrace_conf_bts): Likewise.
13535 (parse_xml_btrace_conf_pt): Likewise.
13536 * memory-map.c (memory_map_start_memory): Likewise.
13537 (memory_map_start_property): Likewise.
13538 * osdata.c (osdata_start_osdata): Likewise.
13539 (osdata_start_item): Likewise.
13540 (osdata_start_column): Likewise.
13541 * remote.c (start_thread): Likewise.
13542 * solib-aix.c (library_list_start_library): Likewise.
13543 (library_list_start_list): Likewise.
13544 * solib-svr4.c (library_list_start_library): Likewise.
13545 (svr4_library_list_start_list): Likewise.
13546 * solib-target.c (library_list_start_segment): Likewise.
13547 (library_list_start_section): Likewise.
13548 (library_list_start_library): Likewise.
13549 (library_list_start_list): Likewise.
13550 * tracepoint.c (traceframe_info_start_memory): Likewise.
13551 (traceframe_info_start_tvar): Likewise.
13552 * xml-syscall.c (syscall_start_syscall): Likewise.
13553 * xml-tdesc.c (tdesc_start_target): Likewise.
13554 (tdesc_start_feature): Likewise.
13555 (tdesc_start_reg): Likewise.
13556 (tdesc_start_union): Likewise.
13557 (tdesc_start_struct): Likewise.
13558 (tdesc_start_flags): Likewise.
13559 (tdesc_start_enum): Likewise.
13560 (tdesc_start_field): Likewise.
13561 (tdesc_start_enum_value): Likewise.
13562 (tdesc_start_vector): Likewise.
13563
13564 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13565
13566 * extension.h (struct xmethod_worker) <clone>: Remove.
13567 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13568 Remove.
13569 (python_xmethod_worker::clone): Remove.
13570 * valops.c (find_overload_match): Use std::move instead of
13571 clone.
13572
13573 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13574
13575 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13576 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13577 <free_xmethod_worker_data>: Remove.
13578 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13579 <get_xmethod_arg_types>: Remove.
13580 <get_xmethod_result_type>: Remove.
13581 <invoke_xmethod>: Remove.
13582 * extension.c (new_xmethod_worker): Remove.
13583 (clone_xmethod_worker): Remove.
13584 (get_matching_xmethod_workers): Return void, pass std::vector by
13585 pointer.
13586 (get_xmethod_arg_types): Rename to...
13587 (xmethod_worker::get_arg_types): ... this, and adjust.
13588 (get_xmethod_result_type): Rename to...
13589 (xmethod_worker::get_result_type): ... this, and adjust.
13590 (invoke_xmethod): Remove.
13591 (free_xmethod_worker): Remove.
13592 (free_xmethod_worker_vec): Remove.
13593 * extension.h (enum ext_lang_rc): Move here from
13594 extension-priv.h.
13595 (struct xmethod_worker): Add constructor and destructor.
13596 <data>: Remove.
13597 <value>: Remove.
13598 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13599 virtual pure methods.
13600 <get_arg_types, get_result_type>: New methods.
13601 (xmethod_worker_ptr): Remove typedef.
13602 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13603 (xmethod_worker_vec): Remove typedef.
13604 (xmethod_worker_up): New typedef.
13605 (invoke_xmethod): Remove.
13606 (clone_xmethod_worker): Remove.
13607 (free_xmethod_worker): Remove.
13608 (free_xmethod_worker_vec): Remove.
13609 (get_xmethod_arg_types): Remove.
13610 (get_xmethod_result_type): Remove.
13611 * valops.c (find_method_list): Use std::vector, don't use
13612 intermediate vector.
13613 (value_find_oload_method_list): Use std::vector.
13614 (find_overload_match): Use std::vector.
13615 (find_oload_champ): Use std::vector.
13616 * value.c (value_free): Use operator delete.
13617 (value_of_xmethod): Rename to...
13618 (value_from_xmethod): ... this. Don't assign
13619 xmethod_worker::value, take rvalue-reference.
13620 (result_type_of_xmethod): Adjust.
13621 (call_xmethod): Adjust.
13622 * value.h: Include extension.h.
13623 (struct xmethod_worker): Don't forward-declare.
13624 (value_of_xmethod): Rename to...
13625 (value_from_xmethod): ... this, take rvalue-reference.
13626 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13627 (struct python_xmethod_worker): ... this, add constructor and
13628 destructor.
13629 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13630 (gdbpy_free_xmethod_worker_data): Rename to...
13631 (python_xmethod_worker::~python_xmethod_worker): ... this and
13632 adjust.
13633 (gdbpy_clone_xmethod_worker_data): Rename to...
13634 (python_xmethod_worker::clone): ... this and adjust.
13635 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13636 temporary vector.
13637 (gdbpy_get_xmethod_arg_types): Rename to...
13638 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13639 (gdbpy_get_xmethod_result_type): Rename to...
13640 (python_xmethod_worker::do_get_result_type): ... this and
13641 adjust.
13642 (gdbpy_invoke_xmethod): Rename to...
13643 (python_xmethod_worker::invoke): ... this and adjust.
13644 (new_python_xmethod_worker): Rename to...
13645 (python_xmethod_worker::python_xmethod_worker): ... this and
13646 adjust.
13647 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13648 Remove.
13649 (gdbpy_free_xmethod_worker_data): Remove.
13650 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13651 (gdbpy_get_xmethod_arg_types): Remove.
13652 (gdbpy_get_xmethod_result_type): Remove.
13653 (gdbpy_invoke_xmethod): Remove.
13654 * python/python.c (python_extension_ops): Remove obsolete
13655 callbacks.
13656
13657 2018-01-05 Pedro Alves <palves@redhat.com>
13658
13659 PR gdb/18653
13660 * common/signals-state-save-restore.c
13661 (save_original_signals_state): New parameter 'quiet'. Warn if we
13662 find a custom handler preinstalled, instead of internal erroring.
13663 But only warn if !quiet.
13664 * common/signals-state-save-restore.h
13665 (save_original_signals_state): New parameter 'quiet'.
13666 * main.c (captured_main_1): Move save_original_signals_state call
13667 after option handling, and pass QUIET.
13668
13669 2018-01-05 Pedro Alves <palves@redhat.com>
13670
13671 * spu-tdep.c (spu_catch_start): Pass
13672 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13673
13674 2018-01-05 Pedro Alves <palves@redhat.com>
13675
13676 PR gdb/22670
13677 * ada-lang.c (literal_symbol_name_matcher): New function.
13678 (ada_get_symbol_name_matcher): Use it for
13679 symbol_name_match_type::SEARCH_NAME.
13680 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13681 it down instead of assuming symbol_name_match_type::FULL.
13682 * block.h (block_lookup_symbol): New parameter 'match_type'.
13683 * c-valprint.c (print_unpacked_pointer): Use
13684 lookup_symbol_search_name instead of lookup_symbol.
13685 * compile/compile-object-load.c (get_out_value_type): Pass down
13686 symbol_name_match_type::SEARCH_NAME.
13687 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13688 symbol_name_match_type::FULL.
13689 * cp-support.c (cp_get_symbol_name_matcher): Handle
13690 symbol_name_match_type::SEARCH_NAME.
13691 * infrun.c (insert_exception_resume_breakpoint): Use
13692 lookup_symbol_search_name.
13693 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13694 * psymtab.c (maintenance_check_psymtabs): Use
13695 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13696 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13697 SYMBOL_SEARCH_NAME.
13698 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13699 if symbol_name_match_type::SEARCH_NAME.
13700 (lookup_symbol_in_language): Pass down
13701 symbol_name_match_type::FULL.
13702 (lookup_symbol_search_name): New.
13703 (lookup_language_this): Pass down
13704 symbol_name_match_type::SEARCH_NAME.
13705 (lookup_symbol_aux, lookup_local_symbol): New parameter
13706 'match_type'. Pass it down.
13707 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13708 (lookup_symbol_search_name): New declaration.
13709 (lookup_symbol_in_block): New 'match_type' parameter.
13710
13711 2018-01-05 Pedro Alves <palves@redhat.com>
13712
13713 PR gdb/22670
13714 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13715 ada_lookup_symbol.
13716 (ada_lookup_symbol): Reimplement in terms of
13717 ada_lookup_symbol_list, bits factored out from
13718 ada_lookup_encoded_symbol.
13719
13720 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13721
13722 * ada-exp.y (write_object_renaming): When subscripting an array
13723 using a symbol as the index, pass the block in call to
13724 ada_lookup_encoded_symbol when looking that symbol up.
13725
13726 2018-01-05 Jerome Guitton <guitton@adacore.com>
13727
13728 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13729 TYPE_INDEX_TYPE.
13730
13731 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13732
13733 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13734 the case where VALUE_LVAL (val0) is not lval_memory.
13735
13736 2018-01-05 Xavier Roirand <roirand@adacore.com>
13737
13738 * ada-valprint.c (print_optional_low_bound): Handle
13739 character-indexed array printing like boolean-indexed array
13740 printing.
13741
13742 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13743
13744 * NEWS: Create a new section for the next release branch.
13745 Rename the section of the current branch, now that it has
13746 been cut.
13747
13748 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13749
13750 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13751 * version.in: Bump version to 8.1.50.DATE-git.
13752
13753 2018-01-03 Xavier Roirand <roirand@adacore.com>
13754
13755 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13756 Add field.
13757 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13758 Add field.
13759 (default_exception_support_info) <catch_handlers_sym>: Add field.
13760 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13761 (ada_exception_name_addr_1): Add "catch handlers" handling.
13762 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13763 Update all callers.
13764 (create_excep_cond_exprs) <ex>: Add parameter.
13765 (re_set_exception): Update create_excep_cond_exprs call.
13766 (print_it_exception, print_one_exception, print_mention_exception)
13767 (print_recreate_exception): Add "catch handler" handling.
13768 (allocate_location_catch_handlers, re_set_catch_handlers)
13769 (check_status_catch_handlers, print_it_catch_handlers)
13770 (print_one_catch_handlers, print_mention_catch_handlers)
13771 (print_recreate_catch_handlers): New function.
13772 (catch_handlers_breakpoint_ops): New variable.
13773 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13774 Add parameter. Add "catch handler" handling.
13775 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13776 Add "catch handler" handling.
13777 (ada_exception_catchpoint_cond_string): Add "catch handler"
13778 handling.
13779 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13780 call.
13781 (catch_ada_handlers_command): New function.
13782 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13783 operations structure.
13784 (_initialize_ada_language): Add "catch handlers" command entry.
13785 * NEWS: Document "catch handlers" feature.
13786
13787 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13788
13789 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13790 account when creating the array type of the slice.
13791 (ada_value_slice): Likewise.
13792
13793 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13794
13795 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13796 New enum value.
13797 (create_array_type_with_stride): Add byte_stride_prop parameter.
13798 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13799 New parameter. Update all callers in this file.
13800 (array_type_has_dynamic_stride): New function.
13801 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13802 of arrays with dynamic byte strides.
13803 * dwarf2read.c (read_array_type): Add support for dynamic
13804 DW_AT_byte_stride attributes.
13805
13806 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13807
13808 * dwarf2read.c (read_unspecified_type): Treat
13809 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13810
13811 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13812
13813 Update copyright year range in all GDB files.
13814
13815 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13816
13817 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13818 and gdb/testsuite/gdb.base/step-line.c.
13819
13820 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13821
13822 * copyright.py (main): Dump the contents of
13823 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13824 even if BY_HAND is empty.
13825
13826 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13827
13828 * top.c (print_gdb_version): Update Copyright year in version
13829 message.
13830
13831 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13832
13833 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13834
13835 For older changes see ChangeLog-2017.
13836 \f
13837 Local Variables:
13838 mode: change-log
13839 left-margin: 8
13840 fill-column: 74
13841 version-control: never
13842 coding: utf-8
13843 End: